@almadar/std 14.26.0 → 14.27.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 (151) hide show
  1. package/behaviors/registry/app/atoms/std-applicant.orb +496 -42
  2. package/behaviors/registry/app/atoms/std-approval-request.orb +433 -593
  3. package/behaviors/registry/app/atoms/std-campaign-goal.orb +438 -228
  4. package/behaviors/registry/app/atoms/std-change-order.orb +565 -307
  5. package/behaviors/registry/app/atoms/std-chart-of-accounts.orb +434 -97
  6. package/behaviors/registry/app/atoms/std-checkin.orb +434 -270
  7. package/behaviors/registry/app/atoms/std-class-roster.orb +495 -61
  8. package/behaviors/registry/app/atoms/std-class-session.orb +485 -104
  9. package/behaviors/registry/app/atoms/std-court-deadline.orb +519 -88
  10. package/behaviors/registry/app/atoms/std-customer-account.orb +577 -97
  11. package/behaviors/registry/app/atoms/std-donation-receipt.orb +498 -55
  12. package/behaviors/registry/app/atoms/std-donor.orb +445 -135
  13. package/behaviors/registry/app/atoms/std-drip-sequence.orb +445 -62
  14. package/behaviors/registry/app/atoms/std-driver.orb +465 -480
  15. package/behaviors/registry/app/atoms/std-dunning.orb +450 -512
  16. package/behaviors/registry/app/atoms/std-email-broadcast.orb +517 -64
  17. package/behaviors/registry/app/atoms/std-event.orb +465 -667
  18. package/behaviors/registry/app/atoms/std-health-score.orb +368 -371
  19. package/behaviors/registry/app/atoms/std-help-article.orb +373 -506
  20. package/behaviors/registry/app/atoms/std-help-category.orb +344 -359
  21. package/behaviors/registry/app/atoms/std-interview-slot.orb +490 -48
  22. package/behaviors/registry/app/atoms/std-invoice.orb +494 -291
  23. package/behaviors/registry/app/atoms/std-kitchen-display.orb +588 -96
  24. package/behaviors/registry/app/atoms/std-lease.orb +506 -190
  25. package/behaviors/registry/app/atoms/std-ledger-entry.orb +483 -154
  26. package/behaviors/registry/app/atoms/std-maintenance-request.orb +642 -192
  27. package/behaviors/registry/app/atoms/std-matter.orb +486 -318
  28. package/behaviors/registry/app/atoms/std-membership.orb +512 -102
  29. package/behaviors/registry/app/atoms/std-menu.orb +775 -183
  30. package/behaviors/registry/app/atoms/std-modifier-group.orb +522 -104
  31. package/behaviors/registry/app/atoms/std-nps-survey.orb +319 -327
  32. package/behaviors/registry/app/atoms/std-offer-letter.orb +497 -47
  33. package/behaviors/registry/app/atoms/std-payout-ledger.orb +378 -362
  34. package/behaviors/registry/app/atoms/std-question-bank.orb +379 -346
  35. package/behaviors/registry/app/atoms/std-receipt.orb +553 -44
  36. package/behaviors/registry/app/atoms/std-recurring-charge.orb +419 -832
  37. package/behaviors/registry/app/atoms/std-renewal-risk.orb +370 -421
  38. package/behaviors/registry/app/atoms/std-rent-charge.orb +657 -55
  39. package/behaviors/registry/app/atoms/std-reorder-rule.orb +510 -59
  40. package/behaviors/registry/app/atoms/std-response-collector.orb +451 -144
  41. package/behaviors/registry/app/atoms/std-rfi.orb +502 -461
  42. package/behaviors/registry/app/atoms/std-route-optimize.orb +448 -158
  43. package/behaviors/registry/app/atoms/std-segment.orb +360 -98
  44. package/behaviors/registry/app/atoms/std-stock-level.orb +486 -103
  45. package/behaviors/registry/app/atoms/std-submittal.orb +538 -526
  46. package/behaviors/registry/app/atoms/std-table-map.orb +88 -51
  47. package/behaviors/registry/app/atoms/std-technician-dispatch.orb +653 -71
  48. package/behaviors/registry/app/atoms/std-telematics-event.orb +310 -215
  49. package/behaviors/registry/app/atoms/std-template-editor.orb +513 -90
  50. package/behaviors/registry/app/atoms/std-tenant.orb +525 -66
  51. package/behaviors/registry/app/atoms/std-ticket-tier.orb +472 -460
  52. package/behaviors/registry/app/atoms/std-time-entry.orb +354 -317
  53. package/behaviors/registry/app/atoms/std-timesheet.orb +551 -284
  54. package/behaviors/registry/app/atoms/std-trial.orb +410 -317
  55. package/behaviors/registry/app/atoms/std-vehicle.orb +398 -563
  56. package/behaviors/registry/app/atoms/std-waitlist.orb +372 -283
  57. package/behaviors/registry/app/atoms/std-warehouse.orb +273 -214
  58. package/behaviors/registry/app/atoms/std-work-order.orb +628 -240
  59. package/behaviors/registry/app/molecules/std-applicant-form.orb +89 -83
  60. package/behaviors/registry/app/molecules/std-application.orb +178 -263
  61. package/behaviors/registry/app/molecules/std-broadcast-builder.orb +67 -176
  62. package/behaviors/registry/app/molecules/std-cart.orb +78 -72
  63. package/behaviors/registry/app/molecules/std-form-builder.orb +437 -176
  64. package/behaviors/registry/app/molecules/std-ledger-entry-form.orb +608 -89
  65. package/behaviors/registry/app/molecules/std-stock-adjustment.orb +501 -102
  66. package/behaviors/registry/app/molecules/std-vendor-onboarding.orb +383 -469
  67. package/behaviors/registry/core/atoms/std-billable-hour.orb +495 -91
  68. package/behaviors/registry/core/atoms/std-branching-logic.orb +271 -600
  69. package/behaviors/registry/core/atoms/std-file-store.orb +534 -164
  70. package/behaviors/registry/core/atoms/std-gallery.orb +118 -101
  71. package/behaviors/registry/core/atoms/std-image-upload-multi.orb +87 -57
  72. package/behaviors/registry/core/atoms/std-page-tree.orb +342 -484
  73. package/behaviors/registry/core/atoms/std-rich-editor.orb +288 -416
  74. package/behaviors/registry/core/atoms/std-version-history.orb +454 -430
  75. package/behaviors/registry/core/molecules/std-wizard-form.orb +222 -147
  76. package/dist/behaviors/registry/app/atoms/std-applicant.orb +496 -42
  77. package/dist/behaviors/registry/app/atoms/std-approval-request.orb +433 -593
  78. package/dist/behaviors/registry/app/atoms/std-campaign-goal.orb +438 -228
  79. package/dist/behaviors/registry/app/atoms/std-change-order.orb +565 -307
  80. package/dist/behaviors/registry/app/atoms/std-chart-of-accounts.orb +434 -97
  81. package/dist/behaviors/registry/app/atoms/std-checkin.orb +434 -270
  82. package/dist/behaviors/registry/app/atoms/std-class-roster.orb +495 -61
  83. package/dist/behaviors/registry/app/atoms/std-class-session.orb +485 -104
  84. package/dist/behaviors/registry/app/atoms/std-court-deadline.orb +519 -88
  85. package/dist/behaviors/registry/app/atoms/std-customer-account.orb +577 -97
  86. package/dist/behaviors/registry/app/atoms/std-donation-receipt.orb +498 -55
  87. package/dist/behaviors/registry/app/atoms/std-donor.orb +445 -135
  88. package/dist/behaviors/registry/app/atoms/std-drip-sequence.orb +445 -62
  89. package/dist/behaviors/registry/app/atoms/std-driver.orb +465 -480
  90. package/dist/behaviors/registry/app/atoms/std-dunning.orb +450 -512
  91. package/dist/behaviors/registry/app/atoms/std-email-broadcast.orb +517 -64
  92. package/dist/behaviors/registry/app/atoms/std-event.orb +465 -667
  93. package/dist/behaviors/registry/app/atoms/std-health-score.orb +368 -371
  94. package/dist/behaviors/registry/app/atoms/std-help-article.orb +373 -506
  95. package/dist/behaviors/registry/app/atoms/std-help-category.orb +344 -359
  96. package/dist/behaviors/registry/app/atoms/std-interview-slot.orb +490 -48
  97. package/dist/behaviors/registry/app/atoms/std-invoice.orb +494 -291
  98. package/dist/behaviors/registry/app/atoms/std-kitchen-display.orb +588 -96
  99. package/dist/behaviors/registry/app/atoms/std-lease.orb +506 -190
  100. package/dist/behaviors/registry/app/atoms/std-ledger-entry.orb +483 -154
  101. package/dist/behaviors/registry/app/atoms/std-maintenance-request.orb +642 -192
  102. package/dist/behaviors/registry/app/atoms/std-matter.orb +486 -318
  103. package/dist/behaviors/registry/app/atoms/std-membership.orb +512 -102
  104. package/dist/behaviors/registry/app/atoms/std-menu.orb +775 -183
  105. package/dist/behaviors/registry/app/atoms/std-modifier-group.orb +522 -104
  106. package/dist/behaviors/registry/app/atoms/std-nps-survey.orb +319 -327
  107. package/dist/behaviors/registry/app/atoms/std-offer-letter.orb +497 -47
  108. package/dist/behaviors/registry/app/atoms/std-payout-ledger.orb +378 -362
  109. package/dist/behaviors/registry/app/atoms/std-question-bank.orb +379 -346
  110. package/dist/behaviors/registry/app/atoms/std-receipt.orb +553 -44
  111. package/dist/behaviors/registry/app/atoms/std-recurring-charge.orb +419 -832
  112. package/dist/behaviors/registry/app/atoms/std-renewal-risk.orb +370 -421
  113. package/dist/behaviors/registry/app/atoms/std-rent-charge.orb +657 -55
  114. package/dist/behaviors/registry/app/atoms/std-reorder-rule.orb +510 -59
  115. package/dist/behaviors/registry/app/atoms/std-response-collector.orb +451 -144
  116. package/dist/behaviors/registry/app/atoms/std-rfi.orb +502 -461
  117. package/dist/behaviors/registry/app/atoms/std-route-optimize.orb +448 -158
  118. package/dist/behaviors/registry/app/atoms/std-segment.orb +360 -98
  119. package/dist/behaviors/registry/app/atoms/std-stock-level.orb +486 -103
  120. package/dist/behaviors/registry/app/atoms/std-submittal.orb +538 -526
  121. package/dist/behaviors/registry/app/atoms/std-table-map.orb +88 -51
  122. package/dist/behaviors/registry/app/atoms/std-technician-dispatch.orb +653 -71
  123. package/dist/behaviors/registry/app/atoms/std-telematics-event.orb +310 -215
  124. package/dist/behaviors/registry/app/atoms/std-template-editor.orb +513 -90
  125. package/dist/behaviors/registry/app/atoms/std-tenant.orb +525 -66
  126. package/dist/behaviors/registry/app/atoms/std-ticket-tier.orb +472 -460
  127. package/dist/behaviors/registry/app/atoms/std-time-entry.orb +354 -317
  128. package/dist/behaviors/registry/app/atoms/std-timesheet.orb +551 -284
  129. package/dist/behaviors/registry/app/atoms/std-trial.orb +410 -317
  130. package/dist/behaviors/registry/app/atoms/std-vehicle.orb +398 -563
  131. package/dist/behaviors/registry/app/atoms/std-waitlist.orb +372 -283
  132. package/dist/behaviors/registry/app/atoms/std-warehouse.orb +273 -214
  133. package/dist/behaviors/registry/app/atoms/std-work-order.orb +628 -240
  134. package/dist/behaviors/registry/app/molecules/std-applicant-form.orb +89 -83
  135. package/dist/behaviors/registry/app/molecules/std-application.orb +178 -263
  136. package/dist/behaviors/registry/app/molecules/std-broadcast-builder.orb +67 -176
  137. package/dist/behaviors/registry/app/molecules/std-cart.orb +78 -72
  138. package/dist/behaviors/registry/app/molecules/std-form-builder.orb +437 -176
  139. package/dist/behaviors/registry/app/molecules/std-ledger-entry-form.orb +608 -89
  140. package/dist/behaviors/registry/app/molecules/std-stock-adjustment.orb +501 -102
  141. package/dist/behaviors/registry/app/molecules/std-vendor-onboarding.orb +383 -469
  142. package/dist/behaviors/registry/core/atoms/std-billable-hour.orb +495 -91
  143. package/dist/behaviors/registry/core/atoms/std-branching-logic.orb +271 -600
  144. package/dist/behaviors/registry/core/atoms/std-file-store.orb +534 -164
  145. package/dist/behaviors/registry/core/atoms/std-gallery.orb +118 -101
  146. package/dist/behaviors/registry/core/atoms/std-image-upload-multi.orb +87 -57
  147. package/dist/behaviors/registry/core/atoms/std-page-tree.orb +342 -484
  148. package/dist/behaviors/registry/core/atoms/std-rich-editor.orb +288 -416
  149. package/dist/behaviors/registry/core/atoms/std-version-history.orb +454 -430
  150. package/dist/behaviors/registry/core/molecules/std-wizard-form.orb +222 -147
  151. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "std-driver",
