@7365admin1/layer-common 1.10.6 → 1.10.8

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.
Files changed (54) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/components/AccessCardQrTagging.vue +314 -34
  3. package/components/AccessCardQrTaggingPrintQr.vue +75 -0
  4. package/components/{AddSupplyForm.vue → AddEqupmentForm.vue} +5 -5
  5. package/components/AreaChecklistHistoryLogs.vue +9 -0
  6. package/components/BuildingForm.vue +36 -5
  7. package/components/BuildingManagement/buildings.vue +18 -9
  8. package/components/BuildingManagement/units.vue +13 -115
  9. package/components/BuildingUnitFormAdd.vue +42 -33
  10. package/components/BuildingUnitFormEdit.vue +334 -139
  11. package/components/CleaningScheduleMain.vue +60 -13
  12. package/components/Dialog/DeleteConfirmation.vue +2 -2
  13. package/components/Dialog/UpdateMoreAction.vue +2 -2
  14. package/components/EntryPassInformation.vue +443 -0
  15. package/components/{CheckoutItemMain.vue → EquipmentItemMain.vue} +88 -85
  16. package/components/{SupplyManagement.vue → EquipmentManagement.vue} +3 -3
  17. package/components/Input/DateTimePicker.vue +17 -11
  18. package/components/Input/InputPhoneNumberV2.vue +8 -0
  19. package/components/ManageChecklistMain.vue +400 -36
  20. package/components/ScheduleAreaMain.vue +56 -0
  21. package/components/TableHygiene.vue +47 -430
  22. package/components/UnitPersonCard.vue +123 -0
  23. package/components/VehicleAddSelection.vue +2 -2
  24. package/components/VehicleForm.vue +78 -19
  25. package/components/VehicleManagement.vue +164 -40
  26. package/components/VisitorForm.vue +95 -20
  27. package/components/VisitorFormSelection.vue +13 -2
  28. package/components/VisitorManagement.vue +83 -55
  29. package/composables/useAccessManagement.ts +52 -0
  30. package/composables/useCleaningPermission.ts +7 -7
  31. package/composables/useDashboardData.ts +2 -2
  32. package/composables/{useSupply.ts → useEquipment.ts} +11 -11
  33. package/composables/{useCheckout.ts → useEquipmentItem.ts} +7 -7
  34. package/composables/{useCheckoutPermission.ts → useEquipmentItemPermission.ts} +13 -13
  35. package/composables/useEquipmentManagementPermission.ts +96 -0
  36. package/composables/{useSupplyPermission.ts → useEquipmentPermission.ts} +9 -9
  37. package/composables/usePeople.ts +4 -3
  38. package/composables/useVehicle.ts +35 -2
  39. package/composables/useVisitor.ts +3 -3
  40. package/composables/useWorkOrder.ts +25 -3
  41. package/package.json +3 -2
  42. package/types/building.d.ts +1 -1
  43. package/types/cleaner-schedule.d.ts +1 -0
  44. package/types/{checkout-item.d.ts → equipment-item.d.ts} +3 -3
  45. package/types/{supply.d.ts → equipment.d.ts} +2 -2
  46. package/types/html2pdf.d.ts +19 -0
  47. package/types/people.d.ts +5 -2
  48. package/types/site.d.ts +8 -0
  49. package/types/vehicle.d.ts +4 -3
  50. package/types/visitor.d.ts +2 -1
  51. package/.playground/app.vue +0 -41
  52. package/.playground/eslint.config.mjs +0 -6
  53. package/.playground/nuxt.config.ts +0 -22
  54. package/.playground/pages/feedback.vue +0 -30
@@ -10,21 +10,21 @@
10
10
  v-model:page="page"
11
11
  :pages="pages"
12
12
  :pageRange="pageRange"
13
- :no-data-text="`No supplies found for ${siteName}.`"
14
- @refresh="getCheckoutItemsRefresh"
15
- :canCreate="canCreateCheckout"
16
- createLabel="Checkout Item"
13
+ :no-data-text="`No Equipment Items found for ${siteName}.`"
14
+ @refresh="getEquipmentItemsRefresh"
15
+ :canCreate="canCreateEquipmentItem"
16
+ createLabel="Equipment Item"
17
17
  @row-click="handleRowClick"
18
18
  >
19
19
  <template #actions>
20
20
  <v-row no-gutters align="center" class="w-100">
21
- <v-col cols="auto" v-if="canCreateCheckout">
21
+ <v-col cols="auto" v-if="canCreateEquipmentItem">
22
22
  <v-btn
23
23
  class="text-none"
24
24
  rounded="pill"
25
25
  variant="tonal"
26
26
  size="large"
27
- @click="openCheckoutDialog()"
27
+ @click="openEquipmentItemDialog()"
28
28
  >
29
29
  Checkout Item
30
30
  </v-btn>
@@ -147,7 +147,7 @@
147
147
 
148
148
  <v-row no-gutters class="mb-2">
149
149
  <v-col cols="5" class="text-subtitle-2 font-weight-bold">
150
- Checkout Quantity:
150
+ Equipment Quantity:
151
151
  </v-col>
152
152
  <v-col cols="7" class="text-subtitle-2">
153
153
  {{ selectedSupply.qty || "N/A" }}
@@ -177,28 +177,28 @@
177
177
  </HygieneUpdateMoreAction>
178
178
  </v-dialog>
179
179
 
180
- <!-- Main Checkout Dialog -->
181
- <v-dialog v-model="dialogCheckoutItem" max-width="540" persistent>
180
+ <!-- Main Equipment Item Dialog -->
181
+ <v-dialog v-model="dialogEquipmentItem" max-width="540" persistent>
182
182
  <v-card>
183
183
  <v-card-title class="d-flex align-center pa-4">
184
- <span class="text-h6 font-weight-bold">Checkout Item</span>
184
+ <span class="text-h6 font-weight-bold">Equipment Item</span>
185
185
  <v-spacer />
186
186
  <v-btn
187
187
  icon="mdi-close"
188
188
  variant="text"
189
189
  size="small"
190
- @click="dialogCheckoutItem = false"
190
+ @click="dialogEquipmentItem = false"
191
191
  />
192
192
  </v-card-title>
193
193
 
194
194
  <v-divider />
195
195
 
196
196
  <v-card-text class="pa-6">
197
- <v-form ref="checkoutItemFormRef">
198
- <!-- Add Supply Section -->
197
+ <v-form ref="equipmentItemFormRef">
198
+ <!-- Add Equipment Section -->
199
199
  <v-row no-gutters class="mb-4">
200
200
  <v-col cols="12">
201
- <InputLabel for="supply" title="Add Supply" class="mb-2" />
201
+ <InputLabel for="equipment" title="Add Equipment" class="mb-2" />
202
202
  <v-autocomplete
203
203
  v-model="selectedSupplyForAdd"
204
204
  :items="supplyItems"
@@ -207,14 +207,14 @@
207
207
  item-value="value"
208
208
  density="comfortable"
209
209
  variant="outlined"
210
- placeholder="Select supply"
210
+ placeholder="Select equipment"
211
211
  @update:model-value="addSupplyToList"
212
212
  />
213
213
  </v-col>
214
214
  </v-row>
215
215
 
216
- <!-- Selected Supplies List -->
217
- <v-row no-gutters v-if="checkoutItems.length > 0" class="mb-4">
216
+ <!-- Selected Equipment List -->
217
+ <v-row no-gutters v-if="equipmentItems.length > 0" class="mb-4">
218
218
  <v-col cols="12">
219
219
  <v-divider class="mb-4" />
220
220
 
@@ -223,7 +223,7 @@
223
223
  </div>
224
224
 
225
225
  <v-sheet
226
- v-for="(item, index) in checkoutItems"
226
+ v-for="(item, index) in equipmentItems"
227
227
  :key="index"
228
228
  rounded="lg"
229
229
  variant="outlined"
@@ -234,7 +234,7 @@
234
234
  <div class="text-body-2 font-weight-medium">
235
235
  <span class="text-capitalize">{{ item.supplyName }}</span>
236
236
  - (Available:
237
- <span class="font-weight-bold">{{ item.qty }}</span
237
+ <span class="font-weight-bold">{{ item.stockQty }}</span
238
238
  >)
239
239
  </div>
240
240
  </v-col>
@@ -283,7 +283,7 @@
283
283
  >mdi-delete-outline</v-icon
284
284
  >
285
285
  </template>
286
- <v-list-item-title>Remove Supply</v-list-item-title>
286
+ <v-list-item-title>Remove Equipment</v-list-item-title>
287
287
  </v-list-item>
288
288
  </v-list>
