@7365admin1/layer-common 4.174.0 → 4.175.0

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,17 @@
1
1
  # @iservice365/layer-common
2
2
 
3
+ ## 4.175.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 39aafe0: Sidebar: Cleaning, M&E, Pest Control, Pool, Garden and iRanger365 group under SERVICES (Property Management "Services at this site"). getFeedbacks accepts providerService.
8
+
9
+ ## 4.174.1
10
+
11
+ ### Patch Changes
12
+
13
+ - e39bffb: Vehicle Management > Add Season Pass: the Start Date and Expiry Date are always shown (no more "Show Subscription Options" toggle) and both are required when adding a season pass. Editing an older pass saved without dates still only needs one date with the other.
14
+
3
15
  ## 4.174.0
4
16
 
5
17
  ### Minor Changes
@@ -3915,11 +3927,11 @@ Monthly report: a month that had patrols opens the list of that month's patrol r
3915
3927
  `utils/console-tier.ts` + `composables/useConsoleTier.ts` mirror the server's
3916
3928
  own rule from two endpoints the console already calls, unprojected:
3917
3929
 
3918
- GET /api/members/user/:user/app/admin the Seven365 staff membership
3919
- GET /api/roles/id/:role that membership's role document
3930
+ GET /api/members/user/:user/app/admin the Seven365 staff membership
3931
+ GET /api/roles/id/:role that membership's role document
3920
3932
 
3921
- owner = member.type === "admin" && role.type === "admin" && role.default === true
3922
- staff = member.type === "admin" && role.type === "admin"
3933
+ owner = member.type === "admin" && role.type === "admin" && role.default === true
3934
+ staff = member.type === "admin" && role.type === "admin"
3923
3935
 
3924
3936
  `role.default` is the marker because it is the only property of a platform
3925
3937
  staff role no API caller can set - `role.controller.ts` validates create and
@@ -306,68 +306,40 @@
306
306
  />
307
307
  </v-col>
308
308
 
309
+ <!--
310
+ DV-1355: a season pass always shows its Start and Expiry dates. They
311
+ used to sit behind "Show Subscription Options", so a pass was often
312
+ saved with no dates at all. Both are required when adding; editing
313
+ an older pass saved without dates still only needs one with the other.
314
+ -->
309
315
  <v-col v-if="shouldShowField('start')" cols="12">
310
- <v-expand-transition v-if="showSubscriptionDateOptions">
311
- <v-row no-gutters>
312
- <!-- <v-row dense justify="space-between">
313
- <template v-for="option in subscriptionOptions" :key="option.value">
314
- <v-col cols="4">
315
- <v-btn :text="option.label" class="text-capitalize" min-width="120" :ripple="false"
316
- :class="[option.value === selectedSubscriptionDuration ? 'button-outline-class' : '']"
317
- @click="selectedSubscriptionDuration = option.value" />
318
- </v-col>
319
-
320
- </template>
321
- </v-row> -->
322
-
323
- <v-row no-gutters class="mt-5">
324
- <v-col cols="12">
325
- <InputLabel
326
- class="text-capitalize"
327
- title="Start Date"
328
- required
329
- />
330
- <InputDateTimePicker
331
- ref="startDateRef"
332
- v-model:utc="vehicle.start"
333
- :rules="[validStartDateRule]"
334
- />
335
- </v-col>
316
+ <v-row no-gutters>
317
+ <v-col cols="12">
318
+ <InputLabel
319
+ class="text-capitalize"
320
+ title="Start Date"
321
+ required
322
+ />
323
+ <InputDateTimePicker
324
+ ref="startDateRef"
325
+ v-model:utc="vehicle.start"
326
+ :rules="[validStartDateRule]"
327
+ />
328
+ </v-col>
336
329
 
337
- <v-col cols="12">
338
- <InputLabel
339
- class="text-capitalize"
340
- title="Expiry Date"
341
- required
342
- />
343
- <InputDateTimePicker
344
- ref="expiryDateRef"
345
- v-model:utc="vehicle.end"
346
- :rules="[validExpiryDateRule]"
347
- />
348
- </v-col>
349
- </v-row>
350
- </v-row>
351
- </v-expand-transition>
352
-
353
- <v-col cols="12" :class="[showSubscriptionDateOptions && 'mt-5']">
354
- <v-row justify="center">
355
- <v-col cols="6" class="d-flex justify-center">
356
- <AppButton
357
- variant="ghost"
358
- @click="
359
- showSubscriptionDateOptions = !showSubscriptionDateOptions
360
- "
361
- >
362
- {{
363
- showSubscriptionDateOptions
364
- ? "Hide Subscription Options"
365
- : "Show Subscription Options"
366
- }}
367
- </AppButton>
368
- </v-col>
369
- </v-row>
370
- </v-col>
330
+ <v-col cols="12">
331
+ <InputLabel
332
+ class="text-capitalize"
333
+ title="Expiry Date"
334
+ required
335
+ />
336
+ <InputDateTimePicker
337
+ ref="expiryDateRef"
338
+ v-model:utc="vehicle.end"
339
+ :rules="[validExpiryDateRule]"
340
+ />
341
+ </v-col>
342
+ </v-row>
371
343
  </v-col>
