@almadar/std 14.26.0 → 14.28.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 (175) hide show
  1. package/behaviors/registry/app/atoms/std-applicant.orb +496 -42
  2. package/behaviors/registry/app/atoms/std-approval-chain.orb +106 -0
  3. package/behaviors/registry/app/atoms/std-approval-request.orb +433 -593
  4. package/behaviors/registry/app/atoms/std-campaign-goal.orb +438 -228
  5. package/behaviors/registry/app/atoms/std-change-order.orb +565 -307
  6. package/behaviors/registry/app/atoms/std-chart-of-accounts.orb +434 -97
  7. package/behaviors/registry/app/atoms/std-checkin.orb +434 -270
  8. package/behaviors/registry/app/atoms/std-class-roster.orb +495 -61
  9. package/behaviors/registry/app/atoms/std-class-session.orb +485 -104
  10. package/behaviors/registry/app/atoms/std-court-deadline.orb +519 -88
  11. package/behaviors/registry/app/atoms/std-customer-account.orb +577 -97
  12. package/behaviors/registry/app/atoms/std-donation-receipt.orb +498 -55
  13. package/behaviors/registry/app/atoms/std-donor.orb +445 -135
  14. package/behaviors/registry/app/atoms/std-drip-sequence.orb +445 -62
  15. package/behaviors/registry/app/atoms/std-driver.orb +465 -480
  16. package/behaviors/registry/app/atoms/std-dunning.orb +450 -512
  17. package/behaviors/registry/app/atoms/std-email-broadcast.orb +517 -64
  18. package/behaviors/registry/app/atoms/std-event.orb +465 -667
  19. package/behaviors/registry/app/atoms/std-health-score.orb +368 -371
  20. package/behaviors/registry/app/atoms/std-help-article.orb +373 -506
  21. package/behaviors/registry/app/atoms/std-help-category.orb +344 -359
  22. package/behaviors/registry/app/atoms/std-interview-slot.orb +490 -48
  23. package/behaviors/registry/app/atoms/std-invoice.orb +494 -291
  24. package/behaviors/registry/app/atoms/std-kitchen-display.orb +588 -96
  25. package/behaviors/registry/app/atoms/std-lease.orb +506 -190
  26. package/behaviors/registry/app/atoms/std-ledger-entry.orb +483 -154
  27. package/behaviors/registry/app/atoms/std-maintenance-request.orb +642 -192
  28. package/behaviors/registry/app/atoms/std-matter.orb +486 -318
  29. package/behaviors/registry/app/atoms/std-membership.orb +512 -102
  30. package/behaviors/registry/app/atoms/std-menu.orb +775 -183
  31. package/behaviors/registry/app/atoms/std-modifier-group.orb +522 -104
  32. package/behaviors/registry/app/atoms/std-multi-party-transaction.orb +130 -0
  33. package/behaviors/registry/app/atoms/std-nps-survey.orb +319 -327
  34. package/behaviors/registry/app/atoms/std-offer-letter.orb +497 -47
  35. package/behaviors/registry/app/atoms/std-payout-ledger.orb +378 -362
  36. package/behaviors/registry/app/atoms/std-pipeline.orb +139 -0
  37. package/behaviors/registry/app/atoms/std-question-bank.orb +379 -346
  38. package/behaviors/registry/app/atoms/std-receipt.orb +553 -44
  39. package/behaviors/registry/app/atoms/std-recurring-charge.orb +419 -832
  40. package/behaviors/registry/app/atoms/std-recurring-schedule.orb +94 -0
  41. package/behaviors/registry/app/atoms/std-renewal-risk.orb +370 -421
  42. package/behaviors/registry/app/atoms/std-rent-charge.orb +657 -55
  43. package/behaviors/registry/app/atoms/std-reorder-rule.orb +510 -59
  44. package/behaviors/registry/app/atoms/std-response-collector.orb +451 -144
  45. package/behaviors/registry/app/atoms/std-rfi.orb +502 -461
  46. package/behaviors/registry/app/atoms/std-route-optimize.orb +448 -158
  47. package/behaviors/registry/app/atoms/std-segment.orb +360 -98
  48. package/behaviors/registry/app/atoms/std-stock-level.orb +486 -103
  49. package/behaviors/registry/app/atoms/std-submittal.orb +538 -526
  50. package/behaviors/registry/app/atoms/std-table-map.orb +88 -51
  51. package/behaviors/registry/app/atoms/std-technician-dispatch.orb +653 -71
  52. package/behaviors/registry/app/atoms/std-telematics-event.orb +310 -215
  53. package/behaviors/registry/app/atoms/std-template-editor.orb +513 -90
  54. package/behaviors/registry/app/atoms/std-tenant.orb +525 -66
  55. package/behaviors/registry/app/atoms/std-ticket-tier.orb +472 -460
  56. package/behaviors/registry/app/atoms/std-time-entry.orb +354 -317
  57. package/behaviors/registry/app/atoms/std-timeline.orb +108 -0
  58. package/behaviors/registry/app/atoms/std-timesheet.orb +551 -284
  59. package/behaviors/registry/app/atoms/std-trial.orb +410 -317
  60. package/behaviors/registry/app/atoms/std-vehicle.orb +398 -563
  61. package/behaviors/registry/app/atoms/std-waitlist.orb +372 -283
  62. package/behaviors/registry/app/atoms/std-warehouse.orb +273 -214
  63. package/behaviors/registry/app/atoms/std-wizard-branching.orb +129 -0
  64. package/behaviors/registry/app/atoms/std-work-order.orb +628 -240
  65. package/behaviors/registry/app/molecules/std-applicant-form.orb +89 -83
  66. package/behaviors/registry/app/molecules/std-application.orb +178 -263
  67. package/behaviors/registry/app/molecules/std-broadcast-builder.orb +67 -176
  68. package/behaviors/registry/app/molecules/std-cart.orb +78 -72
  69. package/behaviors/registry/app/molecules/std-form-builder.orb +437 -176
  70. package/behaviors/registry/app/molecules/std-ledger-entry-form.orb +608 -89
  71. package/behaviors/registry/app/molecules/std-stock-adjustment.orb +501 -102
  72. package/behaviors/registry/app/molecules/std-vendor-onboarding.orb +383 -469
  73. package/behaviors/registry/core/atoms/std-billable-hour.orb +495 -91
  74. package/behaviors/registry/core/atoms/std-board.orb +1367 -0
  75. package/behaviors/registry/core/atoms/std-branching-logic.orb +271 -600
  76. package/behaviors/registry/core/atoms/std-event-log.orb +777 -0
  77. package/behaviors/registry/core/atoms/std-file-store.orb +534 -164
  78. package/behaviors/registry/core/atoms/std-gallery.orb +118 -101
  79. package/behaviors/registry/core/atoms/std-image-upload-multi.orb +87 -57
  80. package/behaviors/registry/core/atoms/std-multi-party-flow.orb +1313 -0
  81. package/behaviors/registry/core/atoms/std-page-tree.orb +342 -484
  82. package/behaviors/registry/core/atoms/std-recurrence.orb +937 -0
  83. package/behaviors/registry/core/atoms/std-rich-editor.orb +288 -416
  84. package/behaviors/registry/core/atoms/std-step-flow.orb +1155 -0
  85. package/behaviors/registry/core/atoms/std-version-history.orb +454 -430
  86. package/behaviors/registry/core/atoms/std-wizard.orb +1085 -0
  87. package/behaviors/registry/core/molecules/std-wizard-form.orb +222 -147
  88. package/dist/behaviors/registry/app/atoms/std-applicant.orb +496 -42
  89. package/dist/behaviors/registry/app/atoms/std-approval-chain.orb +106 -0
  90. package/dist/behaviors/registry/app/atoms/std-approval-request.orb +433 -593
  91. package/dist/behaviors/registry/app/atoms/std-campaign-goal.orb +438 -228
  92. package/dist/behaviors/registry/app/atoms/std-change-order.orb +565 -307
  93. package/dist/behaviors/registry/app/atoms/std-chart-of-accounts.orb +434 -97
  94. package/dist/behaviors/registry/app/atoms/std-checkin.orb +434 -270
  95. package/dist/behaviors/registry/app/atoms/std-class-roster.orb +495 -61
  96. package/dist/behaviors/registry/app/atoms/std-class-session.orb +485 -104
  97. package/dist/behaviors/registry/app/atoms/std-court-deadline.orb +519 -88
  98. package/dist/behaviors/registry/app/atoms/std-customer-account.orb +577 -97
  99. package/dist/behaviors/registry/app/atoms/std-donation-receipt.orb +498 -55
  100. package/dist/behaviors/registry/app/atoms/std-donor.orb +445 -135
  101. package/dist/behaviors/registry/app/atoms/std-drip-sequence.orb +445 -62
  102. package/dist/behaviors/registry/app/atoms/std-driver.orb +465 -480
  103. package/dist/behaviors/registry/app/atoms/std-dunning.orb +450 -512
  104. package/dist/behaviors/registry/app/atoms/std-email-broadcast.orb +517 -64
  105. package/dist/behaviors/registry/app/atoms/std-event.orb +465 -667
  106. package/dist/behaviors/registry/app/atoms/std-health-score.orb +368 -371
  107. package/dist/behaviors/registry/app/atoms/std-help-article.orb +373 -506
  108. package/dist/behaviors/registry/app/atoms/std-help-category.orb +344 -359
  109. package/dist/behaviors/registry/app/atoms/std-interview-slot.orb +490 -48
  110. package/dist/behaviors/registry/app/atoms/std-invoice.orb +494 -291
  111. package/dist/behaviors/registry/app/atoms/std-kitchen-display.orb +588 -96
  112. package/dist/behaviors/registry/app/atoms/std-lease.orb +506 -190
  113. package/dist/behaviors/registry/app/atoms/std-ledger-entry.orb +483 -154
  114. package/dist/behaviors/registry/app/atoms/std-maintenance-request.orb +642 -192
  115. package/dist/behaviors/registry/app/atoms/std-matter.orb +486 -318
  116. package/dist/behaviors/registry/app/atoms/std-membership.orb +512 -102
  117. package/dist/behaviors/registry/app/atoms/std-menu.orb +775 -183
  118. package/dist/behaviors/registry/app/atoms/std-modifier-group.orb +522 -104
  119. package/dist/behaviors/registry/app/atoms/std-multi-party-transaction.orb +130 -0
  120. package/dist/behaviors/registry/app/atoms/std-nps-survey.orb +319 -327
  121. package/dist/behaviors/registry/app/atoms/std-offer-letter.orb +497 -47
  122. package/dist/behaviors/registry/app/atoms/std-payout-ledger.orb +378 -362
  123. package/dist/behaviors/registry/app/atoms/std-pipeline.orb +139 -0
  124. package/dist/behaviors/registry/app/atoms/std-question-bank.orb +379 -346
  125. package/dist/behaviors/registry/app/atoms/std-receipt.orb +553 -44
  126. package/dist/behaviors/registry/app/atoms/std-recurring-charge.orb +419 -832
  127. package/dist/behaviors/registry/app/atoms/std-recurring-schedule.orb +94 -0
  128. package/dist/behaviors/registry/app/atoms/std-renewal-risk.orb +370 -421
  129. package/dist/behaviors/registry/app/atoms/std-rent-charge.orb +657 -55
  130. package/dist/behaviors/registry/app/atoms/std-reorder-rule.orb +510 -59
  131. package/dist/behaviors/registry/app/atoms/std-response-collector.orb +451 -144
  132. package/dist/behaviors/registry/app/atoms/std-rfi.orb +502 -461
  133. package/dist/behaviors/registry/app/atoms/std-route-optimize.orb +448 -158
  134. package/dist/behaviors/registry/app/atoms/std-segment.orb +360 -98
  135. package/dist/behaviors/registry/app/atoms/std-stock-level.orb +486 -103
  136. package/dist/behaviors/registry/app/atoms/std-submittal.orb +538 -526
  137. package/dist/behaviors/registry/app/atoms/std-table-map.orb +88 -51
  138. package/dist/behaviors/registry/app/atoms/std-technician-dispatch.orb +653 -71
  139. package/dist/behaviors/registry/app/atoms/std-telematics-event.orb +310 -215
  140. package/dist/behaviors/registry/app/atoms/std-template-editor.orb +513 -90
  141. package/dist/behaviors/registry/app/atoms/std-tenant.orb +525 -66
  142. package/dist/behaviors/registry/app/atoms/std-ticket-tier.orb +472 -460
  143. package/dist/behaviors/registry/app/atoms/std-time-entry.orb +354 -317
  144. package/dist/behaviors/registry/app/atoms/std-timeline.orb +108 -0
  145. package/dist/behaviors/registry/app/atoms/std-timesheet.orb +551 -284
  146. package/dist/behaviors/registry/app/atoms/std-trial.orb +410 -317
  147. package/dist/behaviors/registry/app/atoms/std-vehicle.orb +398 -563
  148. package/dist/behaviors/registry/app/atoms/std-waitlist.orb +372 -283
  149. package/dist/behaviors/registry/app/atoms/std-warehouse.orb +273 -214
  150. package/dist/behaviors/registry/app/atoms/std-wizard-branching.orb +129 -0
  151. package/dist/behaviors/registry/app/atoms/std-work-order.orb +628 -240
  152. package/dist/behaviors/registry/app/molecules/std-applicant-form.orb +89 -83
  153. package/dist/behaviors/registry/app/molecules/std-application.orb +178 -263
  154. package/dist/behaviors/registry/app/molecules/std-broadcast-builder.orb +67 -176
  155. package/dist/behaviors/registry/app/molecules/std-cart.orb +78 -72
  156. package/dist/behaviors/registry/app/molecules/std-form-builder.orb +437 -176
  157. package/dist/behaviors/registry/app/molecules/std-ledger-entry-form.orb +608 -89
  158. package/dist/behaviors/registry/app/molecules/std-stock-adjustment.orb +501 -102
  159. package/dist/behaviors/registry/app/molecules/std-vendor-onboarding.orb +383 -469
  160. package/dist/behaviors/registry/core/atoms/std-billable-hour.orb +495 -91
  161. package/dist/behaviors/registry/core/atoms/std-board.orb +1367 -0
  162. package/dist/behaviors/registry/core/atoms/std-branching-logic.orb +271 -600
  163. package/dist/behaviors/registry/core/atoms/std-event-log.orb +777 -0
  164. package/dist/behaviors/registry/core/atoms/std-file-store.orb +534 -164
  165. package/dist/behaviors/registry/core/atoms/std-gallery.orb +118 -101
  166. package/dist/behaviors/registry/core/atoms/std-image-upload-multi.orb +87 -57
  167. package/dist/behaviors/registry/core/atoms/std-multi-party-flow.orb +1313 -0
  168. package/dist/behaviors/registry/core/atoms/std-page-tree.orb +342 -484
  169. package/dist/behaviors/registry/core/atoms/std-recurrence.orb +937 -0
  170. package/dist/behaviors/registry/core/atoms/std-rich-editor.orb +288 -416
  171. package/dist/behaviors/registry/core/atoms/std-step-flow.orb +1155 -0
  172. package/dist/behaviors/registry/core/atoms/std-version-history.orb +454 -430
  173. package/dist/behaviors/registry/core/atoms/std-wizard.orb +1085 -0
  174. package/dist/behaviors/registry/core/molecules/std-wizard-form.orb +222 -147
  175. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "std-membership",
