@7365admin1/layer-common 4.97.1-staging.653 → 4.97.1-staging.654
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.
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
<v-text-field v-model="from" type="date" label="From" density="compact" hide-details style="max-width: 170px" />
|
|
40
40
|
<v-text-field v-model="to" type="date" label="To" density="compact" hide-details style="max-width: 170px" />
|
|
41
41
|
<v-select v-model="type" :items="typeChoices" label="What" density="compact" hide-details style="max-width: 200px" />
|
|
42
|
-
<v-
|
|
42
|
+
<v-autocomplete v-if="!item" v-model="itemPick" :items="[{ value: '', title: 'All items' }, ...itemChoices]" label="Item" density="compact" hide-details style="max-width: 240px" />
|
|
43
43
|
<v-text-field v-model="location" label="Where (unit, tenant or area)" density="compact" hide-details clearable style="max-width: 240px" />
|
|
44
44
|
</div>
|
|
45
45
|
|
|
@@ -203,7 +203,15 @@ watch(show, async (open) => {
|
|
|
203
203
|
loadHoldings();
|
|
204
204
|
if (!props.item) {
|
|
205
205
|
try {
|
|
206
|
-
|
|
206
|
+
// The API pages at 200: read every page so a big store can filter by any item.
|
|
207
|
+
// ponytail: capped at 25 pages (5,000 items); switch to a server-side search if a store outgrows it.
|
|
208
|
+
const all: { value: string; title: string }[] = [];
|
|
209
|
+
for (let page = 1, pages = 1; page <= Math.min(pages, 25); page++) {
|
|
210
|
+
const res = await api.getItems(props.store._id, { page, limit: 200 });
|
|
211
|
+
all.push(...res.items.map((i) => ({ value: i._id, title: i.name })));
|
|
212
|
+
pages = res.pages;
|
|
213
|
+
}
|
|
214
|
+
itemChoices.value = all;
|
|
207
215
|
} catch {
|
|
208
216
|
itemChoices.value = [];
|
|
209
217
|
}
|
|
@@ -78,6 +78,8 @@
|
|
|
78
78
|
maxlength="80"
|
|
79
79
|
style="max-width: 180px"
|
|
80
80
|
/>
|
|
81
|
+
<!-- A delivery's new item has six fields: put qty / ordered / price on their own line so none gets squashed. -->
|
|
82
|
+
<div v-if="mode === 'receive'" class="w-100" aria-hidden="true" />
|
|
81
83
|
</template>
|
|
82
84
|
<v-autocomplete
|
|
83
85
|
v-else
|
|
@@ -90,7 +92,7 @@
|
|
|
90
92
|
density="comfortable"
|
|
91
93
|
:rules="[requiredRule]"
|
|
92
94
|
class="flex-grow-1"
|
|
93
|
-
style="min-width:
|
|
95
|
+
style="min-width: 220px"
|
|
94
96
|
@update:search="(q: string) => typedSearch(line, q)"
|
|
95
97
|
>
|
|
96
98
|
<template #item="{ props: p, item }">
|
|
@@ -140,7 +142,8 @@
|
|
|
140
142
|
label="Unit price"
|
|
141
143
|
prefix="$"
|
|
142
144
|
density="comfortable"
|
|
143
|
-
|
|
145
|
+
class="line-price"
|
|
146
|
+
:class="{ 'line-price--wide': line.newItem }"
|
|
144
147
|
hint="Leave blank to keep the last price"
|
|
145
148
|
persistent-hint
|
|
146
149
|
/>
|
|
@@ -496,4 +499,18 @@ watch(show, (open) => {
|
|
|
496
499
|
height: auto !important;
|
|
497
500
|
flex-wrap: wrap;
|
|
498
501
|
}
|
|
502
|
+
/* Unit price: compact beside an existing item; wide enough for its hint on a new item's second line or a phone. */
|
|
503
|
+
.line-price {
|
|
504
|
+
flex: 1 1 140px;
|
|
505
|
+
max-width: 140px;
|
|
506
|
+
}
|
|
507
|
+
.line-price--wide {
|
|
508
|
+
flex-basis: 240px;
|
|
509
|
+
max-width: 320px;
|
|
510
|
+
}
|
|
511
|
+
@media (max-width: 599px) {
|
|
512
|
+
.line-price {
|
|
513
|
+
max-width: none;
|
|
514
|
+
}
|
|
515
|
+
}
|
|
499
516
|
</style>
|
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.654",
|
|
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.",
|