372
344
 
373
345
  <v-col cols="12">
@@ -894,7 +866,6 @@ const expiryDateRef = ref<HTMLInputElement | null>(null);
894
866
  const processing = ref(false);
895
867
  const message = ref("");
896
868
  const selectedSubscriptionDuration = ref<string | null>("custom");
897
- const showSubscriptionDateOptions = ref(false);
898
869
  const errorMessage = ref("");
899
870
 
900
871
  // fetch existing vehicle data if in edit mode
@@ -1073,14 +1044,12 @@ function removePlate(index: number) {
1073
1044
  function back() {
1074
1045
  emit("back");
1075
1046
  message.value = "";
1076
- showSubscriptionDateOptions.value = false;
1077
1047
  selectedSubscriptionDuration.value = null;
1078
1048
  }
1079
1049
 
1080
1050
  function close() {
1081
1051
  emit("close");
1082
1052
  message.value = "";
1083
- showSubscriptionDateOptions.value = false;
1084
1053
  selectedSubscriptionDuration.value = null;
1085
1054
  }
1086
1055
 
@@ -1404,9 +1373,15 @@ watch(selectedSubscriptionDuration, (duration) => {
1404
1373
  }
1405
1374
  });
1406
1375
 
1376
+ // DV-1355: both dates are required on a NEW season pass. On edit, an older
1377
+ // pass saved without dates can still be updated: there one needs the other.
1378
+ const datesRequired = computed(
1379
+ () => prop.type === "seasonpass" && prop.mode === "add"
1380
+ );
1381
+
1407
1382
  function validStartDateRule(value: string) {
1408
1383
  const expiryDateISO = vehicle.end;
1409
- if (!value && expiryDateISO) {
1384
+ if (!value && (expiryDateISO || datesRequired.value)) {
1410
1385
  return "Start Date is required";
1411
1386
  }
1412
1387
 
@@ -1417,7 +1392,7 @@ function validExpiryDateRule() {
1417
1392
  const startDateISO = vehicle.start;
1418
1393
  const endDateISO = vehicle.end;
1419
1394
 
1420
- if (!endDateISO && startDateISO) {
1395
+ if (!endDateISO && (startDateISO || datesRequired.value)) {
1421
1396
  return "Expiry Date is required";
1422
1397
  }
1423
1398
 
@@ -1558,10 +1533,6 @@ onMounted(() => {
1558
1533
  vehicle.plateNumber = prop.vehicleData.plateNumber;
1559
1534
  vehicle.peopleId = prop.vehicleData.peopleId || "";
1560
1535
  vehicle.block = prop.vehicleData.block || null;
1561
-
1562
- if (prop.type === "seasonpass") {
1563
- showSubscriptionDateOptions.value = true;
1564
- }
1565
1536
  }
1566
1537
  }, 300);
1567
1538
 
@@ -72,6 +72,7 @@ export default function useFeedback() {
72
72
  status = "",
73
73
  provider = "",
74
74
  service = "",
75
+ providerService = "",
75
76
  userId = "",
76
77
  category = "",
77
78
  }: {
@@ -85,6 +86,8 @@ export default function useFeedback() {
85
86
  status?: string;
86
87
  provider?: string | any;
87
88
  service?: string;
89
+ /** Optional: only this provider service's feedbacks (the stored `service` label, e.g. "Cleaning"). */
90
+ providerService?: string;
88
91
  userId?: string;
89
92
  /** Optional: one category (the feedback subject) or a comma list. Empty = all. */
90
93
  category?: string;
@@ -103,6 +106,7 @@ export default function useFeedback() {
103
106
  status,
104
107
  provider,
105
108
  service,
109
+ ...(providerService && { providerService }),
106
110
  ...(category && { category }),
107
111
  ...(currentUser.value?.type != "site" && {
108
112
  userId,
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@7365admin1/layer-common",
3
3
  "license": "MIT",
4
4
  "type": "module",
5
- "version": "4.174.0",
5
+ "version": "4.175.0",
6
6
  "author": "7365admin1",
7
7
  "main": "./nuxt.config.ts",
8
8
  "//files": "What a consumer extending this layer actually loads. Without this npm ships the whole working tree - the changesets, the CI workflows, the render harness in tools/ and any scratch directory that happened to exist at publish time. Nuxt resolves a layer by directory, so every runtime directory below has to stay listed; adding a new top-level runtime directory means adding it here too.",
@@ -117,6 +117,14 @@ export const NAV_SECTIONS: Record<string, string> = {
117
117
  "Pest Control Services": "SERVICES",
118
118
  "Landscaping Services": "SERVICES",
119
119
  "Pool Maintenance Services": "SERVICES",
120
+ // Property Management's "Services at this site" groups (owner, 12 Nov 2026):
121
+ // one per provider service at the site, in the client's own words.
122
+ Cleaning: "SERVICES",
123
+ "M&E": "SERVICES",
124
+ "Pest Control": "SERVICES",
125
+ Pool: "SERVICES",
126
+ Garden: "SERVICES",
127
+ iRanger365: "SERVICES",
120
128
  };
121
129
 
122
130
  export type TSectionedNavItem<T> = { item: T; section: string };