@7365admin1/layer-common 3.0.2 → 3.0.5

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,25 @@
1
1
  # @iservice365/layer-common
2
2
 
3
+ ## 3.0.5
4
+
5
+ ### Patch Changes
6
+
7
+ - 8fbd685: Update Layer-common version
8
+
9
+ ## 3.0.4
10
+
11
+ ### Patch Changes
12
+
13
+ - update some integrate for onboarding status
14
+ - Updated dependencies
15
+ - @7365admin1/layer-common@3.0.4
16
+
17
+ ## 3.0.3
18
+
19
+ ### Patch Changes
20
+
21
+ - 8cae579: add document management layer fix
22
+
3
23
  ## 3.0.2
4
24
 
5
25
  ### Patch Changes
@@ -395,12 +395,12 @@
395
395
  </div>
396
396
  <v-chip
397
397
  size="small"
398
- :color="getStaffTone(item.status)"
398
+ color="blue-grey-darken-1"
399
399
  variant="tonal"
400
400
  label
401
- class="ml-auto flex-shrink-0"
401
+ class="ml-auto flex-shrink-0 font-weight-bold"
402
402
  >
403
- {{ item.status }}
403
+ {{ item.totalHours || 0 }} hrs
404
404
  </v-chip>
405
405
  </div>
406
406
  </v-card>
@@ -625,6 +625,7 @@ type StaffItem = {
625
625
  name: string;
626
626
  role: string;
627
627
  status: string;
628
+ totalHours?: number | string;
628
629
  raw?: Record<string, any>;
629
630
  };
630
631
 
@@ -1549,6 +1550,7 @@ function normalizeStaffItem(
1549
1550
  item.attendanceStatus ||
1550
1551
  "Off duty"
1551
1552
  ),
1553
+ totalHours: item.totalHours || 0,
1552
1554
  raw: item,
1553
1555
  };
1554
1556
  }
@@ -501,7 +501,7 @@
501
501
  </v-col>
502
502
  <v-col cols="3" class="d-flex align-center justify-end">
503
503
  <v-switch
504
- v-model="facility.isBookingUnitLimitEnabled"
504
+ v-model="isBookingUnitLimitEnabled"
505
505
  class="d-flex align-center"
506
506
  color="primary"
507
507
  hide-details
@@ -519,7 +519,7 @@
519
519
  :min="1"
520
520
  :max="500"
521
521
  hide-details
522
- :disabled="!facility.isBookingUnitLimitEnabled"
522
+ :disabled="!isBookingUnitLimitEnabled"
523
523
  />
524
524
  </v-col>
525
525
  </v-row>
@@ -539,7 +539,7 @@
539
539
  </v-col>
540
540
  <v-col cols="3" class="d-flex align-center justify-end">
541
541
  <v-switch
542
- v-model="facility.isMaxNumberGuestLimitEnabled"
542
+ v-model="isMaxNumberGuestLimitEnabled"
543
543
  class="d-flex align-center"
544
544
  color="primary"
545
545
  hide-details
@@ -557,7 +557,7 @@
557
557
  :min="1"
558
558
  :max="500"
559
559
  hide-details
560
- :disabled="!facility.isMaxNumberGuestLimitEnabled"
560
+ :disabled="!isMaxNumberGuestLimitEnabled"
561
561
  />
562
562
  </v-col>
563
563
  </v-row>
@@ -576,7 +576,7 @@
576
576
  </v-col>
577
577
  <v-col cols="3" class="d-flex align-center justify-end">
578
578
  <v-switch
579
- v-model="facility.isCancelAllowedLimitEnabled"
579
+ v-model="isCancelAllowedLimitEnabled"
580
580
  class="d-flex align-center"
581
581
  color="primary"
582
582
  hide-details
@@ -594,7 +594,7 @@
594
594
  :min="1"
595
595
  :max="500"
596
596
  hide-details
