@7365admin1/layer-common 4.144.0 → 4.147.0
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 +65 -4
- package/components/AddPassKeyToVisitor.vue +332 -54
- package/components/AreaChecklistHistoryLogs.vue +2 -2
- package/components/CleaningScheduleMain.vue +2 -2
- package/components/FileInput.vue +4 -0
- package/components/MemberInformation.vue +580 -281
- package/components/NricScanDialog.vue +512 -0
- package/components/PassInformation.vue +11 -2
- package/components/RolePermissionMain.vue +3 -1
- package/components/ScheduleTaskForm.vue +16 -17
- package/components/ScheduleTaskMain.vue +43 -39
- package/components/SubscriptionPlanTable.vue +45 -1
- package/components/TableHygiene.vue +4 -1
- package/components/VisitorForm.vue +1796 -642
- package/components/VisitorFormSelection.vue +51 -18
- package/components/VisitorManagement.vue +1641 -640
- package/components/VisitorPassKeyQRScanner.vue +1 -1
- package/components/VisitorSocketPopUp.vue +72 -23
- package/composables/usePeople.ts +54 -0
- package/composables/useVisitor.ts +4 -2
- package/composables/useVisitorSocket.ts +19 -0
- package/package.json +2 -1
- package/utils/breadcrumb.ts +2 -1
- package/utils/nav-sections.ts +1 -0
- package/utils/nric-card.ts +278 -0
- package/utils/permission-labels.ts +17 -6
- package/utils/role.ts +24 -0
- package/utils/schedule-task.ts +51 -9
- package/utils/visitor-people.ts +262 -0
|
@@ -1,18 +1,27 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<v-card width="100%" class="screen-modal visitor-select">
|
|
3
|
-
|
|
3
|
+
<!-- Register (iSecure `VisitorTypeDialog`): "Register {plate} as", with
|
|
4
|
+
the plate highlighted, or "Select visitor type" without one. -->
|
|
5
|
+
<v-card-title v-if="mode === 'register'">
|
|
6
|
+
<template v-if="plate">
|
|
7
|
+
Register <span class="visitor-select__plate">{{ plate }}</span> as
|
|
8
|
+
</template>
|
|
9
|
+
<template v-else>Select visitor type</template>
|
|
10
|
+
</v-card-title>
|
|
11
|
+
<v-card-title v-else class="text-capitalize">{{ mode }} Visitor</v-card-title>
|
|
4
12
|
|
|
5
13
|
<div class="screen-modal__body visitor-select__body">
|
|
6
|
-
<p class="visitor-select__hint">
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
<p v-if="mode !== 'register'" class="visitor-select__hint">
|
|
15
|
+
Please Select Visitor Type
|
|
16
|
+
</p>
|
|
17
|
+
<AppButton
|
|
18
|
+
v-for="item in selection"
|
|
19
|
+
:key="item.value"
|
|
20
|
+
class="visitor-select__option"
|
|
21
|
+
@click="select(item.value)"
|
|
22
|
+
>
|
|
23
|
+
{{ item.label }}
|
|
24
|
+
</AppButton>
|
|
16
25
|
</div>
|
|
17
26
|
|
|
18
27
|
<div class="visitor-select__footer">
|
|
@@ -27,10 +36,35 @@ const prop = defineProps({
|
|
|
27
36
|
type: String as PropType<"add" | "edit" | "register">,
|
|
28
37
|
default: "add",
|
|
29
38
|
},
|
|
39
|
+
/** The plate being registered (register mode), shown in the title. */
|
|
40
|
+
plateNumber: {
|
|
41
|
+
type: String,
|
|
42
|
+
default: "",
|
|
43
|
+
},
|
|
30
44
|
});
|
|
31
45
|
|
|
32
46
|
const emit = defineEmits(['cancel', 'select']);
|
|
33
|
-
const { visitorSelection
|
|
47
|
+
const { visitorSelection } = useVisitor();
|
|
48
|
+
|
|
49
|
+
const plate = computed(() => String(prop.plateNumber ?? "").trim().toUpperCase());
|
|
50
|
+
|
|
51
|
+
/*
|
|
52
|
+
* iSecure's orders. Add: Guest, Contractor, Delivery, Walk-In, Pick-Up,
|
|
53
|
+
* Drop-Off (`VISITOR_FORM_TYPES`). Register: Guest, Delivery, Pick-up,
|
|
54
|
+
* Drop-off, Contractor (`VisitorTypeDialog`; no Walk-In - a camera read is a
|
|
55
|
+
* vehicle). The values are the ones the form already takes.
|
|
56
|
+
*/
|
|
57
|
+
const REGISTER_SELECTION = [
|
|
58
|
+
{ label: "Guest", value: "guest" },
|
|
59
|
+
{ label: "Delivery", value: "delivery" },
|
|
60
|
+
{ label: "Pick-up", value: "pick-up" },
|
|
61
|
+
{ label: "Drop-off", value: "drop-off" },
|
|
62
|
+
{ label: "Contractor", value: "contractor" },
|
|
63
|
+
];
|
|
64
|
+
|
|
65
|
+
const selection = computed(() =>
|
|
66
|
+
prop.mode === "register" ? REGISTER_SELECTION : visitorSelection
|
|
67
|
+
);
|
|
34
68
|
|
|
35
69
|
|
|
36
70
|
|
|
@@ -42,12 +76,6 @@ function select(value: string) {
|
|
|
42
76
|
emit("select", value);
|
|
43
77
|
}
|
|
44
78
|
|
|
45
|
-
function showSelection(item: any) {
|
|
46
|
-
if(item.value === 'walk-in' && prop.mode === 'register') {
|
|
47
|
-
return false ;
|
|
48
|
-
} return true;
|
|
49
|
-
|
|
50
|
-
}
|
|
51
79
|
</script>
|
|
52
80
|
|
|
53
81
|
<style scoped>
|
|
@@ -69,6 +97,11 @@ function showSelection(item: any) {
|
|
|
69
97
|
margin-bottom: 10px;
|
|
70
98
|
}
|
|
71
99
|
|
|
100
|
+
.visitor-select__plate {
|
|
101
|
+
color: var(--accent-text);
|
|
102
|
+
font-weight: 700;
|
|
103
|
+
}
|
|
104
|
+
|
|
72
105
|
.visitor-select__footer {
|
|
73
106
|
display: flex;
|
|
74
107
|
justify-content: flex-end;
|