Skip to content

Commit

Permalink
build(staff): CI build from 9bc1456e2
Browse files Browse the repository at this point in the history
  • Loading branch information
HarrySSaini committed Dec 12, 2024
1 parent 4631bbc commit 2b4c005
Show file tree
Hide file tree
Showing 4 changed files with 1,324 additions and 1,243 deletions.
93 changes: 65 additions & 28 deletions staff/main-es2015.js
Original file line number Diff line number Diff line change
Expand Up @@ -10541,15 +10541,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
/* tslint:disable */
exports.VERSION = {
"dirty": false,
"raw": "f96712b73",
"hash": "f96712b73",
"raw": "9bc1456e2",
"hash": "9bc1456e2",
"distance": null,
"tag": null,
"semver": null,
"suffix": "f96712b73",
"suffix": "9bc1456e2",
"semverString": null,
"version": "0.0.0",
"time": 1733977368186
"time": 1734038699575
};
/* tslint:enable */

Expand Down Expand Up @@ -20293,7 +20293,7 @@ CateringDropComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CateringDropCompone
i0.ɵɵelementStart(4, "div", 0);
i0.ɵɵelementStart(5, "div", 1);
i0.ɵɵelementStart(6, "p");
i0.ɵɵtext(7, "Proceed without catering?");
i0.ɵɵtext(7, "New proposed meeting time is outside catering hours. Proceed without catering?");
i0.ɵɵelementEnd();
i0.ɵɵelementEnd();
i0.ɵɵelementEnd();
Expand Down Expand Up @@ -31846,6 +31846,7 @@ const ui_1 = __webpack_require__(/*! @mckinsey-converge/ui */ "../../libs/ui/src
const buildings_1 = __webpack_require__(/*! @mckinsey-converge/buildings */ "../../libs/buildings/src/index.ts");
const room_booking_modal_component_1 = __webpack_require__(/*! ../room-booking-modal/room-booking-modal.component */ "./src/app/booking/room-booking-modal/room-booking-modal.component.ts");
const router_1 = __webpack_require__(/*! @angular/router */ "../../node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js");
const ui_2 = __webpack_require__(/*! @mckinsey-converge/ui */ "../../libs/ui/src/index.ts");
const i0 = __webpack_require__(/*! @angular/core */ "../../node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const i1 = __webpack_require__(/*! @angular/router */ "../../node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js");
const i2 = __webpack_require__(/*! @angular/material/dialog */ "../../node_modules/@angular/material/__ivy_ngcc__/fesm2015/dialog.js");
Expand Down Expand Up @@ -33041,30 +33042,68 @@ class BookingDetailsModalComponent extends base_1.BaseDirective {
this.loading = false;
return;
}
// booking.save() won't use the toAPIJSON conversion so use the booking service.
this._bookings.save(booking).then((bkn) => {
// update booking
this.updateBookingState(booking);
this.form = data_common_1.generateBookingForm(booking, this.available_fields);
this.loading = false;
this.displayInfoBanner();
booking.room.building.name;
this._service.analytics.track('update', {
booking_id: booking.id,
office: booking.room.building.name,
room: booking.room.global_name,
start_time: booking.startDateTz.ms,
end_time: booking.endDateTz.ms,
catering: !!booking.catering.legth,
headcount: booking.head_count,
// -----------------------------------------------------------
// Check if catering is outside allowed hours before saving
// -----------------------------------------------------------
if (this.hasCateringOutsideHours(booking)) {
this.dialog.open(ui_2.CateringDropComponent, {
panelClass: 'mck-modal-mini',
autoFocus: false,
backdropClass: 'mck-modal-backdrop',
})
.afterClosed().subscribe((confirm_drop) => {
if (confirm_drop) {
// User chose to drop catering and proceed
booking.catering = [];
this.saveBooking(booking);
}
else {
// User cancelled - do not save, just stop here
this.loading = false;
}
});
}, (err) => {
this.loading = false;
this.expandedAvailability = false;
this.displayWarningBanner(data_common_1.getStatusErrorMessage(err === null || err === void 0 ? void 0 : err.status));
});
}
else {
// If catering is within hours or no catering issue, just save
this.saveBooking(booking);
}
}
}
saveBooking(booking) {
// booking.save() won't use the toAPIJSON conversion so use the booking service.
this._bookings.save(booking).then((bkn) => {
// update booking
this.updateBookingState(booking);
this.form = data_common_1.generateBookingForm(booking, this.available_fields);
this.loading = false;
this.displayInfoBanner();
booking.room.building.name;
this._service.analytics.track('update', {
booking_id: booking.id,
office: booking.room.building.name,
room: booking.room.global_name,
start_time: booking.startDateTz.ms,
end_time: booking.endDateTz.ms,
catering: !!booking.catering.length,
headcount: booking.headcount,
});
}, (err) => {
this.loading = false;
this.expandedAvailability = false;
this.displayWarningBanner(data_common_1.getStatusErrorMessage(err === null || err === void 0 ? void 0 : err.status));
});
}
/**
* Check if the booking has catering and if it's outside allowed hours.
*/
hasCateringOutsideHours(booking) {
if (!(booking === null || booking === void 0 ? void 0 : booking.catering) || !booking.catering.length)
return false;
// Extract the hour from startDateTz
const hour = booking.startDateTz.date.hour;
// Check if hour is outside 7 AM - 8 PM
return hour < 7 || hour >= 20;
}
/**
* Open dialog if booking date and time is out of office rule
* TO DO : Redundant code - same validaiton been applied over room detail while creating new booking - need to handle more graceful way. better if user been prohibited from choose future date if out of office rule on show avaialability calender itself
Expand Down Expand Up @@ -38860,12 +38899,10 @@ class RoomAvailabilityPreviewModalComponent {
return this.data.pendingDateTz; // new DateTZ({ date: this.data.pendingDate.valueOf(), is_local_tz: false, building_tz: this.data?.space?.timezone })
}
ngOnInit() {
console.log('Here 1');
this.formGroup.setValue({
dateTz: this.data.pendingDateTz,
duration: this.data.pendingDuration,
});
console.log('Here 2');
this.updateDisplay();
}
// Method run when the confirming the modal.
Expand Down
2 changes: 1 addition & 1 deletion staff/main-es2015.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit 2b4c005

Please sign in to comment.