feat: add stock keeping units list component and related services
feat: implement checkbox component with label and hint support feat: create sale invoice full response model for invoice details feat: add single view component for displaying sale invoice details feat: define various list configurations for account, business activity, and consumer management feat: establish list configurations for managing devices, goods, and licenses feat: create list configurations for managing partners and their accounts feat: implement user management list configuration
This commit is contained in:
@@ -111,6 +111,37 @@ example: (value = '', isRequired = true): ControlConfig => [
|
||||
- `<field-example [control]="form.controls.example" />`
|
||||
- For numeric/price behavior, use `app-input` `type="number"` or `type="price"` and optional `[fixed]`.
|
||||
|
||||
## List Component Configs
|
||||
|
||||
- Centralized list metadata is stored in `src/app/shared/constants/list-configs/` — **never** in domain modules.
|
||||
- Structure by data type, not domain (e.g. `good-list.const.ts`, `sku-list.const.ts`, `category-list.const.ts`).
|
||||
- Each config implements `IListConfig` (defined in `list-config.model.ts`):
|
||||
- `pageTitle`: display title for the list page
|
||||
- `addNewCtaLabel`: call-to-action button label
|
||||
- `emptyPlaceholderTitle` and `emptyPlaceholderDescription`: empty state messaging
|
||||
- `columns`: array of `IColumn[]` definitions
|
||||
- Usage in list components:
|
||||
```ts
|
||||
@Input() header: IColumn[] = goodListConfig.columns;
|
||||
listConfig = goodListConfig;
|
||||
```
|
||||
- Any domain needing a list config imports from `@/shared/constants/list-configs` — no cross-domain dependencies.
|
||||
- **Do not** define configs inside domains or duplicate them across modules.
|
||||
|
||||
## Breadcrumb Usage in Stores & Views
|
||||
|
||||
- Entity stores expose `breadcrumbItems` as a computed signal.
|
||||
- Call `store.breadcrumbItems()` in view components and extend with current page:
|
||||
```ts
|
||||
setBreadcrumb() {
|
||||
this.breadcrumbService.setItems([
|
||||
...this.store.breadcrumbItems(),
|
||||
{ title: 'Current Page' },
|
||||
]);
|
||||
}
|
||||
```
|
||||
- Root page breadcrumbs are set in the store's `getData()` method once entity is loaded.
|
||||
|
||||
## Validation Checklist
|
||||
|
||||
- For TypeScript-only changes, run:
|
||||
|
||||
Reference in New Issue
Block a user