From 6fef92885eadf9f13750b845e112f5ac3ad15138 Mon Sep 17 00:00:00 2001 From: Yurii Surzhykov <44873047+yuriisurzhykov@users.noreply.github.com> Date: Tue, 21 May 2024 01:56:18 -0700 Subject: [PATCH 1/4] Update for the working hours display requirements --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index b98ccd2..b227d2f 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,16 @@ Purs-Android is an android version of the test application which is concidered as a "Take Home Assignment" # Requirements +## Data Layer + +• All operation hours should be grouped in one day. This means that if JSON file contains same day name but different hours of work they have to be displayed in one row. For example, instead of displaying: + +_Monday: 10am-12pm_ + +_Monday: 5pm-9pm_ + +The application should display: +_Monday: 10am-12pm, 5pm-9pm_ # UI Design From cf5b6bed03ba4c657fc00722ab930833bd851fbe Mon Sep 17 00:00:00 2001 From: Yurii Surzhykov <44873047+yuriisurzhykov@users.noreply.github.com> Date: Tue, 21 May 2024 10:44:30 -0700 Subject: [PATCH 2/4] Create base description for data requirements --- README.md | 40 ++++++++++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index b227d2f..42746a3 100644 --- a/README.md +++ b/README.md @@ -5,14 +5,38 @@ Purs-Android is an android version of the test application which is concidered a # Requirements ## Data Layer -• All operation hours should be grouped in one day. This means that if JSON file contains same day name but different hours of work they have to be displayed in one row. For example, instead of displaying: - -_Monday: 10am-12pm_ - -_Monday: 5pm-9pm_ - -The application should display: -_Monday: 10am-12pm, 5pm-9pm_ +### Connection +- The application must have connection to the internet to retrieve the working hours +- If no connection, the error should be displayed notifying user that he has no connection to the internet +- If connection lost during request, the error should be displayed notifying a user that connection to the endpoint failed +- If there is no connection or the connection is lost while retrieving data from a remote computer, the cached data, if any, should be displayed + +### Cache +- When application successfully retrieved the data from remote that data should be persisted on the device for further usage if needed +- Every time user opens application the cache should be updated in order to keep data fresh + +### Data format +#### Cloud +The JSON structure contains location structure so the DTO for **location** should be created with the following fields +- Location name – _String_ +- List of working days – _Collection_ + +The **working day** structure should contain the following fields: +- Day of week – _String_ +- Start local time – _String_ +- End local time – _String_ + +#### Cache +The cached structure should be similar to the cloud. There should be 2 entities: **location** and **working hours**. The location structure should contain location id which can be an integer, and the location name which is the String. + +`Location` +- LocationId – _Int_ +- LocationName – _String_ + +`Working hours` +- Work day name – _String_ +- Working hours – _String_ (all working hours can be persisted in single sting separated with comma) +- LocationId – _Int_ (a foreign key pointing a location associated with it) # UI Design From a0b8b726481c95e588e67198affcbcc4422a798e Mon Sep 17 00:00:00 2001 From: Yurii Surzhykov <44873047+yuriisurzhykov@users.noreply.github.com> Date: Tue, 21 May 2024 11:13:50 -0700 Subject: [PATCH 3/4] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 42746a3..87b52b0 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,8 @@ The cached structure should be similar to the cloud. There should be 2 entities: `Working hours` - Work day name – _String_ -- Working hours – _String_ (all working hours can be persisted in single sting separated with comma) +- Start time – _String_ +- End time – _String_ - LocationId – _Int_ (a foreign key pointing a location associated with it) # UI Design From 3663351f13b3e8aec844593fe391c09cfb287d65 Mon Sep 17 00:00:00 2001 From: Yurii Surzhykov <44873047+yuriisurzhykov@users.noreply.github.com> Date: Tue, 21 May 2024 19:58:54 -0700 Subject: [PATCH 4/4] Update README.md --- README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 87b52b0..96b58d6 100644 --- a/README.md +++ b/README.md @@ -29,15 +29,15 @@ The **working day** structure should contain the following fields: #### Cache The cached structure should be similar to the cloud. There should be 2 entities: **location** and **working hours**. The location structure should contain location id which can be an integer, and the location name which is the String. -`Location` -- LocationId – _Int_ -- LocationName – _String_ - -`Working hours` -- Work day name – _String_ -- Start time – _String_ -- End time – _String_ -- LocationId – _Int_ (a foreign key pointing a location associated with it) +Location +- `LocationId` – _Int_ +- `LocationName` – _String_ + +Working hours +- `WorkDayName` – _String_ +- `StartTime` – _String_ +- `EndTime` – _String_ +- `LocationId` – _Int_ (a foreign key pointing a location associated with it) # UI Design