@almadar/std 14.26.0 → 14.28.0

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.
Files changed (175) hide show
  1. package/behaviors/registry/app/atoms/std-applicant.orb +496 -42
  2. package/behaviors/registry/app/atoms/std-approval-chain.orb +106 -0
  3. package/behaviors/registry/app/atoms/std-approval-request.orb +433 -593
  4. package/behaviors/registry/app/atoms/std-campaign-goal.orb +438 -228
  5. package/behaviors/registry/app/atoms/std-change-order.orb +565 -307
  6. package/behaviors/registry/app/atoms/std-chart-of-accounts.orb +434 -97
  7. package/behaviors/registry/app/atoms/std-checkin.orb +434 -270
  8. package/behaviors/registry/app/atoms/std-class-roster.orb +495 -61
  9. package/behaviors/registry/app/atoms/std-class-session.orb +485 -104
  10. package/behaviors/registry/app/atoms/std-court-deadline.orb +519 -88
  11. package/behaviors/registry/app/atoms/std-customer-account.orb +577 -97
  12. package/behaviors/registry/app/atoms/std-donation-receipt.orb +498 -55
  13. package/behaviors/registry/app/atoms/std-donor.orb +445 -135
  14. package/behaviors/registry/app/atoms/std-drip-sequence.orb +445 -62
  15. package/behaviors/registry/app/atoms/std-driver.orb +465 -480
  16. package/behaviors/registry/app/atoms/std-dunning.orb +450 -512
  17. package/behaviors/registry/app/atoms/std-email-broadcast.orb +517 -64
  18. package/behaviors/registry/app/atoms/std-event.orb +465 -667
  19. package/behaviors/registry/app/atoms/std-health-score.orb +368 -371
  20. package/behaviors/registry/app/atoms/std-help-article.orb +373 -506
  21. package/behaviors/registry/app/atoms/std-help-category.orb +344 -359
  22. package/behaviors/registry/app/atoms/std-interview-slot.orb +490 -48
  23. package/behaviors/registry/app/atoms/std-invoice.orb +494 -291
  24. package/behaviors/registry/app/atoms/std-kitchen-display.orb +588 -96
  25. package/behaviors/registry/app/atoms/std-lease.orb +506 -190
  26. package/behaviors/registry/app/atoms/std-ledger-entry.orb +483 -154
  27. package/behaviors/registry/app/atoms/std-maintenance-request.orb +642 -192
  28. package/behaviors/registry/app/atoms/std-matter.orb +486 -318
  29. package/behaviors/registry/app/atoms/std-membership.orb +512 -102
  30. package/behaviors/registry/app/atoms/std-menu.orb +775 -183
  31. package/behaviors/registry/app/atoms/std-modifier-group.orb +522 -104
  32. package/behaviors/registry/app/atoms/std-multi-party-transaction.orb +130 -0
  33. package/behaviors/registry/app/atoms/std-nps-survey.orb +319 -327
  34. package/behaviors/registry/app/atoms/std-offer-letter.orb +497 -47
  35. package/behaviors/registry/app/atoms/std-payout-ledger.orb +378 -362
  36. package/behaviors/registry/app/atoms/std-pipeline.orb +139 -0
  37. package/behaviors/registry/app/atoms/std-question-bank.orb +379 -346
  38. package/behaviors/registry/app/atoms/std-receipt.orb +553 -44
  39. package/behaviors/registry/app/atoms/std-recurring-charge.orb +419 -832
  40. package/behaviors/registry/app/atoms/std-recurring-schedule.orb +94 -0
  41. package/behaviors/registry/app/atoms/std-renewal-risk.orb +370 -421
  42. package/behaviors/registry/app/atoms/std-rent-charge.orb +657 -55
  43. package/behaviors/registry/app/atoms/std-reorder-rule.orb +510 -59
  44. package/behaviors/registry/app/atoms/std-response-collector.orb +451 -144
  45. package/behaviors/registry/app/atoms/std-rfi.orb +502 -461
  46. package/behaviors/registry/app/atoms/std-route-optimize.orb +448 -158
  47. package/behaviors/registry/app/atoms/std-segment.orb +360 -98
  48. package/behaviors/registry/app/atoms/std-stock-level.orb +486 -103
  49. package/behaviors/registry/app/atoms/std-submittal.orb +538 -526
  50. package/behaviors/registry/app/atoms/std-table-map.orb +88 -51
  51. package/behaviors/registry/app/atoms/std-technician-dispatch.orb +653 -71
  52. package/behaviors/registry/app/atoms/std-telematics-event.orb +310 -215
  53. package/behaviors/registry/app/atoms/std-template-editor.orb +513 -90
  54. package/behaviors/registry/app/atoms/std-tenant.orb +525 -66
  55. package/behaviors/registry/app/atoms/std-ticket-tier.orb +472 -460
  56. package/behaviors/registry/app/atoms/std-time-entry.orb +354 -317
  57. package/behaviors/registry/app/atoms/std-timeline.orb +108 -0
  58. package/behaviors/registry/app/atoms/std-timesheet.orb +551 -284
  59. package/behaviors/registry/app/atoms/std-trial.orb +410 -317
  60. package/behaviors/registry/app/atoms/std-vehicle.orb +398 -563
  61. package/behaviors/registry/app/atoms/std-waitlist.orb +372 -283
  62. package/behaviors/registry/app/atoms/std-warehouse.orb +273 -214
  63. package/behaviors/registry/app/atoms/std-wizard-branching.orb +129 -0
  64. package/behaviors/registry/app/atoms/std-work-order.orb +628 -240
  65. package/behaviors/registry/app/molecules/std-applicant-form.orb +89 -83
  66. package/behaviors/registry/app/molecules/std-application.orb +178 -263
  67. package/behaviors/registry/app/molecules/std-broadcast-builder.orb +67 -176
  68. package/behaviors/registry/app/molecules/std-cart.orb +78 -72
  69. package/behaviors/registry/app/molecules/std-form-builder.orb +437 -176
  70. package/behaviors/registry/app/molecules/std-ledger-entry-form.orb +608 -89
  71. package/behaviors/registry/app/molecules/std-stock-adjustment.orb +501 -102
  72. package/behaviors/registry/app/molecules/std-vendor-onboarding.orb +383 -469
  73. package/behaviors/registry/core/atoms/std-billable-hour.orb +495 -91
  74. package/behaviors/registry/core/atoms/std-board.orb +1367 -0
  75. package/behaviors/registry/core/atoms/std-branching-logic.orb +271 -600
  76. package/behaviors/registry/core/atoms/std-event-log.orb +777 -0
  77. package/behaviors/registry/core/atoms/std-file-store.orb +534 -164
  78. package/behaviors/registry/core/atoms/std-gallery.orb +118 -101
  79. package/behaviors/registry/core/atoms/std-image-upload-multi.orb +87 -57
  80. package/behaviors/registry/core/atoms/std-multi-party-flow.orb +1313 -0
  81. package/behaviors/registry/core/atoms/std-page-tree.orb +342 -484
  82. package/behaviors/registry/core/atoms/std-recurrence.orb +937 -0
  83. package/behaviors/registry/core/atoms/std-rich-editor.orb +288 -416
  84. package/behaviors/registry/core/atoms/std-step-flow.orb +1155 -0
  85. package/behaviors/registry/core/atoms/std-version-history.orb +454 -430
  86. package/behaviors/registry/core/atoms/std-wizard.orb +1085 -0
  87. package/behaviors/registry/core/molecules/std-wizard-form.orb +222 -147
  88. package/dist/behaviors/registry/app/atoms/std-applicant.orb +496 -42
  89. package/dist/behaviors/registry/app/atoms/std-approval-chain.orb +106 -0
  90. package/dist/behaviors/registry/app/atoms/std-approval-request.orb +433 -593
  91. package/dist/behaviors/registry/app/atoms/std-campaign-goal.orb +438 -228
  92. package/dist/behaviors/registry/app/atoms/std-change-order.orb +565 -307
  93. package/dist/behaviors/registry/app/atoms/std-chart-of-accounts.orb +434 -97
  94. package/dist/behaviors/registry/app/atoms/std-checkin.orb +434 -270
  95. package/dist/behaviors/registry/app/atoms/std-class-roster.orb +495 -61
  96. package/dist/behaviors/registry/app/atoms/std-class-session.orb +485 -104
  97. package/dist/behaviors/registry/app/atoms/std-court-deadline.orb +519 -88
  98. package/dist/behaviors/registry/app/atoms/std-customer-account.orb +577 -97
  99. package/dist/behaviors/registry/app/atoms/std-donation-receipt.orb +498 -55
  100. package/dist/behaviors/registry/app/atoms/std-donor.orb +445 -135
  101. package/dist/behaviors/registry/app/atoms/std-drip-sequence.orb +445 -62
  102. package/dist/behaviors/registry/app/atoms/std-driver.orb +465 -480
  103. package/dist/behaviors/registry/app/atoms/std-dunning.orb +450 -512
  104. package/dist/behaviors/registry/app/atoms/std-email-broadcast.orb +517 -64
  105. package/dist/behaviors/registry/app/atoms/std-event.orb +465 -667
  106. package/dist/behaviors/registry/app/atoms/std-health-score.orb +368 -371
  107. package/dist/behaviors/registry/app/atoms/std-help-article.orb +373 -506
  108. package/dist/behaviors/registry/app/atoms/std-help-category.orb +344 -359
  109. package/dist/behaviors/registry/app/atoms/std-interview-slot.orb +490 -48
  110. package/dist/behaviors/registry/app/atoms/std-invoice.orb +494 -291
  111. package/dist/behaviors/registry/app/atoms/std-kitchen-display.orb +588 -96
  112. package/dist/behaviors/registry/app/atoms/std-lease.orb +506 -190
  113. package/dist/behaviors/registry/app/atoms/std-ledger-entry.orb +483 -154
  114. package/dist/behaviors/registry/app/atoms/std-maintenance-request.orb +642 -192
  115. package/dist/behaviors/registry/app/atoms/std-matter.orb +486 -318
  116. package/dist/behaviors/registry/app/atoms/std-membership.orb +512 -102
  117. package/dist/behaviors/registry/app/atoms/std-menu.orb +775 -183
  118. package/dist/behaviors/registry/app/atoms/std-modifier-group.orb +522 -104
  119. package/dist/behaviors/registry/app/atoms/std-multi-party-transaction.orb +130 -0
  120. package/dist/behaviors/registry/app/atoms/std-nps-survey.orb +319 -327
  121. package/dist/behaviors/registry/app/atoms/std-offer-letter.orb +497 -47
  122. package/dist/behaviors/registry/app/atoms/std-payout-ledger.orb +378 -362
  123. package/dist/behaviors/registry/app/atoms/std-pipeline.orb +139 -0
  124. package/dist/behaviors/registry/app/atoms/std-question-bank.orb +379 -346
  125. package/dist/behaviors/registry/app/atoms/std-receipt.orb +553 -44
  126. package/dist/behaviors/registry/app/atoms/std-recurring-charge.orb +419 -832
  127. package/dist/behaviors/registry/app/atoms/std-recurring-schedule.orb +94 -0
  128. package/dist/behaviors/registry/app/atoms/std-renewal-risk.orb +370 -421
  129. package/dist/behaviors/registry/app/atoms/std-rent-charge.orb +657 -55
  130. package/dist/behaviors/registry/app/atoms/std-reorder-rule.orb +510 -59
  131. package/dist/behaviors/registry/app/atoms/std-response-collector.orb +451 -144
  132. package/dist/behaviors/registry/app/atoms/std-rfi.orb +502 -461
  133. package/dist/behaviors/registry/app/atoms/std-route-optimize.orb +448 -158
  134. package/dist/behaviors/registry/app/atoms/std-segment.orb +360 -98
  135. package/dist/behaviors/registry/app/atoms/std-stock-level.orb +486 -103
  136. package/dist/behaviors/registry/app/atoms/std-submittal.orb +538 -526
  137. package/dist/behaviors/registry/app/atoms/std-table-map.orb +88 -51
  138. package/dist/behaviors/registry/app/atoms/std-technician-dispatch.orb +653 -71
  139. package/dist/behaviors/registry/app/atoms/std-telematics-event.orb +310 -215
  140. package/dist/behaviors/registry/app/atoms/std-template-editor.orb +513 -90
  141. package/dist/behaviors/registry/app/atoms/std-tenant.orb +525 -66
  142. package/dist/behaviors/registry/app/atoms/std-ticket-tier.orb +472 -460
  143. package/dist/behaviors/registry/app/atoms/std-time-entry.orb +354 -317
  144. package/dist/behaviors/registry/app/atoms/std-timeline.orb +108 -0
  145. package/dist/behaviors/registry/app/atoms/std-timesheet.orb +551 -284
  146. package/dist/behaviors/registry/app/atoms/std-trial.orb +410 -317
  147. package/dist/behaviors/registry/app/atoms/std-vehicle.orb +398 -563
  148. package/dist/behaviors/registry/app/atoms/std-waitlist.orb +372 -283
  149. package/dist/behaviors/registry/app/atoms/std-warehouse.orb +273 -214
  150. package/dist/behaviors/registry/app/atoms/std-wizard-branching.orb +129 -0
  151. package/dist/behaviors/registry/app/atoms/std-work-order.orb +628 -240
  152. package/dist/behaviors/registry/app/molecules/std-applicant-form.orb +89 -83
  153. package/dist/behaviors/registry/app/molecules/std-application.orb +178 -263
  154. package/dist/behaviors/registry/app/molecules/std-broadcast-builder.orb +67 -176
  155. package/dist/behaviors/registry/app/molecules/std-cart.orb +78 -72
  156. package/dist/behaviors/registry/app/molecules/std-form-builder.orb +437 -176
  157. package/dist/behaviors/registry/app/molecules/std-ledger-entry-form.orb +608 -89
  158. package/dist/behaviors/registry/app/molecules/std-stock-adjustment.orb +501 -102
  159. package/dist/behaviors/registry/app/molecules/std-vendor-onboarding.orb +383 -469
  160. package/dist/behaviors/registry/core/atoms/std-billable-hour.orb +495 -91
  161. package/dist/behaviors/registry/core/atoms/std-board.orb +1367 -0
  162. package/dist/behaviors/registry/core/atoms/std-branching-logic.orb +271 -600
  163. package/dist/behaviors/registry/core/atoms/std-event-log.orb +777 -0
  164. package/dist/behaviors/registry/core/atoms/std-file-store.orb +534 -164
  165. package/dist/behaviors/registry/core/atoms/std-gallery.orb +118 -101
  166. package/dist/behaviors/registry/core/atoms/std-image-upload-multi.orb +87 -57
  167. package/dist/behaviors/registry/core/atoms/std-multi-party-flow.orb +1313 -0
  168. package/dist/behaviors/registry/core/atoms/std-page-tree.orb +342 -484
  169. package/dist/behaviors/registry/core/atoms/std-recurrence.orb +937 -0
  170. package/dist/behaviors/registry/core/atoms/std-rich-editor.orb +288 -416
  171. package/dist/behaviors/registry/core/atoms/std-step-flow.orb +1155 -0
  172. package/dist/behaviors/registry/core/atoms/std-version-history.orb +454 -430
  173. package/dist/behaviors/registry/core/atoms/std-wizard.orb +1085 -0
  174. package/dist/behaviors/registry/core/molecules/std-wizard-form.orb +222 -147
  175. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "std-stock-level",
