Skip to content

Development - #4

Merged
aledguedes merged 9 commits into
mainfrom
development
Aug 28, 2026
Merged

Development#4
aledguedes merged 9 commits into
mainfrom
development

Conversation

@aledguedes

Copy link
Copy Markdown
Contributor

No description provided.

aledguedes and others added 9 commits August 12, 2026 14:49
Introduce comprehensive product domain models (status, suppliers, tags, inventories, pricing, OEM, equivalents, vehicle applications, etc.), add entity-reference and initialProductPayload. Replace legacy ProductRequest/Response shapes with UpdateProductPayload, mapResponseToPayload and defaultUpdatePayload. Add WarehouseService and adjust CategoryService/ProductService signatures. Refactor product workspace and form flow to separate API Product (product) from editable payload (productForm), update many components/templates to use new fields and fix pagination/slicing and inventory aggregation. Misc UI/behavior adjustments and commented legacy transformer code left for reference. Verify API compatibility when saving/updating products.
Overhaul inventory UI and data flow: add TableHeaderOption model and table-values, introduce reserved_quantity to UpdateProductInventoryPayload and mapResponseToPayload, and replace the old inventory form with a full-featured inline multi-warehouse table. The ProductInventoryTab component now uses signals/computeds/local state, provides add/change/remove/toggles, computes totals and stock badges, and emits inventoriesChange. ProductWorkspace passes inventories and handles onInventoriesChange. Minor UX / template improvements and safer payload mapping included.
Inventory tab: inline multi-warehouse table
Introduce unified OemCode model and manufacturer helpers; replace legacy ProductOemCode with OemCode in product responses. Add ManufacturerSummaryResponse, ManufacturerOptionsQuery and ProductSummaryResponse models. Implement OemCodeService with endpoints for listing, options and product-scoped OEMs. Revamp compatibility tab template and component to support search, manufacturer filters, selection, pagination and new outputs/events. Wire OEM fetching and manufacturer-by-product options in ProductWorkspace; add unit sale service usage in ProductCreate. Minor API-model field adjustments and small logging added. Improves OEM UI/UX and backend integration.
Introduce application initialization and a client-side caching layer for common option data. Adds AppInitializerService, InitialDataLoader, IndexedDbService, AppCacheService and AppChannelService (cross-tab sync), plus SessionStorageService. Implement generic stores (OptionCacheStore, PaginatedCacheStore) and concrete stores for categories, manufacturers, OEM codes, part origins, statuses, unit-sales and warehouses. Add ProductByIdService, query utilities (createDefaultQuery/isSameQuery), many new/updated models (GeneralOption, query pagination fields, cache models) and adjust services/components to use the new stores and types. Remove legacy warehouses service and add paginationInitialData helper. Purpose: consolidate option loading, enable persistent caching and deduplicate initial API calls.
Replace loadInitialOptions with hydrate() and improve OptionCacheStore (async API loads, query handling, cache subscription and clear). Comment initial loader calls and update AppInitializer to use hydrate. Normalize warehouse option mapping. Simplify compatibility tab imports and remove unused OnChanges. Move/clean basic-info section markup. Large refactor of inventory tab (HTML + TS): introduce local signal state, computed helpers, add/remove warehouse flow with restore-from-cache, inline editing, toggles, improved layout/styling and footer docs; remove tableHeaders dependency. Remove stray debug logs in sidebar and workspace.
Adds tracking for tabs modified in the product workspace and uses that state to build a partial update payload instead of sending the full form on save. This keeps updates scoped to the edited sections, resets the dirty state after a successful save, and avoids overwriting untouched product data.
@aledguedes
aledguedes merged commit 82c2e05 into main Aug 28, 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