@ketvietlab/ketsuite 0.1.2 → 0.1.5
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/LICENSE +1 -1
- package/README.md +15 -1
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +59 -0
- package/dist/cli.js.map +1 -0
- package/dist/deployment.d.ts +5 -0
- package/dist/deployment.d.ts.map +1 -0
- package/dist/deployment.js +155 -0
- package/dist/deployment.js.map +1 -0
- package/dist/development.d.ts +8 -0
- package/dist/development.d.ts.map +1 -0
- package/dist/development.js +40 -0
- package/dist/development.js.map +1 -0
- package/dist/index.d.ts +84 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +72 -6
- package/dist/index.js.map +1 -1
- package/dist/modules/account/analytics.d.ts +32 -0
- package/dist/modules/account/analytics.d.ts.map +1 -0
- package/dist/modules/account/analytics.js +457 -0
- package/dist/modules/account/analytics.js.map +1 -0
- package/dist/modules/account/assets-costing.d.ts +4 -0
- package/dist/modules/account/assets-costing.d.ts.map +1 -0
- package/dist/modules/account/assets-costing.js +1134 -0
- package/dist/modules/account/assets-costing.js.map +1 -0
- package/dist/modules/account/audit.d.ts +3 -0
- package/dist/modules/account/audit.d.ts.map +1 -0
- package/dist/modules/account/audit.js +14 -0
- package/dist/modules/account/audit.js.map +1 -0
- package/dist/modules/account/books.d.ts +4 -0
- package/dist/modules/account/books.d.ts.map +1 -0
- package/dist/modules/account/books.js +150 -0
- package/dist/modules/account/books.js.map +1 -0
- package/dist/modules/account/cash-receivables.d.ts +3 -0
- package/dist/modules/account/cash-receivables.d.ts.map +1 -0
- package/dist/modules/account/cash-receivables.js +1087 -0
- package/dist/modules/account/cash-receivables.js.map +1 -0
- package/dist/modules/account/close.d.ts +4 -0
- package/dist/modules/account/close.d.ts.map +1 -0
- package/dist/modules/account/close.js +343 -0
- package/dist/modules/account/close.js.map +1 -0
- package/dist/modules/account/date.d.ts +21 -0
- package/dist/modules/account/date.d.ts.map +1 -0
- package/dist/modules/account/date.js +70 -0
- package/dist/modules/account/date.js.map +1 -0
- package/dist/modules/account/functions.d.ts +131 -3
- package/dist/modules/account/functions.d.ts.map +1 -1
- package/dist/modules/account/functions.js +2570 -389
- package/dist/modules/account/functions.js.map +1 -1
- package/dist/modules/account/index.d.ts +1 -2
- package/dist/modules/account/index.d.ts.map +1 -1
- package/dist/modules/account/index.js +403 -8
- package/dist/modules/account/index.js.map +1 -1
- package/dist/modules/account/models.d.ts.map +1 -1
- package/dist/modules/account/models.js +748 -0
- package/dist/modules/account/models.js.map +1 -1
- package/dist/modules/account/money.d.ts +60 -0
- package/dist/modules/account/money.d.ts.map +1 -0
- package/dist/modules/account/money.js +237 -0
- package/dist/modules/account/money.js.map +1 -0
- package/dist/modules/account/open-items.d.ts +3 -0
- package/dist/modules/account/open-items.d.ts.map +1 -0
- package/dist/modules/account/open-items.js +390 -0
- package/dist/modules/account/open-items.js.map +1 -0
- package/dist/modules/account/opening.d.ts +3 -0
- package/dist/modules/account/opening.d.ts.map +1 -0
- package/dist/modules/account/opening.js +323 -0
- package/dist/modules/account/opening.js.map +1 -0
- package/dist/modules/account/period.d.ts +21 -0
- package/dist/modules/account/period.d.ts.map +1 -0
- package/dist/modules/account/period.js +155 -0
- package/dist/modules/account/period.js.map +1 -0
- package/dist/modules/account/relations.d.ts.map +1 -1
- package/dist/modules/account/relations.js +46 -0
- package/dist/modules/account/relations.js.map +1 -1
- package/dist/modules/account/reports.d.ts +4 -0
- package/dist/modules/account/reports.d.ts.map +1 -0
- package/dist/modules/account/reports.js +125 -0
- package/dist/modules/account/reports.js.map +1 -0
- package/dist/modules/account/setup.d.ts +3 -1
- package/dist/modules/account/setup.d.ts.map +1 -1
- package/dist/modules/account/setup.js +45 -160
- package/dist/modules/account/setup.js.map +1 -1
- package/dist/modules/account_activity_backend/index.d.ts.map +1 -1
- package/dist/modules/account_activity_backend/index.js +0 -1
- package/dist/modules/account_activity_backend/index.js.map +1 -1
- package/dist/modules/account_backend/index.js +3339 -494
- package/dist/modules/account_backend/index.js.map +1 -1
- package/dist/modules/account_backend/overview.d.ts +92 -0
- package/dist/modules/account_backend/overview.d.ts.map +1 -0
- package/dist/modules/account_backend/overview.js +257 -0
- package/dist/modules/account_backend/overview.js.map +1 -0
- package/dist/modules/account_backend/relation-control.d.ts +48 -0
- package/dist/modules/account_backend/relation-control.d.ts.map +1 -0
- package/dist/modules/account_backend/relation-control.js +67 -0
- package/dist/modules/account_backend/relation-control.js.map +1 -0
- package/dist/modules/account_backend/screens/account-defaults.d.ts +28 -0
- package/dist/modules/account_backend/screens/account-defaults.d.ts.map +1 -0
- package/dist/modules/account_backend/screens/account-defaults.js +60 -0
- package/dist/modules/account_backend/screens/account-defaults.js.map +1 -0
- package/dist/modules/account_backend/screens/account-form.d.ts +16 -0
- package/dist/modules/account_backend/screens/account-form.d.ts.map +1 -0
- package/dist/modules/account_backend/screens/account-form.js +53 -0
- package/dist/modules/account_backend/screens/account-form.js.map +1 -0
- package/dist/modules/account_backend/screens/accounting-books.d.ts +15 -0
- package/dist/modules/account_backend/screens/accounting-books.d.ts.map +1 -0
- package/dist/modules/account_backend/screens/accounting-books.js +86 -0
- package/dist/modules/account_backend/screens/accounting-books.js.map +1 -0
- package/dist/modules/account_backend/screens/accounts-list.d.ts +50 -0
- package/dist/modules/account_backend/screens/accounts-list.d.ts.map +1 -0
- package/dist/modules/account_backend/screens/accounts-list.js +66 -0
- package/dist/modules/account_backend/screens/accounts-list.js.map +1 -0
- package/dist/modules/account_backend/screens/customer-invoice-form.d.ts +13 -0
- package/dist/modules/account_backend/screens/customer-invoice-form.d.ts.map +1 -0
- package/dist/modules/account_backend/screens/customer-invoice-form.js +20 -0
- package/dist/modules/account_backend/screens/customer-invoice-form.js.map +1 -0
- package/dist/modules/account_backend/screens/customer-invoices-list.d.ts +62 -0
- package/dist/modules/account_backend/screens/customer-invoices-list.d.ts.map +1 -0
- package/dist/modules/account_backend/screens/customer-invoices-list.js +82 -0
- package/dist/modules/account_backend/screens/customer-invoices-list.js.map +1 -0
- package/dist/modules/account_backend/screens/general-ledger.d.ts +24 -0
- package/dist/modules/account_backend/screens/general-ledger.d.ts.map +1 -0
- package/dist/modules/account_backend/screens/general-ledger.js +73 -0
- package/dist/modules/account_backend/screens/general-ledger.js.map +1 -0
- package/dist/modules/account_backend/screens/index.d.ts +27 -0
- package/dist/modules/account_backend/screens/index.d.ts.map +1 -0
- package/dist/modules/account_backend/screens/index.js +27 -0
- package/dist/modules/account_backend/screens/index.js.map +1 -0
- package/dist/modules/account_backend/screens/journal-entries-list.d.ts +48 -0
- package/dist/modules/account_backend/screens/journal-entries-list.d.ts.map +1 -0
- package/dist/modules/account_backend/screens/journal-entries-list.js +58 -0
- package/dist/modules/account_backend/screens/journal-entries-list.js.map +1 -0
- package/dist/modules/account_backend/screens/journal-entry-create.d.ts +14 -0
- package/dist/modules/account_backend/screens/journal-entry-create.d.ts.map +1 -0
- package/dist/modules/account_backend/screens/journal-entry-create.js +41 -0
- package/dist/modules/account_backend/screens/journal-entry-create.js.map +1 -0
- package/dist/modules/account_backend/screens/journal-form.d.ts +15 -0
- package/dist/modules/account_backend/screens/journal-form.d.ts.map +1 -0
- package/dist/modules/account_backend/screens/journal-form.js +53 -0
- package/dist/modules/account_backend/screens/journal-form.js.map +1 -0
- package/dist/modules/account_backend/screens/journals-list.d.ts +51 -0
- package/dist/modules/account_backend/screens/journals-list.d.ts.map +1 -0
- package/dist/modules/account_backend/screens/journals-list.js +70 -0
- package/dist/modules/account_backend/screens/journals-list.js.map +1 -0
- package/dist/modules/account_backend/screens/move-detail.d.ts +26 -0
- package/dist/modules/account_backend/screens/move-detail.d.ts.map +1 -0
- package/dist/modules/account_backend/screens/move-detail.js +130 -0
- package/dist/modules/account_backend/screens/move-detail.js.map +1 -0
- package/dist/modules/account_backend/screens/opening-balances.d.ts +28 -0
- package/dist/modules/account_backend/screens/opening-balances.d.ts.map +1 -0
- package/dist/modules/account_backend/screens/opening-balances.js +96 -0
- package/dist/modules/account_backend/screens/opening-balances.js.map +1 -0
- package/dist/modules/account_backend/screens/overview.d.ts +62 -0
- package/dist/modules/account_backend/screens/overview.d.ts.map +1 -0
- package/dist/modules/account_backend/screens/overview.js +215 -0
- package/dist/modules/account_backend/screens/overview.js.map +1 -0
- package/dist/modules/account_backend/screens/partner-statement.d.ts +26 -0
- package/dist/modules/account_backend/screens/partner-statement.d.ts.map +1 -0
- package/dist/modules/account_backend/screens/partner-statement.js +82 -0
- package/dist/modules/account_backend/screens/partner-statement.js.map +1 -0
- package/dist/modules/account_backend/screens/payment-form.d.ts +14 -0
- package/dist/modules/account_backend/screens/payment-form.d.ts.map +1 -0
- package/dist/modules/account_backend/screens/payment-form.js +21 -0
- package/dist/modules/account_backend/screens/payment-form.js.map +1 -0
- package/dist/modules/account_backend/screens/payment-term-form.d.ts +25 -0
- package/dist/modules/account_backend/screens/payment-term-form.d.ts.map +1 -0
- package/dist/modules/account_backend/screens/payment-term-form.js +96 -0
- package/dist/modules/account_backend/screens/payment-term-form.js.map +1 -0
- package/dist/modules/account_backend/screens/payment-terms-list.d.ts +23 -0
- package/dist/modules/account_backend/screens/payment-terms-list.d.ts.map +1 -0
- package/dist/modules/account_backend/screens/payment-terms-list.js +104 -0
- package/dist/modules/account_backend/screens/payment-terms-list.js.map +1 -0
- package/dist/modules/account_backend/screens/payments-list.d.ts +62 -0
- package/dist/modules/account_backend/screens/payments-list.d.ts.map +1 -0
- package/dist/modules/account_backend/screens/payments-list.js +71 -0
- package/dist/modules/account_backend/screens/payments-list.js.map +1 -0
- package/dist/modules/account_backend/screens/period-closes.d.ts +21 -0
- package/dist/modules/account_backend/screens/period-closes.d.ts.map +1 -0
- package/dist/modules/account_backend/screens/period-closes.js +123 -0
- package/dist/modules/account_backend/screens/period-closes.js.map +1 -0
- package/dist/modules/account_backend/screens/shared.d.ts +16 -0
- package/dist/modules/account_backend/screens/shared.d.ts.map +1 -0
- package/dist/modules/account_backend/screens/shared.js +15 -0
- package/dist/modules/account_backend/screens/shared.js.map +1 -0
- package/dist/modules/account_backend/screens/tax-form.d.ts +14 -0
- package/dist/modules/account_backend/screens/tax-form.d.ts.map +1 -0
- package/dist/modules/account_backend/screens/tax-form.js +25 -0
- package/dist/modules/account_backend/screens/tax-form.js.map +1 -0
- package/dist/modules/account_backend/screens/taxes-list.d.ts +55 -0
- package/dist/modules/account_backend/screens/taxes-list.d.ts.map +1 -0
- package/dist/modules/account_backend/screens/taxes-list.js +83 -0
- package/dist/modules/account_backend/screens/taxes-list.js.map +1 -0
- package/dist/modules/account_backend/screens/trial-balance.d.ts +19 -0
- package/dist/modules/account_backend/screens/trial-balance.d.ts.map +1 -0
- package/dist/modules/account_backend/screens/trial-balance.js +75 -0
- package/dist/modules/account_backend/screens/trial-balance.js.map +1 -0
- package/dist/modules/account_backend/screens/vendor-bill-form.d.ts +13 -0
- package/dist/modules/account_backend/screens/vendor-bill-form.d.ts.map +1 -0
- package/dist/modules/account_backend/screens/vendor-bill-form.js +20 -0
- package/dist/modules/account_backend/screens/vendor-bill-form.js.map +1 -0
- package/dist/modules/account_backend/screens/vendor-bills-list.d.ts +62 -0
- package/dist/modules/account_backend/screens/vendor-bills-list.d.ts.map +1 -0
- package/dist/modules/account_backend/screens/vendor-bills-list.js +84 -0
- package/dist/modules/account_backend/screens/vendor-bills-list.js.map +1 -0
- package/dist/modules/account_mail_backend/index.d.ts.map +1 -1
- package/dist/modules/account_mail_backend/index.js +0 -1
- package/dist/modules/account_mail_backend/index.js.map +1 -1
- package/dist/modules/account_partner/index.js +0 -2
- package/dist/modules/account_partner/index.js.map +1 -1
- package/dist/modules/account_partner_backend/index.d.ts +1 -1
- package/dist/modules/account_partner_backend/index.d.ts.map +1 -1
- package/dist/modules/account_partner_backend/index.js +2 -3
- package/dist/modules/account_partner_backend/index.js.map +1 -1
- package/dist/modules/account_partner_backend/routes.d.ts.map +1 -1
- package/dist/modules/account_partner_backend/routes.js +19 -25
- package/dist/modules/account_partner_backend/routes.js.map +1 -1
- package/dist/modules/account_partner_backend/screens/accounting-terms.d.ts +20 -0
- package/dist/modules/account_partner_backend/screens/accounting-terms.d.ts.map +1 -0
- package/dist/modules/account_partner_backend/screens/accounting-terms.js +63 -0
- package/dist/modules/account_partner_backend/screens/accounting-terms.js.map +1 -0
- package/dist/modules/account_partner_backend/screens/index.d.ts +2 -0
- package/dist/modules/account_partner_backend/screens/index.d.ts.map +1 -0
- package/dist/modules/account_partner_backend/screens/index.js +2 -0
- package/dist/modules/account_partner_backend/screens/index.js.map +1 -0
- package/dist/modules/account_staff_channel/channel-routes.d.ts +2 -0
- package/dist/modules/account_staff_channel/channel-routes.d.ts.map +1 -0
- package/dist/modules/account_staff_channel/channel-routes.js +776 -0
- package/dist/modules/account_staff_channel/channel-routes.js.map +1 -0
- package/dist/modules/account_staff_channel/functions.d.ts.map +1 -0
- package/dist/modules/account_staff_channel/functions.js +143 -0
- package/dist/modules/account_staff_channel/functions.js.map +1 -0
- package/dist/modules/account_staff_channel/index.d.ts +5 -0
- package/dist/modules/account_staff_channel/index.d.ts.map +1 -0
- package/dist/modules/account_staff_channel/index.js +42 -0
- package/dist/modules/account_staff_channel/index.js.map +1 -0
- package/dist/modules/account_staff_channel/models.d.ts.map +1 -0
- package/dist/modules/account_staff_channel/models.js +30 -0
- package/dist/modules/account_staff_channel/models.js.map +1 -0
- package/dist/modules/activity/index.d.ts.map +1 -1
- package/dist/modules/activity/index.js +0 -1
- package/dist/modules/activity/index.js.map +1 -1
- package/dist/modules/activity_backend/index.d.ts +1 -1
- package/dist/modules/activity_backend/index.d.ts.map +1 -1
- package/dist/modules/activity_backend/index.js +3 -12
- package/dist/modules/activity_backend/index.js.map +1 -1
- package/dist/modules/activity_backend/routes.d.ts.map +1 -1
- package/dist/modules/activity_backend/routes.js +36 -22
- package/dist/modules/activity_backend/routes.js.map +1 -1
- package/dist/modules/activity_backend/screens/activities-list.d.ts +15 -0
- package/dist/modules/activity_backend/screens/activities-list.d.ts.map +1 -0
- package/dist/modules/activity_backend/screens/activities-list.js +40 -0
- package/dist/modules/activity_backend/screens/activities-list.js.map +1 -0
- package/dist/modules/activity_backend/screens/index.d.ts +2 -0
- package/dist/modules/activity_backend/screens/index.d.ts.map +1 -0
- package/dist/modules/activity_backend/screens/index.js +2 -0
- package/dist/modules/activity_backend/screens/index.js.map +1 -0
- package/dist/modules/address/data/VN/NOTICE.md +1 -1
- package/dist/modules/address/index.d.ts.map +1 -1
- package/dist/modules/address/index.js +0 -1
- package/dist/modules/address/index.js.map +1 -1
- package/dist/modules/address_backend/index.d.ts +1 -1
- package/dist/modules/address_backend/index.d.ts.map +1 -1
- package/dist/modules/address_backend/index.js +1 -3
- 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 +20 -27
- package/dist/modules/address_backend/routes.js.map +1 -1
- package/dist/modules/address_backend/screens/catalogs-list.d.ts +14 -0
- package/dist/modules/address_backend/screens/catalogs-list.d.ts.map +1 -0
- package/dist/modules/address_backend/screens/catalogs-list.js +38 -0
- package/dist/modules/address_backend/screens/catalogs-list.js.map +1 -0
- package/dist/modules/address_backend/screens/country-browser.d.ts +12 -0
- package/dist/modules/address_backend/screens/country-browser.d.ts.map +1 -0
- package/dist/modules/address_backend/screens/country-browser.js +74 -0
- package/dist/modules/address_backend/screens/country-browser.js.map +1 -0
- package/dist/modules/address_backend/screens/index.d.ts +4 -0
- package/dist/modules/address_backend/screens/index.d.ts.map +1 -0
- package/dist/modules/address_backend/screens/index.js +3 -0
- package/dist/modules/address_backend/screens/index.js.map +1 -0
- package/dist/modules/address_backend/screens/types.d.ts +20 -0
- package/dist/modules/address_backend/screens/types.d.ts.map +1 -0
- package/dist/modules/address_backend/screens/types.js.map +1 -0
- package/dist/modules/attendance/channel-routes.d.ts +2 -0
- package/dist/modules/attendance/channel-routes.d.ts.map +1 -0
- package/dist/modules/attendance/channel-routes.js +223 -0
- package/dist/modules/attendance/channel-routes.js.map +1 -0
- package/dist/modules/attendance/functions.d.ts.map +1 -1
- package/dist/modules/attendance/functions.js +171 -22
- package/dist/modules/attendance/functions.js.map +1 -1
- package/dist/modules/attendance/index.d.ts.map +1 -1
- package/dist/modules/attendance/index.js +4 -2
- package/dist/modules/attendance/index.js.map +1 -1
- package/dist/modules/attendance/messages.d.ts +6 -0
- package/dist/modules/attendance/messages.d.ts.map +1 -1
- package/dist/modules/attendance/messages.js +6 -0
- package/dist/modules/attendance/messages.js.map +1 -1
- package/dist/modules/attendance/models.d.ts.map +1 -1
- package/dist/modules/attendance/models.js +1 -0
- package/dist/modules/attendance/models.js.map +1 -1
- package/dist/modules/attendance_backend/index.d.ts +3 -1
- package/dist/modules/attendance_backend/index.d.ts.map +1 -1
- package/dist/modules/attendance_backend/index.js +65 -4
- package/dist/modules/attendance_backend/index.js.map +1 -1
- package/dist/modules/attendance_backend/routes.d.ts.map +1 -1
- package/dist/modules/attendance_backend/routes.js +240 -53
- package/dist/modules/attendance_backend/routes.js.map +1 -1
- package/dist/modules/attendance_backend/screens/credentials.d.ts +32 -0
- package/dist/modules/attendance_backend/screens/credentials.d.ts.map +1 -0
- package/dist/modules/attendance_backend/screens/credentials.js +84 -0
- package/dist/modules/attendance_backend/screens/credentials.js.map +1 -0
- package/dist/modules/attendance_backend/screens/index.d.ts +4 -0
- package/dist/modules/attendance_backend/screens/index.d.ts.map +1 -0
- package/dist/modules/attendance_backend/screens/index.js +4 -0
- package/dist/modules/attendance_backend/screens/index.js.map +1 -0
- package/dist/modules/attendance_backend/screens/my-work.d.ts +35 -0
- package/dist/modules/attendance_backend/screens/my-work.d.ts.map +1 -0
- package/dist/modules/attendance_backend/screens/my-work.js +189 -0
- package/dist/modules/attendance_backend/screens/my-work.js.map +1 -0
- package/dist/modules/attendance_backend/screens/period.d.ts +22 -0
- package/dist/modules/attendance_backend/screens/period.d.ts.map +1 -0
- package/dist/modules/attendance_backend/screens/period.js +85 -0
- package/dist/modules/attendance_backend/screens/period.js.map +1 -0
- package/dist/modules/attendance_backend/screens.d.ts +0 -4
- package/dist/modules/attendance_backend/screens.d.ts.map +1 -1
- package/dist/modules/attendance_backend/screens.js +1 -209
- package/dist/modules/attendance_backend/screens.js.map +1 -1
- package/dist/modules/backend/catalogue.d.ts.map +1 -1
- package/dist/modules/backend/catalogue.js +53 -115
- package/dist/modules/backend/catalogue.js.map +1 -1
- package/dist/modules/backend/chart.d.ts +42 -0
- package/dist/modules/backend/chart.d.ts.map +1 -0
- package/dist/modules/backend/chart.js +39 -0
- package/dist/modules/backend/chart.js.map +1 -0
- package/dist/modules/backend/design/HANDOFF.md +118 -38
- package/dist/modules/backend/design/auth.css +463 -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/charts.css +229 -0
- package/dist/modules/backend/design/client/chart.d.mts +31 -0
- package/dist/modules/backend/design/client/chart.d.mts.map +1 -0
- package/dist/modules/backend/design/client/chart.mjs +23 -0
- package/dist/modules/backend/design/client/chart.mjs.map +7 -0
- package/dist/modules/backend/design/client/relation-select.d.mts +6 -1
- package/dist/modules/backend/design/client/relation-select.d.mts.map +1 -1
- package/dist/modules/backend/design/client/relation-select.mjs +2 -7
- package/dist/modules/backend/design/client/relation-select.mjs.map +7 -1
- package/dist/modules/backend/design/client/table-selection.d.mts +7 -0
- package/dist/modules/backend/design/client/table-selection.d.mts.map +1 -0
- package/dist/modules/backend/design/client/table-selection.mjs +2 -0
- package/dist/modules/backend/design/client/table-selection.mjs.map +7 -0
- package/dist/modules/backend/design/content.css +809 -0
- package/dist/modules/backend/design/controls.css +451 -0
- package/dist/modules/backend/design/design-system.css +2 -0
- package/dist/modules/backend/design/forms.css +1156 -0
- package/dist/modules/backend/design/foundation.css +423 -0
- package/dist/modules/backend/design/lists.css +1462 -0
- package/dist/modules/backend/design/record.css +526 -0
- package/dist/modules/backend/design/responsive.css +326 -0
- package/dist/modules/backend/design/tokens.css +317 -92
- package/dist/modules/backend/forms.d.ts +38 -1
- package/dist/modules/backend/forms.d.ts.map +1 -1
- package/dist/modules/backend/forms.js +29 -0
- package/dist/modules/backend/forms.js.map +1 -1
- package/dist/modules/backend/index.d.ts +14 -6
- package/dist/modules/backend/index.d.ts.map +1 -1
- package/dist/modules/backend/index.js +33 -16
- package/dist/modules/backend/index.js.map +1 -1
- package/dist/modules/backend/islands.d.ts.map +1 -1
- package/dist/modules/backend/islands.js +22 -4
- package/dist/modules/backend/islands.js.map +1 -1
- package/dist/modules/backend/joints.d.ts +1 -1
- package/dist/modules/backend/joints.d.ts.map +1 -1
- package/dist/modules/backend/joints.js +14 -6
- package/dist/modules/backend/joints.js.map +1 -1
- package/dist/modules/backend/list-search.d.ts +33 -0
- package/dist/modules/backend/list-search.d.ts.map +1 -0
- package/dist/modules/backend/list-search.js +232 -0
- package/dist/modules/backend/list-search.js.map +1 -0
- package/dist/modules/backend/menus.d.ts.map +1 -1
- package/dist/modules/backend/menus.js +3 -12
- package/dist/modules/backend/menus.js.map +1 -1
- package/dist/modules/backend/messages.d.ts +1 -1
- package/dist/modules/backend/messages.d.ts.map +1 -1
- package/dist/modules/backend/messages.js +86 -35
- package/dist/modules/backend/messages.js.map +1 -1
- package/dist/modules/backend/paging.d.ts +1 -1
- package/dist/modules/backend/paging.d.ts.map +1 -1
- package/dist/modules/backend/paging.js +1 -1
- package/dist/modules/backend/paging.js.map +1 -1
- package/dist/modules/backend/relation-select.d.ts +2 -57
- package/dist/modules/backend/relation-select.d.ts.map +1 -1
- package/dist/modules/backend/relation-select.js +2 -0
- package/dist/modules/backend/relation-select.js.map +1 -1
- package/dist/modules/backend/routes.d.ts +1 -8
- package/dist/modules/backend/routes.d.ts.map +1 -1
- package/dist/modules/backend/routes.js +36 -111
- package/dist/modules/backend/routes.js.map +1 -1
- package/dist/modules/backend/screen.d.ts +130 -0
- package/dist/modules/backend/screen.d.ts.map +1 -0
- package/dist/modules/backend/screen.js +205 -0
- package/dist/modules/backend/screen.js.map +1 -0
- package/dist/modules/backend/screens.d.ts +11 -14
- package/dist/modules/backend/screens.d.ts.map +1 -1
- package/dist/modules/backend/screens.js +13 -70
- package/dist/modules/backend/screens.js.map +1 -1
- package/dist/modules/business_report_staff_channel/channel-routes.d.ts +2 -0
- package/dist/modules/business_report_staff_channel/channel-routes.d.ts.map +1 -0
- package/dist/modules/business_report_staff_channel/channel-routes.js +438 -0
- package/dist/modules/business_report_staff_channel/channel-routes.js.map +1 -0
- package/dist/modules/business_report_staff_channel/index.d.ts +5 -0
- package/dist/modules/business_report_staff_channel/index.d.ts.map +1 -0
- package/dist/modules/business_report_staff_channel/index.js +18 -0
- package/dist/modules/business_report_staff_channel/index.js.map +1 -0
- package/dist/modules/calendar/index.d.ts.map +1 -1
- package/dist/modules/calendar/index.js +0 -1
- package/dist/modules/calendar/index.js.map +1 -1
- package/dist/modules/calendar/recurrence.d.ts.map +1 -1
- package/dist/modules/calendar/recurrence.js +3 -11
- package/dist/modules/calendar/recurrence.js.map +1 -1
- package/dist/modules/calendar_activity/index.d.ts.map +1 -1
- package/dist/modules/calendar_activity/index.js +0 -2
- package/dist/modules/calendar_activity/index.js.map +1 -1
- package/dist/modules/calendar_backend/index.d.ts +1 -1
- package/dist/modules/calendar_backend/index.d.ts.map +1 -1
- package/dist/modules/calendar_backend/index.js +1 -3
- package/dist/modules/calendar_backend/index.js.map +1 -1
- package/dist/modules/calendar_backend/routes.d.ts.map +1 -1
- package/dist/modules/calendar_backend/routes.js +10 -22
- package/dist/modules/calendar_backend/routes.js.map +1 -1
- package/dist/modules/calendar_backend/screens/calendar.d.ts +5 -0
- package/dist/modules/calendar_backend/screens/calendar.d.ts.map +1 -0
- package/dist/modules/calendar_backend/screens/calendar.js +10 -0
- package/dist/modules/calendar_backend/screens/calendar.js.map +1 -0
- package/dist/modules/calendar_backend/screens/index.d.ts +2 -0
- package/dist/modules/calendar_backend/screens/index.d.ts.map +1 -0
- package/dist/modules/calendar_backend/screens/index.js +2 -0
- package/dist/modules/calendar_backend/screens/index.js.map +1 -0
- package/dist/modules/calendar_mail_transport/index.d.ts.map +1 -1
- package/dist/modules/calendar_mail_transport/index.js +0 -2
- package/dist/modules/calendar_mail_transport/index.js.map +1 -1
- package/dist/modules/channel_api/core.d.ts +283 -0
- package/dist/modules/channel_api/core.d.ts.map +1 -0
- package/dist/modules/channel_api/core.js +615 -0
- package/dist/modules/channel_api/core.js.map +1 -0
- package/dist/modules/channel_api/customer.d.ts +21 -0
- package/dist/modules/channel_api/customer.d.ts.map +1 -0
- package/dist/modules/channel_api/customer.js +368 -0
- package/dist/modules/channel_api/customer.js.map +1 -0
- package/dist/modules/channel_api/index.d.ts +6 -0
- package/dist/modules/channel_api/index.d.ts.map +1 -0
- package/dist/modules/channel_api/index.js +66 -0
- package/dist/modules/channel_api/index.js.map +1 -0
- package/dist/modules/channel_api/openapi.d.ts +17 -0
- package/dist/modules/channel_api/openapi.d.ts.map +1 -0
- package/dist/modules/channel_api/openapi.js +105 -0
- package/dist/modules/channel_api/openapi.js.map +1 -0
- package/dist/modules/channel_api/staff.d.ts +7 -0
- package/dist/modules/channel_api/staff.d.ts.map +1 -0
- package/dist/modules/channel_api/staff.js +209 -0
- package/dist/modules/channel_api/staff.js.map +1 -0
- package/dist/modules/company/functions.d.ts.map +1 -1
- package/dist/modules/company/functions.js +93 -12
- package/dist/modules/company/functions.js.map +1 -1
- package/dist/modules/company/index.js +3 -3
- package/dist/modules/company/index.js.map +1 -1
- package/dist/modules/company/messages.d.ts +8 -0
- package/dist/modules/company/messages.d.ts.map +1 -1
- package/dist/modules/company/messages.js +8 -0
- package/dist/modules/company/messages.js.map +1 -1
- package/dist/modules/company/models.d.ts +2 -2
- package/dist/modules/company/models.d.ts.map +1 -1
- package/dist/modules/company/models.js +12 -2
- package/dist/modules/company/models.js.map +1 -1
- package/dist/modules/company_backend/index.d.ts +2 -1
- package/dist/modules/company_backend/index.d.ts.map +1 -1
- package/dist/modules/company_backend/index.js +25 -4
- 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 +314 -96
- package/dist/modules/company_backend/routes.js.map +1 -1
- package/dist/modules/company_backend/screens/branch-form.d.ts +18 -0
- package/dist/modules/company_backend/screens/branch-form.d.ts.map +1 -0
- package/dist/modules/company_backend/screens/branch-form.js +63 -0
- package/dist/modules/company_backend/screens/branch-form.js.map +1 -0
- package/dist/modules/company_backend/screens/companies-list.d.ts +18 -0
- package/dist/modules/company_backend/screens/companies-list.d.ts.map +1 -0
- package/dist/modules/company_backend/screens/companies-list.js +49 -0
- package/dist/modules/company_backend/screens/companies-list.js.map +1 -0
- package/dist/modules/company_backend/screens/company-form.d.ts +25 -0
- package/dist/modules/company_backend/screens/company-form.d.ts.map +1 -0
- package/dist/modules/company_backend/screens/company-form.js +159 -0
- package/dist/modules/company_backend/screens/company-form.js.map +1 -0
- package/dist/modules/company_backend/screens/context.d.ts +30 -0
- package/dist/modules/company_backend/screens/context.d.ts.map +1 -0
- package/dist/modules/company_backend/screens/context.js +48 -0
- package/dist/modules/company_backend/screens/context.js.map +1 -0
- package/dist/modules/company_backend/screens/hierarchy.d.ts +16 -0
- package/dist/modules/company_backend/screens/hierarchy.d.ts.map +1 -0
- package/dist/modules/company_backend/screens/hierarchy.js +41 -0
- package/dist/modules/company_backend/screens/hierarchy.js.map +1 -0
- package/dist/modules/company_backend/screens/index.d.ts +7 -0
- package/dist/modules/company_backend/screens/index.d.ts.map +1 -0
- package/dist/modules/company_backend/screens/index.js +6 -0
- package/dist/modules/company_backend/screens/index.js.map +1 -0
- package/dist/modules/company_backend/screens/types.d.ts +22 -0
- package/dist/modules/company_backend/screens/types.d.ts.map +1 -0
- package/dist/modules/company_backend/screens/types.js +2 -0
- package/dist/modules/company_backend/screens/types.js.map +1 -0
- package/dist/modules/crm/functions.d.ts +1 -1
- package/dist/modules/crm/functions.d.ts.map +1 -1
- package/dist/modules/crm/functions.js +534 -75
- package/dist/modules/crm/functions.js.map +1 -1
- package/dist/modules/crm/index.d.ts +2 -1
- package/dist/modules/crm/index.d.ts.map +1 -1
- package/dist/modules/crm/index.js +3 -4
- package/dist/modules/crm/index.js.map +1 -1
- package/dist/modules/crm/jobs.d.ts +10 -0
- package/dist/modules/crm/jobs.d.ts.map +1 -1
- package/dist/modules/crm/jobs.js +50 -1
- package/dist/modules/crm/jobs.js.map +1 -1
- package/dist/modules/crm/messages.d.ts +14 -1
- package/dist/modules/crm/messages.d.ts.map +1 -1
- package/dist/modules/crm/messages.js +26 -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 +25 -0
- package/dist/modules/crm/models.js.map +1 -1
- package/dist/modules/crm/operations.d.ts +110 -1
- package/dist/modules/crm/operations.d.ts.map +1 -1
- package/dist/modules/crm/operations.js +612 -84
- package/dist/modules/crm/operations.js.map +1 -1
- package/dist/modules/crm_backend/client/crm-kanban-view.d.mts.map +1 -1
- package/dist/modules/crm_backend/client/crm-kanban-view.mjs +132 -32
- package/dist/modules/crm_backend/client/crm-kanban-view.mjs.map +1 -1
- package/dist/modules/crm_backend/client/crm.css +398 -63
- package/dist/modules/crm_backend/index.d.ts.map +1 -1
- package/dist/modules/crm_backend/index.js +12 -4
- package/dist/modules/crm_backend/index.js.map +1 -1
- package/dist/modules/crm_backend/messages.d.ts +212 -0
- package/dist/modules/crm_backend/messages.d.ts.map +1 -1
- package/dist/modules/crm_backend/messages.js +212 -0
- package/dist/modules/crm_backend/messages.js.map +1 -1
- package/dist/modules/crm_backend/relation-control.d.ts +51 -0
- package/dist/modules/crm_backend/relation-control.d.ts.map +1 -0
- package/dist/modules/crm_backend/relation-control.js +107 -0
- package/dist/modules/crm_backend/relation-control.js.map +1 -0
- package/dist/modules/crm_backend/routes.d.ts.map +1 -1
- package/dist/modules/crm_backend/routes.js +1068 -260
- package/dist/modules/crm_backend/routes.js.map +1 -1
- package/dist/modules/crm_backend/screens/activity-planner.d.ts +22 -0
- package/dist/modules/crm_backend/screens/activity-planner.d.ts.map +1 -0
- package/dist/modules/crm_backend/screens/activity-planner.js +159 -0
- package/dist/modules/crm_backend/screens/activity-planner.js.map +1 -0
- package/dist/modules/crm_backend/screens/case-create.d.ts +15 -0
- package/dist/modules/crm_backend/screens/case-create.d.ts.map +1 -0
- package/dist/modules/crm_backend/screens/case-create.js +19 -0
- package/dist/modules/crm_backend/screens/case-create.js.map +1 -0
- package/dist/modules/crm_backend/screens/case-detail.d.ts +46 -0
- package/dist/modules/crm_backend/screens/case-detail.d.ts.map +1 -0
- package/dist/modules/crm_backend/screens/case-detail.js +506 -0
- package/dist/modules/crm_backend/screens/case-detail.js.map +1 -0
- package/dist/modules/crm_backend/screens/cases-list.d.ts +16 -0
- package/dist/modules/crm_backend/screens/cases-list.d.ts.map +1 -0
- package/dist/modules/crm_backend/screens/cases-list.js +86 -0
- package/dist/modules/crm_backend/screens/cases-list.js.map +1 -0
- package/dist/modules/crm_backend/screens/configuration.d.ts +28 -0
- package/dist/modules/crm_backend/screens/configuration.d.ts.map +1 -0
- package/dist/modules/crm_backend/screens/configuration.js +115 -0
- package/dist/modules/crm_backend/screens/configuration.js.map +1 -0
- package/dist/modules/crm_backend/screens/index.d.ts +14 -0
- package/dist/modules/crm_backend/screens/index.d.ts.map +1 -0
- package/dist/modules/crm_backend/screens/index.js +8 -0
- package/dist/modules/crm_backend/screens/index.js.map +1 -0
- package/dist/modules/crm_backend/screens/leaderboard.d.ts +12 -0
- package/dist/modules/crm_backend/screens/leaderboard.d.ts.map +1 -0
- package/dist/modules/crm_backend/screens/leaderboard.js +89 -0
- package/dist/modules/crm_backend/screens/leaderboard.js.map +1 -0
- package/dist/modules/crm_backend/screens/pipeline.d.ts +21 -0
- package/dist/modules/crm_backend/screens/pipeline.d.ts.map +1 -0
- package/dist/modules/crm_backend/screens/pipeline.js +22 -0
- package/dist/modules/crm_backend/screens/pipeline.js.map +1 -0
- package/dist/modules/crm_sale/index.d.ts.map +1 -1
- package/dist/modules/crm_sale/index.js +3 -4
- package/dist/modules/crm_sale/index.js.map +1 -1
- package/dist/modules/crm_sale/messages.d.ts +3 -1
- package/dist/modules/crm_sale/messages.d.ts.map +1 -1
- package/dist/modules/crm_sale/messages.js +4 -0
- package/dist/modules/crm_sale/messages.js.map +1 -1
- package/dist/modules/crm_sale/sale-functions.d.ts +8 -1
- package/dist/modules/crm_sale/sale-functions.d.ts.map +1 -1
- package/dist/modules/crm_sale/sale-functions.js +184 -55
- package/dist/modules/crm_sale/sale-functions.js.map +1 -1
- package/dist/modules/crm_staff_channel/channel-routes.d.ts +2 -0
- package/dist/modules/crm_staff_channel/channel-routes.d.ts.map +1 -0
- package/dist/modules/crm_staff_channel/channel-routes.js +777 -0
- package/dist/modules/crm_staff_channel/channel-routes.js.map +1 -0
- package/dist/modules/crm_staff_channel/index.d.ts +5 -0
- package/dist/modules/crm_staff_channel/index.d.ts.map +1 -0
- package/dist/modules/crm_staff_channel/index.js +30 -0
- package/dist/modules/crm_staff_channel/index.js.map +1 -0
- package/dist/modules/crm_website/functions.d.ts.map +1 -1
- package/dist/modules/crm_website/functions.js +89 -10
- package/dist/modules/crm_website/functions.js.map +1 -1
- package/dist/modules/crm_website/index.js +1 -2
- package/dist/modules/crm_website/index.js.map +1 -1
- package/dist/modules/crm_website/messages.d.ts +4 -1
- package/dist/modules/crm_website/messages.d.ts.map +1 -1
- package/dist/modules/crm_website/messages.js +6 -0
- package/dist/modules/crm_website/messages.js.map +1 -1
- package/dist/modules/crm_website/models.d.ts.map +1 -1
- package/dist/modules/crm_website/models.js +18 -0
- package/dist/modules/crm_website/models.js.map +1 -1
- package/dist/modules/crm_website/routes.d.ts.map +1 -1
- package/dist/modules/crm_website/routes.js +44 -12
- package/dist/modules/crm_website/routes.js.map +1 -1
- package/dist/modules/crm_website/screens.d.ts +7 -1
- package/dist/modules/crm_website/screens.d.ts.map +1 -1
- package/dist/modules/crm_website/screens.js +13 -8
- package/dist/modules/crm_website/screens.js.map +1 -1
- package/dist/modules/flow/functions.d.ts +3 -0
- package/dist/modules/flow/functions.d.ts.map +1 -0
- package/dist/modules/flow/functions.js +1876 -0
- package/dist/modules/flow/functions.js.map +1 -0
- package/dist/modules/flow/index.d.ts +12 -0
- package/dist/modules/flow/index.d.ts.map +1 -0
- package/dist/modules/flow/index.js +30 -0
- package/dist/modules/flow/index.js.map +1 -0
- package/dist/modules/flow/jobs.d.ts +3 -0
- package/dist/modules/flow/jobs.d.ts.map +1 -0
- package/dist/modules/flow/jobs.js +136 -0
- package/dist/modules/flow/jobs.js.map +1 -0
- package/dist/modules/flow/membership.d.ts +72 -0
- package/dist/modules/flow/membership.d.ts.map +1 -0
- package/dist/modules/flow/membership.js +182 -0
- package/dist/modules/flow/membership.js.map +1 -0
- package/dist/modules/flow/messages.d.ts +79 -0
- package/dist/modules/flow/messages.d.ts.map +1 -0
- package/dist/modules/flow/messages.js +152 -0
- package/dist/modules/flow/messages.js.map +1 -0
- package/dist/modules/flow/models.d.ts +3 -0
- package/dist/modules/flow/models.d.ts.map +1 -0
- package/dist/modules/flow/models.js +453 -0
- package/dist/modules/flow/models.js.map +1 -0
- package/dist/modules/flow/operations.d.ts +414 -0
- package/dist/modules/flow/operations.d.ts.map +1 -0
- package/dist/modules/flow/operations.js +1671 -0
- package/dist/modules/flow/operations.js.map +1 -0
- package/dist/modules/flow/pages.d.ts +146 -0
- package/dist/modules/flow/pages.d.ts.map +1 -0
- package/dist/modules/flow/pages.js +394 -0
- package/dist/modules/flow/pages.js.map +1 -0
- package/dist/modules/flow/projects.d.ts +41 -0
- package/dist/modules/flow/projects.d.ts.map +1 -0
- package/dist/modules/flow/projects.js +74 -0
- package/dist/modules/flow/projects.js.map +1 -0
- package/dist/modules/flow/search.d.ts +57 -0
- package/dist/modules/flow/search.d.ts.map +1 -0
- package/dist/modules/flow/search.js +110 -0
- package/dist/modules/flow/search.js.map +1 -0
- package/dist/modules/flow/types.d.ts +17 -0
- package/dist/modules/flow/types.d.ts.map +1 -0
- package/dist/modules/flow/types.js +13 -0
- package/dist/modules/flow/types.js.map +1 -0
- package/dist/modules/flow_backend/functions.d.ts +3 -0
- package/dist/modules/flow_backend/functions.d.ts.map +1 -0
- package/dist/modules/flow_backend/functions.js +162 -0
- package/dist/modules/flow_backend/functions.js.map +1 -0
- package/dist/modules/flow_backend/index.d.ts +3 -0
- package/dist/modules/flow_backend/index.d.ts.map +1 -0
- package/dist/modules/flow_backend/index.js +96 -0
- package/dist/modules/flow_backend/index.js.map +1 -0
- package/dist/modules/flow_backend/islands.d.ts +3 -0
- package/dist/modules/flow_backend/islands.d.ts.map +1 -0
- package/dist/modules/flow_backend/islands.js +31 -0
- package/dist/modules/flow_backend/islands.js.map +1 -0
- package/dist/modules/flow_backend/messages.d.ts +248 -0
- package/dist/modules/flow_backend/messages.d.ts.map +1 -0
- package/dist/modules/flow_backend/messages.js +470 -0
- package/dist/modules/flow_backend/messages.js.map +1 -0
- package/dist/modules/flow_backend/relation-control.d.ts +53 -0
- package/dist/modules/flow_backend/relation-control.d.ts.map +1 -0
- package/dist/modules/flow_backend/relation-control.js +106 -0
- package/dist/modules/flow_backend/relation-control.js.map +1 -0
- package/dist/modules/flow_backend/routes.d.ts +3 -0
- package/dist/modules/flow_backend/routes.d.ts.map +1 -0
- package/dist/modules/flow_backend/routes.js +2519 -0
- package/dist/modules/flow_backend/routes.js.map +1 -0
- package/dist/modules/flow_backend/screens/all-epics.d.ts +19 -0
- package/dist/modules/flow_backend/screens/all-epics.d.ts.map +1 -0
- package/dist/modules/flow_backend/screens/all-epics.js +59 -0
- package/dist/modules/flow_backend/screens/all-epics.js.map +1 -0
- package/dist/modules/flow_backend/screens/all-pages.d.ts +19 -0
- package/dist/modules/flow_backend/screens/all-pages.d.ts.map +1 -0
- package/dist/modules/flow_backend/screens/all-pages.js +65 -0
- package/dist/modules/flow_backend/screens/all-pages.js.map +1 -0
- package/dist/modules/flow_backend/screens/board.d.ts +5 -0
- package/dist/modules/flow_backend/screens/board.d.ts.map +1 -0
- package/dist/modules/flow_backend/screens/board.js +7 -0
- package/dist/modules/flow_backend/screens/board.js.map +1 -0
- package/dist/modules/flow_backend/screens/epic-detail.d.ts +22 -0
- package/dist/modules/flow_backend/screens/epic-detail.d.ts.map +1 -0
- package/dist/modules/flow_backend/screens/epic-detail.js +41 -0
- package/dist/modules/flow_backend/screens/epic-detail.js.map +1 -0
- package/dist/modules/flow_backend/screens/gantt.d.ts +21 -0
- package/dist/modules/flow_backend/screens/gantt.d.ts.map +1 -0
- package/dist/modules/flow_backend/screens/gantt.js +42 -0
- package/dist/modules/flow_backend/screens/gantt.js.map +1 -0
- package/dist/modules/flow_backend/screens/index.d.ts +29 -0
- package/dist/modules/flow_backend/screens/index.d.ts.map +1 -0
- package/dist/modules/flow_backend/screens/index.js +23 -0
- package/dist/modules/flow_backend/screens/index.js.map +1 -0
- package/dist/modules/flow_backend/screens/issue-detail.d.ts +38 -0
- package/dist/modules/flow_backend/screens/issue-detail.d.ts.map +1 -0
- package/dist/modules/flow_backend/screens/issue-detail.js +336 -0
- package/dist/modules/flow_backend/screens/issue-detail.js.map +1 -0
- package/dist/modules/flow_backend/screens/issues.d.ts +34 -0
- package/dist/modules/flow_backend/screens/issues.d.ts.map +1 -0
- package/dist/modules/flow_backend/screens/issues.js +118 -0
- package/dist/modules/flow_backend/screens/issues.js.map +1 -0
- package/dist/modules/flow_backend/screens/map.d.ts +13 -0
- package/dist/modules/flow_backend/screens/map.d.ts.map +1 -0
- package/dist/modules/flow_backend/screens/map.js +16 -0
- package/dist/modules/flow_backend/screens/map.js.map +1 -0
- package/dist/modules/flow_backend/screens/my-work.d.ts +42 -0
- package/dist/modules/flow_backend/screens/my-work.d.ts.map +1 -0
- package/dist/modules/flow_backend/screens/my-work.js +157 -0
- package/dist/modules/flow_backend/screens/my-work.js.map +1 -0
- package/dist/modules/flow_backend/screens/nav.d.ts +3 -0
- package/dist/modules/flow_backend/screens/nav.d.ts.map +1 -0
- package/dist/modules/flow_backend/screens/nav.js +79 -0
- package/dist/modules/flow_backend/screens/nav.js.map +1 -0
- package/dist/modules/flow_backend/screens/page-detail.d.ts +31 -0
- package/dist/modules/flow_backend/screens/page-detail.d.ts.map +1 -0
- package/dist/modules/flow_backend/screens/page-detail.js +113 -0
- package/dist/modules/flow_backend/screens/page-detail.js.map +1 -0
- package/dist/modules/flow_backend/screens/project-create.d.ts +26 -0
- package/dist/modules/flow_backend/screens/project-create.d.ts.map +1 -0
- package/dist/modules/flow_backend/screens/project-create.js +56 -0
- package/dist/modules/flow_backend/screens/project-create.js.map +1 -0
- package/dist/modules/flow_backend/screens/project-epics.d.ts +33 -0
- package/dist/modules/flow_backend/screens/project-epics.d.ts.map +1 -0
- package/dist/modules/flow_backend/screens/project-epics.js +90 -0
- package/dist/modules/flow_backend/screens/project-epics.js.map +1 -0
- package/dist/modules/flow_backend/screens/project-pages.d.ts +34 -0
- package/dist/modules/flow_backend/screens/project-pages.d.ts.map +1 -0
- package/dist/modules/flow_backend/screens/project-pages.js +66 -0
- package/dist/modules/flow_backend/screens/project-pages.js.map +1 -0
- package/dist/modules/flow_backend/screens/project-settings.d.ts +69 -0
- package/dist/modules/flow_backend/screens/project-settings.d.ts.map +1 -0
- package/dist/modules/flow_backend/screens/project-settings.js +248 -0
- package/dist/modules/flow_backend/screens/project-settings.js.map +1 -0
- package/dist/modules/flow_backend/screens/projects-list.d.ts +30 -0
- package/dist/modules/flow_backend/screens/projects-list.d.ts.map +1 -0
- package/dist/modules/flow_backend/screens/projects-list.js +121 -0
- package/dist/modules/flow_backend/screens/projects-list.js.map +1 -0
- package/dist/modules/flow_backend/screens/shared.d.ts +28 -0
- package/dist/modules/flow_backend/screens/shared.d.ts.map +1 -0
- package/dist/modules/flow_backend/screens/shared.js +46 -0
- package/dist/modules/flow_backend/screens/shared.js.map +1 -0
- package/dist/modules/flow_backend/screens/sprints.d.ts +33 -0
- package/dist/modules/flow_backend/screens/sprints.d.ts.map +1 -0
- package/dist/modules/flow_backend/screens/sprints.js +159 -0
- package/dist/modules/flow_backend/screens/sprints.js.map +1 -0
- package/dist/modules/flow_staff_channel/channel-routes.d.ts +2 -0
- package/dist/modules/flow_staff_channel/channel-routes.d.ts.map +1 -0
- package/dist/modules/flow_staff_channel/channel-routes.js +425 -0
- package/dist/modules/flow_staff_channel/channel-routes.js.map +1 -0
- package/dist/modules/flow_staff_channel/index.d.ts +5 -0
- package/dist/modules/flow_staff_channel/index.d.ts.map +1 -0
- package/dist/modules/flow_staff_channel/index.js +30 -0
- package/dist/modules/flow_staff_channel/index.js.map +1 -0
- package/dist/modules/hospitality_billing/functions.d.ts +18 -0
- package/dist/modules/hospitality_billing/functions.d.ts.map +1 -0
- package/dist/modules/hospitality_billing/functions.js +426 -0
- package/dist/modules/hospitality_billing/functions.js.map +1 -0
- package/dist/modules/hospitality_billing/index.d.ts +3 -0
- package/dist/modules/hospitality_billing/index.d.ts.map +1 -0
- package/dist/modules/hospitality_billing/index.js +25 -0
- package/dist/modules/hospitality_billing/index.js.map +1 -0
- package/dist/modules/hospitality_billing/jobs.d.ts +17 -0
- package/dist/modules/hospitality_billing/jobs.d.ts.map +1 -0
- package/dist/modules/hospitality_billing/jobs.js +83 -0
- package/dist/modules/hospitality_billing/jobs.js.map +1 -0
- package/dist/modules/hospitality_billing/menus.d.ts +9 -0
- package/dist/modules/hospitality_billing/menus.d.ts.map +1 -0
- package/dist/modules/hospitality_billing/menus.js +25 -0
- package/dist/modules/hospitality_billing/menus.js.map +1 -0
- package/dist/modules/hospitality_billing/messages.d.ts +3 -0
- package/dist/modules/hospitality_billing/messages.d.ts.map +1 -0
- package/dist/modules/hospitality_billing/messages.js +163 -0
- package/dist/modules/hospitality_billing/messages.js.map +1 -0
- package/dist/modules/hospitality_billing/models.d.ts +3 -0
- package/dist/modules/hospitality_billing/models.d.ts.map +1 -0
- package/dist/modules/hospitality_billing/models.js +65 -0
- package/dist/modules/hospitality_billing/models.js.map +1 -0
- package/dist/modules/hospitality_billing/routes.d.ts +3 -0
- package/dist/modules/hospitality_billing/routes.d.ts.map +1 -0
- package/dist/modules/hospitality_billing/routes.js +189 -0
- package/dist/modules/hospitality_billing/routes.js.map +1 -0
- package/dist/modules/hospitality_billing/screens/billing.d.ts +3 -0
- package/dist/modules/hospitality_billing/screens/billing.d.ts.map +1 -0
- package/dist/modules/hospitality_billing/screens/billing.js +20 -0
- package/dist/modules/hospitality_billing/screens/billing.js.map +1 -0
- package/dist/modules/hospitality_billing/screens/charge-rules.d.ts +12 -0
- package/dist/modules/hospitality_billing/screens/charge-rules.d.ts.map +1 -0
- package/dist/modules/hospitality_billing/screens/charge-rules.js +86 -0
- package/dist/modules/hospitality_billing/screens/charge-rules.js.map +1 -0
- package/dist/modules/hospitality_billing/screens/index.d.ts +4 -0
- package/dist/modules/hospitality_billing/screens/index.d.ts.map +1 -0
- package/dist/modules/hospitality_billing/screens/index.js +4 -0
- package/dist/modules/hospitality_billing/screens/index.js.map +1 -0
- package/dist/modules/hospitality_billing/screens/page-frame.d.ts +14 -0
- package/dist/modules/hospitality_billing/screens/page-frame.d.ts.map +1 -0
- package/dist/modules/hospitality_billing/screens/page-frame.js +6 -0
- package/dist/modules/hospitality_billing/screens/page-frame.js.map +1 -0
- package/dist/modules/hospitality_billing/screens/shared.d.ts +64 -0
- package/dist/modules/hospitality_billing/screens/shared.d.ts.map +1 -0
- package/dist/modules/hospitality_billing/screens/shared.js +117 -0
- package/dist/modules/hospitality_billing/screens/shared.js.map +1 -0
- package/dist/modules/hospitality_core/calendar.d.ts.map +1 -1
- package/dist/modules/hospitality_core/calendar.js +2 -1
- package/dist/modules/hospitality_core/calendar.js.map +1 -1
- package/dist/modules/hospitality_core/functions.d.ts.map +1 -1
- package/dist/modules/hospitality_core/functions.js +114 -14
- package/dist/modules/hospitality_core/functions.js.map +1 -1
- package/dist/modules/hospitality_core/index.d.ts +2 -2
- package/dist/modules/hospitality_core/index.d.ts.map +1 -1
- package/dist/modules/hospitality_core/index.js +3 -2
- package/dist/modules/hospitality_core/index.js.map +1 -1
- package/dist/modules/hospitality_core/inventory.d.ts +53 -4
- package/dist/modules/hospitality_core/inventory.d.ts.map +1 -1
- package/dist/modules/hospitality_core/inventory.js +121 -14
- package/dist/modules/hospitality_core/inventory.js.map +1 -1
- package/dist/modules/hospitality_core/menus.d.ts.map +1 -1
- package/dist/modules/hospitality_core/menus.js +31 -0
- 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 +427 -183
- package/dist/modules/hospitality_core/messages.js.map +1 -1
- package/dist/modules/hospitality_core/models.d.ts +1 -1
- package/dist/modules/hospitality_core/models.d.ts.map +1 -1
- package/dist/modules/hospitality_core/models.js +47 -2
- package/dist/modules/hospitality_core/models.js.map +1 -1
- package/dist/modules/hospitality_core/night-audit.d.ts +1 -0
- package/dist/modules/hospitality_core/night-audit.d.ts.map +1 -1
- package/dist/modules/hospitality_core/night-audit.js +46 -1
- package/dist/modules/hospitality_core/night-audit.js.map +1 -1
- package/dist/modules/hospitality_core/online-booking.d.ts +5 -0
- package/dist/modules/hospitality_core/online-booking.d.ts.map +1 -0
- package/dist/modules/hospitality_core/online-booking.js +775 -0
- package/dist/modules/hospitality_core/online-booking.js.map +1 -0
- package/dist/modules/hospitality_core/operations.d.ts +21 -1
- package/dist/modules/hospitality_core/operations.d.ts.map +1 -1
- package/dist/modules/hospitality_core/operations.js +549 -74
- package/dist/modules/hospitality_core/operations.js.map +1 -1
- package/dist/modules/hospitality_core/routes.d.ts.map +1 -1
- package/dist/modules/hospitality_core/routes.js +526 -107
- package/dist/modules/hospitality_core/routes.js.map +1 -1
- package/dist/modules/hospitality_core/screens/amenities.d.ts +10 -0
- package/dist/modules/hospitality_core/screens/amenities.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/amenities.js +65 -0
- package/dist/modules/hospitality_core/screens/amenities.js.map +1 -0
- package/dist/modules/hospitality_core/screens/building-detail.d.ts +3 -0
- package/dist/modules/hospitality_core/screens/building-detail.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/building-detail.js +69 -0
- package/dist/modules/hospitality_core/screens/building-detail.js.map +1 -0
- package/dist/modules/hospitality_core/screens/check-out-prep.d.ts +46 -0
- package/dist/modules/hospitality_core/screens/check-out-prep.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/check-out-prep.js +133 -0
- package/dist/modules/hospitality_core/screens/check-out-prep.js.map +1 -0
- package/dist/modules/hospitality_core/screens/cleaning-task-detail.d.ts +7 -0
- package/dist/modules/hospitality_core/screens/cleaning-task-detail.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/cleaning-task-detail.js +109 -0
- package/dist/modules/hospitality_core/screens/cleaning-task-detail.js.map +1 -0
- package/dist/modules/hospitality_core/screens/cleaning-tasks.d.ts +20 -0
- package/dist/modules/hospitality_core/screens/cleaning-tasks.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/cleaning-tasks.js +139 -0
- package/dist/modules/hospitality_core/screens/cleaning-tasks.js.map +1 -0
- package/dist/modules/hospitality_core/screens/content.d.ts +3 -0
- package/dist/modules/hospitality_core/screens/content.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/content.js +114 -0
- package/dist/modules/hospitality_core/screens/content.js.map +1 -0
- package/dist/modules/hospitality_core/screens/floor-detail.d.ts +3 -0
- package/dist/modules/hospitality_core/screens/floor-detail.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/floor-detail.js +74 -0
- package/dist/modules/hospitality_core/screens/floor-detail.js.map +1 -0
- package/dist/modules/hospitality_core/screens/folio-detail.d.ts +3 -0
- package/dist/modules/hospitality_core/screens/folio-detail.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/folio-detail.js +140 -0
- package/dist/modules/hospitality_core/screens/folio-detail.js.map +1 -0
- package/dist/modules/hospitality_core/screens/folios.d.ts +3 -0
- package/dist/modules/hospitality_core/screens/folios.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/folios.js +7 -0
- package/dist/modules/hospitality_core/screens/folios.js.map +1 -0
- package/dist/modules/hospitality_core/screens/front-desk.d.ts +35 -0
- package/dist/modules/hospitality_core/screens/front-desk.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/front-desk.js +195 -0
- package/dist/modules/hospitality_core/screens/front-desk.js.map +1 -0
- package/dist/modules/hospitality_core/screens/housekeeping-room-detail.d.ts +3 -0
- package/dist/modules/hospitality_core/screens/housekeeping-room-detail.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/housekeeping-room-detail.js +121 -0
- package/dist/modules/hospitality_core/screens/housekeeping-room-detail.js.map +1 -0
- package/dist/modules/hospitality_core/screens/housekeeping-rooms.d.ts +9 -0
- package/dist/modules/hospitality_core/screens/housekeeping-rooms.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/housekeeping-rooms.js +54 -0
- package/dist/modules/hospitality_core/screens/housekeeping-rooms.js.map +1 -0
- package/dist/modules/hospitality_core/screens/index.d.ts +35 -0
- package/dist/modules/hospitality_core/screens/index.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/index.js +34 -0
- package/dist/modules/hospitality_core/screens/index.js.map +1 -0
- package/dist/modules/hospitality_core/screens/inventory.d.ts +8 -0
- package/dist/modules/hospitality_core/screens/inventory.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/inventory.js +122 -0
- package/dist/modules/hospitality_core/screens/inventory.js.map +1 -0
- package/dist/modules/hospitality_core/screens/new-property.d.ts +3 -0
- package/dist/modules/hospitality_core/screens/new-property.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/new-property.js +8 -0
- package/dist/modules/hospitality_core/screens/new-property.js.map +1 -0
- package/dist/modules/hospitality_core/screens/new-room-type.d.ts +3 -0
- package/dist/modules/hospitality_core/screens/new-room-type.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/new-room-type.js +8 -0
- package/dist/modules/hospitality_core/screens/new-room-type.js.map +1 -0
- package/dist/modules/hospitality_core/screens/new-room.d.ts +3 -0
- package/dist/modules/hospitality_core/screens/new-room.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/new-room.js +8 -0
- package/dist/modules/hospitality_core/screens/new-room.js.map +1 -0
- package/dist/modules/hospitality_core/screens/night-audit.d.ts +10 -0
- package/dist/modules/hospitality_core/screens/night-audit.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/night-audit.js +67 -0
- package/dist/modules/hospitality_core/screens/night-audit.js.map +1 -0
- package/dist/modules/hospitality_core/screens/page-frame.d.ts +15 -0
- package/dist/modules/hospitality_core/screens/page-frame.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/page-frame.js +10 -0
- package/dist/modules/hospitality_core/screens/page-frame.js.map +1 -0
- package/dist/modules/hospitality_core/screens/policies.d.ts +10 -0
- package/dist/modules/hospitality_core/screens/policies.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/policies.js +72 -0
- package/dist/modules/hospitality_core/screens/policies.js.map +1 -0
- package/dist/modules/hospitality_core/screens/properties.d.ts +7 -0
- package/dist/modules/hospitality_core/screens/properties.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/properties.js +45 -0
- package/dist/modules/hospitality_core/screens/properties.js.map +1 -0
- package/dist/modules/hospitality_core/screens/property-detail.d.ts +3 -0
- package/dist/modules/hospitality_core/screens/property-detail.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/property-detail.js +92 -0
- package/dist/modules/hospitality_core/screens/property-detail.js.map +1 -0
- package/dist/modules/hospitality_core/screens/rate-plans.d.ts +10 -0
- package/dist/modules/hospitality_core/screens/rate-plans.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/rate-plans.js +123 -0
- package/dist/modules/hospitality_core/screens/rate-plans.js.map +1 -0
- package/dist/modules/hospitality_core/screens/reservation-detail.d.ts +11 -0
- package/dist/modules/hospitality_core/screens/reservation-detail.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/reservation-detail.js +244 -0
- package/dist/modules/hospitality_core/screens/reservation-detail.js.map +1 -0
- package/dist/modules/hospitality_core/screens/reservations.d.ts +17 -0
- package/dist/modules/hospitality_core/screens/reservations.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/reservations.js +166 -0
- package/dist/modules/hospitality_core/screens/reservations.js.map +1 -0
- package/dist/modules/hospitality_core/screens/room-detail.d.ts +3 -0
- package/dist/modules/hospitality_core/screens/room-detail.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/room-detail.js +75 -0
- package/dist/modules/hospitality_core/screens/room-detail.js.map +1 -0
- package/dist/modules/hospitality_core/screens/room-type-detail.d.ts +3 -0
- package/dist/modules/hospitality_core/screens/room-type-detail.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/room-type-detail.js +91 -0
- package/dist/modules/hospitality_core/screens/room-type-detail.js.map +1 -0
- package/dist/modules/hospitality_core/screens/room-types.d.ts +3 -0
- package/dist/modules/hospitality_core/screens/room-types.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/room-types.js +61 -0
- package/dist/modules/hospitality_core/screens/room-types.js.map +1 -0
- package/dist/modules/hospitality_core/screens/rooms.d.ts +10 -0
- package/dist/modules/hospitality_core/screens/rooms.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/rooms.js +150 -0
- package/dist/modules/hospitality_core/screens/rooms.js.map +1 -0
- package/dist/modules/hospitality_core/screens/services.d.ts +18 -0
- package/dist/modules/hospitality_core/screens/services.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/services.js +196 -0
- package/dist/modules/hospitality_core/screens/services.js.map +1 -0
- package/dist/modules/hospitality_core/screens/shared.d.ts +789 -0
- package/dist/modules/hospitality_core/screens/shared.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/shared.js +1607 -0
- package/dist/modules/hospitality_core/screens/shared.js.map +1 -0
- package/dist/modules/hospitality_core/screens/stay-detail.d.ts +3 -0
- package/dist/modules/hospitality_core/screens/stay-detail.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/stay-detail.js +233 -0
- package/dist/modules/hospitality_core/screens/stay-detail.js.map +1 -0
- package/dist/modules/hospitality_core/screens/stay-notices.d.ts +9 -0
- package/dist/modules/hospitality_core/screens/stay-notices.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/stay-notices.js +87 -0
- package/dist/modules/hospitality_core/screens/stay-notices.js.map +1 -0
- package/dist/modules/hospitality_core/screens/stays.d.ts +3 -0
- package/dist/modules/hospitality_core/screens/stays.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/stays.js +7 -0
- package/dist/modules/hospitality_core/screens/stays.js.map +1 -0
- package/dist/modules/hospitality_core/screens/tape-chart.d.ts +7 -0
- package/dist/modules/hospitality_core/screens/tape-chart.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/tape-chart.js +99 -0
- package/dist/modules/hospitality_core/screens/tape-chart.js.map +1 -0
- package/dist/modules/hospitality_core/services.d.ts +48 -0
- package/dist/modules/hospitality_core/services.d.ts.map +1 -1
- package/dist/modules/hospitality_core/services.js +203 -30
- package/dist/modules/hospitality_core/services.js.map +1 -1
- package/dist/modules/hospitality_core/stay-notices.js +2 -2
- package/dist/modules/hospitality_core/stay-notices.js.map +1 -1
- package/dist/modules/hospitality_core/types.d.ts +26 -5
- package/dist/modules/hospitality_core/types.d.ts.map +1 -1
- package/dist/modules/hospitality_core/types.js +47 -5
- package/dist/modules/hospitality_core/types.js.map +1 -1
- package/dist/modules/hospitality_staff_channel/channel-routes.d.ts +2 -0
- package/dist/modules/hospitality_staff_channel/channel-routes.d.ts.map +1 -0
- package/dist/modules/hospitality_staff_channel/channel-routes.js +1216 -0
- package/dist/modules/hospitality_staff_channel/channel-routes.js.map +1 -0
- package/dist/modules/hospitality_staff_channel/index.d.ts +5 -0
- package/dist/modules/hospitality_staff_channel/index.d.ts.map +1 -0
- package/dist/modules/hospitality_staff_channel/index.js +34 -0
- package/dist/modules/hospitality_staff_channel/index.js.map +1 -0
- package/dist/modules/hr/functions.d.ts.map +1 -1
- package/dist/modules/hr/functions.js +108 -44
- package/dist/modules/hr/functions.js.map +1 -1
- package/dist/modules/hr/index.d.ts.map +1 -1
- package/dist/modules/hr/index.js +0 -1
- package/dist/modules/hr/index.js.map +1 -1
- package/dist/modules/hr_backend/index.d.ts +2 -1
- package/dist/modules/hr_backend/index.d.ts.map +1 -1
- package/dist/modules/hr_backend/index.js +39 -7
- 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 +279 -42
- package/dist/modules/hr_backend/routes.js.map +1 -1
- package/dist/modules/hr_backend/screens/employee-form.d.ts +28 -0
- package/dist/modules/hr_backend/screens/employee-form.d.ts.map +1 -0
- package/dist/modules/hr_backend/screens/employee-form.js +110 -0
- package/dist/modules/hr_backend/screens/employee-form.js.map +1 -0
- package/dist/modules/hr_backend/screens/employees-list.d.ts +22 -0
- package/dist/modules/hr_backend/screens/employees-list.d.ts.map +1 -0
- package/dist/modules/hr_backend/screens/employees-list.js +53 -0
- package/dist/modules/hr_backend/screens/employees-list.js.map +1 -0
- package/dist/modules/hr_backend/screens/index.d.ts +5 -0
- package/dist/modules/hr_backend/screens/index.d.ts.map +1 -0
- package/dist/modules/hr_backend/screens/index.js +5 -0
- package/dist/modules/hr_backend/screens/index.js.map +1 -0
- package/dist/modules/hr_backend/screens/leaves-list.d.ts +22 -0
- package/dist/modules/hr_backend/screens/leaves-list.d.ts.map +1 -0
- package/dist/modules/hr_backend/screens/leaves-list.js +78 -0
- package/dist/modules/hr_backend/screens/leaves-list.js.map +1 -0
- package/dist/modules/hr_backend/screens/roster.d.ts +19 -0
- package/dist/modules/hr_backend/screens/roster.d.ts.map +1 -0
- package/dist/modules/hr_backend/screens/roster.js +83 -0
- package/dist/modules/hr_backend/screens/roster.js.map +1 -0
- package/dist/modules/inventory_staff_channel/channel-routes.d.ts +2 -0
- package/dist/modules/inventory_staff_channel/channel-routes.d.ts.map +1 -0
- package/dist/modules/inventory_staff_channel/channel-routes.js +713 -0
- package/dist/modules/inventory_staff_channel/channel-routes.js.map +1 -0
- package/dist/modules/inventory_staff_channel/index.d.ts +5 -0
- package/dist/modules/inventory_staff_channel/index.d.ts.map +1 -0
- package/dist/modules/inventory_staff_channel/index.js +38 -0
- package/dist/modules/inventory_staff_channel/index.js.map +1 -0
- package/dist/modules/livedoc/documents.d.ts +48 -0
- package/dist/modules/livedoc/documents.d.ts.map +1 -0
- package/dist/modules/livedoc/documents.js +99 -0
- package/dist/modules/livedoc/documents.js.map +1 -0
- package/dist/modules/livedoc/functions.d.ts +3 -0
- package/dist/modules/livedoc/functions.d.ts.map +1 -0
- package/dist/modules/livedoc/functions.js +47 -0
- package/dist/modules/livedoc/functions.js.map +1 -0
- package/dist/modules/livedoc/index.d.ts +22 -0
- package/dist/modules/livedoc/index.d.ts.map +1 -0
- package/dist/modules/livedoc/index.js +37 -0
- package/dist/modules/livedoc/index.js.map +1 -0
- package/dist/modules/livedoc/islands.d.ts +3 -0
- package/dist/modules/livedoc/islands.d.ts.map +1 -0
- package/dist/modules/livedoc/islands.js +22 -0
- package/dist/modules/livedoc/islands.js.map +1 -0
- package/dist/modules/livedoc/routes.d.ts +11 -0
- package/dist/modules/livedoc/routes.d.ts.map +1 -0
- package/dist/modules/livedoc/routes.js +232 -0
- package/dist/modules/livedoc/routes.js.map +1 -0
- package/dist/modules/livedoc/sync.d.ts +124 -0
- package/dist/modules/livedoc/sync.d.ts.map +1 -0
- package/dist/modules/livedoc/sync.js +218 -0
- package/dist/modules/livedoc/sync.js.map +1 -0
- package/dist/modules/loyalty/admin-functions.d.ts.map +1 -1
- package/dist/modules/loyalty/admin-functions.js +42 -6
- package/dist/modules/loyalty/admin-functions.js.map +1 -1
- package/dist/modules/loyalty/engine.d.ts +1 -0
- package/dist/modules/loyalty/engine.d.ts.map +1 -1
- package/dist/modules/loyalty/engine.js +88 -28
- package/dist/modules/loyalty/engine.js.map +1 -1
- package/dist/modules/loyalty/index.d.ts.map +1 -1
- package/dist/modules/loyalty/index.js +10 -2
- package/dist/modules/loyalty/index.js.map +1 -1
- package/dist/modules/loyalty/ledger.d.ts.map +1 -1
- package/dist/modules/loyalty/ledger.js +11 -0
- package/dist/modules/loyalty/ledger.js.map +1 -1
- package/dist/modules/loyalty/membership-functions.d.ts.map +1 -1
- package/dist/modules/loyalty/membership-functions.js +23 -7
- package/dist/modules/loyalty/membership-functions.js.map +1 -1
- package/dist/modules/loyalty/messages.d.ts +8 -0
- package/dist/modules/loyalty/messages.d.ts.map +1 -1
- package/dist/modules/loyalty/messages.js +8 -0
- package/dist/modules/loyalty/messages.js.map +1 -1
- package/dist/modules/loyalty/models.d.ts.map +1 -1
- package/dist/modules/loyalty/models.js +20 -0
- package/dist/modules/loyalty/models.js.map +1 -1
- package/dist/modules/loyalty/order-functions.d.ts +16 -1
- package/dist/modules/loyalty/order-functions.d.ts.map +1 -1
- package/dist/modules/loyalty/order-functions.js +513 -291
- package/dist/modules/loyalty/order-functions.js.map +1 -1
- package/dist/modules/loyalty/stats.d.ts +17 -0
- package/dist/modules/loyalty/stats.d.ts.map +1 -0
- package/dist/modules/loyalty/stats.js +178 -0
- package/dist/modules/loyalty/stats.js.map +1 -0
- package/dist/modules/loyalty/stored-value.d.ts +42 -0
- package/dist/modules/loyalty/stored-value.d.ts.map +1 -0
- package/dist/modules/loyalty/stored-value.js +368 -0
- package/dist/modules/loyalty/stored-value.js.map +1 -0
- package/dist/modules/loyalty/types.d.ts +6 -4
- package/dist/modules/loyalty/types.d.ts.map +1 -1
- package/dist/modules/loyalty/types.js +1 -1
- package/dist/modules/loyalty/types.js.map +1 -1
- package/dist/modules/loyalty_backend/index.js +443 -172
- package/dist/modules/loyalty_backend/index.js.map +1 -1
- package/dist/modules/loyalty_backend/messages.d.ts +58 -1
- package/dist/modules/loyalty_backend/messages.d.ts.map +1 -1
- package/dist/modules/loyalty_backend/messages.js +114 -0
- package/dist/modules/loyalty_backend/messages.js.map +1 -1
- package/dist/modules/loyalty_backend/screens/index.d.ts +90 -0
- package/dist/modules/loyalty_backend/screens/index.d.ts.map +1 -0
- package/dist/modules/loyalty_backend/screens/index.js +912 -0
- package/dist/modules/loyalty_backend/screens/index.js.map +1 -0
- package/dist/modules/loyalty_backend/screens/page-frame.d.ts +14 -0
- package/dist/modules/loyalty_backend/screens/page-frame.d.ts.map +1 -0
- package/dist/modules/loyalty_backend/screens/page-frame.js +13 -0
- package/dist/modules/loyalty_backend/screens/page-frame.js.map +1 -0
- package/dist/modules/loyalty_pos/channel.d.ts +2 -0
- package/dist/modules/loyalty_pos/channel.d.ts.map +1 -0
- package/dist/modules/loyalty_pos/channel.js +270 -0
- package/dist/modules/loyalty_pos/channel.js.map +1 -0
- package/dist/modules/loyalty_pos/functions.d.ts +11 -17
- package/dist/modules/loyalty_pos/functions.d.ts.map +1 -1
- package/dist/modules/loyalty_pos/functions.js +454 -94
- package/dist/modules/loyalty_pos/functions.js.map +1 -1
- package/dist/modules/loyalty_pos/index.js +6 -16
- package/dist/modules/loyalty_pos/index.js.map +1 -1
- package/dist/modules/loyalty_pos/jobs.d.ts +3 -0
- package/dist/modules/loyalty_pos/jobs.d.ts.map +1 -0
- package/dist/modules/loyalty_pos/jobs.js +30 -0
- package/dist/modules/loyalty_pos/jobs.js.map +1 -0
- package/dist/modules/loyalty_sale/functions.d.ts +2 -2
- package/dist/modules/loyalty_sale/functions.d.ts.map +1 -1
- package/dist/modules/loyalty_sale/functions.js +53 -34
- package/dist/modules/loyalty_sale/functions.js.map +1 -1
- package/dist/modules/loyalty_sale/index.js +0 -2
- package/dist/modules/loyalty_sale/index.js.map +1 -1
- package/dist/modules/mail/functions.d.ts.map +1 -1
- package/dist/modules/mail/functions.js +48 -6
- package/dist/modules/mail/functions.js.map +1 -1
- package/dist/modules/mail/index.d.ts.map +1 -1
- package/dist/modules/mail/index.js +0 -1
- package/dist/modules/mail/index.js.map +1 -1
- package/dist/modules/mail/operations.d.ts +19 -0
- package/dist/modules/mail/operations.d.ts.map +1 -1
- package/dist/modules/mail/operations.js +69 -0
- package/dist/modules/mail/operations.js.map +1 -1
- package/dist/modules/mail_backend/index.d.ts +1 -1
- package/dist/modules/mail_backend/index.d.ts.map +1 -1
- package/dist/modules/mail_backend/index.js +5 -14
- package/dist/modules/mail_backend/index.js.map +1 -1
- package/dist/modules/mail_backend/islands.js +2 -2
- package/dist/modules/mail_backend/islands.js.map +1 -1
- package/dist/modules/mail_backend/routes.d.ts.map +1 -1
- package/dist/modules/mail_backend/routes.js +25 -20
- package/dist/modules/mail_backend/routes.js.map +1 -1
- package/dist/modules/mail_backend/screens/inbox-list.d.ts +9 -0
- package/dist/modules/mail_backend/screens/inbox-list.d.ts.map +1 -0
- package/dist/modules/mail_backend/screens/inbox-list.js +13 -0
- package/dist/modules/mail_backend/screens/inbox-list.js.map +1 -0
- package/dist/modules/mail_backend/screens/index.d.ts +3 -0
- package/dist/modules/mail_backend/screens/index.d.ts.map +1 -0
- package/dist/modules/mail_backend/screens/index.js +2 -0
- package/dist/modules/mail_backend/screens/index.js.map +1 -0
- package/dist/modules/mail_inbound/index.d.ts.map +1 -1
- package/dist/modules/mail_inbound/index.js +0 -1
- package/dist/modules/mail_inbound/index.js.map +1 -1
- package/dist/modules/mail_inbound_backend/index.d.ts +1 -1
- package/dist/modules/mail_inbound_backend/index.d.ts.map +1 -1
- package/dist/modules/mail_inbound_backend/index.js +3 -12
- package/dist/modules/mail_inbound_backend/index.js.map +1 -1
- package/dist/modules/mail_inbound_backend/routes.d.ts.map +1 -1
- package/dist/modules/mail_inbound_backend/routes.js +6 -21
- package/dist/modules/mail_inbound_backend/routes.js.map +1 -1
- package/dist/modules/mail_inbound_backend/screens/inbound-list.d.ts +8 -0
- package/dist/modules/mail_inbound_backend/screens/inbound-list.d.ts.map +1 -0
- package/dist/modules/mail_inbound_backend/screens/inbound-list.js +20 -0
- package/dist/modules/mail_inbound_backend/screens/inbound-list.js.map +1 -0
- package/dist/modules/mail_inbound_backend/screens/index.d.ts +3 -0
- package/dist/modules/mail_inbound_backend/screens/index.d.ts.map +1 -0
- package/dist/modules/mail_inbound_backend/screens/index.js +2 -0
- package/dist/modules/mail_inbound_backend/screens/index.js.map +1 -0
- package/dist/modules/mail_staff_channel/channel-routes.d.ts +2 -0
- package/dist/modules/mail_staff_channel/channel-routes.d.ts.map +1 -0
- package/dist/modules/mail_staff_channel/channel-routes.js +183 -0
- package/dist/modules/mail_staff_channel/channel-routes.js.map +1 -0
- package/dist/modules/mail_staff_channel/index.d.ts +5 -0
- package/dist/modules/mail_staff_channel/index.d.ts.map +1 -0
- package/dist/modules/mail_staff_channel/index.js +28 -0
- package/dist/modules/mail_staff_channel/index.js.map +1 -0
- package/dist/modules/mail_transport/index.d.ts.map +1 -1
- package/dist/modules/mail_transport/index.js +0 -1
- package/dist/modules/mail_transport/index.js.map +1 -1
- package/dist/modules/mail_transport_backend/index.d.ts +1 -1
- package/dist/modules/mail_transport_backend/index.d.ts.map +1 -1
- package/dist/modules/mail_transport_backend/index.js +3 -12
- package/dist/modules/mail_transport_backend/index.js.map +1 -1
- package/dist/modules/mail_transport_backend/routes.d.ts.map +1 -1
- package/dist/modules/mail_transport_backend/routes.js +23 -22
- package/dist/modules/mail_transport_backend/routes.js.map +1 -1
- package/dist/modules/mail_transport_backend/screens/index.d.ts +3 -0
- package/dist/modules/mail_transport_backend/screens/index.d.ts.map +1 -0
- package/dist/modules/mail_transport_backend/screens/index.js +2 -0
- package/dist/modules/mail_transport_backend/screens/index.js.map +1 -0
- package/dist/modules/mail_transport_backend/screens/outbox-list.d.ts +9 -0
- package/dist/modules/mail_transport_backend/screens/outbox-list.d.ts.map +1 -0
- package/dist/modules/mail_transport_backend/screens/outbox-list.js +29 -0
- package/dist/modules/mail_transport_backend/screens/outbox-list.js.map +1 -0
- package/dist/modules/manufacturing/functions.d.ts +3 -0
- package/dist/modules/manufacturing/functions.d.ts.map +1 -0
- package/dist/modules/manufacturing/functions.js +912 -0
- package/dist/modules/manufacturing/functions.js.map +1 -0
- package/dist/modules/manufacturing/index.d.ts +6 -0
- package/dist/modules/manufacturing/index.d.ts.map +1 -0
- package/dist/modules/manufacturing/index.js +42 -0
- package/dist/modules/manufacturing/index.js.map +1 -0
- package/dist/modules/manufacturing/models.d.ts +8 -0
- package/dist/modules/manufacturing/models.d.ts.map +1 -0
- package/dist/modules/manufacturing/models.js +145 -0
- package/dist/modules/manufacturing/models.js.map +1 -0
- package/dist/modules/manufacturing/relations.d.ts.map +1 -0
- package/dist/modules/manufacturing/relations.js +37 -0
- package/dist/modules/manufacturing/relations.js.map +1 -0
- package/dist/modules/manufacturing/types.d.ts +7 -0
- package/dist/modules/manufacturing/types.d.ts.map +1 -0
- package/dist/modules/manufacturing/types.js +11 -0
- package/dist/modules/manufacturing/types.js.map +1 -0
- package/dist/modules/manufacturing_backend/index.d.ts +5 -0
- package/dist/modules/manufacturing_backend/index.d.ts.map +1 -0
- package/dist/modules/manufacturing_backend/index.js +146 -0
- package/dist/modules/manufacturing_backend/index.js.map +1 -0
- package/dist/modules/manufacturing_backend/routes.d.ts +3 -0
- package/dist/modules/manufacturing_backend/routes.d.ts.map +1 -0
- package/dist/modules/manufacturing_backend/routes.js +477 -0
- package/dist/modules/manufacturing_backend/routes.js.map +1 -0
- package/dist/modules/manufacturing_backend/screens/bom-create.d.ts +15 -0
- package/dist/modules/manufacturing_backend/screens/bom-create.d.ts.map +1 -0
- package/dist/modules/manufacturing_backend/screens/bom-create.js +39 -0
- package/dist/modules/manufacturing_backend/screens/bom-create.js.map +1 -0
- package/dist/modules/manufacturing_backend/screens/boms-list.d.ts +18 -0
- package/dist/modules/manufacturing_backend/screens/boms-list.d.ts.map +1 -0
- package/dist/modules/manufacturing_backend/screens/boms-list.js +36 -0
- package/dist/modules/manufacturing_backend/screens/boms-list.js.map +1 -0
- package/dist/modules/manufacturing_backend/screens/index.d.ts +8 -0
- package/dist/modules/manufacturing_backend/screens/index.d.ts.map +1 -0
- package/dist/modules/manufacturing_backend/screens/index.js +8 -0
- package/dist/modules/manufacturing_backend/screens/index.js.map +1 -0
- package/dist/modules/manufacturing_backend/screens/order-create.d.ts +13 -0
- package/dist/modules/manufacturing_backend/screens/order-create.d.ts.map +1 -0
- package/dist/modules/manufacturing_backend/screens/order-create.js +20 -0
- package/dist/modules/manufacturing_backend/screens/order-create.js.map +1 -0
- package/dist/modules/manufacturing_backend/screens/order-execution.d.ts +7 -0
- package/dist/modules/manufacturing_backend/screens/order-execution.d.ts.map +1 -0
- package/dist/modules/manufacturing_backend/screens/order-execution.js +129 -0
- package/dist/modules/manufacturing_backend/screens/order-execution.js.map +1 -0
- package/dist/modules/manufacturing_backend/screens/orders-list.d.ts +21 -0
- package/dist/modules/manufacturing_backend/screens/orders-list.d.ts.map +1 -0
- package/dist/modules/manufacturing_backend/screens/orders-list.js +49 -0
- package/dist/modules/manufacturing_backend/screens/orders-list.js.map +1 -0
- package/dist/modules/manufacturing_backend/screens/work-center-form.d.ts +24 -0
- package/dist/modules/manufacturing_backend/screens/work-center-form.d.ts.map +1 -0
- package/dist/modules/manufacturing_backend/screens/work-center-form.js +80 -0
- package/dist/modules/manufacturing_backend/screens/work-center-form.js.map +1 -0
- package/dist/modules/manufacturing_backend/screens/work-centers-list.d.ts +23 -0
- package/dist/modules/manufacturing_backend/screens/work-centers-list.d.ts.map +1 -0
- package/dist/modules/manufacturing_backend/screens/work-centers-list.js +61 -0
- package/dist/modules/manufacturing_backend/screens/work-centers-list.js.map +1 -0
- package/dist/modules/oauth/index.d.ts.map +1 -1
- package/dist/modules/oauth/index.js +0 -1
- package/dist/modules/oauth/index.js.map +1 -1
- package/dist/modules/oauth/models.d.ts.map +1 -1
- package/dist/modules/oauth/models.js +2 -1
- package/dist/modules/oauth/models.js.map +1 -1
- package/dist/modules/oauth_backend/index.d.ts +1 -1
- package/dist/modules/oauth_backend/index.d.ts.map +1 -1
- package/dist/modules/oauth_backend/index.js +3 -5
- package/dist/modules/oauth_backend/index.js.map +1 -1
- package/dist/modules/oauth_backend/messages.d.ts +4 -0
- package/dist/modules/oauth_backend/messages.d.ts.map +1 -1
- package/dist/modules/oauth_backend/messages.js +4 -0
- package/dist/modules/oauth_backend/messages.js.map +1 -1
- package/dist/modules/oauth_backend/routes.d.ts.map +1 -1
- package/dist/modules/oauth_backend/routes.js +28 -30
- package/dist/modules/oauth_backend/routes.js.map +1 -1
- package/dist/modules/oauth_backend/screens/index.d.ts +66 -0
- package/dist/modules/oauth_backend/screens/index.d.ts.map +1 -0
- package/dist/modules/oauth_backend/screens/index.js +306 -0
- package/dist/modules/oauth_backend/screens/index.js.map +1 -0
- package/dist/modules/partner/functions.d.ts.map +1 -1
- package/dist/modules/partner/functions.js +74 -6
- package/dist/modules/partner/functions.js.map +1 -1
- package/dist/modules/partner/index.d.ts.map +1 -1
- package/dist/modules/partner/index.js +0 -1
- package/dist/modules/partner/index.js.map +1 -1
- package/dist/modules/partner/models.d.ts +4 -4
- package/dist/modules/partner/models.d.ts.map +1 -1
- package/dist/modules/partner/models.js +9 -7
- package/dist/modules/partner/models.js.map +1 -1
- package/dist/modules/partner/types.d.ts +2 -2
- package/dist/modules/partner/types.js +2 -2
- package/dist/modules/partner_backend/client/address-view.mjs +5 -5
- package/dist/modules/partner_backend/client/address-view.mjs.map +1 -1
- package/dist/modules/partner_backend/client/address.css +22 -10
- package/dist/modules/partner_backend/client/partner.css +116 -0
- package/dist/modules/partner_backend/index.d.ts +1 -1
- package/dist/modules/partner_backend/index.d.ts.map +1 -1
- package/dist/modules/partner_backend/index.js +34 -4
- package/dist/modules/partner_backend/index.js.map +1 -1
- package/dist/modules/partner_backend/menus.js +2 -2
- package/dist/modules/partner_backend/menus.js.map +1 -1
- package/dist/modules/partner_backend/routes.d.ts +3 -1
- package/dist/modules/partner_backend/routes.d.ts.map +1 -1
- package/dist/modules/partner_backend/routes.js +236 -91
- package/dist/modules/partner_backend/routes.js.map +1 -1
- package/dist/modules/partner_backend/screens/form.d.ts +21 -0
- package/dist/modules/partner_backend/screens/form.d.ts.map +1 -0
- package/dist/modules/partner_backend/screens/form.js +101 -0
- package/dist/modules/partner_backend/screens/form.js.map +1 -0
- package/dist/modules/partner_backend/screens/index.d.ts +5 -0
- package/dist/modules/partner_backend/screens/index.d.ts.map +1 -0
- package/dist/modules/partner_backend/screens/index.js +4 -0
- package/dist/modules/partner_backend/screens/index.js.map +1 -0
- package/dist/modules/partner_backend/screens/list.d.ts +6 -0
- package/dist/modules/partner_backend/screens/list.d.ts.map +1 -0
- package/dist/modules/partner_backend/screens/list.js +94 -0
- package/dist/modules/partner_backend/screens/list.js.map +1 -0
- package/dist/modules/partner_backend/screens/new.d.ts +5 -0
- package/dist/modules/partner_backend/screens/new.d.ts.map +1 -0
- package/dist/modules/partner_backend/screens/new.js +58 -0
- package/dist/modules/partner_backend/screens/new.js.map +1 -0
- package/dist/modules/partner_backend/screens/types.d.ts +44 -0
- package/dist/modules/partner_backend/screens/types.d.ts.map +1 -0
- package/dist/modules/partner_backend/screens/types.js +2 -0
- package/dist/modules/partner_backend/screens/types.js.map +1 -0
- package/dist/modules/partner_mail_backend/index.d.ts +5 -0
- package/dist/modules/partner_mail_backend/index.d.ts.map +1 -0
- package/dist/modules/partner_mail_backend/index.js +29 -0
- package/dist/modules/partner_mail_backend/index.js.map +1 -0
- package/dist/modules/pos/functions.d.ts +18 -2
- package/dist/modules/pos/functions.d.ts.map +1 -1
- package/dist/modules/pos/functions.js +3279 -345
- package/dist/modules/pos/functions.js.map +1 -1
- package/dist/modules/pos/index.d.ts +2 -1
- package/dist/modules/pos/index.d.ts.map +1 -1
- package/dist/modules/pos/index.js +5 -5
- package/dist/modules/pos/index.js.map +1 -1
- package/dist/modules/pos/models.d.ts.map +1 -1
- package/dist/modules/pos/models.js +189 -1
- package/dist/modules/pos/models.js.map +1 -1
- package/dist/modules/pos/relations.d.ts.map +1 -1
- package/dist/modules/pos/relations.js +11 -0
- package/dist/modules/pos/relations.js.map +1 -1
- package/dist/modules/pos_backend/index.js +182 -154
- package/dist/modules/pos_backend/index.js.map +1 -1
- package/dist/modules/pos_backend/screens.d.ts +1 -0
- package/dist/modules/pos_backend/screens.d.ts.map +1 -1
- package/dist/modules/pos_backend/screens.js +28 -38
- package/dist/modules/pos_backend/screens.js.map +1 -1
- package/dist/modules/pos_channel/catalog.d.ts +27 -0
- package/dist/modules/pos_channel/catalog.d.ts.map +1 -0
- package/dist/modules/pos_channel/catalog.js +310 -0
- package/dist/modules/pos_channel/catalog.js.map +1 -0
- package/dist/modules/pos_channel/index.d.ts +7 -0
- package/dist/modules/pos_channel/index.d.ts.map +1 -0
- package/dist/modules/pos_channel/index.js +61 -0
- package/dist/modules/pos_channel/index.js.map +1 -0
- package/dist/modules/pos_channel/offline.d.ts +66 -0
- package/dist/modules/pos_channel/offline.d.ts.map +1 -0
- package/dist/modules/pos_channel/offline.js +16 -0
- package/dist/modules/pos_channel/offline.js.map +1 -0
- package/dist/modules/pos_channel/operations.d.ts +422 -0
- package/dist/modules/pos_channel/operations.d.ts.map +1 -0
- package/dist/modules/pos_channel/operations.js +1781 -0
- package/dist/modules/pos_channel/operations.js.map +1 -0
- package/dist/modules/pos_channel/sync.d.ts +6 -0
- package/dist/modules/pos_channel/sync.d.ts.map +1 -0
- package/dist/modules/pos_channel/sync.js +1161 -0
- package/dist/modules/pos_channel/sync.js.map +1 -0
- package/dist/modules/pricing/index.d.ts.map +1 -1
- package/dist/modules/pricing/index.js +3 -4
- package/dist/modules/pricing/index.js.map +1 -1
- package/dist/modules/pricing_backend/index.js +135 -78
- package/dist/modules/pricing_backend/index.js.map +1 -1
- package/dist/modules/pricing_backend/screens/index.d.ts +5 -0
- package/dist/modules/pricing_backend/screens/index.d.ts.map +1 -0
- package/dist/modules/pricing_backend/screens/index.js +4 -0
- package/dist/modules/pricing_backend/screens/index.js.map +1 -0
- package/dist/modules/pricing_backend/screens/pricelist-create.d.ts +10 -0
- package/dist/modules/pricing_backend/screens/pricelist-create.d.ts.map +1 -0
- package/dist/modules/pricing_backend/screens/pricelist-create.js +30 -0
- package/dist/modules/pricing_backend/screens/pricelist-create.js.map +1 -0
- package/dist/modules/pricing_backend/screens/pricelist-detail.d.ts +15 -0
- package/dist/modules/pricing_backend/screens/pricelist-detail.d.ts.map +1 -0
- package/dist/modules/pricing_backend/screens/pricelist-detail.js +164 -0
- package/dist/modules/pricing_backend/screens/pricelist-detail.js.map +1 -0
- package/dist/modules/pricing_backend/screens/pricelists-list.d.ts +11 -0
- package/dist/modules/pricing_backend/screens/pricelists-list.d.ts.map +1 -0
- package/dist/modules/pricing_backend/screens/pricelists-list.js +27 -0
- package/dist/modules/pricing_backend/screens/pricelists-list.js.map +1 -0
- package/dist/modules/pricing_backend/screens/shared.d.ts +21 -0
- package/dist/modules/pricing_backend/screens/shared.d.ts.map +1 -0
- package/dist/modules/pricing_backend/screens/shared.js +3 -0
- package/dist/modules/pricing_backend/screens/shared.js.map +1 -0
- package/dist/modules/product/functions.d.ts.map +1 -1
- package/dist/modules/product/functions.js +679 -50
- package/dist/modules/product/functions.js.map +1 -1
- package/dist/modules/product/index.d.ts +2 -0
- package/dist/modules/product/index.d.ts.map +1 -1
- package/dist/modules/product/index.js +2 -2
- package/dist/modules/product/index.js.map +1 -1
- package/dist/modules/product/models.d.ts +1 -1
- package/dist/modules/product/models.d.ts.map +1 -1
- package/dist/modules/product/models.js +27 -4
- package/dist/modules/product/models.js.map +1 -1
- package/dist/modules/product/relations.d.ts.map +1 -1
- package/dist/modules/product/relations.js +4 -0
- package/dist/modules/product/relations.js.map +1 -1
- package/dist/modules/product/sellable.d.ts +26 -0
- package/dist/modules/product/sellable.d.ts.map +1 -0
- package/dist/modules/product/sellable.js +56 -0
- package/dist/modules/product/sellable.js.map +1 -0
- package/dist/modules/product/types.d.ts +2 -2
- package/dist/modules/product/views.d.ts.map +1 -1
- package/dist/modules/product/views.js +5 -1
- package/dist/modules/product/views.js.map +1 -1
- package/dist/modules/product_activity_backend/index.d.ts.map +1 -1
- package/dist/modules/product_activity_backend/index.js +2 -3
- package/dist/modules/product_activity_backend/index.js.map +1 -1
- package/dist/modules/product_backend/client/media-upload-view.d.mts.map +1 -1
- package/dist/modules/product_backend/client/media-upload-view.mjs +1 -0
- package/dist/modules/product_backend/client/media-upload-view.mjs.map +1 -1
- package/dist/modules/product_backend/client/product.css +964 -0
- package/dist/modules/product_backend/index.d.ts +5 -6
- package/dist/modules/product_backend/index.d.ts.map +1 -1
- package/dist/modules/product_backend/index.js +203 -14
- package/dist/modules/product_backend/index.js.map +1 -1
- package/dist/modules/product_backend/menus.js +2 -2
- package/dist/modules/product_backend/menus.js.map +1 -1
- package/dist/modules/product_backend/relation-control.d.ts +85 -0
- package/dist/modules/product_backend/relation-control.d.ts.map +1 -0
- package/dist/modules/product_backend/relation-control.js +129 -0
- package/dist/modules/product_backend/relation-control.js.map +1 -0
- package/dist/modules/product_backend/routes.d.ts.map +1 -1
- package/dist/modules/product_backend/routes.js +502 -196
- package/dist/modules/product_backend/routes.js.map +1 -1
- package/dist/modules/product_backend/screens/attributes.d.ts +7 -0
- package/dist/modules/product_backend/screens/attributes.d.ts.map +1 -0
- package/dist/modules/product_backend/screens/attributes.js +66 -0
- package/dist/modules/product_backend/screens/attributes.js.map +1 -0
- package/dist/modules/product_backend/screens/create.d.ts +16 -0
- package/dist/modules/product_backend/screens/create.d.ts.map +1 -0
- package/dist/modules/product_backend/screens/create.js +86 -0
- package/dist/modules/product_backend/screens/create.js.map +1 -0
- package/dist/modules/product_backend/screens/detail.d.ts +87 -0
- package/dist/modules/product_backend/screens/detail.d.ts.map +1 -0
- package/dist/modules/product_backend/screens/detail.js +381 -0
- package/dist/modules/product_backend/screens/detail.js.map +1 -0
- package/dist/modules/product_backend/screens/favorite.d.ts +6 -0
- package/dist/modules/product_backend/screens/favorite.d.ts.map +1 -0
- package/dist/modules/product_backend/screens/favorite.js +43 -0
- package/dist/modules/product_backend/screens/favorite.js.map +1 -0
- package/dist/modules/product_backend/screens/index.d.ts +10 -0
- package/dist/modules/product_backend/screens/index.d.ts.map +1 -0
- package/dist/modules/product_backend/screens/index.js +7 -0
- package/dist/modules/product_backend/screens/index.js.map +1 -0
- package/dist/modules/product_backend/screens/list.d.ts +54 -0
- package/dist/modules/product_backend/screens/list.d.ts.map +1 -0
- package/dist/modules/product_backend/screens/list.js +124 -0
- package/dist/modules/product_backend/screens/list.js.map +1 -0
- package/dist/modules/product_backend/screens/variant.d.ts +9 -0
- package/dist/modules/product_backend/screens/variant.d.ts.map +1 -0
- package/dist/modules/product_backend/screens/variant.js +113 -0
- package/dist/modules/product_backend/screens/variant.js.map +1 -0
- package/dist/modules/product_mail_backend/index.d.ts.map +1 -1
- package/dist/modules/product_mail_backend/index.js +2 -3
- package/dist/modules/product_mail_backend/index.js.map +1 -1
- package/dist/modules/product_media/functions.d.ts.map +1 -1
- package/dist/modules/product_media/functions.js +59 -6
- package/dist/modules/product_media/functions.js.map +1 -1
- package/dist/modules/product_media/index.js +0 -1
- package/dist/modules/product_media/index.js.map +1 -1
- package/dist/modules/product_variant_activity_backend/index.d.ts.map +1 -1
- package/dist/modules/product_variant_activity_backend/index.js +2 -3
- package/dist/modules/product_variant_activity_backend/index.js.map +1 -1
- package/dist/modules/product_variant_mail_backend/index.d.ts.map +1 -1
- package/dist/modules/product_variant_mail_backend/index.js +2 -3
- package/dist/modules/product_variant_mail_backend/index.js.map +1 -1
- package/dist/modules/purchase/functions.d.ts.map +1 -1
- package/dist/modules/purchase/functions.js +852 -225
- package/dist/modules/purchase/functions.js.map +1 -1
- package/dist/modules/purchase/index.d.ts.map +1 -1
- package/dist/modules/purchase/index.js +30 -5
- package/dist/modules/purchase/index.js.map +1 -1
- package/dist/modules/purchase/models.d.ts.map +1 -1
- package/dist/modules/purchase/models.js +1 -0
- package/dist/modules/purchase/models.js.map +1 -1
- package/dist/modules/purchase/reports.d.ts +4 -0
- package/dist/modules/purchase/reports.d.ts.map +1 -0
- package/dist/modules/purchase/reports.js +86 -0
- package/dist/modules/purchase/reports.js.map +1 -0
- package/dist/modules/purchase_backend/index.js +513 -112
- package/dist/modules/purchase_backend/index.js.map +1 -1
- package/dist/modules/purchase_backend/screens/index.d.ts +10 -0
- package/dist/modules/purchase_backend/screens/index.d.ts.map +1 -0
- package/dist/modules/purchase_backend/screens/index.js +10 -0
- package/dist/modules/purchase_backend/screens/index.js.map +1 -0
- package/dist/modules/purchase_backend/screens/order-detail.d.ts +31 -0
- package/dist/modules/purchase_backend/screens/order-detail.d.ts.map +1 -0
- package/dist/modules/purchase_backend/screens/order-detail.js +204 -0
- package/dist/modules/purchase_backend/screens/order-detail.js.map +1 -0
- package/dist/modules/purchase_backend/screens/order-list-shared.d.ts +7 -0
- package/dist/modules/purchase_backend/screens/order-list-shared.d.ts.map +1 -0
- package/dist/modules/purchase_backend/screens/order-list-shared.js +58 -0
- package/dist/modules/purchase_backend/screens/order-list-shared.js.map +1 -0
- package/dist/modules/purchase_backend/screens/overview.d.ts +19 -0
- package/dist/modules/purchase_backend/screens/overview.d.ts.map +1 -0
- package/dist/modules/purchase_backend/screens/overview.js +52 -0
- package/dist/modules/purchase_backend/screens/overview.js.map +1 -0
- package/dist/modules/purchase_backend/screens/purchase-orders-list.d.ts +14 -0
- package/dist/modules/purchase_backend/screens/purchase-orders-list.d.ts.map +1 -0
- package/dist/modules/purchase_backend/screens/purchase-orders-list.js +26 -0
- package/dist/modules/purchase_backend/screens/purchase-orders-list.js.map +1 -0
- package/dist/modules/purchase_backend/screens/rfq-create.d.ts +16 -0
- package/dist/modules/purchase_backend/screens/rfq-create.d.ts.map +1 -0
- package/dist/modules/purchase_backend/screens/rfq-create.js +24 -0
- package/dist/modules/purchase_backend/screens/rfq-create.js.map +1 -0
- package/dist/modules/purchase_backend/screens/rfqs-list.d.ts +18 -0
- package/dist/modules/purchase_backend/screens/rfqs-list.d.ts.map +1 -0
- package/dist/modules/purchase_backend/screens/rfqs-list.js +28 -0
- package/dist/modules/purchase_backend/screens/rfqs-list.js.map +1 -0
- package/dist/modules/purchase_backend/screens/shared.d.ts +18 -0
- package/dist/modules/purchase_backend/screens/shared.d.ts.map +1 -0
- package/dist/modules/purchase_backend/screens/shared.js +30 -0
- package/dist/modules/purchase_backend/screens/shared.js.map +1 -0
- package/dist/modules/purchase_backend/screens/vendor-pricelist-create.d.ts +20 -0
- package/dist/modules/purchase_backend/screens/vendor-pricelist-create.d.ts.map +1 -0
- package/dist/modules/purchase_backend/screens/vendor-pricelist-create.js +25 -0
- package/dist/modules/purchase_backend/screens/vendor-pricelist-create.js.map +1 -0
- package/dist/modules/purchase_backend/screens/vendor-pricelists-list.d.ts +33 -0
- package/dist/modules/purchase_backend/screens/vendor-pricelists-list.d.ts.map +1 -0
- package/dist/modules/purchase_backend/screens/vendor-pricelists-list.js +73 -0
- package/dist/modules/purchase_backend/screens/vendor-pricelists-list.js.map +1 -0
- package/dist/modules/purchase_staff_channel/channel-routes.d.ts +2 -0
- package/dist/modules/purchase_staff_channel/channel-routes.d.ts.map +1 -0
- package/dist/modules/purchase_staff_channel/channel-routes.js +119 -0
- package/dist/modules/purchase_staff_channel/channel-routes.js.map +1 -0
- package/dist/modules/purchase_staff_channel/index.d.ts +8 -0
- package/dist/modules/purchase_staff_channel/index.d.ts.map +1 -0
- package/dist/modules/purchase_staff_channel/index.js +45 -0
- package/dist/modules/purchase_staff_channel/index.js.map +1 -0
- package/dist/modules/purchase_staff_channel/order-routes.d.ts +2 -0
- package/dist/modules/purchase_staff_channel/order-routes.d.ts.map +1 -0
- package/dist/modules/purchase_staff_channel/order-routes.js +743 -0
- package/dist/modules/purchase_staff_channel/order-routes.js.map +1 -0
- package/dist/modules/purchase_staff_channel/product-routes.d.ts +2 -0
- package/dist/modules/purchase_staff_channel/product-routes.d.ts.map +1 -0
- package/dist/modules/purchase_staff_channel/product-routes.js +183 -0
- package/dist/modules/purchase_staff_channel/product-routes.js.map +1 -0
- package/dist/modules/purchase_staff_channel/vendor-bill-routes.d.ts +2 -0
- package/dist/modules/purchase_staff_channel/vendor-bill-routes.d.ts.map +1 -0
- package/dist/modules/purchase_staff_channel/vendor-bill-routes.js +189 -0
- package/dist/modules/purchase_staff_channel/vendor-bill-routes.js.map +1 -0
- package/dist/modules/quality/functions.d.ts +3 -0
- package/dist/modules/quality/functions.d.ts.map +1 -0
- package/dist/modules/quality/functions.js +381 -0
- package/dist/modules/quality/functions.js.map +1 -0
- package/dist/modules/quality/index.d.ts +5 -0
- package/dist/modules/quality/index.d.ts.map +1 -0
- package/dist/modules/quality/index.js +19 -0
- package/dist/modules/quality/index.js.map +1 -0
- package/dist/modules/quality/models.d.ts +3 -0
- package/dist/modules/quality/models.d.ts.map +1 -0
- package/dist/modules/quality/models.js +91 -0
- package/dist/modules/quality/models.js.map +1 -0
- package/dist/modules/quality_staff_channel/channel-routes.d.ts +2 -0
- package/dist/modules/quality_staff_channel/channel-routes.d.ts.map +1 -0
- package/dist/modules/quality_staff_channel/channel-routes.js +484 -0
- package/dist/modules/quality_staff_channel/channel-routes.js.map +1 -0
- package/dist/modules/quality_staff_channel/index.d.ts +5 -0
- package/dist/modules/quality_staff_channel/index.d.ts.map +1 -0
- package/dist/modules/quality_staff_channel/index.js +30 -0
- package/dist/modules/quality_staff_channel/index.js.map +1 -0
- package/dist/modules/report/functions.d.ts +3 -0
- package/dist/modules/report/functions.d.ts.map +1 -0
- package/dist/modules/report/functions.js +197 -0
- package/dist/modules/report/functions.js.map +1 -0
- package/dist/modules/report/index.d.ts +3 -0
- package/dist/modules/report/index.d.ts.map +1 -0
- package/dist/modules/report/index.js +21 -0
- package/dist/modules/report/index.js.map +1 -0
- package/dist/modules/report/jobs.d.ts +3 -0
- package/dist/modules/report/jobs.d.ts.map +1 -0
- package/dist/modules/report/jobs.js +18 -0
- package/dist/modules/report/jobs.js.map +1 -0
- package/dist/modules/report/models.d.ts +3 -0
- package/dist/modules/report/models.d.ts.map +1 -0
- package/dist/modules/report/models.js +45 -0
- package/dist/modules/report/models.js.map +1 -0
- package/dist/modules/report/routes.d.ts +19 -0
- package/dist/modules/report/routes.d.ts.map +1 -0
- package/dist/modules/report/routes.js +138 -0
- package/dist/modules/report/routes.js.map +1 -0
- package/dist/modules/report_backend/index.d.ts +3 -0
- package/dist/modules/report_backend/index.d.ts.map +1 -0
- package/dist/modules/report_backend/index.js +67 -0
- package/dist/modules/report_backend/index.js.map +1 -0
- package/dist/modules/report_backend/routes.d.ts +10 -0
- package/dist/modules/report_backend/routes.d.ts.map +1 -0
- package/dist/modules/report_backend/routes.js +87 -0
- package/dist/modules/report_backend/routes.js.map +1 -0
- package/dist/modules/report_backend/screens/index.d.ts +13 -0
- package/dist/modules/report_backend/screens/index.d.ts.map +1 -0
- package/dist/modules/report_backend/screens/index.js +91 -0
- package/dist/modules/report_backend/screens/index.js.map +1 -0
- package/dist/modules/sale/functions.d.ts.map +1 -1
- package/dist/modules/sale/functions.js +806 -238
- package/dist/modules/sale/functions.js.map +1 -1
- package/dist/modules/sale/index.d.ts.map +1 -1
- package/dist/modules/sale/index.js +44 -5
- package/dist/modules/sale/index.js.map +1 -1
- package/dist/modules/sale/models.d.ts.map +1 -1
- package/dist/modules/sale/models.js +47 -1
- package/dist/modules/sale/models.js.map +1 -1
- package/dist/modules/sale/relations.d.ts.map +1 -1
- package/dist/modules/sale/relations.js +6 -0
- package/dist/modules/sale/relations.js.map +1 -1
- package/dist/modules/sale/reports.d.ts +4 -0
- package/dist/modules/sale/reports.d.ts.map +1 -0
- package/dist/modules/sale/reports.js +132 -0
- package/dist/modules/sale/reports.js.map +1 -0
- package/dist/modules/sale/scope.d.ts +31 -0
- package/dist/modules/sale/scope.d.ts.map +1 -0
- package/dist/modules/sale/scope.js +34 -0
- package/dist/modules/sale/scope.js.map +1 -0
- package/dist/modules/sale_activity_backend/index.d.ts.map +1 -1
- package/dist/modules/sale_activity_backend/index.js +0 -1
- package/dist/modules/sale_activity_backend/index.js.map +1 -1
- package/dist/modules/sale_backend/index.js +338 -121
- package/dist/modules/sale_backend/index.js.map +1 -1
- package/dist/modules/sale_backend/screens/index.d.ts +9 -0
- package/dist/modules/sale_backend/screens/index.d.ts.map +1 -0
- package/dist/modules/sale_backend/screens/index.js +9 -0
- package/dist/modules/sale_backend/screens/index.js.map +1 -0
- package/dist/modules/sale_backend/screens/invoicing-policies-list.d.ts +14 -0
- package/dist/modules/sale_backend/screens/invoicing-policies-list.d.ts.map +1 -0
- package/dist/modules/sale_backend/screens/invoicing-policies-list.js +48 -0
- package/dist/modules/sale_backend/screens/invoicing-policies-list.js.map +1 -0
- package/dist/modules/sale_backend/screens/invoicing-policy-create.d.ts +14 -0
- package/dist/modules/sale_backend/screens/invoicing-policy-create.d.ts.map +1 -0
- package/dist/modules/sale_backend/screens/invoicing-policy-create.js +38 -0
- package/dist/modules/sale_backend/screens/invoicing-policy-create.js.map +1 -0
- package/dist/modules/sale_backend/screens/order-detail.d.ts +43 -0
- package/dist/modules/sale_backend/screens/order-detail.d.ts.map +1 -0
- package/dist/modules/sale_backend/screens/order-detail.js +226 -0
- package/dist/modules/sale_backend/screens/order-detail.js.map +1 -0
- package/dist/modules/sale_backend/screens/overview.d.ts +31 -0
- package/dist/modules/sale_backend/screens/overview.d.ts.map +1 -0
- package/dist/modules/sale_backend/screens/overview.js +73 -0
- package/dist/modules/sale_backend/screens/overview.js.map +1 -0
- package/dist/modules/sale_backend/screens/quotation-create.d.ts +13 -0
- package/dist/modules/sale_backend/screens/quotation-create.d.ts.map +1 -0
- package/dist/modules/sale_backend/screens/quotation-create.js +19 -0
- package/dist/modules/sale_backend/screens/quotation-create.js.map +1 -0
- package/dist/modules/sale_backend/screens/quotations-list.d.ts +25 -0
- package/dist/modules/sale_backend/screens/quotations-list.d.ts.map +1 -0
- package/dist/modules/sale_backend/screens/quotations-list.js +96 -0
- package/dist/modules/sale_backend/screens/quotations-list.js.map +1 -0
- package/dist/modules/sale_backend/screens/sales-orders-list.d.ts +25 -0
- package/dist/modules/sale_backend/screens/sales-orders-list.d.ts.map +1 -0
- package/dist/modules/sale_backend/screens/sales-orders-list.js +100 -0
- package/dist/modules/sale_backend/screens/sales-orders-list.js.map +1 -0
- package/dist/modules/sale_backend/screens/shared.d.ts +4 -0
- package/dist/modules/sale_backend/screens/shared.d.ts.map +1 -0
- package/dist/modules/sale_backend/screens/shared.js +4 -0
- package/dist/modules/sale_backend/screens/shared.js.map +1 -0
- package/dist/modules/sale_mail_backend/index.d.ts.map +1 -1
- package/dist/modules/sale_mail_backend/index.js +0 -1
- package/dist/modules/sale_mail_backend/index.js.map +1 -1
- package/dist/modules/sale_staff_channel/channel-routes.d.ts +2 -0
- package/dist/modules/sale_staff_channel/channel-routes.d.ts.map +1 -0
- package/dist/modules/sale_staff_channel/channel-routes.js +285 -0
- package/dist/modules/sale_staff_channel/channel-routes.js.map +1 -0
- package/dist/modules/sale_staff_channel/index.d.ts +7 -0
- package/dist/modules/sale_staff_channel/index.d.ts.map +1 -0
- package/dist/modules/sale_staff_channel/index.js +44 -0
- package/dist/modules/sale_staff_channel/index.js.map +1 -0
- package/dist/modules/sale_staff_channel/order-routes.d.ts +2 -0
- package/dist/modules/sale_staff_channel/order-routes.d.ts.map +1 -0
- package/dist/modules/sale_staff_channel/order-routes.js +647 -0
- package/dist/modules/sale_staff_channel/order-routes.js.map +1 -0
- package/dist/modules/sale_staff_channel/product-routes.d.ts +2 -0
- package/dist/modules/sale_staff_channel/product-routes.d.ts.map +1 -0
- package/dist/modules/sale_staff_channel/product-routes.js +183 -0
- package/dist/modules/sale_staff_channel/product-routes.js.map +1 -0
- package/dist/modules/stock/functions.d.ts.map +1 -1
- package/dist/modules/stock/functions.js +1239 -332
- package/dist/modules/stock/functions.js.map +1 -1
- package/dist/modules/stock/index.d.ts +2 -0
- package/dist/modules/stock/index.d.ts.map +1 -1
- package/dist/modules/stock/index.js +29 -6
- package/dist/modules/stock/index.js.map +1 -1
- package/dist/modules/stock/models.d.ts.map +1 -1
- package/dist/modules/stock/models.js +1 -0
- package/dist/modules/stock/models.js.map +1 -1
- package/dist/modules/stock/reports.d.ts +4 -0
- package/dist/modules/stock/reports.d.ts.map +1 -0
- package/dist/modules/stock/reports.js +100 -0
- package/dist/modules/stock/reports.js.map +1 -0
- package/dist/modules/stock/routing.d.ts +1 -1
- package/dist/modules/stock/routing.d.ts.map +1 -1
- package/dist/modules/stock/routing.js +35 -30
- package/dist/modules/stock/routing.js.map +1 -1
- package/dist/modules/stock/scope.d.ts +23 -0
- package/dist/modules/stock/scope.d.ts.map +1 -0
- package/dist/modules/stock/scope.js +26 -0
- package/dist/modules/stock/scope.js.map +1 -0
- package/dist/modules/stock/units.d.ts +14 -0
- package/dist/modules/stock/units.d.ts.map +1 -0
- package/dist/modules/stock/units.js +50 -0
- package/dist/modules/stock/units.js.map +1 -0
- package/dist/modules/stock_activity_backend/index.d.ts.map +1 -1
- package/dist/modules/stock_activity_backend/index.js +0 -1
- package/dist/modules/stock_activity_backend/index.js.map +1 -1
- package/dist/modules/stock_backend/client/editor-view.d.mts.map +1 -1
- package/dist/modules/stock_backend/client/editor-view.mjs +12 -10
- package/dist/modules/stock_backend/client/editor-view.mjs.map +1 -1
- package/dist/modules/stock_backend/index.js +27 -20
- 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 +485 -232
- package/dist/modules/stock_backend/routes.js.map +1 -1
- package/dist/modules/stock_backend/screens/forecast.d.ts +28 -0
- package/dist/modules/stock_backend/screens/forecast.d.ts.map +1 -0
- package/dist/modules/stock_backend/screens/forecast.js +108 -0
- package/dist/modules/stock_backend/screens/forecast.js.map +1 -0
- package/dist/modules/stock_backend/screens/index.d.ts +22 -0
- package/dist/modules/stock_backend/screens/index.d.ts.map +1 -0
- package/dist/modules/stock_backend/screens/index.js +22 -0
- package/dist/modules/stock_backend/screens/index.js.map +1 -0
- package/dist/modules/stock_backend/screens/inventory.d.ts +27 -0
- package/dist/modules/stock_backend/screens/inventory.d.ts.map +1 -0
- package/dist/modules/stock_backend/screens/inventory.js +128 -0
- package/dist/modules/stock_backend/screens/inventory.js.map +1 -0
- package/dist/modules/stock_backend/screens/location-create.d.ts +15 -0
- package/dist/modules/stock_backend/screens/location-create.d.ts.map +1 -0
- package/dist/modules/stock_backend/screens/location-create.js +75 -0
- package/dist/modules/stock_backend/screens/location-create.js.map +1 -0
- package/dist/modules/stock_backend/screens/locations-list.d.ts +21 -0
- package/dist/modules/stock_backend/screens/locations-list.d.ts.map +1 -0
- package/dist/modules/stock_backend/screens/locations-list.js +62 -0
- package/dist/modules/stock_backend/screens/locations-list.js.map +1 -0
- package/dist/modules/stock_backend/screens/lot-create.d.ts +14 -0
- package/dist/modules/stock_backend/screens/lot-create.d.ts.map +1 -0
- package/dist/modules/stock_backend/screens/lot-create.js +60 -0
- package/dist/modules/stock_backend/screens/lot-create.js.map +1 -0
- package/dist/modules/stock_backend/screens/lot-detail.d.ts +30 -0
- package/dist/modules/stock_backend/screens/lot-detail.d.ts.map +1 -0
- package/dist/modules/stock_backend/screens/lot-detail.js +84 -0
- package/dist/modules/stock_backend/screens/lot-detail.js.map +1 -0
- package/dist/modules/stock_backend/screens/lots-list.d.ts +25 -0
- package/dist/modules/stock_backend/screens/lots-list.d.ts.map +1 -0
- package/dist/modules/stock_backend/screens/lots-list.js +54 -0
- package/dist/modules/stock_backend/screens/lots-list.js.map +1 -0
- package/dist/modules/stock_backend/screens/picking-type-create.d.ts +15 -0
- package/dist/modules/stock_backend/screens/picking-type-create.d.ts.map +1 -0
- package/dist/modules/stock_backend/screens/picking-type-create.js +89 -0
- package/dist/modules/stock_backend/screens/picking-type-create.js.map +1 -0
- package/dist/modules/stock_backend/screens/picking-types-list.d.ts +22 -0
- package/dist/modules/stock_backend/screens/picking-types-list.d.ts.map +1 -0
- package/dist/modules/stock_backend/screens/picking-types-list.js +80 -0
- package/dist/modules/stock_backend/screens/picking-types-list.js.map +1 -0
- package/dist/modules/stock_backend/screens/replenishment-create.d.ts +17 -0
- package/dist/modules/stock_backend/screens/replenishment-create.d.ts.map +1 -0
- package/dist/modules/stock_backend/screens/replenishment-create.js +74 -0
- package/dist/modules/stock_backend/screens/replenishment-create.js.map +1 -0
- package/dist/modules/stock_backend/screens/replenishment-list.d.ts +29 -0
- package/dist/modules/stock_backend/screens/replenishment-list.d.ts.map +1 -0
- package/dist/modules/stock_backend/screens/replenishment-list.js +84 -0
- package/dist/modules/stock_backend/screens/replenishment-list.js.map +1 -0
- package/dist/modules/stock_backend/screens/shared.d.ts +12 -0
- package/dist/modules/stock_backend/screens/shared.d.ts.map +1 -0
- package/dist/modules/stock_backend/screens/shared.js +29 -0
- package/dist/modules/stock_backend/screens/shared.js.map +1 -0
- package/dist/modules/stock_backend/screens/stock-route-create.d.ts +13 -0
- package/dist/modules/stock_backend/screens/stock-route-create.d.ts.map +1 -0
- package/dist/modules/stock_backend/screens/stock-route-create.js +52 -0
- package/dist/modules/stock_backend/screens/stock-route-create.js.map +1 -0
- package/dist/modules/stock_backend/screens/stock-route-detail.d.ts +30 -0
- package/dist/modules/stock_backend/screens/stock-route-detail.d.ts.map +1 -0
- package/dist/modules/stock_backend/screens/stock-route-detail.js +131 -0
- package/dist/modules/stock_backend/screens/stock-route-detail.js.map +1 -0
- package/dist/modules/stock_backend/screens/stock-routes-list.d.ts +22 -0
- package/dist/modules/stock_backend/screens/stock-routes-list.d.ts.map +1 -0
- package/dist/modules/stock_backend/screens/stock-routes-list.js +51 -0
- package/dist/modules/stock_backend/screens/stock-routes-list.js.map +1 -0
- package/dist/modules/stock_backend/screens/stock.d.ts +7 -0
- package/dist/modules/stock_backend/screens/stock.d.ts.map +1 -0
- package/dist/modules/stock_backend/screens/stock.js +13 -0
- package/dist/modules/stock_backend/screens/stock.js.map +1 -0
- package/dist/modules/stock_backend/screens/transfer-create.d.ts +13 -0
- package/dist/modules/stock_backend/screens/transfer-create.d.ts.map +1 -0
- package/dist/modules/stock_backend/screens/transfer-create.js +38 -0
- package/dist/modules/stock_backend/screens/transfer-create.js.map +1 -0
- package/dist/modules/stock_backend/screens/transfer-detail.d.ts +27 -0
- package/dist/modules/stock_backend/screens/transfer-detail.d.ts.map +1 -0
- package/dist/modules/stock_backend/screens/transfer-detail.js +91 -0
- package/dist/modules/stock_backend/screens/transfer-detail.js.map +1 -0
- package/dist/modules/stock_backend/screens/transfers-list.d.ts +25 -0
- package/dist/modules/stock_backend/screens/transfers-list.d.ts.map +1 -0
- package/dist/modules/stock_backend/screens/transfers-list.js +81 -0
- package/dist/modules/stock_backend/screens/transfers-list.js.map +1 -0
- package/dist/modules/stock_backend/screens/warehouse-create.d.ts +13 -0
- package/dist/modules/stock_backend/screens/warehouse-create.d.ts.map +1 -0
- package/dist/modules/stock_backend/screens/warehouse-create.js +79 -0
- package/dist/modules/stock_backend/screens/warehouse-create.js.map +1 -0
- package/dist/modules/stock_backend/screens/warehouses-list.d.ts +21 -0
- package/dist/modules/stock_backend/screens/warehouses-list.d.ts.map +1 -0
- package/dist/modules/stock_backend/screens/warehouses-list.js +60 -0
- package/dist/modules/stock_backend/screens/warehouses-list.js.map +1 -0
- package/dist/modules/stock_lot_activity_backend/index.d.ts.map +1 -1
- package/dist/modules/stock_lot_activity_backend/index.js +0 -1
- package/dist/modules/stock_lot_activity_backend/index.js.map +1 -1
- package/dist/modules/stock_lot_mail_backend/index.d.ts.map +1 -1
- package/dist/modules/stock_lot_mail_backend/index.js +0 -1
- package/dist/modules/stock_lot_mail_backend/index.js.map +1 -1
- package/dist/modules/stock_mail_backend/index.d.ts.map +1 -1
- package/dist/modules/stock_mail_backend/index.js +0 -1
- package/dist/modules/stock_mail_backend/index.js.map +1 -1
- package/dist/modules/stock_mail_inbound/index.d.ts.map +1 -1
- package/dist/modules/stock_mail_inbound/index.js +0 -2
- package/dist/modules/stock_mail_inbound/index.js.map +1 -1
- package/dist/modules/stock_staff_channel/channel-routes.d.ts +656 -0
- package/dist/modules/stock_staff_channel/channel-routes.d.ts.map +1 -0
- package/dist/modules/stock_staff_channel/channel-routes.js +445 -0
- package/dist/modules/stock_staff_channel/channel-routes.js.map +1 -0
- package/dist/modules/stock_staff_channel/functions.d.ts +3 -0
- package/dist/modules/stock_staff_channel/functions.d.ts.map +1 -0
- package/dist/modules/stock_staff_channel/functions.js +954 -0
- package/dist/modules/stock_staff_channel/functions.js.map +1 -0
- package/dist/modules/stock_staff_channel/index.d.ts +8 -0
- package/dist/modules/stock_staff_channel/index.d.ts.map +1 -0
- package/dist/modules/stock_staff_channel/index.js +37 -0
- package/dist/modules/stock_staff_channel/index.js.map +1 -0
- package/dist/modules/stock_staff_channel/models.d.ts +4 -0
- package/dist/modules/stock_staff_channel/models.d.ts.map +1 -0
- package/dist/modules/stock_staff_channel/models.js +119 -0
- package/dist/modules/stock_staff_channel/models.js.map +1 -0
- package/dist/modules/stock_staff_channel/operation-routes.d.ts +2 -0
- package/dist/modules/stock_staff_channel/operation-routes.d.ts.map +1 -0
- package/dist/modules/stock_staff_channel/operation-routes.js +1258 -0
- package/dist/modules/stock_staff_channel/operation-routes.js.map +1 -0
- package/dist/modules/storage/functions.d.ts.map +1 -1
- package/dist/modules/storage/functions.js +18 -5
- package/dist/modules/storage/functions.js.map +1 -1
- package/dist/modules/storage/index.js +0 -1
- package/dist/modules/storage/index.js.map +1 -1
- package/dist/modules/storage/jobs.d.ts +21 -1
- package/dist/modules/storage/jobs.d.ts.map +1 -1
- package/dist/modules/storage/jobs.js +142 -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 +2 -0
- package/dist/modules/storage/models.js.map +1 -1
- package/dist/modules/storage/policy.d.ts +5 -0
- package/dist/modules/storage/policy.d.ts.map +1 -0
- package/dist/modules/storage/policy.js +13 -0
- package/dist/modules/storage/policy.js.map +1 -0
- 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 +19 -15
- package/dist/modules/storage/routes.js.map +1 -1
- package/dist/modules/uom/convert.d.ts +1 -1
- package/dist/modules/uom/convert.js +2 -2
- package/dist/modules/uom/convert.js.map +1 -1
- package/dist/modules/uom/functions.d.ts.map +1 -1
- package/dist/modules/uom/functions.js +39 -4
- package/dist/modules/uom/functions.js.map +1 -1
- package/dist/modules/uom/index.d.ts.map +1 -1
- package/dist/modules/uom/index.js +1 -2
- package/dist/modules/uom/index.js.map +1 -1
- package/dist/modules/uom/messages.js +2 -2
- package/dist/modules/uom/messages.js.map +1 -1
- package/dist/modules/uom/models.d.ts +1 -1
- package/dist/modules/uom/models.d.ts.map +1 -1
- package/dist/modules/uom/models.js +1 -1
- package/dist/modules/uom/models.js.map +1 -1
- package/dist/modules/user/authorization.d.ts +80 -0
- package/dist/modules/user/authorization.d.ts.map +1 -0
- package/dist/modules/user/authorization.js +1039 -0
- package/dist/modules/user/authorization.js.map +1 -0
- package/dist/modules/user/functions.d.ts.map +1 -1
- package/dist/modules/user/functions.js +188 -32
- package/dist/modules/user/functions.js.map +1 -1
- package/dist/modules/user/index.d.ts +4 -1
- package/dist/modules/user/index.d.ts.map +1 -1
- package/dist/modules/user/index.js +2 -3
- package/dist/modules/user/index.js.map +1 -1
- package/dist/modules/user/login.d.ts +1 -27
- package/dist/modules/user/login.d.ts.map +1 -1
- package/dist/modules/user/login.js +5 -45
- package/dist/modules/user/login.js.map +1 -1
- package/dist/modules/user/messages.d.ts +6 -0
- package/dist/modules/user/messages.d.ts.map +1 -1
- package/dist/modules/user/messages.js +6 -0
- package/dist/modules/user/messages.js.map +1 -1
- package/dist/modules/user/models.d.ts +1 -1
- package/dist/modules/user/models.d.ts.map +1 -1
- package/dist/modules/user/models.js +73 -9
- package/dist/modules/user/models.js.map +1 -1
- package/dist/modules/user/relations.d.ts.map +1 -1
- package/dist/modules/user/relations.js +6 -0
- package/dist/modules/user/relations.js.map +1 -1
- package/dist/modules/user/roles.d.ts +11 -1
- package/dist/modules/user/roles.d.ts.map +1 -1
- package/dist/modules/user/roles.js +402 -117
- package/dist/modules/user/roles.js.map +1 -1
- package/dist/modules/user/routes.js +1 -1
- package/dist/modules/user/routes.js.map +1 -1
- package/dist/modules/user_backend/index.d.ts +1 -1
- package/dist/modules/user_backend/index.d.ts.map +1 -1
- package/dist/modules/user_backend/index.js +1 -3
- package/dist/modules/user_backend/index.js.map +1 -1
- package/dist/modules/user_backend/messages.d.ts +64 -0
- package/dist/modules/user_backend/messages.d.ts.map +1 -1
- package/dist/modules/user_backend/messages.js +64 -0
- package/dist/modules/user_backend/messages.js.map +1 -1
- package/dist/modules/user_backend/routes.d.ts.map +1 -1
- package/dist/modules/user_backend/routes.js +379 -69
- package/dist/modules/user_backend/routes.js.map +1 -1
- package/dist/modules/user_backend/screens/index.d.ts +11 -0
- package/dist/modules/user_backend/screens/index.d.ts.map +1 -0
- package/dist/modules/user_backend/screens/index.js +8 -0
- package/dist/modules/user_backend/screens/index.js.map +1 -0
- package/dist/modules/user_backend/screens/presets-form.d.ts +16 -0
- package/dist/modules/user_backend/screens/presets-form.d.ts.map +1 -0
- package/dist/modules/user_backend/screens/presets-form.js +37 -0
- package/dist/modules/user_backend/screens/presets-form.js.map +1 -0
- package/dist/modules/user_backend/screens/profile-form.d.ts +14 -0
- package/dist/modules/user_backend/screens/profile-form.d.ts.map +1 -0
- package/dist/modules/user_backend/screens/profile-form.js +37 -0
- package/dist/modules/user_backend/screens/profile-form.js.map +1 -0
- package/dist/modules/user_backend/screens/role-form.d.ts +21 -0
- package/dist/modules/user_backend/screens/role-form.d.ts.map +1 -0
- package/dist/modules/user_backend/screens/role-form.js +93 -0
- package/dist/modules/user_backend/screens/role-form.js.map +1 -0
- package/dist/modules/user_backend/screens/roles-list.d.ts +15 -0
- package/dist/modules/user_backend/screens/roles-list.d.ts.map +1 -0
- package/dist/modules/user_backend/screens/roles-list.js +48 -0
- package/dist/modules/user_backend/screens/roles-list.js.map +1 -0
- package/dist/modules/user_backend/screens/sessions.d.ts +5 -0
- package/dist/modules/user_backend/screens/sessions.d.ts.map +1 -0
- package/dist/modules/user_backend/screens/sessions.js +35 -0
- package/dist/modules/user_backend/screens/sessions.js.map +1 -0
- package/dist/modules/user_backend/screens/types.d.ts +68 -0
- package/dist/modules/user_backend/screens/types.d.ts.map +1 -0
- package/dist/modules/user_backend/screens/types.js +2 -0
- package/dist/modules/user_backend/screens/types.js.map +1 -0
- package/dist/modules/user_backend/screens/user-form.d.ts +56 -0
- package/dist/modules/user_backend/screens/user-form.d.ts.map +1 -0
- package/dist/modules/user_backend/screens/user-form.js +202 -0
- package/dist/modules/user_backend/screens/user-form.js.map +1 -0
- package/dist/modules/user_backend/screens/users-list.d.ts +17 -0
- package/dist/modules/user_backend/screens/users-list.d.ts.map +1 -0
- package/dist/modules/user_backend/screens/users-list.js +56 -0
- package/dist/modules/user_backend/screens/users-list.js.map +1 -0
- package/dist/modules/website/cms.d.ts +18 -1
- package/dist/modules/website/cms.d.ts.map +1 -1
- package/dist/modules/website/cms.js +655 -43
- package/dist/modules/website/cms.js.map +1 -1
- package/dist/modules/website/customer.d.ts.map +1 -1
- package/dist/modules/website/customer.js +249 -1
- 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 +38 -4
- package/dist/modules/website/index.js.map +1 -1
- package/dist/modules/website/media-usage.d.ts +38 -0
- package/dist/modules/website/media-usage.d.ts.map +1 -0
- package/dist/modules/website/media-usage.js +87 -0
- package/dist/modules/website/media-usage.js.map +1 -0
- package/dist/modules/website/models.d.ts.map +1 -1
- package/dist/modules/website/models.js +101 -0
- package/dist/modules/website/models.js.map +1 -1
- package/dist/modules/website/paths.d.ts +31 -0
- package/dist/modules/website/paths.d.ts.map +1 -0
- package/dist/modules/website/paths.js +48 -0
- package/dist/modules/website/paths.js.map +1 -0
- package/dist/modules/website/publication.d.ts +3 -0
- package/dist/modules/website/publication.d.ts.map +1 -0
- package/dist/modules/website/publication.js +366 -0
- package/dist/modules/website/publication.js.map +1 -0
- package/dist/modules/website/renderable.d.ts +32 -0
- package/dist/modules/website/renderable.d.ts.map +1 -0
- package/dist/modules/website/renderable.js +59 -0
- package/dist/modules/website/renderable.js.map +1 -0
- package/dist/modules/website/sections.d.ts.map +1 -1
- package/dist/modules/website/sections.js +25 -1
- package/dist/modules/website/sections.js.map +1 -1
- package/dist/modules/website_backend/csv.d.ts +23 -0
- package/dist/modules/website_backend/csv.d.ts.map +1 -0
- package/dist/modules/website_backend/csv.js +31 -0
- package/dist/modules/website_backend/csv.js.map +1 -0
- package/dist/modules/website_backend/index.js +398 -2
- package/dist/modules/website_backend/index.js.map +1 -1
- package/dist/modules/website_backend/menus.d.ts.map +1 -1
- package/dist/modules/website_backend/menus.js +39 -6
- package/dist/modules/website_backend/menus.js.map +1 -1
- package/dist/modules/website_backend/routes.d.ts.map +1 -1
- package/dist/modules/website_backend/routes.js +1079 -138
- package/dist/modules/website_backend/routes.js.map +1 -1
- package/dist/modules/website_backend/screens/index.d.ts +425 -0
- package/dist/modules/website_backend/screens/index.d.ts.map +1 -0
- package/dist/modules/website_backend/screens/index.js +1778 -0
- package/dist/modules/website_backend/screens/index.js.map +1 -0
- package/dist/modules/website_backend/screens/page-frame.d.ts +16 -0
- package/dist/modules/website_backend/screens/page-frame.d.ts.map +1 -0
- package/dist/modules/website_backend/screens/page-frame.js +13 -0
- package/dist/modules/website_backend/screens/page-frame.js.map +1 -0
- package/dist/modules/website_form/audit.d.ts +27 -0
- package/dist/modules/website_form/audit.d.ts.map +1 -0
- package/dist/modules/website_form/audit.js +30 -0
- package/dist/modules/website_form/audit.js.map +1 -0
- package/dist/modules/website_form/functions.d.ts.map +1 -1
- package/dist/modules/website_form/functions.js +416 -12
- package/dist/modules/website_form/functions.js.map +1 -1
- package/dist/modules/website_form/index.js +24 -2
- package/dist/modules/website_form/index.js.map +1 -1
- package/dist/modules/website_form/jobs.d.ts +11 -0
- package/dist/modules/website_form/jobs.d.ts.map +1 -0
- package/dist/modules/website_form/jobs.js +80 -0
- package/dist/modules/website_form/jobs.js.map +1 -0
- package/dist/modules/website_form/models.d.ts.map +1 -1
- package/dist/modules/website_form/models.js +89 -0
- package/dist/modules/website_form/models.js.map +1 -1
- package/dist/modules/website_form/purge.d.ts +22 -0
- package/dist/modules/website_form/purge.d.ts.map +1 -0
- package/dist/modules/website_form/purge.js +59 -0
- package/dist/modules/website_form/purge.js.map +1 -0
- package/dist/modules/website_form/retention.d.ts +70 -0
- package/dist/modules/website_form/retention.d.ts.map +1 -0
- package/dist/modules/website_form/retention.js +145 -0
- package/dist/modules/website_form/retention.js.map +1 -0
- package/dist/modules/website_form/routes.d.ts.map +1 -1
- package/dist/modules/website_form/routes.js +37 -3
- package/dist/modules/website_form/routes.js.map +1 -1
- package/dist/modules/website_form_mail/index.d.ts +36 -0
- package/dist/modules/website_form_mail/index.d.ts.map +1 -0
- package/dist/modules/website_form_mail/index.js +137 -0
- package/dist/modules/website_form_mail/index.js.map +1 -0
- package/dist/modules/website_hospitality/channel-routes.d.ts +2 -0
- package/dist/modules/website_hospitality/channel-routes.d.ts.map +1 -0
- package/dist/modules/website_hospitality/channel-routes.js +355 -0
- package/dist/modules/website_hospitality/channel-routes.js.map +1 -0
- package/dist/modules/website_hospitality/functions.d.ts.map +1 -1
- package/dist/modules/website_hospitality/functions.js +27 -2
- package/dist/modules/website_hospitality/functions.js.map +1 -1
- package/dist/modules/website_hospitality/index.js +4 -3
- package/dist/modules/website_hospitality/index.js.map +1 -1
- package/dist/modules/website_hospitality/models.d.ts.map +1 -1
- package/dist/modules/website_hospitality/models.js +2 -0
- package/dist/modules/website_hospitality/models.js.map +1 -1
- package/dist/modules/website_menu/functions.d.ts.map +1 -1
- package/dist/modules/website_menu/functions.js +235 -9
- package/dist/modules/website_menu/functions.js.map +1 -1
- package/dist/modules/website_menu/index.js +8 -1
- package/dist/modules/website_menu/index.js.map +1 -1
- package/dist/modules/website_retail/channel-routes.d.ts +2 -0
- package/dist/modules/website_retail/channel-routes.d.ts.map +1 -0
- package/dist/modules/website_retail/channel-routes.js +305 -0
- package/dist/modules/website_retail/channel-routes.js.map +1 -0
- package/dist/modules/website_retail/functions.d.ts +14 -1
- package/dist/modules/website_retail/functions.d.ts.map +1 -1
- package/dist/modules/website_retail/functions.js +6 -6
- package/dist/modules/website_retail/functions.js.map +1 -1
- package/dist/modules/website_retail/index.js +24 -3
- package/dist/modules/website_retail/index.js.map +1 -1
- package/dist/modules/website_retail/models.d.ts.map +1 -1
- package/dist/modules/website_retail/models.js +30 -0
- package/dist/modules/website_retail/models.js.map +1 -1
- package/dist/modules/website_retail/online.d.ts +3 -0
- package/dist/modules/website_retail/online.d.ts.map +1 -0
- package/dist/modules/website_retail/online.js +710 -0
- package/dist/modules/website_retail/online.js.map +1 -0
- package/dist/modules/website_search/client/search.d.mts +16 -2
- package/dist/modules/website_search/client/search.d.mts.map +1 -1
- package/dist/modules/website_search/client/search.mjs +112 -6
- package/dist/modules/website_search/client/search.mjs.map +1 -1
- package/dist/modules/website_search/functions.d.ts +3 -0
- package/dist/modules/website_search/functions.d.ts.map +1 -0
- package/dist/modules/website_search/functions.js +129 -0
- package/dist/modules/website_search/functions.js.map +1 -0
- package/dist/modules/website_search/index.js +6 -1
- package/dist/modules/website_search/index.js.map +1 -1
- package/dist/modules/website_search/islands.d.ts +6 -0
- package/dist/modules/website_search/islands.d.ts.map +1 -1
- package/dist/modules/website_search/islands.js +8 -2
- package/dist/modules/website_search/islands.js.map +1 -1
- package/dist/modules/website_search/jobs.d.ts +3 -0
- package/dist/modules/website_search/jobs.d.ts.map +1 -0
- package/dist/modules/website_search/jobs.js +101 -0
- package/dist/modules/website_search/jobs.js.map +1 -0
- package/dist/modules/website_search/models.d.ts +15 -0
- package/dist/modules/website_search/models.d.ts.map +1 -0
- package/dist/modules/website_search/models.js +58 -0
- package/dist/modules/website_search/models.js.map +1 -0
- package/dist/modules/website_search/rebuild.d.ts +33 -0
- package/dist/modules/website_search/rebuild.d.ts.map +1 -0
- package/dist/modules/website_search/rebuild.js +125 -0
- package/dist/modules/website_search/rebuild.js.map +1 -0
- package/dist/modules/website_seo/functions.d.ts +3 -0
- package/dist/modules/website_seo/functions.d.ts.map +1 -0
- package/dist/modules/website_seo/functions.js +164 -0
- package/dist/modules/website_seo/functions.js.map +1 -0
- package/dist/modules/website_seo/index.js +15 -5
- package/dist/modules/website_seo/index.js.map +1 -1
- package/dist/modules/website_seo/projection.d.ts +52 -0
- package/dist/modules/website_seo/projection.d.ts.map +1 -0
- package/dist/modules/website_seo/projection.js +129 -0
- package/dist/modules/website_seo/projection.js.map +1 -0
- package/dist/modules/website_seo/routes.d.ts +3 -0
- package/dist/modules/website_seo/routes.d.ts.map +1 -0
- package/dist/modules/website_seo/routes.js +56 -0
- package/dist/modules/website_seo/routes.js.map +1 -0
- package/dist/permission-catalogue.d.ts +5 -0
- package/dist/permission-catalogue.d.ts.map +1 -0
- package/dist/permission-catalogue.js +1518 -0
- package/dist/permission-catalogue.js.map +1 -0
- package/dist/scaffold/index.d.ts +2 -0
- package/dist/scaffold/index.d.ts.map +1 -0
- package/dist/scaffold/index.js +31 -0
- package/dist/scaffold/index.js.map +1 -0
- package/dist/scaffold/templates/README.md.tmpl +17 -0
- package/dist/scaffold/templates/gitignore.tmpl +2 -0
- package/dist/scaffold/templates/ket.workspace.mjs.tmpl +1 -0
- package/dist/scaffold/templates/package.json.tmpl +15 -0
- package/dist/themes/hospitality/templates/website.columns.ktl +4 -0
- package/dist/themes/paper/templates/website.columns.ktl +4 -0
- package/dist/ui/actions.d.ts +4 -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/activity.d.ts +1 -1
- package/dist/ui/activity.d.ts.map +1 -1
- package/dist/ui/activity.js +3 -5
- package/dist/ui/activity.js.map +1 -1
- package/dist/ui/attachments.js +1 -1
- package/dist/ui/attachments.js.map +1 -1
- package/dist/ui/auth.d.ts +36 -0
- package/dist/ui/auth.d.ts.map +1 -1
- package/dist/ui/auth.js +55 -0
- package/dist/ui/auth.js.map +1 -1
- package/dist/ui/board-page.d.ts +6 -0
- package/dist/ui/board-page.d.ts.map +1 -0
- package/dist/ui/board-page.js +4 -0
- package/dist/ui/board-page.js.map +1 -0
- package/dist/ui/charts.d.ts +83 -0
- package/dist/ui/charts.d.ts.map +1 -0
- package/dist/ui/charts.js +105 -0
- package/dist/ui/charts.js.map +1 -0
- package/dist/ui/chrome.d.ts +45 -2
- package/dist/ui/chrome.d.ts.map +1 -1
- package/dist/ui/chrome.js +47 -5
- package/dist/ui/chrome.js.map +1 -1
- package/dist/ui/client/activity-view.mjs +7 -7
- package/dist/ui/client/activity-view.mjs.map +1 -1
- package/dist/ui/client/activity.css +6 -34
- package/dist/ui/client/calendar-view.d.mts.map +1 -1
- package/dist/ui/client/calendar-view.mjs +7 -6
- package/dist/ui/client/calendar-view.mjs.map +1 -1
- package/dist/ui/client/calendar.css +4 -14
- package/dist/ui/client/chart-view.d.ts +51 -0
- package/dist/ui/client/chart-view.d.ts.map +1 -0
- package/dist/ui/client/chart-view.js +192 -0
- package/dist/ui/client/chart-view.js.map +1 -0
- package/dist/ui/client/flow-app.css +387 -0
- package/dist/ui/client/flow-board-view.d.mts +8 -0
- package/dist/ui/client/flow-board-view.d.mts.map +1 -0
- package/dist/ui/client/flow-board-view.mjs +161 -0
- package/dist/ui/client/flow-board-view.mjs.map +1 -0
- package/dist/ui/client/flow-board.d.mts +3 -0
- package/dist/ui/client/flow-board.d.mts.map +1 -0
- package/dist/ui/client/flow-board.mjs +7 -0
- package/dist/ui/client/flow-board.mjs.map +1 -0
- package/dist/ui/client/flow-map-view.d.mts +2 -0
- package/dist/ui/client/flow-map-view.d.mts.map +1 -0
- package/dist/ui/client/flow-map-view.mjs +235 -0
- package/dist/ui/client/flow-map-view.mjs.map +1 -0
- package/dist/ui/client/flow-map.d.mts +3 -0
- package/dist/ui/client/flow-map.d.mts.map +1 -0
- package/dist/ui/client/flow-map.mjs +7 -0
- package/dist/ui/client/flow-map.mjs.map +1 -0
- package/dist/ui/client/live-doc-blocks.d.ts +19 -0
- package/dist/ui/client/live-doc-blocks.d.ts.map +1 -0
- package/dist/ui/client/live-doc-blocks.js +23 -0
- package/dist/ui/client/live-doc-blocks.js.map +1 -0
- package/dist/ui/client/live-doc-markdown.d.ts +18 -0
- package/dist/ui/client/live-doc-markdown.d.ts.map +1 -0
- package/dist/ui/client/live-doc-markdown.js +175 -0
- package/dist/ui/client/live-doc-markdown.js.map +1 -0
- package/dist/ui/client/live-doc-shell.d.ts +101 -0
- package/dist/ui/client/live-doc-shell.d.ts.map +1 -0
- package/dist/ui/client/live-doc-shell.js +251 -0
- package/dist/ui/client/live-doc-shell.js.map +1 -0
- package/dist/ui/client/live-doc-view.d.ts +33 -0
- package/dist/ui/client/live-doc-view.d.ts.map +1 -0
- package/dist/ui/client/live-doc-view.js +1237 -0
- package/dist/ui/client/live-doc-view.js.map +1 -0
- package/dist/ui/client/live-doc.css +243 -0
- package/dist/ui/client/live-doc.d.mts +12 -0
- package/dist/ui/client/live-doc.d.mts.map +1 -0
- package/dist/ui/client/live-doc.mjs +11 -0
- package/dist/ui/client/live-doc.mjs.map +7 -0
- package/dist/ui/client/mail-bundle.d.mts +9 -0
- package/dist/ui/client/mail-bundle.d.mts.map +1 -0
- package/dist/ui/client/mail-bundle.mjs +50 -0
- package/dist/ui/client/mail-bundle.mjs.map +7 -0
- package/dist/ui/client/mail-entry.d.mts +11 -0
- package/dist/ui/client/mail-entry.d.mts.map +1 -0
- package/dist/ui/client/mail-entry.mjs +9 -0
- package/dist/ui/client/mail-entry.mjs.map +1 -0
- package/dist/ui/client/mail-view.d.mts.map +1 -1
- package/dist/ui/client/mail-view.mjs +5 -3
- package/dist/ui/client/mail-view.mjs.map +1 -1
- package/dist/ui/client/mail.css +3 -3
- package/dist/ui/client/relation-select-view.d.ts +77 -0
- package/dist/ui/client/relation-select-view.d.ts.map +1 -0
- package/dist/ui/client/relation-select-view.js +216 -0
- package/dist/ui/client/relation-select-view.js.map +1 -0
- package/dist/ui/client/table-selection-view.d.ts +4 -0
- package/dist/ui/client/table-selection-view.d.ts.map +1 -0
- package/dist/ui/client/table-selection-view.js +345 -0
- package/dist/ui/client/table-selection-view.js.map +1 -0
- package/dist/ui/dashboard-page.d.ts +6 -0
- package/dist/ui/dashboard-page.d.ts.map +1 -0
- package/dist/ui/dashboard-page.js +4 -0
- package/dist/ui/dashboard-page.js.map +1 -0
- package/dist/ui/data.d.ts +51 -1
- package/dist/ui/data.d.ts.map +1 -1
- package/dist/ui/data.js +87 -1
- package/dist/ui/data.js.map +1 -1
- package/dist/ui/date-picker.d.ts.map +1 -1
- package/dist/ui/date-picker.js +2 -2
- package/dist/ui/date-picker.js.map +1 -1
- package/dist/ui/form-page.d.ts +6 -0
- package/dist/ui/form-page.d.ts.map +1 -0
- package/dist/ui/form-page.js +5 -0
- package/dist/ui/form-page.js.map +1 -0
- package/dist/ui/form.d.ts +6 -1
- package/dist/ui/form.d.ts.map +1 -1
- package/dist/ui/form.js +8 -5
- package/dist/ui/form.js.map +1 -1
- package/dist/ui/format.d.ts +13 -2
- package/dist/ui/format.d.ts.map +1 -1
- package/dist/ui/format.js +28 -7
- package/dist/ui/format.js.map +1 -1
- package/dist/ui/gantt.d.ts +52 -0
- package/dist/ui/gantt.d.ts.map +1 -0
- package/dist/ui/gantt.js +92 -0
- package/dist/ui/gantt.js.map +1 -0
- package/dist/ui/hooks.d.ts.map +1 -1
- package/dist/ui/hooks.js +14 -0
- package/dist/ui/hooks.js.map +1 -1
- package/dist/ui/icons.d.ts.map +1 -1
- package/dist/ui/icons.js +6 -1
- package/dist/ui/icons.js.map +1 -1
- package/dist/ui/index.d.ts +96 -15
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +79 -14
- package/dist/ui/index.js.map +1 -1
- package/dist/ui/layout.d.ts +43 -38
- package/dist/ui/layout.d.ts.map +1 -1
- package/dist/ui/layout.js +29 -37
- package/dist/ui/layout.js.map +1 -1
- package/dist/ui/list-page.d.ts +19 -0
- package/dist/ui/list-page.d.ts.map +1 -0
- package/dist/ui/list-page.js +21 -0
- package/dist/ui/list-page.js.map +1 -0
- package/dist/ui/media.d.ts.map +1 -1
- package/dist/ui/media.js +1 -1
- package/dist/ui/media.js.map +1 -1
- package/dist/ui/modal.d.ts +26 -1
- package/dist/ui/modal.d.ts.map +1 -1
- package/dist/ui/modal.js +18 -2
- package/dist/ui/modal.js.map +1 -1
- package/dist/ui/nav.d.ts +21 -1
- package/dist/ui/nav.d.ts.map +1 -1
- package/dist/ui/nav.js +43 -8
- package/dist/ui/nav.js.map +1 -1
- package/dist/ui/navigation.d.ts +36 -2
- package/dist/ui/navigation.d.ts.map +1 -1
- package/dist/ui/navigation.js +60 -5
- package/dist/ui/navigation.js.map +1 -1
- package/dist/ui/partner.d.ts +18 -0
- package/dist/ui/partner.d.ts.map +1 -0
- package/dist/ui/partner.js +11 -0
- package/dist/ui/partner.js.map +1 -0
- package/dist/ui/primitives.d.ts +28 -10
- package/dist/ui/primitives.d.ts.map +1 -1
- package/dist/ui/primitives.js +21 -7
- package/dist/ui/primitives.js.map +1 -1
- package/dist/ui/product-media.d.ts +47 -0
- package/dist/ui/product-media.d.ts.map +1 -0
- package/dist/ui/product-media.js +67 -0
- package/dist/ui/product-media.js.map +1 -0
- package/dist/ui/product-variants.d.ts +68 -0
- package/dist/ui/product-variants.d.ts.map +1 -0
- package/dist/ui/product-variants.js +81 -0
- package/dist/ui/product-variants.js.map +1 -0
- package/dist/ui/record-detail.d.ts +70 -0
- package/dist/ui/record-detail.d.ts.map +1 -0
- package/dist/ui/record-detail.js +35 -0
- package/dist/ui/record-detail.js.map +1 -0
- package/dist/ui/record-page.d.ts +16 -0
- package/dist/ui/record-page.d.ts.map +1 -0
- package/dist/ui/record-page.js +13 -0
- package/dist/ui/record-page.js.map +1 -0
- package/dist/ui/record.d.ts +15 -3
- package/dist/ui/record.d.ts.map +1 -1
- package/dist/ui/record.js +6 -5
- package/dist/ui/record.js.map +1 -1
- package/dist/ui/state.d.ts +20 -1
- package/dist/ui/state.d.ts.map +1 -1
- package/dist/ui/state.js +17 -0
- package/dist/ui/state.js.map +1 -1
- package/dist/ui/surfaces.d.ts +30 -2
- package/dist/ui/surfaces.d.ts.map +1 -1
- package/dist/ui/surfaces.js +39 -2
- package/dist/ui/surfaces.js.map +1 -1
- package/dist/ui/table.d.ts +25 -2
- package/dist/ui/table.d.ts.map +1 -1
- package/dist/ui/table.js +10 -6
- package/dist/ui/table.js.map +1 -1
- package/dist/ui/timeframe.d.ts +39 -0
- package/dist/ui/timeframe.d.ts.map +1 -0
- package/dist/ui/timeframe.js +36 -0
- package/dist/ui/timeframe.js.map +1 -0
- package/dist/ui/workspace-page.d.ts +16 -0
- package/dist/ui/workspace-page.d.ts.map +1 -0
- package/dist/ui/workspace-page.js +15 -0
- package/dist/ui/workspace-page.js.map +1 -0
- package/package.json +16 -3
- package/dist/modules/account/tt99.d.ts +0 -30
- package/dist/modules/account/tt99.d.ts.map +0 -1
- package/dist/modules/account/tt99.js +0 -1661
- package/dist/modules/account/tt99.js.map +0 -1
- package/dist/modules/account_backend/accounting-overview-screen.d.ts +0 -18
- package/dist/modules/account_backend/accounting-overview-screen.d.ts.map +0 -1
- package/dist/modules/account_backend/accounting-overview-screen.js +0 -104
- package/dist/modules/account_backend/accounting-overview-screen.js.map +0 -1
- package/dist/modules/account_backend/accounts-screen.d.ts +0 -13
- package/dist/modules/account_backend/accounts-screen.d.ts.map +0 -1
- package/dist/modules/account_backend/accounts-screen.js +0 -49
- package/dist/modules/account_backend/accounts-screen.js.map +0 -1
- package/dist/modules/account_backend/customer-invoices-screen.d.ts +0 -14
- package/dist/modules/account_backend/customer-invoices-screen.d.ts.map +0 -1
- package/dist/modules/account_backend/customer-invoices-screen.js +0 -63
- package/dist/modules/account_backend/customer-invoices-screen.js.map +0 -1
- package/dist/modules/account_backend/general-ledger-screen.d.ts +0 -13
- package/dist/modules/account_backend/general-ledger-screen.d.ts.map +0 -1
- package/dist/modules/account_backend/general-ledger-screen.js +0 -56
- package/dist/modules/account_backend/general-ledger-screen.js.map +0 -1
- package/dist/modules/account_backend/journal-entries-screen.d.ts +0 -14
- package/dist/modules/account_backend/journal-entries-screen.d.ts.map +0 -1
- package/dist/modules/account_backend/journal-entries-screen.js +0 -45
- package/dist/modules/account_backend/journal-entries-screen.js.map +0 -1
- package/dist/modules/account_backend/journals-screen.d.ts +0 -14
- package/dist/modules/account_backend/journals-screen.d.ts.map +0 -1
- package/dist/modules/account_backend/journals-screen.js +0 -53
- package/dist/modules/account_backend/journals-screen.js.map +0 -1
- package/dist/modules/account_backend/move-detail-screen.d.ts +0 -10
- package/dist/modules/account_backend/move-detail-screen.d.ts.map +0 -1
- package/dist/modules/account_backend/move-detail-screen.js +0 -100
- package/dist/modules/account_backend/move-detail-screen.js.map +0 -1
- package/dist/modules/account_backend/partner-ledger-screen.d.ts +0 -14
- package/dist/modules/account_backend/partner-ledger-screen.d.ts.map +0 -1
- package/dist/modules/account_backend/partner-ledger-screen.js +0 -69
- package/dist/modules/account_backend/partner-ledger-screen.js.map +0 -1
- package/dist/modules/account_backend/payment-terms-screen.d.ts +0 -14
- package/dist/modules/account_backend/payment-terms-screen.d.ts.map +0 -1
- package/dist/modules/account_backend/payment-terms-screen.js +0 -40
- package/dist/modules/account_backend/payment-terms-screen.js.map +0 -1
- package/dist/modules/account_backend/payments-screen.d.ts +0 -14
- package/dist/modules/account_backend/payments-screen.d.ts.map +0 -1
- package/dist/modules/account_backend/payments-screen.js +0 -54
- package/dist/modules/account_backend/payments-screen.js.map +0 -1
- package/dist/modules/account_backend/screens.d.ts +0 -7
- package/dist/modules/account_backend/screens.d.ts.map +0 -1
- package/dist/modules/account_backend/screens.js +0 -7
- package/dist/modules/account_backend/screens.js.map +0 -1
- package/dist/modules/account_backend/taxes-screen.d.ts +0 -15
- package/dist/modules/account_backend/taxes-screen.d.ts.map +0 -1
- package/dist/modules/account_backend/taxes-screen.js +0 -73
- package/dist/modules/account_backend/taxes-screen.js.map +0 -1
- package/dist/modules/account_backend/trial-balance-screen.d.ts +0 -13
- package/dist/modules/account_backend/trial-balance-screen.d.ts.map +0 -1
- package/dist/modules/account_backend/trial-balance-screen.js +0 -62
- package/dist/modules/account_backend/trial-balance-screen.js.map +0 -1
- package/dist/modules/account_backend/vendor-bills-screen.d.ts +0 -14
- package/dist/modules/account_backend/vendor-bills-screen.d.ts.map +0 -1
- package/dist/modules/account_backend/vendor-bills-screen.js +0 -59
- package/dist/modules/account_backend/vendor-bills-screen.js.map +0 -1
- package/dist/modules/account_partner_backend/screens.d.ts +0 -16
- package/dist/modules/account_partner_backend/screens.d.ts.map +0 -1
- package/dist/modules/account_partner_backend/screens.js +0 -26
- package/dist/modules/account_partner_backend/screens.js.map +0 -1
- package/dist/modules/activity_backend/screens.d.ts +0 -5
- package/dist/modules/activity_backend/screens.d.ts.map +0 -1
- package/dist/modules/activity_backend/screens.js +0 -52
- package/dist/modules/activity_backend/screens.js.map +0 -1
- package/dist/modules/address_backend/screens.d.ts +0 -31
- package/dist/modules/address_backend/screens.d.ts.map +0 -1
- package/dist/modules/address_backend/screens.js +0 -147
- package/dist/modules/address_backend/screens.js.map +0 -1
- package/dist/modules/backend/design/admin.css +0 -4229
- package/dist/modules/backend/design/client/relation-select-view.d.mts +0 -5
- package/dist/modules/backend/design/client/relation-select-view.d.mts.map +0 -1
- package/dist/modules/backend/design/client/relation-select-view.mjs +0 -335
- package/dist/modules/backend/design/client/relation-select-view.mjs.map +0 -1
- package/dist/modules/calendar_backend/screens.d.ts +0 -5
- package/dist/modules/calendar_backend/screens.d.ts.map +0 -1
- package/dist/modules/calendar_backend/screens.js +0 -4
- package/dist/modules/calendar_backend/screens.js.map +0 -1
- package/dist/modules/company_backend/screens.d.ts +0 -62
- package/dist/modules/company_backend/screens.d.ts.map +0 -1
- package/dist/modules/company_backend/screens.js +0 -268
- package/dist/modules/company_backend/screens.js.map +0 -1
- package/dist/modules/crm_backend/list-search.d.ts +0 -21
- package/dist/modules/crm_backend/list-search.d.ts.map +0 -1
- package/dist/modules/crm_backend/list-search.js +0 -220
- package/dist/modules/crm_backend/list-search.js.map +0 -1
- package/dist/modules/crm_backend/screens.d.ts +0 -32
- package/dist/modules/crm_backend/screens.d.ts.map +0 -1
- package/dist/modules/crm_backend/screens.js +0 -405
- package/dist/modules/crm_backend/screens.js.map +0 -1
- package/dist/modules/hospitality_core/screens.d.ts +0 -773
- package/dist/modules/hospitality_core/screens.d.ts.map +0 -1
- package/dist/modules/hospitality_core/screens.js +0 -4152
- package/dist/modules/hospitality_core/screens.js.map +0 -1
- package/dist/modules/hr_backend/screens.d.ts +0 -9
- package/dist/modules/hr_backend/screens.d.ts.map +0 -1
- package/dist/modules/hr_backend/screens.js +0 -144
- package/dist/modules/hr_backend/screens.js.map +0 -1
- package/dist/modules/loyalty_backend/screens.d.ts +0 -33
- package/dist/modules/loyalty_backend/screens.d.ts.map +0 -1
- package/dist/modules/loyalty_backend/screens.js +0 -562
- package/dist/modules/loyalty_backend/screens.js.map +0 -1
- package/dist/modules/mail_backend/screens.d.ts +0 -5
- package/dist/modules/mail_backend/screens.d.ts.map +0 -1
- package/dist/modules/mail_backend/screens.js +0 -11
- package/dist/modules/mail_backend/screens.js.map +0 -1
- package/dist/modules/mail_inbound_backend/screens.d.ts +0 -5
- package/dist/modules/mail_inbound_backend/screens.d.ts.map +0 -1
- package/dist/modules/mail_inbound_backend/screens.js +0 -25
- package/dist/modules/mail_inbound_backend/screens.js.map +0 -1
- package/dist/modules/mail_transport_backend/screens.d.ts +0 -5
- package/dist/modules/mail_transport_backend/screens.d.ts.map +0 -1
- package/dist/modules/mail_transport_backend/screens.js +0 -35
- package/dist/modules/mail_transport_backend/screens.js.map +0 -1
- package/dist/modules/oauth_backend/screens.d.ts +0 -66
- package/dist/modules/oauth_backend/screens.d.ts.map +0 -1
- package/dist/modules/oauth_backend/screens.js +0 -323
- package/dist/modules/oauth_backend/screens.js.map +0 -1
- package/dist/modules/odoo_collaboration_import/functions.d.ts.map +0 -1
- package/dist/modules/odoo_collaboration_import/functions.js +0 -128
- package/dist/modules/odoo_collaboration_import/functions.js.map +0 -1
- package/dist/modules/odoo_collaboration_import/index.d.ts +0 -6
- package/dist/modules/odoo_collaboration_import/index.d.ts.map +0 -1
- package/dist/modules/odoo_collaboration_import/index.js +0 -31
- package/dist/modules/odoo_collaboration_import/index.js.map +0 -1
- package/dist/modules/odoo_collaboration_import/models.d.ts.map +0 -1
- package/dist/modules/odoo_collaboration_import/models.js +0 -76
- package/dist/modules/odoo_collaboration_import/models.js.map +0 -1
- package/dist/modules/odoo_collaboration_import/operations.d.ts +0 -14
- package/dist/modules/odoo_collaboration_import/operations.d.ts.map +0 -1
- package/dist/modules/odoo_collaboration_import/operations.js +0 -1139
- package/dist/modules/odoo_collaboration_import/operations.js.map +0 -1
- package/dist/modules/odoo_collaboration_import/relations.d.ts.map +0 -1
- package/dist/modules/odoo_collaboration_import/relations.js +0 -19
- package/dist/modules/odoo_collaboration_import/relations.js.map +0 -1
- package/dist/modules/odoo_collaboration_import/types.d.ts +0 -58
- package/dist/modules/odoo_collaboration_import/types.d.ts.map +0 -1
- package/dist/modules/odoo_collaboration_import/types.js.map +0 -1
- package/dist/modules/partner_backend/screens.d.ts +0 -53
- package/dist/modules/partner_backend/screens.d.ts.map +0 -1
- package/dist/modules/partner_backend/screens.js +0 -169
- package/dist/modules/partner_backend/screens.js.map +0 -1
- package/dist/modules/pricing_backend/screens.d.ts +0 -13
- package/dist/modules/pricing_backend/screens.d.ts.map +0 -1
- package/dist/modules/pricing_backend/screens.js +0 -182
- package/dist/modules/pricing_backend/screens.js.map +0 -1
- package/dist/modules/product_backend/attributes-screen.d.ts +0 -7
- package/dist/modules/product_backend/attributes-screen.d.ts.map +0 -1
- package/dist/modules/product_backend/attributes-screen.js +0 -76
- package/dist/modules/product_backend/attributes-screen.js.map +0 -1
- package/dist/modules/product_backend/create-screen.d.ts +0 -12
- package/dist/modules/product_backend/create-screen.d.ts.map +0 -1
- package/dist/modules/product_backend/create-screen.js +0 -83
- package/dist/modules/product_backend/create-screen.js.map +0 -1
- package/dist/modules/product_backend/screens.d.ts +0 -68
- package/dist/modules/product_backend/screens.d.ts.map +0 -1
- package/dist/modules/product_backend/screens.js +0 -388
- package/dist/modules/product_backend/screens.js.map +0 -1
- package/dist/modules/purchase_backend/screens.d.ts +0 -29
- package/dist/modules/purchase_backend/screens.d.ts.map +0 -1
- package/dist/modules/purchase_backend/screens.js +0 -324
- package/dist/modules/purchase_backend/screens.js.map +0 -1
- package/dist/modules/sale_backend/invoicing-policies-screen.d.ts +0 -14
- package/dist/modules/sale_backend/invoicing-policies-screen.d.ts.map +0 -1
- package/dist/modules/sale_backend/invoicing-policies-screen.js +0 -36
- package/dist/modules/sale_backend/invoicing-policies-screen.js.map +0 -1
- package/dist/modules/sale_backend/order-detail-screen.d.ts +0 -18
- package/dist/modules/sale_backend/order-detail-screen.d.ts.map +0 -1
- package/dist/modules/sale_backend/order-detail-screen.js +0 -217
- package/dist/modules/sale_backend/order-detail-screen.js.map +0 -1
- package/dist/modules/sale_backend/quotations-screen.d.ts +0 -15
- package/dist/modules/sale_backend/quotations-screen.d.ts.map +0 -1
- package/dist/modules/sale_backend/quotations-screen.js +0 -64
- package/dist/modules/sale_backend/quotations-screen.js.map +0 -1
- package/dist/modules/sale_backend/sales-orders-screen.d.ts +0 -12
- package/dist/modules/sale_backend/sales-orders-screen.d.ts.map +0 -1
- package/dist/modules/sale_backend/sales-orders-screen.js +0 -65
- package/dist/modules/sale_backend/sales-orders-screen.js.map +0 -1
- package/dist/modules/sale_backend/screens.d.ts +0 -23
- package/dist/modules/sale_backend/screens.d.ts.map +0 -1
- package/dist/modules/sale_backend/screens.js +0 -275
- package/dist/modules/sale_backend/screens.js.map +0 -1
- package/dist/modules/stock_backend/forecast-screen.d.ts +0 -28
- package/dist/modules/stock_backend/forecast-screen.d.ts.map +0 -1
- package/dist/modules/stock_backend/forecast-screen.js +0 -108
- package/dist/modules/stock_backend/forecast-screen.js.map +0 -1
- package/dist/modules/stock_backend/inventory-screen.d.ts +0 -27
- package/dist/modules/stock_backend/inventory-screen.d.ts.map +0 -1
- package/dist/modules/stock_backend/inventory-screen.js +0 -141
- package/dist/modules/stock_backend/inventory-screen.js.map +0 -1
- package/dist/modules/stock_backend/locations-screen.d.ts +0 -18
- package/dist/modules/stock_backend/locations-screen.d.ts.map +0 -1
- package/dist/modules/stock_backend/locations-screen.js +0 -92
- package/dist/modules/stock_backend/locations-screen.js.map +0 -1
- package/dist/modules/stock_backend/lot-screen.d.ts +0 -30
- package/dist/modules/stock_backend/lot-screen.d.ts.map +0 -1
- package/dist/modules/stock_backend/lot-screen.js +0 -86
- package/dist/modules/stock_backend/lot-screen.js.map +0 -1
- package/dist/modules/stock_backend/lots-screen.d.ts +0 -21
- package/dist/modules/stock_backend/lots-screen.d.ts.map +0 -1
- package/dist/modules/stock_backend/lots-screen.js +0 -79
- package/dist/modules/stock_backend/lots-screen.js.map +0 -1
- package/dist/modules/stock_backend/picking-types-screen.d.ts +0 -21
- package/dist/modules/stock_backend/picking-types-screen.d.ts.map +0 -1
- package/dist/modules/stock_backend/picking-types-screen.js +0 -110
- package/dist/modules/stock_backend/picking-types-screen.js.map +0 -1
- package/dist/modules/stock_backend/replenishment-screen.d.ts +0 -29
- package/dist/modules/stock_backend/replenishment-screen.d.ts.map +0 -1
- package/dist/modules/stock_backend/replenishment-screen.js +0 -131
- package/dist/modules/stock_backend/replenishment-screen.js.map +0 -1
- package/dist/modules/stock_backend/screens.d.ts +0 -14
- package/dist/modules/stock_backend/screens.d.ts.map +0 -1
- package/dist/modules/stock_backend/screens.js +0 -40
- package/dist/modules/stock_backend/screens.js.map +0 -1
- package/dist/modules/stock_backend/stock-route-screen.d.ts +0 -30
- package/dist/modules/stock_backend/stock-route-screen.d.ts.map +0 -1
- package/dist/modules/stock_backend/stock-route-screen.js +0 -129
- package/dist/modules/stock_backend/stock-route-screen.js.map +0 -1
- package/dist/modules/stock_backend/stock-routes-screen.d.ts +0 -17
- package/dist/modules/stock_backend/stock-routes-screen.d.ts.map +0 -1
- package/dist/modules/stock_backend/stock-routes-screen.js +0 -60
- package/dist/modules/stock_backend/stock-routes-screen.js.map +0 -1
- package/dist/modules/stock_backend/transfer-screen.d.ts +0 -26
- package/dist/modules/stock_backend/transfer-screen.d.ts.map +0 -1
- package/dist/modules/stock_backend/transfer-screen.js +0 -95
- package/dist/modules/stock_backend/transfer-screen.js.map +0 -1
- package/dist/modules/stock_backend/transfers-screen.d.ts +0 -21
- package/dist/modules/stock_backend/transfers-screen.d.ts.map +0 -1
- package/dist/modules/stock_backend/transfers-screen.js +0 -88
- package/dist/modules/stock_backend/transfers-screen.js.map +0 -1
- package/dist/modules/stock_backend/warehouses-screen.d.ts +0 -17
- package/dist/modules/stock_backend/warehouses-screen.d.ts.map +0 -1
- package/dist/modules/stock_backend/warehouses-screen.js +0 -96
- package/dist/modules/stock_backend/warehouses-screen.js.map +0 -1
- package/dist/modules/user_backend/screens.d.ts +0 -70
- package/dist/modules/user_backend/screens.d.ts.map +0 -1
- package/dist/modules/user_backend/screens.js +0 -308
- package/dist/modules/user_backend/screens.js.map +0 -1
- package/dist/modules/website/customer-routes.d.ts +0 -3
- package/dist/modules/website/customer-routes.d.ts.map +0 -1
- package/dist/modules/website/customer-routes.js +0 -322
- package/dist/modules/website/customer-routes.js.map +0 -1
- package/dist/modules/website_backend/screens.d.ts +0 -114
- package/dist/modules/website_backend/screens.d.ts.map +0 -1
- package/dist/modules/website_backend/screens.js +0 -625
- package/dist/modules/website_backend/screens.js.map +0 -1
- package/dist/ui/client/mail.d.mts +0 -11
- package/dist/ui/client/mail.d.mts.map +0 -1
- package/dist/ui/client/mail.mjs +0 -10
- package/dist/ui/client/mail.mjs.map +0 -1
- /package/dist/modules/{odoo_collaboration_import → account_staff_channel}/functions.d.ts +0 -0
- /package/dist/modules/{odoo_collaboration_import → account_staff_channel}/models.d.ts +0 -0
- /package/dist/modules/{odoo_collaboration_import → address_backend/screens}/types.js +0 -0
- /package/dist/modules/{odoo_collaboration_import → manufacturing}/relations.d.ts +0 -0
|
@@ -0,0 +1,2519 @@
|
|
|
1
|
+
import { randomUUID } from 'node:crypto';
|
|
2
|
+
import { encodeListState, parseListState, table, text } from '@ketvietlab/ketjs';
|
|
3
|
+
import { FIELD_KINDS, ISSUE_PRIORITIES } from '../flow/types.js';
|
|
4
|
+
import { emptyIssueListState, issueListSearch } from '../flow/search.js';
|
|
5
|
+
import { commandRecordId } from '../flow/operations.js';
|
|
6
|
+
import { adminPage, inLocale, localeQuery, resultErrors } from '../backend/screen.js';
|
|
7
|
+
import { modalWorkspace } from '../../ui/index.js';
|
|
8
|
+
import { readForm, seeOther } from '../backend/forms.js';
|
|
9
|
+
import { assigneeControl, memberControl, epicControl, issueControl, mentionControl, tagsControl, } from './relation-control.js';
|
|
10
|
+
import { keepForListSearch, LIST_PAGE_SIZE, listFacets, listMenus, loadListGroups, } from '../backend/list-search.js';
|
|
11
|
+
import { pageOf } from '../backend/paging.js';
|
|
12
|
+
import { boardScreen, epicsScreen, epicDetailScreen, allEpicsScreen, issueDetailScreen, issueCreateModal, issuesScreen, ganttScreen, mapScreen, crossProjectScreen, pagesScreen, projectPageCreateFields, projectEpicCreateFields, pageDetailScreen, allPagesScreen, projectCreateModal, projectsListScreen, settingsScreen, sprintsScreen, TEMPLATE_OPTIONS, } from './screens/index.js';
|
|
13
|
+
import { receiveAttachment } from '../storage/routes.js';
|
|
14
|
+
import { documentRoutes } from '../livedoc/index.js';
|
|
15
|
+
/** Domain reads stay bounded; the map assembles complete epics one page at a time. */
|
|
16
|
+
const MAP_BATCH_SIZE = 200;
|
|
17
|
+
/** Column-name presets offered when creating a project — the "Custom" option types its own list. */
|
|
18
|
+
const COLUMN_TEMPLATES = {
|
|
19
|
+
simple: ['To do', 'Done'],
|
|
20
|
+
kanban: ['To do', 'In Progress', 'Done'],
|
|
21
|
+
scrum: ['Backlog', 'To do', 'In Progress', 'Review', 'Done'],
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* The kinds of work each preset expects, seeded beside its columns.
|
|
25
|
+
*
|
|
26
|
+
* A process is a pair — how work moves and what work is — and a team that
|
|
27
|
+
* picks "Scrum" means Story and Spike as much as it means a Review column.
|
|
28
|
+
* These are a starting point and nothing more: types are edited in project
|
|
29
|
+
* settings afterwards, exactly like the columns above, and the code never
|
|
30
|
+
* reads one of these names back.
|
|
31
|
+
*
|
|
32
|
+
* "Custom" gets a single Task, because a board with no type at all cannot
|
|
33
|
+
* offer the field, and choosing to name your own columns is not a statement
|
|
34
|
+
* about issue types.
|
|
35
|
+
*/
|
|
36
|
+
const TYPE_TEMPLATES = {
|
|
37
|
+
simple: ['Task'],
|
|
38
|
+
kanban: ['Task', 'Bug'],
|
|
39
|
+
scrum: ['Story', 'Task', 'Bug', 'Spike'],
|
|
40
|
+
custom: ['Task'],
|
|
41
|
+
};
|
|
42
|
+
const slugify = (name) => name
|
|
43
|
+
.trim()
|
|
44
|
+
.toLowerCase()
|
|
45
|
+
.replace(/[^a-z0-9]+/g, '-')
|
|
46
|
+
.replace(/^-+|-+$/g, '') || 'col';
|
|
47
|
+
/** The project behind the id in the URL, or null when the caller may not read it. */
|
|
48
|
+
async function projectOf(ctx, url, req, id) {
|
|
49
|
+
try {
|
|
50
|
+
return (await ctx.call('flow.project.get', { id }, url, req));
|
|
51
|
+
}
|
|
52
|
+
catch {
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
const errorsOf = (result, _) => resultErrors(result, _, 'flow_backend.error.invalid');
|
|
57
|
+
/**
|
|
58
|
+
* The backlog list, narrowed to one reference field.
|
|
59
|
+
*
|
|
60
|
+
* `parseListState` reads filters from `filter` params carrying encoded rule
|
|
61
|
+
* nodes — there is no `f.<key>=` convention anywhere in the framework, so the
|
|
62
|
+
* board's "load more" and the epic cards, which both linked with one, landed
|
|
63
|
+
* on the unfiltered project list instead. `encodeListState` writes the form
|
|
64
|
+
* the parser on the other end actually reads.
|
|
65
|
+
*/
|
|
66
|
+
const issuesFilteredBy = (projectId, field, value) => encodeListState({ ...emptyIssueListState(), filters: [{ kind: 'rule', field, operator: 'equals', value }] }, `/admin/flow/projects/${encodeURIComponent(projectId)}/issues`);
|
|
67
|
+
const pager = (url, state, rows, total) => {
|
|
68
|
+
const link = (target) => encodeListState({ ...state, page: target }, url);
|
|
69
|
+
const from = rows ? (state.page - 1) * LIST_PAGE_SIZE + 1 : 0;
|
|
70
|
+
const to = Math.min(state.page * LIST_PAGE_SIZE, total);
|
|
71
|
+
return {
|
|
72
|
+
from,
|
|
73
|
+
to,
|
|
74
|
+
total,
|
|
75
|
+
prev: state.page > 1 ? link(state.page - 1) : null,
|
|
76
|
+
next: to < total ? link(state.page + 1) : null,
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
/** A control shaped by what the field says it holds. */
|
|
80
|
+
const customFieldControl = (field) => {
|
|
81
|
+
const name = `field:${String(field.code)}`;
|
|
82
|
+
const label = String(field.name);
|
|
83
|
+
const value = field.value == null ? '' : String(field.value);
|
|
84
|
+
const kind = String(field.kind);
|
|
85
|
+
if (kind === 'select') {
|
|
86
|
+
const options = (field.config?.options ?? []).map((option) => ({
|
|
87
|
+
value: String(option.code),
|
|
88
|
+
label: String(option.label ?? option.code),
|
|
89
|
+
}));
|
|
90
|
+
// A blank first entry, because a field somebody has not answered is not the
|
|
91
|
+
// same as one answered with whatever happened to be first.
|
|
92
|
+
return { name, label, type: 'select', value, options: [{ value: '', label: '\u2014' }, ...options] };
|
|
93
|
+
}
|
|
94
|
+
if (kind === 'bool')
|
|
95
|
+
return { name, label, type: 'checkbox', value: value === 'true' };
|
|
96
|
+
if (kind === 'number')
|
|
97
|
+
return { name, label, type: 'number', value };
|
|
98
|
+
if (kind === 'date')
|
|
99
|
+
return { name, label, type: 'date', value };
|
|
100
|
+
if (kind === 'url')
|
|
101
|
+
return { name, label, type: 'text', value, placeholder: 'https://' };
|
|
102
|
+
return { name, label, value };
|
|
103
|
+
};
|
|
104
|
+
const issueFields = (_, row, controls, types = []) => [
|
|
105
|
+
{ name: 'title', label: _('flow_backend.field.title'), value: String(row.title ?? ''), required: true },
|
|
106
|
+
// A native select, like the column and priority beside it: the vocabulary is
|
|
107
|
+
// small, it is the project's own, and a dialog to choose between four values
|
|
108
|
+
// is worse than the four values. A project with no types offers no field at
|
|
109
|
+
// all rather than an empty one.
|
|
110
|
+
...(types.length
|
|
111
|
+
? [
|
|
112
|
+
{
|
|
113
|
+
name: 'typeId',
|
|
114
|
+
label: _('flow_backend.field.type'),
|
|
115
|
+
type: 'select',
|
|
116
|
+
value: String(row.typeId ?? ''),
|
|
117
|
+
options: [
|
|
118
|
+
{ value: '', label: '\u2014' },
|
|
119
|
+
...types.map((type) => ({ value: String(type.id), label: String(type.name) })),
|
|
120
|
+
],
|
|
121
|
+
},
|
|
122
|
+
]
|
|
123
|
+
: []),
|
|
124
|
+
{
|
|
125
|
+
name: 'priority',
|
|
126
|
+
label: _('flow_backend.field.priority'),
|
|
127
|
+
type: 'select',
|
|
128
|
+
value: String(row.priority ?? 'normal'),
|
|
129
|
+
options: ISSUE_PRIORITIES.map((value) => ({
|
|
130
|
+
value,
|
|
131
|
+
label: _.resolves(`flow.priority.${value}`) ? _(`flow.priority.${value}`) : value,
|
|
132
|
+
})),
|
|
133
|
+
},
|
|
134
|
+
{ name: 'assigneeUserId', label: _('flow_backend.field.assignee'), control: controls.assignee },
|
|
135
|
+
{ name: 'epicId', label: _('flow_backend.field.epic'), control: controls.epic },
|
|
136
|
+
{ name: 'tagIds', label: _('flow_backend.field.tags'), control: controls.tags },
|
|
137
|
+
{
|
|
138
|
+
name: 'startDate',
|
|
139
|
+
label: _('flow_backend.field.startDate'),
|
|
140
|
+
type: 'date',
|
|
141
|
+
value: String(row.startDate ?? ''),
|
|
142
|
+
},
|
|
143
|
+
{ name: 'dueDate', label: _('flow_backend.field.dueDate'), type: 'date', value: String(row.dueDate ?? '') },
|
|
144
|
+
{
|
|
145
|
+
name: 'estimate',
|
|
146
|
+
label: _('flow_backend.field.estimate'),
|
|
147
|
+
type: 'decimal',
|
|
148
|
+
value: row.estimate != null ? String(row.estimate) : '',
|
|
149
|
+
},
|
|
150
|
+
// Whatever this project added to its own issues, after everything Flow
|
|
151
|
+
// itself asks about.
|
|
152
|
+
...(row.fields ?? []).map(customFieldControl),
|
|
153
|
+
];
|
|
154
|
+
/**
|
|
155
|
+
* How many issues one chart draws.
|
|
156
|
+
*
|
|
157
|
+
* Every row is a line on screen, so this is a readability limit before it is a
|
|
158
|
+
* query one — past a few hundred bars nobody is reading a chart, they are
|
|
159
|
+
* scrolling past one. Ordered by start date, so what it does show is the
|
|
160
|
+
* beginning of the project rather than an arbitrary page of it.
|
|
161
|
+
*/
|
|
162
|
+
const GANTT_ROWS = 200;
|
|
163
|
+
/**
|
|
164
|
+
* How much of a project the timeline is willing to read.
|
|
165
|
+
*
|
|
166
|
+
* `startsOn` is `startDate ?? createdAt`, which no index and no ORDER BY can
|
|
167
|
+
* express, so the rows have to be sorted here — and sorting here used to mean
|
|
168
|
+
* reading the whole project first. A ten-thousand-issue project cost fifty
|
|
169
|
+
* sequential calls every time somebody opened the chart.
|
|
170
|
+
*
|
|
171
|
+
* A declared ceiling instead, and the screen says when it is reached: a chart
|
|
172
|
+
* that quietly drew a tenth of the work would be the same lie a truncated
|
|
173
|
+
* filter tells. Ten pages is far past what a person reads on a timeline and far
|
|
174
|
+
* short of what an unbounded scan costs.
|
|
175
|
+
*/
|
|
176
|
+
const GANTT_SCAN = GANTT_ROWS * 10;
|
|
177
|
+
const allGanttIssues = async (ctx, url, req, projectId) => {
|
|
178
|
+
const page = async (cursor) => (await ctx.call('flow.issue.list', { projectId, cursor: String(cursor), limit: GANTT_ROWS }, url, req));
|
|
179
|
+
// The first answer carries the total, which is what turns the rest from a
|
|
180
|
+
// sequential walk into one round of parallel reads.
|
|
181
|
+
const first = await page(0);
|
|
182
|
+
const total = Number(first.total ?? 0);
|
|
183
|
+
const rows = (first.rows ?? []).slice();
|
|
184
|
+
const ceiling = Math.min(total, GANTT_SCAN);
|
|
185
|
+
const cursors = [];
|
|
186
|
+
for (let at = rows.length; at < ceiling; at += GANTT_ROWS)
|
|
187
|
+
cursors.push(at);
|
|
188
|
+
const rest = await Promise.all(cursors.map((cursor) => page(cursor)));
|
|
189
|
+
for (const found of rest)
|
|
190
|
+
rows.push(...(found.rows ?? []));
|
|
191
|
+
return { rows: rows.slice(0, ceiling), total, truncated: total > GANTT_SCAN };
|
|
192
|
+
};
|
|
193
|
+
const ganttPageHref = (url, page) => {
|
|
194
|
+
const target = new URL(url);
|
|
195
|
+
if (page <= 1)
|
|
196
|
+
target.searchParams.delete('page');
|
|
197
|
+
else
|
|
198
|
+
target.searchParams.set('page', String(page));
|
|
199
|
+
return `${target.pathname}${target.search}`;
|
|
200
|
+
};
|
|
201
|
+
/**
|
|
202
|
+
* The two things every mutating route here has to establish before it reads a
|
|
203
|
+
* form or body. The admin authenticates with a session cookie, so a POST
|
|
204
|
+
* arriving from another origin carries the signed-in user's credentials
|
|
205
|
+
* without their intent. Direct copy of crm_backend/routes.ts's guard — every
|
|
206
|
+
* other `_backend` module's mutating routes already carry this, `flow_backend`
|
|
207
|
+
* (`/push`, `/leave`) was the one that didn't yet.
|
|
208
|
+
*/
|
|
209
|
+
const crossSite = (req) => {
|
|
210
|
+
const origin = req.headers.origin;
|
|
211
|
+
if (!origin)
|
|
212
|
+
return false;
|
|
213
|
+
try {
|
|
214
|
+
return new URL(origin).host !== String(req.headers.host ?? '');
|
|
215
|
+
}
|
|
216
|
+
catch {
|
|
217
|
+
return true;
|
|
218
|
+
}
|
|
219
|
+
};
|
|
220
|
+
const refusePost = (req) => req.method === 'POST' && crossSite(req) ? text('Forbidden', { status: 403 }) : null;
|
|
221
|
+
const onlyPost = (req) => req.method !== 'POST'
|
|
222
|
+
? text('POST', { status: 405 })
|
|
223
|
+
: crossSite(req)
|
|
224
|
+
? text('Forbidden', { status: 403 })
|
|
225
|
+
: null;
|
|
226
|
+
const permitted = async (ctx, fn, url, req, issueId) => {
|
|
227
|
+
try {
|
|
228
|
+
return (await ctx.call(fn, { id: issueId }, url, req));
|
|
229
|
+
}
|
|
230
|
+
catch {
|
|
231
|
+
return null;
|
|
232
|
+
}
|
|
233
|
+
};
|
|
234
|
+
/** True once the caller has passed a read permission check for this issue. */
|
|
235
|
+
/**
|
|
236
|
+
* The same list with archived issues shown, or hidden again.
|
|
237
|
+
*
|
|
238
|
+
* `parseListState` already reads `archived=1` and `issueQuery` already honours
|
|
239
|
+
* it — the only thing missing was a link, which is why a state the model has
|
|
240
|
+
* carried since the beginning was unreachable from any screen.
|
|
241
|
+
*/
|
|
242
|
+
const archivedHref = (url) => {
|
|
243
|
+
const target = new URL(url);
|
|
244
|
+
if (target.searchParams.get('archived') === '1')
|
|
245
|
+
target.searchParams.delete('archived');
|
|
246
|
+
else
|
|
247
|
+
target.searchParams.set('archived', '1');
|
|
248
|
+
target.searchParams.delete('page');
|
|
249
|
+
return `${target.pathname}${target.search}`;
|
|
250
|
+
};
|
|
251
|
+
const readable = (ctx, url, req, issueId) => permitted(ctx, 'flow.issue.get', url, req, issueId);
|
|
252
|
+
/**
|
|
253
|
+
* What Live Doc needs to know to hold an issue's description.
|
|
254
|
+
*
|
|
255
|
+
* Everything here is Flow's own: which functions grant reading and rewriting
|
|
256
|
+
* a description, where the row keeps its snapshot, and the one function
|
|
257
|
+
* allowed to write `flow.Issue` back. The CRDT, the relay, the presence and
|
|
258
|
+
* the blob writing are livedoc's — see modules/livedoc/documents.ts.
|
|
259
|
+
*/
|
|
260
|
+
const issueDocument = {
|
|
261
|
+
kind: 'flow.Issue',
|
|
262
|
+
readFn: 'flow.issue.get',
|
|
263
|
+
writeFn: 'flow.issue.editDescription',
|
|
264
|
+
attachmentOf: (row) => row.contentAttachmentId,
|
|
265
|
+
commitFn: 'flow_backend.sync.commitContent',
|
|
266
|
+
};
|
|
267
|
+
/**
|
|
268
|
+
* The same, for a page — where the document is not a field on the record but
|
|
269
|
+
* the record's whole reason to exist.
|
|
270
|
+
*
|
|
271
|
+
* `page.get` answers `{ value }`, so the attachment is read one level in. That
|
|
272
|
+
* is the only difference between the two owners, which is the point of the
|
|
273
|
+
* seam: a second kind of document cost five lines.
|
|
274
|
+
*/
|
|
275
|
+
/**
|
|
276
|
+
* The project brief. `description` stays the one-line summary a list row shows;
|
|
277
|
+
* this is the long form nobody wants to write into a single-line input.
|
|
278
|
+
*/
|
|
279
|
+
const projectDocument = {
|
|
280
|
+
kind: 'flow.Project',
|
|
281
|
+
readFn: 'flow.project.get',
|
|
282
|
+
writeFn: 'flow.project.editContent',
|
|
283
|
+
attachmentOf: (row) => row.value?.contentAttachmentId ?? row.contentAttachmentId,
|
|
284
|
+
commitFn: 'flow_backend.sync.commitProjectContent',
|
|
285
|
+
};
|
|
286
|
+
/** An epic's own document — what it is for, beside the issues under it. */
|
|
287
|
+
const epicDocument = {
|
|
288
|
+
kind: 'flow.Epic',
|
|
289
|
+
readFn: 'flow.epic.get',
|
|
290
|
+
writeFn: 'flow.epic.editContent',
|
|
291
|
+
attachmentOf: (row) => row.value?.contentAttachmentId ?? row.contentAttachmentId,
|
|
292
|
+
commitFn: 'flow_backend.sync.commitEpicContent',
|
|
293
|
+
};
|
|
294
|
+
const pageDocument = {
|
|
295
|
+
kind: 'flow.Page',
|
|
296
|
+
readFn: 'flow.page.get',
|
|
297
|
+
writeFn: 'flow.page.editContent',
|
|
298
|
+
attachmentOf: (row) => row.value?.contentAttachmentId ?? row.contentAttachmentId,
|
|
299
|
+
commitFn: 'flow_backend.sync.commitPageContent',
|
|
300
|
+
};
|
|
301
|
+
/**
|
|
302
|
+
* A list of issues that is not on a board.
|
|
303
|
+
*
|
|
304
|
+
* `mine` is the only thing that differs between the two, so it is the only
|
|
305
|
+
* thing this takes: a second copy of the search/filter/group/pager wiring is a
|
|
306
|
+
* second place for them to drift apart.
|
|
307
|
+
*/
|
|
308
|
+
const crossProjectIssues = (options) => (ctx) => async (url, req) => {
|
|
309
|
+
if (req.method !== 'GET')
|
|
310
|
+
return text('GET', { status: 405 });
|
|
311
|
+
const spec = issueListSearch(table(ctx.manifest, 'flow.Issue'));
|
|
312
|
+
const state = parseListState(spec, url).state;
|
|
313
|
+
// No timezone from here. The day boundary belongs to the company, and
|
|
314
|
+
// `issueQuery` resolves it once for the list, the groups and the figures
|
|
315
|
+
// alike — a route that named its own would be a second place to get it
|
|
316
|
+
// wrong, which is how this was UTC for everyone.
|
|
317
|
+
const timezone = '';
|
|
318
|
+
const grouped = state.groupBy.length > 0;
|
|
319
|
+
const cursor = (state.page - 1) * LIST_PAGE_SIZE;
|
|
320
|
+
const scoped = options.mine ? { mine: true } : {};
|
|
321
|
+
// Two rounds instead of six. The page, its groups and the figures beside it
|
|
322
|
+
// do not depend on one another, and neither do the three reads that follow
|
|
323
|
+
// — they only had to wait for the day `issue.buckets` counted against.
|
|
324
|
+
const [result, groups, buckets] = (await Promise.all([
|
|
325
|
+
ctx.call('flow.issue.list', {
|
|
326
|
+
...scoped,
|
|
327
|
+
listState: state,
|
|
328
|
+
timezone,
|
|
329
|
+
cursor: String(cursor),
|
|
330
|
+
limit: grouped ? 1 : LIST_PAGE_SIZE,
|
|
331
|
+
}, url, req),
|
|
332
|
+
grouped
|
|
333
|
+
? loadListGroups(ctx, url, req, state, timezone, {
|
|
334
|
+
groupFunction: 'flow.issue.group',
|
|
335
|
+
listFunction: 'flow.issue.list',
|
|
336
|
+
listArgs: scoped,
|
|
337
|
+
label: (_field, value) => String(value ?? '\u2014'),
|
|
338
|
+
})
|
|
339
|
+
: Promise.resolve([]),
|
|
340
|
+
// The figures beside the list, over the same filter the list is showing —
|
|
341
|
+
// counted, not listed, so a thousand issues cost four counts.
|
|
342
|
+
ctx.call('flow.issue.buckets', { ...scoped, listState: state }, url, req),
|
|
343
|
+
]));
|
|
344
|
+
// Taken from the answer rather than computed again here, so every later use
|
|
345
|
+
// of "today" on this screen is the same day the counts used.
|
|
346
|
+
const today = String(buckets.today ?? '');
|
|
347
|
+
const [otherTab, late] = (await Promise.all([
|
|
348
|
+
ctx.call('flow.issue.buckets', options.mine
|
|
349
|
+
? { listState: emptyIssueListState(), today }
|
|
350
|
+
: { mine: true, listState: emptyIssueListState(), today }, url, req),
|
|
351
|
+
ctx.call('flow.issue.list', {
|
|
352
|
+
...scoped,
|
|
353
|
+
listState: { ...emptyIssueListState(), sort: [{ key: 'dueDate', dir: 'asc' }] },
|
|
354
|
+
overdueOn: today,
|
|
355
|
+
limit: 5,
|
|
356
|
+
}, url, req),
|
|
357
|
+
]));
|
|
358
|
+
// One tab is the count already in hand; the other is the one just read.
|
|
359
|
+
const mineCount = options.mine ? Number(buckets.total ?? 0) : Number(otherTab.total ?? 0);
|
|
360
|
+
const allCount = options.mine ? Number(otherTab.total ?? 0) : Number(buckets.total ?? 0);
|
|
361
|
+
// Which rows the due-date column should mark. Done is not late, however
|
|
362
|
+
// long ago the date was.
|
|
363
|
+
const marked = (result.rows ?? []).map((row) => ({
|
|
364
|
+
...row,
|
|
365
|
+
overdue: row.terminal !== true && !!row.dueDate && String(row.dueDate) < today,
|
|
366
|
+
}));
|
|
367
|
+
return adminPage(ctx, url, req, {
|
|
368
|
+
title: options.title,
|
|
369
|
+
body: (_, frame) => {
|
|
370
|
+
frame.chrome = {
|
|
371
|
+
search: {
|
|
372
|
+
name: 'q',
|
|
373
|
+
value: state.q ?? '',
|
|
374
|
+
placeholder: _('flow_backend.search.issues'),
|
|
375
|
+
keep: keepForListSearch(url),
|
|
376
|
+
facets: listFacets(_, url, state, spec),
|
|
377
|
+
menus: listMenus(_, url, state, spec),
|
|
378
|
+
},
|
|
379
|
+
pager: grouped
|
|
380
|
+
? null
|
|
381
|
+
: pager(url, state, (result.rows ?? []).length, Number(result.total ?? 0)),
|
|
382
|
+
};
|
|
383
|
+
const at = url.searchParams.get('view') ?? (options.mine ? 'mine' : 'all');
|
|
384
|
+
return crossProjectScreen(_, frame, _(options.title), grouped ? [] : marked, groups, {
|
|
385
|
+
total: Number(buckets.total ?? 0),
|
|
386
|
+
done: Number(buckets.done ?? 0),
|
|
387
|
+
overdue: Number(buckets.overdue ?? 0),
|
|
388
|
+
waiting: Number(buckets.waiting ?? 0),
|
|
389
|
+
working: Number(buckets.working ?? 0),
|
|
390
|
+
mine: mineCount,
|
|
391
|
+
late: (late.rows ?? []).slice(0, 5),
|
|
392
|
+
// The domain reports a filter that stopped short; nothing read it
|
|
393
|
+
// until now, so the reader was handed a partial answer with a pager
|
|
394
|
+
// that claimed it was the whole one.
|
|
395
|
+
filterTruncated: result.fieldFilterTruncated === true,
|
|
396
|
+
tab: at,
|
|
397
|
+
locale: localeQuery(url),
|
|
398
|
+
tabs: [
|
|
399
|
+
{
|
|
400
|
+
id: 'all',
|
|
401
|
+
label: _('flow_backend.issues.tabAll'),
|
|
402
|
+
href: '/admin/flow/issues',
|
|
403
|
+
count: allCount,
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
id: 'mine',
|
|
407
|
+
label: _('flow_backend.issues.tabMine'),
|
|
408
|
+
href: '/admin/flow/mine',
|
|
409
|
+
count: mineCount,
|
|
410
|
+
},
|
|
411
|
+
],
|
|
412
|
+
});
|
|
413
|
+
},
|
|
414
|
+
});
|
|
415
|
+
};
|
|
416
|
+
/** The move form's one control: every page except this one and its descendants. */
|
|
417
|
+
const parentField = (_, pages, pageId, current) => {
|
|
418
|
+
// A page cannot move under itself or under anything below it. The server
|
|
419
|
+
// refuses that anyway (`movePage`), but offering the choice and then
|
|
420
|
+
// rejecting it is a worse screen than not offering it.
|
|
421
|
+
const banned = new Set([pageId]);
|
|
422
|
+
let grew = true;
|
|
423
|
+
while (grew) {
|
|
424
|
+
grew = false;
|
|
425
|
+
for (const page of pages) {
|
|
426
|
+
const parent = page.parentPageId ? String(page.parentPageId) : '';
|
|
427
|
+
if (parent && banned.has(parent) && !banned.has(String(page.id))) {
|
|
428
|
+
banned.add(String(page.id));
|
|
429
|
+
grew = true;
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
const options = [
|
|
434
|
+
{ value: '', label: _('flow_backend.pages.root') },
|
|
435
|
+
...pages
|
|
436
|
+
.filter((page) => !banned.has(String(page.id)))
|
|
437
|
+
.map((page) => ({ value: String(page.id), label: String(page.title ?? '') })),
|
|
438
|
+
];
|
|
439
|
+
if (current && !options.some((option) => option.value === current)) {
|
|
440
|
+
options.unshift({ value: current, label: current });
|
|
441
|
+
}
|
|
442
|
+
return {
|
|
443
|
+
name: 'parentPageId',
|
|
444
|
+
label: _('flow_backend.pages.parent'),
|
|
445
|
+
type: 'select',
|
|
446
|
+
value: current,
|
|
447
|
+
options,
|
|
448
|
+
};
|
|
449
|
+
};
|
|
450
|
+
const projectCreateFields = (_, values = {}) => [
|
|
451
|
+
{ name: 'key', label: _('flow_backend.field.key'), value: values.key ?? '', required: true },
|
|
452
|
+
{ name: 'name', label: _('flow_backend.field.name'), value: values.name ?? '', required: true },
|
|
453
|
+
{
|
|
454
|
+
name: 'description',
|
|
455
|
+
label: _('flow_backend.field.description'),
|
|
456
|
+
type: 'textarea',
|
|
457
|
+
value: values.description ?? '',
|
|
458
|
+
span: 'full',
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
name: 'template',
|
|
462
|
+
label: _('flow_backend.field.template'),
|
|
463
|
+
type: 'select',
|
|
464
|
+
value: values.template ?? 'simple',
|
|
465
|
+
options: TEMPLATE_OPTIONS(_),
|
|
466
|
+
},
|
|
467
|
+
{
|
|
468
|
+
name: 'customColumns',
|
|
469
|
+
label: _('flow_backend.field.customColumns'),
|
|
470
|
+
help: _('flow_backend.field.customColumnsHint'),
|
|
471
|
+
value: values.customColumns ?? '',
|
|
472
|
+
span: 'full',
|
|
473
|
+
},
|
|
474
|
+
];
|
|
475
|
+
/** Only the project collection is a valid create-form return target. */
|
|
476
|
+
const projectReturnTo = (url, requested) => {
|
|
477
|
+
const fallback = inLocale(url, '/admin/flow/projects');
|
|
478
|
+
if (!requested)
|
|
479
|
+
return fallback;
|
|
480
|
+
try {
|
|
481
|
+
const target = new URL(requested, url);
|
|
482
|
+
if (target.origin !== url.origin || target.pathname !== '/admin/flow/projects')
|
|
483
|
+
return fallback;
|
|
484
|
+
return `${target.pathname}${target.search}`;
|
|
485
|
+
}
|
|
486
|
+
catch {
|
|
487
|
+
return fallback;
|
|
488
|
+
}
|
|
489
|
+
};
|
|
490
|
+
const projectCreateHref = (url) => {
|
|
491
|
+
const target = new URL(url);
|
|
492
|
+
target.pathname = '/admin/flow/projects';
|
|
493
|
+
for (const key of [
|
|
494
|
+
'create',
|
|
495
|
+
'invalid',
|
|
496
|
+
'error',
|
|
497
|
+
'id',
|
|
498
|
+
'idempotencyKey',
|
|
499
|
+
'key',
|
|
500
|
+
'name',
|
|
501
|
+
'description',
|
|
502
|
+
'template',
|
|
503
|
+
'customColumns',
|
|
504
|
+
])
|
|
505
|
+
target.searchParams.delete(key);
|
|
506
|
+
target.searchParams.set('create', '1');
|
|
507
|
+
return `${target.pathname}${target.search}`;
|
|
508
|
+
};
|
|
509
|
+
const projectCreateFailureHref = (url, returnTo, values, errors) => {
|
|
510
|
+
const target = new URL(returnTo, url);
|
|
511
|
+
target.searchParams.set('create', '1');
|
|
512
|
+
if (errors.length)
|
|
513
|
+
target.searchParams.set('invalid', '1');
|
|
514
|
+
for (const name of ['id', 'idempotencyKey', 'key', 'name', 'description', 'template', 'customColumns']) {
|
|
515
|
+
const value = values[name];
|
|
516
|
+
if (value)
|
|
517
|
+
target.searchParams.set(name, value);
|
|
518
|
+
}
|
|
519
|
+
for (const error of errors)
|
|
520
|
+
target.searchParams.append('error', error);
|
|
521
|
+
return `${target.pathname}${target.search}`;
|
|
522
|
+
};
|
|
523
|
+
const issueCreateValues = (values = {}) => ({
|
|
524
|
+
title: values.title ?? '',
|
|
525
|
+
columnId: values.columnId ?? '',
|
|
526
|
+
priority: values.priority || 'normal',
|
|
527
|
+
});
|
|
528
|
+
const issueCreateFields = (_, columns, values = {}) => {
|
|
529
|
+
const held = issueCreateValues(values);
|
|
530
|
+
const columnOptions = columns.map((column) => ({
|
|
531
|
+
value: String(column.id),
|
|
532
|
+
label: String(column.name),
|
|
533
|
+
}));
|
|
534
|
+
if (held.columnId && !columnOptions.some((option) => option.value === held.columnId)) {
|
|
535
|
+
columnOptions.unshift({ value: held.columnId, label: held.columnId });
|
|
536
|
+
}
|
|
537
|
+
return [
|
|
538
|
+
{ name: 'title', label: _('flow_backend.field.title'), value: held.title, required: true },
|
|
539
|
+
{
|
|
540
|
+
name: 'columnId',
|
|
541
|
+
label: _('flow_backend.field.column'),
|
|
542
|
+
type: 'select',
|
|
543
|
+
value: held.columnId || String(columns[0]?.id ?? ''),
|
|
544
|
+
options: columnOptions,
|
|
545
|
+
},
|
|
546
|
+
{
|
|
547
|
+
name: 'priority',
|
|
548
|
+
label: _('flow_backend.field.priority'),
|
|
549
|
+
type: 'select',
|
|
550
|
+
value: held.priority,
|
|
551
|
+
options: ISSUE_PRIORITIES.map((value) => ({
|
|
552
|
+
value,
|
|
553
|
+
label: _.resolves(`flow.priority.${value}`) ? _(`flow.priority.${value}`) : value,
|
|
554
|
+
})),
|
|
555
|
+
},
|
|
556
|
+
];
|
|
557
|
+
};
|
|
558
|
+
const projectIssuesCollection = (url, projectId) => {
|
|
559
|
+
const target = new URL(url);
|
|
560
|
+
target.pathname = `/admin/flow/projects/${encodeURIComponent(projectId)}/issues`;
|
|
561
|
+
for (const key of ['create', 'invalid', 'error', 'title', 'columnId', 'priority', 'returnTo'])
|
|
562
|
+
target.searchParams.delete(key);
|
|
563
|
+
return `${target.pathname}${target.search}`;
|
|
564
|
+
};
|
|
565
|
+
const projectIssuesReturnTo = (url, projectId, requested) => {
|
|
566
|
+
const fallback = projectIssuesCollection(url, projectId);
|
|
567
|
+
if (!requested)
|
|
568
|
+
return fallback;
|
|
569
|
+
try {
|
|
570
|
+
const target = new URL(requested, url);
|
|
571
|
+
const expected = `/admin/flow/projects/${encodeURIComponent(projectId)}/issues`;
|
|
572
|
+
if (target.origin !== url.origin || target.pathname !== expected)
|
|
573
|
+
return fallback;
|
|
574
|
+
return projectIssuesCollection(target, projectId);
|
|
575
|
+
}
|
|
576
|
+
catch {
|
|
577
|
+
return fallback;
|
|
578
|
+
}
|
|
579
|
+
};
|
|
580
|
+
const projectIssueCreateHref = (url, projectId) => {
|
|
581
|
+
const target = new URL(projectIssuesCollection(url, projectId), url);
|
|
582
|
+
target.searchParams.set('create', '1');
|
|
583
|
+
return `${target.pathname}${target.search}`;
|
|
584
|
+
};
|
|
585
|
+
const projectIssueCreateFailureHref = (url, returnTo, values, errors) => {
|
|
586
|
+
const target = new URL(returnTo, url);
|
|
587
|
+
target.searchParams.set('create', '1');
|
|
588
|
+
if (errors.length)
|
|
589
|
+
target.searchParams.set('invalid', '1');
|
|
590
|
+
for (const name of ['title', 'columnId', 'priority']) {
|
|
591
|
+
const value = values[name];
|
|
592
|
+
if (value)
|
|
593
|
+
target.searchParams.set(name, value);
|
|
594
|
+
}
|
|
595
|
+
for (const error of errors)
|
|
596
|
+
target.searchParams.append('error', error);
|
|
597
|
+
return `${target.pathname}${target.search}`;
|
|
598
|
+
};
|
|
599
|
+
const projectPagesCollection = (url, projectId) => {
|
|
600
|
+
const target = new URL(url);
|
|
601
|
+
target.pathname = `/admin/flow/projects/${encodeURIComponent(projectId)}/pages`;
|
|
602
|
+
for (const key of ['create', 'invalid', 'error', 'id', 'idempotencyKey', 'title', 'parentPageId'])
|
|
603
|
+
target.searchParams.delete(key);
|
|
604
|
+
return `${target.pathname}${target.search}`;
|
|
605
|
+
};
|
|
606
|
+
const projectPageCreateHref = (url, projectId) => {
|
|
607
|
+
const target = new URL(projectPagesCollection(url, projectId), url);
|
|
608
|
+
target.searchParams.set('create', '1');
|
|
609
|
+
return `${target.pathname}${target.search}`;
|
|
610
|
+
};
|
|
611
|
+
const projectPageCreateFailureHref = (url, projectId, values, errors) => {
|
|
612
|
+
const target = new URL(projectPageCreateHref(url, projectId), url);
|
|
613
|
+
if (errors.length)
|
|
614
|
+
target.searchParams.set('invalid', '1');
|
|
615
|
+
for (const name of ['id', 'idempotencyKey', 'title', 'parentPageId']) {
|
|
616
|
+
const value = values[name];
|
|
617
|
+
if (value)
|
|
618
|
+
target.searchParams.set(name, value);
|
|
619
|
+
}
|
|
620
|
+
for (const error of errors)
|
|
621
|
+
target.searchParams.append('error', error);
|
|
622
|
+
return `${target.pathname}${target.search}`;
|
|
623
|
+
};
|
|
624
|
+
const projectEpicsCollection = (url, projectId) => {
|
|
625
|
+
const target = new URL(url);
|
|
626
|
+
target.pathname = `/admin/flow/projects/${encodeURIComponent(projectId)}/epics`;
|
|
627
|
+
for (const key of [
|
|
628
|
+
'create',
|
|
629
|
+
'invalid',
|
|
630
|
+
'createError',
|
|
631
|
+
'archiveError',
|
|
632
|
+
'id',
|
|
633
|
+
'idempotencyKey',
|
|
634
|
+
'title',
|
|
635
|
+
'color',
|
|
636
|
+
])
|
|
637
|
+
target.searchParams.delete(key);
|
|
638
|
+
return `${target.pathname}${target.search}`;
|
|
639
|
+
};
|
|
640
|
+
const projectEpicCreateHref = (url, projectId) => {
|
|
641
|
+
const target = new URL(projectEpicsCollection(url, projectId), url);
|
|
642
|
+
target.searchParams.set('create', '1');
|
|
643
|
+
return `${target.pathname}${target.search}`;
|
|
644
|
+
};
|
|
645
|
+
const projectEpicCreateFailureHref = (url, projectId, values, errors) => {
|
|
646
|
+
const target = new URL(projectEpicCreateHref(url, projectId), url);
|
|
647
|
+
if (errors.length)
|
|
648
|
+
target.searchParams.set('invalid', '1');
|
|
649
|
+
for (const name of ['id', 'idempotencyKey', 'title', 'color']) {
|
|
650
|
+
const value = values[name];
|
|
651
|
+
if (value)
|
|
652
|
+
target.searchParams.set(name, value);
|
|
653
|
+
}
|
|
654
|
+
for (const error of errors)
|
|
655
|
+
target.searchParams.append('createError', error);
|
|
656
|
+
return `${target.pathname}${target.search}`;
|
|
657
|
+
};
|
|
658
|
+
const projectEpicArchiveFailureHref = (url, projectId, errors) => {
|
|
659
|
+
const target = new URL(projectEpicsCollection(url, projectId), url);
|
|
660
|
+
for (const error of errors)
|
|
661
|
+
target.searchParams.append('archiveError', error);
|
|
662
|
+
return `${target.pathname}${target.search}`;
|
|
663
|
+
};
|
|
664
|
+
const projectCreateRoute = (actionPath) => (ctx) => async (url, req) => {
|
|
665
|
+
const refused = refusePost(req);
|
|
666
|
+
if (refused)
|
|
667
|
+
return refused;
|
|
668
|
+
const _ = ctx.translate(ctx.localeOf(url, req));
|
|
669
|
+
let errors = [];
|
|
670
|
+
let values = Object.fromEntries(['id', 'idempotencyKey', 'key', 'name', 'description', 'template', 'customColumns']
|
|
671
|
+
.map((name) => [name, url.searchParams.get(name) ?? ''])
|
|
672
|
+
.filter(([, value]) => value));
|
|
673
|
+
let submittedReturnTo = url.searchParams.get('returnTo') ??
|
|
674
|
+
(actionPath === '/admin/flow/projects' ? `${url.pathname}${url.search}` : null);
|
|
675
|
+
if (req.method === 'POST') {
|
|
676
|
+
const form = await readForm(req);
|
|
677
|
+
values = form;
|
|
678
|
+
submittedReturnTo = form.returnTo ?? submittedReturnTo;
|
|
679
|
+
const names = form.template === 'custom'
|
|
680
|
+
? (form.customColumns ?? '')
|
|
681
|
+
.split(',')
|
|
682
|
+
.map((name) => name.trim())
|
|
683
|
+
.filter(Boolean)
|
|
684
|
+
: (COLUMN_TEMPLATES[form.template ?? 'simple'] ?? COLUMN_TEMPLATES.simple);
|
|
685
|
+
if (!names.length) {
|
|
686
|
+
errors = [_('flow_backend.error.customColumnsRequired')];
|
|
687
|
+
}
|
|
688
|
+
else {
|
|
689
|
+
// The id and the key come from the rendered form, not from this request:
|
|
690
|
+
// `project.save` upserts by id, so posting the same form twice lands on
|
|
691
|
+
// the same project rather than creating a second one with its own set of
|
|
692
|
+
// columns and issue types. Falling back to a fresh id keeps an older
|
|
693
|
+
// cached form, or a scripted post, working.
|
|
694
|
+
const id = form.id || randomUUID();
|
|
695
|
+
const result = (await ctx.call('flow.project.save', {
|
|
696
|
+
values: {
|
|
697
|
+
id,
|
|
698
|
+
key: form.key ?? '',
|
|
699
|
+
name: form.name ?? '',
|
|
700
|
+
description: form.description || null,
|
|
701
|
+
},
|
|
702
|
+
idempotencyKey: form.idempotencyKey || randomUUID(),
|
|
703
|
+
}, url, req));
|
|
704
|
+
if (result.ok) {
|
|
705
|
+
for (const [index, name] of names.entries()) {
|
|
706
|
+
// Derived from the project and the column code rather than fresh each
|
|
707
|
+
// time: the whole create flow has to be idempotent, not just its first
|
|
708
|
+
// write. A second post with a fresh id would insert a second column
|
|
709
|
+
// carrying the same code, which the unique index refuses with a 500.
|
|
710
|
+
const code = slugify(name);
|
|
711
|
+
const column = (await ctx.call('flow.column.save', {
|
|
712
|
+
values: {
|
|
713
|
+
id: `${id}:column:${code}`,
|
|
714
|
+
projectId: id,
|
|
715
|
+
code,
|
|
716
|
+
name,
|
|
717
|
+
sequence: (index + 1) * 10,
|
|
718
|
+
terminalState: index === names.length - 1,
|
|
719
|
+
},
|
|
720
|
+
idempotencyKey: `${id}:column:${code}`,
|
|
721
|
+
}, url, req));
|
|
722
|
+
if (!column.ok)
|
|
723
|
+
return seeOther(inLocale(url, `/admin/flow/projects/${id}/settings`));
|
|
724
|
+
}
|
|
725
|
+
for (const [index, name] of (TYPE_TEMPLATES[form.template ?? 'simple'] ??
|
|
726
|
+
TYPE_TEMPLATES.simple).entries()) {
|
|
727
|
+
const code = slugify(name);
|
|
728
|
+
// Same reason as the columns above, and the result is checked rather
|
|
729
|
+
// than dropped: a type that failed to seed left no trace at all.
|
|
730
|
+
const type = (await ctx.call('flow.issueType.save', {
|
|
731
|
+
values: {
|
|
732
|
+
id: `${id}:type:${code}`,
|
|
733
|
+
projectId: id,
|
|
734
|
+
code,
|
|
735
|
+
name,
|
|
736
|
+
sequence: (index + 1) * 10,
|
|
737
|
+
},
|
|
738
|
+
idempotencyKey: `${id}:type:${code}`,
|
|
739
|
+
}, url, req));
|
|
740
|
+
if (!type.ok)
|
|
741
|
+
return seeOther(inLocale(url, `/admin/flow/projects/${id}/settings`));
|
|
742
|
+
}
|
|
743
|
+
return seeOther(inLocale(url, `/admin/flow/projects/${id}/board`));
|
|
744
|
+
}
|
|
745
|
+
errors = errorsOf(result, _);
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
else if (req.method !== 'GET')
|
|
749
|
+
return text('GET or POST', { status: 405 });
|
|
750
|
+
const returnTo = projectReturnTo(url, submittedReturnTo);
|
|
751
|
+
return seeOther(projectCreateFailureHref(url, returnTo, values, errors));
|
|
752
|
+
};
|
|
753
|
+
export const routes = {
|
|
754
|
+
// The document endpoints under `/admin/flow/issues/{id}` — content, push,
|
|
755
|
+
// live, presence, leave. Mounted rather than written out: they are the same
|
|
756
|
+
// five for every record that holds a document.
|
|
757
|
+
...documentRoutes(issueDocument, '/admin/flow/issues'),
|
|
758
|
+
...documentRoutes(pageDocument, '/admin/flow/pages'),
|
|
759
|
+
// A project's own five endpoints sit beside its screens rather than under a
|
|
760
|
+
// separate base — `/admin/flow/projects/{id}` is already this record's home.
|
|
761
|
+
...documentRoutes(projectDocument, '/admin/flow/projects'),
|
|
762
|
+
...documentRoutes(epicDocument, '/admin/flow/epics'),
|
|
763
|
+
'/admin/flow': () => async (url, req) => req.method === 'GET' ? seeOther(inLocale(url, '/admin/flow/projects')) : text('GET', { status: 405 }),
|
|
764
|
+
/**
|
|
765
|
+
* Where a file on an issue is posted.
|
|
766
|
+
*
|
|
767
|
+
* `receiveAttachment` is storage's own reader — it is the one thing on this
|
|
768
|
+
* screen that needs the raw request body, which a `defineFn` handler cannot
|
|
769
|
+
* reach (`Ctx.storage` exists only on a job context). The read check runs
|
|
770
|
+
* first so a caller who cannot see the issue cannot attach to it either.
|
|
771
|
+
*/
|
|
772
|
+
'/admin/flow/issues/{id}/attachments': (ctx) => async (url, req, params) => {
|
|
773
|
+
const refused = onlyPost(req);
|
|
774
|
+
if (refused)
|
|
775
|
+
return refused;
|
|
776
|
+
const issueId = String(params.id);
|
|
777
|
+
if (!(await readable(ctx, url, req, issueId)))
|
|
778
|
+
return text('forbidden', { status: 403 });
|
|
779
|
+
await receiveAttachment(ctx, url, req, {
|
|
780
|
+
resModel: 'flow.Issue',
|
|
781
|
+
resId: issueId,
|
|
782
|
+
resField: 'attachment',
|
|
783
|
+
public: false,
|
|
784
|
+
});
|
|
785
|
+
return seeOther(inLocale(url, `/admin/flow/issues/${encodeURIComponent(issueId)}`));
|
|
786
|
+
},
|
|
787
|
+
'/admin/flow/issues/{id}': (ctx) => async (url, req, params) => {
|
|
788
|
+
const refused = refusePost(req);
|
|
789
|
+
if (refused)
|
|
790
|
+
return refused;
|
|
791
|
+
const issueId = String(params.id);
|
|
792
|
+
const _ = ctx.translate(ctx.localeOf(url, req));
|
|
793
|
+
// Tagged with the action that produced them, so the screen can put each
|
|
794
|
+
// message under the form it belongs to rather than all of them on top.
|
|
795
|
+
let errors;
|
|
796
|
+
let submitted = {};
|
|
797
|
+
let renderedIdempotencyKey = randomUUID();
|
|
798
|
+
if (req.method === 'POST') {
|
|
799
|
+
const form = await readForm(req);
|
|
800
|
+
submitted = form;
|
|
801
|
+
const action = form.action ?? '';
|
|
802
|
+
renderedIdempotencyKey = form.idempotencyKey || renderedIdempotencyKey;
|
|
803
|
+
const idempotencyKey = renderedIdempotencyKey;
|
|
804
|
+
let result = null;
|
|
805
|
+
if (action === 'save') {
|
|
806
|
+
const existing = (await readable(ctx, url, req, issueId));
|
|
807
|
+
if (!existing)
|
|
808
|
+
return text('not found', { status: 404 });
|
|
809
|
+
// Every field this form owns is sent, empty ones as an explicit
|
|
810
|
+
// null so clearing a picker actually clears it. Sprint and parent
|
|
811
|
+
// are deliberately absent: neither is on this form (sprint has its
|
|
812
|
+
// own action below, parent has no screen yet), and `issue.save`
|
|
813
|
+
// keeps what it is not told about.
|
|
814
|
+
result = (await ctx.call('flow.issue.save', {
|
|
815
|
+
id: issueId,
|
|
816
|
+
projectId: existing.projectId,
|
|
817
|
+
columnId: existing.columnId,
|
|
818
|
+
title: form.title ?? '',
|
|
819
|
+
priority: form.priority || undefined,
|
|
820
|
+
assigneeUserId: form.assigneeUserId || null,
|
|
821
|
+
epicId: form.epicId || null,
|
|
822
|
+
typeId: form.typeId || null,
|
|
823
|
+
// The form names a custom field `field:<code>`, so the posted
|
|
824
|
+
// keys say which definition each answer belongs to without the
|
|
825
|
+
// route having to load them first.
|
|
826
|
+
fields: Object.fromEntries(Object.entries(form)
|
|
827
|
+
.filter(([key]) => key.startsWith('field:'))
|
|
828
|
+
.map(([key, value]) => [key.slice('field:'.length), value])),
|
|
829
|
+
tagIds: form.tagIds ? form.tagIds.split(',').filter(Boolean) : [],
|
|
830
|
+
startDate: form.startDate || null,
|
|
831
|
+
dueDate: form.dueDate || null,
|
|
832
|
+
estimate: form.estimate || undefined,
|
|
833
|
+
expectedVersion: Number(form.expectedVersion ?? 0),
|
|
834
|
+
idempotencyKey,
|
|
835
|
+
}, url, req));
|
|
836
|
+
}
|
|
837
|
+
else if (action === 'move') {
|
|
838
|
+
result = (await ctx.call('flow.issue.move', {
|
|
839
|
+
id: issueId,
|
|
840
|
+
columnId: form.columnId ?? '',
|
|
841
|
+
expectedVersion: Number(form.expectedVersion ?? 0),
|
|
842
|
+
idempotencyKey,
|
|
843
|
+
}, url, req));
|
|
844
|
+
}
|
|
845
|
+
else if (action === 'assignSprint') {
|
|
846
|
+
result = (await ctx.call('flow.issue.assignSprint', {
|
|
847
|
+
id: issueId,
|
|
848
|
+
sprintId: form.sprintId || undefined,
|
|
849
|
+
expectedVersion: Number(form.expectedVersion ?? 0),
|
|
850
|
+
idempotencyKey,
|
|
851
|
+
}, url, req));
|
|
852
|
+
}
|
|
853
|
+
else if (action === 'comment') {
|
|
854
|
+
result = (await ctx.call('flow.issue.comment', {
|
|
855
|
+
id: randomUUID(),
|
|
856
|
+
issueId,
|
|
857
|
+
body: form.body ?? '',
|
|
858
|
+
mentionUserIds: form.mentionUserIds ? form.mentionUserIds.split(',').filter(Boolean) : [],
|
|
859
|
+
idempotencyKey,
|
|
860
|
+
}, url, req));
|
|
861
|
+
}
|
|
862
|
+
else if (action === 'follow') {
|
|
863
|
+
if (!(await readable(ctx, url, req, issueId)))
|
|
864
|
+
return text('not found', { status: 404 });
|
|
865
|
+
result = (await ctx.call('flow.issue.follow', { issueId, idempotencyKey }, url, req));
|
|
866
|
+
}
|
|
867
|
+
else if (action === 'unfollow') {
|
|
868
|
+
if (!(await readable(ctx, url, req, issueId)))
|
|
869
|
+
return text('not found', { status: 404 });
|
|
870
|
+
result = (await ctx.call('flow.issue.unfollow', { issueId, idempotencyKey }, url, req));
|
|
871
|
+
}
|
|
872
|
+
else if (action === 'archive' || action === 'restore') {
|
|
873
|
+
// Under the same version the form was rendered with: archiving is a
|
|
874
|
+
// write like any other, and a stale screen must not take work out of
|
|
875
|
+
// the project's figures behind a second reader's back.
|
|
876
|
+
result = (await ctx.call(action === 'archive' ? 'flow.issue.archive' : 'flow.issue.restore', {
|
|
877
|
+
id: issueId,
|
|
878
|
+
expectedVersion: Number(form.expectedVersion ?? 0),
|
|
879
|
+
idempotencyKey,
|
|
880
|
+
}, url, req));
|
|
881
|
+
}
|
|
882
|
+
else if (action === 'attachSubtask') {
|
|
883
|
+
const parent = (await readable(ctx, url, req, issueId));
|
|
884
|
+
if (!parent)
|
|
885
|
+
return text('not found', { status: 404 });
|
|
886
|
+
const child = (await readable(ctx, url, req, form.childId ?? ''));
|
|
887
|
+
if (!child)
|
|
888
|
+
return text('not found', { status: 404 });
|
|
889
|
+
// An issue that already exists, put under this one. Everything else
|
|
890
|
+
// about it is left alone — `issue.save` keeps what it is not told —
|
|
891
|
+
// and the domain refuses another project or a cycle.
|
|
892
|
+
result = (await ctx.call('flow.issue.save', {
|
|
893
|
+
id: String(child.id),
|
|
894
|
+
projectId: child.projectId,
|
|
895
|
+
columnId: child.columnId,
|
|
896
|
+
title: String(child.title),
|
|
897
|
+
parentIssueId: issueId,
|
|
898
|
+
expectedVersion: Number(form.childVersion ?? child.version ?? 0),
|
|
899
|
+
idempotencyKey,
|
|
900
|
+
}, url, req));
|
|
901
|
+
}
|
|
902
|
+
else if (action === 'addDependency') {
|
|
903
|
+
result = (await ctx.call('flow.issue.dependency.add', {
|
|
904
|
+
id: randomUUID(),
|
|
905
|
+
issueId,
|
|
906
|
+
dependsOnIssueId: form.dependsOnIssueId ?? '',
|
|
907
|
+
relation: form.relation || 'blocks',
|
|
908
|
+
idempotencyKey,
|
|
909
|
+
}, url, req));
|
|
910
|
+
}
|
|
911
|
+
else if (action === 'addSubtask') {
|
|
912
|
+
const parent = (await readable(ctx, url, req, issueId));
|
|
913
|
+
if (!parent)
|
|
914
|
+
return text('not found', { status: 404 });
|
|
915
|
+
// Born on the parent's board, in the parent's column: a sub-task in
|
|
916
|
+
// another project is what `parentIssueError` refuses, and a column
|
|
917
|
+
// is not something this form asks for.
|
|
918
|
+
result = (await ctx.call('flow.issue.save', {
|
|
919
|
+
id: randomUUID(),
|
|
920
|
+
projectId: parent.projectId,
|
|
921
|
+
columnId: parent.columnId,
|
|
922
|
+
parentIssueId: issueId,
|
|
923
|
+
title: form.title ?? '',
|
|
924
|
+
idempotencyKey,
|
|
925
|
+
}, url, req));
|
|
926
|
+
}
|
|
927
|
+
else if (action === 'detachSubtask') {
|
|
928
|
+
const child = (await readable(ctx, url, req, form.id ?? ''));
|
|
929
|
+
if (!child)
|
|
930
|
+
return text('not found', { status: 404 });
|
|
931
|
+
// Explicitly null, not omitted: `issue.save` keeps what it is not
|
|
932
|
+
// told about, so omitting the parent would leave it attached.
|
|
933
|
+
result = (await ctx.call('flow.issue.save', {
|
|
934
|
+
id: String(child.id),
|
|
935
|
+
projectId: child.projectId,
|
|
936
|
+
columnId: child.columnId,
|
|
937
|
+
title: String(child.title),
|
|
938
|
+
parentIssueId: null,
|
|
939
|
+
expectedVersion: Number(form.childVersion ?? child.version ?? 0),
|
|
940
|
+
idempotencyKey,
|
|
941
|
+
}, url, req));
|
|
942
|
+
}
|
|
943
|
+
else if (action === 'removeDependency') {
|
|
944
|
+
result = (await ctx.call('flow.issue.dependency.remove', { id: form.id ?? '' }, url, req));
|
|
945
|
+
}
|
|
946
|
+
else {
|
|
947
|
+
return text('unknown action', { status: 400 });
|
|
948
|
+
}
|
|
949
|
+
if (result?.ok)
|
|
950
|
+
return seeOther(inLocale(url, `/admin/flow/issues/${issueId}`));
|
|
951
|
+
errors = { action, messages: errorsOf(result, _) };
|
|
952
|
+
}
|
|
953
|
+
else if (req.method !== 'GET')
|
|
954
|
+
return text('GET or POST', { status: 405 });
|
|
955
|
+
const issue = (await readable(ctx, url, req, issueId));
|
|
956
|
+
if (!issue)
|
|
957
|
+
return text('not found', { status: 404 });
|
|
958
|
+
const [columns, sprints, types] = await Promise.all([
|
|
959
|
+
ctx.call('flow.column.list', { projectId: issue.projectId }, url, req),
|
|
960
|
+
ctx.call('flow.sprint.list', { projectId: issue.projectId }, url, req),
|
|
961
|
+
ctx.call('flow.issueType.list', { projectId: issue.projectId }, url, req),
|
|
962
|
+
]);
|
|
963
|
+
// Files on this issue. `storage.listAttachments` is the same read the CRM
|
|
964
|
+
// case screen makes; nothing about it is Flow's.
|
|
965
|
+
const [attachments, fieldDefs] = await Promise.all([
|
|
966
|
+
// `resField` is not optional here in practice: the same record also
|
|
967
|
+
// carries `content`, which is Live Doc's flattened CRDT snapshot.
|
|
968
|
+
// Listing without it put those blobs in the attachment panel as though
|
|
969
|
+
// somebody had uploaded them, and offered them for download.
|
|
970
|
+
ctx.call('storage.listAttachments', { resModel: 'flow.Issue', resId: issueId, resField: 'attachment' }, url, req),
|
|
971
|
+
ctx.call('flow.field.list', { projectId: String(issue.projectId) }, url, req),
|
|
972
|
+
]);
|
|
973
|
+
const editor = await ctx.joint(url, req, 'flow_backend:screen.issue', {
|
|
974
|
+
docId: issueId,
|
|
975
|
+
base: '/admin/flow/issues',
|
|
976
|
+
lang: url.searchParams.get('lang') ?? '',
|
|
977
|
+
});
|
|
978
|
+
const controls = {
|
|
979
|
+
assignee: await assigneeControl(ctx, url, req, _, {
|
|
980
|
+
id: 'issue-assignee',
|
|
981
|
+
value: issue.assigneeUserId ? String(issue.assigneeUserId) : null,
|
|
982
|
+
users: issue.assigneeUserId
|
|
983
|
+
? [
|
|
984
|
+
{
|
|
985
|
+
value: String(issue.assigneeUserId),
|
|
986
|
+
label: String(issue.assigneeName ?? issue.assigneeUserId),
|
|
987
|
+
},
|
|
988
|
+
]
|
|
989
|
+
: [],
|
|
990
|
+
}),
|
|
991
|
+
mentions: await mentionControl(ctx, url, req, _, { id: 'issue-mentions' }),
|
|
992
|
+
epic: await epicControl(ctx, url, req, _, {
|
|
993
|
+
id: 'issue-epic',
|
|
994
|
+
value: issue.epicId ? String(issue.epicId) : null,
|
|
995
|
+
projectId: String(issue.projectId),
|
|
996
|
+
epics: issue.epicId
|
|
997
|
+
? [{ value: String(issue.epicId), label: String(issue.epicTitle ?? issue.epicId) }]
|
|
998
|
+
: [],
|
|
999
|
+
}),
|
|
1000
|
+
tags: await tagsControl(ctx, url, req, _, {
|
|
1001
|
+
id: 'issue-tags',
|
|
1002
|
+
values: (issue.tags ?? []).map((tag) => String(tag.id)),
|
|
1003
|
+
tags: (issue.tags ?? []).map((tag) => ({
|
|
1004
|
+
value: String(tag.id),
|
|
1005
|
+
label: String(tag.name),
|
|
1006
|
+
})),
|
|
1007
|
+
}),
|
|
1008
|
+
dependencyTarget: await issueControl(ctx, url, req, _, {
|
|
1009
|
+
id: 'issue-dependency',
|
|
1010
|
+
name: 'dependsOnIssueId',
|
|
1011
|
+
projectId: String(issue.projectId),
|
|
1012
|
+
excludeId: issueId,
|
|
1013
|
+
required: true,
|
|
1014
|
+
}),
|
|
1015
|
+
// Scoped to the same project and excluding this issue. A cycle or a
|
|
1016
|
+
// cross-project parent is refused by `saveIssue`, which is where that
|
|
1017
|
+
// rule belongs — this only keeps the obvious mistake out of the picker.
|
|
1018
|
+
subtaskTarget: await issueControl(ctx, url, req, _, {
|
|
1019
|
+
id: 'issue-subtask',
|
|
1020
|
+
name: 'childId',
|
|
1021
|
+
projectId: String(issue.projectId),
|
|
1022
|
+
excludeId: issueId,
|
|
1023
|
+
required: true,
|
|
1024
|
+
}),
|
|
1025
|
+
};
|
|
1026
|
+
return adminPage(ctx, url, req, {
|
|
1027
|
+
title: String(issue.title),
|
|
1028
|
+
translate: false,
|
|
1029
|
+
// The list this detail page belongs to, so the sidebar keeps marking
|
|
1030
|
+
// the project the issue is in rather than emptying out — the same
|
|
1031
|
+
// reason a quotation points at the quotations list.
|
|
1032
|
+
active: `/admin/flow/projects/${String(issue.projectId)}/issues`,
|
|
1033
|
+
body: (_, frame) => issueDetailScreen(_, frame, issue, {
|
|
1034
|
+
fields: issueFields(_, issue, controls, types),
|
|
1035
|
+
columns,
|
|
1036
|
+
sprints,
|
|
1037
|
+
controls,
|
|
1038
|
+
attachments,
|
|
1039
|
+
fieldDefs,
|
|
1040
|
+
editor,
|
|
1041
|
+
errors,
|
|
1042
|
+
submitted,
|
|
1043
|
+
locale: localeQuery(url),
|
|
1044
|
+
dialog: url.searchParams.get('dialog') === 'move' || url.searchParams.get('dialog') === 'assignSprint'
|
|
1045
|
+
? url.searchParams.get('dialog')
|
|
1046
|
+
: undefined,
|
|
1047
|
+
idempotencyKey: renderedIdempotencyKey,
|
|
1048
|
+
}),
|
|
1049
|
+
});
|
|
1050
|
+
},
|
|
1051
|
+
'/admin/flow/projects/new': projectCreateRoute('/admin/flow/projects/new'),
|
|
1052
|
+
'/admin/flow/projects': (ctx) => async (url, req) => {
|
|
1053
|
+
if (req.method === 'POST')
|
|
1054
|
+
return projectCreateRoute('/admin/flow/projects')(ctx)(url, req, {});
|
|
1055
|
+
if (req.method !== 'GET')
|
|
1056
|
+
return text('GET or POST', { status: 405 });
|
|
1057
|
+
const _ = ctx.translate(ctx.localeOf(url, req));
|
|
1058
|
+
const showArchived = url.searchParams.get('archived') === '1';
|
|
1059
|
+
// One page, and the real total beside it. This used to ask for two
|
|
1060
|
+
// hundred and report what came back as the whole company's project
|
|
1061
|
+
// count — wrong past that, and with no way to reach the rest (FLW-039).
|
|
1062
|
+
const page = Math.max(1, Number.parseInt(url.searchParams.get('page') ?? '1', 10) || 1);
|
|
1063
|
+
const all = (await ctx.call('flow.project.list', {
|
|
1064
|
+
limit: LIST_PAGE_SIZE,
|
|
1065
|
+
cursor: (page - 1) * LIST_PAGE_SIZE,
|
|
1066
|
+
includeArchived: showArchived,
|
|
1067
|
+
}, url, req));
|
|
1068
|
+
const counted = (await ctx.call('flow.project.count', { includeArchived: showArchived }, url, req));
|
|
1069
|
+
const total = Number(counted.total ?? 0);
|
|
1070
|
+
const stats = (await ctx.call('flow.project.stats', { projectIds: all.map((project) => String(project.id)) }, url, req));
|
|
1071
|
+
const statsBy = new Map(stats.map((row) => [String(row.id), row]));
|
|
1072
|
+
const withStats = all.map((project) => ({ ...project, ...statsBy.get(String(project.id)) }));
|
|
1073
|
+
const tab = showArchived ? 'archived' : url.searchParams.get('tab') === 'mine' ? 'mine' : 'all';
|
|
1074
|
+
// Asked as "which projects", not as "the two hundred issues I touched
|
|
1075
|
+
// most recently" — that page silently dropped projects from the tab of
|
|
1076
|
+
// anyone carrying more work than it held. See projectsWithMyWork.
|
|
1077
|
+
const rows = tab === 'mine'
|
|
1078
|
+
? (await ctx.call('flow.project.list', { mine: true }, url, req)).map((project) => withStats.find((row) => String(row.id) === String(project.id)) ?? project)
|
|
1079
|
+
: tab === 'archived'
|
|
1080
|
+
? withStats.filter((project) => project.active === false)
|
|
1081
|
+
: withStats;
|
|
1082
|
+
const recent = (await ctx.call('flow.issue.list', {
|
|
1083
|
+
listState: { ...emptyIssueListState(), sort: [{ key: 'updatedAt', dir: 'desc' }] },
|
|
1084
|
+
limit: 6,
|
|
1085
|
+
}, url, req));
|
|
1086
|
+
return adminPage(ctx, url, req, {
|
|
1087
|
+
title: 'flow_backend.projects.title',
|
|
1088
|
+
body: (_, frame) => {
|
|
1089
|
+
const workspace = projectsListScreen(_, frame, {
|
|
1090
|
+
rows,
|
|
1091
|
+
projectCount: total,
|
|
1092
|
+
// Only the tab that really pages gets a pager. `mine` and
|
|
1093
|
+
// `archived` are filters over what came back, so a pager on them
|
|
1094
|
+
// would count pages of a list this route never asked for.
|
|
1095
|
+
pager: tab === 'all' && total > LIST_PAGE_SIZE
|
|
1096
|
+
? {
|
|
1097
|
+
from: rows.length ? (page - 1) * LIST_PAGE_SIZE + 1 : 0,
|
|
1098
|
+
to: Math.min(page * LIST_PAGE_SIZE, total),
|
|
1099
|
+
total,
|
|
1100
|
+
prev: page > 1 ? `/admin/flow/projects?page=${page - 1}` : null,
|
|
1101
|
+
next: page * LIST_PAGE_SIZE < total ? `/admin/flow/projects?page=${page + 1}` : null,
|
|
1102
|
+
}
|
|
1103
|
+
: null,
|
|
1104
|
+
issueCount: stats.reduce((sum, row) => sum + Number(row.total ?? 0), 0),
|
|
1105
|
+
issuesDone: stats.reduce((sum, row) => sum + Number(row.done ?? 0), 0),
|
|
1106
|
+
activeCount: stats.filter((row) => String(row.state) === 'active').length,
|
|
1107
|
+
activity: (recent.rows ?? []).slice(0, 6),
|
|
1108
|
+
tab,
|
|
1109
|
+
tabs: [
|
|
1110
|
+
{
|
|
1111
|
+
id: 'all',
|
|
1112
|
+
label: _('flow_backend.projects.tabAll'),
|
|
1113
|
+
href: '/admin/flow/projects',
|
|
1114
|
+
},
|
|
1115
|
+
{
|
|
1116
|
+
id: 'mine',
|
|
1117
|
+
label: _('flow_backend.projects.tabMine'),
|
|
1118
|
+
href: '/admin/flow/projects?tab=mine',
|
|
1119
|
+
},
|
|
1120
|
+
// A third tab rather than a toggle: archived projects are a place
|
|
1121
|
+
// you go, not a filter you leave on by accident.
|
|
1122
|
+
{
|
|
1123
|
+
id: 'archived',
|
|
1124
|
+
label: _('flow_backend.projects.tabArchived'),
|
|
1125
|
+
href: '/admin/flow/projects?archived=1',
|
|
1126
|
+
},
|
|
1127
|
+
],
|
|
1128
|
+
createHref: projectCreateHref(url),
|
|
1129
|
+
locale: localeQuery(url),
|
|
1130
|
+
});
|
|
1131
|
+
if (url.searchParams.get('create') !== '1')
|
|
1132
|
+
return workspace;
|
|
1133
|
+
const returnUrl = new URL(url);
|
|
1134
|
+
for (const key of [
|
|
1135
|
+
'create',
|
|
1136
|
+
'invalid',
|
|
1137
|
+
'error',
|
|
1138
|
+
'id',
|
|
1139
|
+
'idempotencyKey',
|
|
1140
|
+
'key',
|
|
1141
|
+
'name',
|
|
1142
|
+
'description',
|
|
1143
|
+
'template',
|
|
1144
|
+
'customColumns',
|
|
1145
|
+
])
|
|
1146
|
+
returnUrl.searchParams.delete(key);
|
|
1147
|
+
const returnTo = `${returnUrl.pathname}${returnUrl.search}`;
|
|
1148
|
+
const errors = url.searchParams.getAll('error');
|
|
1149
|
+
return modalWorkspace(workspace, projectCreateModal(_, {
|
|
1150
|
+
action: projectCreateHref(url),
|
|
1151
|
+
cancelHref: returnTo,
|
|
1152
|
+
returnTo,
|
|
1153
|
+
// Kept across a failed submit so the retry lands on the same project.
|
|
1154
|
+
recordId: url.searchParams.get('id') || randomUUID(),
|
|
1155
|
+
idempotencyKey: url.searchParams.get('idempotencyKey') || randomUUID(),
|
|
1156
|
+
fields: projectCreateFields(_, Object.fromEntries(['key', 'name', 'description', 'template', 'customColumns']
|
|
1157
|
+
.map((name) => [name, url.searchParams.get(name) ?? ''])
|
|
1158
|
+
.filter(([, value]) => value))),
|
|
1159
|
+
errors: errors.length
|
|
1160
|
+
? errors
|
|
1161
|
+
: url.searchParams.get('invalid') === '1'
|
|
1162
|
+
? [_('flow_backend.error.invalid')]
|
|
1163
|
+
: undefined,
|
|
1164
|
+
}));
|
|
1165
|
+
},
|
|
1166
|
+
});
|
|
1167
|
+
},
|
|
1168
|
+
/**
|
|
1169
|
+
* The board, without saying which project in the path.
|
|
1170
|
+
*
|
|
1171
|
+
* A board is one project's — `flow.Column` belongs to a project, so there is
|
|
1172
|
+
* nothing for a board spanning them to group by. This resolves the reader's
|
|
1173
|
+
* own last board and sends them there; the first time, when there is nothing
|
|
1174
|
+
* remembered and nothing to guess from, it sends them to the project list to
|
|
1175
|
+
* choose rather than picking one for them.
|
|
1176
|
+
*/
|
|
1177
|
+
'/admin/flow/board': (ctx) => async (url, req) => {
|
|
1178
|
+
if (req.method !== 'GET')
|
|
1179
|
+
return text('GET', { status: 405 });
|
|
1180
|
+
const scope = (await ctx.call('flow.board.scope', {}, url, req));
|
|
1181
|
+
if (scope.projectId)
|
|
1182
|
+
return seeOther(inLocale(url, `/admin/flow/projects/${String(scope.projectId)}/board`));
|
|
1183
|
+
const projects = (await ctx.call('flow.project.list', { limit: 2 }, url, req));
|
|
1184
|
+
// One project is not a choice, so it is not worth making somebody make it.
|
|
1185
|
+
if (projects.length === 1)
|
|
1186
|
+
return seeOther(inLocale(url, `/admin/flow/projects/${String(projects[0].id)}/board`));
|
|
1187
|
+
return seeOther(inLocale(url, '/admin/flow/projects'));
|
|
1188
|
+
},
|
|
1189
|
+
'/admin/flow/projects/{id}/board': (ctx) => async (url, req, params) => {
|
|
1190
|
+
if (req.method !== 'GET')
|
|
1191
|
+
return text('GET', { status: 405 });
|
|
1192
|
+
const projectId = String(params.id);
|
|
1193
|
+
const project = await projectOf(ctx, url, req, projectId);
|
|
1194
|
+
if (!project)
|
|
1195
|
+
return text('not found', { status: 404 });
|
|
1196
|
+
// Opening a board is what says which one you meant. `/admin/flow/board`
|
|
1197
|
+
// reads this back, so the global entry lands where you last were rather
|
|
1198
|
+
// than asking again every time.
|
|
1199
|
+
await ctx.call('flow.board.remember', { projectId }, url, req).catch(() => null);
|
|
1200
|
+
const columns = (await ctx.call('flow.column.list', { projectId }, url, req));
|
|
1201
|
+
const BOARD_COLUMN = 40;
|
|
1202
|
+
const pages = await Promise.all(columns.map(async (column) => {
|
|
1203
|
+
const result = (await ctx.call('flow.issue.list', { columnId: column.id, limit: BOARD_COLUMN }, url, req));
|
|
1204
|
+
const total = Number(result.total ?? 0);
|
|
1205
|
+
const rows = result.rows ?? [];
|
|
1206
|
+
return {
|
|
1207
|
+
column: {
|
|
1208
|
+
...column,
|
|
1209
|
+
total,
|
|
1210
|
+
loadMoreHref: rows.length < total ? issuesFilteredBy(projectId, 'columnId', String(column.id)) : null,
|
|
1211
|
+
},
|
|
1212
|
+
rows,
|
|
1213
|
+
};
|
|
1214
|
+
}));
|
|
1215
|
+
const _ = ctx.translate(ctx.localeOf(url, req));
|
|
1216
|
+
const board = await ctx.joint(url, req, 'flow_backend:screen.board', {
|
|
1217
|
+
lang: ctx.localeOf(url, req),
|
|
1218
|
+
data: JSON.stringify({
|
|
1219
|
+
locale: localeQuery(url),
|
|
1220
|
+
rows: pages.flatMap((item) => item.rows.map((row) => ({ ...row, projectId }))),
|
|
1221
|
+
columns: pages.map((item) => item.column),
|
|
1222
|
+
labels: {
|
|
1223
|
+
empty: _('flow_backend.board.empty'),
|
|
1224
|
+
move: _('flow_backend.action.move'),
|
|
1225
|
+
moving: _('flow_backend.board.moving'),
|
|
1226
|
+
conflict: _('flow.error.conflict'),
|
|
1227
|
+
unassigned: _('flow_backend.board.unassigned'),
|
|
1228
|
+
loadMore: _('flow_backend.board.loadMore'),
|
|
1229
|
+
moveShort: _('flow_backend.action.moveShort'),
|
|
1230
|
+
// Every refusal `issue.move` can answer with, translated here
|
|
1231
|
+
// where the catalogue is, so a drag that is genuinely not allowed
|
|
1232
|
+
// says why instead of claiming someone else edited the issue.
|
|
1233
|
+
errors: {
|
|
1234
|
+
'flow.error.blocked': _('flow.error.blocked'),
|
|
1235
|
+
'flow.error.invalidColumn': _('flow.error.invalidColumn'),
|
|
1236
|
+
'flow.error.notFound': _('flow.error.notFound'),
|
|
1237
|
+
},
|
|
1238
|
+
},
|
|
1239
|
+
}),
|
|
1240
|
+
});
|
|
1241
|
+
return adminPage(ctx, url, req, {
|
|
1242
|
+
title: String(project.name),
|
|
1243
|
+
translate: false,
|
|
1244
|
+
body: (_, frame) => boardScreen(_, frame, String(project.name), board),
|
|
1245
|
+
});
|
|
1246
|
+
},
|
|
1247
|
+
'/admin/flow/projects/{id}/board/move': (ctx) => async (url, req, params) => {
|
|
1248
|
+
const refused = onlyPost(req);
|
|
1249
|
+
if (refused)
|
|
1250
|
+
return refused;
|
|
1251
|
+
const projectId = String(params.id);
|
|
1252
|
+
const form = await readForm(req);
|
|
1253
|
+
const result = (await ctx.call('flow.issue.move', {
|
|
1254
|
+
id: form.id ?? '',
|
|
1255
|
+
columnId: form.columnId ?? '',
|
|
1256
|
+
expectedVersion: Number(form.expectedVersion ?? 0),
|
|
1257
|
+
idempotencyKey: form.idempotencyKey || randomUUID(),
|
|
1258
|
+
}, url, req));
|
|
1259
|
+
return result.ok
|
|
1260
|
+
? seeOther(inLocale(url, `/admin/flow/projects/${projectId}/board`))
|
|
1261
|
+
: text(errorsOf(result, ctx.translate(ctx.localeOf(url, req))).join('\n'), { status: 409 });
|
|
1262
|
+
},
|
|
1263
|
+
/**
|
|
1264
|
+
* Every issue assigned to whoever is reading, across every project.
|
|
1265
|
+
*
|
|
1266
|
+
* It reuses the backlog's whole list apparatus — search, filters, grouping,
|
|
1267
|
+
* pager — by passing `mine` down instead of a project id, so the two screens
|
|
1268
|
+
* cannot drift. Who "mine" is gets settled in the domain (`issueQuery`), the
|
|
1269
|
+
* way `activity.listMy` settles it: a screen has no cheap way to learn who
|
|
1270
|
+
* is signed in.
|
|
1271
|
+
*/
|
|
1272
|
+
'/admin/flow/mine': crossProjectIssues({ mine: true, title: 'flow_backend.mine.title' }),
|
|
1273
|
+
/**
|
|
1274
|
+
* Every issue, whoever it belongs to.
|
|
1275
|
+
*
|
|
1276
|
+
* The same route body as `/admin/flow/mine` with one argument dropped —
|
|
1277
|
+
* search, filters, grouping and the pager all come from the same apparatus,
|
|
1278
|
+
* so the two cannot answer differently about the same question.
|
|
1279
|
+
*/
|
|
1280
|
+
'/admin/flow/issues': crossProjectIssues({ mine: false, title: 'flow_backend.issues.allTitle' }),
|
|
1281
|
+
'/admin/flow/projects/{id}/issues': (ctx) => async (url, req, params) => {
|
|
1282
|
+
const refused = refusePost(req);
|
|
1283
|
+
if (refused)
|
|
1284
|
+
return refused;
|
|
1285
|
+
const projectId = String(params.id);
|
|
1286
|
+
const project = await projectOf(ctx, url, req, projectId);
|
|
1287
|
+
if (!project)
|
|
1288
|
+
return text('not found', { status: 404 });
|
|
1289
|
+
const _ = ctx.translate(ctx.localeOf(url, req));
|
|
1290
|
+
const columns = (await ctx.call('flow.column.list', { projectId }, url, req));
|
|
1291
|
+
let values = issueCreateValues(Object.fromEntries(['title', 'columnId', 'priority']
|
|
1292
|
+
.map((name) => [name, url.searchParams.get(name) ?? ''])
|
|
1293
|
+
.filter(([, value]) => value)));
|
|
1294
|
+
if (req.method === 'POST') {
|
|
1295
|
+
const form = await readForm(req);
|
|
1296
|
+
values = issueCreateValues(form);
|
|
1297
|
+
const returnTo = projectIssuesReturnTo(url, projectId, form.returnTo);
|
|
1298
|
+
// The key is rendered once per opening of the form, so a double click
|
|
1299
|
+
// or a back-and-resubmit posts the same one. The id has to follow it:
|
|
1300
|
+
// a fresh uuid per attempt made the second attempt a different record,
|
|
1301
|
+
// and one intent became two issues (FLW-033).
|
|
1302
|
+
const key = form.idempotencyKey || randomUUID();
|
|
1303
|
+
const result = (await ctx.call('flow.issue.save', {
|
|
1304
|
+
id: commandRecordId(`flow.issue.create:${projectId}`, key),
|
|
1305
|
+
projectId,
|
|
1306
|
+
columnId: values.columnId || String(columns[0]?.id ?? ''),
|
|
1307
|
+
title: values.title,
|
|
1308
|
+
priority: values.priority || undefined,
|
|
1309
|
+
idempotencyKey: key,
|
|
1310
|
+
}, url, req));
|
|
1311
|
+
if (result.ok)
|
|
1312
|
+
return seeOther(returnTo);
|
|
1313
|
+
return seeOther(projectIssueCreateFailureHref(url, returnTo, values, errorsOf(result, _)));
|
|
1314
|
+
}
|
|
1315
|
+
else if (req.method !== 'GET')
|
|
1316
|
+
return text('GET or POST', { status: 405 });
|
|
1317
|
+
// The project's own fields have to be in the spec before the URL is
|
|
1318
|
+
// parsed: a rule naming a field the spec does not know is dropped as
|
|
1319
|
+
// unknown, and the filter would silently do nothing.
|
|
1320
|
+
const fieldDefs = (await ctx.call('flow.field.list', { projectId }, url, req));
|
|
1321
|
+
const spec = issueListSearch(table(ctx.manifest, 'flow.Issue'), fieldDefs);
|
|
1322
|
+
const listUrl = new URL(projectIssuesCollection(url, projectId), url);
|
|
1323
|
+
const parsed = parseListState(spec, listUrl);
|
|
1324
|
+
const state = parsed.state;
|
|
1325
|
+
// No timezone from here. The day boundary belongs to the company, and
|
|
1326
|
+
// `issueQuery` resolves it once for the list, the groups and the figures
|
|
1327
|
+
// alike — a route that named its own would be a second place to get it
|
|
1328
|
+
// wrong, which is how this was UTC for everyone.
|
|
1329
|
+
const timezone = '';
|
|
1330
|
+
const grouped = state.groupBy.length > 0;
|
|
1331
|
+
const cursor = (state.page - 1) * LIST_PAGE_SIZE;
|
|
1332
|
+
const result = (await ctx.call('flow.issue.list', {
|
|
1333
|
+
projectId,
|
|
1334
|
+
listState: state,
|
|
1335
|
+
timezone,
|
|
1336
|
+
cursor: String(cursor),
|
|
1337
|
+
limit: grouped ? 1 : LIST_PAGE_SIZE,
|
|
1338
|
+
}, url, req));
|
|
1339
|
+
const groups = grouped
|
|
1340
|
+
? await loadListGroups(ctx, listUrl, req, state, timezone, {
|
|
1341
|
+
groupFunction: 'flow.issue.group',
|
|
1342
|
+
listFunction: 'flow.issue.list',
|
|
1343
|
+
listArgs: { projectId },
|
|
1344
|
+
label: (_field, value) => String(value ?? '—'),
|
|
1345
|
+
})
|
|
1346
|
+
: [];
|
|
1347
|
+
return adminPage(ctx, url, req, {
|
|
1348
|
+
title: String(project.name),
|
|
1349
|
+
translate: false,
|
|
1350
|
+
active: `/admin/flow/projects/${projectId}/issues`,
|
|
1351
|
+
body: (_, frame) => {
|
|
1352
|
+
frame.chrome = {
|
|
1353
|
+
search: {
|
|
1354
|
+
name: 'q',
|
|
1355
|
+
value: state.q ?? '',
|
|
1356
|
+
placeholder: _('flow_backend.search.issues'),
|
|
1357
|
+
keep: keepForListSearch(listUrl),
|
|
1358
|
+
facets: listFacets(_, listUrl, state, spec),
|
|
1359
|
+
menus: listMenus(_, listUrl, state, spec),
|
|
1360
|
+
},
|
|
1361
|
+
pager: grouped
|
|
1362
|
+
? null
|
|
1363
|
+
: pager(listUrl, state, (result.rows ?? []).length, Number(result.total ?? 0)),
|
|
1364
|
+
};
|
|
1365
|
+
const returnTo = projectIssuesCollection(url, projectId);
|
|
1366
|
+
const workspace = issuesScreen(_, frame, {
|
|
1367
|
+
projectName: String(project.name),
|
|
1368
|
+
rows: grouped ? [] : (result.rows ?? []),
|
|
1369
|
+
groups,
|
|
1370
|
+
fields: fieldDefs,
|
|
1371
|
+
total: Number(result.total ?? 0),
|
|
1372
|
+
createHref: projectIssueCreateHref(url, projectId),
|
|
1373
|
+
locale: localeQuery(url),
|
|
1374
|
+
filterTruncated: result.fieldFilterTruncated === true,
|
|
1375
|
+
archivedHref: archivedHref(url),
|
|
1376
|
+
showingArchived: state.includeArchived,
|
|
1377
|
+
});
|
|
1378
|
+
if (url.searchParams.get('create') !== '1')
|
|
1379
|
+
return workspace;
|
|
1380
|
+
const errors = url.searchParams.getAll('error');
|
|
1381
|
+
return modalWorkspace(workspace, issueCreateModal(_, {
|
|
1382
|
+
projectName: String(project.name),
|
|
1383
|
+
fields: issueCreateFields(_, columns, values),
|
|
1384
|
+
action: projectIssueCreateHref(url, projectId),
|
|
1385
|
+
cancelHref: returnTo,
|
|
1386
|
+
idempotencyKey: randomUUID(),
|
|
1387
|
+
errors: errors.length
|
|
1388
|
+
? errors
|
|
1389
|
+
: url.searchParams.get('invalid') === '1'
|
|
1390
|
+
? [_('flow_backend.error.invalid')]
|
|
1391
|
+
: undefined,
|
|
1392
|
+
}));
|
|
1393
|
+
},
|
|
1394
|
+
});
|
|
1395
|
+
},
|
|
1396
|
+
/**
|
|
1397
|
+
* A project's documents, and the form that starts a new one.
|
|
1398
|
+
*
|
|
1399
|
+
* The whole tree comes back in one call and nests on the screen — see
|
|
1400
|
+
* `listPages` for why that is the right shape for a wiki and the wrong one
|
|
1401
|
+
* for the backlog.
|
|
1402
|
+
*/
|
|
1403
|
+
'/admin/flow/projects/{id}/pages': (ctx) => async (url, req, params) => {
|
|
1404
|
+
const refused = refusePost(req);
|
|
1405
|
+
if (refused)
|
|
1406
|
+
return refused;
|
|
1407
|
+
if (req.method !== 'GET' && req.method !== 'POST')
|
|
1408
|
+
return text('GET or POST', { status: 405 });
|
|
1409
|
+
const projectId = String(params.id);
|
|
1410
|
+
const _ = ctx.translate(ctx.localeOf(url, req));
|
|
1411
|
+
const endpoint = `/admin/flow/projects/${encodeURIComponent(projectId)}/pages`;
|
|
1412
|
+
if (req.method === 'POST') {
|
|
1413
|
+
const form = await readForm(req);
|
|
1414
|
+
if (form.action === 'save') {
|
|
1415
|
+
const result = (await ctx.call('flow.page.save', {
|
|
1416
|
+
id: form.id || randomUUID(),
|
|
1417
|
+
projectId,
|
|
1418
|
+
title: form.title ?? '',
|
|
1419
|
+
parentPageId: form.parentPageId || null,
|
|
1420
|
+
idempotencyKey: form.idempotencyKey || randomUUID(),
|
|
1421
|
+
}, url, req));
|
|
1422
|
+
if (result.ok)
|
|
1423
|
+
return seeOther(inLocale(url, `/admin/flow/pages/${encodeURIComponent(String(result.id))}`));
|
|
1424
|
+
return seeOther(projectPageCreateFailureHref(url, projectId, form, errorsOf(result, _)));
|
|
1425
|
+
}
|
|
1426
|
+
}
|
|
1427
|
+
const project = (await ctx.call('flow.project.get', { id: projectId }, url, req));
|
|
1428
|
+
if (!project)
|
|
1429
|
+
return text('not found', { status: 404 });
|
|
1430
|
+
// `page.list` has taken `includeArchived` since it was written and no
|
|
1431
|
+
// route ever passed it, so an archived document was gone from every
|
|
1432
|
+
// screen — including the one that could have brought it back.
|
|
1433
|
+
const showArchived = url.searchParams.get('archived') === '1';
|
|
1434
|
+
const pages = (await ctx.call('flow.page.list', { projectId, search: url.searchParams.get('q') ?? '', includeArchived: showArchived }, url, req));
|
|
1435
|
+
return adminPage(ctx, url, req, {
|
|
1436
|
+
title: String(project.name ?? ''),
|
|
1437
|
+
translate: false,
|
|
1438
|
+
active: endpoint,
|
|
1439
|
+
body: (t, frame) => {
|
|
1440
|
+
const errors = url.searchParams.getAll('error');
|
|
1441
|
+
// `page.list` has taken a search since it was written and this route
|
|
1442
|
+
// has passed it for as long — through `?q=`, which until now only a
|
|
1443
|
+
// hand-typed URL could set. The chrome is what the cross-project
|
|
1444
|
+
// document screen already uses; a second, hand-rolled form here
|
|
1445
|
+
// would be a second place for the same thing to drift (FLW-034).
|
|
1446
|
+
frame.chrome = {
|
|
1447
|
+
...frame.chrome,
|
|
1448
|
+
search: {
|
|
1449
|
+
name: 'q',
|
|
1450
|
+
value: url.searchParams.get('q') ?? '',
|
|
1451
|
+
placeholder: t('flow_backend.pages.search'),
|
|
1452
|
+
keep: keepForListSearch(url),
|
|
1453
|
+
},
|
|
1454
|
+
};
|
|
1455
|
+
return pagesScreen(t, frame, {
|
|
1456
|
+
projectName: String(project.name ?? ''),
|
|
1457
|
+
pages,
|
|
1458
|
+
createHref: projectPageCreateHref(url, projectId),
|
|
1459
|
+
createFields: projectPageCreateFields(t, pages, {
|
|
1460
|
+
title: url.searchParams.get('title') ?? '',
|
|
1461
|
+
parentPageId: url.searchParams.get('parentPageId') ?? '',
|
|
1462
|
+
}),
|
|
1463
|
+
createAction: projectPageCreateHref(url, projectId),
|
|
1464
|
+
archivedHref: archivedHref(url),
|
|
1465
|
+
showingArchived: showArchived,
|
|
1466
|
+
closeHref: projectPagesCollection(url, projectId),
|
|
1467
|
+
locale: localeQuery(url),
|
|
1468
|
+
createOpen: url.searchParams.get('create') === '1',
|
|
1469
|
+
errors: errors.length
|
|
1470
|
+
? errors
|
|
1471
|
+
: url.searchParams.get('invalid') === '1'
|
|
1472
|
+
? [t('flow_backend.error.invalid')]
|
|
1473
|
+
: undefined,
|
|
1474
|
+
recordId: url.searchParams.get('id') || randomUUID(),
|
|
1475
|
+
idempotencyKey: url.searchParams.get('idempotencyKey') || randomUUID(),
|
|
1476
|
+
});
|
|
1477
|
+
},
|
|
1478
|
+
});
|
|
1479
|
+
},
|
|
1480
|
+
/**
|
|
1481
|
+
* Every epic, across projects. Reached from the menu, and the base the epic
|
|
1482
|
+
* document endpoints above hang off.
|
|
1483
|
+
*/
|
|
1484
|
+
'/admin/flow/epics': (ctx) => async (url, req) => {
|
|
1485
|
+
if (req.method !== 'GET')
|
|
1486
|
+
return text('GET', { status: 405 });
|
|
1487
|
+
const search = url.searchParams.get('q') ?? '';
|
|
1488
|
+
const currentPage = Math.max(1, Number(url.searchParams.get('page') ?? 1) || 1);
|
|
1489
|
+
const cursor = (currentPage - 1) * LIST_PAGE_SIZE;
|
|
1490
|
+
const result = (await ctx.call('flow.epic.listAll', { search, cursor, limit: LIST_PAGE_SIZE }, url, req));
|
|
1491
|
+
const pageHref = (page) => {
|
|
1492
|
+
const target = new URL(url);
|
|
1493
|
+
if (page <= 1)
|
|
1494
|
+
target.searchParams.delete('page');
|
|
1495
|
+
else
|
|
1496
|
+
target.searchParams.set('page', String(page));
|
|
1497
|
+
return `${target.pathname}${target.search}`;
|
|
1498
|
+
};
|
|
1499
|
+
return adminPage(ctx, url, req, {
|
|
1500
|
+
title: 'flow_backend.epics.allTitle',
|
|
1501
|
+
body: (t, frame) => {
|
|
1502
|
+
frame.chrome = {
|
|
1503
|
+
search: {
|
|
1504
|
+
name: 'q',
|
|
1505
|
+
value: search,
|
|
1506
|
+
placeholder: t('flow_backend.epics.search'),
|
|
1507
|
+
keep: keepForListSearch(url),
|
|
1508
|
+
},
|
|
1509
|
+
pager: {
|
|
1510
|
+
from: result.rows.length ? cursor + 1 : 0,
|
|
1511
|
+
to: Math.min(cursor + result.rows.length, result.total),
|
|
1512
|
+
total: result.total,
|
|
1513
|
+
prev: currentPage > 1 ? pageHref(currentPage - 1) : null,
|
|
1514
|
+
next: cursor + result.rows.length < result.total ? pageHref(currentPage + 1) : null,
|
|
1515
|
+
},
|
|
1516
|
+
};
|
|
1517
|
+
return allEpicsScreen(t, frame, {
|
|
1518
|
+
title: t('flow_backend.epics.allTitle'),
|
|
1519
|
+
epics: result.rows,
|
|
1520
|
+
total: result.total,
|
|
1521
|
+
locale: localeQuery(url),
|
|
1522
|
+
});
|
|
1523
|
+
},
|
|
1524
|
+
});
|
|
1525
|
+
},
|
|
1526
|
+
/**
|
|
1527
|
+
* One epic: what it is for, and the issues under it.
|
|
1528
|
+
*
|
|
1529
|
+
* Epics had a card on a grid and a map, but nowhere to say what the epic
|
|
1530
|
+
* actually means — which is the gap a Live Doc fills, and the reason this
|
|
1531
|
+
* screen exists at all.
|
|
1532
|
+
*/
|
|
1533
|
+
'/admin/flow/epics/{id}': (ctx) => async (url, req, params) => {
|
|
1534
|
+
if (req.method !== 'GET')
|
|
1535
|
+
return text('GET', { status: 405 });
|
|
1536
|
+
const epicId = String(params.id);
|
|
1537
|
+
const held = (await ctx.call('flow.epic.get', { id: epicId }, url, req));
|
|
1538
|
+
const epic = held.value;
|
|
1539
|
+
if (!epic)
|
|
1540
|
+
return text('not found', { status: 404 });
|
|
1541
|
+
const projectId = String(epic.projectId);
|
|
1542
|
+
// Project identity enriches the shell when this reader may see it, but
|
|
1543
|
+
// is not a second gate on an epic they may already read.
|
|
1544
|
+
const project = await projectOf(ctx, url, req, projectId);
|
|
1545
|
+
const issues = (await ctx.call('flow.issue.list', {
|
|
1546
|
+
listState: emptyIssueListState(),
|
|
1547
|
+
projectId,
|
|
1548
|
+
epicId,
|
|
1549
|
+
limit: LIST_PAGE_SIZE,
|
|
1550
|
+
}, url, req));
|
|
1551
|
+
const document = await ctx.joint(url, req, 'flow_backend:screen.epic', {
|
|
1552
|
+
docId: epicId,
|
|
1553
|
+
base: '/admin/flow/epics',
|
|
1554
|
+
lang: url.searchParams.get('lang') ?? '',
|
|
1555
|
+
});
|
|
1556
|
+
return adminPage(ctx, url, req, {
|
|
1557
|
+
title: String(epic.title ?? ''),
|
|
1558
|
+
translate: false,
|
|
1559
|
+
active: `/admin/flow/projects/${encodeURIComponent(projectId)}/epics`,
|
|
1560
|
+
body: (t, frame) => epicDetailScreen(t, frame, {
|
|
1561
|
+
epic,
|
|
1562
|
+
document,
|
|
1563
|
+
issues: issues.rows ?? [],
|
|
1564
|
+
issueTotal: Number(issues.total ?? 0),
|
|
1565
|
+
issuesHref: issuesFilteredBy(projectId, 'epicId', epicId),
|
|
1566
|
+
projectName: String(project?.name ?? projectId),
|
|
1567
|
+
locale: localeQuery(url),
|
|
1568
|
+
}),
|
|
1569
|
+
});
|
|
1570
|
+
},
|
|
1571
|
+
/**
|
|
1572
|
+
* Every document, across projects — the counterpart of `/admin/flow/issues`,
|
|
1573
|
+
* and the base the document endpoints above hang off.
|
|
1574
|
+
*/
|
|
1575
|
+
'/admin/flow/pages': (ctx) => async (url, req) => {
|
|
1576
|
+
if (req.method !== 'GET')
|
|
1577
|
+
return text('GET', { status: 405 });
|
|
1578
|
+
const search = url.searchParams.get('q') ?? '';
|
|
1579
|
+
const currentPage = Math.max(1, Number(url.searchParams.get('page') ?? 1) || 1);
|
|
1580
|
+
const cursor = (currentPage - 1) * LIST_PAGE_SIZE;
|
|
1581
|
+
// Paged and counted where the data is. Slicing a 500-row read here printed
|
|
1582
|
+
// that slice's length as the total, and resolving names through the
|
|
1583
|
+
// 200-row `project.list` left later projects blank — see FLW-010.
|
|
1584
|
+
const result = (await ctx.call('flow.page.listAll', { search, cursor, limit: LIST_PAGE_SIZE }, url, req));
|
|
1585
|
+
const rows = result.rows ?? [];
|
|
1586
|
+
const pageHref = (page) => {
|
|
1587
|
+
const target = new URL(url);
|
|
1588
|
+
if (page <= 1)
|
|
1589
|
+
target.searchParams.delete('page');
|
|
1590
|
+
else
|
|
1591
|
+
target.searchParams.set('page', String(page));
|
|
1592
|
+
return `${target.pathname}${target.search}`;
|
|
1593
|
+
};
|
|
1594
|
+
return adminPage(ctx, url, req, {
|
|
1595
|
+
title: 'flow_backend.pages.allTitle',
|
|
1596
|
+
body: (t, frame) => {
|
|
1597
|
+
frame.chrome = {
|
|
1598
|
+
search: {
|
|
1599
|
+
name: 'q',
|
|
1600
|
+
value: search,
|
|
1601
|
+
placeholder: t('flow_backend.pages.search'),
|
|
1602
|
+
keep: keepForListSearch(url),
|
|
1603
|
+
},
|
|
1604
|
+
pager: {
|
|
1605
|
+
from: rows.length ? cursor + 1 : 0,
|
|
1606
|
+
to: Math.min(cursor + rows.length, result.total),
|
|
1607
|
+
total: result.total,
|
|
1608
|
+
prev: currentPage > 1 ? pageHref(currentPage - 1) : null,
|
|
1609
|
+
next: cursor + rows.length < result.total ? pageHref(currentPage + 1) : null,
|
|
1610
|
+
},
|
|
1611
|
+
};
|
|
1612
|
+
return allPagesScreen(t, frame, {
|
|
1613
|
+
title: t('flow_backend.pages.allTitle'),
|
|
1614
|
+
pages: rows,
|
|
1615
|
+
total: result.total,
|
|
1616
|
+
locale: localeQuery(url),
|
|
1617
|
+
});
|
|
1618
|
+
},
|
|
1619
|
+
});
|
|
1620
|
+
},
|
|
1621
|
+
/**
|
|
1622
|
+
* One document: its place in the tree, its title, its Live Doc, its children.
|
|
1623
|
+
*/
|
|
1624
|
+
'/admin/flow/pages/{id}': (ctx) => async (url, req, params) => {
|
|
1625
|
+
const refused = refusePost(req);
|
|
1626
|
+
if (refused)
|
|
1627
|
+
return refused;
|
|
1628
|
+
const pageId = String(params.id);
|
|
1629
|
+
const _ = ctx.translate(ctx.localeOf(url, req));
|
|
1630
|
+
const endpoint = `/admin/flow/pages/${encodeURIComponent(pageId)}`;
|
|
1631
|
+
let errors;
|
|
1632
|
+
let submitted = {};
|
|
1633
|
+
if (req.method === 'POST') {
|
|
1634
|
+
const form = await readForm(req);
|
|
1635
|
+
submitted = form;
|
|
1636
|
+
const held = (await ctx.call('flow.page.get', { id: pageId }, url, req));
|
|
1637
|
+
const current = held.value;
|
|
1638
|
+
if (!current)
|
|
1639
|
+
return text('not found', { status: 404 });
|
|
1640
|
+
if (form.action === 'save') {
|
|
1641
|
+
const result = (await ctx.call('flow.page.save', {
|
|
1642
|
+
id: pageId,
|
|
1643
|
+
projectId: String(current.projectId),
|
|
1644
|
+
title: form.title ?? '',
|
|
1645
|
+
expectedVersion: Number(form.expectedVersion ?? current.version ?? 0),
|
|
1646
|
+
idempotencyKey: form.idempotencyKey || randomUUID(),
|
|
1647
|
+
}, url, req));
|
|
1648
|
+
if (result.ok)
|
|
1649
|
+
return seeOther(inLocale(url, endpoint));
|
|
1650
|
+
errors = { action: 'save', messages: errorsOf(result, _) };
|
|
1651
|
+
}
|
|
1652
|
+
else if (form.action === 'addChild') {
|
|
1653
|
+
const result = (await ctx.call('flow.page.save', {
|
|
1654
|
+
id: form.childId || randomUUID(),
|
|
1655
|
+
projectId: String(current.projectId),
|
|
1656
|
+
title: form.title ?? '',
|
|
1657
|
+
parentPageId: pageId,
|
|
1658
|
+
idempotencyKey: form.idempotencyKey || randomUUID(),
|
|
1659
|
+
}, url, req));
|
|
1660
|
+
if (result.ok)
|
|
1661
|
+
return seeOther(inLocale(url, `/admin/flow/pages/${encodeURIComponent(String(result.id))}`));
|
|
1662
|
+
errors = { action: 'addChild', messages: errorsOf(result, _) };
|
|
1663
|
+
}
|
|
1664
|
+
else if (form.action === 'move') {
|
|
1665
|
+
const result = (await ctx.call('flow.page.move', { id: pageId, parentPageId: form.parentPageId || null }, url, req));
|
|
1666
|
+
if (result.ok)
|
|
1667
|
+
return seeOther(inLocale(url, endpoint));
|
|
1668
|
+
errors = { action: 'move', messages: errorsOf(result, _) };
|
|
1669
|
+
}
|
|
1670
|
+
else if (form.action === 'orderUp' || form.action === 'orderDown') {
|
|
1671
|
+
const idempotencyKey = form.idempotencyKey || randomUUID();
|
|
1672
|
+
const result = (await ctx.call('flow.page.reorder', { id: pageId, direction: form.action === 'orderUp' ? 'up' : 'down' }, url, req, { idempotencyKey }));
|
|
1673
|
+
if (result.ok)
|
|
1674
|
+
return seeOther(inLocale(url, endpoint));
|
|
1675
|
+
errors = { action: form.action, messages: errorsOf(result, _) };
|
|
1676
|
+
}
|
|
1677
|
+
else if (form.action === 'archive') {
|
|
1678
|
+
const result = (await ctx.call('flow.page.archive', { id: pageId }, url, req));
|
|
1679
|
+
if (result.ok)
|
|
1680
|
+
return seeOther(inLocale(url, `/admin/flow/projects/${encodeURIComponent(String(current.projectId))}/pages`));
|
|
1681
|
+
errors = { action: 'archive', messages: errorsOf(result, _) };
|
|
1682
|
+
}
|
|
1683
|
+
else if (form.action === 'restore') {
|
|
1684
|
+
// Back to this page rather than to the list: the reader wants to see
|
|
1685
|
+
// that it came back, and `page.restore` may have moved it to the root
|
|
1686
|
+
// to keep it from returning under a parent that is still archived.
|
|
1687
|
+
const result = (await ctx.call('flow.page.restore', { id: pageId }, url, req));
|
|
1688
|
+
if (result.ok)
|
|
1689
|
+
return seeOther(inLocale(url, `/admin/flow/pages/${encodeURIComponent(pageId)}`));
|
|
1690
|
+
errors = { action: 'restore', messages: errorsOf(result, _) };
|
|
1691
|
+
}
|
|
1692
|
+
}
|
|
1693
|
+
else if (req.method !== 'GET')
|
|
1694
|
+
return text('GET or POST', { status: 405 });
|
|
1695
|
+
const held = (await ctx.call('flow.page.get', { id: pageId }, url, req));
|
|
1696
|
+
const page = held.value;
|
|
1697
|
+
if (!page)
|
|
1698
|
+
return text('not found', { status: 404 });
|
|
1699
|
+
const siblings = (await ctx.call('flow.page.list', { projectId: String(page.projectId) }, url, req));
|
|
1700
|
+
const editor = await ctx.joint(url, req, 'flow_backend:screen.page', {
|
|
1701
|
+
docId: pageId,
|
|
1702
|
+
base: '/admin/flow/pages',
|
|
1703
|
+
lang: url.searchParams.get('lang') ?? '',
|
|
1704
|
+
});
|
|
1705
|
+
return adminPage(ctx, url, req, {
|
|
1706
|
+
title: String(page.title ?? ''),
|
|
1707
|
+
translate: false,
|
|
1708
|
+
// The list this page belongs to, so the sidebar keeps marking the
|
|
1709
|
+
// project rather than emptying out — same reason the issue detail does.
|
|
1710
|
+
active: `/admin/flow/projects/${String(page.projectId)}/pages`,
|
|
1711
|
+
body: (t, frame) => pageDetailScreen(t, frame, {
|
|
1712
|
+
page,
|
|
1713
|
+
editor,
|
|
1714
|
+
titleFields: [
|
|
1715
|
+
{
|
|
1716
|
+
name: 'title',
|
|
1717
|
+
label: t('flow_backend.pages.name'),
|
|
1718
|
+
value: errors?.action === 'save' ? (submitted.title ?? '') : String(page.title ?? ''),
|
|
1719
|
+
required: true,
|
|
1720
|
+
},
|
|
1721
|
+
],
|
|
1722
|
+
childFields: [
|
|
1723
|
+
{
|
|
1724
|
+
name: 'title',
|
|
1725
|
+
label: t('flow_backend.pages.childName'),
|
|
1726
|
+
value: errors?.action === 'addChild' ? (submitted.title ?? '') : '',
|
|
1727
|
+
required: true,
|
|
1728
|
+
},
|
|
1729
|
+
],
|
|
1730
|
+
moveFields: [
|
|
1731
|
+
parentField(t, siblings, pageId, errors?.action === 'move'
|
|
1732
|
+
? (submitted.parentPageId ?? '')
|
|
1733
|
+
: page.parentPageId
|
|
1734
|
+
? String(page.parentPageId)
|
|
1735
|
+
: ''),
|
|
1736
|
+
],
|
|
1737
|
+
errors,
|
|
1738
|
+
locale: localeQuery(url),
|
|
1739
|
+
dialog: url.searchParams.get('dialog') === 'addChild' || url.searchParams.get('dialog') === 'move'
|
|
1740
|
+
? url.searchParams.get('dialog')
|
|
1741
|
+
: undefined,
|
|
1742
|
+
childId: errors?.action === 'addChild' ? submitted.childId || randomUUID() : randomUUID(),
|
|
1743
|
+
idempotencyKey: errors?.action === 'save' || errors?.action === 'addChild'
|
|
1744
|
+
? submitted.idempotencyKey || randomUUID()
|
|
1745
|
+
: randomUUID(),
|
|
1746
|
+
orderUpIdempotencyKey: errors?.action === 'orderUp' ? submitted.idempotencyKey || randomUUID() : randomUUID(),
|
|
1747
|
+
orderDownIdempotencyKey: errors?.action === 'orderDown' ? submitted.idempotencyKey || randomUUID() : randomUUID(),
|
|
1748
|
+
}),
|
|
1749
|
+
});
|
|
1750
|
+
},
|
|
1751
|
+
'/admin/flow/projects/{id}/epics': (ctx) => async (url, req, params) => {
|
|
1752
|
+
const refused = refusePost(req);
|
|
1753
|
+
if (refused)
|
|
1754
|
+
return refused;
|
|
1755
|
+
if (req.method !== 'GET' && req.method !== 'POST')
|
|
1756
|
+
return text('GET or POST', { status: 405 });
|
|
1757
|
+
const projectId = String(params.id);
|
|
1758
|
+
const project = await projectOf(ctx, url, req, projectId);
|
|
1759
|
+
if (!project)
|
|
1760
|
+
return text('not found', { status: 404 });
|
|
1761
|
+
const _ = ctx.translate(ctx.localeOf(url, req));
|
|
1762
|
+
const endpoint = projectEpicsCollection(url, projectId);
|
|
1763
|
+
if (req.method === 'POST') {
|
|
1764
|
+
const form = await readForm(req);
|
|
1765
|
+
if (form.action === 'archive') {
|
|
1766
|
+
const held = form.id
|
|
1767
|
+
? (await ctx.call('flow.epic.get', { id: form.id }, url, req))
|
|
1768
|
+
: { value: null };
|
|
1769
|
+
const archived = held.value && String(held.value.projectId) === projectId
|
|
1770
|
+
? (await ctx.call('flow.epic.archive', { id: form.id ?? '' }, url, req))
|
|
1771
|
+
: {
|
|
1772
|
+
ok: false,
|
|
1773
|
+
errors: [{ field: 'id', code: 'flow.error.notFound' }],
|
|
1774
|
+
};
|
|
1775
|
+
if (archived.ok)
|
|
1776
|
+
return seeOther(inLocale(url, endpoint));
|
|
1777
|
+
return seeOther(projectEpicArchiveFailureHref(url, projectId, errorsOf(archived, _)));
|
|
1778
|
+
}
|
|
1779
|
+
else if (!form.action || form.action === 'save') {
|
|
1780
|
+
const values = {
|
|
1781
|
+
id: form.id || randomUUID(),
|
|
1782
|
+
idempotencyKey: form.idempotencyKey || randomUUID(),
|
|
1783
|
+
title: form.title ?? '',
|
|
1784
|
+
color: form.color ?? '',
|
|
1785
|
+
};
|
|
1786
|
+
const result = (await ctx.call('flow.epic.save', {
|
|
1787
|
+
values: {
|
|
1788
|
+
id: values.id,
|
|
1789
|
+
projectId,
|
|
1790
|
+
title: values.title,
|
|
1791
|
+
color: values.color || null,
|
|
1792
|
+
},
|
|
1793
|
+
idempotencyKey: values.idempotencyKey,
|
|
1794
|
+
}, url, req));
|
|
1795
|
+
if (result.ok)
|
|
1796
|
+
return seeOther(inLocale(url, endpoint));
|
|
1797
|
+
return seeOther(projectEpicCreateFailureHref(url, projectId, values, errorsOf(result, _)));
|
|
1798
|
+
}
|
|
1799
|
+
else
|
|
1800
|
+
return text('invalid action', { status: 400 });
|
|
1801
|
+
}
|
|
1802
|
+
// `epic.list` counts and sizes each epic itself now, so the screen no
|
|
1803
|
+
// longer makes one `issue.list` per epic to learn a number the domain
|
|
1804
|
+
// already has. The project scoping that comment used to explain lives in
|
|
1805
|
+
// `epicTotals`, which reads by project — `epicId` is a plain reference,
|
|
1806
|
+
// so counting by it alone would fold in another project's issues.
|
|
1807
|
+
const epics = (await ctx.call('flow.epic.list', { projectId }, url, req));
|
|
1808
|
+
const withCounts = epics.map((epic) => ({
|
|
1809
|
+
...epic,
|
|
1810
|
+
totalCount: Number(epic.total ?? 0),
|
|
1811
|
+
issuesHref: issuesFilteredBy(projectId, 'epicId', String(epic.id)),
|
|
1812
|
+
}));
|
|
1813
|
+
return adminPage(ctx, url, req, {
|
|
1814
|
+
title: String(project.name),
|
|
1815
|
+
translate: false,
|
|
1816
|
+
active: `/admin/flow/projects/${encodeURIComponent(projectId)}/epics`,
|
|
1817
|
+
body: (t, frame) => {
|
|
1818
|
+
const createErrors = url.searchParams.getAll('createError');
|
|
1819
|
+
return epicsScreen(t, frame, {
|
|
1820
|
+
projectName: String(project.name),
|
|
1821
|
+
epics: withCounts,
|
|
1822
|
+
action: endpoint,
|
|
1823
|
+
closeHref: endpoint,
|
|
1824
|
+
createAction: projectEpicCreateHref(url, projectId),
|
|
1825
|
+
createHref: projectEpicCreateHref(url, projectId),
|
|
1826
|
+
createOpen: url.searchParams.get('create') === '1',
|
|
1827
|
+
createFields: projectEpicCreateFields(t, {
|
|
1828
|
+
title: url.searchParams.get('title') ?? '',
|
|
1829
|
+
color: url.searchParams.get('color') ?? '',
|
|
1830
|
+
}),
|
|
1831
|
+
createErrors: createErrors.length
|
|
1832
|
+
? createErrors
|
|
1833
|
+
: url.searchParams.get('invalid') === '1'
|
|
1834
|
+
? [t('flow_backend.error.invalid')]
|
|
1835
|
+
: undefined,
|
|
1836
|
+
recordId: url.searchParams.get('id') || randomUUID(),
|
|
1837
|
+
idempotencyKey: url.searchParams.get('idempotencyKey') || randomUUID(),
|
|
1838
|
+
locale: localeQuery(url),
|
|
1839
|
+
errors: url.searchParams.getAll('archiveError'),
|
|
1840
|
+
});
|
|
1841
|
+
},
|
|
1842
|
+
});
|
|
1843
|
+
},
|
|
1844
|
+
/**
|
|
1845
|
+
* The dependency map, one epic at a time — ported from PhaseAtlas's
|
|
1846
|
+
* TaskMap.svelte (its "workspace" is this app's "epic"). Nodes are this
|
|
1847
|
+
* epic's issues; edges are `blocks` dependencies whose two ends are both
|
|
1848
|
+
* inside the epic — a dependency reaching outside it is out of scope for a
|
|
1849
|
+
* single-epic map, same as the plan's own "only tasks of one epic" call.
|
|
1850
|
+
*/
|
|
1851
|
+
'/admin/flow/projects/{id}/epics/{epicId}/map': (ctx) => async (url, req, params) => {
|
|
1852
|
+
if (req.method !== 'GET')
|
|
1853
|
+
return text('GET', { status: 405 });
|
|
1854
|
+
const projectId = String(params.id);
|
|
1855
|
+
const epicId = String(params.epicId);
|
|
1856
|
+
const project = await projectOf(ctx, url, req, projectId);
|
|
1857
|
+
if (!project)
|
|
1858
|
+
return text('not found', { status: 404 });
|
|
1859
|
+
const [epics, columns, firstPage] = await Promise.all([
|
|
1860
|
+
ctx.call('flow.epic.list', { projectId, id: epicId, includeArchived: true, limit: 1 }, url, req),
|
|
1861
|
+
ctx.call('flow.column.list', { projectId }, url, req),
|
|
1862
|
+
ctx.call('flow.issue.list', { projectId, epicId, cursor: '0', limit: MAP_BATCH_SIZE }, url, req),
|
|
1863
|
+
]);
|
|
1864
|
+
const epic = epics[0];
|
|
1865
|
+
if (!epic)
|
|
1866
|
+
return text('not found', { status: 404 });
|
|
1867
|
+
const terminalColumnIds = new Set(columns.filter((column) => column.terminalState).map((column) => String(column.id)));
|
|
1868
|
+
const issues = [...(firstPage.rows ?? [])];
|
|
1869
|
+
const issueTotal = Number(firstPage.total ?? issues.length);
|
|
1870
|
+
while (issues.length < issueTotal) {
|
|
1871
|
+
const found = (await ctx.call('flow.issue.list', {
|
|
1872
|
+
projectId,
|
|
1873
|
+
epicId,
|
|
1874
|
+
cursor: String(issues.length),
|
|
1875
|
+
limit: MAP_BATCH_SIZE,
|
|
1876
|
+
}, url, req));
|
|
1877
|
+
const page = found.rows ?? [];
|
|
1878
|
+
if (!page.length)
|
|
1879
|
+
break;
|
|
1880
|
+
issues.push(...page);
|
|
1881
|
+
}
|
|
1882
|
+
const issueIds = issues.map((row) => String(row.id));
|
|
1883
|
+
const dependencyPages = await Promise.all(Array.from({ length: Math.ceil(issueIds.length / MAP_BATCH_SIZE) }, (_, index) => ctx.call('flow.issue.dependencies', {
|
|
1884
|
+
issueIds: issueIds.slice(index * MAP_BATCH_SIZE, (index + 1) * MAP_BATCH_SIZE),
|
|
1885
|
+
includeExternalTargets: true,
|
|
1886
|
+
}, url, req)));
|
|
1887
|
+
const deps = dependencyPages.flat();
|
|
1888
|
+
const issueIdSet = new Set(issueIds);
|
|
1889
|
+
const _ = ctx.translate(ctx.localeOf(url, req));
|
|
1890
|
+
const map = await ctx.joint(url, req, 'flow_backend:screen.map', {
|
|
1891
|
+
lang: ctx.localeOf(url, req),
|
|
1892
|
+
data: JSON.stringify({
|
|
1893
|
+
epicTitle: String(epic.title),
|
|
1894
|
+
nodes: issues.map((row) => ({
|
|
1895
|
+
id: row.id,
|
|
1896
|
+
title: row.title,
|
|
1897
|
+
href: inLocale(url, `/admin/flow/issues/${encodeURIComponent(String(row.id))}`),
|
|
1898
|
+
columnName: row.columnName ?? null,
|
|
1899
|
+
assigneeName: row.assigneeName ?? null,
|
|
1900
|
+
done: terminalColumnIds.has(String(row.columnId)),
|
|
1901
|
+
})),
|
|
1902
|
+
edges: deps
|
|
1903
|
+
.filter((dep) => issueIdSet.has(String(dep.issueId)) && issueIdSet.has(String(dep.dependsOnIssueId)))
|
|
1904
|
+
.map((dep) => ({ source: dep.dependsOnIssueId, target: dep.issueId })),
|
|
1905
|
+
// The board route beside this one has always passed its wording
|
|
1906
|
+
// through the catalogue; the map did not, which left eleven strings
|
|
1907
|
+
// reachable only by the island's own vi/en fallback — the second,
|
|
1908
|
+
// untranslatable vocabulary the island pattern exists to avoid.
|
|
1909
|
+
labels: {
|
|
1910
|
+
eyebrow: _('flow_backend.map.eyebrow'),
|
|
1911
|
+
title: _('flow_backend.map.title'),
|
|
1912
|
+
hint: _('flow_backend.map.hint'),
|
|
1913
|
+
empty: _('flow_backend.map.empty'),
|
|
1914
|
+
done: _('flow_backend.map.done'),
|
|
1915
|
+
active: _('flow_backend.map.active'),
|
|
1916
|
+
ready: _('flow_backend.map.ready'),
|
|
1917
|
+
blocked: _('flow_backend.map.blocked'),
|
|
1918
|
+
unassigned: _('flow_backend.map.unassigned'),
|
|
1919
|
+
waitingFor: _('flow_backend.map.waitingFor'),
|
|
1920
|
+
},
|
|
1921
|
+
}),
|
|
1922
|
+
});
|
|
1923
|
+
return adminPage(ctx, url, req, {
|
|
1924
|
+
title: String(epic.title),
|
|
1925
|
+
translate: false,
|
|
1926
|
+
active: `/admin/flow/projects/${encodeURIComponent(projectId)}/epics`,
|
|
1927
|
+
body: (_, frame) => mapScreen(_, frame, {
|
|
1928
|
+
projectName: String(project.name ?? projectId),
|
|
1929
|
+
epicTitle: String(epic.title),
|
|
1930
|
+
epicHref: inLocale(url, `/admin/flow/epics/${encodeURIComponent(epicId)}`),
|
|
1931
|
+
epicsHref: inLocale(url, `/admin/flow/projects/${encodeURIComponent(projectId)}/epics`),
|
|
1932
|
+
map,
|
|
1933
|
+
}),
|
|
1934
|
+
});
|
|
1935
|
+
},
|
|
1936
|
+
/**
|
|
1937
|
+
* The project on a day axis.
|
|
1938
|
+
*
|
|
1939
|
+
* A flat list rather than a tree of dependencies — that is what the epic map
|
|
1940
|
+
* next door draws, and drawing it twice in two shapes would be two answers
|
|
1941
|
+
* to one question. This one answers when, and the map answers in what order.
|
|
1942
|
+
*/
|
|
1943
|
+
'/admin/flow/projects/{id}/gantt': (ctx) => async (url, req, params) => {
|
|
1944
|
+
if (req.method !== 'GET')
|
|
1945
|
+
return text('GET', { status: 405 });
|
|
1946
|
+
const projectId = String(params.id);
|
|
1947
|
+
const project = await projectOf(ctx, url, req, projectId);
|
|
1948
|
+
if (!project)
|
|
1949
|
+
return text('not found', { status: 404 });
|
|
1950
|
+
const scanned = await allGanttIssues(ctx, url, req, projectId);
|
|
1951
|
+
const allRows = scanned.rows;
|
|
1952
|
+
allRows.sort((a, b) => {
|
|
1953
|
+
const left = String(a.startsOn ?? '');
|
|
1954
|
+
const right = String(b.startsOn ?? '');
|
|
1955
|
+
return left.localeCompare(right) || String(a.title).localeCompare(String(b.title));
|
|
1956
|
+
});
|
|
1957
|
+
const currentPage = pageOf(url);
|
|
1958
|
+
const offset = (currentPage - 1) * GANTT_ROWS;
|
|
1959
|
+
const rows = allRows.slice(offset, offset + GANTT_ROWS).map((row) => ({
|
|
1960
|
+
...row,
|
|
1961
|
+
detailHref: inLocale(url, `/admin/flow/issues/${encodeURIComponent(String(row.id))}`),
|
|
1962
|
+
}));
|
|
1963
|
+
const locale = ctx.localeOf(url, req);
|
|
1964
|
+
return adminPage(ctx, url, req, {
|
|
1965
|
+
title: String(project.name),
|
|
1966
|
+
translate: false,
|
|
1967
|
+
// The project group marks whichever row this path names, so it has to be
|
|
1968
|
+
// this screen's own. Pointing all three at the backlog left Timeline,
|
|
1969
|
+
// Sprints and Settings permanently unmarked, and told the reader they
|
|
1970
|
+
// were on a screen they had left.
|
|
1971
|
+
active: `/admin/flow/projects/${encodeURIComponent(projectId)}/gantt`,
|
|
1972
|
+
body: (_, frame) => {
|
|
1973
|
+
const from = rows.length ? offset + 1 : 0;
|
|
1974
|
+
const to = Math.min(offset + rows.length, allRows.length);
|
|
1975
|
+
frame.chrome = {
|
|
1976
|
+
pager: {
|
|
1977
|
+
from,
|
|
1978
|
+
to,
|
|
1979
|
+
// The pager counts what the chart can draw, and the notice below
|
|
1980
|
+
// says how that differs from what the project holds.
|
|
1981
|
+
total: allRows.length,
|
|
1982
|
+
prev: currentPage > 1 ? ganttPageHref(url, currentPage - 1) : null,
|
|
1983
|
+
next: to < allRows.length ? ganttPageHref(url, currentPage + 1) : null,
|
|
1984
|
+
},
|
|
1985
|
+
};
|
|
1986
|
+
return ganttScreen(_, frame, String(project.name), rows, new Date().toISOString().slice(0, 10), locale.startsWith('en') ? 'en-GB' : 'vi-VN', scanned.truncated ? { scanned: allRows.length, total: scanned.total } : undefined);
|
|
1987
|
+
},
|
|
1988
|
+
});
|
|
1989
|
+
},
|
|
1990
|
+
'/admin/flow/projects/{id}/sprints': (ctx) => async (url, req, params) => {
|
|
1991
|
+
const refused = refusePost(req);
|
|
1992
|
+
if (refused)
|
|
1993
|
+
return refused;
|
|
1994
|
+
const projectId = String(params.id);
|
|
1995
|
+
const project = await projectOf(ctx, url, req, projectId);
|
|
1996
|
+
if (!project)
|
|
1997
|
+
return text('not found', { status: 404 });
|
|
1998
|
+
const _ = ctx.translate(ctx.localeOf(url, req));
|
|
1999
|
+
let errors = [];
|
|
2000
|
+
let createErrors = [];
|
|
2001
|
+
let createValues = {};
|
|
2002
|
+
let recordId = randomUUID();
|
|
2003
|
+
let idempotencyKey = randomUUID();
|
|
2004
|
+
const endpoint = `/admin/flow/projects/${encodeURIComponent(projectId)}/sprints`;
|
|
2005
|
+
const action = inLocale(url, endpoint);
|
|
2006
|
+
const createOpen = url.searchParams.get('dialog') === 'create';
|
|
2007
|
+
if (req.method === 'POST') {
|
|
2008
|
+
const form = await readForm(req);
|
|
2009
|
+
if (form.action === 'start' || form.action === 'close') {
|
|
2010
|
+
// `startSprint` refuses a second active sprint and `closeSprint` a
|
|
2011
|
+
// sprint that is not running — both answer with a translated code,
|
|
2012
|
+
// and dropping the result reported those refusals as a success.
|
|
2013
|
+
const changed = (await ctx.call(form.action === 'start' ? 'flow.sprint.start' : 'flow.sprint.close', {
|
|
2014
|
+
id: form.id ?? '',
|
|
2015
|
+
// `carry` is what the dialog sends; without it, closing leaves the
|
|
2016
|
+
// unfinished work where it is, exactly as it always has.
|
|
2017
|
+
...(form.action === 'close' && form.carry === '1'
|
|
2018
|
+
? { carry: true, ...(form.carryTo ? { carryTo: form.carryTo } : {}) }
|
|
2019
|
+
: {}),
|
|
2020
|
+
idempotencyKey: form.idempotencyKey || randomUUID(),
|
|
2021
|
+
}, url, req));
|
|
2022
|
+
if (changed.ok)
|
|
2023
|
+
return seeOther(inLocale(url, endpoint));
|
|
2024
|
+
errors = errorsOf(changed, _);
|
|
2025
|
+
}
|
|
2026
|
+
else if (form.action === 'save') {
|
|
2027
|
+
recordId = form.id || recordId;
|
|
2028
|
+
idempotencyKey = form.idempotencyKey || idempotencyKey;
|
|
2029
|
+
createValues = form;
|
|
2030
|
+
const result = (await ctx.call('flow.sprint.save', {
|
|
2031
|
+
id: recordId,
|
|
2032
|
+
projectId,
|
|
2033
|
+
name: form.name ?? '',
|
|
2034
|
+
startDate: form.startDate || undefined,
|
|
2035
|
+
endDate: form.endDate || undefined,
|
|
2036
|
+
idempotencyKey,
|
|
2037
|
+
}, url, req));
|
|
2038
|
+
if (result.ok)
|
|
2039
|
+
return seeOther(inLocale(url, endpoint));
|
|
2040
|
+
createErrors = errorsOf(result, _);
|
|
2041
|
+
}
|
|
2042
|
+
else
|
|
2043
|
+
return text('invalid action', { status: 400 });
|
|
2044
|
+
}
|
|
2045
|
+
else if (req.method !== 'GET')
|
|
2046
|
+
return text('GET or POST', { status: 405 });
|
|
2047
|
+
const sprints = (await ctx.call('flow.sprint.list', { projectId }, url, req));
|
|
2048
|
+
const closeId = url.searchParams.get('close') ?? '';
|
|
2049
|
+
const closingSprint = closeId
|
|
2050
|
+
? sprints.find((row) => String(row.id) === closeId && row.state === 'active')
|
|
2051
|
+
: undefined;
|
|
2052
|
+
const carryKey = url.searchParams.get('carryKey') || randomUUID();
|
|
2053
|
+
return adminPage(ctx, url, req, {
|
|
2054
|
+
title: String(project.name),
|
|
2055
|
+
translate: false,
|
|
2056
|
+
// The project group marks whichever row this path names, so it has to be
|
|
2057
|
+
// this screen's own. Pointing all three at the backlog left Timeline,
|
|
2058
|
+
// Sprints and Settings permanently unmarked, and told the reader they
|
|
2059
|
+
// were on a screen they had left.
|
|
2060
|
+
active: `/admin/flow/projects/${encodeURIComponent(projectId)}/sprints`,
|
|
2061
|
+
body: (_, frame) => sprintsScreen(_, frame, {
|
|
2062
|
+
projectName: String(project.name),
|
|
2063
|
+
sprints,
|
|
2064
|
+
closeSprintHref: (sprint) => {
|
|
2065
|
+
const target = new URL(url);
|
|
2066
|
+
target.searchParams.set('close', String(sprint.id));
|
|
2067
|
+
target.searchParams.delete('create');
|
|
2068
|
+
return `${target.pathname}${target.search}`;
|
|
2069
|
+
},
|
|
2070
|
+
closing: closingSprint
|
|
2071
|
+
? {
|
|
2072
|
+
sprint: closingSprint,
|
|
2073
|
+
// Somewhere open, in the same project, that is not this one.
|
|
2074
|
+
targets: sprints.filter((row) => String(row.id) !== String(closingSprint.id) && row.state !== 'closed'),
|
|
2075
|
+
idempotencyKey: carryKey,
|
|
2076
|
+
}
|
|
2077
|
+
: undefined,
|
|
2078
|
+
action,
|
|
2079
|
+
createHref: inLocale(url, `${endpoint}?dialog=create`),
|
|
2080
|
+
closeHref: inLocale(url, endpoint),
|
|
2081
|
+
createOpen: createOpen || createErrors.length > 0,
|
|
2082
|
+
createValues,
|
|
2083
|
+
createErrors,
|
|
2084
|
+
errors,
|
|
2085
|
+
recordId,
|
|
2086
|
+
idempotencyKey,
|
|
2087
|
+
transitionKey: (sprint) => `sprint:${String(sprint.id)}:${String(sprint.state)}`,
|
|
2088
|
+
}),
|
|
2089
|
+
});
|
|
2090
|
+
},
|
|
2091
|
+
'/admin/flow/projects/{id}/settings': (ctx) => async (url, req, params) => {
|
|
2092
|
+
const refused = refusePost(req);
|
|
2093
|
+
if (refused)
|
|
2094
|
+
return refused;
|
|
2095
|
+
const projectId = String(params.id);
|
|
2096
|
+
const project = await projectOf(ctx, url, req, projectId);
|
|
2097
|
+
if (!project)
|
|
2098
|
+
return text('not found', { status: 404 });
|
|
2099
|
+
const _ = ctx.translate(ctx.localeOf(url, req));
|
|
2100
|
+
// Two independent halves on one screen, so two error sinks: a duplicate
|
|
2101
|
+
// tag name reported above the columns form reads as a broken column.
|
|
2102
|
+
let projectErrors = [];
|
|
2103
|
+
let columnErrors = [];
|
|
2104
|
+
let typeErrors = [];
|
|
2105
|
+
let fieldErrors = [];
|
|
2106
|
+
let tagErrors = [];
|
|
2107
|
+
let memberErrors = [];
|
|
2108
|
+
let deleteErrors = [];
|
|
2109
|
+
let submitted = {};
|
|
2110
|
+
let forcedEditor;
|
|
2111
|
+
const endpoint = `/admin/flow/projects/${encodeURIComponent(projectId)}/settings`;
|
|
2112
|
+
const action = inLocale(url, endpoint);
|
|
2113
|
+
if (req.method === 'POST') {
|
|
2114
|
+
const form = await readForm(req);
|
|
2115
|
+
if (form.action === 'saveProject') {
|
|
2116
|
+
// `project.save` has always taken these three and only the create
|
|
2117
|
+
// route ever called it, so a project named wrong stayed named wrong.
|
|
2118
|
+
const saved = (await ctx.call('flow.project.save', {
|
|
2119
|
+
values: {
|
|
2120
|
+
id: projectId,
|
|
2121
|
+
key: form.key ?? '',
|
|
2122
|
+
name: form.name ?? '',
|
|
2123
|
+
description: form.description || null,
|
|
2124
|
+
},
|
|
2125
|
+
idempotencyKey: form.idempotencyKey || `${projectId}:profile:${randomUUID()}`,
|
|
2126
|
+
}, url, req));
|
|
2127
|
+
if (saved.ok)
|
|
2128
|
+
return seeOther(inLocale(url, endpoint));
|
|
2129
|
+
projectErrors = errorsOf(saved, _);
|
|
2130
|
+
submitted = form;
|
|
2131
|
+
}
|
|
2132
|
+
else if (form.action === 'archiveProject' || form.action === 'restoreProject') {
|
|
2133
|
+
const active = form.action === 'restoreProject';
|
|
2134
|
+
const saved = (await ctx.call('flow.project.save', {
|
|
2135
|
+
values: {
|
|
2136
|
+
id: projectId,
|
|
2137
|
+
key: String(project.key ?? ''),
|
|
2138
|
+
name: String(project.name ?? ''),
|
|
2139
|
+
active,
|
|
2140
|
+
},
|
|
2141
|
+
idempotencyKey: `${projectId}:active:${active ? 'on' : 'off'}`,
|
|
2142
|
+
}, url, req));
|
|
2143
|
+
// Back to the project list when it leaves, and to its own settings
|
|
2144
|
+
// when it comes back — in both cases where the reader can see it.
|
|
2145
|
+
if (saved.ok)
|
|
2146
|
+
return seeOther(inLocale(url, active ? endpoint : '/admin/flow/projects'));
|
|
2147
|
+
projectErrors = errorsOf(saved, _);
|
|
2148
|
+
submitted = form;
|
|
2149
|
+
}
|
|
2150
|
+
else if (form.action === 'archiveColumn') {
|
|
2151
|
+
// `column.archive` refuses a column that still holds active issues,
|
|
2152
|
+
// which is the whole point of the check — reporting that refusal as
|
|
2153
|
+
// a success left the column on screen with no explanation.
|
|
2154
|
+
const archived = (await ctx.call('flow.column.archive', { id: form.id ?? '' }, url, req));
|
|
2155
|
+
if (archived.ok)
|
|
2156
|
+
return seeOther(inLocale(url, endpoint));
|
|
2157
|
+
columnErrors = errorsOf(archived, _);
|
|
2158
|
+
submitted = form;
|
|
2159
|
+
forcedEditor = 'column';
|
|
2160
|
+
}
|
|
2161
|
+
else if (form.action === 'archiveType') {
|
|
2162
|
+
const archived = (await ctx.call('flow.issueType.archive', { id: form.id ?? '' }, url, req));
|
|
2163
|
+
if (archived.ok)
|
|
2164
|
+
return seeOther(inLocale(url, endpoint));
|
|
2165
|
+
typeErrors = errorsOf(archived, _);
|
|
2166
|
+
submitted = form;
|
|
2167
|
+
forcedEditor = 'type';
|
|
2168
|
+
}
|
|
2169
|
+
else if (form.action === 'saveType') {
|
|
2170
|
+
const result = (await ctx.call('flow.issueType.save', {
|
|
2171
|
+
values: {
|
|
2172
|
+
id: form.id || randomUUID(),
|
|
2173
|
+
projectId,
|
|
2174
|
+
code: form.code || slugify(form.name ?? ''),
|
|
2175
|
+
name: form.name ?? '',
|
|
2176
|
+
sequence: Number(form.sequence ?? 10),
|
|
2177
|
+
},
|
|
2178
|
+
idempotencyKey: form.idempotencyKey || randomUUID(),
|
|
2179
|
+
}, url, req));
|
|
2180
|
+
if (result.ok)
|
|
2181
|
+
return seeOther(inLocale(url, endpoint));
|
|
2182
|
+
typeErrors = errorsOf(result, _);
|
|
2183
|
+
submitted = form;
|
|
2184
|
+
forcedEditor = 'type';
|
|
2185
|
+
}
|
|
2186
|
+
else if (form.action === 'archiveField') {
|
|
2187
|
+
const archived = (await ctx.call('flow.field.archive', { id: form.id ?? '' }, url, req));
|
|
2188
|
+
if (archived.ok)
|
|
2189
|
+
return seeOther(inLocale(url, endpoint));
|
|
2190
|
+
fieldErrors = errorsOf(archived, _);
|
|
2191
|
+
submitted = form;
|
|
2192
|
+
forcedEditor = 'field';
|
|
2193
|
+
}
|
|
2194
|
+
else if (form.action === 'saveField') {
|
|
2195
|
+
// Options arrive as one line of text, the same way the project
|
|
2196
|
+
// wizard takes custom column names: a list edited as a unit.
|
|
2197
|
+
const labels = (form.options ?? '')
|
|
2198
|
+
.split(',')
|
|
2199
|
+
.map((label) => label.trim())
|
|
2200
|
+
.filter(Boolean);
|
|
2201
|
+
const result = (await ctx.call('flow.field.save', {
|
|
2202
|
+
id: form.id || randomUUID(),
|
|
2203
|
+
projectId,
|
|
2204
|
+
code: form.code || slugify(form.name ?? ''),
|
|
2205
|
+
name: form.name ?? '',
|
|
2206
|
+
kind: form.kind || 'text',
|
|
2207
|
+
config: labels.length
|
|
2208
|
+
? { options: labels.map((label) => ({ code: slugify(label), label })) }
|
|
2209
|
+
: null,
|
|
2210
|
+
sequence: Number(form.sequence ?? 10),
|
|
2211
|
+
idempotencyKey: form.idempotencyKey || randomUUID(),
|
|
2212
|
+
}, url, req));
|
|
2213
|
+
if (result.ok)
|
|
2214
|
+
return seeOther(inLocale(url, endpoint));
|
|
2215
|
+
fieldErrors = errorsOf(result, _);
|
|
2216
|
+
submitted = form;
|
|
2217
|
+
forcedEditor = 'field';
|
|
2218
|
+
}
|
|
2219
|
+
else if (form.action === 'deleteProject') {
|
|
2220
|
+
// The one command on this screen that does not come back. It answers
|
|
2221
|
+
// to its own authority, not to `flow.configure`, and it refuses
|
|
2222
|
+
// unless the name typed above matches the project's own.
|
|
2223
|
+
const destroyed = (await ctx.call('flow.project.delete', {
|
|
2224
|
+
projectId,
|
|
2225
|
+
confirmName: form.confirmName ?? '',
|
|
2226
|
+
idempotencyKey: form.idempotencyKey || `${projectId}:delete:${randomUUID()}`,
|
|
2227
|
+
}, url, req));
|
|
2228
|
+
// Back to the list rather than to this screen: the project this page
|
|
2229
|
+
// is about is on its way out, and reloading it would render a page
|
|
2230
|
+
// for something that will not be there.
|
|
2231
|
+
if (destroyed.ok)
|
|
2232
|
+
return seeOther(inLocale(url, '/admin/flow/projects'));
|
|
2233
|
+
deleteErrors = errorsOf(destroyed, _);
|
|
2234
|
+
submitted = form;
|
|
2235
|
+
}
|
|
2236
|
+
else if (form.action === 'addMember' || form.action === 'removeMember') {
|
|
2237
|
+
// Who may read the project, decided from the project's own screen.
|
|
2238
|
+
// Adding is idempotent and carries a key; removing names a person and
|
|
2239
|
+
// needs none of the retry protection, because taking somebody off
|
|
2240
|
+
// twice is the same as taking them off once.
|
|
2241
|
+
const adding = form.action === 'addMember';
|
|
2242
|
+
const changed = (await ctx.call(adding ? 'flow.project.member.add' : 'flow.project.member.remove', {
|
|
2243
|
+
projectId,
|
|
2244
|
+
userId: form.userId ?? '',
|
|
2245
|
+
idempotencyKey: form.idempotencyKey || randomUUID(),
|
|
2246
|
+
}, url, req));
|
|
2247
|
+
if (changed.ok)
|
|
2248
|
+
return seeOther(inLocale(url, endpoint));
|
|
2249
|
+
memberErrors = errorsOf(changed, _);
|
|
2250
|
+
submitted = form;
|
|
2251
|
+
}
|
|
2252
|
+
else if (form.action === 'archiveTag') {
|
|
2253
|
+
const archived = (await ctx.call('flow.tag.archive', { id: form.id ?? '' }, url, req));
|
|
2254
|
+
if (archived.ok)
|
|
2255
|
+
return seeOther(inLocale(url, endpoint));
|
|
2256
|
+
tagErrors = errorsOf(archived, _);
|
|
2257
|
+
submitted = form;
|
|
2258
|
+
forcedEditor = 'tag';
|
|
2259
|
+
}
|
|
2260
|
+
else if (form.action === 'saveColumn') {
|
|
2261
|
+
const result = (await ctx.call('flow.column.save', {
|
|
2262
|
+
values: {
|
|
2263
|
+
id: form.id || randomUUID(),
|
|
2264
|
+
projectId,
|
|
2265
|
+
code: form.code || slugify(form.name ?? ''),
|
|
2266
|
+
name: form.name ?? '',
|
|
2267
|
+
sequence: Number(form.sequence ?? 10),
|
|
2268
|
+
terminalState: form.terminalState === '1',
|
|
2269
|
+
},
|
|
2270
|
+
idempotencyKey: form.idempotencyKey || randomUUID(),
|
|
2271
|
+
}, url, req));
|
|
2272
|
+
if (result.ok)
|
|
2273
|
+
return seeOther(inLocale(url, endpoint));
|
|
2274
|
+
columnErrors = errorsOf(result, _);
|
|
2275
|
+
submitted = form;
|
|
2276
|
+
forcedEditor = 'column';
|
|
2277
|
+
}
|
|
2278
|
+
else if (form.action === 'saveTag') {
|
|
2279
|
+
const result = (await ctx.call('flow.tag.save', { id: form.id || randomUUID(), name: form.name ?? '', color: form.color || undefined }, url, req));
|
|
2280
|
+
if (result.ok)
|
|
2281
|
+
return seeOther(inLocale(url, endpoint));
|
|
2282
|
+
tagErrors = errorsOf(result, _);
|
|
2283
|
+
submitted = form;
|
|
2284
|
+
forcedEditor = 'tag';
|
|
2285
|
+
}
|
|
2286
|
+
else
|
|
2287
|
+
return text('unknown action', { status: 400 });
|
|
2288
|
+
}
|
|
2289
|
+
else if (req.method !== 'GET')
|
|
2290
|
+
return text('GET or POST', { status: 405 });
|
|
2291
|
+
const [columns, types, fields, tags, members] = await Promise.all([
|
|
2292
|
+
ctx.call('flow.column.list', { projectId }, url, req),
|
|
2293
|
+
ctx.call('flow.issueType.list', { projectId }, url, req),
|
|
2294
|
+
ctx.call('flow.field.list', { projectId }, url, req),
|
|
2295
|
+
ctx.call('flow.tag.list', {}, url, req),
|
|
2296
|
+
ctx.call('flow.project.member.list', { projectId }, url, req),
|
|
2297
|
+
]);
|
|
2298
|
+
const editColumn = url.searchParams.get('editColumnId');
|
|
2299
|
+
const editType = url.searchParams.get('editTypeId');
|
|
2300
|
+
const editField = url.searchParams.get('editFieldId');
|
|
2301
|
+
const editTag = url.searchParams.get('editTagId');
|
|
2302
|
+
const editingColumn = editColumn ? columns.find((row) => String(row.id) === editColumn) : undefined;
|
|
2303
|
+
const editingType = editType ? types.find((row) => String(row.id) === editType) : undefined;
|
|
2304
|
+
const editingField = editField ? fields.find((row) => String(row.id) === editField) : undefined;
|
|
2305
|
+
const editingTag = editTag ? tags.find((row) => String(row.id) === editTag) : undefined;
|
|
2306
|
+
const requestedEditor = url.searchParams.get('dialog');
|
|
2307
|
+
const editorKind = forcedEditor ??
|
|
2308
|
+
(editingColumn
|
|
2309
|
+
? 'column'
|
|
2310
|
+
: editingType
|
|
2311
|
+
? 'type'
|
|
2312
|
+
: editingField
|
|
2313
|
+
? 'field'
|
|
2314
|
+
: editingTag
|
|
2315
|
+
? 'tag'
|
|
2316
|
+
: requestedEditor === 'column' ||
|
|
2317
|
+
requestedEditor === 'type' ||
|
|
2318
|
+
requestedEditor === 'field' ||
|
|
2319
|
+
requestedEditor === 'tag'
|
|
2320
|
+
? requestedEditor
|
|
2321
|
+
: undefined);
|
|
2322
|
+
const settingsHref = (name, value) => {
|
|
2323
|
+
const target = new URL(action, 'http://ket.local');
|
|
2324
|
+
target.searchParams.set(name, value);
|
|
2325
|
+
return `${target.pathname}${target.search}`;
|
|
2326
|
+
};
|
|
2327
|
+
const value = (name, fallback = '') => submitted[name] ?? String(fallback ?? '');
|
|
2328
|
+
const selected = editorKind === 'column'
|
|
2329
|
+
? (editingColumn ?? columns.find((row) => String(row.id) === submitted.id))
|
|
2330
|
+
: editorKind === 'type'
|
|
2331
|
+
? (editingType ?? types.find((row) => String(row.id) === submitted.id))
|
|
2332
|
+
: editorKind === 'field'
|
|
2333
|
+
? (editingField ?? fields.find((row) => String(row.id) === submitted.id))
|
|
2334
|
+
: (editingTag ?? tags.find((row) => String(row.id) === submitted.id));
|
|
2335
|
+
const editorFields = editorKind === 'column'
|
|
2336
|
+
? [
|
|
2337
|
+
{
|
|
2338
|
+
name: 'name',
|
|
2339
|
+
label: _('flow_backend.field.name'),
|
|
2340
|
+
required: true,
|
|
2341
|
+
value: value('name', selected?.name),
|
|
2342
|
+
},
|
|
2343
|
+
{ name: 'code', label: _('flow_backend.field.code'), value: value('code', selected?.code) },
|
|
2344
|
+
{
|
|
2345
|
+
name: 'sequence',
|
|
2346
|
+
label: _('flow_backend.field.sequence'),
|
|
2347
|
+
type: 'number',
|
|
2348
|
+
value: value('sequence', selected?.sequence ?? 10),
|
|
2349
|
+
},
|
|
2350
|
+
{
|
|
2351
|
+
name: 'terminalState',
|
|
2352
|
+
label: _('flow_backend.field.terminalState'),
|
|
2353
|
+
type: 'checkbox',
|
|
2354
|
+
value: submitted.terminalState
|
|
2355
|
+
? submitted.terminalState === '1'
|
|
2356
|
+
: selected?.terminalState === true,
|
|
2357
|
+
},
|
|
2358
|
+
]
|
|
2359
|
+
: editorKind === 'type'
|
|
2360
|
+
? [
|
|
2361
|
+
{
|
|
2362
|
+
name: 'name',
|
|
2363
|
+
label: _('flow_backend.field.name'),
|
|
2364
|
+
required: true,
|
|
2365
|
+
value: value('name', selected?.name),
|
|
2366
|
+
},
|
|
2367
|
+
{ name: 'code', label: _('flow_backend.field.code'), value: value('code', selected?.code) },
|
|
2368
|
+
{
|
|
2369
|
+
name: 'sequence',
|
|
2370
|
+
label: _('flow_backend.field.sequence'),
|
|
2371
|
+
type: 'number',
|
|
2372
|
+
value: value('sequence', selected?.sequence ?? 10),
|
|
2373
|
+
},
|
|
2374
|
+
]
|
|
2375
|
+
: editorKind === 'field'
|
|
2376
|
+
? [
|
|
2377
|
+
{
|
|
2378
|
+
name: 'name',
|
|
2379
|
+
label: _('flow_backend.field.name'),
|
|
2380
|
+
required: true,
|
|
2381
|
+
value: value('name', selected?.name),
|
|
2382
|
+
},
|
|
2383
|
+
{ name: 'code', label: _('flow_backend.field.code'), value: value('code', selected?.code) },
|
|
2384
|
+
{
|
|
2385
|
+
name: 'kind',
|
|
2386
|
+
label: _('flow_backend.field.kind'),
|
|
2387
|
+
type: 'select',
|
|
2388
|
+
value: value('kind', selected?.kind ?? 'text'),
|
|
2389
|
+
options: FIELD_KINDS.map((kind) => ({
|
|
2390
|
+
value: kind,
|
|
2391
|
+
label: _(`flow_backend.kind.${kind}`),
|
|
2392
|
+
})),
|
|
2393
|
+
},
|
|
2394
|
+
{
|
|
2395
|
+
name: 'options',
|
|
2396
|
+
label: _('flow_backend.field.options'),
|
|
2397
|
+
help: _('flow_backend.field.optionsHint'),
|
|
2398
|
+
value: value('options', (selected?.config?.options ?? [])
|
|
2399
|
+
.map((option) => String(option.label ?? option.code))
|
|
2400
|
+
.join(', ')),
|
|
2401
|
+
},
|
|
2402
|
+
{
|
|
2403
|
+
name: 'sequence',
|
|
2404
|
+
label: _('flow_backend.field.sequence'),
|
|
2405
|
+
type: 'number',
|
|
2406
|
+
value: value('sequence', selected?.sequence ?? 10),
|
|
2407
|
+
},
|
|
2408
|
+
]
|
|
2409
|
+
: editorKind === 'tag'
|
|
2410
|
+
? [
|
|
2411
|
+
{
|
|
2412
|
+
name: 'name',
|
|
2413
|
+
label: _('flow_backend.field.name'),
|
|
2414
|
+
required: true,
|
|
2415
|
+
value: value('name', selected?.name),
|
|
2416
|
+
},
|
|
2417
|
+
{
|
|
2418
|
+
name: 'color',
|
|
2419
|
+
label: _('flow_backend.field.color'),
|
|
2420
|
+
type: 'color',
|
|
2421
|
+
value: value('color', selected?.color),
|
|
2422
|
+
},
|
|
2423
|
+
]
|
|
2424
|
+
: [];
|
|
2425
|
+
const editorErrors = editorKind === 'column'
|
|
2426
|
+
? columnErrors
|
|
2427
|
+
: editorKind === 'type'
|
|
2428
|
+
? typeErrors
|
|
2429
|
+
: editorKind === 'field'
|
|
2430
|
+
? fieldErrors
|
|
2431
|
+
: tagErrors;
|
|
2432
|
+
// Resolved here rather than in the screen callback, which is not async —
|
|
2433
|
+
// the same reason the brief is read here.
|
|
2434
|
+
const memberPicker = await memberControl(ctx, url, req, _, {
|
|
2435
|
+
id: 'flow-project-member',
|
|
2436
|
+
// Nothing preloaded: the picker searches the company's users itself,
|
|
2437
|
+
// and the people already on the project are the ones not worth offering.
|
|
2438
|
+
users: [],
|
|
2439
|
+
});
|
|
2440
|
+
const brief = await ctx.joint(url, req, 'flow_backend:screen.project', {
|
|
2441
|
+
docId: projectId,
|
|
2442
|
+
base: '/admin/flow/projects',
|
|
2443
|
+
lang: url.searchParams.get('lang') ?? '',
|
|
2444
|
+
});
|
|
2445
|
+
return adminPage(ctx, url, req, {
|
|
2446
|
+
title: String(project.name),
|
|
2447
|
+
translate: false,
|
|
2448
|
+
// The project group marks whichever row this path names, so it has to be
|
|
2449
|
+
// this screen's own. Pointing all three at the backlog left Timeline,
|
|
2450
|
+
// Sprints and Settings permanently unmarked, and told the reader they
|
|
2451
|
+
// were on a screen they had left.
|
|
2452
|
+
active: `/admin/flow/projects/${encodeURIComponent(projectId)}/settings`,
|
|
2453
|
+
body: (_, frame) => settingsScreen(_, frame, String(project.name), {
|
|
2454
|
+
brief,
|
|
2455
|
+
// The record itself, which only the create form has ever offered:
|
|
2456
|
+
// a project typed wrong was typed wrong for good.
|
|
2457
|
+
profile: [
|
|
2458
|
+
{
|
|
2459
|
+
name: 'name',
|
|
2460
|
+
label: _('flow_backend.field.name'),
|
|
2461
|
+
required: true,
|
|
2462
|
+
value: String(project.name ?? ''),
|
|
2463
|
+
span: 'full',
|
|
2464
|
+
},
|
|
2465
|
+
{
|
|
2466
|
+
name: 'key',
|
|
2467
|
+
label: _('flow_backend.field.key'),
|
|
2468
|
+
required: true,
|
|
2469
|
+
value: String(project.key ?? ''),
|
|
2470
|
+
},
|
|
2471
|
+
{
|
|
2472
|
+
name: 'description',
|
|
2473
|
+
label: _('flow_backend.field.description'),
|
|
2474
|
+
value: String(project.description ?? ''),
|
|
2475
|
+
span: 'full',
|
|
2476
|
+
},
|
|
2477
|
+
],
|
|
2478
|
+
archived: project.active === false,
|
|
2479
|
+
profileErrors: projectErrors.length ? projectErrors : undefined,
|
|
2480
|
+
members,
|
|
2481
|
+
memberPicker,
|
|
2482
|
+
memberErrors: memberErrors.length ? memberErrors : undefined,
|
|
2483
|
+
memberIdempotencyKey: submitted.idempotencyKey || randomUUID(),
|
|
2484
|
+
deleteName: String(project.name ?? ''),
|
|
2485
|
+
deleteErrors: deleteErrors.length ? deleteErrors : undefined,
|
|
2486
|
+
deleteIdempotencyKey: randomUUID(),
|
|
2487
|
+
tagUsage: Object.fromEntries(tags.map((tag) => [String(tag.id), Number(tag.usage ?? 0)])),
|
|
2488
|
+
endpoint: action,
|
|
2489
|
+
columns,
|
|
2490
|
+
tags,
|
|
2491
|
+
types,
|
|
2492
|
+
fields,
|
|
2493
|
+
createHref: {
|
|
2494
|
+
column: settingsHref('dialog', 'column'),
|
|
2495
|
+
type: settingsHref('dialog', 'type'),
|
|
2496
|
+
field: settingsHref('dialog', 'field'),
|
|
2497
|
+
tag: settingsHref('dialog', 'tag'),
|
|
2498
|
+
},
|
|
2499
|
+
editColumnHref: (row) => settingsHref('editColumnId', String(row.id)),
|
|
2500
|
+
editTypeHref: (row) => settingsHref('editTypeId', String(row.id)),
|
|
2501
|
+
editFieldHref: (row) => settingsHref('editFieldId', String(row.id)),
|
|
2502
|
+
editTagHref: (row) => settingsHref('editTagId', String(row.id)),
|
|
2503
|
+
editor: editorKind
|
|
2504
|
+
? {
|
|
2505
|
+
kind: editorKind,
|
|
2506
|
+
title: _(`flow_backend.settings.${editorKind === 'type' ? 'types' : `${editorKind}s`}`),
|
|
2507
|
+
action,
|
|
2508
|
+
closeHref: action,
|
|
2509
|
+
fields: editorFields,
|
|
2510
|
+
errors: editorErrors,
|
|
2511
|
+
recordId: submitted.id || String(selected?.id ?? randomUUID()),
|
|
2512
|
+
idempotencyKey: submitted.idempotencyKey || randomUUID(),
|
|
2513
|
+
}
|
|
2514
|
+
: undefined,
|
|
2515
|
+
}),
|
|
2516
|
+
});
|
|
2517
|
+
},
|
|
2518
|
+
};
|
|
2519
|
+
//# sourceMappingURL=routes.js.map
|