3
3
  "version": "1.0.0",
4
- "description": "std-stock-level — on-hand quantity primitive for a SKU at a location. Owns a StockLevel entity and a single ledger trait that loads current levels, renders them in a data-grid, and surfaces Adjust / Recount actions per row.",
4
+ "description": "std-stock-level — on-hand quantity primitive for a SKU at a location. Lists stock rows in `browsing`; opens row detail in `viewing_single` with Adjust / Recount actions.",
5
5
  "orbitals": [
6
6
  {
7
7
  "name": "StockLevelOrbital",
@@ -58,6 +58,53 @@
58
58
  "category": "interaction",
59
59
  "linkedEntity": "StockLevel",
60
60
  "emits": [
61
+ {
62
+ "event": "OPEN_STOCK",
63
+ "payloadSchema": [
64
+ {
65
+ "name": "id",
66
+ "type": "string",
67
+ "required": true
68
+ },
69
+ {
70
+ "name": "row.id",
71
+ "type": "string",
72
+ "required": true
73
+ },
74
+ {
75
+ "name": "row.sku",
76
+ "type": "string",
77
+ "required": true
78
+ },
79
+ {
80
+ "name": "row.productName",
81
+ "type": "string"
82
+ },
83
+ {
84
+ "name": "row.locationId",
85
+ "type": "string"
86
+ },
87
+ {
88
+ "name": "row.onHand",
89
+ "type": "number"
90
+ },
91
+ {
92
+ "name": "row.reserved",
93
+ "type": "number"
94
+ },
95
+ {
96
+ "name": "row.reorderPoint",
97
+ "type": "number"
98
+ },
99
+ {
100
+ "name": "row.lastCounted",
101
+ "type": "string"
102
+ }
103
+ ]
104
+ },
105
+ {
106
+ "event": "CLOSE_VIEW"
107
+ },
61
108
  {
62
109
  "event": "ADJUST_STOCK",
63
110
  "payloadSchema": [
@@ -110,6 +157,9 @@
110
157
  {
111
158
  "name": "browsing"
112
159
  },
160
+ {
161
+ "name": "viewing_single"
162
+ },
113
163
  {
114
164
  "name": "error"
115
165
  }
@@ -143,6 +193,21 @@
143
193
  }
144
194
  ]
145
195
  },
196
+ {
197
+ "key": "OPEN_STOCK",
198
+ "name": "Open Stock",
199
+ "payloadSchema": [
200
+ {
201
+ "name": "id",
202
+ "type": "string",
203
+ "required": true
204
+ },
205
+ {
206
+ "name": "row",
207
+ "type": "StockLevel"
208
+ }
209
+ ]
210
+ },
146
211
  {
147
212
  "key": "ADJUST_STOCK",
148
213
  "name": "Adjust Stock",
@@ -164,6 +229,10 @@
164
229
  "required": true
165
230
  }
166
231
  ]
232
+ },
233
+ {
234
+ "key": "CLOSE_VIEW",
235
+ "name": "Close View"
167
236
  }