3
3
  "version": "1.0.0",
4
- "description": "std-membership — recurring gym/fitness/club membership with tier, renewal, freeze, and member-self-managed cancel. Distinct from std-recurring-charge (Stripe SaaS) memberships support tier upgrades, freezes, and self-managed cancellation.",
4
+ "description": "std-membership — recurring gym/fitness/club membership with tier, renewal, freeze, and self-managed cancel. Lists memberships in `browsing`; opens membership detail in `viewing_single` with Upgrade / Freeze / Cancel actions.",
5
5
  "orbitals": [
6
6
  {
7
7
  "name": "MembershipOrbital",
@@ -80,6 +80,62 @@
80
80
  "category": "interaction",
81
81
  "linkedEntity": "Membership",
82
82
  "emits": [
83
+ {
84
+ "event": "OPEN_MEMBERSHIP",
85
+ "payloadSchema": [
86
+ {
87
+ "name": "id",
88
+ "type": "string",
89
+ "required": true
90
+ },
91
+ {
92
+ "name": "row.id",
93
+ "type": "string",
94
+ "required": true
95
+ },
96
+ {
97
+ "name": "row.memberId",
98
+ "type": "string",
99
+ "required": true
100
+ },
101
+ {
102
+ "name": "row.memberName",
103
+ "type": "string"
104
+ },
105
+ {
106
+ "name": "row.tier",
107
+ "type": "string"
108
+ },
109
+ {
110
+ "name": "row.monthlyDues",
111
+ "type": "number"
112
+ },
113
+ {
114
+ "name": "row.startDate",
115
+ "type": "string",
116
+ "required": true
117
+ },
118
+ {
119
+ "name": "row.renewalDate",
120
+ "type": "string"
121
+ },
122
+ {
123
+ "name": "row.status",
124
+ "type": "string"
125
+ },
126
+ {
127
+ "name": "row.accessLevel",
128
+ "type": "string"
129
+ },
130
+ {
131
+ "name": "row.notes",
132
+ "type": "string"
133
+ }
134
+ ]
135
+ },
136
+ {
137
+ "event": "CLOSE_MEMBERSHIP"
138
+ },
83
139
  {
84
140
  "event": "UPGRADE_TIER",
85
141
  "payloadSchema": [
@@ -142,6 +198,9 @@
142
198
  {
143
199
  "name": "browsing"
144
200
  },
201
+ {
202
+ "name": "viewing_single"
203
+ },
145
204
  {
146
205
  "name": "error"
147
206
  }
@@ -176,19 +235,23 @@
176
235
  ]
177
236
  },
178
237
  {
179
- "key": "UPGRADE_TIER",
180
- "name": "Upgrade Tier",
238
+ "key": "OPEN_MEMBERSHIP",
239
+ "name": "Open Membership",
181
240
  "payloadSchema": [
182
241
  {
183
242
  "name": "id",
184
243
  "type": "string",
185
244
  "required": true
245
+ },
246
+ {
247
+ "name": "row",
248
+ "type": "Membership"
186
249
  }
187
250
  ]
188
251
  },
189
252
  {
190
- "key": "FREEZE_MEMBERSHIP",
191
- "name": "Freeze Membership",
253
+ "key": "CANCEL_MEMBERSHIP",
254
+ "name": "Cancel Membership",
192
255
  "payloadSchema": [
193
256
  {
194
257
  "name": "id",
@@ -198,8 +261,23 @@
198
261
  ]
199
262
  },
200
263
  {
201
- "key": "CANCEL_MEMBERSHIP",
202
- "name": "Cancel Membership",
264
+ "key": "CLOSE_MEMBERSHIP",
265
+ "name": "Close Membership"
266
+ },
267
+ {
268
+ "key": "UPGRADE_TIER",
269
+ "name": "Upgrade Tier",
270
+ "payloadSchema": [
271
+ {
272
+ "name": "id",
273
+ "type": "string",
274
+ "required": true
275
+ }
276
+ ]
277
+ },
278
+ {
279
+ "key": "FREEZE_MEMBERSHIP",
280
+ "name": "Freeze Membership",
203
281
  "payloadSchema": [
204
282
  {
205
283
  "name": "id",
@@ -229,20 +307,20 @@
229
307
  "render-ui",
230
308
  "main",
231
309
  {
310
+ "direction": "vertical",
232
311
  "type": "stack",
233
- "className": "py-12",
234
312
  "align": "center",
235
- "direction": "vertical",
313
+ "className": "py-12",
236
314
  "gap": "md",
237
315
  "children": [
238
316
  {
239
317
  "type": "spinner"
240
318
  },
241
319
  {
242
- "variant": "caption",
243
320
  "content": "Loading memberships…",
244
- "color": "muted",
245
- "type": "typography"
321
+ "type": "typography",
322
+ "variant": "caption",
323
+ "color": "muted"
246
324
  }
247
325
  ]
248
326
  }
@@ -258,84 +336,62 @@
258
336
  "render-ui",
259
337
  "main",
260
338
  {
339
+ "direction": "vertical",
340
+ "gap": "md",
261
341
  "type": "stack",
262
342
  "children": [
263
343
  {
344
+ "align": "center",
345
+ "type": "stack",
346
+ "gap": "sm",
347
+ "direction": "horizontal",
264
348
  "children": [
265
349
  {
266
- "type": "icon",
267
- "name": "id-card"
350
+ "name": "credit-card",
351
+ "type": "icon"
268
352
  },
269
353
  {
354
+ "type": "typography",
270
355
  "content": "@config.title",
271
- "type": "heading",
272
- "level": 2.0
273
- },
274
- {
275
- "type": "status-effect",
276
- "variant": "buff",
277
- "icon": "shield",
278
- "label": "Member tier"
356
+ "variant": "h3"
279
357
  }
280
- ],
281
- "type": "stack",
282
- "direction": "horizontal",
283
- "gap": "sm",
284
- "align": "center"
285
- },
286
- {
287
- "speed": 40.0,
288
- "text": "Welcome back, member.",
289
- "type": "typewriter-text"
358
+ ]
290
359
  },
291
360
  {
292
- "items": [
361
+ "children": [
293
362
  {
294
- "id": "active",
295
- "label": "Active"
363
+ "label": "Total memberships",
364
+ "value": "@payload.data.length",
365
+ "icon": "credit-card",
366
+ "type": "stat-display"
296
367
  },
297
368
  {
298
- "id": "frozen",
299
- "label": "Paused"
369
+ "icon": "check-circle",
370
+ "type": "stat-display",
371
+ "label": "Active",
372
+ "value": "112"
300
373
  },
301
374
  {
302
- "id": "cancelled",
303
- "label": "Cancelled"
304
- }
305
- ],
306
- "type": "tabs",
307
- "activeTab": "active"
308
- },
309
- {
310
- "children": [
311
- {
312
- "suffix": " members",
313
- "type": "animated-counter",
314
- "value": 128.0,
315
- "duration": 1200.0
375
+ "type": "stat-display",
376
+ "label": "Frozen",
377
+ "value": "8",
378
+ "icon": "pause-circle"
316
379
  },
317
380
  {
318
- "current": 720.0,
319
- "max": 1000.0,
320
- "level": 7.0,
321
- "showLabel": true,
322
- "type": "xp-bar"
381
+ "value": "$14,820",
382
+ "label": "MRR",
383
+ "icon": "dollar-sign",
384
+ "type": "stat-display"
323
385
  }
324
386
  ],
325
- "direction": "horizontal",
326
- "type": "stack",
327
- "gap": "md"
328
- },
329
- {
330
- "description": "Guest passes, towel service, locker reserve",
331
- "title": "Premium Perks",
332
- "icon": "star",
333
- "type": "feature-card"
387
+ "type": "simple-grid",
388
+ "cols": 4.0
334
389
  },
335
390
  {
336
391
  "type": "divider"
337
392
  },
338
393
  {
394
+ "gap": "sm",
339
395
  "fields": [
340
396
  {
341
397
  "label": "Member",
@@ -343,13 +399,13 @@
343
399
  "variant": "caption"
344
400
  },
345
401
  {
346
- "variant": "badge",
402
+ "label": "Tier",
347
403
  "name": "tier",
348
- "label": "Tier"
404
+ "variant": "badge"
349
405
  },
350
406
  {
351
- "label": "Monthly Dues",
352
407
  "name": "monthlyDues",
408
+ "label": "Monthly Dues",
353
409
  "variant": "caption"
354
410
  },
355
411
  {
@@ -363,31 +419,24 @@
363
419
  "variant": "badge"
364
420
  }
365
421
  ],
422
+ "type": "data-grid",
423
+ "entity": "@payload.data",
424
+ "cols": 1.0,
366
425
  "itemActions": [
367
426
  {
368
- "event": "UPGRADE_TIER",
369
- "label": "Upgrade",
370
- "variant": "primary"
371
- },
372
- {
373
- "event": "FREEZE_MEMBERSHIP",
374
- "label": "Freeze",
375
- "variant": "ghost"
427
+ "event": "OPEN_MEMBERSHIP",
428
+ "label": "Open",
429
+ "variant": "primary",
430
+ "icon": "arrow-right"
376
431
  },
377
432
  {
433
+ "variant": "danger",
378
434
  "label": "Cancel",
379
- "event": "CANCEL_MEMBERSHIP",
380
- "variant": "danger"
435
+ "event": "CANCEL_MEMBERSHIP"
381
436
  }
382
- ],
383
- "entity": "@payload.data",
384
- "type": "data-grid",
385
- "cols": 1.0,
386
- "gap": "sm"
437
+ ]
387
438
  }
388
- ],
389
- "gap": "md",
390
- "direction": "vertical"
439
+ ]
391
440
  }
392
441
  ]
393
442
  ]
@@ -401,16 +450,308 @@
401
450
  "render-ui",
402
451
  "main",
403
452
  {
404
- "message": "@payload.error",
405
453
  "variant": "error",
406
- "type": "alert"
454
+ "type": "alert",
455
+ "message": "@payload.error"
407
456
  }
408
457
  ]
409
458
  ]
410
459
  },
