Spaces:
Sleeping
Sleeping
Download automation/src/modules/o2c/labels.ts from EnergyVenom/patchwise-agent-studio: direct link, hf CLI and curl.
- Browser
- Download file 12.2 kB
-
https://huggingface.co/spaces/EnergyVenom/patchwise-agent-studio/resolve/main/automation/src/modules/o2c/labels.ts
- Command line
-
hf download hf://spaces/EnergyVenom/patchwise-agent-studio/automation/src/modules/o2c/labels.ts
-
curl -L -o labels.ts https://huggingface.co/spaces/EnergyVenom/patchwise-agent-studio/resolve/main/automation/src/modules/o2c/labels.ts
12.2 kB
| /** | |
| * O2C label mapping: the ONE place O2C UI labels, nav targets and mock seed values live for automation. | |
| * Source: tests/ui-glossary.yaml `o2c:` (tasks + labels) and the step targets in tests/cases/o2c/*.yaml. Checked by scripts/check-glossary.js; | |
| * all UNVERIFIED against a Fusion pod. When the glossary changes, reconcile here and nowhere else. MOCK app only. | |
| */ | |
| export const O2C_PERSONA_LABELS = { | |
| order_entry: 'Order Entry Specialist', credit_manager: 'Credit Manager', shipping_user: 'Shipping Specialist', | |
| billing_specialist: 'Billing Specialist', ar_specialist: 'AR Specialist', ar_manager: 'AR Manager', customer_admin: 'Customer Data Steward', | |
| order_manager: 'Order Manager', collections_agent: 'Collections Agent', pricing_admin: 'Pricing Administrator', revenue_analyst: 'Revenue Analyst', | |
| } as const; | |
| export type O2CPersona = keyof typeof O2C_PERSONA_LABELS; | |
| /** {{nav.*}} keys used by O2C cases -> mock work-area path. */ | |
| export const NAV = { | |
| order_management: '/o2c/orders', credit_management: '/o2c/credit-holds', inventory_management: '/o2c/pick-slips', billing: '/o2c/transactions', | |
| receivables_receipts: '/o2c/receipts', customers: '/o2c/customers', scheduled_processes: '/scheduled-processes', journals: '/journals', home: '/', | |
| collections: '/o2c/collections', pricing_administration: '/o2c/pricing/price-lists', | |
| } as const; | |
| /** Work area each persona lands in (O2C-SEC-004) and the page heading it must show. */ | |
| export const WORK_AREA: Record<O2CPersona, { nav: keyof typeof NAV; heading: string }> = { | |
| order_entry: { nav: 'order_management', heading: 'Manage Orders' }, credit_manager: { nav: 'credit_management', heading: 'Manage Credit Holds' }, | |
| shipping_user: { nav: 'inventory_management', heading: 'Confirm Pick Slips' }, billing_specialist: { nav: 'billing', heading: 'Manage Transactions' }, | |
| ar_specialist: { nav: 'receivables_receipts', heading: 'Manage Receipts' }, ar_manager: { nav: 'billing', heading: 'Manage Transactions' }, | |
| customer_admin: { nav: 'customers', heading: 'Manage Customers' }, | |
| order_manager: { nav: 'order_management', heading: 'Manage Orders' }, collections_agent: { nav: 'collections', heading: 'Collections' }, | |
| pricing_admin: { nav: 'pricing_administration', heading: 'Manage Price Lists' }, revenue_analyst: { nav: 'scheduled_processes', heading: 'Scheduled Processes' }, | |
| }; | |
| /** Tasks panel links (role=link). */ | |
| export const TASK = { | |
| createOrder: 'Create Order', manageOrders: 'Manage Orders', manageCreditHolds: 'Manage Credit Holds', confirmPickSlips: 'Confirm Pick Slips', | |
| manageShipments: 'Manage Shipments', createTransaction: 'Create Transaction', manageTransactions: 'Manage Transactions', createAdjustment: 'Create Adjustment', | |
| approveAdjustments: 'Approve Adjustments', createReceipt: 'Create Receipt', manageReceipts: 'Manage Receipts', manageJournals: 'Manage Journals', manageCustomers: 'Manage Customers', | |
| collections: 'Collections workbench', | |
| } as const; | |
| /** Deep links for authorization checks (O2C-SEC-001). */ | |
| export const TASK_PATH: Record<string, string> = { | |
| [TASK.createOrder]: '/o2c/orders/new', [TASK.manageCreditHolds]: '/o2c/credit-holds', [TASK.createTransaction]: '/o2c/transactions/new', | |
| [TASK.createAdjustment]: '/o2c/adjustments/new', [TASK.createReceipt]: '/o2c/receipts/new', | |
| }; | |
| /** Field labels (getByLabel / getByRole name) exactly as written in the case steps. */ | |
| export const FIELD = { | |
| customer: 'Customer', businessUnit: 'Business Unit', purchaseOrder: 'Purchase Order', searchItem: 'Search Item', quantity: 'Quantity', | |
| order: 'Order', comments: 'Comments', pickSlip: 'Pick Slip', transactionSource: 'Transaction Source', transactionType: 'Transaction Type', | |
| billToName: 'Bill-to Name', transactionDate: 'Transaction Date', memoLine: 'Memo Line', unitPrice: 'Unit Price', transactionNumber: 'Transaction Number', | |
| salesOrder: 'Sales Order', receiptMethod: 'Receipt Method', receiptNumber: 'Receipt Number', enteredAmount: 'Entered Amount', customerName: 'Customer Name', | |
| receiptDate: 'Receipt Date', receivablesActivity: 'Receivables Activity', adjustmentAmount: 'Adjustment Amount', taxClassification: 'Tax Classification', | |
| source: 'Source', organizationName: 'Organization Name', shippingInstructions: 'Shipping Instructions', | |
| // P2 (glossary-listed) | |
| accountNumber: 'Account Number', appliedAmount: 'Applied Amount', pickedQuantity: 'Picked Quantity', unitSellingPrice: 'Unit Selling Price', billTo: 'Bill-to', shipTo: 'Ship-to', | |
| } as const; | |
| /** Scheduled-process parameter labels (Schedule New Process dialog). */ | |
| export const PARAM = { | |
| subledger: 'Subledger Application', ledger: 'Ledger', endDate: 'End Date', accountingMode: 'Accounting Mode', transferToGL: 'Transfer to General Ledger', | |
| postInGL: 'Post in General Ledger', businessUnit: 'Business Unit', transactionSource: 'Transaction Source', defaultDate: 'Default Date', order: 'Order', | |
| shipFromOrg: 'Ship-from Organization', releaseRule: 'Release Rule', lockbox: 'Lockbox', dataFile: 'Data File', submitValidation: 'Submit Validation', | |
| submitPostBatch: 'Submit Post Batch', | |
| } as const; | |
| export const PROCESS = { pickWave: 'Create Pick Wave', autoInvoice: 'Import AutoInvoice', lockbox: 'Process Receipts Through Lockbox', createAccounting: 'Create Accounting', | |
| // P2 process names (case steps; process names are not glossary UI labels) | |
| arAccounting: 'Create Receivables Accounting', aging: 'Aging - 7 Buckets Report', statements: 'Print Statements', dunning: 'Send Dunning Letters', | |
| autoReceipts: 'Create Automatic Receipts', recognizeRevenue: 'Recognize Revenue', identifyContracts: 'Identify Customer Contracts', | |
| loadInterface: 'Load Interface File for Import', importCustomers: 'Import Trading Community Data in Bulk' } as const; | |
| export const BUTTON = { | |
| add: 'Add', submit: 'Submit', search: 'Search', releaseHold: 'Release Hold', ok: 'OK', confirm: 'Confirm', shipConfirm: 'Ship Confirm', addRow: 'Add Row', | |
| completeAndClose: 'Complete and Close', save: 'Save', addOpenReceivables: 'Add Open Receivables', saveAndClose: 'Save and Close', actions: 'Actions', | |
| approve: 'Approve', editTax: 'Edit Tax', create: 'Create', revise: 'Revise', | |
| } as const; | |
| export const TAB = { pricing: 'Pricing', tax: 'Tax', fulfillment: 'Fulfillment', paymentDetails: 'Payment Details' } as const; | |
| export const MENU = { viewAccounting: 'View Accounting', createAdjustment: 'Create Adjustment', applyHold: 'Apply Hold', releaseHold: 'Release Hold', creditTransaction: 'Credit Transaction' } as const; | |
| /** | |
| * UI names the P2 case steps use that tests/ui-glossary.yaml does NOT list (9 Oct 2026). Not edited into the glossary (owned by the | |
| * Test Designer); scripts/check-glossary.js prints them as reported gaps. Names are copied verbatim from the case YAML steps. | |
| */ | |
| export const GLOSSARY_GAP = { | |
| holdName: 'Hold Name', overridePrice: 'Override Price', manageCmrs: 'Manage Credit Memo Requests', amount: 'Amount', promiseDate: 'Promise Date', | |
| recordPromise: 'Record Promise to Pay', createDispute: 'Create Dispute', managePriceLists: 'Manage Price Lists', managePricingStrategies: 'Manage Pricing Strategies', | |
| priceList: 'Price List', strategyName: 'Name', paymentTerms: 'Payment Terms', addressLine1: 'Address Line 1', applyOnAccount: 'Apply On Account', | |
| invoicingRule: 'Invoicing Rule', revenueRule: 'Revenue Scheduling Rule', asOfDate: 'As-of Date', mode: 'Mode', importProcess: 'Import Process', notifications: 'Notifications', | |
| } as const; | |
| export const TABLE = { | |
| orders: 'Orders', orderLines: 'Order Lines', priceBreakdown: 'Price Breakdown', lineTax: 'Line Tax', fulfillmentLines: 'Fulfillment Lines', creditHolds: 'Credit Holds', | |
| pickSlips: 'Pick Slips', shipments: 'Shipments', transactions: 'Transactions', taxLines: 'Tax Lines', transactionLines: 'Transaction Lines', journalLines: 'Journal Lines', | |
| openReceivables: 'Open Receivables', applications: 'Applications', receipts: 'Receipts', pendingAdjustments: 'Pending Adjustments', customers: 'Customers', bankAccounts: 'Bank Accounts', extensionLog: 'Extension Log', | |
| creditMemos: 'Credit Memos', revenueSchedule: 'Revenue Schedule', cmrs: 'Credit Memo Requests', collectionsTrx: 'Open Transactions', promises: 'Promises to Pay', disputes: 'Disputes', | |
| priceLists: 'Price Lists', priceListItems: 'Price List Items', pricingStrategies: 'Pricing Strategies', cards: 'Cards', holds: 'Holds', | |
| } as const; | |
| /** Read-only value cells (getByTestId only for values, per locator policy). */ | |
| export const TID = { | |
| orderNumber: 'o2c-order-number', orderStatus: 'o2c-order-status', orderSubtotal: 'o2c-order-subtotal', orderTax: 'o2c-order-tax', orderTotal: 'o2c-order-total', | |
| shipTo: 'o2c-ship-to', billTo: 'o2c-bill-to', shipmentStatus: 'o2c-shipment-status', trxNumber: 'o2c-trx-number', trxStatus: 'o2c-trx-status', trxTotal: 'o2c-trx-total', | |
| trxTax: 'o2c-trx-tax', trxSubtotal: 'o2c-trx-subtotal', trxBalance: 'o2c-trx-balance', trxDueDate: 'o2c-trx-due-date', trxShipTo: 'o2c-trx-ship-to', | |
| rcptNumber: 'o2c-rcpt-number', rcptStatus: 'o2c-rcpt-status', rcptUnapplied: 'o2c-rcpt-unapplied', lineStatus: (n: number) => `o2c-order-line-${n}-status`, | |
| shipInstructions: 'o2c-ship-instructions', ext: (field: string) => `o2c-ext-${field}`, | |
| orderVersion: 'o2c-order-version', overridePct: 'o2c-line-override-pct', priceApproval: 'o2c-line-price-approval', cmrStatus: 'o2c-cmr-status', cmrNumber: 'o2c-cmr-number', | |
| cmrCm: 'o2c-cmr-cm', cmrTrxBalance: 'o2c-cmr-trx-balance', cmrAmount: 'o2c-cmr-amount', custTerms: 'o2c-cust-terms', custReceiptMethod: 'o2c-cust-receipt-method', rcptOnAccount: 'o2c-rcpt-on-account', | |
| } as const; | |
| /** Synthetic seed values in the O2C mock pack (mock-app/modules/o2c/store.js). ASSUMED rules; never pod values. */ | |
| export const DATA = { | |
| bu: 'O2C-US1', otherBu: 'O2C-UK1', customer: 'ZZ_O2C_CUST (MOCK)', creditCustomer: 'ZZ_O2C_CREDIT (MOCK)', otherBuCustomer: 'ZZ_O2C_UK_CUST (MOCK)', | |
| item: 'ZZ_O2C_ITEM', uom: 'Each', shipFromOrg: 'ZZ-SHIP-ORG', subinventory: 'ZZ-STORES', releaseRule: 'ZZ Standard Release (MOCK)', | |
| orchestrationProcess: 'ZZ_DOO_ShipOrderGeneration (MOCK)', discountRule: 'ZZ 10% Customer Discount (MOCK)', taxRateCode: 'ZZ_US_SALES_8', | |
| exemptTaxRateCode: 'ZZ_US_EXEMPT_0', standardTaxClassification: 'ZZ Standard (MOCK)', exemptTaxClassification: 'ZZ Exempt (MOCK)', jurisdiction: 'US-TX (MOCK)', | |
| shipToSite: 'ZZ_O2C_CUST (MOCK) - Ship To (Austin TX)', paymentTerms: 'Net 30', paymentTermsDays: 30, arSourceOm: 'ZZ OM Import (MOCK)', | |
| arSourceManual: 'ZZ Manual (MOCK)', arTypeInvoice: 'Invoice', memoLine: 'ZZ Consulting Services (MOCK)', receiptMethod: 'ZZ Manual Check (MOCK)', | |
| lockbox: 'ZZ-LBX-01', adjustmentActivity: 'ZZ Small Balance Adjustment (MOCK)', ledger: 'US Primary Ledger (MOCK)', journalSource: 'Receivables', | |
| sourceSystem: 'ZZ_EXT_OMS', customerBankMasked: '****4321', | |
| // P2 seeds (store.js config; ASSUMED) | |
| overdueCustomer: 'ZZ_O2C_OVERDUE (MOCK)', noStockItem: 'ZZ_O2C_ITEM_NOSTOCK', manualHold: 'ZZ Manual Hold (MOCK)', altTerms: 'Net 45 (MOCK)', | |
| cardReceiptMethod: 'ZZ Credit Card (MOCK)', sandboxToken: 'tok_ZZ_SANDBOX_0001 (MOCK)', cardMasked: '************1111', arSourceImport: 'ZZ AR Import (MOCK)', | |
| revRule3m: 'ZZ 3 Month Deferral (MOCK)', invoicingRule: 'In Advance', revSource: 'ZZ OM Bundle Source (MOCK)', priceList: 'ZZ Corporate Price List (MOCK)', | |
| pricingStrategy: 'ZZ Corporate Strategy (MOCK)', currency: 'USD', testMailbox: 'zz-collections@example.invalid', bundleItemA: 'ZZ_REV_LICENSE_A', bundleItemB: 'ZZ_REV_SUPPORT_B', | |
| } as const; | |
| /** Line status display names in the mock (codes UNVERIFIED). */ | |
| export const LINE_STATUS = { awaitingShipping: 'Awaiting Shipping', pickReleased: 'Pick Released', shipped: 'Shipped' } as const; | |
| /** | |
| * UI names used in O2C case steps that tests/ui-glossary.yaml `o2c:` does not list yet (scheduled-process parameters, | |
| * search fields, dialog buttons). Kept explicit so scripts/check-glossary.js fails on any NEW unlisted name. Reported to | |
| * the Test Designer for glossary addition; 'Manage Journals' is in the glossary under r2r.tasks. | |
| */ | |