@7365admin1/layer-common 4.97.1-staging.663 → 4.97.1-staging.664

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.
@@ -34,6 +34,20 @@
34
34
  <AppField :model-value="orderNumberPreview" label="Preview" readonly />
35
35
  </div>
36
36
 
37
+ <!-- Service365 (resident) app, per site and service (DV-1002). Inventory stores keep
38
+ their own switches for materials recorded straight to a unit. -->
39
+ <v-divider class="my-4" />
40
+ <div class="text-subtitle-1 mb-1">Service365 app</div>
41
+ <p class="text-body-2 text-medium-emphasis mb-2">
42
+ Let residents and tenants see the materials used in their own unit (item, quantity, date and work order).
43
+ </p>
44
+ <v-switch v-model="showMaterialsInResidentApp" color="primary" hide-details
45
+ :disabled="isLoading || !canManageSiteSettings"
46
+ label="Show materials used in the Service365 app" />
47
+ <v-switch v-model="showMaterialCostInResidentApp" color="primary" hide-details
48
+ :disabled="isLoading || !canManageSiteSettings || !showMaterialsInResidentApp"
49
+ label="Also show the cost" />
50
+
37
51
  <!-- Still a `v-btn`: `AppButton` has no loading state, and the
38
52
  spinner on save is feedback, not decoration. -->
39
53
  <v-btn v-if="canManageSiteSettings" class="screen-btn-primary text-none mt-4"
@@ -90,6 +104,9 @@ const uploadedSiteLogo = ref("")
90
104
 
91
105
  const prefix = ref("")
92
106
  const noOfDigits = ref(1)
107
+ /** Service365 (resident) app switches; missing on a saved setting = off. */
108
+ const showMaterialsInResidentApp = ref(false)
109
+ const showMaterialCostInResidentApp = ref(false)
93
110
  const isLoading = ref(false)
94
111
 
95
112
  const toast = reactive({
@@ -163,6 +180,8 @@ watchEffect(() => {
163
180
  if (workOrderSetting.value) {
164
181
  prefix.value = workOrderSetting.value.prefix
165
182
  noOfDigits.value = workOrderSetting.value.noOfDigits
183
+ showMaterialsInResidentApp.value = !!workOrderSetting.value.showMaterialsInResidentApp
184
+ showMaterialCostInResidentApp.value = !!workOrderSetting.value.showMaterialCostInResidentApp
166
185
  }
167
186
  })
168
187
 
@@ -187,7 +206,10 @@ async function save() {
187
206
  site: props.siteId,
188
207
  service: props.service,
189
208
  prefix: prefix.value,
190
- noOfDigits: noOfDigits.value
209
+ noOfDigits: noOfDigits.value,
210
+ showMaterialsInResidentApp: showMaterialsInResidentApp.value,
211
+ // Cost only shows with the materials.
212
+ showMaterialCostInResidentApp: showMaterialsInResidentApp.value && showMaterialCostInResidentApp.value
191
213
  })
192
214
  show("Saved successfully", "success")
193
215
  } catch {
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.97.1-staging.663",
5
+ "version": "4.97.1-staging.664",
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.",