@7365admin1/layer-common 4.168.1 → 4.168.2

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @iservice365/layer-common
2
2
 
3
+ ## 4.168.2
4
+
5
+ ### Patch Changes
6
+
7
+ - f17de07: Inventory: Record a delivery's new-item row puts Qty / Ordered / Unit price on their own line (no squashed Unit price), works at phone width; History item filter lists every item, not only the first 200.
8
+
3
9
  ## 4.168.1
4
10
 
5
11
  ### Patch Changes
@@ -3801,11 +3807,11 @@ Monthly report: a month that had patrols opens the list of that month's patrol r
3801
3807
  `utils/console-tier.ts` + `composables/useConsoleTier.ts` mirror the server's
3802
3808
  own rule from two endpoints the console already calls, unprojected:
3803
3809
 
3804
- GET /api/members/user/:user/app/admin the Seven365 staff membership
3805
- GET /api/roles/id/:role that membership's role document
3810
+ GET /api/members/user/:user/app/admin the Seven365 staff membership
3811
+ GET /api/roles/id/:role that membership's role document
3806
3812
 
3807
- owner = member.type === "admin" && role.type === "admin" && role.default === true
3808
- staff = member.type === "admin" && role.type === "admin"
3813
+ owner = member.type === "admin" && role.type === "admin" && role.default === true
3814
+ staff = member.type === "admin" && role.type === "admin"
3809
3815
 
3810
3816
  `role.default` is the marker because it is the only property of a platform
3811
3817
  staff role no API caller can set - `role.controller.ts` validates create and
@@ -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-select v-if="!item" v-model="itemPick" :items="[{ value: '', title: 'All items' }, ...itemChoices]" label="Item" density="compact" hide-details style="max-width: 240px" />
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
- itemChoices.value = (await api.getItems(props.store._id, { limit: 200 })).items.map((i) => ({ value: i._id, title: i.name }));
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: 240px"
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
- style="max-width: 140px"
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.168.1",
5
+ "version": "4.168.2",
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.",