@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-rent-charge",
3
3
  "version": "1.0.0",
4
- "description": "Rent charge ledger: monthly rent owed by a tenant (tenant-pays semantics).",
4
+ "description": "std-rent-charge monthly rent charge ledger. Lists charges in `browsing`; opens detail in `viewing_single` with Mark Paid / Late Fee / Waive actions.",
5
5
  "orbitals": [
6
6
  {
7
7
  "name": "RentChargeOrbital",
@@ -69,6 +69,58 @@
69
69
  "category": "interaction",
70
70
  "linkedEntity": "RentCharge",
71
71
  "emits": [
72
+ {
73
+ "event": "OPEN_CHARGE",
74
+ "payloadSchema": [
75
+ {
76
+ "name": "id",
77
+ "type": "string",
78
+ "required": true
79
+ },
80
+ {
81
+ "name": "row.id",
82
+ "type": "string",
83
+ "required": true
84
+ },
85
+ {
86
+ "name": "row.tenantId",
87
+ "type": "string",
88
+ "required": true
89
+ },
90
+ {
91
+ "name": "row.leaseId",
92
+ "type": "string"
93
+ },
94
+ {
95
+ "name": "row.amount",
96
+ "type": "number"
97
+ },
98
+ {
99
+ "name": "row.dueDate",
100
+ "type": "string",
101
+ "required": true
102
+ },
103
+ {
104
+ "name": "row.paidAt",
105
+ "type": "string"
106
+ },
107
+ {
108
+ "name": "row.status",
109
+ "type": "string"
110
+ },
111
+ {
112
+ "name": "row.lateFee",
113
+ "type": "number"
114
+ },
115
+ {
116
+ "name": "row.notes",
117
+ "type": "string"
118
+ }
119
+ ]
120
+ },
121
+ {
122
+ "event": "CLOSE_VIEW"
123
+ },
72
124
  {
73
125
  "event": "MARK_PAID",
74
126
  "payloadSchema": [
@@ -131,6 +183,9 @@
131
183
  {
132
184
  "name": "browsing"
133
185
  },
186
+ {
187
+ "name": "viewing_single"
188
+ },
134
189
  {
135
190
  "name": "error"
136
191
  }
@@ -164,6 +219,21 @@
164
219
  }
165
220
  ]
166
221
  },
222
+ {
223
+ "key": "OPEN_CHARGE",
224
+ "name": "Open Charge",
225
+ "payloadSchema": [
226
+ {
227
+ "name": "id",
228
+ "type": "string",
229
+ "required": true
230
+ },
231
+ {
232
+ "name": "row",
233
+ "type": "RentCharge"
234
+ }
235
+ ]
236
+ },
167
237
  {
168
238
  "key": "MARK_PAID",
169
239
  "name": "Mark Paid",
@@ -196,6 +266,10 @@
196
266
  "required": true
197
267
  }
198
268
  ]
269
+ },
270
+ {
271
+ "key": "CLOSE_VIEW",
272
+ "name": "Close View"
199
273
  }
200
274
  ],
201
275
  "transitions": [
@@ -218,7 +292,22 @@
218
292
  "render-ui",
219
293
  "main",
220
294
  {
221
- "type": "spinner"
295
+ "children": [
296
+ {
297
+ "type": "spinner"
298
+ },
299
+ {
300
+ "type": "typography",
301
+ "variant": "caption",
302
+ "color": "muted",
303
+ "content": "Loading rent charges…"
304
+ }
305
+ ],
306
+ "gap": "md",
307
+ "direction": "vertical",
308
+ "align": "center",
309
+ "type": "stack",
310
+ "className": "py-12"
222
311
  }
223
312
  ]
224
313
  ]
@@ -232,55 +321,331 @@
232
321
  "render-ui",
233
322
  "main",
