@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
@@ -74,6 +74,61 @@
74
74
  "category": "interaction",
75
75
  "linkedEntity": "KitchenTicket",
76
76
  "emits": [
77
+ {
78
+ "event": "OPEN_TICKET",
79
+ "payloadSchema": [
80
+ {
81
+ "name": "id",
82
+ "type": "string",
83
+ "required": true
84
+ },
85
+ {
86
+ "name": "row.id",
87
+ "type": "string",
88
+ "required": true
89
+ },
90
+ {
91
+ "name": "row.orderId",
92
+ "type": "string",
93
+ "required": true
94
+ },
95
+ {
96
+ "name": "row.tableLabel",
97
+ "type": "string"
98
+ },
99
+ {
100
+ "name": "row.serverName",
101
+ "type": "string"
102
+ },
103
+ {
104
+ "name": "row.itemsJson",
105
+ "type": "string"
106
+ },
107
+ {
108
+ "name": "row.status",
109
+ "type": "string"
110
+ },
111
+ {
112
+ "name": "row.aging",
113
+ "type": "string"
114
+ },
115
+ {
116
+ "name": "row.receivedAt",
117
+ "type": "string"
118
+ },
119
+ {
120
+ "name": "row.readyAt",
121
+ "type": "string"
122
+ },
123
+ {
124
+ "name": "row.servedAt",
125
+ "type": "string"
126
+ }
127
+ ]
128
+ },
129
+ {
130
+ "event": "CLOSE_VIEW"
131
+ },
77
132
  {
78
133
  "event": "MARK_PREPARING",
79
134
  "payloadSchema": [
@@ -332,6 +387,9 @@
332
387
  {
333
388
  "name": "browsing"
334
389
  },
390
+ {
391
+ "name": "viewing_single"
392
+ },
335
393
  {
336
394
  "name": "error"
337
395
  }
@@ -366,31 +424,11 @@
366
424
  ]
367
425
  },
368
426
  {
369
- "key": "MARK_PREPARING",
370
- "name": "Mark Preparing",
371
- "payloadSchema": [
372
- {
373
- "name": "ticketId",
374
- "type": "string",
375
- "required": true
376
- },
377
- {
378
- "name": "row",
379
- "type": "KitchenTicket"
380
- }
381
- ]
382
- },
383
- {
384
- "key": "MARK_READY",
385
- "name": "Mark Ready",
427
+ "key": "OPEN_TICKET",
428
+ "name": "Open Ticket",
386
429
  "payloadSchema": [
387
430
  {
388
- "name": "ticketId",
389
- "type": "string",
390
- "required": true
391
- },
392
- {
393
- "name": "readyAt",
431
+ "name": "id",
394
432
  "type": "string",
395
433
  "required": true
396
434
  },
@@ -443,6 +481,45 @@
443
481
  "type": "string"
444
482
  }
445
483
  ]
484
+ },
485
+ {
486
+ "key": "CLOSE_VIEW",
487
+ "name": "Close View"
488
+ },
489
+ {
490
+ "key": "MARK_PREPARING",
491
+ "name": "Mark Preparing",
492
+ "payloadSchema": [
493
+ {
494
+ "name": "ticketId",
495
+ "type": "string",
496
+ "required": true
497
+ },
498
+ {
499
+ "name": "row",
500
+ "type": "KitchenTicket"
501
+ }
502
+ ]
503
+ },
504
+ {
505
+ "key": "MARK_READY",
506
+ "name": "Mark Ready",
507
+ "payloadSchema": [
508
+ {
509
+ "name": "ticketId",
510
+ "type": "string",
511
+ "required": true
512
+ },
513
+ {
514
+ "name": "readyAt",
515
+ "type": "string",
516
+ "required": true
517
+ },
518
+ {
519
+ "name": "row",
520
+ "type": "KitchenTicket"
521
+ }
522
+ ]
446
523
  }
447
524
  ],
448
525
  "transitions": [
@@ -465,21 +542,21 @@
465
542
  "render-ui",
466
543
  "main",
467
544
  {
468
- "type": "stack",
469
- "className": "py-12",
470
- "gap": "md",
545
+ "align": "center",
471
546
  "children": [
472
547
  {
473
548
  "type": "spinner"
474
549
  },
475
550
  {
551
+ "color": "muted",
476
552
  "type": "typography",
477
553
  "content": "Loading kitchen tickets…",
478
- "variant": "caption",
479
- "color": "muted"
554
+ "variant": "caption"
480
555
  }
481
556
  ],
482
- "align": "center",
557
+ "className": "py-12",
558
+ "gap": "md",
559
+ "type": "stack",
483
560
  "direction": "vertical"
484
561
  }
485
562
  ]
