@7365admin1/layer-common 1.11.51 → 1.11.53

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,107 @@
1
+ <template>
2
+ <v-dialog
3
+ :model-value="modelValue"
4
+ @update:model-value="$emit('update:modelValue', $event)"
5
+ width="560"
6
+ persistent
7
+ >
8
+ <v-card max-height="85vh" class="d-flex flex-column">
9
+ <v-toolbar color="grey-darken-3" class="flex-grow-0">
10
+ <v-toolbar-title class="text-subtitle-1 font-weight-bold text-white text-uppercase">
11
+ {{ form?.formType }}
12
+ </v-toolbar-title>
13
+ </v-toolbar>
14
+
15
+ <v-card-subtitle class="px-6 pt-3 pb-0 text-caption text-medium-emphasis flex-grow-0">
16
+ Form preview — fields are read-only
17
+ </v-card-subtitle>
18
+
19
+ <v-card-text class="px-6 py-4 flex-grow-1" style="overflow-y: auto">
20
+ <template v-for="(input, index) in form?.inputs" :key="index">
21
+ <v-text-field
22
+ v-if="input.dataType === 'Text Input'"
23
+ :label="input.label"
24
+ density="comfortable"
25
+ variant="outlined"
26
+ class="mb-1"
27
+ :hint="input.required ? 'Required' : ''"
28
+ persistent-hint
29
+ readonly
30
+ />
31
+ <v-textarea
32
+ v-else-if="input.dataType === 'Text Area'"
33
+ :label="input.label"
34
+ density="comfortable"
35
+ variant="outlined"
36
+ rows="3"
37
+ class="mb-1"
38
+ :hint="input.required ? 'Required' : ''"
39
+ persistent-hint
40
+ readonly
41
+ />
42
+ <v-text-field
43
+ v-else-if="input.dataType === 'Date Input'"
44
+ :label="input.label"
45
+ type="date"
46
+ density="comfortable"
47
+ variant="outlined"
48
+ class="mb-1"
49
+ :hint="input.required ? 'Required' : ''"
50
+ persistent-hint
51
+ readonly
52
+ />
53
+ <v-select
54
+ v-else-if="input.dataType === 'Select'"
55
+ :label="input.label"
56
+ :items="input.options || []"
57
+ density="comfortable"
58
+ variant="outlined"
59
+ class="mb-1"
60
+ :hint="input.required ? 'Required' : ''"
61
+ persistent-hint
62
+ readonly
63
+ />
64
+ <v-checkbox
65
+ v-else-if="input.dataType === 'Checkbox'"
66
+ :label="input.label"
67
+ density="comfortable"
68
+ class="mb-1"
69
+ readonly
70
+ />
71
+ </template>
72
+ </v-card-text>
73
+
74
+ <v-toolbar density="compact" class="flex-grow-0">
75
+ <v-row no-gutters>
76
+ <v-col cols="12">
77
+ <v-btn
78
+ tile
79
+ block
80
+ variant="flat"
81
+ color="black"
82
+ class="text-none"
83
+ height="48"
84
+ @click="$emit('update:modelValue', false)"
85
+ >
86
+ Close Preview
87
+ </v-btn>
88
+ </v-col>
89
+ </v-row>
90
+ </v-toolbar>
91
+ </v-card>
92
+ </v-dialog>
93
+ </template>
94
+ <script setup lang="ts">
95
+ defineProps({
96
+ modelValue: {
97
+ type: Boolean,
98
+ default: false,
99
+ },
100
+ form: {
101
+ type: Object as PropType<TOnlineForm | null>,
102
+ default: null,
103
+ },
104
+ });
105
+
106
+ defineEmits(["update:modelValue"]);
107
+ </script>
@@ -59,6 +59,9 @@
59
59
  >
60
60
  <template v-slot:item.createdAt="{ item }">
61
61
  {{ formatDateDDMMYYYYLocal(item.createdAt) }}
62
+ </template>
63
+ <template v-slot:item.status="{ item }">
64
+ {{ item.status ? item.status.charAt(0).toUpperCase() + item.status.slice(1) : "N/A" }}
62
65
  </template></v-data-table
