@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
@@ -91,6 +91,70 @@
91
91
  "category": "interaction",
92
92
  "linkedEntity": "MaintenanceRequest",
93
93
  "emits": [
94
+ {
95
+ "event": "OPEN_REQUEST",
96
+ "payloadSchema": [
97
+ {
98
+ "name": "id",
99
+ "type": "string",
100
+ "required": true
101
+ },
102
+ {
103
+ "name": "row.id",
104
+ "type": "string",
105
+ "required": true
106
+ },
107
+ {
108
+ "name": "row.unitId",
109
+ "type": "string",
110
+ "required": true
111
+ },
112
+ {
113
+ "name": "row.tenantId",
114
+ "type": "string"
115
+ },
116
+ {
117
+ "name": "row.requesterName",
118
+ "type": "string"
119
+ },
120
+ {
121
+ "name": "row.description",
122
+ "type": "string",
123
+ "required": true
124
+ },
125
+ {
126
+ "name": "row.priority",
127
+ "type": "string"
128
+ },
129
+ {
130
+ "name": "row.status",
131
+ "type": "string"
132
+ },
133
+ {
134
+ "name": "row.assignedTo",
135
+ "type": "string"
136
+ },
137
+ {
138
+ "name": "row.requestedAt",
139
+ "type": "string"
140
+ },
141
+ {
142
+ "name": "row.scheduledAt",
143
+ "type": "string"
144
+ },
145
+ {
146
+ "name": "row.completedAt",
147
+ "type": "string"
148
+ },
149
+ {
150
+ "name": "row.notes",
151
+ "type": "string"
152
+ }
153
+ ]
154
+ },
155
+ {
156
+ "event": "CLOSE_VIEW"
157
+ },
94
158
  {
95
159
  "event": "SCHEDULE_REQUEST",
96
160
  "payloadSchema": [
@@ -388,6 +452,9 @@
388
452
  {
389
453
  "name": "browsing"
390
454
  },
455
+ {
456
+ "name": "viewing_single"
457
+ },
391
458
  {
392
459
  "name": "error"
393
460
  }
@@ -422,38 +489,14 @@
422
489
  ]
423
490
  },
424
491
  {
425
- "key": "SCHEDULE_REQUEST",
426
- "name": "Schedule Request",
427
- "payloadSchema": [
428
- {
429
- "name": "id",
430
- "type": "string",
431
- "required": true
432
- },
433
- {
434
- "name": "scheduledAt",
435
- "type": "string",
436
- "required": true
437
- },
438
- {
439
- "name": "row",
440
- "type": "MaintenanceRequest"
441
- }
442
- ]
443
- },
444
- {
445
- "key": "COMPLETE_REQUEST",
446
- "name": "Complete Request",
492
+ "key": "OPEN_REQUEST",
493
+ "name": "Open Request",
447
494
  "payloadSchema": [
448
495
  {
449
496
  "name": "id",
450
497
  "type": "string",
451
498
  "required": true
452
499
  },
453
- {
454
- "name": "completedAt",
455
- "type": "string"
456
- },
457
500
  {
458
501
  "name": "row",
459
502
  "type": "MaintenanceRequest"
@@ -502,6 +545,49 @@
502
545
  "type": "string"
503
546
  }
504
547
  ]
548
+ },
549
+ {
550
+ "key": "CLOSE_VIEW",
551
+ "name": "Close View"
552
+ },
553
+ {
554
+ "key": "SCHEDULE_REQUEST",
555
+ "name": "Schedule Request",
556
+ "payloadSchema": [
557
+ {
558
+ "name": "id",
559
+ "type": "string",
560
+ "required": true
561
+ },
562
+ {
563
+ "name": "scheduledAt",
564
+ "type": "string",
565
+ "required": true
566
+ },
567
+ {
568
+ "name": "row",
569
+ "type": "MaintenanceRequest"
570
+ }
571
+ ]
572
+ },
573
+ {
574
+ "key": "COMPLETE_REQUEST",
575
+ "name": "Complete Request",
576
+ "payloadSchema": [
577
+ {
578
+ "name": "id",
579
+ "type": "string",
580
+ "required": true
581
+ },
582
+ {
583
+ "name": "completedAt",
584
+ "type": "string"
585
+ },
586
+ {
587
+ "name": "row",
588
+ "type": "MaintenanceRequest"
589
+ }
590
+ ]
505
591
  }
506
592
  ],
