@@ -49,7 +45,6 @@ export default defineComponent({
data: {
type: Object as PropType<{
gear: undefined | MinifiedEquipmentViewModel | MinifiedVehicleViewModel | MinifiedWearableViewModel;
- title: string;
description: string;
location: string;
note: string;
@@ -62,14 +57,7 @@ export default defineComponent({
emits: {
nextStep: (s: string) => true,
stepBack: () => true,
- data: (d: {
- title: string;
- description: string;
- location: string;
- note: string;
- reportedBy: string;
- image?: File;
- }) => true,
+ data: (d: { description: string; location: string; note: string; reportedBy: string; image?: File }) => true,
},
mounted() {
if (this.data.image) {
@@ -80,7 +68,6 @@ export default defineComponent({
setup(e: any) {
let formData = e.target.elements;
this.$emit("data", {
- title: formData.title.value,
description: formData.description.value,
location: formData.location.value,
note: formData.note.value,
diff --git a/src/components/search/DamageReportSearchSelectMultipleWithRelated.vue b/src/components/search/DamageReportSearchSelectMultipleWithRelated.vue
deleted file mode 100644
index dc7e016..0000000
--- a/src/components/search/DamageReportSearchSelectMultipleWithRelated.vue
+++ /dev/null
@@ -1,233 +0,0 @@
-
-
-
- {{ title }}
-
-
-
-
-
-
-
-
-
-
- suche
-
-
-
-
- tippe, um zu suchen...
-
-
-
-
- Keine Auswahl gefunden.
-
-
-
-
-
-
- {{ damageReport.title }} von {{ damageReport.reportedBy }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/components/search/DamageReportSearchSelectSingleWithRelated.vue b/src/components/search/DamageReportSearchSelectSingleWithRelated.vue
deleted file mode 100644
index ea77b31..0000000
--- a/src/components/search/DamageReportSearchSelectSingleWithRelated.vue
+++ /dev/null
@@ -1,216 +0,0 @@
-
-
-
- {{ title }}
-
-
-
-
-
-
-
-
-
-
- suche
-
-
-
-
- tippe, um zu suchen...
-
-
-
-
- Keine Auswahl gefunden.
-
-
-
-
-
-
- {{ damageReport.title }} von {{ damageReport.reportedBy }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/router/index.ts b/src/router/index.ts
index b5cc468..7fc2f76 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -21,7 +21,6 @@ import { setVehicleTypeId } from "./unit/vehicleType";
import { resetInspectionStores, setInspectionId } from "./unit/inspection";
import { setWearableTypeId } from "./unit/wearableType";
import { resetDamageReportStores, setDamageReportId } from "./unit/damageReport";
-import { resetRepairStores, setRepairId } from "./unit/repair";
const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
@@ -375,12 +374,6 @@ const router = createRouter({
component: () => import("@/views/admin/ViewSelect.vue"),
props: true,
},
- {
- path: "repair",
- name: "admin-unit-equipment-repair",
- component: () => import("@/views/admin/unit/equipment/Repair.vue"),
- props: true,
- },
{
path: "inspection",
name: "admin-unit-equipment-inspection",
@@ -444,12 +437,6 @@ const router = createRouter({
component: () => import("@/views/admin/ViewSelect.vue"),
props: true,
},
- {
- path: "repair",
- name: "admin-unit-vehicle-repair",
- component: () => import("@/views/admin/unit/vehicle/Repair.vue"),
- props: true,
- },
{
path: "inspection",
name: "admin-unit-vehicle-inspection",
@@ -513,12 +500,6 @@ const router = createRouter({
component: () => import("@/views/admin/ViewSelect.vue"),
props: true,
},
- {
- path: "repair",
- name: "admin-unit-wearable-repair",
- component: () => import("@/views/admin/unit/wearable/Repair.vue"),
- props: true,
- },
{
path: "inspection",
name: "admin-unit-wearable-inspection",
@@ -732,11 +713,6 @@ const router = createRouter({
component: () => import("@/views/admin/unit/damageReport/DamageReportStatusRouting.vue"),
beforeEnter: [resetDamageReportStores],
children: [
- {
- path: "",
- name: "admin-unit-damage_report-status",
- redirect: { name: "admin-unit-damage_report-open" },
- },
{
path: "open",
name: "admin-unit-damage_report-open",
@@ -766,71 +742,6 @@ const router = createRouter({
},
],
},
- {
- path: "repair",
- name: "admin-unit-repair-route",
- component: () => import("@/views/RouterView.vue"),
- meta: { type: "read", section: "unit", module: "repair" },
- beforeEnter: [abilityAndNavUpdate],
- children: [
- {
- path: "",
- name: "admin-unit-repair",
- redirect: { name: "admin-unit-repair-open" },
- },
- {
- path: "status",
- name: "admin-unit-repair-statusrouting",
- component: () => import("@/views/admin/unit/repair/RepairStatusRouting.vue"),
- beforeEnter: [resetRepairStores],
- children: [
- {
- path: "",
- name: "admin-unit-repair-status",
- redirect: { name: "admin-unit-repair-open" },
- },
- {
- path: "open",
- name: "admin-unit-repair-open",
- component: () => import("@/views/admin/unit/repair/RepairOpen.vue"),
- },
- {
- path: "done",
- name: "admin-unit-repair-done",
- component: () => import("@/views/admin/unit/repair/RepairClosed.vue"),
- },
- ],
- },
- {
- path: "create/:type?/:relatedId?",
- name: "admin-unit-repair-create",
- component: () => import("@/views/admin/unit/repair/RepairCreate.vue"),
- beforeEnter: [],
- props: true,
- },
- {
- path: "execute/:repairId",
- name: "admin-unit-repair-routing",
- component: () => import("@/views/admin/unit/repair/RepairRouting.vue"),
- beforeEnter: [setRepairId],
- props: true,
- children: [
- {
- path: "",
- name: "admin-unit-repair-overview",
- component: () => import("@/views/admin/unit/repair/Overview.vue"),
- props: true,
- },
- {
- path: "reports",
- name: "admin-unit-repair-reports",
- component: () => import("@/views/admin/unit/repair/DamageReports.vue"),
- props: true,
- },
- ],
- },
- ],
- },
{
path: "maintenance",
name: "admin-unit-maintenance-route",
diff --git a/src/router/unit/damageReport.ts b/src/router/unit/damageReport.ts
index 4a649bf..86b7f86 100644
--- a/src/router/unit/damageReport.ts
+++ b/src/router/unit/damageReport.ts
@@ -1,4 +1,4 @@
-import { useDamageReportStore } from "@/stores/admin/unit/damageReport";
+import { useDamageReportStore } from "@/stores/admin/unit/damageReport/damageReport";
export async function setDamageReportId(to: any, from: any, next: any) {
const damageReportStore = useDamageReportStore();
diff --git a/src/router/unit/repair.ts b/src/router/unit/repair.ts
deleted file mode 100644
index dab9374..0000000
--- a/src/router/unit/repair.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import { useRepairStore } from "@/stores/admin/unit/repair";
-
-export async function setRepairId(to: any, from: any, next: any) {
- const repairStore = useRepairStore();
- repairStore.activeRepair = to.params?.repairId ?? null;
-
- //xystore().$reset();
-
- next();
-}
-
-export async function resetRepairStores(to: any, from: any, next: any) {
- const repairStore = useRepairStore();
- repairStore.activeRepair = null;
- repairStore.activeRepairObj = null;
-
- //xystore().$reset();
-
- next();
-}
diff --git a/src/stores/admin/navigation.ts b/src/stores/admin/navigation.ts
index b6e5461..67aa59c 100644
--- a/src/stores/admin/navigation.ts
+++ b/src/stores/admin/navigation.ts
@@ -120,11 +120,12 @@ export const useNavigationStore = defineStore("navigation", {
? [{ key: "respiratory_mission", title: "Atemschutz-Einsätze" }]
: []),
...(abilityStore.can("create", "unit", "inspection") ? [{ key: "inspection", title: "Prüfungen" }] : []),
- ...(abilityStore.can("read", "unit", "maintenance") ? [{ key: "maintenance", title: "Wartungen" }] : []),
...(abilityStore.can("read", "unit", "damage_report")
? [{ key: "damage_report", title: "Schadensmeldungen" }]
: []),
- ...(abilityStore.can("read", "unit", "repair") ? [{ key: "repair", title: "Reparaturen" }] : []),
+ ...(abilityStore.can("read", "unit", "maintenance")
+ ? [{ key: "maintenance", title: "Wartungen / Reparaturen" }]
+ : []),
{ key: "divider1", title: "Basisdaten" },
...(abilityStore.can("read", "unit", "equipment_type")
? [{ key: "equipment_type", title: "Geräte-Typen" }]
diff --git a/src/stores/admin/unit/damageReport.ts b/src/stores/admin/unit/damageReport/damageReport.ts
similarity index 85%
rename from src/stores/admin/unit/damageReport.ts
rename to src/stores/admin/unit/damageReport/damageReport.ts
index d7a458a..827086a 100644
--- a/src/stores/admin/unit/damageReport.ts
+++ b/src/stores/admin/unit/damageReport/damageReport.ts
@@ -74,23 +74,6 @@ export const useDamageReportStore = defineStore("damageReport", {
return { ...res, data: res.data.damageReports };
});
},
- async getAllDamageReportsWithRelated(
- related: "vehicle" | "equipment" | "wearable",
- relatedId: string
- ): Promise
> {
- return await http.get(`/admin/damageReport/${related}/${relatedId}?noLimit=true`).then((res) => {
- return { ...res, data: res.data.damageReports };
- });
- },
- async searchDamageReportsWithRelated(
- related: "vehicle" | "equipment" | "wearable",
- relatedId: string,
- search: string
- ): Promise> {
- return await http.get(`/admin/damageReport/${related}/${relatedId}?search=${search}&noLimit=true`).then((res) => {
- return { ...res, data: res.data.damageReports };
- });
- },
fetchDamageReportByActiveId() {
this.loadingActive = "loading";
http
diff --git a/src/stores/admin/unit/equipment/repair.ts b/src/stores/admin/unit/equipment/repair.ts
deleted file mode 100644
index a3db4ba..0000000
--- a/src/stores/admin/unit/equipment/repair.ts
+++ /dev/null
@@ -1,43 +0,0 @@
-import { defineStore } from "pinia";
-import { http } from "@/serverCom";
-import { useEquipmentStore } from "./equipment";
-import type { RepairViewModel } from "@/viewmodels/admin/unit/repair.models";
-
-export const useEquipmentRepairStore = defineStore("equipmentRepair", {
- state: () => {
- return {
- repairs: [] as Array,
- totalCount: 0 as number,
- loading: "loading" as "loading" | "fetched" | "failed",
- };
- },
- actions: {
- fetchRepairForEquipment(offset = 0, count = 25, search = "", clear = false) {
- const equipmentId = useEquipmentStore().activeEquipment;
- if (clear) this.repairs = [];
- this.loading = "loading";
- http
- .get(
- `/admin/repair/equipment/${equipmentId}?offset=${offset}&count=${count}${search != "" ? "&search=" + search : ""}`
- )
- .then((result) => {
- this.totalCount = result.data.total;
- result.data.repairs
- .filter((elem: RepairViewModel) => this.repairs.findIndex((m) => m.id == elem.id) == -1)
- .map((elem: RepairViewModel, index: number): RepairViewModel & { tab_pos: number } => {
- return {
- ...elem,
- tab_pos: index + offset,
- };
- })
- .forEach((elem: RepairViewModel & { tab_pos: number }) => {
- this.repairs.push(elem);
- });
- this.loading = "fetched";
- })
- .catch((err) => {
- this.loading = "failed";
- });
- },
- },
-});
diff --git a/src/stores/admin/unit/maintenance.ts b/src/stores/admin/unit/maintenance/maintenance.ts
similarity index 100%
rename from src/stores/admin/unit/maintenance.ts
rename to src/stores/admin/unit/maintenance/maintenance.ts
diff --git a/src/stores/admin/unit/repair.ts b/src/stores/admin/unit/repair.ts
deleted file mode 100644
index acf30c9..0000000
--- a/src/stores/admin/unit/repair.ts
+++ /dev/null
@@ -1,135 +0,0 @@
-import { defineStore } from "pinia";
-import type {
- CreateRepairViewModel,
- RepairViewModel,
- UpdateRepairStatusViewModel,
- UpdateRepairViewModel,
-} from "@/viewmodels/admin/unit/repair.models";
-import { http } from "@/serverCom";
-import type { AxiosResponse } from "axios";
-
-export const useRepairStore = defineStore("repair", {
- state: () => {
- return {
- repairs: [] as Array,
- totalCount: 0 as number,
- loading: "loading" as "loading" | "fetched" | "failed",
- activeRepair: null as string | null,
- activeRepairObj: null as RepairViewModel | null,
- loadingActive: "loading" as "loading" | "fetched" | "failed",
- };
- },
- actions: {
- formatQueryReturnToPagination(result: AxiosResponse, offset: number) {
- this.totalCount = result.data.total;
- result.data.repairs
- .filter((elem: RepairViewModel) => this.repairs.findIndex((m) => m.id == elem.id) == -1)
- .map((elem: RepairViewModel, index: number): RepairViewModel & { tab_pos: number } => {
- return {
- ...elem,
- tab_pos: index + offset,
- };
- })
- .forEach((elem: RepairViewModel & { tab_pos: number }) => {
- this.repairs.push(elem);
- });
- },
- fetchOpenRepairs(offset = 0, count = 25, search = "", clear = false) {
- if (clear) this.repairs = [];
- this.loading = "loading";
- http
- .get(`/admin/repair?done=false&offset=${offset}&count=${count}${search != "" ? "&search=" + search : ""}`)
- .then((result) => {
- this.formatQueryReturnToPagination(result, offset);
- this.loading = "fetched";
- })
- .catch((err) => {
- this.loading = "failed";
- });
- },
- fetchDoneRepairs(offset = 0, count = 25, search = "", clear = false) {
- if (clear) this.repairs = [];
- this.loading = "loading";
- http
- .get(`/admin/repair?done=true&offset=${offset}&count=${count}${search != "" ? "&search=" + search : ""}`)
- .then((result) => {
- this.formatQueryReturnToPagination(result, offset);
- this.loading = "fetched";
- })
- .catch((err) => {
- this.loading = "failed";
- });
- },
- async getAllRepairs(): Promise> {
- return await http.get(`/admin/repair?noLimit=true`).then((res) => {
- return { ...res, data: res.data.repairs };
- });
- },
- async getRepairsByIds(ids: Array): Promise> {
- return await http
- .post(`/admin/repair/ids`, {
- ids,
- })
- .then((res) => {
- return { ...res, data: res.data.repairs };
- });
- },
- async searchRepairs(search: string): Promise> {
- return await http.get(`/admin/repair?search=${search}&noLimit=true`).then((res) => {
- return { ...res, data: res.data.repairs };
- });
- },
- fetchRepairByActiveId() {
- this.loadingActive = "loading";
- http
- .get(`/admin/repair/${this.activeRepair}`)
- .then((res) => {
- this.activeRepairObj = res.data;
- this.loadingActive = "fetched";
- })
- .catch((err) => {
- this.loadingActive = "failed";
- });
- },
- fetchRepairById(id: string) {
- return http.get(`/admin/repair/${id}`);
- },
- loadRepairImage(url: string) {
- return http.get(`/admin/repair/${this.activeRepairObj?.id}/${url}`, {
- responseType: "blob",
- });
- },
- async createRepair(repair: CreateRepairViewModel): Promise> {
- const result = await http.post(`/admin/repair`, {
- affected: repair.affected,
- affectedId: repair.affectedId,
- title: repair.title,
- description: repair.description,
- responsible: repair.responsible,
- reports: repair.reports,
- });
- return result;
- },
- async updateRepair(repair: UpdateRepairViewModel): Promise> {
- const result = await http.patch(`/admin/repair/${this.activeRepairObj?.id}`, {
- title: repair.title,
- description: repair.description,
- responsible: repair.responsible,
- });
- return result;
- },
- async updateRepairReports(reports: Array): Promise> {
- const result = await http.patch(`/admin/repair/${this.activeRepairObj?.id}/reports`, {
- reports,
- });
- return result;
- },
- async updateRepairStatus(repair: UpdateRepairStatusViewModel): Promise> {
- const result = await http.patch(`/admin/repair/${this.activeRepairObj?.id}/status`, {
- status: repair.status,
- done: repair.done,
- });
- return result;
- },
- },
-});
diff --git a/src/stores/admin/unit/vehicle/repair.ts b/src/stores/admin/unit/vehicle/repair.ts
deleted file mode 100644
index beb30a1..0000000
--- a/src/stores/admin/unit/vehicle/repair.ts
+++ /dev/null
@@ -1,43 +0,0 @@
-import { defineStore } from "pinia";
-import { http } from "@/serverCom";
-import { useVehicleStore } from "./vehicle";
-import type { RepairViewModel } from "@/viewmodels/admin/unit/repair.models";
-
-export const useVehicleRepairStore = defineStore("vehicleRepair", {
- state: () => {
- return {
- repairs: [] as Array,
- totalCount: 0 as number,
- loading: "loading" as "loading" | "fetched" | "failed",
- };
- },
- actions: {
- fetchRepairForVehicle(offset = 0, count = 25, search = "", clear = false) {
- const vehicleId = useVehicleStore().activeVehicle;
- if (clear) this.repairs = [];
- this.loading = "loading";
- http
- .get(
- `/admin/repair/vehicle/${vehicleId}?offset=${offset}&count=${count}${search != "" ? "&search=" + search : ""}`
- )
- .then((result) => {
- this.totalCount = result.data.total;
- result.data.repairs
- .filter((elem: RepairViewModel) => this.repairs.findIndex((m) => m.id == elem.id) == -1)
- .map((elem: RepairViewModel, index: number): RepairViewModel & { tab_pos: number } => {
- return {
- ...elem,
- tab_pos: index + offset,
- };
- })
- .forEach((elem: RepairViewModel & { tab_pos: number }) => {
- this.repairs.push(elem);
- });
- this.loading = "fetched";
- })
- .catch((err) => {
- this.loading = "failed";
- });
- },
- },
-});
diff --git a/src/stores/admin/unit/wearable/repair.ts b/src/stores/admin/unit/wearable/repair.ts
deleted file mode 100644
index 95f74e2..0000000
--- a/src/stores/admin/unit/wearable/repair.ts
+++ /dev/null
@@ -1,43 +0,0 @@
-import { defineStore } from "pinia";
-import { http } from "@/serverCom";
-import { useWearableStore } from "./wearable";
-import type { RepairViewModel } from "@/viewmodels/admin/unit/repair.models";
-
-export const useWearableRepairStore = defineStore("wearableRepair", {
- state: () => {
- return {
- repairs: [] as Array,
- totalCount: 0 as number,
- loading: "loading" as "loading" | "fetched" | "failed",
- };
- },
- actions: {
- fetchRepairForWearable(offset = 0, count = 25, search = "", clear = false) {
- const wearableId = useWearableStore().activeWearable;
- if (clear) this.repairs = [];
- this.loading = "loading";
- http
- .get(
- `/admin/repair/wearable/${wearableId}?offset=${offset}&count=${count}${search != "" ? "&search=" + search : ""}`
- )
- .then((result) => {
- this.totalCount = result.data.total;
- result.data.repairs
- .filter((elem: RepairViewModel) => this.repairs.findIndex((m) => m.id == elem.id) == -1)
- .map((elem: RepairViewModel, index: number): RepairViewModel & { tab_pos: number } => {
- return {
- ...elem,
- tab_pos: index + offset,
- };
- })
- .forEach((elem: RepairViewModel & { tab_pos: number }) => {
- this.repairs.push(elem);
- });
- this.loading = "fetched";
- })
- .catch((err) => {
- this.loading = "failed";
- });
- },
- },
-});
diff --git a/src/types/permissionTypes.ts b/src/types/permissionTypes.ts
index 091c0c3..2442d9f 100644
--- a/src/types/permissionTypes.ts
+++ b/src/types/permissionTypes.ts
@@ -22,7 +22,6 @@ export type PermissionModule =
| "respiratory_mission"
| "damage_report"
| "maintenance"
- | "repair"
// configuration
| "qualification"
| "award"
@@ -98,7 +97,6 @@ export const permissionModules: Array = [
"respiratory_mission",
"damage_report",
"maintenance",
- "repair",
// configuration
"qualification",
"award",
@@ -136,7 +134,6 @@ export const sectionsAndModules: SectionsAndModulesObject = {
"respiratory_mission",
"damage_report",
"maintenance",
- "repair",
],
configuration: [
"qualification",
diff --git a/src/viewmodels/admin/unit/damageReport.models.ts b/src/viewmodels/admin/unit/damageReport.models.ts
index 5544d00..d05debe 100644
--- a/src/viewmodels/admin/unit/damageReport.models.ts
+++ b/src/viewmodels/admin/unit/damageReport.models.ts
@@ -1,5 +1,5 @@
import type { EquipmentViewModel } from "./equipment/equipment.models";
-import type { RepairViewModel } from "./repair.models";
+import type { MaintenanceViewModel } from "./maintenance.models";
import type { VehicleViewModel } from "./vehicle/vehicle.models";
import type { WearableViewModel } from "./wearable/wearable.models";
@@ -22,7 +22,6 @@ export type DamageReportAssigned = {
export type DamageReportViewModel = {
id: string;
- title: string;
reportedAt: Date;
status: string;
done: boolean;
@@ -32,11 +31,10 @@ export type DamageReportViewModel = {
noteByWorker: string;
images: string[];
reportedBy: string;
- repair?: RepairViewModel;
+ maintenance?: MaintenanceViewModel;
} & Optional;
export interface CreateDamageReportViewModel {
- title: string;
description: string;
reportedBy: string;
affectedId: string;
diff --git a/src/viewmodels/admin/unit/maintenance.models.ts b/src/viewmodels/admin/unit/maintenance.models.ts
index bfcf1e2..7ccd66e 100644
--- a/src/viewmodels/admin/unit/maintenance.models.ts
+++ b/src/viewmodels/admin/unit/maintenance.models.ts
@@ -1,3 +1,4 @@
+import type { DamageReportViewModel } from "./damageReport.models";
import type { EquipmentViewModel } from "./equipment/equipment.models";
import type { VehicleViewModel } from "./vehicle/vehicle.models";
import type { WearableViewModel } from "./wearable/wearable.models";
@@ -23,7 +24,9 @@ export type MaintenanceViewModel = {
id: string;
createdAt: Date;
status: string;
+ done: boolean;
description: string;
+ reports: DamageReportViewModel[];
} & MaintenanceAssigned;
export interface CreateMaintenanceViewModel {
diff --git a/src/viewmodels/admin/unit/repair.models.ts b/src/viewmodels/admin/unit/repair.models.ts
deleted file mode 100644
index 24904e7..0000000
--- a/src/viewmodels/admin/unit/repair.models.ts
+++ /dev/null
@@ -1,57 +0,0 @@
-import type { DamageReportViewModel } from "./damageReport.models";
-import type { EquipmentViewModel } from "./equipment/equipment.models";
-import type { MaintenanceViewModel } from "./maintenance.models";
-import type { VehicleViewModel } from "./vehicle/vehicle.models";
-import type { WearableViewModel } from "./wearable/wearable.models";
-
-export type RepairAssigned = {
- relatedId: string;
-} & (
- | {
- assigned: "equipment";
- related: EquipmentViewModel;
- }
- | {
- assigned: "vehicle";
- related: VehicleViewModel;
- }
- | {
- assigned: "wearable";
- related: WearableViewModel;
- }
-);
-
-export type RepairViewModel = {
- id: string;
- createdAt: Date;
- finishedAt?: Date;
- status: string;
- responsible: string;
- title: string;
- description: string;
- images: string[];
- reportDocument: string;
- reports: DamageReportViewModel[];
-} & RepairAssigned;
-
-export interface CreateRepairViewModel {
- affected: "equipment" | "vehicle" | "wearable";
- affectedId: string;
- title: string;
- description: string;
- responsible: string;
- reports: string[];
-}
-
-export interface UpdateRepairStatusViewModel {
- id: string;
- status: string;
- done: boolean;
-}
-
-export interface UpdateRepairViewModel {
- id: string;
- title: string;
- description: string;
- responsible: string;
-}
diff --git a/src/views/admin/unit/damageReport/DamageReport.vue b/src/views/admin/unit/damageReport/DamageReport.vue
index d33f077..4ba8c6a 100644
--- a/src/views/admin/unit/damageReport/DamageReport.vue
+++ b/src/views/admin/unit/damageReport/DamageReport.vue
@@ -19,7 +19,7 @@ import { defineComponent } from "vue";
import { mapActions, mapState } from "pinia";
import MainTemplate from "@/templates/Main.vue";
import { useAbilityStore } from "@/stores/ability";
-import { useDamageReportStore } from "@/stores/admin/unit/damageReport";
+import { useDamageReportStore } from "@/stores/admin/unit/damageReport/damageReport";
import type { DamageReportViewModel } from "@/viewmodels/admin/unit/damageReport.models";
import Pagination from "@/components/Pagination.vue";
import DamageReportListItem from "@/components/admin/unit/damageReport/DamageReportListItem.vue";
diff --git a/src/views/admin/unit/damageReport/DamageReportClosed.vue b/src/views/admin/unit/damageReport/DamageReportClosed.vue
index 89d5bc0..0766e6d 100644
--- a/src/views/admin/unit/damageReport/DamageReportClosed.vue
+++ b/src/views/admin/unit/damageReport/DamageReportClosed.vue
@@ -19,7 +19,7 @@ import { defineComponent } from "vue";
import { mapActions, mapState } from "pinia";
import MainTemplate from "@/templates/Main.vue";
import { useAbilityStore } from "@/stores/ability";
-import { useDamageReportStore } from "@/stores/admin/unit/damageReport";
+import { useDamageReportStore } from "@/stores/admin/unit/damageReport/damageReport";
import type { DamageReportViewModel } from "@/viewmodels/admin/unit/damageReport.models";
import Pagination from "@/components/Pagination.vue";
import DamageReportListItem from "@/components/admin/unit/damageReport/DamageReportListItem.vue";
diff --git a/src/views/admin/unit/damageReport/DamageReportRouting.vue b/src/views/admin/unit/damageReport/DamageReportRouting.vue
index c876d31..72b2043 100644
--- a/src/views/admin/unit/damageReport/DamageReportRouting.vue
+++ b/src/views/admin/unit/damageReport/DamageReportRouting.vue
@@ -5,32 +5,20 @@
- {{ activeDamageReportObj?.title }} -
+ Schadensmeldung:
{{ activeDamageReportObj?.related?.name ?? "Ohne Zuordnung" }}
({{ activeDamageReportObj.related.code }})
-
+
+
+
@@ -66,8 +54,8 @@ import { mapActions, mapState } from "pinia";
import MainTemplate from "@/templates/Main.vue";
import { RouterLink, RouterView } from "vue-router";
import { useAbilityStore } from "@/stores/ability";
-import { useDamageReportStore } from "@/stores/admin/unit/damageReport";
-import { ArrowTopRightOnSquareIcon, WrenchScrewdriverIcon } from "@heroicons/vue/24/outline";
+import { useDamageReportStore } from "@/stores/admin/unit/damageReport/damageReport";
+import { ArrowTopRightOnSquareIcon } from "@heroicons/vue/24/outline";
diff --git a/src/views/admin/unit/equipment/DamageReport.vue b/src/views/admin/unit/equipment/DamageReport.vue
index 1f04e66..857c63d 100644
--- a/src/views/admin/unit/equipment/DamageReport.vue
+++ b/src/views/admin/unit/equipment/DamageReport.vue
@@ -14,7 +14,7 @@
>
-
{{ row.title }} - {{ new Date(row.reportedAt).toLocaleString("de") }} - {{ row.status }}
+
{{ new Date(row.reportedAt).toLocaleString("de") }} - {{ row.status }}
@@ -25,7 +25,7 @@
-
diff --git a/src/views/admin/unit/equipment/EquipmentRouting.vue b/src/views/admin/unit/equipment/EquipmentRouting.vue
index 22f4466..5eb9ced 100644
--- a/src/views/admin/unit/equipment/EquipmentRouting.vue
+++ b/src/views/admin/unit/equipment/EquipmentRouting.vue
@@ -55,10 +55,9 @@ export default defineComponent({
return {
tabs: [
{ route: "admin-unit-equipment-overview", title: "Übersicht" },
+ { route: "admin-unit-equipment-maintenance", title: "Wartungen/Reparaturen" },
{ route: "admin-unit-equipment-inspection", title: "Prüfungen" },
- { route: "admin-unit-equipment-maintenance", title: "Wartungen" },
{ route: "admin-unit-equipment-damage_report", title: "Schadensmeldungen" },
- { route: "admin-unit-equipment-repair", title: "Reparaturen" },
],
};
},
diff --git a/src/views/admin/unit/equipment/Repair.vue b/src/views/admin/unit/equipment/Repair.vue
deleted file mode 100644
index 603db4e..0000000
--- a/src/views/admin/unit/equipment/Repair.vue
+++ /dev/null
@@ -1,62 +0,0 @@
-
-
-
fetchRepairForEquipment(offset, count, search)"
- @search="(search) => fetchRepairForEquipment(0, 25, search, true)"
- >
-
-
-
-
-
{{ new Date(row.createdAt).toLocaleString("de") }} - {{ row.status }}
-
-
-
Beschreibung: {{ row.description }}
-
-
-
-
-
- Reparatur erstellen
-
-
-
-
-
-
-
diff --git a/src/views/admin/unit/maintenance/Maintenance.vue b/src/views/admin/unit/maintenance/Maintenance.vue
index d54276c..19e0e0c 100644
--- a/src/views/admin/unit/maintenance/Maintenance.vue
+++ b/src/views/admin/unit/maintenance/Maintenance.vue
@@ -19,7 +19,7 @@ import { defineComponent } from "vue";
import { mapActions, mapState } from "pinia";
import MainTemplate from "@/templates/Main.vue";
import { useAbilityStore } from "@/stores/ability";
-import { useMaintenanceStore } from "@/stores/admin/unit/maintenance";
+import { useMaintenanceStore } from "@/stores/admin/unit/maintenance/maintenance";
import type { MaintenanceViewModel } from "@/viewmodels/admin/unit/maintenance.models";
import Pagination from "@/components/Pagination.vue";
import MaintenanceListItem from "@/components/admin/unit/maintenance/MaintenanceListItem.vue";
diff --git a/src/views/admin/unit/repair/DamageReports.vue b/src/views/admin/unit/repair/DamageReports.vue
deleted file mode 100644
index a90ecb4..0000000
--- a/src/views/admin/unit/repair/DamageReports.vue
+++ /dev/null
@@ -1,92 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/admin/unit/repair/Overview.vue b/src/views/admin/unit/repair/Overview.vue
deleted file mode 100644
index 4c32fca..0000000
--- a/src/views/admin/unit/repair/Overview.vue
+++ /dev/null
@@ -1,118 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/admin/unit/repair/RepairClosed.vue b/src/views/admin/unit/repair/RepairClosed.vue
deleted file mode 100644
index 6a0778b..0000000
--- a/src/views/admin/unit/repair/RepairClosed.vue
+++ /dev/null
@@ -1,46 +0,0 @@
-
-
-
fetchDoneRepairs(offset, count, search)"
- @search="(search) => fetchDoneRepairs(0, maxEntriesPerPage, search, true)"
- >
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/admin/unit/repair/RepairCreate.vue b/src/views/admin/unit/repair/RepairCreate.vue
deleted file mode 100644
index 6355228..0000000
--- a/src/views/admin/unit/repair/RepairCreate.vue
+++ /dev/null
@@ -1,171 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/admin/unit/repair/RepairOpen.vue b/src/views/admin/unit/repair/RepairOpen.vue
deleted file mode 100644
index 1970cc8..0000000
--- a/src/views/admin/unit/repair/RepairOpen.vue
+++ /dev/null
@@ -1,46 +0,0 @@
-
-
-
fetchOpenRepairs(offset, count, search)"
- @search="(search) => fetchOpenRepairs(0, maxEntriesPerPage, search, true)"
- >
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/admin/unit/repair/RepairRouting.vue b/src/views/admin/unit/repair/RepairRouting.vue
deleted file mode 100644
index 06b45ca..0000000
--- a/src/views/admin/unit/repair/RepairRouting.vue
+++ /dev/null
@@ -1,86 +0,0 @@
-
-
-
- zurück zur Liste
-
-
-
- {{ activeRepairObj?.title }} -
- {{ activeRepairObj?.related?.name ?? "Ohne Zuordnung" }}
- ({{ activeRepairObj.related.code }})
-
-
-
-
-
-
-
-
-
-
-
-
- {{ tab.title }}
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/admin/unit/repair/RepairStatusRouting.vue b/src/views/admin/unit/repair/RepairStatusRouting.vue
deleted file mode 100644
index ad0de6b..0000000
--- a/src/views/admin/unit/repair/RepairStatusRouting.vue
+++ /dev/null
@@ -1,55 +0,0 @@
-
-
-
-
-
-
-
- {{ tab.title }}
-
-
-
-
-
- Reparatur erstellen
-
-
-
-
-
-
-
-
-
diff --git a/src/views/admin/unit/vehicle/DamageReport.vue b/src/views/admin/unit/vehicle/DamageReport.vue
index 69f41de..eb2ac38 100644
--- a/src/views/admin/unit/vehicle/DamageReport.vue
+++ b/src/views/admin/unit/vehicle/DamageReport.vue
@@ -14,7 +14,7 @@
>
-
{{ row.title }} - {{ new Date(row.reportedAt).toLocaleString("de") }} - {{ row.status }}
+
{{ new Date(row.reportedAt).toLocaleString("de") }} - {{ row.status }}
@@ -25,7 +25,7 @@
-
diff --git a/src/views/admin/unit/vehicle/Repair.vue b/src/views/admin/unit/vehicle/Repair.vue
deleted file mode 100644
index b4a74fc..0000000
--- a/src/views/admin/unit/vehicle/Repair.vue
+++ /dev/null
@@ -1,62 +0,0 @@
-
-
-
fetchRepairForVehicle(offset, count, search)"
- @search="(search) => fetchRepairForVehicle(0, 25, search, true)"
- >
-
-
-
-
-
{{ new Date(row.createdAt).toLocaleString("de") }} - {{ row.status }}
-
-
-
Beschreibung: {{ row.description }}
-
-
-
-
-
- Reparatur erstellen
-
-
-
-
-
-
-
diff --git a/src/views/admin/unit/vehicle/VehicleRouting.vue b/src/views/admin/unit/vehicle/VehicleRouting.vue
index b9c9f32..4d3b22c 100644
--- a/src/views/admin/unit/vehicle/VehicleRouting.vue
+++ b/src/views/admin/unit/vehicle/VehicleRouting.vue
@@ -55,10 +55,9 @@ export default defineComponent({
return {
tabs: [
{ route: "admin-unit-vehicle-overview", title: "Übersicht" },
+ { route: "admin-unit-vehicle-maintenance", title: "Wartungen/Reparaturen" },
{ route: "admin-unit-vehicle-inspection", title: "Prüfungen" },
- { route: "admin-unit-vehicle-maintenance", title: "Wartungen" },
{ route: "admin-unit-vehicle-damage_report", title: "Schadensmeldungen" },
- { route: "admin-unit-vehicle-repair", title: "Reparaturen" },
],
};
},
diff --git a/src/views/admin/unit/wearable/DamageReport.vue b/src/views/admin/unit/wearable/DamageReport.vue
index 59379ab..847a286 100644
--- a/src/views/admin/unit/wearable/DamageReport.vue
+++ b/src/views/admin/unit/wearable/DamageReport.vue
@@ -14,7 +14,7 @@
>
-
{{ row.title }} - {{ new Date(row.reportedAt).toLocaleString("de") }} - {{ row.status }}
+
{{ new Date(row.reportedAt).toLocaleString("de") }} - {{ row.status }}
@@ -25,7 +25,7 @@
-
diff --git a/src/views/admin/unit/wearable/Repair.vue b/src/views/admin/unit/wearable/Repair.vue
deleted file mode 100644
index a3c0e26..0000000
--- a/src/views/admin/unit/wearable/Repair.vue
+++ /dev/null
@@ -1,62 +0,0 @@
-
-
-
fetchRepairForWearable(offset, count, search)"
- @search="(search) => fetchRepairForWearable(0, 25, search, true)"
- >
-
-
-
-
-
{{ new Date(row.createdAt).toLocaleString("de") }} - {{ row.status }}
-
-
-
Beschreibung: {{ row.description }}
-
-
-
-
-
- Reparatur erstellen
-
-
-
-
-
-
-
diff --git a/src/views/admin/unit/wearable/WearableRouting.vue b/src/views/admin/unit/wearable/WearableRouting.vue
index a7978dd..e1f9f88 100644
--- a/src/views/admin/unit/wearable/WearableRouting.vue
+++ b/src/views/admin/unit/wearable/WearableRouting.vue
@@ -55,10 +55,9 @@ export default defineComponent({
return {
tabs: [
{ route: "admin-unit-wearable-overview", title: "Übersicht" },
+ { route: "admin-unit-wearable-maintenance", title: "Wartungen/Reparaturen" },
{ route: "admin-unit-wearable-inspection", title: "Prüfungen" },
- { route: "admin-unit-wearable-maintenance", title: "Wartungen" },
{ route: "admin-unit-wearable-damage_report", title: "Schadensmeldungen" },
- { route: "admin-unit-wearable-repair", title: "Reparaturen" },
],
};
},
diff --git a/src/views/public/damageReport/Report.vue b/src/views/public/damageReport/Report.vue
index 4fa0026..c36a7be 100644
--- a/src/views/public/damageReport/Report.vue
+++ b/src/views/public/damageReport/Report.vue
@@ -56,7 +56,6 @@ export default defineComponent({
usingBarcode: false,
content: {
gear: undefined,
- title: "",
description: "",
location: "",
note: "",
@@ -64,7 +63,6 @@ export default defineComponent({
image: undefined,
} as {
gear: undefined | MinifiedEquipmentViewModel | MinifiedVehicleViewModel | MinifiedWearableViewModel;
- title: string;
description: string;
location: string;
note: string;
@@ -85,15 +83,7 @@ export default defineComponent({
this.step = index;
this.successfull = index - 1;
},
- updateContent(d: {
- title: string;
- description: string;
- location: string;
- note: string;
- reportedBy: string;
- image?: File;
- }) {
- this.content.title = d.title;
+ updateContent(d: { description: string; location: string; note: string; reportedBy: string; image?: File }) {
this.content.description = d.description;
this.content.location = d.location;
this.content.note = d.note;
@@ -112,7 +102,6 @@ export default defineComponent({
this.usingBarcode = false;
this.content = {
gear: undefined,
- title: "",
description: "",
location: "",
note: "",