411
460
  {
412
461
  "from": "browsing",
413
- "to": "browsing",
462
+ "to": "viewing_single",
463
+ "event": "OPEN_MEMBERSHIP",
464
+ "effects": [
465
+ [
466
+ "set",
467
+ "@entity.id",
468
+ "@payload.row.id"
469
+ ],
470
+ [
471
+ "set",
472
+ "@entity.memberId",
473
+ "@payload.row.memberId"
474
+ ],
475
+ [
476
+ "set",
477
+ "@entity.memberName",
478
+ "@payload.row.memberName"
479
+ ],
480
+ [
481
+ "set",
482
+ "@entity.tier",
483
+ "@payload.row.tier"
484
+ ],
485
+ [
486
+ "set",
487
+ "@entity.monthlyDues",
488
+ "@payload.row.monthlyDues"
489
+ ],
490
+ [
491
+ "set",
492
+ "@entity.startDate",
493
+ "@payload.row.startDate"
494
+ ],
495
+ [
496
+ "set",
497
+ "@entity.renewalDate",
498
+ "@payload.row.renewalDate"
499
+ ],
500
+ [
501
+ "set",
502
+ "@entity.status",
503
+ "@payload.row.status"
504
+ ],
505
+ [
506
+ "set",
507
+ "@entity.accessLevel",
508
+ "@payload.row.accessLevel"
509
+ ],
510
+ [
511
+ "set",
512
+ "@entity.notes",
513
+ "@payload.row.notes"
514
+ ],
515
+ [
516
+ "render-ui",
517
+ "main",
518
+ {
519
+ "type": "stack",
520
+ "direction": "vertical",
521
+ "children": [
522
+ {
523
+ "children": [
524
+ {
525
+ "label": "Back",
526
+ "type": "button",
527
+ "variant": "ghost",
528
+ "action": "CLOSE_MEMBERSHIP"
529
+ },
530
+ {
531
+ "type": "icon",
532
+ "name": "credit-card"
533
+ },
534
+ {
535
+ "variant": "h3",
536
+ "type": "typography",
537
+ "content": "@entity.memberName"
538
+ },
539
+ {
540
+ "type": "badge",
541
+ "variant": "primary",
542
+ "label": "@entity.tier"
543
+ },
544
+ {
545
+ "label": "@entity.status",
546
+ "variant": "default",
547
+ "type": "badge"
548
+ }
549
+ ],
550
+ "align": "center",
551
+ "type": "stack",
552
+ "direction": "horizontal",
553
+ "gap": "sm"
554
+ },
555
+ {
556
+ "type": "divider"
557
+ },
558
+ {
559
+ "direction": "vertical",
560
+ "gap": "sm",
561
+ "children": [
562
+ {
563
+ "type": "stack",
564
+ "direction": "horizontal",
565
+ "children": [
566
+ {
567
+ "type": "typography",
568
+ "content": "Access level",
569
+ "color": "muted",
570
+ "variant": "caption"
571
+ },
572
+ {
573
+ "variant": "body",
574
+ "content": "@entity.accessLevel",
575
+ "type": "typography"
576
+ }
577
+ ],
578
+ "gap": "md"
579
+ },
580
+ {
581
+ "type": "stack",
582
+ "direction": "horizontal",
583
+ "gap": "md",
584
+ "children": [
585
+ {
586
+ "content": "Notes",
587
+ "variant": "caption",
588
+ "color": "muted",
589
+ "type": "typography"
590
+ },
591
+ {
592
+ "variant": "body",
593
+ "content": "@entity.notes",
594
+ "type": "typography"
595
+ }
596
+ ]
597
+ }
598
+ ],
599
+ "type": "stack"
600
+ },
601
+ {
602
+ "type": "divider"
603
+ },
604
+ {
605
+ "children": [
606
+ {
607
+ "label": "Monthly dues",
608
+ "type": "stat-display",
609
+ "value": "@entity.monthlyDues",
610
+ "icon": "dollar-sign"
611
+ },
612
+ {
613
+ "label": "Started",
614
+ "value": "@entity.startDate",
615
+ "type": "stat-display",
616
+ "icon": "calendar"
617
+ },
618
+ {
619
+ "icon": "refresh-cw",
620
+ "type": "stat-display",
621
+ "value": "@entity.renewalDate",
622
+ "label": "Renews"
623
+ }
624
+ ],
625
+ "type": "simple-grid",
626
+ "cols": 3.0
627
+ },
628
+ {
629
+ "gap": "sm",
630
+ "children": [
631
+ {
632
+ "action": "UPGRADE_TIER",
633
+ "type": "button",
634
+ "variant": "primary",
635
+ "actionPayload": {
636
+ "id": "@entity.id"
637
+ },
638
+ "label": "Upgrade Tier"
639
+ },
640
+ {
641
+ "type": "button",
642
+ "actionPayload": {
643
+ "id": "@entity.id"
644
+ },
645
+ "variant": "secondary",
646
+ "action": "FREEZE_MEMBERSHIP",
647
+ "label": "Freeze"
648
+ },
649
+ {
650
+ "variant": "danger",
651
+ "actionPayload": {
652
+ "id": "@entity.id"
653
+ },
654
+ "label": "Cancel",
655
+ "action": "CANCEL_MEMBERSHIP",
656
+ "type": "button"
657
+ }
658
+ ],
659
+ "align": "center",
660
+ "type": "stack",
661
+ "direction": "horizontal"
662
+ }
663
+ ],
664
+ "gap": "md"
665
+ }
666
+ ]
667
+ ]
668
+ },
669
+ {
670
+ "from": "browsing",
671
+ "to": "loading",
672
+ "event": "CANCEL_MEMBERSHIP",
673
+ "effects": [
674
+ [
675
+ "set",
676
+ "@entity.id",
677
+ "@payload.id"
678
+ ],
679
+ [
680
+ "fetch",
681
+ "Membership",
682
+ {
683
+ "emit": {
684
+ "success": "MembershipLoaded",
685
+ "failure": "MembershipLoadFailed"
686
+ }
687
+ }
688
+ ],
689
+ [
690
+ "render-ui",
691
+ "main",
692
+ {
693
+ "align": "center",
694
+ "type": "stack",
695
+ "gap": "md",
696
+ "className": "py-12",
697
+ "direction": "vertical",
698
+ "children": [
699
+ {
700
+ "type": "spinner"
701
+ },
702
+ {
703
+ "color": "muted",
704
+ "variant": "caption",
705
+ "type": "typography",
706
+ "content": "Cancelling membership…"
707
+ }
708
+ ]
709
+ }
710
+ ]
711
+ ]
712
+ },
713
+ {
714
+ "from": "viewing_single",
715
+ "to": "loading",
716
+ "event": "CLOSE_MEMBERSHIP",
717
+ "effects": [
718
+ [
719
+ "fetch",
720
+ "Membership",
721
+ {
722
+ "emit": {
723
+ "failure": "MembershipLoadFailed",
724
+ "success": "MembershipLoaded"
725
+ }
726
+ }
727
+ ],
728
+ [
729
+ "render-ui",
730
+ "main",
731
+ {
732
+ "className": "py-12",
733
+ "type": "stack",
734
+ "direction": "vertical",
735
+ "children": [
736
+ {
737
+ "type": "spinner"
738
+ },
739
+ {
740
+ "content": "Loading memberships…",
741
+ "type": "typography",
742
+ "variant": "caption",
743
+ "color": "muted"
744
+ }
745
+ ],
746
+ "gap": "md",
747
+ "align": "center"
748
+ }
749
+ ]
750
+ ]
751
+ },
752
+ {
753
+ "from": "viewing_single",
754
+ "to": "loading",
414
755
  "event": "UPGRADE_TIER",
415
756
  "effects": [
416
757
  [
@@ -418,20 +759,43 @@
418
759
  "@entity.id",
419
760
  "@payload.id"
420
761
  ],
762
+ [
763
+ "fetch",
764
+ "Membership",
765
+ {
766
+ "emit": {
767
+ "failure": "MembershipLoadFailed",
768
+ "success": "MembershipLoaded"
769
+ }
770
+ }
771
+ ],
421
772
  [
422
773
  "render-ui",
423
774
  "main",
424
775
  {
425
- "variant": "success",
426
- "message": "Tier upgraded",
427
- "type": "alert"
776
+ "direction": "vertical",
777
+ "type": "stack",
778
+ "align": "center",
779
+ "gap": "md",
780
+ "className": "py-12",
781
+ "children": [
782
+ {
783
+ "type": "spinner"
784
+ },
785
+ {
786
+ "content": "Upgrading tier…",
787
+ "color": "muted",
788
+ "variant": "caption",
789
+ "type": "typography"
790
+ }
791
+ ]
428
792
  }
429
793
  ]
430
794
  ]
431
795
  },
