@7365admin1/layer-common 4.173.0 → 4.174.1

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.174.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 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.
8
+
9
+ ## 4.174.0
10
+
11
+ ### Minor Changes
12
+
13
+ - b616873: Property Management role editor: Marketplace at this site (marketplace-mgmt:view-site-vendors), the read-only vendor view and complaint route of decision #226.
14
+
3
15
  ## 4.173.0
4
16
 
5
17
  ### Minor Changes
@@ -3909,11 +3921,11 @@ Monthly report: a month that had patrols opens the list of that month's patrol r
3909
3921
  `utils/console-tier.ts` + `composables/useConsoleTier.ts` mirror the server's
3910
3922
  own rule from two endpoints the console already calls, unprojected:
3911
3923
 
3912
- GET /api/members/user/:user/app/admin the Seven365 staff membership
3913
- GET /api/roles/id/:role that membership's role document
3924
+ GET /api/members/user/:user/app/admin the Seven365 staff membership
3925
+ GET /api/roles/id/:role that membership's role document
3914
3926
 
3915
- owner = member.type === "admin" && role.type === "admin" && role.default === true
3916
- staff = member.type === "admin" && role.type === "admin"
3927
+ owner = member.type === "admin" && role.type === "admin" && role.default === true
3928
+ staff = member.type === "admin" && role.type === "admin"
3917
3929
 
3918
3930
  `role.default` is the marker because it is the only property of a platform
3919
3931
  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
 
@@ -317,6 +317,16 @@ export default function usePropertyPermission() {
317
317
  "Allows the user to view the list of all service providers.",
318
318
  },
319
319
  },
320
+ // Marketplace at this site (decision #226): read-only, plus raising a
321
+ // complaint to Seven365. Mirrored from API-core
322
+ // `src/utils/marketplace-pm-authz.util.ts`. No approve / suspend right.
323
+ "marketplace-mgmt": {
324
+ "view-site-vendors": {
325
+ check: true,
326
+ description:
327
+ "Allows the user to see the marketplace vendors at the site (their live listings and order counts, no resident details) and raise a complaint about a vendor to Seven365.",
328
+ },
329
+ },
320
330
  "online-form-configuration": {
321
331
  "add-online-form-configuration": {
322
332
  check: true,
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.173.0",
5
+ "version": "4.174.1",
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.",