-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Welcome to the TimeTracker wiki!
A tool for track developers work and task timings.
- Stores user punch in and out time.
- Total work time.
- Allocate new task and track the timings.
- Analyzed view of task and project timings.
- User login authentication.
Application can be used in various companies where user works under some projects.
Login authentication performed using Rest API. Only the authorized users can login to the application and at the same time wifi authentication performed to check whether user is in the working location or not (Wifi MAC address should match with office Wifi MAC address, then the user can successfully login to the application).
When user successfully logs in to the application, all the data related to his work and task timings fetched from the server. As soon as data dowloaded from the server store it to the local database. Compare login date with existing date in the database, if date present update the timings otherwise, start timer from 0 and store the log in time to the database.
User will find tasks that assigned by the admin or user can also create new task. To create new task, user should click task button. Every task details are stored in the individual cell view. User can able to start the task by clicking the cell, to edit the task swipe left and to end the task swipe right. By clicking the state button (stop/start) user can able stop and start the work timings. These timings will be stored in the database.
User can able to add new task by clicking task button in the activity page. In this page he should fill task name, its descriptions and also he should pick the project. By adding these information user can either start the task or save the task. If user starts the task then the timer will start from 0 with respect to the task and starting time will be stored in the database. If the user clicks to save task, then the task will be store in the database and in future he can able start it in the activity page. By clicking task cells user can also edit task details.
User activities page contains three views to display in day, week and month wise data based on the user work and task timings. This representation based on the graphical view by applying analytics to the user work and task timings.
Entities
- Projects(Project Id, Project Name, Project Icon Url, Total Time)
- PunchInOutTime(PunchId, Date, PunchIn Time, PunchOut Time, Total Time, Is User In Break, Work Start Time)
- Tasks(Task Id, Project Id, Task Name, Task Description, Start Time, End Time, Start Date, End Date, Total Time, Is Work In Progress, Work Start Time)
- BreakInformation(Break Id, Task Id, Date, Start Time, End Time)
All timings are stored in seconds for example, 12:00:00 AM as 0, 12:01:00 AM as 60, 08:00:00 AM as 28800, etc. Integer storage makes easy to calculate work and task timing with respect to the date.
Project table updated from admin panel and remaining 3 tables updated in client application.
Entity data handled by 4 different classes:
- ProjectDBController for Projects
- UserTimesDBController for PunchInOutTime
- TasksDBController for Task
- TaskDBController for BreakInformation
- User login authentication performed using RequestController class by calling static function
requestLogin(params: Dictionary<String, String>, url: String, completion: @escaping (_ success: Dictionary<String, Any>) -> Void)
params: Key-Value pair containing username and password
url: API url
completion: Closure to handle the response
- Create object of class ProjectDBController, UserTimesDBController, TasksDBController and TaskDBController in ActivityViewController to handle the coredata.
- Check present date exists in the PunchInOutTime entity. If exists, update work and task timing by calling
userTimesDBController.updateUserWorkTime()andtaskDBController.updateUserTaskTime(). This will update task and work time by differentiating current time and previously application opened time. Example,
Total working time = current time - previously stored time
Suppose, previously stored time = 10:00:00 AM i.e 36000 and current time = 09:00:00 AM i.e. 32400
then, total working time = 36000 i.e. 01:00:00 hour.
If the logged in date doesn't exists in the coredata create new date by callinguserTimesDBController.createNewDate() - Create Array of Dictionary object to store all the running task information. In viewDidLoad call
arrayDictTaskDetails = taskDBController.getRunningTaskDetailsthis will return array of dictionary object. Based on the arrayDictTaskDetails update the tableview. - When application moves to background or foreground call
userTimesDBController.updateUserWorkTime()andtaskDBController.updateUserTaskTime()to update task and work timings. - Button state is used to stop and start work timings. When user stops the work time, update coredata using
userTimesDBController.userStartsBreak()and while play calluserTimesDBController.userFinishedBreak() - Button logout will clears all the coredata information by calling
deleteAllDataw.r.t 4 coredata objects.
- TaskViewController handles adding new task. Update Tasks entity when user creates new task by calling
taskDBController.addNewTask(projectId: projId, taskName: txtTaskName.text!, taskDesc: txtTaskDescr.text). - To start any task call
taskDBController.startTask(taskId: taskId!)with respect to the task id. - User can also edit the task fields in edit mode. To update after editing call
taskDBController.updateTaskNameDescriptionAndProject(taskId: taskId!, strTaskName: txtTaskName.text!, strDescr: txtVTaskDescr.text, projectId: projId)
- My Activities page contains three views to display in day, week and month wise data based on the user work and task timings.
- Day view describes total work timings in a horizontal line graph. Here, x-axis will be time i.e. from 8AM to 8PM. UIBezierPath and CAShapeLayer are used to draw a graphs based on the each day work and task timings fetched from coredata.
- Week view represents total worktime of each day in a week. The vertical bars are drawn with respect to the total timings. Here, y-axis represents total work time in hours.
- Month view represents month wise total work timings.
![]()