added possibility to remove appointment

This commit is contained in:
Luca Haid
2026-01-22 07:24:33 +01:00
parent 91c5019503
commit b569faf946
2 changed files with 30 additions and 0 deletions
@@ -65,6 +65,9 @@ Vue.component('workorder-company', {
<tt-button v-if="!['completed', 'cancelled', 'documented'].includes(row.status)"
icon="fas fa-edit" @click="openRescheduleModal(row)"
additional-class="btn-link btn-sm p-0 ml-2" title="Termin ändern"/>
<tt-button v-if="!['completed', 'cancelled', 'documented'].includes(row.status)"
icon="fas fa-times" @click="clearAppointment(row)"
additional-class="btn-link btn-sm p-0 ml-1 text-danger" title="Termin löschen"/>
</div>
<span v-else></span>
</template>
@@ -157,6 +160,16 @@ Vue.component('workorder-company', {
this.rescheduleModalData = null;
} else window.notify('error', data.message || 'Ein Fehler ist aufgetreten.');
},
async clearAppointment(workorder) {
if (!confirm('Möchten Sie den Termin wirklich löschen?')) return;
const {data} = await axios.post(`${window.TT_CONFIG.BASE_PATH}/WorkorderCompany/clearAppointment`, {
workorderId: workorder.id
});
if (data.success) {
window.notify('success', data.message);
this.$refs.table.$refs.table.refreshTable();
} else window.notify('error', data.message || 'Ein Fehler ist aufgetreten.');
},
startAdditionalInfoEdit(row) {
this.editingAdditionalInfoId = row.id;
this.tempAdditionalInfo = row.additionalInfo || '';