@7365admin1/layer-common 4.118.2 → 4.118.4
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.118.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- bbd74e4: Incident report PDF: no outer border around the Incident Information table; each field cell draws its own edges so a page break leaves clean, closed boxes.
|
|
8
|
+
|
|
9
|
+
## 4.118.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 90727b3: Incident report PDF: a field label stays with its value across a page break. Incident report dialog: shows "Reported by" (the report's organisation) when given `organizationId`.
|
|
14
|
+
|
|
3
15
|
## 4.118.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -3139,11 +3151,11 @@ Monthly report: a month that had patrols opens the list of that month's patrol r
|
|
|
3139
3151
|
`utils/console-tier.ts` + `composables/useConsoleTier.ts` mirror the server's
|
|
3140
3152
|
own rule from two endpoints the console already calls, unprojected:
|
|
3141
3153
|
|
|
3142
|
-
|
|
3143
|
-
|
|
3154
|
+
GET /api/members/user/:user/app/admin the Seven365 staff membership
|
|
3155
|
+
GET /api/roles/id/:role that membership's role document
|
|
3144
3156
|
|
|
3145
|
-
|
|
3146
|
-
|
|
3157
|
+
owner = member.type === "admin" && role.type === "admin" && role.default === true
|
|
3158
|
+
staff = member.type === "admin" && role.type === "admin"
|
|
3147
3159
|
|
|
3148
3160
|
`role.default` is the marker because it is the only property of a platform
|
|
3149
3161
|
staff role no API caller can set - `role.controller.ts` validates create and
|
|
@@ -31,6 +31,10 @@
|
|
|
31
31
|
{{ incidentInformation?.siteInfo?.designation || "NA" }}
|
|
32
32
|
</p>
|
|
33
33
|
</v-col>
|
|
34
|
+
<v-col v-if="companyName" cols="12" sm="6" md="3">
|
|
35
|
+
<InputLabel class="text-capitalize" title="Reported by" />
|
|
36
|
+
<p class="my-1 text-h6">{{ companyName }}</p>
|
|
37
|
+
</v-col>
|
|
34
38
|
</v-row>
|
|
35
39
|
</v-col>
|
|
36
40
|
|
|
@@ -256,8 +260,15 @@ const props = defineProps({
|
|
|
256
260
|
type: Object as PropType<Record<string, any> | null>,
|
|
257
261
|
required: true,
|
|
258
262
|
},
|
|
263
|
+
// The report's `organization` id: the company that filed it.
|
|
264
|
+
organizationId: {
|
|
265
|
+
type: String,
|
|
266
|
+
default: "",
|
|
267
|
+
},
|
|
259
268
|
});
|
|
260
269
|
|
|
270
|
+
const companyName = useIncidentCompany(() => props.organizationId);
|
|
271
|
+
|
|
261
272
|
const emit = defineEmits(["showNRICComplainant", "showNRICRecipient"]);
|
|
262
273
|
|
|
263
274
|
// utilities
|
|
@@ -183,21 +183,7 @@ const props = defineProps({
|
|
|
183
183
|
},
|
|
184
184
|
});
|
|
185
185
|
|
|
186
|
-
const
|
|
187
|
-
const companyName = ref("");
|
|
188
|
-
watch(
|
|
189
|
-
() => props.organizationId,
|
|
190
|
-
async (id) => {
|
|
191
|
-
companyName.value = "";
|
|
192
|
-
if (!id) return;
|
|
193
|
-
try {
|
|
194
|
-
companyName.value = incidentCompanyName(await getOrgById(id));
|
|
195
|
-
} catch {
|
|
196
|
-
// Not readable by this viewer: print nothing rather than a wrong name.
|
|
197
|
-
}
|
|
198
|
-
},
|
|
199
|
-
{ immediate: true }
|
|
200
|
-
);
|
|
186
|
+
const companyName = useIncidentCompany(() => props.organizationId);
|
|
201
187
|
|
|
202
188
|
const statusKey = computed(() => String(props.status || "").toLowerCase());
|
|
203
189
|
|
|
@@ -284,28 +270,24 @@ const maskNRIC = (value: any) => {
|
|
|
284
270
|
}
|
|
285
271
|
.ir-status--approved { color: #2e7d32; }
|
|
286
272
|
.ir-status--rejected { color: #c62828; }
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
}
|
|
273
|
+
/* No outer wrapper border: every field cell draws its own left/bottom edge (and
|
|
274
|
+
right edge when it ends a row), so a page break leaves each box closed. */
|
|
290
275
|
.ir-cell {
|
|
276
|
+
border-left: 1px solid #8a8a8a;
|
|
291
277
|
border-bottom: 1px solid #8a8a8a;
|
|
292
278
|
break-inside: avoid;
|
|
293
279
|
page-break-inside: avoid;
|
|
294
280
|
}
|
|
295
|
-
.ir-e {
|
|
281
|
+
.ir-cell:not(.ir-e) {
|
|
296
282
|
border-right: 1px solid #8a8a8a;
|
|
297
283
|
}
|
|
298
|
-
.
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
break-inside: auto;
|
|
303
|
-
page-break-inside: auto;
|
|
304
|
-
orphans: 3;
|
|
305
|
-
widows: 3;
|
|
284
|
+
/* A label always travels with its value. */
|
|
285
|
+
.ir-cell p:first-child {
|
|
286
|
+
break-after: avoid;
|
|
287
|
+
page-break-after: avoid;
|
|
306
288
|
}
|
|
307
289
|
.ir-section {
|
|
308
290
|
break-after: avoid;
|
|
309
|
-
border
|
|
291
|
+
border: 1px solid #8a8a8a;
|
|
310
292
|
}
|
|
311
293
|
</style>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// "Reported by" company for an incident report: the report's `organization`
|
|
2
|
+
// id looked up through the existing org endpoint. Blank when unreadable.
|
|
3
|
+
export function useIncidentCompany(getId: () => string | undefined) {
|
|
4
|
+
const { getById: getOrgById } = useOrg();
|
|
5
|
+
const companyName = ref("");
|
|
6
|
+
watch(
|
|
7
|
+
getId,
|
|
8
|
+
async (id) => {
|
|
9
|
+
companyName.value = "";
|
|
10
|
+
if (!id) return;
|
|
11
|
+
try {
|
|
12
|
+
companyName.value = incidentCompanyName(await getOrgById(id));
|
|
13
|
+
} catch {
|
|
14
|
+
// Not readable by this viewer: show nothing rather than a wrong name.
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
{ immediate: true }
|
|
18
|
+
);
|
|
19
|
+
return companyName;
|
|
20
|
+
}
|
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.118.
|
|
5
|
+
"version": "4.118.4",
|
|
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.",
|