From a6afbe30e296656c283f93aa543b0e6f7fe05d12 Mon Sep 17 00:00:00 2001 From: Josh Weisman Date: Thu, 2 Sep 2021 13:06:52 +0300 Subject: [PATCH] Add replacement field Duration available in notification (#48) --- cloudapp/src/app/configuration/configuration.component.html | 2 +- cloudapp/src/app/models/event-utils.service.ts | 4 +++- manifest.json | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/cloudapp/src/app/configuration/configuration.component.html b/cloudapp/src/app/configuration/configuration.component.html index a8c87e9..2064149 100644 --- a/cloudapp/src/app/configuration/configuration.component.html +++ b/cloudapp/src/app/configuration/configuration.component.html @@ -84,7 +84,7 @@

Configuration

Body - The following replacement fields are available: startTime, location + Replacement fields available: startTime, location, duration Cancellation Body diff --git a/cloudapp/src/app/models/event-utils.service.ts b/cloudapp/src/app/models/event-utils.service.ts index c97dc88..23649c2 100644 --- a/cloudapp/src/app/models/event-utils.service.ts +++ b/cloudapp/src/app/models/event-utils.service.ts @@ -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 ''; } @@ -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' }; diff --git a/manifest.json b/manifest.json index 7b6832e..196b23d 100644 --- a/manifest.json +++ b/manifest.json @@ -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",