432
796
  {
433
- "from": "browsing",
434
- "to": "browsing",
797
+ "from": "viewing_single",
798
+ "to": "loading",
435
799
  "event": "FREEZE_MEMBERSHIP",
436
800
  "effects": [
437
801
  [
@@ -439,20 +803,43 @@
439
803
  "@entity.id",
440
804
  "@payload.id"
441
805
  ],
806
+ [
807
+ "fetch",
808
+ "Membership",
809
+ {
810
+ "emit": {
811
+ "failure": "MembershipLoadFailed",
812
+ "success": "MembershipLoaded"
813
+ }
814
+ }
815
+ ],
442
816
  [
443
817
  "render-ui",
444
818
  "main",
445
819
  {
446
- "variant": "info",
447
- "type": "alert",
448
- "message": "Membership frozen"
820
+ "type": "stack",
821
+ "className": "py-12",
822
+ "children": [
823
+ {
824
+ "type": "spinner"
825
+ },
826
+ {
827
+ "variant": "caption",
828
+ "color": "muted",
829
+ "content": "Freezing membership…",
830
+ "type": "typography"
831
+ }
832
+ ],
833
+ "direction": "vertical",
834
+ "gap": "md",
835
+ "align": "center"
449
836
  }
450
837
  ]
451
838
  ]
452
839
  },
