@7365admin1/layer-common 1.11.26 → 1.11.27

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @iservice365/layer-common
2
2
 
3
+ ## 1.11.27
4
+
5
+ ### Patch Changes
6
+
7
+ - 2797c03: updates and fixes
8
+
3
9
  ## 1.11.26
4
10
 
5
11
  ### Patch Changes
@@ -21,7 +21,7 @@ const prop = defineProps({
21
21
  },
22
22
  placeholder: {
23
23
  type: String,
24
- default: 'MM/DD/YYYY'
24
+ default: 'DD/MM/YYYY'
25
25
  }
26
26
  })
27
27
 
@@ -47,12 +47,12 @@ function validate() {
47
47
  function convertToReadableFormat(dateStr: string): string {
48
48
  if (!dateStr) return ""
49
49
  const dateObj = new Date(dateStr + "T00:00:00")
50
- const options: Intl.DateTimeFormatOptions = {
51
- year: 'numeric',
52
- month: '2-digit',
53
- day: '2-digit'
54
- }
55
- return dateObj.toLocaleDateString('en-US', options)
50
+ if (Number.isNaN(dateObj.getTime())) return ""
51
+
52
+ const day = String(dateObj.getDate()).padStart(2, "0")
53
+ const month = String(dateObj.getMonth() + 1).padStart(2, "0")
54
+ const year = String(dateObj.getFullYear())
55
+ return `${day}/${month}/${year}`
56
56
  }
57
57
 
58
58
  function handleInitialDate() {
@@ -366,23 +366,25 @@
366
366
  />
367
367
  <v-menu v-else-if="activeTab === 'overnight-parking'">
368
368
  <template #activator="{ props }">
369
- <v-avatar class="rounded-xl border-md">
370
- <v-icon v-bind="props" icon="mdi-dots-vertical" />
369
+ <v-avatar v-bind="props" class="rounded-xl border-md">
370
+ <v-icon icon="mdi-dots-vertical" />
371
371
  </v-avatar>
372
372
  </template>
373
373
 
374
374
  <v-card>
375
375
  <v-list-item
376
+ v-if="
377
+ !overNightParkingListActions[0].disabled ||
378
+ !['approved', 'rejected'].includes(
379
+ item?.overnightParking?.status
380
+ )
381
+ "
376
382
  @click.stop="
377
383
  openApproveRejectOverNightParkingRequestDialog(
378
384
  item,
379
385
  overNightParkingListActions[0].status
380
386
  )
381
387
  "
382
- :disabled="
383
- item?.overnightParking?.status == 'approved' ||
384
- !overNightParkingListActions[0].disabled
385
- "
386
388
  >
387
389
  <template #title>
388
390
  <span class="text-caption">
@@ -392,14 +394,18 @@
392
394
  </v-list-item>
393
395
  <v-divider />
394
396
  <v-list-item
395
- v-if="item?.overnightParking?.status !== 'approved'"
397
+ v-if="
398
+ !overNightParkingListActions[1].disabled ||
399
+ !['approved', 'rejected'].includes(
400
+ item?.overnightParking?.status
401
+ )
402
+ "
396
403
  @click="
397
404
  openApproveRejectOverNightParkingRequestDialog(
398
405
  item,
399
406
  overNightParkingListActions[1].status
400
407
  )
401
408
  "
402
- :disabled="!overNightParkingListActions[1].disabled"
403
409
  >
404
410
  <template #title>
405
411
  <span class="text-caption">
@@ -407,6 +413,22 @@
407
413
  </span>
408
414
  </template>
409
415
  </v-list-item>
416
+ <v-list-item
417
+ v-if="item?.overnightParking?.remarks"
418
+ @click="
419
+ openApproveRejectOverNightParkingRequestDialog(
420
+ item,
421
+ overNightParkingListActions[2].status,
422
+ item?.overnightParking?.remarks
423
+ )
424
+ "
425
+ >
426
+ <template #title>
427
+ <span class="text-caption">
428
+ {{ overNightParkingListActions[2].text }}
429
+ </span>
430
+ </template>
431
+ </v-list-item>
410
432
  <v-divider />
411
433
  </v-card>
412
434
  </v-menu>
@@ -831,7 +853,7 @@
831
853
  />
832
854
  </v-row>
833
855
  </v-toolbar>
834
- <v-card-text class="px-4 pb-2">
856
+ <v-card-text class="px-4 pb-6">
835
857
  <v-row no-gutters justify="center" align-content="center">
836
858
  <v-col
837
859
  v-if="
@@ -853,16 +875,31 @@
853
875
  outlined
854
876
  rows="3"
855
877
  clearable
878
+ :hide-details="
879
+ approveRejectOvernightParkingRequestDialog.status ===
880
+ 'remarks'
881
+ "
882
+ :readonly="
883
+ approveRejectOvernightParkingRequestDialog.status ===
884
+ 'remarks'
885
+ "
856
886
  />
857
887
  </v-col>
858
888
  </v-row>
859
889
  </v-card-text>
860
- <v-toolbar class="pa-0" density="compact">
890
+ <v-toolbar
891
+ v-if="approveRejectOvernightParkingRequestDialog.status !== 'remarks'"
892
+ class="pa-0"
893
+ density="compact"
894
+ >
861
895
  <v-row no-gutters>
862
896
  <v-col cols="6">
863
897
  <v-btn
864
898
  text="No"
865
- variant="text"
899
+ color="grey-lighten-3"
900
+ variant="flat"
901
+ height="48"
902
+ tile
866
903
  block
867
904
  :disabled="isApprovingRejectingOvernightParkingRequest"
868
905
  @click="closeApproveRejectOvernightParkingDialog"
@@ -874,7 +911,7 @@
874
911
  color="success"
875
912
  variant="flat"
876
913
  height="48"
877
- rounded="0"
914
+ tile
878
915
  block
879
916
  :disabled="
880
917
  !overNightParkingRequestApproveRejectRemarks ||
@@ -1077,6 +1114,10 @@ const overNightParkingListActions = [
1077
1114
  status: "rejected",
1078
1115
  disabled: props.canUpdateVisitor,
1079
1116
  },
1117
+ {
1118
+ text: "View Remarks",
1119
+ status: "remarks",
1120
+ },
1080
1121
  ];
1081
1122
  const overNightParkingRequestApproveRejectRemarks = ref("");
1082
1123
  const approveRejectOvernightParkingRequestDialog = ref({
@@ -1087,7 +1128,8 @@ const selectedOvernightParkingRequest = ref<Record<string, any>>({});
1087
1128
 
1088
1129
  function openApproveRejectOverNightParkingRequestDialog(
1089
1130
  visitor: Record<string, any>,
1090
- status: string
1131
+ status: string,
1132
+ remarks?: string
1091
1133
  ) {
1092
1134
  selectedOvernightParkingRequest.value = visitor;
1093
1135
  approveRejectOvernightParkingRequestDialog.value = {
@@ -1095,6 +1137,7 @@ function openApproveRejectOverNightParkingRequestDialog(
1095
1137
  status,
1096
1138
  };
1097
1139
  dialog.approveRejectOvernightParkingRequestDialog = true;
1140
+ overNightParkingRequestApproveRejectRemarks.value = remarks ?? "";
1098
1141
  }
1099
1142
 
1100
1143
  const isApprovingRejectingOvernightParkingRequest = ref(false);
@@ -69,9 +69,9 @@ function generateTimeSlotsFromStart(
69
69
  return slots;
70
70
  }
71
71
 
72
- // 11/24/2025, 09:05 format
72
+ // 24/11/2025, 09:05 format
73
73
  function toLocalTimeNumeric(utcString: string) {
74
- return new Date(utcString).toLocaleString("en-US", {
74
+ return new Date(utcString).toLocaleString("en-GB", {
75
75
  year: "numeric",
76
76
  month: "2-digit",
77
77
  day: "2-digit",
@@ -137,4 +137,4 @@ return {
137
137
 
138
138
  }
139
139
 
140
- }
140
+ }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@7365admin1/layer-common",
3
3
  "license": "MIT",
4
4
  "type": "module",
5
- "version": "1.11.26",
5
+ "version": "1.11.27",
6
6
  "author": "7365admin1",
7
7
  "main": "./nuxt.config.ts",
8
8
  "publishConfig": {