D
D
dk-web2016-04-23 12:46:07
Laravel
dk-web, 2016-04-23 12:46:07

How to link records to work shifts (sessions?)?

Hello!
I am making a small application - angular + laravel. At the moment, registration and authorization through Laravel - everything else has already been transferred to angularjs.
Questions 2:
1) How easy but tasteful to make user registration, authorization in angular? json tokens?
But the main question is this...
There is a register of orders .. banal created_at at the time of creating a record in the database. Accordingly, filters only work by date.
I would like to implement the binding of records to the conditional shifts of an employee ... they are of floating duration.
The user enters the site, logs in and presses the "Start work" button ... accordingly, if he did not close the shift and logout again, then the next time he logs in, "Finish work" should be on.
Sessions?
It turns out that we also need the "Shifts" table ... id, user_id, conditionally smena_id (what is assigned when the shift is opened should be written here), opened_at, closed_at.
I'd appreciate a kick in the right direction...

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question