@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-billable-hour",
3
3
  "version": "1.0.0",
4
- "description": "std-billable-hour — generic billable-hour timesheet primitive for legal, agency, and consulting domains. Owns a BillableHour entity (one row per time entry against a matter/project) and a single trait that loads entries, renders them in a data-grid with Invoice / Write Off actions.",
4
+ "description": "std-billable-hour — generic billable-hour timesheet primitive for legal, agency, and consulting domains. Lists entries in `browsing`; opens entry detail in `viewing_single` with Invoice / Write Off actions.",
5
5
  "orbitals": [
6
6
  {
7
7
  "name": "BillableHourOrbital",
@@ -79,6 +79,66 @@
79
79
  "category": "interaction",
80
80
  "linkedEntity": "BillableHour",
81
81
  "emits": [
82
+ {
83
+ "event": "OPEN_HOURS",
84
+ "payloadSchema": [
85
+ {
86
+ "name": "id",
87
+ "type": "string",
88
+ "required": true
89
+ },
90
+ {
91
+ "name": "row.id",
92
+ "type": "string",
93
+ "required": true
94
+ },
95
+ {
96
+ "name": "row.workerId",
97
+ "type": "string",
98
+ "required": true
99
+ },
100
+ {
101
+ "name": "row.workerName",
102
+ "type": "string"
103
+ },
104
+ {
105
+ "name": "row.matterId",
106
+ "type": "string"
107
+ },
108
+ {
109
+ "name": "row.projectId",
110
+ "type": "string"
111
+ },
112
+ {
113
+ "name": "row.workDate",
114
+ "type": "string",
115
+ "required": true
116
+ },
117
+ {
118
+ "name": "row.hours",
119
+ "type": "number"
120
+ },
121
+ {
122
+ "name": "row.rate",
123
+ "type": "number"
124
+ },
125
+ {
126
+ "name": "row.description",
127
+ "type": "string"
128
+ },
129
+ {
130
+ "name": "row.isBillable",
131
+ "type": "boolean"
132
+ },
133
+ {
134
+ "name": "row.invoiceStatus",
135
+ "type": "string"
136
+ }
137
+ ]
138
+ },
139
+ {
140
+ "event": "CLOSE_VIEW"
141
+ },
82
142
  {
83
143
  "event": "INVOICE_HOURS",
84
144
  "payloadSchema": [
@@ -131,6 +191,9 @@
131
191
  {
132
192
  "name": "browsing"
133
193
  },
194
+ {
195
+ "name": "viewing_single"
196
+ },
134
197
  {
135
198
  "name": "error"
136
199
  }
@@ -165,13 +228,17 @@
165
228
  ]
166
229
  },
167
230
  {
168
- "key": "INVOICE_HOURS",
169
- "name": "Invoice Hours",
231
+ "key": "OPEN_HOURS",
232
+ "name": "Open Hours",
170
233
  "payloadSchema": [
171
234
  {
172
235
  "name": "id",
173
236
  "type": "string",
174
237
  "required": true
238
+ },
239
+ {
240
+ "name": "row",
241
+ "type": "BillableHour"
175
242
  }
176
243
  ]
177
244
  },
@@ -185,6 +252,21 @@
185
252
  "required": true
186
253
  }
187
254
  ]
255
+ },
256
+ {
257
+ "key": "CLOSE_VIEW",
258
+ "name": "Close View"
259
+ },
260
+ {
261
+ "key": "INVOICE_HOURS",
262
+ "name": "Invoice Hours",
263
+ "payloadSchema": [
264
+ {
265
+ "name": "id",
266
+ "type": "string",
267
+ "required": true
268
+ }
269
+ ]
188
270
  }
189
271
  ],
190
272
  "transitions": [
@@ -207,22 +289,22 @@
207
289
  "render-ui",
208
290
  "main",
209
291
  {
210
- "direction": "vertical",
211
- "className": "py-12",
212
292
  "gap": "md",
293
+ "className": "py-12",
294
+ "type": "stack",
295
+ "direction": "vertical",
296
+ "align": "center",
213
297
  "children": [
214
298
  {
215
299
  "type": "spinner"
216
300
  },
217
301
  {
218
- "type": "typography",
219
302
  "content": "Loading time entries…",
303
+ "type": "typography",
220
304
  "color": "muted",
221
305
  "variant": "caption"
222
306
  }
223
- ],
224
- "align": "center",
225
- "type": "stack"
307
+ ]
226
308
  }
227
309
  ]
228
310
  ]
@@ -236,80 +318,56 @@
236
318
  "render-ui",
237
319
  "main",
238
320
  {
321
+ "type": "stack",
239
322
  "direction": "vertical",
323
+ "gap": "md",
240
324
  "children": [
241
325
  {
242
- "children": [
243
- {
244
- "type": "avatar",
245
- "src": "https://i.pravatar.cc/64?img=12",
246
- "size": "md",
247
- "name": "Lead Attorney"
248
- },
249
- {
250
- "type": "icon",
251
- "name": "clock"
252
- },
253
- {
254
- "type": "typography",
255
- "variant": "h3",
256
- "content": "@config.title"
257
- }
258
- ],
326
+ "gap": "sm",
327
+ "align": "center",
259
328
  "type": "stack",
260
329
  "direction": "horizontal",
261
- "align": "center",
262
- "gap": "sm"
263
- },
264
- {
265
- "align": "center",
266
330
  "children": [
267
331
  {
268
- "type": "animated-counter",
269
- "suffix": " hrs",
270
- "duration": 1200.0,
271
- "value": 248.0
332
+ "name": "clock",
333
+ "type": "icon"
272
334
  },
273
335
  {
274
- "type": "range-slider",
275
- "min": 0.0,
276
- "max": 500.0,
277
- "value": 250.0,
278
- "step": 25.0,
279
- "showTooltip": true,
280
- "showTicks": true
336
+ "type": "typography",
337
+ "content": "@config.title",
338
+ "variant": "h3"
281
339
  }
282
- ],
283
- "direction": "horizontal",
284
- "gap": "md",
285
- "type": "stack"
340
+ ]
286
341
  },
287
342
  {
288
- "type": "line-chart",
289
- "data": [
290
- {
291
- "value": 142.0,
292
- "date": "Jan"
293
- },
343
+ "children": [
294
344
  {
295
- "value": 168.0,
296
- "date": "Feb"
345
+ "icon": "clock",
346
+ "value": "@payload.data.length",
347
+ "type": "stat-display",
348
+ "label": "Total entries"
297
349
  },
298
350
  {
299
- "value": 195.0,
300
- "date": "Mar"
351
+ "type": "stat-display",
352
+ "icon": "hourglass",
353
+ "label": "Unbilled hours",
354
+ "value": "248"
301
355
  },
302
356
  {
303
- "value": 210.0,
304
- "date": "Apr"
357
+ "label": "Invoiced this month",
358
+ "icon": "file-text",
359
+ "type": "stat-display",
360
+ "value": "32"
305
361
  },
306
362
  {
307
- "date": "May",
308
- "value": 248.0
363
+ "value": "4",
364
+ "icon": "x-circle",
365
+ "type": "stat-display",
366
+ "label": "Written off"
309
367
  }
310
368
  ],
311
- "showGrid": true,
312
- "showArea": true
369
+ "type": "simple-grid",
370
+ "cols": 4.0
313
371
  },
314
372
  {
315
373
  "type": "divider"
@@ -317,18 +375,18 @@
317
375
  {
318
376
  "fields": [
319
377
  {
320
- "label": "Worker",
378
+ "variant": "caption",
321
379
  "name": "workerName",
322
- "variant": "caption"
380
+ "label": "Worker"
323
381
  },
324
382
  {
325
- "label": "Matter",
326
383
  "variant": "caption",
327
- "name": "matterId"
384
+ "name": "matterId",
385
+ "label": "Matter"
328
386
  },
329
387
  {
330
- "variant": "caption",
331
388
  "name": "workDate",
389
+ "variant": "caption",
332
390
  "label": "Date"
333
391
  },
334
392
  {
@@ -342,31 +400,30 @@
342
400
  "label": "Rate"
343
401
  },
344
402
  {
345
- "name": "invoiceStatus",
346
403
  "label": "Status",
347
- "variant": "badge"
404
+ "variant": "badge",
405
+ "name": "invoiceStatus"
348
406
  }
349
407
  ],
350
- "cols": 1.0,
351
- "gap": "sm",
408
+ "entity": "@payload.data",
352
409
  "itemActions": [
353
410
  {
354
- "label": "Invoice",
355
- "event": "INVOICE_HOURS",
411
+ "icon": "arrow-right",
412
+ "label": "Open",
413
+ "event": "OPEN_HOURS",
356
414
  "variant": "primary"
357
415
  },
358
416
  {
417
+ "label": "Write Off",
359
418
  "event": "WRITE_OFF_HOURS",
360
- "variant": "ghost",
361
- "label": "Write Off"
419
+ "variant": "danger"
362
420
  }
363
421
  ],
364
- "entity": "@payload.data",
422
+ "gap": "sm",
423
+ "cols": 1.0,
365
424
  "type": "data-grid"
366
425
  }
367
- ],
368
- "gap": "md",
369
- "type": "stack"
426
+ ]
370
427
  }
371
428
  ]
372
429
  ]
@@ -380,8 +437,8 @@
380
437
  "render-ui",
381
438
  "main",
382
439
  {
383
- "type": "alert",
384
440
  "message": "@payload.error",
441
+ "type": "alert",
385
442
  "variant": "error"
386
443
  }
387
444
  ]
@@ -389,7 +446,308 @@
389
446
  },
390
447
  {
391
448
  "from": "browsing",
392
- "to": "browsing",
449
+ "to": "viewing_single",
450
+ "event": "OPEN_HOURS",
451
+ "effects": [
452
+ [
453
+ "set",
454
+ "@entity.id",
455
+ "@payload.row.id"
456
+ ],
457
+ [
458
+ "set",
459
+ "@entity.workerId",
460
+ "@payload.row.workerId"
461
+ ],
462
+ [
463
+ "set",
464
+ "@entity.workerName",
465
+ "@payload.row.workerName"
466
+ ],
467
+ [
468
+ "set",
469
+ "@entity.matterId",
470
+ "@payload.row.matterId"
471
+ ],
472
+ [
473
+ "set",
474
+ "@entity.projectId",
475
+ "@payload.row.projectId"
476
+ ],
477
+ [
478
+ "set",
479
+ "@entity.workDate",
480
+ "@payload.row.workDate"
481
+ ],
482
+ [
483
+ "set",
484
+ "@entity.hours",
485
+ "@payload.row.hours"
486
+ ],
487
+ [
488
+ "set",
489
+ "@entity.rate",
490
+ "@payload.row.rate"
491
+ ],
492
+ [
493
+ "set",
494
+ "@entity.description",
495
+ "@payload.row.description"
496
+ ],
497
+ [
498
+ "set",
499
+ "@entity.isBillable",
500
+ "@payload.row.isBillable"
501
+ ],
502
+ [
503
+ "set",
504
+ "@entity.invoiceStatus",
505
+ "@payload.row.invoiceStatus"
506
+ ],
507
+ [
508
+ "render-ui",
509
+ "main",
510
+ {
511
+ "type": "stack",
512
+ "children": [
513
+ {
514
+ "gap": "sm",
515
+ "align": "center",
516
+ "children": [
517
+ {
518
+ "label": "Back",
519
+ "action": "CLOSE_VIEW",
520
+ "variant": "ghost",
521
+ "type": "button"
522
+ },
523
+ {
524
+ "name": "clock",
525
+ "type": "icon"
526
+ },
527
+ {
528
+ "content": "@entity.workerName",
529
+ "variant": "h3",
530
+ "type": "typography"
531
+ },
532
+ {
533
+ "label": "@entity.invoiceStatus",
534
+ "variant": "default",
535
+ "type": "badge"
536
+ }
537
+ ],
538
+ "type": "stack",
539
+ "direction": "horizontal"
540
+ },
541
+ {
542
+ "type": "divider"
543
+ },
544
+ {
545
+ "gap": "sm",
546
+ "type": "stack",
547
+ "direction": "vertical",
548
+ "children": [
549
+ {
550
+ "children": [
551
+ {
552
+ "variant": "caption",
553
+ "color": "muted",
554
+ "type": "typography",
555
+ "content": "Matter"
556
+ },
557
+ {
558
+ "variant": "body",
559
+ "type": "typography",
560
+ "content": "@entity.matterId"
561
+ }
562
+ ],
563
+ "gap": "md",
564
+ "type": "stack",
565
+ "direction": "horizontal"
566
+ },
567
+ {
568
+ "direction": "horizontal",
569
+ "gap": "md",
570
+ "type": "stack",
571
+ "children": [
572
+ {
573
+ "variant": "caption",
574
+ "type": "typography",
575
+ "color": "muted",
576
+ "content": "Project"
577
+ },
578
+ {
579
+ "variant": "body",
580
+ "type": "typography",
581
+ "content": "@entity.projectId"
582
+ }
583
+ ]
584
+ },
585
+ {
586
+ "children": [
587
+ {
588
+ "color": "muted",
589
+ "variant": "caption",
590
+ "type": "typography",
591
+ "content": "Description"
592
+ },
593
+ {
594
+ "type": "typography",
595
+ "variant": "body",
596
+ "content": "@entity.description"
597
+ }
598
+ ],
599
+ "gap": "md",
600
+ "type": "stack",
601
+ "direction": "horizontal"
602
+ }
603
+ ]
604
+ },
605
+ {
606
+ "type": "divider"
607
+ },
608
+ {
609
+ "cols": 3.0,
610
+ "type": "simple-grid",
611
+ "children": [
612
+ {
613
+ "label": "Hours",
614
+ "type": "stat-display",
615
+ "value": "@entity.hours",
616
+ "icon": "clock"
617
+ },
618
+ {
619
+ "label": "Rate",
620
+ "icon": "dollar-sign",
621
+ "value": "@entity.rate",
622
+ "type": "stat-display"
623
+ },
624
+ {
625
+ "label": "Date",
626
+ "icon": "calendar",
627
+ "type": "stat-display",
628
+ "value": "@entity.workDate"
629
+ }
630
+ ]
631
+ },
632
+ {
633
+ "type": "stack",
634
+ "align": "center",
635
+ "children": [
636
+ {
637
+ "actionPayload": {
638
+ "id": "@entity.id"
639
+ },
640
+ "action": "INVOICE_HOURS",
641
+ "variant": "primary",
642
+ "type": "button",
643
+ "label": "Invoice"
644
+ },
645
+ {
646
+ "actionPayload": {
647
+ "id": "@entity.id"
648
+ },
649
+ "label": "Write Off",
650
+ "variant": "danger",
651
+ "type": "button",
652
+ "action": "WRITE_OFF_HOURS"
653
+ }
654
+ ],
655
+ "gap": "sm",
656
+ "direction": "horizontal"
657
+ }
658
+ ],
659
+ "direction": "vertical",
660
+ "gap": "md"
661
+ }
662
+ ]
663
+ ]
664
+ },
665
+ {
666
+ "from": "browsing",
667
+ "to": "loading",
668
+ "event": "WRITE_OFF_HOURS",
669
+ "effects": [
670
+ [
671
+ "set",
672
+ "@entity.id",
673
+ "@payload.id"
674
+ ],
675
+ [
676
+ "fetch",
677
+ "BillableHour",
678
+ {
679
+ "emit": {
680
+ "failure": "BillableHourLoadFailed",
681
+ "success": "BillableHourLoaded"
682
+ }
683
+ }
684
+ ],
685
+ [
686
+ "render-ui",
687
+ "main",
688
+ {
689
+ "type": "stack",
690
+ "direction": "vertical",
691
+ "className": "py-12",
692
+ "gap": "md",
693
+ "align": "center",
694
+ "children": [
695
+ {
696
+ "type": "spinner"
697
+ },
698
+ {
699
+ "content": "Writing off hours…",
700
+ "color": "muted",
701
+ "type": "typography",
702
+ "variant": "caption"
703
+ }
704
+ ]
705
+ }
706
+ ]
707
+ ]
708
+ },
709
+ {
710
+ "from": "viewing_single",
711
+ "to": "loading",
712
+ "event": "CLOSE_VIEW",
713
+ "effects": [
714
+ [
715
+ "fetch",
716
+ "BillableHour",
717
+ {
718
+ "emit": {
719
+ "failure": "BillableHourLoadFailed",
720
+ "success": "BillableHourLoaded"
721
+ }
722
+ }
723
+ ],
724
+ [
725
+ "render-ui",
726
+ "main",
727
+ {
728
+ "gap": "md",
729
+ "direction": "vertical",
730
+ "type": "stack",
731
+ "align": "center",
732
+ "children": [
733
+ {
734
+ "type": "spinner"
735
+ },
736
+ {
737
+ "variant": "caption",
738
+ "type": "typography",
739
+ "color": "muted",
740
+ "content": "Loading time entries…"
741
+ }
742
+ ],
743
+ "className": "py-12"
744
+ }
745
+ ]
746
+ ]
747
+ },
748
+ {
749
+ "from": "viewing_single",
750
+ "to": "loading",
393
751
  "event": "INVOICE_HOURS",
394
752
  "effects": [
395
753
  [
@@ -397,20 +755,43 @@
397
755
  "@entity.id",
398
756
  "@payload.id"
399
757
  ],
758
+ [
759
+ "fetch",
760
+ "BillableHour",
761
+ {
762
+ "emit": {
763
+ "success": "BillableHourLoaded",
764
+ "failure": "BillableHourLoadFailed"
765
+ }
766
+ }
767
+ ],
400
768
  [
401
769
  "render-ui",
402
770
  "main",
403
771
  {
404
- "message": "Hours invoiced",
405
- "variant": "success",
406
- "type": "alert"
772
+ "direction": "vertical",
773
+ "align": "center",
774
+ "className": "py-12",
775
+ "type": "stack",
776
+ "gap": "md",
777
+ "children": [
778
+ {
779
+ "type": "spinner"
780
+ },
781
+ {
782
+ "variant": "caption",
783
+ "color": "muted",
784
+ "content": "Invoicing hours…",
785
+ "type": "typography"
786
+ }
787
+ ]
407
788
  }
408
789
  ]
409
790
  ]
410
791
  },
