@7365admin1/layer-common 1.11.50 → 1.11.52

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.
@@ -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
@@ -91,10 +94,10 @@
91
94
  <v-col cols="12">
92
95
  <strong>Name:</strong> {{ selectedOnlineForm?.name ?? "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"],
@@ -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,18 +372,6 @@ 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
- });
370
-
371
375
  function tableRowClickHandler(_: any, data: any) {
372
376
  selectedOnlineForm.value = data.item as TOnlineForm;
373
377
  previewDialog.value = true;
@@ -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;
@@ -296,6 +296,7 @@ const { data: getVehiclesReq, refresh: getVehiclesRefresh, pending: getVehiclesP
296
296
  page: page.value,
297
297
  search: searchInput.value,
298
298
  type: vehicleTypeFilter.value ?? "",
299
+ site: props.site,
299
300
  }),
300
301
  {
301
302
  watch: [page],
@@ -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
  }
@@ -0,0 +1,36 @@
1
+ export default function useOnlineFormConfiguration() {
2
+ function getAll({
3
+ page = 1,
4
+ search = "",
5
+ limit = 10,
6
+ status = "",
7
+ org = "",
8
+ site = "",
9
+ } = {}) {
10
+ return useNuxtApp().$api<Record<string, any>>("/api/online-form-configurations", {
11
+ method: "GET",
12
+ query: { page, search, limit, status, org, site },
13
+ });
14
+ }
15
+
16
+ function getById(id: string) {
17
+ return useNuxtApp().$api<Record<string, any>>(`/api/online-form-configurations/id/${id}`, {
18
+ method: "GET",
19
+ });
20
+ }
21
+
22
+ function updateById(id: string, value: any) {
23
+ return useNuxtApp().$api<Record<string, any>>(`/api/online-form-configurations/id/${id}`, {
24
+ method: "PUT",
25
+ body: value,
26
+ });
27
+ }
28
+
29
+ function deleteById(id: string) {
30
+ return useNuxtApp().$api<Record<string, any>>(`/api/online-form-configurations/id/${id}`, {
31
+ method: "PATCH",
32
+ });
33
+ }
34
+
35
+ return { getAll, getById, updateById, deleteById };
36
+ }
@@ -0,0 +1,145 @@
1
+ export type OnlineFormTemplateInput = {
2
+ label: string;
3
+ dataType: string;
4
+ required: boolean;
5
+ multiple: boolean;
6
+ options?: string[];
7
+ };
8
+
9
+ const formTemplates: Record<string, OnlineFormTemplateInput[]> = {
10
+ "Application for Bicycle Parking": [
11
+ { label: "Name", dataType: "Text Input", required: true, multiple: false },
12
+ { label: "Unit No.", dataType: "Text Input", required: true, multiple: false },
13
+ { label: "IC/Passport No.", dataType: "Text Input", required: true, multiple: false },
14
+ { label: "Contact No.", dataType: "Text Input", required: true, multiple: false },
15
+ { label: "Bicycle Description", dataType: "Text Input", required: true, multiple: false },
16
+ { label: "Bicycle Serial No.", dataType: "Text Input", required: false, multiple: false },
17
+ { label: "Date", dataType: "Date Input", required: true, multiple: false },
18
+ ],
19
+ "Application for Booking of BBQ Pit": [
20
+ { label: "Name", dataType: "Text Input", required: true, multiple: false },
21
+ { label: "Unit No.", dataType: "Text Input", required: true, multiple: false },
22
+ { label: "Contact No.", dataType: "Text Input", required: true, multiple: false },
23
+ { label: "Date of Booking", dataType: "Date Input", required: true, multiple: false },
24
+ { label: "Time From", dataType: "Text Input", required: true, multiple: false },
25
+ { label: "Time To", dataType: "Text Input", required: true, multiple: false },
26
+ { label: "No. of Pax", dataType: "Text Input", required: true, multiple: false },
27
+ { label: "Remarks", dataType: "Text Area", required: false, multiple: false },
28
+ ],
29
+ "Application for Booking of Rooftop Bar/Dining": [
30
+ { label: "Name", dataType: "Text Input", required: true, multiple: false },
31
+ { label: "Unit No.", dataType: "Text Input", required: true, multiple: false },
32
+ { label: "Contact No.", dataType: "Text Input", required: true, multiple: false },
33
+ { label: "Date of Booking", dataType: "Date Input", required: true, multiple: false },
34
+ { label: "Time From", dataType: "Text Input", required: true, multiple: false },
35
+ { label: "Time To", dataType: "Text Input", required: true, multiple: false },
36
+ { label: "No. of Pax", dataType: "Text Input", required: true, multiple: false },
37
+ { label: "Remarks", dataType: "Text Area", required: false, multiple: false },
38
+ ],
39
+ "Application for Electronic Access Card": [
40
+ { label: "Name", dataType: "Text Input", required: true, multiple: false },
41
+ { label: "Unit No.", dataType: "Text Input", required: true, multiple: false },
42
+ { label: "IC/Passport No.", dataType: "Text Input", required: true, multiple: false },
43
+ { label: "Contact No.", dataType: "Text Input", required: true, multiple: false },
44
+ { label: "No. of Cards Required", dataType: "Text Input", required: true, multiple: false },
45
+ { label: "Date", dataType: "Date Input", required: true, multiple: false },
46
+ ],
47
+ "Application for Main Entrance RFID Transponder": [
48
+ { label: "Owner Name", dataType: "Text Input", required: true, multiple: false },
49
+ { label: "Unit No.", dataType: "Text Input", required: true, multiple: false },
50
+ { label: "IC/Passport No.", dataType: "Text Input", required: true, multiple: false },
51
+ { label: "Contact No.", dataType: "Text Input", required: true, multiple: false },
52
+ { label: "Vehicle No.", dataType: "Text Input", required: true, multiple: false },
53
+ { label: "Vehicle Make/Model", dataType: "Text Input", required: true, multiple: false },
54
+ { label: "No. of Transponders", dataType: "Text Input", required: true, multiple: false },
55
+ { label: "Date", dataType: "Date Input", required: true, multiple: false },
56
+ ],
57
+ "Application for Moving In/Out & Delivery": [
58
+ { label: "Name", dataType: "Text Input", required: true, multiple: false },
59
+ { label: "Unit No.", dataType: "Text Input", required: true, multiple: false },
60
+ { label: "Contact No.", dataType: "Text Input", required: true, multiple: false },
61
+ { label: "Type", dataType: "Select", required: true, multiple: false, options: ["Moving In", "Moving Out", "Delivery"] },
62
+ { label: "Date", dataType: "Date Input", required: true, multiple: false },
63
+ { label: "Time From", dataType: "Text Input", required: true, multiple: false },
64
+ { label: "Time To", dataType: "Text Input", required: true, multiple: false },
65
+ { label: "Moving Company", dataType: "Text Input", required: false, multiple: false },
66
+ { label: "Remarks", dataType: "Text Area", required: false, multiple: false },
67
+ ],
68
+ "Application for Renovation/Addition & Alteration Works": [
69
+ { label: "Owner/Tenant Name", dataType: "Text Input", required: true, multiple: false },
70
+ { label: "Unit No.", dataType: "Text Input", required: true, multiple: false },
71
+ { label: "Contact No.", dataType: "Text Input", required: true, multiple: false },
72
+ { label: "Description of Works", dataType: "Text Area", required: true, multiple: false },
73
+ { label: "Contractor Name", dataType: "Text Input", required: true, multiple: false },
74
+ { label: "Contractor Contact No.", dataType: "Text Input", required: true, multiple: false },
75
+ { label: "Commencement Date", dataType: "Date Input", required: true, multiple: false },
76
+ { label: "Completion Date", dataType: "Date Input", required: true, multiple: false },
77
+ { label: "Remarks", dataType: "Text Area", required: false, multiple: false },
78
+ ],
79
+ "Letter of Undertaking & Indemnity": [
80
+ { label: "Owner Name", dataType: "Text Input", required: true, multiple: false },
81
+ { label: "Unit No.", dataType: "Text Input", required: true, multiple: false },
82
+ { label: "IC/Passport No.", dataType: "Text Input", required: true, multiple: false },
83
+ { label: "Contact No.", dataType: "Text Input", required: true, multiple: false },
84
+ { label: "Purpose of Undertaking", dataType: "Text Area", required: true, multiple: false },
85
+ { label: "Date", dataType: "Date Input", required: true, multiple: false },
86
+ ],
87
+ "Letter of Undertaking by Marketing Agent": [
88
+ { label: "Marketing Agent Name", dataType: "Text Input", required: true, multiple: false },
89
+ { label: "Agency Name", dataType: "Text Input", required: true, multiple: false },
90
+ { label: "CEA Registration No.", dataType: "Text Input", required: true, multiple: false },
91
+ { label: "Contact No.", dataType: "Text Input", required: true, multiple: false },
92
+ { label: "Unit No.", dataType: "Text Input", required: true, multiple: false },
93
+ { label: "Owner Name", dataType: "Text Input", required: true, multiple: false },
94
+ { label: "Date", dataType: "Date Input", required: true, multiple: false },
95
+ ],
96
+ "Pet's Record Form": [
97
+ { label: "Owner Name", dataType: "Text Input", required: true, multiple: false },
98
+ { label: "Unit No.", dataType: "Text Input", required: true, multiple: false },
99
+ { label: "Contact No.", dataType: "Text Input", required: true, multiple: false },
100
+ { label: "Pet Name", dataType: "Text Input", required: true, multiple: false },
101
+ { label: "Pet Type", dataType: "Select", required: true, multiple: false, options: ["Dog", "Cat", "Rabbit", "Bird", "Fish", "Others"] },
102
+ { label: "Breed", dataType: "Text Input", required: true, multiple: false },
103
+ { label: "Colour", dataType: "Text Input", required: true, multiple: false },
104
+ { label: "Age", dataType: "Text Input", required: true, multiple: false },
105
+ { label: "Sex", dataType: "Select", required: true, multiple: false, options: ["Male", "Female"] },
106
+ { label: "Microchip No.", dataType: "Text Input", required: false, multiple: false },
107
+ { label: "License No.", dataType: "Text Input", required: false, multiple: false },
108
+ ],
109
+ "Refund of Deposit": [
110
+ { label: "Owner/Tenant Name", dataType: "Text Input", required: true, multiple: false },
111
+ { label: "Unit No.", dataType: "Text Input", required: true, multiple: false },
112
+ { label: "Contact No.", dataType: "Text Input", required: true, multiple: false },
113
+ { label: "Bank Name", dataType: "Text Input", required: true, multiple: false },
114
+ { label: "Account No.", dataType: "Text Input", required: true, multiple: false },
115
+ { label: "Account Holder Name", dataType: "Text Input", required: true, multiple: false },
116
+ { label: "Deposit Type", dataType: "Select", required: true, multiple: false, options: ["Renovation Deposit", "Access Card Deposit", "Moving Deposit", "Others"] },
117
+ { label: "Remarks", dataType: "Text Area", required: false, multiple: false },
118
+ ],
119
+ "Update of Mailing Address": [
120
+ { label: "Name", dataType: "Text Input", required: true, multiple: false },
121
+ { label: "IC/Passport No.", dataType: "Text Input", required: true, multiple: false },
122
+ { label: "Unit No.", dataType: "Text Input", required: true, multiple: false },
123
+ { label: "New Mailing Address", dataType: "Text Area", required: true, multiple: false },
124
+ { label: "Contact No.", dataType: "Text Input", required: true, multiple: false },
125
+ { label: "Effective Date", dataType: "Date Input", required: true, multiple: false },
126
+ ],
127
+ "Vehicle Registration Form": [
128
+ { label: "Owner Name", dataType: "Text Input", required: true, multiple: false },
129
+ { label: "Unit No.", dataType: "Text Input", required: true, multiple: false },
130
+ { label: "IC/Passport No.", dataType: "Text Input", required: true, multiple: false },
131
+ { label: "Contact No.", dataType: "Text Input", required: true, multiple: false },
132
+ { label: "Vehicle No.", dataType: "Text Input", required: true, multiple: false },
133
+ { label: "Vehicle Make", dataType: "Text Input", required: true, multiple: false },
134
+ { label: "Vehicle Model", dataType: "Text Input", required: true, multiple: false },
135
+ { label: "Vehicle Colour", dataType: "Text Input", required: true, multiple: false },
136
+ { label: "IU Number", dataType: "Text Input", required: false, multiple: false },
137
+ { label: "Remarks", dataType: "Text Area", required: false, multiple: false },
138
+ ],
139
+ };
140
+
141
+ const templateNames = Object.keys(formTemplates);
142
+
143
+ export default function useOnlineFormTemplates() {
144
+ return { formTemplates, templateNames };
145
+ }