@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,62 @@
74
74
  "category": "interaction",
75
75
  "linkedEntity": "Lease",
76
76
  "emits": [
77
+ {
78
+ "event": "OPEN_LEASE",
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.tenantId",
92
+ "type": "string",
93
+ "required": true
94
+ },
95
+ {
96
+ "name": "row.tenantName",
97
+ "type": "string"
98
+ },
99
+ {
100
+ "name": "row.unitId",
101
+ "type": "string"
102
+ },
103
+ {
104
+ "name": "row.unitLabel",
105
+ "type": "string"
106
+ },
107
+ {
108
+ "name": "row.startDate",
109
+ "type": "string",
110
+ "required": true
111
+ },
112
+ {
113
+ "name": "row.endDate",
114
+ "type": "string"
115
+ },
116
+ {
117
+ "name": "row.monthlyRent",
118
+ "type": "number"
119
+ },
120
+ {
121
+ "name": "row.status",
122
+ "type": "string"
123
+ },
124
+ {
125
+ "name": "row.notes",
126
+ "type": "string"
127
+ }
128
+ ]
129
+ },
130
+ {
131
+ "event": "CLOSE_VIEW"
132
+ },
77
133
  {
78
134
  "event": "RENEW_LEASE",
79
135
  "payloadSchema": [
@@ -126,6 +182,9 @@
126
182
  {
127
183
  "name": "browsing"
128
184
  },
185
+ {
186
+ "name": "viewing_single"
187
+ },
129
188
  {
130
189
  "name": "error"
131
190
  }
@@ -160,13 +219,17 @@
160
219
  ]
161
220
  },
162
221
  {
163
- "key": "RENEW_LEASE",
164
- "name": "Renew Lease",
222
+ "key": "OPEN_LEASE",
223
+ "name": "Open Lease",
165
224
  "payloadSchema": [
166
225
  {
167
226
  "name": "id",
168
227
  "type": "string",
169
228
  "required": true
229
+ },
230
+ {
231
+ "name": "row",
232
+ "type": "Lease"
170
233
  }
171
234
  ]
172
235
  },
@@ -180,6 +243,21 @@
180
243
  "required": true
181
244
  }
182
245
  ]
246
+ },
247
+ {
248
+ "key": "CLOSE_VIEW",
249
+ "name": "Close View"
250
+ },
251
+ {
252
+ "key": "RENEW_LEASE",
253
+ "name": "Renew Lease",
254
+ "payloadSchema": [
255
+ {
256
+ "name": "id",
257
+ "type": "string",
258
+ "required": true
259
+ }
260
+ ]
183
261
  }
184
262
  ],
185
263
  "transitions": [
@@ -193,8 +271,8 @@
193
271
  "Lease",
194
272
  {
195
273
  "emit": {
196
- "success": "LeaseLoaded",
197
- "failure": "LeaseLoadFailed"
274
+ "failure": "LeaseLoadFailed",
275
+ "success": "LeaseLoaded"
198
276
  }
199
277
  }
200
278
  ],
@@ -203,21 +281,21 @@
203
281
  "main",
204
282
  {
205
283
  "direction": "vertical",
284
+ "align": "center",
285
+ "gap": "md",
206
286
  "className": "py-12",
287
+ "type": "stack",
207
288
  "children": [
208
289
  {
209
290
  "type": "spinner"
210
291
  },
211
292
  {
212
- "variant": "caption",
213
293
  "color": "muted",
214
- "type": "typography",
215
- "content": "Loading leases…"
294
+ "variant": "caption",
295
+ "content": "Loading leases…",
296
+ "type": "typography"
216
297
  }
217
- ],
218
- "gap": "md",
219
- "type": "stack",
220
- "align": "center"
298
+ ]
221
299
  }
222
300
  ]
223
301
  ]
@@ -231,197 +309,77 @@
231
309
  "render-ui",
232
310
  "main",
