@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-tenant",
3
3
  "version": "1.0.0",
4
- "description": "Tenant primitive: person/company occupying a leased unit.",
4
+ "description": "std-tenant person/company occupying a leased unit. Lists tenants in `browsing`; opens tenant detail (name, contact, lease, move-in/out dates, status) in `viewing_single` with Activate / Move Out actions.",
5
5
  "orbitals": [
6
6
  {
7
7
  "name": "TenantOrbital",
@@ -68,6 +68,57 @@
68
68
  "category": "interaction",
69
69
  "linkedEntity": "Tenant",
70
70
  "emits": [
71
+ {
72
+ "event": "OPEN_TENANT",
73
+ "payloadSchema": [
74
+ {
75
+ "name": "id",
76
+ "type": "string",
77
+ "required": true
78
+ },
79
+ {
80
+ "name": "row.id",
81
+ "type": "string",
82
+ "required": true
83
+ },
84
+ {
85
+ "name": "row.name",
86
+ "type": "string",
87
+ "required": true
88
+ },
89
+ {
90
+ "name": "row.email",
91
+ "type": "string"
92
+ },
93
+ {
94
+ "name": "row.phone",
95
+ "type": "string"
96
+ },
97
+ {
98
+ "name": "row.leaseId",
99
+ "type": "string"
100
+ },
101
+ {
102
+ "name": "row.moveInDate",
103
+ "type": "string"
104
+ },
105
+ {
106
+ "name": "row.moveOutDate",
107
+ "type": "string"
108
+ },
109
+ {
110
+ "name": "row.status",
111
+ "type": "string"
112
+ },
113
+ {
114
+ "name": "row.notes",
115
+ "type": "string"
116
+ }
117
+ ]
118
+ },
119
+ {
120
+ "event": "CLOSE_TENANT"
121
+ },
71
122
  {
72
123
  "event": "ACTIVATE_TENANT",
73
124
  "payloadSchema": [
@@ -90,7 +141,6 @@
90
141
  },
91
142
  {
92
143
  "event": "TenantLoaded",
93
- "scope": "internal",
94
144
  "payloadSchema": [
95
145
  {
96
146
  "name": "data",
@@ -100,7 +150,6 @@
100
150
  },
101
151
  {
102
152
  "event": "TenantLoadFailed",
103
- "scope": "internal",
104
153
  "payloadSchema": [
105
154
  {
106
155
  "name": "error",
@@ -122,6 +171,9 @@
122
171
  {
123
172
  "name": "browsing"
124
173
  },
174
+ {
175
+ "name": "viewing_single"
176
+ },
125
177
  {
126
178
  "name": "error"
127
179
  }
@@ -156,13 +208,17 @@
156
208
  ]
157
209
  },
158
210
  {
159
- "key": "ACTIVATE_TENANT",
160
- "name": "Activate Tenant",
211
+ "key": "OPEN_TENANT",
212
+ "name": "Open Tenant",
161
213
  "payloadSchema": [
162
214
  {
163
215
  "name": "id",
164
216
  "type": "string",
165
217
  "required": true
218
+ },
219
+ {
220
+ "name": "row",
221
+ "type": "Tenant"
166
222
  }
167
223
  ]
168
224
  },
@@ -176,6 +232,21 @@
176
232
  "required": true
177
233
  }
178
234
  ]
235
+ },
236
+ {
237
+ "key": "CLOSE_TENANT",
238
+ "name": "Close Tenant"
239
+ },
240
+ {
241
+ "key": "ACTIVATE_TENANT",
242
+ "name": "Activate Tenant",
243
+ "payloadSchema": [
244
+ {
245
+ "name": "id",
246
+ "type": "string",
247
+ "required": true
248
+ }
249
+ ]
179
250
  }
180
251
  ],
181
252
  "transitions": [
@@ -198,7 +269,22 @@
198
269
  "render-ui",
199
270
  "main",
200
271
  {
201
- "type": "spinner"
272
+ "children": [
273
+ {
274
+ "type": "spinner"
275
+ },
276
+ {
277
+ "color": "muted",
278
+ "variant": "caption",
279
+ "type": "typography",
280
+ "content": "Loading tenants…"
281
+ }
282
+ ],
283
+ "gap": "md",
284
+ "direction": "vertical",
285
+ "type": "stack",
286
+ "className": "py-12",
287
+ "align": "center"
202
288
  }
203
289
  ]
204
290
  ]
@@ -212,97 +298,105 @@
212
298
  "render-ui",
213
299
  "main",
214
300
  {
301
+ "direction": "vertical",
302
+ "type": "stack",
215
303
  "children": [
216
304
  {
217
305
  "direction": "horizontal",
218
- "align": "center",
219
306
  "children": [
220
307
  {
221
- "width": 120.0,
222
- "units": [],
223
- "mapWidth": 1000.0,
224
- "mapHeight": 1000.0,
225
- "tiles": [],
226
- "type": "mini-map",
227
- "height": 80.0
308
+ "type": "icon",
309
+ "name": "users"
228
310
  },
229
311
  {
230
- "type": "stack",
231
- "direction": "horizontal",
232
- "gap": "sm",
233
- "align": "center",
234
- "children": [
235
- {
236
- "type": "icon",
237
- "name": "users"
238
- },
239
- {
240
- "type": "typography",
241
- "variant": "h3",
242
- "content": "@config.title"
243
- }
244
- ]
312
+ "content": "@config.title",
313
+ "type": "typography",
314
+ "variant": "h3"
245
315
  }
246
316
  ],
247
- "type": "stack",
248
- "gap": "md"
317
+ "align": "center",
318
+ "gap": "sm",
319
+ "type": "stack"
249
320
  },
250
321
  {
251
- "height": "240px",
252
- "markers": [],
253
- "type": "map-view",
254
- "zoom": 10.0
322
+ "children": [
323
+ {
324
+ "type": "stat-display",
325
+ "value": "@payload.data.length",
326
+ "icon": "users",
327
+ "label": "Total tenants"
328
+ },
329
+ {
330
+ "value": "42",
331
+ "type": "stat-display",
332
+ "label": "Current",
333
+ "icon": "check-circle"
334
+ },
335
+ {
336
+ "icon": "user-plus",
337
+ "value": "8",
338
+ "type": "stat-display",
339
+ "label": "Prospective"
340
+ },
341
+ {
342
+ "icon": "user-minus",
343
+ "label": "Former",
344
+ "type": "stat-display",
345
+ "value": "120"
346
+ }
347
+ ],
348
+ "cols": 4.0,
349
+ "type": "simple-grid"
255
350
  },
256
351
  {
257
352
  "type": "divider"
258
353
  },
259
354
  {
260
- "type": "data-grid",
261
355
  "fields": [
262
356
  {
263
- "label": "Name",
357
+ "variant": "h4",
264
358
  "name": "name",
265
- "variant": "h4"
359
+ "label": "Name"
266
360
  },
267
361
  {
268
- "label": "Email",
362
+ "variant": "body",
269
363
  "name": "email",
270
- "variant": "body"
364
+ "label": "Email"
271
365
  },
272
366
  {
367
+ "name": "phone",
273
368
  "label": "Phone",
274
- "variant": "caption",
275
- "name": "phone"
369
+ "variant": "caption"
276
370
  },
277
371
  {
372
+ "label": "Status",
278
373
  "variant": "badge",
279
- "name": "status",
280
- "label": "Status"
374
+ "name": "status"
281
375
  },
282
376
  {
283
- "label": "Move-In",
284
377
  "variant": "caption",
285
- "name": "moveInDate"
378
+ "name": "moveInDate",
379
+ "label": "Move-In"
286
380
  }
287
381
  ],
288
382
  "entity": "@payload.data",
289
383
  "itemActions": [
290
384
  {
291
- "label": "Activate",
292
- "event": "ACTIVATE_TENANT",
293
- "variant": "primary"
385
+ "variant": "primary",
386
+ "label": "Open",
387
+ "icon": "arrow-right",
388
+ "event": "OPEN_TENANT"
294
389
  },
295
390
  {
296
- "variant": "danger",
391
+ "label": "Move Out",
297
392
  "event": "MOVE_OUT",
298
- "label": "Move Out"
393
+ "variant": "danger"
299
394
  }
300
- ]
395
+ ],
396
+ "type": "data-grid"
301
397
  }
302
398
  ],
303
- "type": "stack",
304
- "gap": "md",
305
- "direction": "vertical"
399
+ "gap": "md"
306
400
  }
307
401
  ]
