diff --git a/.idea/deploymentTargetSelector.xml b/.idea/deploymentTargetSelector.xml index 7bedc08..b268ef3 100644 --- a/.idea/deploymentTargetSelector.xml +++ b/.idea/deploymentTargetSelector.xml @@ -5,12 +5,6 @@ - - - - \ No newline at end of file diff --git a/ReadMe.md b/ReadMe.md index 47fc563..d7ccfaf 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -1,4 +1,90 @@ -# Clocked + +Clocked Clocked is a logger for working hours. as of now, the functionality remains, that a user can record overtimes and -time offs, with balancing overtime and vacation time in mind. It is intended for personal use but we will see how it progresses. \ No newline at end of file +time offs, with balancing overtime and vacation time in mind. It is intended for personal use but we will see how it progresses. + +## How to use. +Inorder to be able to use ***Clocked*** one needs to set up a ***[Supabase](https://supabase.com/)*** project and create a table. +This can be done with the free tier by registering an account. +After an account has been setup, table name, API key and url needs to be added (adjusted) in the 'local.proporties' file of this project. +The tables RLS rules should allow insert, update, read and delete of entries at least for authorised users. +Account can be added from within the app, as supabase enables automatic creation of auth tables and row entry during registration. + +### Installation +**Clocked** is an android app. so it cannot be installed in *IOS* or PC running windows, linux or mac. +Nor can it be accessible on the browser. +To install and try it on an android phone, clone this repository +```bash +# clone +$ git clone https://git.tinsae.net/Tinsae/Clocked.git +``` + +And open it on android studio. From there we can either create a signed .apk release file and install it manually on an android phone, or connect the phone using USB and click run on android studio. + + +> **NOTE:** running from android Studio will install an app on the phone. +> But it will run in debug mode. +> +> An APK release may be uploaded here in the future as an alternative. + +Once The app is installed, The user can register and start adding Logs. +Name, email and password are necessary for this. + +## Technical details +A log is an entry containing `Type`, `Duration`, `Date` and `Reason` represented by a Data class `Log` +```kotlin +data class Log( + // Date of event ( When the event happened) + val timestamp: Instant, + // type is of enum type OVERTIME or TIME_OFF + val type: EntryType, + // serialiser for Kotlin's Duration Object + @Serializable(with = IntervalSerialiser::class) + // Duration object holds the amount of time in hours and minutes + val duration: Duration, + // reason or description to remind us why that event happened + val reason: String? = null +) +``` +## Functions + +### Dashboard +The dashboard screen shows **Total Overtime**, **Total Time off** and **Net balance** +a button to add new entries and a list of recent activities. The following actions can be performed from the HomeScreen. +#### Adding a Log: +A log can be added by pressing the +new button in Home screen. +When this button is clicked, a dialog appears with input fields for the necessary data. +An entry is then saved by clicking the save button at the bottom of the dialog. +#### Editing +To edit an entry, the user needs to swipe tha entry towards the **right >>**. +This action then triggers a biometric prompt. Upon successful verification, +a dialog appears through which the user can edit an entry and save changes by clicking the save button on the dialog. +#### Deleting +To delete a log, The user needs to swipe the entry towards the **<< left**. upon which a biometric prompt appears. +The item is then removed only when this prompt is successfully completed. + +To delete or edit a log, a biometric proof is needed. This prevents accidental deletion. +But this doesn't prevent an admin from performing these actions from *Supabase's* dashboard. + +### History Screen: +Here activities are listed as aggregate (all) and filtered as ***Over time*** and ***Time off*** +Entries are sorted by month. in addition to that, each entry can be deleted or edited following the same procedures +explained above. + +### Setting Screen: +In setting Screen, Users can switch between dark, light themes or let the app follow System theme. +Users can also export all logs to SpreadSheet document. (Perhaps to share it with co-workers or employees). +Options for Language selection, setting daily working hours and rounding of minutes are planned to be added in the future. +This is where I stopped because That was the plan for the MVP for personal use. +If by any chance requests come and I have time, Further developments will continue. + +> **NOTE:** A fork of this is being used at work, and a similar app is being developed for work. + + + + + + + +