@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-timesheet",
3
3
  "version": "1.0.0",
4
- "description": "std-timesheet — weekly timesheet primitive holding total/billable hours for one employee and tracking approval status.",
4
+ "description": "std-timesheet — weekly timesheet primitive holding total/billable hours for one employee. Lists timesheets in `browsing`; opens detail in `viewing_single` with Submit / Approve / Reject / Revise / Delete actions.",
5
5
  "orbitals": [
6
6
  {
7
7
  "name": "TimesheetOrbital",
@@ -91,7 +91,7 @@
91
91
  "linkedEntity": "Timesheet",
92
92
  "emits": [
93
93
  {
94
- "event": "VIEW",
94
+ "event": "OPEN_TIMESHEET",
95
95
  "payloadSchema": [
96
96
  {
97
97
  "name": "id",
@@ -99,48 +99,66 @@
99
99
  "required": true
100
100
  },
101
101
  {
102
- "name": "source",
103
- "type": "string"
104
- }
105
- ]
106
- },
107
- {
108
- "event": "EDIT",
109
- "payloadSchema": [
102
+ "name": "row.id",
103
+ "type": "string",
104
+ "required": true
105
+ },
110
106
  {
111
- "name": "id",
107
+ "name": "row.employeeId",
112
108
  "type": "string",
113
109
  "required": true
114
110
  },
115
111
  {
116
- "name": "source",
112
+ "name": "row.employeeName",
117
113
  "type": "string"
118
- }
119
- ]
120
- },
121
- {
122
- "event": "CREATE",
123
- "payloadSchema": [
114
+ },
124
115
  {
125
- "name": "source",
126
- "type": "string"
127
- }
128
- ]
129
- },
130
- {
131
- "event": "REQUEST_DELETE",
132
- "payloadSchema": [
116
+ "name": "row.periodStart",
117
+ "type": "string",
118
+ "required": true
119
+ },
133
120
  {
134
- "name": "id",
121
+ "name": "row.periodEnd",
135
122
  "type": "string",
136
123
  "required": true
137
124
  },
138
125
  {
139
- "name": "source",
126
+ "name": "row.totalHours",
127
+ "type": "number"
128
+ },
129
+ {
130
+ "name": "row.billableHours",
131
+ "type": "number"
132
+ },
133
+ {
134
+ "name": "row.status",
135
+ "type": "string"
136
+ },
137
+ {
138
+ "name": "row.submittedAt",
139
+ "type": "string"
140
+ },
141
+ {
142
+ "name": "row.approvedBy",
143
+ "type": "string"
144
+ },
145
+ {
146
+ "name": "row.approvedAt",
147
+ "type": "string"
148
+ },
149
+ {
150
+ "name": "row.notes",
151
+ "type": "string"
152
+ },
153
+ {
154
+ "name": "row.pendingId",
140
155
  "type": "string"
141
156
  }
142
157
  ]
143
158
  },
159
+ {
160
+ "event": "CLOSE_VIEW"
161
+ },
144
162
  {
145
163
  "event": "SUBMIT",
146
164
  "payloadSchema": [
@@ -405,6 +423,16 @@
405
423
  }
406
424
  ]
407
425
  },
426
+ {
427
+ "event": "REQUEST_DELETE",
428
+ "payloadSchema": [
429
+ {
430
+ "name": "id",
431
+ "type": "string",
432
+ "required": true
433
+ }
434
+ ]
435
+ },
408
436
  {
409
437
  "event": "TimesheetLoaded",
410
438
  "payloadSchema": [
@@ -439,7 +467,10 @@
439
467
  "isInitial": true
440
468
  },
441
469
  {
442
- "name": "viewing"
470
+ "name": "browsing"
471
+ },
472
+ {
473
+ "name": "viewing_single"
443
474
  },
444
475
  {
445
476
  "name": "error"
@@ -479,34 +510,34 @@
479
510
  ]
480
511
  },
