# CHANGELOG

## Version 0.8.0 - Mobile API v1

### Added

- Mobile token authentication.
- Mobile login endpoint.
- Mobile logout endpoint.
- Mobile user profile endpoint.
- Mobile dashboard endpoint.
- Mobile van boxes endpoint.
- Mobile box items endpoint.
- Mobile barcode product lookup endpoint.

### Technical

- Added mobile_tokens table.
- Added MobileToken model.
- Added MobileAuth middleware.
- Added routes/api.php.
- Added API documentation.

### Next

- Connect Flutter login to Laravel API.
- Save token in Flutter secure storage.
- Load dashboard from API.
- Load van boxes from API.

## Version 0.8.2 - Mobile Van Stock API

### Added

- Mobile van stock endpoint.
- Search support for SKU, barcode, name, and category.

## Version 0.8.4 - Van Stock API Improvements

### Fixed

- Removed repeated products in Mobile My Van API by grouping stock rows.
- Added product image URL to van stock API.
- Added van meta data for mobile screen title.

## Version 0.8.6 - Van Stock Quantity Fix

### Fixed

- Mobile My Van now reads only the latest van stock import.
- Prevented old imports from increasing displayed quantities.

## Version 0.8.11 - Mobile Inventory Check API

### Added

- Mobile inventory check current endpoint.
- Mobile inventory check start endpoint.
- Mobile inventory check mark endpoint.
- Mobile inventory check finish endpoint.
- API documentation for inventory check.

## Version 0.9.4 - Shipment Parser Fix

### Fixed

- Shipment parser now supports new WIWU shipment Excel format.
- Supported columns: Item, Barcode 1, Description, Item Category Name, Qty.
- Shipment upload now auto-parses after upload.
- PDF generation now attempts parsing if shipment items are empty.

## Version 0.9.5 - Smart Price Import

### Added

- Smart price import command.
- Auto-detection for SKU, barcode, Van Sales, Wholesale, and RRP price columns.
- Price update from uploaded price list files.

### Behavior

- Current Van Sales is used first.
- If Van Sales is missing, Wholesale is used.
- If Wholesale is missing, RRP is used.

## Version 0.9.6 - Laravel Smart Price Upload

### Added

- Price list upload now smart-parses automatically from Laravel UI.
- Smart parser detects SKU, Barcode, RRP, Wholesale, and Van Sales columns.
- Product prices are updated during parsing.
- Price import items are saved for review in Laravel.

### Behavior

- Current Van Sales is used first.
- If Van Sales is missing, Wholesale is used.
- If Wholesale is missing, RRP is used.
- Matched products are updated immediately after upload.

## Version 0.9.7 - Import Center v1

### Added

- Import Center module.
- Upload file to Import Center.
- Smart file type detection.
- Detection Review step.
- User confirmation before analysis.
- Analyze preview page.
- Import sessions database table.

### Flow

Upload File
→ System Suggestion
→ User Confirms Type
→ Analyze Preview
→ Final Import later

## Version 0.9.8 - Import Center Final Import

### Added

- Import Now button in Import Center preview.
- Import Center can now import confirmed Shipment files.
- Import Center can now import confirmed Price List files.
- Import Center can now import confirmed SOH files.
- Import sessions now update status to imported or failed.

### Pending

- Van Stock import from Import Center needs salesman/van selection.

## Version 0.9.9 - Smart Import Preview

### Added

- Smart preview for shipment files.
- Smart preview for price list files.
- Matched and not matched product status.
- Product photo preview.
- Shipment quantity and estimated value preview.
- Price old/new comparison preview.
- Ignored rows section for total rows.

## Version 0.9.10 - Import Center Van Stock

### Added

- Van Stock support in Import Center.
- Salesman / van selection before analysis.
- Smart Van Stock preview.
- Final Van Stock import from Import Center.
- Auto generated salesman van catalog after import.

### Behavior

- Upload file.
- Confirm as Van Stock.
- Select salesman / van.
- Analyze preview.
- Import Now.

## Version 0.9.11 - Price Sync Without Replacing Main Catalog

### Fixed

- Price List import no longer replaces the Regular Main Catalog.
- Price List import now updates products and existing active catalog item prices.
- Public portal ignores empty active Regular/Clearance catalogs.
- Empty active main catalogs are archived during the repair step.

### Added

- Catalog item price update tracking.
- UPDATED badge on customer catalog items when price was updated.
- Old price tracking for updated catalog items.

## Version 0.9.12 - Permanent Catalog Architecture

### Added

- Permanent catalog fields.
- Permanent Main Catalog.
- Permanent Clearance Catalog.
- Permanent Salesman Van Catalogs.
- Catalog repair command.
- Salesman van quantity badge inside customer catalog.
- Permanent catalog documentation.

### Changed

- Public portal now prefers protected permanent catalogs.
- Price updates no longer create or replace permanent catalogs.

## Version 0.9.13 - Permanent Catalog Safety Lock

### Added

- Safety lock command for permanent catalogs.
- Van Stock imports now reuse the permanent salesman catalog.
- Old non-permanent van stock catalogs are archived safely.
- Permanent catalogs are never archived by Van Stock import.

### Command

php artisan catalogs:safety-lock