411
792
  {
412
- "from": "browsing",
413
- "to": "browsing",
793
+ "from": "viewing_single",
794
+ "to": "loading",
414
795
  "event": "WRITE_OFF_HOURS",
415
796
  "effects": [
416
797
  [
@@ -418,13 +799,36 @@
418
799
  "@entity.id",
419
800
  "@payload.id"
420
801
  ],
802
+ [
803
+ "fetch",
804
+ "BillableHour",
805
+ {
806
+ "emit": {
807
+ "success": "BillableHourLoaded",
808
+ "failure": "BillableHourLoadFailed"
809
+ }
810
+ }
811
+ ],
421
812
  [
422
813
  "render-ui",
423
814
  "main",
424
815
  {
425
- "type": "alert",
426
- "variant": "info",
427
- "message": "Hours written off"
816
+ "className": "py-12",
817
+ "direction": "vertical",
818
+ "gap": "md",
819
+ "type": "stack",
820
+ "align": "center",
821
+ "children": [
822
+ {
823
+ "type": "spinner"
824
+ },
825
+ {
826
+ "type": "typography",
827
+ "variant": "caption",
828
+ "content": "Writing off hours…",
829
+ "color": "muted"
830
+ }
831
+ ]
428
832
  }
429
833
  ]
430
834
  ]
@@ -448,8 +852,8 @@
448
852
  "render-ui",
449
853
  "main",
450
854
  {
451
- "size": "sm",
452
- "type": "spinner"
855
+ "type": "spinner",
856
+ "size": "sm"
453
857
  }
454
858
  ]
455
859
  ]