25 Commits

Author SHA1 Message Date
your-name
18f74daae4 feat: Implement explicit synchronization and validation
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.
2025-07-31 02:34:50 +03:00
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
your-name
da2c3ac4f0 enhance: Enhances scanner UI and integrates toast notifications
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.
2025-07-30 19:35:43 +03:00
your-name
68a2803b6e enhance: Enhances product scanning with local ObjectBox integration
Moves product lookup from external API calls to a local ObjectBox database. This improves performance and enables offline product identification during scanning.

Removes the standalone scanner page, consolidating barcode scanning functionality directly into the reception flow for a more streamlined user experience.

Updates ObjectBox entity fields by removing `final` modifiers, allowing the database to manage and update persisted data effectively. Introduces new methods in the reception scan model to support local product checks, retrieval, and quantity increment for scanned items.
2025-07-30 19:01:14 +03:00
your-name
fc076f7290 style: Updates reception scan UI and data handling
Refines the `ProductScannedComponent` by updating button labels, icons, and actions to clarify the user workflow. The "Nouveau scan" button is now "Terminer" (onDetails), and "Voir détails" is "Continuer" (onRescan).

Transitions the `ReceptionScanPageModel` to fetch reception data from the local ObjectBox database, enhancing offline capabilities and responsiveness. Prepares for local barcode processing by introducing a new handler.
2025-07-30 18:21:31 +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
1d15fd4d1c refactor: Streamlines stock picking data model
Refactors the `getAllStockPiking` API call to directly return a list of `StockPickingRecordModel`.

This change simplifies the data structure by removing the `StockPickingResponseModel` wrapper, making the `receptions` state in `ReceptionPageState` a direct, non-nullable list. It improves type safety and reduces verbose property access in the UI.
2025-07-30 14:32:28 +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
mandreshope
41a660db9a feat: Displays recent stock receptions
Fetches and displays a list of recent stock reception operations on the reception page.

Introduces a new `StockPickingCard` component to present each reception record clearly and consistently. The `ReceptionPageModel` now automatically fetches reception data upon initialization. Provides visual feedback for loading states and when no reception data is available, enhancing the user's overview of recent activities.
2025-07-29 12:07:29 +03:00
mandreshope
61345869e1 feat: Implements stock picking data fetching WIP1
Adds a new API call (`getAllStockPiking`) to retrieve stock picking records from the backend.

Refactors stock picking data models:
- Renames models for better clarity (e.g., `StockPickingResponse` to `StockPickingResponseModel`).
- Makes all model fields nullable to handle varying API responses gracefully.
- Introduces specific nested models (`StockPickingCompanyModel`, `StockPickingPartnerModel`, `StockPickingLocationModel`, `StockPickingTypeModel`) for related entities, enhancing type safety and data structure.

Integrates the new API call into `ReceptionPageModel` and introduces distinct loading states (`loadingUser`, `loadingReceptions`) for improved UI feedback.
2025-07-29 11:47:06 +03:00
mandreshope
b5e83e5b7f feat: Implements API-based user authentication
Replaces the mocked login flow with an actual API call to an authentication endpoint.

Updates the `AuthStruct` schema to align with the new API response, including fields for `accessToken`, `dbName`, `uid`, `name`, and `username`.

Introduces a `UserConnectedProvider` service for managing the storage and retrieval of authenticated user details, centralizing this logic and replacing prior direct local storage methods.

Integrates the new authentication process and user storage service into the login, reception, and profile pages for a unified experience.

Adjusts the splash screen duration to reflect the real-time nature of the authentication check.
2025-07-25 17:06:36 +03:00
mandreshope
4682be5b62 feat: Adds operation pages and refactors navigation
Introduces dedicated pages and routes for Delivery and Inventory operations.

Refactors the application drawer to include navigation links for these new operations, ensuring proper route transitions and closing the drawer on tap. Enhances the drawer's active state styling for list and expansion tiles, providing better visual feedback.

Extracts common app bar logic into a reusable `MainAppbarComponent` and integrates it into operation pages, starting with Reception, to standardize the application's header.

Standardizes routing paths for operation pages and ensures consistent page transitions across them.
2025-07-24 11:07:10 +03:00
mandreshope
48556dbeed refactor: Extracts Quick Actions component
Refactors the "Quick Actions" section on the reception page into a new `QuickActionComponent`.

This improves modularity and reusability of the quick action UI pattern. Also adjusts vertical padding on the main page content for a cleaner layout.
2025-07-24 09:35:56 +03:00
mandreshope
27863f800e style: Applies global theme and refines Reception page UI
Integrates `AppTheme` for consistent styling across the Reception page, affecting backgrounds, app bar, cards, and text.

Enhances `PrimaryButtonComponent` to support leading icons and centered content, and introduces `OutlineButtonComponent` for secondary actions, standardizing button usage.

Improves the AppBar by adding a drawer toggle and updating the title layout and styling. Removes the bottom navigation bar to streamline page navigation.
2025-07-24 09:05:43 +03:00
mandreshope
855770b428 refactor: Replaces Home page with Reception page
Removes the dedicated `HomePage` and its associated model files.

Configures `ReceptionPage` as the new default landing page after successful login and product form submission. Updates navigation and state management dependencies to direct users to the primary operational interface upon entry.
2025-07-23 17:19:37 +03:00