481
512
  {
482
- "key": "REFRESH",
483
- "name": "Refresh",
513
+ "key": "OPEN_TIMESHEET",
514
+ "name": "Open Timesheet",
484
515
  "payloadSchema": [
485
516
  {
486
- "name": "source",
487
- "type": "string"
517
+ "name": "id",
518
+ "type": "string",
519
+ "required": true
520
+ },
521
+ {
522
+ "name": "row",
523
+ "type": "Timesheet"
488
524
  }
489
525
  ]
490
526
  },
491
527
  {
492
- "key": "SEARCH",
493
- "name": "Search",
528
+ "key": "REQUEST_DELETE",
529
+ "name": "Request Delete",
494
530
  "payloadSchema": [
495
531
  {
496
- "name": "query",
497
- "type": "string"
532
+ "name": "id",
533
+ "type": "string",
534
+ "required": true
498
535
  }
499
536
  ]
500
537
  },
501
538
  {
502
- "key": "FILTER_STATUS",
503
- "name": "Filter Status",
504
- "payloadSchema": [
505
- {
506
- "name": "status",
507
- "type": "string"
508
- }
509
- ]
539
+ "key": "CLOSE_VIEW",
540
+ "name": "Close View"
510
541
  },
511
542
  {
512
543
  "key": "SUBMIT",
@@ -516,6 +547,10 @@
516
547
  "name": "id",
517
548
  "type": "string",
518
549
  "required": true
550
+ },
551
+ {
552
+ "name": "row",
553
+ "type": "Timesheet"
519
554
  }
520
555
  ]
521
556
  },
@@ -527,6 +562,10 @@
527
562
  "name": "id",
528
563
  "type": "string",
529
564
  "required": true
565
+ },
566
+ {
567
+ "name": "row",
568
+ "type": "Timesheet"
530
569
  }
531
570
  ]
532
571
  },
@@ -538,6 +577,10 @@
538
577
  "name": "id",
539
578
  "type": "string",
540
579
  "required": true
580
+ },
581
+ {
582
+ "name": "row",
583
+ "type": "Timesheet"
541
584
  }
542
585
  ]
543
586
  },
@@ -549,49 +592,10 @@
549
592
  "name": "id",
550
593
  "type": "string",
551
594
  "required": true
552
- }
553
- ]
554
- },
555
- {
556
- "key": "CREATE",
557
- "name": "Create",
558
- "payloadSchema": [
559
- {
560
- "name": "source",
561
- "type": "string"
562
- }
563
- ]
564
- },
565
- {
566
- "key": "VIEW",
567
- "name": "View",
568
- "payloadSchema": [
569
- {
570
- "name": "id",
571
- "type": "string",
572
- "required": true
573
- }
574
- ]
575
- },
576
- {
577
- "key": "EDIT",
578
- "name": "Edit",
579
- "payloadSchema": [
580
- {
581
- "name": "id",
582
- "type": "string",
583
- "required": true
584
- }
585
- ]
586
- },
587
- {
588
- "key": "REQUEST_DELETE",
589
- "name": "Request Delete",
590
- "payloadSchema": [
595
+ },
591
596
  {
592
- "name": "id",
593
- "type": "string",
594
- "required": true
597
+ "name": "row",
598
+ "type": "Timesheet"
595
599
  }
596
600
  ]
597
601
  }
@@ -607,8 +611,8 @@
607
611
  "Timesheet",
608
612
  {
609
613
  "emit": {
610
- "failure": "TimesheetLoadFailed",
611
- "success": "TimesheetLoaded"
614
+ "success": "TimesheetLoaded",
615
+ "failure": "TimesheetLoadFailed"
612
616
  }
613
617
  }
614
618
  ],
@@ -616,20 +620,20 @@
616
620
  "render-ui",
617
621
  "main",
618
622
  {
623
+ "className": "py-12",
619
624
  "children": [
620
625
  {
621
626
  "type": "spinner"
622
627
  },
623
628
  {
629
+ "color": "muted",
624
630
  "type": "typography",
625
631
  "variant": "caption",
626
- "color": "muted",
627
632
  "content": "Loading timesheets…"
628
633
  }
629
634
  ],
630
635
  "align": "center",
631
636
  "type": "stack",
632
- "className": "py-12",
633
637
  "direction": "vertical",
634
638
  "gap": "md"
635
639
  }
@@ -638,7 +642,7 @@
638
642
  },
