Fix bug which caused new empty worked shift when editing time sheet
This commit is contained in:
parent
158755377b
commit
b28dc0702e
|
@ -183,6 +183,9 @@ function update_timetable() {
|
|||
var end_time = $(this).children('input[name|="edit_end_time"]').val();
|
||||
var shift = editing_day.children('.shift[data-uuid="' + uuid + '"]');
|
||||
if (! shift.length) {
|
||||
if (! (start_time || end_time)) {
|
||||
return;
|
||||
}
|
||||
shift = $('<p class="shift" data-uuid="' + uuid + '"><span></span></p>');
|
||||
shift.append($('<input type="hidden" name="employee_uuid-' + uuid + '" value="'
|
||||
+ editing_day.parents('tr:first').data('employee-uuid') + '" />'));
|
||||
|
|
Loading…
Reference in a new issue