289
289
  </v-menu>
@@ -342,7 +342,7 @@
342
342
  size="large"
343
343
  height="56"
344
344
  class="text-none font-weight-medium rounded-0"
345
- @click="dialogCheckoutItem = false"
345
+ @click="dialogEquipmentItem = false"
346
346
  >
347
347
  Cancel
348
348
  </v-btn>
@@ -356,9 +356,9 @@
356
356
  height="56"
357
357
  class="text-none font-weight-bold rounded-0"
358
358
  :loading="submitting"
359
- @click="_checkoutItem()"
359
+ @click="_equipmentItem()"
360
360
  >
361
- Checkout Item
361
+ Equipment Item
362
362
  </v-btn>
363
363
  </v-col>
364
364
  </v-row>
@@ -374,7 +374,7 @@
374
374
  <div>
375
375
  <div class="text-h6 font-weight-bold">Item Photos</div>
376
376
  <div class="text-caption text-medium-emphasis">
377
- {{ checkoutItems[activePhotoIndex ?? 0]?.supplyName || "Item" }}
377
+ {{ equipmentItems[activePhotoIndex ?? 0]?.supplyName || "Item" }}
378
378
  </div>
379
379
  </div>
380
380
 
@@ -438,16 +438,17 @@
438
438
  </template>
439
439
 
440
440
  <script setup lang="ts">
441
- import useCheckout from "../composables/useCheckout";
442
- import { useCheckoutPermission } from "../composables/useCheckoutPermission";
441
+ import useEquipmentItem from "../composables/useEquipmentItem";
442
+ import { useEquipmentItemPermission } from "../composables/useEquipmentItemPermission";
443
443
  import useSupply from "../composables/useSupply";
444
+ import useUtils from "../composables/useUtils";
444
445
 
445
446
  const props = defineProps({
446
447
  orgId: { type: String, default: "" },
447
448
  site: { type: String, default: "" },
448
449
  });
449
450
 
450
- const { canCreateCheckout } = useCheckoutPermission();
451
+ const { canCreateEquipmentItem } = useEquipmentItemPermission();
451
452
 
452
453
  const items = ref<Array<Record<string, any>>>([]);
453
454
  const siteName = ref<string>("");
@@ -462,10 +463,10 @@ const headers = [
462
463
  ];
463
464
 
464
465
  const {
465
- getCheckoutItems,
466
- getCheckoutItemById,
467
- checkoutItems: checkoutItemApi,
468
- } = useCheckout();
466
+ getEquipmentItems,
467
+ getEquipmentItemById,
468
+ equipmentItems: equipmentItemApi,
469
+ } = useEquipmentItem();
469
470
  const { debounce, requiredRule, formatDate } = useUtils();
470
471
 
471
472
  const searchInput = ref("");
@@ -475,16 +476,16 @@ const page = ref(1);
475
476
  const pages = ref(0);
476
477
  const pageRange = ref("-- - -- of --");
477
478
 
478
- const selectedCheckoutItemId = ref("");
479
+ const selectedEquipmentItemId = ref("");
479
480
 