@@ -494,52 +571,75 @@
494
571
  "render-ui",
495
572
  "main",
496
573
  {
497
- "direction": "vertical",
498
- "type": "stack",
499
574
  "children": [
500
575
  {
501
- "gap": "sm",
502
- "direction": "horizontal",
503
576
  "children": [
504
577
  {
505
- "type": "icon",
506
- "name": "chef-hat"
578
+ "name": "chef-hat",
579
+ "type": "icon"
507
580
  },
508
581
  {
509
- "content": "@config.title",
510
582
  "variant": "h3",
583
+ "content": "@config.title",
511
584
  "type": "typography"
512
585
  }
513
586
  ],
514
- "type": "stack"
587
+ "direction": "horizontal",
588
+ "type": "stack",
589
+ "align": "center",
590
+ "gap": "sm"
591
+ },
592
+ {
593
+ "type": "simple-grid",
594
+ "cols": 4.0,
595
+ "children": [
596
+ {
597
+ "label": "Open tickets",
598
+ "value": "@payload.data.length",
599
+ "icon": "chef-hat",
600
+ "type": "stat-display"
601
+ },
602
+ {
603
+ "type": "stat-display",
604
+ "icon": "flame",
605
+ "value": "8",
606
+ "label": "Preparing"
607
+ },
608
+ {
609
+ "icon": "check-circle",
610
+ "value": "3",
611
+ "label": "Ready",
612
+ "type": "stat-display"
613
+ },
614
+ {
615
+ "value": "14",
616
+ "label": "Avg prep (min)",
617
+ "icon": "clock",
618
+ "type": "stat-display"
619
+ }
620
+ ]
515
621
  },
516
622
  {
517
623
  "type": "divider"
518
624
  },
519
625
  {
626
+ "cols": 1.0,
520
627
  "itemActions": [
521
628
  {
522
- "icon": "flame",
523
- "event": "MARK_PREPARING",
524
- "variant": "secondary",
525
- "label": "Mark Preparing"
526
- },
527
- {
528
- "event": "MARK_READY",
629
+ "label": "Open",
529
630
  "variant": "primary",
530
- "icon": "check",
531
- "label": "Mark Ready"
631
+ "event": "OPEN_TICKET",
632
+ "icon": "arrow-right"
532
633
  },
533
634
  {
534
635
  "icon": "utensils",
535
- "variant": "primary",
536
636
  "label": "Mark Served",
637
+ "variant": "danger",
537
638
  "event": "MARK_SERVED"
538
639
  }
539
640
  ],
540
641
  "type": "data-grid",
541
642
  "entity": "@payload.data",
542
- "cols": 1.0,
543
643
  "fields": [
544
644
  {
545
645
  "label": "Order",
@@ -547,24 +647,24 @@
547
647
  "variant": "caption"
548
648
  },
549
649
  {
550
- "label": "Table",
551
650
  "variant": "caption",
552
- "name": "tableLabel"
651
+ "name": "tableLabel",
652
+ "label": "Table"
553
653
  },
554
654
  {
555
655
  "label": "Server",
556
- "variant": "caption",
557
- "name": "serverName"
656
+ "name": "serverName",
657
+ "variant": "caption"
558
658
  },
559
659
  {
560
- "name": "status",
660
+ "label": "Status",
561
661
  "variant": "badge",
562
- "label": "Status"
662
+ "name": "status"
563
663
  },
564
664
  {
665
+ "variant": "badge",
565
666
  "name": "aging",
566
- "label": "Aging",
567
- "variant": "badge"
667
+ "label": "Aging"
568
668
  },
569
669
  {
570
670
  "label": "Received",
@@ -575,6 +675,8 @@
575
675
  "gap": "sm"
576
676
  }
577
677
  ],
678
+ "type": "stack",
679
+ "direction": "vertical",
578
680
  "gap": "md"
579
681
  }
580
682
  ]
@@ -589,9 +691,311 @@
589
691
  "render-ui",
590
692
  "main",
591
693
  {
694
+ "type": "alert",
592
695
  "message": "@payload.error",
593
- "variant": "error",
594
- "type": "alert"
696
+ "variant": "error"
697
+ }
698
+ ]
699
+ ]
700
+ },
701
+ {
702
+ "from": "browsing",
703
+ "to": "viewing_single",
704
+ "event": "OPEN_TICKET",
705
+ "effects": [
706
+ [
707
+ "set",
708
+ "@entity.id",
709
+ "@payload.row.id"
710
+ ],
711
+ [
712
+ "set",
713
+ "@entity.orderId",
714
+ "@payload.row.orderId"
715
+ ],
716
+ [
717
+ "set",
718
+ "@entity.tableLabel",
719
+ "@payload.row.tableLabel"
720
+ ],
721
+ [
722
+ "set",
723
+ "@entity.serverName",
724
+ "@payload.row.serverName"
725
+ ],
726
+ [
727
+ "set",
728
+ "@entity.itemsJson",
729
+ "@payload.row.itemsJson"
730
+ ],
731
+ [
732
+ "set",
733
+ "@entity.status",
734
+ "@payload.row.status"
735
+ ],
736
+ [
737
+ "set",
738
+ "@entity.aging",
739
+ "@payload.row.aging"
740
+ ],
741
+ [
742
+ "set",
743
+ "@entity.receivedAt",
744
+ "@payload.row.receivedAt"
745
+ ],
746
+ [
747
+ "set",
748
+ "@entity.readyAt",
749
+ "@payload.row.readyAt"
750
+ ],
751
+ [
752
+ "set",
753
+ "@entity.servedAt",
754
+ "@payload.row.servedAt"
755
+ ],
756
+ [
757
+ "render-ui",
758
+ "main",
759
+ {
760
+ "direction": "vertical",
761
+ "gap": "md",
762
+ "children": [
763
+ {
764
+ "direction": "horizontal",
765
+ "type": "stack",
766
+ "gap": "sm",
767
+ "align": "center",
768
+ "children": [
769
+ {
770
+ "type": "button",
771
+ "variant": "ghost",
772
+ "action": "CLOSE_VIEW",
773
+ "label": "Back"
774
+ },
775
+ {
776
+ "type": "icon",
777
+ "name": "chef-hat"
778
+ },
779
+ {
780
+ "type": "typography",
781
+ "variant": "h3",
782
+ "content": "@entity.orderId"
783
+ },
784
+ {
785
+ "variant": "primary",
786
+ "label": "@entity.status",
787
+ "type": "badge"
788
+ },
789
+ {
790
+ "variant": "default",
791
+ "label": "@entity.aging",
792
+ "type": "badge"
793
+ }
794
+ ]
795
+ },
796
+ {
797
+ "type": "divider"
798
+ },
799
+ {
800
+ "children": [
801
+ {
802
+ "gap": "md",
803
+ "type": "stack",
804
+ "direction": "horizontal",
805
+ "children": [
806
+ {
807
+ "content": "Table",
808
+ "color": "muted",
809
+ "variant": "caption",
810
+ "type": "typography"
811
+ },
812
+ {
813
+ "type": "typography",
814
+ "variant": "body",
815
+ "content": "@entity.tableLabel"
816
+ }
817
+ ]
818
+ },
819
+ {
820
+ "gap": "md",
821
+ "type": "stack",
822
+ "direction": "horizontal",
823
+ "children": [
824
+ {
825
+ "color": "muted",
826
+ "variant": "caption",
827
+ "type": "typography",
828
+ "content": "Server"
829
+ },
830
+ {
831
+ "content": "@entity.serverName",
832
+ "variant": "body",
833
+ "type": "typography"
834
+ }
835
+ ]
836
+ },
837
+ {
838
+ "children": [
839
+ {
840
+ "type": "typography",
841
+ "variant": "caption",
842
+ "color": "muted",
843
+ "content": "Items"
844
+ },
845
+ {
846
+ "type": "typography",
847
+ "variant": "body",
848
+ "content": "@entity.itemsJson"
849
+ }
850
+ ],
851
+ "gap": "md",
852
+ "type": "stack",
853
+ "direction": "horizontal"
854
+ }
855
+ ],
856
+ "type": "stack",
857
+ "gap": "sm",
858
+ "direction": "vertical"
859
+ },
860
+ {
861
+ "type": "divider"
862
+ },
863
+ {
864
+ "type": "simple-grid",
865
+ "children": [
866
+ {
867
+ "icon": "clock",
868
+ "label": "Received",
869
+ "type": "stat-display",
870
+ "value": "@entity.receivedAt"
871
+ },
872
+ {
873
+ "value": "@entity.readyAt",
874
+ "icon": "check-circle",
875
+ "type": "stat-display",
876
+ "label": "Ready at"
877
+ },
878
+ {
879
+ "type": "stat-display",
880
+ "value": "@entity.servedAt",
881
+ "icon": "utensils",
882
+ "label": "Served at"
883
+ }
884
+ ],
885
+ "cols": 3.0
886
+ },
887
+ {
888
+ "gap": "sm",
889
+ "type": "stack",
890
+ "align": "center",
891
+ "children": [
892
+ {
893
+ "actionPayload": {
894
+ "ticketId": "@entity.id"
895
+ },
896
+ "type": "button",
897
+ "variant": "secondary",
898
+ "action": "MARK_PREPARING",
899
+ "label": "Mark Preparing"
900
+ },
901
+ {
902
+ "actionPayload": {
903
+ "readyAt": "now",
904
+ "ticketId": "@entity.id"
905
+ },
906
+ "variant": "primary",
907
+ "type": "button",
908
+ "action": "MARK_READY",
909
+ "label": "Mark Ready"
910
+ },
911
+ {
912
+ "action": "MARK_SERVED",
913
+ "label": "Mark Served",
914
+ "type": "button",
915
+ "variant": "primary",
916
+ "actionPayload": {
917
+ "servedAt": "now",
918
+ "ticketId": "@entity.id"
919
+ }
920
+ }
921
+ ],
922
+ "direction": "horizontal"
923
+ }
924
+ ],
925
+ "type": "stack"
926
+ }
927
+ ]
928
+ ]
929
+ },
930
+ {
931
+ "from": "browsing",
932
+ "to": "loading",
933
+ "event": "MARK_SERVED",
934
+ "effects": [
935
+ [
936
+ "set",
937
+ "@entity.id",
938
+ "@payload.ticketId"
939
+ ],
940
+ [
941
+ "set",
942
+ "@entity.status",
943
+ "served"
944
+ ],
945
+ [
946
+ "set",
947
+ "@entity.servedAt",
948
+ "@payload.servedAt"
949
+ ],
950
+ [
951
+ "persist",
952
+ "update",
953
+ "KitchenTicket",
954
+ "@entity",
955
+ {
956
+ "emit": {
957
+ "failure": "KitchenTicketUpdateFailed",
958
+ "success": "KitchenTicketUpdated"
959
+ }
960
+ }
961
+ ],
962
+ [
963
+ "render-ui",
964
+ "main",
965
+ {
966
+ "align": "center",
967
+ "type": "stack",
968
+ "className": "py-12",
969
+ "children": [
970
+ {
971
+ "type": "spinner"
972
+ },
973
+ {
974
+ "variant": "caption",
975
+ "color": "muted",
976
+ "content": "Marking ticket served…",
977
+ "type": "typography"
978
+ }
979
+ ],
980
+ "direction": "vertical",
981
+ "gap": "md"
982
+ }
983
+ ]
984
+ ]
985
+ },
986
+ {
987
+ "from": "browsing",
988
+ "to": "loading",
989
+ "event": "KitchenTicketUpdated",
990
+ "effects": [
991
+ [
992
+ "fetch",
993
+ "KitchenTicket",
994
+ {
995
+ "emit": {
996
+ "success": "KitchenTicketLoaded",
997
+ "failure": "KitchenTicketLoadFailed"
998
+ }
595
999
  }
596
1000
  ]
597
1001
  ]
@@ -599,6 +1003,61 @@
599
1003
  {
600
1004
  "from": "browsing",
601
1005
  "to": "browsing",
1006
+ "event": "KitchenTicketUpdateFailed",
1007
+ "effects": [
1008
+ [
1009
+ "render-ui",
1010
+ "main",
1011
+ {
1012
+ "type": "alert",
1013
+ "message": "@payload.error",
1014
+ "variant": "error"
1015
+ }
1016
+ ]
1017
+ ]
1018
+ },
1019
+ {
1020
+ "from": "viewing_single",
1021
+ "to": "loading",
1022
+ "event": "CLOSE_VIEW",
1023
+ "effects": [
1024
+ [
1025
+ "fetch",
1026
+ "KitchenTicket",
1027
+ {
1028
+ "emit": {
1029
+ "failure": "KitchenTicketLoadFailed",
1030
+ "success": "KitchenTicketLoaded"
1031
+ }
1032
+ }
1033
+ ],
1034
+ [
1035
+ "render-ui",
1036
+ "main",
1037
+ {
1038
+ "type": "stack",
1039
+ "gap": "md",
1040
+ "className": "py-12",
1041
+ "align": "center",
1042
+ "direction": "vertical",
1043
+ "children": [
1044
+ {
1045
+ "type": "spinner"
1046
+ },
1047
+ {
1048
+ "color": "muted",
1049
+ "type": "typography",
1050
+ "variant": "caption",
1051
+ "content": "Loading kitchen tickets…"
1052
+ }
1053
+ ]
1054
+ }
1055
+ ]
1056
+ ]
1057
+ },
1058
+ {
1059
+ "from": "viewing_single",
1060
+ "to": "loading",
602
1061
  "event": "MARK_PREPARING",
603
1062
  "effects": [
604
1063
  [
@@ -618,16 +1077,38 @@
618
1077
  "@entity",
619
1078
  {
620
1079
  "emit": {
621
- "success": "KitchenTicketUpdated",
622
- "failure": "KitchenTicketUpdateFailed"
1080
+ "failure": "KitchenTicketUpdateFailed",
1081
+ "success": "KitchenTicketUpdated"
623
1082
  }
624
1083
  }
1084
+ ],
1085
+ [
1086
+ "render-ui",
1087
+ "main",
1088
+ {
1089
+ "gap": "md",
1090
+ "children": [
1091
+ {
1092
+ "type": "spinner"
1093
+ },
1094
+ {
1095
+ "variant": "caption",
1096
+ "color": "muted",
1097
+ "type": "typography",
1098
+ "content": "Marking ticket preparing…"
1099
+ }
1100
+ ],
1101
+ "type": "stack",
1102
+ "direction": "vertical",
1103
+ "align": "center",
1104
+ "className": "py-12"
1105
+ }
625
1106
  ]
626
1107
  ]
627
1108
  },
628
1109
  {
629
- "from": "browsing",
630
- "to": "browsing",
1110
+ "from": "viewing_single",
1111
+ "to": "loading",
631
1112
  "event": "MARK_READY",
632
1113
  "effects": [
633
1114
  [
@@ -656,12 +1137,34 @@
656
1137
  "failure": "KitchenTicketUpdateFailed"
657
1138
  }
658
1139
  }
1140
+ ],
1141
+ [
1142
+ "render-ui",
1143
+ "main",
1144
+ {
1145
+ "type": "stack",
1146
+ "align": "center",
1147
+ "className": "py-12",
1148
+ "direction": "vertical",
1149
+ "children": [
1150
+ {
1151
+ "type": "spinner"
1152
+ },
1153
+ {
1154
+ "variant": "caption",
1155
+ "content": "Marking ticket ready…",
1156
+ "type": "typography",
1157
+ "color": "muted"
1158
+ }
1159
+ ],
1160
+ "gap": "md"
1161
+ }
659
1162
  ]
660
1163
  ]