3
3
  "version": "1.0.0",
4
- "description": "std-driver — fleet driver primitive tracking license info, hire date, status, and currently-assigned vehicle.",
4
+ "description": "std-driver — fleet driver primitive tracking license info, hire date, status, assigned vehicle. Lists drivers in `browsing`; opens detail in `viewing_single` with Suspend / Reinstate / Terminate / Assign Vehicle actions.",
5
5
  "orbitals": [
6
6
  {
7
7
  "name": "DriverOrbital",
@@ -88,58 +88,7 @@
88
88
  "linkedEntity": "Driver",
89
89
  "emits": [
90
90
  {
91
- "event": "VIEW",
92
- "payloadSchema": [
93
- {
94
- "name": "id",
95
- "type": "string",
96
- "required": true
97
- },
98
- {
99
- "name": "source",
100
- "type": "string"
101
- }
102
- ]
103
- },
104
- {
105
- "event": "EDIT",
106
- "payloadSchema": [
107
- {
108
- "name": "id",
109
- "type": "string",
110
- "required": true
111
- },
112
- {
113
- "name": "source",
114
- "type": "string"
115
- }
116
- ]
117
- },
118
- {
119
- "event": "CREATE",
120
- "payloadSchema": [
121
- {
122
- "name": "source",
123
- "type": "string"
124
- }
125
- ]
126
- },
127
- {
128
- "event": "REQUEST_DELETE",
129
- "payloadSchema": [
130
- {
131
- "name": "id",
132
- "type": "string",
133
- "required": true
134
- },
135
- {
136
- "name": "source",
137
- "type": "string"
138
- }
139
- ]
140
- },
141
- {
142
- "event": "SUSPEND",
91
+ "event": "OPEN_DRIVER",
143
92
  "payloadSchema": [
144
93
  {
145
94
  "name": "id",
@@ -196,173 +145,45 @@
196
145
  ]
197
146
  },
198
147
  {
199
- "event": "REINSTATE",
148
+ "event": "CLOSE_VIEW"
149
+ },
150
+ {
151
+ "event": "ASSIGN_VEHICLE",
200
152
  "payloadSchema": [
201
153
  {
202
154
  "name": "id",
203
155
  "type": "string",
204
156
  "required": true
205
- },
206
- {
207
- "name": "row.id",
208
- "type": "string",
209
- "required": true
210
- },
211
- {
212
- "name": "row.name",
213
- "type": "string",
214
- "required": true
215
- },
216
- {
217
- "name": "row.licenseNumber",
218
- "type": "string",
219
- "required": true
220
- },
221
- {
222
- "name": "row.licenseClass",
223
- "type": "string"
224
- },
225
- {
226
- "name": "row.licenseExpiresAt",
227
- "type": "string"
228
- },
229
- {
230
- "name": "row.hiredAt",
231
- "type": "string"
232
- },
233
- {
234
- "name": "row.phone",
235
- "type": "string"
236
- },
237
- {
238
- "name": "row.email",
239
- "type": "string"
240
- },
241
- {
242
- "name": "row.status",
243
- "type": "string"
244
- },
245
- {
246
- "name": "row.assignedVehicleId",
247
- "type": "string"
248
- },
249
- {
250
- "name": "row.pendingId",
251
- "type": "string"
252
157
  }
253
158
  ]
254
159
  },
255
160
  {
256
- "event": "TERMINATE",
161
+ "event": "SUSPEND",
257
162
  "payloadSchema": [
258
163
  {
259
164
  "name": "id",
260
165
  "type": "string",
261
166
  "required": true
262
- },
263
- {
264
- "name": "row.id",
265
- "type": "string",
266
- "required": true
267
- },
268
- {
269
- "name": "row.name",
270
- "type": "string",
271
- "required": true
272
- },
273
- {
274
- "name": "row.licenseNumber",
275
- "type": "string",
276
- "required": true
277
- },
278
- {
279
- "name": "row.licenseClass",
280
- "type": "string"
281
- },
282
- {
283
- "name": "row.licenseExpiresAt",
284
- "type": "string"
285
- },
286
- {
287
- "name": "row.hiredAt",
288
- "type": "string"
289
- },
290
- {
291
- "name": "row.phone",
292
- "type": "string"
293
- },
294
- {
295
- "name": "row.email",
296
- "type": "string"
297
- },
298
- {
299
- "name": "row.status",
300
- "type": "string"
301
- },
302
- {
303
- "name": "row.assignedVehicleId",
304
- "type": "string"
305
- },
306
- {
307
- "name": "row.pendingId",
308
- "type": "string"
309
167
  }
310
168
  ]
311
169
  },
312
170
  {
313
- "event": "ASSIGN_VEHICLE",
171
+ "event": "REINSTATE",
314
172
  "payloadSchema": [
315
173
  {
316
174
  "name": "id",
317
175
  "type": "string",
318
176
  "required": true
319
- },
320
- {
321
- "name": "row.id",
322
- "type": "string",
323
- "required": true
324
- },
325
- {
326
- "name": "row.name",
327
- "type": "string",
328
- "required": true
329
- },
177
+ }
178
+ ]
179
+ },
180
+ {
181
+ "event": "TERMINATE",
182
+ "payloadSchema": [
330
183
  {
331
- "name": "row.licenseNumber",
184
+ "name": "id",
332
185
  "type": "string",
333
186
  "required": true
334
- },
335
- {
336
- "name": "row.licenseClass",
337
- "type": "string"
338
- },
339
- {
340
- "name": "row.licenseExpiresAt",
341
- "type": "string"
342
- },
343
- {
344
- "name": "row.hiredAt",
345
- "type": "string"
346
- },
347
- {
348
- "name": "row.phone",
349
- "type": "string"
350
- },
351
- {
352
- "name": "row.email",
353
- "type": "string"
354
- },
355
- {
356
- "name": "row.status",
357
- "type": "string"
358
- },
359
- {
360
- "name": "row.assignedVehicleId",
361
- "type": "string"
362
- },
363
- {
364
- "name": "row.pendingId",
365
- "type": "string"
366
187
  }
367
188
  ]
368
189
  },
@@ -400,7 +221,10 @@
400
221
  "isInitial": true
401
222
  },
402
223
  {
403
- "name": "viewing"
224
+ "name": "browsing"
225
+ },
226
+ {
227
+ "name": "viewing_single"
404
228
  },
405
229
  {
406
230
  "name": "error"
@@ -440,49 +264,23 @@
440
264
  ]
441
265
  },
442
266
  {
443
- "key": "REFRESH",
444
- "name": "Refresh",
445
- "payloadSchema": [
446
- {
447
- "name": "source",
448
- "type": "string"
449
- }
450
- ]
451
- },
452
- {
453
- "key": "SEARCH",
454
- "name": "Search",
455
- "payloadSchema": [
456
- {
457
- "name": "query",
458
- "type": "string"
459
- }
460
- ]
461
- },
462
- {
463
- "key": "FILTER_STATUS",
464
- "name": "Filter Status",
465
- "payloadSchema": [
466
- {
467
- "name": "status",
468
- "type": "string"
469
- }
470
- ]
471
- },
472
- {
473
- "key": "SUSPEND",
474
- "name": "Suspend",
267
+ "key": "OPEN_DRIVER",
268
+ "name": "Open Driver",
475
269
  "payloadSchema": [
476
270
  {
477
271
  "name": "id",
478
272
  "type": "string",
479
273
  "required": true
274
+ },
275
+ {
276
+ "name": "row",
277
+ "type": "Driver"
480
278
  }
481
279
  ]
482
280
  },
483
281
  {
484
- "key": "REINSTATE",
485
- "name": "Reinstate",
282
+ "key": "SUSPEND",
283
+ "name": "Suspend",
486
284
  "payloadSchema": [
487
285
  {
488
286
  "name": "id",
@@ -492,15 +290,8 @@
492
290
  ]
493
291
  },
494
292
  {
495
- "key": "TERMINATE",
496
- "name": "Terminate",
497
- "payloadSchema": [
498
- {
499
- "name": "id",
500
- "type": "string",
501
- "required": true
502
- }
503
- ]
293
+ "key": "CLOSE_VIEW",
294
+ "name": "Close View"
504
295
  },
505
296
  {
506
297
  "key": "ASSIGN_VEHICLE",
@@ -514,18 +305,8 @@
514
305
  ]
515
306
  },
516
307
  {
517
- "key": "CREATE",
518
- "name": "Create",
519
- "payloadSchema": [
520
- {
521
- "name": "source",
522
- "type": "string"
523
- }
524
- ]
525
- },
526
- {
527
- "key": "VIEW",
528
- "name": "View",
308
+ "key": "REINSTATE",
309
+ "name": "Reinstate",
529
310
  "payloadSchema": [
530
311
  {
531
312
  "name": "id",
@@ -535,8 +316,8 @@
535
316
  ]
536
317
  },
537
318
  {
538
- "key": "EDIT",
539
- "name": "Edit",
319
+ "key": "TERMINATE",
320
+ "name": "Terminate",
540
321
  "payloadSchema": [
541
322
  {
542
323
  "name": "id",
@@ -544,20 +325,9 @@
544
325
  "required": true
545
326
  }
546
327
  ]
547
- },
548
- {
549
- "key": "REQUEST_DELETE",
550
- "name": "Request Delete",
551
- "payloadSchema": [
552
- {
553
- "name": "id",
554
- "type": "string",
555
- "required": true
556
- }
557
- ]
558
- }
559
- ],
560
- "transitions": [
328
+ }
329
+ ],
330
+ "transitions": [
561
331
  {
562
332
  "from": "loading",
563
333
  "to": "loading",
@@ -568,8 +338,8 @@
568
338
  "Driver",
569
339
  {
570
340
  "emit": {
571
- "failure": "DriverLoadFailed",
572
- "success": "DriverLoaded"
341
+ "success": "DriverLoaded",
342
+ "failure": "DriverLoadFailed"
573
343
  }
574
344
  }
575
345
  ],
@@ -578,87 +348,113 @@
578
348
  "main",
579
349
  {
580
350
  "gap": "md",
581
- "type": "stack",
582
- "direction": "vertical",
583
351
  "className": "py-12",
584
- "align": "center",
585
352
  "children": [
586
353
  {
587
354
  "type": "spinner"
588
355
  },
589
356
  {
590
- "type": "typography",
591
357
  "color": "muted",
592
- "content": "Loading drivers…",
593
- "variant": "caption"
358
+ "type": "typography",
359
+ "variant": "caption",
360
+ "content": "Loading drivers…"
594
361
  }
595
- ]
362
+ ],
363
+ "type": "stack",
364
+ "direction": "vertical",
365
+ "align": "center"
596
366
  }
