@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-ledger-entry",
3
3
  "version": "1.0.0",
4
- "description": "std-ledger-entry — general-ledger journal entry atom. Owns a LedgerEntry entity (double-entry debit/credit) and a single trait that loads journal entries into a data-grid with reconcile and reverse row actions.",
4
+ "description": "std-ledger-entry — general-ledger journal entry (double-entry debit/credit). Lists entries in `browsing`; opens entry detail in `viewing_single` with Reconcile / Reverse actions.",
5
5
  "orbitals": [
6
6
  {
7
7
  "name": "LedgerEntryOrbital",
@@ -75,6 +75,62 @@
75
75
  "category": "interaction",
76
76
  "linkedEntity": "LedgerEntry",
77
77
  "emits": [
78
+ {
79
+ "event": "OPEN_ENTRY",
80
+ "payloadSchema": [
81
+ {
82
+ "name": "id",
83
+ "type": "string",
84
+ "required": true
85
+ },
86
+ {
87
+ "name": "row.id",
88
+ "type": "string",
89
+ "required": true
90
+ },
91
+ {
92
+ "name": "row.accountId",
93
+ "type": "string",
94
+ "required": true
95
+ },
96
+ {
97
+ "name": "row.accountName",
98
+ "type": "string"
99
+ },
100
+ {
101
+ "name": "row.entryDate",
102
+ "type": "string",
103
+ "required": true
104
+ },
105
+ {
106
+ "name": "row.description",
107
+ "type": "string"
108
+ },
109
+ {
110
+ "name": "row.debit",
111
+ "type": "number"
112
+ },
113
+ {
114
+ "name": "row.credit",
115
+ "type": "number"
116
+ },
117
+ {
118
+ "name": "row.referenceType",
119
+ "type": "string"
120
+ },
121
+ {
122
+ "name": "row.referenceId",
123
+ "type": "string"
124
+ },
125
+ {
126
+ "name": "row.isReconciled",
127
+ "type": "boolean"
128
+ }
129
+ ]
130
+ },
131
+ {
132
+ "event": "CLOSE_VIEW"
133
+ },
78
134
  {
79
135
  "event": "RECONCILE_ENTRY",
80
136
  "payloadSchema": [
@@ -127,6 +183,9 @@
127
183
  {
128
184
  "name": "browsing"
129
185
  },
186
+ {
187
+ "name": "viewing_single"
188
+ },
130
189
  {
131
190
  "name": "error"
132
191
  }
@@ -161,13 +220,17 @@
161
220
  ]
162
221
  },
163
222
  {
164
- "key": "RECONCILE_ENTRY",
165
- "name": "Reconcile Entry",
223
+ "key": "OPEN_ENTRY",
224
+ "name": "Open Entry",
166
225
  "payloadSchema": [
167
226
  {
168
227
  "name": "id",
169
228
  "type": "string",
170
229
  "required": true
230
+ },
231
+ {
232
+ "name": "row",
233
+ "type": "LedgerEntry"
171
234
  }
172
235
  ]
173
236
  },
@@ -181,6 +244,21 @@
181
244
  "required": true
182
245
  }
183
246
  ]
247
+ },
248
+ {
249
+ "key": "CLOSE_VIEW",
250
+ "name": "Close View"
251
+ },
252
+ {
253
+ "key": "RECONCILE_ENTRY",
254
+ "name": "Reconcile Entry",
255
+ "payloadSchema": [
256
+ {
257
+ "name": "id",
258
+ "type": "string",
259
+ "required": true
260
+ }
261
+ ]
184
262
  }
185
263
  ],
186
264
  "transitions": [
@@ -194,8 +272,8 @@
194
272
  "LedgerEntry",
195
273
  {
196
274
  "emit": {
197
- "failure": "LedgerEntryLoadFailed",
198
- "success": "LedgerEntryLoaded"
275
+ "success": "LedgerEntryLoaded",
276
+ "failure": "LedgerEntryLoadFailed"
199
277
  }
200
278
  }
201
279
  ],
@@ -203,21 +281,21 @@
203
281
  "render-ui",
204
282
  "main",
205
283
  {
284
+ "gap": "md",
206
285
  "direction": "vertical",
207
- "align": "center",
208
286
  "children": [
209
287
  {
210
288
  "type": "spinner"
211
289
  },
212
290
  {
213
291
  "color": "muted",
214
- "type": "typography",
215
292
  "content": "Loading journal entries…",
216
- "variant": "caption"
293
+ "variant": "caption",
294
+ "type": "typography"
217
295
  }
218
296
  ],
297
+ "align": "center",
219
298
  "type": "stack",
220
- "gap": "md",
221
299
  "className": "py-12"
222
300
  }
