Files
kapp/4.js
T
2026-05-12 16:58:11 -03:00

1107 lines
62 KiB
JavaScript

(self["webpackChunkapp"] = self["webpackChunkapp"] || []).push([[4],{
/***/ 40004:
/*!**************************************************************************************************************!*\
!*** ./src/app/create-event/create-event-event-start-date-time/create-event-event-start-date-time.module.ts ***!
\**************************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "CreateEventEventStartDateTimePageModule": () => (/* binding */ CreateEventEventStartDateTimePageModule)
/* harmony export */ });
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/router */ 61380);
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_angular_router__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var src_app_shared_module_shared_module_module__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! src/app/shared-module/shared-module.module */ 69270);
/* harmony import */ var _create_event_event_start_date_time_page__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./create-event-event-start-date-time.page */ 41270);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/core */ 45449);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_angular_core__WEBPACK_IMPORTED_MODULE_3__);
const routes = [
{
path: '',
component: _create_event_event_start_date_time_page__WEBPACK_IMPORTED_MODULE_2__.CreateEventEventStartDateTimePage
}
];
class CreateEventEventStartDateTimePageModule {
}
CreateEventEventStartDateTimePageModule.ɵfac = function CreateEventEventStartDateTimePageModule_Factory(t) { return new (t || CreateEventEventStartDateTimePageModule)(); };
CreateEventEventStartDateTimePageModule.ɵmod = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdefineNgModule"]({ type: CreateEventEventStartDateTimePageModule });
CreateEventEventStartDateTimePageModule.ɵinj = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdefineInjector"]({ imports: [src_app_shared_module_shared_module_module__WEBPACK_IMPORTED_MODULE_1__.SharedModuleModule, _angular_router__WEBPACK_IMPORTED_MODULE_0__.RouterModule.forChild(routes)] });
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵsetNgModuleScope"](CreateEventEventStartDateTimePageModule, { declarations: [_create_event_event_start_date_time_page__WEBPACK_IMPORTED_MODULE_2__.CreateEventEventStartDateTimePage], imports: [src_app_shared_module_shared_module_module__WEBPACK_IMPORTED_MODULE_1__.SharedModuleModule, _angular_router__WEBPACK_IMPORTED_MODULE_0__.RouterModule] }); })();
/***/ }),
/***/ 41270:
/*!************************************************************************************************************!*\
!*** ./src/app/create-event/create-event-event-start-date-time/create-event-event-start-date-time.page.ts ***!
\************************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "CreateEventEventStartDateTimePage": () => (/* binding */ CreateEventEventStartDateTimePage)
/* harmony export */ });
/* harmony import */ var _Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ 71670);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ 45449);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_angular_core__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! moment */ 56908);
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _shared_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @shared/components */ 7667);
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @angular/forms */ 2508);
/* harmony import */ var _shared_services__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @shared/services */ 17253);
/* harmony import */ var _ionic_angular__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @ionic/angular */ 93819);
/* harmony import */ var _shared_services_state_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @shared/services/state.service */ 21284);
/* harmony import */ var _shared_services_focus_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @shared/services/focus.service */ 37763);
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/common */ 90944);
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_angular_common__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var _shared_components_header_header_component__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../shared/components/header/header.component */ 36290);
/* harmony import */ var _shared_components_list_recurrence_dates_list_recurrence_dates_component__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../shared/components/list-recurrence-dates/list-recurrence-dates.component */ 96893);
/* harmony import */ var _shared_components_customtimepicker_customtimepicker_component__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../shared/components/customtimepicker/customtimepicker.component */ 31044);
/* harmony import */ var _ngx_translate_core__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @ngx-translate/core */ 38699);
/* eslint-disable @typescript-eslint/member-ordering */
function CreateEventEventStartDateTimePage_div_14_div_1_Template(rf, ctx) {
if (rf & 1) {
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](0, "div", 16);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](1);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
}
if (rf & 2) {
const e_r7 = ctx.$implicit;
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](1);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtextInterpolate1"](" ", e_r7.message, " ");
}
}
function CreateEventEventStartDateTimePage_div_14_Template(rf, ctx) {
if (rf & 1) {
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](0, "div", 14);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtemplate"](1, CreateEventEventStartDateTimePage_div_14_div_1_Template, 2, 1, "div", 15);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
}
if (rf & 2) {
const ctx_r0 = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵnextContext"]();
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](1);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("ngForOf", ctx_r0.getFieldInputValidationErrors("startDate"));
}
}
function CreateEventEventStartDateTimePage_div_25_div_1_Template(rf, ctx) {
if (rf & 1) {
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](0, "div", 16);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](1);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
}
if (rf & 2) {
const e_r10 = ctx.$implicit;
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](1);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtextInterpolate1"](" ", e_r10.message, " ");
}
}
function CreateEventEventStartDateTimePage_div_25_Template(rf, ctx) {
if (rf & 1) {
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](0, "div", 14);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtemplate"](1, CreateEventEventStartDateTimePage_div_25_div_1_Template, 2, 1, "div", 15);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
}
if (rf & 2) {
const ctx_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵnextContext"]();
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](1);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("ngForOf", ctx_r1.getFieldInputValidationErrors("endDate"));
}
}
function CreateEventEventStartDateTimePage_ion_select_option_34_Template(rf, ctx) {
if (rf & 1) {
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](0, "ion-select-option", 17);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](1);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
}
if (rf & 2) {
const floor_r12 = ctx.$implicit;
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("value", floor_r12);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](1);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtextInterpolate"](floor_r12.description);
}
}
function CreateEventEventStartDateTimePage_ion_item_35_ion_select_option_8_Template(rf, ctx) {
if (rf & 1) {
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](0, "ion-select-option", 17);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](1);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
}
if (rf & 2) {
const group_r14 = ctx.$implicit;
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("value", group_r14);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](1);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtextInterpolate"](group_r14.description);
}
}
function CreateEventEventStartDateTimePage_ion_item_35_Template(rf, ctx) {
if (rf & 1) {
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](0, "ion-item", 5)(1, "ion-label");
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](2);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipe"](3, "translate");
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](4, "ion-select", 18);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipe"](5, "translate");
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipe"](6, "translate");
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipe"](7, "translate");
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtemplate"](8, CreateEventEventStartDateTimePage_ion_item_35_ion_select_option_8_Template, 2, 2, "ion-select-option", 10);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]()();
}
if (rf & 2) {
const ctx_r3 = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵnextContext"]();
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("className", "input-holder")("disabled", ctx_r3.disableInputDates);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](2);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtextInterpolate"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipeBind1"](3, 8, "PG_CREATE_DATE_STEP_TEXT_GROUP"));
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](2);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("placeholder", _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipeBind1"](5, 10, "PG_CREATE_DATE_STEP_SELECT_GROUP"))("okText", _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipeBind1"](6, 12, "PG_CREATE_DATE_STEP_SELECT_GROUP_OK"))("cancelText", _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipeBind1"](7, 14, "PG_CREATE_DATE_STEP_SELECT_GROUP_CANCEL"))("compareWith", ctx_r3.selectGroupCompareWith);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](4);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("ngForOf", ctx_r3.groups);
}
}
function CreateEventEventStartDateTimePage_div_36_div_1_Template(rf, ctx) {
if (rf & 1) {
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](0, "div", 16);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](1);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
}
if (rf & 2) {
const e_r16 = ctx.$implicit;
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](1);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtextInterpolate1"](" ", e_r16.message, " ");
}
}
function CreateEventEventStartDateTimePage_div_36_Template(rf, ctx) {
if (rf & 1) {
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](0, "div", 14);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtemplate"](1, CreateEventEventStartDateTimePage_div_36_div_1_Template, 2, 1, "div", 15);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
}
if (rf & 2) {
const ctx_r4 = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵnextContext"]();
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](1);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("ngForOf", ctx_r4.getFieldInputValidationErrors("floor"));
}
}
function CreateEventEventStartDateTimePage_ng_container_38_Template(rf, ctx) {
if (rf & 1) {
const _r20 = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵgetCurrentView"]();
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementContainerStart"](0);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](1, "div", 19)(2, "button", 20);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵlistener"]("click", function CreateEventEventStartDateTimePage_ng_container_38_Template_button_click_2_listener() {
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵrestoreView"](_r20);
const ctx_r19 = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵnextContext"]();
return _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵresetView"](ctx_r19.goOneStepBack());
});
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](3);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipe"](4, "translate");
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](5, "button", 21);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](6);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipe"](7, "translate");
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]()();
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementContainerEnd"]();
}
if (rf & 2) {
const connectionsStatus_r18 = ctx.ngIf;
const ctx_r5 = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵnextContext"]();
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](3);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtextInterpolate1"](" ", _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipeBind1"](4, 3, "BTN_BACK"), " ");
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](2);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("disabled", ctx_r5.disabledBtnNext || connectionsStatus_r18.status === "Offline");
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](1);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtextInterpolate1"](" ", _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipeBind1"](7, 5, "BTN_NEXT"), " ");
}
}
class CreateEventEventStartDateTimePage {
constructor(formBuilder, navigationService, notificatorService, createEventService, modalController, momentService, translateConfigService, stateService, datePickerService, focusService, cdr, bookeiService, logService, authService, profileManagerService, apiService) {
var _this = this;
this.formBuilder = formBuilder;
this.navigationService = navigationService;
this.notificatorService = notificatorService;
this.createEventService = createEventService;
this.modalController = modalController;
this.momentService = momentService;
this.translateConfigService = translateConfigService;
this.stateService = stateService;
this.datePickerService = datePickerService;
this.focusService = focusService;
this.cdr = cdr;
this.bookeiService = bookeiService;
this.logService = logService;
this.authService = authService;
this.profileManagerService = profileManagerService;
this.apiService = apiService;
this.todayDate = null;
this.startDate = null;
this.startDay = null;
this.endDate = null;
this.minDate = null;
this.maxDate = null;
this.floors = [];
this.groups = [];
this.approveEventReview = '';
this.disabledBtnNext = false;
this.recurrenceDates = [];
this.disableInputDates = false; // KA_APP-704
this.setInitialValueForFloor = () => {
let floor = this.createEventService.getSelectedFloor();
if (floor && floor?.code) {
floor = this.floors.find(f => f.code === floor.code);
} else {
floor = this.floors[0];
}
if (floor) {
this.eventDateForm.controls.floor.setValue(floor);
}
};
this.setInitialValueForGroup = () => {
let group = this.createEventService.getSelectedGroup();
if (group && group?.code) {
group = this.groups.find(g => g.code === group.code);
} else {
group = this.groups[0];
}
if (group) {
this.eventDateForm.controls.group.setValue(group);
}
};
this.setInitialValueForTodayDate = () => {
this.todayDate = new Date();
};
this.setInitialValueForStartDay = () => {
const startDay = this.createEventService.getStartDate();
if (!startDay) {
this.startDay = moment__WEBPACK_IMPORTED_MODULE_2___default()();
this.startDay = moment__WEBPACK_IMPORTED_MODULE_2___default()(this.startDay).add(5, 'minutes');
} else {
if (this.recurrenceDates.length > 0) {
this.startDay = moment__WEBPACK_IMPORTED_MODULE_2___default()(this.recurrenceDates[0].happensAt);
} else {
this.startDay = moment__WEBPACK_IMPORTED_MODULE_2___default()(startDay);
}
}
};
this.setInitialValueForStartDate = () => {
const startDate = this.createEventService.getStartDate();
if (!startDate) {
this.startDate = moment__WEBPACK_IMPORTED_MODULE_2___default()();
this.startDate = moment__WEBPACK_IMPORTED_MODULE_2___default()(this.startDate).add(5, 'minutes');
} else {
this.startDate = moment__WEBPACK_IMPORTED_MODULE_2___default()(startDate);
}
this.hourStartSelected = this.startDate?.format('HH:mm');
};
this.setInitialValueForEndDate = () => {
const endDate = this.createEventService.getEndDate();
if (!endDate) {
this.endDate = moment__WEBPACK_IMPORTED_MODULE_2___default()();
if (moment__WEBPACK_IMPORTED_MODULE_2___default()(this.endDate).hours() === 23) {
this.endDate = moment__WEBPACK_IMPORTED_MODULE_2___default()(this.endDate).set({
minutes: 59
});
} else {
this.endDate = moment__WEBPACK_IMPORTED_MODULE_2___default()(this.endDate).add(1, 'hours');
}
} else {
this.endDate = moment__WEBPACK_IMPORTED_MODULE_2___default()(endDate);
}
this.hourEndSelected = this.endDate?.format('HH:mm');
};
/*
setMinDate = () => {
this.minDate = new Date();
this.minDate.setHours(0 - this.minDate.getTimezoneOffset() / 60, 0, 0, 0);
};
setMaxDate = () => {
this.maxDate = new Date();
this.maxDate.setHours(23 - this.maxDate.getTimezoneOffset() / 60);
this.maxDate.setMinutes(59, 59, 0);
this.maxDate.setFullYear(this.maxDate.getFullYear() + 100);
};
get minDateISOString(): string {
return this.minDate.toISOString();
}
get maxDateISOString(): string {
return this.maxDate.toISOString();
}
*/
this.onSubmit = () => {
this.cleanValidationErrors();
const startDay = moment__WEBPACK_IMPORTED_MODULE_2___default()(this.startDay);
let startDate = moment__WEBPACK_IMPORTED_MODULE_2___default()(this.startDate);
let endDate = moment__WEBPACK_IMPORTED_MODULE_2___default()(this.endDate);
this.compareEndDateAndStartDate(endDate, startDate);
if (this.max24h && !this.recurrenceDates.length) {
const addDayEnd = moment__WEBPACK_IMPORTED_MODULE_2___default()(startDay).add(1, 'd');
const month = addDayEnd.month();
const year = addDayEnd.year();
const day = addDayEnd.date();
endDate = endDate.date(day).month(month).year(year).set({
seconds: 59
});
} else {
if (!this.recurrenceDates.length) {
endDate = moment__WEBPACK_IMPORTED_MODULE_2___default()(endDate).date(startDay.date()).month(startDay.month()).year(startDay.year()).set({
seconds: 59
});
} else {
const lastDate = this.recurrenceDates.slice().pop();
const lastDateWithTime = moment__WEBPACK_IMPORTED_MODULE_2___default()(lastDate.happensAt).set({
hours: moment__WEBPACK_IMPORTED_MODULE_2___default()(this.endDate).hours(),
minutes: moment__WEBPACK_IMPORTED_MODULE_2___default()(this.endDate).minutes(),
seconds: moment__WEBPACK_IMPORTED_MODULE_2___default()(this.endDate).seconds()
});
console.log('lastDateWithTime', lastDateWithTime.format());
endDate = moment__WEBPACK_IMPORTED_MODULE_2___default()(this.endDate).set({
seconds: 59
});
endDate = lastDateWithTime;
console.log('EndDate', endDate.format());
}
}
startDate = moment__WEBPACK_IMPORTED_MODULE_2___default()(startDate).date(startDay.date()).month(startDay.month()).year(startDay.year()).set({
seconds: 0
});
endDate = moment__WEBPACK_IMPORTED_MODULE_2___default()(endDate).set({
seconds: 59
});
const floor = this.eventDateForm.controls.floor.value;
const group = this.eventDateForm.controls.group.value;
const data = {
startDate: moment__WEBPACK_IMPORTED_MODULE_2___default()(startDate).format(),
endDate: moment__WEBPACK_IMPORTED_MODULE_2___default()(endDate).format(),
floor,
group
};
const validationResult = this.validateInput(data);
if (!!validationResult.length && !this.recurrenceDates.length) {
this.setValidationErrors(validationResult);
const title = this.translateConfigService.translate('PG_CREATE_DATE_STEP_TOAST_INVALID_DATA_TITLE');
const message = this.translateConfigService.translate('PG_CREATE_DATE_STEP_TOAST_INVALID_DATA_NESSAGE');
const notification = {
title,
message,
type: 'error'
};
this.notificatorService.notify(notification);
} else {
this.createEventService.setStartDate(startDate);
this.createEventService.setEndDate(endDate);
this.createEventService.setSelectedFloor(floor);
this.createEventService.setSelectedGroup(group);
this.createEventService.setRecurrent(this.recurrenceDates?.length > 1);
this.createEventService.setRecurrenceDates(this.recurrenceDates); // this.navigationService.forward(['/create-event-event-hosts']);
// KA_APP-701
const maxDates = this.createEventService.getMaxDatesRecurrence();
if (maxDates && maxDates !== undefined && maxDates !== null) {
if (this.recurrenceDates.length > maxDates) {
this.toastShowMaxDatesRecurrence(maxDates);
return;
}
}
if (this.max24h && !this.recurrenceDates.length) {
this.disabledBtnNext = true;
this.messageNotificationFutureEvent(endDate);
setTimeout(() => {
this.goToBookei();
this.disabledBtnNext = false;
}, 1000);
} else {
this.goToBookei();
}
}
};
this.validateInput = data => {
const errors = [];
const startDateValidationErrors = this.validateStartDate(data);
if (startDateValidationErrors) {
errors.push(startDateValidationErrors);
}
const endDateValidationErrors = this.validateEndDate(data);
if (endDateValidationErrors) {
errors.push(endDateValidationErrors);
}
const floorValidationErrors = this.validateFloor(data);
if (floorValidationErrors) {
errors.push(floorValidationErrors);
}
return errors;
};
this.validateStartDate = data => {
const currentDate = new Date();
currentDate.setHours(0);
currentDate.setMinutes(0);
currentDate.setSeconds(0);
currentDate.setMilliseconds(0);
const startDate = new Date(data.startDate);
if (currentDate.getTime() > startDate.getTime()) {
return {
field: 'startDate',
message: this.translateConfigService.translate('PG_CREATE_DATE_STEP_TEXT_FIELD_STARTDATE')
};
}
return null;
};
this.validateEndDate = data => {
const startDate = new Date(data.startDate);
const endDate = new Date(data.endDate);
endDate.setDate(startDate.getDate());
endDate.setMonth(startDate.getMonth());
endDate.setFullYear(startDate.getFullYear());
const now = new Date();
if (this.max24h) {
return null;
}
if (endDate.getTime() < startDate.getTime()) {
return {
field: 'endDate',
message: this.translateConfigService.translate('PG_CREATE_DATE_STEP_TEXT_FIELD_ENDDATE_POST_START')
};
} else if (endDate.getTime() < now.getTime()) {
return {
field: 'endDate',
message: this.translateConfigService.translate('PG_CREATE_DATE_STEP_TEXT_FIELD_ENDDATE_POST_NOW')
};
}
return null;
};
this.validateFloor = data => {
if (!data.floor) {
return {
field: 'floor',
message: this.translateConfigService.translate('PG_CREATE_DATE_STEP_TEXT_FIELD_FLOOR')
};
}
return null;
};
this.selectFloorCompareWith = (floor1, floor2) => floor1 && floor2 ? floor1.id === floor2.id : floor1 === floor2;
this.selectGroupCompareWith = (group1, group2) => group1 && group2 ? group1.id === group2.id : group1 === group2;
this.goOneStepBack = () => {
const approveEventReview = this.createEventService.getApproveEventReview() ? this.createEventService.getApproveEventReview() : '';
const navigationExtras = {
state: {
onBack: true,
approveEventReview,
action: this.createEventService.getAction()
}
};
this.navigationService.back(['/create-event-event-name-step'], navigationExtras);
};
this.goToBookei = () => {
this.navigationService.forward(['/create-event-event-bookei']);
};
this.setValidationErrors = errors => {
this.eventDateFormErrors = errors;
};
this.cleanValidationErrors = () => {
this.eventDateFormErrors = [];
};
this.thereIsFieldInputValidationErrors = field => this.eventDateFormErrors.find(e => e.field === field);
this.getFieldInputValidationErrors = field => this.eventDateFormErrors.filter(e => e.field === field);
this.onOpenPickDateModal = /*#__PURE__*/function () {
var _ref = (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (pickMode) {
// KA_APP-701
const maxDates = _this.createEventService.getMaxDatesRecurrence();
if (maxDates && maxDates !== undefined && maxDates !== null) {
if (_this.recurrenceDates?.length >= maxDates) {
_this.toastShowMaxDatesRecurrence(maxDates);
return;
}
}
const options = {
pickMode
};
const modal = yield _this.modalController.create({
component: _shared_components__WEBPACK_IMPORTED_MODULE_3__.PickDateModalComponent,
componentProps: {
startDate: _this.startDay,
maxSelectableDates: maxDates !== undefined && maxDates !== null ? maxDates : null,
recurrence: pickMode === 'multi' ? _this.recurrenceDates : [],
options
}
});
modal.onDidDismiss().then(_this.onPickDateModalComponentDidDismiss);
yield modal.present();
});
return function (_x) {
return _ref.apply(this, arguments);
};
}();
this.onPickDateModalComponentDidDismiss = response => {
if (!response?.data && response.data.code !== 'OK') {
this.startDay = this.startDay ? this.startDay : moment__WEBPACK_IMPORTED_MODULE_2___default()();
this.recurrenceDates = [];
return;
}
if (response.data) {
if (response.data.code === 'OK') {
this.startDay = response.data.data.date;
if (response.data.data.pickMode === 'single') {
this.startDay = moment__WEBPACK_IMPORTED_MODULE_2___default()(response.data.data.date);
} else {
if (response.data.data.recurrence.length > 0) {
const recurrences = this.mapRecurrenceDates(response.data.data.recurrence, this.eventId);
this.recurrenceDates = recurrences.slice(); // criando uma cópia do array original
this.startDay = moment__WEBPACK_IMPORTED_MODULE_2___default()(this.recurrenceDates[0].happensAt);
} else {
this.recurrenceDates = [];
}
}
console.log('startDay', moment__WEBPACK_IMPORTED_MODULE_2___default()(this.startDay).format('DD/MM/YYYY'));
console.log('mapRecurrenceDates', this.recurrenceDates);
}
}
};
this.handeSuccessGetSettings = response => {
if (response && response !== null && response !== undefined) {
// KA_APP-620
this.createEventService.setSettingsCompany(response);
if (response?.maxDates) {
this.createEventService.setMaxDatesRecurrence(response.maxDates);
}
}
};
this.approveEventReview = this.createEventService.getApproveEventReview();
this.eventDateForm = this.formBuilder.group({
floor: [''],
group: ['']
});
this.eventDateFormErrors = [];
this.floors = this.createEventService.getFloors();
this.groups = this.createEventService.getGroups();
this.recurrenceDates = this.createEventService.getRecurrenceDates();
this.eventId = +this.createEventService.getId(); // KA_APP-704
this.disableInputDates = this.createEventService.disableFields();
}
ngAfterViewInit() {
this.cdr.checkNoChanges();
}
ionViewWillEnter() {
this.focusService.applyFocusQuerySelector('create_event_start_date', 3500);
this.loaderSettings();
}
ngOnInit() {
// TODO Get from localstorage, if there is something set it as the initial value.
this.setInitialValueForTodayDate();
this.setInitialValueForStartDay();
this.setInitialValueForStartDate();
this.setInitialValueForEndDate(); // this.setMinDate();
// this.setMaxDate();
this.setInitialValueForFloor();
this.setInitialValueForGroup();
}
openPickerHourDialog(openPicker, event) {
if (openPicker === 'startDate') {
this.hourStartSelected = event;
const now = new Date();
const fullDateNow = new Date(now.toDateString() + ' ' + event);
this.startDate = fullDateNow;
this.endDate = moment__WEBPACK_IMPORTED_MODULE_2___default()(this.startDate).add(1, 'hours').toDate();
this.hourEndSelected = moment__WEBPACK_IMPORTED_MODULE_2___default()(this.endDate).format('HH:mm');
} else {
const now = new Date();
const fullDateNow = new Date(now.toDateString() + ' ' + event);
this.endDate = fullDateNow;
this.hourEndSelected = moment__WEBPACK_IMPORTED_MODULE_2___default()(this.endDate).format('HH:mm');
}
}
/*
onOpenPickStartDatetimeModal = async () => {
this.onOpenPickDatetimeModal(
new Date(this.startDate),
this.onPickStartDatetimeModalComponentDidDismiss
);
};
onOpenPickEndDatetimeModal = async () => {
this.onOpenPickDatetimeModal(
new Date(this.endDate),
this.onPickEndDatetimeModalComponentDidDismiss
);
};
onOpenPickDatetimeModal = async (value, dismissCallback) => {
const modal = await this.modalController.create({
component: PickDatetimeModalComponent,
componentProps: {
startDate: value
}
});
modal.onDidDismiss().then(dismissCallback);
await modal.present();
};
onPickStartDatetimeModalComponentDidDismiss = response => {
if (response.data) {
if (response.data.code === 'OK') {
this.startDate = response.data.data.date;
this.endDate = moment(this.startDate).add(1, 'hours').toDate();
}
}
};
onPickEndDatetimeModalComponentDidDismiss = response => {
if (response.data) {
if (response.data.code === 'OK') {
this.endDate = response.data.data.date;
}
}
};
getStartDatetimeToBeShow() {
const hourSelected = moment(this.startDate).format('HH:mm:ss');
const now = new Date();
const fullDateNow = new Date(now.toDateString() + ' ' + hourSelected);
console.log(fullDateNow);
this.hourStartSelected = moment(this.startDate).format('HH:mm');
return this.momentService.formatAs(this.startDate, 'HH[h]mm[min]');
}
*/
getDateToBeShow() {
if (this.recurrenceDates.length > 0) {
console.log(this.recurrenceDates[0].happensAt);
return this.momentService.formatAs(this.recurrenceDates[0].happensAt, 'DD/MM/YYYY');
} else {
return this.momentService.formatAs(this.startDay, 'DD/MM/YYYY');
}
}
getEndDatetimeToBeShow() {
this.hourEndSelected = moment__WEBPACK_IMPORTED_MODULE_2___default()(this.endDate).format('HH:mm');
return this.momentService.formatAs(this.endDate, 'HH[h]mm[min]');
}
compareEndDateAndStartDate(endDate, startDate) {
const startMoment = moment__WEBPACK_IMPORTED_MODULE_2___default()(startDate.toISOString());
const endMoment = moment__WEBPACK_IMPORTED_MODULE_2___default()(endDate.toISOString());
const startHour = startMoment.hour();
const startMinute = startMoment.minute();
const startSecond = startMoment.second();
const endHour = endMoment.hour();
const endMinute = endMoment.minute();
const endSecond = endMoment.second();
if (endHour < startHour || endHour === startHour && endMinute < startMinute || endHour === startHour && endMinute === startMinute && endSecond < startSecond) {
this.max24h = true;
} else {
this.max24h = false;
}
return this.max24h;
}
messageNotificationFutureEvent(endDate) {
const textcloseat = this.translateConfigService.translate('PG_CREATE_DATE_STEP_TOAST_FUTURE_EVENT_MESSAGE_CLOSE_AT');
const texttheday = this.translateConfigService.translate('PG_CREATE_DATE_STEP_TOAST_FUTURE_EVENT_MESSAGE_THE_DAY');
const message = `${textcloseat} ${this.getEndDatetimeToBeShow()} ${texttheday} ${moment__WEBPACK_IMPORTED_MODULE_2___default()(endDate).format('DD/MM/YYYY')}`;
const notification = {
title: this.translateConfigService.translate('PG_CREATE_DATE_STEP_TOAST_FUTURE_EVENT_TITLE'),
message,
type: 'success',
timeout: 10000
};
const time = setTimeout(() => {
this.max24h = false;
this.notificatorService.notify(notification);
clearTimeout(time);
}, 500);
}
mapRecurrenceDates(dates, eventId) {
return dates.map(date => {
const formattedDate = moment__WEBPACK_IMPORTED_MODULE_2___default()(date).format('YYYY-MM-DD');
return {
eventId,
happensAt: formattedDate
};
});
}
openPickerHour(openPicker) {
var _this2 = this;
return (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
const result = yield _this2.datePickerService.openPickerHour(openPicker, _this2.startDate, _this2.endDate);
if (!result.endDate && result.startDate) {
return;
}
_this2.startDate = result.startDate;
_this2.endDate = result.endDate;
})();
} // KA_APP-700
loaderSettings() {
var _this3 = this;
return (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
const {
accessToken,
profile
} = yield _this3.tokenProfile();
if (accessToken && profile) {
_this3.getSettings(profile.company.instanceName, accessToken).then(_this3.handeSuccessGetSettings).catch(_this3.handleErrorGetSettings).finally( /*#__PURE__*/(0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
_this3.focusService.applyFocusQuerySelector('create_bookei_step', 3000);
}));
} else {
const error = {
getTokenPortalProfile: !accessToken ? 'not found getTokenPortalProfile' : '',
profile: !profile ? 'not found getProfilePortalProfile' : ''
};
_this3.handleErrorLoaderSettings(error);
}
})();
} // KA_APP-700
handleErrorLoaderSettings(error) {
this.logService.logError('method::loaderSettings', '', error);
} // KA_APP-700
tokenProfile() {
return new Promise((resolve, reject) => {
const profile = this.getProfileCurrent;
this.authService.getToken().then(token => {
this.bookeiService.getTokenPortalProfile(profile, token).then(result => {
resolve({
accessToken: result && result.access_token ? result.access_token : null,
profile: profile ? profile : null
});
}).catch(error => {
this.logService.logError('startDateTime::tokenProfile::getTokenPortalProfile', '', error);
reject(error);
});
}).catch(error => {
this.logService.logError('startDateTime::tokenProfile::authService.getToken', '', error);
reject(error);
});
});
}
handleErrorGetSettings(handleErrorGetSettings) {} // KA_APP-700
/**
*
* @param instanceName
* @param accessToken portal
* @returns
*/
getSettings(instanceName, accessToken) {
return new Promise((resolve, reject) => {
this.apiService.getSettingsByCompanyName(instanceName, accessToken).subscribe(resolve, reject);
});
}
get getProfileCurrent() {
const profile = this.profileManagerService.getProfile();
return profile;
} // KA_APP-701
toastShowMaxDatesRecurrence(count) {
const notification = {
title: '',
message: this.translateConfigService.translate('TOAST_MAX_RECURRENCES_DATE', {
count
}),
type: 'error',
timeout: 10000
};
this.notificatorService.notify(notification);
}
}
CreateEventEventStartDateTimePage.ɵfac = function CreateEventEventStartDateTimePage_Factory(t) {
return new (t || CreateEventEventStartDateTimePage)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_forms__WEBPACK_IMPORTED_MODULE_11__.UntypedFormBuilder), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_4__.NavigationService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_4__.NotificatorService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_4__.CreateEventService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_ionic_angular__WEBPACK_IMPORTED_MODULE_12__.ModalController), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_4__.MomentService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_4__.TranslateConfigService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services_state_service__WEBPACK_IMPORTED_MODULE_5__.StateService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_4__.DatePickerService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services_focus_service__WEBPACK_IMPORTED_MODULE_6__.FocusService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__.ChangeDetectorRef), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_4__.BookeiService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_4__.LogService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_4__.AuthService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_4__.ProfileManagerService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_4__.ApiService));
};
CreateEventEventStartDateTimePage.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
type: CreateEventEventStartDateTimePage,
selectors: [["app-create-event-event-start-date-time"]],
decls: 40,
vars: 55,
consts: [["defaultHref", "create-event-event-name-step", 3, "title", "showBadge", "refresh", "menuToggle"], [1, "centralized-content", "ion-padding-horizontal"], [1, "page-title"], ["tabindex", "1", "id", "create_event_start_date", 1, "sub-title", 3, "innerHTML"], [3, "formGroup", "ngSubmit"], ["lines", "none", 3, "className", "disabled"], ["type", "button", 1, "hidden-input-button", 3, "click"], ["class", "errors", 4, "ngIf"], [3, "valueHour", "timeSet"], ["formControlName", "floor", 3, "placeholder", "okText", "cancelText", "compareWith"], [3, "value", 4, "ngFor", "ngForOf"], ["lines", "none", 3, "className", "disabled", 4, "ngIf"], [3, "recurrenceDates", "startDate", "endDate", "disabled", "openPickDateModal"], [4, "ngIf"], [1, "errors"], ["class", "error", 4, "ngFor", "ngForOf"], [1, "error"], [3, "value"], ["formControlName", "group", 3, "placeholder", "okText", "cancelText", "compareWith"], [1, "button-holder"], ["type", "button", 1, "back", 3, "click"], ["type", "submit", 3, "disabled"]],
template: function CreateEventEventStartDateTimePage_Template(rf, ctx) {
if (rf & 1) {
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelement"](0, "app-header", 0);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipe"](1, "translate");
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](2, "ion-content")(3, "div", 1)(4, "div", 2);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelement"](5, "div", 3);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipe"](6, "translate");
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](7, "form", 4);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵlistener"]("ngSubmit", function CreateEventEventStartDateTimePage_Template_form_ngSubmit_7_listener() {
return ctx.onSubmit();
});
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](8, "ion-item", 5)(9, "ion-label");
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](10);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipe"](11, "translate");
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](12, "button", 6);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵlistener"]("click", function CreateEventEventStartDateTimePage_Template_button_click_12_listener() {
return ctx.onOpenPickDateModal("single");
});
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](13);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]()();
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtemplate"](14, CreateEventEventStartDateTimePage_div_14_Template, 2, 1, "div", 7);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](15, "ion-item", 5)(16, "ion-label");
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](17);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipe"](18, "translate");
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](19, "app-custom-timepicker", 8);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵlistener"]("timeSet", function CreateEventEventStartDateTimePage_Template_app_custom_timepicker_timeSet_19_listener($event) {
return ctx.openPickerHourDialog("startDate", $event);
});
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]()();
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](20, "ion-item", 5)(21, "ion-label");
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](22);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipe"](23, "translate");
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](24, "app-custom-timepicker", 8);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵlistener"]("timeSet", function CreateEventEventStartDateTimePage_Template_app_custom_timepicker_timeSet_24_listener($event) {
return ctx.openPickerHourDialog("endDate", $event);
});
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]()();
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtemplate"](25, CreateEventEventStartDateTimePage_div_25_Template, 2, 1, "div", 7);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](26, "ion-item", 5)(27, "ion-label");
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](28);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipe"](29, "translate");
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](30, "ion-select", 9);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipe"](31, "translate");
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipe"](32, "translate");
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipe"](33, "translate");
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtemplate"](34, CreateEventEventStartDateTimePage_ion_select_option_34_Template, 2, 2, "ion-select-option", 10);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]()();
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtemplate"](35, CreateEventEventStartDateTimePage_ion_item_35_Template, 9, 16, "ion-item", 11);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtemplate"](36, CreateEventEventStartDateTimePage_div_36_Template, 2, 1, "div", 7);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](37, "app-list-recurrence-dates", 12);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵlistener"]("openPickDateModal", function CreateEventEventStartDateTimePage_Template_app_list_recurrence_dates_openPickDateModal_37_listener() {
return ctx.onOpenPickDateModal("multi");
});
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtemplate"](38, CreateEventEventStartDateTimePage_ng_container_38_Template, 8, 7, "ng-container", 13);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipe"](39, "async");
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]()()();
}
if (rf & 2) {
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("title", _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipeBind1"](1, 35, "PG_CREATE_DATE_STEP_HEADER_TITLE"))("showBadge", true)("refresh", false)("menuToggle", false);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](5);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("innerHTML", _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipeBind1"](6, 37, "PG_CREATE_DATE_STEP_TEXT_SUBTITLE"), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵsanitizeHtml"]);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](2);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("formGroup", ctx.eventDateForm);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](1);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("className", "input-holder")("disabled", ctx.approveEventReview === "TRUE" || ctx.recurrenceDates.length > 1 || ctx.disableInputDates);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](2);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtextInterpolate"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipeBind1"](11, 39, "PG_CREATE_DATE_STEP_TEXT_DAY"));
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](3);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtextInterpolate1"](" ", ctx.getDateToBeShow(), " ");
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](1);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("ngIf", ctx.thereIsFieldInputValidationErrors("startDate"));
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](1);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("className", "input-holder")("disabled", ctx.approveEventReview === "TRUE" || ctx.disableInputDates);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](2);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtextInterpolate"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipeBind1"](18, 41, "PG_CREATE_DATE_STEP_TEXT_STARTAT"));
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](2);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("valueHour", ctx.hourStartSelected);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](1);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("className", "input-holder")("disabled", ctx.disableInputDates);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](2);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtextInterpolate1"](" ", _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipeBind1"](23, 43, "PG_CREATE_DATE_STEP_TEXT_ENDAT"), "");
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](2);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("valueHour", ctx.hourEndSelected);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](1);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("ngIf", ctx.thereIsFieldInputValidationErrors("endDate"));
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](1);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("className", "input-holder")("disabled", ctx.disableInputDates);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](2);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtextInterpolate"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipeBind1"](29, 45, "PG_CREATE_DATE_STEP_TEXT_FLOOR"));
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](2);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("placeholder", _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipeBind1"](31, 47, "PG_CREATE_DATE_STEP_SELECT_FLOOR"))("okText", _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipeBind1"](32, 49, "PG_CREATE_DATE_STEP_SELECT_FLOOR_OK"))("cancelText", _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipeBind1"](33, 51, "PG_CREATE_DATE_STEP_SELECT_FLOOR_CANCEL"))("compareWith", ctx.selectFloorCompareWith);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](4);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("ngForOf", ctx.floors);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](1);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("ngIf", (ctx.groups == null ? null : ctx.groups.length) && ctx.groups.length >= 2);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](1);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("ngIf", ctx.thereIsFieldInputValidationErrors("floor"));
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](1);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("recurrenceDates", ctx.recurrenceDates)("startDate", ctx.startDate)("endDate", ctx.endDate)("disabled", ctx.disableInputDates);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](1);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("ngIf", _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipeBind1"](39, 53, ctx.stateService.getState()));
}
},
dependencies: [_angular_common__WEBPACK_IMPORTED_MODULE_7__.NgForOf, _angular_common__WEBPACK_IMPORTED_MODULE_7__.NgIf, _ionic_angular__WEBPACK_IMPORTED_MODULE_12__.IonContent, _ionic_angular__WEBPACK_IMPORTED_MODULE_12__.IonItem, _ionic_angular__WEBPACK_IMPORTED_MODULE_12__.IonLabel, _ionic_angular__WEBPACK_IMPORTED_MODULE_12__.IonSelect, _ionic_angular__WEBPACK_IMPORTED_MODULE_12__.IonSelectOption, _ionic_angular__WEBPACK_IMPORTED_MODULE_12__.SelectValueAccessor, _angular_forms__WEBPACK_IMPORTED_MODULE_11__["ɵNgNoValidate"], _angular_forms__WEBPACK_IMPORTED_MODULE_11__.NgControlStatus, _angular_forms__WEBPACK_IMPORTED_MODULE_11__.NgControlStatusGroup, _angular_forms__WEBPACK_IMPORTED_MODULE_11__.FormGroupDirective, _angular_forms__WEBPACK_IMPORTED_MODULE_11__.FormControlName, _shared_components_header_header_component__WEBPACK_IMPORTED_MODULE_8__.HeaderComponent, _shared_components_list_recurrence_dates_list_recurrence_dates_component__WEBPACK_IMPORTED_MODULE_9__.ListRecurrenceDatesComponent, _shared_components_customtimepicker_customtimepicker_component__WEBPACK_IMPORTED_MODULE_10__.CustomTimepickerComponent, _angular_common__WEBPACK_IMPORTED_MODULE_7__.AsyncPipe, _ngx_translate_core__WEBPACK_IMPORTED_MODULE_13__.TranslatePipe],
styles: ["ion-content[_ngcontent-%COMP%] {\n --background: var(--ion-color-background);\n}\n\nion-toolbar[_ngcontent-%COMP%] {\n font-family: \"Nunito\", sans-serif;\n}\n\nion-toolbar[_ngcontent-%COMP%] ion-img[_ngcontent-%COMP%] {\n height: 25px;\n width: 25px;\n}\n\nion-toolbar[_ngcontent-%COMP%] ion-title[_ngcontent-%COMP%] {\n letter-spacing: 1px;\n}\n\nion-toolbar[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%] {\n display: flex;\n justify-content: center;\n align-items: center;\n height: 24px;\n padding: 0;\n width: 24px;\n margin: 0;\n font-size: 19px;\n color: #656768;\n}\n\nion-toolbar[_ngcontent-%COMP%] ion-button.hover[_ngcontent-%COMP%] {\n background: #fff;\n}\n\n.centralized-content[_ngcontent-%COMP%] {\n height: calc(100vh - 56px);\n display: flex;\n justify-content: flex-start;\n flex-direction: column;\n}\n\n.centralized-content[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%] {\n border: 1px solid #eeeeee;\n border-radius: 32px;\n --border: 1px solid #eeeeee;\n --border-radius: 32px;\n margin: 8px auto 0;\n}\n\n.centralized-content[_ngcontent-%COMP%] .button-holder[_ngcontent-%COMP%] {\n width: 100%;\n margin-top: 2.2em;\n margin-bottom: 3em;\n}\n\n.centralized-content[_ngcontent-%COMP%] .button-holder.more-config[_ngcontent-%COMP%] {\n margin-top: 2em;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.centralized-content[_ngcontent-%COMP%] .errors[_ngcontent-%COMP%] {\n width: 80%;\n margin: 12px 10% 0;\n color: var(--ion-color-error);\n text-align: center;\n}\n\n.centralized-content[_ngcontent-%COMP%] .page-title[_ngcontent-%COMP%] {\n margin-top: 30px;\n margin-bottom: 26px;\n}\n\n.centralized-content[_ngcontent-%COMP%] .page-title[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] {\n font-size: initial !important;\n font-weight: bold;\n text-align: center;\n}\n\n.centralized-content[_ngcontent-%COMP%] .page-title[_ngcontent-%COMP%] .sub-title[_ngcontent-%COMP%] {\n text-align: center;\n color: #656768;\n font-size: 0.9em;\n margin-top: 4px;\n}\n\n.centralized-content[_ngcontent-%COMP%] .hidden-input-button[_ngcontent-%COMP%] {\n background-color: #fff;\n height: 100%;\n font-size: 1em;\n color: #000;\n}\n\n.hidden-input-button[_ngcontent-%COMP%] {\n font-weight: 500 !important;\n}\n\n.input-holder[_ngcontent-%COMP%] {\n width: 100%;\n}\n\n.pulsate-fwd[_ngcontent-%COMP%] {\n animation: pulsate-fwd 0.5s ease-in-out infinite both;\n outline: none;\n}\n\n@keyframes pulsate-fwd {\n 0% {\n transform: scale(1);\n }\n 50% {\n transform: scale(1.5);\n }\n 100% {\n transform: scale(1);\n }\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNyZWF0ZS1ldmVudC1ldmVudC1zdGFydC1kYXRlLXRpbWUucGFnZS5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UseUNBQUE7QUFDRjs7QUFDQTtFQUNFLGlDQUFBO0FBRUY7O0FBQUU7RUFDRSxZQUFBO0VBQ0EsV0FBQTtBQUVKOztBQUNFO0VBQ0UsbUJBQUE7QUFDSjs7QUFHSTtFQUNFLGFBQUE7RUFDQSx1QkFBQTtFQUNBLG1CQUFBO0VBQ0EsWUFBQTtFQUNBLFVBQUE7RUFDQSxXQUFBO0VBQ0EsU0FBQTtFQUNBLGVBQUE7RUFDQSxjQUFBO0FBRE47O0FBSUk7RUFDRSxnQkFBQTtBQUZOOztBQU9BO0VBQ0UsMEJBQUE7RUFDQSxhQUFBO0VBQ0EsMkJBQUE7RUFDQSxzQkFBQTtBQUpGOztBQUtFO0VBQ0UseUJBQUE7RUFDQSxtQkFBQTtFQUNBLDJCQUFBO0VBQ0EscUJBQUE7RUFDQSxrQkFBQTtBQUhKOztBQU1FO0VBQ0UsV0FBQTtFQUNBLGlCQUFBO0VBQ0Esa0JBQUE7QUFKSjs7QUFLSTtFQUNFLGVBQUE7RUFDQSxhQUFBO0VBQ0EsdUJBQUE7RUFDQSxtQkFBQTtBQUhOOztBQU9FO0VBQ0UsVUFBQTtFQUNBLGtCQUFBO0VBQ0EsNkJBQUE7RUFDQSxrQkFBQTtBQUxKOztBQVFFO0VBQ0UsZ0JBQUE7RUFDQSxtQkFBQTtBQU5KOztBQVFJO0VBQ0UsNkJBQUE7RUFDQSxpQkFBQTtFQUNBLGtCQUFBO0FBTk47O0FBU0k7RUFDRSxrQkFBQTtFQUNBLGNBQUE7RUFDQSxnQkFBQTtFQUNBLGVBQUE7QUFQTjs7QUFXRTtFQUNFLHNCQUFBO0VBQ0EsWUFBQTtFQUNBLGNBQUE7RUFDQSxXQUFBO0FBVEo7O0FBWUE7RUFDRSwyQkFBQTtBQVRGOztBQVdBO0VBQ0UsV0FBQTtBQVJGOztBQVVBO0VBQ0UscURBQUE7RUFDQSxhQUFBO0FBUEY7O0FBVUE7RUFDRTtJQUNFLG1CQUFBO0VBUEY7RUFTQTtJQUNFLHFCQUFBO0VBUEY7RUFTQTtJQUNFLG1CQUFBO0VBUEY7QUFDRiIsImZpbGUiOiJjcmVhdGUtZXZlbnQtZXZlbnQtc3RhcnQtZGF0ZS10aW1lLnBhZ2Uuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbImlvbi1jb250ZW50IHtcbiAgLS1iYWNrZ3JvdW5kOiB2YXIoLS1pb24tY29sb3ItYmFja2dyb3VuZCk7XG59XG5pb24tdG9vbGJhciB7XG4gIGZvbnQtZmFtaWx5OiBcIk51bml0b1wiLCBzYW5zLXNlcmlmO1xuXG4gIGlvbi1pbWcge1xuICAgIGhlaWdodDogMjVweDtcbiAgICB3aWR0aDogMjVweDtcbiAgfVxuXG4gIGlvbi10aXRsZSB7XG4gICAgbGV0dGVyLXNwYWNpbmc6IDFweDtcbiAgfVxuXG4gIGlvbi1idXR0b24ge1xuICAgIGZhLWljb24ge1xuICAgICAgZGlzcGxheTogZmxleDtcbiAgICAgIGp1c3RpZnktY29udGVudDogY2VudGVyO1xuICAgICAgYWxpZ24taXRlbXM6IGNlbnRlcjtcbiAgICAgIGhlaWdodDogMjRweDtcbiAgICAgIHBhZGRpbmc6IDA7XG4gICAgICB3aWR0aDogMjRweDtcbiAgICAgIG1hcmdpbjogMDtcbiAgICAgIGZvbnQtc2l6ZTogMTlweDtcbiAgICAgIGNvbG9yOiAjNjU2NzY4O1xuICAgIH1cblxuICAgICYuaG92ZXIge1xuICAgICAgYmFja2dyb3VuZDogI2ZmZjtcbiAgICB9XG4gIH1cbn1cblxuLmNlbnRyYWxpemVkLWNvbnRlbnQge1xuICBoZWlnaHQ6IGNhbGMoMTAwdmggLSA1NnB4KTtcbiAgZGlzcGxheTogZmxleDtcbiAganVzdGlmeS1jb250ZW50OiBmbGV4LXN0YXJ0O1xuICBmbGV4LWRpcmVjdGlvbjogY29sdW1uO1xuICAuaW5wdXQtaG9sZGVyIHtcbiAgICBib3JkZXI6IDFweCBzb2xpZCAjZWVlZWVlO1xuICAgIGJvcmRlci1yYWRpdXM6IDMycHg7XG4gICAgLS1ib3JkZXI6IDFweCBzb2xpZCAjZWVlZWVlO1xuICAgIC0tYm9yZGVyLXJhZGl1czogMzJweDtcbiAgICBtYXJnaW46IDhweCBhdXRvIDA7XG4gIH1cblxuICAuYnV0dG9uLWhvbGRlciB7XG4gICAgd2lkdGg6IDEwMCU7XG4gICAgbWFyZ2luLXRvcDogMi4yZW07XG4gICAgbWFyZ2luLWJvdHRvbTogM2VtO1xuICAgICYubW9yZS1jb25maWcge1xuICAgICAgbWFyZ2luLXRvcDogMmVtO1xuICAgICAgZGlzcGxheTogZmxleDtcbiAgICAgIGp1c3RpZnktY29udGVudDogY2VudGVyO1xuICAgICAgYWxpZ24taXRlbXM6IGNlbnRlcjtcbiAgICB9XG4gIH1cblxuICAuZXJyb3JzIHtcbiAgICB3aWR0aDogODAlO1xuICAgIG1hcmdpbjogMTJweCAxMCUgMDtcbiAgICBjb2xvcjogdmFyKC0taW9uLWNvbG9yLWVycm9yKTtcbiAgICB0ZXh0LWFsaWduOiBjZW50ZXI7XG4gIH1cblxuICAucGFnZS10aXRsZSB7XG4gICAgbWFyZ2luLXRvcDogMzBweDtcbiAgICBtYXJnaW4tYm90dG9tOiAyNnB4O1xuXG4gICAgLnRpdGxlIHtcbiAgICAgIGZvbnQtc2l6ZTogaW5pdGlhbCAhaW1wb3J0YW50O1xuICAgICAgZm9udC13ZWlnaHQ6IGJvbGQ7XG4gICAgICB0ZXh0LWFsaWduOiBjZW50ZXI7XG4gICAgfVxuXG4gICAgLnN1Yi10aXRsZSB7XG4gICAgICB0ZXh0LWFsaWduOiBjZW50ZXI7XG4gICAgICBjb2xvcjogIzY1Njc2ODtcbiAgICAgIGZvbnQtc2l6ZTogMC45ZW07XG4gICAgICBtYXJnaW4tdG9wOiA0cHg7XG4gICAgfVxuICB9XG5cbiAgLmhpZGRlbi1pbnB1dC1idXR0b24ge1xuICAgIGJhY2tncm91bmQtY29sb3I6ICNmZmY7XG4gICAgaGVpZ2h0OiAxMDAlO1xuICAgIGZvbnQtc2l6ZTogMWVtO1xuICAgIGNvbG9yOiAjMDAwO1xuICB9XG59XG4uaGlkZGVuLWlucHV0LWJ1dHRvbiB7XG4gIGZvbnQtd2VpZ2h0OiA1MDAgIWltcG9ydGFudDtcbn1cbi5pbnB1dC1ob2xkZXIge1xuICB3aWR0aDogMTAwJTtcbn1cbi5wdWxzYXRlLWZ3ZCB7XG4gIGFuaW1hdGlvbjogcHVsc2F0ZS1md2QgMC41cyBlYXNlLWluLW91dCBpbmZpbml0ZSBib3RoO1xuICBvdXRsaW5lOiBub25lO1xufVxuXG5Aa2V5ZnJhbWVzIHB1bHNhdGUtZndkIHtcbiAgMCUge1xuICAgIHRyYW5zZm9ybTogc2NhbGUoMSk7XG4gIH1cbiAgNTAlIHtcbiAgICB0cmFuc2Zvcm06IHNjYWxlKDEuNSk7XG4gIH1cbiAgMTAwJSB7XG4gICAgdHJhbnNmb3JtOiBzY2FsZSgxKTtcbiAgfVxufVxuIl19 */"]
});
/***/ }),
/***/ 37763:
/*!**************************************************!*\
!*** ./src/app/shared/services/focus.service.ts ***!
\**************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "FocusService": () => (/* binding */ FocusService)
/* harmony export */ });
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/router */ 61380);
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_angular_router__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rxjs/operators */ 59151);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ 45449);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_angular_core__WEBPACK_IMPORTED_MODULE_1__);
class FocusService {
constructor(router) {
this.router = router;
}
focusInRouterNavigate() {
this.router.events.pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_2__.filter)(event => event instanceof _angular_router__WEBPACK_IMPORTED_MODULE_0__.NavigationEnd)).subscribe(() => {
const mainHeader = document.querySelector('#focusHeader');
if (mainHeader) {
mainHeader?.focus();
}
});
}
/**
*
* @param selector ID preference selector exemple: this.applyFocusQuerySelector('myselectorid', 300)
* not necessary # .
* @param time
*/
applyFocusQuerySelector(selector, time) {
setTimeout(() => {
const nextTag = document.querySelector(`#${selector}`);
nextTag?.focus();
}, time);
}
}
FocusService.ɵfac = function FocusService_Factory(t) { return new (t || FocusService)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_router__WEBPACK_IMPORTED_MODULE_0__.Router)); };
FocusService.ɵprov = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({ token: FocusService, factory: FocusService.ɵfac, providedIn: 'root' });
/***/ })
}])
//# sourceMappingURL=4.js.map