597
367
  ]
598
368
  ]
599
369
  },
600
370
  {
601
371
  "from": "loading",
602
- "to": "viewing",
372
+ "to": "browsing",
603
373
  "event": "DriverLoaded",
604
374
  "effects": [
605
375
  [
606
376
  "render-ui",
607
377
  "main",
608
378
  {
609
- "type": "stack",
610
379
  "gap": "md",
611
- "direction": "vertical",
380
+ "type": "stack",
612
381
  "children": [
613
382
  {
614
383
  "direction": "horizontal",
384
+ "type": "stack",
385
+ "gap": "sm",
615
386
  "align": "center",
616
387
  "children": [
617
388
  {
618
389
  "type": "icon",
619
- "name": "truck"
390
+ "name": "user"
620
391
  },
621
392
  {
622
393
  "content": "@config.title",
623
- "type": "typography",
624
- "variant": "h3"
394
+ "variant": "h3",
395
+ "type": "typography"
396
+ }
397
+ ]
398
+ },
399
+ {
400
+ "children": [
401
+ {
402
+ "icon": "users",
403
+ "value": "@payload.data.length",
404
+ "type": "stat-display",
405
+ "label": "Total drivers"
625
406
  },
626
407
  {
627
- "type": "status-dot",
628
- "status": "online",
629
- "pulse": true,
630
- "size": "md",
631
- "label": "On duty"
408
+ "type": "stat-display",
409
+ "icon": "check-circle",
410
+ "label": "Active",
411
+ "value": "24"
632
412
  },
633
413
  {
634
- "label": "On Duty",
635
- "variant": "default",
636
- "type": "badge"
414
+ "label": "On leave",
415
+ "type": "stat-display",
416
+ "icon": "pause-circle",
417
+ "value": "3"
637
418
  },
638
419
  {
639
- "variant": "primary",
640
- "action": "CREATE",
641
- "label": "New Driver",
642
- "type": "button"
420
+ "type": "stat-display",
421
+ "value": "4",
422
+ "label": "License expiring 30d",
423
+ "icon": "alert-triangle"
643
424
  }
644
425
  ],
645
- "type": "stack",
646
- "gap": "sm"
426
+ "cols": 4.0,
427
+ "type": "simple-grid"
647
428
  },
648
429
  {
649
430
  "type": "divider"
650
431
  },
651
432
  {
652
- "entity": "@payload.data",
433
+ "type": "data-grid",
434
+ "itemActions": [
435
+ {
436
+ "variant": "primary",
437
+ "label": "Open",
438
+ "event": "OPEN_DRIVER",
439
+ "icon": "arrow-right"
440
+ },
441
+ {
442
+ "event": "SUSPEND",
443
+ "label": "Suspend",
444
+ "variant": "danger"
445
+ }
446
+ ],
447
+ "cols": 1.0,
448
+ "gap": "sm",
653
449
  "fields": [
654
450
  {
451
+ "variant": "caption",
655
452
  "name": "name",
656
- "label": "Name",
657
- "variant": "caption"
453
+ "label": "Name"
658
454
  },
659
455
  {
456
+ "label": "License",
660
457
  "variant": "caption",
661
- "label": "License #",
662
458
  "name": "licenseNumber"
663
459
  },
664
460
  {
@@ -667,63 +463,25 @@
667
463
  "name": "licenseClass"
668
464
  },
669
465
  {
670
- "label": "Expires",
671
466
  "name": "licenseExpiresAt",
467
+ "label": "Expires",
672
468
  "variant": "caption"
673
469
  },
674
470
  {
675
- "name": "status",
676
471
  "variant": "badge",
472
+ "name": "status",
677
473
  "label": "Status"
678
474
  },
679
475
  {
680
476
  "name": "assignedVehicleId",
681
- "label": "Vehicle",
682
- "variant": "caption"
477
+ "variant": "caption",
478
+ "label": "Vehicle"
683
479
  }
684
480
  ],
685
- "cols": 1.0,
686
- "type": "data-grid",
687
- "gap": "sm",
688
- "itemActions": [
689
- {
690
- "label": "View",
691
- "event": "VIEW",
692
- "variant": "secondary"
693
- },
694
- {
695
- "event": "EDIT",
696
- "label": "Edit",
697
- "variant": "secondary"
698
- },
699
- {
700
- "variant": "secondary",
701
- "label": "Suspend",
702
- "event": "SUSPEND"
703
- },
704
- {
705
- "label": "Reinstate",
706
- "event": "REINSTATE",
707
- "variant": "secondary"
708
- },
709
- {
710
- "variant": "danger",
711
- "label": "Terminate",
712
- "event": "TERMINATE"
713
- },
714
- {
715
- "event": "ASSIGN_VEHICLE",
716
- "label": "Assign Vehicle",
717
- "variant": "primary"
718
- },
719
- {
720
- "label": "Delete",
721
- "event": "REQUEST_DELETE",
722
- "variant": "danger"
723
- }
724
- ]
481
+ "entity": "@payload.data"
725
482
  }
726
- ]
483
+ ],
484
+ "direction": "vertical"
727
485
  }
728
486
  ]
729
487
  ]
