The RepairMenu is a Composable function in the org.lazyday.ldclient.ui package. It provides a user interface for managing repair records, including viewing, adding, and searching for repair records. The menu includes navigation options for different functionalities such as history, in-repair items, search, and NFC scanning.
NewRepairRecordD1, NewRepairRecordD2, NewRepairRecordD3, NewRepairRecordD4: Dialogs for adding a new repair record in multiple steps.NewRepairRecordConfirm: A dialog for confirming the creation of a new repair record.RecordNotFound: A dialog shown when no matching records are found.Repair records are fetched and stored in the repairItems state when the RepairMenu composable is launched. NFC Interaction
The RepairMenu interacts with NFC tags using the nfcManager. When an NFC tag is detected, its payload is processed to find matching repair records.
Repair records can be assigned to any authorized user that has already authenticated with the application for the first time. Once a user is authorized, their user display name will display as an option to select from within the “Assign To” dropdown menu. Once confirmed, the user will be listed as the assigned user for the record. The assigned user will then be able to see the record assigned to them within the “Assigned” tab in the Repair Menu
The NavigationRail provides options for navigating between different views:
The process of adding a new repair record involves multiple steps, each managed by a different dialog:
NewRepairRecordD1: Initiates the process and optionally starts an NFC scan.NewRepairRecordD2: Collects the raft number if manual option selected.NewRepairRecordD3: Collects the rental type if raftnumber not found in RaftMap.NewRepairRecordD4: Collects the repair notes.NewRepairRecordConfirm: Confirms the creation of the new repair record.
Also See: