diff --git a/src/components/search/EquipmentSearchSelect.vue b/src/components/search/EquipmentSearchSelect.vue new file mode 100644 index 0000000..2f60486 --- /dev/null +++ b/src/components/search/EquipmentSearchSelect.vue @@ -0,0 +1,196 @@ + + + + + diff --git a/src/components/search/InspectionPlanSearchSelect.vue b/src/components/search/InspectionPlanSearchSelect.vue new file mode 100644 index 0000000..58a514b --- /dev/null +++ b/src/components/search/InspectionPlanSearchSelect.vue @@ -0,0 +1,178 @@ + + + + + diff --git a/src/components/search/VehicleSearchSelect.vue b/src/components/search/VehicleSearchSelect.vue new file mode 100644 index 0000000..5f19211 --- /dev/null +++ b/src/components/search/VehicleSearchSelect.vue @@ -0,0 +1,196 @@ + + + + + diff --git a/src/router/index.ts b/src/router/index.ts index ee86a7b..114af1c 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -855,6 +855,34 @@ const router = createRouter({ }, ], }, + { + path: "inspection", + name: "admin-unit-inspection-route", + component: () => import("@/views/RouterView.vue"), + meta: { type: "create", section: "unit", module: "inspection" }, + beforeEnter: [abilityAndNavUpdate], + children: [ + { + path: "", + name: "admin-unit-inspection", + redirect: { name: "admin-unit-inspection-plan" }, + }, + { + path: "plan/:type?/:relatedId?/:inspectionPlanId?", + name: "admin-unit-inspection-plan", + component: () => import("@/views/admin/unit/inspection/InspectionPlan.vue"), + beforeEnter: [], + props: true, + }, + { + path: "execute/:inspection", + name: "admin-unit-inspection-execute", + component: () => import("@/views/admin/unit/inspection/InspectionExecute.vue"), + beforeEnter: [], + props: true, + }, + ], + }, ], }, { diff --git a/src/stores/admin/navigation.ts b/src/stores/admin/navigation.ts index 3b71970..2b34384 100644 --- a/src/stores/admin/navigation.ts +++ b/src/stores/admin/navigation.ts @@ -135,6 +135,7 @@ export const useNavigationStore = defineStore("navigation", { ...(abilityStore.can("read", "unit", "inspection_plan") ? [{ key: "inspection_plan", title: "Prüfpläne" }] : []), + ...(abilityStore.can("create", "unit", "inspection") ? [{ key: "inspection", title: "Prüfungen" }] : []), ], }, configuration: { diff --git a/src/types/permissionTypes.ts b/src/types/permissionTypes.ts index ad4f436..a9b016b 100644 --- a/src/types/permissionTypes.ts +++ b/src/types/permissionTypes.ts @@ -14,6 +14,7 @@ export type PermissionModule = | "vehicle" | "vehicle_type" | "inspection_plan" + | "inspection" | "respiratory_gear" | "respiratory_wearer" | "respiratory_mission" @@ -86,6 +87,7 @@ export const permissionModules: Array = [ "vehicle", "vehicle_type", "inspection_plan", + "inspection", "respiratory_gear", "respiratory_wearer", "respiratory_mission", @@ -120,6 +122,7 @@ export const sectionsAndModules: SectionsAndModulesObject = { "vehicle", "vehicle_type", "inspection_plan", + "inspection", "respiratory_gear", "respiratory_wearer", "respiratory_mission", diff --git a/src/views/admin/unit/equipment/Inspection.vue b/src/views/admin/unit/equipment/Inspection.vue index 1f529d1..40dfe29 100644 --- a/src/views/admin/unit/equipment/Inspection.vue +++ b/src/views/admin/unit/equipment/Inspection.vue @@ -8,7 +8,10 @@ @search="(search) => {}" >
- + Prüfung durchführen
diff --git a/src/views/admin/unit/inspection/InspectionExecute.vue b/src/views/admin/unit/inspection/InspectionExecute.vue new file mode 100644 index 0000000..2ab32d5 --- /dev/null +++ b/src/views/admin/unit/inspection/InspectionExecute.vue @@ -0,0 +1,57 @@ + + + + + diff --git a/src/views/admin/unit/inspection/InspectionPlan.vue b/src/views/admin/unit/inspection/InspectionPlan.vue new file mode 100644 index 0000000..3451c90 --- /dev/null +++ b/src/views/admin/unit/inspection/InspectionPlan.vue @@ -0,0 +1,111 @@ + + + + + diff --git a/src/views/admin/unit/inspectionPlan/CreateInspectionPlan.vue b/src/views/admin/unit/inspectionPlan/CreateInspectionPlan.vue index 00c0904..e758eea 100644 --- a/src/views/admin/unit/inspectionPlan/CreateInspectionPlan.vue +++ b/src/views/admin/unit/inspectionPlan/CreateInspectionPlan.vue @@ -138,7 +138,6 @@ export default defineComponent({ this.active = queryType as "equipment" | "vehicle"; this.selectedType = queryId as string; } - console.log(query); }, beforeUnmount() { try { diff --git a/src/views/admin/unit/vehicle/Inspection.vue b/src/views/admin/unit/vehicle/Inspection.vue index 38759e4..6ecb2c7 100644 --- a/src/views/admin/unit/vehicle/Inspection.vue +++ b/src/views/admin/unit/vehicle/Inspection.vue @@ -8,7 +8,10 @@ @search="(search) => {}" >
- + Prüfung durchführen
diff --git a/src/views/admin/unit/vehicle/Vehicle.vue b/src/views/admin/unit/vehicle/Vehicle.vue index 4272b4b..3a46d1c 100644 --- a/src/views/admin/unit/vehicle/Vehicle.vue +++ b/src/views/admin/unit/vehicle/Vehicle.vue @@ -12,6 +12,7 @@ :totalCount="totalCount" :indicateLoading="loading == 'loading'" useSearch + useScanner @load-data="(offset, count, search) => fetchVehicles(offset, count, search)" @search="(search) => fetchVehicles(0, maxEntriesPerPage, search, true)" >