@@ -737,57 +495,271 @@
737
495
  "render-ui",
738
496
  "main",
739
497
  {
498
+ "variant": "error",
740
499
  "message": "@payload.error",
741
- "type": "alert",
742
- "variant": "error"
500
+ "type": "alert"
743
501
  }
744
502
  ]
745
503
  ]
746
504
  },
747
505
  {
748
- "from": "viewing",
749
- "to": "loading",
750
- "event": "REFRESH",
506
+ "from": "browsing",
507
+ "to": "viewing_single",
508
+ "event": "OPEN_DRIVER",
751
509
  "effects": [
752
510
  [
753
- "fetch",
754
- "Driver",
755
- {
756
- "emit": {
757
- "success": "DriverLoaded",
758
- "failure": "DriverLoadFailed"
759
- }
760
- }
511
+ "set",
512
+ "@entity.id",
513
+ "@payload.row.id"
514
+ ],
515
+ [
516
+ "set",
517
+ "@entity.name",
518
+ "@payload.row.name"
519
+ ],
520
+ [
521
+ "set",
522
+ "@entity.licenseNumber",
523
+ "@payload.row.licenseNumber"
524
+ ],
525
+ [
526
+ "set",
527
+ "@entity.licenseClass",
528
+ "@payload.row.licenseClass"
529
+ ],
530
+ [
531
+ "set",
532
+ "@entity.licenseExpiresAt",
533
+ "@payload.row.licenseExpiresAt"
534
+ ],
535
+ [
536
+ "set",
537
+ "@entity.hiredAt",
538
+ "@payload.row.hiredAt"
539
+ ],
540
+ [
541
+ "set",
542
+ "@entity.phone",
543
+ "@payload.row.phone"
544
+ ],
545
+ [
546
+ "set",
547
+ "@entity.email",
548
+ "@payload.row.email"
549
+ ],
550
+ [
551
+ "set",
552
+ "@entity.status",
553
+ "@payload.row.status"
554
+ ],
555
+ [
556
+ "set",
557
+ "@entity.assignedVehicleId",
558
+ "@payload.row.assignedVehicleId"
761
559
  ],
762
560
  [
763
561
  "render-ui",
764
562
  "main",
765
563
  {
766
- "align": "center",
564
+ "gap": "md",
565
+ "direction": "vertical",
767
566
  "children": [
768
567
  {
769
- "type": "spinner"
568
+ "gap": "sm",
569
+ "align": "center",
570
+ "direction": "horizontal",
571
+ "children": [
572
+ {
573
+ "type": "button",
574
+ "action": "CLOSE_VIEW",
575
+ "variant": "ghost",
576
+ "label": "Back"
577
+ },
578
+ {
579
+ "name": "user",
580
+ "type": "icon"
581
+ },
582
+ {
583
+ "content": "@entity.name",
584
+ "type": "typography",
585
+ "variant": "h3"
586
+ },
587
+ {
588
+ "label": "@entity.licenseClass",
589
+ "type": "badge",
590
+ "variant": "primary"
591
+ },
592
+ {
593
+ "variant": "default",
594
+ "type": "badge",
595
+ "label": "@entity.status"
596
+ }
597
+ ],
598
+ "type": "stack"
770
599
  },
771
600
  {
772
- "type": "typography",
773
- "color": "muted",
774
- "content": "Refreshing drivers…",
775
- "variant": "caption"
601
+ "type": "divider"
602
+ },
603
+ {
604
+ "gap": "sm",
605
+ "children": [
606
+ {
607
+ "type": "stack",
608
+ "children": [
609
+ {
610
+ "content": "License #",
611
+ "variant": "caption",
612
+ "type": "typography",
613
+ "color": "muted"
614
+ },
615
+ {
616
+ "content": "@entity.licenseNumber",
617
+ "type": "typography",
618
+ "variant": "body"
619
+ }
620
+ ],
621
+ "direction": "horizontal",
622
+ "gap": "md"
623
+ },
624
+ {
625
+ "children": [
626
+ {
627
+ "color": "muted",
628
+ "type": "typography",
629
+ "variant": "caption",
630
+ "content": "Phone"
631
+ },
632
+ {
633
+ "type": "typography",
634
+ "variant": "body",
635
+ "content": "@entity.phone"
636
+ }
637
+ ],
638
+ "type": "stack",
639
+ "direction": "horizontal",
640
+ "gap": "md"
641
+ },
642
+ {
643
+ "type": "stack",
644
+ "children": [
645
+ {
646
+ "type": "typography",
647
+ "variant": "caption",
648
+ "color": "muted",
649
+ "content": "Email"
650
+ },
651
+ {
652
+ "content": "@entity.email",
653
+ "variant": "body",
654
+ "type": "typography"
655
+ }
656
+ ],
657
+ "gap": "md",
658
+ "direction": "horizontal"
659
+ },
660
+ {
661
+ "children": [
662
+ {
663
+ "color": "muted",
664
+ "type": "typography",
665
+ "variant": "caption",
666
+ "content": "Vehicle"
667
+ },
668
+ {
669
+ "variant": "body",
670
+ "type": "typography",
671
+ "content": "@entity.assignedVehicleId"
672
+ }
673
+ ],
674
+ "direction": "horizontal",
675
+ "gap": "md",
676
+ "type": "stack"
677
+ }
678
+ ],
679
+ "direction": "vertical",
680
+ "type": "stack"
681
+ },
682
+ {
683
+ "type": "divider"
684
+ },
685
+ {
686
+ "children": [
687
+ {
688
+ "value": "@entity.hiredAt",
689
+ "icon": "calendar",
690
+ "type": "stat-display",
691
+ "label": "Hired"
692
+ },
693
+ {
694
+ "value": "@entity.licenseExpiresAt",
695
+ "icon": "calendar-x",
696
+ "type": "stat-display",
697
+ "label": "License expires"
698
+ }
699
+ ],
700
+ "type": "simple-grid",
701
+ "cols": 2.0
702
+ },
703
+ {
704
+ "direction": "horizontal",
705
+ "gap": "sm",
706
+ "type": "stack",
707
+ "children": [
708
+ {
709
+ "action": "ASSIGN_VEHICLE",
710
+ "label": "Assign Vehicle",
711
+ "actionPayload": {
712
+ "id": "@entity.id"
713
+ },
714
+ "variant": "primary",
715
+ "type": "button"
716
+ },
717
+ {
718
+ "type": "button",
719
+ "label": "Suspend",
720
+ "actionPayload": {
721
+ "id": "@entity.id"
722
+ },
723
+ "action": "SUSPEND",
724
+ "variant": "danger"
725
+ },
726
+ {
727
+ "actionPayload": {
728
+ "id": "@entity.id"
729
+ },
730
+ "type": "button",
731
+ "variant": "secondary",
732
+ "label": "Reinstate",
733
+ "action": "REINSTATE"
734
+ },
735
+ {
736
+ "type": "button",
737
+ "actionPayload": {
738
+ "id": "@entity.id"
739
+ },
740
+ "variant": "danger",
741
+ "action": "TERMINATE",
742
+ "label": "Terminate"
743
+ }
744
+ ],
745
+ "align": "center"
776
746
  }
777
747
  ],
778
- "type": "stack",
779
- "direction": "vertical",
780
- "className": "py-12",
781
- "gap": "md"
748
+ "type": "stack"
782
749
  }
783
750
  ]
784
751
  ]
785
752
  },
