Files
School/Anul 3/Semestrul 1/Mobile Applications/README.md
T
2025-02-06 20:33:26 +02:00

3.5 KiB

Mobile App Requirements: Medicinal Drug Management

Description

You have been tasked with developing a mobile application for managing medicinal drugs for our local drug store. The app should allow users to view, add, edit, and delete medicinal drugs. The application should also provide offline access, allowing users to interact with the data even when not connected to the internet. When online, the app should sync any changes made locally with the remote server.

1. Main Screen: Business Object Listing

The main screen should provide a list of all available medicinal drugs.

Each entry should display relevant information about the drug:

- Name: consisting of the drug's name.

- Category: indicating the drug's category or type. (e.g., Antibiotic, Painkiller, etc.)

- Number of Units: indicating the quantity of the drug available.

- Retail Price: displaying the price the drug will be selling at.

- Manufacturer: showing the company that manufactures the drug.

Offline Behavior:

If offline, the user will be able to see the locally saved drugs When online, automatically sync the the local database with the server

2. Create (Add New Medicinal Drugs)

Input Form:

Allow users to input drug details such as name, category, number of units, retail price, and manufacturer.

Include data validation for required fields and proper formats:

- number of units - positive integer number
- retail price - positive decimal number

Offline Behavior:

If offline, save the newly created drug locally with a message: “New drug saved locally. Will sync with server when online.” Ensure that unsynced drugs are flagged for synchronization once the app reconnects to the server. Online Synchronization:

When online, automatically sync the newly created drugs with the remote server and update the local database.

3. Update (Edit Existing Medicinal Drugs)

Edit Functionality:

Users can edit existing drug. Provide a form with pre-filled fields for the selected drug.

Provide a clear “Save” button to confirm updates.

Offline Behavior:

If offline, prevent updates with a message: “Cannot update while offline. Please reconnect to perform this operation.” Changes should not be allowed without a network connection.

Online Synchronization:

Ensure that any updates are immediately synced with the server when online, updating both local and remote records.

4. Delete (Remove Medicinal Drugs)

Deletion Confirmation:

Allow users to delete a drug, but prompt for confirmation with a message: “Are you sure you want to delete this drug?”

Offline Behavior:

If offline, allow deletion with a message: “Drug deleted locally. Will sync with server when online.” Online Synchronization:

Once online, successfully sync deletions, removing the drug from both the local database and the remote server.

5. Data Persistence (Local Storage & Offline Access)

Local Database:

The application must persist all business objects (medicinal drugs) in a local database for offline use. This ensures that users can view and interact with previously synced data even when offline. Synchronization:

On regaining network connectivity, the app should sync local changes (new, updated, or deleted drugs) with the remote server. Synchronization should be seamless, with background processing where possible.

Figma

https://www.figma.com/proto/gHQjuiaorcTJeI7Tl9zqfL/Silk-Road?node-id=6-2711&starting-point-node-id=13%3A3146

Main Delete Update