@7365admin1/layer-common 3.2.2-staging.93 → 3.2.2-staging.94

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.
@@ -361,6 +361,20 @@
361
361
  border-bottom: 1px solid var(--border);
362
362
  }
363
363
 
364
+ /**
365
+ * The callers' filter row (`#extension`). It was a `v-toolbar` extension, i.e.
366
+ * a fixed-height second bar; it is now a plain row under the toolbar with the
367
+ * same rule under it, so it can size to whatever the caller puts in it.
368
+ */
369
+ .table-card__extension {
370
+ border-bottom: 1px solid var(--border);
371
+ }
372
+
373
+ .table-card__loading {
374
+ position: absolute;
375
+ z-index: 1;
376
+ }
377
+
364
378
  .table-card__range {
365
379
  font-size: 12px;
366
380
  font-weight: 600;
@@ -2,7 +2,7 @@
2
2
  <v-row no-gutters align="center" justify="center">
3
3
  <v-col cols="12" lg="12">
4
4
  <TableMain
5
- :title="`${siteName} Units`"
5
+ :title="`${siteName} Equipment Items`"
6
6
  :items="items"
7
7
  :headers="headers"
8
8
  :loading="loading"
@@ -2,7 +2,7 @@
2
2
  <v-row no-gutters align="center" justify="center">
3
3
  <v-col cols="12" lg="12">
4
4
  <TableMain
5
- :title="`${siteName} Units`"
5
+ :title="`${siteName} Equipment`"
6
6
  :items="items"
7
7
  :headers="headers"
8
8
  :loading="loading"
@@ -15,6 +15,24 @@
15
15
  -->
16
16
  <template>
17
17
  <v-row no-gutters>
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
+ <v-col cols="12" v-if="title">
33
+ <PageHeader :title="title" />
34
+ </v-col>
35
+
18
36
  <!-- Top Actions -->
19
37
  <v-col cols="12" class="mb-2" v-if="canCreate || $slots.actions">
20
38
  <v-row no-gutters>
@@ -62,43 +80,56 @@
62
80
 
63
81
  <!-- Table Card -->
64
82
  <v-col cols="12">
65
- <v-card
66
- width="100%"
67
- variant="flat"
68
- class="table-card"
69
- :loading="loading"
70
- >
83
+ <!--
84
+ THE DESIGN'S CARD AND ITS IN-CARD TOP ROW (Phase 9).
85
+
86
+ Was a `v-card` + `v-toolbar`. `v-card` brings its own radius, elevation
87
+ and surface at a specificity a class has to fight, and `v-toolbar` puts
88
+ its `extension` on a SECOND stacked row. `AppCard` + `CardToolbar` are
89
+ the primitives the design is drawn with, already proven on
90
+ `ServiceProviderMain` / `MemberMain`.
91
+
92
+ Placement only. The refresh button, the `prepend-additional` slot, the
93
+ page range, the pager, the `extension` slot and the `footer` slot are
94
+ the same controls, emitting the same events, in the same order. The
95
+ `loading` bar `v-card` used to draw is drawn explicitly so a loading
96
+ screen still says so.
97
+ -->
98
+ <AppCard class="table-card">
99
+ <v-progress-linear
100
+ v-if="loading"
101
+ indeterminate
102
+ height="2"
103
+ class="table-card__loading"
104
+ />
105
+
71
106
  <!-- Toolbar -->
72
- <v-toolbar
73
- density="compact"
74
- color="transparent"
75
- class="table-card__toolbar"
76
- :extension-height="extensionHeight"
77
- >
78
- <template #prepend>
107
+ <CardToolbar :count="pageRange">
108
+ <template #left>
79
109
  <v-btn fab icon density="comfortable" variant="text" @click="emits('refresh')">
80
110
  <v-icon>mdi-refresh</v-icon>
81
111
  </v-btn>
82
112
  <slot name="prepend-additional" />
83
113
  </template>
84
114
 
85
- <template #append>
86
- <v-row no-gutters justify="end" align="center">
87
- <span class="mr-2 table-card__range">
88
- {{ pageRange }}
89
- </span>
90
- <local-pagination
91
- v-model="internalPage"
92
- :length="pages"
93
- @update:value="emits('update:page', internalPage)"
94
- />
95
- </v-row>
115
+ <template #right>
116
+ <local-pagination
117
+ v-model="internalPage"
118
+ :length="pages"
119
+ @update:value="emits('update:page', internalPage)"
120
+ />
96
121
  </template>
122
+ </CardToolbar>
97
123
 
98
- <template v-if="$slots.extension" #extension>
99
- <slot name="extension" />
100
- </template>
101
- </v-toolbar>
124
+ <!--
125
+ The callers' `extension` is a FILTER row (selects, date ranges), not
126
+ tabs - it is full-width by construction, so it keeps its own line
127
+ under the toolbar rather than being folded into it, which would push
128
+ the pager off the end of the row.
129
+ -->
130
+ <div v-if="$slots.extension" class="table-card__extension">
131
+ <slot name="extension" />
132
+ </div>
102
133
 
103
134
  <!-- Data Table -->
104
135
  <v-data-table
@@ -129,13 +160,18 @@
129
160
  </template>
130
161
  </v-data-table>
131
162
  <slot name="footer" />
132
- </v-card>
163
+ </AppCard>
133
164
  </v-col>
134
165
  </v-row>
135
166
  </template>
136
167
 
137
168
  <script lang="ts" setup>
138
169
  const props = defineProps({
170
+ // The design's page heading. Empty = no heading, i.e. exactly today's markup.
171
+ title: {
172
+ type: String,
173
+ default: "",
174
+ },
139
175
  headers: {
140
176
  type: Array as PropType<Array<Record<string, any>>>,
141
177
  required: true,
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@7365admin1/layer-common",
3
3
  "license": "MIT",
4
4
  "type": "module",
5
- "version": "3.2.2-staging.93",
5
+ "version": "3.2.2-staging.94",
6
6
  "author": "7365admin1",
7
7
  "main": "./nuxt.config.ts",
8
8
  "publishConfig": {