@7365admin1/layer-common 3.2.1 → 3.2.2-staging.100
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/.changeset/camera-wall-gated-endpoint.md +47 -0
- package/.changeset/camera-wall-plain-english.md +60 -0
- package/.changeset/camera-wall-selection-and-guidance.md +65 -0
- package/.changeset/dark-primary-contrast.md +39 -0
- package/.changeset/dashboard-dark-theme-contrast.md +15 -0
- package/.changeset/notification-preferences.md +17 -0
- package/.changeset/pm-sidebar-grouping-and-list-scaffold.md +27 -0
- package/.changeset/service-provider-invitation-actions.md +28 -0
- package/assets/css/primitives.css +680 -0
- package/assets/css/screens.css +541 -0
- package/assets/css/shell.css +258 -0
- package/assets/css/tokens.css +220 -0
- package/components/AccessCardQrTagging.vue +1 -1
- package/components/AccessManagement.vue +53 -72
- package/components/AppButton.vue +52 -0
- package/components/AppCard.vue +20 -0
- package/components/AppDateField.vue +35 -0
- package/components/AppField.vue +46 -0
- package/components/AppKpiTile.vue +65 -0
- package/components/AppSegmented.vue +38 -0
- package/components/AppSelect.vue +203 -0
- package/components/AreaChecklistHistoryMain.vue +6 -2
- package/components/AreaMain.vue +9 -17
- package/components/AttendanceMain.vue +4 -3
- package/components/Avatar/Main.vue +54 -2
- package/components/BillingMain.vue +26 -30
- package/components/BuildingManagement/buildings.vue +27 -38
- package/components/BuildingManagement/units.vue +26 -42
- package/components/BulletinBoardManagement.vue +23 -10
- package/components/CameraWall.vue +1034 -0
- package/components/CameraWallTile.vue +818 -0
- package/components/CardToolbar.vue +37 -0
- package/components/CleaningScheduleMain.vue +29 -46
- package/components/ClientMain.vue +90 -78
- package/components/DashboardEmptyState.vue +11 -1
- package/components/DashboardMain.vue +349 -275
- package/components/DashboardPanel.vue +1 -1
- package/components/DocumentManagement.vue +129 -93
- package/components/EntryPassInformation.vue +4 -4
- package/components/EntryPassMain.vue +49 -27
- package/components/EquipmentItemMain.vue +4 -6
- package/components/EquipmentManagementMain.vue +9 -7
- package/components/FeedbackMain.vue +42 -56
- package/components/FormDialog.vue +60 -21
- package/components/HidAccessLogDashboard.vue +119 -44
- package/components/HidCameraCaptureDialog.vue +199 -0
- package/components/HidIntercomManagement.vue +825 -202
- package/components/HidQrCodeConfiguration.vue +927 -93
- package/components/HidServiceSettingsPanel.vue +20 -1
- package/components/HidUserEnrollment.vue +454 -106
- package/components/InvitationMain.vue +46 -61
- package/components/Layout/Header.vue +289 -37
- package/components/Layout/NavigationDrawer.vue +340 -30
- package/components/ManageChecklistMain.vue +17 -17
- package/components/MemberMain.vue +79 -60
- package/components/MyAttendanceMain.vue +3 -5
- package/components/NavigationItem.vue +9 -0
- package/components/Nfc/NFCPatrolRouteMain.vue +116 -103
- package/components/NotificationSettings.vue +361 -0
- package/components/OnlineFormConfigurationForm.vue +620 -224
- package/components/OnlineFormFill.vue +36 -8
- package/components/OnlineFormsConfiguration.vue +7 -3
- package/components/PageHeader.vue +43 -0
- package/components/PassInformation.vue +104 -45
- package/components/QrTemplate/CreditCardLandscape.vue +19 -12
- package/components/QrTemplate/PrintDialog.vue +209 -196
- package/components/RolePermissionMain.vue +184 -91
- package/components/ScanVisitorQRCode.vue +35 -7
- package/components/ScheduleAreaMain.vue +15 -49
- package/components/ScheduleTaskMain.vue +23 -26
- package/components/ScheduleTastTicketMain.vue +18 -43
- package/components/ServiceProviderInvitationPrompt.vue +150 -0
- package/components/ServiceProviderMain.vue +346 -157
- package/components/SiteSettings.vue +25 -10
- package/components/SpecificAttr.vue +10 -2
- package/components/StatusChip.vue +93 -0
- package/components/SwitchContext.vue +33 -1
- package/components/TableHygiene.vue +29 -46
- package/components/TableList.vue +1 -1
- package/components/TableListSecondary.vue +1 -1
- package/components/TableMain.vue +161 -77
- package/components/TableV3.vue +61 -66
- package/components/UnitMain.vue +9 -17
- package/components/VehicleManagement.vue +20 -9
- package/components/VisitorForm.vue +294 -78
- package/components/VisitorManagement.vue +221 -71
- package/components/VisitorSocketPopUp.vue +56 -2
- package/components/WorkOrder/Main.vue +42 -51
- package/composables/useComment.ts +3 -3
- package/composables/useHidAmico.ts +151 -0
- package/composables/useHidNavigation.ts +0 -7
- package/composables/useLocalAuth.ts +9 -36
- package/composables/useNotificationPreference.ts +87 -0
- package/composables/useOnlineFormPages.ts +2 -0
- package/composables/useOrg.ts +1 -1
- package/composables/useRole.ts +22 -0
- package/composables/useServiceProviderInvitation.ts +145 -0
- package/composables/useSipWebPhone.ts +336 -0
- package/composables/useSiteSettings.ts +50 -0
- package/composables/useThemePreference.ts +63 -0
- package/composables/useVisitor.ts +6 -1
- package/composables/useVisitorSocket.ts +26 -0
- package/composables/useWebUsb.ts +127 -37
- package/nuxt.config.ts +31 -0
- package/package.json +4 -1
- package/pages/[org]/[site]/access-mgmt/intercom/index.vue +1 -1
- package/pages/notification-settings.vue +19 -0
- package/plugins/secure-member.client.ts +21 -56
- package/plugins/vuetify.ts +68 -9
- package/test/visitor-socket.test.mjs +36 -0
- package/types/org.d.ts +2 -0
- package/types/site.d.ts +71 -0
- package/utils/camera-wall.test.ts +571 -0
- package/utils/camera-wall.ts +926 -0
- package/utils/nav-sections.test.ts +190 -0
- package/utils/nav-sections.ts +151 -0
- package/utils/status.test.ts +77 -0
- package/utils/status.ts +90 -0
- package/utils/theme.test.ts +534 -0
- package/utils/theme.ts +294 -0
- package/components/HidIdentityMapping.vue +0 -975
- package/middleware/member.ts +0 -4
- package/pages/[org]/[site]/access-mgmt/identity-mapping/index.vue +0 -23
package/components/TableMain.vue
CHANGED
|
@@ -1,85 +1,158 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
PHASE 3 - THE STANDARD TABLE CARD.
|
|
3
|
+
|
|
4
|
+
The redesign is, more than anything else, a table card: toolbar row (refresh,
|
|
5
|
+
optional in-card search, pagination) -> uppercase header row -> rows. This is
|
|
6
|
+
the shared one, so this file is where that pattern is drawn once.
|
|
7
|
+
|
|
8
|
+
VISUAL ONLY, and that matters more here than anywhere. Every column, filter,
|
|
9
|
+
sort, action, slot, prop, emit and page still behaves exactly as it did:
|
|
10
|
+
the headers are the caller's, the items are the caller's, every slot is still
|
|
11
|
+
forwarded to `v-data-table` untouched, and no prop's default has changed. The
|
|
12
|
+
empty state is the same wording `v-data-table` already showed, with the icon
|
|
13
|
+
the design draws above it - and it is only supplied when the caller has NOT
|
|
14
|
+
passed its own `no-data` slot.
|
|
15
|
+
-->
|
|
1
16
|
<template>
|
|
2
|
-
<v-row no-gutters>
|
|
3
|
-
<!--
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
|
-
|
|
17
|
+
<v-row no-gutters class="table-card__shrink">
|
|
18
|
+
<!--
|
|
19
|
+
THE DESIGN'S PAGE TITLE (Phase 9).
|
|
20
|
+
|
|
21
|
+
The design opens every screen with a 22px/800 heading. This shared table
|
|
22
|
+
card is mounted by 17 module screens, and none of them had one - four of
|
|
23
|
+
them (Units, Areas, Equipment Item, Equipment Management) were already
|
|
24
|
+
PASSING `:title` to this component, which had no `title` prop, so the
|
|
25
|
+
string was landing on the root element as a plain HTML `title` attribute:
|
|
26
|
+
a browser tooltip nobody asked for. It now draws the heading it was
|
|
27
|
+
always meant to draw.
|
|
28
|
+
|
|
29
|
+
Placement only. No caller changes, no slot moves, no behaviour: a screen
|
|
30
|
+
that passes no title renders exactly what it rendered before.
|
|
31
|
+
-->
|
|
32
|
+
<!--
|
|
33
|
+
The actions used to be drawn on a SECOND row underneath that heading,
|
|
34
|
+
which is not where the design puts them - the design's title row is the
|
|
35
|
+
page name on the left and the screen's actions on the right of the SAME
|
|
36
|
+
line, which is why every screen converted so far had to bypass this
|
|
37
|
+
component and draw its own `PageHeader` above it. They are on the title
|
|
38
|
+
row now, in `PageHeader`'s own `actions` slot.
|
|
39
|
+
|
|
40
|
+
Same buttons, same slot name, same content, same events - one row instead
|
|
41
|
+
of two. A screen with no title still gets its actions at the left, where
|
|
42
|
+
they have always been, because the title block is not drawn at all.
|
|
43
|
+
-->
|
|
44
|
+
<v-col cols="12" v-if="title || canCreate || $slots.actions">
|
|
45
|
+
<PageHeader :title="title">
|
|
46
|
+
<template v-if="canCreate || $slots.actions" #actions>
|
|
47
|
+
<slot name="actions">
|
|
48
|
+
<!--
|
|
49
|
+
The design's primary button: the accent fill that may carry a
|
|
50
|
+
white label (`--accent-strong`; white on `--accent` is 3.23:1),
|
|
51
|
+
40px, 10px radius, leading icon. Same click, same label.
|
|
52
|
+
-->
|
|
53
|
+
<v-btn
|
|
54
|
+
v-if="canCreate"
|
|
55
|
+
class="text-none table-card__primary"
|
|
56
|
+
variant="flat"
|
|
57
|
+
prepend-icon="mdi-plus"
|
|
58
|
+
@click="emits('create')"
|
|
59
|
+
>
|
|
60
|
+
{{ createLabel }}
|
|
61
|
+
</v-btn>
|
|
62
|
+
<v-text-field
|
|
63
|
+
v-if="canSearch"
|
|
64
|
+
v-model="searchInput"
|
|
65
|
+
density="compact"
|
|
66
|
+
placeholder="Search"
|
|
67
|
+
clearable
|
|
68
|
+
max-width="300"
|
|
69
|
+
append-inner-icon="mdi-magnify"
|
|
70
|
+
hide-details
|
|
71
|
+
class="table-card__search"
|
|
72
|
+
/>
|
|
73
|
+
<!-- Ghost/secondary, as the design specifies for Scan QR Code. -->
|
|
74
|
+
<v-btn
|
|
75
|
+
v-if="canScanVisitorQRCode"
|
|
76
|
+
text="Scan QR Code"
|
|
77
|
+
class="text-none table-card__ghost"
|
|
78
|
+
variant="outlined"
|
|
79
|
+
@click="emits('scan')"
|
|
80
|
+
/>
|
|
81
|
+
</slot>
|
|
82
|
+
</template>
|
|
83
|
+
</PageHeader>
|
|
42
84
|
</v-col>
|
|
43
85
|
|
|
44
86
|
<!-- Table Card -->
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
87
|
+
<!--
|
|
88
|
+
`table-card__shrink` is the fix for the wide-table blowout: this column is a
|
|
89
|
+
flex item, and a flex item's automatic minimum size is its CONTENT's, so
|
|
90
|
+
a table with enough columns set a floor the column would not shrink below
|
|
91
|
+
and the whole page scrolled sideways at 360 and 768. The table scrolls
|
|
92
|
+
inside the card instead - see `.table-card__shrink` in `screens.css`.
|
|
93
|
+
-->
|
|
94
|
+
<v-col cols="12" class="table-card__shrink">
|
|
95
|
+
<!--
|
|
96
|
+
THE DESIGN'S CARD AND ITS IN-CARD TOP ROW (Phase 9).
|
|
97
|
+
|
|
98
|
+
Was a `v-card` + `v-toolbar`. `v-card` brings its own radius, elevation
|
|
99
|
+
and surface at a specificity a class has to fight, and `v-toolbar` puts
|
|
100
|
+
its `extension` on a SECOND stacked row. `AppCard` + `CardToolbar` are
|
|
101
|
+
the primitives the design is drawn with, already proven on
|
|
102
|
+
`ServiceProviderMain` / `MemberMain`.
|
|
103
|
+
|
|
104
|
+
Placement only. The refresh button, the `prepend-additional` slot, the
|
|
105
|
+
page range, the pager, the `extension` slot and the `footer` slot are
|
|
106
|
+
the same controls, emitting the same events, in the same order. The
|
|
107
|
+
`loading` bar `v-card` used to draw is drawn explicitly so a loading
|
|
108
|
+
screen still says so.
|
|
109
|
+
-->
|
|
110
|
+
<AppCard class="table-card">
|
|
111
|
+
<v-progress-linear
|
|
112
|
+
v-if="loading"
|
|
113
|
+
indeterminate
|
|
114
|
+
height="2"
|
|
115
|
+
class="table-card__loading"
|
|
116
|
+
/>
|
|
117
|
+
|
|
53
118
|
<!-- Toolbar -->
|
|
54
|
-
<
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
119
|
+
<CardToolbar :count="pageRange">
|
|
120
|
+
<!--
|
|
121
|
+
The design draws a screen's tabs ON the toolbar row, not on a
|
|
122
|
+
stacked strip above the table. `CardToolbar` has always had the
|
|
123
|
+
slot; `TableMain` simply never forwarded it, so callers put their
|
|
124
|
+
`v-tabs` in `extension` and got a second row. Purely additive: a
|
|
125
|
+
caller that passes no `tabs` renders exactly what it rendered.
|
|
126
|
+
-->
|
|
127
|
+
<template v-if="$slots.tabs" #tabs>
|
|
128
|
+
<slot name="tabs" />
|
|
129
|
+
</template>
|
|
130
|
+
|
|
131
|
+
<template #left>
|
|
132
|
+
<v-btn fab icon density="comfortable" variant="text" @click="emits('refresh')">
|
|
61
133
|
<v-icon>mdi-refresh</v-icon>
|
|
62
134
|
</v-btn>
|
|
63
135
|
<slot name="prepend-additional" />
|
|
64
136
|
</template>
|
|
65
137
|
|
|
66
|
-
<template #
|
|
67
|
-
<
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
v-model="internalPage"
|
|
73
|
-
:length="pages"
|
|
74
|
-
@update:value="emits('update:page', internalPage)"
|
|
75
|
-
/>
|
|
76
|
-
</v-row>
|
|
138
|
+
<template #right>
|
|
139
|
+
<local-pagination
|
|
140
|
+
v-model="internalPage"
|
|
141
|
+
:length="pages"
|
|
142
|
+
@update:value="emits('update:page', internalPage)"
|
|
143
|
+
/>
|
|
77
144
|
</template>
|
|
145
|
+
</CardToolbar>
|
|
78
146
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
147
|
+
<!--
|
|
148
|
+
The callers' `extension` is a FILTER row (selects, date ranges), not
|
|
149
|
+
tabs - it is full-width by construction, so it keeps its own line
|
|
150
|
+
under the toolbar rather than being folded into it, which would push
|
|
151
|
+
the pager off the end of the row.
|
|
152
|
+
-->
|
|
153
|
+
<div v-if="$slots.extension" class="table-card__extension">
|
|
154
|
+
<slot name="extension" />
|
|
155
|
+
</div>
|
|
83
156
|
|
|
84
157
|
<!-- Data Table -->
|
|
85
158
|
<v-data-table
|
|
@@ -96,15 +169,32 @@
|
|
|
96
169
|
<template v-for="(_, slotName) in $slots" #[slotName]="slotProps">
|
|
97
170
|
<slot :name="slotName" v-bind="slotProps" />
|
|
98
171
|
</template>
|
|
172
|
+
|
|
173
|
+
<!--
|
|
174
|
+
The design's empty state. Same sentence the table already showed;
|
|
175
|
+
only supplied when the caller has not passed its own, so nobody's
|
|
176
|
+
existing empty state is replaced.
|
|
177
|
+
-->
|
|
178
|
+
<template v-if="!$slots['no-data']" #no-data>
|
|
179
|
+
<div class="table-card__empty">
|
|
180
|
+
<v-icon icon="mdi-magnify-close" size="32" />
|
|
181
|
+
<span>No data available</span>
|
|
182
|
+
</div>
|
|
183
|
+
</template>
|
|
99
184
|
</v-data-table>
|
|
100
185
|
<slot name="footer" />
|
|
101
|
-
</
|
|
186
|
+
</AppCard>
|
|
102
187
|
</v-col>
|
|
103
188
|
</v-row>
|
|
104
189
|
</template>
|
|
105
190
|
|
|
106
191
|
<script lang="ts" setup>
|
|
107
192
|
const props = defineProps({
|
|
193
|
+
// The design's page heading. Empty = no heading, i.e. exactly today's markup.
|
|
194
|
+
title: {
|
|
195
|
+
type: String,
|
|
196
|
+
default: "",
|
|
197
|
+
},
|
|
108
198
|
headers: {
|
|
109
199
|
type: Array as PropType<Array<Record<string, any>>>,
|
|
110
200
|
required: true,
|
|
@@ -185,9 +275,3 @@ watch(
|
|
|
185
275
|
}
|
|
186
276
|
);
|
|
187
277
|
</script>
|
|
188
|
-
|
|
189
|
-
<style scoped>
|
|
190
|
-
.v-data-table :deep(thead th) {
|
|
191
|
-
font-weight: bold !important;
|
|
192
|
-
}
|
|
193
|
-
</style>
|
package/components/TableV3.vue
CHANGED
|
@@ -5,43 +5,39 @@
|
|
|
5
5
|
border="thin"
|
|
6
6
|
rounded="lg"
|
|
7
7
|
:loading="loading"
|
|
8
|
-
class="table-v3"
|
|
8
|
+
class="table-v3 table-card"
|
|
9
9
|
>
|
|
10
|
-
<
|
|
11
|
-
<
|
|
10
|
+
<div class="app-toolbar app-toolbar--plain">
|
|
11
|
+
<v-btn
|
|
12
|
+
icon
|
|
13
|
+
variant="text"
|
|
14
|
+
density="comfortable"
|
|
15
|
+
class="table-v3__refresh-btn"
|
|
16
|
+
@click="emit('refresh')"
|
|
17
|
+
>
|
|
18
|
+
<v-icon size="24">mdi-history</v-icon>
|
|
19
|
+
</v-btn>
|
|
20
|
+
|
|
21
|
+
<div class="app-toolbar__spacer" />
|
|
22
|
+
|
|
23
|
+
<div class="app-toolbar__right">
|
|
24
|
+
<span class="table-card__range">{{ pageRange }}</span>
|
|
12
25
|
<v-btn
|
|
13
|
-
icon
|
|
26
|
+
icon="mdi-chevron-left"
|
|
14
27
|
variant="text"
|
|
15
28
|
density="comfortable"
|
|
16
|
-
|
|
17
|
-
@click="
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
<v-btn
|
|
29
|
-
icon="mdi-chevron-left"
|
|
30
|
-
variant="text"
|
|
31
|
-
density="comfortable"
|
|
32
|
-
:disabled="!canGoPrev"
|
|
33
|
-
@click="goPrev"
|
|
34
|
-
/>
|
|
35
|
-
<v-btn
|
|
36
|
-
icon="mdi-chevron-right"
|
|
37
|
-
variant="text"
|
|
38
|
-
density="comfortable"
|
|
39
|
-
:disabled="!canGoNext"
|
|
40
|
-
@click="goNext"
|
|
41
|
-
/>
|
|
42
|
-
</v-row>
|
|
43
|
-
</template>
|
|
44
|
-
</v-toolbar>
|
|
29
|
+
:disabled="!canGoPrev"
|
|
30
|
+
@click="goPrev"
|
|
31
|
+
/>
|
|
32
|
+
<v-btn
|
|
33
|
+
icon="mdi-chevron-right"
|
|
34
|
+
variant="text"
|
|
35
|
+
density="comfortable"
|
|
36
|
+
:disabled="!canGoNext"
|
|
37
|
+
@click="goNext"
|
|
38
|
+
/>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
45
41
|
|
|
46
42
|
<div v-if="$slots.breadcrumb" class="table-v3__breadcrumb">
|
|
47
43
|
<slot name="breadcrumb" />
|
|
@@ -62,29 +58,27 @@
|
|
|
62
58
|
</template>
|
|
63
59
|
</v-data-table>
|
|
64
60
|
|
|
65
|
-
<
|
|
66
|
-
<
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
</template>
|
|
87
|
-
</v-toolbar>
|
|
61
|
+
<div class="app-toolbar app-toolbar--plain table-v3__footer">
|
|
62
|
+
<div class="app-toolbar__spacer" />
|
|
63
|
+
|
|
64
|
+
<div class="app-toolbar__right">
|
|
65
|
+
<span class="table-card__range">{{ pageRange }}</span>
|
|
66
|
+
<v-btn
|
|
67
|
+
icon="mdi-chevron-left"
|
|
68
|
+
variant="text"
|
|
69
|
+
density="comfortable"
|
|
70
|
+
:disabled="!canGoPrev"
|
|
71
|
+
@click="goPrev"
|
|
72
|
+
/>
|
|
73
|
+
<v-btn
|
|
74
|
+
icon="mdi-chevron-right"
|
|
75
|
+
variant="text"
|
|
76
|
+
density="comfortable"
|
|
77
|
+
:disabled="!canGoNext"
|
|
78
|
+
@click="goNext"
|
|
79
|
+
/>
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
88
82
|
</v-card>
|
|
89
83
|
</template>
|
|
90
84
|
|
|
@@ -161,19 +155,20 @@ watch(
|
|
|
161
155
|
</script>
|
|
162
156
|
|
|
163
157
|
<style scoped>
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
158
|
+
/*
|
|
159
|
+
* The header row is no longer drawn here. It was `#f5f5f5` on `#6b7280`,
|
|
160
|
+
* both literal, so in the dark theme the fixed-header rule won the background
|
|
161
|
+
* and the header read 3.45:1. `.table-card` on the root gives this table the
|
|
162
|
+
* same tokenised header, cell and hover treatment as every other table in the
|
|
163
|
+
* product, which measures 4.77:1 light / 4.71:1 dark.
|
|
164
|
+
*/
|
|
171
165
|
.table-v3 :deep(tbody td) {
|
|
172
166
|
height: 54px;
|
|
173
167
|
}
|
|
174
168
|
|
|
175
169
|
.table-v3__footer {
|
|
176
|
-
border-top: 1px solid
|
|
170
|
+
border-top: 1px solid var(--border);
|
|
171
|
+
border-bottom: 0;
|
|
177
172
|
}
|
|
178
173
|
|
|
179
174
|
.table-v3__refresh-btn {
|
|
@@ -182,8 +177,8 @@ watch(
|
|
|
182
177
|
}
|
|
183
178
|
|
|
184
179
|
.table-v3__breadcrumb {
|
|
185
|
-
border-bottom: 1px solid
|
|
186
|
-
background-color:
|
|
180
|
+
border-bottom: 1px solid var(--border);
|
|
181
|
+
background-color: var(--card);
|
|
187
182
|
padding: 6px 12px;
|
|
188
183
|
}
|
|
189
184
|
</style>
|
package/components/UnitMain.vue
CHANGED
|
@@ -24,10 +24,8 @@
|
|
|
24
24
|
<!-- Primary action -->
|
|
25
25
|
<v-btn
|
|
26
26
|
v-if="canCreateUnit"
|
|
27
|
-
class="text-none mr-3"
|
|
28
|
-
|
|
29
|
-
variant="tonal"
|
|
30
|
-
size="large"
|
|
27
|
+
class="text-none mr-3 screen-btn-primary"
|
|
28
|
+
variant="flat"
|
|
31
29
|
@click="onCreateUnit()"
|
|
32
30
|
>
|
|
33
31
|
Add Unit
|
|
@@ -37,10 +35,8 @@
|
|
|
37
35
|
<template #activator="{ props: t }">
|
|
38
36
|
<v-btn
|
|
39
37
|
v-bind="t"
|
|
40
|
-
class="ma-1"
|
|
41
|
-
variant="
|
|
42
|
-
size="large"
|
|
43
|
-
rounded="pill"
|
|
38
|
+
class="ma-1 screen-icon-btn"
|
|
39
|
+
variant="flat"
|
|
44
40
|
href="/files/unit-sample-data.xlsx"
|
|
45
41
|
target="_blank"
|
|
46
42
|
download
|
|
@@ -55,10 +51,8 @@
|
|
|
55
51
|
<template #activator="{ props: t }">
|
|
56
52
|
<v-btn
|
|
57
53
|
v-bind="t"
|
|
58
|
-
class="ma-1"
|
|
59
|
-
variant="
|
|
60
|
-
size="large"
|
|
61
|
-
rounded="pill"
|
|
54
|
+
class="ma-1 screen-icon-btn"
|
|
55
|
+
variant="flat"
|
|
62
56
|
@click="onImportData"
|
|
63
57
|
>
|
|
64
58
|
<v-icon>mdi-upload</v-icon>
|
|
@@ -71,10 +65,8 @@
|
|
|
71
65
|
<template #activator="{ props: t }">
|
|
72
66
|
<v-btn
|
|
73
67
|
v-bind="t"
|
|
74
|
-
class="ma-1"
|
|
75
|
-
variant="
|
|
76
|
-
size="large"
|
|
77
|
-
rounded="pill"
|
|
68
|
+
class="ma-1 screen-icon-btn"
|
|
69
|
+
variant="flat"
|
|
78
70
|
@click="handleDownloadExcel"
|
|
79
71
|
:loading="isDownloading"
|
|
80
72
|
>
|
|
@@ -88,7 +80,7 @@
|
|
|
88
80
|
|
|
89
81
|
<v-spacer />
|
|
90
82
|
|
|
91
|
-
<v-col cols="auto">
|
|
83
|
+
<v-col cols="auto" class="filter-field">
|
|
92
84
|
<v-text-field
|
|
93
85
|
v-model="searchInput"
|
|
94
86
|
density="compact"
|
|
@@ -1,17 +1,28 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<v-row no-gutters>
|
|
3
|
+
<!--
|
|
4
|
+
The design's title row: page name left, primary action right. Was a
|
|
5
|
+
`tonal` pill drawn by `TableMain` on its own row under the (absent)
|
|
6
|
+
heading. Same handler, same permission gate.
|
|
7
|
+
-->
|
|
8
|
+
<v-col cols="12">
|
|
9
|
+
<PageHeader title="Vehicle Mgmt">
|
|
10
|
+
<template #actions>
|
|
11
|
+
<AppButton v-if="canCreateVehicle" icon="mdi-plus" @click="handleAddVehicleClick">
|
|
12
|
+
Add Vehicle
|
|
13
|
+
</AppButton>
|
|
14
|
+
</template>
|
|
15
|
+
</PageHeader>
|
|
16
|
+
</v-col>
|
|
17
|
+
|
|
3
18
|
<TableMain :headers="headers" :items="items" :loading="loading || getVehiclesPending" :page="page" :pages="pages"
|
|
4
|
-
:pageRange="pageRange"
|
|
5
|
-
|
|
19
|
+
:pageRange="pageRange" @refresh="getVehiclesRefresh"
|
|
20
|
+
show-header @row-click="handleRowClick"
|
|
6
21
|
@update:page="handleUpdatePage">
|
|
7
22
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
append-inner-icon="mdi-magnify" hide-details />
|
|
12
|
-
<!-- <v-select v-model="vehicleTypeFilter" density="compact" item-title="label" item-value="value"
|
|
13
|
-
placeholder="Filter by Type" clearable max-width="200" hide-details :items="typeOptions" /> -->
|
|
14
|
-
</v-row>
|
|
23
|
+
<!-- Search joins the toolbar row rather than stacking a second one. -->
|
|
24
|
+
<template #prepend-additional>
|
|
25
|
+
<AppField v-model="searchInput" search compact placeholder="Search" klass="app-toolbar__search" />
|
|
15
26
|
</template>
|
|
16
27
|
|
|
17
28
|
<template #item.block="{ value }">
|