507
593
  "transitions": [
@@ -515,8 +601,8 @@
515
601
  "MaintenanceRequest",
516
602
  {
517
603
  "emit": {
518
- "failure": "MaintenanceRequestLoadFailed",
519
- "success": "MaintenanceRequestLoaded"
604
+ "success": "MaintenanceRequestLoaded",
605
+ "failure": "MaintenanceRequestLoadFailed"
520
606
  }
521
607
  }
522
608
  ],
@@ -524,21 +610,21 @@
524
610
  "render-ui",
525
611
  "main",
526
612
  {
527
- "gap": "md",
528
- "direction": "vertical",
529
- "align": "center",
530
- "className": "py-12",
531
613
  "children": [
532
614
  {
533
615
  "type": "spinner"
534
616
  },
535
617
  {
536
- "content": "Loading maintenance requests…",
618
+ "type": "typography",
537
619
  "color": "muted",
538
- "variant": "caption",
539
- "type": "typography"
620
+ "content": "Loading maintenance requests…",
621
+ "variant": "caption"
540
622
  }
541
623
  ],
624
+ "gap": "md",
625
+ "className": "py-12",
626
+ "direction": "vertical",
627
+ "align": "center",
542
628
  "type": "stack"
543
629
  }
544
630
  ]
@@ -553,61 +639,53 @@
553
639
  "render-ui",
554
640
  "main",
