Skip to content

Commit

Permalink
Add replacement field
Browse files Browse the repository at this point in the history
Duration available in notification (#48)
  • Loading branch information
jweisman committed Sep 2, 2021
1 parent f11ff96 commit a6afbe3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ <h2 translate>Configuration</h2>
<mat-form-field appearance="standard" class="full-width">
<mat-label>Body</mat-label>
<textarea matInput rows=10 type="text" [formControl]="notification.controls.body" [readonly]="!notificationActive"></textarea>
<mat-hint>The following replacement fields are available: startTime, location</mat-hint>
<mat-hint>Replacement fields available: startTime, location, duration</mat-hint>
</mat-form-field>
<mat-form-field appearance="standard" class="full-width">
<mat-label>Cancellation Body</mat-label>
Expand Down
4 changes: 3 additions & 1 deletion cloudapp/src/app/models/event-utils.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ export class EventUtilsService {
return formatDate(event.startTime, notification.dateFormat);
case 'location':
return location.name;
case 'duration':
return event.duration.toString();
default:
return '';
}
Expand Down Expand Up @@ -175,7 +177,7 @@ export class EventUtilsService {
}

const formatDate = (dt: Date, locale: string) => {
const options = {
const options: Intl.DateTimeFormatOptions = {
weekday: 'long', year: 'numeric', month: 'long', day: 'numeric',
hour: 'numeric', minute: 'numeric'
};
Expand Down
4 changes: 2 additions & 2 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"id": "exlibrisgroup/alma-scheduler",
"title": "Appointment Scheduler",
"description": "Define locations and schedule appointments for Alma users. Configuration supports hours and duration and multiple locations with capacity. Sends email to users when events are created. Note: This app is currently available in beta form.",
"author": "Ex Libris",
"subtitle": "Schedule appointments for users at defined locations",
"author": "Ex Libris",
"description": "Define locations and schedule appointments for Alma users. Configuration supports hours and duration and multiple locations with capacity. Sends email to users when events are created. Note: This app is currently available in beta form.",
"license": "https://raw.githubusercontent.com/exlibrisgroup/alma-scheduler/master/LICENSE",
"icon": {
"type": "font",
Expand Down

0 comments on commit a6afbe3

Please sign in to comment.