@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-checkin",
3
3
  "version": "1.0.0",
4
- "description": "std-checkin — unified arrival check-in atom. Config picks the verification mode (qr or geo); SCAN persists the captured location/code against a target (work-order, ticket, or appointment) and emits CheckinRecorded for cross-trait listeners.",
4
+ "description": "std-checkin — arrival check-in atom listing recorded check-ins (qr or geo). Lists check-ins in `browsing`; opens detail in `viewing_single` with Verify / Revoke actions.",
5
5
  "orbitals": [
6
6
  {
7
7
  "name": "CheckinOrbital",
@@ -68,64 +68,13 @@
68
68
  "linkedEntity": "Checkin",
69
69
  "emits": [
70
70
  {
71
- "event": "SCAN",
71
+ "event": "OPEN_CHECKIN",
72
72
  "payloadSchema": [
73
73
  {
74
- "name": "qrCode",
75
- "type": "string"
76
- },
77
- {
78
- "name": "lat",
79
- "type": "number"
80
- },
81
- {
82
- "name": "lng",
83
- "type": "number"
84
- },
85
- {
86
- "name": "latitude",
87
- "type": "number"
88
- },
89
- {
90
- "name": "longitude",
91
- "type": "number"
92
- },
93
- {
94
- "name": "result",
95
- "type": "object"
96
- },
97
- {
98
- "name": "data",
99
- "type": "object",
74
+ "name": "id",
75
+ "type": "string",
100
76
  "required": true
101
- }
102
- ]
103
- },
104
- {
105
- "event": "CheckinLoaded",
106
- "payloadSchema": [
107
- {
108
- "name": "data",
109
- "type": "[Checkin]"
110
- }
111
- ]
112
- },
113
- {
114
- "event": "CheckinLoadFailed",
115
- "payloadSchema": [
116
- {
117
- "name": "error",
118
- "type": "string"
119
77
  },
120
- {
121
- "name": "code",
122
- "type": "string"
123
- }
124
- ]
125
- },
126
- {
127
- "event": "CheckinRecorded",
128
- "payloadSchema": [
129
78
  {
130
79
  "name": "row.id",
131
80
  "type": "string",
@@ -172,7 +121,39 @@
172
121
  ]
173
122
  },
174
123
  {
175
- "event": "CheckinFailed",
124
+ "event": "CLOSE_VIEW"
125
+ },
126
+ {
127
+ "event": "VERIFY_CHECKIN",
128
+ "payloadSchema": [
129
+ {
130
+ "name": "id",
131
+ "type": "string",
132
+ "required": true
133
+ }
134
+ ]
135
+ },
136
+ {
137
+ "event": "REVOKE_CHECKIN",
138
+ "payloadSchema": [
139
+ {
140
+ "name": "id",
141
+ "type": "string",
142
+ "required": true
143
+ }
144
+ ]
145
+ },
146
+ {
147
+ "event": "CheckinLoaded",
148
+ "payloadSchema": [
149
+ {
150
+ "name": "data",
151
+ "type": "[Checkin]"
152
+ }
153
+ ]
154
+ },
155
+ {
156
+ "event": "CheckinLoadFailed",
176
157
  "payloadSchema": [
177
158
  {
178
159
  "name": "error",
@@ -192,13 +173,10 @@
192
173
  "isInitial": true
193
174
  },
194
175
  {
195
- "name": "idle"
196
- },
197
- {
198
- "name": "checking-in"
176
+ "name": "browsing"
199
177
  },
200
178
  {
201
- "name": "checked-in"
179
+ "name": "viewing_single"
202
180
  },
203
181
  {
204
182
  "name": "error"
@@ -234,61 +212,43 @@
234
212
  ]
235
213
  },
236
214
  {
237
- "key": "SCAN",
238
- "name": "Scan",
215
+ "key": "OPEN_CHECKIN",
216
+ "name": "Open Checkin",
239
217
  "payloadSchema": [
240
218
  {
241
- "name": "qrCode",
242
- "type": "string"
243
- },
244
- {
245
- "name": "lat",
246
- "type": "number"
247
- },
248
- {
249
- "name": "lng",
250
- "type": "number"
251
- },
252
- {
253
- "name": "latitude",
254
- "type": "number"
255
- },
256
- {
257
- "name": "longitude",
258
- "type": "number"
259
- },
260
- {
261
- "name": "result",
262
- "type": "object"
219
+ "name": "id",
220
+ "type": "string",
221
+ "required": true
263
222
  },
264
223
  {
265
- "name": "data",
266
- "type": "object",
267
- "required": true
224
+ "name": "row",
225
+ "type": "Checkin"
268
226
  }
269
227
  ]
270
228
  },
271
229
  {
272
- "key": "CheckinRecorded",
273
- "name": "Checkin recorded",
230
+ "key": "REVOKE_CHECKIN",
231
+ "name": "Revoke Checkin",
274
232
  "payloadSchema": [
275
233
  {
276
- "name": "row",
277
- "type": "Checkin"
234
+ "name": "id",
235
+ "type": "string",
236
+ "required": true
278
237
  }
279
238
  ]
280
239
  },
281
240
  {
282
- "key": "CheckinFailed",
283
- "name": "Checkin failed",
241
+ "key": "CLOSE_VIEW",
242
+ "name": "Close View"
243
+ },
244
+ {
245
+ "key": "VERIFY_CHECKIN",
246
+ "name": "Verify Checkin",
284
247
  "payloadSchema": [
285
248
  {
286
- "name": "error",
287
- "type": "string"
288
- },
289
- {
290
- "name": "code",
291
- "type": "string"
249
+ "name": "id",
250
+ "type": "string",
251
+ "required": true
292
252
  }
293
253
  ]
294
254
  }
@@ -313,95 +273,136 @@
313
273
  "render-ui",
314
274
  "main",
315
275
  {
316
- "direction": "vertical",
317
- "type": "stack",
318
- "gap": "md",
319
- "align": "center",
320
276
  "className": "py-12",
321
277
  "children": [
322
278
  {
323
279
  "type": "spinner"
324
280
  },
325
281
  {
326
- "color": "muted",
327
282
  "type": "typography",
328
- "content": "Loading check-in…",
283
+ "color": "muted",
284
+ "content": "Loading check-ins…",
329
285
  "variant": "caption"
330
286
  }
331
- ]
287
+ ],
288
+ "align": "center",
289
+ "direction": "vertical",
290
+ "gap": "md",
291
+ "type": "stack"
332
292
  }
333
293
  ]
334
294
  ]
335
295
  },
336
296
  {
337
297
  "from": "loading",
338
- "to": "idle",
298
+ "to": "browsing",
339
299
  "event": "CheckinLoaded",
340
- "guard": [
341
- "=",
342
- "@config.mode",
343
- "qr"
344
- ],
345
300
  "effects": [
346
301
  [
347
302
  "render-ui",
348
303
  "main",
349
304
  {
350
- "gap": "md",
351
305
  "direction": "vertical",
306
+ "type": "stack",
352
307
  "children": [
353
308
  {
354
- "type": "typography",
355
- "content": "@config.title",
356
- "variant": "h3"
309
+ "align": "center",
310
+ "type": "stack",
311
+ "children": [
312
+ {
313
+ "type": "icon",
314
+ "name": "map-pin"
315
+ },
316
+ {
317
+ "variant": "h3",
318
+ "content": "@config.title",
319
+ "type": "typography"
320
+ }
321
+ ],
322
+ "direction": "horizontal",
323
+ "gap": "sm"
357
324
  },
358
325
  {
359
- "onScan": "SCAN",
360
- "facingMode": "environment",
361
- "showCameraControls": true,
362
- "type": "qr-scanner",
363
- "showOverlay": true
364
- }
365
- ],
366
- "type": "stack"
367
- }
368
- ]
369
- ]
370
- },
371
- {
372
- "from": "loading",
373
- "to": "idle",
374
- "event": "CheckinLoaded",
375
- "guard": [
376
- "=",
377
- "@config.mode",
378
- "geo"
379
- ],
380
- "effects": [
381
- [
382
- "render-ui",
383
- "main",
384
- {
385
- "gap": "md",
386
- "type": "stack",
387
- "direction": "vertical",
388
- "children": [
326
+ "cols": 4.0,
327
+ "type": "simple-grid",
328
+ "children": [
329
+ {
330
+ "value": "@payload.data.length",
331
+ "type": "stat-display",
332
+ "label": "Total check-ins",
333
+ "icon": "map-pin"
334
+ },
335
+ {
336
+ "value": "92%",
337
+ "type": "stat-display",
338
+ "label": "Verified",
339
+ "icon": "check-circle"
340
+ },
341
+ {
342
+ "type": "stat-display",
343
+ "label": "Today",
344
+ "value": "47",
345
+ "icon": "calendar"
346
+ },
347
+ {
348
+ "label": "Sites covered",
349
+ "value": "18",
350
+ "icon": "globe",
351
+ "type": "stat-display"
352
+ }
353
+ ]
354
+ },
389
355
  {
390
- "type": "typography",
391
- "variant": "h3",
392
- "content": "@config.title"
356
+ "type": "divider"
393
357
  },
394
358
  {
395
- "zoom": 14.0,
396
- "mapClickEvent": "SCAN",
397
- "centerLat": "@entity.lat",
398
- "height": "320px",
399
- "showClickedPin": true,
400
- "centerLng": "@entity.lng",
401
- "markers": [],
402
- "type": "map-view"
359
+ "gap": "sm",
360
+ "itemActions": [
361
+ {
362
+ "label": "Open",
363
+ "icon": "arrow-right",
364
+ "variant": "primary",
365
+ "event": "OPEN_CHECKIN"
366
+ },
367
+ {
368
+ "event": "REVOKE_CHECKIN",
369
+ "variant": "danger",
370
+ "label": "Revoke"
371
+ }
372
+ ],
373
+ "type": "data-grid",
374
+ "cols": 1.0,
375
+ "fields": [
376
+ {
377
+ "label": "Type",
378
+ "variant": "badge",
379
+ "name": "targetType"
380
+ },
381
+ {
382
+ "variant": "caption",
383
+ "name": "targetId",
384
+ "label": "Target"
385
+ },
386
+ {
387
+ "name": "userId",
388
+ "variant": "caption",
389
+ "label": "User"
390
+ },
391
+ {
392
+ "name": "mode",
393
+ "label": "Mode",
394
+ "variant": "badge"
395
+ },
396
+ {
397
+ "name": "checkedInAt",
398
+ "label": "When",
399
+ "variant": "caption"
400
+ }
401
+ ],
402
+ "entity": "@payload.data"
403
403
  }
404
- ]
404
+ ],
405
+ "gap": "md"
405
406
  }
406
407
  ]
407
408
  ]