223
301
  ]
@@ -232,229 +310,426 @@
232
310
  "render-ui",
233
311
  "main",
234
312
  {
235
- "direction": "vertical",
236
- "gap": "md",
237
313
  "type": "stack",
314
+ "gap": "md",
238
315
  "children": [
239
316
  {
317
+ "align": "center",
318
+ "type": "stack",
319
+ "direction": "horizontal",
320
+ "gap": "sm",
240
321
  "children": [
241
322
  {
242
323
  "name": "book-open",
243
324
  "type": "icon"
244
325
  },
245
326
  {
327
+ "content": "@config.title",
246
328
  "variant": "h3",
247
- "type": "typography",
248
- "content": "@config.title"
249
- },
250
- {
251
- "position": "right",
252
- "content": "Running ledger balance computed from posted debits minus credits.",
253
- "children": [
254
- {
255
- "name": "info",
256
- "type": "icon"
257
- }
258
- ],
259
- "type": "tooltip"
329
+ "type": "typography"
260
330
  }
261
- ],
262
- "type": "stack",
263
- "direction": "horizontal",
264
- "gap": "sm"
331
+ ]
265
332
  },
266
333
  {
267
- "activeTab": "journal",
268
- "items": [
334
+ "cols": 4.0,
335
+ "children": [
269
336
  {
270
- "id": "journal",
271
- "label": "Journal"
337
+ "value": "@payload.data.length",
338
+ "type": "stat-display",
339
+ "icon": "book-open",
340
+ "label": "Entries"
272
341
  },
273
342
  {
274
- "label": "Ledger",
275
- "id": "ledger"
343
+ "icon": "dollar-sign",
344
+ "type": "stat-display",
345
+ "value": "$12,480",
346
+ "label": "Net balance"
276
347
  },
277
348
  {
278
- "label": "Reports",
279
- "id": "reports"
349
+ "icon": "check-circle",
350
+ "type": "stat-display",
351
+ "label": "Reconciled",
352
+ "value": "84%"
353
+ },
354
+ {
355
+ "type": "stat-display",
356
+ "label": "Pending",
357
+ "value": "23",
358
+ "icon": "clock"
280
359
  }
281
360
  ],
282
- "type": "tabs"
361
+ "type": "simple-grid"
283
362
  },
284
363
  {
285
- "direction": "horizontal",
286
- "type": "stack",
287
- "children": [
288
- {
289
- "animated": true,
290
- "value": 12480.0,
291
- "type": "score-display",
292
- "label": "Net Balance",
293
- "size": "lg"
294
- },
364
+ "type": "divider"
365
+ },
366
+ {
367
+ "entity": "@payload.data",
368
+ "cols": 1.0,
369
+ "type": "data-grid",
370
+ "gap": "sm",
371
+ "itemActions": [
295
372
  {
296
- "cols": 8.0,
297
- "spacing": 24.0,
298
- "x": 0.0,
299
- "y": 0.0,
300
- "rows": 4.0,
301
- "nodeRadius": 2.0,
302
- "color": "muted",
303
- "opacity": 0.35,
304
- "type": "svg-grid"
373
+ "event": "OPEN_ENTRY",
374
+ "label": "Open",
375
+ "variant": "primary",
376
+ "icon": "arrow-right"
305
377
  },
306
378
  {
307
- "points": [
308
- [
309
- 10.0,
310
- 30.0
311
- ],
312
- [
313
- 80.0,
314
- 30.0
315
- ],
316
- [
317
- 160.0,
318
- 30.0
319
- ]
320
- ],
321
- "color": "primary",
322
- "strokeWidth": 2.0,
323
- "animated": true,
324
- "type": "svg-flow"
379
+ "variant": "danger",
380
+ "label": "Reverse",
381
+ "event": "REVERSE_ENTRY"
325
382
  }
326
383
  ],
327
- "gap": "md"
328
- },
329
- {
330
- "minCardWidth": 240.0,
331
- "gap": "md",
332
- "maxCols": 3.0,
333
384
  "fields": [
334
385
  {
386
+ "label": "Date",
335
387
  "name": "entryDate",
336
- "label": "Date"
388
+ "variant": "caption"
337
389
  },
338
390
  {
339
391
  "name": "accountName",
340
- "label": "Account"
392
+ "label": "Account",
393
+ "variant": "caption"
341
394
  },
342
395
  {
396
+ "variant": "caption",
397
+ "label": "Description",
398
+ "name": "description"
399
+ },
400
+ {
401
+ "variant": "caption",
343
402
  "name": "debit",
344
403
  "label": "Debit"
345
404
  },
346
405
  {
406
+ "variant": "caption",
347
407
  "label": "Credit",
348
408
  "name": "credit"
409
+ },
410
+ {
411
+ "name": "isReconciled",
412
+ "label": "Reconciled",
413
+ "variant": "badge"
349
414
  }
350
- ],
351
- "type": "entity-cards",
352
- "entity": "@payload.data"
353
- },
415
+ ]
416
+ }
417
+ ],
418
+ "direction": "vertical"
419
+ }
420
+ ]
421
+ ]
422
+ },
423
+ {
424
+ "from": "loading",
425
+ "to": "error",
426
+ "event": "LedgerEntryLoadFailed",
427
+ "effects": [
428
+ [
429
+ "render-ui",
430
+ "main",
431
+ {
432
+ "message": "@payload.error",
433
+ "type": "alert",
434
+ "variant": "error"
435
+ }
436
+ ]
437
+ ]
438
+ },
439
+ {
440
+ "from": "browsing",
441
+ "to": "viewing_single",
442
+ "event": "OPEN_ENTRY",
443
+ "effects": [
444
+ [
445
+ "set",
446
+ "@entity.id",
447
+ "@payload.row.id"
448
+ ],
449
+ [
450
+ "set",
451
+ "@entity.accountId",
452
+ "@payload.row.accountId"
453
+ ],
454
+ [
455
+ "set",
456
+ "@entity.accountName",
457
+ "@payload.row.accountName"
458
+ ],
459
+ [
460
+ "set",
461
+ "@entity.entryDate",
462
+ "@payload.row.entryDate"
463
+ ],
464
+ [
465
+ "set",
466
+ "@entity.description",
467
+ "@payload.row.description"
468
+ ],
469
+ [
470
+ "set",
471
+ "@entity.debit",
472
+ "@payload.row.debit"
473
+ ],
474
+ [
475
+ "set",
476
+ "@entity.credit",
477
+ "@payload.row.credit"
478
+ ],
479
+ [
480
+ "set",
481
+ "@entity.referenceType",
482
+ "@payload.row.referenceType"
483
+ ],
484
+ [
485
+ "set",
486
+ "@entity.referenceId",
487
+ "@payload.row.referenceId"
488
+ ],
489
+ [
490
+ "render-ui",
491
+ "main",
492
+ {
493
+ "type": "stack",
494
+ "gap": "md",
495
+ "children": [
354
496
  {
355
- "showDividers": true,
356
- "entity": "@payload.data",
357
- "fields": [
358
- {
359
- "name": "entryDate",
360
- "label": "Date"
361
- },
497
+ "direction": "horizontal",
498
+ "children": [
362
499
  {
363
- "name": "accountName",
364
- "label": "Account"
500
+ "label": "Back",
501
+ "type": "button",
502
+ "action": "CLOSE_VIEW",
503
+ "variant": "ghost"
365
504
  },
366
505
  {
367
- "label": "Description",
368
- "name": "description"
506
+ "type": "icon",
507
+ "name": "book-open"
369
508
  },
370
509
  {
371
- "name": "debit",
372
- "label": "Debit"
510
+ "content": "@entity.accountName",
511
+ "variant": "h3",
512
+ "type": "typography"
373
513
  },
374
514
  {
375
- "name": "credit",
376
- "label": "Credit"
515
+ "variant": "default",
516
+ "type": "badge",
517
+ "label": "@entity.referenceType"
377
518
  }
378
519
  ],
379
- "type": "entity-list"
520
+ "type": "stack",
521
+ "gap": "sm",
522
+ "align": "center"
380
523
  },
381
524
  {
382
525
  "type": "divider"
383
526
  },
384
527
  {
385
- "type": "data-grid",
386
- "entity": "@payload.data",
387
- "cols": 1.0,
388
528
  "gap": "sm",
389
- "itemActions": [
529
+ "direction": "vertical",
530
+ "type": "stack",
531
+ "children": [
390
532
  {
391
- "variant": "primary",
392
- "event": "RECONCILE_ENTRY",
393
- "label": "Reconcile"
533
+ "gap": "md",
534
+ "type": "stack",
535
+ "children": [
536
+ {
537
+ "type": "typography",
538
+ "color": "muted",
539
+ "content": "Account ID",
540
+ "variant": "caption"
541
+ },
542
+ {
543
+ "content": "@entity.accountId",
544
+ "variant": "body",
545
+ "type": "typography"
546
+ }
547
+ ],
548
+ "direction": "horizontal"
394
549
  },
395
550
  {
396
- "label": "Reverse",
397
- "event": "REVERSE_ENTRY",
398
- "variant": "danger"
399
- }
400
- ],
401
- "fields": [
402
- {
403
- "name": "entryDate",
404
- "label": "Date",
405
- "variant": "caption"
551
+ "gap": "md",
552
+ "children": [
553
+ {
554
+ "variant": "caption",
555
+ "color": "muted",
556
+ "type": "typography",
557
+ "content": "Description"
558
+ },
559
+ {
560
+ "type": "typography",
561
+ "variant": "body",
562
+ "content": "@entity.description"
563
+ }
564
+ ],
565
+ "type": "stack",
566
+ "direction": "horizontal"
406
567
  },
407
568
  {
408
- "name": "accountName",
409
- "variant": "caption",
410
- "label": "Account"
411
- },
569
+ "children": [
570
+ {
571
+ "color": "muted",
572
+ "content": "Reference",
573
+ "variant": "caption",
574
+ "type": "typography"
575
+ },
576
+ {
577
+ "variant": "body",
578
+ "content": "@entity.referenceId",
579
+ "type": "typography"
580
+ }
581
+ ],
582
+ "type": "stack",
583
+ "direction": "horizontal",
584
+ "gap": "md"
585
+ }
586
+ ]
587
+ },
588
+ {
589
+ "type": "divider"
590
+ },
591
+ {
592
+ "type": "simple-grid",
593
+ "cols": 3.0,
594
+ "children": [
412
595
  {
413
- "label": "Description",
414
- "name": "description",
415
- "variant": "caption"
596
+ "icon": "calendar",
597
+ "label": "Date",
598
+ "value": "@entity.entryDate",
599
+ "type": "stat-display"
416
600
  },
417
601
  {
418
- "name": "debit",
419
- "label": "Debit",
420
- "variant": "caption"
602
+ "type": "stat-display",
603
+ "value": "@entity.debit",
604
+ "icon": "arrow-down",
605
+ "label": "Debit"
421
606
  },
422
607
  {
423
- "name": "credit",
608
+ "value": "@entity.credit",
609
+ "type": "stat-display",
424
610
  "label": "Credit",
425
- "variant": "caption"
611
+ "icon": "arrow-up"
612
+ }
613
+ ]
614
+ },
615
+ {
616
+ "children": [
617
+ {
618
+ "type": "button",
619
+ "variant": "primary",
620
+ "actionPayload": {
621
+ "id": "@entity.id"
622
+ },
623
+ "label": "Reconcile",
624
+ "action": "RECONCILE_ENTRY"
426
625
  },
427
626
  {
428
- "label": "Reconciled",
429
- "name": "isReconciled",
430
- "variant": "badge"
627
+ "action": "REVERSE_ENTRY",
628
+ "variant": "danger",
629
+ "label": "Reverse",
630
+ "actionPayload": {
631
+ "id": "@entity.id"
632
+ },
633
+ "type": "button"
431
634
  }
432
- ]
635
+ ],
636
+ "direction": "horizontal",
637
+ "type": "stack",
638
+ "gap": "sm",
639
+ "align": "center"
433
640
  }
434
- ]
641
+ ],
642
+ "direction": "vertical"
435
643
  }
436
644
  ]
437
645
  ]