786
753
  {
787
- "from": "viewing",
754
+ "from": "browsing",
788
755
  "to": "loading",
789
- "event": "SEARCH",
756
+ "event": "SUSPEND",
790
757
  "effects": [
758
+ [
759
+ "set",
760
+ "@entity.id",
761
+ "@payload.id"
762
+ ],
791
763
  [
792
764
  "fetch",
793
765
  "Driver",
@@ -802,38 +774,38 @@
802
774
  "render-ui",
803
775
  "main",
804
776
  {
805
- "align": "center",
806
777
  "direction": "vertical",
807
- "gap": "md",
778
+ "className": "py-12",
779
+ "align": "center",
780
+ "type": "stack",
808
781
  "children": [
809
782
  {
810
783
  "type": "spinner"
811
784
  },
812
785
  {
813
- "type": "typography",
814
- "content": "Searching drivers…",
786
+ "variant": "caption",
815
787
  "color": "muted",
816
- "variant": "caption"
788
+ "content": "Suspending driver…",
789
+ "type": "typography"
817
790
  }
818
791
  ],
819
- "type": "stack",
820
- "className": "py-12"
792
+ "gap": "md"
821
793
  }
822
794
  ]
823
795
  ]
824
796
  },
825
797
  {
826
- "from": "viewing",
798
+ "from": "viewing_single",
827
799
  "to": "loading",
828
- "event": "FILTER_STATUS",
800
+ "event": "CLOSE_VIEW",
829
801
  "effects": [
830
802
  [
831
803
  "fetch",
832
804
  "Driver",
833
805
  {
834
806
  "emit": {
835
- "success": "DriverLoaded",
836
- "failure": "DriverLoadFailed"
807
+ "failure": "DriverLoadFailed",
808
+ "success": "DriverLoaded"
837
809
  }
838
810
  }
839
811
  ],
@@ -841,30 +813,30 @@
841
813
  "render-ui",
842
814
  "main",
843
815
  {
816
+ "direction": "vertical",
844
817
  "type": "stack",
845
- "gap": "md",
818
+ "align": "center",
846
819
  "className": "py-12",
820
+ "gap": "md",
847
821
  "children": [
848
822
  {
849
823
  "type": "spinner"
850
824
  },
851
825
  {
852
- "color": "muted",
853
- "content": "Filtering drivers…",
826
+ "content": "Loading drivers…",
827
+ "type": "typography",
854
828
  "variant": "caption",
855
- "type": "typography"
829
+ "color": "muted"
856
830
  }
857
- ],
858
- "direction": "vertical",
859
- "align": "center"
831
+ ]
860
832
  }
861
833
  ]