63
66
  >
64
67
  </v-card></v-col
@@ -89,12 +92,12 @@
89
92
  <v-card-text style="max-height: 100vh; overflow-y: auto" class="pb-0">
90
93
  <v-row no-gutters class="mb-4">
91
94
  <v-col cols="12">
92
- <strong>Name:</strong> {{ selectedOnlineForm?.name ?? "N/A" }}
95
+ <strong>Name:</strong> {{ selectedOnlineForm?.formType ?? "N/A" }}
93
96
  </v-col>
94
- <v-col cols="12">
97
+ <v-col v-if="selectedOnlineForm?.attachment" cols="12">
95
98
  <strong>Document: </strong>
96
99
  <NuxtLink
97
- :to="getFileUrl(selectedOnlineForm?.attachment ?? '')"
100
+ :to="getFileUrl(selectedOnlineForm.attachment)"
98
101
  external
99
102
  target="_blank"
100
103
  >
@@ -102,7 +105,7 @@
102
105
  </NuxtLink>
103
106
  </v-col>
104
107
  <v-col cols="12">
105
- <strong>Status:</strong> {{ selectedOnlineForm?.status ?? "N/A" }}
108
+ <strong>Status:</strong> {{ selectedOnlineForm?.status ? selectedOnlineForm.status.charAt(0).toUpperCase() + selectedOnlineForm.status.slice(1) : "N/A" }}
106
109
  </v-col>
107
110
  <v-col cols="12">
108
111
  <strong>Inputs:</strong>
@@ -158,12 +161,18 @@
158
161
  </v-btn>
159
162
  </template>
160
163
  <v-list class="pa-0">
164
+ <v-list-item @click="previewDialog = false; formRenderPreviewDialog = true">
165
+ <v-list-item-title class="text-subtitle-2">
166
+ Preview
167
+ </v-list-item-title>
168
+ </v-list-item>
169
+
161
170
  <v-list-item
162
171
  v-if="canUpdateOnlineFormConfiguration"
163
172
  @click="openEditDialog()"
164
173
  >
165
174
  <v-list-item-title class="text-subtitle-2">
166
- Edit Online Form
175
+ Edit
167
176
  </v-list-item-title>
168
177
  </v-list-item>
169
178
 
@@ -173,7 +182,7 @@
173
182
  @click="openDeleteDialog()"
174
183
  >
175
184
  <v-list-item-title class="text-subtitle-2">
176
- Delete Online Form
185
+ Delete
177
186
  </v-list-item-title>
178
187
  </v-list-item>
179
188
  </v-list>
@@ -184,6 +193,12 @@
184
193
  </v-card>
185
194
  </v-dialog>
186
195
 
196
+ <!-- Form Render Preview Dialog -->
197
+ <OnlineFormRenderPreview
198
+ v-model="formRenderPreviewDialog"
199
+ :form="selectedOnlineForm"
200
+ />
201
+
187
202
  <!-- Delete Dialog -->
188
203
  <v-dialog
189
204
  v-model="confirmDialog"
@@ -247,6 +262,7 @@
247
262
  </template>
248
263
  <script setup lang="ts">
249
264
  import OnlineFormConfigurationForm from "./OnlineFormConfigurationForm.vue";
265
+ import OnlineFormRenderPreview from "./OnlineFormRenderPreview.vue";
250
266
 
