You are on page 1of 7

Attendance Shift Settings Mock-up

Requirements:
1. Company can create multiple shifts (as many as they want) for each Day of the week.
2. For 1 user company can not assign to more than 2 shift each Day
3. Between same day company can not assign users to shifts those have timing clash
4. Company can set settings for Each User Individually
5. Company can Apply Same Settings to All users of same Department
6. Company can Apply Same Settings to All User of the Company

Main Settings Page (option 1)


Main Settings Page (option 2)

Flags To be checked:
1. Individual User Flag for ‘Auto overtime Entry If works During Day off’.

Features To be added:
1. Check in Reminder Before 15/20/30 mins of Shift Check in time

- Do we need a Companywide setting to Set This Reminder Timing?


Add Shift Modal

Edit Shift Modal


Database Design:
CRM_SHIFT_MANAGEMENT (Table)

For Day Will Create a Module in Backend:


1=Monday,2=Tuesday,3=Wednesday,4=Thursday,5=Friday,6=Saturd
ay,7=Sunday

* Start and End Time will be stored in 24 hours format. (use php to
convert AP/PM)

CRM_USER_SHIFT_TRANSACTION (Table)

* ‘shift_id’ is a foreign key here. Referring ‘id’ of


‘crm_shift_management’ table.
Logical Flow Chart
Compute Shift Attendance:
Compute Full Day Attendance:
CRON JOB:
A cron job is needed everyday at 12am to enter initial Attendance Row Entry to
Database.
Why?
Answer: If a user does not have any check in or out in a day our
current flow will not insert a row for that user in Attendance Table.
So, if that day is working day and no entry how to show this is
absent? – My Suggestion Run Cron Job with below logic:
1. If ‘This is a working day’ for that user Insert Row with all initial
attendance to ‘FALSE’
2. If ‘This is a Day off’ no Row entry.
Note: This cron job may be heavy since need run for all user of all company and
shift checking is also there. So, I suggest using ‘node.js’ for this.

Alternative: Compute Absent upon loading. I am not suggesting this one.


Cause This will make the loading slow and so many unnecessary computations
will be done, since we will compute every time user load the table.

You might also like