@almadar/std 14.29.4 → 14.30.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "std-approval-request",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "std-approval-request — generic approval step for routing a target (timesheet, expense, PTO, etc.) through requestor + approver decisions. Lists requests in `browsing`; opens detail in `viewing_single` with Approve / Reject / Request Info / Withdraw actions.",
5
5
  "orbitals": [
6
6
  {
@@ -204,6 +204,32 @@
204
204
  }
205
205
  ]
206
206
  },
207
+ {
208
+ "event": "EDIT_COMMENT",
209
+ "payloadSchema": [
210
+ {
211
+ "name": "comment",
212
+ "type": "string"
213
+ }
214
+ ]
215
+ },
216
+ {
217
+ "event": "SUBMIT_REJECTION",
218
+ "payloadSchema": [
219
+ {
220
+ "name": "id",
221
+ "type": "string",
222
+ "required": true
223
+ },
224
+ {
225
+ "name": "comment",
226
+ "type": "string"
227
+ }
228
+ ]
229
+ },
230
+ {
231
+ "event": "CANCEL_REJECTION"
232
+ },
207
233
  {
208
234
  "event": "ApprovalRequestLoaded",
209
235
  "payloadSchema": [
@@ -239,6 +265,9 @@
239
265
  {
240
266
  "name": "viewing_single"
241
267
  },
268
+ {
269
+ "name": "rejecting"
270
+ },
242
271
  {
243
272
  "name": "error"
244
273
  }
@@ -334,6 +363,35 @@
334
363
  "required": true
335
364
  }
336
365
  ]
366
+ },
367
+ {
368
+ "key": "EDIT_COMMENT",
369
+ "name": "Edit Comment",
370
+ "payloadSchema": [
371
+ {
372
+ "name": "comment",
373
+ "type": "string"
374
+ }
375
+ ]
376
+ },
377
+ {
378
+ "key": "SUBMIT_REJECTION",
379
+ "name": "Submit Rejection",
380
+ "payloadSchema": [
381
+ {
382
+ "name": "id",
383
+ "type": "string",
384
+ "required": true
385
+ },
386
+ {
387
+ "name": "comment",
388
+ "type": "string"
389
+ }
390
+ ]
391
+ },
392
+ {
393
+ "key": "CANCEL_REJECTION",
394
+ "name": "Cancel Rejection"
337
395
  }
338
396
  ],
339
397
  "transitions": [
@@ -347,8 +405,8 @@
347
405
  "ApprovalRequest",
348
406
  {
349
407
  "emit": {
350
- "success": "ApprovalRequestLoaded",
351
- "failure": "ApprovalRequestLoadFailed"
408
+ "failure": "ApprovalRequestLoadFailed",
409
+ "success": "ApprovalRequestLoaded"
352
410
  }
353
411
  }
354
412
  ],
@@ -356,22 +414,22 @@
356
414
  "render-ui",
357
415
  "main",
358
416
  {
417
+ "className": "py-12",
418
+ "gap": "md",
419
+ "align": "center",
359
420
  "children": [
360
421
  {
361
422
  "type": "spinner"
362
423
  },
363
424
  {
364
425
  "variant": "caption",
365
- "content": "Loading approval requests…",
426
+ "type": "typography",
366
427
  "color": "muted",
367
- "type": "typography"
428
+ "content": "Loading approval requests…"
368
429
  }
369
430
  ],
370
- "direction": "vertical",
371
431
  "type": "stack",
372
- "align": "center",
373
- "className": "py-12",
374
- "gap": "md"
432
+ "direction": "vertical"
375
433
  }
376
434
  ]
377
435
  ]
@@ -385,67 +443,80 @@
385
443
  "render-ui",
386
444
  "main",