233
311
  {
234
- "type": "stack",
235
- "gap": "md",
236
- "direction": "vertical",
237
312
  "children": [
238
313
  {
239
- "type": "geometric-pattern",
240
- "color": "primary",
241
- "variant": "star8",
242
- "opacity": 0.05,
243
- "mode": "background"
244
- },
245
- {
246
- "type": "center",
314
+ "direction": "horizontal",
315
+ "gap": "sm",
316
+ "align": "center",
247
317
  "children": [
248
318
  {
249
- "children": [
250
- {
251
- "type": "icon",
252
- "name": "file-text"
253
- },
254
- {
255
- "type": "typography",
256
- "content": "@config.title",
257
- "variant": "h3"
258
- },
259
- {
260
- "type": "badge",
261
- "label": "Active",
262
- "variant": "success"
263
- }
264
- ],
265
- "align": "center",
266
- "gap": "sm",
267
- "type": "stack",
268
- "direction": "horizontal"
319
+ "type": "icon",
320
+ "name": "file-text"
321
+ },
322
+ {
323
+ "content": "@config.title",
324
+ "variant": "h3",
325
+ "type": "typography"
269
326
  }
270
- ]
271
- },
272
- {
273
- "type": "divider"
327
+ ],
328
+ "type": "stack"
274
329
  },
275
330
  {
276
- "gap": "lg",
277
- "type": "split",
278
331
  "children": [
279
332
  {
280
- "gap": "md",
281
- "type": "stack",
282
- "direction": "vertical",
283
- "children": [
284
- {
285
- "items": [
286
- {
287
- "title": "Lease Term",
288
- "id": "term",
289
- "content": "Start to end dates, renewal options, notice period."
290
- },
291
- {
292
- "title": "Rent & Fees",
293
- "content": "Monthly rent, security deposit, late fees.",
294
- "id": "rent"
295
- },
296
- {
297
- "content": "Tenant responsibilities, owner obligations, restrictions.",
298
- "id": "terms",
299
- "title": "Terms & Conditions"
300
- }
301
- ],
302
- "type": "accordion"
303
- },
304
- {
305
- "selected": "current",
306
- "type": "date-range-selector",
307
- "options": [
308
- {
309
- "label": "Current Term",
310
- "value": "current"
311
- },
312
- {
313
- "label": "Renewal Period",
314
- "value": "next"
315
- }
316
- ]
317
- }
318
- ]
333
+ "icon": "file-text",
334
+ "type": "stat-display",
335
+ "label": "Total leases",
336
+ "value": "@payload.data.length"
319
337
  },
320
338
  {
321
- "direction": "vertical",
322
- "gap": "md",
323
- "children": [
324
- {
325
- "title": "Property photos",
326
- "columns": 2.0,
327
- "type": "media-gallery",
328
- "items": [
329
- {
330
- "id": "Property",
331
- "src": "https://picsum.photos/seed/lease1/800/600",
332
- "type": "image",
333
- "alt": "Property"
334
- },
335
- {
336
- "alt": "Property",
337
- "id": "Property",
338
- "type": "image",
339
- "src": "https://picsum.photos/seed/lease2/800/600"
340
- },
341
- {
342
- "alt": "Property",
343
- "id": "Property",
344
- "type": "image",
345
- "src": "https://picsum.photos/seed/lease3/800/600"
346
- },
347
- {
348
- "id": "Property",
349
- "src": "https://picsum.photos/seed/lease4/800/600",
350
- "alt": "Property",
351
- "type": "image"
352
- }
353
- ]
354
- },
355
- {
356
- "showArrows": true,
357
- "showDots": true,
358
- "type": "carousel",
359
- "items": [
360
- {
361
- "alt": "Photo 1",
362
- "src": "https://picsum.photos/seed/lease1/1200/800"
363
- },
364
- {
365
- "src": "https://picsum.photos/seed/lease2/1200/800",
366
- "alt": "Photo 2"
367
- },
368
- {
369
- "src": "https://picsum.photos/seed/lease3/1200/800",
370
- "alt": "Photo 3"
371
- }
372
- ]
373
- }
374
- ],
375
- "type": "stack"
339
+ "label": "Active",
340
+ "type": "stat-display",
341
+ "value": "86",
342
+ "icon": "check-circle"
343
+ },
344
+ {
345
+ "label": "Expiring 60d",
346
+ "value": "11",
347
+ "type": "stat-display",
348
+ "icon": "alert-triangle"
349
+ },
350
+ {
351
+ "type": "stat-display",
352
+ "label": "Monthly revenue",
353
+ "value": "$184,200",
354
+ "icon": "dollar-sign"
376
355
  }
377
356
  ],
378
- "ratio": "1:1"
357
+ "cols": 4.0,
358
+ "type": "simple-grid"
379
359
  },
380
360
  {
381
- "currentIndex": 0.0,
382
- "type": "lightbox",
383
- "showCounter": true,
384
- "images": [
385
- {
386
- "src": "https://picsum.photos/seed/lease1/1200/800",
387
- "alt": "Property",
388
- "caption": "Property"
389
- }
390
- ],
391
- "isOpen": false
361
+ "type": "divider"
392
362
  },
393
363
  {
394
- "itemActions": [
395
- {
396
- "event": "RENEW_LEASE",
397
- "variant": "primary",
398
- "label": "Renew"
399
- },
400
- {
401
- "variant": "danger",
402
- "event": "TERMINATE_LEASE",
403
- "label": "Terminate"
404
- }
405
- ],
406
364
  "fields": [
407
365
  {
366
+ "label": "Tenant",
408
367
  "variant": "caption",
409
- "name": "tenantName",
410
- "label": "Tenant"
368
+ "name": "tenantName"
411
369
  },
412
370
  {
413
- "label": "Unit",
414
371
  "name": "unitLabel",
372
+ "label": "Unit",
415
373
  "variant": "caption"
416
374
  },
417
375
  {
376
+ "variant": "caption",
418
377
  "name": "startDate",
419
- "label": "Start",
420
- "variant": "caption"
378
+ "label": "Start"
421
379
  },
422
380
  {
423
- "name": "endDate",
424
381
  "label": "End",
382
+ "name": "endDate",
425
383
  "variant": "caption"
426
384
  },
427
385
  {
@@ -430,17 +388,33 @@
430
388
  "label": "Monthly Rent"
431
389
  },
432
390
  {
433
- "variant": "badge",
434
391
  "name": "status",
435
- "label": "Status"
392
+ "label": "Status",
393
+ "variant": "badge"
436
394
  }
437
395
  ],
438
- "type": "data-grid",
439
- "entity": "@payload.data",
440
396
  "cols": 1.0,
441
- "gap": "sm"
397
+ "type": "data-grid",
398
+ "gap": "sm",
399
+ "itemActions": [
400
+ {
401
+ "variant": "primary",
402
+ "label": "Open",
403
+ "event": "OPEN_LEASE",
404
+ "icon": "arrow-right"
405
+ },
406
+ {
407
+ "variant": "danger",
408
+ "label": "Terminate",
409
+ "event": "TERMINATE_LEASE"
410
+ }
411
+ ],
412
+ "entity": "@payload.data"
442
413
  }
443
- ]
414
+ ],
415
+ "gap": "md",
416
+ "direction": "vertical",
417
+ "type": "stack"
444
418
  }