480
481
  const {
481
- data: getCheckoutItemsReq,
482
- refresh: getCheckoutItemsRefresh,
482
+ data: getEquipmentItemsReq,
483
+ refresh: getEquipmentItemsRefresh,
483
484
  pending: loading,
484
485
  } = await useLazyAsyncData(
485
- "get-all-checkout-items",
486
+ "get-all-equipment-items",
486
487
  () =>
487
- getCheckoutItems({
488
+ getEquipmentItems({
488
489
  page: page.value,
489
490
  search: searchInput.value,
490
491
  site: props.site,
@@ -495,14 +496,14 @@ const {
495
496
  );
496
497
 
497
498
  watchEffect(() => {
498
- if (getCheckoutItemsReq.value) {
499
- items.value = getCheckoutItemsReq.value.items;
500
- pages.value = getCheckoutItemsReq.value.pages;
501
- pageRange.value = getCheckoutItemsReq.value.pageRange;
499
+ if (getEquipmentItemsReq.value) {
500
+ items.value = getEquipmentItemsReq.value.items;
501
+ pages.value = getEquipmentItemsReq.value.pages;
502
+ pageRange.value = getEquipmentItemsReq.value.pageRange;
502
503
  }
503
504
  });
504
505
 
505
- const debounceSearch = debounce(getCheckoutItemsRefresh, 500);
506
+ const debounceSearch = debounce(getEquipmentItemsRefresh, 500);
506
507
  watch(
507
508
  [searchInput, endDate, startDate],
508
509
  ([]) => {
@@ -511,35 +512,35 @@ watch(
511
512
  { immediate: false, deep: true }
512
513
  );
513
514
 
514
- const { data: getCheckoutItemByIdReq, refresh: getCheckoutItemByIdRefresh } =
515
- await useLazyAsyncData(
516
- "get-checkout-item-by-id",
517
- () => getCheckoutItemById(selectedCheckoutItemId.value),
515
+ const { data: getEquipmentItemByIdReq, refresh: getEquipmentItemByIdRefresh } =
516
+ await useLazyAsyncData<any>(
517
+ "get-equipment-item-by-id",
518
+ () => getEquipmentItemById(selectedEquipmentItemId.value),
518
519
  {
519
520
  immediate: false,
520
521
  }
521
522
  );
522
523
 
523
524
  watchEffect(() => {
524
- if (getCheckoutItemByIdReq.value) {
525
+ if (getEquipmentItemByIdReq.value) {
525
526
  selectedSupply.value = {
526
- _id: getCheckoutItemByIdReq.value._id,
527
- supplyName: getCheckoutItemByIdReq.value.supplyName || "N/A",
528
- qty: getCheckoutItemByIdReq.value.qty || 0,
527
+ _id: getEquipmentItemByIdReq.value._id,
528
+ supplyName: getEquipmentItemByIdReq.value.supplyName || "N/A",
529
+ qty: getEquipmentItemByIdReq.value.qty || 0,
529
530
  unitOfMeasurement:
530
- getCheckoutItemByIdReq.value.supply?.unitOfMeasurement || "N/A",
531
- status: getCheckoutItemByIdReq.value.status || "N/A",
532
- site: getCheckoutItemByIdReq.value.site || "N/A",
531
+ getEquipmentItemByIdReq.value.supply?.unitOfMeasurement || "N/A",
532
+ status: getEquipmentItemByIdReq.value.status || "N/A",
533
+ site: getEquipmentItemByIdReq.value.site || "N/A",
533
534
  supply:
534
- getCheckoutItemByIdReq.value.supply ||
535
- getCheckoutItemByIdReq.value.supply?._id ||
535
+ getEquipmentItemByIdReq.value.supply ||
536
+ getEquipmentItemByIdReq.value.supply?._id ||
536
537
  "N/A",
537
- attachment: Array.isArray(getCheckoutItemByIdReq.value.attachment)
538
- ? [...getCheckoutItemByIdReq.value.attachment]
538
+ attachment: Array.isArray(getEquipmentItemByIdReq.value.attachment)
539
+ ? [...getEquipmentItemByIdReq.value.attachment]
539
540
  : [],
540
541
  stockQty:
541
- getCheckoutItemByIdReq.value.stockQty ||
542
- getCheckoutItemByIdReq.value.supply?.stockQty ||
542
+ getEquipmentItemByIdReq.value.stockQty ||
543
+ getEquipmentItemByIdReq.value.supply?.stockQty ||
543
544
  "N/A",
544
545
  };
545
546
  }
@@ -548,7 +549,7 @@ watchEffect(() => {
548
549
  const { getSupplies } = useSupply();
549
550
 
550
551
  const { data: getSuppliesReq } = await useLazyAsyncData(
551
- "get-supplies-for-checkout-item",
552
+ "get-supplies-for-equipment-item",
552
553
  () =>
553
554
  getSupplies({
554
555
  site: props.site,
@@ -562,13 +563,14 @@ watchEffect(() => {
562
563
  supplyItems.value = getSuppliesReq.value.items.map((item: any) => ({
563
564
  name: item.name,
564
565
  value: item._id,
566
+ stockQty: item.qty ?? 0,
565
567
  }));
566
568
  }
567
569
  });
568
570
 
569
- const supplyItems = ref<Array<{ name: string; value: string }>>([]);
571
+ const supplyItems = ref<Array<{ name: string; value: string; stockQty: number }>>([]);
570
572
  const selectedSupplyForAdd = ref<string>("");
571
- const checkoutItems = ref<TCheckoutItem[]>([]);
573
+ const equipmentItems = ref<TEquipmentItem[]>([]);
572
574
 
573
575
  const selectedSupply = ref<Record<string, any>>({});
574
576
  const message = ref("");
@@ -576,7 +578,7 @@ const messageSnackbar = ref(false);
576
578
  const messageColor = ref("");
577
579
 
578
580
  const dialogShowMoreActions = ref(false);
579
- const dialogCheckoutItem = ref(false);
581
+ const dialogEquipmentItem = ref(false);
580
582
  const dialogPhotoForItem = ref(false);
581
583
  const activePhotoIndex = ref<number | null>(null);
582
584
 
@@ -586,28 +588,29 @@ function showMessage(msg: string, color: string = "error") {
586
588
  messageSnackbar.value = true;
587
589
  }
588
590
 
589
- function openCheckoutDialog() {
590
- checkoutItems.value = [];
591
+ function openEquipmentItemDialog() {
592
+ equipmentItems.value = [];
591
593
  selectedSupplyForAdd.value = "";
592
- dialogCheckoutItem.value = true;
594
+ dialogEquipmentItem.value = true;
593
595
  }
594
596
 
595
597
  function addSupplyToList(supplyId: string) {
596
598
  if (!supplyId) return;
597
599
 
598
- const exists = checkoutItems.value.find((item) => item.supply === supplyId);
600
+ const exists = equipmentItems.value.find((item) => item.supply === supplyId);
599
601
  if (exists) {
600
- showMessage("Supply already added.");
602
+ showMessage("Equipment already added.");
601
603
  selectedSupplyForAdd.value = "";
602
604
  return;
603
605
  }
604
606
 
605
607
  const supply = supplyItems.value.find((s) => s.value === supplyId);
606
608
  if (supply) {
607
- checkoutItems.value.push({
609
+ equipmentItems.value.push({
608
610
  supply: supplyId,
609
611
  supplyName: supply.name,
610
612
  qty: 1,
613
+ stockQty: supply.stockQty,
611
614
  photos: [],
612
615
  photoIds: [],
613
616
  });
@@ -616,7 +619,7 @@ function addSupplyToList(supplyId: string) {
616
619
  }
617
620
 
618
621
  function removeSupplyFromList(index: number) {
619
- checkoutItems.value.splice(index, 1);
622
+ equipmentItems.value.splice(index, 1);
620
623
  }
621
624
 
622
625
  function openPhotoDialog(index: number) {
@@ -627,25 +630,25 @@ function openPhotoDialog(index: number) {
627
630
  async function handleRowClick(data: any) {
628
631
  message.value = "";
629
632
 
630
- selectedCheckoutItemId.value = data?.item?._id;
633
+ selectedEquipmentItemId.value = data?.item?._id;
631
634
 
632
- if (selectedCheckoutItemId.value) {
633
- await getCheckoutItemByIdRefresh();
635
+ if (selectedEquipmentItemId.value) {
636
+ await getEquipmentItemByIdRefresh();
634
637
  }
635
638
 
636
639
  dialogShowMoreActions.value = true;
637
640
  }
638
641
 
639
- async function _checkoutItem() {
642
+ async function _equipmentItem() {
640
643
  submitting.value = true;
641
644
  try {
642
- if (!checkoutItems.value.length) {
643
- showMessage("Add at least one supply.");
645
+ if (!equipmentItems.value.length) {
646
+ showMessage("Add at least one equipment.");
644
647
  submitting.value = false;
645
648
  return;
646
649
  }
647
650
 
648
- const items = checkoutItems.value.map((item) => ({
651
+ const items = equipmentItems.value.map((item) => ({
649
652
  supply: item.supply,
650
653
  qty: item.qty,
651
654
  ...(item.photoIds && item.photoIds.length
@@ -653,16 +656,16 @@ async function _checkoutItem() {
653
656
  : {}),
654
657
  }));
655
658
 
656
- await checkoutItemApi(props.site, { items });
659
+ await equipmentItemApi(props.site, { items });
657
660
 
658
661
  showMessage(
659
- `Checked out ${checkoutItems.value.length} item(s).`,
662
+ `Checked out ${equipmentItems.value.length} item(s).`,
660
663
  "success"
661
664
  );
662
- dialogCheckoutItem.value = false;
663
- checkoutItems.value = [];
665
+ dialogEquipmentItem.value = false;
666
+ equipmentItems.value = [];
664
667
 
665
- await getCheckoutItemsRefresh();
668
+ await getEquipmentItemsRefresh();
666
669
  } catch (error: any) {
667
670
  console.error(error);
668
671
  showMessage(error?.data?.message, "error");
@@ -682,22 +685,22 @@ function viewAttachment(attachmentId: string) {
682
685
  const currentPhotos = computed({
683
686
  get() {
684
687
  if (activePhotoIndex.value === null) return [];
685
- return checkoutItems.value[activePhotoIndex.value]?.photos || [];
688
+ return equipmentItems.value[activePhotoIndex.value]?.photos || [];
686
689
  },
687
690
  set(val) {
688
691
  if (activePhotoIndex.value === null) return;
689
- checkoutItems.value[activePhotoIndex.value].photos = val || [];
692
+ equipmentItems.value[activePhotoIndex.value].photos = val || [];
690
693
  },
691
694
  });
692
695
 
693
696
  const currentPhotoIds = computed({
694
697
  get() {
695
698
  if (activePhotoIndex.value === null) return [];
696
- return checkoutItems.value[activePhotoIndex.value]?.photoIds || [];
699
+ return equipmentItems.value[activePhotoIndex.value]?.photoIds || [];
697
700
  },
698
701
  set(val) {
699
702
  if (activePhotoIndex.value === null) return;
700
- checkoutItems.value[activePhotoIndex.value].photoIds = val || [];
703
+ equipmentItems.value[activePhotoIndex.value].photoIds = val || [];
701
704
  },
702
705
  });
703
706
  </script>
@@ -10,10 +10,10 @@
10
10
  v-model:page="page"
11
11
  :pages="pages"
12
12
  :pageRange="pageRange"
13
- :no-data-text="`No supplies found.`"
13
+ :no-data-text="`No equipments found.`"
14
14
  @refresh="updatePage"
15
15
  :canCreate="true"
16
- createLabel="Add Supply"
16
+ createLabel="Add Equipment"
17
17
  @row-click="tableRowClickHandler"
18
18
  >
19
19
  <template #actions>
@@ -25,7 +25,7 @@
25
25
  variant="tonal"
26
26
  size="large"
27
27
  >
28
- Add Supply
28
+ Add Equipment
29
29
  </v-btn>
30
30
  </v-col>
31
31
 
@@ -22,7 +22,7 @@ const prop = defineProps({
22
22
  },
23
23
  placeholder: {
24
24
  type: String,
25
- default: 'MM/DD/YYYY, HH:MM AM/PM'
25
+ default: 'DD/MM/YYYY, HH:MM AM/PM'
26
26
  }
27
27
  })
28
28
 
@@ -53,17 +53,23 @@ function validate() {
53
53
  function convertToReadableFormat(dateStr: string): string {
54
54
 
55
55
  if (!dateStr) return "";
56
+
56
57
  const date = new Date(dateStr)
57
- const options: Intl.DateTimeFormatOptions = {
58
- year: 'numeric',
59
- month: '2-digit',
60
- day: '2-digit',
61
- hour: '2-digit',
62
- minute: '2-digit',
63
- hour12: true
64
- }
65
- const formatted = date.toLocaleString('en-US', options)
66
- return formatted
58
+
59
+ const day = String(date.getDate()).padStart(2, '0')
60
+ const month = String(date.getMonth() + 1).padStart(2, '0')
61
+ const year = date.getFullYear()
62
+
63
+ let hours = date.getHours()
64
+ const minutes = String(date.getMinutes()).padStart(2, '0')
65
+
66
+ const ampm = hours >= 12 ? 'PM' : 'AM'
67
+ hours = hours % 12
68
+ hours = hours ? hours : 12
69
+
70
+ const formattedTime = `${String(hours).padStart(2, '0')}:${minutes} ${ampm}`
71
+
72
+ return `${day}/${month}/${year}, ${formattedTime}`
67
73
  }
68
74
 
69
75
  function handleInitialDate(){
@@ -141,6 +141,14 @@ watch(input, (newInput) => {
141
141
  else phone.value = prefix + newInput
142
142
  })
143
143
 
144
+ watch(
145
+ () => props.modelValue,
146
+ (val) => {
147
+ phone.value = val || ''
148
+ },
149
+ { immediate: true }
150
+ )
151
+
144
152
 
145
153
  watch(phone, (newVal) => {
146
154
  const prefix = phonePrefix.value