@7365admin1/layer-common 4.97.1-staging.539 → 4.97.1-staging.541
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 +4 -4
- package/components/AccessCardDetailsDialog.vue +3 -2
- package/components/BuildingUnitFormEdit.vue +3 -1
- package/components/DocumentManagement.vue +6 -0
- package/components/IncidentReport/Attachments.vue +116 -0
- package/components/IncidentReport/IncidentInformation.vue +11 -0
- package/components/IncidentReport/IncidentInformationDownload.vue +279 -152
- package/components/MemberInformation.vue +2 -2
- package/components/Robot/Detail.vue +10 -7
- package/components/Robot/SiteScreen.vue +6 -5
- package/components/SearchVehicleNumberUser.vue +3 -0
- package/components/VehicleForm.vue +2 -2
- package/components/VisitorForm.vue +3 -3
- package/components/VisitorSearchResultSummary.vue +2 -1
- package/composables/useIncidentCompany.ts +20 -0
- package/package.json +1 -1
- package/utils/incident-company.ts +7 -0
package/CHANGELOG.md
CHANGED
|
@@ -2082,11 +2082,11 @@
|
|
|
2082
2082
|
`utils/console-tier.ts` + `composables/useConsoleTier.ts` mirror the server's
|
|
2083
2083
|
own rule from two endpoints the console already calls, unprojected:
|
|
2084
2084
|
|
|
2085
|
-
|
|
2086
|
-
|
|
2085
|
+
GET /api/members/user/:user/app/admin the Seven365 staff membership
|
|
2086
|
+
GET /api/roles/id/:role that membership's role document
|
|
2087
2087
|
|
|
2088
|
-
|
|
2089
|
-
|
|
2088
|
+
owner = member.type === "admin" && role.type === "admin" && role.default === true
|
|
2089
|
+
staff = member.type === "admin" && role.type === "admin"
|
|
2090
2090
|
|
|
2091
2091
|
`role.default` is the marker because it is the only property of a platform
|
|
2092
2092
|
staff role no API caller can set - `role.controller.ts` validates create and
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
|
|
80
80
|
<div v-if="details.userCred.nric">
|
|
81
81
|
<div class="card-details__label">NRIC</div>
|
|
82
|
-
<div class="card-details__value">{{ details.userCred.nric }}</div>
|
|
82
|
+
<div class="card-details__value">{{ maskNRIC(details.userCred.nric) }}</div>
|
|
83
83
|
</div>
|
|
84
84
|
|
|
85
85
|
<div v-if="details.userCred.contact">
|
|
@@ -162,7 +162,7 @@
|
|
|
162
162
|
<template v-if="entry.type === 'assigned' || entry.visitorId">
|
|
163
163
|
<div class="card-details__value">{{ entry.name ?? "N/A" }}</div>
|
|
164
164
|
<div class="card-details__sub">
|
|
165
|
-
<span v-if="entry.nric">NRIC: {{ entry.nric }}</span>
|
|
165
|
+
<span v-if="entry.nric">NRIC: {{ maskNRIC(entry.nric) }}</span>
|
|
166
166
|
<span v-if="entry.contact" class="ml-2">· {{ entry.contact }}</span>
|
|
167
167
|
<span v-if="entry.email && !entry.nric && !entry.contact">{{ entry.email }}</span>
|
|
168
168
|
</div>
|
|
@@ -193,6 +193,7 @@
|
|
|
193
193
|
</template>
|
|
194
194
|
|
|
195
195
|
<script setup lang="ts">
|
|
196
|
+
const { maskNRIC } = useUtils();
|
|
196
197
|
const props = defineProps({
|
|
197
198
|
modelValue: {
|
|
198
199
|
type: Boolean,
|
|
@@ -163,6 +163,8 @@
|
|
|
163
163
|
<TableMain :headers="vehicleHeaders" :show-header="true" :page="vehiclePage" :pages="vehicleTotalPages"
|
|
164
164
|
:pageRange="vehiclePageRange" :items="unitVehicleItems" @refresh="getUnitVehiclesRefresh" @update:page="handleUpdateVehiclePage">
|
|
165
165
|
|
|
166
|
+
<template #item.nric="{ value }">{{ maskNRIC(value) || "-" }}</template>
|
|
167
|
+
|
|
166
168
|
<template #item.status="{value}">
|
|
167
169
|
<v-chip :color="formatVehicleStatus(value).color" class="ma-0" small>
|
|
168
170
|
{{ formatVehicleStatus(value).label }}
|
|
@@ -404,7 +406,7 @@ const validForm = ref(false);
|
|
|
404
406
|
|
|
405
407
|
const { getAll } = useBuilding();
|
|
406
408
|
const { getPeopleByUnit, updateById: updatePeopleById } = usePeople();
|
|
407
|
-
const { debounce } = useUtils();
|
|
409
|
+
const { debounce, maskNRIC } = useUtils();
|
|
408
410
|
const { searchMultipleVehiclesByUnitId, formatVehicleStatus } = useVehicle();
|
|
409
411
|
|
|
410
412
|
const loading = reactive({
|
|
@@ -873,6 +873,12 @@ watch(activeTab, () => {
|
|
|
873
873
|
page.value = 1;
|
|
874
874
|
});
|
|
875
875
|
|
|
876
|
+
// Same for a search: typed on page 21 of the full list, it would ask for page
|
|
877
|
+
// 21 of the matches and show an empty table, as if nothing matched.
|
|
878
|
+
watch(headerSearch, () => {
|
|
879
|
+
page.value = 1;
|
|
880
|
+
});
|
|
881
|
+
|
|
876
882
|
const loading = computed(() => getAllReqStatus.value === "pending");
|
|
877
883
|
|
|
878
884
|
// The page totals are the server's count of the WHOLE list, read through the
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="ir-att">
|
|
3
|
+
<p class="ir-att-title">Attachments</p>
|
|
4
|
+
<div v-if="items.length" class="ir-att-grid">
|
|
5
|
+
<div v-for="item in items" :key="item.id" class="ir-att-card">
|
|
6
|
+
<div class="ir-att-frame">
|
|
7
|
+
<img v-if="item.isImage" :src="item.url" :alt="item.name" />
|
|
8
|
+
<div v-else class="ir-att-icon">
|
|
9
|
+
<v-icon size="48">{{ item.icon }}</v-icon>
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
<p class="ir-att-name">{{ item.name }}</p>
|
|
13
|
+
<a class="ir-att-link" :href="item.url" target="_blank" rel="noopener">Download</a>
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
16
|
+
<p v-else class="mt-2 text-h6">No Attachments Available</p>
|
|
17
|
+
</div>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<script lang="ts" setup>
|
|
21
|
+
// Print/PDF attachments: 2 per row in fixed frames so tall phone screenshots and
|
|
22
|
+
// wide photos line up. The Download link is a plain <a href>, which the PDF
|
|
23
|
+
// renderer keeps as a live link. Files live in the public file store, so the
|
|
24
|
+
// link works for anyone holding the PDF.
|
|
25
|
+
const props = defineProps({
|
|
26
|
+
photos: {
|
|
27
|
+
type: Array as PropType<string[]>,
|
|
28
|
+
default: () => [],
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
const { getFileUrl, getFileById } = useFile();
|
|
33
|
+
|
|
34
|
+
const IMAGE = /\.(jpe?g|png|gif|webp|bmp|heic|svg)$/i;
|
|
35
|
+
const VIDEO = /\.(mp4|mov|avi|mkv|webm|3gp)$/i;
|
|
36
|
+
|
|
37
|
+
type Item = { id: string; name: string; url: string; isImage: boolean; icon: string };
|
|
38
|
+
const items = ref<Item[]>([]);
|
|
39
|
+
|
|
40
|
+
watch(
|
|
41
|
+
() => props.photos,
|
|
42
|
+
async (ids) => {
|
|
43
|
+
items.value = await Promise.all(
|
|
44
|
+
(ids ?? []).map(async (id) => {
|
|
45
|
+
let name = "";
|
|
46
|
+
try {
|
|
47
|
+
const res: any = await getFileById(id);
|
|
48
|
+
name = res?.data?.name ?? res?.name ?? "";
|
|
49
|
+
} catch {
|
|
50
|
+
// keep the link even if the name lookup fails
|
|
51
|
+
}
|
|
52
|
+
// No name known: treat as an image (that is what reports carry).
|
|
53
|
+
const isImage = !name || IMAGE.test(name);
|
|
54
|
+
return {
|
|
55
|
+
id,
|
|
56
|
+
name: name || "Attachment",
|
|
57
|
+
url: getFileUrl(id),
|
|
58
|
+
isImage,
|
|
59
|
+
icon: VIDEO.test(name) ? "mdi-file-video-outline" : "mdi-file-document-outline",
|
|
60
|
+
};
|
|
61
|
+
})
|
|
62
|
+
);
|
|
63
|
+
},
|
|
64
|
+
{ immediate: true }
|
|
65
|
+
);
|
|
66
|
+
</script>
|
|
67
|
+
|
|
68
|
+
<style scoped>
|
|
69
|
+
.ir-att-title {
|
|
70
|
+
font-size: 17px;
|
|
71
|
+
font-weight: 600;
|
|
72
|
+
margin: 0 0 12px;
|
|
73
|
+
break-after: avoid;
|
|
74
|
+
page-break-after: avoid;
|
|
75
|
+
}
|
|
76
|
+
.ir-att-grid {
|
|
77
|
+
display: grid;
|
|
78
|
+
grid-template-columns: 1fr 1fr;
|
|
79
|
+
gap: 16px;
|
|
80
|
+
/* Keep every tile border fully inside the printable area: a border drawn on
|
|
81
|
+
the very edge of the page content is half cut off. */
|
|
82
|
+
padding: 0 2px 2px;
|
|
83
|
+
}
|
|
84
|
+
.ir-att-card {
|
|
85
|
+
box-sizing: border-box;
|
|
86
|
+
break-inside: avoid;
|
|
87
|
+
page-break-inside: avoid;
|
|
88
|
+
border: 1px solid #8a8a8a;
|
|
89
|
+
padding: 8px;
|
|
90
|
+
min-width: 0;
|
|
91
|
+
}
|
|
92
|
+
.ir-att-frame {
|
|
93
|
+
height: 260px;
|
|
94
|
+
display: flex;
|
|
95
|
+
align-items: center;
|
|
96
|
+
justify-content: center;
|
|
97
|
+
background: #f5f5f5;
|
|
98
|
+
overflow: hidden;
|
|
99
|
+
}
|
|
100
|
+
.ir-att-frame img {
|
|
101
|
+
width: 100%;
|
|
102
|
+
height: 100%;
|
|
103
|
+
object-fit: contain;
|
|
104
|
+
}
|
|
105
|
+
.ir-att-name {
|
|
106
|
+
margin: 6px 0 2px;
|
|
107
|
+
font-size: 12px;
|
|
108
|
+
overflow-wrap: anywhere;
|
|
109
|
+
}
|
|
110
|
+
.ir-att-link {
|
|
111
|
+
font-size: 12px;
|
|
112
|
+
font-weight: 600;
|
|
113
|
+
color: #1565c0;
|
|
114
|
+
text-decoration: underline;
|
|
115
|
+
}
|
|
116
|
+
</style>
|
|
@@ -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
|
|
@@ -1,157 +1,198 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<!--
|
|
4
|
-
<
|
|
5
|
-
class="text-uppercase text-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
Incident Report
|
|
9
|
-
</p>
|
|
10
|
-
<v-row no-gutters class="mt-5 border pb-5">
|
|
11
|
-
<p
|
|
12
|
-
class="w-100 text-h6 pa-2 text-center bg-warning text-on-warning"
|
|
13
|
-
>
|
|
14
|
-
Incident Information
|
|
2
|
+
<div class="ir-doc px-5 pt-4">
|
|
3
|
+
<!-- Report header: title with the status inside it, so the two never float apart. -->
|
|
4
|
+
<div class="ir-title bg-error text-on-error">
|
|
5
|
+
<p class="text-uppercase text-h6 ma-0">Incident Report</p>
|
|
6
|
+
<p v-if="status" class="ir-status ma-0 mt-2" :class="`ir-status--${statusKey}`">
|
|
7
|
+
Status: {{ String(status).toUpperCase() }}
|
|
15
8
|
</p>
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
<
|
|
22
|
-
<
|
|
23
|
-
<
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
<
|
|
28
|
-
<
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
<
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
<
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
<
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
<
|
|
58
|
-
<
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
<
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
<
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
<
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
<
|
|
120
|
-
|
|
121
|
-
{{
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
}}
|
|
126
|
-
</
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
9
|
+
<p v-if="companyName" class="ma-0 mt-2 ir-company">
|
|
10
|
+
Reported by: {{ companyName }}
|
|
11
|
+
</p>
|
|
12
|
+
</div>
|
|
13
|
+
<table class="ir-table mt-5">
|
|
14
|
+
<colgroup>
|
|
15
|
+
<col style="width: 8.3333%" />
|
|
16
|
+
<col style="width: 8.3333%" />
|
|
17
|
+
<col style="width: 8.3333%" />
|
|
18
|
+
<col style="width: 8.3333%" />
|
|
19
|
+
<col style="width: 8.3333%" />
|
|
20
|
+
<col style="width: 8.3333%" />
|
|
21
|
+
<col style="width: 8.3333%" />
|
|
22
|
+
<col style="width: 8.3333%" />
|
|
23
|
+
<col style="width: 8.3333%" />
|
|
24
|
+
<col style="width: 8.3333%" />
|
|
25
|
+
<col style="width: 8.3333%" />
|
|
26
|
+
<col style="width: 8.3333%" />
|
|
27
|
+
</colgroup>
|
|
28
|
+
<thead>
|
|
29
|
+
<tr>
|
|
30
|
+
<th colspan="12" class="ir-section text-h6 pa-2 text-center bg-warning text-on-warning">Incident Information</th>
|
|
31
|
+
</tr>
|
|
32
|
+
</thead>
|
|
33
|
+
<tbody>
|
|
34
|
+
<tr>
|
|
35
|
+
<td colspan="6" class="pa-3 ir-cell">
|
|
36
|
+
<p class="font-weight-bold">Site</p>
|
|
37
|
+
<p>{{ siteName || "-" }}</p>
|
|
38
|
+
</td>
|
|
39
|
+
<td colspan="6" class="pa-3 ir-cell">
|
|
40
|
+
<p class="font-weight-bold">Reference</p>
|
|
41
|
+
<p>{{ incidentInformation?.siteInfo?.irNumber || "-" }}</p>
|
|
42
|
+
</td>
|
|
43
|
+
</tr>
|
|
44
|
+
<tr v-if="companyName">
|
|
45
|
+
<td colspan="12" class="pa-3 ir-cell">
|
|
46
|
+
<p class="font-weight-bold">Reported by (Company)</p>
|
|
47
|
+
<p>{{ companyName }}</p>
|
|
48
|
+
</td>
|
|
49
|
+
</tr>
|
|
50
|
+
<tr>
|
|
51
|
+
<td colspan="6" class="pa-3 ir-cell">
|
|
52
|
+
<p class="font-weight-bold">Place of Incident</p>
|
|
53
|
+
<p>
|
|
54
|
+
{{ incidentInformation?.placeOfIncident?.incidentLocation || "-" }}
|
|
55
|
+
</p>
|
|
56
|
+
</td>
|
|
57
|
+
<td colspan="6" class="pa-3 ir-cell">
|
|
58
|
+
<p class="font-weight-bold">Type of Incident</p>
|
|
59
|
+
<p>
|
|
60
|
+
{{ incidentInformation?.incidentTypeAndTime?.typeOfIncident || "-" }}
|
|
61
|
+
</p>
|
|
62
|
+
</td>
|
|
63
|
+
</tr>
|
|
64
|
+
<tr>
|
|
65
|
+
<td colspan="6" class="pa-3 ir-cell">
|
|
66
|
+
<p class="font-weight-bold">Date of Incident</p>
|
|
67
|
+
<p>
|
|
68
|
+
{{
|
|
69
|
+
toLocalDate(
|
|
70
|
+
incidentInformation?.incidentTypeAndTime?.dateOfIncident
|
|
71
|
+
) || "NA"
|
|
72
|
+
}}
|
|
73
|
+
</p>
|
|
74
|
+
</td>
|
|
75
|
+
<td colspan="6" class="pa-3 ir-cell">
|
|
76
|
+
<p class="font-weight-bold">Incident Start Time</p>
|
|
77
|
+
<p>
|
|
78
|
+
{{ incidentInformation?.incidentTypeAndTime?.incidentStart || "-" }}
|
|
79
|
+
</p>
|
|
80
|
+
</td>
|
|
81
|
+
</tr>
|
|
82
|
+
<tr>
|
|
83
|
+
<td colspan="6" class="pa-3 ir-cell">
|
|
84
|
+
<p class="font-weight-bold">Time of Response (From 1st Contact)</p>
|
|
85
|
+
<p>
|
|
86
|
+
{{ incidentInformation?.incidentTypeAndTime?.timeOfResponse || "-" }}
|
|
87
|
+
</p>
|
|
88
|
+
</td>
|
|
89
|
+
<td colspan="6" class="pa-3 ir-cell">
|
|
90
|
+
<p class="font-weight-bold">Incident End Time</p>
|
|
91
|
+
<p>
|
|
92
|
+
{{ incidentInformation?.incidentTypeAndTime?.incidentEnd || "-" }}
|
|
93
|
+
</p>
|
|
94
|
+
</td>
|
|
95
|
+
</tr>
|
|
96
|
+
<tr>
|
|
97
|
+
<td colspan="6" class="pa-3 ir-cell">
|
|
98
|
+
<p class="font-weight-bold">Date of Report Submission</p>
|
|
99
|
+
<p>
|
|
100
|
+
{{
|
|
101
|
+
toLocalDate(incidentInformation?.submissionForm?.dateOfReport) ||
|
|
102
|
+
"NA"
|
|
103
|
+
}}
|
|
104
|
+
</p>
|
|
105
|
+
</td>
|
|
106
|
+
<td colspan="6" class="pa-3 ir-cell">
|
|
107
|
+
<p class="font-weight-bold">Time of Report Submission</p>
|
|
108
|
+
<p>{{ incidentInformation?.submissionForm?.time || "-" }}</p>
|
|
109
|
+
</td>
|
|
110
|
+
</tr>
|
|
111
|
+
<tr>
|
|
112
|
+
<td colspan="6" class="pa-3 ir-cell">
|
|
113
|
+
<p class="font-weight-bold">Report Submitted By</p>
|
|
114
|
+
<p>{{ incidentInformation?.siteInfo?.submittedBy || "-" }}</p>
|
|
115
|
+
</td>
|
|
116
|
+
<td colspan="6" class="pa-3 ir-cell">
|
|
117
|
+
<p class="font-weight-bold">Designation</p>
|
|
118
|
+
<p>{{ incidentInformation?.siteInfo?.designation || "-" }}</p>
|
|
119
|
+
</td>
|
|
120
|
+
</tr>
|
|
121
|
+
<tr>
|
|
122
|
+
<td colspan="4" class="pa-3 ir-cell">
|
|
123
|
+
<p class="font-weight-bold">Name of Informant/Complainant</p>
|
|
124
|
+
<p>{{ incidentInformation?.complaintInfo?.complainant || "-" }}</p>
|
|
125
|
+
</td>
|
|
126
|
+
<td colspan="4" class="pa-3 ir-cell">
|
|
127
|
+
<p class="font-weight-bold">Contact No.</p>
|
|
128
|
+
<p>{{ incidentInformation?.complaintInfo?.contact || "-" }}</p>
|
|
129
|
+
</td>
|
|
130
|
+
<td colspan="4" class="pa-3 ir-cell">
|
|
131
|
+
<p class="font-weight-bold">NRIC/WP No.</p>
|
|
132
|
+
<p>
|
|
133
|
+
{{
|
|
134
|
+
showNRICComplainant
|
|
135
|
+
? incidentInformation?.complaintInfo?.nric || "-"
|
|
136
|
+
: maskNRIC(incidentInformation?.complaintInfo?.nric)
|
|
137
|
+
}}
|
|
138
|
+
</p>
|
|
139
|
+
</td>
|
|
140
|
+
</tr>
|
|
141
|
+
<tr>
|
|
142
|
+
<td colspan="4" class="pa-3 ir-cell">
|
|
143
|
+
<p class="font-weight-bold">
|
|
144
|
+
Name of Recipient of Complaint (1st Contact)
|
|
145
|
+
</p>
|
|
146
|
+
<p>{{ incidentInformation?.recipientOfComplaint?.recipient || "-" }}</p>
|
|
147
|
+
</td>
|
|
148
|
+
<td colspan="4" class="pa-3 ir-cell">
|
|
149
|
+
<p class="font-weight-bold">Contact No.</p>
|
|
150
|
+
<p>{{ incidentInformation?.recipientOfComplaint?.contact || "-" }}</p>
|
|
151
|
+
</td>
|
|
152
|
+
<td colspan="4" class="pa-3 ir-cell">
|
|
153
|
+
<p class="font-weight-bold">NRIC/WP No.</p>
|
|
154
|
+
<p>
|
|
155
|
+
{{
|
|
156
|
+
showNRICRecipient
|
|
157
|
+
? incidentInformation?.recipientOfComplaint?.nric || "-"
|
|
158
|
+
: maskNRIC(incidentInformation?.recipientOfComplaint?.nric)
|
|
159
|
+
}}
|
|
160
|
+
</p>
|
|
161
|
+
</td>
|
|
162
|
+
</tr>
|
|
163
|
+
<tr v-if="
|
|
133
164
|
incidentInformation?.complaintReceivedTo?.receivedVia != 'others'
|
|
134
|
-
"
|
|
135
|
-
>
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
</
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
165
|
+
">
|
|
166
|
+
<td colspan="12" class="pa-3 ir-cell">
|
|
167
|
+
<p class="font-weight-bold">Complaint Received through</p>
|
|
168
|
+
<p
|
|
169
|
+
v-if="
|
|
170
|
+
incidentInformation?.complaintReceivedTo?.receivedVia != 'others'
|
|
171
|
+
"
|
|
172
|
+
>
|
|
173
|
+
{{ incidentInformation?.complaintReceivedTo?.receivedVia || "-" }}
|
|
174
|
+
</p>
|
|
175
|
+
|
|
176
|
+
<p v-else>
|
|
177
|
+
{{
|
|
178
|
+
incidentInformation?.complaintReceivedTo?.otherDescription || "-"
|
|
179
|
+
}}
|
|
180
|
+
</p>
|
|
181
|
+
</td>
|
|
182
|
+
</tr>
|
|
183
|
+
<tr>
|
|
184
|
+
<td colspan="12" class="pa-3 ir-cell">
|
|
185
|
+
<p class="font-weight-bold">Brief Description</p>
|
|
186
|
+
<p>
|
|
187
|
+
{{
|
|
188
|
+
incidentInformation?.complaintReceivedTo?.briefDescription || "-"
|
|
189
|
+
}}
|
|
190
|
+
</p>
|
|
191
|
+
</td>
|
|
192
|
+
</tr>
|
|
193
|
+
</tbody>
|
|
194
|
+
</table>
|
|
195
|
+
</div>
|
|
155
196
|
</template>
|
|
156
197
|
|
|
157
198
|
<script lang="ts" setup>
|
|
@@ -162,8 +203,22 @@ const props = defineProps({
|
|
|
162
203
|
type: Object as PropType<Record<string, any> | null>,
|
|
163
204
|
required: true,
|
|
164
205
|
},
|
|
206
|
+
// Optional report status (pending/approved/rejected), printed inside the header.
|
|
207
|
+
status: {
|
|
208
|
+
type: String,
|
|
209
|
+
default: "",
|
|
210
|
+
},
|
|
211
|
+
// The report's `organization` id: the company that filed it.
|
|
212
|
+
organizationId: {
|
|
213
|
+
type: String,
|
|
214
|
+
default: "",
|
|
215
|
+
},
|
|
165
216
|
});
|
|
166
217
|
|
|
218
|
+
const companyName = useIncidentCompany(() => props.organizationId);
|
|
219
|
+
|
|
220
|
+
const statusKey = computed(() => String(props.status || "").toLowerCase());
|
|
221
|
+
|
|
167
222
|
// utilities
|
|
168
223
|
const { getSiteById } = useSiteSettings();
|
|
169
224
|
const route = useRoute();
|
|
@@ -204,11 +259,16 @@ watch(
|
|
|
204
259
|
{ immediate: true }
|
|
205
260
|
);
|
|
206
261
|
|
|
262
|
+
// DD/MM/YYYY in Singapore time. The PDF is rendered on a server whose clock is
|
|
263
|
+
// UTC, so without the zone an 8 Oct (SGT) date prints as 07/10.
|
|
207
264
|
function toLocalDate(utcString: string) {
|
|
208
|
-
|
|
265
|
+
const d = new Date(utcString);
|
|
266
|
+
if (!utcString || isNaN(d.getTime())) return "";
|
|
267
|
+
return d.toLocaleDateString("en-GB", {
|
|
209
268
|
year: "numeric",
|
|
210
269
|
month: "2-digit",
|
|
211
270
|
day: "2-digit",
|
|
271
|
+
timeZone: "Asia/Singapore",
|
|
212
272
|
});
|
|
213
273
|
}
|
|
214
274
|
|
|
@@ -218,3 +278,70 @@ const maskNRIC = (value: any) => {
|
|
|
218
278
|
return value.replace(/.(?=.{3})/g, "*");
|
|
219
279
|
};
|
|
220
280
|
</script>
|
|
281
|
+
|
|
282
|
+
<style scoped>
|
|
283
|
+
/* One consistent 1px grey rule for every cell edge; rows never split across pages. */
|
|
284
|
+
.ir-title {
|
|
285
|
+
text-align: center;
|
|
286
|
+
padding: 10px;
|
|
287
|
+
}
|
|
288
|
+
.ir-status {
|
|
289
|
+
display: inline-block;
|
|
290
|
+
background: #fff;
|
|
291
|
+
color: #b26a00;
|
|
292
|
+
border: 1px solid currentColor;
|
|
293
|
+
border-radius: 4px;
|
|
294
|
+
padding: 2px 14px;
|
|
295
|
+
font-size: 0.95rem;
|
|
296
|
+
font-weight: 700;
|
|
297
|
+
letter-spacing: 0.03em;
|
|
298
|
+
}
|
|
299
|
+
.ir-company {
|
|
300
|
+
font-size: 1rem;
|
|
301
|
+
font-weight: 600;
|
|
302
|
+
}
|
|
303
|
+
.ir-status--approved { color: #2e7d32; }
|
|
304
|
+
.ir-status--rejected { color: #c62828; }
|
|
305
|
+
/* One table. Each cell paints its own right/bottom rule (the first cell also the
|
|
306
|
+
left one) and the heading cell all four, so borders are never painted outside
|
|
307
|
+
the cell that owns them: collapsed borders left a ghost of the repeated
|
|
308
|
+
heading in the page margin. The heading row is the table header, so it repeats
|
|
309
|
+
at the top of every page; rows never split. */
|
|
310
|
+
.ir-table {
|
|
311
|
+
width: 100%;
|
|
312
|
+
table-layout: fixed;
|
|
313
|
+
border-collapse: separate;
|
|
314
|
+
border-spacing: 0;
|
|
315
|
+
}
|
|
316
|
+
.ir-table thead {
|
|
317
|
+
display: table-header-group;
|
|
318
|
+
}
|
|
319
|
+
.ir-table tr {
|
|
320
|
+
break-inside: avoid;
|
|
321
|
+
page-break-inside: avoid;
|
|
322
|
+
}
|
|
323
|
+
.ir-cell {
|
|
324
|
+
border-right: 1px solid #8a8a8a;
|
|
325
|
+
border-bottom: 1px solid #8a8a8a;
|
|
326
|
+
vertical-align: top;
|
|
327
|
+
}
|
|
328
|
+
.ir-cell:first-child {
|
|
329
|
+
border-left: 1px solid #8a8a8a;
|
|
330
|
+
}
|
|
331
|
+
/* A label always travels with its value. */
|
|
332
|
+
.ir-cell p:first-child {
|
|
333
|
+
break-after: avoid;
|
|
334
|
+
page-break-after: avoid;
|
|
335
|
+
}
|
|
336
|
+
/* The heading is a solid bar with no stroke: when the repeated heading is laid
|
|
337
|
+
out at the foot of the previous page Chrome paints a clipped ghost of it
|
|
338
|
+
there, and a stroke on that ghost showed as a thin line. */
|
|
339
|
+
.ir-section {
|
|
340
|
+
/* A white top border with the colour clipped to the padding box: the ghost then
|
|
341
|
+
starts 2px lower than the page foot, so not even a 0.2pt sliver is painted. */
|
|
342
|
+
border: 0;
|
|
343
|
+
border-top: 2px solid #fff;
|
|
344
|
+
background-clip: padding-box;
|
|
345
|
+
font-weight: 400;
|
|
346
|
+
}
|
|
347
|
+
</style>
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
<div class="nric-selected-person d-flex align-center justify-space-between ga-3 mb-5">
|
|
115
115
|
<span>{{ memberSelectedSearchResult.name || "Unknown" }}</span>
|
|
116
116
|
<span class="text-no-wrap">
|
|
117
|
-
NRIC: {{ memberSelectedSearchResult.nric || "N/A" }}
|
|
117
|
+
NRIC: {{ maskNRIC(memberSelectedSearchResult.nric) || "N/A" }}
|
|
118
118
|
</span>
|
|
119
119
|
</div>
|
|
120
120
|
|
|
@@ -214,7 +214,7 @@ const props = defineProps({
|
|
|
214
214
|
},
|
|
215
215
|
});
|
|
216
216
|
|
|
217
|
-
const { requiredRule, debounce } = useUtils();
|
|
217
|
+
const { requiredRule, debounce, maskNRIC } = useUtils();
|
|
218
218
|
const { getPassKeysByPageSearch } = usePassKey();
|
|
219
219
|
const {
|
|
220
220
|
findPersonByNRICMultipleResult,
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
<div v-if="commands.length" class="hero-detail__commands">
|
|
139
139
|
<RobotCommandBar
|
|
140
140
|
:capabilities="caps"
|
|
141
|
-
:can-command="
|
|
141
|
+
:can-command="cmdOk"
|
|
142
142
|
:online="live?.ok === true && live.online === true"
|
|
143
143
|
:mode="statusMode"
|
|
144
144
|
:type="robotType"
|
|
@@ -151,7 +151,7 @@
|
|
|
151
151
|
{{ commandResult.text }}
|
|
152
152
|
</div>
|
|
153
153
|
</div>
|
|
154
|
-
<RobotViewOnlyNotice v-if="!
|
|
154
|
+
<RobotViewOnlyNotice v-if="!cmdOk" />
|
|
155
155
|
</section>
|
|
156
156
|
</div>
|
|
157
157
|
|
|
@@ -369,11 +369,13 @@ const props = withDefaults(
|
|
|
369
369
|
canEdit?: boolean;
|
|
370
370
|
canCommand?: boolean;
|
|
371
371
|
canDelete?: boolean;
|
|
372
|
+
/** Seven365 Super Admin: the only one who may command a HERO Fleet Core robot (owner, 12 Oct 2026). */
|
|
373
|
+
superAdmin?: boolean;
|
|
372
374
|
/** The robot types this app presents - the edit dialog shows Type only with both. */
|
|
373
375
|
types?: Array<"cleaning" | "security">;
|
|
374
376
|
tickMs?: number;
|
|
375
377
|
}>(),
|
|
376
|
-
{ backLabel: "", canEdit: false, canCommand: false, canDelete: false, types: () => [], tickMs: 1200 },
|
|
378
|
+
{ backLabel: "", canEdit: false, canCommand: false, canDelete: false, superAdmin: false, types: () => [], tickMs: 1200 },
|
|
377
379
|
);
|
|
378
380
|
const emit = defineEmits<{
|
|
379
381
|
back: [];
|
|
@@ -398,6 +400,7 @@ const {
|
|
|
398
400
|
} = useRobots();
|
|
399
401
|
|
|
400
402
|
const record = ref<Record<string, any> | null>(null);
|
|
403
|
+
const cmdOk = computed(() => props.canCommand && (props.superAdmin || record.value?.brand !== "fleet-core"));
|
|
401
404
|
const topEl = ref<HTMLElement | null>(null);
|
|
402
405
|
const brands = ref<Array<Record<string, any>>>([]);
|
|
403
406
|
const error = ref("");
|
|
@@ -478,7 +481,7 @@ const makerApp = computed(() => (live.value?.ok ? live.value.profile?.makerApp :
|
|
|
478
481
|
|
|
479
482
|
const online = computed(() => live.value?.ok === true && live.value.online === true);
|
|
480
483
|
const commands = computed(() =>
|
|
481
|
-
visibleCommands({ capabilities: caps.value, canCommand:
|
|
484
|
+
visibleCommands({ capabilities: caps.value, canCommand: cmdOk.value, online: online.value, mode: statusMode.value, type: robotType.value, resumable: resumable.value }),
|
|
482
485
|
);
|
|
483
486
|
|
|
484
487
|
/* ---- the plan ---- */
|
|
@@ -506,7 +509,7 @@ watch(
|
|
|
506
509
|
const readout = computed(() => `${positionText(live.value, caps.value, now.value)} · ${speedText(prevPose.value, nextPose.value, statusMode.value)}`);
|
|
507
510
|
|
|
508
511
|
const spot = ref<Array<{ x: number; y: number }>>([]);
|
|
509
|
-
const spotOn = computed(() => showSpotClean({ canCommand:
|
|
512
|
+
const spotOn = computed(() => showSpotClean({ canCommand: cmdOk.value, capabilities: caps.value, online: online.value, type: robotType.value }));
|
|
510
513
|
|
|
511
514
|
// The route drawn on the plan: the shown map's first route, else the first with placed checkpoints (the rest are listed by name).
|
|
512
515
|
const route = computed<TPatrolRouteView | null>(() =>
|
|
@@ -839,9 +842,9 @@ function onPick(p: TSavedPoint) {
|
|
|
839
842
|
const livePanel = ref<{ show(): void } | null>(null);
|
|
840
843
|
const hasCamera = computed(() => caps.value?.liveVideo === true || canDrive.value);
|
|
841
844
|
const driveOpen = ref(false);
|
|
842
|
-
const canDrive = computed(() =>
|
|
845
|
+
const canDrive = computed(() => cmdOk.value && caps.value?.manualDrive === true && online.value);
|
|
843
846
|
const canResolve = computed(
|
|
844
|
-
() =>
|
|
847
|
+
() => cmdOk.value && caps.value?.resolveAlerts === true && faultBadge(fault.value) === "ALARM" && typeof fault.value?.code === "string",
|
|
845
848
|
);
|
|
846
849
|
const resolving = ref(false);
|
|
847
850
|
async function resolveFault() {
|
|
@@ -26,9 +26,10 @@
|
|
|
26
26
|
:key="robotId"
|
|
27
27
|
:robot-id="robotId"
|
|
28
28
|
:back-label="siteName || names.siteName ? `${siteName || names.siteName} fleet` : ''"
|
|
29
|
-
:can-edit="canEdit"
|
|
29
|
+
:can-edit="canEdit && superAdmin"
|
|
30
30
|
:can-command="canCommand"
|
|
31
|
-
:
|
|
31
|
+
:super-admin="superAdmin"
|
|
32
|
+
:can-delete="canDelete && superAdmin"
|
|
32
33
|
:types="types"
|
|
33
34
|
@back="emit('back')"
|
|
34
35
|
@removed="onRemoved"
|
|
@@ -42,7 +43,7 @@
|
|
|
42
43
|
:site-name="siteName"
|
|
43
44
|
:client-name="clientName"
|
|
44
45
|
:type="type"
|
|
45
|
-
:can-edit-map="canSetup && canEdit"
|
|
46
|
+
:can-edit-map="canSetup && canEdit && superAdmin"
|
|
46
47
|
:back-to-network="backToNetwork"
|
|
47
48
|
@open="(id) => emit('open', id)"
|
|
48
49
|
@network="emit('network')"
|
|
@@ -57,7 +58,7 @@
|
|
|
57
58
|
:client-name="clientName"
|
|
58
59
|
:type="type"
|
|
59
60
|
:can-command="canCommand"
|
|
60
|
-
:can-edit-map="canSetup && canEdit"
|
|
61
|
+
:can-edit-map="canSetup && canEdit && superAdmin"
|
|
61
62
|
:back-to-network="backToNetwork"
|
|
62
63
|
@open="(id) => emit('open', id)"
|
|
63
64
|
@network="emit('network')"
|
|
@@ -90,7 +91,7 @@
|
|
|
90
91
|
:site-name="siteName"
|
|
91
92
|
:client-name="clientName"
|
|
92
93
|
:type="type"
|
|
93
|
-
:can-setup="canSetup"
|
|
94
|
+
:can-setup="canSetup && superAdmin"
|
|
94
95
|
:back-to-network="backToNetwork"
|
|
95
96
|
:reload-key="reloadKey"
|
|
96
97
|
@open="(r) => emit('open', String(r._id))"
|
|
@@ -19,6 +19,8 @@
|
|
|
19
19
|
</span>
|
|
20
20
|
</template>
|
|
21
21
|
|
|
22
|
+
<template #item.nric="{ value }">{{ maskNRIC(value) || "-" }}</template>
|
|
23
|
+
|
|
22
24
|
<template #item.actions="{ item }">
|
|
23
25
|
<AppButton variant="ghost" @click="handleSelectUser(item)">Select</AppButton>
|
|
24
26
|
</template>
|
|
@@ -37,6 +39,7 @@
|
|
|
37
39
|
</template>
|
|
38
40
|
|
|
39
41
|
<script setup lang="ts">
|
|
42
|
+
const { maskNRIC } = useUtils();
|
|
40
43
|
|
|
41
44
|
const prop = defineProps({
|
|
42
45
|
vehicleNumber: {
|
|
@@ -476,7 +476,7 @@
|
|
|
476
476
|
</v-list-item-title>
|
|
477
477
|
|
|
478
478
|
<v-list-item-subtitle>
|
|
479
|
-
NRIC: {{ v.nric || "-" }}
|
|
479
|
+
NRIC: {{ maskNRIC(v.nric) || "-" }}
|
|
480
480
|
</v-list-item-subtitle>
|
|
481
481
|
|
|
482
482
|
<div class="mt-1 d-flex flex-wrap ga-1">
|
|
@@ -581,7 +581,7 @@ const prop = defineProps({
|
|
|
581
581
|
},
|
|
582
582
|
});
|
|
583
583
|
|
|
584
|
-
const { requiredRule, debounce } = useUtils();
|
|
584
|
+
const { requiredRule, debounce, maskNRIC } = useUtils();
|
|
585
585
|
const {
|
|
586
586
|
addVehicle,
|
|
587
587
|
getCustomSeasonPassTypes,
|
|
@@ -311,7 +311,7 @@
|
|
|
311
311
|
<div class="screen-modal__body nric-options-body">
|
|
312
312
|
<div class="nric-selected-person d-flex align-center justify-space-between ga-3 mb-5">
|
|
313
313
|
<span>{{ selectedNricSearchResult.name || "Unknown" }}</span>
|
|
314
|
-
<span v-if="!visitor.nric || currentAutofillSource === 'nric'" class="text-no-wrap">NRIC: {{ selectedNricSearchResult.nric || "N/A" }}</span>
|
|
314
|
+
<span v-if="!visitor.nric || currentAutofillSource === 'nric'" class="text-no-wrap">NRIC: {{ maskNRIC(selectedNricSearchResult.nric) || "N/A" }}</span>
|
|
315
315
|
</div>
|
|
316
316
|
|
|
317
317
|
<template v-if="(!visitor.contact || currentAutofillSource === 'contact') && selectedNricContactOptions.length >= 1">
|
|
@@ -355,7 +355,7 @@
|
|
|
355
355
|
</p>
|
|
356
356
|
|
|
357
357
|
<div class="checkout-dialog__subject">
|
|
358
|
-
<div v-if="!skipNonCheckedOutNric">NRIC: {{ visitor.nric || "N/A" }}</div>
|
|
358
|
+
<div v-if="!skipNonCheckedOutNric">NRIC: {{ maskNRIC(visitor.nric) || "N/A" }}</div>
|
|
359
359
|
<div>Phone Number: {{ visitor.contact || "N/A" }}</div>
|
|
360
360
|
</div>
|
|
361
361
|
|
|
@@ -422,7 +422,7 @@
|
|
|
422
422
|
<div class="visitor-form__footer" v-if="!skipNonCheckedOutNric">
|
|
423
423
|
<v-btn class="screen-btn-primary" variant="flat" :loading="loading.searchingNonCheckedOut"
|
|
424
424
|
@click="handleSkipNricNonCheckedOut">
|
|
425
|
-
Skip NRIC: {{ visitor.nric || "N/A" }}
|
|
425
|
+
Skip NRIC: {{ maskNRIC(visitor.nric) || "N/A" }}
|
|
426
426
|
</v-btn>
|
|
427
427
|
</div>
|
|
428
428
|
</v-card>
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
</div>
|
|
27
27
|
<div class="visitor-summary__cell">
|
|
28
28
|
<div class="visitor-summary__label">NRIC</div>
|
|
29
|
-
<div class="visitor-summary__value">{{ item?.nric || "N/A" }}</div>
|
|
29
|
+
<div class="visitor-summary__value">{{ maskNRIC(item?.nric) || "N/A" }}</div>
|
|
30
30
|
</div>
|
|
31
31
|
</div>
|
|
32
32
|
|
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
</template>
|
|
50
50
|
|
|
51
51
|
<script setup lang="ts">
|
|
52
|
+
const { maskNRIC } = useUtils();
|
|
52
53
|
const props = defineProps<{
|
|
53
54
|
item: any;
|
|
54
55
|
}>();
|
|
@@ -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.97.1-staging.
|
|
5
|
+
"version": "4.97.1-staging.541",
|
|
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.",
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// The company that filed an incident report = the organisation stored on the
|
|
2
|
+
// report (the filer's own membership org: security agency, or the client's own
|
|
3
|
+
// staff org). Returns "" when it cannot be resolved so nothing wrong is printed.
|
|
4
|
+
export function incidentCompanyName(org: unknown): string {
|
|
5
|
+
const name = (org as { name?: unknown } | null | undefined)?.name;
|
|
6
|
+
return typeof name === "string" ? name.trim() : "";
|
|
7
|
+
}
|