@@ -415,108 +416,243 @@
415
416
  "render-ui",
416
417
  "main",
417
418
  {
419
+ "message": "@payload.error",
418
420
  "type": "alert",
419
- "variant": "error",
420
- "message": "@payload.error"
421
+ "variant": "error"
421
422
  }
422
423
  ]
423
424
  ]
424
425
  },
425
426
  {
426
- "from": "idle",
427
- "to": "checking-in",
428
- "event": "SCAN",
429
- "guard": [
430
- "=",
431
- "@config.mode",
432
- "qr"
433
- ],
427
+ "from": "browsing",
428
+ "to": "viewing_single",
429
+ "event": "OPEN_CHECKIN",
434
430
  "effects": [
431
+ [
432
+ "set",
433
+ "@entity.id",
434
+ "@payload.row.id"
435
+ ],
435
436
  [
436
437
  "set",
437
438
  "@entity.mode",
438
- "qr"
439
+ "@payload.row.mode"
440
+ ],
441
+ [
442
+ "set",
443
+ "@entity.targetId",
444
+ "@payload.row.targetId"
445
+ ],
446
+ [
447
+ "set",
448
+ "@entity.targetType",
449
+ "@payload.row.targetType"
450
+ ],
451
+ [
452
+ "set",
453
+ "@entity.userId",
454
+ "@payload.row.userId"
455
+ ],
456
+ [
457
+ "set",
458
+ "@entity.lat",
459
+ "@payload.row.lat"
460
+ ],
461
+ [
462
+ "set",
463
+ "@entity.lng",
464
+ "@payload.row.lng"
465
+ ],
466
+ [
467
+ "set",
468
+ "@entity.qrCode",
469
+ "@payload.row.qrCode"
439
470
  ],
440
471
  [
441
472
  "set",
442
473
  "@entity.verified",
443
- true
474
+ "@payload.row.verified"
444
475
  ],
445
476
  [
446
- "persist",
447
- "create",
448
- "Checkin",
449
- "@payload.data",
450
- {
451
- "emit": {
452
- "success": "CheckinRecorded",
453
- "failure": "CheckinFailed"
454
- }
455
- }
477
+ "set",
478
+ "@entity.checkedInAt",
479
+ "@payload.row.checkedInAt"
456
480
  ],
457
481
  [
458
482
  "render-ui",
459
483
  "main",
460
484
  {
461
- "direction": "vertical",
462
- "align": "center",
463
485
  "gap": "md",
464
486
  "children": [
465
487
  {
466
- "type": "spinner"
488
+ "type": "stack",
489
+ "gap": "sm",
490
+ "align": "center",
491
+ "children": [
492
+ {
493
+ "type": "button",
494
+ "variant": "ghost",
495
+ "action": "CLOSE_VIEW",
496
+ "label": "Back"
497
+ },
498
+ {
499
+ "name": "map-pin",
500
+ "type": "icon"
501
+ },
502
+ {
503
+ "content": "@entity.targetId",
504
+ "variant": "h3",
505
+ "type": "typography"
506
+ },
507
+ {
508
+ "variant": "primary",
509
+ "type": "badge",
510
+ "label": "@entity.mode"
511
+ }
512
+ ],
513
+ "direction": "horizontal"
467
514
  },
468
515
  {
469
- "color": "muted",
470
- "variant": "caption",
471
- "type": "typography",
472
- "content": "Recording check-in…"
516
+ "type": "divider"
517
+ },
518
+ {
519
+ "direction": "vertical",
520
+ "gap": "sm",
521
+ "type": "stack",
522
+ "children": [
523
+ {
524
+ "direction": "horizontal",
525
+ "children": [
526
+ {
527
+ "variant": "caption",
528
+ "type": "typography",
529
+ "content": "Target type",
530
+ "color": "muted"
531
+ },
532
+ {
533
+ "type": "typography",
534
+ "variant": "body",
535
+ "content": "@entity.targetType"
536
+ }
537
+ ],
538
+ "gap": "md",
539
+ "type": "stack"
540
+ },
541
+ {
542
+ "direction": "horizontal",
543
+ "children": [
544
+ {
545
+ "variant": "caption",
546
+ "content": "User",
547
+ "type": "typography",
548
+ "color": "muted"
549
+ },
550
+ {
551
+ "type": "typography",
552
+ "content": "@entity.userId",
553
+ "variant": "body"
554
+ }
555
+ ],
556
+ "type": "stack",
557
+ "gap": "md"
558
+ },
559
+ {
560
+ "children": [
561
+ {
562
+ "color": "muted",
563
+ "type": "typography",
564
+ "variant": "caption",
565
+ "content": "QR code"
566
+ },
567
+ {
568
+ "variant": "body",
569
+ "content": "@entity.qrCode",
570
+ "type": "typography"
571
+ }
572
+ ],
573
+ "type": "stack",
574
+ "direction": "horizontal",
575
+ "gap": "md"
576
+ }
577
+ ]
578
+ },
579
+ {
580
+ "type": "divider"
581
+ },
582
+ {
583
+ "type": "simple-grid",
584
+ "cols": 3.0,
585
+ "children": [
586
+ {
587
+ "label": "Latitude",
588
+ "type": "stat-display",
589
+ "value": "@entity.lat",
590
+ "icon": "map"
591
+ },
592
+ {
593
+ "label": "Longitude",
594
+ "type": "stat-display",
595
+ "icon": "map",
596
+ "value": "@entity.lng"
597
+ },
598
+ {
599
+ "icon": "clock",
600
+ "value": "@entity.checkedInAt",
601
+ "label": "Checked in",
602
+ "type": "stat-display"
603
+ }
604
+ ]
605
+ },
606
+ {
607
+ "gap": "sm",
608
+ "direction": "horizontal",
609
+ "children": [
610
+ {
611
+ "type": "button",
612
+ "label": "Verify",
613
+ "actionPayload": {
614
+ "id": "@entity.id"
615
+ },
616
+ "variant": "primary",
617
+ "action": "VERIFY_CHECKIN"
618
+ },
619
+ {
620
+ "action": "REVOKE_CHECKIN",
621
+ "label": "Revoke",
622
+ "type": "button",
623
+ "variant": "danger",
624
+ "actionPayload": {
625
+ "id": "@entity.id"
626
+ }
627
+ }
628
+ ],
629
+ "align": "center",
630
+ "type": "stack"
473
631
  }
474
632
  ],
475
633
  "type": "stack",
476
- "className": "py-12"
634
+ "direction": "vertical"
477
635
  }
478
636
  ]
479
637
  ]
480
638
  },
