Support:
$scope.createTimeSlots = function(interval, field) {
var startingTime = moment().hours(8).minutes(0);
field.timeslots = [];
for (var i = 0; i < interval; i++) {
$scope.intervals = 60;
field.timeslots.push(startingTime.add($scope.intervals, 'minute').format("h:mm"));
}
}
$scope.SavePreferences = function(companyName, form_settings) {
var _settings = {
'company': companyName
};
console.log(_settings);
debugger;
var WorkingDays = [];
for (var i = 0; i < $scope.fields.length; i++) {
var item = $scope.fields[i];
var time = $scope.fields.timeslots;
if (item.checked) {
WorkDays.push(item.name, time.timeslot);
}
console.log(time);
}
I have arranged each day in a row with dropdowns and textboxes. My aim is to showcase the selected checkboxes values along with corresponding data in textbox and drop-down, displayed in JSON format
{'day':Monday,'duration':3,'drop-down':10.00}
.
However, there seems to be an issue displaying the selected days alongside their duration and timeslot. How can I correct this JSON display?