@7365admin1/layer-common 4.35.1-staging.420 → 4.35.1-staging.421
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.
|
@@ -133,7 +133,7 @@
|
|
|
133
133
|
|
|
134
134
|
<script setup lang="ts">
|
|
135
135
|
import useInventory, { saveBlob } from "../composables/useInventory";
|
|
136
|
-
import useWorkerTerm from "../composables/useWorkerTerm";
|
|
136
|
+
import useWorkerTerm, { workerAppKey } from "../composables/useWorkerTerm";
|
|
137
137
|
import useUtils from "../composables/useUtils";
|
|
138
138
|
import useFile from "../composables/useFile";
|
|
139
139
|
|
|
@@ -152,7 +152,7 @@ const usagePhotos = (row: any) => [
|
|
|
152
152
|
const notify = inject<(text: string, color?: string) => void>("inventoryNotify", () => {});
|
|
153
153
|
|
|
154
154
|
const worker = useWorkerTerm({ providers: true });
|
|
155
|
-
const appSlug =
|
|
155
|
+
const appSlug = workerAppKey();
|
|
156
156
|
|
|
157
157
|
const now = new Date();
|
|
158
158
|
const month = ref(`${now.getFullYear()}-${String(now.getMonth() + 1).padStart(2, "0")}`);
|
|
@@ -3,8 +3,15 @@ import { workerTerm } from "../utils/worker-terms";
|
|
|
3
3
|
/**
|
|
4
4
|
* The worker noun for the app this page runs in ("Cleaner" in Hygiene,
|
|
5
5
|
* "Security officer" in Security, ...). See utils/worker-terms.ts.
|
|
6
|
-
*
|
|
6
|
+
* Keyed by `runtimeConfig.public.appSlug`, else the deployment's `APP` code
|
|
7
|
+
* ("cleaning_services", "security_agency", ...) - hygiene, M&E, pest, pool and
|
|
8
|
+
* landscape set only `APP`. Neither = the neutral "Staff".
|
|
7
9
|
*/
|
|
10
|
+
export function workerAppKey(): string | undefined {
|
|
11
|
+
const pub = useRuntimeConfig().public ?? {};
|
|
12
|
+
return (pub.appSlug || pub.APP || undefined) as string | undefined;
|
|
13
|
+
}
|
|
14
|
+
|
|
8
15
|
export default function useWorkerTerm(opts?: { providers?: boolean }) {
|
|
9
|
-
return workerTerm(
|
|
16
|
+
return workerTerm(workerAppKey(), opts);
|
|
10
17
|
}
|
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.35.1-staging.
|
|
5
|
+
"version": "4.35.1-staging.421",
|
|
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.",
|
package/utils/worker-terms.ts
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* A cleaning company's workers are cleaners, not technicians. Every screen,
|
|
5
5
|
* export and mobile app takes the noun from here, keyed by the app it runs in
|
|
6
6
|
* (`appSlug`, e.g. "iservice365-web-app-hygiene" or
|
|
7
|
-
* "iservice365-hygiene-mobile-app"); a service-type code
|
|
8
|
-
* "security_agency", ...) resolves the same way. Only the words change -
|
|
7
|
+
* "iservice365-hygiene-mobile-app"); a service-type or deployment `APP` code
|
|
8
|
+
* ("cleaning_services", "security_agency", ...) resolves the same way. Only the words change -
|
|
9
9
|
* field names and API keys (`technician`, `usedByTechnicians`,
|
|
10
10
|
* `/reports/technicians`) stay as they are.
|
|
11
11
|
*
|