13 Commits

Author SHA1 Message Date
your-name
61252a3aa9 feat: Implements reception validation process
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.
2025-07-31 01:07:48 +03:00
your-name
ab4a56ed41 feat: Adds draft status for stock pickings
Introduces an `isDraft` property to `StockPickingRecordEntity` to mark receptions with local modifications.

Automatically sets a reception to draft status when a product's quantity is incremented via scanning. Displays a 'Brouillon' chip on reception cards to provide visual feedback for draft operations.

Ensures reception details are refreshed after scanning to reflect the updated draft status and provides immediate error feedback when no product is found during a scan.
2025-07-30 20:26:17 +03:00
your-name
46b93d7fa4 enhance: Enhances reception details with refresh and syncs scan quantities
Adds pull-to-refresh functionality to the reception details page, allowing users to manually update the displayed information.

Ensures that when a product is scanned, both the move line and the main move entities have their quantities correctly incremented, improving data consistency.
2025-07-30 20:00:03 +03:00
mandreshope
2c003ba335 feat: Implements reception-specific scanning
Replaces the generic scanner route with a dedicated reception scanning page.

This change ensures the scanning process initiated from reception details is context-aware by passing the reception ID directly to the new `ReceptionScanPage`. This provides a more tailored and efficient workflow for reception operations.
2025-07-30 17:00:49 +03:00
mandreshope
9dad7f9d9f feat: Integrates ObjectBox for stock picking persistence
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.
2025-07-30 15:38:26 +03:00
mandreshope
3f9f840a1c refactor: Refactors StockPicking models; adds scanner navigation
Moves `StockPickingCompanyModel`, `StockPickingPartnerModel`,
`StockPickingLocationModel`, and `StockPickingTypeModel` to
`stock_picking_record_model.dart`. This consolidates related schema
definitions for improved organization and clarity.

Enables the floating action button on the reception details page
to navigate to the scanner route, streamlining the workflow.
2025-07-30 14:22:03 +03:00
mandreshope
6e49971883 enhance: Enhances data models and reception details
Improves JSON deserialization for product and stock picking models by
using custom `fromJson` methods and explicit `JsonKey` mappings.
This ensures robust parsing of fields like barcode, display name, and product IDs.

Adds a new `ecart` getter to calculate the difference between requested
and received quantities for stock moves.

Updates the reception details page to display a list of products
with their requested, received, and calculated difference quantities.

Removes redundant JSON-RPC fields from the `stock.picking/web_read` API call.
2025-07-30 14:16:27 +03:00
mandreshope
1d331acc54 feat: Streamlines product data and stock picking API
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.
2025-07-30 12:47:08 +03:00
mandreshope
d09d8ace8c feat: Implements visual status for pickings
Introduces an `isDone` extension property for stock picking records to simplify status checks.

Enhances the `StockPickingCard` to visually represent the picking's completion status with a distinct icon and color (green for 'done', grey for 'in progress'), improving clarity at a glance. Information row values are now consistently uppercased.

Conditionally displays scan-related actions (QuickActionComponent and FloatingActionButton) in the reception details page, making them available only when the picking is not yet completed. This guides users by preventing interactions on finished operations.
2025-07-30 10:49:51 +03:00
mandreshope
61047f266d chore: Renames project to e_scan
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).
2025-07-30 09:19:44 +03:00
mandreshope
ad8949e880 feat: Enables scan action on reception details
Activates the 'Scan' quick action button on the reception details page to navigate to the scanner. This allows users to initiate a scan directly.
2025-07-29 14:52:21 +03:00
mandreshope
8252cf0b22 feat: Adds stock picking detail view and API call
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.
2025-07-29 14:43:43 +03:00
mandreshope
9435907c28 feat: Adds session management and reception detail view
Updates the sign-in API endpoint to `/simpos/v1/sign_in`.
Captures the `set-cookie` header from successful sign-in responses and stores it as a `sessionId`.
Persists the session ID using secure storage and includes it in subsequent API requests via the `Cookie` header for improved session management.
Extends the `AuthModel` to include the new `sessionId` field.

Enables navigation from the reception list to a new reception details page, passing the selected reception's ID.
Refactors the `StockPickingCard` into a dedicated component and adds loading indicators to the reception list.
2025-07-29 13:45:24 +03:00