Only hide input box on success
continuous-integration/drone/push Build is passing Details

main
Filip Borum Poulsen 3 years ago
parent 69408fd388
commit 0dfbc69f96

@ -165,7 +165,6 @@ export default {
}, },
methods: { methods: {
async addTimeslot(day_of_week: number) { async addTimeslot(day_of_week: number) {
this.showNewInput[day_of_week - 1] = false
const input: NewDayInput = this.newDayInput[day_of_week - 1]; const input: NewDayInput = this.newDayInput[day_of_week - 1];
const start_time = `${input.startHour}:${input.startMinute ? input.startMinute : 0}`; const start_time = `${input.startHour}:${input.startMinute ? input.startMinute : 0}`;
const end_time = `${input.endHour}:${input.endMinute ? input.endMinute : 0}`; const end_time = `${input.endHour}:${input.endMinute ? input.endMinute : 0}`;
@ -185,6 +184,9 @@ export default {
if (res.status === 401 || res.status === 403) { if (res.status === 401 || res.status === 403) {
this.$router.push({ path: "/login", query: { ref: this.$route.path } }); this.$router.push({ path: "/login", query: { ref: this.$route.path } });
} }
if (res.status === 204) {
this.showNewInput[day_of_week - 1] = false;
}
this.fetchSchedule(); this.fetchSchedule();
}, },

Loading…
Cancel
Save