Workorder mph/improve
This commit is contained in:
@@ -433,6 +433,25 @@
|
||||
margin: -12px;
|
||||
}
|
||||
|
||||
/* Custom Scrollbar for Journal */
|
||||
.mph-journal-list::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
}
|
||||
|
||||
.mph-journal-list::-webkit-scrollbar-track {
|
||||
background: #f1f3f5;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.mph-journal-list::-webkit-scrollbar-thumb {
|
||||
background: #adb5bd;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.mph-journal-list::-webkit-scrollbar-thumb:hover {
|
||||
background: #868e96;
|
||||
}
|
||||
|
||||
.mph-journal-item {
|
||||
padding: 8px 12px;
|
||||
border-bottom: 1px solid #f1f3f5;
|
||||
|
||||
@@ -74,7 +74,7 @@ Vue.component('wohneinheit-status-manager', {
|
||||
<span><i class="fas fa-building"></i> Wohneinheiten</span>
|
||||
<div>
|
||||
<span v-if="loading" class="mr-2"><i class="fas fa-spinner fa-spin text-muted"></i></span>
|
||||
<a v-if="hausnummerId" :href="'/AddressDB/view/?id=' + hausnummerId" target="_blank" class="small text-muted">
|
||||
<a v-if="isAdmin && hausnummerId" :href="'/AddressDB/view/?id=' + hausnummerId" target="_blank" class="small text-muted">
|
||||
<i class="fas fa-external-link-alt mr-1"></i>AddressDB #{{ hausnummerId }}
|
||||
</a>
|
||||
</div>
|
||||
@@ -238,6 +238,7 @@ Vue.component('wohneinheit-status-manager', {
|
||||
workorderMphId: this.workorderMphId, wohneinheitId: we.wohneinheitId, status: we.status, spliceCompleted: we.spliceCompleted ? 1 : 0, tuer: we.tuer, zusatz: we.zusatz
|
||||
});
|
||||
this.$emit('wohneinheit-updated');
|
||||
this.$emit('refresh');
|
||||
} catch (e) { window.notify('error', 'Fehler beim Speichern'); } finally { we.saving = false; }
|
||||
},
|
||||
getStatusText(val) { const o = this.statusOptions.find(opt => opt.value === val); return o ? o.text : ''; },
|
||||
@@ -292,9 +293,12 @@ Vue.component('wohneinheit-status-manager', {
|
||||
window.notify('success', `${successCount} Datei(en) hochgeladen`);
|
||||
this.documentsModal.files = [];
|
||||
this.documentsModal.uploadDescription = '';
|
||||
this.$refs.weFileInput.value = '';
|
||||
this.$refs.weFileInput.value = '';
|
||||
const { data } = await axios.get(`${window.TT_CONFIG.BASE_PATH}${basePath}/getWohneinheitDocuments`, { params: { wohneinheitId: this.documentsModal.wohneinheitId } });
|
||||
this.documentsModal.docs = data.docs || [];
|
||||
// Update document count in wohneinheit list
|
||||
const we = this.wohneinheiten.find(w => w.wohneinheitId === this.documentsModal.wohneinheitId);
|
||||
if (we) we.documentCount = this.documentsModal.docs.length;
|
||||
} else {
|
||||
window.notify('error', 'Upload fehlgeschlagen');
|
||||
}
|
||||
@@ -305,9 +309,12 @@ Vue.component('wohneinheit-status-manager', {
|
||||
try {
|
||||
const basePath = this.isAdmin ? '/WorkorderMphAdmin' : '/WorkorderMphCompany';
|
||||
await axios.post(`${window.TT_CONFIG.BASE_PATH}${basePath}/deleteWohneinheitDocument`, { documentationId: file.id });
|
||||
window.notify('success', 'Gelöscht');
|
||||
window.notify('success', 'Gelöscht');
|
||||
const { data } = await axios.get(`${window.TT_CONFIG.BASE_PATH}${basePath}/getWohneinheitDocuments`, { params: { wohneinheitId: this.documentsModal.wohneinheitId } });
|
||||
this.documentsModal.docs = data.docs || [];
|
||||
// Update document count in wohneinheit list
|
||||
const we = this.wohneinheiten.find(w => w.wohneinheitId === this.documentsModal.wohneinheitId);
|
||||
if (we) we.documentCount = this.documentsModal.docs.length;
|
||||
} catch (e) { window.notify('error', 'Fehler beim Löschen'); }
|
||||
}
|
||||
},
|
||||
@@ -357,6 +364,7 @@ Vue.component('checkbox-documentation', {
|
||||
try {
|
||||
const basePath = this.isAdmin ? '/WorkorderMphAdmin' : '/WorkorderMphCompany';
|
||||
await axios.post(`${window.TT_CONFIG.BASE_PATH}${basePath}/updateCheckboxes`, { workorderMphId: this.workorderMphId, ...this.checkboxes });
|
||||
this.$emit('refresh');
|
||||
} catch (e) { window.notify('error', 'Speichern fehlgeschlagen'); } finally { this.saving = false; }
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user