Skip to content

Commit

Permalink
Have action activity display date and time
Browse files Browse the repository at this point in the history
  • Loading branch information
paulfalgout committed Aug 8, 2019
1 parent 09f6881 commit 6cf4eae
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,56 +7,56 @@ const CreatedTemplate = hbs`
{{#with metadata.editor}}
{{formatHTMLMessage (intlGet "patients.sidebar.action.activityViews.created") name = name role = role.name}}
{{/with}}
<div>{{formatMoment date "LONG"}}</div>
<div>{{formatMoment date "AT_TIME"}}</div>
`;

const ClinicianAssignedTemplate = hbs`
{{#with metadata}}
{{formatHTMLMessage (intlGet "patients.sidebar.action.activityViews.clinicianAssigned") name = editor.name role = editor.role.name to_name = value.to.name}}
{{/with}}
<div>{{formatMoment date "LONG"}}</div>
<div>{{formatMoment date "AT_TIME"}}</div>
`;

const DetailsUpdatedTemplate = hbs`
{{#with metadata.editor}}
{{formatHTMLMessage (intlGet "patients.sidebar.action.activityViews.detailsUpdated") name = name role = role.name}}
{{/with}}
<div>{{formatMoment date "LONG"}}</div>
<div>{{formatMoment date "AT_TIME"}}</div>
`;

const DueDateUpdatedTemplate = hbs`
{{#with metadata}}
{{formatHTMLMessage (intlGet "patients.sidebar.action.activityViews.dueDateUpdated") name = editor.name role = editor.role.name date = (formatMoment value.to "LONG")}}
{{/with}}
<div>{{formatMoment date "LONG"}}</div>
<div>{{formatMoment date "AT_TIME"}}</div>
`;

const DurationUpdatedTemplate = hbs`
{{#with metadata}}
{{formatHTMLMessage (intlGet "patients.sidebar.action.activityViews.durationUpdated") name = editor.name role = editor.role.name duration = (formatDuration value.to "minutes")}}
{{/with}}
<div>{{formatMoment date "LONG"}}</div>
<div>{{formatMoment date "AT_TIME"}}</div>
`;

const NameUpdatedTemplate = hbs`
{{#with metadata}}
{{formatHTMLMessage (intlGet "patients.sidebar.action.activityViews.nameUpdated") name = editor.name role = editor.role.name to_name = value.to from_name = value.from}}
{{/with}}
<div>{{formatMoment date "LONG"}}</div>
<div>{{formatMoment date "AT_TIME"}}</div>
`;

const RoleAssignedTemplate = hbs`
{{#with metadata}}
{{formatHTMLMessage (intlGet "patients.sidebar.action.activityViews.roleAssigned") name = editor.name role = editor.role.name to_role = value.to.name}}
{{/with}}
<div>{{formatMoment date "LONG"}}</div>
<div>{{formatMoment date "AT_TIME"}}</div>
`;

const StateUpdatedTemplate = hbs`
{{#with metadata}}
{{formatHTMLMessage (intlGet "patients.sidebar.action.activityViews.stateUpdated") name = editor.name role = editor.role.name to_state = value.to}}
{{/with}}
<div>{{formatMoment date "LONG"}}</div>
<div>{{formatMoment date "AT_TIME"}}</div>
`;

const ActivityView = View.extend({
Expand Down
2 changes: 1 addition & 1 deletion test/integration/patients/sidebar/action-sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ context('action sidebar', function() {
name: 'Name',
details: 'Details',
duration: 5,
due_date: moment(now).subtract(1, 'days').format(),
due_date: moment(local).subtract(2, 'days').format('YYYY-MM-DD'),
updated_at: now.format(),
};
fx.data[0].relationships.clinician.data = { id: currentClinicianId };
Expand Down

0 comments on commit 6cf4eae

Please sign in to comment.