308
402
  ]
@@ -318,15 +412,318 @@
318
412
  {
319
413
  "variant": "error",
320
414
  "title": "Failed to load tenants",
321
- "type": "alert",
322
- "message": "@payload.error"
415
+ "message": "@payload.error",
416
+ "type": "alert"
323
417
  }
324
418
  ]
325
419
  ]
326
420
  },
327
421
  {
328
422
  "from": "browsing",
329
- "to": "browsing",
423
+ "to": "viewing_single",
424
+ "event": "OPEN_TENANT",
425
+ "effects": [
426
+ [
427
+ "set",
428
+ "@entity.id",
429
+ "@payload.row.id"
430
+ ],
431
+ [
432
+ "set",
433
+ "@entity.name",
434
+ "@payload.row.name"
435
+ ],
436
+ [
437
+ "set",
438
+ "@entity.email",
439
+ "@payload.row.email"
440
+ ],
441
+ [
442
+ "set",
443
+ "@entity.phone",
444
+ "@payload.row.phone"
445
+ ],
446
+ [
447
+ "set",
448
+ "@entity.leaseId",
449
+ "@payload.row.leaseId"
450
+ ],
451
+ [
452
+ "set",
453
+ "@entity.moveInDate",
454
+ "@payload.row.moveInDate"
455
+ ],
456
+ [
457
+ "set",
458
+ "@entity.moveOutDate",
459
+ "@payload.row.moveOutDate"
460
+ ],
461
+ [
462
+ "set",
463
+ "@entity.status",
464
+ "@payload.row.status"
465
+ ],
466
+ [
467
+ "set",
468
+ "@entity.notes",
469
+ "@payload.row.notes"
470
+ ],
471
+ [
472
+ "render-ui",
473
+ "main",
474
+ {
475
+ "gap": "md",
476
+ "type": "stack",
477
+ "direction": "vertical",
478
+ "children": [
479
+ {
480
+ "align": "center",
481
+ "direction": "horizontal",
482
+ "type": "stack",
483
+ "gap": "sm",
484
+ "children": [
485
+ {
486
+ "variant": "ghost",
487
+ "action": "CLOSE_TENANT",
488
+ "type": "button",
489
+ "label": "Back"
490
+ },
491
+ {
492
+ "type": "icon",
493
+ "name": "user"
494
+ },
495
+ {
496
+ "content": "@entity.name",
497
+ "type": "typography",
498
+ "variant": "h3"
499
+ },
500
+ {
501
+ "label": "@entity.status",
502
+ "type": "badge",
503
+ "variant": "default"
504
+ }
505
+ ]
506
+ },
507
+ {
508
+ "type": "divider"
509
+ },
510
+ {
511
+ "type": "stack",
512
+ "children": [
513
+ {
514
+ "children": [
515
+ {
516
+ "color": "muted",
517
+ "content": "Email",
518
+ "type": "typography",
519
+ "variant": "caption"
520
+ },
521
+ {
522
+ "variant": "body",
523
+ "content": "@entity.email",
524
+ "type": "typography"
525
+ }
526
+ ],
527
+ "direction": "horizontal",
528
+ "gap": "md",
529
+ "type": "stack"
530
+ },
531
+ {
532
+ "direction": "horizontal",
533
+ "type": "stack",
534
+ "gap": "md",
535
+ "children": [
536
+ {
537
+ "content": "Phone",
538
+ "type": "typography",
539
+ "variant": "caption",
540
+ "color": "muted"
541
+ },
542
+ {
543
+ "type": "typography",
544
+ "variant": "body",
545
+ "content": "@entity.phone"
546
+ }
547
+ ]
548
+ },
549
+ {
550
+ "children": [
551
+ {
552
+ "color": "muted",
553
+ "content": "Lease",
554
+ "variant": "caption",
555
+ "type": "typography"
556
+ },
557
+ {
558
+ "content": "@entity.leaseId",
559
+ "variant": "body",
560
+ "type": "typography"
561
+ }
562
+ ],
563
+ "direction": "horizontal",
564
+ "type": "stack",
565
+ "gap": "md"
566
+ },
567
+ {
568
+ "gap": "md",
569
+ "children": [
570
+ {
571
+ "content": "Notes",
572
+ "type": "typography",
573
+ "color": "muted",
574
+ "variant": "caption"
575
+ },
576
+ {
577
+ "content": "@entity.notes",
578
+ "type": "typography",
579
+ "variant": "body"
580
+ }
581
+ ],
582
+ "type": "stack",
583
+ "direction": "horizontal"
584
+ }
585
+ ],
586
+ "gap": "sm",
587
+ "direction": "vertical"
588
+ },
589
+ {
590
+ "type": "divider"
591
+ },
592
+ {
593
+ "children": [
594
+ {
595
+ "label": "Move-In",
596
+ "icon": "calendar",
597
+ "value": "@entity.moveInDate",
598
+ "type": "stat-display"
599
+ },
600
+ {
601
+ "type": "stat-display",
602
+ "label": "Move-Out",
603
+ "value": "@entity.moveOutDate",
604
+ "icon": "calendar"
605
+ }
606
+ ],
607
+ "cols": 2.0,
608
+ "type": "simple-grid"
609
+ },
610
+ {
611
+ "align": "center",
612
+ "direction": "horizontal",
613
+ "gap": "sm",
614
+ "children": [
615
+ {
616
+ "actionPayload": {
617
+ "id": "@entity.id"
618
+ },
619
+ "action": "ACTIVATE_TENANT",
620
+ "label": "Activate",
621
+ "variant": "primary",
622
+ "type": "button"
623
+ },
624
+ {
625
+ "actionPayload": {
626
+ "id": "@entity.id"
627
+ },
628
+ "variant": "danger",
629
+ "type": "button",
630
+ "label": "Move Out",
631
+ "action": "MOVE_OUT"
632
+ }
633
+ ],
634
+ "type": "stack"
635
+ }
636
+ ]
637
+ }
638
+ ]
639
+ ]
640
+ },
641
+ {
642
+ "from": "browsing",
643
+ "to": "loading",
644
+ "event": "MOVE_OUT",
645
+ "effects": [
646
+ [
647
+ "set",
648
+ "@entity.id",
649
+ "@payload.id"
650
+ ],
651
+ [
652
+ "fetch",
653
+ "Tenant",
654
+ {
655
+ "emit": {
656
+ "success": "TenantLoaded",
657
+ "failure": "TenantLoadFailed"
658
+ }
659
+ }
660
+ ],
661
+ [
662
+ "render-ui",
663
+ "main",
664
+ {
665
+ "direction": "vertical",
666
+ "align": "center",
667
+ "gap": "md",
668
+ "type": "stack",
669
+ "className": "py-12",
670
+ "children": [
671
+ {
672
+ "type": "spinner"
673
+ },
674
+ {
675
+ "type": "typography",
676
+ "content": "Recording move-out…",
677
+ "variant": "caption",
678
+ "color": "muted"
679
+ }
680
+ ]
681
+ }
682
+ ]
683
+ ]
684
+ },
685
+ {
686
+ "from": "viewing_single",
687
+ "to": "loading",
688
+ "event": "CLOSE_TENANT",
689
+ "effects": [
690
+ [
691
+ "fetch",
692
+ "Tenant",
693
+ {
694
+ "emit": {
695
+ "failure": "TenantLoadFailed",
696
+ "success": "TenantLoaded"
697
+ }
698
+ }
699
+ ],
700
+ [
701
+ "render-ui",
702
+ "main",
703
+ {
704
+ "align": "center",
705
+ "gap": "md",
706
+ "type": "stack",
707
+ "direction": "vertical",
708
+ "children": [
709
+ {
710
+ "type": "spinner"
711
+ },
712
+ {
713
+ "type": "typography",
714
+ "color": "muted",
715
+ "content": "Loading tenants…",
716
+ "variant": "caption"
717
+ }
718
+ ],
719
+ "className": "py-12"
720
+ }
721
+ ]
722
+ ]
723
+ },
724
+ {
725
+ "from": "viewing_single",
726
+ "to": "loading",
330
727
  "event": "ACTIVATE_TENANT",
331
728
  "effects": [
332
729
  [
@@ -335,15 +732,42 @@
335
732
  "@payload.id"
336
733
  ],
337
734
  [
338
- "notify",
339
- "Tenant activated",
340
- "success"
735
+ "fetch",
736
+ "Tenant",
737
+ {
738
+ "emit": {
739
+ "failure": "TenantLoadFailed",
740
+ "success": "TenantLoaded"
741
+ }
742
+ }
743
+ ],
744
+ [
745
+ "render-ui",
746
+ "main",
747
+ {
748
+ "gap": "md",
749
+ "type": "stack",
750
+ "className": "py-12",
751
+ "align": "center",
752
+ "children": [
753
+ {
754
+ "type": "spinner"
755
+ },
756
+ {
757
+ "content": "Activating tenant…",
758
+ "type": "typography",
759
+ "color": "muted",
760
+ "variant": "caption"
761
+ }
762
+ ],
763
+ "direction": "vertical"
764
+ }
341
765
  ]
342
766
  ]
343
767
  },