387
445
  {
388
- "direction": "vertical",
389
- "gap": "md",
390
- "type": "stack",
391
446
  "children": [
392
447
  {
393
- "direction": "horizontal",
394
448
  "type": "stack",
449
+ "direction": "horizontal",
395
450
  "gap": "sm",
396
- "align": "center",
397
451
  "children": [
398
452
  {
399
- "name": "check-circle",
400
- "type": "icon"
453
+ "type": "icon",
454
+ "name": "check-circle"
401
455
  },
402
456
  {
403
- "variant": "h3",
404
457
  "type": "typography",
405
- "content": "@config.title"
458
+ "content": "@config.title",
459
+ "variant": "h3"
406
460
  }
407
- ]
461
+ ],
462
+ "align": "center"
408
463
  },
409
464
  {
465
+ "type": "simple-grid",
466
+ "cols": 4.0,
410
467
  "children": [
411
468
  {
412
469
  "icon": "inbox",
413
- "value": "@payload.data.length",
414
470
  "type": "stat-display",
471
+ "value": "@payload.data.length",
415
472
  "label": "Total requests"
416
473
  },
417
474
  {
418
475
  "value": "14",
419
- "icon": "clock",
420
476
  "type": "stat-display",
421
- "label": "Pending"
477
+ "label": "Pending",
478
+ "icon": "clock"
422
479
  },
423
480
  {
424
- "icon": "check-circle",
425
481
  "type": "stat-display",
426
- "label": "Approved",
427
- "value": "82%"
482
+ "value": "82%",
483
+ "icon": "check-circle",
484
+ "label": "Approved"
428
485
  },
429
486
  {
430
- "label": "Avg cycle",
431
- "value": "1.4 days",
432
487
  "type": "stat-display",
433
- "icon": "timer"
488
+ "icon": "timer",
489
+ "value": "1.4 days",
490
+ "label": "Avg cycle"
434
491
  }
435
- ],
436
- "type": "simple-grid",
437
- "cols": 4.0
492
+ ]
438
493
  },
439
494
  {
440
495
  "type": "divider"
441
496
  },
442
497
  {
498
+ "entity": "@payload.data",
443
499
  "cols": 1.0,
500
+ "itemActions": [
501
+ {
502
+ "variant": "primary",
503
+ "event": "OPEN_REQUEST",
504
+ "icon": "arrow-right",
505
+ "label": "Open"
506
+ },
507
+ {
508
+ "label": "Withdraw",
509
+ "variant": "danger",
510
+ "event": "WITHDRAW"
511
+ }
512
+ ],
513
+ "gap": "sm",
514
+ "type": "data-grid",
444
515
  "fields": [
445
516
  {
446
- "label": "Title",
517
+ "variant": "caption",
447
518
  "name": "title",
448
- "variant": "caption"
519
+ "label": "Title"
449
520
  },
450
521
  {
451
522
  "name": "targetType",
@@ -453,49 +524,36 @@
453
524
  "variant": "badge"
454
525
  },
455
526
  {
456
- "label": "Requested By",
457
527
  "variant": "caption",
458
- "name": "requestedBy"
528
+ "name": "requestedBy",
529
+ "label": "Requested By"
459
530
  },
460
531
  {
461
- "name": "assignedApprover",
462
532
  "variant": "caption",
533
+ "name": "assignedApprover",
463
534
  "label": "Approver"
464
535
  },
465
536
  {
466
- "name": "approverDecision",
537
+ "label": "Decision",
467
538
  "variant": "badge",
468
- "label": "Decision"
539
+ "name": "approverDecision"
469
540
  },
470
541
  {
471
- "label": "Status",
542
+ "name": "status",
472
543
  "variant": "badge",
473
- "name": "status"
544
+ "label": "Status"
474
545
  },
475
546
  {
476
547
  "label": "Decided",
477
- "variant": "caption",
478
- "name": "decidedAt"
479
- }
480
- ],
481
- "gap": "sm",
482
- "itemActions": [
483
- {
484
- "label": "Open",
485
- "icon": "arrow-right",
486
- "event": "OPEN_REQUEST",
487
- "variant": "primary"
488
- },
489
- {
490
- "event": "WITHDRAW",
491
- "label": "Withdraw",
492
- "variant": "danger"
548
+ "name": "decidedAt",
549
+ "variant": "caption"
493
550
  }
494
- ],
495
- "type": "data-grid",
496
- "entity": "@payload.data"
551
+ ]
497
552
  }