639
643
  {
640
644
  "from": "loading",
641
- "to": "viewing",
645
+ "to": "browsing",
642
646
  "event": "TimesheetLoaded",
643
647
  "effects": [
644
648
  [
@@ -647,91 +651,70 @@
647
651
  {
648
652
  "children": [
649
653
  {
650
- "gap": "sm",
651
654
  "type": "stack",
655
+ "align": "center",
656
+ "gap": "sm",
657
+ "direction": "horizontal",
652
658
  "children": [
653
659
  {
654
- "type": "icon",
655
- "name": "clock"
660
+ "name": "clock",
661
+ "type": "icon"
656
662
  },
657
663
  {
658
664
  "type": "typography",
659
665
  "content": "@config.title",
660
666
  "variant": "h3"
661
- },
662
- {
663
- "type": "button",
664
- "variant": "primary",
665
- "label": "New Timesheet",
666
- "action": "CREATE"
667
667
  }
668
- ],
669
- "align": "center",
670
- "direction": "horizontal"
671
- },
672
- {
673
- "type": "progress-dots",
674
- "size": "md",
675
- "count": 7.0,
676
- "currentIndex": 3.0
677
- },
678
- {
679
- "type": "calendar-grid",
680
- "timeSlots": [
681
- "09:00",
682
- "10:00",
683
- "11:00",
684
- "12:00",
685
- "13:00",
686
- "14:00",
687
- "15:00",
688
- "16:00",
689
- "17:00"
690
668
  ]
691
669
  },
692
670
  {
693
- "type": "divider"
694
- },
695
- {
696
- "itemActions": [
697
- {
698
- "event": "VIEW",
699
- "variant": "ghost",
700
- "label": "View"
701
- },
671
+ "cols": 4.0,
672
+ "children": [
702
673
  {
703
- "variant": "secondary",
704
- "label": "Edit",
705
- "event": "EDIT"
674
+ "type": "stat-display",
675
+ "icon": "clock",
676
+ "value": "@payload.data.length",
677
+ "label": "Total timesheets"
706
678
  },
707
679
  {
708
- "label": "Submit",
709
- "event": "SUBMIT",
710
- "variant": "primary"
680
+ "label": "Pending approval",
681
+ "type": "stat-display",
682
+ "value": "14",
683
+ "icon": "hourglass"
711
684
  },
712
685
  {
713
- "event": "APPROVE",
714
- "variant": "primary",
715
- "label": "Approve"
686
+ "icon": "dollar-sign",
687
+ "value": "1,240",
688
+ "type": "stat-display",
689
+ "label": "Billable hours wk"
716
690
  },
717
691
  {
718
- "variant": "danger",
719
- "label": "Reject",
720
- "event": "REJECT"
721
- },
692
+ "icon": "check-circle",
693
+ "value": "38",
694
+ "type": "stat-display",
695
+ "label": "Approved this wk"
696
+ }
697
+ ],
698
+ "type": "simple-grid"
699
+ },
700
+ {
701
+ "type": "divider"
702
+ },
703
+ {
704
+ "itemActions": [
722
705
  {
723
- "variant": "secondary",
724
- "event": "REQUEST_REVISION",
725
- "label": "Revise"
706
+ "icon": "arrow-right",
707
+ "variant": "primary",
708
+ "label": "Open",
709
+ "event": "OPEN_TIMESHEET"
726
710
  },
727
711
  {
728
- "variant": "danger",
712
+ "event": "REQUEST_DELETE",
729
713
  "label": "Delete",
730
- "event": "REQUEST_DELETE"
714
+ "variant": "danger"
731
715
  }
732
716
  ],
733
- "cols": 1.0,
734
- "entity": "@payload.data",
717
+ "type": "data-grid",
735
718
  "fields": [
736
719
  {
737
720
  "name": "employeeName",
@@ -739,43 +722,44 @@
739
722
  "variant": "caption"
740
723
  },
741
724
  {
742
- "variant": "caption",
743
725
  "name": "periodStart",
744
- "label": "Period Start"
726
+ "label": "Period Start",
727
+ "variant": "caption"
745
728
  },
746
729
  {
730
+ "name": "periodEnd",
747
731
  "variant": "caption",
748
- "label": "Period End",
749
- "name": "periodEnd"
732
+ "label": "Period End"
750
733
  },
751
734
  {
735
+ "variant": "caption",
752
736
  "name": "totalHours",
753
- "label": "Total Hours",
754
- "variant": "caption"
737
+ "label": "Total Hours"
755
738
  },
756
739
  {
757
- "label": "Billable",
740
+ "variant": "caption",
758
741
  "name": "billableHours",
759
- "variant": "caption"
742
+ "label": "Billable"
760
743
  },
761
744
  {
762
- "name": "status",
763
745
  "label": "Status",
764
- "variant": "badge"
746
+ "variant": "badge",
747
+ "name": "status"
765
748
  },
766
749
  {
767
- "variant": "caption",
768
750
  "name": "approvedBy",
769
- "label": "Approved By"
751
+ "label": "Approved By",
752
+ "variant": "caption"
770
753
  }
771
754
  ],
755
+ "entity": "@payload.data",
772
756
  "gap": "sm",
773
- "type": "data-grid"
757
+ "cols": 1.0
774
758
  }
775
759
  ],
776
760
  "direction": "vertical",
777
- "gap": "md",
778
- "type": "stack"
761
+ "type": "stack",
762
+ "gap": "md"
779
763
  }
780
764
  ]
781
765
  ]
@@ -789,18 +773,283 @@
789
773
  "render-ui",
790
774
  "main",
791
775
  {
792
- "type": "alert",
793
776
  "variant": "error",
794
- "message": "@payload.error"
777
+ "message": "@payload.error",
778
+ "type": "alert"
795
779
  }
796
780
  ]
