Discounts
Description
Discounts ships the Enso UI route tree and page modules used to manage client and supplier discount rules.
It covers the full backend-driven discount workflow for general, product, and service discounts, with dedicated list, create, and edit screens for both client and supplier contexts.
Installation
This package is distributed as part of the private Enso UI workspace and is normally consumed from the Solarlink client bundle.
Features
- exports the
/discountsroute tree consumed by the Enso shell - ships separate client and supplier discount flows
- covers general, product, and service discount families
- reuses a shared Enso form wrapper to enforce mutually exclusive company/person selection on client forms
Usage
import discountsRoutes from '@enso-ui/discounts';
import ClientDiscountIndex from '@enso-ui/discounts/src/bulma/pages/discounts/clients/Index.vue';
import SupplierProductDiscountEdit from '@enso-ui/discounts/src/bulma/pages/discounts/suppliers/products/Edit.vue';
The package is page-oriented. Applications usually register the route tree and let the backend forms and tables drive the create/edit/index pages.
API
Default export
Default export for the discount route group.
Import: @enso-ui/discounts
Shared form building block
src/bulma/pages/discounts/clients/components/BaseForm.vue
Wraps EnsoForm and toggles the company_id and person_id fields so only one client target can be selected at a time.
Routes
/discounts/clients
Route names:
discounts.clients.indexdiscounts.clients.generals.creatediscounts.clients.generals.editdiscounts.clients.products.creatediscounts.clients.products.editdiscounts.clients.services.creatediscounts.clients.services.edit
Pages:
src/bulma/pages/discounts/clients/Index.vuesrc/bulma/pages/discounts/clients/generals/Create.vuesrc/bulma/pages/discounts/clients/generals/Edit.vuesrc/bulma/pages/discounts/clients/products/Create.vuesrc/bulma/pages/discounts/clients/products/Edit.vuesrc/bulma/pages/discounts/clients/services/Create.vuesrc/bulma/pages/discounts/clients/services/Edit.vue
/discounts/suppliers
Route names:
discounts.suppliers.indexdiscounts.suppliers.generals.creatediscounts.suppliers.generals.editdiscounts.suppliers.products.creatediscounts.suppliers.products.editdiscounts.suppliers.services.creatediscounts.suppliers.services.edit
Pages:
src/bulma/pages/discounts/suppliers/Index.vuesrc/bulma/pages/discounts/suppliers/generals/Create.vuesrc/bulma/pages/discounts/suppliers/generals/Edit.vuesrc/bulma/pages/discounts/suppliers/products/Create.vuesrc/bulma/pages/discounts/suppliers/products/Edit.vuesrc/bulma/pages/discounts/suppliers/services/Create.vuesrc/bulma/pages/discounts/suppliers/services/Edit.vue
Companion Backend Package
The backend companion provides the route contracts, form payloads, and table definitions consumed by these discount pages.
Depends On
License
Proprietary. See LICENSE.