445
419
  ]
446
420
  ]
@@ -454,8 +428,8 @@
454
428
  "render-ui",
455
429
  "main",
456
430
  {
457
- "variant": "error",
458
431
  "type": "alert",
432
+ "variant": "error",
459
433
  "message": "@payload.error"
460
434
  }
461
435
  ]
@@ -463,7 +437,303 @@
463
437
  },
464
438
  {
465
439
  "from": "browsing",
466
- "to": "browsing",
440
+ "to": "viewing_single",
441
+ "event": "OPEN_LEASE",
442
+ "effects": [
443
+ [
444
+ "set",
445
+ "@entity.id",
446
+ "@payload.row.id"
447
+ ],
448
+ [
449
+ "set",
450
+ "@entity.tenantId",
451
+ "@payload.row.tenantId"
452
+ ],
453
+ [
454
+ "set",
455
+ "@entity.tenantName",
456
+ "@payload.row.tenantName"
457
+ ],
458
+ [
459
+ "set",
460
+ "@entity.unitId",
461
+ "@payload.row.unitId"
462
+ ],
463
+ [
464
+ "set",
465
+ "@entity.unitLabel",
466
+ "@payload.row.unitLabel"
467
+ ],
468
+ [
469
+ "set",
470
+ "@entity.startDate",
471
+ "@payload.row.startDate"
472
+ ],
473
+ [
474
+ "set",
475
+ "@entity.endDate",
476
+ "@payload.row.endDate"
477
+ ],
478
+ [
479
+ "set",
480
+ "@entity.monthlyRent",
481
+ "@payload.row.monthlyRent"
482
+ ],
483
+ [
484
+ "set",
485
+ "@entity.status",
486
+ "@payload.row.status"
487
+ ],
488
+ [
489
+ "set",
490
+ "@entity.notes",
491
+ "@payload.row.notes"
492
+ ],
493
+ [
494
+ "render-ui",
495
+ "main",
496
+ {
497
+ "children": [
498
+ {
499
+ "direction": "horizontal",
500
+ "gap": "sm",
501
+ "type": "stack",
502
+ "align": "center",
503
+ "children": [
504
+ {
505
+ "variant": "ghost",
506
+ "type": "button",
507
+ "action": "CLOSE_VIEW",
508
+ "label": "Back"
509
+ },
510
+ {
511
+ "type": "icon",
512
+ "name": "file-text"
513
+ },
514
+ {
515
+ "variant": "h3",
516
+ "type": "typography",
517
+ "content": "@entity.tenantName"
518
+ },
519
+ {
520
+ "label": "@entity.status",
521
+ "variant": "default",
522
+ "type": "badge"
523
+ }
524
+ ]
525
+ },
526
+ {
527
+ "type": "divider"
528
+ },
529
+ {
530
+ "type": "stack",
531
+ "direction": "vertical",
532
+ "gap": "sm",
533
+ "children": [
534
+ {
535
+ "direction": "horizontal",
536
+ "children": [
537
+ {
538
+ "content": "Unit",
539
+ "color": "muted",
540
+ "variant": "caption",
541
+ "type": "typography"
542
+ },
543
+ {
544
+ "variant": "body",
545
+ "type": "typography",
546
+ "content": "@entity.unitLabel"
547
+ }
548
+ ],
549
+ "type": "stack",
550
+ "gap": "md"
551
+ },
552
+ {
553
+ "gap": "md",
554
+ "children": [
555
+ {
556
+ "variant": "caption",
557
+ "content": "Tenant ID",
558
+ "type": "typography",
559
+ "color": "muted"
560
+ },
561
+ {
562
+ "variant": "body",
563
+ "content": "@entity.tenantId",
564
+ "type": "typography"
565
+ }
566
+ ],
567
+ "direction": "horizontal",
568
+ "type": "stack"
569
+ },
570
+ {
571
+ "children": [
572
+ {
573
+ "color": "muted",
574
+ "content": "Notes",
575
+ "type": "typography",
576
+ "variant": "caption"
577
+ },
578
+ {
579
+ "content": "@entity.notes",
580
+ "type": "typography",
581
+ "variant": "body"
582
+ }
583
+ ],
584
+ "direction": "horizontal",
585
+ "type": "stack",
586
+ "gap": "md"
587
+ }
588
+ ]
589
+ },
590
+ {
591
+ "type": "divider"
592
+ },
593
+ {
594
+ "type": "simple-grid",
595
+ "children": [
596
+ {
597
+ "label": "Monthly rent",
598
+ "type": "stat-display",
599
+ "value": "@entity.monthlyRent",
600
+ "icon": "dollar-sign"
601
+ },
602
+ {
603
+ "value": "@entity.startDate",
604
+ "label": "Start",
605
+ "type": "stat-display",
606
+ "icon": "calendar"
607
+ },
608
+ {
609
+ "label": "End",
610
+ "icon": "calendar-x",
611
+ "type": "stat-display",
612
+ "value": "@entity.endDate"
613
+ }
614
+ ],
615
+ "cols": 3.0
616
+ },
617
+ {
618
+ "gap": "sm",
619
+ "align": "center",
620
+ "type": "stack",
621
+ "children": [
622
+ {
623
+ "label": "Renew Lease",
624
+ "variant": "primary",
625
+ "action": "RENEW_LEASE",
626
+ "type": "button",
627
+ "actionPayload": {
628
+ "id": "@entity.id"
629
+ }
630
+ },
631
+ {
632
+ "actionPayload": {
633
+ "id": "@entity.id"
634
+ },
635
+ "variant": "danger",
636
+ "type": "button",
637
+ "label": "Terminate",
638
+ "action": "TERMINATE_LEASE"
639
+ }
640
+ ],
641
+ "direction": "horizontal"
642
+ }
643
+ ],
644
+ "direction": "vertical",
645
+ "type": "stack",
646
+ "gap": "md"
647
+ }
648
+ ]
649
+ ]
650
+ },
651
+ {
652
+ "from": "browsing",
653
+ "to": "loading",
654
+ "event": "TERMINATE_LEASE",
655
+ "effects": [
656
+ [
657
+ "set",
658
+ "@entity.id",
659
+ "@payload.id"
660
+ ],
661
+ [
662
+ "fetch",
663
+ "Lease",
664
+ {
665
+ "emit": {
666
+ "success": "LeaseLoaded",
667
+ "failure": "LeaseLoadFailed"
668
+ }
669
+ }
670
+ ],
671
+ [
672
+ "render-ui",
673
+ "main",
674
+ {
675
+ "align": "center",
676
+ "className": "py-12",
677
+ "gap": "md",
678
+ "children": [
679
+ {
680
+ "type": "spinner"
681
+ },
682
+ {
683
+ "type": "typography",
684
+ "color": "muted",
685
+ "content": "Terminating lease…",
686
+ "variant": "caption"
687
+ }
688
+ ],
689
+ "type": "stack",
690
+ "direction": "vertical"
691
+ }
692
+ ]
693
+ ]
694
+ },
695
+ {
696
+ "from": "viewing_single",
697
+ "to": "loading",
698
+ "event": "CLOSE_VIEW",
699
+ "effects": [
700
+ [
701
+ "fetch",
702
+ "Lease",
703
+ {
704
+ "emit": {
705
+ "success": "LeaseLoaded",
706
+ "failure": "LeaseLoadFailed"
707
+ }
708
+ }
709
+ ],
710
+ [
711
+ "render-ui",
712
+ "main",
713
+ {
714
+ "align": "center",
715
+ "direction": "vertical",
716
+ "gap": "md",
717
+ "type": "stack",
718
+ "children": [
719
+ {
720
+ "type": "spinner"
721
+ },
722
+ {
723
+ "variant": "caption",
724
+ "content": "Loading leases…",
725
+ "color": "muted",
726
+ "type": "typography"
727
+ }
728
+ ],
729
+ "className": "py-12"
730
+ }
731
+ ]
732
+ ]
733
+ },
734
+ {
735
+ "from": "viewing_single",
736
+ "to": "loading",
467
737
  "event": "RENEW_LEASE",
468
738
  "effects": [
469
739
  [
@@ -471,20 +741,43 @@
471
741
  "@entity.id",
472
742
  "@payload.id"
473
743
  ],
744
+ [
745
+ "fetch",
746
+ "Lease",
747
+ {
748
+ "emit": {
749
+ "success": "LeaseLoaded",
750
+ "failure": "LeaseLoadFailed"
751
+ }
752
+ }
753
+ ],
474
754
  [
475
755
  "render-ui",
476
756
  "main",
477
757
  {
478
- "type": "alert",
479
- "message": "Lease renewal requested",
480
- "variant": "success"
758
+ "align": "center",
759
+ "type": "stack",
760
+ "className": "py-12",
761
+ "gap": "md",
762
+ "direction": "vertical",
763
+ "children": [
764
+ {
765
+ "type": "spinner"
766
+ },
767
+ {
768
+ "content": "Renewing lease…",
769
+ "type": "typography",
770
+ "variant": "caption",
771
+ "color": "muted"
772
+ }
773
+ ]
481
774
  }
482
775
  ]
483
776
  ]
484
777
  },
