adapt to schema update
This commit is contained in:
parent
0b16599d2a
commit
91ad11e20c
10 changed files with 14 additions and 11 deletions
|
@ -24,8 +24,9 @@ export type DamageReportViewModel = {
|
||||||
id: string;
|
id: string;
|
||||||
title: string;
|
title: string;
|
||||||
reportedAt: Date;
|
reportedAt: Date;
|
||||||
|
closedAt?: Date;
|
||||||
|
closedBy?: string;
|
||||||
status: string;
|
status: string;
|
||||||
done: boolean;
|
|
||||||
description: string;
|
description: string;
|
||||||
location: string;
|
location: string;
|
||||||
noteByReporter: string;
|
noteByReporter: string;
|
||||||
|
|
|
@ -32,7 +32,8 @@ export type InspectionViewModel = {
|
||||||
inspectionVersionedPlan: InspectionVersionedPlanViewModel;
|
inspectionVersionedPlan: InspectionVersionedPlanViewModel;
|
||||||
context: string;
|
context: string;
|
||||||
created: Date;
|
created: Date;
|
||||||
finished?: Date;
|
finishedAt?: Date;
|
||||||
|
finishedBy?: string;
|
||||||
isOpen: boolean;
|
isOpen: boolean;
|
||||||
nextInspection?: Date;
|
nextInspection?: Date;
|
||||||
checks: Array<InspectionPointResultViewModel>;
|
checks: Array<InspectionPointResultViewModel>;
|
||||||
|
|
|
@ -25,6 +25,7 @@ export type RepairViewModel = {
|
||||||
id: string;
|
id: string;
|
||||||
createdAt: Date;
|
createdAt: Date;
|
||||||
finishedAt?: Date;
|
finishedAt?: Date;
|
||||||
|
finishedBy?: string;
|
||||||
status: string;
|
status: string;
|
||||||
responsible: string;
|
responsible: string;
|
||||||
title: string;
|
title: string;
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
></textarea>
|
></textarea>
|
||||||
</div>
|
</div>
|
||||||
<button
|
<button
|
||||||
v-if="!editStatus && !activeDamageReportObj.done"
|
v-if="!editStatus && activeDamageReportObj.closedAt == undefined"
|
||||||
primary
|
primary
|
||||||
class="w-fit! self-end"
|
class="w-fit! self-end"
|
||||||
:disabled="!can('update', 'unit', 'damage_report')"
|
:disabled="!can('update', 'unit', 'damage_report')"
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
>
|
>
|
||||||
Status ändern
|
Status ändern
|
||||||
</button>
|
</button>
|
||||||
<div v-else-if="!activeDamageReportObj.done" class="flex flex-row gap-2 justify-end">
|
<div v-else-if="activeDamageReportObj.closedAt == undefined" class="flex flex-row gap-2 justify-end">
|
||||||
<button primary-outline class="w-fit!" @click="saveStatus(true)">speichern und abschließen</button>
|
<button primary-outline class="w-fit!" @click="saveStatus(true)">speichern und abschließen</button>
|
||||||
<button primary class="w-fit!" @click="saveStatus(false)">Status speichern</button>
|
<button primary class="w-fit!" @click="saveStatus(false)">Status speichern</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -122,7 +122,7 @@ export default defineComponent({
|
||||||
};
|
};
|
||||||
this.updateDamageReport(update)
|
this.updateDamageReport(update)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
this.activeDamageReportObj!.done = update.done;
|
this.activeDamageReportObj!.closedAt = update.done ? new Date() : undefined;
|
||||||
this.activeDamageReportObj!.status = update.status;
|
this.activeDamageReportObj!.status = update.status;
|
||||||
this.activeDamageReportObj!.noteByWorker = update.noteByWorker;
|
this.activeDamageReportObj!.noteByWorker = update.noteByWorker;
|
||||||
this.loading = "success";
|
this.loading = "success";
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
class="flex flex-col h-fit w-full border border-primary rounded-md"
|
class="flex flex-col h-fit w-full border border-primary rounded-md"
|
||||||
>
|
>
|
||||||
<div class="bg-primary p-2 text-white flex flex-row gap-2 items-center">
|
<div class="bg-primary p-2 text-white flex flex-row gap-2 items-center">
|
||||||
<PencilSquareIcon v-if="!row.done" class="w-5 h-5" />
|
<PencilSquareIcon v-if="row.closedAt == undefined" class="w-5 h-5" />
|
||||||
<p class="grow">{{ row.title }} - {{ new Date(row.reportedAt).toLocaleString("de") }} - {{ row.status }}</p>
|
<p class="grow">{{ row.title }} - {{ new Date(row.reportedAt).toLocaleString("de") }} - {{ row.status }}</p>
|
||||||
<div class="flex flex-row gap-2">
|
<div class="flex flex-row gap-2">
|
||||||
<div v-if="row.images.length != 0" class="cursor-pointer">
|
<div v-if="row.images.length != 0" class="cursor-pointer">
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
>
|
>
|
||||||
<div class="bg-primary p-2 text-white flex flex-row gap-2 items-center">
|
<div class="bg-primary p-2 text-white flex flex-row gap-2 items-center">
|
||||||
<PencilSquareIcon v-if="row.isOpen" class="w-5 h-5" />
|
<PencilSquareIcon v-if="row.isOpen" class="w-5 h-5" />
|
||||||
<p>{{ row.inspectionPlan.title }} - {{ row.finished ?? "in Arbeit" }}</p>
|
<p>{{ row.inspectionPlan.title }} - {{ row.finishedAt ?? "in Arbeit" }}</p>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="row.context || row.nextInspection" class="p-2">
|
<div v-if="row.context || row.nextInspection" class="p-2">
|
||||||
<p v-if="row.context">Kontext: {{ row.context }}</p>
|
<p v-if="row.context">Kontext: {{ row.context }}</p>
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
class="flex flex-col h-fit w-full border border-primary rounded-md"
|
class="flex flex-col h-fit w-full border border-primary rounded-md"
|
||||||
>
|
>
|
||||||
<div class="bg-primary p-2 text-white flex flex-row gap-2 items-center">
|
<div class="bg-primary p-2 text-white flex flex-row gap-2 items-center">
|
||||||
<PencilSquareIcon v-if="!row.done" class="w-5 h-5" />
|
<PencilSquareIcon v-if="row.closedAt == undefined" class="w-5 h-5" />
|
||||||
<p class="grow">{{ row.title }} - {{ new Date(row.reportedAt).toLocaleString("de") }} - {{ row.status }}</p>
|
<p class="grow">{{ row.title }} - {{ new Date(row.reportedAt).toLocaleString("de") }} - {{ row.status }}</p>
|
||||||
<div class="flex flex-row gap-2">
|
<div class="flex flex-row gap-2">
|
||||||
<div v-if="row.images.length != 0" class="cursor-pointer">
|
<div v-if="row.images.length != 0" class="cursor-pointer">
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
>
|
>
|
||||||
<div class="bg-primary p-2 text-white flex flex-row gap-2 items-center">
|
<div class="bg-primary p-2 text-white flex flex-row gap-2 items-center">
|
||||||
<PencilSquareIcon v-if="row.isOpen" class="w-5 h-5" />
|
<PencilSquareIcon v-if="row.isOpen" class="w-5 h-5" />
|
||||||
<p>{{ row.inspectionPlan.title }} - {{ row.finished ?? "in Arbeit" }}</p>
|
<p>{{ row.inspectionPlan.title }} - {{ row.finishedAt ?? "in Arbeit" }}</p>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="row.context || row.nextInspection" class="p-2">
|
<div v-if="row.context || row.nextInspection" class="p-2">
|
||||||
<p v-if="row.context">Kontext: {{ row.context }}</p>
|
<p v-if="row.context">Kontext: {{ row.context }}</p>
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
class="flex flex-col h-fit w-full border border-primary rounded-md"
|
class="flex flex-col h-fit w-full border border-primary rounded-md"
|
||||||
>
|
>
|
||||||
<div class="bg-primary p-2 text-white flex flex-row gap-2 items-center">
|
<div class="bg-primary p-2 text-white flex flex-row gap-2 items-center">
|
||||||
<PencilSquareIcon v-if="!row.done" class="w-5 h-5" />
|
<PencilSquareIcon v-if="row.closedAt == undefined" class="w-5 h-5" />
|
||||||
<p class="grow">{{ row.title }} - {{ new Date(row.reportedAt).toLocaleString("de") }} - {{ row.status }}</p>
|
<p class="grow">{{ row.title }} - {{ new Date(row.reportedAt).toLocaleString("de") }} - {{ row.status }}</p>
|
||||||
<div class="flex flex-row gap-2">
|
<div class="flex flex-row gap-2">
|
||||||
<div v-if="row.images.length != 0" class="cursor-pointer">
|
<div v-if="row.images.length != 0" class="cursor-pointer">
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
>
|
>
|
||||||
<div class="bg-primary p-2 text-white flex flex-row gap-2 items-center">
|
<div class="bg-primary p-2 text-white flex flex-row gap-2 items-center">
|
||||||
<PencilSquareIcon v-if="row.isOpen" class="w-5 h-5" />
|
<PencilSquareIcon v-if="row.isOpen" class="w-5 h-5" />
|
||||||
<p>{{ row.inspectionPlan.title }} - {{ row.finished ?? "in Arbeit" }}</p>
|
<p>{{ row.inspectionPlan.title }} - {{ row.finishedAt ?? "in Arbeit" }}</p>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="row.context || row.nextInspection" class="p-2">
|
<div v-if="row.context || row.nextInspection" class="p-2">
|
||||||
<p v-if="row.context">Kontext: {{ row.context }}</p>
|
<p v-if="row.context">Kontext: {{ row.context }}</p>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue