# 18th July Report ## Progress Time: **09:00** Event: Entering the lab --- ### Weekly Meeting 2 Time: **09:15** - Weekly meeting in T-202 with Prof. Ray - Report can be seen [here](https://hackmd.io/@muhamadaldy/B1iMxn6-H). --- ### Discussion about Adjustment for User App Time: **13:20** - Discussion with Mr. Johnny, Ian, and Thariq in lab to have adjustment for User App, then report to Ms. Annie in chat group. - Should have discussion with Ms. Annie, according to UI design, for some several things: - The same user report two or more problems for the same dispenser, which data should be display in the Maintenance Progress Page? - In case of displaying multiple report of same dispenser, need the design in order not stack them. - The jellyfish icon for each dispenser in the Nearby Dispenser Page, still unclear. - Adjustment for database by add 4 more time attributes, based on the order from report to done: - Status 1 = UploadTime - Status 2 = NotifyTime - Status 3 = ConfirmTime - Status 4 = RepairCallTime - Status 5 = RepairDoneTime - Status 6 = MaintenanceDoneTime - Status 7 = CompleteTime - For every page except Dashboard Page need "X" icon to get back to previous page. - The target of User App is to help students to report if there any dispenser problem occured, not to has access and get data of all the dispenser. - Feature to track dispenser will send email to email address if his report status has been done (Complete). ### Discussion about Repairman App - Repairman App will be done when User App has reach it's final build to web. - It will using Dispenser Repair Condition API to get the data. - The return value from API (with new 4 time attributes when Mr. Johnny has finish it): ```json= "Data": [ { "Device_ID": "MA_05_01", "Email": "ntust.smartcampus@gmail.com", "ErrorType": 5, "Description": "Broken", "Status": 7, "UploadTime": "2019-01-02 09:36:44", "NotifyTime": "2019-01-03 08:22:31", "Maintainer": "Mr.Pang", "Result": "Someone push powersaving button", "CompleteTime": "2019-01-07 10:07:49", "Index": 0, "Source": null, "Source2": null, "Source3": null, "ConfirmTime": "2019-01-03 14:12:43", "RepairCallTime": "2019-01-04 10:20:02", "RepairDoneTime": "2019-01-06 09:04:51", "MaintenanceDoneTime": "2019-01-07 08:05:38" }, ... ] ``` - In Repairman App there is deadline time for each mission which posted by the company. - Company can assign the deadline time, stored in `RepairDoneTime`, for repairman to fix the problem. - When the `Status` is 4, problem still in progress (need to be fixed by repairman) while `RepairDoneTime` use as deadline for Repairman App, it will not appear in User App. - When repairman has done with the repairment it will update the `Status` to 5 and `RepairDoneTime` to the date when it's done. - After this, the progress of `Status` 5 will appeared in User App. - If there is mission in today meet the deadline, which stored in `RepairDoneTime`, it will disappear from Today Mission. - If above is happen then the company can assign again the mission with new deadline without changing the `Status` from 4 to 5. --- ### Fixing some bugs found in project 1. Login problem in Dashboard Page **Problem**: After login in Dashboard Page, it still prompt to login. **Solution**: - There is mistake logic in code, in `checkData` variable, where return value is string whereas in conditional statement it check with boolean logic. - Erase the `checkData` from conditional statement because in the first IF already check if `checkData` has value or not. Before: ```typescript= async checkSession() { ... if (checkData === "" || checkData === null) { ... } else if (difDate > StaticVariable.SESSION_TIMEOUT) { ... } else if (!checkData && difDate <= StaticVariable.SESSION_TIMEOUT) { // save new Date this.pref.saveData(StaticVariable.KEY__LAST_DATE, nowDate); return true; } } ``` After: ```typescript= else if (difDate <= StaticVariable.SESSION_TIMEOUT) { // save new Date this.pref.saveData(StaticVariable.KEY__LAST_DATE, nowDate); return true; } ``` --- 2. No time value in Maintenance Record Page **Problem**: Reported by Thariq, in maintenance record it should has list of `CompleteTime` from API to group the problem by the day, then month, and then year. **Solution**: - The return value from Dispenser Maintenance API also get the values from report problem with not only Complete status (7). - This has been reported to Mr. Johnny and he said that he will repair this tomorrow. --- ## Conclusion - Mr. Johnny will adjust the database to return 7 different time attributes to use it on Maintenance Progress Page and Repairman App. - Bugs found in project for today has already cleared, tomorrow should be tested again to find another bugs. --- Time: **18:05** Event: Leaving the lab ###### tags: `on-intern`