9.1 KiB
9.1 KiB
Work Log
Friday, December 5, 2025
Features & UI Updates
- Scan Result User Screen (
scan_result_user.dart)- Refactoring:
- Redesigned the UI to match the style of the Admin
ScanResultScreen. - Implemented a
DefaultTabControllerwith "Item Movement" and "Item Information" tabs. - Adopted the "framed image" style and consistent Key-Value pair styling with icons.
- Redesigned the UI to match the style of the Admin
- Data & Display:
- Added a "Station" field to both the "Item Movement" and "Item Information" tabs.
- Renamed "Current Information" container to "Sender Information" in the Item Movement tab.
- Cleaned up the "Sender Information" container to display only the "User", removing the redundant "Store" and "Station" fields in that specific context.
- Actions:
- Integrated user-specific actions (Receive, Return, Deploy Station, Cancel) into the new
_buildDynamicActionSectionwithin the Item Movement tab.
- Integrated user-specific actions (Receive, Return, Deploy Station, Cancel) into the new
- Verification:
- Successfully built the APK (
flutter build apk --debug) to verify the changes.
- Successfully built the APK (
- Refactoring:
Thursday, December 4, 2025
Features & Logic Updates
- Dashboard Reporting (Admin & User)
- Service Layer:
- Created
lib/services/report_service.dartto interface with the/InvMainAPI/GetInventoryReport/{deptId}endpoint.
- Created
- Admin Dashboard (
home_screen.dart):- Integrated
ReportServiceto fetch real-time inventory statistics. - Implemented logic to determine the correct department context:
- Fetches data for "All" (0) if the user is SuperAdmin/SystemAdmin.
- Fetches data for the specific department ID for other admin roles.
- Replaced the placeholder "Inventory Report" table with a dynamic table displaying:
- Total Items Registered
- Current Stock
- New Items (This/Last Month)
- Stock Out (This/Last Month)
- Integrated
- User Dashboard (
home_screen_user.dart):- Integrated
ReportServiceto fetch inventory statistics specific to the user's department. - Updated the "INFORMATION" card (orange gradient) to display fetched data:
- Total Items
- Current Stock
- New (Month)
- Stock Out (Month)
- Added loading indicators (
...) for data fields while fetching.
- Integrated
- Service Layer:
Wednesday, December 3, 2025
Features & Logic Updates
-
QR Scanning & Item Movement (User Side)
- New Screens:
- Created
lib/screens/user/scan/scan_user.dart: Dedicated camera scanning screen for users. - Created
lib/screens/user/scan/scan_result_user.dart: Implements user-specific scanning logic based onQrUser.txt.
- Created
- Logic Implementation:
- Receive Item: Only allowed if the item is "On Delivery" and assigned to the current user.
- Return Item: Allowed if the user currently holds the item.
- Deploy Station: Enables assigning an item to a station managed by the user.
- Cancel Movement: Implemented cancellation logic specific to user movements (similar to Admin but tailored for user context).
- Status Handling: Added logic to handle "Request Again" (already returned) and "Not Assigned to You" scenarios.
- Type Safety: Fixed type comparison bugs (User ID string vs int) to ensuring accurate permission checks.
- Navigation:
- Updated
BottomNavBarto route non-admin users to/scan-userand admins to/scan. - Registered
/scan-userroute inmain.dart. - Configured all actions (Receive, Return, Cancel, Deploy) to redirect back to the scanner screen upon success.
- Updated
- New Screens:
-
QR Scanning (Admin Side)
- Redirect Logic: Updated
lib/screens/admin/scan/scan_result.dartto redirect back to the scanner screen (Navigator.pop) instead of the Home Dashboard after successful actions (Receive, Add Movement, Cancel). - Modal Handling: Fixed the "Add Movement" flow to correctly close both the modal and the result screen (double pop) on success.
- Redirect Logic: Updated
-
Service Updates
ItemMovementService: Added endpoints for user actions:updateItemMovementUser,returnItemMovementUser, andstationItemMovementUser.
Tuesday, December 2, 2025
Features & Logic Updates
- Item Movement User Pages (Refactoring to match Web App)
- Item View (
item_movement_item_user.dart):- Implemented filtering logic to truncate history at the point of a completed "Return" or "Ready To Deploy" status.
- Corrected data mapping for "Start" (formerly
last...) and "End" (formerlyto...) fields. - Added Status Headings (Receive, Return, Change, Assign) with specific color coding.
- Added Completion Status (Complete, Incomplete, Canceled) indicators.
- Replaced the timeline visualization with a detailed list of movement cards for full history visibility.
- Updated Icon logic for Start/End locations.
- Station View (
item_movement_station_user.dart):- Integrated
ItemMovementServiceto fetch real data (removed mock data). - Implemented grouping logic: Group by Station -> Group by Item -> History.
- Applied the same history filtering/truncation logic as the Item View.
- Updated UI components to be consistent with the detailed movement cards in Item View.
- Integrated
- All View (
item_movement_all_user.dart):- Updated
_fetchInitialDatato group movements byuniqueIDand select only the latest valid movement. - Implemented filtering to exclude items from the main view if their latest status is "Return" or "Ready To Deploy" and they are completed.
- Restored missing state variables and fixed import issues during refactoring.
- Updated
- Item View (
Monday, December 1, 2025
Features & Logic Updates
-
QR Scanning & Item Movement (
scan_result.dart)- Completely rewrote
ScanResultScreento match the web application's logic (QrMaster.txt). - Implemented dynamic UI tabs:
- Item Information: Displays read-only item details (Image, Name, Part/Serial No, Quantity, PIC).
- Item Movement: Displays current status and context-aware action buttons (Receive, Cancel, Add Movement).
- Actions & Logic:
- Assigning: Implemented a modal form to assign items to User, Station, Store, Supplier, or mark as Faulty.
- Consignment Note: Added functionality to upload Consignment Notes via Camera or File Gallery (converted to Base64).
- Receiving: Added logic to receive items based on their current status (e.g., "On Delivery" -> "Delivered", "Repair" -> "Ready To Deploy").
- Cancellation: Implemented a complex cancellation flow that updates the movement status to "Cancelled", creates a new "Register" movement to restore stock, and updates the item quantity.
- Redirect: Configured automatic redirection to the Dashboard (
/home) upon successful completion of any action.
- Completely rewrote
-
Service Updates
ItemService: AddedgetItem(fetch by ID) andupdateItemQuantity.ItemMovementService: AddedaddItemMovement,updateItemMovementMaster, andgetItemMovementById.
Wednesday, November 26, 2025
Features & Logic Updates
-
Admin Filtering (Item Movement & Product Request)
- Implemented client-side department-based filtering for "Inventory Master" role in
item_movement_service.dartandproduct_request_service.dart. - Logic now ensures Inventory Masters only see requests/movements involving users from their own department (combined with existing store management logic).
- Fetched user lists to map User IDs to Department IDs dynamically.
- Implemented client-side department-based filtering for "Inventory Master" role in
-
UI Updates
- Navigation Bar (
nav_bar.dart): Updated the Drawer Header to display the logged-in user's Department Name below their role. - Dashboard Experiments: Briefly implemented and then reverted Department Name displays on Admin and User Dashboards and Title Bars based on user preference.
- Navigation Bar (
Tuesday, November 25, 2025
Features & UI Updates
-
Product Request User Page (
product_request_user.dart)- Removed section headers ("Pending Request", "Complete Request", "Rejected Request").
- Updated "Requested" and "Rejected" details layout to a 3-column grid.
- Increased animation speed for expanding/collapsing details.
- Added "Pull to Refresh" functionality.
- Added a "Show" button for documents/pictures to view them in a dialog.
- Implemented "Delete Request" functionality connected to the API.
-
Item Movement User Pages
- Added "Pull to Refresh" to:
item_movement_all_user.dartitem_movement_item_user.dartitem_movement_station_user.dart
- Item Movement Item User (
item_movement_item_user.dart)- Removed product image from the main card.
- Simplified title to show only Item ID (matching Admin style).
- Confirmed usage of
timeline_tile.
- Added "Pull to Refresh" to:
-
Product Request Form (
product_request_user_form.dart)- Integrated
file_pickerpackage. - Implemented file selection for documents/pictures.
- Added Base64 conversion for file upload payload.
- Integrated
-
Admin & Technician Pages
- Inventory Master (
invMaster_to_invMaster.dart): Added "Show" button for documents/pictures. - Technician (
technician_to_invMaster.dart): Added "Show" button for documents/pictures.
- Inventory Master (
Fixes
- Fixed a compilation error in
product_request_service.dart(missing closing brace).