Skip to content

Development - #1

Merged
aledguedes merged 8 commits into
mainfrom
development
Aug 6, 2026
Merged

Development#1
aledguedes merged 8 commits into
mainfrom
development

Conversation

@aledguedes

Copy link
Copy Markdown
Contributor

No description provided.

Introduce product API calls and wire up data-table actions/badges. Key changes: ProductService: use new environments import, add flag, getAll and getById. ProductResponse now extends Record<string, unknown>. Data-table: render badges and icon cells, loop actions, centralize clicks with onActionClick and emit actionClick; import BadgeComponent. ProductForm: inject ProductService, add product signal and productById() call. Products page: handle loading/meta from API and added handleProductAction. Move environment files to src/environments and add environment.prod.ts.
Introduce remote-search autocomplete and related backend models/services; enhance product form with inventory tab and invoiced flag.

Key changes:
- New models: categories, category options, manufacturers, manufacturer options, general query, product request payload.
- Utility: buildHttpParams for HttpParams construction.
- Services: CategoryService, ManufacturerService, StatusService (use environment.apiUrl).
- Design system: AutocompleteSelect component (TS/HTML/CSS) and new icon cases (archive, receipt).
- Product form: integrate autocomplete for category/manufacturer, async search with debounced Subjects, add "inventario" tab, inventory fields (warehouse, quantity, min/max, allow_backorder), is_invoiced flag, update payload to include inventory object.
- Minor: update index.html title to "RECCOS Shop Car".

These changes enable real-time option loading from the API and extend product creation with inventory management.
Introduce a shared DSelectOption model and StatusOption/StatusOptionsResponse models. Add StatusService.getOptions to fetch status options from the API and map responses into DSelectOption shape. Refactor select and autocomplete components to use DSelectOption. Update product form to use signal-based statusOptions, call onStatusSearch during init, replace static status list, and adjust template binding ([options] uses statusOptions()). Also remove an informational panel in the product form template. Small import and signal reorganizations to support these changes.
Introduce ProductFormState model and a product-payload.transformer with helpers (type conversions, transformToCreatePayload, transformToUpdatePayload, validateProductForm, mapProductBackendErrors). Make product request types nullable and add UpdateProductPayload. Add ProductService.create/update methods. Update product form template to surface field errors and product-form.ts to use computed formState, build create/update payloads, populate form from API, call create/update endpoints, and handle validation errors and tab switching.
Introduce a new product creation/workspace feature: adds standalone product-create and product-workspace components with tabbed subcomponents (general, commercial, inventory, media, compatibility, administration) and UI pieces (sidebar, stepper). Adds models, utilities and compatibility-modules.config to centralize compatibility modules. New services: PartOriginService and UnitSaleService; ProductService gains delete(). Payload transformer and request models updated to match create API contract and validation rules. Routes updated to point to new components and appConfig registers provideHttpClient(withFetch()). Legacy product-form files removed and global scrollbar styles refined.
Introduce model and API payload improvements and revamp the product workspace UI. Update UpdateProductPayload (nullable dimensions, barcode, part_origin_id) and add nested UpdateProductPricePayload and UpdateProductInventoryPayload. Change ProductService.getById to expect wrapped getAllResponse. Enhance design-system input to expose step/min/max attrs. Large refactor of product form/sidebar: new responsive, scrollable tab strip, left/right scroll controls, accessible tab roles, new tab keys (classification, logistics, visibility), status/SKU display, improved badges and layout. product-workspace now handles wrapped responses, sets current status, maps nested pricing/inventory, and comments out unused media/admin components. Add .no-scrollbar CSS. Misc whitespace/formatting tweaks.
Refactor: convert product-related fields from camelCase to snake_case across models, components and payload transformer to match API naming. Add warehouses models and WarehousesService and wire warehouseOptions into product workspace and general tab. Extend ProductResponse with richer types (units, part_origin, oem_codes, equivalents, applications, suppliers, created_at/updated_at) and adjust nullable/primitives (active, pricing, inventory). Also minor fixes: select equality check, promotional date nullability, and validation/payload mapping updates to use snake_case.
@aledguedes
aledguedes merged commit f1b1fce into main Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant