Commit ba43f82
Sqoia Dev Agent
feat: invoice lifecycle, refunds, role-based views, security hardening
Invoice Lifecycle:
- Invoice ledger with status tracking (draft → sent → viewed → paid)
- Status badges with color coding in Invoices view
- Actions: Mark Sent, Mark Paid, Issue Refund, Cancel
- Filter invoices by status, account, period
Refunds:
- Refund modal with amount, reason, partial refund support
- Credit memo PDF generation (CREDIT MEMO header, negative amounts)
- Refund entries tracked per invoice with audit trail
Role-based Views:
- Role detection via cockpit.user() + config + sacctmgr
- Admin: full access, all accounts, rate editing, invoice management
- PI: their accounts, user breakdown, view invoices
- Member: personal usage, job history, efficiency tips
- Finance: read-only, view all, mark invoices paid
- Nav tabs filtered by role, data filtered by role
Role-specific Dashboards:
- Admin: cluster cost KPI, invoice status summary, top accounts, alerts
- PI: account cost, budget remaining, user breakdown
- Member: personal cost, recent jobs, efficiency metrics
Security:
- ReportLab input sanitization (strip HTML/XML tags)
- Logo upload 256KB size limit
- Pinned CI dependencies
- Release workflow gated on passing tests1 parent 943036e commit ba43f82
6 files changed
Lines changed: 1005 additions & 51 deletions
File tree
- .github/workflows
- src
- vendor
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
77 | 77 | | |
78 | 78 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
11 | 66 | | |
12 | 67 | | |
| 68 | + | |
13 | 69 | | |
14 | 70 | | |
15 | 71 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
59 | 68 | | |
60 | 69 | | |
61 | 70 | | |
| |||
195 | 204 | | |
196 | 205 | | |
197 | 206 | | |
198 | | - | |
| 207 | + | |
199 | 208 | | |
200 | 209 | | |
201 | | - | |
| 210 | + | |
202 | 211 | | |
203 | 212 | | |
204 | | - | |
| 213 | + | |
205 | 214 | | |
206 | 215 | | |
207 | 216 | | |
| |||
210 | 219 | | |
211 | 220 | | |
212 | 221 | | |
| 222 | + | |
| 223 | + | |
213 | 224 | | |
214 | | - | |
| 225 | + | |
215 | 226 | | |
216 | 227 | | |
217 | 228 | | |
| |||
224 | 235 | | |
225 | 236 | | |
226 | 237 | | |
| 238 | + | |
| 239 | + | |
227 | 240 | | |
228 | 241 | | |
229 | 242 | | |
| |||
242 | 255 | | |
243 | 256 | | |
244 | 257 | | |
245 | | - | |
| 258 | + | |
246 | 259 | | |
247 | 260 | | |
248 | 261 | | |
| |||
282 | 295 | | |
283 | 296 | | |
284 | 297 | | |
285 | | - | |
| 298 | + | |
286 | 299 | | |
287 | 300 | | |
288 | 301 | | |
289 | 302 | | |
290 | 303 | | |
291 | | - | |
| 304 | + | |
292 | 305 | | |
293 | 306 | | |
294 | 307 | | |
| |||
297 | 310 | | |
298 | 311 | | |
299 | 312 | | |
300 | | - | |
| 313 | + | |
301 | 314 | | |
302 | 315 | | |
303 | 316 | | |
304 | | - | |
| 317 | + | |
305 | 318 | | |
306 | 319 | | |
307 | 320 | | |
| |||
369 | 382 | | |
370 | 383 | | |
371 | 384 | | |
372 | | - | |
| 385 | + | |
373 | 386 | | |
374 | 387 | | |
375 | 388 | | |
| |||
450 | 463 | | |
451 | 464 | | |
452 | 465 | | |
453 | | - | |
| 466 | + | |
454 | 467 | | |
455 | 468 | | |
456 | 469 | | |
457 | | - | |
| 470 | + | |
458 | 471 | | |
459 | 472 | | |
460 | 473 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
277 | 277 | | |
278 | 278 | | |
279 | 279 | | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
0 commit comments