@ketvietlab/ketsuite 0.1.2 → 0.1.3
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 +152 -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 +77 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +66 -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 +787 -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 +234 -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 +766 -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 +1134 -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 +331 -0
- package/dist/modules/backend/design/tokens.css +317 -92
- package/dist/modules/backend/index.d.ts +12 -5
- package/dist/modules/backend/index.d.ts.map +1 -1
- package/dist/modules/backend/index.js +32 -15
- 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 +48 -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 +253 -0
- package/dist/modules/channel_api/core.d.ts.map +1 -0
- package/dist/modules/channel_api/core.js +587 -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 +788 -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 +176 -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 +408 -0
- package/dist/modules/flow/operations.d.ts.map +1 -0
- package/dist/modules/flow/operations.js +1665 -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 +444 -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 +383 -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 +39 -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 +432 -67
- 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 +503 -106
- 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/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 +142 -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 +33 -0
- package/dist/modules/hospitality_core/screens/index.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/index.js +33 -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 +237 -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 +777 -0
- package/dist/modules/hospitality_core/screens/shared.d.ts.map +1 -0
- package/dist/modules/hospitality_core/screens/shared.js +1586 -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.map +1 -1
- package/dist/modules/hospitality_core/services.js +133 -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 +1227 -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 +724 -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 +754 -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 +495 -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 +796 -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 +296 -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 +658 -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 +1269 -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 +60 -0
- package/dist/modules/user_backend/messages.d.ts.map +1 -1
- package/dist/modules/user_backend/messages.js +60 -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 +352 -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 +55 -0
- package/dist/modules/user_backend/screens/user-form.d.ts.map +1 -0
- package/dist/modules/user_backend/screens/user-form.js +174 -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 +373 -38
- 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 +26 -4
- package/dist/modules/website/index.js.map +1 -1
- package/dist/modules/website/models.d.ts.map +1 -1
- package/dist/modules/website/models.js +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 +13 -0
- 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 +260 -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 +28 -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 +684 -126
- package/dist/modules/website_backend/routes.js.map +1 -1
- package/dist/modules/website_backend/screens/index.d.ts +333 -0
- package/dist/modules/website_backend/screens/index.d.ts.map +1 -0
- package/dist/modules/website_backend/screens/index.js +1332 -0
- package/dist/modules/website_backend/screens/index.js.map +1 -0
- package/dist/modules/website_backend/screens/page-frame.d.ts +14 -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 +184 -9
- package/dist/modules/website_menu/functions.js.map +1 -1
- package/dist/modules/website_menu/index.js +6 -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 +239 -0
- package/dist/modules/website_search/functions.js.map +1 -0
- package/dist/modules/website_search/index.js +4 -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/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_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 +1505 -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 +37 -2
- package/dist/ui/chrome.d.ts.map +1 -1
- package/dist/ui/chrome.js +39 -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 +283 -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 +4 -1
- package/dist/ui/form.d.ts.map +1 -1
- package/dist/ui/form.js +7 -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 +95 -14
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +78 -13
- 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/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
|
@@ -1,4152 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "@ketvietlab/ketjs-view/jsx-runtime";
|
|
2
|
-
import { badge, cardGrid, code, dataTable, datePicker, definitionList, emptyState, formCluster as FormCluster, formatMoney, framedPage as Framed, icon, linkButton, metric, mediaPanel, notice, recordActions, person, recordForm as RecordForm, recordWorkspace as RecordWorkspace, scheduleBoard, section as Section, stack, surface as Surface, } from '../../ui/index.js';
|
|
3
|
-
import { addCalendarDays, dateKeyIn, zonedMidnight } from './calendar.js';
|
|
4
|
-
import { ACCOMMODATION_TYPES, BOOKING_PROVIDERS, CHARGE_TYPES, DOCUMENT_TYPES, GENDERS, ROOM_STATUSES, ROOM_VIEW_TYPES, } from './types.js';
|
|
5
|
-
const providerName = (_, provider) => BOOKING_PROVIDERS.includes(provider)
|
|
6
|
-
? _(`hospitality_core.provider.${provider}`)
|
|
7
|
-
: provider.replace(/[_-]+/g, ' ').replace(/\b\w/g, (letter) => letter.toUpperCase());
|
|
8
|
-
const statusTone = (status) => {
|
|
9
|
-
if (status === 'available')
|
|
10
|
-
return 'positive';
|
|
11
|
-
if (status === 'dirty' || status === 'cleaning')
|
|
12
|
-
return 'warning';
|
|
13
|
-
if (status === 'maintenance' || status === 'out_of_order')
|
|
14
|
-
return 'danger';
|
|
15
|
-
if (status === 'occupied')
|
|
16
|
-
return 'info';
|
|
17
|
-
return 'neutral';
|
|
18
|
-
};
|
|
19
|
-
const workflowTone = (status) => {
|
|
20
|
-
if (status === 'confirmed' || status === 'checked_in' || status === 'open')
|
|
21
|
-
return 'positive';
|
|
22
|
-
if (status === 'draft')
|
|
23
|
-
return 'warning';
|
|
24
|
-
if (status === 'cancelled' || status === 'no_show')
|
|
25
|
-
return 'danger';
|
|
26
|
-
if (status === 'checked_out' || status === 'closed')
|
|
27
|
-
return 'neutral';
|
|
28
|
-
return 'info';
|
|
29
|
-
};
|
|
30
|
-
const cleaningTone = (state) => {
|
|
31
|
-
if (state === 'todo')
|
|
32
|
-
return 'warning';
|
|
33
|
-
if (state === 'in_progress')
|
|
34
|
-
return 'info';
|
|
35
|
-
if (state === 'done')
|
|
36
|
-
return 'positive';
|
|
37
|
-
return 'neutral';
|
|
38
|
-
};
|
|
39
|
-
const dateTime = (value, locale, timezone) => new Intl.DateTimeFormat(locale, {
|
|
40
|
-
timeZone: timezone,
|
|
41
|
-
day: '2-digit',
|
|
42
|
-
month: '2-digit',
|
|
43
|
-
hour: '2-digit',
|
|
44
|
-
minute: '2-digit',
|
|
45
|
-
hour12: false,
|
|
46
|
-
}).format(new Date(value));
|
|
47
|
-
const guestName = (row) => row.partner?.name ?? row.partnerId;
|
|
48
|
-
const propertyColumns = (_) => [
|
|
49
|
-
{ key: 'code', label: _('hospitality_core.col.code'), cell: (row) => code(row.code), kind: 'identifier' },
|
|
50
|
-
{ key: 'name', label: _('hospitality_core.col.name'), cell: (row) => row.name, priority: 'primary' },
|
|
51
|
-
{
|
|
52
|
-
key: 'type',
|
|
53
|
-
label: _('hospitality_core.col.type'),
|
|
54
|
-
cell: (row) => badge(_(`hospitality_core.accommodation.${row.accommodationType}`)),
|
|
55
|
-
kind: 'status',
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
key: 'location',
|
|
59
|
-
label: _('hospitality_core.col.location'),
|
|
60
|
-
cell: (row) => row.addressLine || [row.city, row.country].filter(Boolean).join(', ') || '—',
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
key: 'rooms',
|
|
64
|
-
label: _('hospitality_core.col.rooms'),
|
|
65
|
-
cell: (row) => String(row.rooms),
|
|
66
|
-
align: 'end',
|
|
67
|
-
kind: 'number',
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
key: 'stars',
|
|
71
|
-
label: _('hospitality_core.col.stars'),
|
|
72
|
-
cell: (row) => String(row.starRating),
|
|
73
|
-
align: 'end',
|
|
74
|
-
kind: 'number',
|
|
75
|
-
},
|
|
76
|
-
];
|
|
77
|
-
const roomColumns = (_) => [
|
|
78
|
-
{ key: 'code', label: _('hospitality_core.col.code'), cell: (row) => code(row.code), kind: 'identifier' },
|
|
79
|
-
{ key: 'name', label: _('hospitality_core.col.name'), cell: (row) => row.name, priority: 'primary' },
|
|
80
|
-
{
|
|
81
|
-
key: 'roomType',
|
|
82
|
-
label: _('hospitality_core.col.roomType'),
|
|
83
|
-
cell: (row) => row.roomType?.name ?? code(row.roomTypeId),
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
key: 'location',
|
|
87
|
-
label: _('hospitality_core.col.location'),
|
|
88
|
-
cell: (row) => [row.building?.name ?? row.building?.code, row.floor?.name ?? row.floor?.code]
|
|
89
|
-
.filter(Boolean)
|
|
90
|
-
.join(' · ') || '—',
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
key: 'capacity',
|
|
94
|
-
label: _('hospitality_core.col.capacity'),
|
|
95
|
-
cell: (row) => String(row.capacity),
|
|
96
|
-
align: 'end',
|
|
97
|
-
kind: 'number',
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
key: 'status',
|
|
101
|
-
label: _('hospitality_core.col.status'),
|
|
102
|
-
cell: (row) => badge(_(`hospitality_core.roomStatus.${row.status}`), statusTone(row.status), row.status),
|
|
103
|
-
kind: 'status',
|
|
104
|
-
priority: 'primary',
|
|
105
|
-
},
|
|
106
|
-
];
|
|
107
|
-
const buildingColumns = (_) => [
|
|
108
|
-
{ key: 'code', label: _('hospitality_core.col.code'), cell: (row) => code(row.code), kind: 'identifier' },
|
|
109
|
-
{ key: 'name', label: _('hospitality_core.col.name'), cell: (row) => row.name, priority: 'primary' },
|
|
110
|
-
{
|
|
111
|
-
key: 'floors',
|
|
112
|
-
label: _('hospitality_core.room.metric.floors'),
|
|
113
|
-
cell: (row) => String(row.floors?.filter((floor) => floor.active !== false).length ?? 0),
|
|
114
|
-
align: 'end',
|
|
115
|
-
kind: 'number',
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
key: 'rooms',
|
|
119
|
-
label: _('hospitality_core.col.rooms'),
|
|
120
|
-
cell: (row) => String(row.rooms?.filter((room) => room.active !== false).length ?? 0),
|
|
121
|
-
align: 'end',
|
|
122
|
-
kind: 'number',
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
key: 'active',
|
|
126
|
-
label: _('hospitality_core.col.status'),
|
|
127
|
-
cell: (row) => badge(_(row.active ? 'hospitality_core.value.active' : 'hospitality_core.value.inactive'), row.active ? 'positive' : 'neutral'),
|
|
128
|
-
kind: 'status',
|
|
129
|
-
},
|
|
130
|
-
];
|
|
131
|
-
const floorColumns = (_) => [
|
|
132
|
-
{ key: 'code', label: _('hospitality_core.col.code'), cell: (row) => code(row.code), kind: 'identifier' },
|
|
133
|
-
{ key: 'name', label: _('hospitality_core.col.name'), cell: (row) => row.name, priority: 'primary' },
|
|
134
|
-
{
|
|
135
|
-
key: 'building',
|
|
136
|
-
label: _('hospitality_core.room.field.building'),
|
|
137
|
-
cell: (row) => row.building?.name ?? row.building?.code ?? code(row.buildingId),
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
key: 'sequence',
|
|
141
|
-
label: _('hospitality_core.room.field.sequence'),
|
|
142
|
-
cell: (row) => String(row.sequence),
|
|
143
|
-
align: 'end',
|
|
144
|
-
kind: 'number',
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
key: 'rooms',
|
|
148
|
-
label: _('hospitality_core.col.rooms'),
|
|
149
|
-
cell: (row) => String(row.rooms?.filter((room) => room.active !== false).length ?? 0),
|
|
150
|
-
align: 'end',
|
|
151
|
-
kind: 'number',
|
|
152
|
-
},
|
|
153
|
-
{
|
|
154
|
-
key: 'active',
|
|
155
|
-
label: _('hospitality_core.col.status'),
|
|
156
|
-
cell: (row) => badge(_(row.active ? 'hospitality_core.value.active' : 'hospitality_core.value.inactive'), row.active ? 'positive' : 'neutral'),
|
|
157
|
-
kind: 'status',
|
|
158
|
-
},
|
|
159
|
-
];
|
|
160
|
-
const roomTypeColumns = (_) => [
|
|
161
|
-
{ key: 'code', label: _('hospitality_core.col.code'), cell: (row) => code(row.code), kind: 'identifier' },
|
|
162
|
-
{ key: 'name', label: _('hospitality_core.col.name'), cell: (row) => row.name, priority: 'primary' },
|
|
163
|
-
{
|
|
164
|
-
key: 'capacity',
|
|
165
|
-
label: _('hospitality_core.col.capacity'),
|
|
166
|
-
cell: (row) => String(row.defaultCapacity),
|
|
167
|
-
align: 'end',
|
|
168
|
-
kind: 'number',
|
|
169
|
-
},
|
|
170
|
-
{
|
|
171
|
-
key: 'rooms',
|
|
172
|
-
label: _('hospitality_core.col.rooms'),
|
|
173
|
-
cell: (row) => String(row.rooms?.length ?? 0),
|
|
174
|
-
align: 'end',
|
|
175
|
-
kind: 'number',
|
|
176
|
-
},
|
|
177
|
-
{
|
|
178
|
-
key: 'baseRate',
|
|
179
|
-
label: _('hospitality_core.col.baseRate'),
|
|
180
|
-
cell: (row) => formatMoney(_, row.baseRate),
|
|
181
|
-
align: 'end',
|
|
182
|
-
kind: 'currency',
|
|
183
|
-
},
|
|
184
|
-
{
|
|
185
|
-
key: 'published',
|
|
186
|
-
label: _('hospitality_core.col.published'),
|
|
187
|
-
cell: (row) => badge(_(row.published ? 'hospitality_core.value.yes' : 'hospitality_core.value.no'), row.published ? 'positive' : 'neutral'),
|
|
188
|
-
kind: 'status',
|
|
189
|
-
},
|
|
190
|
-
];
|
|
191
|
-
const amenityColumns = (_) => [
|
|
192
|
-
{ key: 'code', label: _('hospitality_core.col.code'), cell: (row) => code(row.code), kind: 'identifier' },
|
|
193
|
-
{ key: 'name', label: _('hospitality_core.col.name'), cell: (row) => row.name, priority: 'primary' },
|
|
194
|
-
{
|
|
195
|
-
key: 'scope',
|
|
196
|
-
label: _('hospitality_core.col.scope'),
|
|
197
|
-
cell: (row) => badge(_(`hospitality_core.amenityScope.${row.scope}`)),
|
|
198
|
-
kind: 'status',
|
|
199
|
-
},
|
|
200
|
-
];
|
|
201
|
-
const policyColumns = (_) => [
|
|
202
|
-
{ key: 'code', label: _('hospitality_core.col.code'), cell: (row) => code(row.code), kind: 'identifier' },
|
|
203
|
-
{ key: 'name', label: _('hospitality_core.col.name'), cell: (row) => row.name, priority: 'primary' },
|
|
204
|
-
{
|
|
205
|
-
key: 'policy',
|
|
206
|
-
label: _('hospitality_core.col.policy'),
|
|
207
|
-
cell: (row) => badge(_(`hospitality_core.policy.${row.type}`)),
|
|
208
|
-
kind: 'status',
|
|
209
|
-
},
|
|
210
|
-
{
|
|
211
|
-
key: 'freeCancellation',
|
|
212
|
-
label: _('hospitality_core.col.freeCancellation'),
|
|
213
|
-
cell: (row) => _('hospitality_core.value.hours', { count: row.freeCancellationHours }),
|
|
214
|
-
align: 'end',
|
|
215
|
-
kind: 'number',
|
|
216
|
-
},
|
|
217
|
-
{
|
|
218
|
-
key: 'penalty',
|
|
219
|
-
label: _('hospitality_core.col.penalty'),
|
|
220
|
-
cell: (row) => _('hospitality_core.value.percent', { count: Number(row.penaltyPercent) }),
|
|
221
|
-
align: 'end',
|
|
222
|
-
kind: 'number',
|
|
223
|
-
},
|
|
224
|
-
];
|
|
225
|
-
const ratePlanColumns = (_) => [
|
|
226
|
-
{ key: 'code', label: _('hospitality_core.col.code'), cell: (row) => code(row.code), kind: 'identifier' },
|
|
227
|
-
{ key: 'name', label: _('hospitality_core.col.name'), cell: (row) => row.name, priority: 'primary' },
|
|
228
|
-
{
|
|
229
|
-
key: 'roomType',
|
|
230
|
-
label: _('hospitality_core.col.roomType'),
|
|
231
|
-
cell: (row) => row.roomType?.name ?? row.roomType?.code ?? code(row.roomTypeId),
|
|
232
|
-
},
|
|
233
|
-
{
|
|
234
|
-
key: 'rateType',
|
|
235
|
-
label: _('hospitality_core.col.rateType'),
|
|
236
|
-
cell: (row) => badge(_(`hospitality_core.bookingType.${row.rateType}`)),
|
|
237
|
-
kind: 'status',
|
|
238
|
-
},
|
|
239
|
-
{
|
|
240
|
-
key: 'amount',
|
|
241
|
-
label: _('hospitality_core.col.amount'),
|
|
242
|
-
cell: (row) => formatMoney(_, row.amount),
|
|
243
|
-
align: 'end',
|
|
244
|
-
kind: 'currency',
|
|
245
|
-
},
|
|
246
|
-
{
|
|
247
|
-
key: 'mealPlan',
|
|
248
|
-
label: _('hospitality_core.col.mealPlan'),
|
|
249
|
-
cell: (row) => (row.mealPlan ? _(`hospitality_core.mealPlan.${row.mealPlan}`) : '—'),
|
|
250
|
-
},
|
|
251
|
-
{
|
|
252
|
-
key: 'los',
|
|
253
|
-
label: _('hospitality_core.col.los'),
|
|
254
|
-
cell: (row) => `${row.minStay || '—'} / ${row.maxStay || '∞'}`,
|
|
255
|
-
align: 'end',
|
|
256
|
-
kind: 'number',
|
|
257
|
-
},
|
|
258
|
-
{
|
|
259
|
-
key: 'default',
|
|
260
|
-
label: _('hospitality_core.col.default'),
|
|
261
|
-
cell: (row) => badge(_(row.isDefault ? 'hospitality_core.value.yes' : 'hospitality_core.value.no'), row.isDefault ? 'positive' : 'neutral'),
|
|
262
|
-
kind: 'status',
|
|
263
|
-
},
|
|
264
|
-
{
|
|
265
|
-
key: 'active',
|
|
266
|
-
label: _('hospitality_core.col.status'),
|
|
267
|
-
cell: (row) => badge(_(row.active ? 'hospitality_core.value.active' : 'hospitality_core.value.inactive'), row.active ? 'positive' : 'neutral'),
|
|
268
|
-
kind: 'status',
|
|
269
|
-
},
|
|
270
|
-
];
|
|
271
|
-
const inventoryColumns = (_) => [
|
|
272
|
-
{ key: 'date', label: _('hospitality_core.col.date'), cell: (row) => row.date, kind: 'date' },
|
|
273
|
-
{
|
|
274
|
-
key: 'total',
|
|
275
|
-
label: _('hospitality_core.col.total'),
|
|
276
|
-
cell: (row) => String(row.total),
|
|
277
|
-
align: 'end',
|
|
278
|
-
kind: 'number',
|
|
279
|
-
},
|
|
280
|
-
{
|
|
281
|
-
key: 'sold',
|
|
282
|
-
label: _('hospitality_core.col.sold'),
|
|
283
|
-
cell: (row) => String(row.sold),
|
|
284
|
-
align: 'end',
|
|
285
|
-
kind: 'number',
|
|
286
|
-
},
|
|
287
|
-
{
|
|
288
|
-
key: 'blocked',
|
|
289
|
-
label: _('hospitality_core.col.blocked'),
|
|
290
|
-
cell: (row) => String(row.blocked),
|
|
291
|
-
align: 'end',
|
|
292
|
-
kind: 'number',
|
|
293
|
-
},
|
|
294
|
-
{
|
|
295
|
-
key: 'available',
|
|
296
|
-
label: _('hospitality_core.col.available'),
|
|
297
|
-
cell: (row) => String(row.available),
|
|
298
|
-
align: 'end',
|
|
299
|
-
kind: 'number',
|
|
300
|
-
priority: 'primary',
|
|
301
|
-
},
|
|
302
|
-
{
|
|
303
|
-
key: 'los',
|
|
304
|
-
label: _('hospitality_core.col.los'),
|
|
305
|
-
cell: (row) => `${row.minLos || '—'} / ${row.maxLos || '∞'}`,
|
|
306
|
-
align: 'end',
|
|
307
|
-
kind: 'number',
|
|
308
|
-
},
|
|
309
|
-
{
|
|
310
|
-
key: 'restrictions',
|
|
311
|
-
label: _('hospitality_core.col.restrictions'),
|
|
312
|
-
cell: (row) => {
|
|
313
|
-
const values = [
|
|
314
|
-
...(row.stopSell ? [_('hospitality_core.restriction.stopSell')] : []),
|
|
315
|
-
...(row.closedToArrival ? ['CTA'] : []),
|
|
316
|
-
...(row.closedToDeparture ? ['CTD'] : []),
|
|
317
|
-
];
|
|
318
|
-
return values.length
|
|
319
|
-
? badge(values.join(' · '), row.stopSell ? 'danger' : 'warning')
|
|
320
|
-
: badge(_('hospitality_core.restriction.open'), 'positive');
|
|
321
|
-
},
|
|
322
|
-
kind: 'status',
|
|
323
|
-
},
|
|
324
|
-
];
|
|
325
|
-
const cleaningTaskColumns = (_, locale, timezone) => [
|
|
326
|
-
{ key: 'code', label: _('hospitality_core.col.code'), cell: (row) => code(row.code), kind: 'identifier' },
|
|
327
|
-
{
|
|
328
|
-
key: 'room',
|
|
329
|
-
label: _('hospitality_core.col.room'),
|
|
330
|
-
cell: (row) => row.room?.name ?? row.room?.code ?? '—',
|
|
331
|
-
priority: 'primary',
|
|
332
|
-
},
|
|
333
|
-
{
|
|
334
|
-
key: 'status',
|
|
335
|
-
label: _('hospitality_core.col.status'),
|
|
336
|
-
cell: (row) => badge(_(`hospitality_core.cleaningState.${row.state}`), cleaningTone(row.state), row.state),
|
|
337
|
-
kind: 'status',
|
|
338
|
-
priority: 'primary',
|
|
339
|
-
},
|
|
340
|
-
{
|
|
341
|
-
key: 'priority',
|
|
342
|
-
label: _('hospitality_core.col.priority'),
|
|
343
|
-
cell: (row) => badge(_(`hospitality_core.cleaningPriority.${row.priority}`), row.priority === 'urgent' ? 'danger' : 'neutral'),
|
|
344
|
-
kind: 'status',
|
|
345
|
-
},
|
|
346
|
-
{
|
|
347
|
-
key: 'type',
|
|
348
|
-
label: _('hospitality_core.col.type'),
|
|
349
|
-
cell: (row) => _(`hospitality_core.cleaningType.${row.taskType}`),
|
|
350
|
-
},
|
|
351
|
-
{
|
|
352
|
-
key: 'assignee',
|
|
353
|
-
label: _('hospitality_core.col.assignee'),
|
|
354
|
-
cell: (row) => row.assigneeId ?? '—',
|
|
355
|
-
},
|
|
356
|
-
{
|
|
357
|
-
key: 'requestedAt',
|
|
358
|
-
label: _('hospitality_core.col.requestedAt'),
|
|
359
|
-
cell: (row) => dateTime(row.requestedAt, locale, timezone),
|
|
360
|
-
kind: 'date',
|
|
361
|
-
},
|
|
362
|
-
];
|
|
363
|
-
const PROPERTY_TIMEZONES = [
|
|
364
|
-
'Asia/Ho_Chi_Minh',
|
|
365
|
-
'Asia/Bangkok',
|
|
366
|
-
'Asia/Singapore',
|
|
367
|
-
'Asia/Kuala_Lumpur',
|
|
368
|
-
'Asia/Jakarta',
|
|
369
|
-
'Asia/Manila',
|
|
370
|
-
'Asia/Tokyo',
|
|
371
|
-
'Asia/Seoul',
|
|
372
|
-
'Australia/Sydney',
|
|
373
|
-
'Europe/London',
|
|
374
|
-
'America/New_York',
|
|
375
|
-
'UTC',
|
|
376
|
-
];
|
|
377
|
-
const propertyFormFields = (_, values, policies, branches) => {
|
|
378
|
-
const timezones = [...new Set([values.timezone, ...PROPERTY_TIMEZONES])];
|
|
379
|
-
return [
|
|
380
|
-
{ name: 'code', label: _('hospitality_core.property.field.code'), value: values.code, required: true },
|
|
381
|
-
{ name: 'name', label: _('hospitality_core.property.field.name'), value: values.name, required: true },
|
|
382
|
-
{
|
|
383
|
-
name: 'publicName',
|
|
384
|
-
label: _('hospitality_core.property.field.publicName'),
|
|
385
|
-
value: values.publicName,
|
|
386
|
-
help: _('hospitality_core.property.field.publicNameHint'),
|
|
387
|
-
},
|
|
388
|
-
{
|
|
389
|
-
name: 'branchId',
|
|
390
|
-
label: _('hospitality_core.property.field.branch'),
|
|
391
|
-
type: 'select',
|
|
392
|
-
value: values.branchId,
|
|
393
|
-
help: _('hospitality_core.property.field.branchHint'),
|
|
394
|
-
options: [
|
|
395
|
-
{ value: '', label: _('hospitality_core.property.value.noBranch') },
|
|
396
|
-
...branches.map((branch) => ({
|
|
397
|
-
value: branch.id,
|
|
398
|
-
label: `${branch.code} · ${branch.name}`,
|
|
399
|
-
})),
|
|
400
|
-
],
|
|
401
|
-
},
|
|
402
|
-
{
|
|
403
|
-
name: 'accommodationType',
|
|
404
|
-
label: _('hospitality_core.property.field.accommodationType'),
|
|
405
|
-
type: 'select',
|
|
406
|
-
value: values.accommodationType,
|
|
407
|
-
required: true,
|
|
408
|
-
options: ACCOMMODATION_TYPES.map((value) => ({
|
|
409
|
-
value,
|
|
410
|
-
label: _(`hospitality_core.accommodation.${value}`),
|
|
411
|
-
})),
|
|
412
|
-
},
|
|
413
|
-
{
|
|
414
|
-
name: 'starRating',
|
|
415
|
-
label: _('hospitality_core.property.field.starRating'),
|
|
416
|
-
type: 'number',
|
|
417
|
-
value: values.starRating,
|
|
418
|
-
required: true,
|
|
419
|
-
step: '1',
|
|
420
|
-
help: _('hospitality_core.property.field.starRatingHint'),
|
|
421
|
-
},
|
|
422
|
-
{
|
|
423
|
-
name: 'timezone',
|
|
424
|
-
label: _('hospitality_core.property.field.timezone'),
|
|
425
|
-
type: 'select',
|
|
426
|
-
value: values.timezone,
|
|
427
|
-
required: true,
|
|
428
|
-
options: timezones.map((value) => ({ value, label: value })),
|
|
429
|
-
},
|
|
430
|
-
{
|
|
431
|
-
name: 'defaultCheckIn',
|
|
432
|
-
label: _('hospitality_core.property.field.defaultCheckIn'),
|
|
433
|
-
type: 'time',
|
|
434
|
-
value: values.defaultCheckIn,
|
|
435
|
-
required: true,
|
|
436
|
-
step: '60',
|
|
437
|
-
},
|
|
438
|
-
{
|
|
439
|
-
name: 'defaultCheckOut',
|
|
440
|
-
label: _('hospitality_core.property.field.defaultCheckOut'),
|
|
441
|
-
type: 'time',
|
|
442
|
-
value: values.defaultCheckOut,
|
|
443
|
-
required: true,
|
|
444
|
-
step: '60',
|
|
445
|
-
},
|
|
446
|
-
{
|
|
447
|
-
name: 'enforceTimes',
|
|
448
|
-
label: _('hospitality_core.property.field.enforceTimes'),
|
|
449
|
-
type: 'checkbox',
|
|
450
|
-
value: values.enforceTimes,
|
|
451
|
-
help: _('hospitality_core.property.field.enforceTimesHint'),
|
|
452
|
-
},
|
|
453
|
-
{
|
|
454
|
-
name: 'longStayBillOnCheckIn',
|
|
455
|
-
label: _('hospitality_core.property.field.longStayBillOnCheckIn'),
|
|
456
|
-
type: 'checkbox',
|
|
457
|
-
value: values.longStayBillOnCheckIn === true,
|
|
458
|
-
help: _('hospitality_core.property.field.longStayBillOnCheckInHint'),
|
|
459
|
-
},
|
|
460
|
-
{
|
|
461
|
-
name: 'childrenStayFree',
|
|
462
|
-
label: _('hospitality_core.property.field.childrenStayFree'),
|
|
463
|
-
type: 'checkbox',
|
|
464
|
-
value: values.childrenStayFree,
|
|
465
|
-
},
|
|
466
|
-
{
|
|
467
|
-
name: 'minimumGuestAge',
|
|
468
|
-
label: _('hospitality_core.property.field.minimumGuestAge'),
|
|
469
|
-
type: 'number',
|
|
470
|
-
value: values.minimumGuestAge,
|
|
471
|
-
step: '1',
|
|
472
|
-
},
|
|
473
|
-
{
|
|
474
|
-
name: 'defaultCancellationPolicyId',
|
|
475
|
-
label: _('hospitality_core.property.field.defaultCancellationPolicy'),
|
|
476
|
-
type: 'select',
|
|
477
|
-
value: values.defaultCancellationPolicyId,
|
|
478
|
-
options: [
|
|
479
|
-
{ value: '', label: _('hospitality_core.property.value.noDefaultPolicy') },
|
|
480
|
-
...choices(policies),
|
|
481
|
-
],
|
|
482
|
-
},
|
|
483
|
-
{
|
|
484
|
-
name: 'description',
|
|
485
|
-
label: _('hospitality_core.property.field.description'),
|
|
486
|
-
type: 'textarea',
|
|
487
|
-
value: values.description,
|
|
488
|
-
span: 'full',
|
|
489
|
-
},
|
|
490
|
-
{
|
|
491
|
-
name: 'houseRules',
|
|
492
|
-
label: _('hospitality_core.property.field.houseRules'),
|
|
493
|
-
type: 'textarea',
|
|
494
|
-
value: values.houseRules,
|
|
495
|
-
span: 'full',
|
|
496
|
-
},
|
|
497
|
-
];
|
|
498
|
-
};
|
|
499
|
-
const propertyForm = (_, values, policies, branches, locale, action, submit, cancelHref) => (_jsx(RecordForm, { action: action, fields: propertyFormFields(_, values, policies, branches), hidden: { id: values.id, lang: locale }, submit: submit, submitVariant: "primary", cancelHref: cancelHref, cancelLabel: _('hospitality_core.action.cancel') }));
|
|
500
|
-
export const propertiesScreen = (_, rows, totals, locale, frame) => (_jsx(Framed, { translator: _, title: _('hospitality_core.screen.properties.title'), frame: frame, body: stack([
|
|
501
|
-
linkButton({
|
|
502
|
-
label: _('hospitality_core.property.action.create'),
|
|
503
|
-
href: `/admin/hospitality/properties/new?lang=${encodeURIComponent(locale)}`,
|
|
504
|
-
variant: 'primary',
|
|
505
|
-
}),
|
|
506
|
-
cardGrid({
|
|
507
|
-
items: [
|
|
508
|
-
{ id: 'properties', label: _('hospitality_core.metric.properties'), value: rows.length },
|
|
509
|
-
{ id: 'rooms', label: _('hospitality_core.metric.rooms'), value: totals.rooms },
|
|
510
|
-
{ id: 'available', label: _('hospitality_core.metric.available'), value: totals.available },
|
|
511
|
-
{ id: 'attention', label: _('hospitality_core.metric.attention'), value: totals.attention },
|
|
512
|
-
],
|
|
513
|
-
id: (item) => item.id,
|
|
514
|
-
card: (item) => metric({ label: item.label, value: String(item.value), tone: item.id }),
|
|
515
|
-
}),
|
|
516
|
-
rows.length
|
|
517
|
-
? dataTable(_, {
|
|
518
|
-
columns: propertyColumns(_),
|
|
519
|
-
rows,
|
|
520
|
-
id: (row) => row.id,
|
|
521
|
-
rowHref: (row) => `/admin/hospitality/properties/${encodeURIComponent(row.id)}?lang=${encodeURIComponent(locale)}`,
|
|
522
|
-
})
|
|
523
|
-
: emptyState(_('hospitality_core.screen.properties.empty'), _('hospitality_core.screen.properties.emptyHint')),
|
|
524
|
-
]) }));
|
|
525
|
-
const propertyFeedback = (_, status, errors = []) => {
|
|
526
|
-
if (status === 'created' || status === 'saved')
|
|
527
|
-
return notice({
|
|
528
|
-
title: _(`hospitality_core.property.feedback.${status}`),
|
|
529
|
-
message: _('hospitality_core.property.feedback.savedHint'),
|
|
530
|
-
tone: 'positive',
|
|
531
|
-
});
|
|
532
|
-
if (errors.length)
|
|
533
|
-
return notice({
|
|
534
|
-
title: _('hospitality_core.feedback.invalid'),
|
|
535
|
-
message: errors.join(' '),
|
|
536
|
-
tone: 'danger',
|
|
537
|
-
});
|
|
538
|
-
return null;
|
|
539
|
-
};
|
|
540
|
-
export const newPropertyScreen = (_, values, policies, branches, locale, frame, errors = []) => (_jsx(Framed, { translator: _, title: _('hospitality_core.property.create.title'), frame: frame, body: stack([
|
|
541
|
-
propertyFeedback(_, null, errors),
|
|
542
|
-
_jsx(Section, { title: _('hospitality_core.property.create.title'), description: _('hospitality_core.property.create.hint'), body: propertyForm(_, values, policies, branches, locale, `/admin/hospitality/properties/new?lang=${encodeURIComponent(locale)}`, _('hospitality_core.property.action.create'), `/admin/hospitality/properties?lang=${encodeURIComponent(locale)}`) }),
|
|
543
|
-
]) }));
|
|
544
|
-
export const propertyDetailScreen = (_, property, policies, branches, locale, frame, status, errors = [], attempted) => {
|
|
545
|
-
const query = `lang=${encodeURIComponent(locale)}`;
|
|
546
|
-
const values = attempted ?? property;
|
|
547
|
-
const rooms = property.rooms ?? [];
|
|
548
|
-
return (_jsx(Framed, { translator: _, title: property.name, frame: frame, body: stack([
|
|
549
|
-
propertyFeedback(_, status, errors),
|
|
550
|
-
_jsx(RecordWorkspace, { kicker: _('hospitality_core.property.detail.kicker'), title: property.name, subtitle: `${property.code} · ${property.publicName || property.name}`, imageFallback: icon('hotel'), badges: [
|
|
551
|
-
badge(_(`hospitality_core.accommodation.${property.accommodationType}`), 'info'),
|
|
552
|
-
badge(_(property.active ? 'hospitality_core.value.active' : 'hospitality_core.value.inactive'), property.active ? 'positive' : 'neutral'),
|
|
553
|
-
], summary: [
|
|
554
|
-
{
|
|
555
|
-
id: 'rooms',
|
|
556
|
-
label: _('hospitality_core.metric.rooms'),
|
|
557
|
-
value: rooms.length,
|
|
558
|
-
href: `/admin/hospitality/rooms?property=${encodeURIComponent(property.id)}&${query}`,
|
|
559
|
-
},
|
|
560
|
-
{
|
|
561
|
-
id: 'room-types',
|
|
562
|
-
label: _('hospitality_core.menu.roomTypes'),
|
|
563
|
-
value: property.roomTypes?.length ?? 0,
|
|
564
|
-
href: `/admin/hospitality/room-types?property=${encodeURIComponent(property.id)}&${query}`,
|
|
565
|
-
},
|
|
566
|
-
{
|
|
567
|
-
id: 'buildings',
|
|
568
|
-
label: _('hospitality_core.property.metric.buildings'),
|
|
569
|
-
value: property.buildings?.length ?? 0,
|
|
570
|
-
},
|
|
571
|
-
], navigation: linkButton({
|
|
572
|
-
label: _('hospitality_core.property.action.back'),
|
|
573
|
-
href: `/admin/hospitality/properties?${query}`,
|
|
574
|
-
variant: 'tertiary',
|
|
575
|
-
icon: 'chevron-left',
|
|
576
|
-
}), body: stack([
|
|
577
|
-
_jsx(Section, { title: _('hospitality_core.property.section.information'), description: _('hospitality_core.property.section.informationHint'), body: definitionList({
|
|
578
|
-
title: property.publicName || property.name,
|
|
579
|
-
items: [
|
|
580
|
-
{
|
|
581
|
-
key: 'address',
|
|
582
|
-
term: _('hospitality_core.property.field.address'),
|
|
583
|
-
value: property.addressLine || '—',
|
|
584
|
-
},
|
|
585
|
-
{
|
|
586
|
-
key: 'timezone',
|
|
587
|
-
term: _('hospitality_core.property.field.timezone'),
|
|
588
|
-
value: property.timezone,
|
|
589
|
-
},
|
|
590
|
-
{
|
|
591
|
-
key: 'check-in',
|
|
592
|
-
term: _('hospitality_core.property.field.defaultCheckIn'),
|
|
593
|
-
value: property.defaultCheckIn,
|
|
594
|
-
},
|
|
595
|
-
{
|
|
596
|
-
key: 'check-out',
|
|
597
|
-
term: _('hospitality_core.property.field.defaultCheckOut'),
|
|
598
|
-
value: property.defaultCheckOut,
|
|
599
|
-
},
|
|
600
|
-
{
|
|
601
|
-
key: 'policy',
|
|
602
|
-
term: _('hospitality_core.property.field.defaultCancellationPolicy'),
|
|
603
|
-
value: property.defaultCancellationPolicy?.name ??
|
|
604
|
-
property.defaultCancellationPolicy?.code ??
|
|
605
|
-
_('hospitality_core.property.value.noDefaultPolicy'),
|
|
606
|
-
},
|
|
607
|
-
],
|
|
608
|
-
}) }),
|
|
609
|
-
_jsx(Section, { title: _('hospitality_core.property.section.settings'), description: _('hospitality_core.property.section.settingsHint'), body: propertyForm(_, values, policies, branches, locale, `/admin/hospitality/properties/${encodeURIComponent(property.id)}?${query}`, _('hospitality_core.property.action.save'), `/admin/hospitality/properties?${query}`) }),
|
|
610
|
-
_jsx(Section, { title: _('hospitality_core.property.section.next'), description: _('hospitality_core.property.section.nextHint'), body: stack([
|
|
611
|
-
linkButton({
|
|
612
|
-
label: _('hospitality_core.menu.roomTypes'),
|
|
613
|
-
href: `/admin/hospitality/room-types?property=${encodeURIComponent(property.id)}&${query}`,
|
|
614
|
-
variant: 'secondary',
|
|
615
|
-
}),
|
|
616
|
-
linkButton({
|
|
617
|
-
label: _('hospitality_core.menu.rooms'),
|
|
618
|
-
href: `/admin/hospitality/rooms?property=${encodeURIComponent(property.id)}&${query}`,
|
|
619
|
-
variant: 'secondary',
|
|
620
|
-
}),
|
|
621
|
-
linkButton({
|
|
622
|
-
label: _('hospitality_core.menu.inventory'),
|
|
623
|
-
href: `/admin/hospitality/inventory?property=${encodeURIComponent(property.id)}&${query}`,
|
|
624
|
-
variant: 'secondary',
|
|
625
|
-
}),
|
|
626
|
-
linkButton({
|
|
627
|
-
label: _('hospitality_core.menu.content'),
|
|
628
|
-
href: `/admin/hospitality/content?property=${encodeURIComponent(property.id)}&${query}`,
|
|
629
|
-
variant: 'secondary',
|
|
630
|
-
}),
|
|
631
|
-
], 'compact') }),
|
|
632
|
-
]) }),
|
|
633
|
-
]) }));
|
|
634
|
-
};
|
|
635
|
-
const roomFeedback = (_, status, errors = []) => {
|
|
636
|
-
if (status === 'building-created' ||
|
|
637
|
-
status === 'floor-created' ||
|
|
638
|
-
status === 'created' ||
|
|
639
|
-
status === 'saved' ||
|
|
640
|
-
status === 'archived' ||
|
|
641
|
-
status === 'restored')
|
|
642
|
-
return notice({
|
|
643
|
-
title: _(`hospitality_core.room.feedback.${status}`),
|
|
644
|
-
message: _(status === 'archived' || status === 'restored'
|
|
645
|
-
? `hospitality_core.room.feedback.${status}Hint`
|
|
646
|
-
: 'hospitality_core.room.feedback.savedHint'),
|
|
647
|
-
tone: 'positive',
|
|
648
|
-
});
|
|
649
|
-
if (status === 'invalid' || errors.length)
|
|
650
|
-
return notice({
|
|
651
|
-
title: _('hospitality_core.feedback.invalid'),
|
|
652
|
-
message: errors.join(' ') || _('hospitality_core.feedback.invalidHint'),
|
|
653
|
-
tone: 'danger',
|
|
654
|
-
});
|
|
655
|
-
return null;
|
|
656
|
-
};
|
|
657
|
-
const roomFormFields = (_, values, properties, roomTypes, buildings, floors) => [
|
|
658
|
-
{
|
|
659
|
-
name: 'propertyId',
|
|
660
|
-
label: _('hospitality_core.room.field.property'),
|
|
661
|
-
type: 'select',
|
|
662
|
-
value: values.propertyId,
|
|
663
|
-
options: choices(properties),
|
|
664
|
-
required: true,
|
|
665
|
-
disabled: true,
|
|
666
|
-
},
|
|
667
|
-
{
|
|
668
|
-
name: 'roomTypeId',
|
|
669
|
-
label: _('hospitality_core.room.field.roomType'),
|
|
670
|
-
type: 'select',
|
|
671
|
-
value: values.roomTypeId,
|
|
672
|
-
options: choices(roomTypes),
|
|
673
|
-
required: true,
|
|
674
|
-
},
|
|
675
|
-
{
|
|
676
|
-
name: 'code',
|
|
677
|
-
label: _('hospitality_core.room.field.code'),
|
|
678
|
-
value: values.code,
|
|
679
|
-
required: true,
|
|
680
|
-
help: _('hospitality_core.room.field.codeHint'),
|
|
681
|
-
},
|
|
682
|
-
{
|
|
683
|
-
name: 'name',
|
|
684
|
-
label: _('hospitality_core.room.field.name'),
|
|
685
|
-
value: values.name,
|
|
686
|
-
required: true,
|
|
687
|
-
},
|
|
688
|
-
{
|
|
689
|
-
name: 'buildingId',
|
|
690
|
-
label: _('hospitality_core.room.field.building'),
|
|
691
|
-
type: 'select',
|
|
692
|
-
value: values.buildingId,
|
|
693
|
-
options: [{ value: '', label: _('hospitality_core.room.value.noBuilding') }, ...choices(buildings)],
|
|
694
|
-
},
|
|
695
|
-
{
|
|
696
|
-
name: 'floorId',
|
|
697
|
-
label: _('hospitality_core.room.field.floor'),
|
|
698
|
-
type: 'select',
|
|
699
|
-
value: values.floorId,
|
|
700
|
-
options: [
|
|
701
|
-
{ value: '', label: _('hospitality_core.room.value.noFloor') },
|
|
702
|
-
...floors.map((floor) => ({
|
|
703
|
-
value: floor.id,
|
|
704
|
-
label: `${floor.building?.name ?? floor.building?.code ?? ''}${floor.building ? ' · ' : ''}${floor.name}`,
|
|
705
|
-
})),
|
|
706
|
-
],
|
|
707
|
-
help: _('hospitality_core.room.field.floorHint'),
|
|
708
|
-
},
|
|
709
|
-
{
|
|
710
|
-
name: 'capacity',
|
|
711
|
-
label: _('hospitality_core.room.field.capacity'),
|
|
712
|
-
type: 'number',
|
|
713
|
-
value: values.capacity,
|
|
714
|
-
required: true,
|
|
715
|
-
step: '1',
|
|
716
|
-
},
|
|
717
|
-
];
|
|
718
|
-
const roomForm = (_, values, properties, roomTypes, buildings, floors, locale, action, submit, cancelHref) => (_jsx(RecordForm, { action: action, fields: roomFormFields(_, values, properties, roomTypes, buildings, floors), hidden: {
|
|
719
|
-
lang: locale,
|
|
720
|
-
propertyId: values.propertyId,
|
|
721
|
-
}, submit: submit, submitVariant: "primary", cancelHref: cancelHref, cancelLabel: _('hospitality_core.action.cancel') }));
|
|
722
|
-
export const roomsScreen = (_, data, locale, frame, status, errors = []) => {
|
|
723
|
-
const query = new URLSearchParams({ lang: locale });
|
|
724
|
-
if (data.propertyId)
|
|
725
|
-
query.set('property', data.propertyId);
|
|
726
|
-
const action = `/admin/hospitality/rooms?${query.toString()}`;
|
|
727
|
-
const activeBuildings = data.buildings.filter((row) => row.active);
|
|
728
|
-
const activeFloors = data.floors.filter((row) => row.active);
|
|
729
|
-
const canCreateRoom = Boolean(data.propertyId && data.roomTypes.length);
|
|
730
|
-
return (_jsx(Framed, { translator: _, title: _('hospitality_core.screen.rooms.title'), frame: frame, body: stack([
|
|
731
|
-
roomFeedback(_, status, errors),
|
|
732
|
-
_jsx(RecordForm, { action: "/admin/hospitality/rooms", method: "get", layout: "inline", fields: [
|
|
733
|
-
{
|
|
734
|
-
name: 'property',
|
|
735
|
-
label: _('hospitality_core.room.field.property'),
|
|
736
|
-
type: 'select',
|
|
737
|
-
value: data.propertyId,
|
|
738
|
-
options: choices(data.properties),
|
|
739
|
-
},
|
|
740
|
-
], hidden: { lang: locale }, submit: _('hospitality_core.action.apply'), submitVariant: "secondary" }),
|
|
741
|
-
canCreateRoom
|
|
742
|
-
? linkButton({
|
|
743
|
-
label: _('hospitality_core.room.action.create'),
|
|
744
|
-
href: `/admin/hospitality/rooms/new?${query.toString()}`,
|
|
745
|
-
variant: 'primary',
|
|
746
|
-
})
|
|
747
|
-
: notice({
|
|
748
|
-
title: _('hospitality_core.room.empty.prerequisite'),
|
|
749
|
-
message: _('hospitality_core.room.empty.prerequisiteHint'),
|
|
750
|
-
tone: 'warning',
|
|
751
|
-
}),
|
|
752
|
-
cardGrid({
|
|
753
|
-
items: [
|
|
754
|
-
{ id: 'rooms', label: _('hospitality_core.metric.rooms'), value: data.rows.length },
|
|
755
|
-
{
|
|
756
|
-
id: 'buildings',
|
|
757
|
-
label: _('hospitality_core.property.metric.buildings'),
|
|
758
|
-
value: activeBuildings.length,
|
|
759
|
-
},
|
|
760
|
-
{ id: 'floors', label: _('hospitality_core.room.metric.floors'), value: activeFloors.length },
|
|
761
|
-
{
|
|
762
|
-
id: 'available',
|
|
763
|
-
label: _('hospitality_core.metric.available'),
|
|
764
|
-
value: data.rows.filter((row) => row.status === 'available').length,
|
|
765
|
-
},
|
|
766
|
-
],
|
|
767
|
-
id: (item) => item.id,
|
|
768
|
-
card: (item) => metric({ label: item.label, value: String(item.value), tone: item.id }),
|
|
769
|
-
}),
|
|
770
|
-
...(data.propertyId
|
|
771
|
-
? [
|
|
772
|
-
_jsx(Section, { title: _('hospitality_core.room.section.locationSetup'), description: _('hospitality_core.room.section.locationSetupHint'), body: _jsx(FormCluster, { label: _('hospitality_core.room.section.locationSetup'), forms: [
|
|
773
|
-
_jsx(RecordForm, { action: action, hidden: {
|
|
774
|
-
id: 'new-building',
|
|
775
|
-
operation: 'save-building',
|
|
776
|
-
propertyId: data.propertyId,
|
|
777
|
-
}, submit: _('hospitality_core.room.action.createBuilding'), submitVariant: "secondary", fields: [
|
|
778
|
-
{
|
|
779
|
-
name: 'code',
|
|
780
|
-
label: _('hospitality_core.room.field.buildingCode'),
|
|
781
|
-
required: true,
|
|
782
|
-
},
|
|
783
|
-
{
|
|
784
|
-
name: 'name',
|
|
785
|
-
label: _('hospitality_core.room.field.buildingName'),
|
|
786
|
-
required: true,
|
|
787
|
-
},
|
|
788
|
-
{
|
|
789
|
-
name: 'sequence',
|
|
790
|
-
label: _('hospitality_core.room.field.sequence'),
|
|
791
|
-
type: 'number',
|
|
792
|
-
value: 10,
|
|
793
|
-
step: '1',
|
|
794
|
-
},
|
|
795
|
-
] }),
|
|
796
|
-
...(activeBuildings.length
|
|
797
|
-
? [
|
|
798
|
-
_jsx(RecordForm, { action: action, hidden: {
|
|
799
|
-
id: 'new-floor',
|
|
800
|
-
operation: 'save-floor',
|
|
801
|
-
propertyId: data.propertyId,
|
|
802
|
-
}, submit: _('hospitality_core.room.action.createFloor'), submitVariant: "secondary", fields: [
|
|
803
|
-
{
|
|
804
|
-
name: 'buildingId',
|
|
805
|
-
label: _('hospitality_core.room.field.building'),
|
|
806
|
-
type: 'select',
|
|
807
|
-
options: choices(activeBuildings),
|
|
808
|
-
required: true,
|
|
809
|
-
},
|
|
810
|
-
{
|
|
811
|
-
name: 'code',
|
|
812
|
-
label: _('hospitality_core.room.field.floorCode'),
|
|
813
|
-
required: true,
|
|
814
|
-
},
|
|
815
|
-
{
|
|
816
|
-
name: 'name',
|
|
817
|
-
label: _('hospitality_core.room.field.floorName'),
|
|
818
|
-
required: true,
|
|
819
|
-
},
|
|
820
|
-
{
|
|
821
|
-
name: 'sequence',
|
|
822
|
-
label: _('hospitality_core.room.field.sequence'),
|
|
823
|
-
type: 'number',
|
|
824
|
-
value: 10,
|
|
825
|
-
step: '1',
|
|
826
|
-
},
|
|
827
|
-
] }),
|
|
828
|
-
]
|
|
829
|
-
: []),
|
|
830
|
-
] }) }),
|
|
831
|
-
_jsx(Section, { title: _('hospitality_core.room.section.buildings'), description: _('hospitality_core.room.section.buildingsHint'), body: data.buildings.length
|
|
832
|
-
? dataTable(_, {
|
|
833
|
-
columns: buildingColumns(_),
|
|
834
|
-
rows: data.buildings,
|
|
835
|
-
id: (row) => row.id,
|
|
836
|
-
rowHref: (row) => `/admin/hospitality/buildings/${encodeURIComponent(row.id)}?lang=${encodeURIComponent(locale)}`,
|
|
837
|
-
})
|
|
838
|
-
: emptyState(_('hospitality_core.room.empty.buildings'), _('hospitality_core.room.empty.buildingsHint')) }),
|
|
839
|
-
_jsx(Section, { title: _('hospitality_core.room.section.floors'), description: _('hospitality_core.room.section.floorsHint'), body: data.floors.length
|
|
840
|
-
? dataTable(_, {
|
|
841
|
-
columns: floorColumns(_),
|
|
842
|
-
rows: data.floors,
|
|
843
|
-
id: (row) => row.id,
|
|
844
|
-
rowHref: (row) => `/admin/hospitality/levels/${encodeURIComponent(row.id)}?lang=${encodeURIComponent(locale)}`,
|
|
845
|
-
})
|
|
846
|
-
: emptyState(_('hospitality_core.room.empty.floors'), _('hospitality_core.room.empty.floorsHint')) }),
|
|
847
|
-
]
|
|
848
|
-
: []),
|
|
849
|
-
_jsx(Section, { title: _('hospitality_core.room.section.rooms'), description: _('hospitality_core.room.section.roomsHint'), body: data.rows.length
|
|
850
|
-
? dataTable(_, {
|
|
851
|
-
columns: roomColumns(_),
|
|
852
|
-
rows: data.rows,
|
|
853
|
-
id: (row) => row.id,
|
|
854
|
-
rowHref: (row) => `/admin/hospitality/rooms/${encodeURIComponent(row.id)}?lang=${encodeURIComponent(locale)}`,
|
|
855
|
-
})
|
|
856
|
-
: emptyState(_('hospitality_core.screen.rooms.empty'), _('hospitality_core.screen.rooms.emptyHint')) }),
|
|
857
|
-
]) }));
|
|
858
|
-
};
|
|
859
|
-
const locationFeedback = (_, resource, status, errors = []) => {
|
|
860
|
-
if (status === 'saved' || status === 'archived' || status === 'restored')
|
|
861
|
-
return notice({
|
|
862
|
-
title: _(`hospitality_core.${resource}.feedback.${status}`),
|
|
863
|
-
message: _(`hospitality_core.${resource}.feedback.${status}Hint`),
|
|
864
|
-
tone: 'positive',
|
|
865
|
-
});
|
|
866
|
-
if (errors.length)
|
|
867
|
-
return notice({
|
|
868
|
-
title: _('hospitality_core.feedback.invalid'),
|
|
869
|
-
message: errors.join(' '),
|
|
870
|
-
tone: 'danger',
|
|
871
|
-
});
|
|
872
|
-
return null;
|
|
873
|
-
};
|
|
874
|
-
const buildingForm = (_, values, locale) => (_jsx(RecordForm, { action: `/admin/hospitality/buildings/${encodeURIComponent(values.id)}?lang=${encodeURIComponent(locale)}`, hidden: { propertyId: values.propertyId }, submit: _('hospitality_core.building.action.save'), submitVariant: "primary", fields: [
|
|
875
|
-
{
|
|
876
|
-
name: 'code',
|
|
877
|
-
label: _('hospitality_core.building.field.code'),
|
|
878
|
-
value: values.code,
|
|
879
|
-
required: true,
|
|
880
|
-
},
|
|
881
|
-
{
|
|
882
|
-
name: 'name',
|
|
883
|
-
label: _('hospitality_core.building.field.name'),
|
|
884
|
-
value: values.name,
|
|
885
|
-
required: true,
|
|
886
|
-
},
|
|
887
|
-
{
|
|
888
|
-
name: 'sequence',
|
|
889
|
-
label: _('hospitality_core.building.field.sequence'),
|
|
890
|
-
type: 'number',
|
|
891
|
-
value: values.sequence,
|
|
892
|
-
step: '1',
|
|
893
|
-
},
|
|
894
|
-
] }));
|
|
895
|
-
export const buildingDetailScreen = (_, building, values, locale, frame, status, errors = []) => {
|
|
896
|
-
const query = `lang=${encodeURIComponent(locale)}`;
|
|
897
|
-
const propertyName = building.property?.name ?? building.property?.code ?? building.propertyId;
|
|
898
|
-
const activeFloors = building.floors.filter((row) => row.active);
|
|
899
|
-
const activeRooms = building.rooms.filter((row) => row.active);
|
|
900
|
-
return (_jsx(Framed, { translator: _, title: building.name, frame: frame, body: stack([
|
|
901
|
-
locationFeedback(_, 'building', status, errors),
|
|
902
|
-
_jsx(RecordWorkspace, { kicker: _('hospitality_core.building.detail.kicker'), title: building.name, subtitle: `${building.code} · ${propertyName}`, imageFallback: icon('hotel'), badges: [
|
|
903
|
-
badge(_(building.active ? 'hospitality_core.value.active' : 'hospitality_core.value.inactive'), building.active ? 'positive' : 'neutral'),
|
|
904
|
-
], summary: [
|
|
905
|
-
{
|
|
906
|
-
id: 'floors',
|
|
907
|
-
label: _('hospitality_core.room.metric.floors'),
|
|
908
|
-
value: activeFloors.length,
|
|
909
|
-
},
|
|
910
|
-
{ id: 'rooms', label: _('hospitality_core.metric.rooms'), value: activeRooms.length },
|
|
911
|
-
{
|
|
912
|
-
id: 'sequence',
|
|
913
|
-
label: _('hospitality_core.building.field.sequence'),
|
|
914
|
-
value: building.sequence,
|
|
915
|
-
},
|
|
916
|
-
], navigation: linkButton({
|
|
917
|
-
label: _('hospitality_core.building.action.back'),
|
|
918
|
-
href: `/admin/hospitality/rooms?property=${encodeURIComponent(building.propertyId)}&${query}`,
|
|
919
|
-
variant: 'tertiary',
|
|
920
|
-
icon: 'chevron-left',
|
|
921
|
-
}), body: stack([
|
|
922
|
-
_jsx(Section, { title: _('hospitality_core.building.section.information'), description: _('hospitality_core.building.section.informationHint'), body: definitionList({
|
|
923
|
-
title: building.name,
|
|
924
|
-
items: [
|
|
925
|
-
{
|
|
926
|
-
key: 'property',
|
|
927
|
-
term: _('hospitality_core.building.field.property'),
|
|
928
|
-
value: propertyName,
|
|
929
|
-
},
|
|
930
|
-
{ key: 'code', term: _('hospitality_core.building.field.code'), value: building.code },
|
|
931
|
-
{
|
|
932
|
-
key: 'status',
|
|
933
|
-
term: _('hospitality_core.col.status'),
|
|
934
|
-
value: _(building.active ? 'hospitality_core.value.active' : 'hospitality_core.value.inactive'),
|
|
935
|
-
},
|
|
936
|
-
],
|
|
937
|
-
}) }),
|
|
938
|
-
_jsx(Section, { title: _('hospitality_core.building.section.settings'), description: _('hospitality_core.building.section.settingsHint'), body: buildingForm(_, values, locale) }),
|
|
939
|
-
_jsx(Section, { title: _('hospitality_core.building.section.floors'), description: _('hospitality_core.building.section.floorsHint'), body: building.floors.length
|
|
940
|
-
? dataTable(_, {
|
|
941
|
-
columns: floorColumns(_),
|
|
942
|
-
rows: building.floors,
|
|
943
|
-
id: (row) => row.id,
|
|
944
|
-
rowHref: (row) => `/admin/hospitality/levels/${encodeURIComponent(row.id)}?lang=${encodeURIComponent(locale)}`,
|
|
945
|
-
})
|
|
946
|
-
: emptyState(_('hospitality_core.building.empty.floors'), _('hospitality_core.building.empty.floorsHint')) }),
|
|
947
|
-
_jsx(Section, { title: _('hospitality_core.building.section.lifecycle'), description: _('hospitality_core.building.section.lifecycleHint'), body: _jsx(Surface, { body: recordActions({
|
|
948
|
-
action: `/admin/hospitality/buildings/${encodeURIComponent(building.id)}/archive?${query}`,
|
|
949
|
-
actions: [
|
|
950
|
-
building.active
|
|
951
|
-
? {
|
|
952
|
-
value: 'archive',
|
|
953
|
-
label: _('hospitality_core.building.action.archive'),
|
|
954
|
-
variant: 'destructive',
|
|
955
|
-
}
|
|
956
|
-
: {
|
|
957
|
-
value: 'restore',
|
|
958
|
-
label: _('hospitality_core.building.action.restore'),
|
|
959
|
-
variant: 'secondary',
|
|
960
|
-
},
|
|
961
|
-
],
|
|
962
|
-
}) }) }),
|
|
963
|
-
]) }),
|
|
964
|
-
]) }));
|
|
965
|
-
};
|
|
966
|
-
const floorForm = (_, values, locale) => (_jsx(RecordForm, { action: `/admin/hospitality/levels/${encodeURIComponent(values.id)}?lang=${encodeURIComponent(locale)}`, hidden: { propertyId: values.propertyId, buildingId: values.buildingId }, submit: _('hospitality_core.floor.action.save'), submitVariant: "primary", fields: [
|
|
967
|
-
{
|
|
968
|
-
name: 'code',
|
|
969
|
-
label: _('hospitality_core.floor.field.code'),
|
|
970
|
-
value: values.code,
|
|
971
|
-
required: true,
|
|
972
|
-
},
|
|
973
|
-
{
|
|
974
|
-
name: 'name',
|
|
975
|
-
label: _('hospitality_core.floor.field.name'),
|
|
976
|
-
value: values.name,
|
|
977
|
-
required: true,
|
|
978
|
-
},
|
|
979
|
-
{
|
|
980
|
-
name: 'sequence',
|
|
981
|
-
label: _('hospitality_core.floor.field.sequence'),
|
|
982
|
-
type: 'number',
|
|
983
|
-
value: values.sequence,
|
|
984
|
-
step: '1',
|
|
985
|
-
},
|
|
986
|
-
] }));
|
|
987
|
-
export const floorDetailScreen = (_, floor, values, locale, frame, status, errors = []) => {
|
|
988
|
-
const query = `lang=${encodeURIComponent(locale)}`;
|
|
989
|
-
const propertyName = floor.property?.name ?? floor.property?.code ?? floor.propertyId;
|
|
990
|
-
const buildingName = floor.building?.name ?? floor.building?.code ?? floor.buildingId;
|
|
991
|
-
const activeRooms = floor.rooms.filter((row) => row.active);
|
|
992
|
-
return (_jsx(Framed, { translator: _, title: floor.name, frame: frame, body: stack([
|
|
993
|
-
locationFeedback(_, 'floor', status, errors),
|
|
994
|
-
_jsx(RecordWorkspace, { kicker: _('hospitality_core.floor.detail.kicker'), title: floor.name, subtitle: `${floor.code} · ${buildingName}`, imageFallback: icon('hotel'), badges: [
|
|
995
|
-
badge(_(floor.active ? 'hospitality_core.value.active' : 'hospitality_core.value.inactive'), floor.active ? 'positive' : 'neutral'),
|
|
996
|
-
], summary: [
|
|
997
|
-
{ id: 'rooms', label: _('hospitality_core.metric.rooms'), value: activeRooms.length },
|
|
998
|
-
{
|
|
999
|
-
id: 'building',
|
|
1000
|
-
label: _('hospitality_core.floor.field.building'),
|
|
1001
|
-
value: buildingName,
|
|
1002
|
-
},
|
|
1003
|
-
{
|
|
1004
|
-
id: 'sequence',
|
|
1005
|
-
label: _('hospitality_core.floor.field.sequence'),
|
|
1006
|
-
value: floor.sequence,
|
|
1007
|
-
},
|
|
1008
|
-
], navigation: linkButton({
|
|
1009
|
-
label: _('hospitality_core.floor.action.back'),
|
|
1010
|
-
href: `/admin/hospitality/buildings/${encodeURIComponent(floor.buildingId)}?${query}`,
|
|
1011
|
-
variant: 'tertiary',
|
|
1012
|
-
icon: 'chevron-left',
|
|
1013
|
-
}), body: stack([
|
|
1014
|
-
_jsx(Section, { title: _('hospitality_core.floor.section.information'), description: _('hospitality_core.floor.section.informationHint'), body: definitionList({
|
|
1015
|
-
title: floor.name,
|
|
1016
|
-
items: [
|
|
1017
|
-
{ key: 'property', term: _('hospitality_core.floor.field.property'), value: propertyName },
|
|
1018
|
-
{ key: 'building', term: _('hospitality_core.floor.field.building'), value: buildingName },
|
|
1019
|
-
{ key: 'code', term: _('hospitality_core.floor.field.code'), value: floor.code },
|
|
1020
|
-
{
|
|
1021
|
-
key: 'status',
|
|
1022
|
-
term: _('hospitality_core.col.status'),
|
|
1023
|
-
value: _(floor.active ? 'hospitality_core.value.active' : 'hospitality_core.value.inactive'),
|
|
1024
|
-
},
|
|
1025
|
-
],
|
|
1026
|
-
}) }),
|
|
1027
|
-
_jsx(Section, { title: _('hospitality_core.floor.section.settings'), description: _('hospitality_core.floor.section.settingsHint'), body: floorForm(_, values, locale) }),
|
|
1028
|
-
_jsx(Section, { title: _('hospitality_core.floor.section.rooms'), description: _('hospitality_core.floor.section.roomsHint'), body: floor.rooms.length
|
|
1029
|
-
? dataTable(_, {
|
|
1030
|
-
columns: roomColumns(_),
|
|
1031
|
-
rows: floor.rooms,
|
|
1032
|
-
id: (row) => row.id,
|
|
1033
|
-
rowHref: (row) => `/admin/hospitality/rooms/${encodeURIComponent(row.id)}?lang=${encodeURIComponent(locale)}`,
|
|
1034
|
-
})
|
|
1035
|
-
: emptyState(_('hospitality_core.floor.empty.rooms'), _('hospitality_core.floor.empty.roomsHint')) }),
|
|
1036
|
-
_jsx(Section, { title: _('hospitality_core.floor.section.lifecycle'), description: _('hospitality_core.floor.section.lifecycleHint'), body: _jsx(Surface, { body: recordActions({
|
|
1037
|
-
action: `/admin/hospitality/levels/${encodeURIComponent(floor.id)}/archive?${query}`,
|
|
1038
|
-
actions: [
|
|
1039
|
-
floor.active
|
|
1040
|
-
? {
|
|
1041
|
-
value: 'archive',
|
|
1042
|
-
label: _('hospitality_core.floor.action.archive'),
|
|
1043
|
-
variant: 'destructive',
|
|
1044
|
-
}
|
|
1045
|
-
: {
|
|
1046
|
-
value: 'restore',
|
|
1047
|
-
label: _('hospitality_core.floor.action.restore'),
|
|
1048
|
-
variant: 'secondary',
|
|
1049
|
-
},
|
|
1050
|
-
],
|
|
1051
|
-
}) }) }),
|
|
1052
|
-
]) }),
|
|
1053
|
-
]) }));
|
|
1054
|
-
};
|
|
1055
|
-
export const newRoomScreen = (_, values, properties, roomTypes, buildings, floors, locale, frame, errors = []) => (_jsx(Framed, { translator: _, title: _('hospitality_core.room.create.title'), frame: frame, body: stack([
|
|
1056
|
-
roomFeedback(_, null, errors),
|
|
1057
|
-
_jsx(Section, { title: _('hospitality_core.room.create.title'), description: _('hospitality_core.room.create.hint'), body: roomForm(_, values, properties, roomTypes, buildings, floors, locale, `/admin/hospitality/rooms/new?lang=${encodeURIComponent(locale)}`, _('hospitality_core.room.action.create'), `/admin/hospitality/rooms?property=${encodeURIComponent(values.propertyId)}&lang=${encodeURIComponent(locale)}`) }),
|
|
1058
|
-
]) }));
|
|
1059
|
-
export const roomDetailScreen = (_, room, values, properties, roomTypes, buildings, floors, locale, frame, status, errors = []) => {
|
|
1060
|
-
const query = `lang=${encodeURIComponent(locale)}`;
|
|
1061
|
-
const propertyName = room.property?.name ?? room.property?.code ?? room.propertyId;
|
|
1062
|
-
const location = [room.building?.name ?? room.building?.code, room.floor?.name ?? room.floor?.code]
|
|
1063
|
-
.filter(Boolean)
|
|
1064
|
-
.join(' · ');
|
|
1065
|
-
return (_jsx(Framed, { translator: _, title: room.name, frame: frame, body: stack([
|
|
1066
|
-
roomFeedback(_, status, errors),
|
|
1067
|
-
_jsx(RecordWorkspace, { kicker: _('hospitality_core.room.detail.kicker'), title: room.name, subtitle: `${room.code} · ${propertyName}`, imageFallback: icon('hotel'), badges: [
|
|
1068
|
-
badge(_(`hospitality_core.roomStatus.${room.status}`), statusTone(room.status), room.status),
|
|
1069
|
-
badge(_(room.active ? 'hospitality_core.value.active' : 'hospitality_core.value.inactive'), room.active ? 'positive' : 'neutral'),
|
|
1070
|
-
], summary: [
|
|
1071
|
-
{ id: 'capacity', label: _('hospitality_core.col.capacity'), value: room.capacity },
|
|
1072
|
-
{
|
|
1073
|
-
id: 'roomType',
|
|
1074
|
-
label: _('hospitality_core.col.roomType'),
|
|
1075
|
-
value: room.roomType?.name ?? room.roomType?.code ?? room.roomTypeId,
|
|
1076
|
-
},
|
|
1077
|
-
{
|
|
1078
|
-
id: 'location',
|
|
1079
|
-
label: _('hospitality_core.col.location'),
|
|
1080
|
-
value: location || _('hospitality_core.room.value.unassignedLocation'),
|
|
1081
|
-
},
|
|
1082
|
-
], navigation: linkButton({
|
|
1083
|
-
label: _('hospitality_core.room.action.back'),
|
|
1084
|
-
href: `/admin/hospitality/rooms?property=${encodeURIComponent(room.propertyId)}&${query}`,
|
|
1085
|
-
variant: 'tertiary',
|
|
1086
|
-
icon: 'chevron-left',
|
|
1087
|
-
}), body: stack([
|
|
1088
|
-
_jsx(Section, { title: _('hospitality_core.room.section.information'), description: _('hospitality_core.room.section.informationHint'), body: definitionList({
|
|
1089
|
-
title: room.name,
|
|
1090
|
-
items: [
|
|
1091
|
-
{ key: 'property', term: _('hospitality_core.room.field.property'), value: propertyName },
|
|
1092
|
-
{
|
|
1093
|
-
key: 'type',
|
|
1094
|
-
term: _('hospitality_core.room.field.roomType'),
|
|
1095
|
-
value: room.roomType?.name ?? room.roomType?.code ?? room.roomTypeId,
|
|
1096
|
-
},
|
|
1097
|
-
{
|
|
1098
|
-
key: 'location',
|
|
1099
|
-
term: _('hospitality_core.col.location'),
|
|
1100
|
-
value: location || _('hospitality_core.room.value.unassignedLocation'),
|
|
1101
|
-
},
|
|
1102
|
-
{
|
|
1103
|
-
key: 'status',
|
|
1104
|
-
term: _('hospitality_core.col.status'),
|
|
1105
|
-
value: _(`hospitality_core.roomStatus.${room.status}`),
|
|
1106
|
-
},
|
|
1107
|
-
],
|
|
1108
|
-
}) }),
|
|
1109
|
-
_jsx(Section, { title: _('hospitality_core.room.section.settings'), description: _('hospitality_core.room.section.settingsHint'), body: roomForm(_, values, properties, roomTypes, buildings, floors, locale, `/admin/hospitality/rooms/${encodeURIComponent(room.id)}?${query}`, _('hospitality_core.room.action.save'), `/admin/hospitality/rooms?property=${encodeURIComponent(room.propertyId)}&${query}`) }),
|
|
1110
|
-
_jsx(Section, { title: _('hospitality_core.room.section.lifecycle'), description: _('hospitality_core.room.section.lifecycleHint'), body: stack([
|
|
1111
|
-
linkButton({
|
|
1112
|
-
label: _('hospitality_core.room.action.openHousekeeping'),
|
|
1113
|
-
href: `/admin/hospitality/housekeeping/rooms/${encodeURIComponent(room.id)}?${query}`,
|
|
1114
|
-
variant: 'secondary',
|
|
1115
|
-
}),
|
|
1116
|
-
_jsx(Surface, { body: recordActions({
|
|
1117
|
-
action: `/admin/hospitality/rooms/${encodeURIComponent(room.id)}/archive?${query}`,
|
|
1118
|
-
actions: [
|
|
1119
|
-
room.active
|
|
1120
|
-
? {
|
|
1121
|
-
value: 'archive',
|
|
1122
|
-
label: _('hospitality_core.room.action.archive'),
|
|
1123
|
-
variant: 'destructive',
|
|
1124
|
-
}
|
|
1125
|
-
: {
|
|
1126
|
-
value: 'restore',
|
|
1127
|
-
label: _('hospitality_core.room.action.restore'),
|
|
1128
|
-
variant: 'secondary',
|
|
1129
|
-
},
|
|
1130
|
-
],
|
|
1131
|
-
}) }),
|
|
1132
|
-
]) }),
|
|
1133
|
-
]) }),
|
|
1134
|
-
]) }));
|
|
1135
|
-
};
|
|
1136
|
-
export const cleaningTasksScreen = (_, data, locale, timezone, frame, status) => {
|
|
1137
|
-
const visibleRows = data.state === 'all' ? data.rows : data.rows.filter((row) => row.state === data.state);
|
|
1138
|
-
const query = new URLSearchParams({ lang: locale });
|
|
1139
|
-
if (data.propertyId)
|
|
1140
|
-
query.set('property', data.propertyId);
|
|
1141
|
-
if (data.state !== 'all')
|
|
1142
|
-
query.set('state', data.state);
|
|
1143
|
-
const action = `/admin/hospitality/housekeeping?${query.toString()}`;
|
|
1144
|
-
const feedback = status === 'created'
|
|
1145
|
-
? notice({
|
|
1146
|
-
title: _('hospitality_core.housekeeping.feedback.created'),
|
|
1147
|
-
message: _('hospitality_core.housekeeping.feedback.createdHint'),
|
|
1148
|
-
tone: 'positive',
|
|
1149
|
-
})
|
|
1150
|
-
: status === 'invalid'
|
|
1151
|
-
? notice({
|
|
1152
|
-
title: _('hospitality_core.feedback.invalid'),
|
|
1153
|
-
message: _('hospitality_core.housekeeping.feedback.invalidHint'),
|
|
1154
|
-
tone: 'danger',
|
|
1155
|
-
})
|
|
1156
|
-
: null;
|
|
1157
|
-
return (_jsx(Framed, { translator: _, title: _('hospitality_core.screen.cleaningTasks.title'), frame: frame, body: stack([
|
|
1158
|
-
feedback,
|
|
1159
|
-
_jsx(RecordForm, { action: "/admin/hospitality/housekeeping", method: "get", layout: "inline", submit: _('hospitality_core.action.select'), submitVariant: "secondary", hidden: { lang: locale }, fields: [
|
|
1160
|
-
{
|
|
1161
|
-
name: 'property',
|
|
1162
|
-
label: _('hospitality_core.menu.properties'),
|
|
1163
|
-
type: 'select',
|
|
1164
|
-
value: data.propertyId,
|
|
1165
|
-
required: true,
|
|
1166
|
-
options: choices(data.properties),
|
|
1167
|
-
},
|
|
1168
|
-
{
|
|
1169
|
-
name: 'state',
|
|
1170
|
-
label: _('hospitality_core.col.status'),
|
|
1171
|
-
type: 'select',
|
|
1172
|
-
value: data.state,
|
|
1173
|
-
options: ['all', 'todo', 'in_progress', 'done', 'cancelled'].map((value) => ({
|
|
1174
|
-
value,
|
|
1175
|
-
label: _(`hospitality_core.cleaningState.${value}`),
|
|
1176
|
-
})),
|
|
1177
|
-
},
|
|
1178
|
-
] }),
|
|
1179
|
-
cardGrid({
|
|
1180
|
-
items: ['todo', 'in_progress', 'done'].map((state) => ({
|
|
1181
|
-
state,
|
|
1182
|
-
count: state === 'todo'
|
|
1183
|
-
? data.summary.todo
|
|
1184
|
-
: state === 'in_progress'
|
|
1185
|
-
? data.summary.inProgress
|
|
1186
|
-
: data.summary.done,
|
|
1187
|
-
})),
|
|
1188
|
-
id: (item) => item.state,
|
|
1189
|
-
card: (item) => metric({
|
|
1190
|
-
label: _(`hospitality_core.cleaningState.${item.state}`),
|
|
1191
|
-
value: String(item.count),
|
|
1192
|
-
tone: item.state,
|
|
1193
|
-
}),
|
|
1194
|
-
}),
|
|
1195
|
-
_jsx(Section, { title: _('hospitality_core.housekeeping.section.create'), description: _('hospitality_core.housekeeping.section.createHint'), body: data.rooms.length ? (_jsx(RecordForm, { action: action, method: "post", submit: _('hospitality_core.housekeeping.action.create'), submitVariant: "secondary", hidden: {
|
|
1196
|
-
operation: 'create',
|
|
1197
|
-
lang: locale,
|
|
1198
|
-
id: data.id,
|
|
1199
|
-
code: data.code,
|
|
1200
|
-
propertyId: data.propertyId ?? '',
|
|
1201
|
-
state: data.state,
|
|
1202
|
-
}, fields: [
|
|
1203
|
-
{
|
|
1204
|
-
name: 'roomId',
|
|
1205
|
-
label: _('hospitality_core.col.room'),
|
|
1206
|
-
type: 'select',
|
|
1207
|
-
value: data.selectedRoomId,
|
|
1208
|
-
required: true,
|
|
1209
|
-
options: data.rooms.map((room) => ({
|
|
1210
|
-
value: room.id,
|
|
1211
|
-
label: `${room.code} · ${room.name} · ${_(`hospitality_core.roomStatus.${room.status}`)}`,
|
|
1212
|
-
})),
|
|
1213
|
-
},
|
|
1214
|
-
{
|
|
1215
|
-
name: 'taskType',
|
|
1216
|
-
label: _('hospitality_core.col.type'),
|
|
1217
|
-
type: 'select',
|
|
1218
|
-
value: 'daily_clean',
|
|
1219
|
-
required: true,
|
|
1220
|
-
options: ['checkout_clean', 'daily_clean', 'maintenance', 'inspection'].map((value) => ({
|
|
1221
|
-
value,
|
|
1222
|
-
label: _(`hospitality_core.cleaningType.${value}`),
|
|
1223
|
-
})),
|
|
1224
|
-
},
|
|
1225
|
-
{
|
|
1226
|
-
name: 'priority',
|
|
1227
|
-
label: _('hospitality_core.col.priority'),
|
|
1228
|
-
type: 'select',
|
|
1229
|
-
value: 'normal',
|
|
1230
|
-
required: true,
|
|
1231
|
-
options: ['normal', 'urgent'].map((value) => ({
|
|
1232
|
-
value,
|
|
1233
|
-
label: _(`hospitality_core.cleaningPriority.${value}`),
|
|
1234
|
-
})),
|
|
1235
|
-
},
|
|
1236
|
-
{
|
|
1237
|
-
name: 'assigneeId',
|
|
1238
|
-
label: _('hospitality_core.col.assignee'),
|
|
1239
|
-
help: _('hospitality_core.housekeeping.field.assigneeHint'),
|
|
1240
|
-
},
|
|
1241
|
-
{
|
|
1242
|
-
name: 'notes',
|
|
1243
|
-
label: _('hospitality_core.housekeeping.field.notes'),
|
|
1244
|
-
type: 'textarea',
|
|
1245
|
-
span: 'full',
|
|
1246
|
-
},
|
|
1247
|
-
] })) : (emptyState(_('hospitality_core.housekeeping.empty.rooms'), _('hospitality_core.housekeeping.empty.roomsHint'))) }),
|
|
1248
|
-
_jsx(Section, { title: _('hospitality_core.housekeeping.section.queue'), description: _('hospitality_core.housekeeping.section.queueHint'), body: visibleRows.length
|
|
1249
|
-
? dataTable(_, {
|
|
1250
|
-
columns: cleaningTaskColumns(_, locale, timezone),
|
|
1251
|
-
rows: visibleRows,
|
|
1252
|
-
id: (row) => row.id,
|
|
1253
|
-
rowHref: (row) => `/admin/hospitality/housekeeping/tasks/${encodeURIComponent(row.id)}?lang=${encodeURIComponent(locale)}`,
|
|
1254
|
-
})
|
|
1255
|
-
: emptyState(_('hospitality_core.screen.cleaningTasks.empty'), _('hospitality_core.screen.cleaningTasks.emptyHint')) }),
|
|
1256
|
-
]) }));
|
|
1257
|
-
};
|
|
1258
|
-
const cleaningTaskFeedback = (_, status, errors = []) => {
|
|
1259
|
-
if (status === 'started' || status === 'completed' || status === 'cancelled')
|
|
1260
|
-
return notice({
|
|
1261
|
-
title: _(`hospitality_core.housekeeping.feedback.${status}`),
|
|
1262
|
-
message: _(`hospitality_core.housekeeping.feedback.${status}Hint`),
|
|
1263
|
-
tone: status === 'cancelled' ? 'warning' : 'positive',
|
|
1264
|
-
});
|
|
1265
|
-
if (errors.length)
|
|
1266
|
-
return notice({
|
|
1267
|
-
title: _('hospitality_core.feedback.invalid'),
|
|
1268
|
-
message: errors.join(' '),
|
|
1269
|
-
tone: 'danger',
|
|
1270
|
-
});
|
|
1271
|
-
return null;
|
|
1272
|
-
};
|
|
1273
|
-
export const cleaningTaskDetailScreen = (_, task, locale, timezone, frame, status, errors = []) => {
|
|
1274
|
-
const action = `/admin/hospitality/housekeeping/tasks/${encodeURIComponent(task.id)}?lang=${encodeURIComponent(locale)}`;
|
|
1275
|
-
const room = task.room?.name ?? task.room?.code ?? task.roomId;
|
|
1276
|
-
const actions = [];
|
|
1277
|
-
if (task.state === 'todo')
|
|
1278
|
-
actions.push(_jsx(Section, { title: _('hospitality_core.housekeeping.action.start'), description: _('hospitality_core.housekeeping.action.startHint'), body: _jsx(RecordForm, { action: action, method: "post", submit: _('hospitality_core.housekeeping.action.start'), submitVariant: "primary", hidden: { operation: 'start', lang: locale }, fields: [
|
|
1279
|
-
{
|
|
1280
|
-
name: 'assigneeId',
|
|
1281
|
-
label: _('hospitality_core.col.assignee'),
|
|
1282
|
-
value: task.assigneeId,
|
|
1283
|
-
help: _('hospitality_core.housekeeping.field.assigneeHint'),
|
|
1284
|
-
},
|
|
1285
|
-
] }) }));
|
|
1286
|
-
if (task.state === 'in_progress')
|
|
1287
|
-
actions.push(_jsx(Section, { title: _('hospitality_core.housekeeping.action.complete'), description: _('hospitality_core.housekeeping.action.completeHint'), body: _jsx(RecordForm, { action: action, method: "post", submit: _('hospitality_core.housekeeping.action.complete'), submitVariant: "primary", hidden: { operation: 'complete', lang: locale }, fields: [] }) }));
|
|
1288
|
-
if (task.state === 'todo' || task.state === 'in_progress')
|
|
1289
|
-
actions.push(_jsx(Section, { title: _('hospitality_core.housekeeping.action.cancel'), description: _('hospitality_core.housekeeping.action.cancelHint'), body: _jsx(RecordForm, { action: action, method: "post", submit: _('hospitality_core.housekeeping.action.cancel'), submitVariant: "destructive", hidden: { operation: 'cancel', lang: locale }, fields: [] }) }));
|
|
1290
|
-
return (_jsx(Framed, { translator: _, title: _('hospitality_core.housekeeping.detail.title', { code: task.code }), frame: frame, body: stack([
|
|
1291
|
-
cleaningTaskFeedback(_, status, errors),
|
|
1292
|
-
_jsx(RecordWorkspace, { kicker: _('hospitality_core.housekeeping.detail.kicker'), title: task.code, subtitle: room, imageFallback: icon('check-circle'), badges: [
|
|
1293
|
-
badge(_(`hospitality_core.cleaningState.${task.state}`), cleaningTone(task.state), task.state),
|
|
1294
|
-
badge(_(`hospitality_core.cleaningPriority.${task.priority}`), task.priority === 'urgent' ? 'danger' : 'neutral'),
|
|
1295
|
-
], summary: [
|
|
1296
|
-
{
|
|
1297
|
-
id: 'room',
|
|
1298
|
-
label: _('hospitality_core.col.room'),
|
|
1299
|
-
value: room,
|
|
1300
|
-
},
|
|
1301
|
-
{
|
|
1302
|
-
id: 'type',
|
|
1303
|
-
label: _('hospitality_core.col.type'),
|
|
1304
|
-
value: _(`hospitality_core.cleaningType.${task.taskType}`),
|
|
1305
|
-
},
|
|
1306
|
-
{
|
|
1307
|
-
id: 'assignee',
|
|
1308
|
-
label: _('hospitality_core.col.assignee'),
|
|
1309
|
-
value: task.assigneeId || '—',
|
|
1310
|
-
},
|
|
1311
|
-
], navigation: linkButton({
|
|
1312
|
-
label: _('hospitality_core.housekeeping.action.back'),
|
|
1313
|
-
href: `/admin/hospitality/housekeeping?property=${encodeURIComponent(task.propertyId)}&lang=${encodeURIComponent(locale)}`,
|
|
1314
|
-
variant: 'tertiary',
|
|
1315
|
-
icon: 'chevron-left',
|
|
1316
|
-
}), body: stack([
|
|
1317
|
-
_jsx(Section, { title: _('hospitality_core.housekeeping.section.information'), description: _('hospitality_core.housekeeping.section.informationHint'), body: definitionList({
|
|
1318
|
-
title: task.code,
|
|
1319
|
-
items: [
|
|
1320
|
-
{
|
|
1321
|
-
key: 'property',
|
|
1322
|
-
term: _('hospitality_core.menu.properties'),
|
|
1323
|
-
value: task.property?.name ?? task.property?.code ?? task.propertyId,
|
|
1324
|
-
},
|
|
1325
|
-
{
|
|
1326
|
-
key: 'room',
|
|
1327
|
-
term: _('hospitality_core.col.room'),
|
|
1328
|
-
value: room,
|
|
1329
|
-
},
|
|
1330
|
-
{
|
|
1331
|
-
key: 'requested',
|
|
1332
|
-
term: _('hospitality_core.col.requestedAt'),
|
|
1333
|
-
value: dateTime(task.requestedAt, locale, timezone),
|
|
1334
|
-
},
|
|
1335
|
-
...(task.startedAt
|
|
1336
|
-
? [
|
|
1337
|
-
{
|
|
1338
|
-
key: 'started',
|
|
1339
|
-
term: _('hospitality_core.housekeeping.field.startedAt'),
|
|
1340
|
-
value: dateTime(task.startedAt, locale, timezone),
|
|
1341
|
-
},
|
|
1342
|
-
]
|
|
1343
|
-
: []),
|
|
1344
|
-
...(task.doneAt
|
|
1345
|
-
? [
|
|
1346
|
-
{
|
|
1347
|
-
key: 'done',
|
|
1348
|
-
term: _('hospitality_core.housekeeping.field.doneAt'),
|
|
1349
|
-
value: dateTime(task.doneAt, locale, timezone),
|
|
1350
|
-
},
|
|
1351
|
-
]
|
|
1352
|
-
: []),
|
|
1353
|
-
...(task.stayId
|
|
1354
|
-
? [
|
|
1355
|
-
{
|
|
1356
|
-
key: 'stay',
|
|
1357
|
-
term: _('hospitality_core.menu.stays'),
|
|
1358
|
-
value: task.stay?.code ?? task.stayId,
|
|
1359
|
-
},
|
|
1360
|
-
]
|
|
1361
|
-
: []),
|
|
1362
|
-
...(task.notes
|
|
1363
|
-
? [
|
|
1364
|
-
{
|
|
1365
|
-
key: 'notes',
|
|
1366
|
-
term: _('hospitality_core.housekeeping.field.notes'),
|
|
1367
|
-
value: task.notes,
|
|
1368
|
-
},
|
|
1369
|
-
]
|
|
1370
|
-
: []),
|
|
1371
|
-
],
|
|
1372
|
-
}) }),
|
|
1373
|
-
...actions,
|
|
1374
|
-
]) }),
|
|
1375
|
-
]) }));
|
|
1376
|
-
};
|
|
1377
|
-
const housekeepingRoomColumns = (_) => [
|
|
1378
|
-
{ key: 'code', label: _('hospitality_core.col.code'), cell: (row) => code(row.code), kind: 'identifier' },
|
|
1379
|
-
{ key: 'name', label: _('hospitality_core.col.name'), cell: (row) => row.name, priority: 'primary' },
|
|
1380
|
-
{
|
|
1381
|
-
key: 'status',
|
|
1382
|
-
label: _('hospitality_core.col.status'),
|
|
1383
|
-
cell: (row) => badge(_(`hospitality_core.roomStatus.${row.status}`), statusTone(row.status), row.status),
|
|
1384
|
-
kind: 'status',
|
|
1385
|
-
priority: 'primary',
|
|
1386
|
-
},
|
|
1387
|
-
{
|
|
1388
|
-
key: 'roomType',
|
|
1389
|
-
label: _('hospitality_core.col.roomType'),
|
|
1390
|
-
cell: (row) => row.roomType?.name ?? row.roomType?.code ?? code(row.roomTypeId),
|
|
1391
|
-
},
|
|
1392
|
-
{
|
|
1393
|
-
key: 'location',
|
|
1394
|
-
label: _('hospitality_core.col.location'),
|
|
1395
|
-
cell: (row) => [row.building?.name ?? row.building?.code, row.floor?.name ?? row.floor?.code]
|
|
1396
|
-
.filter(Boolean)
|
|
1397
|
-
.join(' · ') || '—',
|
|
1398
|
-
},
|
|
1399
|
-
{
|
|
1400
|
-
key: 'note',
|
|
1401
|
-
label: _('hospitality_core.housekeeping.field.notes'),
|
|
1402
|
-
cell: (row) => row.note || '—',
|
|
1403
|
-
},
|
|
1404
|
-
];
|
|
1405
|
-
export const housekeepingRoomsScreen = (_, data, locale, frame) => {
|
|
1406
|
-
const total = data.summary.available +
|
|
1407
|
-
data.summary.occupied +
|
|
1408
|
-
data.summary.dirty +
|
|
1409
|
-
data.summary.cleaning +
|
|
1410
|
-
data.summary.maintenance +
|
|
1411
|
-
data.summary.outOfOrder;
|
|
1412
|
-
const attention = data.summary.dirty + data.summary.cleaning + data.summary.maintenance + data.summary.outOfOrder;
|
|
1413
|
-
const metrics = [
|
|
1414
|
-
{ id: 'rooms', value: total },
|
|
1415
|
-
{ id: 'available', value: data.summary.available },
|
|
1416
|
-
{ id: 'occupied', value: data.summary.occupied },
|
|
1417
|
-
{ id: 'attention', value: attention },
|
|
1418
|
-
];
|
|
1419
|
-
return (_jsx(Framed, { translator: _, title: _('hospitality_core.screen.housekeepingRooms.title'), frame: frame, body: stack([
|
|
1420
|
-
_jsx(RecordForm, { action: "/admin/hospitality/housekeeping/rooms", method: "get", layout: "inline", submit: _('hospitality_core.action.select'), submitVariant: "secondary", hidden: { lang: locale }, fields: [
|
|
1421
|
-
{
|
|
1422
|
-
name: 'property',
|
|
1423
|
-
label: _('hospitality_core.menu.properties'),
|
|
1424
|
-
type: 'select',
|
|
1425
|
-
value: data.propertyId,
|
|
1426
|
-
required: true,
|
|
1427
|
-
options: choices(data.properties),
|
|
1428
|
-
},
|
|
1429
|
-
{
|
|
1430
|
-
name: 'state',
|
|
1431
|
-
label: _('hospitality_core.col.status'),
|
|
1432
|
-
type: 'select',
|
|
1433
|
-
value: data.state,
|
|
1434
|
-
options: ['all', ...ROOM_STATUSES].map((value) => ({
|
|
1435
|
-
value,
|
|
1436
|
-
label: _(`hospitality_core.roomStatus.${value}`),
|
|
1437
|
-
})),
|
|
1438
|
-
},
|
|
1439
|
-
] }),
|
|
1440
|
-
cardGrid({
|
|
1441
|
-
items: metrics,
|
|
1442
|
-
id: (item) => item.id,
|
|
1443
|
-
card: (item) => metric({
|
|
1444
|
-
label: _(`hospitality_core.metric.${item.id}`),
|
|
1445
|
-
value: String(item.value),
|
|
1446
|
-
tone: item.id,
|
|
1447
|
-
}),
|
|
1448
|
-
}),
|
|
1449
|
-
_jsx(Section, { title: _('hospitality_core.housekeeping.rooms.section.board'), description: _('hospitality_core.housekeeping.rooms.section.boardHint'), body: data.rows.length
|
|
1450
|
-
? dataTable(_, {
|
|
1451
|
-
columns: housekeepingRoomColumns(_),
|
|
1452
|
-
rows: data.rows,
|
|
1453
|
-
id: (row) => row.id,
|
|
1454
|
-
rowHref: (row) => `/admin/hospitality/housekeeping/rooms/${encodeURIComponent(row.id)}?lang=${encodeURIComponent(locale)}`,
|
|
1455
|
-
})
|
|
1456
|
-
: emptyState(_('hospitality_core.screen.housekeepingRooms.empty'), _('hospitality_core.screen.housekeepingRooms.emptyHint')) }),
|
|
1457
|
-
]) }));
|
|
1458
|
-
};
|
|
1459
|
-
const housekeepingRoomFeedback = (_, status, errors = []) => {
|
|
1460
|
-
if (status === 'updated')
|
|
1461
|
-
return notice({
|
|
1462
|
-
title: _('hospitality_core.housekeeping.rooms.feedback.updated'),
|
|
1463
|
-
message: _('hospitality_core.housekeeping.rooms.feedback.updatedHint'),
|
|
1464
|
-
tone: 'positive',
|
|
1465
|
-
});
|
|
1466
|
-
if (errors.length)
|
|
1467
|
-
return notice({
|
|
1468
|
-
title: _('hospitality_core.feedback.invalid'),
|
|
1469
|
-
message: errors.join(' '),
|
|
1470
|
-
tone: 'danger',
|
|
1471
|
-
});
|
|
1472
|
-
return null;
|
|
1473
|
-
};
|
|
1474
|
-
export const housekeepingRoomDetailScreen = (_, room, tasks, locale, timezone, frame, status, errors = []) => {
|
|
1475
|
-
const action = `/admin/hospitality/housekeeping/rooms/${encodeURIComponent(room.id)}?lang=${encodeURIComponent(locale)}`;
|
|
1476
|
-
const taskQueue = `/admin/hospitality/housekeeping?property=${encodeURIComponent(room.propertyId)}&room=${encodeURIComponent(room.id)}&lang=${encodeURIComponent(locale)}`;
|
|
1477
|
-
const location = [room.building?.name ?? room.building?.code, room.floor?.name ?? room.floor?.code]
|
|
1478
|
-
.filter(Boolean)
|
|
1479
|
-
.join(' · ');
|
|
1480
|
-
const actions = [];
|
|
1481
|
-
if (room.status === 'available' || room.status === 'dirty')
|
|
1482
|
-
actions.push(_jsx(Section, { title: _('hospitality_core.housekeeping.rooms.section.service'), description: _('hospitality_core.housekeeping.rooms.section.serviceHint'), body: _jsx(RecordForm, { action: action, method: "post", submit: _('hospitality_core.housekeeping.rooms.action.takeOut'), submitVariant: "destructive", hidden: { operation: 'set-status', expectedStatus: room.status, lang: locale }, fields: [
|
|
1483
|
-
{
|
|
1484
|
-
name: 'status',
|
|
1485
|
-
label: _('hospitality_core.housekeeping.rooms.field.targetStatus'),
|
|
1486
|
-
type: 'select',
|
|
1487
|
-
value: 'maintenance',
|
|
1488
|
-
required: true,
|
|
1489
|
-
options: ['maintenance', 'out_of_order'].map((value) => ({
|
|
1490
|
-
value,
|
|
1491
|
-
label: _(`hospitality_core.roomStatus.${value}`),
|
|
1492
|
-
})),
|
|
1493
|
-
},
|
|
1494
|
-
{
|
|
1495
|
-
name: 'note',
|
|
1496
|
-
label: _('hospitality_core.housekeeping.rooms.field.reason'),
|
|
1497
|
-
type: 'textarea',
|
|
1498
|
-
required: true,
|
|
1499
|
-
span: 'full',
|
|
1500
|
-
},
|
|
1501
|
-
] }) }));
|
|
1502
|
-
if (room.status === 'maintenance' || room.status === 'out_of_order')
|
|
1503
|
-
actions.push(_jsx(Section, { title: _('hospitality_core.housekeeping.rooms.section.release'), description: _('hospitality_core.housekeeping.rooms.section.releaseHint'), body: _jsx(RecordForm, { action: action, method: "post", submit: _('hospitality_core.housekeeping.rooms.action.release'), submitVariant: "primary", hidden: {
|
|
1504
|
-
operation: 'set-status',
|
|
1505
|
-
expectedStatus: room.status,
|
|
1506
|
-
status: 'dirty',
|
|
1507
|
-
lang: locale,
|
|
1508
|
-
}, fields: [] }) }));
|
|
1509
|
-
const currentStay = room.currentStay;
|
|
1510
|
-
const guest = currentStay?.partner?.name;
|
|
1511
|
-
return (_jsx(Framed, { translator: _, title: _('hospitality_core.housekeeping.rooms.detail.title', { code: room.code }), frame: frame, body: stack([
|
|
1512
|
-
housekeepingRoomFeedback(_, status, errors),
|
|
1513
|
-
_jsx(RecordWorkspace, { kicker: _('hospitality_core.housekeeping.rooms.detail.kicker'), title: room.code, subtitle: room.name, imageFallback: icon('hotel'), badges: [
|
|
1514
|
-
badge(_(`hospitality_core.roomStatus.${room.status}`), statusTone(room.status), room.status),
|
|
1515
|
-
], summary: [
|
|
1516
|
-
{
|
|
1517
|
-
id: 'room-type',
|
|
1518
|
-
label: _('hospitality_core.col.roomType'),
|
|
1519
|
-
value: room.roomType?.name ?? room.roomType?.code ?? room.roomTypeId,
|
|
1520
|
-
},
|
|
1521
|
-
{
|
|
1522
|
-
id: 'capacity',
|
|
1523
|
-
label: _('hospitality_core.col.capacity'),
|
|
1524
|
-
value: room.capacity,
|
|
1525
|
-
},
|
|
1526
|
-
{
|
|
1527
|
-
id: 'tasks',
|
|
1528
|
-
label: _('hospitality_core.housekeeping.rooms.metric.openTasks'),
|
|
1529
|
-
value: tasks.filter((task) => task.state === 'todo' || task.state === 'in_progress').length,
|
|
1530
|
-
},
|
|
1531
|
-
], navigation: linkButton({
|
|
1532
|
-
label: _('hospitality_core.housekeeping.rooms.action.back'),
|
|
1533
|
-
href: `/admin/hospitality/housekeeping/rooms?property=${encodeURIComponent(room.propertyId)}&lang=${encodeURIComponent(locale)}`,
|
|
1534
|
-
variant: 'tertiary',
|
|
1535
|
-
icon: 'chevron-left',
|
|
1536
|
-
}), body: stack([
|
|
1537
|
-
_jsx(Section, { title: _('hospitality_core.housekeeping.rooms.section.information'), description: _('hospitality_core.housekeeping.rooms.section.informationHint'), body: stack([
|
|
1538
|
-
definitionList({
|
|
1539
|
-
title: room.name,
|
|
1540
|
-
items: [
|
|
1541
|
-
{
|
|
1542
|
-
key: 'property',
|
|
1543
|
-
term: _('hospitality_core.menu.properties'),
|
|
1544
|
-
value: room.property?.name ?? room.property?.code ?? room.propertyId,
|
|
1545
|
-
},
|
|
1546
|
-
{
|
|
1547
|
-
key: 'room-type',
|
|
1548
|
-
term: _('hospitality_core.col.roomType'),
|
|
1549
|
-
value: room.roomType?.name ?? room.roomType?.code ?? room.roomTypeId,
|
|
1550
|
-
},
|
|
1551
|
-
{
|
|
1552
|
-
key: 'location',
|
|
1553
|
-
term: _('hospitality_core.col.location'),
|
|
1554
|
-
value: location || '—',
|
|
1555
|
-
},
|
|
1556
|
-
{
|
|
1557
|
-
key: 'guest',
|
|
1558
|
-
term: _('hospitality_core.reservation.field.guest'),
|
|
1559
|
-
value: guest ?? '—',
|
|
1560
|
-
},
|
|
1561
|
-
{
|
|
1562
|
-
key: 'note',
|
|
1563
|
-
term: _('hospitality_core.housekeeping.field.notes'),
|
|
1564
|
-
value: room.note || '—',
|
|
1565
|
-
},
|
|
1566
|
-
],
|
|
1567
|
-
}),
|
|
1568
|
-
currentStay?.id
|
|
1569
|
-
? linkButton({
|
|
1570
|
-
label: _('hospitality_core.housekeeping.rooms.action.openStay'),
|
|
1571
|
-
href: `/admin/hospitality/stays/${encodeURIComponent(currentStay.id)}?lang=${encodeURIComponent(locale)}`,
|
|
1572
|
-
variant: 'secondary',
|
|
1573
|
-
})
|
|
1574
|
-
: null,
|
|
1575
|
-
]) }),
|
|
1576
|
-
_jsx(Section, { title: _('hospitality_core.housekeeping.rooms.section.tasks'), description: _('hospitality_core.housekeeping.rooms.section.tasksHint'), body: stack([
|
|
1577
|
-
tasks.length
|
|
1578
|
-
? dataTable(_, {
|
|
1579
|
-
columns: cleaningTaskColumns(_, locale, timezone),
|
|
1580
|
-
rows: tasks,
|
|
1581
|
-
id: (task) => task.id,
|
|
1582
|
-
rowHref: (task) => `/admin/hospitality/housekeeping/tasks/${encodeURIComponent(task.id)}?lang=${encodeURIComponent(locale)}`,
|
|
1583
|
-
})
|
|
1584
|
-
: emptyState(_('hospitality_core.housekeeping.rooms.empty.tasks'), _('hospitality_core.housekeeping.rooms.empty.tasksHint')),
|
|
1585
|
-
linkButton({
|
|
1586
|
-
label: _('hospitality_core.housekeeping.action.create'),
|
|
1587
|
-
href: taskQueue,
|
|
1588
|
-
variant: 'secondary',
|
|
1589
|
-
}),
|
|
1590
|
-
]) }),
|
|
1591
|
-
...actions,
|
|
1592
|
-
]) }),
|
|
1593
|
-
]) }));
|
|
1594
|
-
};
|
|
1595
|
-
const roomTypeFormFields = (_, values, properties, policies, creating) => [
|
|
1596
|
-
{
|
|
1597
|
-
name: 'propertyId',
|
|
1598
|
-
label: _('hospitality_core.roomType.field.property'),
|
|
1599
|
-
type: 'select',
|
|
1600
|
-
value: values.propertyId,
|
|
1601
|
-
options: choices(properties),
|
|
1602
|
-
required: true,
|
|
1603
|
-
disabled: !creating,
|
|
1604
|
-
},
|
|
1605
|
-
{
|
|
1606
|
-
name: 'code',
|
|
1607
|
-
label: _('hospitality_core.roomType.field.code'),
|
|
1608
|
-
value: values.code,
|
|
1609
|
-
required: true,
|
|
1610
|
-
help: _('hospitality_core.roomType.field.codeHint'),
|
|
1611
|
-
},
|
|
1612
|
-
{
|
|
1613
|
-
name: 'name',
|
|
1614
|
-
label: _('hospitality_core.roomType.field.name'),
|
|
1615
|
-
value: values.name,
|
|
1616
|
-
required: true,
|
|
1617
|
-
},
|
|
1618
|
-
{
|
|
1619
|
-
name: 'publicName',
|
|
1620
|
-
label: _('hospitality_core.roomType.field.publicName'),
|
|
1621
|
-
value: values.publicName,
|
|
1622
|
-
},
|
|
1623
|
-
{
|
|
1624
|
-
name: 'defaultCapacity',
|
|
1625
|
-
label: _('hospitality_core.roomType.field.defaultCapacity'),
|
|
1626
|
-
type: 'number',
|
|
1627
|
-
value: values.defaultCapacity,
|
|
1628
|
-
required: true,
|
|
1629
|
-
step: '1',
|
|
1630
|
-
},
|
|
1631
|
-
{
|
|
1632
|
-
name: 'maxAdults',
|
|
1633
|
-
label: _('hospitality_core.roomType.field.maxAdults'),
|
|
1634
|
-
type: 'number',
|
|
1635
|
-
value: values.maxAdults,
|
|
1636
|
-
required: true,
|
|
1637
|
-
step: '1',
|
|
1638
|
-
},
|
|
1639
|
-
{
|
|
1640
|
-
name: 'maxChildren',
|
|
1641
|
-
label: _('hospitality_core.roomType.field.maxChildren'),
|
|
1642
|
-
type: 'number',
|
|
1643
|
-
value: values.maxChildren,
|
|
1644
|
-
required: true,
|
|
1645
|
-
step: '1',
|
|
1646
|
-
},
|
|
1647
|
-
{
|
|
1648
|
-
name: 'maxInfants',
|
|
1649
|
-
label: _('hospitality_core.roomType.field.maxInfants'),
|
|
1650
|
-
type: 'number',
|
|
1651
|
-
value: values.maxInfants,
|
|
1652
|
-
required: true,
|
|
1653
|
-
step: '1',
|
|
1654
|
-
},
|
|
1655
|
-
{
|
|
1656
|
-
name: 'maxExtraBeds',
|
|
1657
|
-
label: _('hospitality_core.roomType.field.maxExtraBeds'),
|
|
1658
|
-
type: 'number',
|
|
1659
|
-
value: values.maxExtraBeds,
|
|
1660
|
-
required: true,
|
|
1661
|
-
step: '1',
|
|
1662
|
-
},
|
|
1663
|
-
{
|
|
1664
|
-
name: 'sizeSqm',
|
|
1665
|
-
label: _('hospitality_core.roomType.field.sizeSqm'),
|
|
1666
|
-
type: 'decimal',
|
|
1667
|
-
value: values.sizeSqm,
|
|
1668
|
-
},
|
|
1669
|
-
{
|
|
1670
|
-
name: 'viewType',
|
|
1671
|
-
label: _('hospitality_core.roomType.field.viewType'),
|
|
1672
|
-
type: 'select',
|
|
1673
|
-
value: values.viewType,
|
|
1674
|
-
options: [
|
|
1675
|
-
{ value: '', label: _('hospitality_core.roomType.value.noViewType') },
|
|
1676
|
-
...ROOM_VIEW_TYPES.map((value) => ({
|
|
1677
|
-
value,
|
|
1678
|
-
label: _(`hospitality_core.roomType.view.${value}`),
|
|
1679
|
-
})),
|
|
1680
|
-
],
|
|
1681
|
-
},
|
|
1682
|
-
{
|
|
1683
|
-
name: 'sharedBathroom',
|
|
1684
|
-
label: _('hospitality_core.roomType.field.sharedBathroom'),
|
|
1685
|
-
type: 'checkbox',
|
|
1686
|
-
value: values.sharedBathroom,
|
|
1687
|
-
},
|
|
1688
|
-
{
|
|
1689
|
-
name: 'baseRate',
|
|
1690
|
-
label: _('hospitality_core.roomType.field.baseRate'),
|
|
1691
|
-
type: 'decimal',
|
|
1692
|
-
value: values.baseRate,
|
|
1693
|
-
required: true,
|
|
1694
|
-
help: _('hospitality_core.roomType.field.baseRateHint'),
|
|
1695
|
-
},
|
|
1696
|
-
{
|
|
1697
|
-
name: 'color',
|
|
1698
|
-
label: _('hospitality_core.roomType.field.color'),
|
|
1699
|
-
type: 'color',
|
|
1700
|
-
value: values.color || '#2563eb',
|
|
1701
|
-
},
|
|
1702
|
-
{
|
|
1703
|
-
name: 'cancellationPolicyId',
|
|
1704
|
-
label: _('hospitality_core.roomType.field.cancellationPolicy'),
|
|
1705
|
-
type: 'select',
|
|
1706
|
-
value: values.cancellationPolicyId,
|
|
1707
|
-
options: [{ value: '', label: _('hospitality_core.roomType.value.inheritPolicy') }, ...choices(policies)],
|
|
1708
|
-
},
|
|
1709
|
-
{
|
|
1710
|
-
name: 'published',
|
|
1711
|
-
label: _('hospitality_core.roomType.field.published'),
|
|
1712
|
-
type: 'checkbox',
|
|
1713
|
-
value: values.published,
|
|
1714
|
-
help: _('hospitality_core.roomType.field.publishedHint'),
|
|
1715
|
-
},
|
|
1716
|
-
{
|
|
1717
|
-
name: 'description',
|
|
1718
|
-
label: _('hospitality_core.roomType.field.description'),
|
|
1719
|
-
type: 'textarea',
|
|
1720
|
-
value: values.description,
|
|
1721
|
-
span: 'full',
|
|
1722
|
-
},
|
|
1723
|
-
];
|
|
1724
|
-
const roomTypeForm = (_, values, properties, policies, locale, action, submit, cancelHref, creating) => (_jsx(RecordForm, { action: action, fields: roomTypeFormFields(_, values, properties, policies, creating), hidden: {
|
|
1725
|
-
lang: locale,
|
|
1726
|
-
...(!creating ? { propertyId: values.propertyId } : {}),
|
|
1727
|
-
}, submit: submit, submitVariant: "primary", cancelHref: cancelHref, cancelLabel: _('hospitality_core.action.cancel') }));
|
|
1728
|
-
const roomTypeFeedback = (_, status, errors = []) => {
|
|
1729
|
-
if (status === 'created' || status === 'saved')
|
|
1730
|
-
return notice({
|
|
1731
|
-
title: _(`hospitality_core.roomType.feedback.${status}`),
|
|
1732
|
-
message: _('hospitality_core.roomType.feedback.savedHint'),
|
|
1733
|
-
tone: 'positive',
|
|
1734
|
-
});
|
|
1735
|
-
if (errors.length)
|
|
1736
|
-
return notice({
|
|
1737
|
-
title: _('hospitality_core.feedback.invalid'),
|
|
1738
|
-
message: errors.join(' '),
|
|
1739
|
-
tone: 'danger',
|
|
1740
|
-
});
|
|
1741
|
-
return null;
|
|
1742
|
-
};
|
|
1743
|
-
export const roomTypesScreen = (_, rows, properties, propertyId, locale, frame) => {
|
|
1744
|
-
const propertyQuery = propertyId ? `&property=${encodeURIComponent(propertyId)}` : '';
|
|
1745
|
-
return (_jsx(Framed, { translator: _, title: _('hospitality_core.screen.roomTypes.title'), frame: frame, body: stack([
|
|
1746
|
-
_jsx(RecordForm, { action: "/admin/hospitality/room-types", method: "get", layout: "inline", fields: [
|
|
1747
|
-
{
|
|
1748
|
-
name: 'property',
|
|
1749
|
-
label: _('hospitality_core.roomType.field.property'),
|
|
1750
|
-
type: 'select',
|
|
1751
|
-
value: propertyId,
|
|
1752
|
-
options: choices(properties),
|
|
1753
|
-
},
|
|
1754
|
-
], hidden: { lang: locale }, submit: _('hospitality_core.action.apply'), submitVariant: "secondary" }),
|
|
1755
|
-
properties.length
|
|
1756
|
-
? linkButton({
|
|
1757
|
-
label: _('hospitality_core.roomType.action.create'),
|
|
1758
|
-
href: `/admin/hospitality/room-types/new?lang=${encodeURIComponent(locale)}${propertyQuery}`,
|
|
1759
|
-
variant: 'primary',
|
|
1760
|
-
})
|
|
1761
|
-
: notice({
|
|
1762
|
-
title: _('hospitality_core.roomType.empty.noProperty'),
|
|
1763
|
-
message: _('hospitality_core.roomType.empty.noPropertyHint'),
|
|
1764
|
-
tone: 'warning',
|
|
1765
|
-
}),
|
|
1766
|
-
cardGrid({
|
|
1767
|
-
items: [
|
|
1768
|
-
{ id: 'types', label: _('hospitality_core.roomType.metric.types'), value: rows.length },
|
|
1769
|
-
{
|
|
1770
|
-
id: 'published',
|
|
1771
|
-
label: _('hospitality_core.roomType.metric.published'),
|
|
1772
|
-
value: rows.filter((row) => row.published).length,
|
|
1773
|
-
},
|
|
1774
|
-
{
|
|
1775
|
-
id: 'rooms',
|
|
1776
|
-
label: _('hospitality_core.metric.rooms'),
|
|
1777
|
-
value: rows.reduce((sum, row) => sum + (row.rooms?.length ?? 0), 0),
|
|
1778
|
-
},
|
|
1779
|
-
],
|
|
1780
|
-
id: (item) => item.id,
|
|
1781
|
-
card: (item) => metric({ label: item.label, value: String(item.value), tone: item.id }),
|
|
1782
|
-
}),
|
|
1783
|
-
rows.length
|
|
1784
|
-
? dataTable(_, {
|
|
1785
|
-
columns: roomTypeColumns(_),
|
|
1786
|
-
rows,
|
|
1787
|
-
id: (row) => row.id,
|
|
1788
|
-
rowHref: (row) => `/admin/hospitality/room-types/${encodeURIComponent(row.id)}?lang=${encodeURIComponent(locale)}`,
|
|
1789
|
-
})
|
|
1790
|
-
: emptyState(_('hospitality_core.screen.roomTypes.empty'), _('hospitality_core.screen.roomTypes.emptyHint')),
|
|
1791
|
-
]) }));
|
|
1792
|
-
};
|
|
1793
|
-
export const newRoomTypeScreen = (_, values, properties, policies, locale, frame, errors = []) => (_jsx(Framed, { translator: _, title: _('hospitality_core.roomType.create.title'), frame: frame, body: stack([
|
|
1794
|
-
roomTypeFeedback(_, null, errors),
|
|
1795
|
-
_jsx(Section, { title: _('hospitality_core.roomType.create.title'), description: _('hospitality_core.roomType.create.hint'), body: roomTypeForm(_, values, properties, policies, locale, `/admin/hospitality/room-types/new?lang=${encodeURIComponent(locale)}`, _('hospitality_core.roomType.action.create'), `/admin/hospitality/room-types?property=${encodeURIComponent(values.propertyId)}&lang=${encodeURIComponent(locale)}`, true) }),
|
|
1796
|
-
]) }));
|
|
1797
|
-
export const roomTypeDetailScreen = (_, roomType, properties, policies, locale, frame, status, errors = [], attempted) => {
|
|
1798
|
-
const query = `lang=${encodeURIComponent(locale)}`;
|
|
1799
|
-
const values = attempted ?? roomType;
|
|
1800
|
-
const propertyName = roomType.property?.name ?? roomType.property?.code ?? roomType.propertyId;
|
|
1801
|
-
return (_jsx(Framed, { translator: _, title: roomType.name, frame: frame, body: stack([
|
|
1802
|
-
roomTypeFeedback(_, status, errors),
|
|
1803
|
-
_jsx(RecordWorkspace, { kicker: _('hospitality_core.roomType.detail.kicker'), title: roomType.name, subtitle: `${roomType.code} · ${propertyName}`, imageFallback: icon('hotel'), badges: [
|
|
1804
|
-
badge(_(roomType.published ? 'hospitality_core.value.published' : 'hospitality_core.value.draft'), roomType.published ? 'positive' : 'neutral'),
|
|
1805
|
-
badge(_(roomType.active ? 'hospitality_core.value.active' : 'hospitality_core.value.inactive'), roomType.active ? 'positive' : 'neutral'),
|
|
1806
|
-
], summary: [
|
|
1807
|
-
{
|
|
1808
|
-
id: 'rooms',
|
|
1809
|
-
label: _('hospitality_core.metric.rooms'),
|
|
1810
|
-
value: roomType.rooms?.length ?? 0,
|
|
1811
|
-
href: `/admin/hospitality/rooms?property=${encodeURIComponent(roomType.propertyId)}&${query}`,
|
|
1812
|
-
},
|
|
1813
|
-
{
|
|
1814
|
-
id: 'rates',
|
|
1815
|
-
label: _('hospitality_core.menu.ratePlans'),
|
|
1816
|
-
value: roomType.ratePlans?.length ?? 0,
|
|
1817
|
-
href: `/admin/hospitality/rate-plans?property=${encodeURIComponent(roomType.propertyId)}&${query}`,
|
|
1818
|
-
},
|
|
1819
|
-
{
|
|
1820
|
-
id: 'beds',
|
|
1821
|
-
label: _('hospitality_core.roomType.metric.beds'),
|
|
1822
|
-
value: (roomType.beds ?? []).reduce((sum, bed) => sum + Number(bed.quantity ?? 0), 0),
|
|
1823
|
-
},
|
|
1824
|
-
], navigation: linkButton({
|
|
1825
|
-
label: _('hospitality_core.roomType.action.back'),
|
|
1826
|
-
href: `/admin/hospitality/room-types?property=${encodeURIComponent(roomType.propertyId)}&${query}`,
|
|
1827
|
-
variant: 'tertiary',
|
|
1828
|
-
icon: 'chevron-left',
|
|
1829
|
-
}), body: stack([
|
|
1830
|
-
_jsx(Section, { title: _('hospitality_core.roomType.section.information'), description: _('hospitality_core.roomType.section.informationHint'), body: definitionList({
|
|
1831
|
-
title: roomType.publicName || roomType.name,
|
|
1832
|
-
items: [
|
|
1833
|
-
{
|
|
1834
|
-
key: 'property',
|
|
1835
|
-
term: _('hospitality_core.roomType.field.property'),
|
|
1836
|
-
value: propertyName,
|
|
1837
|
-
},
|
|
1838
|
-
{
|
|
1839
|
-
key: 'capacity',
|
|
1840
|
-
term: _('hospitality_core.roomType.field.defaultCapacity'),
|
|
1841
|
-
value: _('hospitality_core.roomType.value.capacity', {
|
|
1842
|
-
default: roomType.defaultCapacity,
|
|
1843
|
-
adults: roomType.maxAdults,
|
|
1844
|
-
children: roomType.maxChildren,
|
|
1845
|
-
}),
|
|
1846
|
-
},
|
|
1847
|
-
{
|
|
1848
|
-
key: 'rate',
|
|
1849
|
-
term: _('hospitality_core.roomType.field.baseRate'),
|
|
1850
|
-
value: formatMoney(_, roomType.baseRate),
|
|
1851
|
-
},
|
|
1852
|
-
{
|
|
1853
|
-
key: 'policy',
|
|
1854
|
-
term: _('hospitality_core.roomType.field.cancellationPolicy'),
|
|
1855
|
-
value: roomType.cancellationPolicy?.name ??
|
|
1856
|
-
roomType.cancellationPolicy?.code ??
|
|
1857
|
-
_('hospitality_core.roomType.value.inheritPolicy'),
|
|
1858
|
-
},
|
|
1859
|
-
],
|
|
1860
|
-
}) }),
|
|
1861
|
-
_jsx(Section, { title: _('hospitality_core.roomType.section.settings'), description: _('hospitality_core.roomType.section.settingsHint'), body: roomTypeForm(_, values, properties, policies, locale, `/admin/hospitality/room-types/${encodeURIComponent(roomType.id)}?${query}`, _('hospitality_core.roomType.action.save'), `/admin/hospitality/room-types?property=${encodeURIComponent(roomType.propertyId)}&${query}`, false) }),
|
|
1862
|
-
_jsx(Section, { title: _('hospitality_core.roomType.section.next'), description: _('hospitality_core.roomType.section.nextHint'), body: stack([
|
|
1863
|
-
linkButton({
|
|
1864
|
-
label: _('hospitality_core.menu.rooms'),
|
|
1865
|
-
href: `/admin/hospitality/rooms?property=${encodeURIComponent(roomType.propertyId)}&${query}`,
|
|
1866
|
-
variant: 'secondary',
|
|
1867
|
-
}),
|
|
1868
|
-
linkButton({
|
|
1869
|
-
label: _('hospitality_core.menu.ratePlans'),
|
|
1870
|
-
href: `/admin/hospitality/rate-plans?property=${encodeURIComponent(roomType.propertyId)}&${query}`,
|
|
1871
|
-
variant: 'secondary',
|
|
1872
|
-
}),
|
|
1873
|
-
linkButton({
|
|
1874
|
-
label: _('hospitality_core.menu.inventory'),
|
|
1875
|
-
href: `/admin/hospitality/inventory?property=${encodeURIComponent(roomType.propertyId)}&roomType=${encodeURIComponent(roomType.id)}&${query}`,
|
|
1876
|
-
variant: 'secondary',
|
|
1877
|
-
}),
|
|
1878
|
-
linkButton({
|
|
1879
|
-
label: _('hospitality_core.menu.content'),
|
|
1880
|
-
href: `/admin/hospitality/content?property=${encodeURIComponent(roomType.propertyId)}&target=room_type%3A${encodeURIComponent(roomType.id)}&${query}`,
|
|
1881
|
-
variant: 'secondary',
|
|
1882
|
-
}),
|
|
1883
|
-
], 'compact') }),
|
|
1884
|
-
]) }),
|
|
1885
|
-
]) }));
|
|
1886
|
-
};
|
|
1887
|
-
export const amenitiesScreen = (_, rows, frame) => (_jsx(Framed, { translator: _, title: _('hospitality_core.screen.amenities.title'), frame: frame, body: rows.length
|
|
1888
|
-
? dataTable(_, { columns: amenityColumns(_), rows, id: (row) => row.id })
|
|
1889
|
-
: emptyState(_('hospitality_core.screen.amenities.empty'), _('hospitality_core.screen.amenities.emptyHint')) }));
|
|
1890
|
-
export const policiesScreen = (_, rows, frame) => (_jsx(Framed, { translator: _, title: _('hospitality_core.screen.policies.title'), frame: frame, body: rows.length
|
|
1891
|
-
? dataTable(_, { columns: policyColumns(_), rows, id: (row) => row.id })
|
|
1892
|
-
: emptyState(_('hospitality_core.screen.policies.empty'), _('hospitality_core.screen.policies.emptyHint')) }));
|
|
1893
|
-
const contentFeedback = (_, state) => {
|
|
1894
|
-
if (state === 'saved')
|
|
1895
|
-
return notice({
|
|
1896
|
-
title: _('hospitality_core.content.feedback.saved'),
|
|
1897
|
-
message: _('hospitality_core.content.feedback.savedHint'),
|
|
1898
|
-
tone: 'positive',
|
|
1899
|
-
});
|
|
1900
|
-
if (state === 'invalid')
|
|
1901
|
-
return notice({
|
|
1902
|
-
title: _('hospitality_core.content.feedback.invalid'),
|
|
1903
|
-
message: _('hospitality_core.content.feedback.invalidHint'),
|
|
1904
|
-
tone: 'danger',
|
|
1905
|
-
});
|
|
1906
|
-
return null;
|
|
1907
|
-
};
|
|
1908
|
-
export const contentScreen = (_, properties, roomTypes, propertyId, target, images, completeness, locale, query, frame, status) => {
|
|
1909
|
-
const property = properties.find((row) => row.id === propertyId);
|
|
1910
|
-
const roomTypeId = target.startsWith('room_type:') ? target.slice('room_type:'.length) : null;
|
|
1911
|
-
const roomType = roomTypes.find((row) => row.id === roomTypeId);
|
|
1912
|
-
const selectedLabel = roomType?.name ?? property?.name ?? _('hospitality_core.content.target.none');
|
|
1913
|
-
const categoryOptions = ['exterior', 'lobby', 'room', 'bathroom', 'restaurant', 'pool', 'other'].map((value) => ({ value, label: _(`hospitality_core.content.category.${value}`) }));
|
|
1914
|
-
const targetOptions = property
|
|
1915
|
-
? [
|
|
1916
|
-
{ value: 'property', label: _('hospitality_core.content.target.property') },
|
|
1917
|
-
...roomTypes.map((row) => ({
|
|
1918
|
-
value: `room_type:${row.id}`,
|
|
1919
|
-
label: `${_('hospitality_core.content.target.roomType')} · ${row.name}`,
|
|
1920
|
-
})),
|
|
1921
|
-
]
|
|
1922
|
-
: [];
|
|
1923
|
-
const suffix = query ? `?${query}` : '';
|
|
1924
|
-
return (_jsx(Framed, { translator: _, title: _('hospitality_core.screen.content.title'), frame: frame, body: stack([
|
|
1925
|
-
contentFeedback(_, status),
|
|
1926
|
-
properties.length ? (_jsx(Section, { title: _('hospitality_core.screen.content.selection'), description: _('hospitality_core.screen.content.selectionHint'), body: _jsx(RecordForm, { action: "/admin/hospitality/content", method: "get", layout: "inline", fields: [
|
|
1927
|
-
{
|
|
1928
|
-
name: 'property',
|
|
1929
|
-
label: _('hospitality_core.content.field.property'),
|
|
1930
|
-
type: 'select',
|
|
1931
|
-
value: propertyId,
|
|
1932
|
-
options: choices(properties),
|
|
1933
|
-
required: true,
|
|
1934
|
-
},
|
|
1935
|
-
{
|
|
1936
|
-
name: 'target',
|
|
1937
|
-
label: _('hospitality_core.content.field.target'),
|
|
1938
|
-
type: 'select',
|
|
1939
|
-
value: target,
|
|
1940
|
-
options: targetOptions,
|
|
1941
|
-
required: true,
|
|
1942
|
-
},
|
|
1943
|
-
], hidden: { lang: locale }, submit: _('hospitality_core.action.select'), submitVariant: "secondary" }) })) : (emptyState(_('hospitality_core.screen.content.noProperty'), _('hospitality_core.screen.content.noPropertyHint'))),
|
|
1944
|
-
...(property
|
|
1945
|
-
? [
|
|
1946
|
-
cardGrid({
|
|
1947
|
-
items: [
|
|
1948
|
-
{
|
|
1949
|
-
id: 'target',
|
|
1950
|
-
label: _('hospitality_core.content.metric.target'),
|
|
1951
|
-
value: selectedLabel,
|
|
1952
|
-
},
|
|
1953
|
-
{
|
|
1954
|
-
id: 'images',
|
|
1955
|
-
label: _('hospitality_core.content.metric.images'),
|
|
1956
|
-
value: String(images.length),
|
|
1957
|
-
},
|
|
1958
|
-
{
|
|
1959
|
-
id: 'complete',
|
|
1960
|
-
label: _('hospitality_core.content.metric.completeness'),
|
|
1961
|
-
value: `${completeness.percent}%`,
|
|
1962
|
-
detail: _(`hospitality_core.content.metric.fields`, {
|
|
1963
|
-
completed: completeness.completed,
|
|
1964
|
-
total: completeness.total,
|
|
1965
|
-
}),
|
|
1966
|
-
},
|
|
1967
|
-
],
|
|
1968
|
-
id: (item) => item.id,
|
|
1969
|
-
card: (item) => metric({
|
|
1970
|
-
label: item.label,
|
|
1971
|
-
value: item.value,
|
|
1972
|
-
detail: 'detail' in item ? item.detail : null,
|
|
1973
|
-
tone: item.id,
|
|
1974
|
-
}),
|
|
1975
|
-
}),
|
|
1976
|
-
_jsx(Section, { title: _('hospitality_core.screen.content.library'), description: _('hospitality_core.screen.content.libraryHint'), body: mediaPanel({
|
|
1977
|
-
status: 'ready',
|
|
1978
|
-
images: images.map((image, index) => ({
|
|
1979
|
-
id: image.id,
|
|
1980
|
-
src: `/files/${image.attachmentId}`,
|
|
1981
|
-
alt: image.caption || image.attachment?.name || selectedLabel,
|
|
1982
|
-
primary: image.primary,
|
|
1983
|
-
actions: {
|
|
1984
|
-
primary: `/admin/hospitality/content/images/${image.id}/primary${suffix}`,
|
|
1985
|
-
remove: `/admin/hospitality/content/images/${image.id}/remove${suffix}`,
|
|
1986
|
-
...(index > 0
|
|
1987
|
-
? { moveUp: `/admin/hospitality/content/images/${image.id}/move-up${suffix}` }
|
|
1988
|
-
: {}),
|
|
1989
|
-
...(index < images.length - 1
|
|
1990
|
-
? { moveDown: `/admin/hospitality/content/images/${image.id}/move-down${suffix}` }
|
|
1991
|
-
: {}),
|
|
1992
|
-
},
|
|
1993
|
-
})),
|
|
1994
|
-
uploadAction: `/admin/hospitality/content/upload${suffix}`,
|
|
1995
|
-
labels: {
|
|
1996
|
-
empty: _('hospitality_core.content.media.empty'),
|
|
1997
|
-
primary: _('hospitality_core.content.media.primary'),
|
|
1998
|
-
makePrimary: _('hospitality_core.content.media.makePrimary'),
|
|
1999
|
-
moveUp: _('hospitality_core.content.media.moveUp'),
|
|
2000
|
-
moveDown: _('hospitality_core.content.media.moveDown'),
|
|
2001
|
-
remove: _('hospitality_core.content.media.remove'),
|
|
2002
|
-
choose: _('hospitality_core.content.media.choose'),
|
|
2003
|
-
add: _('hospitality_core.content.media.add'),
|
|
2004
|
-
},
|
|
2005
|
-
extension: images.length ? (_jsx(FormCluster, { label: _('hospitality_core.content.metadata.group'), forms: images.map((image) => (_jsx(RecordForm, { action: `/admin/hospitality/content/images/${image.id}/metadata${suffix}`, layout: "inline", fields: [
|
|
2006
|
-
{
|
|
2007
|
-
name: 'category',
|
|
2008
|
-
label: _('hospitality_core.content.field.category'),
|
|
2009
|
-
type: 'select',
|
|
2010
|
-
value: image.category,
|
|
2011
|
-
options: categoryOptions,
|
|
2012
|
-
required: true,
|
|
2013
|
-
},
|
|
2014
|
-
{
|
|
2015
|
-
name: 'caption',
|
|
2016
|
-
label: _('hospitality_core.content.field.caption'),
|
|
2017
|
-
value: image.caption,
|
|
2018
|
-
placeholder: image.attachment?.name ?? null,
|
|
2019
|
-
},
|
|
2020
|
-
], hidden: { id: image.id }, submit: _('hospitality_core.content.action.saveMetadata'), submitVariant: "secondary", submitSize: "compact" }))) })) : undefined,
|
|
2021
|
-
}) }),
|
|
2022
|
-
]
|
|
2023
|
-
: []),
|
|
2024
|
-
]) }));
|
|
2025
|
-
};
|
|
2026
|
-
const choices = (rows) => rows.map((row) => ({
|
|
2027
|
-
value: row.id,
|
|
2028
|
-
label: `${row.code ? `${row.code} · ` : ''}${row.name}`,
|
|
2029
|
-
}));
|
|
2030
|
-
const feedback = (_, state) => {
|
|
2031
|
-
if (state === 'saved')
|
|
2032
|
-
return notice({
|
|
2033
|
-
title: _('hospitality_core.feedback.saved'),
|
|
2034
|
-
message: _('hospitality_core.feedback.savedHint'),
|
|
2035
|
-
tone: 'positive',
|
|
2036
|
-
});
|
|
2037
|
-
if (state === 'invalid')
|
|
2038
|
-
return notice({
|
|
2039
|
-
title: _('hospitality_core.feedback.invalid'),
|
|
2040
|
-
message: _('hospitality_core.feedback.invalidHint'),
|
|
2041
|
-
tone: 'danger',
|
|
2042
|
-
});
|
|
2043
|
-
return null;
|
|
2044
|
-
};
|
|
2045
|
-
const nightAuditFeedback = (_, state) => {
|
|
2046
|
-
if (state === 'queued')
|
|
2047
|
-
return notice({
|
|
2048
|
-
title: _('hospitality_core.nightAudit.feedback.queued'),
|
|
2049
|
-
message: _('hospitality_core.nightAudit.feedback.queuedHint'),
|
|
2050
|
-
tone: 'positive',
|
|
2051
|
-
});
|
|
2052
|
-
if (state === 'invalid')
|
|
2053
|
-
return notice({
|
|
2054
|
-
title: _('hospitality_core.feedback.invalid'),
|
|
2055
|
-
message: _('hospitality_core.nightAudit.feedback.invalidHint'),
|
|
2056
|
-
tone: 'danger',
|
|
2057
|
-
});
|
|
2058
|
-
return null;
|
|
2059
|
-
};
|
|
2060
|
-
const nightAuditColumns = (_, locale) => [
|
|
2061
|
-
{
|
|
2062
|
-
key: 'date',
|
|
2063
|
-
label: _('hospitality_core.nightAudit.col.date'),
|
|
2064
|
-
cell: (row) => new Intl.DateTimeFormat(locale, { dateStyle: 'medium', timeZone: 'UTC' }).format(new Date(`${row.auditDate}T12:00:00Z`)),
|
|
2065
|
-
kind: 'date',
|
|
2066
|
-
priority: 'primary',
|
|
2067
|
-
},
|
|
2068
|
-
{
|
|
2069
|
-
key: 'status',
|
|
2070
|
-
label: _('hospitality_core.col.status'),
|
|
2071
|
-
cell: (row) => badge(_(`hospitality_core.nightAudit.state.${row.state}`), row.state === 'completed'
|
|
2072
|
-
? 'positive'
|
|
2073
|
-
: row.state === 'failed'
|
|
2074
|
-
? 'danger'
|
|
2075
|
-
: row.state === 'running'
|
|
2076
|
-
? 'warning'
|
|
2077
|
-
: 'info'),
|
|
2078
|
-
kind: 'status',
|
|
2079
|
-
},
|
|
2080
|
-
{
|
|
2081
|
-
key: 'inHouse',
|
|
2082
|
-
label: _('hospitality_core.nightAudit.metric.inHouse'),
|
|
2083
|
-
cell: (row) => String(row.inHouseCount),
|
|
2084
|
-
align: 'end',
|
|
2085
|
-
kind: 'number',
|
|
2086
|
-
},
|
|
2087
|
-
{
|
|
2088
|
-
key: 'services',
|
|
2089
|
-
label: _('hospitality_core.nightAudit.metric.services'),
|
|
2090
|
-
cell: (row) => String(row.servicePosted),
|
|
2091
|
-
align: 'end',
|
|
2092
|
-
kind: 'number',
|
|
2093
|
-
},
|
|
2094
|
-
{
|
|
2095
|
-
key: 'rent',
|
|
2096
|
-
label: _('hospitality_core.nightAudit.metric.rent'),
|
|
2097
|
-
cell: (row) => String(row.rentPosted),
|
|
2098
|
-
align: 'end',
|
|
2099
|
-
kind: 'number',
|
|
2100
|
-
},
|
|
2101
|
-
{
|
|
2102
|
-
key: 'amount',
|
|
2103
|
-
label: _('hospitality_core.col.amount'),
|
|
2104
|
-
cell: (row) => formatMoney(_, row.totalAmount),
|
|
2105
|
-
align: 'end',
|
|
2106
|
-
kind: 'currency',
|
|
2107
|
-
},
|
|
2108
|
-
{
|
|
2109
|
-
key: 'attempt',
|
|
2110
|
-
label: _('hospitality_core.nightAudit.col.attempt'),
|
|
2111
|
-
cell: (row) => String(row.attempt),
|
|
2112
|
-
align: 'end',
|
|
2113
|
-
kind: 'number',
|
|
2114
|
-
},
|
|
2115
|
-
];
|
|
2116
|
-
export const nightAuditScreen = (_, data, locale, frame, state) => {
|
|
2117
|
-
if (!data.propertyId)
|
|
2118
|
-
return (_jsx(Framed, { translator: _, title: _('hospitality_core.screen.nightAudit.title'), frame: frame, body: emptyState(_('hospitality_core.nightAudit.empty.property'), _('hospitality_core.nightAudit.empty.propertyHint')) }));
|
|
2119
|
-
const lang = { lang: locale };
|
|
2120
|
-
return (_jsx(Framed, { translator: _, title: _('hospitality_core.screen.nightAudit.title'), frame: frame, body: stack([
|
|
2121
|
-
nightAuditFeedback(_, state),
|
|
2122
|
-
_jsx(FormCluster, { label: _('hospitality_core.nightAudit.section.selection'), forms: [
|
|
2123
|
-
_jsx(RecordForm, { action: "/admin/hospitality/night-audit", method: "get", layout: "inline", submit: _('hospitality_core.action.select'), submitVariant: "secondary", hidden: { ...lang, auditDate: data.auditDate }, fields: [
|
|
2124
|
-
{
|
|
2125
|
-
name: 'property',
|
|
2126
|
-
label: _('hospitality_core.menu.properties'),
|
|
2127
|
-
type: 'select',
|
|
2128
|
-
value: data.propertyId,
|
|
2129
|
-
options: choices(data.properties),
|
|
2130
|
-
required: true,
|
|
2131
|
-
},
|
|
2132
|
-
] }),
|
|
2133
|
-
datePicker({
|
|
2134
|
-
action: '/admin/hospitality/night-audit',
|
|
2135
|
-
label: _('hospitality_core.nightAudit.field.auditDate'),
|
|
2136
|
-
fields: [
|
|
2137
|
-
{
|
|
2138
|
-
name: 'auditDate',
|
|
2139
|
-
label: _('hospitality_core.nightAudit.field.auditDate'),
|
|
2140
|
-
value: data.auditDate,
|
|
2141
|
-
max: data.today,
|
|
2142
|
-
required: true,
|
|
2143
|
-
},
|
|
2144
|
-
],
|
|
2145
|
-
hidden: { ...lang, property: data.propertyId },
|
|
2146
|
-
submit: _('hospitality_core.nightAudit.action.preview'),
|
|
2147
|
-
}),
|
|
2148
|
-
] }),
|
|
2149
|
-
data.preview
|
|
2150
|
-
? cardGrid({
|
|
2151
|
-
items: [
|
|
2152
|
-
{
|
|
2153
|
-
id: 'in-house',
|
|
2154
|
-
label: _('hospitality_core.nightAudit.metric.inHouse'),
|
|
2155
|
-
value: data.preview.inHouseCount,
|
|
2156
|
-
},
|
|
2157
|
-
{
|
|
2158
|
-
id: 'services',
|
|
2159
|
-
label: _('hospitality_core.nightAudit.metric.servicesDue'),
|
|
2160
|
-
value: data.preview.serviceDue,
|
|
2161
|
-
},
|
|
2162
|
-
{
|
|
2163
|
-
id: 'rent',
|
|
2164
|
-
label: _('hospitality_core.nightAudit.metric.rentDue'),
|
|
2165
|
-
value: data.preview.rentDue,
|
|
2166
|
-
},
|
|
2167
|
-
{
|
|
2168
|
-
id: 'night-audit-amount',
|
|
2169
|
-
label: _('hospitality_core.nightAudit.metric.estimated'),
|
|
2170
|
-
value: formatMoney(_, data.preview.estimatedAmount),
|
|
2171
|
-
},
|
|
2172
|
-
],
|
|
2173
|
-
id: (item) => item.id,
|
|
2174
|
-
card: (item) => metric({ label: item.label, value: String(item.value), tone: item.id }),
|
|
2175
|
-
})
|
|
2176
|
-
: null,
|
|
2177
|
-
_jsx(Section, { title: _('hospitality_core.nightAudit.section.run'), description: _('hospitality_core.nightAudit.section.runHint'), body: _jsx(RecordForm, { action: "/admin/hospitality/night-audit", method: "post", submit: _('hospitality_core.nightAudit.action.run'), submitVariant: "primary", hidden: {
|
|
2178
|
-
...lang,
|
|
2179
|
-
operation: 'request-night-audit',
|
|
2180
|
-
propertyId: data.propertyId,
|
|
2181
|
-
auditDate: data.auditDate,
|
|
2182
|
-
}, fields: [] }) }),
|
|
2183
|
-
_jsx(Section, { title: _('hospitality_core.nightAudit.section.history'), description: _('hospitality_core.nightAudit.section.historyHint'), body: data.runs.length
|
|
2184
|
-
? dataTable(_, { columns: nightAuditColumns(_, locale), rows: data.runs, id: (row) => row.id })
|
|
2185
|
-
: emptyState(_('hospitality_core.nightAudit.empty.runs'), _('hospitality_core.nightAudit.empty.runsHint')) }),
|
|
2186
|
-
]) }));
|
|
2187
|
-
};
|
|
2188
|
-
const stayNoticeFeedback = (_, state) => {
|
|
2189
|
-
if (state === 'refreshed' || state === 'submitted' || state === 'confirmed')
|
|
2190
|
-
return notice({
|
|
2191
|
-
title: _(`hospitality_core.stayNotice.feedback.${state}`),
|
|
2192
|
-
message: _(`hospitality_core.stayNotice.feedback.${state}Hint`),
|
|
2193
|
-
tone: 'positive',
|
|
2194
|
-
});
|
|
2195
|
-
if (state === 'invalid')
|
|
2196
|
-
return notice({
|
|
2197
|
-
title: _('hospitality_core.feedback.invalid'),
|
|
2198
|
-
message: _('hospitality_core.stayNotice.feedback.invalidHint'),
|
|
2199
|
-
tone: 'danger',
|
|
2200
|
-
});
|
|
2201
|
-
return null;
|
|
2202
|
-
};
|
|
2203
|
-
const stayNoticeStateTone = (state) => state === 'attention'
|
|
2204
|
-
? 'danger'
|
|
2205
|
-
: state === 'ready'
|
|
2206
|
-
? 'warning'
|
|
2207
|
-
: state === 'submitted'
|
|
2208
|
-
? 'info'
|
|
2209
|
-
: 'positive';
|
|
2210
|
-
const stayNoticeDocument = (_, row) => {
|
|
2211
|
-
if (!row.documentType || !row.documentLast4)
|
|
2212
|
-
return _('hospitality_core.stayNotice.value.missing');
|
|
2213
|
-
return `${_(`hospitality_core.document.${row.documentType}`)} · •••• ${row.documentLast4}`;
|
|
2214
|
-
};
|
|
2215
|
-
const stayNoticeIssues = (_, row) => row.issueCodes.length
|
|
2216
|
-
? row.issueCodes.map((item) => _(`hospitality_core.stayNotice.issue.${item}`)).join(', ')
|
|
2217
|
-
: _('hospitality_core.stayNotice.value.complete');
|
|
2218
|
-
const stayNoticeColumns = (_, locale, timezone) => [
|
|
2219
|
-
{
|
|
2220
|
-
key: 'guest',
|
|
2221
|
-
label: _('hospitality_core.stayNotice.col.guest'),
|
|
2222
|
-
cell: (row) => row.guestName,
|
|
2223
|
-
priority: 'primary',
|
|
2224
|
-
kind: 'person',
|
|
2225
|
-
},
|
|
2226
|
-
{
|
|
2227
|
-
key: 'document',
|
|
2228
|
-
label: _('hospitality_core.stayNotice.col.document'),
|
|
2229
|
-
cell: (row) => stayNoticeDocument(_, row),
|
|
2230
|
-
priority: 'secondary',
|
|
2231
|
-
kind: 'identifier',
|
|
2232
|
-
},
|
|
2233
|
-
{
|
|
2234
|
-
key: 'due',
|
|
2235
|
-
label: _('hospitality_core.stayNotice.col.due'),
|
|
2236
|
-
cell: (row) => new Intl.DateTimeFormat(locale, { dateStyle: 'medium', timeStyle: 'short', timeZone: timezone }).format(new Date(row.dueAt)),
|
|
2237
|
-
priority: 'secondary',
|
|
2238
|
-
kind: 'date',
|
|
2239
|
-
},
|
|
2240
|
-
{
|
|
2241
|
-
key: 'state',
|
|
2242
|
-
label: _('hospitality_core.col.status'),
|
|
2243
|
-
cell: (row) => badge(_(`hospitality_core.stayNotice.state.${row.state}`), stayNoticeStateTone(row.state)),
|
|
2244
|
-
kind: 'status',
|
|
2245
|
-
},
|
|
2246
|
-
{
|
|
2247
|
-
key: 'issues',
|
|
2248
|
-
label: _('hospitality_core.stayNotice.col.readiness'),
|
|
2249
|
-
cell: (row) => stayNoticeIssues(_, row),
|
|
2250
|
-
priority: 'tertiary',
|
|
2251
|
-
optional: true,
|
|
2252
|
-
},
|
|
2253
|
-
];
|
|
2254
|
-
const stayNoticeHref = (locale, propertyId, state, noticeId) => {
|
|
2255
|
-
const query = new URLSearchParams({ lang: locale, property: propertyId, notice: noticeId });
|
|
2256
|
-
if (state !== 'all')
|
|
2257
|
-
query.set('state', state);
|
|
2258
|
-
return `/admin/hospitality/stay-notices?${query.toString()}`;
|
|
2259
|
-
};
|
|
2260
|
-
const stayNoticeAction = (_, selected, locale, propertyId, state) => {
|
|
2261
|
-
const hidden = {
|
|
2262
|
-
lang: locale,
|
|
2263
|
-
id: selected.id,
|
|
2264
|
-
stayId: selected.stayId,
|
|
2265
|
-
property: propertyId,
|
|
2266
|
-
state,
|
|
2267
|
-
};
|
|
2268
|
-
if (selected.state === 'attention')
|
|
2269
|
-
return (_jsx(RecordForm, { action: "/admin/hospitality/stay-notices", method: "post", submit: _('hospitality_core.stayNotice.action.refresh'), submitVariant: "secondary", hidden: { ...hidden, operation: 'refresh' }, fields: [] }));
|
|
2270
|
-
if (selected.state === 'ready')
|
|
2271
|
-
return (_jsx(RecordForm, { action: "/admin/hospitality/stay-notices", method: "post", submit: _('hospitality_core.stayNotice.action.recordSubmission'), submitVariant: "primary", hidden: { ...hidden, operation: 'record-submission' }, fields: [
|
|
2272
|
-
{
|
|
2273
|
-
name: 'reason',
|
|
2274
|
-
label: _('hospitality_core.stayNotice.field.reason'),
|
|
2275
|
-
type: 'select',
|
|
2276
|
-
value: selected.reason,
|
|
2277
|
-
required: true,
|
|
2278
|
-
options: [
|
|
2279
|
-
{ value: '', label: _('hospitality_core.stayNotice.reason.select') },
|
|
2280
|
-
...['tourism', 'business', 'family', 'other'].map((value) => ({
|
|
2281
|
-
value,
|
|
2282
|
-
label: _(`hospitality_core.stayNotice.reason.${value}`),
|
|
2283
|
-
})),
|
|
2284
|
-
],
|
|
2285
|
-
},
|
|
2286
|
-
{
|
|
2287
|
-
name: 'channel',
|
|
2288
|
-
label: _('hospitality_core.stayNotice.field.channel'),
|
|
2289
|
-
type: 'select',
|
|
2290
|
-
required: true,
|
|
2291
|
-
options: ['online', 'vneid', 'email', 'phone', 'software'].map((value) => ({
|
|
2292
|
-
value,
|
|
2293
|
-
label: _(`hospitality_core.stayNotice.channel.${value}`),
|
|
2294
|
-
})),
|
|
2295
|
-
},
|
|
2296
|
-
{
|
|
2297
|
-
name: 'evidenceRef',
|
|
2298
|
-
label: _('hospitality_core.stayNotice.field.evidenceRef'),
|
|
2299
|
-
help: _('hospitality_core.stayNotice.field.evidenceRefHint'),
|
|
2300
|
-
required: true,
|
|
2301
|
-
},
|
|
2302
|
-
] }));
|
|
2303
|
-
if (selected.state === 'submitted')
|
|
2304
|
-
return (_jsx(RecordForm, { action: "/admin/hospitality/stay-notices", method: "post", submit: _('hospitality_core.stayNotice.action.confirm'), submitVariant: "primary", hidden: { ...hidden, operation: 'confirm' }, fields: [
|
|
2305
|
-
{
|
|
2306
|
-
name: 'receiptRef',
|
|
2307
|
-
label: _('hospitality_core.stayNotice.field.receiptRef'),
|
|
2308
|
-
value: selected.receiptRef,
|
|
2309
|
-
required: true,
|
|
2310
|
-
},
|
|
2311
|
-
] }));
|
|
2312
|
-
return null;
|
|
2313
|
-
};
|
|
2314
|
-
export const stayNoticesScreen = (_, data, locale, timezone, frame, feedbackState) => {
|
|
2315
|
-
if (!data.propertyId)
|
|
2316
|
-
return (_jsx(Framed, { translator: _, title: _('hospitality_core.screen.stayNotices.title'), frame: frame, body: emptyState(_('hospitality_core.stayNotice.empty.property'), _('hospitality_core.stayNotice.empty.propertyHint')) }));
|
|
2317
|
-
const counts = Object.fromEntries(['attention', 'ready', 'submitted', 'confirmed'].map((state) => [
|
|
2318
|
-
state,
|
|
2319
|
-
data.rows.filter((row) => row.state === state).length,
|
|
2320
|
-
]));
|
|
2321
|
-
const visibleRows = data.state === 'all' ? data.rows : data.rows.filter((row) => row.state === data.state);
|
|
2322
|
-
const action = data.selected
|
|
2323
|
-
? stayNoticeAction(_, data.selected, locale, data.propertyId, data.state)
|
|
2324
|
-
: null;
|
|
2325
|
-
return (_jsx(Framed, { translator: _, title: _('hospitality_core.screen.stayNotices.title'), frame: frame, body: stack([
|
|
2326
|
-
stayNoticeFeedback(_, feedbackState),
|
|
2327
|
-
notice({
|
|
2328
|
-
tone: 'info',
|
|
2329
|
-
title: _('hospitality_core.stayNotice.privacy.title'),
|
|
2330
|
-
message: _('hospitality_core.stayNotice.privacy.hint'),
|
|
2331
|
-
}),
|
|
2332
|
-
_jsx(RecordForm, { action: "/admin/hospitality/stay-notices", method: "get", layout: "inline", submit: _('hospitality_core.action.select'), submitVariant: "secondary", hidden: { lang: locale }, fields: [
|
|
2333
|
-
{
|
|
2334
|
-
name: 'property',
|
|
2335
|
-
label: _('hospitality_core.menu.properties'),
|
|
2336
|
-
type: 'select',
|
|
2337
|
-
value: data.propertyId,
|
|
2338
|
-
options: choices(data.properties),
|
|
2339
|
-
required: true,
|
|
2340
|
-
},
|
|
2341
|
-
{
|
|
2342
|
-
name: 'state',
|
|
2343
|
-
label: _('hospitality_core.col.status'),
|
|
2344
|
-
type: 'select',
|
|
2345
|
-
value: data.state,
|
|
2346
|
-
options: ['all', 'attention', 'ready', 'submitted', 'confirmed'].map((value) => ({
|
|
2347
|
-
value,
|
|
2348
|
-
label: _(`hospitality_core.stayNotice.state.${value}`),
|
|
2349
|
-
})),
|
|
2350
|
-
},
|
|
2351
|
-
] }),
|
|
2352
|
-
cardGrid({
|
|
2353
|
-
items: ['attention', 'ready', 'submitted', 'confirmed'].map((state) => ({
|
|
2354
|
-
state,
|
|
2355
|
-
count: Number(counts[state] ?? 0),
|
|
2356
|
-
})),
|
|
2357
|
-
id: (item) => item.state,
|
|
2358
|
-
card: (item) => metric({
|
|
2359
|
-
label: _(`hospitality_core.stayNotice.state.${item.state}`),
|
|
2360
|
-
value: String(item.count),
|
|
2361
|
-
tone: item.state,
|
|
2362
|
-
}),
|
|
2363
|
-
}),
|
|
2364
|
-
...(data.selected
|
|
2365
|
-
? [
|
|
2366
|
-
_jsx(Section, { title: _('hospitality_core.stayNotice.section.selected'), description: _('hospitality_core.stayNotice.section.selectedHint'), body: stack([
|
|
2367
|
-
definitionList({
|
|
2368
|
-
title: data.selected.guestName,
|
|
2369
|
-
items: [
|
|
2370
|
-
{
|
|
2371
|
-
key: 'state',
|
|
2372
|
-
term: _('hospitality_core.col.status'),
|
|
2373
|
-
value: _(`hospitality_core.stayNotice.state.${data.selected.state}`),
|
|
2374
|
-
},
|
|
2375
|
-
{
|
|
2376
|
-
key: 'document',
|
|
2377
|
-
term: _('hospitality_core.stayNotice.col.document'),
|
|
2378
|
-
value: stayNoticeDocument(_, data.selected),
|
|
2379
|
-
},
|
|
2380
|
-
{
|
|
2381
|
-
key: 'reason',
|
|
2382
|
-
term: _('hospitality_core.stayNotice.field.reason'),
|
|
2383
|
-
value: data.selected.reason
|
|
2384
|
-
? _(`hospitality_core.stayNotice.reason.${data.selected.reason}`)
|
|
2385
|
-
: _('hospitality_core.stayNotice.value.missing'),
|
|
2386
|
-
},
|
|
2387
|
-
{
|
|
2388
|
-
key: 'readiness',
|
|
2389
|
-
term: _('hospitality_core.stayNotice.col.readiness'),
|
|
2390
|
-
value: stayNoticeIssues(_, data.selected),
|
|
2391
|
-
},
|
|
2392
|
-
{
|
|
2393
|
-
key: 'evidence',
|
|
2394
|
-
term: _('hospitality_core.stayNotice.field.evidenceRef'),
|
|
2395
|
-
value: data.selected.receiptRef || _('hospitality_core.stayNotice.value.missing'),
|
|
2396
|
-
},
|
|
2397
|
-
],
|
|
2398
|
-
}),
|
|
2399
|
-
action,
|
|
2400
|
-
]) }),
|
|
2401
|
-
]
|
|
2402
|
-
: []),
|
|
2403
|
-
_jsx(Section, { title: _('hospitality_core.stayNotice.section.queue'), description: _('hospitality_core.stayNotice.section.queueHint'), body: visibleRows.length
|
|
2404
|
-
? dataTable(_, {
|
|
2405
|
-
columns: stayNoticeColumns(_, locale, timezone),
|
|
2406
|
-
rows: visibleRows,
|
|
2407
|
-
id: (row) => row.id,
|
|
2408
|
-
rowHref: (row) => stayNoticeHref(locale, data.propertyId, data.state, row.id),
|
|
2409
|
-
})
|
|
2410
|
-
: emptyState(_('hospitality_core.stayNotice.empty.rows'), _('hospitality_core.stayNotice.empty.rowsHint')) }),
|
|
2411
|
-
]) }));
|
|
2412
|
-
};
|
|
2413
|
-
const propertyChargeColumns = (_) => [
|
|
2414
|
-
{
|
|
2415
|
-
key: 'type',
|
|
2416
|
-
label: _('hospitality_core.col.type'),
|
|
2417
|
-
cell: (row) => badge(_(`hospitality_core.propertyCharge.${row.chargeType}`), 'info'),
|
|
2418
|
-
kind: 'status',
|
|
2419
|
-
},
|
|
2420
|
-
{ key: 'name', label: _('hospitality_core.col.name'), cell: (row) => row.name, priority: 'primary' },
|
|
2421
|
-
{
|
|
2422
|
-
key: 'amount',
|
|
2423
|
-
label: _('hospitality_core.col.amount'),
|
|
2424
|
-
cell: (row) => formatMoney(_, row.amount),
|
|
2425
|
-
align: 'end',
|
|
2426
|
-
kind: 'currency',
|
|
2427
|
-
},
|
|
2428
|
-
{
|
|
2429
|
-
key: 'status',
|
|
2430
|
-
label: _('hospitality_core.col.status'),
|
|
2431
|
-
cell: (row) => badge(_(row.active ? 'hospitality_core.value.active' : 'hospitality_core.value.inactive'), row.active ? 'positive' : 'neutral'),
|
|
2432
|
-
kind: 'status',
|
|
2433
|
-
},
|
|
2434
|
-
];
|
|
2435
|
-
const extraLineColumns = (_) => [
|
|
2436
|
-
{
|
|
2437
|
-
key: 'target',
|
|
2438
|
-
label: _('hospitality_core.services.col.target'),
|
|
2439
|
-
cell: (row) => code(row.reservation?.code ?? row.stay?.code ?? row.reservationId ?? row.stayId ?? '—'),
|
|
2440
|
-
kind: 'identifier',
|
|
2441
|
-
},
|
|
2442
|
-
{
|
|
2443
|
-
key: 'service',
|
|
2444
|
-
label: _('hospitality_core.services.col.service'),
|
|
2445
|
-
cell: (row) => `${row.productCode ? `${row.productCode} · ` : ''}${row.description}`,
|
|
2446
|
-
priority: 'primary',
|
|
2447
|
-
},
|
|
2448
|
-
{
|
|
2449
|
-
key: 'recurrence',
|
|
2450
|
-
label: _('hospitality_core.services.col.recurrence'),
|
|
2451
|
-
cell: (row) => badge(_(`hospitality_core.extraRecurrence.${row.recurrence}`), 'info'),
|
|
2452
|
-
kind: 'status',
|
|
2453
|
-
},
|
|
2454
|
-
{
|
|
2455
|
-
key: 'price',
|
|
2456
|
-
label: _('hospitality_core.services.col.unitPrice'),
|
|
2457
|
-
cell: (row) => `${row.quantity} × ${formatMoney(_, row.unitPrice)}`,
|
|
2458
|
-
align: 'end',
|
|
2459
|
-
kind: 'currency',
|
|
2460
|
-
},
|
|
2461
|
-
{
|
|
2462
|
-
key: 'posted',
|
|
2463
|
-
label: _('hospitality_core.services.col.materialized'),
|
|
2464
|
-
cell: (row) => row.materializedCount
|
|
2465
|
-
? badge(_('hospitality_core.services.value.posted', {
|
|
2466
|
-
count: row.materializedCount,
|
|
2467
|
-
amount: formatMoney(_, row.materializedAmount),
|
|
2468
|
-
}), 'positive')
|
|
2469
|
-
: badge(_('hospitality_core.services.value.pending'), 'warning'),
|
|
2470
|
-
kind: 'status',
|
|
2471
|
-
},
|
|
2472
|
-
];
|
|
2473
|
-
const serviceChargeColumns = (_, locale, timezone) => [
|
|
2474
|
-
{
|
|
2475
|
-
key: 'occurredAt',
|
|
2476
|
-
label: _('hospitality_core.col.date'),
|
|
2477
|
-
cell: (row) => row.serviceDate ?? dateTime(row.occurredAt, locale, timezone),
|
|
2478
|
-
kind: 'date',
|
|
2479
|
-
},
|
|
2480
|
-
{
|
|
2481
|
-
key: 'folio',
|
|
2482
|
-
label: _('hospitality_core.services.col.folio'),
|
|
2483
|
-
cell: (row) => code(row.folio?.code ?? row.folioId),
|
|
2484
|
-
kind: 'identifier',
|
|
2485
|
-
},
|
|
2486
|
-
{
|
|
2487
|
-
key: 'service',
|
|
2488
|
-
label: _('hospitality_core.services.col.service'),
|
|
2489
|
-
cell: (row) => row.description,
|
|
2490
|
-
priority: 'primary',
|
|
2491
|
-
},
|
|
2492
|
-
{
|
|
2493
|
-
key: 'quantity',
|
|
2494
|
-
label: _('hospitality_core.col.quantity'),
|
|
2495
|
-
cell: (row) => String(row.quantity),
|
|
2496
|
-
align: 'end',
|
|
2497
|
-
kind: 'number',
|
|
2498
|
-
},
|
|
2499
|
-
{
|
|
2500
|
-
key: 'amount',
|
|
2501
|
-
label: _('hospitality_core.col.amount'),
|
|
2502
|
-
cell: (row) => formatMoney(_, row.amount),
|
|
2503
|
-
align: 'end',
|
|
2504
|
-
kind: 'currency',
|
|
2505
|
-
},
|
|
2506
|
-
{
|
|
2507
|
-
key: 'state',
|
|
2508
|
-
label: _('hospitality_core.col.status'),
|
|
2509
|
-
cell: (row) => badge(_(`hospitality_core.chargeState.${row.state}`), row.state === 'active' ? 'positive' : 'neutral'),
|
|
2510
|
-
kind: 'status',
|
|
2511
|
-
},
|
|
2512
|
-
];
|
|
2513
|
-
export const servicesScreen = (_, data, locale, timezone, frame, state) => {
|
|
2514
|
-
const serviceQuery = new URLSearchParams({ lang: locale });
|
|
2515
|
-
if (data.propertyId)
|
|
2516
|
-
serviceQuery.set('property', data.propertyId);
|
|
2517
|
-
const baseQuery = `?${serviceQuery.toString()}`;
|
|
2518
|
-
const activeCharges = data.charges.filter((row) => row.state === 'active');
|
|
2519
|
-
const totalPosted = activeCharges.reduce((sum, row) => sum + Number(row.amount), 0);
|
|
2520
|
-
const targetOptions = data.targets.map((row) => ({
|
|
2521
|
-
value: `${row.type}:${row.id}`,
|
|
2522
|
-
label: `${row.type === 'reservation' ? _('hospitality_core.services.target.reservation') : _('hospitality_core.services.target.stay')} · ${row.code ? `${row.code} · ` : ''}${row.name}`,
|
|
2523
|
-
}));
|
|
2524
|
-
const productOptions = data.products.map((row) => ({
|
|
2525
|
-
value: row.id,
|
|
2526
|
-
label: `${row.code ? `${row.code} · ` : ''}${row.name} · ${formatMoney(_, row.unitPrice)}`,
|
|
2527
|
-
}));
|
|
2528
|
-
const extraOptions = data.extraLines
|
|
2529
|
-
.filter((row) => row.active)
|
|
2530
|
-
.map((row) => ({
|
|
2531
|
-
value: row.id,
|
|
2532
|
-
label: `${row.description} · ${_(`hospitality_core.extraRecurrence.${row.recurrence}`)}`,
|
|
2533
|
-
}));
|
|
2534
|
-
return (_jsx(Framed, { translator: _, title: _('hospitality_core.screen.services.title'), frame: frame, body: stack([
|
|
2535
|
-
feedback(_, state),
|
|
2536
|
-
_jsx(RecordForm, { action: "/admin/hospitality/services", method: "get", layout: "inline", submit: _('hospitality_core.action.select'), submitVariant: "secondary", hidden: { lang: locale }, fields: [
|
|
2537
|
-
{
|
|
2538
|
-
name: 'property',
|
|
2539
|
-
label: _('hospitality_core.menu.properties'),
|
|
2540
|
-
type: 'select',
|
|
2541
|
-
value: data.propertyId,
|
|
2542
|
-
options: choices(data.properties),
|
|
2543
|
-
required: true,
|
|
2544
|
-
},
|
|
2545
|
-
] }),
|
|
2546
|
-
cardGrid({
|
|
2547
|
-
items: [
|
|
2548
|
-
{
|
|
2549
|
-
id: 'fees',
|
|
2550
|
-
label: _('hospitality_core.services.metric.fees'),
|
|
2551
|
-
value: data.propertyCharges.length,
|
|
2552
|
-
},
|
|
2553
|
-
{
|
|
2554
|
-
id: 'extras',
|
|
2555
|
-
label: _('hospitality_core.services.metric.extras'),
|
|
2556
|
-
value: data.extraLines.length,
|
|
2557
|
-
},
|
|
2558
|
-
{
|
|
2559
|
-
id: 'posted',
|
|
2560
|
-
label: _('hospitality_core.services.metric.posted'),
|
|
2561
|
-
value: activeCharges.length,
|
|
2562
|
-
},
|
|
2563
|
-
{
|
|
2564
|
-
id: 'value',
|
|
2565
|
-
label: _('hospitality_core.services.metric.postedValue'),
|
|
2566
|
-
value: formatMoney(_, totalPosted),
|
|
2567
|
-
},
|
|
2568
|
-
],
|
|
2569
|
-
id: (item) => item.id,
|
|
2570
|
-
card: (item) => metric({ label: item.label, value: String(item.value), tone: item.id }),
|
|
2571
|
-
}),
|
|
2572
|
-
_jsx(Section, { title: _('hospitality_core.services.section.fees'), description: _('hospitality_core.services.section.feesHint'), body: _jsx(FormCluster, { label: _('hospitality_core.services.form.fee'), forms: [
|
|
2573
|
-
_jsx(RecordForm, { action: `/admin/hospitality/services${baseQuery}`, submit: _('hospitality_core.services.action.saveFee'), submitVariant: "secondary", hidden: {
|
|
2574
|
-
operation: 'save-property-charge',
|
|
2575
|
-
id: data.ids.propertyCharge,
|
|
2576
|
-
propertyId: data.propertyId ?? '',
|
|
2577
|
-
}, fields: [
|
|
2578
|
-
{
|
|
2579
|
-
name: 'chargeType',
|
|
2580
|
-
label: _('hospitality_core.col.type'),
|
|
2581
|
-
type: 'select',
|
|
2582
|
-
options: ['parking', 'city_tax', 'internet', 'resort_fee', 'other'].map((value) => ({
|
|
2583
|
-
value,
|
|
2584
|
-
label: _(`hospitality_core.propertyCharge.${value}`),
|
|
2585
|
-
})),
|
|
2586
|
-
required: true,
|
|
2587
|
-
},
|
|
2588
|
-
{ name: 'name', label: _('hospitality_core.col.name'), required: true },
|
|
2589
|
-
{
|
|
2590
|
-
name: 'amount',
|
|
2591
|
-
label: _('hospitality_core.col.amount'),
|
|
2592
|
-
type: 'decimal',
|
|
2593
|
-
required: true,
|
|
2594
|
-
},
|
|
2595
|
-
{
|
|
2596
|
-
name: 'description',
|
|
2597
|
-
label: _('hospitality_core.services.field.description'),
|
|
2598
|
-
type: 'textarea',
|
|
2599
|
-
span: 'full',
|
|
2600
|
-
},
|
|
2601
|
-
{
|
|
2602
|
-
name: 'active',
|
|
2603
|
-
label: _('hospitality_core.field.active'),
|
|
2604
|
-
type: 'checkbox',
|
|
2605
|
-
value: true,
|
|
2606
|
-
},
|
|
2607
|
-
] }),
|
|
2608
|
-
] }) }),
|
|
2609
|
-
data.propertyCharges.length
|
|
2610
|
-
? dataTable(_, {
|
|
2611
|
-
columns: propertyChargeColumns(_),
|
|
2612
|
-
rows: data.propertyCharges,
|
|
2613
|
-
id: (row) => row.id,
|
|
2614
|
-
})
|
|
2615
|
-
: emptyState(_('hospitality_core.services.empty.fees'), _('hospitality_core.services.empty.feesHint')),
|
|
2616
|
-
_jsx(Section, { title: _('hospitality_core.services.section.intentions'), description: _('hospitality_core.services.section.intentionsHint'), body: data.targets.length && data.products.length ? (_jsx(FormCluster, { label: _('hospitality_core.services.form.intention'), forms: [
|
|
2617
|
-
_jsx(RecordForm, { action: `/admin/hospitality/services${baseQuery}`, submit: _('hospitality_core.services.action.addIntention'), submitVariant: "primary", hidden: {
|
|
2618
|
-
operation: 'save-extra-line',
|
|
2619
|
-
id: data.ids.extraLine,
|
|
2620
|
-
}, fields: [
|
|
2621
|
-
{
|
|
2622
|
-
name: 'target',
|
|
2623
|
-
label: _('hospitality_core.services.field.target'),
|
|
2624
|
-
type: 'select',
|
|
2625
|
-
options: targetOptions,
|
|
2626
|
-
required: true,
|
|
2627
|
-
},
|
|
2628
|
-
{
|
|
2629
|
-
name: 'productId',
|
|
2630
|
-
label: _('hospitality_core.services.field.product'),
|
|
2631
|
-
type: 'select',
|
|
2632
|
-
options: productOptions,
|
|
2633
|
-
required: true,
|
|
2634
|
-
},
|
|
2635
|
-
{
|
|
2636
|
-
name: 'description',
|
|
2637
|
-
label: _('hospitality_core.services.field.description'),
|
|
2638
|
-
placeholder: _('hospitality_core.services.field.descriptionHint'),
|
|
2639
|
-
},
|
|
2640
|
-
{
|
|
2641
|
-
name: 'quantity',
|
|
2642
|
-
label: _('hospitality_core.col.quantity'),
|
|
2643
|
-
type: 'decimal',
|
|
2644
|
-
value: 1,
|
|
2645
|
-
required: true,
|
|
2646
|
-
},
|
|
2647
|
-
{
|
|
2648
|
-
name: 'unitPrice',
|
|
2649
|
-
label: _('hospitality_core.services.col.unitPrice'),
|
|
2650
|
-
type: 'decimal',
|
|
2651
|
-
help: _('hospitality_core.services.field.unitPriceHint'),
|
|
2652
|
-
},
|
|
2653
|
-
{
|
|
2654
|
-
name: 'recurrence',
|
|
2655
|
-
label: _('hospitality_core.services.col.recurrence'),
|
|
2656
|
-
type: 'select',
|
|
2657
|
-
options: ['once', 'per_night', 'per_unit'].map((value) => ({
|
|
2658
|
-
value,
|
|
2659
|
-
label: _(`hospitality_core.extraRecurrence.${value}`),
|
|
2660
|
-
})),
|
|
2661
|
-
required: true,
|
|
2662
|
-
},
|
|
2663
|
-
{
|
|
2664
|
-
name: 'active',
|
|
2665
|
-
label: _('hospitality_core.field.active'),
|
|
2666
|
-
type: 'checkbox',
|
|
2667
|
-
value: true,
|
|
2668
|
-
},
|
|
2669
|
-
] }),
|
|
2670
|
-
] })) : (emptyState(_('hospitality_core.services.empty.catalogue'), _('hospitality_core.services.empty.catalogueHint'))) }),
|
|
2671
|
-
data.extraLines.length
|
|
2672
|
-
? dataTable(_, { columns: extraLineColumns(_), rows: data.extraLines, id: (row) => row.id })
|
|
2673
|
-
: emptyState(_('hospitality_core.services.empty.intentions'), _('hospitality_core.services.empty.intentionsHint')),
|
|
2674
|
-
_jsx(Section, { title: _('hospitality_core.services.section.post'), description: _('hospitality_core.services.section.postHint'), body: extraOptions.length ? (_jsx(RecordForm, { action: `/admin/hospitality/services${baseQuery}`, submit: _('hospitality_core.services.action.post'), submitVariant: "primary", hidden: { operation: 'materialize-extra', requestKey: data.ids.requestKey }, fields: [
|
|
2675
|
-
{
|
|
2676
|
-
name: 'id',
|
|
2677
|
-
label: _('hospitality_core.services.field.intention'),
|
|
2678
|
-
type: 'select',
|
|
2679
|
-
options: extraOptions,
|
|
2680
|
-
required: true,
|
|
2681
|
-
},
|
|
2682
|
-
{
|
|
2683
|
-
name: 'serviceDate',
|
|
2684
|
-
label: _('hospitality_core.services.field.serviceDate'),
|
|
2685
|
-
type: 'date',
|
|
2686
|
-
help: _('hospitality_core.services.field.serviceDateHint'),
|
|
2687
|
-
},
|
|
2688
|
-
{
|
|
2689
|
-
name: 'quantity',
|
|
2690
|
-
label: _('hospitality_core.col.quantity'),
|
|
2691
|
-
type: 'decimal',
|
|
2692
|
-
help: _('hospitality_core.services.field.postQuantityHint'),
|
|
2693
|
-
},
|
|
2694
|
-
] })) : (emptyState(_('hospitality_core.services.empty.post'), _('hospitality_core.services.empty.postHint'))) }),
|
|
2695
|
-
_jsx(Section, { title: _('hospitality_core.services.section.ledger'), description: _('hospitality_core.services.section.ledgerHint'), body: data.charges.length
|
|
2696
|
-
? dataTable(_, {
|
|
2697
|
-
columns: serviceChargeColumns(_, locale, timezone),
|
|
2698
|
-
rows: data.charges,
|
|
2699
|
-
id: (row) => row.id,
|
|
2700
|
-
})
|
|
2701
|
-
: emptyState(_('hospitality_core.services.empty.ledger'), _('hospitality_core.services.empty.ledgerHint')) }),
|
|
2702
|
-
]) }));
|
|
2703
|
-
};
|
|
2704
|
-
export const ratePlansScreen = (_, rows, properties, roomTypes, propertyId, frame, state) => (_jsx(Framed, { translator: _, title: _('hospitality_core.screen.ratePlans.title'), frame: frame, body: stack([
|
|
2705
|
-
feedback(_, state),
|
|
2706
|
-
_jsx(RecordForm, { action: "/admin/hospitality/rate-plans", method: "get", layout: "inline", submit: _('hospitality_core.action.select'), submitVariant: "secondary", fields: [
|
|
2707
|
-
{
|
|
2708
|
-
name: 'property',
|
|
2709
|
-
label: _('hospitality_core.menu.properties'),
|
|
2710
|
-
type: 'select',
|
|
2711
|
-
value: propertyId,
|
|
2712
|
-
options: choices(properties),
|
|
2713
|
-
required: true,
|
|
2714
|
-
},
|
|
2715
|
-
] }),
|
|
2716
|
-
_jsx(Section, { title: _('hospitality_core.screen.ratePlans.create'), description: _('hospitality_core.screen.ratePlans.createHint'), body: roomTypes.length ? (_jsx(RecordForm, { action: `/admin/hospitality/rate-plans${propertyId ? `?property=${encodeURIComponent(propertyId)}` : ''}`, method: "post", submit: _('hospitality_core.action.saveRatePlan'), submitVariant: "primary", hidden: { operation: 'save-rate-plan', propertyId: propertyId ?? '' }, fields: [
|
|
2717
|
-
{
|
|
2718
|
-
name: 'roomTypeId',
|
|
2719
|
-
label: _('hospitality_core.col.roomType'),
|
|
2720
|
-
type: 'select',
|
|
2721
|
-
options: choices(roomTypes),
|
|
2722
|
-
required: true,
|
|
2723
|
-
},
|
|
2724
|
-
{ name: 'code', label: _('hospitality_core.col.code'), required: true },
|
|
2725
|
-
{ name: 'name', label: _('hospitality_core.col.name'), required: true },
|
|
2726
|
-
{
|
|
2727
|
-
name: 'rateType',
|
|
2728
|
-
label: _('hospitality_core.col.rateType'),
|
|
2729
|
-
type: 'select',
|
|
2730
|
-
value: 'nightly',
|
|
2731
|
-
options: ['nightly', 'hourly', 'weekly', 'monthly'].map((value) => ({
|
|
2732
|
-
value,
|
|
2733
|
-
label: _(`hospitality_core.bookingType.${value}`),
|
|
2734
|
-
})),
|
|
2735
|
-
required: true,
|
|
2736
|
-
},
|
|
2737
|
-
{ name: 'amount', label: _('hospitality_core.col.amount'), type: 'decimal', required: true },
|
|
2738
|
-
{
|
|
2739
|
-
name: 'mealPlan',
|
|
2740
|
-
label: _('hospitality_core.col.mealPlan'),
|
|
2741
|
-
type: 'select',
|
|
2742
|
-
options: [
|
|
2743
|
-
{ value: '', label: '—' },
|
|
2744
|
-
...['RO', 'BB', 'HB', 'FB', 'AI'].map((value) => ({
|
|
2745
|
-
value,
|
|
2746
|
-
label: _(`hospitality_core.mealPlan.${value}`),
|
|
2747
|
-
})),
|
|
2748
|
-
],
|
|
2749
|
-
},
|
|
2750
|
-
{ name: 'minStay', label: _('hospitality_core.field.minStay'), type: 'number', value: 0 },
|
|
2751
|
-
{ name: 'maxStay', label: _('hospitality_core.field.maxStay'), type: 'number', value: 0 },
|
|
2752
|
-
{
|
|
2753
|
-
name: 'isDefault',
|
|
2754
|
-
label: _('hospitality_core.field.isDefault'),
|
|
2755
|
-
type: 'checkbox',
|
|
2756
|
-
help: _('hospitality_core.field.isDefaultHint'),
|
|
2757
|
-
},
|
|
2758
|
-
{ name: 'active', label: _('hospitality_core.field.active'), type: 'checkbox', value: true },
|
|
2759
|
-
] })) : (emptyState(_('hospitality_core.screen.ratePlans.noRoomTypes'), _('hospitality_core.screen.ratePlans.noRoomTypesHint'))) }),
|
|
2760
|
-
_jsx(Section, { title: _('hospitality_core.screen.ratePlans.list'), body: rows.length
|
|
2761
|
-
? dataTable(_, { columns: ratePlanColumns(_), rows, id: (row) => row.id })
|
|
2762
|
-
: emptyState(_('hospitality_core.screen.ratePlans.empty'), _('hospitality_core.screen.ratePlans.emptyHint')) }),
|
|
2763
|
-
]) }));
|
|
2764
|
-
export const inventoryScreen = (_, rows, properties, roomTypes, selected, frame, state) => {
|
|
2765
|
-
const selectedRoomTypes = roomTypes.filter((row) => row.propertyId === selected.propertyId);
|
|
2766
|
-
const hidden = {
|
|
2767
|
-
propertyId: selected.propertyId ?? '',
|
|
2768
|
-
roomTypeId: selected.roomTypeId ?? '',
|
|
2769
|
-
};
|
|
2770
|
-
return (_jsx(Framed, { translator: _, title: _('hospitality_core.screen.inventory.title'), frame: frame, body: stack([
|
|
2771
|
-
feedback(_, state),
|
|
2772
|
-
_jsx(FormCluster, { label: _('hospitality_core.screen.inventory.filters'), forms: [
|
|
2773
|
-
_jsx(RecordForm, { action: "/admin/hospitality/inventory", method: "get", layout: "inline", submit: _('hospitality_core.action.select'), submitVariant: "secondary", hidden: { from: selected.from, to: selected.to }, fields: [
|
|
2774
|
-
{
|
|
2775
|
-
name: 'property',
|
|
2776
|
-
label: _('hospitality_core.menu.properties'),
|
|
2777
|
-
type: 'select',
|
|
2778
|
-
value: selected.propertyId,
|
|
2779
|
-
options: choices(properties),
|
|
2780
|
-
required: true,
|
|
2781
|
-
},
|
|
2782
|
-
{
|
|
2783
|
-
name: 'roomType',
|
|
2784
|
-
label: _('hospitality_core.col.roomType'),
|
|
2785
|
-
type: 'select',
|
|
2786
|
-
value: selected.roomTypeId,
|
|
2787
|
-
options: choices(selectedRoomTypes),
|
|
2788
|
-
required: true,
|
|
2789
|
-
},
|
|
2790
|
-
] }),
|
|
2791
|
-
datePicker({
|
|
2792
|
-
action: '/admin/hospitality/inventory',
|
|
2793
|
-
label: _('hospitality_core.screen.inventory.dateRange'),
|
|
2794
|
-
fields: [
|
|
2795
|
-
{
|
|
2796
|
-
name: 'from',
|
|
2797
|
-
label: _('hospitality_core.field.from'),
|
|
2798
|
-
value: selected.from,
|
|
2799
|
-
required: true,
|
|
2800
|
-
},
|
|
2801
|
-
{ name: 'to', label: _('hospitality_core.field.to'), value: selected.to, required: true },
|
|
2802
|
-
],
|
|
2803
|
-
hidden: {
|
|
2804
|
-
property: selected.propertyId ?? '',
|
|
2805
|
-
roomType: selected.roomTypeId ?? '',
|
|
2806
|
-
},
|
|
2807
|
-
submit: _('hospitality_core.action.apply'),
|
|
2808
|
-
}),
|
|
2809
|
-
] }),
|
|
2810
|
-
cardGrid({
|
|
2811
|
-
items: [
|
|
2812
|
-
{ id: 'days', label: _('hospitality_core.metric.inventoryDays'), value: rows.length },
|
|
2813
|
-
{
|
|
2814
|
-
id: 'available',
|
|
2815
|
-
label: _('hospitality_core.metric.minimumAvailable'),
|
|
2816
|
-
value: rows.length ? Math.min(...rows.map((row) => row.available)) : 0,
|
|
2817
|
-
},
|
|
2818
|
-
{
|
|
2819
|
-
id: 'sold',
|
|
2820
|
-
label: _('hospitality_core.metric.sold'),
|
|
2821
|
-
value: rows.reduce((sum, row) => sum + row.sold, 0),
|
|
2822
|
-
},
|
|
2823
|
-
{
|
|
2824
|
-
id: 'blocked',
|
|
2825
|
-
label: _('hospitality_core.metric.blocked'),
|
|
2826
|
-
value: rows.reduce((sum, row) => sum + row.blocked, 0),
|
|
2827
|
-
},
|
|
2828
|
-
],
|
|
2829
|
-
id: (item) => item.id,
|
|
2830
|
-
card: (item) => metric({ label: item.label, value: String(item.value), tone: item.id }),
|
|
2831
|
-
}),
|
|
2832
|
-
_jsx(Section, { title: _('hospitality_core.screen.inventory.allotment'), description: _('hospitality_core.screen.inventory.allotmentHint'), body: selected.roomTypeId ? (_jsx(RecordForm, { action: "/admin/hospitality/inventory", method: "post", submit: _('hospitality_core.action.updateAllotment'), submitVariant: "primary", hidden: { ...hidden, operation: 'set-inventory' }, fields: [
|
|
2833
|
-
{
|
|
2834
|
-
name: 'from',
|
|
2835
|
-
label: _('hospitality_core.field.from'),
|
|
2836
|
-
type: 'date',
|
|
2837
|
-
value: selected.from,
|
|
2838
|
-
required: true,
|
|
2839
|
-
},
|
|
2840
|
-
{
|
|
2841
|
-
name: 'to',
|
|
2842
|
-
label: _('hospitality_core.field.to'),
|
|
2843
|
-
type: 'date',
|
|
2844
|
-
value: selected.to,
|
|
2845
|
-
required: true,
|
|
2846
|
-
},
|
|
2847
|
-
{ name: 'total', label: _('hospitality_core.col.total'), type: 'number', required: true },
|
|
2848
|
-
{ name: 'blocked', label: _('hospitality_core.col.blocked'), type: 'number' },
|
|
2849
|
-
] })) : (emptyState(_('hospitality_core.screen.inventory.noRoomType'), _('hospitality_core.screen.inventory.noRoomTypeHint'))) }),
|
|
2850
|
-
_jsx(Section, { title: _('hospitality_core.screen.inventory.restrictions'), description: _('hospitality_core.screen.inventory.restrictionsHint'), body: selected.roomTypeId ? (_jsx(RecordForm, { action: "/admin/hospitality/inventory", method: "post", submit: _('hospitality_core.action.updateRestrictions'), submitVariant: "secondary", hidden: { ...hidden, operation: 'set-restrictions' }, fields: [
|
|
2851
|
-
{
|
|
2852
|
-
name: 'from',
|
|
2853
|
-
label: _('hospitality_core.field.from'),
|
|
2854
|
-
type: 'date',
|
|
2855
|
-
value: selected.from,
|
|
2856
|
-
required: true,
|
|
2857
|
-
},
|
|
2858
|
-
{
|
|
2859
|
-
name: 'to',
|
|
2860
|
-
label: _('hospitality_core.field.to'),
|
|
2861
|
-
type: 'date',
|
|
2862
|
-
value: selected.to,
|
|
2863
|
-
required: true,
|
|
2864
|
-
},
|
|
2865
|
-
{ name: 'minLos', label: _('hospitality_core.field.minLos'), type: 'number', value: 0 },
|
|
2866
|
-
{ name: 'maxLos', label: _('hospitality_core.field.maxLos'), type: 'number', value: 0 },
|
|
2867
|
-
{ name: 'stopSell', label: _('hospitality_core.restriction.stopSell'), type: 'checkbox' },
|
|
2868
|
-
{ name: 'closedToArrival', label: _('hospitality_core.restriction.cta'), type: 'checkbox' },
|
|
2869
|
-
{
|
|
2870
|
-
name: 'closedToDeparture',
|
|
2871
|
-
label: _('hospitality_core.restriction.ctd'),
|
|
2872
|
-
type: 'checkbox',
|
|
2873
|
-
},
|
|
2874
|
-
] })) : null }),
|
|
2875
|
-
rows.length
|
|
2876
|
-
? dataTable(_, { columns: inventoryColumns(_), rows, id: (row) => row.id })
|
|
2877
|
-
: emptyState(_('hospitality_core.screen.inventory.empty'), _('hospitality_core.screen.inventory.emptyHint')),
|
|
2878
|
-
]) }));
|
|
2879
|
-
};
|
|
2880
|
-
const reservationColumns = (_, locale, timezone) => [
|
|
2881
|
-
{
|
|
2882
|
-
key: 'code',
|
|
2883
|
-
label: _('hospitality_core.col.code'),
|
|
2884
|
-
cell: (row) => linkButton({
|
|
2885
|
-
label: row.code,
|
|
2886
|
-
href: `/admin/hospitality/reservations/${encodeURIComponent(row.id)}?lang=${encodeURIComponent(locale)}`,
|
|
2887
|
-
variant: 'tertiary',
|
|
2888
|
-
size: 'compact',
|
|
2889
|
-
}),
|
|
2890
|
-
kind: 'identifier',
|
|
2891
|
-
},
|
|
2892
|
-
{
|
|
2893
|
-
key: 'guest',
|
|
2894
|
-
label: _('hospitality_core.col.guest'),
|
|
2895
|
-
cell: (row) => person(guestName(row)),
|
|
2896
|
-
kind: 'person',
|
|
2897
|
-
priority: 'primary',
|
|
2898
|
-
},
|
|
2899
|
-
{
|
|
2900
|
-
key: 'provider',
|
|
2901
|
-
label: _('hospitality_core.col.provider'),
|
|
2902
|
-
cell: (row) => badge(providerName(_, row.provider), 'neutral'),
|
|
2903
|
-
kind: 'status',
|
|
2904
|
-
},
|
|
2905
|
-
{
|
|
2906
|
-
key: 'roomType',
|
|
2907
|
-
label: _('hospitality_core.col.roomType'),
|
|
2908
|
-
cell: (row) => row.roomType?.name ?? code(row.roomTypeId),
|
|
2909
|
-
},
|
|
2910
|
-
{
|
|
2911
|
-
key: 'checkIn',
|
|
2912
|
-
label: _('hospitality_core.col.checkIn'),
|
|
2913
|
-
cell: (row) => dateTime(row.checkIn, locale, timezone),
|
|
2914
|
-
kind: 'date',
|
|
2915
|
-
},
|
|
2916
|
-
{
|
|
2917
|
-
key: 'checkOut',
|
|
2918
|
-
label: _('hospitality_core.col.checkOut'),
|
|
2919
|
-
cell: (row) => dateTime(row.checkOut, locale, timezone),
|
|
2920
|
-
kind: 'date',
|
|
2921
|
-
},
|
|
2922
|
-
{
|
|
2923
|
-
key: 'amount',
|
|
2924
|
-
label: _('hospitality_core.col.amount'),
|
|
2925
|
-
cell: (row) => formatMoney(_, row.amountTotal),
|
|
2926
|
-
align: 'end',
|
|
2927
|
-
kind: 'currency',
|
|
2928
|
-
},
|
|
2929
|
-
{
|
|
2930
|
-
key: 'status',
|
|
2931
|
-
label: _('hospitality_core.col.status'),
|
|
2932
|
-
cell: (row) => badge(_(`hospitality_core.reservationState.${row.state}`), workflowTone(row.state), row.state),
|
|
2933
|
-
kind: 'status',
|
|
2934
|
-
priority: 'primary',
|
|
2935
|
-
},
|
|
2936
|
-
];
|
|
2937
|
-
const stayColumns = (_, locale, timezone) => [
|
|
2938
|
-
{
|
|
2939
|
-
key: 'code',
|
|
2940
|
-
label: _('hospitality_core.col.code'),
|
|
2941
|
-
cell: (row) => linkButton({
|
|
2942
|
-
label: row.code,
|
|
2943
|
-
href: `/admin/hospitality/stays/${encodeURIComponent(row.id)}?lang=${encodeURIComponent(locale)}`,
|
|
2944
|
-
variant: 'tertiary',
|
|
2945
|
-
size: 'compact',
|
|
2946
|
-
}),
|
|
2947
|
-
kind: 'identifier',
|
|
2948
|
-
},
|
|
2949
|
-
{
|
|
2950
|
-
key: 'guest',
|
|
2951
|
-
label: _('hospitality_core.col.guest'),
|
|
2952
|
-
cell: (row) => person(guestName(row)),
|
|
2953
|
-
kind: 'person',
|
|
2954
|
-
priority: 'primary',
|
|
2955
|
-
},
|
|
2956
|
-
{
|
|
2957
|
-
key: 'room',
|
|
2958
|
-
label: _('hospitality_core.col.room'),
|
|
2959
|
-
cell: (row) => row.currentRoom?.name ?? row.currentRoom?.code ?? '—',
|
|
2960
|
-
},
|
|
2961
|
-
{
|
|
2962
|
-
key: 'checkIn',
|
|
2963
|
-
label: _('hospitality_core.col.checkIn'),
|
|
2964
|
-
cell: (row) => dateTime(row.checkIn, locale, timezone),
|
|
2965
|
-
kind: 'date',
|
|
2966
|
-
},
|
|
2967
|
-
{
|
|
2968
|
-
key: 'checkOut',
|
|
2969
|
-
label: _('hospitality_core.col.checkOut'),
|
|
2970
|
-
cell: (row) => dateTime(row.checkOut, locale, timezone),
|
|
2971
|
-
kind: 'date',
|
|
2972
|
-
},
|
|
2973
|
-
{
|
|
2974
|
-
key: 'guests',
|
|
2975
|
-
label: _('hospitality_core.col.guests'),
|
|
2976
|
-
cell: (row) => String(row.adults + row.children),
|
|
2977
|
-
align: 'end',
|
|
2978
|
-
kind: 'number',
|
|
2979
|
-
},
|
|
2980
|
-
{
|
|
2981
|
-
key: 'status',
|
|
2982
|
-
label: _('hospitality_core.col.status'),
|
|
2983
|
-
cell: (row) => badge(_(`hospitality_core.stayState.${row.state}`), workflowTone(row.state), row.state),
|
|
2984
|
-
kind: 'status',
|
|
2985
|
-
priority: 'primary',
|
|
2986
|
-
},
|
|
2987
|
-
];
|
|
2988
|
-
const folioColumns = (_, locale, timezone) => [
|
|
2989
|
-
{
|
|
2990
|
-
key: 'code',
|
|
2991
|
-
label: _('hospitality_core.col.code'),
|
|
2992
|
-
cell: (row) => linkButton({
|
|
2993
|
-
label: row.code,
|
|
2994
|
-
href: `/admin/hospitality/folios/${encodeURIComponent(row.id)}?lang=${encodeURIComponent(locale)}`,
|
|
2995
|
-
variant: 'tertiary',
|
|
2996
|
-
size: 'compact',
|
|
2997
|
-
}),
|
|
2998
|
-
kind: 'identifier',
|
|
2999
|
-
},
|
|
3000
|
-
{
|
|
3001
|
-
key: 'guest',
|
|
3002
|
-
label: _('hospitality_core.col.guest'),
|
|
3003
|
-
cell: (row) => person(guestName(row)),
|
|
3004
|
-
kind: 'person',
|
|
3005
|
-
priority: 'primary',
|
|
3006
|
-
},
|
|
3007
|
-
{
|
|
3008
|
-
key: 'opened',
|
|
3009
|
-
label: _('hospitality_core.col.checkIn'),
|
|
3010
|
-
cell: (row) => dateTime(row.openedAt, locale, timezone),
|
|
3011
|
-
kind: 'date',
|
|
3012
|
-
},
|
|
3013
|
-
{
|
|
3014
|
-
key: 'stays',
|
|
3015
|
-
label: _('hospitality_core.col.stays'),
|
|
3016
|
-
cell: (row) => String(row.stays?.length ?? 0),
|
|
3017
|
-
align: 'end',
|
|
3018
|
-
kind: 'number',
|
|
3019
|
-
},
|
|
3020
|
-
{
|
|
3021
|
-
key: 'amount',
|
|
3022
|
-
label: _('hospitality_core.col.amount'),
|
|
3023
|
-
cell: (row) => formatMoney(_, row.amountTotal),
|
|
3024
|
-
align: 'end',
|
|
3025
|
-
kind: 'currency',
|
|
3026
|
-
},
|
|
3027
|
-
{
|
|
3028
|
-
key: 'status',
|
|
3029
|
-
label: _('hospitality_core.col.status'),
|
|
3030
|
-
cell: (row) => badge(_(`hospitality_core.folioState.${row.state}`), workflowTone(row.state), row.state),
|
|
3031
|
-
kind: 'status',
|
|
3032
|
-
priority: 'primary',
|
|
3033
|
-
},
|
|
3034
|
-
];
|
|
3035
|
-
const folioChargeColumns = (_, locale, timezone, stays) => [
|
|
3036
|
-
{
|
|
3037
|
-
key: 'occurred',
|
|
3038
|
-
label: _('hospitality_core.folio.charge.occurredAt'),
|
|
3039
|
-
cell: (row) => dateTime(row.occurredAt, locale, timezone),
|
|
3040
|
-
kind: 'date',
|
|
3041
|
-
},
|
|
3042
|
-
{
|
|
3043
|
-
key: 'description',
|
|
3044
|
-
label: _('hospitality_core.folio.charge.description'),
|
|
3045
|
-
cell: (row) => row.type === 'room' && row.description.startsWith('room:')
|
|
3046
|
-
? _('hospitality_core.folio.charge.roomDescription')
|
|
3047
|
-
: row.description,
|
|
3048
|
-
priority: 'primary',
|
|
3049
|
-
},
|
|
3050
|
-
{
|
|
3051
|
-
key: 'type',
|
|
3052
|
-
label: _('hospitality_core.folio.charge.type'),
|
|
3053
|
-
cell: (row) => badge(_(`hospitality_core.charge.${row.type}`), 'info', row.type),
|
|
3054
|
-
kind: 'status',
|
|
3055
|
-
},
|
|
3056
|
-
{
|
|
3057
|
-
key: 'stay',
|
|
3058
|
-
label: _('hospitality_core.col.stays'),
|
|
3059
|
-
cell: (row) => (row.stayId ? code(stays.get(row.stayId)?.code ?? row.stayId) : '—'),
|
|
3060
|
-
},
|
|
3061
|
-
{
|
|
3062
|
-
key: 'quantity',
|
|
3063
|
-
label: _('hospitality_core.folio.charge.quantity'),
|
|
3064
|
-
cell: (row) => String(row.quantity),
|
|
3065
|
-
align: 'end',
|
|
3066
|
-
kind: 'number',
|
|
3067
|
-
},
|
|
3068
|
-
{
|
|
3069
|
-
key: 'unit-price',
|
|
3070
|
-
label: _('hospitality_core.folio.charge.unitPrice'),
|
|
3071
|
-
cell: (row) => formatMoney(_, row.unitPrice),
|
|
3072
|
-
align: 'end',
|
|
3073
|
-
kind: 'currency',
|
|
3074
|
-
},
|
|
3075
|
-
{
|
|
3076
|
-
key: 'amount',
|
|
3077
|
-
label: _('hospitality_core.col.amount'),
|
|
3078
|
-
cell: (row) => formatMoney(_, row.amount),
|
|
3079
|
-
align: 'end',
|
|
3080
|
-
kind: 'currency',
|
|
3081
|
-
},
|
|
3082
|
-
{
|
|
3083
|
-
key: 'correction',
|
|
3084
|
-
label: _('hospitality_core.folio.field.voidReason'),
|
|
3085
|
-
cell: (row) => row.voidReason || '—',
|
|
3086
|
-
},
|
|
3087
|
-
{
|
|
3088
|
-
key: 'status',
|
|
3089
|
-
label: _('hospitality_core.col.status'),
|
|
3090
|
-
cell: (row) => badge(_(`hospitality_core.chargeState.${row.state}`), row.state === 'active' ? 'positive' : 'neutral', row.state),
|
|
3091
|
-
kind: 'status',
|
|
3092
|
-
},
|
|
3093
|
-
];
|
|
3094
|
-
const folioStayColumns = (_, locale, timezone) => [
|
|
3095
|
-
{
|
|
3096
|
-
key: 'code',
|
|
3097
|
-
label: _('hospitality_core.col.code'),
|
|
3098
|
-
cell: (row) => linkButton({
|
|
3099
|
-
label: row.code,
|
|
3100
|
-
href: `/admin/hospitality/stays/${encodeURIComponent(row.id)}?lang=${encodeURIComponent(locale)}`,
|
|
3101
|
-
variant: 'tertiary',
|
|
3102
|
-
size: 'compact',
|
|
3103
|
-
}),
|
|
3104
|
-
kind: 'identifier',
|
|
3105
|
-
priority: 'primary',
|
|
3106
|
-
},
|
|
3107
|
-
{
|
|
3108
|
-
key: 'check-in',
|
|
3109
|
-
label: _('hospitality_core.col.checkIn'),
|
|
3110
|
-
cell: (row) => dateTime(row.checkIn, locale, timezone),
|
|
3111
|
-
kind: 'date',
|
|
3112
|
-
},
|
|
3113
|
-
{
|
|
3114
|
-
key: 'check-out',
|
|
3115
|
-
label: _('hospitality_core.col.checkOut'),
|
|
3116
|
-
cell: (row) => dateTime(row.checkOut, locale, timezone),
|
|
3117
|
-
kind: 'date',
|
|
3118
|
-
},
|
|
3119
|
-
{
|
|
3120
|
-
key: 'status',
|
|
3121
|
-
label: _('hospitality_core.col.status'),
|
|
3122
|
-
cell: (row) => badge(_(`hospitality_core.stayState.${row.state}`), workflowTone(row.state), row.state),
|
|
3123
|
-
kind: 'status',
|
|
3124
|
-
},
|
|
3125
|
-
];
|
|
3126
|
-
export const frontDeskScreen = (_, rows, overdueRows, totals, locale, timezone, frame) => (_jsx(Framed, { translator: _, title: _('hospitality_core.screen.frontDesk.title'), frame: frame, body: stack([
|
|
3127
|
-
cardGrid({
|
|
3128
|
-
items: [
|
|
3129
|
-
{ id: 'arrivals', label: _('hospitality_core.metric.arrivals'), value: totals.arrivals },
|
|
3130
|
-
{ id: 'in-house', label: _('hospitality_core.metric.inHouse'), value: totals.inHouse },
|
|
3131
|
-
{ id: 'departures', label: _('hospitality_core.metric.departures'), value: totals.departures },
|
|
3132
|
-
{ id: 'overdue', label: _('hospitality_core.metric.overdue'), value: totals.overdue },
|
|
3133
|
-
{ id: 'folios', label: _('hospitality_core.metric.openFolios'), value: totals.openFolios },
|
|
3134
|
-
],
|
|
3135
|
-
id: (item) => item.id,
|
|
3136
|
-
card: (item) => metric({ label: item.label, value: String(item.value), tone: item.id }),
|
|
3137
|
-
}),
|
|
3138
|
-
overdueRows.length ? (_jsx(Section, { title: _('hospitality_core.screen.frontDesk.overdue'), description: _('hospitality_core.screen.frontDesk.overdueHint', {
|
|
3139
|
-
count: overdueRows.length,
|
|
3140
|
-
}), body: dataTable(_, {
|
|
3141
|
-
columns: stayColumns(_, locale, timezone),
|
|
3142
|
-
rows: overdueRows,
|
|
3143
|
-
id: (row) => row.id,
|
|
3144
|
-
}) })) : null,
|
|
3145
|
-
rows.length
|
|
3146
|
-
? dataTable(_, { columns: stayColumns(_, locale, timezone), rows, id: (row) => row.id })
|
|
3147
|
-
: emptyState(_('hospitality_core.screen.frontDesk.empty'), _('hospitality_core.screen.frontDesk.emptyHint')),
|
|
3148
|
-
]) }));
|
|
3149
|
-
const reservationFeedback = (_, status) => {
|
|
3150
|
-
if (status === 'saved')
|
|
3151
|
-
return notice({
|
|
3152
|
-
title: _('hospitality_core.reservation.feedback.saved'),
|
|
3153
|
-
message: _('hospitality_core.reservation.feedback.savedHint'),
|
|
3154
|
-
tone: 'positive',
|
|
3155
|
-
});
|
|
3156
|
-
if (status === 'quoted')
|
|
3157
|
-
return notice({
|
|
3158
|
-
title: _('hospitality_core.reservation.feedback.quoted'),
|
|
3159
|
-
message: _('hospitality_core.reservation.feedback.quotedHint'),
|
|
3160
|
-
tone: 'info',
|
|
3161
|
-
});
|
|
3162
|
-
if (status === 'invalid')
|
|
3163
|
-
return notice({
|
|
3164
|
-
title: _('hospitality_core.feedback.invalid'),
|
|
3165
|
-
message: _('hospitality_core.reservation.feedback.invalidHint'),
|
|
3166
|
-
tone: 'danger',
|
|
3167
|
-
});
|
|
3168
|
-
return null;
|
|
3169
|
-
};
|
|
3170
|
-
export const reservationsScreen = (_, data, locale, timezone, frame, status) => {
|
|
3171
|
-
const errors = (data.quote?.errors ?? []).map((error) => error.messageKey ? _(error.messageKey, error.params) : _('hospitality_core.feedback.invalid'));
|
|
3172
|
-
const quote = data.quote?.ok ? data.quote : null;
|
|
3173
|
-
return (_jsx(Framed, { translator: _, title: _('hospitality_core.screen.reservations.title'), frame: frame, body: stack([
|
|
3174
|
-
reservationFeedback(_, status),
|
|
3175
|
-
_jsx(RecordForm, { action: "/admin/hospitality/reservations", method: "get", layout: "inline", submit: _('hospitality_core.action.select'), submitVariant: "secondary", hidden: { lang: locale }, fields: [
|
|
3176
|
-
{
|
|
3177
|
-
name: 'property',
|
|
3178
|
-
label: _('hospitality_core.reservation.field.property'),
|
|
3179
|
-
type: 'select',
|
|
3180
|
-
value: data.values.propertyId,
|
|
3181
|
-
options: choices(data.properties),
|
|
3182
|
-
required: true,
|
|
3183
|
-
},
|
|
3184
|
-
] }),
|
|
3185
|
-
_jsx(Section, { title: _('hospitality_core.reservation.section.intake'), description: _('hospitality_core.reservation.section.intakeHint'), body: data.roomTypes.length && data.partners.length ? (_jsx(RecordForm, { action: "/admin/hospitality/reservations", method: "post", submit: _('hospitality_core.reservation.action.quote'), submitVariant: "primary", errors: errors, hidden: {
|
|
3186
|
-
operation: 'quote',
|
|
3187
|
-
lang: locale,
|
|
3188
|
-
property: data.values.propertyId,
|
|
3189
|
-
id: data.values.id,
|
|
3190
|
-
}, fields: [
|
|
3191
|
-
{
|
|
3192
|
-
name: 'code',
|
|
3193
|
-
label: _('hospitality_core.reservation.field.code'),
|
|
3194
|
-
value: data.values.code,
|
|
3195
|
-
help: _('hospitality_core.reservation.field.codeHint'),
|
|
3196
|
-
},
|
|
3197
|
-
{
|
|
3198
|
-
name: 'partnerId',
|
|
3199
|
-
label: _('hospitality_core.reservation.field.guest'),
|
|
3200
|
-
type: 'select',
|
|
3201
|
-
value: data.values.partnerId,
|
|
3202
|
-
options: [
|
|
3203
|
-
{ value: '', label: _('hospitality_core.reservation.value.selectGuest') },
|
|
3204
|
-
...choices(data.partners),
|
|
3205
|
-
],
|
|
3206
|
-
required: true,
|
|
3207
|
-
},
|
|
3208
|
-
{
|
|
3209
|
-
name: 'roomTypeId',
|
|
3210
|
-
label: _('hospitality_core.reservation.field.roomType'),
|
|
3211
|
-
type: 'select',
|
|
3212
|
-
value: data.values.roomTypeId,
|
|
3213
|
-
options: choices(data.roomTypes),
|
|
3214
|
-
required: true,
|
|
3215
|
-
},
|
|
3216
|
-
{
|
|
3217
|
-
name: 'bookingType',
|
|
3218
|
-
label: _('hospitality_core.reservation.field.bookingType'),
|
|
3219
|
-
type: 'select',
|
|
3220
|
-
value: data.values.bookingType,
|
|
3221
|
-
options: ['nightly', 'weekly', 'monthly'].map((value) => ({
|
|
3222
|
-
value,
|
|
3223
|
-
label: _(`hospitality_core.bookingType.${value}`),
|
|
3224
|
-
})),
|
|
3225
|
-
required: true,
|
|
3226
|
-
},
|
|
3227
|
-
{
|
|
3228
|
-
name: 'checkIn',
|
|
3229
|
-
label: _('hospitality_core.col.checkIn'),
|
|
3230
|
-
type: 'datetime-local',
|
|
3231
|
-
value: data.values.checkIn,
|
|
3232
|
-
required: true,
|
|
3233
|
-
},
|
|
3234
|
-
{
|
|
3235
|
-
name: 'checkOut',
|
|
3236
|
-
label: _('hospitality_core.col.checkOut'),
|
|
3237
|
-
type: 'datetime-local',
|
|
3238
|
-
value: data.values.checkOut,
|
|
3239
|
-
required: true,
|
|
3240
|
-
},
|
|
3241
|
-
{
|
|
3242
|
-
name: 'adults',
|
|
3243
|
-
label: _('hospitality_core.reservation.field.adults'),
|
|
3244
|
-
type: 'number',
|
|
3245
|
-
value: data.values.adults,
|
|
3246
|
-
required: true,
|
|
3247
|
-
step: '1',
|
|
3248
|
-
},
|
|
3249
|
-
{
|
|
3250
|
-
name: 'children',
|
|
3251
|
-
label: _('hospitality_core.reservation.field.children'),
|
|
3252
|
-
type: 'number',
|
|
3253
|
-
value: data.values.children,
|
|
3254
|
-
required: true,
|
|
3255
|
-
step: '1',
|
|
3256
|
-
},
|
|
3257
|
-
{
|
|
3258
|
-
name: 'rate',
|
|
3259
|
-
label: _('hospitality_core.reservation.field.rate'),
|
|
3260
|
-
type: 'decimal',
|
|
3261
|
-
value: data.values.rate,
|
|
3262
|
-
help: _('hospitality_core.reservation.field.rateHint'),
|
|
3263
|
-
},
|
|
3264
|
-
] })) : (emptyState(data.roomTypes.length
|
|
3265
|
-
? _('hospitality_core.reservation.empty.partners')
|
|
3266
|
-
: _('hospitality_core.reservation.empty.roomTypes'), data.roomTypes.length
|
|
3267
|
-
? _('hospitality_core.reservation.empty.partnersHint')
|
|
3268
|
-
: _('hospitality_core.reservation.empty.roomTypesHint'))) }),
|
|
3269
|
-
...(quote
|
|
3270
|
-
? [
|
|
3271
|
-
_jsx(Section, { title: _('hospitality_core.reservation.section.quote'), description: _('hospitality_core.reservation.section.quoteHint'), body: stack([
|
|
3272
|
-
cardGrid({
|
|
3273
|
-
items: [
|
|
3274
|
-
{
|
|
3275
|
-
id: 'rate',
|
|
3276
|
-
label: _('hospitality_core.reservation.quote.rate'),
|
|
3277
|
-
value: formatMoney(_, quote.rate ?? 0),
|
|
3278
|
-
},
|
|
3279
|
-
{
|
|
3280
|
-
id: 'quantity',
|
|
3281
|
-
label: _('hospitality_core.reservation.quote.quantity'),
|
|
3282
|
-
value: String(quote.quantity ?? 0),
|
|
3283
|
-
},
|
|
3284
|
-
{
|
|
3285
|
-
id: 'availability',
|
|
3286
|
-
label: _('hospitality_core.reservation.quote.availability'),
|
|
3287
|
-
value: String(quote.minimumAvailable ?? 0),
|
|
3288
|
-
},
|
|
3289
|
-
{
|
|
3290
|
-
id: 'total',
|
|
3291
|
-
label: _('hospitality_core.reservation.quote.total'),
|
|
3292
|
-
value: formatMoney(_, quote.amountTotal ?? 0),
|
|
3293
|
-
},
|
|
3294
|
-
],
|
|
3295
|
-
id: (item) => item.id,
|
|
3296
|
-
card: (item) => metric({ label: item.label, value: item.value, tone: item.id }),
|
|
3297
|
-
}),
|
|
3298
|
-
_jsx(RecordForm, { action: "/admin/hospitality/reservations", method: "post", submit: _('hospitality_core.reservation.action.create'), submitVariant: "primary", hidden: {
|
|
3299
|
-
operation: 'create',
|
|
3300
|
-
lang: locale,
|
|
3301
|
-
property: data.values.propertyId,
|
|
3302
|
-
id: data.values.id,
|
|
3303
|
-
code: data.values.code,
|
|
3304
|
-
partnerId: data.values.partnerId,
|
|
3305
|
-
roomTypeId: data.values.roomTypeId,
|
|
3306
|
-
bookingType: data.values.bookingType,
|
|
3307
|
-
checkIn: data.values.checkIn,
|
|
3308
|
-
checkOut: data.values.checkOut,
|
|
3309
|
-
adults: String(data.values.adults),
|
|
3310
|
-
children: String(data.values.children),
|
|
3311
|
-
rate: String(quote.rate ?? ''),
|
|
3312
|
-
}, fields: [] }),
|
|
3313
|
-
]) }),
|
|
3314
|
-
]
|
|
3315
|
-
: []),
|
|
3316
|
-
_jsx(Section, { title: _('hospitality_core.reservation.section.list'), description: _('hospitality_core.reservation.section.listHint'), body: data.rows.length
|
|
3317
|
-
? dataTable(_, {
|
|
3318
|
-
columns: reservationColumns(_, locale, timezone),
|
|
3319
|
-
rows: data.rows,
|
|
3320
|
-
id: (row) => row.id,
|
|
3321
|
-
})
|
|
3322
|
-
: emptyState(_('hospitality_core.screen.reservations.empty'), _('hospitality_core.screen.reservations.emptyHint')) }),
|
|
3323
|
-
]) }));
|
|
3324
|
-
};
|
|
3325
|
-
const reservationDetailFeedback = (_, status, errors = []) => {
|
|
3326
|
-
if (status === 'checked-in')
|
|
3327
|
-
return notice({
|
|
3328
|
-
title: _('hospitality_core.reservation.feedback.checkedIn'),
|
|
3329
|
-
message: _('hospitality_core.reservation.feedback.checkedInHint'),
|
|
3330
|
-
tone: 'positive',
|
|
3331
|
-
});
|
|
3332
|
-
if (status === 'checked-out')
|
|
3333
|
-
return notice({
|
|
3334
|
-
title: _('hospitality_core.reservation.feedback.checkedOut'),
|
|
3335
|
-
message: _('hospitality_core.reservation.feedback.checkedOutHint'),
|
|
3336
|
-
tone: 'positive',
|
|
3337
|
-
});
|
|
3338
|
-
if (status === 'checked-out-early')
|
|
3339
|
-
return notice({
|
|
3340
|
-
title: _('hospitality_core.reservation.feedback.checkedOutEarly'),
|
|
3341
|
-
message: _('hospitality_core.reservation.feedback.checkedOutEarlyHint'),
|
|
3342
|
-
tone: 'warning',
|
|
3343
|
-
});
|
|
3344
|
-
if (status === 'cancelled')
|
|
3345
|
-
return notice({
|
|
3346
|
-
title: _('hospitality_core.reservation.feedback.cancelled'),
|
|
3347
|
-
message: _('hospitality_core.reservation.feedback.cancelledHint'),
|
|
3348
|
-
tone: 'warning',
|
|
3349
|
-
});
|
|
3350
|
-
if (status === 'amended')
|
|
3351
|
-
return notice({
|
|
3352
|
-
title: _('hospitality_core.reservation.feedback.amended'),
|
|
3353
|
-
message: _('hospitality_core.reservation.feedback.amendedHint'),
|
|
3354
|
-
tone: 'positive',
|
|
3355
|
-
});
|
|
3356
|
-
if (status === 'departure-adjusted')
|
|
3357
|
-
return notice({
|
|
3358
|
-
title: _('hospitality_core.reservation.feedback.departureAdjusted'),
|
|
3359
|
-
message: _('hospitality_core.reservation.feedback.departureAdjustedHint'),
|
|
3360
|
-
tone: 'positive',
|
|
3361
|
-
});
|
|
3362
|
-
if (status === 'no-show')
|
|
3363
|
-
return notice({
|
|
3364
|
-
title: _('hospitality_core.reservation.feedback.noShow'),
|
|
3365
|
-
message: _('hospitality_core.reservation.feedback.noShowHint'),
|
|
3366
|
-
tone: 'warning',
|
|
3367
|
-
});
|
|
3368
|
-
if (errors.length)
|
|
3369
|
-
return notice({
|
|
3370
|
-
title: _('hospitality_core.feedback.invalid'),
|
|
3371
|
-
message: errors.join(' '),
|
|
3372
|
-
tone: 'danger',
|
|
3373
|
-
});
|
|
3374
|
-
return null;
|
|
3375
|
-
};
|
|
3376
|
-
export const reservationDetailScreen = (_, reservation, rooms, roomTypes, partners, amendment, departure, locale, timezone, frame, status, errors = []) => {
|
|
3377
|
-
const guest = guestName(reservation);
|
|
3378
|
-
const room = reservation.stay?.currentRoom;
|
|
3379
|
-
const backHref = `/admin/hospitality/reservations?property=${encodeURIComponent(reservation.propertyId)}&lang=${encodeURIComponent(locale)}`;
|
|
3380
|
-
const action = `/admin/hospitality/reservations/${encodeURIComponent(reservation.id)}?lang=${encodeURIComponent(locale)}`;
|
|
3381
|
-
const actions = [];
|
|
3382
|
-
if (reservation.state === 'confirmed' && reservation.provider === 'direct') {
|
|
3383
|
-
actions.push(_jsx(Section, { title: _('hospitality_core.reservation.action.amend'), description: _('hospitality_core.reservation.action.amendHint'), body: _jsx(RecordForm, { action: action, method: "post", submit: _('hospitality_core.reservation.action.amend'), submitVariant: "secondary", hidden: { operation: 'amend', lang: locale }, fields: [
|
|
3384
|
-
{
|
|
3385
|
-
name: 'partnerId',
|
|
3386
|
-
label: _('hospitality_core.reservation.field.guest'),
|
|
3387
|
-
type: 'select',
|
|
3388
|
-
value: amendment.partnerId,
|
|
3389
|
-
options: choices(partners),
|
|
3390
|
-
required: true,
|
|
3391
|
-
},
|
|
3392
|
-
{
|
|
3393
|
-
name: 'roomTypeId',
|
|
3394
|
-
label: _('hospitality_core.reservation.field.roomType'),
|
|
3395
|
-
type: 'select',
|
|
3396
|
-
value: amendment.roomTypeId,
|
|
3397
|
-
options: choices(roomTypes),
|
|
3398
|
-
required: true,
|
|
3399
|
-
},
|
|
3400
|
-
{
|
|
3401
|
-
name: 'checkIn',
|
|
3402
|
-
label: _('hospitality_core.col.checkIn'),
|
|
3403
|
-
type: 'datetime-local',
|
|
3404
|
-
value: amendment.checkIn,
|
|
3405
|
-
required: true,
|
|
3406
|
-
},
|
|
3407
|
-
{
|
|
3408
|
-
name: 'checkOut',
|
|
3409
|
-
label: _('hospitality_core.col.checkOut'),
|
|
3410
|
-
type: 'datetime-local',
|
|
3411
|
-
value: amendment.checkOut,
|
|
3412
|
-
required: true,
|
|
3413
|
-
},
|
|
3414
|
-
{
|
|
3415
|
-
name: 'adults',
|
|
3416
|
-
label: _('hospitality_core.reservation.field.adults'),
|
|
3417
|
-
type: 'number',
|
|
3418
|
-
value: amendment.adults,
|
|
3419
|
-
step: '1',
|
|
3420
|
-
required: true,
|
|
3421
|
-
},
|
|
3422
|
-
{
|
|
3423
|
-
name: 'children',
|
|
3424
|
-
label: _('hospitality_core.reservation.field.children'),
|
|
3425
|
-
type: 'number',
|
|
3426
|
-
value: amendment.children,
|
|
3427
|
-
step: '1',
|
|
3428
|
-
required: true,
|
|
3429
|
-
},
|
|
3430
|
-
{
|
|
3431
|
-
name: 'rate',
|
|
3432
|
-
label: _('hospitality_core.reservation.field.rate'),
|
|
3433
|
-
type: 'decimal',
|
|
3434
|
-
value: amendment.rate,
|
|
3435
|
-
required: true,
|
|
3436
|
-
},
|
|
3437
|
-
] }) }));
|
|
3438
|
-
}
|
|
3439
|
-
if (reservation.state === 'confirmed' && reservation.stayId) {
|
|
3440
|
-
actions.push(_jsx(Section, { title: _('hospitality_core.reservation.action.checkIn'), description: _('hospitality_core.reservation.action.checkInHint'), body: rooms.length ? (_jsx(RecordForm, { action: action, method: "post", submit: _('hospitality_core.reservation.action.checkIn'), submitVariant: "primary", hidden: { operation: 'check-in', lang: locale }, fields: [
|
|
3441
|
-
{
|
|
3442
|
-
name: 'roomId',
|
|
3443
|
-
label: _('hospitality_core.reservation.field.room'),
|
|
3444
|
-
type: 'select',
|
|
3445
|
-
required: true,
|
|
3446
|
-
options: rooms.map((candidate) => ({
|
|
3447
|
-
value: candidate.id,
|
|
3448
|
-
label: `${candidate.code} · ${candidate.name}`,
|
|
3449
|
-
})),
|
|
3450
|
-
},
|
|
3451
|
-
] })) : (emptyState(_('hospitality_core.reservation.empty.availableRooms'), _('hospitality_core.reservation.empty.availableRoomsHint'))) }));
|
|
3452
|
-
}
|
|
3453
|
-
if (reservation.state === 'checked_in' && reservation.stayId) {
|
|
3454
|
-
actions.push(_jsx(Section, { title: _('hospitality_core.reservation.action.adjustDeparture'), description: _('hospitality_core.reservation.action.adjustDepartureHint'), body: _jsx(RecordForm, { action: action, method: "post", submit: _('hospitality_core.reservation.action.adjustDeparture'), submitVariant: "secondary", hidden: { operation: 'adjust-departure', lang: locale }, fields: [
|
|
3455
|
-
{
|
|
3456
|
-
name: 'checkOut',
|
|
3457
|
-
label: _('hospitality_core.col.checkOut'),
|
|
3458
|
-
type: 'datetime-local',
|
|
3459
|
-
value: departure,
|
|
3460
|
-
required: true,
|
|
3461
|
-
},
|
|
3462
|
-
] }) }), _jsx(Section, { title: _('hospitality_core.reservation.action.checkOut'), description: _('hospitality_core.reservation.action.checkOutHint'), body: _jsx(RecordForm, { action: action, method: "post", submit: _('hospitality_core.reservation.action.checkOut'), submitVariant: "primary", hidden: { operation: 'check-out', lang: locale }, fields: [] }) }));
|
|
3463
|
-
}
|
|
3464
|
-
if (reservation.state === 'draft' || reservation.state === 'confirmed') {
|
|
3465
|
-
if (reservation.state === 'confirmed')
|
|
3466
|
-
actions.push(_jsx(Section, { title: _('hospitality_core.reservation.action.noShow'), description: _('hospitality_core.reservation.action.noShowHint'), body: _jsx(RecordForm, { action: action, method: "post", submit: _('hospitality_core.reservation.action.noShow'), submitVariant: "destructive", hidden: { operation: 'no-show', lang: locale }, fields: [
|
|
3467
|
-
{
|
|
3468
|
-
name: 'reason',
|
|
3469
|
-
label: _('hospitality_core.reservation.field.noShowReason'),
|
|
3470
|
-
type: 'textarea',
|
|
3471
|
-
help: _('hospitality_core.reservation.field.noShowReasonHint'),
|
|
3472
|
-
required: true,
|
|
3473
|
-
},
|
|
3474
|
-
] }) }));
|
|
3475
|
-
actions.push(_jsx(Section, { title: _('hospitality_core.reservation.action.cancel'), description: _('hospitality_core.reservation.action.cancelHint'), body: _jsx(RecordForm, { action: action, method: "post", submit: _('hospitality_core.reservation.action.cancel'), submitVariant: "destructive", hidden: { operation: 'cancel', lang: locale }, fields: [
|
|
3476
|
-
{
|
|
3477
|
-
name: 'reason',
|
|
3478
|
-
label: _('hospitality_core.reservation.field.cancelReason'),
|
|
3479
|
-
type: 'textarea',
|
|
3480
|
-
help: _('hospitality_core.reservation.field.cancelReasonHint'),
|
|
3481
|
-
},
|
|
3482
|
-
] }) }));
|
|
3483
|
-
}
|
|
3484
|
-
return (_jsx(Framed, { translator: _, title: _('hospitality_core.reservation.detail.title', { code: reservation.code }), frame: frame, body: stack([
|
|
3485
|
-
reservationDetailFeedback(_, status, errors),
|
|
3486
|
-
_jsx(RecordWorkspace, { kicker: _('hospitality_core.reservation.detail.kicker'), title: reservation.code, subtitle: guest, imageFallback: icon('hotel'), badges: [
|
|
3487
|
-
badge(_(`hospitality_core.reservationState.${reservation.state}`), workflowTone(reservation.state), reservation.state),
|
|
3488
|
-
badge(providerName(_, reservation.provider), 'neutral'),
|
|
3489
|
-
], summary: [
|
|
3490
|
-
{
|
|
3491
|
-
id: 'room-type',
|
|
3492
|
-
label: _('hospitality_core.col.roomType'),
|
|
3493
|
-
value: reservation.roomType?.name ?? reservation.roomTypeId,
|
|
3494
|
-
},
|
|
3495
|
-
{
|
|
3496
|
-
id: 'guests',
|
|
3497
|
-
label: _('hospitality_core.col.guests'),
|
|
3498
|
-
value: reservation.adults + reservation.children,
|
|
3499
|
-
},
|
|
3500
|
-
{
|
|
3501
|
-
id: 'total',
|
|
3502
|
-
label: _('hospitality_core.col.amount'),
|
|
3503
|
-
value: formatMoney(_, reservation.amountTotal),
|
|
3504
|
-
},
|
|
3505
|
-
], navigation: linkButton({
|
|
3506
|
-
label: _('hospitality_core.reservation.action.back'),
|
|
3507
|
-
href: backHref,
|
|
3508
|
-
variant: 'tertiary',
|
|
3509
|
-
icon: 'chevron-left',
|
|
3510
|
-
}), body: stack([
|
|
3511
|
-
_jsx(Section, { title: _('hospitality_core.reservation.detail.stay'), description: _('hospitality_core.reservation.detail.stayHint'), body: definitionList({
|
|
3512
|
-
title: reservation.code,
|
|
3513
|
-
items: [
|
|
3514
|
-
{
|
|
3515
|
-
key: 'guest',
|
|
3516
|
-
term: _('hospitality_core.reservation.field.guest'),
|
|
3517
|
-
value: guest,
|
|
3518
|
-
},
|
|
3519
|
-
{
|
|
3520
|
-
key: 'room',
|
|
3521
|
-
term: _('hospitality_core.reservation.field.room'),
|
|
3522
|
-
value: room?.name ?? room?.code ?? _('hospitality_core.reservation.value.unassigned'),
|
|
3523
|
-
},
|
|
3524
|
-
{
|
|
3525
|
-
key: 'check-in',
|
|
3526
|
-
term: _('hospitality_core.col.checkIn'),
|
|
3527
|
-
value: dateTime(reservation.checkIn, locale, timezone),
|
|
3528
|
-
},
|
|
3529
|
-
{
|
|
3530
|
-
key: 'check-out',
|
|
3531
|
-
term: _('hospitality_core.col.checkOut'),
|
|
3532
|
-
value: dateTime(reservation.checkOut, locale, timezone),
|
|
3533
|
-
},
|
|
3534
|
-
{
|
|
3535
|
-
key: 'booking-type',
|
|
3536
|
-
term: _('hospitality_core.reservation.field.bookingType'),
|
|
3537
|
-
value: _(`hospitality_core.bookingType.${reservation.bookingType}`),
|
|
3538
|
-
},
|
|
3539
|
-
{
|
|
3540
|
-
key: 'billing',
|
|
3541
|
-
term: _('hospitality_core.reservation.field.billingMode'),
|
|
3542
|
-
value: _(`hospitality_core.billing.${reservation.billingMode}`),
|
|
3543
|
-
},
|
|
3544
|
-
{
|
|
3545
|
-
key: 'rate',
|
|
3546
|
-
term: _('hospitality_core.reservation.field.rate'),
|
|
3547
|
-
value: formatMoney(_, reservation.rate),
|
|
3548
|
-
},
|
|
3549
|
-
{
|
|
3550
|
-
key: 'quantity',
|
|
3551
|
-
term: _('hospitality_core.reservation.quote.quantity'),
|
|
3552
|
-
value: String(reservation.quantity),
|
|
3553
|
-
},
|
|
3554
|
-
{
|
|
3555
|
-
key: 'folio',
|
|
3556
|
-
term: _('hospitality_core.reservation.field.folio'),
|
|
3557
|
-
value: reservation.folio?.code ?? reservation.folioId,
|
|
3558
|
-
},
|
|
3559
|
-
...(reservation.cancelReason
|
|
3560
|
-
? [
|
|
3561
|
-
{
|
|
3562
|
-
key: 'cancel-reason',
|
|
3563
|
-
term: _('hospitality_core.reservation.field.cancelReason'),
|
|
3564
|
-
value: reservation.cancelReason,
|
|
3565
|
-
},
|
|
3566
|
-
]
|
|
3567
|
-
: []),
|
|
3568
|
-
],
|
|
3569
|
-
}) }),
|
|
3570
|
-
...actions,
|
|
3571
|
-
]) }),
|
|
3572
|
-
]) }));
|
|
3573
|
-
};
|
|
3574
|
-
const stayAssignmentColumns = (_, locale, timezone) => [
|
|
3575
|
-
{
|
|
3576
|
-
key: 'room',
|
|
3577
|
-
label: _('hospitality_core.stay.field.room'),
|
|
3578
|
-
cell: (row) => row.roomName ?? code(row.roomId),
|
|
3579
|
-
priority: 'primary',
|
|
3580
|
-
},
|
|
3581
|
-
{
|
|
3582
|
-
key: 'start',
|
|
3583
|
-
label: _('hospitality_core.stay.assignment.start'),
|
|
3584
|
-
cell: (row) => dateTime(row.startAt, locale, timezone),
|
|
3585
|
-
kind: 'date',
|
|
3586
|
-
},
|
|
3587
|
-
{
|
|
3588
|
-
key: 'end',
|
|
3589
|
-
label: _('hospitality_core.stay.assignment.end'),
|
|
3590
|
-
cell: (row) => (row.endAt ? dateTime(row.endAt, locale, timezone) : '—'),
|
|
3591
|
-
kind: 'date',
|
|
3592
|
-
},
|
|
3593
|
-
{
|
|
3594
|
-
key: 'reason',
|
|
3595
|
-
label: _('hospitality_core.stay.field.moveReason'),
|
|
3596
|
-
cell: (row) => row.reason || '—',
|
|
3597
|
-
},
|
|
3598
|
-
{
|
|
3599
|
-
key: 'state',
|
|
3600
|
-
label: _('hospitality_core.col.status'),
|
|
3601
|
-
cell: (row) => badge(_(`hospitality_core.assignmentState.${row.state}`), workflowTone(row.state), row.state),
|
|
3602
|
-
kind: 'status',
|
|
3603
|
-
},
|
|
3604
|
-
];
|
|
3605
|
-
const stayGuestColumns = (_) => [
|
|
3606
|
-
{
|
|
3607
|
-
key: 'guest',
|
|
3608
|
-
label: _('hospitality_core.col.guest'),
|
|
3609
|
-
cell: (row) => person(row.displayName),
|
|
3610
|
-
kind: 'person',
|
|
3611
|
-
priority: 'primary',
|
|
3612
|
-
},
|
|
3613
|
-
{
|
|
3614
|
-
key: 'role',
|
|
3615
|
-
label: _('hospitality_core.stay.guest.role'),
|
|
3616
|
-
cell: (row) => badge(row.primary ? _('hospitality_core.stay.guest.primary') : _('hospitality_core.stay.guest.companion'), row.primary ? 'positive' : 'neutral'),
|
|
3617
|
-
kind: 'status',
|
|
3618
|
-
},
|
|
3619
|
-
];
|
|
3620
|
-
const guestDocumentColumns = (_) => [
|
|
3621
|
-
{
|
|
3622
|
-
key: 'name',
|
|
3623
|
-
label: _('hospitality_core.stay.document.fullName'),
|
|
3624
|
-
cell: (row) => person(row.fullName),
|
|
3625
|
-
kind: 'person',
|
|
3626
|
-
priority: 'primary',
|
|
3627
|
-
},
|
|
3628
|
-
{
|
|
3629
|
-
key: 'type',
|
|
3630
|
-
label: _('hospitality_core.stay.document.type'),
|
|
3631
|
-
cell: (row) => _(`hospitality_core.document.${row.type}`),
|
|
3632
|
-
},
|
|
3633
|
-
{
|
|
3634
|
-
key: 'number',
|
|
3635
|
-
label: _('hospitality_core.stay.document.number'),
|
|
3636
|
-
cell: (row) => (row.numberLast4 ? code(`•••• ${row.numberLast4}`) : '—'),
|
|
3637
|
-
},
|
|
3638
|
-
{
|
|
3639
|
-
key: 'nationality',
|
|
3640
|
-
label: _('hospitality_core.stay.document.nationality'),
|
|
3641
|
-
cell: (row) => row.nationality || '—',
|
|
3642
|
-
},
|
|
3643
|
-
{
|
|
3644
|
-
key: 'readiness',
|
|
3645
|
-
label: _('hospitality_core.stay.document.readiness'),
|
|
3646
|
-
cell: (row) => badge(row.numberLast4 && row.dateOfBirthPresent
|
|
3647
|
-
? _('hospitality_core.stay.document.ready')
|
|
3648
|
-
: _('hospitality_core.stay.document.attention'), row.numberLast4 && row.dateOfBirthPresent ? 'positive' : 'warning'),
|
|
3649
|
-
kind: 'status',
|
|
3650
|
-
},
|
|
3651
|
-
];
|
|
3652
|
-
const stayDetailFeedback = (_, status, errors = []) => {
|
|
3653
|
-
if (status === 'guest-added')
|
|
3654
|
-
return notice({
|
|
3655
|
-
title: _('hospitality_core.stay.feedback.guestAdded'),
|
|
3656
|
-
message: _('hospitality_core.stay.feedback.guestAddedHint'),
|
|
3657
|
-
tone: 'positive',
|
|
3658
|
-
});
|
|
3659
|
-
if (status === 'room-moved')
|
|
3660
|
-
return notice({
|
|
3661
|
-
title: _('hospitality_core.stay.feedback.roomMoved'),
|
|
3662
|
-
message: _('hospitality_core.stay.feedback.roomMovedHint'),
|
|
3663
|
-
tone: 'positive',
|
|
3664
|
-
});
|
|
3665
|
-
if (status === 'document-saved')
|
|
3666
|
-
return notice({
|
|
3667
|
-
title: _('hospitality_core.stay.feedback.documentSaved'),
|
|
3668
|
-
message: _('hospitality_core.stay.feedback.documentSavedHint'),
|
|
3669
|
-
tone: 'positive',
|
|
3670
|
-
});
|
|
3671
|
-
if (errors.length)
|
|
3672
|
-
return notice({
|
|
3673
|
-
title: _('hospitality_core.feedback.invalid'),
|
|
3674
|
-
message: errors.join(' '),
|
|
3675
|
-
tone: 'danger',
|
|
3676
|
-
});
|
|
3677
|
-
return null;
|
|
3678
|
-
};
|
|
3679
|
-
export const stayDetailScreen = (_, stay, rooms, partners, documents, documentId, locale, timezone, frame, status, errors = []) => {
|
|
3680
|
-
const guest = guestName(stay);
|
|
3681
|
-
const action = `/admin/hospitality/stays/${encodeURIComponent(stay.id)}?lang=${encodeURIComponent(locale)}`;
|
|
3682
|
-
const roomNames = new Map(rooms.map((room) => [room.id, `${room.code} · ${room.name}`]));
|
|
3683
|
-
const assignments = (stay.assignments ?? []).map((assignment) => ({
|
|
3684
|
-
...assignment,
|
|
3685
|
-
roomName: roomNames.get(assignment.roomId) ?? assignment.roomId,
|
|
3686
|
-
}));
|
|
3687
|
-
const guests = stay.guests ?? [];
|
|
3688
|
-
const registeredGuests = guests.filter((registered) => !!registered.partnerId);
|
|
3689
|
-
const availableRooms = rooms.filter((room) => room.active && room.status === 'available' && room.id !== stay.currentRoomId);
|
|
3690
|
-
return (_jsx(Framed, { translator: _, title: _('hospitality_core.stay.detail.title', { code: stay.code }), frame: frame, body: stack([
|
|
3691
|
-
stayDetailFeedback(_, status, errors),
|
|
3692
|
-
_jsx(RecordWorkspace, { kicker: _('hospitality_core.stay.detail.kicker'), title: stay.code, subtitle: guest, imageFallback: icon('hotel'), badges: [
|
|
3693
|
-
badge(_(`hospitality_core.stayState.${stay.state}`), workflowTone(stay.state), stay.state),
|
|
3694
|
-
badge(_(`hospitality_core.bookingType.${stay.bookingType}`), 'neutral'),
|
|
3695
|
-
], summary: [
|
|
3696
|
-
{
|
|
3697
|
-
id: 'room',
|
|
3698
|
-
label: _('hospitality_core.stay.field.room'),
|
|
3699
|
-
value: stay.currentRoom?.name ??
|
|
3700
|
-
stay.currentRoom?.code ??
|
|
3701
|
-
_('hospitality_core.reservation.value.unassigned'),
|
|
3702
|
-
},
|
|
3703
|
-
{
|
|
3704
|
-
id: 'guests',
|
|
3705
|
-
label: _('hospitality_core.col.guests'),
|
|
3706
|
-
value: guests.length,
|
|
3707
|
-
},
|
|
3708
|
-
{
|
|
3709
|
-
id: 'rate',
|
|
3710
|
-
label: _('hospitality_core.reservation.field.rate'),
|
|
3711
|
-
value: formatMoney(_, stay.rate),
|
|
3712
|
-
},
|
|
3713
|
-
], navigation: linkButton({
|
|
3714
|
-
label: _('hospitality_core.stay.action.back'),
|
|
3715
|
-
href: `/admin/hospitality/stays?property=${encodeURIComponent(stay.propertyId)}&lang=${encodeURIComponent(locale)}`,
|
|
3716
|
-
variant: 'tertiary',
|
|
3717
|
-
icon: 'chevron-left',
|
|
3718
|
-
}), body: stack([
|
|
3719
|
-
_jsx(Section, { title: _('hospitality_core.stay.section.information'), description: _('hospitality_core.stay.section.informationHint'), body: definitionList({
|
|
3720
|
-
title: stay.code,
|
|
3721
|
-
items: [
|
|
3722
|
-
{
|
|
3723
|
-
key: 'guest',
|
|
3724
|
-
term: _('hospitality_core.reservation.field.guest'),
|
|
3725
|
-
value: guest,
|
|
3726
|
-
},
|
|
3727
|
-
{
|
|
3728
|
-
key: 'room-type',
|
|
3729
|
-
term: _('hospitality_core.col.roomType'),
|
|
3730
|
-
value: stay.roomType?.name ?? stay.roomTypeId,
|
|
3731
|
-
},
|
|
3732
|
-
{
|
|
3733
|
-
key: 'check-in',
|
|
3734
|
-
term: _('hospitality_core.col.checkIn'),
|
|
3735
|
-
value: dateTime(stay.checkIn, locale, timezone),
|
|
3736
|
-
},
|
|
3737
|
-
{
|
|
3738
|
-
key: 'check-out',
|
|
3739
|
-
term: _('hospitality_core.col.checkOut'),
|
|
3740
|
-
value: dateTime(stay.checkOut, locale, timezone),
|
|
3741
|
-
},
|
|
3742
|
-
{
|
|
3743
|
-
key: 'billing',
|
|
3744
|
-
term: _('hospitality_core.reservation.field.billingMode'),
|
|
3745
|
-
value: _(`hospitality_core.billing.${stay.billingMode}`),
|
|
3746
|
-
},
|
|
3747
|
-
...(stay.nextBillDate
|
|
3748
|
-
? [
|
|
3749
|
-
{
|
|
3750
|
-
key: 'next-bill',
|
|
3751
|
-
term: _('hospitality_core.stay.field.nextBillDate'),
|
|
3752
|
-
value: stay.nextBillDate,
|
|
3753
|
-
},
|
|
3754
|
-
]
|
|
3755
|
-
: []),
|
|
3756
|
-
{
|
|
3757
|
-
key: 'folio',
|
|
3758
|
-
term: _('hospitality_core.reservation.field.folio'),
|
|
3759
|
-
value: stay.folioId,
|
|
3760
|
-
},
|
|
3761
|
-
...(stay.reservationId
|
|
3762
|
-
? [
|
|
3763
|
-
{
|
|
3764
|
-
key: 'reservation',
|
|
3765
|
-
term: _('hospitality_core.stay.field.reservation'),
|
|
3766
|
-
value: stay.reservation?.code ?? stay.reservationId,
|
|
3767
|
-
},
|
|
3768
|
-
]
|
|
3769
|
-
: []),
|
|
3770
|
-
],
|
|
3771
|
-
}) }),
|
|
3772
|
-
_jsx(Section, { title: _('hospitality_core.stay.section.assignments'), description: _('hospitality_core.stay.section.assignmentsHint'), body: stack([
|
|
3773
|
-
assignments.length
|
|
3774
|
-
? dataTable(_, {
|
|
3775
|
-
columns: stayAssignmentColumns(_, locale, timezone),
|
|
3776
|
-
rows: assignments,
|
|
3777
|
-
id: (assignment) => assignment.id,
|
|
3778
|
-
})
|
|
3779
|
-
: emptyState(_('hospitality_core.stay.empty.assignments'), _('hospitality_core.stay.empty.assignmentsHint')),
|
|
3780
|
-
stay.state === 'checked_in' ? (availableRooms.length ? (_jsx(RecordForm, { action: action, method: "post", submit: _('hospitality_core.stay.action.moveRoom'), submitVariant: "secondary", hidden: { operation: 'move-room', lang: locale }, fields: [
|
|
3781
|
-
{
|
|
3782
|
-
name: 'roomId',
|
|
3783
|
-
label: _('hospitality_core.stay.field.newRoom'),
|
|
3784
|
-
type: 'select',
|
|
3785
|
-
required: true,
|
|
3786
|
-
options: availableRooms.map((room) => ({
|
|
3787
|
-
value: room.id,
|
|
3788
|
-
label: `${room.code} · ${room.name} · ${room.roomType?.name ?? room.roomTypeId}`,
|
|
3789
|
-
})),
|
|
3790
|
-
},
|
|
3791
|
-
{
|
|
3792
|
-
name: 'reason',
|
|
3793
|
-
label: _('hospitality_core.stay.field.moveReason'),
|
|
3794
|
-
type: 'textarea',
|
|
3795
|
-
required: true,
|
|
3796
|
-
help: _('hospitality_core.stay.field.moveReasonHint'),
|
|
3797
|
-
},
|
|
3798
|
-
] })) : (notice({
|
|
3799
|
-
title: _('hospitality_core.stay.empty.availableRooms'),
|
|
3800
|
-
message: _('hospitality_core.stay.empty.availableRoomsHint'),
|
|
3801
|
-
tone: 'warning',
|
|
3802
|
-
}))) : null,
|
|
3803
|
-
]) }),
|
|
3804
|
-
_jsx(Section, { title: _('hospitality_core.stay.section.guests'), description: _('hospitality_core.stay.section.guestsHint'), body: stack([
|
|
3805
|
-
guests.length
|
|
3806
|
-
? dataTable(_, { columns: stayGuestColumns(_), rows: guests, id: (row) => row.id })
|
|
3807
|
-
: emptyState(_('hospitality_core.stay.empty.guests'), _('hospitality_core.stay.empty.guestsHint')),
|
|
3808
|
-
stay.state === 'draft' || stay.state === 'checked_in' ? (_jsx(RecordForm, { action: action, method: "post", submit: _('hospitality_core.stay.action.addGuest'), submitVariant: "secondary", hidden: { operation: 'add-guest', lang: locale }, fields: [
|
|
3809
|
-
{
|
|
3810
|
-
name: 'displayName',
|
|
3811
|
-
label: _('hospitality_core.stay.field.guestName'),
|
|
3812
|
-
required: true,
|
|
3813
|
-
},
|
|
3814
|
-
{
|
|
3815
|
-
name: 'partnerId',
|
|
3816
|
-
label: _('hospitality_core.stay.field.linkedPartner'),
|
|
3817
|
-
type: 'select',
|
|
3818
|
-
options: [
|
|
3819
|
-
{ value: '', label: _('hospitality_core.stay.value.noLinkedPartner') },
|
|
3820
|
-
...choices(partners),
|
|
3821
|
-
],
|
|
3822
|
-
help: _('hospitality_core.stay.field.linkedPartnerHint'),
|
|
3823
|
-
},
|
|
3824
|
-
] })) : null,
|
|
3825
|
-
]) }),
|
|
3826
|
-
_jsx(Section, { title: _('hospitality_core.stay.section.documents'), description: _('hospitality_core.stay.section.documentsHint'), body: stack([
|
|
3827
|
-
documents.length
|
|
3828
|
-
? dataTable(_, {
|
|
3829
|
-
columns: guestDocumentColumns(_),
|
|
3830
|
-
rows: documents,
|
|
3831
|
-
id: (row) => row.id,
|
|
3832
|
-
})
|
|
3833
|
-
: emptyState(_('hospitality_core.stay.empty.documents'), _('hospitality_core.stay.empty.documentsHint')),
|
|
3834
|
-
stay.state !== 'cancelled' ? (registeredGuests.length ? (_jsx(RecordForm, { action: action, method: "post", submit: _('hospitality_core.stay.action.saveDocument'), submitVariant: "secondary", hidden: {
|
|
3835
|
-
operation: 'save-document',
|
|
3836
|
-
documentId,
|
|
3837
|
-
lang: locale,
|
|
3838
|
-
}, fields: [
|
|
3839
|
-
{
|
|
3840
|
-
name: 'partnerId',
|
|
3841
|
-
label: _('hospitality_core.stay.document.guest'),
|
|
3842
|
-
type: 'select',
|
|
3843
|
-
required: true,
|
|
3844
|
-
options: registeredGuests.map((registered) => ({
|
|
3845
|
-
value: registered.partnerId,
|
|
3846
|
-
label: registered.displayName,
|
|
3847
|
-
})),
|
|
3848
|
-
},
|
|
3849
|
-
{
|
|
3850
|
-
name: 'type',
|
|
3851
|
-
label: _('hospitality_core.stay.document.type'),
|
|
3852
|
-
type: 'select',
|
|
3853
|
-
required: true,
|
|
3854
|
-
value: 'cccd',
|
|
3855
|
-
options: DOCUMENT_TYPES.map((value) => ({
|
|
3856
|
-
value,
|
|
3857
|
-
label: _(`hospitality_core.document.${value}`),
|
|
3858
|
-
})),
|
|
3859
|
-
},
|
|
3860
|
-
{
|
|
3861
|
-
name: 'number',
|
|
3862
|
-
label: _('hospitality_core.stay.document.number'),
|
|
3863
|
-
required: true,
|
|
3864
|
-
help: _('hospitality_core.stay.document.numberHint'),
|
|
3865
|
-
},
|
|
3866
|
-
{
|
|
3867
|
-
name: 'fullName',
|
|
3868
|
-
label: _('hospitality_core.stay.document.fullName'),
|
|
3869
|
-
required: true,
|
|
3870
|
-
value: registeredGuests[0]?.displayName ?? '',
|
|
3871
|
-
},
|
|
3872
|
-
{
|
|
3873
|
-
name: 'dateOfBirth',
|
|
3874
|
-
label: _('hospitality_core.stay.document.dateOfBirth'),
|
|
3875
|
-
type: 'date',
|
|
3876
|
-
required: true,
|
|
3877
|
-
},
|
|
3878
|
-
{
|
|
3879
|
-
name: 'gender',
|
|
3880
|
-
label: _('hospitality_core.stay.document.gender'),
|
|
3881
|
-
type: 'select',
|
|
3882
|
-
options: [
|
|
3883
|
-
{ value: '', label: _('hospitality_core.stay.document.genderUnknown') },
|
|
3884
|
-
...GENDERS.map((value) => ({
|
|
3885
|
-
value,
|
|
3886
|
-
label: _(`hospitality_core.gender.${value}`),
|
|
3887
|
-
})),
|
|
3888
|
-
],
|
|
3889
|
-
},
|
|
3890
|
-
{
|
|
3891
|
-
name: 'nationality',
|
|
3892
|
-
label: _('hospitality_core.stay.document.nationality'),
|
|
3893
|
-
value: 'VN',
|
|
3894
|
-
help: _('hospitality_core.stay.document.nationalityHint'),
|
|
3895
|
-
},
|
|
3896
|
-
{
|
|
3897
|
-
name: 'permanentAddress',
|
|
3898
|
-
label: _('hospitality_core.stay.document.permanentAddress'),
|
|
3899
|
-
type: 'textarea',
|
|
3900
|
-
},
|
|
3901
|
-
{
|
|
3902
|
-
name: 'issueDate',
|
|
3903
|
-
label: _('hospitality_core.stay.document.issueDate'),
|
|
3904
|
-
type: 'date',
|
|
3905
|
-
},
|
|
3906
|
-
{
|
|
3907
|
-
name: 'issuePlace',
|
|
3908
|
-
label: _('hospitality_core.stay.document.issuePlace'),
|
|
3909
|
-
},
|
|
3910
|
-
] })) : (notice({
|
|
3911
|
-
title: _('hospitality_core.stay.empty.documentGuests'),
|
|
3912
|
-
message: _('hospitality_core.stay.empty.documentGuestsHint'),
|
|
3913
|
-
tone: 'warning',
|
|
3914
|
-
}))) : null,
|
|
3915
|
-
]) }),
|
|
3916
|
-
]) }),
|
|
3917
|
-
]) }));
|
|
3918
|
-
};
|
|
3919
|
-
export const staysScreen = (_, rows, locale, timezone, frame) => (_jsx(Framed, { translator: _, title: _('hospitality_core.screen.stays.title'), frame: frame, body: rows.length
|
|
3920
|
-
? dataTable(_, { columns: stayColumns(_, locale, timezone), rows, id: (row) => row.id })
|
|
3921
|
-
: emptyState(_('hospitality_core.screen.stays.empty'), _('hospitality_core.screen.stays.emptyHint')) }));
|
|
3922
|
-
const folioDetailFeedback = (_, status, errors = []) => {
|
|
3923
|
-
if (status === 'charge-posted')
|
|
3924
|
-
return notice({
|
|
3925
|
-
title: _('hospitality_core.folio.feedback.chargePosted'),
|
|
3926
|
-
message: _('hospitality_core.folio.feedback.chargePostedHint'),
|
|
3927
|
-
tone: 'positive',
|
|
3928
|
-
});
|
|
3929
|
-
if (status === 'charge-voided')
|
|
3930
|
-
return notice({
|
|
3931
|
-
title: _('hospitality_core.folio.feedback.chargeVoided'),
|
|
3932
|
-
message: _('hospitality_core.folio.feedback.chargeVoidedHint'),
|
|
3933
|
-
tone: 'positive',
|
|
3934
|
-
});
|
|
3935
|
-
if (errors.length)
|
|
3936
|
-
return notice({
|
|
3937
|
-
title: _('hospitality_core.feedback.invalid'),
|
|
3938
|
-
message: errors.join(' '),
|
|
3939
|
-
tone: 'danger',
|
|
3940
|
-
});
|
|
3941
|
-
return null;
|
|
3942
|
-
};
|
|
3943
|
-
export const folioDetailScreen = (_, folio, locale, timezone, frame, chargeId, status, errors = []) => {
|
|
3944
|
-
const stays = folio.stays ?? [];
|
|
3945
|
-
const charges = folio.charges ?? [];
|
|
3946
|
-
const activeCharges = charges.filter((charge) => charge.state === 'active');
|
|
3947
|
-
const staysById = new Map(stays.map((stay) => [stay.id, stay]));
|
|
3948
|
-
const guest = folio.partner?.name ?? folio.partnerId;
|
|
3949
|
-
const action = `/admin/hospitality/folios/${encodeURIComponent(folio.id)}?lang=${encodeURIComponent(locale)}`;
|
|
3950
|
-
return (_jsx(Framed, { translator: _, title: _('hospitality_core.folio.detail.title', { code: folio.code }), frame: frame, body: stack([
|
|
3951
|
-
folioDetailFeedback(_, status, errors),
|
|
3952
|
-
notice({
|
|
3953
|
-
title: _('hospitality_core.folio.notice.operational'),
|
|
3954
|
-
message: _('hospitality_core.folio.notice.operationalHint'),
|
|
3955
|
-
tone: 'info',
|
|
3956
|
-
}),
|
|
3957
|
-
_jsx(RecordWorkspace, { kicker: _('hospitality_core.folio.detail.kicker'), title: folio.code, subtitle: guest, imageFallback: icon('receipt-text'), badges: [
|
|
3958
|
-
badge(_(`hospitality_core.folioState.${folio.state}`), workflowTone(folio.state), folio.state),
|
|
3959
|
-
], summary: [
|
|
3960
|
-
{
|
|
3961
|
-
id: 'amount',
|
|
3962
|
-
label: _('hospitality_core.folio.metric.activeTotal'),
|
|
3963
|
-
value: formatMoney(_, folio.amountTotal),
|
|
3964
|
-
},
|
|
3965
|
-
{
|
|
3966
|
-
id: 'charges',
|
|
3967
|
-
label: _('hospitality_core.folio.metric.activeCharges'),
|
|
3968
|
-
value: activeCharges.length,
|
|
3969
|
-
},
|
|
3970
|
-
{
|
|
3971
|
-
id: 'stays',
|
|
3972
|
-
label: _('hospitality_core.col.stays'),
|
|
3973
|
-
value: stays.length,
|
|
3974
|
-
},
|
|
3975
|
-
], navigation: linkButton({
|
|
3976
|
-
label: _('hospitality_core.folio.action.back'),
|
|
3977
|
-
href: `/admin/hospitality/folios?property=${encodeURIComponent(folio.propertyId)}&lang=${encodeURIComponent(locale)}`,
|
|
3978
|
-
variant: 'tertiary',
|
|
3979
|
-
icon: 'chevron-left',
|
|
3980
|
-
}), body: stack([
|
|
3981
|
-
_jsx(Section, { title: _('hospitality_core.folio.section.information'), description: _('hospitality_core.folio.section.informationHint'), body: definitionList({
|
|
3982
|
-
title: folio.code,
|
|
3983
|
-
items: [
|
|
3984
|
-
{
|
|
3985
|
-
key: 'guest',
|
|
3986
|
-
term: _('hospitality_core.col.guest'),
|
|
3987
|
-
value: guest,
|
|
3988
|
-
},
|
|
3989
|
-
{
|
|
3990
|
-
key: 'opened',
|
|
3991
|
-
term: _('hospitality_core.folio.field.openedAt'),
|
|
3992
|
-
value: dateTime(folio.openedAt, locale, timezone),
|
|
3993
|
-
},
|
|
3994
|
-
...(folio.closedAt
|
|
3995
|
-
? [
|
|
3996
|
-
{
|
|
3997
|
-
key: 'closed',
|
|
3998
|
-
term: _('hospitality_core.folio.field.closedAt'),
|
|
3999
|
-
value: dateTime(folio.closedAt, locale, timezone),
|
|
4000
|
-
},
|
|
4001
|
-
]
|
|
4002
|
-
: []),
|
|
4003
|
-
],
|
|
4004
|
-
}) }),
|
|
4005
|
-
_jsx(Section, { title: _('hospitality_core.folio.section.charges'), description: _('hospitality_core.folio.section.chargesHint'), body: stack([
|
|
4006
|
-
charges.length
|
|
4007
|
-
? dataTable(_, {
|
|
4008
|
-
columns: folioChargeColumns(_, locale, timezone, staysById),
|
|
4009
|
-
rows: charges,
|
|
4010
|
-
id: (charge) => charge.id,
|
|
4011
|
-
})
|
|
4012
|
-
: emptyState(_('hospitality_core.folio.empty.charges'), _('hospitality_core.folio.empty.chargesHint')),
|
|
4013
|
-
folio.state === 'open' ? (_jsx(RecordForm, { action: action, method: "post", submit: _('hospitality_core.folio.action.postCharge'), submitVariant: "secondary", hidden: { operation: 'post-charge', id: chargeId, lang: locale }, fields: [
|
|
4014
|
-
{
|
|
4015
|
-
name: 'stayId',
|
|
4016
|
-
label: _('hospitality_core.folio.charge.stay'),
|
|
4017
|
-
type: 'select',
|
|
4018
|
-
options: [
|
|
4019
|
-
{ value: '', label: _('hospitality_core.folio.value.noStay') },
|
|
4020
|
-
...stays.map((stay) => ({ value: stay.id, label: stay.code })),
|
|
4021
|
-
],
|
|
4022
|
-
},
|
|
4023
|
-
{
|
|
4024
|
-
name: 'description',
|
|
4025
|
-
label: _('hospitality_core.folio.charge.description'),
|
|
4026
|
-
required: true,
|
|
4027
|
-
},
|
|
4028
|
-
{
|
|
4029
|
-
name: 'type',
|
|
4030
|
-
label: _('hospitality_core.folio.charge.type'),
|
|
4031
|
-
type: 'select',
|
|
4032
|
-
required: true,
|
|
4033
|
-
value: 'service',
|
|
4034
|
-
options: CHARGE_TYPES.map((type) => ({
|
|
4035
|
-
value: type,
|
|
4036
|
-
label: _(`hospitality_core.charge.${type}`),
|
|
4037
|
-
})),
|
|
4038
|
-
},
|
|
4039
|
-
{
|
|
4040
|
-
name: 'quantity',
|
|
4041
|
-
label: _('hospitality_core.folio.charge.quantity'),
|
|
4042
|
-
type: 'decimal',
|
|
4043
|
-
value: '1',
|
|
4044
|
-
step: '0.01',
|
|
4045
|
-
required: true,
|
|
4046
|
-
},
|
|
4047
|
-
{
|
|
4048
|
-
name: 'unitPrice',
|
|
4049
|
-
label: _('hospitality_core.folio.charge.unitPrice'),
|
|
4050
|
-
type: 'decimal',
|
|
4051
|
-
step: '0.01',
|
|
4052
|
-
required: true,
|
|
4053
|
-
},
|
|
4054
|
-
] })) : null,
|
|
4055
|
-
]) }),
|
|
4056
|
-
activeCharges.length && folio.state === 'open' ? (_jsx(Section, { title: _('hospitality_core.folio.section.correction'), description: _('hospitality_core.folio.section.correctionHint'), body: _jsx(RecordForm, { action: action, method: "post", submit: _('hospitality_core.folio.action.voidCharge'), submitVariant: "destructive", hidden: { operation: 'void-charge', lang: locale }, fields: [
|
|
4057
|
-
{
|
|
4058
|
-
name: 'chargeId',
|
|
4059
|
-
label: _('hospitality_core.folio.field.charge'),
|
|
4060
|
-
type: 'select',
|
|
4061
|
-
required: true,
|
|
4062
|
-
options: activeCharges.map((charge) => ({
|
|
4063
|
-
value: charge.id,
|
|
4064
|
-
label: `${charge.type === 'room' && charge.description.startsWith('room:')
|
|
4065
|
-
? _('hospitality_core.folio.charge.roomDescription')
|
|
4066
|
-
: charge.description} · ${formatMoney(_, charge.amount)}`,
|
|
4067
|
-
})),
|
|
4068
|
-
},
|
|
4069
|
-
{
|
|
4070
|
-
name: 'reason',
|
|
4071
|
-
label: _('hospitality_core.folio.field.voidReason'),
|
|
4072
|
-
type: 'textarea',
|
|
4073
|
-
required: true,
|
|
4074
|
-
help: _('hospitality_core.folio.field.voidReasonHint'),
|
|
4075
|
-
},
|
|
4076
|
-
] }) })) : null,
|
|
4077
|
-
_jsx(Section, { title: _('hospitality_core.folio.section.stays'), description: _('hospitality_core.folio.section.staysHint'), body: stays.length
|
|
4078
|
-
? dataTable(_, {
|
|
4079
|
-
columns: folioStayColumns(_, locale, timezone),
|
|
4080
|
-
rows: stays,
|
|
4081
|
-
id: (stay) => stay.id,
|
|
4082
|
-
})
|
|
4083
|
-
: emptyState(_('hospitality_core.folio.empty.stays'), _('hospitality_core.folio.empty.staysHint')) }),
|
|
4084
|
-
]) }),
|
|
4085
|
-
]) }));
|
|
4086
|
-
};
|
|
4087
|
-
export const foliosScreen = (_, rows, locale, timezone, frame) => (_jsx(Framed, { translator: _, title: _('hospitality_core.screen.folios.title'), frame: frame, body: rows.length
|
|
4088
|
-
? dataTable(_, { columns: folioColumns(_, locale, timezone), rows, id: (row) => row.id })
|
|
4089
|
-
: emptyState(_('hospitality_core.screen.folios.empty'), _('hospitality_core.screen.folios.emptyHint')) }));
|
|
4090
|
-
export const tapeChartScreen = (_, chart, locale, frame) => {
|
|
4091
|
-
const timezone = chart.timezone || 'UTC';
|
|
4092
|
-
const startKey = dateKeyIn(new Date(chart.from), timezone);
|
|
4093
|
-
const endKey = dateKeyIn(new Date(chart.to), timezone);
|
|
4094
|
-
const dayCount = Math.max(1, Math.round((Date.parse(`${endKey}T00:00:00Z`) - Date.parse(`${startKey}T00:00:00Z`)) / 86_400_000));
|
|
4095
|
-
const nowKey = dateKeyIn(new Date(), timezone);
|
|
4096
|
-
const boundaries = Array.from({ length: dayCount + 1 }, (_, index) => zonedMidnight(addCalendarDays(startKey, index), timezone).getTime());
|
|
4097
|
-
const days = Array.from({ length: dayCount }, (_, index) => {
|
|
4098
|
-
const key = addCalendarDays(startKey, index);
|
|
4099
|
-
const value = new Date(`${key}T12:00:00Z`);
|
|
4100
|
-
return {
|
|
4101
|
-
key,
|
|
4102
|
-
label: new Intl.DateTimeFormat(locale, { timeZone: 'UTC', weekday: 'short' }).format(value),
|
|
4103
|
-
detail: new Intl.DateTimeFormat(locale, {
|
|
4104
|
-
timeZone: 'UTC',
|
|
4105
|
-
day: '2-digit',
|
|
4106
|
-
month: '2-digit',
|
|
4107
|
-
}).format(value),
|
|
4108
|
-
today: key === nowKey,
|
|
4109
|
-
};
|
|
4110
|
-
});
|
|
4111
|
-
const unassigned = chart.events.filter((event) => !event.roomId);
|
|
4112
|
-
const rows = [
|
|
4113
|
-
...chart.rooms.map((room) => ({
|
|
4114
|
-
id: room.id,
|
|
4115
|
-
label: room.name,
|
|
4116
|
-
detail: room.roomType?.name ?? room.code,
|
|
4117
|
-
state: room.status,
|
|
4118
|
-
})),
|
|
4119
|
-
...unassigned.map((event) => ({
|
|
4120
|
-
id: `__unassigned:${event.id}`,
|
|
4121
|
-
label: _('hospitality_core.screen.tapeChart.unassigned'),
|
|
4122
|
-
detail: event.guest,
|
|
4123
|
-
state: 'unassigned',
|
|
4124
|
-
})),
|
|
4125
|
-
];
|
|
4126
|
-
const events = chart.events.map((event) => {
|
|
4127
|
-
const startsAt = new Date(event.start).getTime();
|
|
4128
|
-
const endsAt = new Date(event.end).getTime();
|
|
4129
|
-
const matchingStart = boundaries.findIndex((_boundary, index) => index < dayCount && startsAt < boundaries[index + 1]);
|
|
4130
|
-
const eventStart = matchingStart < 0 ? dayCount - 1 : Math.max(0, matchingStart);
|
|
4131
|
-
const boundaryAfterEnd = boundaries.findIndex((boundary, index) => index > 0 && endsAt <= boundary);
|
|
4132
|
-
const eventEnd = boundaryAfterEnd < 0 ? dayCount : boundaryAfterEnd;
|
|
4133
|
-
return {
|
|
4134
|
-
id: event.id,
|
|
4135
|
-
rowId: event.roomId ?? `__unassigned:${event.id}`,
|
|
4136
|
-
start: Math.min(dayCount - 1, eventStart),
|
|
4137
|
-
span: Math.max(1, eventEnd - eventStart),
|
|
4138
|
-
label: event.guest,
|
|
4139
|
-
detail: providerName(_, event.provider),
|
|
4140
|
-
state: event.state,
|
|
4141
|
-
tone: workflowTone(event.state),
|
|
4142
|
-
};
|
|
4143
|
-
});
|
|
4144
|
-
return (_jsx(Framed, { translator: _, title: _('hospitality_core.screen.tapeChart.title'), frame: frame, body: scheduleBoard({
|
|
4145
|
-
corner: _('hospitality_core.screen.tapeChart.corner'),
|
|
4146
|
-
days,
|
|
4147
|
-
rows,
|
|
4148
|
-
events,
|
|
4149
|
-
empty: emptyState(_('hospitality_core.screen.tapeChart.empty'), _('hospitality_core.screen.tapeChart.emptyHint')),
|
|
4150
|
-
}) }));
|
|
4151
|
-
};
|
|
4152
|
-
//# sourceMappingURL=screens.js.map
|