498
- ]
553
+ ],
554
+ "direction": "vertical",
555
+ "type": "stack",
556
+ "gap": "md"
499
557
  }
500
558
  ]
501
559
  ]
@@ -580,94 +638,91 @@
580
638
  "render-ui",
581
639
  "main",
582
640
  {
583
- "type": "stack",
641
+ "direction": "vertical",
584
642
  "children": [
585
643
  {
644
+ "direction": "horizontal",
645
+ "gap": "sm",
646
+ "type": "stack",
586
647
  "children": [
587
648
  {
588
- "variant": "ghost",
589
649
  "type": "button",
590
- "label": "Back",
591
- "action": "CLOSE_REQUEST"
650
+ "action": "CLOSE_REQUEST",
651
+ "variant": "ghost",
652
+ "label": "Back"
592
653
  },
593
654
  {
594
- "name": "check-circle",
595
- "type": "icon"
655
+ "type": "icon",
656
+ "name": "check-circle"
596
657
  },
597
658
  {
598
- "variant": "h3",
659
+ "content": "@entity.title",
599
660
  "type": "typography",
600
- "content": "@entity.title"
661
+ "variant": "h3"
601
662
  },
602
663
  {
603
- "type": "badge",
604
664
  "variant": "default",
665
+ "type": "badge",
605
666
  "label": "@entity.status"
606
667
  },
607
668
  {
608
669
  "variant": "primary",
609
- "label": "@entity.approverDecision",
610
- "type": "badge"
670
+ "type": "badge",
671
+ "label": "@entity.approverDecision"
611
672
  }
612
673
  ],
613
- "direction": "horizontal",
614
- "gap": "sm",
615
- "align": "center",
616
- "type": "stack"
674
+ "align": "center"
617
675
  },
618
676
  {
619
677
  "type": "divider"
620
678
  },
621
679
  {
622
- "gap": "sm",
623
680
  "direction": "vertical",
624
681
  "type": "stack",
682
+ "gap": "sm",
625
683
  "children": [
626
684
  {
627
685
  "children": [
628
686
  {
629
687
  "type": "typography",
630
- "variant": "caption",
688
+ "color": "muted",
631
689
  "content": "Target",
632
- "color": "muted"
690
+ "variant": "caption"
633
691
  },
634
692
  {
635
693
  "content": "@entity.targetType",
636
- "type": "typography",
637
- "variant": "body"
694
+ "variant": "body",
695
+ "type": "typography"
638
696
  },
639
697
  {
698
+ "variant": "body",
640
699
  "content": "@entity.targetId",
641
- "type": "typography",
642
- "variant": "body"
700
+ "type": "typography"
643
701
  }
644
702
  ],
645
- "direction": "horizontal",
703
+ "gap": "md",
646
704
  "type": "stack",
647
- "gap": "md"
705
+ "direction": "horizontal"
648
706
  },
649
707
  {
650
- "direction": "horizontal",
651
708
  "type": "stack",
709
+ "gap": "md",
710
+ "direction": "horizontal",
652
711
  "children": [
653
712
  {
654
713
  "type": "typography",
655
- "variant": "caption",
656
714
  "content": "Requested by",
657
- "color": "muted"
715
+ "color": "muted",
716
+ "variant": "caption"
658
717
  },
659
718
  {
660
719
  "type": "typography",
661
720
  "variant": "body",
662
721
  "content": "@entity.requestedBy"
663
722
  }
664
- ],
665
- "gap": "md"
723
+ ]
666
724
  },
667
725
  {
668
- "direction": "horizontal",
669
- "gap": "md",
670
- "type": "stack",
671
726
  "children": [
672
727
  {
673
728
  "variant": "caption",
@@ -676,29 +731,32 @@
676
731
  "content": "Approver"
677
732
  },
678
733
  {
679
- "content": "@entity.assignedApprover",
734
+ "type": "typography",
680
735
  "variant": "body",
681
- "type": "typography"
736
+ "content": "@entity.assignedApprover"
682
737
  }
683
- ]
684
- },
685
- {
738
+ ],
686
739
  "type": "stack",
687
740
  "direction": "horizontal",
741
+ "gap": "md"
742
+ },
743
+ {
688
744
  "gap": "md",
745
+ "type": "stack",
689
746
  "children": [
690
747
  {
691
- "variant": "caption",
692
- "color": "muted",
748
+ "content": "Comment",
693
749
  "type": "typography",
694
- "content": "Comment"
750
+ "color": "muted",
751
+ "variant": "caption"
695
752
  },
696
753
  {
697
754
  "variant": "body",
698
- "type": "typography",
699
- "content": "@entity.comment"
755
+ "content": "@entity.comment",
756
+ "type": "typography"
700
757
  }
701
- ]
758
+ ],
759
+ "direction": "horizontal"
702
760
  }
703
761
  ]
704
762
  },
@@ -706,70 +764,70 @@
706
764
  "type": "divider"
707
765
  },
708
766
  {
767
+ "cols": 2.0,
709
768
  "children": [
710
769
  {
770
+ "label": "Requested at",
711
771
  "icon": "calendar",
712
772
  "type": "stat-display",
713
- "label": "Requested at",
714
773
  "value": "@entity.requestedAt"
715
774
  },
716
775
  {
717
- "label": "Decided at",
718
- "icon": "calendar-check",
719
776
  "type": "stat-display",
720
- "value": "@entity.decidedAt"
777
+ "label": "Decided at",
778
+ "value": "@entity.decidedAt",
779
+ "icon": "calendar-check"
721
780
  }
722
781
  ],
723
- "type": "simple-grid",
724
- "cols": 2.0
782
+ "type": "simple-grid"
725
783
  },
726
784
  {
727
785
  "align": "center",
728
- "type": "stack",
729
786
  "gap": "sm",
730
- "direction": "horizontal",
787
+ "type": "stack",
731
788
  "children": [
732
789
  {
790
+ "variant": "primary",
733
791
  "label": "Approve",
734
- "type": "button",
735
792
  "action": "APPROVE",
736
- "variant": "primary",
793
+ "type": "button",
737
794
  "actionPayload": {
738
795
  "id": "@entity.id"
739
796
  }
740
797
  },
741
798
  {
742
- "type": "button",
743
799
  "actionPayload": {
744
800
  "id": "@entity.id"
745
801
  },
746
- "action": "REJECT",
747
802
  "variant": "danger",
803
+ "action": "REJECT",
804
+ "type": "button",
748
805
  "label": "Reject"
749
806
  },
750
807
  {
808
+ "action": "REQUEST_INFO",
809
+ "variant": "secondary",
751
810
  "actionPayload": {
752
811
  "id": "@entity.id"
753
812
  },
754
- "action": "REQUEST_INFO",
755
- "label": "Request Info",
756
813
  "type": "button",
757
- "variant": "secondary"
814
+ "label": "Request Info"
758
815
  },
759
816
  {
760
- "action": "WITHDRAW",
761
- "type": "button",
762
817
  "label": "Withdraw",
818
+ "type": "button",
819
+ "variant": "ghost",
763
820
  "actionPayload": {
764
821
  "id": "@entity.id"
765
822
  },
766
- "variant": "ghost"
823
+ "action": "WITHDRAW"
767
824
  }
768
- ]
825
+ ],
826
+ "direction": "horizontal"
769
827
  }
770
828
  ],
771
829
  "gap": "md",
772
- "direction": "vertical"
830
+ "type": "stack"
773
831
  }
774
832
  ]