168
237
  ],
169
238
  "transitions": [
@@ -186,22 +255,22 @@
186
255
  "render-ui",
187
256
  "main",
188
257
  {
189
- "className": "py-12",
190
- "gap": "md",
191
258
  "direction": "vertical",
259
+ "align": "center",
260
+ "className": "py-12",
192
261
  "type": "stack",
262
+ "gap": "md",
193
263
  "children": [
194
264
  {
195
265
  "type": "spinner"
196
266
  },
197
267
  {
198
268
  "content": "Loading stock levels…",
269
+ "variant": "caption",
199
270
  "color": "muted",
200
- "type": "typography",
201
- "variant": "caption"
271
+ "type": "typography"
202
272
  }
203
- ],
204
- "align": "center"
273
+ ]
205
274
  }
206
275
  ]
207
276
  ]
@@ -216,148 +285,305 @@
216
285
  "main",
217
286
  {
218
287
  "type": "stack",
288
+ "direction": "vertical",
219
289
  "children": [
220
290
  {
221
- "type": "stack",
222
- "gap": "sm",
223
291
  "direction": "horizontal",
292
+ "align": "center",
293
+ "type": "stack",
224
294
  "children": [
225
295
  {
226
- "name": "package",
227
- "type": "icon"
296
+ "type": "icon",
297
+ "name": "package"
228
298
  },
229
299
  {
230
- "variant": "h3",
231
300
  "type": "typography",
232
- "content": "@config.title"
301
+ "content": "@config.title",
302
+ "variant": "h3"
233
303
  }
234
- ]
304
+ ],
305
+ "gap": "sm"
235
306
  },
236
307
  {
237
- "loop": true,
238
- "autoPlay": true,
239
- "showDots": true,
240
- "showArrows": true,
241
- "autoPlayInterval": 5000.0,
242
- "items": [
308
+ "children": [
309
+ {
310
+ "value": "@payload.data.length",
311
+ "type": "stat-display",
312
+ "icon": "package",
313
+ "label": "Total SKUs"
314
+ },
243
315
  {
244
- "alt": "Featured SKU 1",
245
- "src": "https://picsum.photos/seed/sku1/800/400"
316
+ "type": "stat-display",
317
+ "value": "12",
318
+ "label": "Below reorder",
319
+ "icon": "alert-triangle"
246
320
  },
247
321
  {
248
- "src": "https://picsum.photos/seed/sku2/800/400",
249
- "alt": "Featured SKU 2"
322
+ "type": "stat-display",
323
+ "value": "8,420",
324
+ "icon": "boxes",
325
+ "label": "Total on hand"
250
326
  },
251
327
  {
252
- "src": "https://picsum.photos/seed/sku3/800/400",
253
- "alt": "Featured SKU 3"
328
+ "label": "Reserved",
329
+ "type": "stat-display",
330
+ "icon": "lock",
331
+ "value": "1,260"
254
332
  }
255
333
  ],
256
- "type": "carousel"
334
+ "cols": 4.0,
335
+ "type": "simple-grid"
336
+ },
337
+ {
338
+ "type": "divider"
257
339
  },
258
340
  {
259
- "type": "tag-cloud",
260
- "variant": "primary",
261
- "tags": [
341
+ "type": "data-grid",
342
+ "fields": [
262
343
  {
263
- "label": "Electronics"
344
+ "label": "SKU",
345
+ "name": "sku",
346
+ "variant": "caption"
264
347
  },
265
348
  {
266
- "label": "Apparel"
349
+ "variant": "caption",
350
+ "label": "Product",
351
+ "name": "productName"
267
352
  },
268
353
  {
269
- "label": "Home Goods"
354
+ "name": "locationId",
355
+ "label": "Location",
356
+ "variant": "caption"
270
357
  },
271
358
  {
272
- "label": "Grocery"
359
+ "label": "On Hand",
360
+ "name": "onHand",
361
+ "variant": "caption"
273
362
  },
274
363
  {
275
- "label": "Outdoor"
364
+ "variant": "caption",
365
+ "name": "reorderPoint",
366
+ "label": "Reorder At"
367
+ }
368
+ ],
369
+ "cols": 1.0,
370
+ "gap": "sm",
371
+ "entity": "@payload.data",
372
+ "itemActions": [
373
+ {
374
+ "icon": "arrow-right",
375
+ "event": "OPEN_STOCK",
376
+ "label": "Open",
377
+ "variant": "primary"
276
378
  },
277
379
  {
278
- "label": "Books"
380
+ "event": "ADJUST_STOCK",
381
+ "variant": "danger",
382
+ "label": "Adjust"
279
383
  }
280
384
  ]
281
- },
282
- {
283
- "type": "divider"
284
- },
385
+ }
386
+ ],
387
+ "gap": "md"
388
+ }
389
+ ]
390
+ ]
391
+ },
392
+ {
393
+ "from": "loading",
394
+ "to": "error",
395
+ "event": "StockLevelLoadFailed",
396
+ "effects": [
397
+ [
398
+ "render-ui",
399
+ "main",
400
+ {
401
+ "variant": "error",
402
+ "message": "@payload.error",
403
+ "type": "alert"
404
+ }
405
+ ]
406
+ ]
407
+ },
408
+ {
409
+ "from": "browsing",
410
+ "to": "viewing_single",
411
+ "event": "OPEN_STOCK",
412
+ "effects": [
413
+ [
414
+ "set",
415
+ "@entity.id",
416
+ "@payload.row.id"
417
+ ],
418
+ [
419
+ "set",
420
+ "@entity.sku",
421
+ "@payload.row.sku"
422
+ ],
423
+ [
424
+ "set",
425
+ "@entity.productName",
426
+ "@payload.row.productName"
427
+ ],
428
+ [
429
+ "set",
430
+ "@entity.locationId",
431
+ "@payload.row.locationId"
432
+ ],
433
+ [
434
+ "set",
435
+ "@entity.onHand",
436
+ "@payload.row.onHand"
437
+ ],
438
+ [
439
+ "set",
440
+ "@entity.reserved",
441
+ "@payload.row.reserved"
442
+ ],
443
+ [
444
+ "set",
445
+ "@entity.reorderPoint",
446
+ "@payload.row.reorderPoint"
447
+ ],
448
+ [
449
+ "set",
450
+ "@entity.lastCounted",
451
+ "@payload.row.lastCounted"
452
+ ],
453
+ [
454
+ "render-ui",
455
+ "main",
456
+ {
457
+ "children": [
285
458
  {
286
459
  "children": [
287
460
  {
288
- "value": "@payload.data.length",
289
- "type": "stat-display",
290
- "label": "Total SKUs"
461
+ "type": "button",
462
+ "action": "CLOSE_VIEW",
463
+ "variant": "ghost",
464
+ "label": "Back"
291
465
  },
292
466
  {
293
- "value": 0.0,
294
- "label": "Reorder Threshold",
295
- "type": "stat-display"
467
+ "type": "icon",
468
+ "name": "package"
296
469
  },
297
470
  {
298
- "type": "stat-display",
299
- "label": "On Hand",
300
- "value": 0.0
471
+ "variant": "h3",
472
+ "type": "typography",
473
+ "content": "@entity.productName"
474
+ },
475
+ {
476
+ "type": "badge",
477
+ "label": "@entity.sku",
478
+ "variant": "primary"
301
479
  }
302
480
  ],
303
- "type": "simple-grid",
304
- "cols": 3.0
481
+ "type": "stack",
482
+ "align": "center",
483
+ "direction": "horizontal",
484
+ "gap": "sm"
305
485
  },
306
486
  {
307
- "type": "data-grid",
308
- "entity": "@payload.data",
309
- "fields": [
487
+ "type": "divider"
488
+ },
489
+ {
490
+ "type": "stack",
491
+ "gap": "sm",
492
+ "children": [
310
493
  {
311
- "name": "sku",
312
- "label": "SKU",
313
- "variant": "caption"
494
+ "gap": "md",
495
+ "type": "stack",
496
+ "direction": "horizontal",
497
+ "children": [
498
+ {
499
+ "type": "typography",
500
+ "variant": "caption",
501
+ "color": "muted",
502
+ "content": "Location"
503
+ },
504
+ {
505
+ "content": "@entity.locationId",
506
+ "type": "typography",
507
+ "variant": "body"
508
+ }
509
+ ]
314
510
  },
315
511
  {
316
- "name": "productName",
317
- "variant": "caption",
318
- "label": "Product"
319
- },
512
+ "direction": "horizontal",
513
+ "type": "stack",
514
+ "gap": "md",
515
+ "children": [
516
+ {
517
+ "variant": "caption",
518
+ "type": "typography",
519
+ "content": "Last counted",
520
+ "color": "muted"
521
+ },
522
+ {
523
+ "type": "typography",
524
+ "variant": "body",
525
+ "content": "@entity.lastCounted"
526
+ }
527
+ ]
528
+ }
529
+ ],
530
+ "direction": "vertical"
531
+ },
532
+ {
533
+ "type": "divider"
534
+ },
535
+ {
536
+ "children": [
320
537
  {
321
- "name": "locationId",
322
- "variant": "caption",
323
- "label": "Location"
538
+ "type": "stat-display",
539
+ "label": "On hand",
540
+ "value": "@entity.onHand",
541
+ "icon": "boxes"
324
542
  },
325
543
  {
326
- "name": "onHand",
327
- "variant": "caption",
328
- "label": "On Hand"
544
+ "icon": "lock",
545
+ "label": "Reserved",
546
+ "value": "@entity.reserved",
547
+ "type": "stat-display"
329
548
  },
330
549
  {
331
- "name": "reorderPoint",
332
- "label": "Reorder At",
333
- "variant": "caption"
550
+ "type": "stat-display",
551
+ "label": "Reorder at",
552
+ "value": "@entity.reorderPoint",
553
+ "icon": "alert-triangle"
334
554
  }
335
555
  ],
336
- "cols": 1.0,
556
+ "cols": 3.0,
557
+ "type": "simple-grid"
558
+ },
559
+ {
337
560
  "gap": "sm",
338
- "itemActions": [
561
+ "direction": "horizontal",
562
+ "type": "stack",
563
+ "align": "center",
564
+ "children": [
339
565
  {
340
- "icon": "sliders",
341
- "label": "Adjust",
342
- "event": "ADJUST_STOCK",
343
- "variant": "primary"
566
+ "variant": "primary",
567
+ "action": "ADJUST_STOCK",
568
+ "type": "button",
569
+ "actionPayload": {
570
+ "id": "@entity.id"
571
+ },
572
+ "label": "Adjust"
344
573
  },
345
574
  {
575
+ "actionPayload": {
576
+ "id": "@entity.id"
577
+ },
578
+ "action": "RECOUNT",
346
579
  "label": "Recount",
347
- "icon": "clipboard-check",
348
- "event": "RECOUNT",
349
- "variant": "ghost"
580
+ "variant": "secondary",
581
+ "type": "button"
350
582
  }
351
583
  ]
352
- },
353
- {
354
- "hasMore": true,
355
- "threshold": "200px",
356
- "isLoading": false,
357
- "loadMoreEvent": "INIT",
358
- "type": "infinite-scroll-sentinel"
359
584
  }
360
585
  ],
586
+ "type": "stack",
361
587
  "gap": "md",
362
588
  "direction": "vertical"
363
589
  }
@@ -365,24 +591,135 @@
365
591
  ]
366
592
  },
367
593
  {
368
- "from": "loading",
369
- "to": "error",
370
- "event": "StockLevelLoadFailed",
594
+ "from": "browsing",
595
+ "to": "loading",
596
+ "event": "ADJUST_STOCK",
371
597
  "effects": [
598
+ [
599
+ "set",
600
+ "@entity.id",
601
+ "@payload.id"
602
+ ],
603
+ [
604
+ "fetch",
605
+ "StockLevel",
606
+ {
607
+ "emit": {
608
+ "failure": "StockLevelLoadFailed",
609
+ "success": "StockLevelLoaded"
610
+ }
611
+ }
612
+ ],
372
613
  [
373
614
  "render-ui",
374
615
  "main",
375
616
  {
376
- "type": "alert",
377
- "message": "@payload.error",
378
- "variant": "error"
617
+ "align": "center",
618
+ "type": "stack",
619
+ "gap": "md",
620
+ "direction": "vertical",
621
+ "className": "py-12",
622
+ "children": [
623
+ {
624
+ "type": "spinner"
625
+ },
626
+ {
627
+ "type": "typography",
628
+ "variant": "caption",
629
+ "content": "Adjusting stock…",
630
+ "color": "muted"
631
+ }
632
+ ]
379
633
  }
380
634
  ]
381
635
  ]
382
636
  },
383
637
  {
384
638
  "from": "browsing",
385
- "to": "browsing",
639
+ "to": "loading",
640
+ "event": "RECOUNT",
641
+ "effects": [
642
+ [
643
+ "set",
644
+ "@entity.id",
645
+ "@payload.id"
646
+ ],
647
+ [
648
+ "fetch",
649
+ "StockLevel",
650
+ {
651
+ "emit": {
652
+ "success": "StockLevelLoaded",
653
+ "failure": "StockLevelLoadFailed"
654
+ }
655
+ }
656
+ ],
657
+ [
658
+ "render-ui",
659
+ "main",
660
+ {
661
+ "className": "py-12",
662
+ "type": "stack",
663
+ "direction": "vertical",
664
+ "align": "center",
665
+ "gap": "md",
666
+ "children": [
667
+ {
668
+ "type": "spinner"
669
+ },
670
+ {
671
+ "type": "typography",
672
+ "content": "Recounting stock…",
673
+ "color": "muted",
674
+ "variant": "caption"
675
+ }
676
+ ]
677
+ }
678
+ ]
679
+ ]
680
+ },
681
+ {
682
+ "from": "viewing_single",
683
+ "to": "loading",
684
+ "event": "CLOSE_VIEW",
685
+ "effects": [
686
+ [
687
+ "fetch",
688
+ "StockLevel",
689
+ {
690
+ "emit": {
691
+ "failure": "StockLevelLoadFailed",
692
+ "success": "StockLevelLoaded"
693
+ }
694
+ }
695
+ ],
696
+ [
697
+ "render-ui",
698
+ "main",
699
+ {
700
+ "type": "stack",
701
+ "direction": "vertical",
702
+ "align": "center",
703
+ "children": [
704
+ {
705
+ "type": "spinner"
706
+ },
707
+ {
708
+ "type": "typography",
709
+ "content": "Loading stock levels…",
710
+ "variant": "caption",
711
+ "color": "muted"
712
+ }
713
+ ],
714
+ "gap": "md",
715
+ "className": "py-12"
716
+ }
717
+ ]
718
+ ]
719
+ },
720
+ {
721
+ "from": "viewing_single",
722
+ "to": "loading",
386
723
  "event": "ADJUST_STOCK",
387
724
  "effects": [
388
725
  [
@@ -390,20 +727,43 @@
390
727
  "@entity.id",
391
728
  "@payload.id"
392
729
  ],
730
+ [
731
+ "fetch",
732
+ "StockLevel",
733
+ {
734
+ "emit": {
735
+ "success": "StockLevelLoaded",
736
+ "failure": "StockLevelLoadFailed"
737
+ }
738
+ }
739
+ ],
393
740
  [
394
741
  "render-ui",
395
742
  "main",
396
743
  {
397
- "variant": "success",
398
- "type": "alert",
399
- "message": "Stock adjustment requested"
744
+ "type": "stack",
745
+ "direction": "vertical",
746
+ "align": "center",
747
+ "className": "py-12",
748
+ "children": [
749
+ {
750
+ "type": "spinner"
751
+ },
752
+ {
753
+ "variant": "caption",
754
+ "type": "typography",
755
+ "content": "Adjusting stock…",
756
+ "color": "muted"
757
+ }
758
+ ],
759
+ "gap": "md"
400
760
  }
401
761
  ]
402
762
  ]
403
763
  },
404
764
  {
405
- "from": "browsing",
406
- "to": "browsing",
765
+ "from": "viewing_single",
766
+ "to": "loading",
407
767
  "event": "RECOUNT",
408
768
  "effects": [
409
769
  [
@@ -411,13 +771,36 @@
411
771
  "@entity.id",
412
772
  "@payload.id"
413
773
  ],
774
+ [
775
+ "fetch",
776
+ "StockLevel",
777
+ {
778
+ "emit": {
779
+ "failure": "StockLevelLoadFailed",
780
+ "success": "StockLevelLoaded"
781
+ }
782
+ }
783
+ ],
414
784
  [
415
785
  "render-ui",
416
786
  "main",
417
787
  {
418
- "variant": "info",
419
- "message": "Recount scheduled",
420
- "type": "alert"
788
+ "gap": "md",
789
+ "direction": "vertical",
790
+ "type": "stack",
791
+ "className": "py-12",
792
+ "children": [
793
+ {
794
+ "type": "spinner"
795
+ },
796
+ {
797
+ "variant": "caption",
798
+ "color": "muted",
799
+ "content": "Recounting stock…",
800
+ "type": "typography"
801
+ }
802
+ ],
803
+ "align": "center"
421
804
  }
422
805
  ]
423
806
  ]
@@ -441,8 +824,8 @@
441
824
  "render-ui",
442
825
  "main",
443
826
  {
444
- "size": "sm",
445
- "type": "spinner"
827
+ "type": "spinner",
828
+ "size": "sm"
446
829
  }
447
830
  ]
448
831
  ]