862
834
  ]
863
835
  },
864
836
  {
865
- "from": "viewing",
866
- "to": "viewing",
867
- "event": "SUSPEND",
837
+ "from": "viewing_single",
838
+ "to": "loading",
839
+ "event": "ASSIGN_VEHICLE",
868
840
  "effects": [
869
841
  [
870
842
  "set",
@@ -872,41 +844,43 @@
872
844
  "@payload.id"
873
845
  ],
874
846
  [
875
- "render-ui",
876
- "main",
847
+ "fetch",
848
+ "Driver",
877
849
  {
878
- "message": "Driver suspended",
879
- "variant": "warning",
880
- "type": "alert"
850
+ "emit": {
851
+ "failure": "DriverLoadFailed",
852
+ "success": "DriverLoaded"
853
+ }
881
854
  }
882
- ]
883
- ]
884
- },
885
- {
886
- "from": "viewing",
887
- "to": "viewing",
888
- "event": "REINSTATE",
889
- "effects": [
890
- [
891
- "set",
892
- "@entity.id",
893
- "@payload.id"
894
855
  ],
895
856
  [
896
857
  "render-ui",
897
858
  "main",
898
859
  {
899
- "variant": "success",
900
- "type": "alert",
901
- "message": "Driver reinstated"
860
+ "type": "stack",
861
+ "direction": "vertical",
862
+ "children": [
863
+ {
864
+ "type": "spinner"
865
+ },
866
+ {
867
+ "variant": "caption",
868
+ "content": "Assigning vehicle…",
869
+ "type": "typography",
870
+ "color": "muted"
871
+ }
872
+ ],
873
+ "gap": "md",
874
+ "align": "center",
875
+ "className": "py-12"
902
876
  }
903
877
  ]
904
878
  ]
905
879
  },