481
639
  {
482
- "from": "idle",
483
- "to": "checking-in",
484
- "event": "SCAN",
485
- "guard": [
486
- "=",
487
- "@config.mode",
488
- "geo"
489
- ],
640
+ "from": "browsing",
641
+ "to": "loading",
642
+ "event": "REVOKE_CHECKIN",
490
643
  "effects": [
491
644
  [
492
645
  "set",
493
- "@entity.mode",
494
- "geo"
495
- ],
496
- [
497
- "set",
498
- "@entity.lat",
499
- "@payload.latitude"
500
- ],
501
- [
502
- "set",
503
- "@entity.lng",
504
- "@payload.longitude"
505
- ],
506
- [
507
- "set",
508
- "@entity.verified",
509
- true
646
+ "@entity.id",
647
+ "@payload.id"
510
648
  ],
511
649
  [
512
- "persist",
513
- "create",
650
+ "fetch",
514
651
  "Checkin",
515
- "@payload.data",
516
652
  {
517
653
  "emit": {
518
- "success": "CheckinRecorded",
519
- "failure": "CheckinFailed"
654
+ "failure": "CheckinLoadFailed",
655
+ "success": "CheckinLoaded"
520
656
  }
521
657
  }
522
658
  ],
@@ -529,79 +665,121 @@
529
665
  "type": "spinner"
530
666
  },
531
667
  {
532
- "type": "typography",
533
668
  "variant": "caption",
534
- "content": "Recording check-in…",
669
+ "type": "typography",
670
+ "content": "Revoking check-in…",
535
671
  "color": "muted"
536
672
  }
537
673
  ],