797
781
  ]
798
782
  },
799
783
  {
800
- "from": "viewing",
784
+ "from": "browsing",
785
+ "to": "viewing_single",
786
+ "event": "OPEN_TIMESHEET",
787
+ "effects": [
788
+ [
789
+ "set",
790
+ "@entity.id",
791
+ "@payload.row.id"
792
+ ],
793
+ [
794
+ "set",
795
+ "@entity.employeeId",
796
+ "@payload.row.employeeId"
797
+ ],
798
+ [
799
+ "set",
800
+ "@entity.employeeName",
801
+ "@payload.row.employeeName"
802
+ ],
803
+ [
804
+ "set",
805
+ "@entity.periodStart",
806
+ "@payload.row.periodStart"
807
+ ],
808
+ [
809
+ "set",
810
+ "@entity.periodEnd",
811
+ "@payload.row.periodEnd"
812
+ ],
813
+ [
814
+ "set",
815
+ "@entity.totalHours",
816
+ "@payload.row.totalHours"
817
+ ],
818
+ [
819
+ "set",
820
+ "@entity.billableHours",
821
+ "@payload.row.billableHours"
822
+ ],
823
+ [
824
+ "set",
825
+ "@entity.status",
826
+ "@payload.row.status"
827
+ ],
828
+ [
829
+ "set",
830
+ "@entity.submittedAt",
831
+ "@payload.row.submittedAt"
832
+ ],
833
+ [
834
+ "set",
835
+ "@entity.approvedBy",
836
+ "@payload.row.approvedBy"
837
+ ],
838
+ [
839
+ "set",
840
+ "@entity.approvedAt",
841
+ "@payload.row.approvedAt"
842
+ ],
843
+ [
844
+ "set",
845
+ "@entity.notes",
846
+ "@payload.row.notes"
847
+ ],
848
+ [
849
+ "render-ui",
850
+ "main",
851
+ {
852
+ "direction": "vertical",
853
+ "type": "stack",
854
+ "gap": "md",
855
+ "children": [
856
+ {
857
+ "children": [
858
+ {
859
+ "label": "Back",
860
+ "variant": "ghost",
861
+ "action": "CLOSE_VIEW",
862
+ "type": "button"
863
+ },
864
+ {
865
+ "type": "icon",
866
+ "name": "clock"
867
+ },
868
+ {
869
+ "variant": "h3",
870
+ "type": "typography",
871
+ "content": "@entity.employeeName"
872
+ },
873
+ {
874
+ "type": "badge",
875
+ "label": "@entity.status",
876
+ "variant": "primary"
877
+ }
878
+ ],
879
+ "direction": "horizontal",
880
+ "type": "stack",
881
+ "gap": "sm",
882
+ "align": "center"
883
+ },
884
+ {
885
+ "type": "divider"
886
+ },
887
+ {
888
+ "type": "stack",
889
+ "children": [
890
+ {
891
+ "type": "stack",
892
+ "children": [
893
+ {
894
+ "type": "typography",
895
+ "content": "Employee ID",
896
+ "color": "muted",
897
+ "variant": "caption"
898
+ },
899
+ {
900
+ "content": "@entity.employeeId",
901
+ "variant": "body",
902
+ "type": "typography"
903
+ }
904
+ ],
905
+ "direction": "horizontal",
906
+ "gap": "md"
907
+ },
908
+ {
909
+ "gap": "md",
910
+ "direction": "horizontal",
911
+ "type": "stack",
912
+ "children": [
913
+ {
914
+ "variant": "caption",
915
+ "content": "Approved by",
916
+ "color": "muted",
917
+ "type": "typography"
918
+ },
919
+ {
920
+ "content": "@entity.approvedBy",
921
+ "type": "typography",
922
+ "variant": "body"
923
+ }
924
+ ]
925
+ },
926
+ {
927
+ "type": "stack",
928
+ "direction": "horizontal",
929
+ "gap": "md",
930
+ "children": [
931
+ {
932
+ "color": "muted",
933
+ "type": "typography",
934
+ "content": "Notes",
935
+ "variant": "caption"
936
+ },
937
+ {
938
+ "type": "typography",
939
+ "variant": "body",
940
+ "content": "@entity.notes"
941
+ }
942
+ ]
943
+ }
944
+ ],
945
+ "direction": "vertical",
946
+ "gap": "sm"
947
+ },
948
+ {
949
+ "type": "divider"
950
+ },
951
+ {
952
+ "type": "simple-grid",
953
+ "children": [
954
+ {
955
+ "value": "@entity.totalHours",
956
+ "type": "stat-display",
957
+ "label": "Total hours",
958
+ "icon": "clock"
959
+ },
960
+ {
961
+ "label": "Billable",
962
+ "value": "@entity.billableHours",
963
+ "icon": "dollar-sign",
964
+ "type": "stat-display"
965
+ },
966
+ {
967
+ "label": "Period start",
968
+ "value": "@entity.periodStart",
969
+ "type": "stat-display",
970
+ "icon": "calendar"
971
+ },
972
+ {
973
+ "type": "stat-display",
974
+ "icon": "calendar-check",
975
+ "value": "@entity.periodEnd",
976
+ "label": "Period end"
977
+ }
978
+ ],
979
+ "cols": 4.0
980
+ },
981
+ {
982
+ "type": "stack",
983
+ "children": [
984
+ {
985
+ "type": "button",
986
+ "action": "SUBMIT",
987
+ "label": "Submit",
988
+ "variant": "primary",
989
+ "actionPayload": {
990
+ "row": "@entity",
991
+ "id": "@entity.id"
992
+ }
993
+ },
994
+ {
995
+ "actionPayload": {
996
+ "row": "@entity",
997
+ "id": "@entity.id"
998
+ },
999
+ "label": "Approve",
1000
+ "variant": "primary",
1001
+ "action": "APPROVE",
1002
+ "type": "button"
1003
+ },
1004
+ {
1005
+ "actionPayload": {
1006
+ "row": "@entity",
1007
+ "id": "@entity.id"
1008
+ },
1009
+ "action": "REJECT",
1010
+ "type": "button",
1011
+ "label": "Reject",
1012
+ "variant": "danger"
1013
+ },
1014
+ {
1015
+ "action": "REQUEST_REVISION",
1016
+ "variant": "secondary",
1017
+ "label": "Revise",
1018
+ "type": "button",
1019
+ "actionPayload": {
1020
+ "id": "@entity.id",
1021
+ "row": "@entity"
1022
+ }
1023
+ },
1024
+ {
1025
+ "type": "button",
1026
+ "actionPayload": {
1027
+ "id": "@entity.id"
1028
+ },
1029
+ "action": "REQUEST_DELETE",
1030
+ "label": "Delete",
1031
+ "variant": "danger"
1032
+ }
1033
+ ],
1034
+ "direction": "horizontal",
1035
+ "gap": "sm",
1036
+ "align": "center"
1037
+ }
1038
+ ]
1039
+ }
1040
+ ]
1041
+ ]
1042
+ },
1043
+ {
1044
+ "from": "browsing",
801
1045
  "to": "loading",
802
- "event": "REFRESH",
1046
+ "event": "REQUEST_DELETE",
803
1047
  "effects": [
1048
+ [
1049
+ "set",
1050
+ "@entity.id",
1051
+ "@payload.id"
1052
+ ],
804
1053
  [
805
1054
  "fetch",
806
1055
  "Timesheet",
@@ -815,38 +1064,38 @@
815
1064
  "render-ui",
816
1065
  "main",
817
1066
  {
1067
+ "type": "stack",
818
1068
  "children": [
819
1069
  {
820
1070
  "type": "spinner"
821
1071
  },
822
1072
  {
1073
+ "content": "Deleting timesheet…",
823
1074
  "color": "muted",
824
- "content": "Refreshing timesheets…",
825
- "type": "typography",
826
- "variant": "caption"
1075
+ "variant": "caption",
1076
+ "type": "typography"
827
1077
  }
828
1078
  ],
829
1079
  "align": "center",
1080
+ "className": "py-12",
830
1081
  "direction": "vertical",
831
- "type": "stack",
832
- "gap": "md",
833
- "className": "py-12"
1082
+ "gap": "md"
834
1083
  }
835
1084
  ]
836
1085
  ]
837
1086
  },