661
1164
  },
662
1165
  {
663
- "from": "browsing",
664
- "to": "browsing",
1166
+ "from": "viewing_single",
1167
+ "to": "loading",
665
1168
  "event": "MARK_SERVED",
666
1169
  "effects": [
667
1170
  [
@@ -690,38 +1193,27 @@
690
1193
  "failure": "KitchenTicketUpdateFailed"
691
1194
  }
692
1195
  }
693
- ]
694
- ]
695
- },
696
- {
697
- "from": "browsing",
698
- "to": "loading",
699
- "event": "KitchenTicketUpdated",
700
- "effects": [
701
- [
702
- "fetch",
703
- "KitchenTicket",
704
- {
705
- "emit": {
706
- "success": "KitchenTicketLoaded",
707
- "failure": "KitchenTicketLoadFailed"
708
- }
709
- }
710
- ]
711
- ]
712
- },
713
- {
714
- "from": "browsing",
715
- "to": "browsing",
716
- "event": "KitchenTicketUpdateFailed",
717
- "effects": [
1196
+ ],
718
1197
  [
719
1198
  "render-ui",
720
1199
  "main",
721
1200
  {
722
- "variant": "error",
723
- "type": "alert",
724
- "message": "@payload.error"
1201
+ "align": "center",
1202
+ "className": "py-12",
1203
+ "children": [
1204
+ {
1205
+ "type": "spinner"
1206
+ },
1207
+ {
1208
+ "type": "typography",
1209
+ "variant": "caption",
1210
+ "content": "Marking ticket served…",
1211
+ "color": "muted"
1212
+ }
1213
+ ],
1214
+ "direction": "vertical",
1215
+ "gap": "md",
1216
+ "type": "stack"
725
1217
  }
726
1218
  ]
727
1219
  ]
@@ -754,13 +1246,13 @@
754
1246
  ]
755
1247
  },
756
1248
  "config": {
757
- "title": {
758
- "type": "string",
759
- "default": "Kitchen Display"
760
- },
761
1249
  "overdueMinutes": {
762
1250
  "type": "number",
763
1251
  "default": 20.0
1252
+ },
1253
+ "title": {
1254
+ "type": "string",
1255
+ "default": "Kitchen Display"
764
1256
  }
765
1257
  },
766
1258
  "scope": "collection"