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;
|
||||
title: string;
|
||||
reportedAt: Date;
|
||||
closedAt?: Date;
|
||||
closedBy?: string;
|
||||
status: string;
|
||||
done: boolean;
|
||||
description: string;
|
||||
location: string;
|
||||
noteByReporter: string;
|
||||
|
|
|
@ -32,7 +32,8 @@ export type InspectionViewModel = {
|
|||
inspectionVersionedPlan: InspectionVersionedPlanViewModel;
|
||||
context: string;
|
||||
created: Date;
|
||||
finished?: Date;
|
||||
finishedAt?: Date;
|
||||
finishedBy?: string;
|
||||
isOpen: boolean;
|
||||
nextInspection?: Date;
|
||||
checks: Array<InspectionPointResultViewModel>;
|
||||
|
|
|
@ -25,6 +25,7 @@ export type RepairViewModel = {
|
|||
id: string;
|
||||
createdAt: Date;
|
||||
finishedAt?: Date;
|
||||
finishedBy?: string;
|
||||
status: string;
|
||||
responsible: string;
|
||||
title: string;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
></textarea>
|
||||
</div>
|
||||
<button
|
||||
v-if="!editStatus && !activeDamageReportObj.done"
|
||||
v-if="!editStatus && activeDamageReportObj.closedAt == undefined"
|
||||
primary
|
||||
class="w-fit! self-end"
|
||||
:disabled="!can('update', 'unit', 'damage_report')"
|
||||
|
@ -24,7 +24,7 @@
|
|||
>
|
||||
Status ändern
|
||||
</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 class="w-fit!" @click="saveStatus(false)">Status speichern</button>
|
||||
</div>
|
||||
|
@ -122,7 +122,7 @@ export default defineComponent({
|
|||
};
|
||||
this.updateDamageReport(update)
|
||||
.then((res) => {
|
||||
this.activeDamageReportObj!.done = update.done;
|
||||
this.activeDamageReportObj!.closedAt = update.done ? new Date() : undefined;
|
||||
this.activeDamageReportObj!.status = update.status;
|
||||
this.activeDamageReportObj!.noteByWorker = update.noteByWorker;
|
||||
this.loading = "success";
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
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">
|
||||
<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>
|
||||
<div class="flex flex-row gap-2">
|
||||
<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">
|
||||
<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 v-if="row.context || row.nextInspection" class="p-2">
|
||||
<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"
|
||||
>
|
||||
<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>
|
||||
<div class="flex flex-row gap-2">
|
||||
<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">
|
||||
<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 v-if="row.context || row.nextInspection" class="p-2">
|
||||
<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"
|
||||
>
|
||||
<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>
|
||||
<div class="flex flex-row gap-2">
|
||||
<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">
|
||||
<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 v-if="row.context || row.nextInspection" class="p-2">
|
||||
<p v-if="row.context">Kontext: {{ row.context }}</p>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue