LP1859728: Allow users to add notes when creating a booking reservation
authorJane Sandberg <sandbej@linnbenton.edu>
Wed, 15 Jan 2020 00:32:58 +0000 (16:32 -0800)
committerChris Sharp <csharp@georgialibraries.org>
Fri, 21 Feb 2020 15:44:18 +0000 (10:44 -0500)
Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
Signed-off-by: Lynn Floyd <lfloyd1@library.in.gov>
Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
Open-ILS/src/eg2/src/app/staff/booking/create-reservation-dialog.component.html
Open-ILS/src/eg2/src/app/staff/booking/create-reservation-dialog.component.ts

index f2fa021..af68e76 100644 (file)
         i18n for="create-email-notify">Notify by email?</label>
       <input type="checkbox" formControlName="emailNotify">
     </div>
+    <div class="form-group row">
+      <label class="col-lg-4 text-right font-weight-bold"
+        i18n for="create-note">Note</label>
+      <input type="text" id="create-note"
+        class="form-control col-lg-7" formControlName="note">
+    </div>
   </form>
   <div class="modal-footer">
     <button (click)="addBresv$().subscribe()" [disabled]="!create.valid" class="btn btn-info" i18n>Confirm reservation</button>
index 0ef212b..bf61b19 100644 (file)
@@ -83,6 +83,7 @@ export class CreateReservationDialogComponent
             'startTime': new FormControl(null, notBeforeMomentValidator(Moment().add('15', 'minutes'))),
             'endTime': new FormControl(),
             'resourceList': new FormControl(),
+            'note': new FormControl(),
         }, [startTimeIsBeforeEndTimeValidator]
         );
         if (this.patronId) {
@@ -111,7 +112,8 @@ export class CreateReservationDialogComponent
                 this.targetResourceType.id,
                 selectedResourceId,
                 this.attributes.filter(Boolean),
-                this.emailNotify
+                this.emailNotify,
+                this.bresvNote
             ).pipe(tap(
                 (success) => {
                     if (success.ilsevent) {
@@ -197,6 +199,10 @@ export class CreateReservationDialogComponent
         return this.create.get('emailNotify').value;
     }
 
+    get bresvNote() {
+        return this.create.get('note').value;
+    }
+
     get patronBarcode() {
         return this.create.get('patronBarcode');
     }