838
1087
  {
839
- "from": "viewing",
1088
+ "from": "viewing_single",
840
1089
  "to": "loading",
841
- "event": "SEARCH",
1090
+ "event": "CLOSE_VIEW",
842
1091
  "effects": [
843
1092
  [
844
1093
  "fetch",
845
1094
  "Timesheet",
846
1095
  {
847
1096
  "emit": {
848
- "success": "TimesheetLoaded",
849
- "failure": "TimesheetLoadFailed"
1097
+ "failure": "TimesheetLoadFailed",
1098
+ "success": "TimesheetLoaded"
850
1099
  }
851
1100
  }
852
1101
  ],
@@ -854,31 +1103,36 @@
854
1103
  "render-ui",
855
1104
  "main",
856
1105
  {
857
- "align": "center",
858
1106
  "className": "py-12",
859
- "gap": "md",
860
1107
  "children": [
861
1108
  {
862
1109
  "type": "spinner"
863
1110
  },
864
1111
  {
865
- "type": "typography",
1112
+ "content": "Loading timesheets…",
866
1113
  "color": "muted",
867
- "variant": "caption",
868
- "content": "Searching timesheets…"
1114
+ "type": "typography",
1115
+ "variant": "caption"
869
1116
  }
870
1117
  ],
871
1118
  "type": "stack",
1119
+ "gap": "md",
1120
+ "align": "center",
872
1121
  "direction": "vertical"
873
1122
  }
874
1123
  ]
875
1124
  ]
