@ketvietlab/ketsuite 0.1.24 → 0.1.29
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/cache.d.ts +23 -0
- package/dist/cache.d.ts.map +1 -0
- package/dist/cache.js +71 -0
- package/dist/cache.js.map +1 -0
- package/dist/cli-watch.d.ts +4 -0
- package/dist/cli-watch.d.ts.map +1 -0
- package/dist/cli-watch.js +52 -0
- package/dist/cli-watch.js.map +1 -0
- package/dist/cli.js +45 -17
- package/dist/cli.js.map +1 -1
- package/dist/deployment.d.ts +11 -0
- package/dist/deployment.d.ts.map +1 -1
- package/dist/deployment.js +49 -39
- package/dist/deployment.js.map +1 -1
- package/dist/deployments/commerce.d.ts +4 -0
- package/dist/deployments/commerce.d.ts.map +1 -0
- package/dist/deployments/commerce.js +34 -0
- package/dist/deployments/commerce.js.map +1 -0
- package/dist/deployments/common.d.ts +54 -0
- package/dist/deployments/common.d.ts.map +1 -0
- package/dist/deployments/common.js +112 -0
- package/dist/deployments/common.js.map +1 -0
- package/dist/deployments/hospitality.d.ts +4 -0
- package/dist/deployments/hospitality.d.ts.map +1 -0
- package/dist/deployments/hospitality.js +103 -0
- package/dist/deployments/hospitality.js.map +1 -0
- package/dist/deployments/office.d.ts +4 -0
- package/dist/deployments/office.d.ts.map +1 -0
- package/dist/deployments/office.js +31 -0
- package/dist/deployments/office.js.map +1 -0
- package/dist/development.d.ts +16 -0
- package/dist/development.d.ts.map +1 -1
- package/dist/development.js +31 -0
- package/dist/development.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/modules/account_backend/index.js +364 -871
- package/dist/modules/account_backend/index.js.map +1 -1
- package/dist/modules/account_backend/screens/accounts-list.d.ts.map +1 -1
- package/dist/modules/account_backend/screens/accounts-list.js +5 -15
- package/dist/modules/account_backend/screens/accounts-list.js.map +1 -1
- package/dist/modules/account_backend/screens/customer-invoices-list.d.ts.map +1 -1
- package/dist/modules/account_backend/screens/customer-invoices-list.js +5 -15
- package/dist/modules/account_backend/screens/customer-invoices-list.js.map +1 -1
- package/dist/modules/account_backend/screens/journal-entries-list.d.ts.map +1 -1
- package/dist/modules/account_backend/screens/journal-entries-list.js +5 -15
- package/dist/modules/account_backend/screens/journal-entries-list.js.map +1 -1
- package/dist/modules/account_backend/screens/journals-list.d.ts.map +1 -1
- package/dist/modules/account_backend/screens/journals-list.js +5 -15
- package/dist/modules/account_backend/screens/journals-list.js.map +1 -1
- package/dist/modules/account_backend/screens/opening-balances.d.ts +3 -1
- package/dist/modules/account_backend/screens/opening-balances.d.ts.map +1 -1
- package/dist/modules/account_backend/screens/opening-balances.js +11 -5
- package/dist/modules/account_backend/screens/opening-balances.js.map +1 -1
- package/dist/modules/account_backend/screens/payment-terms-list.d.ts.map +1 -1
- package/dist/modules/account_backend/screens/payment-terms-list.js +6 -17
- package/dist/modules/account_backend/screens/payment-terms-list.js.map +1 -1
- package/dist/modules/account_backend/screens/payments-list.d.ts.map +1 -1
- package/dist/modules/account_backend/screens/payments-list.js +5 -15
- package/dist/modules/account_backend/screens/payments-list.js.map +1 -1
- package/dist/modules/account_backend/screens/period-closes.d.ts +3 -1
- package/dist/modules/account_backend/screens/period-closes.d.ts.map +1 -1
- package/dist/modules/account_backend/screens/period-closes.js +40 -36
- package/dist/modules/account_backend/screens/period-closes.js.map +1 -1
- package/dist/modules/account_backend/screens/taxes-list.d.ts.map +1 -1
- package/dist/modules/account_backend/screens/taxes-list.js +5 -15
- package/dist/modules/account_backend/screens/taxes-list.js.map +1 -1
- package/dist/modules/account_backend/screens/vendor-bills-list.d.ts.map +1 -1
- package/dist/modules/account_backend/screens/vendor-bills-list.js +5 -15
- package/dist/modules/account_backend/screens/vendor-bills-list.js.map +1 -1
- package/dist/modules/account_backend/search-functions.d.ts +4 -0
- package/dist/modules/account_backend/search-functions.d.ts.map +1 -0
- package/dist/modules/account_backend/search-functions.js +5 -0
- package/dist/modules/account_backend/search-functions.js.map +1 -0
- package/dist/modules/account_backend/search.d.ts +774 -0
- package/dist/modules/account_backend/search.d.ts.map +1 -0
- package/dist/modules/account_backend/search.js +312 -0
- package/dist/modules/account_backend/search.js.map +1 -0
- package/dist/modules/address_backend/index.d.ts.map +1 -1
- package/dist/modules/address_backend/index.js +2 -0
- package/dist/modules/address_backend/index.js.map +1 -1
- package/dist/modules/address_backend/routes.d.ts.map +1 -1
- package/dist/modules/address_backend/routes.js +32 -7
- package/dist/modules/address_backend/routes.js.map +1 -1
- package/dist/modules/address_backend/screens/catalogs-list.d.ts +3 -1
- package/dist/modules/address_backend/screens/catalogs-list.d.ts.map +1 -1
- package/dist/modules/address_backend/screens/catalogs-list.js +15 -9
- package/dist/modules/address_backend/screens/catalogs-list.js.map +1 -1
- package/dist/modules/address_backend/screens/country-browser.d.ts.map +1 -1
- package/dist/modules/address_backend/screens/country-browser.js +7 -15
- package/dist/modules/address_backend/screens/country-browser.js.map +1 -1
- package/dist/modules/address_backend/search-functions.d.ts +4 -0
- package/dist/modules/address_backend/search-functions.d.ts.map +1 -0
- package/dist/modules/address_backend/search-functions.js +7 -0
- package/dist/modules/address_backend/search-functions.js.map +1 -0
- package/dist/modules/address_backend/search.d.ts +38 -0
- package/dist/modules/address_backend/search.d.ts.map +1 -0
- package/dist/modules/address_backend/search.js +40 -0
- package/dist/modules/address_backend/search.js.map +1 -0
- package/dist/modules/backend/catalogue.d.ts.map +1 -1
- package/dist/modules/backend/catalogue.js +16 -13
- package/dist/modules/backend/catalogue.js.map +1 -1
- package/dist/modules/backend/collection-search.d.ts +16 -0
- package/dist/modules/backend/collection-search.d.ts.map +1 -0
- package/dist/modules/backend/collection-search.js +43 -0
- package/dist/modules/backend/collection-search.js.map +1 -0
- package/dist/modules/backend/design/HANDOFF.md +1 -1
- package/dist/modules/backend/design/auth.css +61 -0
- package/dist/modules/backend/design/brand/logo-dark.png +0 -0
- package/dist/modules/backend/design/brand/logo-light.png +0 -0
- package/dist/modules/backend/design/client/backend-shell.d.mts +2 -2
- package/dist/modules/backend/design/client/backend-shell.d.mts.map +1 -1
- package/dist/modules/backend/design/client/backend-shell.mjs +1 -1
- package/dist/modules/backend/design/client/backend-shell.mjs.map +4 -4
- package/dist/modules/backend/design/client/ket-table.d.mts +10 -0
- package/dist/modules/backend/design/client/ket-table.d.mts.map +1 -0
- package/dist/modules/backend/design/client/ket-table.mjs +2 -0
- package/dist/modules/backend/design/client/ket-table.mjs.map +7 -0
- package/dist/modules/backend/design/client/lightbox.d.mts +22 -0
- package/dist/modules/backend/design/client/lightbox.d.mts.map +1 -0
- package/dist/modules/backend/design/client/lightbox.mjs +2 -0
- package/dist/modules/backend/design/client/lightbox.mjs.map +7 -0
- package/dist/modules/backend/design/client/relation-select.d.mts +12 -3
- package/dist/modules/backend/design/client/relation-select.d.mts.map +1 -1
- package/dist/modules/backend/design/client/relation-select.mjs +1 -1
- package/dist/modules/backend/design/client/relation-select.mjs.map +4 -4
- package/dist/modules/backend/design/client/search-filter.d.mts +10 -0
- package/dist/modules/backend/design/client/search-filter.d.mts.map +1 -0
- package/dist/modules/backend/design/client/search-filter.mjs +2 -0
- package/dist/modules/backend/design/client/search-filter.mjs.map +7 -0
- package/dist/modules/backend/design/content.css +43 -5
- package/dist/modules/backend/design/forms.css +99 -229
- package/dist/modules/backend/design/foundation.css +0 -51
- package/dist/modules/backend/design/lists.css +79 -7
- package/dist/modules/backend/design/user-workflow.css +0 -20
- package/dist/modules/backend/global-search.d.ts +3 -0
- package/dist/modules/backend/global-search.d.ts.map +1 -0
- package/dist/modules/backend/global-search.js +82 -0
- package/dist/modules/backend/global-search.js.map +1 -0
- package/dist/modules/backend/index.d.ts +26 -0
- package/dist/modules/backend/index.d.ts.map +1 -1
- package/dist/modules/backend/index.js +23 -0
- package/dist/modules/backend/index.js.map +1 -1
- package/dist/modules/backend/islands.d.ts +44 -1
- package/dist/modules/backend/islands.d.ts.map +1 -1
- package/dist/modules/backend/islands.js +25 -1
- package/dist/modules/backend/islands.js.map +1 -1
- package/dist/modules/backend/joints.d.ts.map +1 -1
- package/dist/modules/backend/joints.js +12 -0
- package/dist/modules/backend/joints.js.map +1 -1
- package/dist/modules/backend/ket-table.d.ts +7 -0
- package/dist/modules/backend/ket-table.d.ts.map +1 -0
- package/dist/modules/backend/ket-table.js +2 -0
- package/dist/modules/backend/ket-table.js.map +1 -0
- package/dist/modules/backend/messages.d.ts.map +1 -1
- package/dist/modules/backend/messages.js +144 -0
- package/dist/modules/backend/messages.js.map +1 -1
- package/dist/modules/backend/paging.d.ts.map +1 -1
- package/dist/modules/backend/paging.js +2 -1
- package/dist/modules/backend/paging.js.map +1 -1
- package/dist/modules/backend/relation-select.d.ts +2 -2
- package/dist/modules/backend/relation-select.d.ts.map +1 -1
- package/dist/modules/backend/routes.d.ts.map +1 -1
- package/dist/modules/backend/routes.js +2 -0
- package/dist/modules/backend/routes.js.map +1 -1
- package/dist/modules/backend/row-list.d.ts +63 -0
- package/dist/modules/backend/row-list.d.ts.map +1 -0
- package/dist/modules/backend/row-list.js +252 -0
- package/dist/modules/backend/row-list.js.map +1 -0
- package/dist/modules/backend/screen.d.ts +3 -3
- package/dist/modules/backend/screen.d.ts.map +1 -1
- package/dist/modules/backend/screen.js +6 -7
- package/dist/modules/backend/screen.js.map +1 -1
- package/dist/modules/backend/search-filter-state.d.ts +42 -0
- package/dist/modules/backend/search-filter-state.d.ts.map +1 -0
- package/dist/modules/backend/search-filter-state.js +277 -0
- package/dist/modules/backend/search-filter-state.js.map +1 -0
- package/dist/modules/backend/search-filter.d.ts +77 -0
- package/dist/modules/backend/search-filter.d.ts.map +1 -0
- package/dist/modules/backend/search-filter.js +259 -0
- package/dist/modules/backend/search-filter.js.map +1 -0
- package/dist/modules/channel_api/core.d.ts +1 -0
- package/dist/modules/channel_api/core.d.ts.map +1 -1
- package/dist/modules/channel_api/core.js.map +1 -1
- package/dist/modules/channel_api/customer.d.ts.map +1 -1
- package/dist/modules/channel_api/customer.js +4 -5
- package/dist/modules/channel_api/customer.js.map +1 -1
- package/dist/modules/company_backend/index.d.ts.map +1 -1
- package/dist/modules/company_backend/index.js +2 -0
- package/dist/modules/company_backend/index.js.map +1 -1
- package/dist/modules/company_backend/routes.d.ts.map +1 -1
- package/dist/modules/company_backend/routes.js +33 -27
- package/dist/modules/company_backend/routes.js.map +1 -1
- package/dist/modules/company_backend/screens/companies-list.d.ts +3 -3
- package/dist/modules/company_backend/screens/companies-list.d.ts.map +1 -1
- package/dist/modules/company_backend/screens/companies-list.js +18 -18
- package/dist/modules/company_backend/screens/companies-list.js.map +1 -1
- package/dist/modules/company_backend/screens/hierarchy.d.ts.map +1 -1
- package/dist/modules/company_backend/screens/hierarchy.js +1 -2
- package/dist/modules/company_backend/screens/hierarchy.js.map +1 -1
- package/dist/modules/company_backend/search-functions.d.ts +4 -0
- package/dist/modules/company_backend/search-functions.d.ts.map +1 -0
- package/dist/modules/company_backend/search-functions.js +7 -0
- package/dist/modules/company_backend/search-functions.js.map +1 -0
- package/dist/modules/company_backend/search.d.ts +24 -0
- package/dist/modules/company_backend/search.d.ts.map +1 -0
- package/dist/modules/company_backend/search.js +24 -0
- package/dist/modules/company_backend/search.js.map +1 -0
- package/dist/modules/crm/functions/activities.js +7 -10
- package/dist/modules/crm/functions/activities.js.map +1 -1
- package/dist/modules/crm/functions/case-modal-context.d.ts +3 -0
- package/dist/modules/crm/functions/case-modal-context.d.ts.map +1 -0
- package/dist/modules/crm/functions/case-modal-context.js +156 -0
- package/dist/modules/crm/functions/case-modal-context.js.map +1 -0
- package/dist/modules/crm/functions/cases.d.ts.map +1 -1
- package/dist/modules/crm/functions/cases.js +35 -2
- package/dist/modules/crm/functions/cases.js.map +1 -1
- package/dist/modules/crm/functions/configuration.js +1 -1
- package/dist/modules/crm/functions/configuration.js.map +1 -1
- package/dist/modules/crm/functions/gamification.d.ts.map +1 -1
- package/dist/modules/crm/functions/gamification.js +11 -7
- package/dist/modules/crm/functions/gamification.js.map +1 -1
- package/dist/modules/crm/functions/index.d.ts.map +1 -1
- package/dist/modules/crm/functions/index.js +4 -0
- package/dist/modules/crm/functions/index.js.map +1 -1
- package/dist/modules/crm/functions/reporting.d.ts +3 -0
- package/dist/modules/crm/functions/reporting.d.ts.map +1 -0
- package/dist/modules/crm/functions/reporting.js +140 -0
- package/dist/modules/crm/functions/reporting.js.map +1 -0
- package/dist/modules/crm/functions/shared.d.ts +1 -0
- package/dist/modules/crm/functions/shared.d.ts.map +1 -1
- package/dist/modules/crm/functions/shared.js +17 -9
- package/dist/modules/crm/functions/shared.js.map +1 -1
- package/dist/modules/crm/messages.d.ts +8 -1
- package/dist/modules/crm/messages.d.ts.map +1 -1
- package/dist/modules/crm/messages.js +14 -0
- package/dist/modules/crm/messages.js.map +1 -1
- package/dist/modules/crm/models.d.ts.map +1 -1
- package/dist/modules/crm/models.js +7 -0
- package/dist/modules/crm/models.js.map +1 -1
- package/dist/modules/crm/operations.d.ts +4 -1
- package/dist/modules/crm/operations.d.ts.map +1 -1
- package/dist/modules/crm/operations.js +39 -7
- package/dist/modules/crm/operations.js.map +1 -1
- package/dist/modules/crm/reporting.d.ts +115 -0
- package/dist/modules/crm/reporting.d.ts.map +1 -0
- package/dist/modules/crm/reporting.js +241 -0
- package/dist/modules/crm/reporting.js.map +1 -0
- package/dist/modules/crm_backend/client/crm-case-modal.d.mts +302 -0
- package/dist/modules/crm_backend/client/crm-case-modal.d.mts.map +1 -0
- package/dist/modules/crm_backend/client/crm-case-modal.mjs +2 -0
- package/dist/modules/crm_backend/client/crm-case-modal.mjs.map +7 -0
- package/dist/modules/crm_backend/client/crm-configuration-modal.d.mts +51 -51
- package/dist/modules/crm_backend/client/crm-configuration-modal.d.mts.map +1 -1
- package/dist/modules/crm_backend/client/crm-configuration-modal.mjs +1 -1
- package/dist/modules/crm_backend/client/crm-configuration-modal.mjs.map +4 -4
- package/dist/modules/crm_backend/client/crm-kanban-view.mjs +1 -1
- package/dist/modules/crm_backend/client/crm-kanban-view.mjs.map +1 -1
- package/dist/modules/crm_backend/collection-rows.d.ts +6 -0
- package/dist/modules/crm_backend/collection-rows.d.ts.map +1 -0
- package/dist/modules/crm_backend/collection-rows.js +15 -0
- package/dist/modules/crm_backend/collection-rows.js.map +1 -0
- package/dist/modules/crm_backend/index.d.ts.map +1 -1
- package/dist/modules/crm_backend/index.js +2 -15
- package/dist/modules/crm_backend/index.js.map +1 -1
- package/dist/modules/crm_backend/islands.d.ts +1 -0
- package/dist/modules/crm_backend/islands.d.ts.map +1 -1
- package/dist/modules/crm_backend/islands.js +5 -0
- package/dist/modules/crm_backend/islands.js.map +1 -1
- package/dist/modules/crm_backend/messages.d.ts +34 -0
- package/dist/modules/crm_backend/messages.d.ts.map +1 -1
- package/dist/modules/crm_backend/messages.js +34 -0
- package/dist/modules/crm_backend/messages.js.map +1 -1
- package/dist/modules/crm_backend/modal/case-modal-view.d.ts +23 -0
- package/dist/modules/crm_backend/modal/case-modal-view.d.ts.map +1 -0
- package/dist/modules/crm_backend/modal/case-modal-view.js +640 -0
- package/dist/modules/crm_backend/modal/case-modal-view.js.map +1 -0
- package/dist/modules/crm_backend/routes.d.ts.map +1 -1
- package/dist/modules/crm_backend/routes.js +71 -15
- package/dist/modules/crm_backend/routes.js.map +1 -1
- package/dist/modules/crm_backend/screens/activity-planner.d.ts +1 -0
- package/dist/modules/crm_backend/screens/activity-planner.d.ts.map +1 -1
- package/dist/modules/crm_backend/screens/activity-planner.js +15 -11
- package/dist/modules/crm_backend/screens/activity-planner.js.map +1 -1
- package/dist/modules/crm_backend/screens/cases-list.d.ts +1 -0
- package/dist/modules/crm_backend/screens/cases-list.d.ts.map +1 -1
- package/dist/modules/crm_backend/screens/cases-list.js +17 -26
- package/dist/modules/crm_backend/screens/cases-list.js.map +1 -1
- package/dist/modules/crm_backend/screens/configuration.d.ts.map +1 -1
- package/dist/modules/crm_backend/screens/configuration.js +18 -16
- package/dist/modules/crm_backend/screens/configuration.js.map +1 -1
- package/dist/modules/crm_backend/screens/leaderboard.d.ts +2 -0
- package/dist/modules/crm_backend/screens/leaderboard.d.ts.map +1 -1
- package/dist/modules/crm_backend/screens/leaderboard.js +12 -18
- package/dist/modules/crm_backend/screens/leaderboard.js.map +1 -1
- package/dist/modules/flow/functions.d.ts.map +1 -1
- package/dist/modules/flow/functions.js +20 -39
- package/dist/modules/flow/functions.js.map +1 -1
- package/dist/modules/flow_backend/index.js +2 -1
- package/dist/modules/flow_backend/index.js.map +1 -1
- package/dist/modules/flow_backend/routes.d.ts.map +1 -1
- package/dist/modules/flow_backend/routes.js +181 -126
- package/dist/modules/flow_backend/routes.js.map +1 -1
- package/dist/modules/flow_backend/screens/all-epics.d.ts.map +1 -1
- package/dist/modules/flow_backend/screens/all-epics.js +37 -45
- package/dist/modules/flow_backend/screens/all-epics.js.map +1 -1
- package/dist/modules/flow_backend/screens/all-pages.d.ts.map +1 -1
- package/dist/modules/flow_backend/screens/all-pages.js +43 -51
- package/dist/modules/flow_backend/screens/all-pages.js.map +1 -1
- package/dist/modules/flow_backend/screens/issues.d.ts.map +1 -1
- package/dist/modules/flow_backend/screens/issues.js +68 -82
- package/dist/modules/flow_backend/screens/issues.js.map +1 -1
- package/dist/modules/flow_backend/screens/my-work.d.ts.map +1 -1
- package/dist/modules/flow_backend/screens/my-work.js +63 -69
- package/dist/modules/flow_backend/screens/my-work.js.map +1 -1
- package/dist/modules/flow_backend/screens/project-pages.d.ts.map +1 -1
- package/dist/modules/flow_backend/screens/project-pages.js +1 -2
- package/dist/modules/flow_backend/screens/project-pages.js.map +1 -1
- package/dist/modules/flow_backend/screens/projects-list.d.ts.map +1 -1
- package/dist/modules/flow_backend/screens/projects-list.js +41 -64
- package/dist/modules/flow_backend/screens/projects-list.js.map +1 -1
- package/dist/modules/flow_backend/screens/sprints.d.ts +3 -1
- package/dist/modules/flow_backend/screens/sprints.d.ts.map +1 -1
- package/dist/modules/flow_backend/screens/sprints.js +77 -73
- package/dist/modules/flow_backend/screens/sprints.js.map +1 -1
- package/dist/modules/flow_backend/search-functions.d.ts +13 -0
- package/dist/modules/flow_backend/search-functions.d.ts.map +1 -0
- package/dist/modules/flow_backend/search-functions.js +40 -0
- package/dist/modules/flow_backend/search-functions.js.map +1 -0
- package/dist/modules/flow_backend/search.d.ts +48 -0
- package/dist/modules/flow_backend/search.d.ts.map +1 -0
- package/dist/modules/flow_backend/search.js +57 -0
- package/dist/modules/flow_backend/search.js.map +1 -0
- package/dist/modules/hospitality_billing/index.js +2 -1
- package/dist/modules/hospitality_billing/index.js.map +1 -1
- package/dist/modules/hospitality_billing/menus.js +2 -2
- package/dist/modules/hospitality_billing/menus.js.map +1 -1
- package/dist/modules/hospitality_billing/messages.d.ts.map +1 -1
- package/dist/modules/hospitality_billing/messages.js +2 -0
- package/dist/modules/hospitality_billing/messages.js.map +1 -1
- package/dist/modules/hospitality_billing/routes.d.ts.map +1 -1
- package/dist/modules/hospitality_billing/routes.js +39 -5
- package/dist/modules/hospitality_billing/routes.js.map +1 -1
- package/dist/modules/hospitality_billing/screens/billing.d.ts.map +1 -1
- package/dist/modules/hospitality_billing/screens/billing.js +21 -17
- package/dist/modules/hospitality_billing/screens/billing.js.map +1 -1
- package/dist/modules/hospitality_billing/screens/charge-rules.d.ts +4 -2
- package/dist/modules/hospitality_billing/screens/charge-rules.d.ts.map +1 -1
- package/dist/modules/hospitality_billing/screens/charge-rules.js +14 -9
- package/dist/modules/hospitality_billing/screens/charge-rules.js.map +1 -1
- package/dist/modules/hospitality_billing/screens/page-frame.d.ts +3 -1
- package/dist/modules/hospitality_billing/screens/page-frame.d.ts.map +1 -1
- package/dist/modules/hospitality_billing/screens/page-frame.js +2 -4
- package/dist/modules/hospitality_billing/screens/page-frame.js.map +1 -1
- package/dist/modules/hospitality_billing/screens/shared.d.ts +4 -4
- package/dist/modules/hospitality_billing/screens/shared.d.ts.map +1 -1
- package/dist/modules/hospitality_billing/screens/shared.js +2 -2
- package/dist/modules/hospitality_billing/screens/shared.js.map +1 -1
- package/dist/modules/hospitality_billing/search-functions.d.ts +4 -0
- package/dist/modules/hospitality_billing/search-functions.d.ts.map +1 -0
- package/dist/modules/hospitality_billing/search-functions.js +16 -0
- package/dist/modules/hospitality_billing/search-functions.js.map +1 -0
- package/dist/modules/hospitality_billing/search.d.ts +66 -0
- package/dist/modules/hospitality_billing/search.d.ts.map +1 -0
- package/dist/modules/hospitality_billing/search.js +92 -0
- package/dist/modules/hospitality_billing/search.js.map +1 -0
- package/dist/modules/hospitality_core/content.d.ts.map +1 -1
- package/dist/modules/hospitality_core/content.js +3 -0
- package/dist/modules/hospitality_core/content.js.map +1 -1
- package/dist/modules/hospitality_core/housekeeping.d.ts.map +1 -1
- package/dist/modules/hospitality_core/housekeeping.js +13 -4
- package/dist/modules/hospitality_core/housekeeping.js.map +1 -1
- package/dist/modules/hospitality_core/index.d.ts.map +1 -1
- package/dist/modules/hospitality_core/index.js +2 -0
- package/dist/modules/hospitality_core/index.js.map +1 -1
- package/dist/modules/hospitality_core/menus.d.ts.map +1 -1
- package/dist/modules/hospitality_core/menus.js +27 -30
- package/dist/modules/hospitality_core/menus.js.map +1 -1
- package/dist/modules/hospitality_core/messages.d.ts.map +1 -1
- package/dist/modules/hospitality_core/messages.js +4 -0
- package/dist/modules/hospitality_core/messages.js.map +1 -1
- package/dist/modules/hospitality_core/routes.d.ts.map +1 -1
- package/dist/modules/hospitality_core/routes.js +135 -47
- package/dist/modules/hospitality_core/routes.js.map +1 -1
- package/dist/modules/hospitality_core/screens/amenities.d.ts +4 -2
- package/dist/modules/hospitality_core/screens/amenities.d.ts.map +1 -1
- package/dist/modules/hospitality_core/screens/amenities.js +9 -5
- package/dist/modules/hospitality_core/screens/amenities.js.map +1 -1
- package/dist/modules/hospitality_core/screens/cleaning-tasks.d.ts.map +1 -1
- package/dist/modules/hospitality_core/screens/cleaning-tasks.js +45 -30
- package/dist/modules/hospitality_core/screens/cleaning-tasks.js.map +1 -1
- package/dist/modules/hospitality_core/screens/folios.d.ts +4 -2
- package/dist/modules/hospitality_core/screens/folios.d.ts.map +1 -1
- package/dist/modules/hospitality_core/screens/folios.js +10 -4
- package/dist/modules/hospitality_core/screens/folios.js.map +1 -1
- package/dist/modules/hospitality_core/screens/page-frame.d.ts +3 -1
- package/dist/modules/hospitality_core/screens/page-frame.d.ts.map +1 -1
- package/dist/modules/hospitality_core/screens/page-frame.js +4 -7
- package/dist/modules/hospitality_core/screens/page-frame.js.map +1 -1
- package/dist/modules/hospitality_core/screens/policies.d.ts +4 -2
- package/dist/modules/hospitality_core/screens/policies.d.ts.map +1 -1
- package/dist/modules/hospitality_core/screens/policies.js +9 -5
- package/dist/modules/hospitality_core/screens/policies.js.map +1 -1
- package/dist/modules/hospitality_core/screens/properties.d.ts +4 -2
- package/dist/modules/hospitality_core/screens/properties.d.ts.map +1 -1
- package/dist/modules/hospitality_core/screens/properties.js +49 -42
- package/dist/modules/hospitality_core/screens/properties.js.map +1 -1
- package/dist/modules/hospitality_core/screens/rate-plans.d.ts.map +1 -1
- package/dist/modules/hospitality_core/screens/rate-plans.js +19 -15
- package/dist/modules/hospitality_core/screens/rate-plans.js.map +1 -1
- package/dist/modules/hospitality_core/screens/reservations.d.ts.map +1 -1
- package/dist/modules/hospitality_core/screens/reservations.js +26 -19
- package/dist/modules/hospitality_core/screens/reservations.js.map +1 -1
- package/dist/modules/hospitality_core/screens/room-types.d.ts.map +1 -1
- package/dist/modules/hospitality_core/screens/room-types.js +23 -19
- package/dist/modules/hospitality_core/screens/room-types.js.map +1 -1
- package/dist/modules/hospitality_core/screens/rooms.d.ts.map +1 -1
- package/dist/modules/hospitality_core/screens/rooms.js +26 -19
- package/dist/modules/hospitality_core/screens/rooms.js.map +1 -1
- package/dist/modules/hospitality_core/screens/shared.d.ts +4 -4
- package/dist/modules/hospitality_core/screens/shared.d.ts.map +1 -1
- package/dist/modules/hospitality_core/screens/shared.js +2 -2
- package/dist/modules/hospitality_core/screens/shared.js.map +1 -1
- package/dist/modules/hospitality_core/screens/stays.d.ts +4 -2
- package/dist/modules/hospitality_core/screens/stays.d.ts.map +1 -1
- package/dist/modules/hospitality_core/screens/stays.js +10 -4
- package/dist/modules/hospitality_core/screens/stays.js.map +1 -1
- package/dist/modules/hospitality_core/search-functions.d.ts +10 -0
- package/dist/modules/hospitality_core/search-functions.d.ts.map +1 -0
- package/dist/modules/hospitality_core/search-functions.js +17 -0
- package/dist/modules/hospitality_core/search-functions.js.map +1 -0
- package/dist/modules/hospitality_core/search.d.ts +218 -0
- package/dist/modules/hospitality_core/search.d.ts.map +1 -0
- package/dist/modules/hospitality_core/search.js +201 -0
- package/dist/modules/hospitality_core/search.js.map +1 -0
- package/dist/modules/hr_backend/index.d.ts.map +1 -1
- package/dist/modules/hr_backend/index.js +2 -0
- package/dist/modules/hr_backend/index.js.map +1 -1
- package/dist/modules/hr_backend/routes.d.ts.map +1 -1
- package/dist/modules/hr_backend/routes.js +55 -71
- package/dist/modules/hr_backend/routes.js.map +1 -1
- package/dist/modules/hr_backend/screens/employees-list.d.ts +3 -1
- package/dist/modules/hr_backend/screens/employees-list.d.ts.map +1 -1
- package/dist/modules/hr_backend/screens/employees-list.js +14 -12
- package/dist/modules/hr_backend/screens/employees-list.js.map +1 -1
- package/dist/modules/hr_backend/screens/leaves-list.d.ts +3 -1
- package/dist/modules/hr_backend/screens/leaves-list.d.ts.map +1 -1
- package/dist/modules/hr_backend/screens/leaves-list.js +11 -10
- package/dist/modules/hr_backend/screens/leaves-list.js.map +1 -1
- package/dist/modules/hr_backend/search-functions.d.ts +4 -0
- package/dist/modules/hr_backend/search-functions.d.ts.map +1 -0
- package/dist/modules/hr_backend/search-functions.js +8 -0
- package/dist/modules/hr_backend/search-functions.js.map +1 -0
- package/dist/modules/hr_backend/search.d.ts +73 -0
- package/dist/modules/hr_backend/search.d.ts.map +1 -0
- package/dist/modules/hr_backend/search.js +67 -0
- package/dist/modules/hr_backend/search.js.map +1 -0
- package/dist/modules/livedoc/islands.d.ts +1 -0
- package/dist/modules/livedoc/islands.d.ts.map +1 -1
- package/dist/modules/loyalty_backend/index.js +176 -215
- package/dist/modules/loyalty_backend/index.js.map +1 -1
- package/dist/modules/loyalty_backend/screens/index.d.ts.map +1 -1
- package/dist/modules/loyalty_backend/screens/index.js +321 -326
- package/dist/modules/loyalty_backend/screens/index.js.map +1 -1
- package/dist/modules/loyalty_backend/screens/page-frame.d.ts +6 -3
- package/dist/modules/loyalty_backend/screens/page-frame.d.ts.map +1 -1
- package/dist/modules/loyalty_backend/screens/page-frame.js +3 -3
- package/dist/modules/loyalty_backend/screens/page-frame.js.map +1 -1
- package/dist/modules/loyalty_backend/search-functions.d.ts +4 -0
- package/dist/modules/loyalty_backend/search-functions.d.ts.map +1 -0
- package/dist/modules/loyalty_backend/search-functions.js +11 -0
- package/dist/modules/loyalty_backend/search-functions.js.map +1 -0
- package/dist/modules/loyalty_backend/search.d.ts +33 -0
- package/dist/modules/loyalty_backend/search.d.ts.map +1 -0
- package/dist/modules/loyalty_backend/search.js +85 -0
- package/dist/modules/loyalty_backend/search.js.map +1 -0
- package/dist/modules/manufacturing_backend/index.d.ts.map +1 -1
- package/dist/modules/manufacturing_backend/index.js +14 -0
- package/dist/modules/manufacturing_backend/index.js.map +1 -1
- package/dist/modules/manufacturing_backend/routes.d.ts.map +1 -1
- package/dist/modules/manufacturing_backend/routes.js +74 -20
- package/dist/modules/manufacturing_backend/routes.js.map +1 -1
- package/dist/modules/manufacturing_backend/screens/boms-list.d.ts +3 -1
- package/dist/modules/manufacturing_backend/screens/boms-list.d.ts.map +1 -1
- package/dist/modules/manufacturing_backend/screens/boms-list.js +12 -11
- package/dist/modules/manufacturing_backend/screens/boms-list.js.map +1 -1
- package/dist/modules/manufacturing_backend/screens/orders-list.d.ts +3 -1
- package/dist/modules/manufacturing_backend/screens/orders-list.d.ts.map +1 -1
- package/dist/modules/manufacturing_backend/screens/orders-list.js +13 -12
- package/dist/modules/manufacturing_backend/screens/orders-list.js.map +1 -1
- package/dist/modules/manufacturing_backend/screens/work-centers-list.d.ts +3 -1
- package/dist/modules/manufacturing_backend/screens/work-centers-list.d.ts.map +1 -1
- package/dist/modules/manufacturing_backend/screens/work-centers-list.js +13 -12
- package/dist/modules/manufacturing_backend/screens/work-centers-list.js.map +1 -1
- package/dist/modules/manufacturing_backend/search-functions.d.ts +4 -0
- package/dist/modules/manufacturing_backend/search-functions.d.ts.map +1 -0
- package/dist/modules/manufacturing_backend/search-functions.js +9 -0
- package/dist/modules/manufacturing_backend/search-functions.js.map +1 -0
- package/dist/modules/manufacturing_backend/search.d.ts +99 -0
- package/dist/modules/manufacturing_backend/search.d.ts.map +1 -0
- package/dist/modules/manufacturing_backend/search.js +75 -0
- package/dist/modules/manufacturing_backend/search.js.map +1 -0
- package/dist/modules/oauth_backend/index.d.ts.map +1 -1
- package/dist/modules/oauth_backend/index.js +2 -0
- package/dist/modules/oauth_backend/index.js.map +1 -1
- package/dist/modules/oauth_backend/routes.d.ts.map +1 -1
- package/dist/modules/oauth_backend/routes.js +33 -2
- package/dist/modules/oauth_backend/routes.js.map +1 -1
- package/dist/modules/oauth_backend/screens/index.d.ts +7 -3
- package/dist/modules/oauth_backend/screens/index.d.ts.map +1 -1
- package/dist/modules/oauth_backend/screens/index.js +113 -103
- package/dist/modules/oauth_backend/screens/index.js.map +1 -1
- package/dist/modules/oauth_backend/search-functions.d.ts +4 -0
- package/dist/modules/oauth_backend/search-functions.d.ts.map +1 -0
- package/dist/modules/oauth_backend/search-functions.js +8 -0
- package/dist/modules/oauth_backend/search-functions.js.map +1 -0
- package/dist/modules/oauth_backend/search.d.ts +68 -0
- package/dist/modules/oauth_backend/search.d.ts.map +1 -0
- package/dist/modules/oauth_backend/search.js +69 -0
- package/dist/modules/oauth_backend/search.js.map +1 -0
- package/dist/modules/partner/functions.d.ts.map +1 -1
- package/dist/modules/partner/functions.js +121 -23
- package/dist/modules/partner/functions.js.map +1 -1
- package/dist/modules/partner_backend/functions.d.ts +13 -0
- package/dist/modules/partner_backend/functions.d.ts.map +1 -0
- package/dist/modules/partner_backend/functions.js +56 -0
- package/dist/modules/partner_backend/functions.js.map +1 -0
- package/dist/modules/partner_backend/index.d.ts.map +1 -1
- package/dist/modules/partner_backend/index.js +28 -6
- package/dist/modules/partner_backend/index.js.map +1 -1
- package/dist/modules/partner_backend/routes.d.ts.map +1 -1
- package/dist/modules/partner_backend/routes.js +269 -86
- package/dist/modules/partner_backend/routes.js.map +1 -1
- package/dist/modules/partner_backend/screens/index.d.ts +1 -1
- package/dist/modules/partner_backend/screens/index.d.ts.map +1 -1
- package/dist/modules/partner_backend/screens/list.d.ts +3 -4
- package/dist/modules/partner_backend/screens/list.d.ts.map +1 -1
- package/dist/modules/partner_backend/screens/list.js +13 -92
- package/dist/modules/partner_backend/screens/list.js.map +1 -1
- package/dist/modules/partner_backend/screens/types.d.ts +0 -11
- package/dist/modules/partner_backend/screens/types.d.ts.map +1 -1
- package/dist/modules/pos_backend/index.js +34 -9
- package/dist/modules/pos_backend/index.js.map +1 -1
- package/dist/modules/pos_backend/screens.d.ts +4 -2
- package/dist/modules/pos_backend/screens.d.ts.map +1 -1
- package/dist/modules/pos_backend/screens.js +105 -96
- package/dist/modules/pos_backend/screens.js.map +1 -1
- package/dist/modules/pos_backend/search-functions.d.ts +4 -0
- package/dist/modules/pos_backend/search-functions.d.ts.map +1 -0
- package/dist/modules/pos_backend/search-functions.js +7 -0
- package/dist/modules/pos_backend/search-functions.js.map +1 -0
- package/dist/modules/pos_backend/search.d.ts +41 -0
- package/dist/modules/pos_backend/search.d.ts.map +1 -0
- package/dist/modules/pos_backend/search.js +33 -0
- package/dist/modules/pos_backend/search.js.map +1 -0
- package/dist/modules/pricing_backend/index.js +31 -2
- package/dist/modules/pricing_backend/index.js.map +1 -1
- package/dist/modules/pricing_backend/screens/pricelists-list.d.ts +3 -1
- package/dist/modules/pricing_backend/screens/pricelists-list.d.ts.map +1 -1
- package/dist/modules/pricing_backend/screens/pricelists-list.js +14 -12
- package/dist/modules/pricing_backend/screens/pricelists-list.js.map +1 -1
- package/dist/modules/pricing_backend/search-functions.d.ts +4 -0
- package/dist/modules/pricing_backend/search-functions.d.ts.map +1 -0
- package/dist/modules/pricing_backend/search-functions.js +11 -0
- package/dist/modules/pricing_backend/search-functions.js.map +1 -0
- package/dist/modules/pricing_backend/search.d.ts +41 -0
- package/dist/modules/pricing_backend/search.d.ts.map +1 -0
- package/dist/modules/pricing_backend/search.js +34 -0
- package/dist/modules/pricing_backend/search.js.map +1 -0
- package/dist/modules/product/attribute-draft.d.ts +3 -0
- package/dist/modules/product/attribute-draft.d.ts.map +1 -0
- package/dist/modules/product/attribute-draft.js +126 -0
- package/dist/modules/product/attribute-draft.js.map +1 -0
- package/dist/modules/product/attribute-modal-context.d.ts +4 -0
- package/dist/modules/product/attribute-modal-context.d.ts.map +1 -0
- package/dist/modules/product/attribute-modal-context.js +57 -0
- package/dist/modules/product/attribute-modal-context.js.map +1 -0
- package/dist/modules/product/attribute-modal-labels.d.ts +3 -0
- package/dist/modules/product/attribute-modal-labels.d.ts.map +1 -0
- package/dist/modules/product/attribute-modal-labels.js +30 -0
- package/dist/modules/product/attribute-modal-labels.js.map +1 -0
- package/dist/modules/product/functions.d.ts.map +1 -1
- package/dist/modules/product/functions.js +7 -1
- package/dist/modules/product/functions.js.map +1 -1
- package/dist/modules/product/messages.d.ts.map +1 -1
- package/dist/modules/product/messages.js +24 -0
- package/dist/modules/product/messages.js.map +1 -1
- package/dist/modules/product/models.d.ts.map +1 -1
- package/dist/modules/product/models.js +14 -2
- package/dist/modules/product/models.js.map +1 -1
- package/dist/modules/product/product-modal-context.d.ts.map +1 -1
- package/dist/modules/product/product-modal-context.js +22 -30
- package/dist/modules/product/product-modal-context.js.map +1 -1
- package/dist/modules/product/product-record-tabs.d.ts +14 -0
- package/dist/modules/product/product-record-tabs.d.ts.map +1 -0
- package/dist/modules/product/product-record-tabs.js +23 -0
- package/dist/modules/product/product-record-tabs.js.map +1 -0
- package/dist/modules/product/record-images.d.ts +12 -0
- package/dist/modules/product/record-images.d.ts.map +1 -0
- package/dist/modules/product/record-images.js +37 -0
- package/dist/modules/product/record-images.js.map +1 -0
- package/dist/modules/product/search.d.ts +3 -0
- package/dist/modules/product/search.d.ts.map +1 -1
- package/dist/modules/product/search.js +4 -0
- package/dist/modules/product/search.js.map +1 -1
- package/dist/modules/product/variant-setup.d.ts +46 -0
- package/dist/modules/product/variant-setup.d.ts.map +1 -0
- package/dist/modules/product/variant-setup.js +444 -0
- package/dist/modules/product/variant-setup.js.map +1 -0
- package/dist/modules/product_backend/attribute-search-state.d.ts +22 -0
- package/dist/modules/product_backend/attribute-search-state.d.ts.map +1 -0
- package/dist/modules/product_backend/attribute-search-state.js +62 -0
- package/dist/modules/product_backend/attribute-search-state.js.map +1 -0
- package/dist/modules/product_backend/attributes-search.d.ts +10 -0
- package/dist/modules/product_backend/attributes-search.d.ts.map +1 -0
- package/dist/modules/product_backend/attributes-search.js +67 -0
- package/dist/modules/product_backend/attributes-search.js.map +1 -0
- package/dist/modules/product_backend/client/attribute-modal.d.mts +62 -0
- package/dist/modules/product_backend/client/attribute-modal.d.mts.map +1 -0
- package/dist/modules/product_backend/client/attribute-modal.mjs +2 -0
- package/dist/modules/product_backend/client/attribute-modal.mjs.map +7 -0
- package/dist/modules/product_backend/client/product-modal.d.mts +46 -44
- package/dist/modules/product_backend/client/product-modal.d.mts.map +1 -1
- package/dist/modules/product_backend/client/product-modal.mjs +1 -1
- package/dist/modules/product_backend/client/product-modal.mjs.map +4 -4
- package/dist/modules/product_backend/client/product.css +262 -0
- package/dist/modules/product_backend/client/variant-editor.d.mts +16 -0
- package/dist/modules/product_backend/client/variant-editor.d.mts.map +1 -0
- package/dist/modules/product_backend/client/variant-editor.mjs +2 -0
- package/dist/modules/product_backend/client/variant-editor.mjs.map +7 -0
- package/dist/modules/product_backend/functions.d.ts +3 -0
- package/dist/modules/product_backend/functions.d.ts.map +1 -0
- package/dist/modules/product_backend/functions.js +29 -0
- package/dist/modules/product_backend/functions.js.map +1 -0
- package/dist/modules/product_backend/index.d.ts.map +1 -1
- package/dist/modules/product_backend/index.js +236 -5
- package/dist/modules/product_backend/index.js.map +1 -1
- package/dist/modules/product_backend/islands.d.ts +20 -0
- package/dist/modules/product_backend/islands.d.ts.map +1 -1
- package/dist/modules/product_backend/islands.js +25 -0
- package/dist/modules/product_backend/islands.js.map +1 -1
- package/dist/modules/product_backend/menus.d.ts.map +1 -1
- package/dist/modules/product_backend/menus.js +4 -5
- package/dist/modules/product_backend/menus.js.map +1 -1
- package/dist/modules/product_backend/modal/attribute-modal-view.d.ts +25 -0
- package/dist/modules/product_backend/modal/attribute-modal-view.d.ts.map +1 -0
- package/dist/modules/product_backend/modal/attribute-modal-view.js +180 -0
- package/dist/modules/product_backend/modal/attribute-modal-view.js.map +1 -0
- package/dist/modules/product_backend/modal/product-modal-view.d.ts +31 -6
- package/dist/modules/product_backend/modal/product-modal-view.d.ts.map +1 -1
- package/dist/modules/product_backend/modal/product-modal-view.js +342 -252
- package/dist/modules/product_backend/modal/product-modal-view.js.map +1 -1
- package/dist/modules/product_backend/routes.d.ts.map +1 -1
- package/dist/modules/product_backend/routes.js +159 -200
- package/dist/modules/product_backend/routes.js.map +1 -1
- package/dist/modules/product_backend/screens/attributes.d.ts +18 -4
- package/dist/modules/product_backend/screens/attributes.d.ts.map +1 -1
- package/dist/modules/product_backend/screens/attributes.js +71 -63
- package/dist/modules/product_backend/screens/attributes.js.map +1 -1
- package/dist/modules/product_backend/screens/list.d.ts +13 -7
- package/dist/modules/product_backend/screens/list.d.ts.map +1 -1
- package/dist/modules/product_backend/screens/list.js +38 -57
- package/dist/modules/product_backend/screens/list.js.map +1 -1
- package/dist/modules/product_media/functions.d.ts.map +1 -1
- package/dist/modules/product_media/functions.js +2 -0
- package/dist/modules/product_media/functions.js.map +1 -1
- package/dist/modules/purchase_backend/index.js +116 -208
- package/dist/modules/purchase_backend/index.js.map +1 -1
- package/dist/modules/purchase_backend/screens/order-list-shared.js +2 -2
- package/dist/modules/purchase_backend/screens/order-list-shared.js.map +1 -1
- package/dist/modules/purchase_backend/screens/purchase-orders-list.d.ts.map +1 -1
- package/dist/modules/purchase_backend/screens/purchase-orders-list.js +11 -13
- package/dist/modules/purchase_backend/screens/purchase-orders-list.js.map +1 -1
- package/dist/modules/purchase_backend/screens/rfqs-list.d.ts.map +1 -1
- package/dist/modules/purchase_backend/screens/rfqs-list.js +10 -15
- package/dist/modules/purchase_backend/screens/rfqs-list.js.map +1 -1
- package/dist/modules/purchase_backend/screens/vendor-pricelists-list.d.ts.map +1 -1
- package/dist/modules/purchase_backend/screens/vendor-pricelists-list.js +11 -21
- package/dist/modules/purchase_backend/screens/vendor-pricelists-list.js.map +1 -1
- package/dist/modules/purchase_backend/search-functions.d.ts +4 -0
- package/dist/modules/purchase_backend/search-functions.d.ts.map +1 -0
- package/dist/modules/purchase_backend/search-functions.js +9 -0
- package/dist/modules/purchase_backend/search-functions.js.map +1 -0
- package/dist/modules/purchase_backend/search.d.ts +128 -0
- package/dist/modules/purchase_backend/search.d.ts.map +1 -0
- package/dist/modules/purchase_backend/search.js +106 -0
- package/dist/modules/purchase_backend/search.js.map +1 -0
- package/dist/modules/sale_backend/index.js +83 -32
- package/dist/modules/sale_backend/index.js.map +1 -1
- package/dist/modules/sale_backend/order-collection.d.ts +7 -0
- package/dist/modules/sale_backend/order-collection.d.ts.map +1 -0
- package/dist/modules/sale_backend/order-collection.js +27 -0
- package/dist/modules/sale_backend/order-collection.js.map +1 -0
- package/dist/modules/sale_backend/screens/invoicing-policies-list.d.ts.map +1 -1
- package/dist/modules/sale_backend/screens/invoicing-policies-list.js +10 -14
- package/dist/modules/sale_backend/screens/invoicing-policies-list.js.map +1 -1
- package/dist/modules/sale_backend/screens/overview.js +2 -2
- package/dist/modules/sale_backend/screens/overview.js.map +1 -1
- package/dist/modules/sale_backend/screens/quotations-list.d.ts.map +1 -1
- package/dist/modules/sale_backend/screens/quotations-list.js +12 -23
- package/dist/modules/sale_backend/screens/quotations-list.js.map +1 -1
- package/dist/modules/sale_backend/screens/sales-orders-list.d.ts.map +1 -1
- package/dist/modules/sale_backend/screens/sales-orders-list.js +11 -20
- package/dist/modules/sale_backend/screens/sales-orders-list.js.map +1 -1
- package/dist/modules/sale_backend/search-functions.d.ts +4 -0
- package/dist/modules/sale_backend/search-functions.d.ts.map +1 -0
- package/dist/modules/sale_backend/search-functions.js +9 -0
- package/dist/modules/sale_backend/search-functions.js.map +1 -0
- package/dist/modules/sale_backend/search.d.ts +146 -0
- package/dist/modules/sale_backend/search.d.ts.map +1 -0
- package/dist/modules/sale_backend/search.js +112 -0
- package/dist/modules/sale_backend/search.js.map +1 -0
- package/dist/modules/stock_backend/functions.d.ts +10 -0
- package/dist/modules/stock_backend/functions.d.ts.map +1 -0
- package/dist/modules/stock_backend/functions.js +19 -0
- package/dist/modules/stock_backend/functions.js.map +1 -0
- package/dist/modules/stock_backend/index.js +33 -10
- package/dist/modules/stock_backend/index.js.map +1 -1
- package/dist/modules/stock_backend/routes.d.ts.map +1 -1
- package/dist/modules/stock_backend/routes.js +168 -59
- package/dist/modules/stock_backend/routes.js.map +1 -1
- package/dist/modules/stock_backend/screens/locations-list.d.ts.map +1 -1
- package/dist/modules/stock_backend/screens/locations-list.js +11 -22
- package/dist/modules/stock_backend/screens/locations-list.js.map +1 -1
- package/dist/modules/stock_backend/screens/lots-list.d.ts.map +1 -1
- package/dist/modules/stock_backend/screens/lots-list.js +11 -13
- package/dist/modules/stock_backend/screens/lots-list.js.map +1 -1
- package/dist/modules/stock_backend/screens/picking-types-list.d.ts.map +1 -1
- package/dist/modules/stock_backend/screens/picking-types-list.js +11 -22
- package/dist/modules/stock_backend/screens/picking-types-list.js.map +1 -1
- package/dist/modules/stock_backend/screens/replenishment-list.d.ts.map +1 -1
- package/dist/modules/stock_backend/screens/replenishment-list.js +11 -22
- package/dist/modules/stock_backend/screens/replenishment-list.js.map +1 -1
- package/dist/modules/stock_backend/screens/stock-routes-list.d.ts.map +1 -1
- package/dist/modules/stock_backend/screens/stock-routes-list.js +12 -23
- package/dist/modules/stock_backend/screens/stock-routes-list.js.map +1 -1
- package/dist/modules/stock_backend/screens/transfers-list.d.ts.map +1 -1
- package/dist/modules/stock_backend/screens/transfers-list.js +12 -23
- package/dist/modules/stock_backend/screens/transfers-list.js.map +1 -1
- package/dist/modules/stock_backend/screens/warehouses-list.d.ts.map +1 -1
- package/dist/modules/stock_backend/screens/warehouses-list.js +11 -22
- package/dist/modules/stock_backend/screens/warehouses-list.js.map +1 -1
- package/dist/modules/stock_backend/search.d.ts +257 -0
- package/dist/modules/stock_backend/search.d.ts.map +1 -0
- package/dist/modules/stock_backend/search.js +349 -0
- package/dist/modules/stock_backend/search.js.map +1 -0
- package/dist/modules/storage/functions.d.ts.map +1 -1
- package/dist/modules/storage/functions.js +28 -5
- package/dist/modules/storage/functions.js.map +1 -1
- package/dist/modules/storage/jobs.d.ts.map +1 -1
- package/dist/modules/storage/jobs.js +120 -2
- package/dist/modules/storage/jobs.js.map +1 -1
- package/dist/modules/storage/models.d.ts.map +1 -1
- package/dist/modules/storage/models.js +21 -0
- package/dist/modules/storage/models.js.map +1 -1
- package/dist/modules/storage/policy.d.ts +27 -0
- package/dist/modules/storage/policy.d.ts.map +1 -1
- package/dist/modules/storage/policy.js +14 -0
- package/dist/modules/storage/policy.js.map +1 -1
- package/dist/modules/storage/routes.d.ts +1 -0
- package/dist/modules/storage/routes.d.ts.map +1 -1
- package/dist/modules/storage/routes.js +36 -10
- package/dist/modules/storage/routes.js.map +1 -1
- package/dist/modules/user/access-denial.d.ts +3 -0
- package/dist/modules/user/access-denial.d.ts.map +1 -0
- package/dist/modules/user/access-denial.js +34 -0
- package/dist/modules/user/access-denial.js.map +1 -0
- package/dist/modules/user/access-policy.d.ts +16 -0
- package/dist/modules/user/access-policy.d.ts.map +1 -0
- package/dist/modules/user/access-policy.js +455 -0
- package/dist/modules/user/access-policy.js.map +1 -0
- package/dist/modules/user/access-surfaces.d.ts +26 -0
- package/dist/modules/user/access-surfaces.d.ts.map +1 -0
- package/dist/modules/user/access-surfaces.js +76 -0
- package/dist/modules/user/access-surfaces.js.map +1 -0
- package/dist/modules/user/authorization.d.ts +12 -1
- package/dist/modules/user/authorization.d.ts.map +1 -1
- package/dist/modules/user/authorization.js +342 -36
- package/dist/modules/user/authorization.js.map +1 -1
- package/dist/modules/user/functions.d.ts.map +1 -1
- package/dist/modules/user/functions.js +26 -3
- package/dist/modules/user/functions.js.map +1 -1
- package/dist/modules/user/index.d.ts.map +1 -1
- package/dist/modules/user/index.js +13 -1
- package/dist/modules/user/index.js.map +1 -1
- package/dist/modules/user/modal-labels.d.ts +3 -0
- package/dist/modules/user/modal-labels.d.ts.map +1 -0
- package/dist/modules/user/modal-labels.js +30 -0
- package/dist/modules/user/modal-labels.js.map +1 -0
- package/dist/modules/user/modal-messages.d.ts +4 -0
- package/dist/modules/user/modal-messages.d.ts.map +1 -0
- package/dist/modules/user/modal-messages.js +15 -0
- package/dist/modules/user/modal-messages.js.map +1 -0
- package/dist/modules/user/models.d.ts.map +1 -1
- package/dist/modules/user/models.js +48 -0
- package/dist/modules/user/models.js.map +1 -1
- package/dist/modules/user/permission-areas.d.ts +20 -0
- package/dist/modules/user/permission-areas.d.ts.map +1 -0
- package/dist/modules/user/permission-areas.js +89 -0
- package/dist/modules/user/permission-areas.js.map +1 -0
- package/dist/modules/user/policy-jobs.d.ts +4 -0
- package/dist/modules/user/policy-jobs.d.ts.map +1 -0
- package/dist/modules/user/policy-jobs.js +15 -0
- package/dist/modules/user/policy-jobs.js.map +1 -0
- package/dist/modules/user/role-modal-context.d.ts +3 -0
- package/dist/modules/user/role-modal-context.d.ts.map +1 -0
- package/dist/modules/user/role-modal-context.js +264 -0
- package/dist/modules/user/role-modal-context.js.map +1 -0
- package/dist/modules/user/roles.d.ts.map +1 -1
- package/dist/modules/user/roles.js +2 -0
- package/dist/modules/user/roles.js.map +1 -1
- package/dist/modules/user/user-modal-context.d.ts +5 -1
- package/dist/modules/user/user-modal-context.d.ts.map +1 -1
- package/dist/modules/user/user-modal-context.js +227 -31
- package/dist/modules/user/user-modal-context.js.map +1 -1
- package/dist/modules/user_backend/access-options.d.ts +25 -0
- package/dist/modules/user_backend/access-options.d.ts.map +1 -0
- package/dist/modules/user_backend/access-options.js +38 -0
- package/dist/modules/user_backend/access-options.js.map +1 -0
- package/dist/modules/user_backend/access-policy-routes.d.ts +3 -0
- package/dist/modules/user_backend/access-policy-routes.d.ts.map +1 -0
- package/dist/modules/user_backend/access-policy-routes.js +76 -0
- package/dist/modules/user_backend/access-policy-routes.js.map +1 -0
- package/dist/modules/user_backend/client/access-policy-modal.d.mts +123 -0
- package/dist/modules/user_backend/client/access-policy-modal.d.mts.map +1 -0
- package/dist/modules/user_backend/client/access-policy-modal.mjs +2 -0
- package/dist/modules/user_backend/client/access-policy-modal.mjs.map +7 -0
- package/dist/modules/user_backend/client/role-modal.d.mts +103 -0
- package/dist/modules/user_backend/client/role-modal.d.mts.map +1 -0
- package/dist/modules/user_backend/client/role-modal.mjs +2 -0
- package/dist/modules/user_backend/client/role-modal.mjs.map +7 -0
- package/dist/modules/user_backend/client/user-modal.d.mts +160 -7
- package/dist/modules/user_backend/client/user-modal.d.mts.map +1 -1
- package/dist/modules/user_backend/client/user-modal.mjs +1 -1
- package/dist/modules/user_backend/client/user-modal.mjs.map +4 -4
- package/dist/modules/user_backend/index.d.ts +2 -2
- package/dist/modules/user_backend/index.d.ts.map +1 -1
- package/dist/modules/user_backend/index.js +4 -2
- package/dist/modules/user_backend/index.js.map +1 -1
- package/dist/modules/user_backend/islands.d.ts +14 -1
- package/dist/modules/user_backend/islands.d.ts.map +1 -1
- package/dist/modules/user_backend/islands.js +11 -3
- package/dist/modules/user_backend/islands.js.map +1 -1
- package/dist/modules/user_backend/managed-role-routes.d.ts +3 -0
- package/dist/modules/user_backend/managed-role-routes.d.ts.map +1 -0
- package/dist/modules/user_backend/managed-role-routes.js +44 -0
- package/dist/modules/user_backend/managed-role-routes.js.map +1 -0
- package/dist/modules/user_backend/menus.d.ts.map +1 -1
- package/dist/modules/user_backend/menus.js +9 -7
- package/dist/modules/user_backend/menus.js.map +1 -1
- package/dist/modules/user_backend/messages.d.ts +510 -2
- package/dist/modules/user_backend/messages.d.ts.map +1 -1
- package/dist/modules/user_backend/messages.js +552 -44
- package/dist/modules/user_backend/messages.js.map +1 -1
- package/dist/modules/user_backend/modal/access-policy-modal-view.d.ts +43 -0
- package/dist/modules/user_backend/modal/access-policy-modal-view.d.ts.map +1 -0
- package/dist/modules/user_backend/modal/access-policy-modal-view.js +384 -0
- package/dist/modules/user_backend/modal/access-policy-modal-view.js.map +1 -0
- package/dist/modules/user_backend/modal/access-surfaces.d.ts +51 -0
- package/dist/modules/user_backend/modal/access-surfaces.d.ts.map +1 -0
- package/dist/modules/user_backend/modal/access-surfaces.js +138 -0
- package/dist/modules/user_backend/modal/access-surfaces.js.map +1 -0
- package/dist/modules/user_backend/modal/role-modal-view.d.ts +48 -0
- package/dist/modules/user_backend/modal/role-modal-view.d.ts.map +1 -0
- package/dist/modules/user_backend/modal/role-modal-view.js +488 -0
- package/dist/modules/user_backend/modal/role-modal-view.js.map +1 -0
- package/dist/modules/user_backend/modal/user-modal-view.d.ts +45 -0
- package/dist/modules/user_backend/modal/user-modal-view.d.ts.map +1 -1
- package/dist/modules/user_backend/modal/user-modal-view.js +1317 -71
- package/dist/modules/user_backend/modal/user-modal-view.js.map +1 -1
- package/dist/modules/user_backend/routes.d.ts.map +1 -1
- package/dist/modules/user_backend/routes.js +109 -571
- package/dist/modules/user_backend/routes.js.map +1 -1
- package/dist/modules/user_backend/screens/access-policies-list.d.ts +31 -0
- package/dist/modules/user_backend/screens/access-policies-list.d.ts.map +1 -0
- package/dist/modules/user_backend/screens/access-policies-list.js +54 -0
- package/dist/modules/user_backend/screens/access-policies-list.js.map +1 -0
- package/dist/modules/user_backend/screens/index.d.ts +1 -3
- package/dist/modules/user_backend/screens/index.d.ts.map +1 -1
- package/dist/modules/user_backend/screens/index.js +2 -3
- package/dist/modules/user_backend/screens/index.js.map +1 -1
- package/dist/modules/user_backend/screens/roles-list.d.ts +9 -3
- package/dist/modules/user_backend/screens/roles-list.d.ts.map +1 -1
- package/dist/modules/user_backend/screens/roles-list.js +15 -23
- package/dist/modules/user_backend/screens/roles-list.js.map +1 -1
- package/dist/modules/user_backend/screens/users-list.d.ts +7 -5
- package/dist/modules/user_backend/screens/users-list.d.ts.map +1 -1
- package/dist/modules/user_backend/screens/users-list.js +29 -21
- package/dist/modules/user_backend/screens/users-list.js.map +1 -1
- package/dist/modules/user_backend/search-functions.d.ts +4 -0
- package/dist/modules/user_backend/search-functions.d.ts.map +1 -0
- package/dist/modules/user_backend/search-functions.js +13 -0
- package/dist/modules/user_backend/search-functions.js.map +1 -0
- package/dist/modules/user_backend/search.d.ts +128 -0
- package/dist/modules/user_backend/search.d.ts.map +1 -0
- package/dist/modules/user_backend/search.js +131 -0
- package/dist/modules/user_backend/search.js.map +1 -0
- package/dist/modules/website/cms.d.ts.map +1 -1
- package/dist/modules/website/cms.js +17 -7
- package/dist/modules/website/cms.js.map +1 -1
- package/dist/modules/website/customer.d.ts +61 -1
- package/dist/modules/website/customer.d.ts.map +1 -1
- package/dist/modules/website/customer.js +197 -15
- package/dist/modules/website/customer.js.map +1 -1
- package/dist/modules/website/index.d.ts.map +1 -1
- package/dist/modules/website/index.js +16 -2
- package/dist/modules/website/index.js.map +1 -1
- package/dist/modules/website/models.d.ts.map +1 -1
- package/dist/modules/website/models.js +15 -0
- package/dist/modules/website/models.js.map +1 -1
- package/dist/modules/website/publication.d.ts.map +1 -1
- package/dist/modules/website/publication.js +11 -5
- package/dist/modules/website/publication.js.map +1 -1
- package/dist/modules/website_backend/collection.d.ts +12 -0
- package/dist/modules/website_backend/collection.d.ts.map +1 -0
- package/dist/modules/website_backend/collection.js +17 -0
- package/dist/modules/website_backend/collection.js.map +1 -0
- package/dist/modules/website_backend/functions.d.ts +10 -0
- package/dist/modules/website_backend/functions.d.ts.map +1 -0
- package/dist/modules/website_backend/functions.js +37 -0
- package/dist/modules/website_backend/functions.js.map +1 -0
- package/dist/modules/website_backend/index.js +2 -0
- package/dist/modules/website_backend/index.js.map +1 -1
- package/dist/modules/website_backend/routes.d.ts.map +1 -1
- package/dist/modules/website_backend/routes.js +124 -29
- package/dist/modules/website_backend/routes.js.map +1 -1
- package/dist/modules/website_backend/screens/index.d.ts +4 -8
- package/dist/modules/website_backend/screens/index.d.ts.map +1 -1
- package/dist/modules/website_backend/screens/index.js +685 -666
- package/dist/modules/website_backend/screens/index.js.map +1 -1
- package/dist/modules/website_backend/screens/page-frame.d.ts +6 -3
- package/dist/modules/website_backend/screens/page-frame.d.ts.map +1 -1
- package/dist/modules/website_backend/screens/page-frame.js +3 -3
- package/dist/modules/website_backend/screens/page-frame.js.map +1 -1
- package/dist/modules/website_backend/search.d.ts +125 -0
- package/dist/modules/website_backend/search.d.ts.map +1 -0
- package/dist/modules/website_backend/search.js +135 -0
- package/dist/modules/website_backend/search.js.map +1 -0
- package/dist/permission-catalogue.d.ts.map +1 -1
- package/dist/permission-catalogue.js +178 -24
- package/dist/permission-catalogue.js.map +1 -1
- package/dist/phone.d.ts +32 -0
- package/dist/phone.d.ts.map +1 -0
- package/dist/phone.js +101 -0
- package/dist/phone.js.map +1 -0
- package/dist/role-templates.d.ts +79 -0
- package/dist/role-templates.d.ts.map +1 -0
- package/dist/role-templates.js +192 -0
- package/dist/role-templates.js.map +1 -0
- package/dist/scaffold/index.d.ts +1 -1
- package/dist/scaffold/index.d.ts.map +1 -1
- package/dist/scaffold/index.js +10 -5
- package/dist/scaffold/index.js.map +1 -1
- package/dist/scaffold/templates/README.md.tmpl +2 -1
- package/dist/scaffold/templates/ket.workspace.mjs.tmpl +4 -1
- package/dist/scaffold/templates/package.json.tmpl +2 -2
- package/dist/ui/actions.d.ts +2 -0
- package/dist/ui/actions.d.ts.map +1 -1
- package/dist/ui/actions.js +1 -1
- package/dist/ui/actions.js.map +1 -1
- package/dist/ui/chrome.d.ts +19 -6
- package/dist/ui/chrome.d.ts.map +1 -1
- package/dist/ui/chrome.js +12 -7
- package/dist/ui/chrome.js.map +1 -1
- package/dist/ui/client/bulk-selection.d.ts +7 -0
- package/dist/ui/client/bulk-selection.d.ts.map +1 -0
- package/dist/ui/client/bulk-selection.js +67 -0
- package/dist/ui/client/bulk-selection.js.map +1 -0
- package/dist/ui/client/ket-table-view.d.ts +3 -0
- package/dist/ui/client/ket-table-view.d.ts.map +1 -0
- package/dist/ui/client/ket-table-view.js +27 -0
- package/dist/ui/client/ket-table-view.js.map +1 -0
- package/dist/ui/client/live-doc-shell.d.ts +39 -1
- package/dist/ui/client/live-doc-shell.d.ts.map +1 -1
- package/dist/ui/client/live-doc-shell.js +41 -2
- package/dist/ui/client/live-doc-shell.js.map +1 -1
- package/dist/ui/client/live-doc-view.d.ts +29 -1
- package/dist/ui/client/live-doc-view.d.ts.map +1 -1
- package/dist/ui/client/live-doc-view.js +138 -4
- package/dist/ui/client/live-doc-view.js.map +1 -1
- package/dist/ui/client/live-doc.d.mts +8 -4
- package/dist/ui/client/live-doc.d.mts.map +1 -1
- package/dist/ui/client/live-doc.mjs +10 -10
- package/dist/ui/client/live-doc.mjs.map +3 -3
- package/dist/ui/client/record-modal-form.d.ts +34 -0
- package/dist/ui/client/record-modal-form.d.ts.map +1 -1
- package/dist/ui/client/record-modal-form.js +17 -1
- package/dist/ui/client/record-modal-form.js.map +1 -1
- package/dist/ui/client/record-modal.d.ts +62 -6
- package/dist/ui/client/record-modal.d.ts.map +1 -1
- package/dist/ui/client/record-modal.js +237 -39
- package/dist/ui/client/record-modal.js.map +1 -1
- package/dist/ui/client/search-filter-view.d.ts +2 -0
- package/dist/ui/client/search-filter-view.d.ts.map +1 -0
- package/dist/ui/client/search-filter-view.js +6 -0
- package/dist/ui/client/search-filter-view.js.map +1 -0
- package/dist/ui/client/table-selection-view.d.ts.map +1 -1
- package/dist/ui/client/table-selection-view.js +33 -16
- package/dist/ui/client/table-selection-view.js.map +1 -1
- package/dist/ui/client/user-modal-client.d.ts +6 -0
- package/dist/ui/client/user-modal-client.d.ts.map +1 -0
- package/dist/ui/client/user-modal-client.js +4 -0
- package/dist/ui/client/user-modal-client.js.map +1 -0
- package/dist/ui/client/user-workflow.d.ts.map +1 -1
- package/dist/ui/client/user-workflow.js +4 -3
- package/dist/ui/client/user-workflow.js.map +1 -1
- package/dist/ui/client/variant-attribute-create.d.ts +19 -0
- package/dist/ui/client/variant-attribute-create.d.ts.map +1 -0
- package/dist/ui/client/variant-attribute-create.js +177 -0
- package/dist/ui/client/variant-attribute-create.js.map +1 -0
- package/dist/ui/client/variant-editor-view.d.ts +72 -0
- package/dist/ui/client/variant-editor-view.d.ts.map +1 -0
- package/dist/ui/client/variant-editor-view.js +943 -0
- package/dist/ui/client/variant-editor-view.js.map +1 -0
- package/dist/ui/collection-state.d.ts +11 -0
- package/dist/ui/collection-state.d.ts.map +1 -0
- package/dist/ui/collection-state.js +45 -0
- package/dist/ui/collection-state.js.map +1 -0
- package/dist/ui/collection.d.ts +23 -0
- package/dist/ui/collection.d.ts.map +1 -0
- package/dist/ui/collection.js +118 -0
- package/dist/ui/collection.js.map +1 -0
- package/dist/ui/form.d.ts +1 -1
- package/dist/ui/form.d.ts.map +1 -1
- package/dist/ui/form.js +1 -1
- package/dist/ui/form.js.map +1 -1
- package/dist/ui/index.d.ts +3 -1
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +3 -1
- package/dist/ui/index.js.map +1 -1
- package/dist/ui/layout.d.ts +6 -7
- package/dist/ui/layout.d.ts.map +1 -1
- package/dist/ui/layout.js +25 -10
- package/dist/ui/layout.js.map +1 -1
- package/dist/ui/list-page.d.ts +4 -2
- package/dist/ui/list-page.d.ts.map +1 -1
- package/dist/ui/list-page.js +29 -4
- package/dist/ui/list-page.js.map +1 -1
- package/dist/ui/nav.d.ts +2 -3
- package/dist/ui/nav.d.ts.map +1 -1
- package/dist/ui/nav.js +4 -8
- package/dist/ui/nav.js.map +1 -1
- package/dist/ui/navigation.d.ts +1 -0
- package/dist/ui/navigation.d.ts.map +1 -1
- package/dist/ui/navigation.js +3 -3
- package/dist/ui/navigation.js.map +1 -1
- package/dist/ui/table.d.ts +2 -0
- package/dist/ui/table.d.ts.map +1 -1
- package/dist/ui/table.js +24 -0
- package/dist/ui/table.js.map +1 -1
- package/dist/ui/user-workflow.d.ts +2 -1
- package/dist/ui/user-workflow.d.ts.map +1 -1
- package/dist/ui/user-workflow.js +44 -29
- package/dist/ui/user-workflow.js.map +1 -1
- package/package.json +14 -4
- package/dist/modules/user_backend/access-routes.d.ts +0 -31
- package/dist/modules/user_backend/access-routes.d.ts.map +0 -1
- package/dist/modules/user_backend/access-routes.js +0 -447
- package/dist/modules/user_backend/access-routes.js.map +0 -1
- package/dist/modules/user_backend/screens/presets-form.d.ts +0 -16
- package/dist/modules/user_backend/screens/presets-form.d.ts.map +0 -1
- package/dist/modules/user_backend/screens/presets-form.js +0 -37
- package/dist/modules/user_backend/screens/presets-form.js.map +0 -1
- package/dist/modules/user_backend/screens/role-form.d.ts +0 -21
- package/dist/modules/user_backend/screens/role-form.d.ts.map +0 -1
- package/dist/modules/user_backend/screens/role-form.js +0 -93
- package/dist/modules/user_backend/screens/role-form.js.map +0 -1
- package/dist/modules/user_backend/screens/user-form.d.ts +0 -56
- package/dist/modules/user_backend/screens/user-form.d.ts.map +0 -1
- package/dist/modules/user_backend/screens/user-form.js +0 -202
- package/dist/modules/user_backend/screens/user-form.js.map +0 -1
- package/dist/ui/client/relation-select-view.d.ts +0 -77
- package/dist/ui/client/relation-select-view.d.ts.map +0 -1
- package/dist/ui/client/relation-select-view.js +0 -216
- package/dist/ui/client/relation-select-view.js.map +0 -1
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { createHash, randomUUID } from 'node:crypto';
|
|
2
2
|
import { defineModule, text } from '@ketvietlab/ketjs';
|
|
3
|
+
import { rowListSearch } from '../backend/row-list.js';
|
|
4
|
+
import { searchFilterFunctions } from './search-functions.js';
|
|
5
|
+
import { accountListSearch, closePeriodListSearch, customerInvoiceListSearch, generalLedgerLineSearch, journalEntryListSearch, journalListSearch, openingBatchListSearch, partnerLedgerLineSearch, paymentListSearch, paymentTermListSearch, taxListSearch, vendorBillListSearch, } from './search.js';
|
|
3
6
|
import { formatMoney, modalWorkspace } from '../../ui/index.js';
|
|
4
7
|
import { readForm, seeOther } from '../backend/forms.js';
|
|
5
8
|
import { accountOptions, accountRelationControl } from './relation-control.js';
|
|
6
9
|
import { partnerRelationControl } from '../partner_backend/relation-control.js';
|
|
7
|
-
import { ACCOUNT_TYPES, JOURNAL_TYPES,
|
|
10
|
+
import { ACCOUNT_TYPES, JOURNAL_TYPES, PARTNER_TYPES, PAYMENT_TERM_DELAY_TYPES, PAYMENT_TERM_VALUES, PAYMENT_TYPES, TAX_AMOUNT_TYPES, TAX_USES, } from '../account/functions.js';
|
|
8
11
|
import { addDecimals } from '../account/money.js';
|
|
9
12
|
import { accountDefaultsScreen, accountingBooksScreen, accountFormModal, accountingOverviewScreen, accountsListScreen, customerInvoiceFormScreen, customerInvoicesListScreen, generalLedgerScreen, journalEntriesListScreen, journalEntryCreateModal, journalFormModal, journalsListScreen, labelOf, moveDetailScreen, moveTitle, optionsOf, paymentFormScreen, paymentsListScreen, partnerLedgerScreen, openingBalanceDetailScreen, openingBalanceImportScreen, openingBalancesListScreen, paymentTermFormModal, paymentTermLineFormModal, paymentTermsListScreen, taxFormScreen, taxesListScreen, trialBalanceScreen, periodCloseDetailScreen, periodClosesListScreen, vendorBillFormScreen, vendorBillsListScreen, } from './screens/index.js';
|
|
10
13
|
import { adminPage, choices, localeQuery, optional, printGroup, selectionLabel } from '../backend/screen.js';
|
|
11
|
-
import { PAGE_SIZE, pageOf, pager, searchOf
|
|
14
|
+
import { PAGE_SIZE, pageOf, pager, searchOf } from '../backend/paging.js';
|
|
12
15
|
import { overviewCharts, periodOf, yearsOf } from './overview.js';
|
|
13
16
|
const crossSite = (req) => {
|
|
14
17
|
const origin = req.headers.origin;
|
|
@@ -21,8 +24,8 @@ const crossSite = (req) => {
|
|
|
21
24
|
return true;
|
|
22
25
|
}
|
|
23
26
|
};
|
|
24
|
-
/**
|
|
25
|
-
const
|
|
27
|
+
/** Seed the payment form picker; collection totals use complete sources. */
|
|
28
|
+
const PAYMENT_PICKER_LIMIT = 200;
|
|
26
29
|
const succeeded = (result) => result.ok === true;
|
|
27
30
|
const rejection = (result, _, form) => {
|
|
28
31
|
const errors = (result?.errors ?? []).map((error) => ({
|
|
@@ -250,23 +253,40 @@ const accountSummary = (rows) => {
|
|
|
250
253
|
profit: count(['income', 'expense']),
|
|
251
254
|
};
|
|
252
255
|
};
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
256
|
+
/** One set of functions behind every accounting list's bar. */
|
|
257
|
+
const accountSearchFunctions = {
|
|
258
|
+
apply: 'account_backend.applySearchFilter',
|
|
259
|
+
saveFavorite: 'account_backend.saveSearchFavorite',
|
|
260
|
+
deleteFavorite: 'account_backend.deleteSearchFavorite',
|
|
261
|
+
setDefaultFavorite: 'account_backend.setDefaultSearchFavorite',
|
|
262
|
+
};
|
|
263
|
+
/**
|
|
264
|
+
* How a group header reads. Every enumerated field on these lists is labelled
|
|
265
|
+
* by a selection group whose name is the field's own, bar the two that differ.
|
|
266
|
+
*/
|
|
267
|
+
const accountGroupLabel = (_, key, value) => {
|
|
268
|
+
const raw = value == null ? '' : String(value);
|
|
269
|
+
if (key === 'active')
|
|
270
|
+
return raw === 'false' ? _('account_backend.archived') : _('account_backend.active');
|
|
271
|
+
if (!raw)
|
|
272
|
+
return _('backend.chrome.groupEmpty');
|
|
273
|
+
const selection = key === 'state' || key === 'moveType'
|
|
274
|
+
? 'moveState'
|
|
275
|
+
: key === 'paymentState'
|
|
276
|
+
? 'paymentState'
|
|
277
|
+
: key === 'type'
|
|
278
|
+
? 'journalType'
|
|
279
|
+
: key;
|
|
280
|
+
const label = labelOf(_, selection, raw);
|
|
281
|
+
return label === raw && key === 'moveType' ? labelOf(_, 'moveType', raw) : label;
|
|
282
|
+
};
|
|
283
|
+
/** The slice of a narrowed list the reader's page shows, and its pager. */
|
|
284
|
+
const listPage = (url, rows, grouped) => {
|
|
285
|
+
if (grouped)
|
|
286
|
+
return { rows: [], pager: null };
|
|
287
|
+
const page = pageOf(url);
|
|
288
|
+
const shown = rows.slice((page - 1) * PAGE_SIZE, page * PAGE_SIZE);
|
|
289
|
+
return { rows: shown, pager: pager(url, page, shown.length, rows.length) };
|
|
270
290
|
};
|
|
271
291
|
const saveAccount = async (ctx, url, req, form) => ctx.call('account.saveAccount', {
|
|
272
292
|
id: targetId(url),
|
|
@@ -978,6 +998,7 @@ export default defineModule({
|
|
|
978
998
|
// they open; payment-term milestones are visible and editable.
|
|
979
999
|
version: '0.4.0',
|
|
980
1000
|
depends: ['account', 'backend'],
|
|
1001
|
+
functions: searchFilterFunctions,
|
|
981
1002
|
joints: {
|
|
982
1003
|
'move.collaboration': {
|
|
983
1004
|
props: { resModel: 'text', resId: 'id', lang: 'text' },
|
|
@@ -996,72 +1017,68 @@ export default defineModule({
|
|
|
996
1017
|
needs: 'account.listMoves',
|
|
997
1018
|
sequence: 1,
|
|
998
1019
|
},
|
|
999
|
-
'accounting.customers': { parent: 'accounting', label: 'menu.customers', sequence: 10 },
|
|
1000
1020
|
'accounting.customerInvoices': {
|
|
1001
|
-
parent: 'accounting
|
|
1021
|
+
parent: 'accounting',
|
|
1002
1022
|
label: 'menu.customerInvoices',
|
|
1003
1023
|
path: '/admin/accounting/customer-invoices',
|
|
1004
1024
|
needs: 'account.listMoves',
|
|
1005
|
-
sequence:
|
|
1025
|
+
sequence: 1010,
|
|
1006
1026
|
},
|
|
1007
|
-
'accounting.vendors': { parent: 'accounting', label: 'menu.vendors', sequence: 20 },
|
|
1008
1027
|
'accounting.vendorBills': {
|
|
1009
|
-
parent: 'accounting
|
|
1028
|
+
parent: 'accounting',
|
|
1010
1029
|
label: 'menu.vendorBills',
|
|
1011
1030
|
path: '/admin/accounting/vendor-bills',
|
|
1012
1031
|
needs: 'account.listMoves',
|
|
1013
|
-
sequence:
|
|
1032
|
+
sequence: 2010,
|
|
1014
1033
|
},
|
|
1015
|
-
'accounting.operations': { parent: 'accounting', label: 'menu.operations', sequence: 30 },
|
|
1016
1034
|
'accounting.entries': {
|
|
1017
|
-
parent: 'accounting
|
|
1035
|
+
parent: 'accounting',
|
|
1018
1036
|
label: 'menu.entries',
|
|
1019
1037
|
path: '/admin/accounting/entries',
|
|
1020
1038
|
needs: 'account.listMoves',
|
|
1021
|
-
sequence:
|
|
1039
|
+
sequence: 3010,
|
|
1022
1040
|
},
|
|
1023
1041
|
'accounting.payments': {
|
|
1024
|
-
parent: 'accounting
|
|
1042
|
+
parent: 'accounting',
|
|
1025
1043
|
label: 'menu.payments',
|
|
1026
1044
|
path: '/admin/accounting/payments',
|
|
1027
1045
|
needs: 'account.listPayments',
|
|
1028
|
-
sequence:
|
|
1046
|
+
sequence: 3020,
|
|
1029
1047
|
},
|
|
1030
|
-
'accounting.reporting': { parent: 'accounting', label: 'menu.reporting', sequence: 40 },
|
|
1031
1048
|
'accounting.trialBalance': {
|
|
1032
|
-
parent: 'accounting
|
|
1049
|
+
parent: 'accounting',
|
|
1033
1050
|
label: 'menu.trialBalance',
|
|
1034
1051
|
path: '/admin/accounting/trial-balance',
|
|
1035
1052
|
needs: 'account.trialBalance',
|
|
1036
|
-
sequence:
|
|
1053
|
+
sequence: 4010,
|
|
1037
1054
|
},
|
|
1038
1055
|
'accounting.generalLedger': {
|
|
1039
|
-
parent: 'accounting
|
|
1056
|
+
parent: 'accounting',
|
|
1040
1057
|
label: 'menu.generalLedger',
|
|
1041
1058
|
path: '/admin/accounting/general-ledger',
|
|
1042
1059
|
needs: 'account.generalLedger',
|
|
1043
|
-
sequence:
|
|
1060
|
+
sequence: 4020,
|
|
1044
1061
|
},
|
|
1045
1062
|
'accounting.partnerStatement': {
|
|
1046
|
-
parent: 'accounting
|
|
1063
|
+
parent: 'accounting',
|
|
1047
1064
|
label: 'menu.partnerStatement',
|
|
1048
1065
|
path: '/admin/accounting/partner-statement',
|
|
1049
1066
|
needs: 'account.partnerStatement',
|
|
1050
|
-
sequence:
|
|
1067
|
+
sequence: 4030,
|
|
1051
1068
|
},
|
|
1052
1069
|
'accounting.books': {
|
|
1053
|
-
parent: 'accounting
|
|
1070
|
+
parent: 'accounting',
|
|
1054
1071
|
label: 'menu.books',
|
|
1055
1072
|
path: '/admin/accounting/books',
|
|
1056
1073
|
needs: 'account.accountingBook',
|
|
1057
|
-
sequence:
|
|
1074
|
+
sequence: 4040,
|
|
1058
1075
|
},
|
|
1059
1076
|
'accounting.periodCloses': {
|
|
1060
|
-
parent: 'accounting
|
|
1077
|
+
parent: 'accounting',
|
|
1061
1078
|
label: 'menu.periodCloses',
|
|
1062
1079
|
path: '/admin/accounting/period-closes',
|
|
1063
1080
|
needs: 'account.listClosePeriods',
|
|
1064
|
-
sequence:
|
|
1081
|
+
sequence: 3030,
|
|
1065
1082
|
},
|
|
1066
1083
|
'accounting.openingBalances': {
|
|
1067
1084
|
parent: 'accounting.configuration',
|
|
@@ -1070,7 +1087,7 @@ export default defineModule({
|
|
|
1070
1087
|
needs: 'account.listOpeningBatches',
|
|
1071
1088
|
sequence: 5,
|
|
1072
1089
|
},
|
|
1073
|
-
'accounting.configuration': { parent: 'accounting', label: 'menu.configuration', sequence:
|
|
1090
|
+
'accounting.configuration': { parent: 'accounting', label: 'menu.configuration', sequence: 5000 },
|
|
1074
1091
|
'accounting.accounts': {
|
|
1075
1092
|
parent: 'accounting.configuration',
|
|
1076
1093
|
label: 'menu.accounts',
|
|
@@ -1233,127 +1250,37 @@ export default defineModule({
|
|
|
1233
1250
|
const returnTo = accountListPath(url);
|
|
1234
1251
|
const modalOpen = req.method === 'POST' || url.searchParams.get('create') === '1' || Boolean(editingId(url));
|
|
1235
1252
|
const formPath = accountModalPath(url, editing?.id ?? editingId(url));
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
: null;
|
|
1244
|
-
const grouped = url.searchParams.get('group') === 'type';
|
|
1245
|
-
const needle = search?.toLocaleLowerCase();
|
|
1246
|
-
const translate = needle ? ctx.translate(ctx.localeOf(url, req)) : null;
|
|
1247
|
-
const matching = all.filter((row) => {
|
|
1248
|
-
const active = row.active === true;
|
|
1249
|
-
if (status === 'active' && !active)
|
|
1250
|
-
return false;
|
|
1251
|
-
if (status === 'archived' && active)
|
|
1252
|
-
return false;
|
|
1253
|
-
const type = String(row.accountType);
|
|
1254
|
-
if (family === 'asset' && !type.startsWith('asset'))
|
|
1255
|
-
return false;
|
|
1256
|
-
if (family === 'liability' && !['liability', 'equity'].some((prefix) => type.startsWith(prefix)))
|
|
1257
|
-
return false;
|
|
1258
|
-
if (family === 'profit' && !['income', 'expense'].some((prefix) => type.startsWith(prefix)))
|
|
1259
|
-
return false;
|
|
1260
|
-
return (!needle ||
|
|
1261
|
-
`${String(row.code)} ${accountName(translate, row)}`.toLocaleLowerCase().includes(needle));
|
|
1262
|
-
});
|
|
1263
|
-
const rows = grouped ? matching : matching.slice((page - 1) * PAGE_SIZE, page * PAGE_SIZE);
|
|
1253
|
+
// The reader's language decides what a standard account is called, so
|
|
1254
|
+
// the name the bar searches and sorts is put on the row here rather
|
|
1255
|
+
// than resolved again inside the filter.
|
|
1256
|
+
const named = all.map((row) => ({
|
|
1257
|
+
...row,
|
|
1258
|
+
displayName: accountName(ctx.translate(ctx.localeOf(url, req)), row),
|
|
1259
|
+
}));
|
|
1264
1260
|
return adminPage(ctx, url, req, {
|
|
1265
1261
|
title: 'account_backend.accounts.title',
|
|
1266
|
-
body: (_, frame) => {
|
|
1262
|
+
body: async (_, frame) => {
|
|
1263
|
+
const search = await rowListSearch(ctx, url, req, {
|
|
1264
|
+
spec: accountListSearch,
|
|
1265
|
+
rows: named,
|
|
1266
|
+
frame,
|
|
1267
|
+
name: 'account-account-filter',
|
|
1268
|
+
bodyId: 'account-account-list',
|
|
1269
|
+
functions: accountSearchFunctions,
|
|
1270
|
+
groupLabel: (key, value) => accountGroupLabel(_, key, value),
|
|
1271
|
+
});
|
|
1272
|
+
const shown = listPage(url, search.rows, Boolean(search.groups));
|
|
1267
1273
|
const workspace = accountsListScreen(_, {
|
|
1268
1274
|
frame: {
|
|
1269
|
-
...frame,
|
|
1270
|
-
chrome: {
|
|
1271
|
-
search: {
|
|
1272
|
-
name: 'q',
|
|
1273
|
-
value: search ?? '',
|
|
1274
|
-
placeholder: _('account_backend.accounts.title'),
|
|
1275
|
-
keep: {
|
|
1276
|
-
...(status ? { status } : {}),
|
|
1277
|
-
...(family ? { family } : {}),
|
|
1278
|
-
...(grouped ? { group: 'type' } : {}),
|
|
1279
|
-
...(url.searchParams.get('lang') ? { lang: String(url.searchParams.get('lang')) } : {}),
|
|
1280
|
-
},
|
|
1281
|
-
facets: [
|
|
1282
|
-
...(status
|
|
1283
|
-
? [
|
|
1284
|
-
{
|
|
1285
|
-
label: status === 'active'
|
|
1286
|
-
? _('account_backend.active')
|
|
1287
|
-
: _('account_backend.archived'),
|
|
1288
|
-
without: withParam(url, 'status', null),
|
|
1289
|
-
},
|
|
1290
|
-
]
|
|
1291
|
-
: []),
|
|
1292
|
-
...(family
|
|
1293
|
-
? [
|
|
1294
|
-
{
|
|
1295
|
-
label: _(`account_backend.account.summary.${family}`),
|
|
1296
|
-
without: withParam(url, 'family', null),
|
|
1297
|
-
},
|
|
1298
|
-
]
|
|
1299
|
-
: []),
|
|
1300
|
-
...(grouped
|
|
1301
|
-
? [
|
|
1302
|
-
{
|
|
1303
|
-
label: `${_('backend.chrome.groupBy')}: ${_('account_backend.field.accountType')}`,
|
|
1304
|
-
without: withParam(url, 'group', null),
|
|
1305
|
-
},
|
|
1306
|
-
]
|
|
1307
|
-
: []),
|
|
1308
|
-
],
|
|
1309
|
-
menus: [
|
|
1310
|
-
{
|
|
1311
|
-
id: 'filters',
|
|
1312
|
-
label: _('backend.chrome.filters'),
|
|
1313
|
-
items: [
|
|
1314
|
-
{
|
|
1315
|
-
id: 'status:active',
|
|
1316
|
-
label: _('account_backend.active'),
|
|
1317
|
-
path: withParam(url, 'status', status === 'active' ? null : 'active'),
|
|
1318
|
-
active: status === 'active',
|
|
1319
|
-
},
|
|
1320
|
-
{
|
|
1321
|
-
id: 'status:archived',
|
|
1322
|
-
label: _('account_backend.archived'),
|
|
1323
|
-
path: withParam(url, 'status', status === 'archived' ? null : 'archived'),
|
|
1324
|
-
active: status === 'archived',
|
|
1325
|
-
},
|
|
1326
|
-
...['asset', 'liability', 'profit'].map((value) => ({
|
|
1327
|
-
id: `family:${value}`,
|
|
1328
|
-
label: _(`account_backend.account.summary.${value}`),
|
|
1329
|
-
path: withParam(url, 'family', family === value ? null : value),
|
|
1330
|
-
active: family === value,
|
|
1331
|
-
})),
|
|
1332
|
-
],
|
|
1333
|
-
},
|
|
1334
|
-
{
|
|
1335
|
-
id: 'group',
|
|
1336
|
-
label: _('backend.chrome.groupBy'),
|
|
1337
|
-
items: [
|
|
1338
|
-
{
|
|
1339
|
-
id: 'group:type',
|
|
1340
|
-
label: _('account_backend.field.accountType'),
|
|
1341
|
-
path: withParam(url, 'group', grouped ? null : 'type'),
|
|
1342
|
-
active: grouped,
|
|
1343
|
-
},
|
|
1344
|
-
],
|
|
1345
|
-
},
|
|
1346
|
-
],
|
|
1347
|
-
},
|
|
1348
|
-
pager: grouped ? null : pager(url, page, rows.length, matching.length),
|
|
1349
|
-
},
|
|
1275
|
+
...search.frame,
|
|
1276
|
+
chrome: { ...search.frame.chrome, pager: shown.pager },
|
|
1350
1277
|
},
|
|
1351
|
-
rows,
|
|
1278
|
+
rows: shown.rows,
|
|
1352
1279
|
createHref: accountModalPath(url),
|
|
1353
1280
|
rowHref: (row) => accountModalPath(url, row.id),
|
|
1354
1281
|
displayName: (row) => accountName(_, row),
|
|
1355
1282
|
summary: accountSummary(all),
|
|
1356
|
-
table: { groups:
|
|
1283
|
+
...(search.groups ? { table: { groups: search.groups } } : {}),
|
|
1357
1284
|
});
|
|
1358
1285
|
if (!modalOpen)
|
|
1359
1286
|
return workspace;
|
|
@@ -1405,93 +1332,26 @@ export default defineModule({
|
|
|
1405
1332
|
const returnTo = journalListPath(url);
|
|
1406
1333
|
const modalOpen = req.method === 'POST' || url.searchParams.get('create') === '1' || Boolean(editingId(url));
|
|
1407
1334
|
const formPath = journalModalPath(url, editing?.id ?? editingId(url));
|
|
1408
|
-
const page = pageOf(url);
|
|
1409
|
-
const search = searchOf(url);
|
|
1410
|
-
const status = ['active', 'archived'].includes(String(url.searchParams.get('status')))
|
|
1411
|
-
? url.searchParams.get('status')
|
|
1412
|
-
: null;
|
|
1413
|
-
const type = JOURNAL_TYPES.includes(String(url.searchParams.get('type')))
|
|
1414
|
-
? url.searchParams.get('type')
|
|
1415
|
-
: null;
|
|
1416
|
-
const needle = search?.toLocaleLowerCase();
|
|
1417
|
-
const matching = all.filter((row) => {
|
|
1418
|
-
const active = row.active === true;
|
|
1419
|
-
if (status === 'active' && !active)
|
|
1420
|
-
return false;
|
|
1421
|
-
if (status === 'archived' && active)
|
|
1422
|
-
return false;
|
|
1423
|
-
if (type && row.type !== type)
|
|
1424
|
-
return false;
|
|
1425
|
-
return !needle || `${String(row.code)} ${String(row.name)}`.toLocaleLowerCase().includes(needle);
|
|
1426
|
-
});
|
|
1427
|
-
const journals = matching.slice((page - 1) * PAGE_SIZE, page * PAGE_SIZE);
|
|
1428
1335
|
return adminPage(ctx, url, req, {
|
|
1429
1336
|
title: 'account_backend.journals.title',
|
|
1430
1337
|
body: async (_, frame) => {
|
|
1338
|
+
const search = await rowListSearch(ctx, url, req, {
|
|
1339
|
+
spec: journalListSearch,
|
|
1340
|
+
rows: all,
|
|
1341
|
+
frame,
|
|
1342
|
+
name: 'account-journal-filter',
|
|
1343
|
+
bodyId: 'account-journal-list',
|
|
1344
|
+
functions: accountSearchFunctions,
|
|
1345
|
+
groupLabel: (key, value) => accountGroupLabel(_, key, value),
|
|
1346
|
+
});
|
|
1347
|
+
const shown = listPage(url, search.rows, Boolean(search.groups));
|
|
1431
1348
|
const workspace = journalsListScreen(_, {
|
|
1432
1349
|
frame: {
|
|
1433
|
-
...frame,
|
|
1434
|
-
chrome: {
|
|
1435
|
-
search: {
|
|
1436
|
-
name: 'q',
|
|
1437
|
-
value: search ?? '',
|
|
1438
|
-
placeholder: _('account_backend.journals.title'),
|
|
1439
|
-
keep: {
|
|
1440
|
-
...(status ? { status } : {}),
|
|
1441
|
-
...(type ? { type } : {}),
|
|
1442
|
-
...(url.searchParams.get('lang') ? { lang: String(url.searchParams.get('lang')) } : {}),
|
|
1443
|
-
},
|
|
1444
|
-
facets: [
|
|
1445
|
-
...(status
|
|
1446
|
-
? [
|
|
1447
|
-
{
|
|
1448
|
-
label: status === 'active'
|
|
1449
|
-
? _('account_backend.active')
|
|
1450
|
-
: _('account_backend.archived'),
|
|
1451
|
-
without: withParam(url, 'status', null),
|
|
1452
|
-
},
|
|
1453
|
-
]
|
|
1454
|
-
: []),
|
|
1455
|
-
...(type
|
|
1456
|
-
? [
|
|
1457
|
-
{
|
|
1458
|
-
label: labelOf(_, 'journalType', type),
|
|
1459
|
-
without: withParam(url, 'type', null),
|
|
1460
|
-
},
|
|
1461
|
-
]
|
|
1462
|
-
: []),
|
|
1463
|
-
],
|
|
1464
|
-
menus: [
|
|
1465
|
-
{
|
|
1466
|
-
id: 'filters',
|
|
1467
|
-
label: _('backend.chrome.filters'),
|
|
1468
|
-
items: [
|
|
1469
|
-
{
|
|
1470
|
-
id: 'status:active',
|
|
1471
|
-
label: _('account_backend.active'),
|
|
1472
|
-
path: withParam(url, 'status', status === 'active' ? null : 'active'),
|
|
1473
|
-
active: status === 'active',
|
|
1474
|
-
},
|
|
1475
|
-
{
|
|
1476
|
-
id: 'status:archived',
|
|
1477
|
-
label: _('account_backend.archived'),
|
|
1478
|
-
path: withParam(url, 'status', status === 'archived' ? null : 'archived'),
|
|
1479
|
-
active: status === 'archived',
|
|
1480
|
-
},
|
|
1481
|
-
...JOURNAL_TYPES.map((value) => ({
|
|
1482
|
-
id: `type:${value}`,
|
|
1483
|
-
label: labelOf(_, 'journalType', value),
|
|
1484
|
-
path: withParam(url, 'type', type === value ? null : value),
|
|
1485
|
-
active: type === value,
|
|
1486
|
-
})),
|
|
1487
|
-
],
|
|
1488
|
-
},
|
|
1489
|
-
],
|
|
1490
|
-
},
|
|
1491
|
-
pager: pager(url, page, journals.length, matching.length),
|
|
1492
|
-
},
|
|
1350
|
+
...search.frame,
|
|
1351
|
+
chrome: { ...search.frame.chrome, pager: shown.pager },
|
|
1493
1352
|
},
|
|
1494
|
-
rows:
|
|
1353
|
+
rows: shown.rows,
|
|
1354
|
+
...(search.groups ? { table: { groups: search.groups } } : {}),
|
|
1495
1355
|
accounts: data.accounts,
|
|
1496
1356
|
createHref: journalModalPath(url),
|
|
1497
1357
|
rowHref: (row) => journalModalPath(url, row.id),
|
|
@@ -1561,139 +1421,33 @@ export default defineModule({
|
|
|
1561
1421
|
}),
|
|
1562
1422
|
});
|
|
1563
1423
|
}
|
|
1564
|
-
const page = pageOf(url);
|
|
1565
|
-
const search = searchOf(url);
|
|
1566
|
-
const status = ['active', 'archived'].includes(String(url.searchParams.get('status')))
|
|
1567
|
-
? url.searchParams.get('status')
|
|
1568
|
-
: null;
|
|
1569
|
-
const use = TAX_USES.includes(String(url.searchParams.get('use')))
|
|
1570
|
-
? url.searchParams.get('use')
|
|
1571
|
-
: null;
|
|
1572
|
-
const computation = TAX_AMOUNT_TYPES.includes(String(url.searchParams.get('computation')))
|
|
1573
|
-
? url.searchParams.get('computation')
|
|
1574
|
-
: null;
|
|
1575
|
-
const included = url.searchParams.get('included') === '1';
|
|
1576
|
-
const needle = search?.toLocaleLowerCase();
|
|
1577
|
-
const matching = all.filter((row) => {
|
|
1578
|
-
const active = row.active === true;
|
|
1579
|
-
if (status === 'active' && !active)
|
|
1580
|
-
return false;
|
|
1581
|
-
if (status === 'archived' && active)
|
|
1582
|
-
return false;
|
|
1583
|
-
if (use && row.typeTaxUse !== use)
|
|
1584
|
-
return false;
|
|
1585
|
-
if (computation && row.amountType !== computation)
|
|
1586
|
-
return false;
|
|
1587
|
-
if (included && row.priceInclude !== true)
|
|
1588
|
-
return false;
|
|
1589
|
-
return (!needle ||
|
|
1590
|
-
`${String(row.name)} ${String(row.description ?? '')} ${String(row.amount)}`
|
|
1591
|
-
.toLocaleLowerCase()
|
|
1592
|
-
.includes(needle));
|
|
1593
|
-
});
|
|
1594
|
-
const taxes = matching.slice((page - 1) * PAGE_SIZE, page * PAGE_SIZE);
|
|
1595
1424
|
return adminPage(ctx, url, req, {
|
|
1596
1425
|
title: 'account_backend.taxes.title',
|
|
1597
|
-
body: (_, frame) =>
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
facets: [
|
|
1613
|
-
...(status
|
|
1614
|
-
? [
|
|
1615
|
-
{
|
|
1616
|
-
label: status === 'active'
|
|
1617
|
-
? _('account_backend.active')
|
|
1618
|
-
: _('account_backend.archived'),
|
|
1619
|
-
without: withParam(url, 'status', null),
|
|
1620
|
-
},
|
|
1621
|
-
]
|
|
1622
|
-
: []),
|
|
1623
|
-
...(use
|
|
1624
|
-
? [
|
|
1625
|
-
{
|
|
1626
|
-
label: labelOf(_, 'taxUse', use),
|
|
1627
|
-
without: withParam(url, 'use', null),
|
|
1628
|
-
},
|
|
1629
|
-
]
|
|
1630
|
-
: []),
|
|
1631
|
-
...(computation
|
|
1632
|
-
? [
|
|
1633
|
-
{
|
|
1634
|
-
label: labelOf(_, 'taxAmountType', computation),
|
|
1635
|
-
without: withParam(url, 'computation', null),
|
|
1636
|
-
},
|
|
1637
|
-
]
|
|
1638
|
-
: []),
|
|
1639
|
-
...(included
|
|
1640
|
-
? [
|
|
1641
|
-
{
|
|
1642
|
-
label: _('account_backend.tax.summary.included'),
|
|
1643
|
-
without: withParam(url, 'included', null),
|
|
1644
|
-
},
|
|
1645
|
-
]
|
|
1646
|
-
: []),
|
|
1647
|
-
],
|
|
1648
|
-
menus: [
|
|
1649
|
-
{
|
|
1650
|
-
id: 'filters',
|
|
1651
|
-
label: _('backend.chrome.filters'),
|
|
1652
|
-
items: [
|
|
1653
|
-
{
|
|
1654
|
-
id: 'status:active',
|
|
1655
|
-
label: _('account_backend.active'),
|
|
1656
|
-
path: withParam(url, 'status', status === 'active' ? null : 'active'),
|
|
1657
|
-
active: status === 'active',
|
|
1658
|
-
},
|
|
1659
|
-
{
|
|
1660
|
-
id: 'status:archived',
|
|
1661
|
-
label: _('account_backend.archived'),
|
|
1662
|
-
path: withParam(url, 'status', status === 'archived' ? null : 'archived'),
|
|
1663
|
-
active: status === 'archived',
|
|
1664
|
-
},
|
|
1665
|
-
...TAX_USES.map((value) => ({
|
|
1666
|
-
id: `use:${value}`,
|
|
1667
|
-
label: labelOf(_, 'taxUse', value),
|
|
1668
|
-
path: withParam(url, 'use', use === value ? null : value),
|
|
1669
|
-
active: use === value,
|
|
1670
|
-
})),
|
|
1671
|
-
...TAX_AMOUNT_TYPES.map((value) => ({
|
|
1672
|
-
id: `computation:${value}`,
|
|
1673
|
-
label: labelOf(_, 'taxAmountType', value),
|
|
1674
|
-
path: withParam(url, 'computation', computation === value ? null : value),
|
|
1675
|
-
active: computation === value,
|
|
1676
|
-
})),
|
|
1677
|
-
{
|
|
1678
|
-
id: 'included',
|
|
1679
|
-
label: _('account_backend.tax.summary.included'),
|
|
1680
|
-
path: withParam(url, 'included', included ? null : '1'),
|
|
1681
|
-
active: included,
|
|
1682
|
-
},
|
|
1683
|
-
],
|
|
1684
|
-
},
|
|
1685
|
-
],
|
|
1686
|
-
},
|
|
1687
|
-
pager: pager(url, page, taxes.length, matching.length),
|
|
1426
|
+
body: async (_, frame) => {
|
|
1427
|
+
const search = await rowListSearch(ctx, url, req, {
|
|
1428
|
+
spec: taxListSearch,
|
|
1429
|
+
rows: all,
|
|
1430
|
+
frame,
|
|
1431
|
+
name: 'account-tax-filter',
|
|
1432
|
+
bodyId: 'account-tax-list',
|
|
1433
|
+
functions: accountSearchFunctions,
|
|
1434
|
+
groupLabel: (key, value) => accountGroupLabel(_, key, value),
|
|
1435
|
+
});
|
|
1436
|
+
const shown = listPage(url, search.rows, Boolean(search.groups));
|
|
1437
|
+
return taxesListScreen(_, {
|
|
1438
|
+
frame: {
|
|
1439
|
+
...search.frame,
|
|
1440
|
+
chrome: { ...search.frame.chrome, pager: shown.pager },
|
|
1688
1441
|
},
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1442
|
+
rows: shown.rows,
|
|
1443
|
+
...(search.groups ? { table: { groups: search.groups } } : {}),
|
|
1444
|
+
accounts: data.accounts,
|
|
1445
|
+
currency: currencyOf(data.companies, frame),
|
|
1446
|
+
createHref: taxFormPath(url, returnTo),
|
|
1447
|
+
rowHref: (row) => taxFormPath(url, returnTo, row.id),
|
|
1448
|
+
summary: taxSummary(all),
|
|
1449
|
+
});
|
|
1450
|
+
},
|
|
1697
1451
|
});
|
|
1698
1452
|
},
|
|
1699
1453
|
'/admin/accounting/taxes/new': (ctx) => async (url, req) => {
|
|
@@ -1771,71 +1525,26 @@ export default defineModule({
|
|
|
1771
1525
|
const lineModalOpen = submittedLine || url.searchParams.get('line') === '1' || Boolean(url.searchParams.get('editLine'));
|
|
1772
1526
|
const termModalOpen = !lineModalOpen &&
|
|
1773
1527
|
(req.method === 'POST' || url.searchParams.get('create') === '1' || Boolean(editingId(url)));
|
|
1774
|
-
const page = pageOf(url);
|
|
1775
|
-
const search = searchOf(url);
|
|
1776
|
-
const status = ['active', 'archived'].includes(String(url.searchParams.get('status')))
|
|
1777
|
-
? url.searchParams.get('status')
|
|
1778
|
-
: null;
|
|
1779
|
-
const needle = search?.toLocaleLowerCase();
|
|
1780
|
-
const matching = rows.filter((row) => {
|
|
1781
|
-
const active = row.active === true;
|
|
1782
|
-
if (status === 'active' && !active)
|
|
1783
|
-
return false;
|
|
1784
|
-
if (status === 'archived' && active)
|
|
1785
|
-
return false;
|
|
1786
|
-
return (!needle || `${String(row.name)} ${String(row.note ?? '')}`.toLocaleLowerCase().includes(needle));
|
|
1787
|
-
});
|
|
1788
|
-
const listed = matching.slice((page - 1) * PAGE_SIZE, page * PAGE_SIZE);
|
|
1789
1528
|
return adminPage(ctx, url, req, {
|
|
1790
1529
|
title: 'account_backend.terms.title',
|
|
1791
|
-
body: (_, frame) => {
|
|
1530
|
+
body: async (_, frame) => {
|
|
1531
|
+
const search = await rowListSearch(ctx, url, req, {
|
|
1532
|
+
spec: paymentTermListSearch,
|
|
1533
|
+
rows,
|
|
1534
|
+
frame,
|
|
1535
|
+
name: 'account-term-filter',
|
|
1536
|
+
bodyId: 'account-term-list',
|
|
1537
|
+
functions: accountSearchFunctions,
|
|
1538
|
+
groupLabel: (key, value) => accountGroupLabel(_, key, value),
|
|
1539
|
+
});
|
|
1540
|
+
const shown = listPage(url, search.rows, Boolean(search.groups));
|
|
1792
1541
|
const workspace = paymentTermsListScreen(_, {
|
|
1793
1542
|
frame: {
|
|
1794
|
-
...frame,
|
|
1795
|
-
chrome: {
|
|
1796
|
-
search: {
|
|
1797
|
-
name: 'q',
|
|
1798
|
-
value: search ?? '',
|
|
1799
|
-
placeholder: _('account_backend.terms.title'),
|
|
1800
|
-
keep: {
|
|
1801
|
-
...(status ? { status } : {}),
|
|
1802
|
-
...(url.searchParams.get('lang') ? { lang: String(url.searchParams.get('lang')) } : {}),
|
|
1803
|
-
},
|
|
1804
|
-
facets: status
|
|
1805
|
-
? [
|
|
1806
|
-
{
|
|
1807
|
-
label: status === 'active'
|
|
1808
|
-
? _('account_backend.active')
|
|
1809
|
-
: _('account_backend.archived'),
|
|
1810
|
-
without: withParam(url, 'status', null),
|
|
1811
|
-
},
|
|
1812
|
-
]
|
|
1813
|
-
: [],
|
|
1814
|
-
menus: [
|
|
1815
|
-
{
|
|
1816
|
-
id: 'filters',
|
|
1817
|
-
label: _('backend.chrome.filters'),
|
|
1818
|
-
items: [
|
|
1819
|
-
{
|
|
1820
|
-
id: 'status:active',
|
|
1821
|
-
label: _('account_backend.active'),
|
|
1822
|
-
path: withParam(url, 'status', status === 'active' ? null : 'active'),
|
|
1823
|
-
active: status === 'active',
|
|
1824
|
-
},
|
|
1825
|
-
{
|
|
1826
|
-
id: 'status:archived',
|
|
1827
|
-
label: _('account_backend.archived'),
|
|
1828
|
-
path: withParam(url, 'status', status === 'archived' ? null : 'archived'),
|
|
1829
|
-
active: status === 'archived',
|
|
1830
|
-
},
|
|
1831
|
-
],
|
|
1832
|
-
},
|
|
1833
|
-
],
|
|
1834
|
-
},
|
|
1835
|
-
pager: pager(url, page, listed.length, matching.length),
|
|
1836
|
-
},
|
|
1543
|
+
...search.frame,
|
|
1544
|
+
chrome: { ...search.frame.chrome, pager: shown.pager },
|
|
1837
1545
|
},
|
|
1838
|
-
rows:
|
|
1546
|
+
rows: shown.rows,
|
|
1547
|
+
...(search.groups ? { table: { groups: search.groups } } : {}),
|
|
1839
1548
|
createHref: paymentTermModalPath(url),
|
|
1840
1549
|
lineCreateHref: rows.length ? paymentTermLineModalPath(url) : undefined,
|
|
1841
1550
|
rowHref: (row) => paymentTermModalPath(url, row.id),
|
|
@@ -2097,22 +1806,7 @@ export default defineModule({
|
|
|
2097
1806
|
}
|
|
2098
1807
|
else if (req.method !== 'GET')
|
|
2099
1808
|
return text('GET or POST', { status: 405 });
|
|
2100
|
-
const all = (await ctx.call('account.listMoves', { moveType: 'entry'
|
|
2101
|
-
const state = MOVE_STATES.includes(String(url.searchParams.get('state')))
|
|
2102
|
-
? url.searchParams.get('state')
|
|
2103
|
-
: null;
|
|
2104
|
-
const page = pageOf(url);
|
|
2105
|
-
const search = searchOf(url);
|
|
2106
|
-
const needle = search?.toLocaleLowerCase();
|
|
2107
|
-
const matching = all.filter((row) => {
|
|
2108
|
-
if (state && row.state !== state)
|
|
2109
|
-
return false;
|
|
2110
|
-
return (!needle ||
|
|
2111
|
-
`${String(row.name ?? '')} ${String(row.ref ?? '')} ${String(row.accountingDate ?? row.date ?? '')} ${String(row.partnerId ?? '')}`
|
|
2112
|
-
.toLocaleLowerCase()
|
|
2113
|
-
.includes(needle));
|
|
2114
|
-
});
|
|
2115
|
-
const rows = matching.slice((page - 1) * PAGE_SIZE, page * PAGE_SIZE);
|
|
1809
|
+
const all = (await ctx.call('account.listMoves', { moveType: 'entry' }, url, req));
|
|
2116
1810
|
const returnTo = journalEntryListPath(url);
|
|
2117
1811
|
const modalOpen = req.method === 'POST' || url.searchParams.get('create') === '1';
|
|
2118
1812
|
if (modalOpen && !idempotencyKey)
|
|
@@ -2120,38 +1814,23 @@ export default defineModule({
|
|
|
2120
1814
|
return adminPage(ctx, url, req, {
|
|
2121
1815
|
title: 'account_backend.entries.title',
|
|
2122
1816
|
body: async (_, frame) => {
|
|
1817
|
+
const search = await rowListSearch(ctx, url, req, {
|
|
1818
|
+
spec: journalEntryListSearch,
|
|
1819
|
+
rows: all,
|
|
1820
|
+
frame,
|
|
1821
|
+
name: 'account-entry-filter',
|
|
1822
|
+
bodyId: 'account-entry-list',
|
|
1823
|
+
functions: accountSearchFunctions,
|
|
1824
|
+
groupLabel: (key, value) => accountGroupLabel(_, key, value),
|
|
1825
|
+
});
|
|
1826
|
+
const shown = listPage(url, search.rows, Boolean(search.groups));
|
|
2123
1827
|
const workspace = journalEntriesListScreen(_, {
|
|
2124
1828
|
frame: {
|
|
2125
|
-
...frame,
|
|
2126
|
-
chrome: {
|
|
2127
|
-
search: {
|
|
2128
|
-
name: 'q',
|
|
2129
|
-
value: search ?? '',
|
|
2130
|
-
placeholder: _('account_backend.entries.title'),
|
|
2131
|
-
keep: {
|
|
2132
|
-
...(state ? { state } : {}),
|
|
2133
|
-
...(url.searchParams.get('lang') ? { lang: String(url.searchParams.get('lang')) } : {}),
|
|
2134
|
-
},
|
|
2135
|
-
facets: state
|
|
2136
|
-
? [{ label: labelOf(_, 'moveState', state), without: withParam(url, 'state', null) }]
|
|
2137
|
-
: [],
|
|
2138
|
-
menus: [
|
|
2139
|
-
{
|
|
2140
|
-
id: 'filters',
|
|
2141
|
-
label: _('backend.chrome.filters'),
|
|
2142
|
-
items: MOVE_STATES.map((value) => ({
|
|
2143
|
-
id: `state:${value}`,
|
|
2144
|
-
label: labelOf(_, 'moveState', value),
|
|
2145
|
-
path: withParam(url, 'state', state === value ? null : value),
|
|
2146
|
-
active: state === value,
|
|
2147
|
-
})),
|
|
2148
|
-
},
|
|
2149
|
-
],
|
|
2150
|
-
},
|
|
2151
|
-
pager: pager(url, page, rows.length, matching.length),
|
|
2152
|
-
},
|
|
1829
|
+
...search.frame,
|
|
1830
|
+
chrome: { ...search.frame.chrome, pager: shown.pager },
|
|
2153
1831
|
},
|
|
2154
|
-
rows,
|
|
1832
|
+
rows: shown.rows,
|
|
1833
|
+
...(search.groups ? { table: { groups: search.groups } } : {}),
|
|
2155
1834
|
createHref: journalEntryModalPath(url),
|
|
2156
1835
|
rowHref: (row) => `/admin/accounting/entries/${encodeURIComponent(String(row.id))}${localeQuery(url)}`,
|
|
2157
1836
|
summary: {
|
|
@@ -2198,107 +1877,46 @@ export default defineModule({
|
|
|
2198
1877
|
errors: rejected.messages,
|
|
2199
1878
|
}),
|
|
2200
1879
|
});
|
|
2201
|
-
const all = (await ctx.call('account.listMoves', { moveTypes: CUSTOMER_INVOICE_TYPES
|
|
2202
|
-
const state = MOVE_STATES.includes(String(url.searchParams.get('state')))
|
|
2203
|
-
? url.searchParams.get('state')
|
|
2204
|
-
: null;
|
|
2205
|
-
const payment = PAYMENT_STATES.includes(String(url.searchParams.get('payment')))
|
|
2206
|
-
? url.searchParams.get('payment')
|
|
2207
|
-
: null;
|
|
2208
|
-
const type = CUSTOMER_INVOICE_TYPES.includes(String(url.searchParams.get('type')))
|
|
2209
|
-
? url.searchParams.get('type')
|
|
2210
|
-
: null;
|
|
2211
|
-
const page = pageOf(url);
|
|
2212
|
-
const search = searchOf(url);
|
|
1880
|
+
const all = (await ctx.call('account.listMoves', { moveTypes: CUSTOMER_INVOICE_TYPES }, url, req));
|
|
2213
1881
|
const partnerLabels = new Map(data.partners.map((partner) => [String(partner.id), String(partner.name)]));
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
if (type && row.moveType !== type)
|
|
2221
|
-
return false;
|
|
2222
|
-
return (!needle ||
|
|
2223
|
-
`${String(row.name ?? '')} ${String(row.ref ?? '')} ${String(row.accountingDate ?? row.date ?? '')} ${partnerLabels.get(String(row.partnerId)) ?? ''}`
|
|
2224
|
-
.toLocaleLowerCase()
|
|
2225
|
-
.includes(needle));
|
|
2226
|
-
});
|
|
2227
|
-
const rows = matching.slice((page - 1) * PAGE_SIZE, page * PAGE_SIZE);
|
|
1882
|
+
// The partner is an id on the row and a name on the screen, so the name
|
|
1883
|
+
// the bar searches and sorts is put on the row before it is narrowed.
|
|
1884
|
+
const named = all.map((row) => ({
|
|
1885
|
+
...row,
|
|
1886
|
+
partnerName: partnerLabels.get(String(row.partnerId)) ?? '',
|
|
1887
|
+
}));
|
|
2228
1888
|
const returnTo = customerInvoiceListPath(url);
|
|
2229
1889
|
return adminPage(ctx, url, req, {
|
|
2230
1890
|
title: 'account_backend.customerInvoices.title',
|
|
2231
|
-
body: (_, frame) =>
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
...(state
|
|
2247
|
-
? [{ label: labelOf(_, 'moveState', state), without: withParam(url, 'state', null) }]
|
|
2248
|
-
: []),
|
|
2249
|
-
...(payment
|
|
2250
|
-
? [
|
|
2251
|
-
{
|
|
2252
|
-
label: labelOf(_, 'paymentState', payment),
|
|
2253
|
-
without: withParam(url, 'payment', null),
|
|
2254
|
-
},
|
|
2255
|
-
]
|
|
2256
|
-
: []),
|
|
2257
|
-
...(type
|
|
2258
|
-
? [{ label: labelOf(_, 'moveType', type), without: withParam(url, 'type', null) }]
|
|
2259
|
-
: []),
|
|
2260
|
-
],
|
|
2261
|
-
menus: [
|
|
2262
|
-
{
|
|
2263
|
-
id: 'filters',
|
|
2264
|
-
label: _('backend.chrome.filters'),
|
|
2265
|
-
items: [
|
|
2266
|
-
...MOVE_STATES.map((value) => ({
|
|
2267
|
-
id: `state:${value}`,
|
|
2268
|
-
label: labelOf(_, 'moveState', value),
|
|
2269
|
-
path: withParam(url, 'state', state === value ? null : value),
|
|
2270
|
-
active: state === value,
|
|
2271
|
-
})),
|
|
2272
|
-
...PAYMENT_STATES.map((value) => ({
|
|
2273
|
-
id: `payment:${value}`,
|
|
2274
|
-
label: labelOf(_, 'paymentState', value),
|
|
2275
|
-
path: withParam(url, 'payment', payment === value ? null : value),
|
|
2276
|
-
active: payment === value,
|
|
2277
|
-
})),
|
|
2278
|
-
...CUSTOMER_INVOICE_TYPES.map((value) => ({
|
|
2279
|
-
id: `type:${value}`,
|
|
2280
|
-
label: labelOf(_, 'moveType', value),
|
|
2281
|
-
path: withParam(url, 'type', type === value ? null : value),
|
|
2282
|
-
active: type === value,
|
|
2283
|
-
})),
|
|
2284
|
-
],
|
|
2285
|
-
},
|
|
2286
|
-
],
|
|
2287
|
-
},
|
|
2288
|
-
pager: pager(url, page, rows.length, matching.length),
|
|
1891
|
+
body: async (_, frame) => {
|
|
1892
|
+
const search = await rowListSearch(ctx, url, req, {
|
|
1893
|
+
spec: customerInvoiceListSearch,
|
|
1894
|
+
rows: named,
|
|
1895
|
+
frame,
|
|
1896
|
+
name: 'account-customer-invoice-filter',
|
|
1897
|
+
bodyId: 'account-customer-invoice-list',
|
|
1898
|
+
functions: accountSearchFunctions,
|
|
1899
|
+
groupLabel: (key, value) => accountGroupLabel(_, key, value),
|
|
1900
|
+
});
|
|
1901
|
+
const shown = listPage(url, search.rows, Boolean(search.groups));
|
|
1902
|
+
return customerInvoicesListScreen(_, {
|
|
1903
|
+
frame: {
|
|
1904
|
+
...search.frame,
|
|
1905
|
+
chrome: { ...search.frame.chrome, pager: shown.pager },
|
|
2289
1906
|
},
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
1907
|
+
rows: shown.rows,
|
|
1908
|
+
...(search.groups ? { table: { groups: search.groups } } : {}),
|
|
1909
|
+
createHref: customerInvoiceFormPath(url, returnTo),
|
|
1910
|
+
rowHref: (row) => `/admin/accounting/customer-invoices/${encodeURIComponent(String(row.id))}${localeQuery(url)}`,
|
|
1911
|
+
partnerLabel: (row) => partnerLabels.get(String(row.partnerId)) ?? '—',
|
|
1912
|
+
summary: {
|
|
1913
|
+
total: all.length,
|
|
1914
|
+
draft: all.filter((row) => row.state === 'draft').length,
|
|
1915
|
+
posted: all.filter((row) => row.state === 'posted').length,
|
|
1916
|
+
unpaid: all.filter((row) => row.paymentState === 'not_paid').length,
|
|
1917
|
+
},
|
|
1918
|
+
});
|
|
1919
|
+
},
|
|
2302
1920
|
});
|
|
2303
1921
|
},
|
|
2304
1922
|
'/admin/accounting/customer-invoices/new': (ctx) => async (url, req) => {
|
|
@@ -2352,107 +1970,46 @@ export default defineModule({
|
|
|
2352
1970
|
errors: rejected.messages,
|
|
2353
1971
|
}),
|
|
2354
1972
|
});
|
|
2355
|
-
const all = (await ctx.call('account.listMoves', { moveTypes: VENDOR_BILL_TYPES
|
|
2356
|
-
const state = MOVE_STATES.includes(String(url.searchParams.get('state')))
|
|
2357
|
-
? url.searchParams.get('state')
|
|
2358
|
-
: null;
|
|
2359
|
-
const payment = PAYMENT_STATES.includes(String(url.searchParams.get('payment')))
|
|
2360
|
-
? url.searchParams.get('payment')
|
|
2361
|
-
: null;
|
|
2362
|
-
const type = VENDOR_BILL_TYPES.includes(String(url.searchParams.get('type')))
|
|
2363
|
-
? url.searchParams.get('type')
|
|
2364
|
-
: null;
|
|
2365
|
-
const page = pageOf(url);
|
|
2366
|
-
const search = searchOf(url);
|
|
1973
|
+
const all = (await ctx.call('account.listMoves', { moveTypes: VENDOR_BILL_TYPES }, url, req));
|
|
2367
1974
|
const partnerLabels = new Map(data.partners.map((partner) => [String(partner.id), String(partner.name)]));
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
if (type && row.moveType !== type)
|
|
2375
|
-
return false;
|
|
2376
|
-
return (!needle ||
|
|
2377
|
-
`${String(row.name ?? '')} ${String(row.ref ?? '')} ${String(row.accountingDate ?? row.date ?? '')} ${partnerLabels.get(String(row.partnerId)) ?? ''}`
|
|
2378
|
-
.toLocaleLowerCase()
|
|
2379
|
-
.includes(needle));
|
|
2380
|
-
});
|
|
2381
|
-
const rows = matching.slice((page - 1) * PAGE_SIZE, page * PAGE_SIZE);
|
|
1975
|
+
// The partner is an id on the row and a name on the screen, so the name
|
|
1976
|
+
// the bar searches and sorts is put on the row before it is narrowed.
|
|
1977
|
+
const named = all.map((row) => ({
|
|
1978
|
+
...row,
|
|
1979
|
+
partnerName: partnerLabels.get(String(row.partnerId)) ?? '',
|
|
1980
|
+
}));
|
|
2382
1981
|
const returnTo = vendorBillListPath(url);
|
|
2383
1982
|
return adminPage(ctx, url, req, {
|
|
2384
1983
|
title: 'account_backend.vendorBills.title',
|
|
2385
|
-
body: (_, frame) =>
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
...(state
|
|
2401
|
-
? [{ label: labelOf(_, 'moveState', state), without: withParam(url, 'state', null) }]
|
|
2402
|
-
: []),
|
|
2403
|
-
...(payment
|
|
2404
|
-
? [
|
|
2405
|
-
{
|
|
2406
|
-
label: labelOf(_, 'paymentState', payment),
|
|
2407
|
-
without: withParam(url, 'payment', null),
|
|
2408
|
-
},
|
|
2409
|
-
]
|
|
2410
|
-
: []),
|
|
2411
|
-
...(type
|
|
2412
|
-
? [{ label: labelOf(_, 'moveType', type), without: withParam(url, 'type', null) }]
|
|
2413
|
-
: []),
|
|
2414
|
-
],
|
|
2415
|
-
menus: [
|
|
2416
|
-
{
|
|
2417
|
-
id: 'filters',
|
|
2418
|
-
label: _('backend.chrome.filters'),
|
|
2419
|
-
items: [
|
|
2420
|
-
...MOVE_STATES.map((value) => ({
|
|
2421
|
-
id: `state:${value}`,
|
|
2422
|
-
label: labelOf(_, 'moveState', value),
|
|
2423
|
-
path: withParam(url, 'state', state === value ? null : value),
|
|
2424
|
-
active: state === value,
|
|
2425
|
-
})),
|
|
2426
|
-
...PAYMENT_STATES.map((value) => ({
|
|
2427
|
-
id: `payment:${value}`,
|
|
2428
|
-
label: labelOf(_, 'paymentState', value),
|
|
2429
|
-
path: withParam(url, 'payment', payment === value ? null : value),
|
|
2430
|
-
active: payment === value,
|
|
2431
|
-
})),
|
|
2432
|
-
...VENDOR_BILL_TYPES.map((value) => ({
|
|
2433
|
-
id: `type:${value}`,
|
|
2434
|
-
label: labelOf(_, 'moveType', value),
|
|
2435
|
-
path: withParam(url, 'type', type === value ? null : value),
|
|
2436
|
-
active: type === value,
|
|
2437
|
-
})),
|
|
2438
|
-
],
|
|
2439
|
-
},
|
|
2440
|
-
],
|
|
2441
|
-
},
|
|
2442
|
-
pager: pager(url, page, rows.length, matching.length),
|
|
1984
|
+
body: async (_, frame) => {
|
|
1985
|
+
const search = await rowListSearch(ctx, url, req, {
|
|
1986
|
+
spec: vendorBillListSearch,
|
|
1987
|
+
rows: named,
|
|
1988
|
+
frame,
|
|
1989
|
+
name: 'account-vendor-bill-filter',
|
|
1990
|
+
bodyId: 'account-vendor-bill-list',
|
|
1991
|
+
functions: accountSearchFunctions,
|
|
1992
|
+
groupLabel: (key, value) => accountGroupLabel(_, key, value),
|
|
1993
|
+
});
|
|
1994
|
+
const shown = listPage(url, search.rows, Boolean(search.groups));
|
|
1995
|
+
return vendorBillsListScreen(_, {
|
|
1996
|
+
frame: {
|
|
1997
|
+
...search.frame,
|
|
1998
|
+
chrome: { ...search.frame.chrome, pager: shown.pager },
|
|
2443
1999
|
},
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2000
|
+
rows: shown.rows,
|
|
2001
|
+
...(search.groups ? { table: { groups: search.groups } } : {}),
|
|
2002
|
+
createHref: vendorBillFormPath(url, returnTo),
|
|
2003
|
+
rowHref: (row) => `/admin/accounting/vendor-bills/${encodeURIComponent(String(row.id))}${localeQuery(url)}`,
|
|
2004
|
+
partnerLabel: (row) => partnerLabels.get(String(row.partnerId)) ?? '—',
|
|
2005
|
+
summary: {
|
|
2006
|
+
total: all.length,
|
|
2007
|
+
draft: all.filter((row) => row.state === 'draft').length,
|
|
2008
|
+
posted: all.filter((row) => row.state === 'posted').length,
|
|
2009
|
+
unpaid: all.filter((row) => row.paymentState === 'not_paid').length,
|
|
2010
|
+
},
|
|
2011
|
+
});
|
|
2012
|
+
},
|
|
2456
2013
|
});
|
|
2457
2014
|
},
|
|
2458
2015
|
'/admin/accounting/vendor-bills/new': (ctx) => async (url, req) => {
|
|
@@ -2498,7 +2055,7 @@ export default defineModule({
|
|
|
2498
2055
|
return text('GET or POST', { status: 405 });
|
|
2499
2056
|
const [data, openItems] = await Promise.all([
|
|
2500
2057
|
common(ctx, url, req),
|
|
2501
|
-
ctx.call('account.listOpenItems', { limit:
|
|
2058
|
+
ctx.call('account.listOpenItems', { limit: PAYMENT_PICKER_LIMIT }, url, req),
|
|
2502
2059
|
]);
|
|
2503
2060
|
// Legacy collection POSTs still render the new full form when refused.
|
|
2504
2061
|
if (rejected)
|
|
@@ -2513,129 +2070,47 @@ export default defineModule({
|
|
|
2513
2070
|
errors: rejected.messages,
|
|
2514
2071
|
}),
|
|
2515
2072
|
});
|
|
2516
|
-
const all = (await ctx.call('account.listPayments', {
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
const partnerType = PARTNER_TYPES.includes(String(url.searchParams.get('partnerType')))
|
|
2521
|
-
? url.searchParams.get('partnerType')
|
|
2522
|
-
: null;
|
|
2523
|
-
const state = PAYMENT_STATES.includes(String(url.searchParams.get('state')))
|
|
2524
|
-
? url.searchParams.get('state')
|
|
2525
|
-
: null;
|
|
2073
|
+
const all = (await ctx.call('account.listPayments', {}, url, req));
|
|
2074
|
+
// One partner, named by whoever linked here: not a preset, because the
|
|
2075
|
+
// partners are a collection rather than a fixed list, and not something
|
|
2076
|
+
// the bar should be able to drop by accident.
|
|
2526
2077
|
const partnerId = url.searchParams.get('partnerId') || null;
|
|
2527
|
-
const page = pageOf(url);
|
|
2528
|
-
const search = searchOf(url);
|
|
2529
2078
|
const partnerLabels = new Map(data.partners.map((partner) => [String(partner.id), String(partner.name)]));
|
|
2530
|
-
const
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
return false;
|
|
2534
|
-
if (partnerType && row.partnerType !== partnerType)
|
|
2535
|
-
return false;
|
|
2536
|
-
if (state && row.state !== state)
|
|
2537
|
-
return false;
|
|
2538
|
-
if (partnerId && String(row.partnerId ?? '') !== partnerId)
|
|
2539
|
-
return false;
|
|
2540
|
-
return (!needle ||
|
|
2541
|
-
`${String(row.name ?? '')} ${String(row.accountingDate ?? row.date ?? '')} ${String(row.memo ?? '')} ${String(row.paymentReference ?? '')} ${partnerLabels.get(String(row.partnerId)) ?? ''}`
|
|
2542
|
-
.toLocaleLowerCase()
|
|
2543
|
-
.includes(needle));
|
|
2544
|
-
});
|
|
2545
|
-
const rows = matching.slice((page - 1) * PAGE_SIZE, page * PAGE_SIZE);
|
|
2079
|
+
const named = all
|
|
2080
|
+
.filter((row) => !partnerId || String(row.partnerId ?? '') === partnerId)
|
|
2081
|
+
.map((row) => ({ ...row, partnerName: partnerLabels.get(String(row.partnerId)) ?? '' }));
|
|
2546
2082
|
const returnTo = paymentListPath(url);
|
|
2547
2083
|
return adminPage(ctx, url, req, {
|
|
2548
2084
|
title: 'account_backend.payments.title',
|
|
2549
|
-
body: (_, frame) =>
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
facets: [
|
|
2565
|
-
...(paymentType
|
|
2566
|
-
? [
|
|
2567
|
-
{
|
|
2568
|
-
label: labelOf(_, 'paymentType', paymentType),
|
|
2569
|
-
without: withParam(url, 'type', null),
|
|
2570
|
-
},
|
|
2571
|
-
]
|
|
2572
|
-
: []),
|
|
2573
|
-
...(partnerType
|
|
2574
|
-
? [
|
|
2575
|
-
{
|
|
2576
|
-
label: labelOf(_, 'partnerType', partnerType),
|
|
2577
|
-
without: withParam(url, 'partnerType', null),
|
|
2578
|
-
},
|
|
2579
|
-
]
|
|
2580
|
-
: []),
|
|
2581
|
-
...(state
|
|
2582
|
-
? [
|
|
2583
|
-
{
|
|
2584
|
-
label: labelOf(_, 'paymentStatus', state),
|
|
2585
|
-
without: withParam(url, 'state', null),
|
|
2586
|
-
},
|
|
2587
|
-
]
|
|
2588
|
-
: []),
|
|
2589
|
-
...(partnerId
|
|
2590
|
-
? [
|
|
2591
|
-
{
|
|
2592
|
-
label: partnerLabels.get(partnerId) ?? partnerId,
|
|
2593
|
-
without: withParam(url, 'partnerId', null),
|
|
2594
|
-
},
|
|
2595
|
-
]
|
|
2596
|
-
: []),
|
|
2597
|
-
],
|
|
2598
|
-
menus: [
|
|
2599
|
-
{
|
|
2600
|
-
id: 'filters',
|
|
2601
|
-
label: _('backend.chrome.filters'),
|
|
2602
|
-
items: [
|
|
2603
|
-
...PAYMENT_TYPES.map((value) => ({
|
|
2604
|
-
id: `type:${value}`,
|
|
2605
|
-
label: labelOf(_, 'paymentType', value),
|
|
2606
|
-
path: withParam(url, 'type', paymentType === value ? null : value),
|
|
2607
|
-
active: paymentType === value,
|
|
2608
|
-
})),
|
|
2609
|
-
...PARTNER_TYPES.map((value) => ({
|
|
2610
|
-
id: `partnerType:${value}`,
|
|
2611
|
-
label: labelOf(_, 'partnerType', value),
|
|
2612
|
-
path: withParam(url, 'partnerType', partnerType === value ? null : value),
|
|
2613
|
-
active: partnerType === value,
|
|
2614
|
-
})),
|
|
2615
|
-
...PAYMENT_STATES.map((value) => ({
|
|
2616
|
-
id: `state:${value}`,
|
|
2617
|
-
label: labelOf(_, 'paymentStatus', value),
|
|
2618
|
-
path: withParam(url, 'state', state === value ? null : value),
|
|
2619
|
-
active: state === value,
|
|
2620
|
-
})),
|
|
2621
|
-
],
|
|
2622
|
-
},
|
|
2623
|
-
],
|
|
2624
|
-
},
|
|
2625
|
-
pager: pager(url, page, rows.length, matching.length),
|
|
2085
|
+
body: async (_, frame) => {
|
|
2086
|
+
const search = await rowListSearch(ctx, url, req, {
|
|
2087
|
+
spec: paymentListSearch,
|
|
2088
|
+
rows: named,
|
|
2089
|
+
frame,
|
|
2090
|
+
name: 'account-payment-filter',
|
|
2091
|
+
bodyId: 'account-payment-list',
|
|
2092
|
+
functions: accountSearchFunctions,
|
|
2093
|
+
groupLabel: (key, value) => accountGroupLabel(_, key, value),
|
|
2094
|
+
});
|
|
2095
|
+
const shown = listPage(url, search.rows, Boolean(search.groups));
|
|
2096
|
+
return paymentsListScreen(_, {
|
|
2097
|
+
frame: {
|
|
2098
|
+
...search.frame,
|
|
2099
|
+
chrome: { ...search.frame.chrome, pager: shown.pager },
|
|
2626
2100
|
},
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2101
|
+
rows: shown.rows,
|
|
2102
|
+
...(search.groups ? { table: { groups: search.groups } } : {}),
|
|
2103
|
+
createHref: paymentFormPath(url, returnTo),
|
|
2104
|
+
rowHref: (row) => `/admin/accounting/entries/${encodeURIComponent(String(row.moveId))}${localeQuery(url)}`,
|
|
2105
|
+
partnerLabel: (row) => partnerLabels.get(String(row.partnerId)) ?? '—',
|
|
2106
|
+
summary: {
|
|
2107
|
+
total: all.length,
|
|
2108
|
+
inbound: all.filter((row) => row.paymentType === 'inbound').length,
|
|
2109
|
+
outbound: all.filter((row) => row.paymentType === 'outbound').length,
|
|
2110
|
+
open: openItems.length,
|
|
2111
|
+
},
|
|
2112
|
+
});
|
|
2113
|
+
},
|
|
2639
2114
|
});
|
|
2640
2115
|
},
|
|
2641
2116
|
'/admin/accounting/payments/new': (ctx) => async (url, req) => {
|
|
@@ -2652,7 +2127,7 @@ export default defineModule({
|
|
|
2652
2127
|
return text('GET or POST', { status: 405 });
|
|
2653
2128
|
const [data, openItems] = await Promise.all([
|
|
2654
2129
|
common(ctx, url, req),
|
|
2655
|
-
ctx.call('account.listOpenItems', { limit:
|
|
2130
|
+
ctx.call('account.listOpenItems', { limit: PAYMENT_PICKER_LIMIT }, url, req),
|
|
2656
2131
|
]);
|
|
2657
2132
|
const returnTo = safePaymentReturnTo(url);
|
|
2658
2133
|
return adminPage(ctx, url, req, {
|
|
@@ -2728,7 +2203,7 @@ export default defineModule({
|
|
|
2728
2203
|
'/admin/accounting/general-ledger': (ctx) => async (url, req) => {
|
|
2729
2204
|
if (req.method !== 'GET')
|
|
2730
2205
|
return text('GET', { status: 405 });
|
|
2731
|
-
const accountId = url.searchParams.get('accountId') ?? '', dateFrom = url.searchParams.get('dateFrom') ?? '', dateTo = url.searchParams.get('dateTo') ?? '', search = searchOf(url) ?? '',
|
|
2206
|
+
const accountId = url.searchParams.get('accountId') ?? '', dateFrom = url.searchParams.get('dateFrom') ?? '', dateTo = url.searchParams.get('dateTo') ?? '', search = searchOf(url) ?? '', inverted = Boolean(dateFrom && dateTo && dateFrom > dateTo);
|
|
2732
2207
|
await ctx.call('account.initializeCompany', {}, url, req);
|
|
2733
2208
|
const [accounts, companies, allRows] = (await Promise.all([
|
|
2734
2209
|
ctx.call('account.listAccounts', {}, url, req),
|
|
@@ -2752,46 +2227,43 @@ export default defineModule({
|
|
|
2752
2227
|
nameEn: _('account_backend.ledger.filter.unavailableAccount'),
|
|
2753
2228
|
};
|
|
2754
2229
|
const filterAccounts = unknownAccount ? [unavailableAccount, ...accounts] : accounts;
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
return true;
|
|
2230
|
+
// A line's move holds its number, reference and date; the bar reads
|
|
2231
|
+
// fields off the row, so they are flattened onto it here.
|
|
2232
|
+
const lines = allRows.map((row) => {
|
|
2759
2233
|
const move = (row.move ?? {});
|
|
2760
|
-
return
|
|
2761
|
-
|
|
2762
|
-
move.
|
|
2763
|
-
move.
|
|
2764
|
-
|
|
2765
|
-
row.accountId,
|
|
2766
|
-
|
|
2767
|
-
].some((value) => String(value ?? '')
|
|
2768
|
-
.toLocaleLowerCase(ctx.localeOf(url, req))
|
|
2769
|
-
.includes(needle));
|
|
2234
|
+
return {
|
|
2235
|
+
...row,
|
|
2236
|
+
moveName: move.name ?? '',
|
|
2237
|
+
ref: move.ref ?? '',
|
|
2238
|
+
accountingDate: move.accountingDate ?? move.date ?? '',
|
|
2239
|
+
accountName: accountLabel(_, accounts, row.accountId),
|
|
2240
|
+
};
|
|
2770
2241
|
});
|
|
2771
|
-
const
|
|
2242
|
+
const narrowed = await rowListSearch(ctx, url, req, {
|
|
2243
|
+
spec: generalLedgerLineSearch,
|
|
2244
|
+
rows: lines,
|
|
2245
|
+
frame,
|
|
2246
|
+
name: 'account-general-ledger-filter',
|
|
2247
|
+
bodyId: 'account-general-ledger-list',
|
|
2248
|
+
functions: accountSearchFunctions,
|
|
2249
|
+
labels: { searchPlaceholder: _('account_backend.ledger.search') },
|
|
2250
|
+
groupLabel: (key, value) => accountGroupLabel(_, key, value),
|
|
2251
|
+
});
|
|
2252
|
+
const matching = narrowed.rows;
|
|
2253
|
+
const shown = listPage(url, matching, Boolean(narrowed.groups));
|
|
2772
2254
|
const errors = [
|
|
2773
2255
|
...(inverted ? [_('account_backend.trial.filter.rangeError')] : []),
|
|
2774
2256
|
...(unknownAccount ? [_('account_backend.ledger.filter.accountError')] : []),
|
|
2775
2257
|
];
|
|
2776
|
-
frame
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
value: search,
|
|
2780
|
-
placeholder: _('account_backend.ledger.search'),
|
|
2781
|
-
keep: {
|
|
2782
|
-
...(accountId ? { accountId } : {}),
|
|
2783
|
-
...(dateFrom ? { dateFrom } : {}),
|
|
2784
|
-
...(dateTo ? { dateTo } : {}),
|
|
2785
|
-
...(url.searchParams.get('lang') ? { lang: url.searchParams.get('lang') } : {}),
|
|
2786
|
-
},
|
|
2787
|
-
},
|
|
2788
|
-
pager: pager(url, page, rows.length, matching.length),
|
|
2258
|
+
frame = {
|
|
2259
|
+
...narrowed.frame,
|
|
2260
|
+
chrome: { ...narrowed.frame.chrome, pager: shown.pager },
|
|
2789
2261
|
};
|
|
2790
2262
|
const currency = currencyOf(companies, frame);
|
|
2791
2263
|
return generalLedgerScreen(_, {
|
|
2792
2264
|
frame: frame,
|
|
2793
2265
|
action: '/admin/accounting/general-ledger',
|
|
2794
|
-
rows,
|
|
2266
|
+
rows: shown.rows,
|
|
2795
2267
|
summary: {
|
|
2796
2268
|
lines: matching.length,
|
|
2797
2269
|
debit: matching.reduce((total, row) => addDecimals(total, row.debit ?? '0'), '0'),
|
|
@@ -2844,7 +2316,7 @@ export default defineModule({
|
|
|
2844
2316
|
'/admin/accounting/partner-statement': (ctx) => async (url, req) => {
|
|
2845
2317
|
if (req.method !== 'GET')
|
|
2846
2318
|
return text('GET', { status: 405 });
|
|
2847
|
-
const partnerId = url.searchParams.get('partnerId') ?? '', dateFrom = url.searchParams.get('dateFrom') ?? '', dateTo = url.searchParams.get('dateTo') ?? '', search = searchOf(url) ?? '',
|
|
2319
|
+
const partnerId = url.searchParams.get('partnerId') ?? '', dateFrom = url.searchParams.get('dateFrom') ?? '', dateTo = url.searchParams.get('dateTo') ?? '', search = searchOf(url) ?? '', inverted = Boolean(dateFrom && dateTo && dateFrom > dateTo);
|
|
2848
2320
|
await ctx.call('account.initializeCompany', {}, url, req);
|
|
2849
2321
|
const [accounts, companies, initialPartners, selectedPartners, allRows] = (await Promise.all([
|
|
2850
2322
|
ctx.call('account.listAccounts', {}, url, req),
|
|
@@ -2875,46 +2347,43 @@ export default defineModule({
|
|
|
2875
2347
|
...(selectedPartner ? [selectedPartner] : unknownPartner ? [unavailablePartner] : []),
|
|
2876
2348
|
...initialPartners.filter((partner) => !companyPartners.has(String(partner.id)) && String(partner.id) !== partnerId),
|
|
2877
2349
|
];
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
return true;
|
|
2350
|
+
// A line's move holds its number, reference and date; the bar reads
|
|
2351
|
+
// fields off the row, so they are flattened onto it here.
|
|
2352
|
+
const lines = allRows.map((row) => {
|
|
2882
2353
|
const move = (row.move ?? {});
|
|
2883
|
-
return
|
|
2884
|
-
|
|
2885
|
-
move.
|
|
2886
|
-
move.
|
|
2887
|
-
|
|
2888
|
-
row.accountId,
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2354
|
+
return {
|
|
2355
|
+
...row,
|
|
2356
|
+
moveName: move.name ?? '',
|
|
2357
|
+
ref: move.ref ?? '',
|
|
2358
|
+
accountingDate: move.accountingDate ?? move.date ?? '',
|
|
2359
|
+
accountName: accountLabel(_, accounts, row.accountId),
|
|
2360
|
+
};
|
|
2361
|
+
});
|
|
2362
|
+
const narrowed = await rowListSearch(ctx, url, req, {
|
|
2363
|
+
spec: partnerLedgerLineSearch,
|
|
2364
|
+
rows: lines,
|
|
2365
|
+
frame,
|
|
2366
|
+
name: 'account-partner-statement-filter',
|
|
2367
|
+
bodyId: 'account-partner-statement-list',
|
|
2368
|
+
functions: accountSearchFunctions,
|
|
2369
|
+
labels: { searchPlaceholder: _('account_backend.partnerLedger.search') },
|
|
2370
|
+
groupLabel: (key, value) => accountGroupLabel(_, key, value),
|
|
2893
2371
|
});
|
|
2894
|
-
const
|
|
2372
|
+
const matching = narrowed.rows;
|
|
2373
|
+
const shown = listPage(url, matching, Boolean(narrowed.groups));
|
|
2895
2374
|
const errors = [
|
|
2896
2375
|
...(inverted ? [_('account_backend.trial.filter.rangeError')] : []),
|
|
2897
2376
|
...(unknownPartner ? [_('account_backend.partnerLedger.filter.partnerError')] : []),
|
|
2898
2377
|
];
|
|
2899
|
-
frame
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
value: search,
|
|
2903
|
-
placeholder: _('account_backend.partnerLedger.search'),
|
|
2904
|
-
keep: {
|
|
2905
|
-
...(partnerId ? { partnerId } : {}),
|
|
2906
|
-
...(dateFrom ? { dateFrom } : {}),
|
|
2907
|
-
...(dateTo ? { dateTo } : {}),
|
|
2908
|
-
...(url.searchParams.get('lang') ? { lang: url.searchParams.get('lang') } : {}),
|
|
2909
|
-
},
|
|
2910
|
-
},
|
|
2911
|
-
pager: pager(url, page, rows.length, matching.length),
|
|
2378
|
+
frame = {
|
|
2379
|
+
...narrowed.frame,
|
|
2380
|
+
chrome: { ...narrowed.frame.chrome, pager: shown.pager },
|
|
2912
2381
|
};
|
|
2913
2382
|
const currency = currencyOf(companies, frame);
|
|
2914
2383
|
return partnerLedgerScreen(_, {
|
|
2915
2384
|
frame: frame,
|
|
2916
2385
|
action: '/admin/accounting/partner-statement',
|
|
2917
|
-
rows,
|
|
2386
|
+
rows: shown.rows,
|
|
2918
2387
|
summary: {
|
|
2919
2388
|
debit: matching.reduce((total, row) => addDecimals(total, row.debit ?? '0'), '0'),
|
|
2920
2389
|
credit: matching.reduce((total, row) => addDecimals(total, row.credit ?? '0'), '0'),
|
|
@@ -2977,12 +2446,24 @@ export default defineModule({
|
|
|
2977
2446
|
const rows = (await ctx.call('account.listOpeningBatches', {}, url, req));
|
|
2978
2447
|
return adminPage(ctx, url, req, {
|
|
2979
2448
|
title: 'account_backend.opening.title',
|
|
2980
|
-
body: (_, frame) =>
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2449
|
+
body: async (_, frame) => {
|
|
2450
|
+
const search = await rowListSearch(ctx, url, req, {
|
|
2451
|
+
spec: openingBatchListSearch,
|
|
2452
|
+
rows,
|
|
2453
|
+
frame,
|
|
2454
|
+
name: 'account-opening-filter',
|
|
2455
|
+
bodyId: 'account-opening-list',
|
|
2456
|
+
functions: accountSearchFunctions,
|
|
2457
|
+
groupLabel: (key, value) => accountGroupLabel(_, key, value),
|
|
2458
|
+
});
|
|
2459
|
+
return openingBalancesListScreen(_, {
|
|
2460
|
+
frame: search.frame,
|
|
2461
|
+
rows: search.rows,
|
|
2462
|
+
...(search.groups ? { table: { groups: search.groups } } : {}),
|
|
2463
|
+
createHref: `/admin/accounting/opening-balances/new${localeQuery(url)}`,
|
|
2464
|
+
rowHref: (row) => `/admin/accounting/opening-balances/${encodeURIComponent(String(row.id))}${localeQuery(url)}`,
|
|
2465
|
+
});
|
|
2466
|
+
},
|
|
2986
2467
|
});
|
|
2987
2468
|
},
|
|
2988
2469
|
'/admin/accounting/opening-balances/new': (ctx) => async (url, req) => {
|
|
@@ -3142,28 +2623,40 @@ export default defineModule({
|
|
|
3142
2623
|
const rows = (await ctx.call('account.listClosePeriods', {}, url, req));
|
|
3143
2624
|
return adminPage(ctx, url, req, {
|
|
3144
2625
|
title: 'account_backend.close.title',
|
|
3145
|
-
body: (_, frame) =>
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
2626
|
+
body: async (_, frame) => {
|
|
2627
|
+
const search = await rowListSearch(ctx, url, req, {
|
|
2628
|
+
spec: closePeriodListSearch,
|
|
2629
|
+
rows,
|
|
2630
|
+
frame,
|
|
2631
|
+
name: 'account-close-filter',
|
|
2632
|
+
bodyId: 'account-close-list',
|
|
2633
|
+
functions: accountSearchFunctions,
|
|
2634
|
+
groupLabel: (key, value) => accountGroupLabel(_, key, value),
|
|
2635
|
+
});
|
|
2636
|
+
return periodClosesListScreen(_, {
|
|
2637
|
+
frame: search.frame,
|
|
2638
|
+
rows: search.rows,
|
|
2639
|
+
...(search.groups ? { table: { groups: search.groups } } : {}),
|
|
2640
|
+
action: `${url.pathname}${localeQuery(url)}`,
|
|
2641
|
+
errors,
|
|
2642
|
+
fields: [
|
|
2643
|
+
{
|
|
2644
|
+
name: 'periodKey',
|
|
2645
|
+
label: _('account_backend.close.period'),
|
|
2646
|
+
placeholder: '2026-08',
|
|
2647
|
+
required: true,
|
|
2648
|
+
},
|
|
2649
|
+
{
|
|
2650
|
+
name: 'dateFrom',
|
|
2651
|
+
label: _('account_backend.field.dateFrom'),
|
|
2652
|
+
type: 'date',
|
|
2653
|
+
required: true,
|
|
2654
|
+
},
|
|
2655
|
+
{ name: 'dateTo', label: _('account_backend.field.dateTo'), type: 'date', required: true },
|
|
2656
|
+
],
|
|
2657
|
+
rowHref: (row) => `/admin/accounting/period-closes/${encodeURIComponent(String(row.id))}${localeQuery(url)}`,
|
|
2658
|
+
});
|
|
2659
|
+
},
|
|
3167
2660
|
});
|
|
3168
2661
|
},
|
|
3169
2662
|
'/admin/accounting/period-closes/{id}': (ctx) => async (url, req, params) => {
|