906
880
  {
907
- "from": "viewing",
908
- "to": "viewing",
909
- "event": "TERMINATE",
881
+ "from": "viewing_single",
882
+ "to": "loading",
883
+ "event": "SUSPEND",
910
884
  "effects": [
911
885
  [
912
886
  "set",
@@ -914,57 +888,43 @@
914
888
  "@payload.id"
915
889
  ],
916
890
  [
917
- "render-ui",
918
- "main",
891
+ "fetch",
892
+ "Driver",
919
893
  {
920
- "type": "alert",
921
- "variant": "error",
922
- "message": "Driver terminated"
894
+ "emit": {
895
+ "failure": "DriverLoadFailed",
896
+ "success": "DriverLoaded"
897
+ }
923
898
  }
924
- ]
925
- ]
926
- },
927
- {
928
- "from": "viewing",
929
- "to": "viewing",
930
- "event": "ASSIGN_VEHICLE",
931
- "effects": [
932
- [
933
- "set",
934
- "@entity.id",
935
- "@payload.id"
936
899
  ],
937
900
  [
938
901
  "render-ui",
939
902
  "main",
940
903
  {
941
- "variant": "info",
942
- "message": "Vehicle assigned",
943
- "type": "alert"
944
- }
945
- ]
946
- ]
947
- },
948
- {
949
- "from": "viewing",
950
- "to": "viewing",
951
- "event": "CREATE",
952
- "effects": [
953
- [
954
- "render-ui",
955
- "main",
956
- {
957
- "message": "Creating new driver",
958
- "type": "alert",
959
- "variant": "info"
904
+ "type": "stack",
905
+ "children": [
906
+ {
907
+ "type": "spinner"
908
+ },
909
+ {
910
+ "color": "muted",
911
+ "variant": "caption",
912
+ "type": "typography",
913
+ "content": "Suspending driver…"
914
+ }
915
+ ],
916
+ "direction": "vertical",
917
+ "align": "center",
918
+ "gap": "md",
919
+ "className": "py-12"
960
920
  }
961
921
  ]
962
922
  ]
963
923
  },