775
833
  ]
@@ -789,8 +847,8 @@
789
847
  "ApprovalRequest",
790
848
  {
791
849
  "emit": {
792
- "failure": "ApprovalRequestLoadFailed",
793
- "success": "ApprovalRequestLoaded"
850
+ "success": "ApprovalRequestLoaded",
851
+ "failure": "ApprovalRequestLoadFailed"
794
852
  }
795
853
  }
796
854
  ],
@@ -799,21 +857,21 @@
799
857
  "main",
800
858
  {
801
859
  "direction": "vertical",
860
+ "gap": "md",
861
+ "type": "stack",
862
+ "align": "center",
863
+ "className": "py-12",
802
864
  "children": [
803
865
  {
804
866
  "type": "spinner"
805
867
  },
806
868
  {
807
- "color": "muted",
808
- "content": "Withdrawing request…",
869
+ "type": "typography",
809
870
  "variant": "caption",
810
- "type": "typography"
871
+ "color": "muted",
872
+ "content": "Withdrawing request…"
811
873
  }
812
- ],
813
- "className": "py-12",
814
- "align": "center",
815
- "gap": "md",
816
- "type": "stack"
874
+ ]
817
875
  }
818
876
  ]
819
877
  ]
@@ -839,8 +897,6 @@
839
897
  {
840
898
  "type": "stack",
841
899
  "className": "py-12",
842
- "direction": "vertical",
843
- "align": "center",
844
900
  "children": [
845
901
  {
846
902
  "type": "spinner"
@@ -848,11 +904,13 @@
848
904
  {
849
905
  "content": "Loading approval requests…",
850
906
  "type": "typography",
851
- "color": "muted",
852
- "variant": "caption"
907
+ "variant": "caption",
908
+ "color": "muted"
853
909
  }
854
910
  ],
855
- "gap": "md"
911
+ "gap": "md",
912
+ "direction": "vertical",
913
+ "align": "center"
856
914
  }
857
915
  ]
858
916
  ]
@@ -886,17 +944,17 @@
886
944
  "type": "spinner"
887
945
  },
888
946
  {
889
- "type": "typography",
890
- "content": "Recording approval…",
891
947
  "variant": "caption",
948
+ "content": "Recording approval…",
949
+ "type": "typography",
892
950
  "color": "muted"
893
951
  }
894
952
  ],
895
953
  "type": "stack",
896
- "gap": "md",
897
- "align": "center",
954
+ "direction": "vertical",
898
955
  "className": "py-12",
899
- "direction": "vertical"
956
+ "gap": "md",
957
+ "align": "center"
900
958
  }
901
959
  ]
902
960
  ]
@@ -905,6 +963,11 @@
905
963
  "from": "viewing_single",
906
964
  "to": "loading",
907
965
  "event": "REJECT",