453
840
  {
454
- "from": "browsing",
455
- "to": "browsing",
841
+ "from": "viewing_single",
842
+ "to": "loading",
456
843
  "event": "CANCEL_MEMBERSHIP",
457
844
  "effects": [
458
845
  [
@@ -460,13 +847,36 @@
460
847
  "@entity.id",
461
848
  "@payload.id"
462
849
  ],
850
+ [
851
+ "fetch",
852
+ "Membership",
853
+ {
854
+ "emit": {
855
+ "failure": "MembershipLoadFailed",
856
+ "success": "MembershipLoaded"
857
+ }
858
+ }
859
+ ],
463
860
  [
464
861
  "render-ui",
465
862
  "main",
466
863
  {
467
- "type": "alert",
468
- "variant": "info",
469
- "message": "Membership cancelled"
864
+ "align": "center",
865
+ "children": [
866
+ {
867
+ "type": "spinner"
868
+ },
869
+ {
870
+ "variant": "caption",
871
+ "color": "muted",
872
+ "content": "Cancelling membership…",
873
+ "type": "typography"
874
+ }
875
+ ],
876
+ "type": "stack",
877
+ "gap": "md",
878
+ "direction": "vertical",
879
+ "className": "py-12"
470
880
  }
471
881
  ]
472
882
  ]