597
- :disabled="!facility.isCancelAllowedLimitEnabled"
597
+ :disabled="!isCancelAllowedLimitEnabled"
598
598
  />
599
599
  </v-col>
600
600
  </v-row>
@@ -1013,32 +1013,56 @@ const handlePolicy = (newContent: string) => {
1013
1013
  facility.value.bookingPolicy = newContent;
1014
1014
  };
1015
1015
 
1016
+ const isBookingUnitLimitEnabled = ref<boolean>(false);
1017
+ const isMaxNumberGuestLimitEnabled = ref<boolean>(false);
1018
+ const isCancelAllowedLimitEnabled = ref<boolean>(false);
1019
+
1020
+ watchEffect(() => {
1021
+ if (facility.value.bookingUnitLimit > 0) {
1022
+ isBookingUnitLimitEnabled.value = true;
1023
+ } else {
1024
+ isBookingUnitLimitEnabled.value = false;
1025
+ }
1026
+
1027
+ if (facility.value.maxNumberGuestLimit > 0) {
1028
+ isMaxNumberGuestLimitEnabled.value = true;
1029
+ } else {
1030
+ isMaxNumberGuestLimitEnabled.value = false;
1031
+ }
1032
+
1033
+ if (facility.value.daysAllowedCancel > 0) {
1034
+ isCancelAllowedLimitEnabled.value = true;
1035
+ } else {
1036
+ isCancelAllowedLimitEnabled.value = false;
1037
+ }
1038
+ });
1039
+
1016
1040
  function onToggleBookingUnitLimit(val: any) {
1017
1041
  if (val) {
1018
- facility.value.isBookingUnitLimitEnabled = true;
1042
+ isBookingUnitLimitEnabled.value = true;
1019
1043
  facility.value.bookingUnitLimit = 1;
1020
1044
  } else {
1021
- facility.value.isBookingUnitLimitEnabled = false;
1045
+ isBookingUnitLimitEnabled.value = false;
1022
1046
  facility.value.bookingUnitLimit = null;
1023
1047
  }
1024
1048
  }
1025
1049
 
1026
1050
  function onToggleMaxNumberGuestLimit(val: any) {
1027
1051
  if (val) {
1028
- facility.value.isMaxNumberGuestLimitEnabled = true;
1052
+ isMaxNumberGuestLimitEnabled.value = true;
1029
1053
  facility.value.maxNumberGuestLimit = 1;
1030
1054
  } else {
1031
- facility.value.isMaxNumberGuestLimitEnabled = false;
1055
+ isMaxNumberGuestLimitEnabled.value = false;
1032
1056
  facility.value.maxNumberGuestLimit = null;
1033
1057
  }
1034
1058
  }
1035
1059
 
1036
1060
  function onToggleCancelAllowedLimit(val: any) {
1037
1061
  if (val) {
1038
- facility.value.isCancelAllowedLimitEnabled = true;
1062
+ isCancelAllowedLimitEnabled.value = true;
1039
1063
  facility.value.daysAllowedCancel = 1;
1040
1064
  } else {
1041
- facility.value.isCancelAllowedLimitEnabled = false;
1065
+ isCancelAllowedLimitEnabled.value = false;
1042
1066
  facility.value.daysAllowedCancel = null;
1043
1067
  }
1044
1068
  }
@@ -110,7 +110,7 @@
110
110
  size="48"
111
111
  @click="cancel"
112
112
  >
113
- Cancel
113
+ {{ props.cancelText }}
114
114
  </v-btn>
115
115
  </v-col>
116
116
 
@@ -198,7 +198,11 @@ const props = defineProps({
198
198
  hideCreateMore: {
199
199
  type: Boolean,
200
200
  default: false
201
- }
201
+ },
202
+ cancelText: {
203
+ type: String,
204
+ default: 'Cancel'
205
+ }
202
206
  });
203
207
 
204
208
  const emit = defineEmits(["cancel", "success", "success:create-more"]);