438
646
  },
439
647
  {
440
- "from": "loading",
441
- "to": "error",
442
- "event": "LedgerEntryLoadFailed",
648
+ "from": "browsing",
649
+ "to": "loading",
650
+ "event": "REVERSE_ENTRY",
443
651
  "effects": [
652
+ [
653
+ "set",
654
+ "@entity.id",
655
+ "@payload.id"
656
+ ],
657
+ [
658
+ "fetch",
659
+ "LedgerEntry",
660
+ {
661
+ "emit": {
662
+ "failure": "LedgerEntryLoadFailed",
663
+ "success": "LedgerEntryLoaded"
664
+ }
665
+ }
666
+ ],
444
667
  [
445
668
  "render-ui",
446
669
  "main",
447
670
  {
448
- "variant": "error",
449
- "message": "@payload.error",
450
- "type": "alert"
671
+ "gap": "md",
672
+ "align": "center",
673
+ "type": "stack",
674
+ "children": [
675
+ {
676
+ "type": "spinner"
677
+ },
678
+ {
679
+ "content": "Reversing entry…",
680
+ "type": "typography",
681
+ "color": "muted",
682
+ "variant": "caption"
683
+ }
684
+ ],
685
+ "direction": "vertical",
686
+ "className": "py-12"
451
687
  }
452
688
  ]
453
689
  ]
454
690
  },
455
691
  {
456
- "from": "browsing",
457
- "to": "browsing",
692
+ "from": "viewing_single",
693
+ "to": "loading",
694
+ "event": "CLOSE_VIEW",
695
+ "effects": [
696
+ [
697
+ "fetch",
698
+ "LedgerEntry",
699
+ {
700
+ "emit": {
701
+ "success": "LedgerEntryLoaded",
702
+ "failure": "LedgerEntryLoadFailed"
703
+ }
704
+ }
705
+ ],
706
+ [
707
+ "render-ui",
708
+ "main",
709
+ {
710
+ "gap": "md",
711
+ "align": "center",
712
+ "className": "py-12",
713
+ "type": "stack",
714
+ "children": [
715
+ {
716
+ "type": "spinner"
717
+ },
718
+ {
719
+ "variant": "caption",
720
+ "content": "Loading journal…",
721
+ "type": "typography",
722
+ "color": "muted"
723
+ }
724
+ ],
725
+ "direction": "vertical"
726
+ }
727
+ ]
728
+ ]
729
+ },
730
+ {
731
+ "from": "viewing_single",
732
+ "to": "loading",
458
733
  "event": "RECONCILE_ENTRY",
459
734
  "effects": [
460
735
  [
@@ -463,15 +738,42 @@
463
738
  "@payload.id"
464
739
  ],
465
740
  [
466
- "notify",
467
- "Entry reconciled",
468
- "success"
741
+ "fetch",
742
+ "LedgerEntry",
743
+ {
744
+ "emit": {
745
+ "failure": "LedgerEntryLoadFailed",
746
+ "success": "LedgerEntryLoaded"
747
+ }
748
+ }
749
+ ],
750
+ [
751
+ "render-ui",
752
+ "main",
753
+ {
754
+ "type": "stack",
755
+ "direction": "vertical",
756
+ "gap": "md",
757
+ "className": "py-12",
758
+ "children": [
759
+ {
760
+ "type": "spinner"
761
+ },
762
+ {
763
+ "type": "typography",
764
+ "color": "muted",
765
+ "variant": "caption",
766
+ "content": "Reconciling entry…"
767
+ }
768
+ ],
769
+ "align": "center"
770
+ }
469
771
  ]
470
772
  ]
471
773
  },