876
1125
  },
877
1126
  {
878
- "from": "viewing",
1127
+ "from": "viewing_single",
879
1128
  "to": "loading",
880
- "event": "FILTER_STATUS",
1129
+ "event": "SUBMIT",
881
1130
  "effects": [
1131
+ [
1132
+ "set",
1133
+ "@entity.id",
1134
+ "@payload.id"
1135
+ ],
882
1136
  [
883
1137
  "fetch",
884
1138
  "Timesheet",
@@ -893,30 +1147,30 @@
893
1147
  "render-ui",
894
1148
  "main",
895
1149
  {
896
- "align": "center",
1150
+ "type": "stack",
1151
+ "className": "py-12",
897
1152
  "children": [
898
1153
  {
899
1154
  "type": "spinner"
900
1155
  },
901
1156
  {
902
1157
  "variant": "caption",
1158
+ "content": "Submitting timesheet…",
903
1159
  "color": "muted",
904
- "content": "Filtering timesheets…",
905
1160
  "type": "typography"
906
1161
  }
907
1162
  ],
908
- "gap": "md",
909
1163
  "direction": "vertical",
910
- "className": "py-12",
911
- "type": "stack"
1164
+ "gap": "md",
1165
+ "align": "center"
912
1166
  }
913
1167
  ]
914
1168
  ]
915
1169
  },
