Refactors the backorder dialog to use local Consumer widgets, reducing unnecessary rebuilds and improving performance. Corrects the loading state variable updated when confirming backorders, ensuring accurate UI feedback. Introduces a dedicated refresh method for receptions that includes a pre-sync, ensuring up-to-date data.
Marks the local stock picking record as synchronized and done after successful backorder confirmation. This ensures the client-side data accurately reflects the completion of the backorder process.
Updates the `createBackorderConfirmation` API call to dynamically specify whether to create a backorder (reliquat) or not.
Introduces a `toBackorder` parameter, enabling the API to handle both "with backorder" and "without backorder" scenarios based on user selection. This centralizes the backorder status setting within a single API call.
Additionally, adds loading indicators to the backorder dialog buttons for improved user feedback during the confirmation process.
Corrects API endpoints for creating, processing with, and processing without backorder confirmations.
Adds a new `isBackorder` getter to stock picking records for identifying backordered items, and improves the robustness of the `isDone` getter.
Integrates backorder detection into the reception validation process, prompting a dedicated confirmation dialog when a backorder is present.
Introduces new state management and methods (`withBackorder`, `withoutBackorder`) in the reception details model to handle the backorder confirmation logic.
Enhances the primary button component with a `backgroundColor` property for greater customization.
Refactors the reception process to provide clearer control over data synchronization and validation.
- Replaces the `isDraft` property with `synchronized` in `StockPickingRecordEntity` to accurately represent the local data's sync status with the backend.
- Introduces a new API endpoint and corresponding logic for `validateStockPicking`, allowing finalization of receptions.
- Splits the "Save" action into "Synchronize data" and "Validate reception" on the details page. "Validate" now implicitly performs a synchronization first.
- Updates UI elements (cards, quick actions) to reflect the new synchronization state and expose the new actions.
- Corrects a typo in the `updateAllMoveLineOnStockPicking` API method name.
- Improves local data update logic for scanned items, marking them as unsynchronized.
Introduces the ability to validate a stock reception by sending updated move line quantities to the backend.
This includes:
- Adding a new API call to update stock picking move lines.
- Integrating a "Validate Reception" button within the quick actions component on the reception details page.
- Implementing the logic to gather move line data and call the new API endpoint.
- Enhancing error messages on the scan page for products not expected in the current reception.
- Improving type safety for API response data.
Integrates the `toastification` package to provide clear and non-intrusive user feedback for operations like product not found.
Refactors the reception scan page UI by extracting reusable widgets for the scan information text, the scan box, and the flash button. This improves code organization and readability.
Switches the data source for reception details from API calls to the local ObjectBox database, improving performance and enabling offline access for this specific data.
Corrects the display of scanned product information to show the barcode instead of a generic ID.
Updates `go_router` to version 16.0.0.
Enables offline capabilities and improved data access for stock picking records.
API calls now prioritize local ObjectBox storage when offline and persist fetched data upon successful remote retrieval.
Introduces comprehensive model-to-entity conversion logic for stock picking data and its related models.
Updates UI components and state management to directly consume ObjectBox entities, optimizing data display and interaction.
Adjusts ObjectBox entity schema for improved flexibility and adds utility getters.
Refactors the product data model to primarily store `id`, `barcode`, and `displayName`. This simplifies the product structure, focusing on essential attributes for inventory and scanning operations.
Optimizes API calls for stock picking to fetch more relevant product details. Unnecessary fields are removed, and specific product attributes like `barcode` and `quantity` are now explicitly requested for stock moves.
Moves `StockPickingRecordModel` to its own dedicated file for improved code organization and maintainability. Updates all affected UI components and scanner logic to align with the revised product model.
Performs a comprehensive project rename from 'barcode_scanner' to 'e_scan' (or 'eScan' for user-facing labels). This update spans all relevant files, including:
- Application IDs and bundle identifiers for Android, iOS, macOS, and Linux.
- VS Code launch configurations.
- Dart package import paths.
- Project names and titles in `pubspec.yaml`, `README.md`, and platform-specific configurations (e.g., CMakeLists, Info.plist, AndroidManifest).
Implements a dedicated page for viewing detailed stock picking information.
- Introduces `getStockPikingById` API call to fetch a single stock picking record by ID.
- Enhances `MainAppbarComponent` to support customizable leading widgets, enabling a back button on detail pages.
- Improves `QuickActionComponent` by allowing optional `onTap` callbacks for actions, making buttons conditionally visible and reusable across different contexts.
- Adds `margin` property to `StockPickingCard` for flexible layout adjustments.
- Refactors `ReceptionDetailsPage` to utilize the new API call and display a single stock picking's details, adapting its app bar and quick actions accordingly.