Skip to content

Commit

Permalink
Merge pull request #37 from Lewiscowles1986/feature/display-notificat…
Browse files Browse the repository at this point in the history
…ion-time

Display notification expectated time in Listing
  • Loading branch information
jonedavis committed Jan 16, 2020
2 parents 720da29 + 73f3e28 commit a2a57b4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions test/appoinment.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe('appointment', function() {
appointment = new Appointment({
name: 'Appointment',
phoneNumber: '+5555555',
time: new Date(),
time: '2016-02-17 12:00:00',
notification: 15,
timeZone: 'Africa/Algiers',
});
Expand All @@ -27,7 +27,8 @@ describe('appointment', function() {
.expect(function(response) {
expect(response.text).to.contain('Appointment');
expect(response.text).to.contain('+5555555');
expect(response.text).to.contain('15');
expect(response.text).to.contain('2016-02-17 12:00pm');
expect(response.text).to.contain('2016-02-17 11:45am');
expect(response.text).to.contain('Africa/Algiers');
})
.expect(200, done);
Expand Down
6 changes: 3 additions & 3 deletions views/appointments/index.pug
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ block content
th Name
th Phone Number
th Appointment time (UTC)
th Notification Time (minutes)
th Notification time (UTC)
th Time Zone
th Actions
th
Expand All @@ -16,8 +16,8 @@ block content
tr
td !{appointment.name}
td !{appointment.phoneNumber}
td !{appointment.time}
td !{appointment.notification}
td #{moment(appointment.time).format('YYYY-MM-DD hh:mma')}
td #{moment(appointment.time).subtract(appointment.notification, 'minutes').format('YYYY-MM-DD hh:mma')}
td !{appointment.timeZone}
td
a.btn.btn-default.btn-sm(href="/appointments/" + appointment.id + "/edit") Edit
Expand Down

0 comments on commit a2a57b4

Please sign in to comment.