I
I
Ilya Temnikov2022-04-01 10:34:04
Java
Ilya Temnikov, 2022-04-01 10:34:04

How to save the employee's work time in the database and then transfer it to the frontend?

I have an electrical service.
I want to add some conditional calendar to it, in which the client can choose the date and time for recording. The calendar should reflect all available dates and times.

I can't think of an optimal solution for how to implement this in my RESTapi. How to organize the architecture of this solution, how to store intervals, how to transfer them to the front? I think it's a good question, it's hard to google it. I do not expect a specific answer, we can just think.

Backend is written in Spring Boot.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmtm, 2022-04-01
@Dmtm

we enter the minimum sales unit of time, such as 10 minutes, break the day, number it, send the client a list of available ones,
the client buys units of time, sends back the same list,
this also solves cases like "an hour in the morning and half an hour in the afternoon"
and is not tied to specific intervals - you can "today starts at 8:00, tomorrow from 8:20"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question