13 Commits

Author SHA1 Message Date
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