344
768
  {
345
- "from": "browsing",
346
- "to": "browsing",
769
+ "from": "viewing_single",
770
+ "to": "loading",
347
771
  "event": "MOVE_OUT",
348
772
  "effects": [
349
773
  [
@@ -352,9 +776,36 @@
352
776
  "@payload.id"
353
777
  ],
354
778
  [
355
- "notify",
356
- "Tenant move-out recorded",
357
- "info"
779
+ "fetch",
780
+ "Tenant",
781
+ {
782
+ "emit": {
783
+ "success": "TenantLoaded",
784
+ "failure": "TenantLoadFailed"
785
+ }
786
+ }
787
+ ],
788
+ [
789
+ "render-ui",
790
+ "main",
791
+ {
792
+ "direction": "vertical",
793
+ "gap": "md",
794
+ "type": "stack",
795
+ "align": "center",
796
+ "children": [
797
+ {
798
+ "type": "spinner"
799
+ },
800
+ {
801
+ "color": "muted",
802
+ "type": "typography",
803
+ "content": "Recording move-out…",
804
+ "variant": "caption"
805
+ }
806
+ ],
807
+ "className": "py-12"
808
+ }
358
809
  ]
359
810
  ]
360
811
  },
@@ -372,6 +823,14 @@
372
823
  "failure": "TenantLoadFailed"
373
824
  }
374
825
  }
826
+ ],
827
+ [
828
+ "render-ui",
829
+ "main",
830
+ {
831
+ "size": "sm",
832
+ "type": "spinner"
833
+ }
375
834
  ]
376
835
  ]
377
836
  }