964
924
  {
965
- "from": "viewing",
966
- "to": "viewing",
967
- "event": "VIEW",
925
+ "from": "viewing_single",
926
+ "to": "loading",
927
+ "event": "REINSTATE",
968
928
  "effects": [
969
929
  [
970
930
  "set",
@@ -972,54 +932,79 @@
972
932
  "@payload.id"
973
933
  ],
974
934
  [
975
- "render-ui",
976
- "main",
935
+ "fetch",
936
+ "Driver",
977
937
  {
978
- "message": "Viewing driver",
979
- "type": "alert",
980
- "variant": "info"
938
+ "emit": {
939
+ "failure": "DriverLoadFailed",
940
+ "success": "DriverLoaded"
941
+ }
981
942
  }
982
- ]
983
- ]
984
- },
985
- {
986
- "from": "viewing",
987
- "to": "viewing",
988
- "event": "EDIT",
989
- "effects": [
990
- [
991
- "set",
992
- "@entity.id",
993
- "@payload.id"
994
943
  ],
995
944
  [
996
945
  "render-ui",
997
946
  "main",
998
947
  {
999
- "type": "alert",
1000
- "message": "Editing driver",
1001
- "variant": "info"
948
+ "direction": "vertical",
949
+ "align": "center",
950
+ "gap": "md",
951
+ "className": "py-12",
952
+ "type": "stack",
953
+ "children": [
954
+ {
955
+ "type": "spinner"
956
+ },
957
+ {
958
+ "variant": "caption",
959
+ "content": "Reinstating driver…",
960
+ "type": "typography",
961
+ "color": "muted"
962
+ }
963
+ ]
1002
964
  }
1003
965
  ]
1004
966
  ]
1005
967
  },
1006
968
  {
1007
- "from": "viewing",
1008
- "to": "viewing",
1009
- "event": "REQUEST_DELETE",
969
+ "from": "viewing_single",
970
+ "to": "loading",
971
+ "event": "TERMINATE",
1010
972
  "effects": [
1011
973
  [
1012
974
  "set",
1013
975
  "@entity.id",
1014
976
  "@payload.id"
1015
977
  ],
978
+ [
979
+ "fetch",
980
+ "Driver",
981
+ {
982
+ "emit": {
983
+ "failure": "DriverLoadFailed",
984
+ "success": "DriverLoaded"
985
+ }
986
+ }
987
+ ],
1016
988
  [
1017
989
  "render-ui",
1018
990
  "main",
1019
991
  {
1020
- "type": "alert",
1021
- "message": "Delete requested",
1022
- "variant": "warning"
992
+ "gap": "md",
993
+ "type": "stack",
994
+ "align": "center",
995
+ "className": "py-12",
996
+ "children": [
997
+ {
998
+ "type": "spinner"
999
+ },
1000
+ {
1001
+ "variant": "caption",
1002
+ "content": "Terminating driver…",
1003
+ "type": "typography",
1004
+ "color": "muted"
1005
+ }
1006
+ ],
1007
+ "direction": "vertical"
1023
1008
  }
1024
1009
  ]
1025
1010
  ]
@@ -1034,8 +1019,8 @@
1034
1019
  "Driver",
1035
1020
  {
1036
1021
  "emit": {
1037
- "failure": "DriverLoadFailed",
1038
- "success": "DriverLoaded"
1022
+ "success": "DriverLoaded",
1023
+ "failure": "DriverLoadFailed"
1039
1024
  }
1040
1025
  }
1041
1026
  ],