916
1170
  {
917
- "from": "viewing",
918
- "to": "viewing",
919
- "event": "SUBMIT",
1171
+ "from": "viewing_single",
1172
+ "to": "loading",
1173
+ "event": "APPROVE",
920
1174
  "effects": [
921
1175
  [
922
1176
  "set",
@@ -924,40 +1178,42 @@
924
1178
  "@payload.id"
925
1179
  ],
926
1180
  [
927
- "render-ui",
928
- "main",
1181
+ "fetch",
1182
+ "Timesheet",
929
1183
  {
930
- "message": "Timesheet submitted",
931
- "variant": "success",
932
- "type": "alert"
1184
+ "emit": {
1185
+ "success": "TimesheetLoaded",
1186
+ "failure": "TimesheetLoadFailed"
1187
+ }
933
1188
  }
934
- ]
935
- ]
936
- },
937
- {
938
- "from": "viewing",
939
- "to": "viewing",
940
- "event": "APPROVE",
941
- "effects": [
942
- [
943
- "set",
944
- "@entity.id",
945
- "@payload.id"
946
1189
  ],
947
1190
  [
948
1191
  "render-ui",
949
1192
  "main",
950
1193
  {
951
- "variant": "success",
952
- "message": "Timesheet approved",
953
- "type": "alert"
1194
+ "children": [
1195
+ {
1196
+ "type": "spinner"
1197
+ },
1198
+ {
1199
+ "variant": "caption",
1200
+ "content": "Approving timesheet…",
1201
+ "color": "muted",
1202
+ "type": "typography"
1203
+ }
1204
+ ],
1205
+ "gap": "md",
1206
+ "type": "stack",
1207
+ "direction": "vertical",
1208
+ "align": "center",
1209
+ "className": "py-12"
954
1210
  }
955
1211
  ]
956
1212
  ]
957
1213
  },
958
1214
  {
959
- "from": "viewing",
960
- "to": "viewing",
1215
+ "from": "viewing_single",
1216
+ "to": "loading",
961
1217
  "event": "REJECT",
962
1218
  "effects": [
963
1219
  [
@@ -966,57 +1222,43 @@
966
1222
  "@payload.id"
967
1223
  ],
968
1224
  [
969
- "render-ui",
970
- "main",
1225
+ "fetch",
1226
+ "Timesheet",
971
1227
  {
972
- "type": "alert",
973
- "variant": "info",
974
- "message": "Timesheet rejected"
1228
+ "emit": {
1229
+ "failure": "TimesheetLoadFailed",
1230
+ "success": "TimesheetLoaded"
1231
+ }
975
1232
  }
976
- ]
977
- ]
978
- },
979
- {
980
- "from": "viewing",
981
- "to": "viewing",
982
- "event": "REQUEST_REVISION",
983
- "effects": [
984
- [
985
- "set",
986
- "@entity.id",
987
- "@payload.id"
988
1233
  ],
989
1234
  [
990
1235
  "render-ui",
991
1236
  "main",
992
1237
  {
993
- "message": "Revision requested",
994
- "type": "alert",
995
- "variant": "info"
996
- }
997
- ]
998
- ]
999
- },
1000
- {
1001
- "from": "viewing",
1002
- "to": "viewing",
1003
- "event": "CREATE",
1004
- "effects": [
1005
- [
1006
- "render-ui",
1007
- "main",
1008
- {
1009
- "type": "alert",
1010
- "message": "Creating new timesheet",
1011
- "variant": "info"
1238
+ "className": "py-12",
1239
+ "direction": "vertical",
1240
+ "children": [
1241
+ {
1242
+ "type": "spinner"
1243
+ },
1244
+ {
1245
+ "type": "typography",
1246
+ "variant": "caption",
1247
+ "color": "muted",
1248
+ "content": "Rejecting timesheet…"
1249
+ }
1250
+ ],
1251
+ "gap": "md",
1252
+ "type": "stack",
1253
+ "align": "center"
1012
1254
  }
1013
1255
  ]
1014
1256
  ]
1015
1257
  },