538
- "direction": "vertical",
539
674
  "type": "stack",
540
675
  "className": "py-12",
676
+ "align": "center",
541
677
  "gap": "md",
542
- "align": "center"
678
+ "direction": "vertical"
543
679
  }
544
680
  ]
545
681
  ]
546
682
  },
547
683
  {
548
- "from": "checking-in",
549
- "to": "checked-in",
550
- "event": "CheckinRecorded",
684
+ "from": "viewing_single",
685
+ "to": "loading",
686
+ "event": "CLOSE_VIEW",
551
687
  "effects": [
688
+ [
689
+ "fetch",
690
+ "Checkin",
691
+ {
692
+ "emit": {
693
+ "success": "CheckinLoaded",
694
+ "failure": "CheckinLoadFailed"
695
+ }
696
+ }
697
+ ],
552
698
  [
553
699
  "render-ui",
554
700
  "main",
555
701
  {
556
- "className": "py-12",
557
- "direction": "vertical",
558
- "gap": "md",
559
702
  "align": "center",
703
+ "className": "py-12",
560
704
  "children": [
561
705
  {
562
- "type": "icon",
563
- "color": "success",
564
- "name": "check-circle"
706
+ "type": "spinner"
565
707
  },
566
708
  {
709
+ "color": "muted",
710
+ "variant": "caption",
567
711
  "type": "typography",
568
- "content": "Checked in",
569
- "variant": "h3"
712
+ "content": "Loading check-ins…"
570
713
  }
571
714
  ],
715
+ "gap": "md",
716
+ "direction": "vertical",
572
717
  "type": "stack"
573
718
  }
574
719
  ]
575
720
  ]
576
721
  },
