View difference between Paste ID: LuzKU6T3 and MgT4uGyX
SHOW: | | - or go back to the newest paste.
1-
Fill Check Legionella inspection in offline and send data in background 
1+
Fill Water Sample Legionella inspection (further - WSL inspection) in offline and send data in background
2
 
3-
When the user will open inspection screen for Check Legionella inspection, there are two possible cases. 
3+
4-
If there is an internet connection - lab number will be loaded from server automatically, as it is done now, and will be saved locally (but if there is a locally stored unsent order number, received from server order number will be ignored). 
4+
When the user will open Inspection screen for WSL inspection, there are two possible cases connected with Order Number.
5-
But if there is no internet connection - the user will have an ability to enter lab number and store it locally to send it in background later.
5+
6
CASE 1 - if there is an internet connection
7-
When the user have filled all data in the Edit Inspection side sheet (side fragment, where you enter all data for the inspection and choose options from drop-down menus like Kind of Water, Matrix etc), there are also two possible cases. 
7+
Order Number will be loaded from server automatically, as it is done now, and will be saved locally 
8-
If there is an internet connection - you can send entered data and receive lab number as you can do it now, the label for the save button will be `Send`. 
8+
(but if there is a locally stored unsent Order Number, received from server order number will be ignored).
9-
But if there is no internet connection - you can save data locally to send it in background later and receive lab number, the label for the save button will be `Save`.
9+
10
CASE 2 - if there is no internet connection
11-
Application will do sending of Check Legionella inspections in background. 
11+
There will be the possibility to enter lab number and store it locally to send it in background later.
12-
If there is an internet connection at the moment of saving order number or Check Legionella inspection data, or after being offline - internet connection received, the app will try to upload all locally stored edited Check Legionella inspections without check for rewrite data. Firstly, if needed, order number will be uploaded, and then - for each inspection-on-the-point, data will be uploaded, in order to receive lab number. If something went wrong, sending for failed Check Legionella inspection (or inspection-on-the-point) will be cancelled and error will be stored to be shown to the user on demand. Also, if order number sending is failed, sending of all inspection-on-the-points for this inspection will be cancelled.
12+
13
14-
For possible case if sending of Check Legionella inspections failed, new screen will be added for displaying sending errors (Send Legionella Errors screen). On this screen the user will see the list of all occurred Check Legionella sending errors for each inspection (with some information about inspection such as frequency, end date etc). It will be possible to open Inspection screen for inspection which failed (in order to correct data). 
14+
15-
Also the user can retry sending single Check Legionella inspection with rewrite data check, and if sending will succeed - list of sending errors will be updated, otherwise - error dialog will be shown and errors will be updated.
15+
When the user will open Inspection screen for WSL inspection, there are also two possible cases connected with Complete possibility.
16-
Also the user can retry sending all Check Legionella inspections with rewrite data check, and if sending will succeed - screen will be closed and the user will be returned to the previous screen, otherwise - error dialog will be shown and errors will be updated.
16+
17
CASE 1 - if there is unsent WSL inspection data
18-
Also for case if sending failed, new icon button will be added. Tap on this icon button will open Send Legionella Errors screen. Icon button will be added to the app bar near the three-dot button: on Settings screen and Inspections screen (where you can see a list of all inspections for chosen building).
18+
Hide `Approve` (a.k.a. `Complete`) button.
19
20
CASE 2 - if there is no unsent WSL inspection data
21
Show `Approve` (a.k.a. `Complete`) button.
22
23
24
25
When the user has just filled all data in the Edit Inspection side sheet (side fragment, where you enter all data for the inspection and choose options from drop-down menus like Kind of Water, Matrix etc), there are also two possible cases connected with internet connection.
26
27
CASE 1 - if there is an internet connection 
28
The user can send entered data and receive lab number as you can do it now, the label for the save button will be `Send`.
29
30
CASE 2 - if there is no internet connection
31
The user can save data locally to send it in background later and receive lab number, the label for the save button will be `Save`.
32
 
33
34
35
Application will do sending of WSL inspections in background.
36
37
CASE 1 - if there is an internet connection at the moment of saving order number or WSL inspection data
38
CASE 2 - after being offline, internet connection received
39
The app will try to upload all locally stored edited WSL inspections without check for rewrite data. 
40
Firstly, if needed, order number will be uploaded.
41
Then - for each inspection-on-the-point, data will be uploaded, in order to receive lab number. 
42
If something went wrong, sending for failed WSL inspection (or inspection-on-the-point) will be cancelled and error will be stored to be shown to the user on demand. 
43
If order number sending is failed, in addition to error storing, sending of all inspection-on-the-points for this inspection will be cancelled.
44
45
46
47
For possible case if sending of WSL inspections failed, new screen will be added for displaying sending errors (Send Legionella Errors screen). On this screen:
48
- the user will see the list of all occurred WSL sending errors for each inspection (with some information about inspection such as frequency, end date etc);
49
- the user can open Inspection screen for inspection which failed (in order to correct data);
50
- the user can retry sending single WSL inspection with rewrite data check, and if sending will succeed - list of sending errors will be updated, otherwise - error dialog will be shown and errors will be updated.
51
- the user can retry sending all WSL inspections with rewrite data check, and if sending will succeed - screen will be closed and the user will be returned to the previous screen, otherwise - error dialog will be shown and errors will be updated.
52
 
53
54
55
Also for case if sending WSL inspections failed:
56
- new icon button will be added. Tap action on this icon button will open Send Legionella Errors screen. Icon button will be added to the app bar near the three-dot button: on Settings screen and Inspections screen (where you can see a list of all inspections for chosen building);
57
- if the user has unsent WSL inspections data, on entering Settings screen and Inspections screen reminding dialog would be shown;  
58
- if the user has unsent WSL inspections data and tries to send isnpections, reminding dialog would be shown. The user will not be able to send inspections data if there is unsent WSL inspection data.
59
60
61
62
30h - Develop service for jobs on internet received
63
30h - Develop offline-saving logic for WSL inspection
64
20h - Develop sync logic (connection between offline and online interaction)
65
20h - Develop Send Legionella Errors Screen
66
20h - Connect UI to developed functionality
67
20h - Testing new logic
68
20h - Extra time for possible bug fixing
69
70
40h - Write tests for done functionality