966
+ "guard": [
967
+ "=",
968
+ "@config.requireCommentOnReject",
969
+ false
970
+ ],
908
971
  "effects": [
909
972
  [
910
973
  "set",
@@ -916,8 +979,8 @@
916
979
  "ApprovalRequest",
917
980
  {
918
981
  "emit": {
919
- "failure": "ApprovalRequestLoadFailed",
920
- "success": "ApprovalRequestLoaded"
982
+ "success": "ApprovalRequestLoaded",
983
+ "failure": "ApprovalRequestLoadFailed"
921
984
  }
922
985
  }
923
986
  ],
@@ -925,22 +988,111 @@
925
988
  "render-ui",
926
989
  "main",
927
990
  {
991
+ "direction": "vertical",
992
+ "align": "center",
928
993
  "className": "py-12",
994
+ "type": "stack",
995
+ "gap": "md",
929
996
  "children": [
930
997
  {
931
998
  "type": "spinner"
932
999
  },
933
1000
  {
1001
+ "type": "typography",
934
1002
  "variant": "caption",
935
- "content": "Recording rejection…",
936
1003
  "color": "muted",
937
- "type": "typography"
1004
+ "content": "Recording rejection…"
938
1005
  }
939
- ],
1006
+ ]
1007
+ }
1008
+ ]
1009
+ ]
1010
+ },
1011
+ {
1012
+ "from": "viewing_single",
1013
+ "to": "rejecting",
1014
+ "event": "REJECT",
1015
+ "guard": [
1016
+ "=",
1017
+ "@config.requireCommentOnReject",
1018
+ true
1019
+ ],
1020
+ "effects": [
1021
+ [
1022
+ "set",
1023
+ "@entity.id",
1024
+ "@payload.id"
1025
+ ],
1026
+ [
1027
+ "set",
1028
+ "@entity.comment",
1029
+ ""
1030
+ ],
1031
+ [
1032
+ "render-ui",
1033
+ "main",
1034
+ {
940
1035
  "direction": "vertical",
1036
+ "children": [
1037
+ {
1038
+ "align": "center",
1039
+ "children": [
1040
+ {
1041
+ "type": "icon",
1042
+ "name": "x-circle"
1043
+ },
1044
+ {
1045
+ "type": "typography",
1046
+ "content": "Reject request",
1047
+ "variant": "h3"
1048
+ }
1049
+ ],
1050
+ "type": "stack",
1051
+ "direction": "horizontal",
1052
+ "gap": "sm"
1053
+ },
1054
+ {
1055
+ "type": "divider"
1056
+ },
1057
+ {
1058
+ "color": "muted",
1059
+ "content": "Provide a reason for rejecting this request.",
1060
+ "type": "typography",
1061
+ "variant": "caption"
1062
+ },
1063
+ {
1064
+ "placeholder": "Reason for rejection",
1065
+ "action": "EDIT_COMMENT",
1066
+ "type": "textarea"
1067
+ },
1068
+ {
1069
+ "type": "stack",
1070
+ "gap": "sm",
1071
+ "children": [
1072
+ {
1073
+ "type": "button",
1074
+ "icon": "send",
1075
+ "action": "SUBMIT_REJECTION",
1076
+ "variant": "danger",
1077
+ "label": "Submit rejection",
1078
+ "actionPayload": {
1079
+ "comment": "@entity.comment",
1080
+ "id": "@entity.id"
1081
+ }
1082
+ },
1083
+ {
1084
+ "icon": "x",
1085
+ "variant": "ghost",
1086
+ "type": "button",
1087
+ "label": "Cancel",
1088
+ "action": "CANCEL_REJECTION"
1089
+ }
1090
+ ],
1091
+ "direction": "horizontal"
1092
+ }
1093
+ ],
941
1094
  "gap": "md",
942
- "type": "stack",
943
- "align": "center"
1095
+ "type": "stack"
944
1096
  }
945
1097
  ]
946
1098
  ]
@@ -969,22 +1121,22 @@
969
1121
  "render-ui",
970
1122
  "main",
971
1123
  {
1124
+ "type": "stack",
972
1125
  "children": [
973
1126
  {
974
1127
  "type": "spinner"
975
1128
  },
976
1129
  {
977
- "variant": "caption",
978
1130
  "content": "Requesting more info…",
979
1131
  "type": "typography",
980
- "color": "muted"
1132
+ "color": "muted",
1133
+ "variant": "caption"
981
1134
  }
982
1135
  ],
983
- "className": "py-12",
984
- "gap": "md",
985
- "type": "stack",
1136
+ "direction": "vertical",
986
1137
  "align": "center",
987
- "direction": "vertical"
1138
+ "gap": "md",
1139
+ "className": "py-12"
988
1140
  }
989
1141
  ]
990
1142
  ]
@@ -993,6 +1145,62 @@
993
1145
  "from": "viewing_single",
994
1146
  "to": "loading",
995
1147
  "event": "WITHDRAW",
1148
+ "effects": [
1149
+ [
1150
+ "set",
1151
+ "@entity.id",
1152
+ "@payload.id"
1153
+ ],
1154
+ [
1155
+ "fetch",
1156
+ "ApprovalRequest",
1157
+ {
1158
+ "emit": {
1159
+ "success": "ApprovalRequestLoaded",
1160
+ "failure": "ApprovalRequestLoadFailed"
1161
+ }
1162
+ }
1163
+ ],
1164
+ [
1165
+ "render-ui",
1166
+ "main",
1167
+ {
1168
+ "direction": "vertical",
1169
+ "align": "center",
1170
+ "children": [
1171
+ {
1172
+ "type": "spinner"
1173
+ },
1174
+ {
1175
+ "type": "typography",
1176
+ "variant": "caption",
1177
+ "color": "muted",
1178
+ "content": "Withdrawing request…"
1179
+ }
1180
+ ],
1181
+ "className": "py-12",
1182
+ "gap": "md",
1183
+ "type": "stack"
1184
+ }
1185
+ ]
1186
+ ]
1187
+ },
1188
+ {
1189
+ "from": "rejecting",
1190
+ "to": "rejecting",
1191
+ "event": "EDIT_COMMENT",
1192
+ "effects": [
1193
+ [
1194
+ "set",
1195
+ "@entity.comment",
1196
+ "@payload.comment"
1197
+ ]
1198
+ ]
1199
+ },
1200
+ {
1201
+ "from": "rejecting",
1202
+ "to": "loading",
1203
+ "event": "SUBMIT_REJECTION",
996
1204
  "effects": [
997
1205
  [
998
1206
  "set",
@@ -1013,22 +1221,61 @@
1013
1221
  "render-ui",
1014
1222
  "main",
1015
1223
  {
1224
+ "align": "center",
1225
+ "className": "py-12",
1226
+ "type": "stack",
1227
+ "direction": "vertical",
1016
1228
  "children": [
1017
1229
  {
1018
1230
  "type": "spinner"
1019
1231
  },
1020
1232
  {
1021
- "color": "muted",
1022
- "content": "Withdrawing request…",
1023
1233
  "type": "typography",
1234
+ "color": "muted",
1235
+ "content": "Recording rejection…",
1024
1236
  "variant": "caption"
1025
1237
  }
1026
1238
  ],
1027
- "direction": "vertical",
1028
- "className": "py-12",
1029
- "type": "stack",
1239
+ "gap": "md"
1240
+ }
1241
+ ]
1242
+ ]
1243
+ },
1244
+ {
1245
+ "from": "rejecting",
1246
+ "to": "loading",
1247
+ "event": "CANCEL_REJECTION",
1248
+ "effects": [
1249
+ [
1250
+ "fetch",
1251
+ "ApprovalRequest",
1252
+ {
1253
+ "emit": {
1254
+ "failure": "ApprovalRequestLoadFailed",
1255
+ "success": "ApprovalRequestLoaded"
1256
+ }
1257
+ }
1258
+ ],
1259
+ [
1260
+ "render-ui",
1261
+ "main",
1262
+ {
1030
1263
  "gap": "md",
1031
- "align": "center"
1264
+ "children": [
1265
+ {
1266
+ "type": "spinner"
1267
+ },
1268
+ {
1269
+ "type": "typography",
1270
+ "variant": "caption",
1271
+ "content": "Loading approval requests…",
1272
+ "color": "muted"
1273
+ }
1274
+ ],
1275
+ "type": "stack",
1276
+ "direction": "vertical",
1277
+ "align": "center",
1278
+ "className": "py-12"
1032
1279
  }
1033
1280
  ]
1034
1281
  ]
@@ -1064,6 +1311,10 @@
1064
1311
  "title": {
1065
1312
  "type": "string",
1066
1313
  "default": "Approval Requests"
1314
+ },
1315
+ "requireCommentOnReject": {
1316
+ "type": "boolean",
1317
+ "default": false
1067
1318
  }
1068
1319
  },
1069
1320
  "scope": "collection"