472
774
  {
473
- "from": "browsing",
474
- "to": "browsing",
775
+ "from": "viewing_single",
776
+ "to": "loading",
475
777
  "event": "REVERSE_ENTRY",
476
778
  "effects": [
477
779
  [
@@ -480,9 +782,36 @@
480
782
  "@payload.id"
481
783
  ],
482
784
  [
483
- "notify",
484
- "Entry reversed",
485
- "info"
785
+ "fetch",
786
+ "LedgerEntry",
787
+ {
788
+ "emit": {
789
+ "success": "LedgerEntryLoaded",
790
+ "failure": "LedgerEntryLoadFailed"
791
+ }
792
+ }
793
+ ],
794
+ [
795
+ "render-ui",
796
+ "main",
797
+ {
798
+ "type": "stack",
799
+ "direction": "vertical",
800
+ "align": "center",
801
+ "className": "py-12",
802
+ "children": [
803
+ {
804
+ "type": "spinner"
805
+ },
806
+ {
807
+ "color": "muted",
808
+ "type": "typography",
809
+ "content": "Reversing entry…",
810
+ "variant": "caption"
811
+ }
812
+ ],
813
+ "gap": "md"
814
+ }
486
815
  ]
487
816
  ]
488
817
  },
@@ -496,8 +825,8 @@
496
825
  "LedgerEntry",
497
826
  {
498
827
  "emit": {
499
- "success": "LedgerEntryLoaded",
500
- "failure": "LedgerEntryLoadFailed"
828
+ "failure": "LedgerEntryLoadFailed",
829
+ "success": "LedgerEntryLoaded"
501
830
  }
502
831
  }
503
832
  ],