task-stepper #1
34
app.js
34
app.js
@ -196,7 +196,6 @@ var app = new Vue({
|
||||
twelveHour: false,
|
||||
}
|
||||
},
|
||||
workbook: null,
|
||||
},
|
||||
watch: {
|
||||
shifts: {
|
||||
@ -308,11 +307,16 @@ var app = new Vue({
|
||||
// in der Zeitspalte stehen mehrere Uhrzeiten.
|
||||
let tempTimes = element.Zeit.toString().split(' + ');
|
||||
tempTimes.forEach(function(time) {
|
||||
times.push(moment(time, 'HH:mm'));
|
||||
let mom = moment(time, 'HH:mm');
|
||||
times.push([mom.hour(), mom.minute()]);
|
||||
})
|
||||
} else {
|
||||
// übrliches Format
|
||||
times.push(element.Zeit ? moment(element.Zeit) : day);
|
||||
if (element.Zeit) {
|
||||
let mom = moment(element.Zeit);
|
||||
times.push([mom.hour(), mom.minute()]);
|
||||
} else {
|
||||
times.push([0,0]);
|
||||
}
|
||||
}
|
||||
if (element.hasOwnProperty('Bemerkung')) {
|
||||
if (element.Bemerkung.toString().search(/\d\d:\d\d\s/) >= 0) {
|
||||
@ -324,9 +328,6 @@ var app = new Vue({
|
||||
beschreibung: '',
|
||||
name: element.Bemerkung.toString().replace(/\d\d:\d\d\s/, '').trim()
|
||||
}
|
||||
if (!termin.datum.isDST()) {
|
||||
termin.datum.add(1, 'hours')
|
||||
}
|
||||
vm.addShift(new Shift(termin));
|
||||
beschreibung = '';
|
||||
} else {
|
||||
@ -342,14 +343,11 @@ var app = new Vue({
|
||||
|
||||
times.forEach(time => {
|
||||
var termin = {
|
||||
datum: day.clone().hour(time.hour()).minute(time.minute()),
|
||||
datum: day.clone().hour(time[0]).minute(time[1]),
|
||||
art: art,
|
||||
beschreibung: beschreibung,
|
||||
name: name
|
||||
}
|
||||
if (!termin.datum.isDST()) {
|
||||
termin.datum.add(1, 'hours')
|
||||
}
|
||||
vm.addShift(new Shift(termin));
|
||||
});
|
||||
|
||||
@ -357,6 +355,20 @@ var app = new Vue({
|
||||
});
|
||||
},
|
||||
|
||||
changeTime: function (hours) {
|
||||
let temp = this.shifts;
|
||||
this.shifts = [];
|
||||
temp.forEach(shift => {
|
||||
shift.updateBeginn(hours);
|
||||
this.addShift(shift);
|
||||
});
|
||||
},
|
||||
|
||||
updateBeginn: function (shift, hours) {
|
||||
shift.updateBeginn(hours);
|
||||
this.shifts.splice(this.shifts.indexOf(shift), 1, shift);
|
||||
},
|
||||
|
||||
parseForStuttgart: function (dp) {
|
||||
var arr = XLSX.utils.sheet_to_json(dp, {
|
||||
header: "A",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user