shutro-erp 0.3.4 → 0.3.6
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.
- package/dist/account_asset/.kosh/bindings.d.ts +22 -0
- package/dist/account_asset/.kosh/bindings.js +15 -0
- package/dist/account_asset/.kosh/schema.d.ts +1755 -0
- package/dist/account_asset/board.d.ts +61 -0
- package/dist/account_asset/board.js +86 -0
- package/dist/account_asset/books.d.ts +42 -0
- package/dist/account_asset/books.js +398 -0
- package/dist/account_asset/demo.d.ts +7 -0
- package/dist/account_asset/demo.js +72 -0
- package/dist/account_asset/index.d.ts +9 -0
- package/dist/account_asset/index.js +335 -0
- package/dist/account_asset/module.d.ts +7622 -0
- package/dist/account_asset/module.js +230 -0
- package/dist/account_budget/.kosh/bindings.d.ts +22 -0
- package/dist/account_budget/.kosh/bindings.js +15 -0
- package/dist/account_budget/.kosh/schema.d.ts +1767 -0
- package/dist/account_budget/budget.d.ts +5 -0
- package/dist/account_budget/budget.js +142 -0
- package/dist/account_budget/demo.d.ts +6 -0
- package/dist/account_budget/demo.js +30 -0
- package/dist/account_budget/index.d.ts +4 -0
- package/dist/account_budget/index.js +223 -0
- package/dist/account_budget/module.d.ts +13863 -0
- package/dist/account_budget/module.js +167 -0
- package/dist/account_portal/.kosh/bindings.js +1 -1
- package/dist/account_portal/.kosh/schema.d.ts +176 -6
- package/dist/account_portal/module.d.ts +505 -6
- package/dist/accounting/.kosh/bindings.js +1 -1
- package/dist/accounting/.kosh/schema.d.ts +176 -6
- package/dist/accounting/index.d.ts +1 -1
- package/dist/accounting/index.js +344 -4
- package/dist/accounting/module.d.ts +513 -5
- package/dist/accounting/module.js +55 -3
- package/dist/approvals/.kosh/bindings.d.ts +22 -0
- package/dist/approvals/.kosh/bindings.js +15 -0
- package/dist/approvals/.kosh/schema.d.ts +611 -0
- package/dist/approvals/index.d.ts +18 -0
- package/dist/approvals/index.js +302 -0
- package/dist/approvals/mails.d.ts +25 -0
- package/dist/approvals/mails.js +82 -0
- package/dist/approvals/module.d.ts +1 -0
- package/dist/approvals/module.js +12 -0
- package/dist/approvals/web/History.d.ts +4 -0
- package/dist/approvals/web/History.js +13 -0
- package/dist/approvals/web/Inbox.d.ts +9 -0
- package/dist/approvals/web/Inbox.js +114 -0
- package/dist/approvals/web/Mine.d.ts +7 -0
- package/dist/approvals/web/Mine.js +27 -0
- package/dist/approvals/web/index.d.ts +13 -0
- package/dist/approvals/web/index.js +22 -0
- package/dist/approvals/web/messages.d.ts +2 -0
- package/dist/approvals/web/messages.js +119 -0
- package/dist/approvals/web/shared.d.ts +59 -0
- package/dist/approvals/web/shared.js +46 -0
- package/dist/attendance/.kosh/bindings.d.ts +22 -0
- package/dist/attendance/.kosh/bindings.js +15 -0
- package/dist/attendance/.kosh/schema.d.ts +1048 -0
- package/dist/attendance/days.d.ts +96 -0
- package/dist/attendance/days.js +430 -0
- package/dist/attendance/demo.d.ts +7 -0
- package/dist/attendance/demo.js +58 -0
- package/dist/attendance/index.d.ts +4 -0
- package/dist/attendance/index.js +513 -0
- package/dist/attendance/module.d.ts +3969 -0
- package/dist/attendance/module.js +412 -0
- package/dist/attendance/routes.d.ts +16 -0
- package/dist/attendance/routes.js +266 -0
- package/dist/attendance/web/Check.d.ts +8 -0
- package/dist/attendance/web/Check.js +40 -0
- package/dist/attendance/web/Kiosk.d.ts +8 -0
- package/dist/attendance/web/Kiosk.js +62 -0
- package/dist/attendance/web/PinButton.d.ts +7 -0
- package/dist/attendance/web/PinButton.js +29 -0
- package/dist/attendance/web/index.d.ts +13 -0
- package/dist/attendance/web/index.js +22 -0
- package/dist/attendance/web/messages.d.ts +2 -0
- package/dist/attendance/web/messages.js +61 -0
- package/dist/calendar/.kosh/bindings.d.ts +22 -0
- package/dist/calendar/.kosh/bindings.js +15 -0
- package/dist/calendar/.kosh/schema.d.ts +795 -0
- package/dist/calendar/demo.d.ts +6 -0
- package/dist/calendar/demo.js +24 -0
- package/dist/calendar/index.d.ts +3 -0
- package/dist/calendar/index.js +291 -0
- package/dist/calendar/module.d.ts +1705 -0
- package/dist/calendar/module.js +180 -0
- package/dist/cli/init.js +80 -0
- package/dist/cli/templates.d.ts +1 -1
- package/dist/cli/templates.js +226 -0
- package/dist/contacts/.kosh/bindings.js +1 -1
- package/dist/contacts/.kosh/schema.d.ts +78 -3
- package/dist/contacts/demo.js +30 -1
- package/dist/contacts/index.d.ts +1 -1
- package/dist/contacts/index.js +155 -9
- package/dist/contacts/module.d.ts +338 -2
- package/dist/contacts/module.js +93 -5
- package/dist/crm/.kosh/bindings.d.ts +22 -0
- package/dist/crm/.kosh/bindings.js +15 -0
- package/dist/crm/.kosh/schema.d.ts +800 -0
- package/dist/crm/demo.d.ts +6 -0
- package/dist/crm/demo.js +45 -0
- package/dist/crm/index.d.ts +3 -0
- package/dist/crm/index.js +361 -0
- package/dist/crm/module.d.ts +1845 -0
- package/dist/crm/module.js +208 -0
- package/dist/documents/.kosh/bindings.d.ts +22 -0
- package/dist/documents/.kosh/bindings.js +15 -0
- package/dist/documents/.kosh/schema.d.ts +862 -0
- package/dist/documents/demo.d.ts +6 -0
- package/dist/documents/demo.js +22 -0
- package/dist/documents/documents.d.ts +98 -0
- package/dist/documents/documents.js +318 -0
- package/dist/documents/index.d.ts +30 -0
- package/dist/documents/index.js +442 -0
- package/dist/documents/module.d.ts +2781 -0
- package/dist/documents/module.js +214 -0
- package/dist/documents/web/Versions.d.ts +7 -0
- package/dist/documents/web/Versions.js +45 -0
- package/dist/documents/web/index.d.ts +11 -0
- package/dist/documents/web/index.js +16 -0
- package/dist/documents/web/messages.d.ts +2 -0
- package/dist/documents/web/messages.js +21 -0
- package/dist/event/.kosh/bindings.d.ts +22 -0
- package/dist/event/.kosh/bindings.js +15 -0
- package/dist/event/.kosh/schema.d.ts +843 -0
- package/dist/event/demo.d.ts +6 -0
- package/dist/event/demo.js +65 -0
- package/dist/event/index.d.ts +14 -0
- package/dist/event/index.js +333 -0
- package/dist/event/mails.d.ts +15 -0
- package/dist/event/mails.js +112 -0
- package/dist/event/module.d.ts +2800 -0
- package/dist/event/module.js +323 -0
- package/dist/event/web/CheckInBox.d.ts +9 -0
- package/dist/event/web/CheckInBox.js +87 -0
- package/dist/event/web/index.d.ts +11 -0
- package/dist/event/web/index.js +16 -0
- package/dist/event/web/messages.d.ts +2 -0
- package/dist/event/web/messages.js +23 -0
- package/dist/event_account/.kosh/bindings.d.ts +22 -0
- package/dist/event_account/.kosh/bindings.js +15 -0
- package/dist/event_account/.kosh/schema.d.ts +1758 -0
- package/dist/event_account/index.d.ts +3 -0
- package/dist/event_account/index.js +28 -0
- package/dist/event_account/module.d.ts +7114 -0
- package/dist/event_account/module.js +90 -0
- package/dist/expense/.kosh/bindings.d.ts +22 -0
- package/dist/expense/.kosh/bindings.js +15 -0
- package/dist/expense/.kosh/schema.d.ts +1299 -0
- package/dist/expense/demo.d.ts +7 -0
- package/dist/expense/demo.js +69 -0
- package/dist/expense/index.d.ts +3 -0
- package/dist/expense/index.js +495 -0
- package/dist/expense/module.d.ts +4747 -0
- package/dist/expense/module.js +647 -0
- package/dist/expense_account/.kosh/bindings.d.ts +22 -0
- package/dist/expense_account/.kosh/bindings.js +15 -0
- package/dist/expense_account/.kosh/schema.d.ts +1936 -0
- package/dist/expense_account/index.d.ts +3 -0
- package/dist/expense_account/index.js +74 -0
- package/dist/expense_account/module.d.ts +9153 -0
- package/dist/expense_account/module.js +318 -0
- package/dist/helpdesk/.kosh/bindings.d.ts +22 -0
- package/dist/helpdesk/.kosh/bindings.js +15 -0
- package/dist/helpdesk/.kosh/schema.d.ts +885 -0
- package/dist/helpdesk/demo.d.ts +7 -0
- package/dist/helpdesk/demo.js +65 -0
- package/dist/helpdesk/hours.d.ts +17 -0
- package/dist/helpdesk/hours.js +94 -0
- package/dist/helpdesk/index.d.ts +10 -0
- package/dist/helpdesk/index.js +461 -0
- package/dist/helpdesk/module.d.ts +2940 -0
- package/dist/helpdesk/module.js +326 -0
- package/dist/helpdesk/routes.d.ts +12 -0
- package/dist/helpdesk/routes.js +132 -0
- package/dist/helpdesk/sla.d.ts +37 -0
- package/dist/helpdesk/sla.js +226 -0
- package/dist/hr/.kosh/bindings.d.ts +22 -0
- package/dist/hr/.kosh/bindings.js +15 -0
- package/dist/hr/.kosh/schema.d.ts +878 -0
- package/dist/hr/demo.d.ts +6 -0
- package/dist/hr/demo.js +60 -0
- package/dist/hr/index.d.ts +3 -0
- package/dist/hr/index.js +483 -0
- package/dist/hr/module.d.ts +2611 -0
- package/dist/hr/module.js +350 -0
- package/dist/l10n_bd/.kosh/bindings.js +1 -1
- package/dist/l10n_bd/.kosh/schema.d.ts +176 -6
- package/dist/l10n_bd/module.d.ts +505 -6
- package/dist/l10n_bd_payroll/.kosh/bindings.d.ts +22 -0
- package/dist/l10n_bd_payroll/.kosh/bindings.js +15 -0
- package/dist/l10n_bd_payroll/.kosh/schema.d.ts +2312 -0
- package/dist/l10n_bd_payroll/data.d.ts +47 -0
- package/dist/l10n_bd_payroll/data.js +347 -0
- package/dist/l10n_bd_payroll/index.d.ts +4 -0
- package/dist/l10n_bd_payroll/index.js +24 -0
- package/dist/l10n_bd_payroll/module.d.ts +12932 -0
- package/dist/l10n_bd_payroll/module.js +86 -0
- package/dist/l10n_in/.kosh/bindings.js +1 -1
- package/dist/l10n_in/.kosh/schema.d.ts +176 -6
- package/dist/l10n_in/module.d.ts +527 -7
- package/dist/mail/inbound/handle.js +6 -1
- package/dist/maintenance/.kosh/bindings.d.ts +22 -0
- package/dist/maintenance/.kosh/bindings.js +15 -0
- package/dist/maintenance/.kosh/schema.d.ts +911 -0
- package/dist/maintenance/demo.d.ts +6 -0
- package/dist/maintenance/demo.js +60 -0
- package/dist/maintenance/index.d.ts +3 -0
- package/dist/maintenance/index.js +422 -0
- package/dist/maintenance/module.d.ts +3545 -0
- package/dist/maintenance/module.js +446 -0
- package/dist/maintenance_stock/.kosh/bindings.d.ts +22 -0
- package/dist/maintenance_stock/.kosh/bindings.js +15 -0
- package/dist/maintenance_stock/.kosh/schema.d.ts +1446 -0
- package/dist/maintenance_stock/index.d.ts +9 -0
- package/dist/maintenance_stock/index.js +52 -0
- package/dist/maintenance_stock/module.d.ts +7675 -0
- package/dist/maintenance_stock/module.js +192 -0
- package/dist/modules-sdk/index.d.ts +1 -1
- package/dist/modules-sdk/manifest.d.ts +109 -2
- package/dist/modules-sdk/manifest.js +35 -1
- package/dist/mrp/.kosh/bindings.d.ts +22 -0
- package/dist/mrp/.kosh/bindings.js +15 -0
- package/dist/mrp/.kosh/schema.d.ts +1453 -0
- package/dist/mrp/demo.d.ts +7 -0
- package/dist/mrp/demo.js +42 -0
- package/dist/mrp/index.d.ts +3 -0
- package/dist/mrp/index.js +393 -0
- package/dist/mrp/module.d.ts +9335 -0
- package/dist/mrp/module.js +757 -0
- package/dist/mrp_account/.kosh/bindings.d.ts +22 -0
- package/dist/mrp_account/.kosh/bindings.js +15 -0
- package/dist/mrp_account/.kosh/schema.d.ts +2299 -0
- package/dist/mrp_account/index.d.ts +3 -0
- package/dist/mrp_account/index.js +22 -0
- package/dist/mrp_account/module.d.ts +23151 -0
- package/dist/mrp_account/module.js +123 -0
- package/dist/payment/.kosh/bindings.js +1 -1
- package/dist/payment/.kosh/schema.d.ts +178 -7
- package/dist/payment/index.d.ts +41 -0
- package/dist/payment/index.js +131 -74
- package/dist/payment/module.d.ts +569 -12
- package/dist/payment/module.js +19 -3
- package/dist/payment/settle.js +10 -1
- package/dist/payroll/.kosh/bindings.d.ts +22 -0
- package/dist/payroll/.kosh/bindings.js +15 -0
- package/dist/payroll/.kosh/schema.d.ts +1390 -0
- package/dist/payroll/compute.d.ts +35 -0
- package/dist/payroll/compute.js +398 -0
- package/dist/payroll/demo.d.ts +55 -0
- package/dist/payroll/demo.js +121 -0
- package/dist/payroll/formula.d.ts +62 -0
- package/dist/payroll/formula.js +320 -0
- package/dist/payroll/index.d.ts +230 -0
- package/dist/payroll/index.js +713 -0
- package/dist/payroll/module.d.ts +9390 -0
- package/dist/payroll/module.js +606 -0
- package/dist/payroll/routes.d.ts +10 -0
- package/dist/payroll/routes.js +112 -0
- package/dist/payroll_account/.kosh/bindings.d.ts +22 -0
- package/dist/payroll_account/.kosh/bindings.js +15 -0
- package/dist/payroll_account/.kosh/schema.d.ts +2308 -0
- package/dist/payroll_account/index.d.ts +3 -0
- package/dist/payroll_account/index.js +40 -0
- package/dist/payroll_account/module.d.ts +12396 -0
- package/dist/payroll_account/module.js +256 -0
- package/dist/permissions/approvals.d.ts +131 -9
- package/dist/permissions/approvals.js +662 -57
- package/dist/permissions/index.d.ts +1 -1
- package/dist/permissions/index.js +2 -2
- package/dist/permissions/models.js +191 -12
- package/dist/permissions/routes.d.ts +6 -1
- package/dist/permissions/routes.js +37 -4
- package/dist/permissions/web/ApprovalPanel.d.ts +5 -4
- package/dist/permissions/web/ApprovalPanel.js +39 -13
- package/dist/permissions/web/index.d.ts +6 -4
- package/dist/permissions/web/index.js +13 -4
- package/dist/permissions/web/messages.d.ts +2 -0
- package/dist/permissions/web/messages.js +43 -0
- package/dist/portal/.kosh/bindings.js +1 -1
- package/dist/portal/.kosh/schema.d.ts +78 -3
- package/dist/portal/index.js +1 -1
- package/dist/portal/module.d.ts +166 -2
- package/dist/pos/.kosh/bindings.d.ts +22 -0
- package/dist/pos/.kosh/bindings.js +15 -0
- package/dist/pos/.kosh/schema.d.ts +1809 -0
- package/dist/pos/accounting.d.ts +10 -0
- package/dist/pos/accounting.js +149 -0
- package/dist/pos/demo.d.ts +6 -0
- package/dist/pos/demo.js +90 -0
- package/dist/pos/index.d.ts +9 -0
- package/dist/pos/index.js +353 -0
- package/dist/pos/module.d.ts +9783 -0
- package/dist/pos/module.js +423 -0
- package/dist/pos/routes.d.ts +39 -0
- package/dist/pos/routes.js +368 -0
- package/dist/pos/web/Register.d.ts +9 -0
- package/dist/pos/web/Register.js +252 -0
- package/dist/pos/web/index.d.ts +11 -0
- package/dist/pos/web/index.js +16 -0
- package/dist/pos/web/messages.d.ts +2 -0
- package/dist/pos/web/messages.js +87 -0
- package/dist/pos_stock/.kosh/bindings.d.ts +22 -0
- package/dist/pos_stock/.kosh/bindings.js +15 -0
- package/dist/pos_stock/.kosh/schema.d.ts +2208 -0
- package/dist/pos_stock/index.d.ts +9 -0
- package/dist/pos_stock/index.js +35 -0
- package/dist/pos_stock/module.d.ts +12803 -0
- package/dist/pos_stock/module.js +115 -0
- package/dist/product/.kosh/bindings.js +1 -1
- package/dist/product/.kosh/schema.d.ts +52 -1
- package/dist/product/index.js +94 -4
- package/dist/product/module.d.ts +45 -1
- package/dist/product/module.js +11 -3
- package/dist/project/.kosh/bindings.js +1 -1
- package/dist/project/.kosh/schema.d.ts +725 -3
- package/dist/project/index.d.ts +3 -1
- package/dist/project/index.js +1045 -18
- package/dist/project/module.d.ts +10168 -458
- package/dist/project/module.js +1578 -14
- package/dist/project/routes.d.ts +44 -0
- package/dist/project/routes.js +314 -0
- package/dist/project/schedule.d.ts +72 -0
- package/dist/project/schedule.js +192 -0
- package/dist/project/web/Refresh.d.ts +8 -0
- package/dist/project/web/Refresh.js +29 -0
- package/dist/project/web/Schedule.d.ts +9 -0
- package/dist/project/web/Schedule.js +93 -0
- package/dist/project/web/Structure.d.ts +8 -0
- package/dist/project/web/Structure.js +86 -0
- package/dist/project/web/Workload.d.ts +8 -0
- package/dist/project/web/Workload.js +43 -0
- package/dist/project/web/index.d.ts +14 -0
- package/dist/project/web/index.js +25 -0
- package/dist/project/web/messages.d.ts +2 -0
- package/dist/project/web/messages.js +85 -0
- package/dist/project_account/.kosh/bindings.d.ts +22 -0
- package/dist/project_account/.kosh/bindings.js +15 -0
- package/dist/project_account/.kosh/schema.d.ts +2241 -0
- package/dist/project_account/index.d.ts +3 -0
- package/dist/project_account/index.js +27 -0
- package/dist/project_account/module.d.ts +11539 -0
- package/dist/project_account/module.js +76 -0
- package/dist/project_portal/.kosh/bindings.js +1 -1
- package/dist/project_portal/.kosh/schema.d.ts +725 -3
- package/dist/project_portal/module.d.ts +5137 -119
- package/dist/project_purchase/.kosh/bindings.d.ts +22 -0
- package/dist/project_purchase/.kosh/bindings.js +15 -0
- package/dist/project_purchase/.kosh/schema.d.ts +2320 -0
- package/dist/project_purchase/index.d.ts +9 -0
- package/dist/project_purchase/index.js +22 -0
- package/dist/project_purchase/module.d.ts +25147 -0
- package/dist/project_purchase/module.js +56 -0
- package/dist/purchase/.kosh/bindings.js +1 -1
- package/dist/purchase/.kosh/schema.d.ts +150 -6
- package/dist/purchase/index.js +163 -3
- package/dist/purchase/module.d.ts +228 -5
- package/dist/purchase/module.js +30 -3
- package/dist/purchase_account/.kosh/bindings.js +1 -1
- package/dist/purchase_account/.kosh/schema.d.ts +180 -8
- package/dist/purchase_account/index.js +27 -1
- package/dist/purchase_account/module.d.ts +591 -30
- package/dist/purchase_account/module.js +13 -2
- package/dist/purchase_portal/.kosh/bindings.js +1 -1
- package/dist/purchase_portal/.kosh/schema.d.ts +150 -6
- package/dist/purchase_portal/module.d.ts +372 -6
- package/dist/purchase_stock/.kosh/bindings.d.ts +22 -0
- package/dist/purchase_stock/.kosh/bindings.js +15 -0
- package/dist/purchase_stock/.kosh/schema.d.ts +1479 -0
- package/dist/purchase_stock/index.d.ts +7 -0
- package/dist/purchase_stock/index.js +98 -0
- package/dist/purchase_stock/module.d.ts +7535 -0
- package/dist/purchase_stock/module.js +380 -0
- package/dist/purchase_stock_account/.kosh/bindings.d.ts +22 -0
- package/dist/purchase_stock_account/.kosh/bindings.js +15 -0
- package/dist/purchase_stock_account/.kosh/schema.d.ts +2155 -0
- package/dist/purchase_stock_account/index.d.ts +3 -0
- package/dist/purchase_stock_account/index.js +24 -0
- package/dist/purchase_stock_account/module.d.ts +38015 -0
- package/dist/purchase_stock_account/module.js +168 -0
- package/dist/recruitment/.kosh/bindings.d.ts +22 -0
- package/dist/recruitment/.kosh/bindings.js +15 -0
- package/dist/recruitment/.kosh/schema.d.ts +991 -0
- package/dist/recruitment/demo.d.ts +6 -0
- package/dist/recruitment/demo.js +45 -0
- package/dist/recruitment/index.d.ts +3 -0
- package/dist/recruitment/index.js +385 -0
- package/dist/recruitment/module.d.ts +3249 -0
- package/dist/recruitment/module.js +194 -0
- package/dist/recruitment/web/HireButton.d.ts +9 -0
- package/dist/recruitment/web/HireButton.js +32 -0
- package/dist/recruitment/web/index.d.ts +11 -0
- package/dist/recruitment/web/index.js +16 -0
- package/dist/recruitment/web/messages.d.ts +2 -0
- package/dist/recruitment/web/messages.js +19 -0
- package/dist/reporting/documents.d.ts +5 -0
- package/dist/reporting/documents.js +28 -1
- package/dist/reporting/index.d.ts +1 -1
- package/dist/reporting/index.js +4 -2
- package/dist/reporting/models.js +9 -0
- package/dist/reporting/overviews.d.ts +16 -0
- package/dist/reporting/overviews.js +56 -0
- package/dist/reporting/routes-documents.js +1 -1
- package/dist/reporting/routes.js +138 -80
- package/dist/reporting/web/DashboardView.d.ts +11 -0
- package/dist/reporting/web/DashboardView.js +2 -2
- package/dist/reporting/web/DesignerView.js +5 -0
- package/dist/reporting/web/Overview.d.ts +9 -0
- package/dist/reporting/web/Overview.js +53 -0
- package/dist/reporting/web/index.d.ts +1 -0
- package/dist/reporting/web/index.js +4 -1
- package/dist/reporting/web/messages.js +9 -0
- package/dist/sale_account/.kosh/bindings.js +1 -1
- package/dist/sale_account/.kosh/schema.d.ts +181 -6
- package/dist/sale_account/index.js +22 -1
- package/dist/sale_account/module.d.ts +639 -38
- package/dist/sale_portal/.kosh/bindings.js +1 -1
- package/dist/sale_portal/.kosh/schema.d.ts +59 -3
- package/dist/sale_portal/module.d.ts +435 -5
- package/dist/sale_project/.kosh/bindings.js +1 -1
- package/dist/sale_project/.kosh/schema.d.ts +732 -3
- package/dist/sale_project/module.d.ts +5349 -208
- package/dist/sale_project/module.js +17 -1
- package/dist/sale_stock/.kosh/bindings.d.ts +22 -0
- package/dist/sale_stock/.kosh/bindings.js +15 -0
- package/dist/sale_stock/.kosh/schema.d.ts +1303 -0
- package/dist/sale_stock/index.d.ts +7 -0
- package/dist/sale_stock/index.js +84 -0
- package/dist/sale_stock/module.d.ts +7514 -0
- package/dist/sale_stock/module.js +146 -0
- package/dist/sales/.kosh/bindings.js +1 -1
- package/dist/sales/.kosh/schema.d.ts +59 -3
- package/dist/sales/index.js +195 -4
- package/dist/sales/module.d.ts +356 -3
- package/dist/sales/module.js +78 -3
- package/dist/server/api/metadata.d.ts +5 -0
- package/dist/server/api/metadata.js +5 -0
- package/dist/server/api/rest.js +64 -1
- package/dist/server/api/views.js +1 -0
- package/dist/server/app-settings.d.ts +7 -0
- package/dist/server/app-settings.js +10 -0
- package/dist/server/auth/base.js +9 -0
- package/dist/server/index.d.ts +1 -0
- package/dist/server/index.js +1 -0
- package/dist/settings/app-settings.d.ts +2 -0
- package/dist/settings/app-settings.js +518 -0
- package/dist/settings/index.d.ts +1 -0
- package/dist/settings/index.js +15 -0
- package/dist/settings/people.js +29 -5
- package/dist/settings/web/AppSettingsPage.d.ts +11 -0
- package/dist/settings/web/AppSettingsPage.js +210 -0
- package/dist/settings/web/OverviewPage.js +16 -3
- package/dist/settings/web/PeoplePage.js +20 -6
- package/dist/settings/web/index.d.ts +1 -0
- package/dist/settings/web/index.js +3 -0
- package/dist/settings/web/messages.js +118 -2
- package/dist/sign/.kosh/bindings.d.ts +22 -0
- package/dist/sign/.kosh/bindings.js +15 -0
- package/dist/sign/.kosh/schema.d.ts +990 -0
- package/dist/sign/index.d.ts +14 -0
- package/dist/sign/index.js +350 -0
- package/dist/sign/module.d.ts +4478 -0
- package/dist/sign/module.js +158 -0
- package/dist/sign/sign.d.ts +82 -0
- package/dist/sign/sign.js +474 -0
- package/dist/stock/.kosh/bindings.d.ts +22 -0
- package/dist/stock/.kosh/bindings.js +15 -0
- package/dist/stock/.kosh/schema.d.ts +1222 -0
- package/dist/stock/demo.d.ts +8 -0
- package/dist/stock/demo.js +82 -0
- package/dist/stock/index.d.ts +4 -0
- package/dist/stock/index.js +903 -0
- package/dist/stock/module.d.ts +7856 -0
- package/dist/stock/module.js +1880 -0
- package/dist/stock/replenish.d.ts +38 -0
- package/dist/stock/replenish.js +176 -0
- package/dist/stock/web/Replenishment.d.ts +8 -0
- package/dist/stock/web/Replenishment.js +84 -0
- package/dist/stock/web/ScanBox.d.ts +8 -0
- package/dist/stock/web/ScanBox.js +90 -0
- package/dist/stock/web/index.d.ts +13 -0
- package/dist/stock/web/index.js +20 -0
- package/dist/stock/web/messages.d.ts +2 -0
- package/dist/stock/web/messages.js +77 -0
- package/dist/stock_account/.kosh/bindings.d.ts +22 -0
- package/dist/stock_account/.kosh/bindings.js +15 -0
- package/dist/stock_account/.kosh/schema.d.ts +2068 -0
- package/dist/stock_account/index.d.ts +3 -0
- package/dist/stock_account/index.js +140 -0
- package/dist/stock_account/module.d.ts +11523 -0
- package/dist/stock_account/module.js +339 -0
- package/dist/storage/attachments.d.ts +5 -0
- package/dist/storage/attachments.js +12 -1
- package/dist/storage/models.js +3 -0
- package/dist/storage/routes.js +13 -2
- package/dist/todo/.kosh/bindings.d.ts +22 -0
- package/dist/todo/.kosh/bindings.js +15 -0
- package/dist/todo/.kosh/schema.d.ts +732 -0
- package/dist/todo/demo.d.ts +6 -0
- package/dist/todo/demo.js +35 -0
- package/dist/todo/index.d.ts +3 -0
- package/dist/todo/index.js +187 -0
- package/dist/todo/module.d.ts +1180 -0
- package/dist/todo/module.js +130 -0
- package/dist/trade_finance/.kosh/bindings.d.ts +22 -0
- package/dist/trade_finance/.kosh/bindings.js +15 -0
- package/dist/trade_finance/.kosh/schema.d.ts +884 -0
- package/dist/trade_finance/demo.d.ts +6 -0
- package/dist/trade_finance/demo.js +63 -0
- package/dist/trade_finance/index.d.ts +3 -0
- package/dist/trade_finance/index.js +415 -0
- package/dist/trade_finance/module.d.ts +3779 -0
- package/dist/trade_finance/module.js +507 -0
- package/dist/trade_finance_account/.kosh/bindings.d.ts +22 -0
- package/dist/trade_finance_account/.kosh/bindings.js +15 -0
- package/dist/trade_finance_account/.kosh/schema.d.ts +1830 -0
- package/dist/trade_finance_account/index.d.ts +3 -0
- package/dist/trade_finance_account/index.js +93 -0
- package/dist/trade_finance_account/module.d.ts +8074 -0
- package/dist/trade_finance_account/module.js +245 -0
- package/dist/trade_finance_purchase/.kosh/bindings.d.ts +22 -0
- package/dist/trade_finance_purchase/.kosh/bindings.js +15 -0
- package/dist/trade_finance_purchase/.kosh/schema.d.ts +1246 -0
- package/dist/trade_finance_purchase/index.d.ts +8 -0
- package/dist/trade_finance_purchase/index.js +50 -0
- package/dist/trade_finance_purchase/module.d.ts +4257 -0
- package/dist/trade_finance_purchase/module.js +44 -0
- package/dist/trade_finance_sale/.kosh/bindings.d.ts +22 -0
- package/dist/trade_finance_sale/.kosh/bindings.js +15 -0
- package/dist/trade_finance_sale/.kosh/schema.d.ts +1072 -0
- package/dist/trade_finance_sale/index.d.ts +8 -0
- package/dist/trade_finance_sale/index.js +50 -0
- package/dist/trade_finance_sale/module.d.ts +4281 -0
- package/dist/trade_finance_sale/module.js +44 -0
- package/dist/ui/api.d.ts +2 -1
- package/dist/ui/api.js +2 -1
- package/dist/ui/app.js +26 -13
- package/dist/ui/components/AppIcon.js +30 -1
- package/dist/ui/components/primitives.d.ts +2 -0
- package/dist/ui/components/primitives.js +7 -1
- package/dist/ui/i18n/messages.d.ts +27 -0
- package/dist/ui/i18n/messages.js +46 -0
- package/dist/ui/index.d.ts +1 -0
- package/dist/ui/index.js +1 -0
- package/dist/ui/offline/queue.d.ts +5 -1
- package/dist/ui/offline/queue.js +2 -0
- package/dist/ui/registry.d.ts +5 -0
- package/dist/ui/shell/Home.js +55 -4
- package/dist/ui/views/FormView.js +102 -19
- package/dist/ui/views/KanbanView.d.ts +2 -0
- package/dist/ui/views/KanbanView.js +40 -3
- package/dist/ui/views/ListView.js +110 -11
- package/dist/ui/views/StatsRow.d.ts +14 -0
- package/dist/ui/views/StatsRow.js +88 -0
- package/dist/ui/views/widgets.d.ts +2 -1
- package/dist/ui/views/widgets.js +200 -1
- package/dist/views/builders.d.ts +19 -2
- package/dist/views/builders.js +21 -1
- package/dist/views/condition.d.ts +6 -0
- package/dist/views/condition.js +20 -0
- package/dist/views/documents.d.ts +8 -0
- package/dist/views/extend.d.ts +2 -2
- package/dist/views/extend.js +11 -1
- package/dist/views/index.d.ts +2 -2
- package/dist/views/index.js +2 -2
- package/dist/views/types.d.ts +52 -5
- package/dist/views/validate.js +39 -1
- package/dist/website/.kosh/bindings.d.ts +22 -0
- package/dist/website/.kosh/bindings.js +15 -0
- package/dist/website/.kosh/schema.d.ts +881 -0
- package/dist/website/demo.d.ts +6 -0
- package/dist/website/demo.js +115 -0
- package/dist/website/index.d.ts +9 -0
- package/dist/website/index.js +251 -0
- package/dist/website/module.d.ts +2987 -0
- package/dist/website/module.js +282 -0
- package/dist/website/render.d.ts +45 -0
- package/dist/website/render.js +102 -0
- package/dist/website/routes.d.ts +12 -0
- package/dist/website/routes.js +246 -0
- package/dist/website/web/PagePreview.d.ts +7 -0
- package/dist/website/web/PagePreview.js +33 -0
- package/dist/website/web/index.d.ts +11 -0
- package/dist/website/web/index.js +16 -0
- package/dist/website/web/messages.d.ts +2 -0
- package/dist/website/web/messages.js +15 -0
- package/dist/website_crm/.kosh/bindings.d.ts +22 -0
- package/dist/website_crm/.kosh/bindings.js +15 -0
- package/dist/website_crm/.kosh/schema.d.ts +967 -0
- package/dist/website_crm/index.d.ts +3 -0
- package/dist/website_crm/index.js +39 -0
- package/dist/website_crm/module.d.ts +2956 -0
- package/dist/website_crm/module.js +44 -0
- package/dist/website_sale/.kosh/bindings.d.ts +22 -0
- package/dist/website_sale/.kosh/bindings.js +15 -0
- package/dist/website_sale/.kosh/schema.d.ts +2284 -0
- package/dist/website_sale/couriers.d.ts +50 -0
- package/dist/website_sale/couriers.js +59 -0
- package/dist/website_sale/demo.d.ts +7 -0
- package/dist/website_sale/demo.js +90 -0
- package/dist/website_sale/growth.d.ts +31 -0
- package/dist/website_sale/growth.js +163 -0
- package/dist/website_sale/index.d.ts +49 -0
- package/dist/website_sale/index.js +538 -0
- package/dist/website_sale/module.d.ts +22027 -0
- package/dist/website_sale/module.js +397 -0
- package/dist/website_sale/shipments.d.ts +16 -0
- package/dist/website_sale/shipments.js +113 -0
- package/dist/website_sale/shop.d.ts +81 -0
- package/dist/website_sale/shop.js +649 -0
- package/dist/website_sale_stock/.kosh/bindings.d.ts +22 -0
- package/dist/website_sale_stock/.kosh/bindings.js +15 -0
- package/dist/website_sale_stock/.kosh/schema.d.ts +2681 -0
- package/dist/website_sale_stock/index.d.ts +9 -0
- package/dist/website_sale_stock/index.js +20 -0
- package/dist/website_sale_stock/module.d.ts +24998 -0
- package/dist/website_sale_stock/module.js +28 -0
- package/package.json +200 -2
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The data layer of Hiring (RFC 0021): openings for Workforce positions with their headcount, applicants moving
|
|
3
|
+
* through stages, and interviewers' scorecards — each interviewer sees only their own, so no opinion steers the next;
|
|
4
|
+
* the applicant's average rating shows to everyone. One email applies once per opening. Expected salaries are for
|
|
5
|
+
* hiring managers only.
|
|
6
|
+
*/
|
|
7
|
+
import { hrShutro } from '../hr/index.js';
|
|
8
|
+
import { orm } from '../server/orm.js';
|
|
9
|
+
import { check, compute, defineModel, defineModule, f, record, } from './.kosh/bindings.js';
|
|
10
|
+
const READ = ['read'];
|
|
11
|
+
const ALL = ['read', 'write', 'create', 'unlink'];
|
|
12
|
+
const me = { $env: 'uid' };
|
|
13
|
+
export const HiringStage = defineModel('hiring.stage', {
|
|
14
|
+
label: 'Hiring stage',
|
|
15
|
+
archivable: true,
|
|
16
|
+
recName: 'name',
|
|
17
|
+
order: ['sequence asc', 'id asc'],
|
|
18
|
+
access: { 'hiring.user': READ, 'hiring.manager': ALL },
|
|
19
|
+
fields: {
|
|
20
|
+
name: f.char({ required: true, translate: true }),
|
|
21
|
+
sequence: f.integer({ required: true, default: 10 }),
|
|
22
|
+
fold: f.boolean({ default: false, label: 'Folded on the board' }),
|
|
23
|
+
/** Applicants here were hired: the stage the hire step moves them to. */
|
|
24
|
+
hired: f.boolean({ default: false }),
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
export const HiringOpening = defineModel('hiring.opening', {
|
|
28
|
+
label: 'Opening',
|
|
29
|
+
recName: 'name',
|
|
30
|
+
order: ['state asc', 'name asc'],
|
|
31
|
+
companyScoped: { required: true },
|
|
32
|
+
tracking: ['state', 'headcount', 'manager'],
|
|
33
|
+
access: { 'hiring.user': READ, 'hiring.manager': ALL },
|
|
34
|
+
fields: {
|
|
35
|
+
name: f.char({ required: true, label: 'Opening' }),
|
|
36
|
+
job: f.many2one('hr.job', { ondelete: 'set null', label: 'Position' }),
|
|
37
|
+
department: f.many2one('hr.department', { ondelete: 'set null' }),
|
|
38
|
+
manager: f.many2one('res.users', {
|
|
39
|
+
default: (env) => env.userId,
|
|
40
|
+
label: 'Hiring manager',
|
|
41
|
+
}),
|
|
42
|
+
headcount: f.integer({ required: true, default: 1, label: 'To hire' }),
|
|
43
|
+
hiredCount: f.integer({
|
|
44
|
+
store: true,
|
|
45
|
+
label: 'Hired',
|
|
46
|
+
...compute('hiring.opening', 'hiredCount', ['applicants.employee'], (openings) => {
|
|
47
|
+
for (const o of openings)
|
|
48
|
+
o.hiredCount = o.applicants.filter((a) => a.employee !== null).length;
|
|
49
|
+
}),
|
|
50
|
+
}),
|
|
51
|
+
applicants: f.one2many('hiring.applicant', 'opening'),
|
|
52
|
+
description: f.text(),
|
|
53
|
+
state: f.state({
|
|
54
|
+
states: { open: 'Open', closed: 'Closed' },
|
|
55
|
+
initial: 'open',
|
|
56
|
+
transitions: {
|
|
57
|
+
close: { from: ['open'], to: 'closed' },
|
|
58
|
+
reopen: { from: ['closed'], to: 'open' },
|
|
59
|
+
},
|
|
60
|
+
}),
|
|
61
|
+
},
|
|
62
|
+
sqlConstraints: {
|
|
63
|
+
headcountPositive: {
|
|
64
|
+
check: orm.sql `headcount > 0`,
|
|
65
|
+
message: 'An opening hires at least one person.',
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
});
|
|
69
|
+
export const HiringApplicant = defineModel('hiring.applicant', {
|
|
70
|
+
label: 'Applicant',
|
|
71
|
+
recName: 'name',
|
|
72
|
+
order: ['id desc'],
|
|
73
|
+
companyScoped: { required: true },
|
|
74
|
+
tracking: ['stage', 'refused', 'employee'],
|
|
75
|
+
access: {
|
|
76
|
+
'hiring.user': ['read', 'write', 'create'],
|
|
77
|
+
'hiring.manager': [...ALL, 'export', 'import'],
|
|
78
|
+
},
|
|
79
|
+
fields: {
|
|
80
|
+
name: f.char({ required: true, label: 'Candidate' }),
|
|
81
|
+
email: f.char({ required: true }),
|
|
82
|
+
phone: f.char(),
|
|
83
|
+
opening: f.many2one('hiring.opening', { required: true, ondelete: 'cascade' }),
|
|
84
|
+
stage: f.many2one('hiring.stage', { ondelete: 'restrict' }),
|
|
85
|
+
source: f.selection({
|
|
86
|
+
website: 'Website',
|
|
87
|
+
referral: 'Referral',
|
|
88
|
+
job_board: 'Job board',
|
|
89
|
+
linkedin: 'LinkedIn',
|
|
90
|
+
agency: 'Agency',
|
|
91
|
+
other: 'Other',
|
|
92
|
+
}, {}),
|
|
93
|
+
expectedSalary: f.decimal({ scale: 2, label: 'Expected salary', groups: ['hiring.manager'] }),
|
|
94
|
+
refused: f.boolean({ default: false }),
|
|
95
|
+
refuseReason: f.char({ label: 'Refused because' }),
|
|
96
|
+
scorecards: f.one2many('hiring.scorecard', 'applicant'),
|
|
97
|
+
/** The average score of the scorecards, out of 5 (null before the first). */
|
|
98
|
+
rating: f.decimal({
|
|
99
|
+
scale: 1,
|
|
100
|
+
store: true,
|
|
101
|
+
label: 'Rating',
|
|
102
|
+
...compute('hiring.applicant', 'rating', ['scorecards.score'], (applicants) => {
|
|
103
|
+
for (const a of applicants) {
|
|
104
|
+
const scores = [...a.scorecards].map((s) => s.score);
|
|
105
|
+
a.rating =
|
|
106
|
+
scores.length === 0
|
|
107
|
+
? null
|
|
108
|
+
: orm
|
|
109
|
+
.toDecimal(scores.reduce((x, y) => x + y, 0))
|
|
110
|
+
.div(scores.length)
|
|
111
|
+
.toDecimalPlaces(1);
|
|
112
|
+
}
|
|
113
|
+
}),
|
|
114
|
+
}),
|
|
115
|
+
/** The Workforce employee once hired: set only by the hire step (see `hiredByTheHireStep`). */
|
|
116
|
+
employee: f.many2one('hr.employee', { ondelete: 'set null' }),
|
|
117
|
+
status: f.selection({ active: 'In progress', hired: 'Hired', refused: 'Refused' }, {
|
|
118
|
+
store: true,
|
|
119
|
+
...compute('hiring.applicant', 'status', ['employee', 'refused'], (applicants) => {
|
|
120
|
+
for (const a of applicants)
|
|
121
|
+
a.status = a.employee !== null ? 'hired' : a.refused ? 'refused' : 'active';
|
|
122
|
+
}),
|
|
123
|
+
}),
|
|
124
|
+
notes: f.text(),
|
|
125
|
+
},
|
|
126
|
+
constraints: {
|
|
127
|
+
// One email applies once per opening (applications of another opening are separate).
|
|
128
|
+
oneApplication: {
|
|
129
|
+
...check('hiring.applicant', ['email', 'opening'], async (applicants) => applicants.env.asSuperuser({ reason: 'duplicate applications' }, async (su) => {
|
|
130
|
+
const failing = [];
|
|
131
|
+
for (const a of applicants) {
|
|
132
|
+
const twins = await su.model('hiring.applicant').search({
|
|
133
|
+
where: { opening: a.opening.id, email: { ilike: a.email.trim() }, id: { ne: a.id } },
|
|
134
|
+
limit: 1,
|
|
135
|
+
});
|
|
136
|
+
if (twins.length > 0)
|
|
137
|
+
failing.push(a.id);
|
|
138
|
+
}
|
|
139
|
+
return failing;
|
|
140
|
+
})),
|
|
141
|
+
message: 'This person already applied to this opening.',
|
|
142
|
+
},
|
|
143
|
+
// Hired only through `POST /api/v1/hiring/applicants/:id/hire`, which runs in an audited superuser scope.
|
|
144
|
+
hiredByTheHireStep: {
|
|
145
|
+
...check('hiring.applicant', ['employee'], async (applicants) => applicants.env.su
|
|
146
|
+
? []
|
|
147
|
+
: [...applicants].filter((a) => a.employee !== null).map((a) => a.id)),
|
|
148
|
+
message: 'Applicants are hired with Hire, which makes their employee.',
|
|
149
|
+
},
|
|
150
|
+
refusedWithReason: {
|
|
151
|
+
...check('hiring.applicant', ['refused', 'refuseReason'], async (applicants) => [...applicants]
|
|
152
|
+
.filter((a) => a.refused && (a.refuseReason ?? '').trim() === '')
|
|
153
|
+
.map((a) => a.id)),
|
|
154
|
+
message: 'A refused applicant says why.',
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
});
|
|
158
|
+
export const HiringScorecard = defineModel('hiring.scorecard', {
|
|
159
|
+
label: 'Scorecard',
|
|
160
|
+
order: ['id desc'],
|
|
161
|
+
access: { 'hiring.user': ALL, 'hiring.manager': ALL },
|
|
162
|
+
rules: {
|
|
163
|
+
// Independent opinions: an interviewer sees and changes only their own.
|
|
164
|
+
own: { groups: ['hiring.user'], perms: [...ALL], domain: { interviewer: me } },
|
|
165
|
+
all: { groups: ['hiring.manager'], perms: [...ALL], domain: {} },
|
|
166
|
+
},
|
|
167
|
+
fields: {
|
|
168
|
+
applicant: f.many2one('hiring.applicant', { required: true, ondelete: 'cascade' }),
|
|
169
|
+
interviewer: f.many2one('res.users', { required: true, default: (env) => env.userId }),
|
|
170
|
+
score: f.integer({ required: true, default: 3, label: 'Score (1–5)' }),
|
|
171
|
+
recommendation: f.selection({ strong_yes: 'Strong yes', yes: 'Yes', no: 'No', strong_no: 'Strong no' }, { required: true, default: 'yes' }),
|
|
172
|
+
notes: f.text(),
|
|
173
|
+
},
|
|
174
|
+
sqlConstraints: {
|
|
175
|
+
scoreRange: { check: orm.sql `score BETWEEN 1 AND 5`, message: 'A score is from 1 to 5.' },
|
|
176
|
+
},
|
|
177
|
+
});
|
|
178
|
+
export const recruitmentShutro = defineModule({
|
|
179
|
+
name: 'recruitment',
|
|
180
|
+
version: '0.2.0',
|
|
181
|
+
depends: [hrShutro],
|
|
182
|
+
groups: [
|
|
183
|
+
orm.defineGroup({ code: 'hiring.user', label: 'Interviewer', implies: ['hr.user'] }),
|
|
184
|
+
orm.defineGroup({ code: 'hiring.manager', label: 'Hiring manager', implies: ['hiring.user'] }),
|
|
185
|
+
],
|
|
186
|
+
models: [HiringStage, HiringOpening, HiringApplicant, HiringScorecard],
|
|
187
|
+
data: [
|
|
188
|
+
record('hiring.stage', 'stage_new', { name: 'New', sequence: 1 }, { noupdate: true }),
|
|
189
|
+
record('hiring.stage', 'stage_screening', { name: 'Screening', sequence: 2 }, { noupdate: true }),
|
|
190
|
+
record('hiring.stage', 'stage_interview', { name: 'Interview', sequence: 3 }, { noupdate: true }),
|
|
191
|
+
record('hiring.stage', 'stage_offer', { name: 'Offer', sequence: 4 }, { noupdate: true }),
|
|
192
|
+
record('hiring.stage', 'stage_hired', { name: 'Hired', sequence: 5, hired: true, fold: true }, { noupdate: true }),
|
|
193
|
+
],
|
|
194
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* "Hire" on an applicant in progress (a node component of the applicant form): a confirmation that names what
|
|
3
|
+
* happens — the Workforce employee is made from the applicant, the applicant moves to the hired stage, and the
|
|
4
|
+
* opening closes when its headcount is reached — through `POST /api/v1/hiring/applicants/:id/hire`; the form
|
|
5
|
+
* reloads afterwards. Shown to hiring managers (the expected salary, theirs only, is the hint); the server decides.
|
|
6
|
+
*/
|
|
7
|
+
import { type NodeComponentProps } from '../../ui/index.js';
|
|
8
|
+
import { type ReactElement } from 'react';
|
|
9
|
+
export declare function HireButton({ api, record, model, served, reload, }: NodeComponentProps): ReactElement | null;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* "Hire" on an applicant in progress (a node component of the applicant form): a confirmation that names what
|
|
4
|
+
* happens — the Workforce employee is made from the applicant, the applicant moves to the hired stage, and the
|
|
5
|
+
* opening closes when its headcount is reached — through `POST /api/v1/hiring/applicants/:id/hire`; the form
|
|
6
|
+
* reloads afterwards. Shown to hiring managers (the expected salary, theirs only, is the hint); the server decides.
|
|
7
|
+
*/
|
|
8
|
+
import { Alert, Button, Dialog } from '../../ui/index.js';
|
|
9
|
+
import { useMutation } from '@tanstack/react-query';
|
|
10
|
+
import { useState } from 'react';
|
|
11
|
+
import { useTranslation } from 'react-i18next';
|
|
12
|
+
export function HireButton({ api, record, model, served, reload, }) {
|
|
13
|
+
const { t } = useTranslation('recruitment');
|
|
14
|
+
const [open, setOpen] = useState(false);
|
|
15
|
+
const [error, setError] = useState(null);
|
|
16
|
+
const hire = useMutation({
|
|
17
|
+
mutationFn: () => api.call('POST', `/api/v1/hiring/applicants/${String(record?.id)}/hire`, {}),
|
|
18
|
+
onSuccess: () => {
|
|
19
|
+
setOpen(false);
|
|
20
|
+
setError(null);
|
|
21
|
+
reload();
|
|
22
|
+
},
|
|
23
|
+
onError: (e) => setError(e.message),
|
|
24
|
+
});
|
|
25
|
+
if (record === null || typeof record.id !== 'number')
|
|
26
|
+
return null;
|
|
27
|
+
if (record['status'] !== 'active')
|
|
28
|
+
return null;
|
|
29
|
+
if (served.fields[model]?.['expectedSalary'] === undefined)
|
|
30
|
+
return null;
|
|
31
|
+
return (_jsxs(_Fragment, { children: [_jsx(Button, { variant: "primary", onClick: () => setOpen(true), children: t('hire.button') }), _jsx(Dialog, { open: open, onOpenChange: setOpen, title: t('hire.title', { name: String(record['name'] ?? '') }), footer: _jsx(Button, { variant: "primary", busy: hire.isPending, onClick: () => hire.mutate(), children: t('hire.confirm') }), children: _jsxs("div", { className: "grid gap-3", children: [error === null ? null : _jsx(Alert, { tone: "danger", children: error }), _jsx("p", { className: "text-sm", children: t('hire.explain') })] }) })] }));
|
|
32
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @packageDocumentation
|
|
3
|
+
* The web contribution of `shutro-erp/recruitment`: the "Hire" button on applicants.
|
|
4
|
+
*/
|
|
5
|
+
import { type Registry } from '../../ui/index.js';
|
|
6
|
+
import type { i18n } from 'i18next';
|
|
7
|
+
import { messages } from './messages.js';
|
|
8
|
+
export { HireButton } from './HireButton.js';
|
|
9
|
+
/** Registers the component (and the messages in `i18n`, when given). */
|
|
10
|
+
export declare function registerRecruitmentWeb(registry: Registry, i18n?: i18n): Registry;
|
|
11
|
+
export { messages as recruitmentMessages };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @packageDocumentation
|
|
3
|
+
* The web contribution of `shutro-erp/recruitment`: the "Hire" button on applicants.
|
|
4
|
+
*/
|
|
5
|
+
import { addMessages } from '../../ui/index.js';
|
|
6
|
+
import { HireButton } from './HireButton.js';
|
|
7
|
+
import { messages } from './messages.js';
|
|
8
|
+
export { HireButton } from './HireButton.js';
|
|
9
|
+
/** Registers the component (and the messages in `i18n`, when given). */
|
|
10
|
+
export function registerRecruitmentWeb(registry, i18n) {
|
|
11
|
+
registry.registerComponent('hiring.Hire', HireButton);
|
|
12
|
+
if (i18n !== undefined)
|
|
13
|
+
addMessages(i18n, 'recruitment', messages);
|
|
14
|
+
return registry;
|
|
15
|
+
}
|
|
16
|
+
export { messages as recruitmentMessages };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** Messages of the Hiring screens (namespace `recruitment`), in English and Bangla. */
|
|
2
|
+
export const messages = {
|
|
3
|
+
en: {
|
|
4
|
+
hire: {
|
|
5
|
+
button: 'Hire',
|
|
6
|
+
title: 'Hire {{name}}',
|
|
7
|
+
explain: 'They become an employee in Workforce with the opening’s position and department, move to the hired stage, and the opening closes when everyone it was for is hired.',
|
|
8
|
+
confirm: 'Hire',
|
|
9
|
+
},
|
|
10
|
+
},
|
|
11
|
+
bn: {
|
|
12
|
+
hire: {
|
|
13
|
+
button: 'নিয়োগ দিন',
|
|
14
|
+
title: '{{name}}-কে নিয়োগ দিন',
|
|
15
|
+
explain: 'তিনি পদ ও বিভাগসহ ওয়ার্কফোর্সে কর্মী হবেন, নিয়োগপ্রাপ্ত ধাপে যাবেন, এবং যত জনের জন্য পদটি ছিল সবাই নিয়োগ পেলে পদটি বন্ধ হবে।',
|
|
16
|
+
confirm: 'নিয়োগ দিন',
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
};
|
|
@@ -34,6 +34,11 @@ export interface DocumentData {
|
|
|
34
34
|
readonly locale?: string;
|
|
35
35
|
readonly tz?: string;
|
|
36
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* A QR code as SVG (one path of dark modules, a quiet zone of 4), from `qrcode`'s synchronous matrix — rendering
|
|
39
|
+
* stays synchronous. Medium error correction: a printed ticket survives a crease.
|
|
40
|
+
*/
|
|
41
|
+
export declare function qrSvg(content: string): string;
|
|
37
42
|
/** The HTML of a document (a complete page, also used for the designer's preview). */
|
|
38
43
|
export declare function renderHtml(layout: Layout, data: DocumentData, fields: DocumentFields, format: DocumentFormat, options?: {
|
|
39
44
|
readonly dir?: 'ltr' | 'rtl';
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* as the caller (rules and field security), values are formatted for the document's language, and every render is
|
|
5
5
|
* audited. Modules ship default templates in their manifests; administrators edit copies as data.
|
|
6
6
|
*/
|
|
7
|
+
import QRCode from 'qrcode';
|
|
7
8
|
import { amountInWords } from './words.js';
|
|
8
9
|
const esc = (text) => String(text ?? '').replace(/[&<>"']/g, (c) => ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' })[c]);
|
|
9
10
|
/** Formats a value for print: Money, decimals, dates, booleans, related records (their display name). */
|
|
@@ -124,6 +125,22 @@ function text(data, fields, template) {
|
|
|
124
125
|
return esc(formatValue(r.value, r.kind, { locale: data.locale ?? 'en-US', tz: data.tz ?? 'UTC' }));
|
|
125
126
|
});
|
|
126
127
|
}
|
|
128
|
+
/**
|
|
129
|
+
* A QR code as SVG (one path of dark modules, a quiet zone of 4), from `qrcode`'s synchronous matrix — rendering
|
|
130
|
+
* stays synchronous. Medium error correction: a printed ticket survives a crease.
|
|
131
|
+
*/
|
|
132
|
+
export function qrSvg(content) {
|
|
133
|
+
const { modules } = QRCode.create(content, { errorCorrectionLevel: 'M' });
|
|
134
|
+
const size = modules.size;
|
|
135
|
+
const quiet = 4;
|
|
136
|
+
let d = '';
|
|
137
|
+
for (let y = 0; y < size; y += 1)
|
|
138
|
+
for (let x = 0; x < size; x += 1)
|
|
139
|
+
if (modules.get(y, x))
|
|
140
|
+
d += `M${x + quiet} ${y + quiet}h1v1h-1z`;
|
|
141
|
+
const box = size + quiet * 2;
|
|
142
|
+
return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${box} ${box}" shape-rendering="crispEdges" role="img" aria-label="QR code"><rect width="${box}" height="${box}" fill="#fff"/><path d="${d}" fill="#000"/></svg>`;
|
|
143
|
+
}
|
|
127
144
|
function blockHtml(block, data, fields, format) {
|
|
128
145
|
switch (block.kind) {
|
|
129
146
|
case 'heading': {
|
|
@@ -176,6 +193,14 @@ function blockHtml(block, data, fields, format) {
|
|
|
176
193
|
return '<hr>';
|
|
177
194
|
case 'pageBreak':
|
|
178
195
|
return '<div class="page-break"></div>';
|
|
196
|
+
case 'qr': {
|
|
197
|
+
const value = resolve(data, fields, block.bind).value;
|
|
198
|
+
const content = value === null || value === undefined ? '' : String(value);
|
|
199
|
+
if (content === '')
|
|
200
|
+
return '';
|
|
201
|
+
const label = block.label === undefined ? '' : `<div class="qr-label">${esc(block.label)}</div>`;
|
|
202
|
+
return `<div class="qr" style="width:${block.size ?? 32}mm">${qrSvg(content)}${label}</div>`;
|
|
203
|
+
}
|
|
179
204
|
case 'signature':
|
|
180
205
|
return `<div class="signatures">${block.labels.map((l) => `<div class="signature"><div class="line"></div><div>${esc(l)}</div></div>`).join('')}</div>`;
|
|
181
206
|
case 'columns':
|
|
@@ -202,6 +227,8 @@ hr { border: 0; border-top: 1px solid #ccc; margin: 5mm 0; }
|
|
|
202
227
|
.columns { display: grid; grid-template-columns: 1fr 1fr; gap: 10mm; }
|
|
203
228
|
.signatures { display: grid; grid-auto-flow: column; gap: 12mm; margin-top: 18mm; text-align: center; font-size: 9.5pt; }
|
|
204
229
|
.signature .line { border-top: 1px solid #111; margin-bottom: 2mm; }
|
|
230
|
+
.qr { margin: 2mm 0; } .qr svg { width: 100%; height: auto; display: block; }
|
|
231
|
+
.qr-label { font-size: 8.5pt; color: #555; text-align: center; margin-top: 1mm; }
|
|
205
232
|
tr, .field { break-inside: avoid; }
|
|
206
233
|
`;
|
|
207
234
|
/** The HTML of a document (a complete page, also used for the designer's preview). */
|
|
@@ -250,7 +277,7 @@ export async function loadDocumentData(env, model, ids, layout, fields) {
|
|
|
250
277
|
const paths = new Set();
|
|
251
278
|
const collect = (blocks, prefix = '') => {
|
|
252
279
|
for (const b of blocks) {
|
|
253
|
-
if (b.kind === 'field')
|
|
280
|
+
if (b.kind === 'field' || b.kind === 'qr')
|
|
254
281
|
paths.add(prefix + b.bind);
|
|
255
282
|
else if (b.kind === 'fields')
|
|
256
283
|
for (const i of b.items)
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import { defineModule } from '../modules-sdk/index.js';
|
|
9
9
|
import { reportingShutro } from './models.js';
|
|
10
10
|
import type { ScheduleEngine } from './schedules.js';
|
|
11
|
-
export { type Block, closeDocuments, type DocumentData, type DocumentFields, type DocumentFormat, formatValue as formatDocumentValue, type Layout, loadDocumentData, renderHtml, renderPdf, } from './documents.js';
|
|
11
|
+
export { type Block, closeDocuments, type DocumentData, type DocumentFields, type DocumentFormat, formatValue as formatDocumentValue, type Layout, loadDocumentData, qrSvg, renderHtml, renderPdf, } from './documents.js';
|
|
12
12
|
export { type Amount, type Condition, type FieldInfo, type Header, type Measure, nextBucket, ReportError, type ReportQuery, type ReportResult, runReport, type Value, zonedStart, } from './pivot.js';
|
|
13
13
|
export { parseReportQuery, registerReportRoutes, reportTable } from './routes.js';
|
|
14
14
|
export { documentFields, installTemplates, layoutProblems, registerDocumentRoutes, renderDocument, scheduleRenderer, } from './routes-documents.js';
|
package/dist/reporting/index.js
CHANGED
|
@@ -10,9 +10,10 @@ import { base } from '../server/index.js';
|
|
|
10
10
|
import { dashboard, form, list, spreadsheet } from '../views/index.js';
|
|
11
11
|
import { closeDocuments } from './documents.js';
|
|
12
12
|
import { reportingShutro } from './models.js';
|
|
13
|
+
import { installOverviews, registerOverviewRoutes } from './overviews.js';
|
|
13
14
|
import { registerReportRoutes } from './routes.js';
|
|
14
15
|
import { installTemplates, registerDocumentRoutes } from './routes-documents.js';
|
|
15
|
-
export { closeDocuments, formatValue as formatDocumentValue, loadDocumentData, renderHtml, renderPdf, } from './documents.js';
|
|
16
|
+
export { closeDocuments, formatValue as formatDocumentValue, loadDocumentData, qrSvg, renderHtml, renderPdf, } from './documents.js';
|
|
16
17
|
export { nextBucket, ReportError, runReport, zonedStart, } from './pivot.js';
|
|
17
18
|
export { parseReportQuery, registerReportRoutes, reportTable } from './routes.js';
|
|
18
19
|
export { documentFields, installTemplates, layoutProblems, registerDocumentRoutes, renderDocument, scheduleRenderer, } from './routes-documents.js';
|
|
@@ -127,10 +128,11 @@ export const reporting = defineModule({
|
|
|
127
128
|
},
|
|
128
129
|
},
|
|
129
130
|
hooks: {
|
|
130
|
-
defaults: async (env, modules) => `${await installTemplates(env, modules)} document template(s) installed`,
|
|
131
|
+
defaults: async (env, modules) => `${await installTemplates(env, modules)} document template(s), ${await installOverviews(env, modules)} overview(s) installed`,
|
|
131
132
|
},
|
|
132
133
|
routes: (context) => {
|
|
133
134
|
registerReportRoutes(context);
|
|
135
|
+
registerOverviewRoutes(context);
|
|
134
136
|
const engine = registerDocumentRoutes(context);
|
|
135
137
|
engines.set(context.app, engine);
|
|
136
138
|
if (process.env['KOSH_SCHEDULES'] !== 'off')
|
package/dist/reporting/models.js
CHANGED
|
@@ -27,6 +27,15 @@ const Dashboard = defineModel('report.dashboard', {
|
|
|
27
27
|
name: f.char({ required: true }),
|
|
28
28
|
items: f.json({ required: true, default: [] }),
|
|
29
29
|
shared: f.boolean({ default: false }),
|
|
30
|
+
/** The module whose overview this is (RFC 0022 §3.2); empty for a user's own dashboard. */
|
|
31
|
+
key: f.char({ size: 100 }),
|
|
32
|
+
},
|
|
33
|
+
sqlConstraints: {
|
|
34
|
+
oneOverview: {
|
|
35
|
+
unique: ['key'],
|
|
36
|
+
where: orm.sql `key IS NOT NULL`,
|
|
37
|
+
message: 'An app has one overview.',
|
|
38
|
+
},
|
|
30
39
|
},
|
|
31
40
|
});
|
|
32
41
|
/** A spreadsheet: cells by reference (`{ A1: '12', B1: '=SUM(A1:A3)', C1: '=REPORT("sale.order", "sum:amount")' }`). */
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* App overviews (RFC 0022 §3.2): the cards an app declares in its manifest become a shared dashboard keyed by the
|
|
3
|
+
* module, installed once (`hooks.defaults`, idempotent: a dashboard a user has since changed is left alone), and
|
|
4
|
+
* opened by the app's generated *Overview* menu through `GET /api/v1/reports/overview?app=`.
|
|
5
|
+
*/
|
|
6
|
+
import type { KoshModule } from '../modules-sdk/index.js';
|
|
7
|
+
import { type ModuleContext } from '../server/index.js';
|
|
8
|
+
import type { Env } from '../server/orm.js';
|
|
9
|
+
/** Installs the overview dashboards the served modules declare and do not have yet; returns how many. */
|
|
10
|
+
export declare function installOverviews(env: Env, modules: readonly KoshModule[]): Promise<number>;
|
|
11
|
+
/**
|
|
12
|
+
* `GET /api/v1/reports/overview?app=sales`: the app's overview — its label and cards — for the Overview page. Read
|
|
13
|
+
* as the system (the dashboard itself needs the reports' access; the cards then query as the user), for any user
|
|
14
|
+
* who may open the app's menu.
|
|
15
|
+
*/
|
|
16
|
+
export declare function registerOverviewRoutes(context: ModuleContext): void;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { HttpProblem } from '../server/index.js';
|
|
2
|
+
const dashboards = (env) => env.model('report.dashboard');
|
|
3
|
+
/** Installs the overview dashboards the served modules declare and do not have yet; returns how many. */
|
|
4
|
+
export async function installOverviews(env, modules) {
|
|
5
|
+
let created = 0;
|
|
6
|
+
for (const m of modules) {
|
|
7
|
+
if (m.overview === undefined || m.app === undefined)
|
|
8
|
+
continue;
|
|
9
|
+
const existing = await dashboards(env).search({ where: { key: m.name }, limit: 1 });
|
|
10
|
+
if (existing.ids.length > 0)
|
|
11
|
+
continue;
|
|
12
|
+
await dashboards(env).create([
|
|
13
|
+
{
|
|
14
|
+
name: `${m.app.label} — Overview`,
|
|
15
|
+
key: m.name,
|
|
16
|
+
shared: true,
|
|
17
|
+
items: m.overview.cards.map((card) => ({ ...card })),
|
|
18
|
+
},
|
|
19
|
+
]);
|
|
20
|
+
created += 1;
|
|
21
|
+
}
|
|
22
|
+
return created;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* `GET /api/v1/reports/overview?app=sales`: the app's overview — its label and cards — for the Overview page. Read
|
|
26
|
+
* as the system (the dashboard itself needs the reports' access; the cards then query as the user), for any user
|
|
27
|
+
* who may open the app's menu.
|
|
28
|
+
*/
|
|
29
|
+
export function registerOverviewRoutes(context) {
|
|
30
|
+
const { app, registry, shutro } = context;
|
|
31
|
+
app.get('/api/v1/reports/overview', async (request) => {
|
|
32
|
+
const code = String(request.query?.app ?? '');
|
|
33
|
+
const module = registry.loaded.modules.find((m) => m.app?.code === code);
|
|
34
|
+
if (module === undefined || module.overview === undefined)
|
|
35
|
+
throw new HttpProblem(404, 'no-overview', 'No overview', `The app '${code}' has no overview.`);
|
|
36
|
+
// Signed in (the route is not public); the app's visibility is the menu's.
|
|
37
|
+
await request.env(async () => undefined);
|
|
38
|
+
const row = await shutro.bootstrap({ reason: `overview of ${code}` }, async (env) => {
|
|
39
|
+
const found = await dashboards(env).search({
|
|
40
|
+
where: { key: module.name },
|
|
41
|
+
limit: 1,
|
|
42
|
+
});
|
|
43
|
+
const [first] = (await found.load(['name', 'items'])).read(['id', 'name', 'items']);
|
|
44
|
+
return first;
|
|
45
|
+
});
|
|
46
|
+
if (row === undefined)
|
|
47
|
+
throw new HttpProblem(404, 'no-overview', 'No overview', `The overview of '${code}' is not installed yet (run the apps' defaults).`);
|
|
48
|
+
return {
|
|
49
|
+
id: row['id'],
|
|
50
|
+
name: row['name'],
|
|
51
|
+
app: code,
|
|
52
|
+
label: module.app?.label ?? code,
|
|
53
|
+
cards: row['items'],
|
|
54
|
+
};
|
|
55
|
+
});
|
|
56
|
+
}
|
|
@@ -51,7 +51,7 @@ export function layoutProblems(layout, model, fields) {
|
|
|
51
51
|
};
|
|
52
52
|
const walk = (blocks) => {
|
|
53
53
|
for (const b of blocks) {
|
|
54
|
-
if (b.kind === 'field')
|
|
54
|
+
if (b.kind === 'field' || b.kind === 'qr')
|
|
55
55
|
check(b.bind, model);
|
|
56
56
|
else if (b.kind === 'fields')
|
|
57
57
|
for (const i of b.items)
|