hodooor / Hodoor

Server side for Hodoor - Casual attendance system
GNU General Public License v3.0
8 stars 6 forks source link

Holiday counter #90

Open ToKraTheSecond opened 7 years ago

ToKraTheSecond commented 7 years ago

Consider possible implementation of holiday days counter according to attached table image and consult it with Ondrej Vicar and Tomas Kratochvil before coding.

capture Source xlsx with equotions - Dovolené ELEDUS .xlsx 1] Admin user will see this info about all users. -It can be add to hodoor/administrator administrator table

2] Default user will see info only about his holiday days. This can be solved by adding new view model and new icon to user main page. hodoor_menu

3] Add new needed items to database.

4] Listed info is only recommendation and you can come up with your own solution.

5] This issue is related to #38 Fullfill quota - holiday

OndrejVicar commented 7 years ago

@DavidKozina @Tomik292 I would like to see some kind of analysis how you going to implement this. I would like to start with really simplest aproach possible.

I got few tips how to do this. I think you will need:

  1. Holiday counter related to each user in database - including few supporting fields from the table.
  2. Admin user interface to edit this counter (could be somehow part of "administrator" table). This should be probably implemented similar to presented table. At start - data will be entered and than it should automatically increment holidays counter - this is where you will need to figureout how to do it.
  3. User should be able see number of his/her holidays - I think best place for this would be Dashboard. Atleast for start.

I would also consider solving #16 which should support different kinds of employment.

Tomik292 commented 7 years ago

So there are some updates we've done so far. We added a couple of models to database: 1.Holiday 2.Profile 3.Contract

Every holidays users take will be saved in database. In Profile there is a info about user's holidays from previous years and how much weeks of holidays does he have in a year. The Contract model is solving the issue #16.

plate

We also created a table in dashboard named Holiday-info where are information for user about his holidays.

dashboard

Users who doesn't have holidays or even some kind of hours quota see this in a dashboard.

user without holidays

We added another panel Users Holidays in Administration where admin can see data about all users.

administrator-page

So when user wants to assign his holidays, he click on the 'Manage holiday' button, then the holiday assignment opens

holiday-assignment

After he fill all the important columns he sends the request to admin.

Admin sees the request from the user in administration page, clicks on the 'Request' button and can either 'Verify' or 'Decline' the request

holiday-verification

Things that needs to be done:

  1. Figure out how to carry over left holidays from last year to the next one
  2. Count holidays to month quota
OndrejVicar commented 7 years ago

@DavidKozina @Tomik292 Oh guys - this looks AWESOME! :) really great work. I didn't expect that you almost got it. I also love this kind of report. Could you please also open pull request, so we can start to review some code? Thanks.

patriczek2811 commented 7 years ago

Like @OndrejVicar says, this is truly awesome work. Looking forward to work with it ;)

OndrejVicar commented 7 years ago

I'm not sure how we gonna handle verification. I don't think it is good idea to send verification request to all admins. Only one person will manage holidays allmost all the time. We could maybe specify somethink like holiday_manager boolean field to profile table, which will indicate if user will be able to manage holiday and if will receive verification requests.

EDIT: Oh I see that request is only availible in table if users clicks on it. It that case nevermind - keep it simple like it is - all admins will manage holidays.

OndrejVicar commented 7 years ago

I would also probably use days_of_holydays_per_year instead of weeks in profile table.

OndrejVicar commented 7 years ago

You should also add taken holiday to session page table.

OndrejVicar commented 7 years ago

You should be also requested to take holiday, if you got <= days left until end of year so you have to take holiday. We will discuss it later ;)

OndrejVicar commented 7 years ago

You could also add users on holiday to dashboard

Tomik292 commented 7 years ago

There is a problem when user take holidays across two (or possibly even more) months. I think we should just cut it in half create one to the end of the month and then create another from the start of the month to the date user chose.

ToKraTheSecond commented 7 years ago

Functionality is OK. But I´m not able to test admin/hollidays on WIN machine.