555
641
  {
556
- "type": "stack",
642
+ "gap": "md",
643
+ "direction": "vertical",
557
644
  "children": [
558
645
  {
559
- "type": "stack",
560
- "align": "center",
561
646
  "gap": "sm",
562
- "justify": "between",
563
647
  "direction": "horizontal",
648
+ "type": "stack",
564
649
  "children": [
565
650
  {
566
- "align": "center",
567
- "type": "stack",
568
- "gap": "sm",
569
- "children": [
570
- {
571
- "name": "wrench",
572
- "type": "icon"
573
- },
574
- {
575
- "type": "typography",
576
- "variant": "h3",
577
- "content": "@config.title"
578
- }
579
- ],
580
- "direction": "horizontal"
651
+ "type": "icon",
652
+ "name": "wrench"
581
653
  },
582
654
  {
583
- "type": "popover",
584
- "content": {
585
- "children": [
586
- {
587
- "content": "Quick filters",
588
- "type": "typography",
589
- "variant": "caption"
590
- },
591
- {
592
- "type": "button",
593
- "action": "INIT",
594
- "label": "Refresh",
595
- "variant": "ghost"
596
- }
597
- ],
598
- "type": "stack",
599
- "direction": "vertical",
600
- "gap": "sm"
601
- },
602
- "position": "bottom",
603
- "trigger": "click",
604
- "children": {
605
- "type": "button",
606
- "action": "INIT",
607
- "variant": "secondary",
608
- "label": "Filters",
609
- "icon": "filter"
610
- }
655
+ "type": "typography",
656
+ "content": "@config.title",
657
+ "variant": "h3"
658
+ }
659
+ ],
660
+ "align": "center"
661
+ },
662
+ {
663
+ "type": "simple-grid",
664
+ "cols": 4.0,
665
+ "children": [
666
+ {
667
+ "value": "@payload.data.length",
668
+ "label": "Open requests",
669
+ "type": "stat-display",
670
+ "icon": "wrench"
671
+ },
672
+ {
673
+ "value": "5",
674
+ "type": "stat-display",
675
+ "icon": "alert-triangle",
676
+ "label": "Urgent"
677
+ },
678
+ {
679
+ "type": "stat-display",
680
+ "label": "Scheduled",
681
+ "value": "18",
682
+ "icon": "calendar"
683
+ },
684
+ {
685
+ "type": "stat-display",
686
+ "value": "32",
687
+ "icon": "clock",
688
+ "label": "Avg resolve (hr)"
611
689
  }
612
690
  ]
613
691
  },
@@ -615,56 +693,37 @@
615
693
  "type": "divider"
616
694
  },
617
695
  {
618
- "rightActions": [
696
+ "type": "data-grid",
697
+ "gap": "sm",
698
+ "itemActions": [
619
699
  {
620
- "event": "CANCEL_REQUEST",
621
- "variant": "danger",
622
- "label": "Cancel"
623
- }
624
- ],
625
- "threshold": 80.0,
626
- "children": {
627
- "type": "stack",
628
- "direction": "horizontal",
629
- "align": "center",
630
- "children": [
631
- {
632
- "type": "icon",
633
- "name": "wrench"
634
- },
635
- {
636
- "type": "typography",
637
- "content": "Swipe a request row for quick actions",
638
- "variant": "body"
639
- }
640
- ],
641
- "gap": "md"
642
- },
643
- "leftActions": [
700
+ "variant": "primary",
701
+ "icon": "arrow-right",
702
+ "event": "OPEN_REQUEST",
703
+ "label": "Open"
704
+ },
644
705
  {
645
- "label": "Schedule",
646
- "event": "SCHEDULE_REQUEST",
647
- "variant": "primary"
706
+ "label": "Cancel",
707
+ "variant": "danger",
708
+ "icon": "x",
709
+ "event": "CANCEL_REQUEST"
648
710
  }
649
711
  ],
650
- "type": "swipeable-row"
651
- },
652
- {
653
712
  "fields": [
654
713
  {
655
- "label": "Unit",
656
714
  "variant": "caption",
715
+ "label": "Unit",
657
716
  "name": "unitId"
658
717
  },
659
718
  {
660
- "variant": "caption",
719
+ "name": "requesterName",
661
720
  "label": "Requester",
662
- "name": "requesterName"
721
+ "variant": "caption"
663
722
  },
664
723
  {
665
724
  "label": "Description",
666
- "name": "description",
667
- "variant": "caption"
725
+ "variant": "caption",
726
+ "name": "description"
668
727
  },
669
728
  {
670
729
  "name": "priority",
@@ -672,49 +731,21 @@
672
731
  "label": "Priority"
673
732
  },
674
733
  {
675
- "name": "status",
676
734
  "label": "Status",
735
+ "name": "status",
677
736
  "variant": "badge"
678
737
  },
679
738
  {
680
739
  "name": "requestedAt",
681
- "label": "Requested",
682
- "variant": "caption"
740
+ "variant": "caption",
741
+ "label": "Requested"
683
742
  }
684
743
  ],
685
- "type": "data-grid",
686
- "gap": "sm",
687
- "entity": "@payload.data",
688
744
  "cols": 1.0,
689
- "itemActions": [
690
- {
691
- "label": "Schedule",
692
- "event": "SCHEDULE_REQUEST",
693
- "icon": "calendar",
694
- "variant": "primary"
695
- },
696
- {
697
- "label": "Complete",
698
- "event": "COMPLETE_REQUEST",
699
- "variant": "primary",
700
- "icon": "check"
701
- },
702
- {
703
- "icon": "x",
704
- "label": "Cancel",
705
- "variant": "danger",
706
- "event": "CANCEL_REQUEST"
707
- }
708
- ]
709
- },
710
- {
711
- "action": "INIT",
712
- "type": "floating-action-button",
713
- "icon": "plus"
745
+ "entity": "@payload.data"
714
746
  }
715
747
  ],
716
- "direction": "vertical",
717
- "gap": "md"
748
+ "type": "stack"
718
749
  }
719
750
  ]
720
751
  ]
@@ -728,51 +759,275 @@
728
759
  "render-ui",
729
760
  "main",
730
761
  {
731
- "variant": "error",
762
+ "type": "alert",
732
763
  "message": "@payload.error",
733
- "type": "alert"
764
+ "variant": "error"
734
765
  }
735
766
  ]
736
767
  ]
737
768
  },