485
778
  {
486
- "from": "browsing",
487
- "to": "browsing",
779
+ "from": "viewing_single",
780
+ "to": "loading",
488
781
  "event": "TERMINATE_LEASE",
489
782
  "effects": [
490
783
  [
@@ -492,13 +785,36 @@
492
785
  "@entity.id",
493
786
  "@payload.id"
494
787
  ],
788
+ [
789
+ "fetch",
790
+ "Lease",
791
+ {
792
+ "emit": {
793
+ "success": "LeaseLoaded",
794
+ "failure": "LeaseLoadFailed"
795
+ }
796
+ }
797
+ ],
495
798
  [
496
799
  "render-ui",
497
800
  "main",
498
801
  {
499
- "message": "Lease termination requested",
500
- "type": "alert",
501
- "variant": "info"
802
+ "type": "stack",
803
+ "className": "py-12",
804
+ "direction": "vertical",
805
+ "align": "center",
806
+ "gap": "md",
807
+ "children": [
808
+ {
809
+ "type": "spinner"
810
+ },
811
+ {
812
+ "variant": "caption",
813
+ "color": "muted",
814
+ "type": "typography",
815
+ "content": "Terminating lease…"
816
+ }
817
+ ]
502
818
  }
503
819
  ]
504
820
  ]
@@ -522,8 +838,8 @@
522
838
  "render-ui",
523
839
  "main",
524
840
  {
525
- "type": "spinner",
526
- "size": "sm"
841
+ "size": "sm",
842
+ "type": "spinner"
527
843
  }
528
844
  ]
529
845
  ]