251
267
  definePageMeta({
252
268
  middleware: ["01-auth", "02-org"],
@@ -258,7 +274,7 @@ const props = defineProps({
258
274
  default: () => [
259
275
  {
260
276
  title: "Name",
261
- value: "name",
277
+ value: "formType",
262
278
  },
263
279
  { title: "Date Created", value: "createdAt" },
264
280
  { title: "Status", value: "status" },
@@ -291,10 +307,7 @@ const props = defineProps({
291
307
  });
292
308
 
293
309
  const { headerSearch } = useLocal();
294
- const {
295
- getAllBySiteId: _getOnlineFormConfigurationsBySiteId,
296
- deleteOnlineFormById: _deleteById,
297
- } = useOnlineForm();
310
+ const { getAll: _getAll, deleteById: _deleteById } = useOnlineFormConfiguration();
298
311
  const { getFileUrl } = useFile();
299
312
 
300
313
  const page = ref(1);
@@ -318,9 +331,11 @@ const {
318
331
  refresh: getOnlineFormConfigurations,
319
332
  status: getAllReqStatus,
320
333
  } = useLazyAsyncData("get-all-online-form-configuration", () =>
321
- _getOnlineFormConfigurationsBySiteId(siteId, {
334
+ _getAll({
322
335
  page: page.value,
323
336
  search: headerSearch.value,
337
+ org: orgId,
338
+ site: siteId,
324
339
  })
325
340
  );
326
341
 
@@ -337,6 +352,7 @@ watchEffect(() => {
337
352
  const createDialog = ref(false);
338
353
  const editDialog = ref(false);
339
354
  const previewDialog = ref(false);
355
+ const formRenderPreviewDialog = ref(false);
340
356
  const selectedOnlineForm = ref<TOnlineForm>({
341
357
  _id: "",
342
358
  name: "",
@@ -356,20 +372,22 @@ const deleteLoading = ref(false);
356
372
  const confirmDialog = ref(false);
357
373
  const selectedOnlineFormId = ref<string | null>(null);
358
374
 
359
- watchEffect(() => {
360
- // initial data
361
- items.value = [
362
- {
363
- _id: "1",
364
- name: "Bicycle Application Form",
365
- createdAt: "2025/12/30",
366
- status: "active",
367
- },
368
- ];
369
- });
375
+ function parseFieldsToInputs(fields: Record<string, string>): any[] {
376
+ return Object.keys(fields)
377
+ .filter((key) => key !== "attachment")
378
+ .sort((a, b) => Number(a) - Number(b))
379
+ .map((key) => {
380
+ try { return JSON.parse(fields[key]); } catch { return fields[key]; }
381
+ });
382
+ }
370
383
 
371
384
  function tableRowClickHandler(_: any, data: any) {
372
- selectedOnlineForm.value = data.item as TOnlineForm;
385
+ const item = data.item;
386
+ selectedOnlineForm.value = {
387
+ ...item,
388
+ inputs: parseFieldsToInputs(item.fields ?? {}),
389
+ attachment: item.fields?.["attachment"] ?? "",
390
+ } as TOnlineForm;
373
391
  previewDialog.value = true;
374
392
  }
375
393
 
@@ -418,10 +436,12 @@ async function handleDeleteOnlineFormConfiguration() {
418
436
  selectedOnlineFormId.value = null;
419
437
  confirmDialog.value = false;
420
438
  previewDialog.value = false;
439
+ showMessage("Online form configuration deleted successfully!", "success");
421
440
  } catch (error: any) {
422
- message.value =
423
- error?.response?._data?.message ||
424
- "Failed to delete online form configuration";
441
+ showMessage(
442
+ error?.response?._data?.message || "Failed to delete online form configuration",
443
+ "error"
444
+ );
425
445
  } finally {
426
446
  deleteLoading.value = false;
427
447
  }
@@ -205,51 +205,6 @@
205
205
  </v-expansion-panel-text>
206
206
  </v-expansion-panel>
207
207
 
208
- <v-expansion-panel v-if="showWorkOrderSettings" color="primary" class="">
209
- <v-expansion-panel-title>
210
- <v-icon class="mr-2">mdi-format-list-numbered</v-icon>
211
- Work Order Settings
212
- </v-expansion-panel-title>
213
-
214
- <v-expansion-panel-text>
215
- <v-autocomplete
216
- v-if="!props.service"
217
- v-model="selectedServiceProvider"
218
- :items="serviceProviders"
219
- :loading="isFetchingServiceProviders"
220
- :disabled="!canManageSiteSettings"
221
- label="Select Service Provider"
222
- @click="fetchServiceProvidersBySiteService"
223
- class="mt-4"
224
- />
225
-
226
- <v-text-field
227
- v-model="prefix"
228
- label="Prefix"
229
- :disabled="isLoading || !canManageSiteSettings"
230
- @input="handleInput"
231
- />
232
-
233
- <v-select
234
- v-model="noOfDigits"
235
- :items="[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]"
236
- label="No. of Digits"
237
- :disabled="isLoading || !canManageSiteSettings"
238
- />
239
-
240
- <v-text-field v-model="orderNumberPreview" label="Preview" readonly />
241
-
242
- <v-btn
243
- v-if="canManageSiteSettings"
244
- class="mt-2"
245
- :loading="isLoading"
246
- @click="save"
247
- >
248
- Save
249
- </v-btn>
250
- </v-expansion-panel-text>
251
- </v-expansion-panel>
252
-
253
208
  <v-expansion-panel v-if="showDeliveryCompanies" color="primary">
254
209
  <v-expansion-panel-title>
255
210
  <v-icon class="mr-2">mdi-truck</v-icon>
@@ -291,7 +246,6 @@
291
246
  import useFile from "../composables/useFile";
292
247
  import useSiteSettings from "../composables/useSiteSettings";
293
248
  import useUtils from "../composables/useUtils";
294
- import useWorkOrder from "../composables/useWorkOrder";
295
249
  import useANPRSettings from "../composables/useANPRSettings";
296
250
 
297
251
  const props = defineProps({
@@ -300,10 +254,8 @@ const props = defineProps({
300
254
  canManageSiteSettings: { type: Boolean, default: false },
301
255
  showAnprCamera: { type: Boolean, default: false },
302
256
  showCctvCamera: { type: Boolean, default: false },
303
- showWorkOrderSettings: { type: Boolean, default: false },
304
257
  showDeliveryCompanies: { type: Boolean, default: false },
305
258
  showResidentVisitors: { type: Boolean, default: false },
306
- service: { type: String, default: false },
307
259
  });
308
260
 
309
261
  const openPanels = ref([]); // default open first
@@ -312,7 +264,6 @@ const { getSiteById, updateSitebyId, updateSiteInformation } =
312
264
  useSiteSettings();
313
265
  const { requiredRule } = useUtils();
314
266
  const { getFileUrl } = useFile();
315
- const { getWorkOrderSettings, createWorkOrderSettings } = useWorkOrder();
316
267
 
317
268
  const blocks = ref(0);
318
269
  const guardPosts = ref(0);
@@ -329,10 +280,6 @@ const deliveryCompanies = ref<string[]>([]);
329
280
  const siteLogo = ref<any[]>([]);
330
281
  const uploadedSiteLogo = ref("");
331
282
 
332
- const prefix = ref("");
333
- const noOfDigits = ref(1);
334
- const isLoading = ref(false);
335
-
336
283
  const coverPhoto = ref<string[]>([]);
337
284
  const description = ref<string>("");
338
285
  const siteDocuments = ref<string[]>([]);
@@ -450,88 +397,12 @@ const onUploadedLogoPreview = () => {
450
397
  return getFileUrl(uploadedSiteLogo.value);
451
398
  };
452
399
 
453
- const { data: workOrderSetting } = await useLazyAsyncData(
454
- `work-${props.siteId}`,
455
- () => getWorkOrderSettings({ site: props.siteId, service: "Security" })
456
- );
457
-
458
- watchEffect(() => {
459
- if (workOrderSetting.value) {
460
- selectedServiceProvider.value = workOrderSetting.value?.service;
461
- prefix.value = workOrderSetting.value?.prefix;
462
- noOfDigits.value = workOrderSetting.value?.noOfDigits;
463
- }
464
- });
465
-
466
- function handleInput(e: any) {
467
- prefix.value = e.target.value.replace(/[^A-Z]/g, "").toUpperCase();
468
- }
469
-
470
400
  function handleUpdateCompanies(value: string[]) {
471
401
  deliveryCompanies.value = value;
472
402
  }
473
403
 
474
- const orderNumberPreview = computed(() => {
475
- return `${prefix.value}${"0".repeat(noOfDigits.value - 1)}1`;
476
- });
477
-
478
404
  const route = useRoute();
479
405
 
480
- const message = ref("");
481
- const messageColor = ref("");
482
- const messageSnackbar = ref(false);
483
-
484
- function showMessage(msg: string, color: string) {
485
- message.value = msg;
486
- messageColor.value = color;
487
- messageSnackbar.value = true;
488
- }
489
-
490
- const { getAll: getAllServiceProvider } = useServiceProvider();
491
-
492
- const serviceProviders = ref<TServiceProvider[]>([]);
493
- const isFetchingServiceProviders = ref(false);
494
- let selectedServiceProvider = ref<string>("");
495
- let providersArray = ref<string[]>([]);
496
-
497
- async function fetchServiceProvidersBySiteService() {
498
- isFetchingServiceProviders.value = true;
499
-
500
- try {
501
- const response = await getAllServiceProvider({
502
- siteId: route.params.site as string,
503
- limit: 1000,
504
- });
505
-
506
- providersArray.value = [];
507
- serviceProviders.value = response.items.map((i: any) => {
508
- providersArray.value.push(i);
509
- return i.name;
510
- });
511
- } catch (error: any) {
512
- return showMessage(errorConverter(error), "error");
513
- } finally {
514
- isFetchingServiceProviders.value = false;
515
- }
516
- }
517
-
518
- async function save() {
519
- try {
520
- isLoading.value = true;
521
- await createWorkOrderSettings({
522
- site: props.siteId,
523
- service: props.service || selectedServiceProvider.value,
524
- prefix: prefix.value,
525
- noOfDigits: noOfDigits.value,
526
- });
527
- show("Saved successfully", "success");
528
- } catch {
529
- show("Error saving", "error");
530
- } finally {
531
- isLoading.value = false;
532
- }
533
- }
534
-
535
406
  function show(message: string, color: string) {
536
407
  toast.show = true;
537
408
  toast.message = message;
@@ -56,12 +56,44 @@ export default function useCustomerSite() {
56
56
  }
57
57
  )
58
58
  }
59
+ async function getById(id: string) {
60
+ return useNuxtApp().$api<Record<string, any>>(
61
+ `/api/customer-sites/${id}`,
62
+ {
63
+ method: "GET",
64
+ }
65
+ );
66
+ }
67
+ async function updateById(
68
+ id: string,
69
+ payload: Partial<TCustomerSite>,
70
+ ) {
71
+ return useNuxtApp().$api<Record<string, any>>(
72
+ `/api/customer-sites/${id}`,
73
+ {
74
+ method: "PUT",
75
+ body: payload,
76
+ }
77
+ );
78
+ }
79
+
80
+ async function deleteById(id: string) {
81
+ return useNuxtApp().$api<Record<string, any>>(
82
+ `/api/customer-sites/${id}`,
83
+ {
84
+ method: "DELETE",
85
+ }
86
+ );
87
+ }
59
88
 
60
89
  return {
61
90
  add,
62
91
  getAll,
63
92
  addViaInvite,
64
93
  getBySiteAsServiceProvider,
65
- getCustomerSites
94
+ getCustomerSites,
95
+ getById,
96
+ updateById,
97
+ deleteById,
66
98
  };
67
99
  }
@@ -13,6 +13,7 @@ export default function usetFacility() {
13
13
  endTime: string;
14
14
  breakTimes: { startTime: string; endTime: string }[];
15
15
  peakTimes: { startTime: string; endTime: string }[];
16
+ timeSlotsManual: { startTime: string; endTime: string }[] | null;
16
17
  };
17
18
  tuesday: {
18
19
  isEnabled: boolean;
@@ -20,6 +21,7 @@ export default function usetFacility() {
20
21
  endTime: string;
21
22
  breakTimes: { startTime: string; endTime: string }[];
22
23
  peakTimes: { startTime: string; endTime: string }[];
24
+ timeSlotsManual: { startTime: string; endTime: string }[] | null;
23
25
  };
24
26
  wednesday: {
25
27
  isEnabled: boolean;
@@ -27,6 +29,7 @@ export default function usetFacility() {
27
29
  endTime: string;
28
30
  breakTimes: { startTime: string; endTime: string }[];
29
31
  peakTimes: { startTime: string; endTime: string }[];
32
+ timeSlotsManual: { startTime: string; endTime: string }[] | null;
30
33
  };
31
34
  thursday: {
32
35
  isEnabled: boolean;
@@ -34,6 +37,7 @@ export default function usetFacility() {
34
37
  endTime: string;
35
38
  breakTimes: { startTime: string; endTime: string }[];
36
39
  peakTimes: { startTime: string; endTime: string }[];
40
+ timeSlotsManual: { startTime: string; endTime: string }[] | null;
37
41
  };
38
42
  friday: {
39
43
  isEnabled: boolean;
@@ -41,6 +45,7 @@ export default function usetFacility() {
41
45
  endTime: string;
42
46
  breakTimes: { startTime: string; endTime: string }[];
43
47
  peakTimes: { startTime: string; endTime: string }[];
48
+ timeSlotsManual: { startTime: string; endTime: string }[] | null;
44
49
  };
45
50
  saturday: {
46
51
  isEnabled: boolean;
@@ -48,6 +53,7 @@ export default function usetFacility() {
48
53
  endTime: string;
49
54
  breakTimes: { startTime: string; endTime: string }[];
50
55
  peakTimes: { startTime: string; endTime: string }[];
56
+ timeSlotsManual: { startTime: string; endTime: string }[] | null;
51
57
  };
52
58
  sunday: {
53
59
  isEnabled: boolean;
@@ -55,6 +61,7 @@ export default function usetFacility() {
55
61
  endTime: string;
56
62
  breakTimes: { startTime: string; endTime: string }[];
57
63
  peakTimes: { startTime: string; endTime: string }[];
64
+ timeSlotsManual: { startTime: string; endTime: string }[] | null;
58
65
  };
59
66
  description: string;
60
67
  about: string;
@@ -88,6 +95,12 @@ export default function usetFacility() {
88
95
  count: number;
89
96
  permanentRemarks: string;
90
97
  }[] = [];
98
+ isBookingUnitLimitEnabled: boolean;
99
+ bookingUnitLimit: number | null;
100
+ isMaxNumberGuestLimitEnabled: boolean;
101
+ maxNumberGuestLimit: number | null;
102
+ isCancelAllowedLimitEnabled: boolean;
103
+ daysAllowedCancel: number | null;
91
104
 
92
105
  constructor(
93
106
  {
@@ -102,6 +115,7 @@ export default function usetFacility() {
102
115
  endTime: "",
103
116
  breakTimes: [],
104
117
  peakTimes: [],
118
+ timeSlotsManual: null,
105
119
  },
106
120
  tuesday = {
107
121
  isEnabled: false,
@@ -109,6 +123,7 @@ export default function usetFacility() {
109
123
  endTime: "",
110
124
  breakTimes: [],
111
125
  peakTimes: [],
126
+ timeSlotsManual: null,
112
127
  },
113
128
  wednesday = {
114
129
  isEnabled: false,
@@ -116,6 +131,7 @@ export default function usetFacility() {
116
131
  endTime: "",
117
132
  breakTimes: [],
118
133
  peakTimes: [],
134
+ timeSlotsManual: null,
119
135
  },
120
136
  thursday = {
121
137
  isEnabled: false,
@@ -123,6 +139,7 @@ export default function usetFacility() {
123
139
  endTime: "",
124
140
  breakTimes: [],
125
141
  peakTimes: [],
142
+ timeSlotsManual: null,
126
143
  },
127
144
  friday = {
128
145
  isEnabled: false,
@@ -130,6 +147,7 @@ export default function usetFacility() {
130
147
  endTime: "",
131
148
  breakTimes: [],
132
149
  peakTimes: [],
150
+ timeSlotsManual: null,
133
151
  },
134
152
  saturday = {
135
153
  isEnabled: false,
@@ -137,6 +155,7 @@ export default function usetFacility() {
137
155
  endTime: "",
138
156
  breakTimes: [],
139
157
  peakTimes: [],
158
+ timeSlotsManual: null,
140
159
  },
141
160
  sunday = {
142
161
  isEnabled: false,
@@ -144,6 +163,7 @@ export default function usetFacility() {
144
163
  endTime: "",
145
164
  breakTimes: [],
146
165
  peakTimes: [],
166
+ timeSlotsManual: null,
147
167
  },
148
168
  description = "",
149
169
  about = "",
@@ -171,6 +191,12 @@ export default function usetFacility() {
171
191
  isBookingPolicyEnabled = false,
172
192
  bookingPolicy = "",
173
193
  securityCheckList = [],
194
+ isBookingUnitLimitEnabled = false,
195
+ bookingUnitLimit = null,
196
+ isMaxNumberGuestLimitEnabled = false,
197
+ maxNumberGuestLimit = null,
198
+ isCancelAllowedLimitEnabled = false,
199
+ daysAllowedCancel = null,
174
200
  } = {} as TFacility
175
201
  ) {
176
202
  this._id = _id;
@@ -181,24 +207,30 @@ export default function usetFacility() {
181
207
  this.monday = monday;
182
208
  this.monday.breakTimes = monday?.breakTimes ?? [];
183
209
  this.monday.peakTimes = monday?.peakTimes ?? [];
210
+ this.monday.timeSlotsManual = monday?.timeSlotsManual ?? [];
184
211
  this.tuesday = tuesday;
185
212
  this.tuesday.breakTimes = tuesday?.breakTimes ?? [];
186
213
  this.tuesday.peakTimes = tuesday?.peakTimes ?? [];
187
214
  this.wednesday = wednesday;
188
215
  this.wednesday.breakTimes = wednesday?.breakTimes ?? [];
189
216
  this.wednesday.peakTimes = wednesday?.peakTimes ?? [];
217
+ this.wednesday.timeSlotsManual = wednesday?.timeSlotsManual ?? null;
190
218
  this.thursday = thursday;
191
219
  this.thursday.breakTimes = thursday?.breakTimes ?? [];
192
220
  this.thursday.peakTimes = thursday?.peakTimes ?? [];
221
+ this.thursday.timeSlotsManual = thursday?.timeSlotsManual ?? null;
193
222
  this.friday = friday;
194
223
  this.friday.breakTimes = friday?.breakTimes ?? [];
195
224
  this.friday.peakTimes = friday?.peakTimes ?? [];
225
+ this.friday.timeSlotsManual = friday?.timeSlotsManual ?? null;
196
226
  this.saturday = saturday;
197
227
  this.saturday.breakTimes = saturday?.breakTimes ?? [];
198
228
  this.saturday.peakTimes = saturday?.peakTimes ?? [];
229
+ this.saturday.timeSlotsManual = saturday?.timeSlotsManual ?? null;
199
230
  this.sunday = sunday;
200
231
  this.sunday.breakTimes = sunday?.breakTimes ?? [];
201
232
  this.sunday.peakTimes = sunday?.peakTimes ?? [];
233
+ this.sunday.timeSlotsManual = sunday?.timeSlotsManual ?? null;
202
234
  this.description = description;
203
235
  this.about = about;
204
236
  this.maintenanceDatesWithTimes = maintenanceDatesWithTimes ?? [];
@@ -224,6 +256,12 @@ export default function usetFacility() {
224
256
  this.isCancellationAutoRefundEnabled = isCancellationAutoRefundEnabled;
225
257
  this.bookingPolicy = bookingPolicy;
226
258
  this.securityCheckList = securityCheckList ?? [];
259
+ this.isBookingUnitLimitEnabled = isBookingUnitLimitEnabled || false;
260
+ this.bookingUnitLimit = bookingUnitLimit ?? null;
261
+ this.isMaxNumberGuestLimitEnabled = isMaxNumberGuestLimitEnabled || false;
262
+ this.maxNumberGuestLimit = maxNumberGuestLimit ?? null;
263
+ this.isCancelAllowedLimitEnabled = isCancelAllowedLimitEnabled || false;
264
+ this.daysAllowedCancel = daysAllowedCancel ?? null;
227
265
  this.isBookingPolicyEnabled = isBookingPolicyEnabled || false;
228
266
  }
229
267
  }