29 Commits

Author SHA1 Message Date
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
40ef71a28b refactor: Standardizes data model naming convention
Renames `AuthStruct` to `AuthModel` and `ProductStruct` to `ProductModel` to align with a consistent data model naming convention.

Updates all relevant imports, type declarations, and method signatures across the application to reflect these changes, improving codebase clarity and maintainability.

Includes minor code style improvements and refactorings in other components.
2025-07-29 10:09:03 +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
mandreshope
f01c34d10c refactor: Refactors page directory structure
Moves page files from verbose `*_page` named directories to simpler, more organized paths.

This includes:
- Renaming top-level pages (e.g., `home_page` to `home`, `login_page` to `login`).
- Nesting related pages under common directories (e.g., `product_form_page` and `product_list_page` are now under `product/`).

The update improves project organization, reduces verbosity in file paths, and enhances overall maintainability.
2025-07-23 17:20:47 +03:00
mandreshope
6ebc49709a refactor: Encapsulates drawer menu selection
Replaces separate menu and submenu indices with a dedicated `SelectedDrawerState` class.

This change centralizes the logic for determining the active drawer item, improving readability and maintainability of the drawer component. It simplifies selection checks by providing a unified `isSelected` method.
2025-07-23 17:12:24 +03:00
mandreshope
63d5a21079 feat: Extracts home page drawer into reusable component
- Extracts the complex `Drawer` widget from the `HomePage` into a dedicated `DrawerComponent`. This enhances modularity, improves code readability, and allows for easier reuse of the navigation drawer across the application.
- Updates iOS project configuration files (`project.pbxproj` and `contents.xcworkspacedata`) to properly integrate CocoaPods dependencies. This typically occurs after running `pod install` and includes adding Pods frameworks, build phases, and xcconfig references.
- Updates the Flutter SDK path in VS Code settings to a newer version.
2025-07-23 16:21:59 +03:00
mandreshope
b1a4005235 feat: Adds user image field and profile page
Adds an `image` field to the user data structure to support profile pictures.

Introduces a new profile page and sets up navigation from the home screen.

Changes the product list page provider to auto dispose for improved resource management.
2025-07-04 12:17:13 +03:00
mandreshope
6c3f2b80b0 feat: Adds product editing and deletion features
Enables viewing and editing existing product details by passing the product ID to the form page. The form now loads and displays the product data based on the provided ID.

Adds a delete button to each item in the product list, allowing users to remove products directly from the list view.

Updates navigation from the product list and scanner pages to pass the product ID when navigating to the product form.

Includes minor code style changes by applying the `sort_constructors_first` lint rule and updates dependencies (`flutter_lints`, `lints`).
2025-07-04 10:06:13 +03:00
mandreshope
09405b5da7 feat: Implement local product storage using ObjectBox
Configures the ObjectBox ProductEntity to allow assigning IDs. Adds a helper to convert ProductStruct to ProductEntity for easier storage.

Saves scanned products directly to the local ObjectBox store.

Updates the ProductListPage to fetch and display locally stored products from ObjectBox upon initialization.

Includes minor UI adjustments in the scanned product component and scanner page, and fixes loading state handling in HomePageModel.
2025-07-03 21:09:49 +03:00
mandreshope
44289e29dc feat: Adds product image field to data models
Includes an `image` field in the `ProductStruct` and `ProductEntity` data models.

Updates the ObjectBox schema and regenerates the necessary code to persist the new field.

Refactors the `ProductScannedComponent` to accept a `ProductStruct` object, simplifying parameter passing.

Updates the `ScannerPage` to build and pass the `ProductStruct` to the component, enabling the display of the product image and using the structured data for other details like quantity. The 'Marque' display is replaced with 'Quantité' in the component.
2025-07-03 17:20:44 +03:00
mandreshope
8eddb5d4b7 feat: Initializes Objectbox database on startup
Integrates Objectbox database initialization into the main application startup process.

Adds `path` and `path_provider` as direct dependencies, which are typically required for Objectbox to locate the database directory.
2025-07-03 16:28:55 +03:00
mandreshope
83a20c548b feat: Integrates ObjectBox and updates Product ID
Adds the ObjectBox database dependency for local data persistence.

Updates the Product ID field type from nullable String to non-nullable int with a default value of 0 to align with ObjectBox's integer ID requirements. Includes necessary generated files for plugin registration and model serialization.
2025-07-03 16:01:45 +03:00
mandreshope
28a8027e20 feat: Adds home page navigation drawer
Introduces a side navigation drawer on the home page to improve navigation and centralize user actions.

Displays the logged-in user's information (name, email) in the drawer header.
Adds a link to the Product List page ("Inventaire") within the drawer.
Moves the logout functionality to the drawer, ensuring user data is also cleared from local storage upon logout.
Ensures user data is saved to local storage during the login process and fetched when the home page loads.

Includes minor text updates on the Product Form page.
2025-07-03 15:04:30 +03:00
mandreshope
6f2f94b2da chore: Update app icons and button text
Updates the app icons for both Android and iOS across various sizes and densities.

Changes the text color of the primary button component to white for improved visibility.
2025-07-03 10:46:47 +03:00
mandreshope
0d3e3a033d feat: Adds utility to check internet connection
Provides a helper function `checkInternetConnexion` using the `connectivity_plus` package. It returns true for network types typically used for internet access (mobile, wifi, ethernet, vpn) and false otherwise.
2025-06-25 10:01:33 +03:00
mandreshope
812ece1ba8 refactor: Uses debugPrint for logging
Replaces print statements with debugPrint across the application to prevent logging in release builds.

Removes unused imports and variables for minor code cleanup.
2025-06-24 11:08:35 +03:00
mandreshope
e963abb0ce feat: Implements app theme system
Replaces hardcoded colors and standard Theme.of(context) accesses with a custom AppTheme.

Introduces distinct light and dark themes and persists the selected theme mode using shared_preferences.

Integrates the theme into the main app structure and applies it to various components and pages.

Adds google_fonts dependency for theme typography.
2025-06-23 17:48:03 +03:00
mandreshope
94b4fc1723 refactor: Refactor login flow and add product form route
Refactors the login page and model for improved separation of concerns. Moves navigation logic from the model to the page using success callbacks. Integrates a dedicated primary button component for the login action, showing loading state.

Adds a new secure route for a product form page and updates the scanner page to navigate to it when viewing scanned product details.

Simplifies the callback signature for viewing product details in the scanned product component. Also includes minor adjustments to the splash screen delay and theme definition.
2025-06-23 10:22:24 +03:00
mandreshope
aaeae104c5 refactor: Refactor product scanned component and scanner page
Refactor `ProductScannedComponent`:
- Removes redundant full-screen container.
- Adjusts padding and image size.
- Updates button styles to `FilledButton`.

Improve `ScannerPage`:
- Correctly updates loading state after product API calls.
- Simplifies fake barcode simulation for testing with a hardcoded value.
2025-06-20 16:17:05 +03:00
mandreshope
b705142d48 feat: Adds logout functionality
Adds a logout button to the home page app bar.

Implements the logout logic in the login page model, clearing the stored user token.

Navigates to the splash screen after logout to handle redirection based on the updated authentication state.
2025-06-19 16:56:13 +03:00
mandreshope
406e5b1909 initial commit 2025-06-19 16:41:41 +03:00