1016
1258
  {
1017
- "from": "viewing",
1018
- "to": "viewing",
1019
- "event": "VIEW",
1259
+ "from": "viewing_single",
1260
+ "to": "loading",
1261
+ "event": "REQUEST_REVISION",
1020
1262
  "effects": [
1021
1263
  [
1022
1264
  "set",
@@ -1024,40 +1266,42 @@
1024
1266
  "@payload.id"
1025
1267
  ],
1026
1268
  [
1027
- "render-ui",
1028
- "main",
1269
+ "fetch",
1270
+ "Timesheet",
1029
1271
  {
1030
- "variant": "info",
1031
- "message": "Viewing timesheet",
1032
- "type": "alert"
1272
+ "emit": {
1273
+ "failure": "TimesheetLoadFailed",
1274
+ "success": "TimesheetLoaded"
1275
+ }
1033
1276
  }
1034
- ]
1035
- ]
1036
- },
1037
- {
1038
- "from": "viewing",
1039
- "to": "viewing",
1040
- "event": "EDIT",
1041
- "effects": [
1042
- [
1043
- "set",
1044
- "@entity.id",
1045
- "@payload.id"
1046
1277
  ],
1047
1278
  [
1048
1279
  "render-ui",
1049
1280
  "main",
1050
1281
  {
1051
- "type": "alert",
1052
- "variant": "info",
1053
- "message": "Editing timesheet"
1282
+ "type": "stack",
1283
+ "align": "center",
1284
+ "direction": "vertical",
1285
+ "className": "py-12",
1286
+ "children": [
1287
+ {
1288
+ "type": "spinner"
1289
+ },
1290
+ {
1291
+ "type": "typography",
1292
+ "variant": "caption",
1293
+ "color": "muted",
1294
+ "content": "Requesting revision…"
1295
+ }
1296
+ ],
1297
+ "gap": "md"
1054
1298
  }
1055
1299
  ]
1056
1300
  ]
1057
1301
  },
1058
1302
  {
1059
- "from": "viewing",
1060
- "to": "viewing",
1303
+ "from": "viewing_single",
1304
+ "to": "loading",
1061
1305
  "event": "REQUEST_DELETE",
1062
1306
  "effects": [
1063
1307
  [
@@ -1065,13 +1309,36 @@
1065
1309
  "@entity.id",
1066
1310
  "@payload.id"
1067
1311
  ],
1312
+ [
1313
+ "fetch",
1314
+ "Timesheet",
1315
+ {
1316
+ "emit": {
1317
+ "success": "TimesheetLoaded",
1318
+ "failure": "TimesheetLoadFailed"
1319
+ }
1320
+ }
1321
+ ],
1068
1322
  [
1069
1323
  "render-ui",
1070
1324
  "main",
1071
1325
  {
1072
- "type": "alert",
1073
- "message": "Delete requested",
1074
- "variant": "warning"
1326
+ "align": "center",
1327
+ "type": "stack",
1328
+ "direction": "vertical",
1329
+ "gap": "md",
1330
+ "className": "py-12",
1331
+ "children": [
1332
+ {
1333
+ "type": "spinner"
1334
+ },
1335
+ {
1336
+ "color": "muted",
1337
+ "variant": "caption",
1338
+ "type": "typography",
1339
+ "content": "Deleting timesheet…"
1340
+ }
1341
+ ]
1075
1342
  }
1076
1343
  ]
1077
1344
  ]
@@ -1086,8 +1353,8 @@
1086
1353
  "Timesheet",
1087
1354
  {
1088
1355
  "emit": {
1089
- "failure": "TimesheetLoadFailed",
1090
- "success": "TimesheetLoaded"
1356
+ "success": "TimesheetLoaded",
1357
+ "failure": "TimesheetLoadFailed"
1091
1358
  }
1092
1359
  }
1093
1360
  ],