738
769
  {
739
770
  "from": "browsing",
740
- "to": "browsing",
741
- "event": "SCHEDULE_REQUEST",
771
+ "to": "viewing_single",
772
+ "event": "OPEN_REQUEST",
742
773
  "effects": [
743
774
  [
744
775
  "set",
745
776
  "@entity.id",
746
- "@payload.id"
777
+ "@payload.row.id"
747
778
  ],
748
779
  [
749
780
  "set",
750
- "@entity.scheduledAt",
751
- "@payload.scheduledAt"
781
+ "@entity.unitId",
782
+ "@payload.row.unitId"
783
+ ],
784
+ [
785
+ "set",
786
+ "@entity.tenantId",
787
+ "@payload.row.tenantId"
788
+ ],
789
+ [
790
+ "set",
791
+ "@entity.requesterName",
792
+ "@payload.row.requesterName"
793
+ ],
794
+ [
795
+ "set",
796
+ "@entity.description",
797
+ "@payload.row.description"
798
+ ],
799
+ [
800
+ "set",
801
+ "@entity.priority",
802
+ "@payload.row.priority"
752
803
  ],
753
804
  [
754
805
  "set",
755
806
  "@entity.status",
756
- "scheduled"
807
+ "@payload.row.status"
757
808
  ],
758
809
  [
759
- "persist",
760
- "update",
761
- "MaintenanceRequest",
762
- "@entity",
763
- {
764
- "emit": {
765
- "failure": "MaintenanceRequestUpdateFailed",
766
- "success": "MaintenanceRequestUpdated"
767
- }
810
+ "set",
811
+ "@entity.assignedTo",
812
+ "@payload.row.assignedTo"
813
+ ],
814
+ [
815
+ "set",
816
+ "@entity.requestedAt",
817
+ "@payload.row.requestedAt"
818
+ ],
819
+ [
820
+ "set",
821
+ "@entity.scheduledAt",
822
+ "@payload.row.scheduledAt"
823
+ ],
824
+ [
825
+ "set",
826
+ "@entity.completedAt",
827
+ "@payload.row.completedAt"
828
+ ],
829
+ [
830
+ "set",
831
+ "@entity.notes",
832
+ "@payload.row.notes"
833
+ ],
834
+ [
835
+ "render-ui",
836
+ "main",
837
+ {
838
+ "direction": "vertical",
839
+ "type": "stack",
840
+ "gap": "md",
841
+ "children": [
842
+ {
843
+ "gap": "sm",
844
+ "type": "stack",
845
+ "direction": "horizontal",
846
+ "children": [
847
+ {
848
+ "action": "CLOSE_VIEW",
849
+ "variant": "ghost",
850
+ "label": "Back",
851
+ "type": "button"
852
+ },
853
+ {
854
+ "name": "wrench",
855
+ "type": "icon"
856
+ },
857
+ {
858
+ "variant": "h3",
859
+ "type": "typography",
860
+ "content": "@entity.unitId"
861
+ },
862
+ {
863
+ "label": "@entity.priority",
864
+ "variant": "primary",
865
+ "type": "badge"
866
+ },
867
+ {
868
+ "variant": "default",
869
+ "type": "badge",
870
+ "label": "@entity.status"
871
+ }
872
+ ],
873
+ "align": "center"
874
+ },
875
+ {
876
+ "type": "divider"
877
+ },
878
+ {
879
+ "type": "stack",
880
+ "direction": "vertical",
881
+ "gap": "sm",
882
+ "children": [
883
+ {
884
+ "children": [
885
+ {
886
+ "content": "Requester",
887
+ "color": "muted",
888
+ "type": "typography",
889
+ "variant": "caption"
890
+ },
891
+ {
892
+ "content": "@entity.requesterName",
893
+ "variant": "body",
894
+ "type": "typography"
895
+ }
896
+ ],
897
+ "type": "stack",
898
+ "direction": "horizontal",
899
+ "gap": "md"
900
+ },
901
+ {
902
+ "type": "stack",
903
+ "gap": "md",
904
+ "children": [
905
+ {
906
+ "type": "typography",
907
+ "color": "muted",
908
+ "variant": "caption",
909
+ "content": "Description"
910
+ },
911
+ {
912
+ "type": "typography",
913
+ "variant": "body",
914
+ "content": "@entity.description"
915
+ }
916
+ ],
917
+ "direction": "horizontal"
918
+ },
919
+ {
920
+ "type": "stack",
921
+ "children": [
922
+ {
923
+ "content": "Assigned to",
924
+ "variant": "caption",
925
+ "type": "typography",
926
+ "color": "muted"
927
+ },
928
+ {
929
+ "type": "typography",
930
+ "variant": "body",
931
+ "content": "@entity.assignedTo"
932
+ }
933
+ ],
934
+ "direction": "horizontal",
935
+ "gap": "md"
936
+ },
937
+ {
938
+ "gap": "md",
939
+ "children": [
940
+ {
941
+ "variant": "caption",
942
+ "content": "Notes",
943
+ "type": "typography",
944
+ "color": "muted"
945
+ },
946
+ {
947
+ "type": "typography",
948
+ "content": "@entity.notes",
949
+ "variant": "body"
950
+ }
951
+ ],
952
+ "direction": "horizontal",
953
+ "type": "stack"
954
+ }
955
+ ]
956
+ },
957
+ {
958
+ "type": "divider"
959
+ },
960
+ {
961
+ "type": "simple-grid",
962
+ "cols": 3.0,
963
+ "children": [
964
+ {
965
+ "type": "stat-display",
966
+ "value": "@entity.requestedAt",
967
+ "label": "Requested",
968
+ "icon": "calendar"
969
+ },
970
+ {
971
+ "label": "Scheduled",
972
+ "value": "@entity.scheduledAt",
973
+ "type": "stat-display",
974
+ "icon": "calendar-clock"
975
+ },
976
+ {
977
+ "value": "@entity.completedAt",
978
+ "icon": "calendar-check",
979
+ "type": "stat-display",
980
+ "label": "Completed"
981
+ }
982
+ ]
983
+ },
984
+ {
985
+ "type": "stack",
986
+ "direction": "horizontal",
987
+ "children": [
988
+ {
989
+ "action": "SCHEDULE_REQUEST",
990
+ "actionPayload": {
991
+ "id": "@entity.id",
992
+ "scheduledAt": "now"
993
+ },
994
+ "label": "Schedule",
995
+ "type": "button",
996
+ "variant": "primary"
997
+ },
998
+ {
999
+ "label": "Complete",
1000
+ "type": "button",
1001
+ "variant": "primary",
1002
+ "action": "COMPLETE_REQUEST",
1003
+ "actionPayload": {
1004
+ "id": "@entity.id",
1005
+ "completedAt": "now"
1006
+ }
1007
+ },
1008
+ {
1009
+ "actionPayload": {
1010
+ "id": "@entity.id",
1011
+ "notes": "cancelled by user"
1012
+ },
1013
+ "variant": "danger",
1014
+ "label": "Cancel",
1015
+ "action": "CANCEL_REQUEST",
1016
+ "type": "button"
1017
+ }
1018
+ ],
1019
+ "align": "center",
1020
+ "gap": "sm"
1021
+ }
1022
+ ]
768
1023
  }
769
1024
  ]
770
1025
  ]
771
1026
  },
772
1027
  {
773
1028
  "from": "browsing",
774
- "to": "browsing",
775
- "event": "COMPLETE_REQUEST",
1029
+ "to": "loading",
1030
+ "event": "CANCEL_REQUEST",
776
1031
  "effects": [
777
1032
  [
778
1033
  "set",
@@ -781,13 +1036,13 @@
781
1036
  ],
782
1037
  [
783
1038
  "set",
784
- "@entity.completedAt",
785
- "@payload.completedAt"
1039
+ "@entity.notes",
1040
+ "@payload.notes"
786
1041
  ],
787
1042
  [
788
1043
  "set",
789
1044
  "@entity.status",
790
- "completed"
1045
+ "cancelled"
791
1046
  ],
792
1047
  [
793
1048
  "persist",
@@ -796,8 +1051,47 @@
796
1051
  "@entity",
797
1052
  {
798
1053
  "emit": {
799
- "success": "MaintenanceRequestUpdated",
800
- "failure": "MaintenanceRequestUpdateFailed"
1054
+ "failure": "MaintenanceRequestUpdateFailed",
1055
+ "success": "MaintenanceRequestUpdated"
1056
+ }
1057
+ }
1058
+ ],
1059
+ [
1060
+ "render-ui",
1061
+ "main",
1062
+ {
1063
+ "className": "py-12",
1064
+ "gap": "md",
1065
+ "direction": "vertical",
1066
+ "align": "center",
1067
+ "children": [
1068
+ {
1069
+ "type": "spinner"
1070
+ },
1071
+ {
1072
+ "color": "muted",
1073
+ "type": "typography",
1074
+ "content": "Cancelling request…",
1075
+ "variant": "caption"
1076
+ }
1077
+ ],
1078
+ "type": "stack"
1079
+ }
1080
+ ]
1081
+ ]
1082
+ },
1083
+ {
1084
+ "from": "browsing",
1085
+ "to": "loading",
1086
+ "event": "MaintenanceRequestUpdated",
1087
+ "effects": [
1088
+ [
1089
+ "fetch",
1090
+ "MaintenanceRequest",
1091
+ {
1092
+ "emit": {
1093
+ "success": "MaintenanceRequestLoaded",
1094
+ "failure": "MaintenanceRequestLoadFailed"
801
1095
  }
802
1096
  }
803
1097
  ]
@@ -806,7 +1100,62 @@
806
1100
  {
807
1101
  "from": "browsing",
808
1102
  "to": "browsing",
809
- "event": "CANCEL_REQUEST",
1103
+ "event": "MaintenanceRequestUpdateFailed",
1104
+ "effects": [
1105
+ [
1106
+ "render-ui",
1107
+ "main",
1108
+ {
1109
+ "message": "@payload.error",
1110
+ "variant": "error",
1111
+ "type": "alert"
1112
+ }
1113
+ ]
1114
+ ]
1115
+ },
1116
+ {
1117
+ "from": "viewing_single",
1118
+ "to": "loading",
1119
+ "event": "CLOSE_VIEW",
1120
+ "effects": [
1121
+ [
1122
+ "fetch",
1123
+ "MaintenanceRequest",
1124
+ {
1125
+ "emit": {
1126
+ "success": "MaintenanceRequestLoaded",
1127
+ "failure": "MaintenanceRequestLoadFailed"
1128
+ }
1129
+ }
1130
+ ],
1131
+ [
1132
+ "render-ui",
1133
+ "main",
1134
+ {
1135
+ "align": "center",
1136
+ "type": "stack",
1137
+ "children": [
1138
+ {
1139
+ "type": "spinner"
1140
+ },
1141
+ {
1142
+ "content": "Loading maintenance requests…",
1143
+ "type": "typography",
1144
+ "variant": "caption",
1145
+ "color": "muted"
1146
+ }
1147
+ ],
1148
+ "className": "py-12",
1149
+ "direction": "vertical",
1150
+ "gap": "md"
1151
+ }
1152
+ ]
1153
+ ]
1154
+ },
1155
+ {
1156
+ "from": "viewing_single",
1157
+ "to": "loading",
1158
+ "event": "SCHEDULE_REQUEST",
810
1159
  "effects": [
811
1160
  [
812
1161
  "set",
@@ -815,13 +1164,13 @@
815
1164
  ],
816
1165
  [
817
1166
  "set",
818
- "@entity.notes",
819
- "@payload.notes"
1167
+ "@entity.scheduledAt",
1168
+ "@payload.scheduledAt"
820
1169
  ],
821
1170
  [
822
1171
  "set",
823
1172
  "@entity.status",
824
- "cancelled"
1173
+ "scheduled"
825
1174
  ],
826
1175
  [
827
1176
  "persist",
@@ -834,38 +1183,139 @@
834
1183
  "failure": "MaintenanceRequestUpdateFailed"
835
1184
  }
836
1185
  }
1186
+ ],
1187
+ [
1188
+ "render-ui",
1189
+ "main",
1190
+ {
1191
+ "children": [
1192
+ {
1193
+ "type": "spinner"
1194
+ },
1195
+ {
1196
+ "variant": "caption",
1197
+ "color": "muted",
1198
+ "content": "Scheduling request…",
1199
+ "type": "typography"
1200
+ }
1201
+ ],
1202
+ "type": "stack",
1203
+ "align": "center",
1204
+ "direction": "vertical",
1205
+ "gap": "md",
1206
+ "className": "py-12"
1207
+ }
837
1208
  ]
838
1209
  ]
839
1210
  },
840
1211
  {
841
- "from": "browsing",
1212
+ "from": "viewing_single",
842
1213
  "to": "loading",
843
- "event": "MaintenanceRequestUpdated",
1214
+ "event": "COMPLETE_REQUEST",
844
1215
  "effects": [
845
1216
  [
846
- "fetch",
1217
+ "set",
1218
+ "@entity.id",
1219
+ "@payload.id"
1220
+ ],
1221
+ [
1222
+ "set",
1223
+ "@entity.completedAt",
1224
+ "@payload.completedAt"
1225
+ ],
1226
+ [
1227
+ "set",
1228
+ "@entity.status",
1229
+ "completed"
1230
+ ],
1231
+ [
1232
+ "persist",
1233
+ "update",
847
1234
  "MaintenanceRequest",
1235
+ "@entity",
848
1236
  {
849
1237
  "emit": {
850
- "success": "MaintenanceRequestLoaded",
851
- "failure": "MaintenanceRequestLoadFailed"
1238
+ "success": "MaintenanceRequestUpdated",
1239
+ "failure": "MaintenanceRequestUpdateFailed"
852
1240
  }
853
1241
  }
1242
+ ],
1243
+ [
1244
+ "render-ui",
1245
+ "main",
1246
+ {
1247
+ "align": "center",
1248
+ "direction": "vertical",
1249
+ "gap": "md",
1250
+ "className": "py-12",
1251
+ "children": [
1252
+ {
1253
+ "type": "spinner"
1254
+ },
1255
+ {
1256
+ "content": "Completing request…",
1257
+ "type": "typography",
1258
+ "color": "muted",
1259
+ "variant": "caption"
1260
+ }
1261
+ ],
1262
+ "type": "stack"
1263
+ }
854
1264
  ]
855
1265
  ]
856
1266
  },
857
1267
  {
858
- "from": "browsing",
859
- "to": "browsing",
860
- "event": "MaintenanceRequestUpdateFailed",
1268
+ "from": "viewing_single",
1269
+ "to": "loading",
1270
+ "event": "CANCEL_REQUEST",
861
1271
  "effects": [
1272
+ [
1273
+ "set",
1274
+ "@entity.id",
1275
+ "@payload.id"
1276
+ ],
1277
+ [
1278
+ "set",
1279
+ "@entity.notes",
1280
+ "@payload.notes"
1281
+ ],
1282
+ [
1283
+ "set",
1284
+ "@entity.status",
1285
+ "cancelled"
1286
+ ],
1287
+ [
1288
+ "persist",
1289
+ "update",
1290
+ "MaintenanceRequest",
1291
+ "@entity",
1292
+ {
1293
+ "emit": {
1294
+ "failure": "MaintenanceRequestUpdateFailed",
1295
+ "success": "MaintenanceRequestUpdated"
1296
+ }
1297
+ }
1298
+ ],
862
1299
  [
863
1300
  "render-ui",
864
1301
  "main",
865
1302
  {
866
- "message": "@payload.error",
867
- "type": "alert",
868
- "variant": "error"
1303
+ "direction": "vertical",
1304
+ "align": "center",
1305
+ "type": "stack",
1306
+ "className": "py-12",
1307
+ "gap": "md",
1308
+ "children": [
1309
+ {
1310
+ "type": "spinner"
1311
+ },
1312
+ {
1313
+ "variant": "caption",
1314
+ "type": "typography",
1315
+ "content": "Cancelling request…",
1316
+ "color": "muted"
1317
+ }
1318
+ ]
869
1319
  }
870
1320
  ]
871
1321
  ]
@@ -880,8 +1330,8 @@
880
1330
  "MaintenanceRequest",
881
1331
  {
882
1332
  "emit": {
883
- "success": "MaintenanceRequestLoaded",
884
- "failure": "MaintenanceRequestLoadFailed"
1333
+ "failure": "MaintenanceRequestLoadFailed",
1334
+ "success": "MaintenanceRequestLoaded"
885
1335
  }
886
1336
  }
887
1337
  ],