577
722
  {
578
- "from": "checking-in",
579
- "to": "error",
580
- "event": "CheckinFailed",
723
+ "from": "viewing_single",
724
+ "to": "loading",
725
+ "event": "VERIFY_CHECKIN",
581
726
  "effects": [
727
+ [
728
+ "set",
729
+ "@entity.id",
730
+ "@payload.id"
731
+ ],
732
+ [
733
+ "fetch",
734
+ "Checkin",
735
+ {
736
+ "emit": {
737
+ "success": "CheckinLoaded",
738
+ "failure": "CheckinLoadFailed"
739
+ }
740
+ }
741
+ ],
582
742
  [
583
743
  "render-ui",
584
744
  "main",
585
745
  {
586
- "variant": "error",
587
- "type": "alert",
588
- "message": "@payload.error"
746
+ "gap": "md",
747
+ "className": "py-12",
748
+ "children": [
749
+ {
750
+ "type": "spinner"
751
+ },
752
+ {
753
+ "color": "muted",
754
+ "content": "Verifying check-in…",
755
+ "variant": "caption",
756
+ "type": "typography"
757
+ }
758
+ ],
759
+ "align": "center",
760
+ "type": "stack",
761
+ "direction": "vertical"
589
762
  }
590
763
  ]
591
764
  ]
592
765
  },
