@7365admin1/layer-common 1.11.19 → 1.11.21
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 +12 -0
- package/components/AddPassKeyToVisitor.vue +114 -53
- package/components/AreaChecklistHistoryMain.vue +29 -1
- package/components/BulletinBoardView.vue +158 -16
- package/components/CleaningScheduleMain.vue +2 -2
- package/components/Input/DateTimePicker.vue +45 -9
- package/components/OvernightParkingAvailability.vue +291 -155
- package/components/ScanVisitorQRCode.vue +157 -0
- package/components/ScheduleAreaMain.vue +6 -6
- package/components/SiteSettings.vue +303 -243
- package/components/TableMain.vue +72 -21
- package/components/VisitorManagement.vue +656 -234
- package/composables/useFeedback.ts +1 -1
- package/composables/useOrg.ts +16 -0
- package/composables/useSiteSettings.ts +30 -1
- package/package.json +1 -1
- package/plugins/html5-qrcode.client.js +8 -0
- package/types/overnight-parking.d.ts +3 -2
package/components/TableMain.vue
CHANGED
|
@@ -1,29 +1,61 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<v-row no-gutters>
|
|
3
3
|
<!-- Top Actions -->
|
|
4
|
-
<v-col cols="12" class="mb-2" v-if="
|
|
4
|
+
<v-col cols="12" class="mb-2" v-if="canCreate || $slots.actions">
|
|
5
5
|
<v-row no-gutters>
|
|
6
6
|
<slot name="actions">
|
|
7
7
|
<v-col cols="12">
|
|
8
|
-
<v-row no-gutters
|
|
9
|
-
<v-btn
|
|
10
|
-
|
|
8
|
+
<v-row no-gutters>
|
|
9
|
+
<v-btn
|
|
10
|
+
v-if="canCreate"
|
|
11
|
+
class="text-none"
|
|
12
|
+
rounded="pill"
|
|
13
|
+
variant="tonal"
|
|
14
|
+
size="large"
|
|
15
|
+
@click="emits('create')"
|
|
16
|
+
>
|
|
11
17
|
{{ createLabel }}
|
|
12
18
|
</v-btn>
|
|
13
|
-
<v-text-field
|
|
14
|
-
|
|
19
|
+
<v-text-field
|
|
20
|
+
v-if="canSearch"
|
|
21
|
+
v-model="searchInput"
|
|
22
|
+
density="compact"
|
|
23
|
+
placeholder="Search"
|
|
24
|
+
clearable
|
|
25
|
+
max-width="300"
|
|
26
|
+
append-inner-icon="mdi-magnify"
|
|
27
|
+
hide-details
|
|
28
|
+
/>
|
|
29
|
+
<v-btn
|
|
30
|
+
v-if="canScanVisitorQRCode"
|
|
31
|
+
text="Scan QR Code"
|
|
32
|
+
class="text-none ml-2"
|
|
33
|
+
rounded="pill"
|
|
34
|
+
variant="tonal"
|
|
35
|
+
size="large"
|
|
36
|
+
@click="emits('scan')"
|
|
37
|
+
/>
|
|
15
38
|
</v-row>
|
|
16
39
|
</v-col>
|
|
17
40
|
</slot>
|
|
18
|
-
|
|
19
41
|
</v-row>
|
|
20
42
|
</v-col>
|
|
21
43
|
|
|
22
44
|
<!-- Table Card -->
|
|
23
45
|
<v-col cols="12">
|
|
24
|
-
<v-card
|
|
46
|
+
<v-card
|
|
47
|
+
width="100%"
|
|
48
|
+
variant="outlined"
|
|
49
|
+
border="thin"
|
|
50
|
+
rounded="lg"
|
|
51
|
+
:loading="loading"
|
|
52
|
+
>
|
|
25
53
|
<!-- Toolbar -->
|
|
26
|
-
<v-toolbar
|
|
54
|
+
<v-toolbar
|
|
55
|
+
density="compact"
|
|
56
|
+
color="grey-lighten-4"
|
|
57
|
+
:extension-height="extensionHeight"
|
|
58
|
+
>
|
|
27
59
|
<template #prepend>
|
|
28
60
|
<v-btn fab icon density="comfortable" @click="emits('refresh')">
|
|
29
61
|
<v-icon>mdi-refresh</v-icon>
|
|
@@ -36,8 +68,11 @@
|
|
|
36
68
|
<span class="mr-2 text-caption text-fontgray">
|
|
37
69
|
{{ pageRange }}
|
|
38
70
|
</span>
|
|
39
|
-
<local-pagination
|
|
40
|
-
|
|
71
|
+
<local-pagination
|
|
72
|
+
v-model="internalPage"
|
|
73
|
+
:length="pages"
|
|
74
|
+
@update:value="emits('update:page', internalPage)"
|
|
75
|
+
/>
|
|
41
76
|
</v-row>
|
|
42
77
|
</template>
|
|
43
78
|
|
|
@@ -46,12 +81,18 @@
|
|
|
46
81
|
</template>
|
|
47
82
|
</v-toolbar>
|
|
48
83
|
|
|
49
|
-
|
|
50
84
|
<!-- Data Table -->
|
|
51
|
-
<v-data-table
|
|
52
|
-
|
|
85
|
+
<v-data-table
|
|
86
|
+
:headers="headers"
|
|
87
|
+
:items="items"
|
|
88
|
+
:item-value="itemValue"
|
|
89
|
+
:items-per-page="itemsPerPage"
|
|
90
|
+
fixed-header
|
|
91
|
+
hide-default-footer
|
|
92
|
+
:hide-default-header="!showHeader"
|
|
53
93
|
@click:row="(_: any, data: any) => emits('row-click', data)"
|
|
54
|
-
:style="`max-height: calc(100vh - (${offset}px))`"
|
|
94
|
+
:style="`max-height: calc(100vh - (${offset}px))`"
|
|
95
|
+
>
|
|
55
96
|
<template v-for="(_, slotName) in $slots" #[slotName]="slotProps">
|
|
56
97
|
<slot :name="slotName" v-bind="slotProps" />
|
|
57
98
|
</template>
|
|
@@ -80,6 +121,10 @@ const props = defineProps({
|
|
|
80
121
|
type: Boolean,
|
|
81
122
|
default: false,
|
|
82
123
|
},
|
|
124
|
+
canScanVisitorQRCode: {
|
|
125
|
+
type: Boolean,
|
|
126
|
+
default: false,
|
|
127
|
+
},
|
|
83
128
|
canSearch: {
|
|
84
129
|
type: Boolean,
|
|
85
130
|
default: false,
|
|
@@ -110,21 +155,27 @@ const props = defineProps({
|
|
|
110
155
|
},
|
|
111
156
|
showHeader: {
|
|
112
157
|
type: Boolean,
|
|
113
|
-
default: false
|
|
158
|
+
default: false,
|
|
114
159
|
},
|
|
115
160
|
extensionHeight: {
|
|
116
161
|
type: Number,
|
|
117
|
-
default: 50
|
|
162
|
+
default: 50,
|
|
118
163
|
},
|
|
119
164
|
offset: {
|
|
120
165
|
type: Number,
|
|
121
|
-
default: 200
|
|
122
|
-
}
|
|
166
|
+
default: 200,
|
|
167
|
+
},
|
|
123
168
|
});
|
|
124
169
|
|
|
125
|
-
const emits = defineEmits([
|
|
170
|
+
const emits = defineEmits([
|
|
171
|
+
"create",
|
|
172
|
+
"scan",
|
|
173
|
+
"refresh",
|
|
174
|
+
"update:page",
|
|
175
|
+
"row-click",
|
|
176
|
+
]);
|
|
126
177
|
|
|
127
|
-
const searchInput = defineModel(
|
|
178
|
+
const searchInput = defineModel("search", { default: "" });
|
|
128
179
|
|
|
129
180
|
const internalPage = ref(props.page);
|
|
130
181
|
watch(
|