I'm currently exploring options for storing data from a dynamic table into a database.
Here's the scenario: I'm in the process of creating a system to manage drivers' journeys. The system will track the driver's workday, dividing it into different intervals such as driving time, meal breaks, waiting time, etc. All these intervals are specified in HH:MM format and will be stored in separate tables, similar to the layout shown in the following image:
The input data (hours) for each table can vary depending on the driver's schedule for the day. My goal is to capture and save these hours in a database.
My current approach involves collecting all the hours after the user completes the input process. However, I am facing the challenge of how to store this data without having predefined field names.
Additional details: I am utilizing Java, SpringBoot, and Thymeleaf for the development.
JourneyControl.RegisterHourJourney = (function() {
// JavaScript code block
}());
$(function() {
var RegisterHourJourney = new JourneyControl.RegisterHourJourney();
RegisterHourJourney.start();
});
<body>
<section layout:fragment="conteudo">
<div class="page-header">
<!-- html content -->
<!-- more HTML content -->
</form>
</div>
</section>
<th:block layout:fragment="javascript-extra">
<!-- scripts included here -->
</th:block>
</body>