Swap components in WorkorderMphAdmin.js and add OAID display in WorkorderMphBase.js
This commit is contained in:
@@ -78,10 +78,10 @@ Vue.component('workorder-mph-admin', {
|
||||
<template v-slot:expandedRow="{ row }">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<wohneinheit-status-manager :workorder-mph-id="parseInt(row.id)" :is-admin="true"/>
|
||||
<checkbox-documentation :workorder-mph-id="parseInt(row.id)" :is-admin="true"/>
|
||||
</div>
|
||||
<div class="col-12 mt-3">
|
||||
<checkbox-documentation :workorder-mph-id="parseInt(row.id)" :is-admin="true"/>
|
||||
<wohneinheit-status-manager :workorder-mph-id="parseInt(row.id)" :is-admin="true"/>
|
||||
</div>
|
||||
<div class="col-12 mt-3">
|
||||
<workorder-mph-details-manager :workorder-mph-id="row.id" :is-admin="true"
|
||||
|
||||
@@ -39,6 +39,9 @@ Vue.component('wohneinheit-status-manager', {
|
||||
<div v-for="we in wohneinheiten" :key="we.wohneinheitId" class="we-row">
|
||||
<div class="we-cell we-bezeichner">
|
||||
<strong>{{ we.bezeichner }}</strong>
|
||||
<div class="text-muted small">
|
||||
<i class="fas fa-id-card mr-1"></i>OAID: {{ we.wohneinheitId }}
|
||||
</div>
|
||||
<div v-if="we.contact" class="contact-info text-muted">
|
||||
<i class="fas fa-user mr-1"></i>{{ we.contact }}
|
||||
</div>
|
||||
@@ -81,7 +84,12 @@ Vue.component('wohneinheit-status-manager', {
|
||||
const { data } = await axios.get(`${window.TT_CONFIG.BASE_PATH}${basePath}/getWohneinheiten`, {
|
||||
params: { workorderMphId: this.workorderMphId }
|
||||
});
|
||||
this.wohneinheiten = data.wohneinheiten.map(we => ({ ...we, changed: false, saving: false }));
|
||||
this.wohneinheiten = data.wohneinheiten.map(we => ({
|
||||
...we,
|
||||
changed: false,
|
||||
saving: false,
|
||||
note: we.note || 'Tür 1, Tür 2, Tür 3'
|
||||
}));
|
||||
this.statusOptions = data.statusOptions || [];
|
||||
} catch (e) {
|
||||
window.notify('error', 'Wohneinheiten konnten nicht geladen werden.');
|
||||
|
||||
Reference in New Issue
Block a user