234
323
  {
235
- "type": "data-grid",
236
- "itemActions": [
324
+ "children": [
325
+ {
326
+ "align": "center",
327
+ "children": [
328
+ {
329
+ "name": "home",
330
+ "type": "icon"
331
+ },
332
+ {
333
+ "content": "@config.title",
334
+ "variant": "h3",
335
+ "type": "typography"
336
+ }
337
+ ],
338
+ "gap": "sm",
339
+ "type": "stack",
340
+ "direction": "horizontal"
341
+ },
237
342
  {
238
- "event": "MARK_PAID",
239
- "variant": "primary",
240
- "label": "Mark Paid"
343
+ "type": "simple-grid",
344
+ "cols": 4.0,
345
+ "children": [
346
+ {
347
+ "label": "Total charges",
348
+ "icon": "home",
349
+ "type": "stat-display",
350
+ "value": "@payload.data.length"
351
+ },
352
+ {
353
+ "label": "Collected",
354
+ "value": "$284,500",
355
+ "type": "stat-display",
356
+ "icon": "check-circle"
357
+ },
358
+ {
359
+ "type": "stat-display",
360
+ "label": "Overdue",
361
+ "icon": "alert-triangle",
362
+ "value": "11"
363
+ },
364
+ {
365
+ "icon": "dollar-sign",
366
+ "type": "stat-display",
367
+ "label": "Late fees",
368
+ "value": "$1,840"
369
+ }
370
+ ]
241
371
  },
242
372
  {
243
- "variant": "ghost",
244
- "label": "Late Fee",
245
- "event": "ASSESS_LATE_FEE"
373
+ "type": "divider"
246
374
  },
247
375
  {
248
- "event": "WAIVE_CHARGE",
249
- "variant": "danger",
250
- "label": "Waive"
376
+ "type": "data-grid",
377
+ "entity": "@payload.data",
378
+ "cols": 1.0,
379
+ "gap": "sm",
380
+ "itemActions": [
381
+ {
382
+ "event": "OPEN_CHARGE",
383
+ "icon": "arrow-right",
384
+ "variant": "primary",
385
+ "label": "Open"
386
+ },
387
+ {
388
+ "event": "WAIVE_CHARGE",
389
+ "variant": "danger",
390
+ "label": "Waive"
391
+ }
392
+ ],
393
+ "fields": [
394
+ {
395
+ "label": "Tenant",
396
+ "variant": "caption",
397
+ "name": "tenantId"
398
+ },
399
+ {
400
+ "name": "amount",
401
+ "variant": "caption",
402
+ "label": "Amount"
403
+ },
404
+ {
405
+ "label": "Due",
406
+ "variant": "caption",
407
+ "name": "dueDate"
408
+ },
409
+ {
410
+ "name": "status",
411
+ "label": "Status",
412
+ "variant": "badge"
413
+ },
414
+ {
415
+ "name": "paidAt",
416
+ "variant": "caption",
417
+ "label": "Paid"
418
+ },
419
+ {
420
+ "name": "lateFee",
421
+ "variant": "caption",
422
+ "label": "Late Fee"
423
+ }
424
+ ]
251
425
  }
252
426
  ],
253
- "entity": "@payload.data",
254
- "fields": [
427
+ "direction": "vertical",
428
+ "gap": "md",
429
+ "type": "stack"
430
+ }
431
+ ]
432
+ ]
433
+ },
434
+ {
435
+ "from": "loading",
436
+ "to": "error",
437
+ "event": "RentChargeLoadFailed",
438
+ "effects": [
439
+ [
440
+ "render-ui",
441
+ "main",
442
+ {
443
+ "message": "@payload.error",
444
+ "type": "alert",
445
+ "variant": "error"
446
+ }
447
+ ]
448
+ ]
449
+ },
450
+ {
451
+ "from": "browsing",
452
+ "to": "viewing_single",
453
+ "event": "OPEN_CHARGE",
454
+ "effects": [
455
+ [
456
+ "set",
457
+ "@entity.id",
458
+ "@payload.row.id"
459
+ ],
460
+ [
461
+ "set",
462
+ "@entity.tenantId",
463
+ "@payload.row.tenantId"
464
+ ],
465
+ [
466
+ "set",
467
+ "@entity.leaseId",
468
+ "@payload.row.leaseId"
469
+ ],
470
+ [
471
+ "set",
472
+ "@entity.amount",
473
+ "@payload.row.amount"
474
+ ],
475
+ [
476
+ "set",
477
+ "@entity.dueDate",
478
+ "@payload.row.dueDate"
479
+ ],
480
+ [
481
+ "set",
482
+ "@entity.paidAt",
483
+ "@payload.row.paidAt"
484
+ ],
485
+ [
486
+ "set",
487
+ "@entity.status",
488
+ "@payload.row.status"
489
+ ],
490
+ [
491
+ "set",
492
+ "@entity.lateFee",
493
+ "@payload.row.lateFee"
494
+ ],
495
+ [
496
+ "set",
497
+ "@entity.notes",
498
+ "@payload.row.notes"
499
+ ],
500
+ [
501
+ "render-ui",
502
+ "main",
503
+ {
504
+ "type": "stack",
505
+ "direction": "vertical",
506
+ "gap": "md",
507
+ "children": [
255
508
  {
256
- "label": "Tenant",
257
- "variant": "caption",
258
- "name": "tenantId"
509
+ "type": "stack",
510
+ "align": "center",
511
+ "children": [
512
+ {
513
+ "type": "button",
514
+ "label": "Back",
515
+ "variant": "ghost",
516
+ "action": "CLOSE_VIEW"
517
+ },
518
+ {
519
+ "name": "home",
520
+ "type": "icon"
521
+ },
522
+ {
523
+ "type": "typography",
524
+ "content": "@entity.tenantId",
525
+ "variant": "h3"
526
+ },
527
+ {
528
+ "type": "badge",
529
+ "label": "@entity.status",
530
+ "variant": "default"
531
+ }
532
+ ],
533
+ "gap": "sm",
534
+ "direction": "horizontal"
259
535
  },
260
536
  {
261
- "variant": "h4",
262
- "name": "amount",
263
- "label": "Amount"
537
+ "type": "divider"
264
538
  },
265
539
  {
266
- "name": "dueDate",
267
- "label": "Due Date",
268
- "variant": "caption"
540
+ "children": [
541
+ {
542
+ "type": "stack",
543
+ "direction": "horizontal",
544
+ "gap": "md",
545
+ "children": [
546
+ {
547
+ "type": "typography",
548
+ "content": "Lease",
549
+ "variant": "caption",
550
+ "color": "muted"
551
+ },
552
+ {
553
+ "content": "@entity.leaseId",
554
+ "type": "typography",
555
+ "variant": "body"
556
+ }
557
+ ]
558
+ },
559
+ {
560
+ "type": "stack",
561
+ "direction": "horizontal",
562
+ "gap": "md",
563
+ "children": [
564
+ {
565
+ "variant": "caption",
566
+ "type": "typography",
567
+ "color": "muted",
568
+ "content": "Notes"
569
+ },
570
+ {
571
+ "content": "@entity.notes",
572
+ "type": "typography",
573
+ "variant": "body"
574
+ }
575
+ ]
576
+ }
577
+ ],
578
+ "gap": "sm",
579
+ "type": "stack",
580
+ "direction": "vertical"
269
581
  },
270
582
  {
271
- "label": "Status",
272
- "name": "status",
273
- "variant": "badge"
583
+ "type": "divider"
274
584
  },
275
585
  {
276
- "variant": "caption",
277
- "label": "Paid At",
278
- "name": "paidAt"
586
+ "children": [
587
+ {
588
+ "type": "stat-display",
589
+ "value": "@entity.amount",
590
+ "label": "Amount",
591
+ "icon": "dollar-sign"
592
+ },
593
+ {
594
+ "value": "@entity.lateFee",
595
+ "type": "stat-display",
596
+ "label": "Late fee",
597
+ "icon": "alert-triangle"
598
+ },
599
+ {
600
+ "type": "stat-display",
601
+ "value": "@entity.dueDate",
602
+ "label": "Due",
603
+ "icon": "calendar"
604
+ },
605
+ {
606
+ "icon": "check-circle",
607
+ "type": "stat-display",
608
+ "label": "Paid",
609
+ "value": "@entity.paidAt"
610
+ }
611
+ ],
612
+ "cols": 4.0,
613
+ "type": "simple-grid"
279
614
  },
280
615
  {
281
- "name": "lateFee",
282
- "label": "Late Fee",
283
- "variant": "caption"
616
+ "align": "center",
617
+ "children": [
618
+ {
619
+ "actionPayload": {
620
+ "id": "@entity.id"
621
+ },
622
+ "label": "Mark Paid",
623
+ "variant": "primary",
624
+ "type": "button",
625
+ "action": "MARK_PAID"
626
+ },
627
+ {
628
+ "label": "Assess Late Fee",
629
+ "variant": "secondary",
630
+ "type": "button",
631
+ "action": "ASSESS_LATE_FEE",
632
+ "actionPayload": {
633
+ "id": "@entity.id"
634
+ }
635
+ },
636
+ {
637
+ "type": "button",
638
+ "variant": "danger",
639
+ "action": "WAIVE_CHARGE",
640
+ "actionPayload": {
641
+ "id": "@entity.id"
642
+ },
643
+ "label": "Waive"
644
+ }
645
+ ],
646
+ "type": "stack",
647
+ "direction": "horizontal",
648
+ "gap": "sm"
284
649
  }
285
650
  ]
286
651
  }
@@ -288,25 +653,53 @@
288
653
  ]
289
654
  },
290
655
  {
291
- "from": "loading",
292
- "to": "error",
293
- "event": "RentChargeLoadFailed",
656
+ "from": "browsing",
657
+ "to": "loading",
658
+ "event": "MARK_PAID",
294
659
  "effects": [
660
+ [
661
+ "set",
662
+ "@entity.id",
663
+ "@payload.id"
664
+ ],
665
+ [
666
+ "fetch",
667
+ "RentCharge",
668
+ {
669
+ "emit": {
670
+ "failure": "RentChargeLoadFailed",
671
+ "success": "RentChargeLoaded"
672
+ }
673
+ }
674
+ ],
295
675
  [
296
676
  "render-ui",
297
677
  "main",
298
678
  {
299
- "variant": "error",
300
- "type": "alert",
301
- "message": "Failed to load rent charges"
679
+ "type": "stack",
680
+ "className": "py-12",
681
+ "direction": "vertical",
682
+ "children": [
683
+ {
684
+ "type": "spinner"
685
+ },
686
+ {
687
+ "type": "typography",
688
+ "color": "muted",
689
+ "content": "Recording payment…",
690
+ "variant": "caption"
691
+ }
692
+ ],
693
+ "gap": "md",
694
+ "align": "center"
302
695
  }
303
696
  ]
304
697
  ]
305
698
  },
306
699
  {
307
700
  "from": "browsing",
308
- "to": "browsing",
309
- "event": "MARK_PAID",
701
+ "to": "loading",
702
+ "event": "ASSESS_LATE_FEE",
310
703
  "effects": [
311
704
  [
312
705
  "set",
@@ -314,15 +707,169 @@
314
707
  "@payload.id"
315
708
  ],
316
709
  [
317
- "notify",
318
- "Rent recorded as paid",
319
- "success"
710
+ "fetch",
711
+ "RentCharge",
712
+ {
713
+ "emit": {
714
+ "failure": "RentChargeLoadFailed",
715
+ "success": "RentChargeLoaded"
716
+ }
717
+ }
718
+ ],
719
+ [
720
+ "render-ui",
721
+ "main",
722
+ {
723
+ "align": "center",
724
+ "direction": "vertical",
725
+ "className": "py-12",
726
+ "children": [
727
+ {
728
+ "type": "spinner"
729
+ },
730
+ {
731
+ "type": "typography",
732
+ "variant": "caption",
733
+ "color": "muted",
734
+ "content": "Assessing late fee…"
735
+ }
736
+ ],
737
+ "gap": "md",
738
+ "type": "stack"
739
+ }
320
740
  ]
321
741
  ]
322
742
  },
323
743
  {
324
744
  "from": "browsing",
325
- "to": "browsing",
745
+ "to": "loading",
746
+ "event": "WAIVE_CHARGE",
747
+ "effects": [
748
+ [
749
+ "set",
750
+ "@entity.id",
751
+ "@payload.id"
752
+ ],
753
+ [
754
+ "fetch",
755
+ "RentCharge",
756
+ {
757
+ "emit": {
758
+ "failure": "RentChargeLoadFailed",
759
+ "success": "RentChargeLoaded"
760
+ }
761
+ }
762
+ ],
763
+ [
764
+ "render-ui",
765
+ "main",
766
+ {
767
+ "direction": "vertical",
768
+ "type": "stack",
769
+ "className": "py-12",
770
+ "children": [
771
+ {
772
+ "type": "spinner"
773
+ },
774
+ {
775
+ "content": "Waiving charge…",
776
+ "variant": "caption",
777
+ "color": "muted",
778
+ "type": "typography"
779
+ }
780
+ ],
781
+ "align": "center",
782
+ "gap": "md"
783
+ }
784
+ ]
785
+ ]
786
+ },
787
+ {
788
+ "from": "viewing_single",
789
+ "to": "loading",
790
+ "event": "CLOSE_VIEW",
791
+ "effects": [
792
+ [
793
+ "fetch",
794
+ "RentCharge",
795
+ {
796
+ "emit": {
797
+ "success": "RentChargeLoaded",
798
+ "failure": "RentChargeLoadFailed"
799
+ }
800
+ }
801
+ ],
802
+ [
803
+ "render-ui",
804
+ "main",
805
+ {
806
+ "direction": "vertical",
807
+ "align": "center",
808
+ "className": "py-12",
809
+ "children": [
810
+ {
811
+ "type": "spinner"
812
+ },
813
+ {
814
+ "variant": "caption",
815
+ "color": "muted",
816
+ "type": "typography",
817
+ "content": "Loading rent charges…"
818
+ }
819
+ ],
820
+ "type": "stack",
821
+ "gap": "md"
822
+ }
823
+ ]
824
+ ]
825
+ },
826
+ {
827
+ "from": "viewing_single",
828
+ "to": "loading",
829
+ "event": "MARK_PAID",
830
+ "effects": [
831
+ [
832
+ "set",
833
+ "@entity.id",
834
+ "@payload.id"
835
+ ],
836
+ [
837
+ "fetch",
838
+ "RentCharge",
839
+ {
840
+ "emit": {
841
+ "failure": "RentChargeLoadFailed",
842
+ "success": "RentChargeLoaded"
843
+ }
844
+ }
845
+ ],
846
+ [
847
+ "render-ui",
848
+ "main",
849
+ {
850
+ "direction": "vertical",
851
+ "children": [
852
+ {
853
+ "type": "spinner"
854
+ },
855
+ {
856
+ "color": "muted",
857
+ "type": "typography",
858
+ "content": "Recording payment…",
859
+ "variant": "caption"
860
+ }
861
+ ],
862
+ "className": "py-12",
863
+ "align": "center",
864
+ "gap": "md",
865
+ "type": "stack"
866
+ }
867
+ ]
868
+ ]
869
+ },
870
+ {
871
+ "from": "viewing_single",
872
+ "to": "loading",
326
873
  "event": "ASSESS_LATE_FEE",
327
874
  "effects": [
328
875
  [
@@ -331,15 +878,42 @@
331
878
  "@payload.id"
332
879
  ],
333
880
  [
334
- "notify",
335
- "Late fee assessed",
336
- "info"
881
+ "fetch",
882
+ "RentCharge",
883
+ {
884
+ "emit": {
885
+ "success": "RentChargeLoaded",
886
+ "failure": "RentChargeLoadFailed"
887
+ }
888
+ }
889
+ ],
890
+ [
891
+ "render-ui",
892
+ "main",
893
+ {
894
+ "gap": "md",
895
+ "direction": "vertical",
896
+ "type": "stack",
897
+ "align": "center",
898
+ "className": "py-12",
899
+ "children": [
900
+ {
901
+ "type": "spinner"
902
+ },
903
+ {
904
+ "color": "muted",
905
+ "content": "Assessing late fee…",
906
+ "type": "typography",
907
+ "variant": "caption"
908
+ }
909
+ ]
910
+ }
337
911
  ]
338
912
  ]
339
913
  },
340
914
  {
341
- "from": "browsing",
342
- "to": "browsing",
915
+ "from": "viewing_single",
916
+ "to": "loading",
343
917
  "event": "WAIVE_CHARGE",
344
918
  "effects": [
345
919
  [
@@ -348,9 +922,36 @@
348
922
  "@payload.id"
349
923
  ],
350
924
  [
351
- "notify",
352
- "Charge waived",
353
- "info"
925
+ "fetch",
926
+ "RentCharge",
927
+ {
928
+ "emit": {
929
+ "success": "RentChargeLoaded",
930
+ "failure": "RentChargeLoadFailed"
931
+ }
932
+ }
933
+ ],
934
+ [
935
+ "render-ui",
936
+ "main",
937
+ {
938
+ "gap": "md",
939
+ "className": "py-12",
940
+ "children": [
941
+ {
942
+ "type": "spinner"
943
+ },
944
+ {
945
+ "variant": "caption",
946
+ "content": "Waiving charge…",
947
+ "color": "muted",
948
+ "type": "typography"
949
+ }
950
+ ],
951
+ "align": "center",
952
+ "direction": "vertical",
953
+ "type": "stack"
954
+ }
354
955
  ]
355
956
  ]
356
957
  },
@@ -364,8 +965,8 @@
364
965
  "RentCharge",
365
966
  {
366
967
  "emit": {
367
- "failure": "RentChargeLoadFailed",
368
- "success": "RentChargeLoaded"
968
+ "success": "RentChargeLoaded",
969
+ "failure": "RentChargeLoadFailed"
369
970
  }
370
971
  }
371
972
  ],
@@ -373,6 +974,7 @@
373
974
  "render-ui",
374
975
  "main",
375
976
  {
977
+ "size": "sm",
376
978
  "type": "spinner"
377
979
  }
378
980
  ]