added possibility to remove appointment
This commit is contained in:
@@ -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 || '';
|
||||
|
||||
Reference in New Issue
Block a user