Download mock-app/modules/exp/index.js from EnergyVenom/patchwise-agent-studio: direct link, hf CLI and curl.
- Browser
- Download file 1.19 kB
-
https://huggingface.co/spaces/EnergyVenom/patchwise-agent-studio/resolve/main/mock-app/modules/exp/index.js
- Command line
-
hf download hf://spaces/EnergyVenom/patchwise-agent-studio/mock-app/modules/exp/index.js
-
curl -L -o index.js https://huggingface.co/spaces/EnergyVenom/patchwise-agent-studio/resolve/main/mock-app/modules/exp/index.js
1.19 kB
| ; | |
| /* | |
| * EXP (Expenses) module pack for the MOCK Fusion-style app. NOT Oracle software; synthetic data; ASSUMED rules (store.js). | |
| * Supports the EXP P1 cases in tests/cases/exp/. Contract: ../README.md. | |
| */ | |
| const S = require('./store'); | |
| const W = require('./web'); | |
| const R = require('../../core/registry'); | |
| const ID = 'exp'; | |
| module.exports = { | |
| id: ID, | |
| name: 'Expenses', | |
| idPrefix: 'EXP', | |
| personas: S.PERSONAS, | |
| tasks: W.TASKS.map(([label, href, f]) => [label, href, (r) => R.inModule(r, ID) && f(r)]), | |
| processParams: [ | |
| { name: 'cardProgram', label: 'Card Program' }, | |
| { name: 'dataFile', label: 'Data File' }, | |
| { name: 'businessUnit', label: 'Business Unit' }, | |
| { name: 'payGroup', label: 'Pay Group' }, | |
| ], | |
| processes: Object.entries(S.PROCESSES).map(([name, d]) => ({ name, ...d })), | |
| schemas: W.SCHEMAS, | |
| worklist: (role) => S.list('reports').filter((r) => r.status === 'PEND_MGR' && r.approver === role).map((r) => ({ docNumber: r.number, docType: 'Expense Report', kind: 'APPROVAL', amount: S.total(r), href: `/exp/reports/${r.id}` })), | |
| reset: () => S.reset(), | |
| mount({ app, rest }) { W.mount(app, rest); }, | |
| }; | |