593
766
  {
594
- "from": "checked-in",
767
+ "from": "viewing_single",
595
768
  "to": "loading",
596
- "event": "INIT",
769
+ "event": "REVOKE_CHECKIN",
597
770
  "effects": [
771
+ [
772
+ "set",
773
+ "@entity.id",
774
+ "@payload.id"
775
+ ],
598
776
  [
599
777
  "fetch",
600
778
  "Checkin",
601
779
  {
602
780
  "emit": {
603
- "success": "CheckinLoaded",
604
- "failure": "CheckinLoadFailed"
781
+ "failure": "CheckinLoadFailed",
782
+ "success": "CheckinLoaded"
605
783
  }
606
784
  }
607
785
  ],
@@ -609,22 +787,22 @@
609
787
  "render-ui",
610
788
  "main",
611
789
  {
612
- "type": "stack",
613
790
  "className": "py-12",
791
+ "direction": "vertical",
792
+ "gap": "md",
793
+ "align": "center",
794
+ "type": "stack",
614
795
  "children": [
615
796
  {
616
797
  "type": "spinner"
617
798
  },
618
799
  {
619
800
  "variant": "caption",
620
- "type": "typography",
621
801
  "color": "muted",
622
- "content": "Loading check-in…"
802
+ "type": "typography",
803
+ "content": "Revoking check-in…"
623
804
  }
624
- ],
625
- "gap": "md",
626
- "align": "center",
627
- "direction": "vertical"
805
+ ]
628
806
  }
629
807
  ]
630
808
  ]
@@ -648,22 +826,8 @@
648
826
  "render-ui",
649
827
  "main",
650
828
  {
651
- "align": "center",
652
- "className": "py-12",
653
- "children": [
654
- {
655
- "type": "spinner"
656
- },
657
- {
658
- "type": "typography",
659
- "content": "Loading check-in…",
660
- "color": "muted",
661
- "variant": "caption"
662
- }
663
- ],
664
- "type": "stack",
665
- "gap": "md",
666
- "direction": "vertical"
829
+ "type": "spinner",
830
+ "size": "sm"
667
831
  }
668
832
  ]
669
833
  ]
@@ -677,16 +841,16 @@
677
841
  },
678
842
  "title": {
679
843
  "type": "string",
680
- "default": "Check in"
844
+ "default": "Check-ins"
681
845
  }
682
846
  },
683
- "scope": "instance"
847
+ "scope": "collection"
684
848
  }
685
849
  ],
686
850
  "pages": [
687
851
  {
688
852
  "name": "CheckinScanPage",
689
- "path": "/checkins/scan",
853
+ "path": "/checkins",
690
854
  "traits": [
691
855
  {
692
856
  "ref": "CheckinScan"