update components

This commit is contained in:
Julian Krauser 2025-07-23 10:41:46 +02:00
parent 8c4a53bc17
commit 4da2e9c792
19 changed files with 11 additions and 23 deletions

View file

@ -5,7 +5,6 @@
:totalCount="totalCount" :totalCount="totalCount"
:indicateLoading="loading == 'loading'" :indicateLoading="loading == 'loading'"
@load-data="(offset, count, search) => fetchOpenDamageReports(offset, count, search)" @load-data="(offset, count, search) => fetchOpenDamageReports(offset, count, search)"
@search="(search) => fetchOpenDamageReports(0, maxEntriesPerPage, search, true)"
> >
<template #pageRow="{ row }: { row: DamageReportViewModel }"> <template #pageRow="{ row }: { row: DamageReportViewModel }">
<DamageReportListItem :damageReport="row" /> <DamageReportListItem :damageReport="row" />

View file

@ -5,7 +5,6 @@
:totalCount="totalCount" :totalCount="totalCount"
:indicateLoading="loading == 'loading'" :indicateLoading="loading == 'loading'"
@load-data="(offset, count, search) => fetchDoneDamageReports(offset, count, search)" @load-data="(offset, count, search) => fetchDoneDamageReports(offset, count, search)"
@search="(search) => fetchDoneDamageReports(0, maxEntriesPerPage, search, true)"
> >
<template #pageRow="{ row }: { row: DamageReportViewModel }"> <template #pageRow="{ row }: { row: DamageReportViewModel }">
<DamageReportListItem :damageReport="row" /> <DamageReportListItem :damageReport="row" />

View file

@ -5,7 +5,6 @@
:totalCount="totalCount" :totalCount="totalCount"
:indicateLoading="loading == 'loading'" :indicateLoading="loading == 'loading'"
@load-data="(offset, count, search) => fetchDamageReportForEquipment(offset, count, search)" @load-data="(offset, count, search) => fetchDamageReportForEquipment(offset, count, search)"
@search="(search) => fetchDamageReportForEquipment(0, 25, search, true)"
> >
<template #pageRow="{ row }: { row: DamageReportViewModel }"> <template #pageRow="{ row }: { row: DamageReportViewModel }">
<RouterLink <RouterLink

View file

@ -5,7 +5,6 @@
:totalCount="totalCount" :totalCount="totalCount"
:indicateLoading="loading == 'loading'" :indicateLoading="loading == 'loading'"
@load-data="(offset, count, search) => fetchRepairForEquipment(offset, count, search)" @load-data="(offset, count, search) => fetchRepairForEquipment(offset, count, search)"
@search="(search) => fetchRepairForEquipment(0, 25, search, true)"
> >
<template #pageRow="{ row }: { row: RepairViewModel }"> <template #pageRow="{ row }: { row: RepairViewModel }">
<RouterLink <RouterLink

View file

@ -9,7 +9,7 @@
<PencilIcon class="w-5 h-5" /> <PencilIcon class="w-5 h-5" />
</RouterLink> </RouterLink>
<TrashIcon <TrashIcon
v-if="can('delete', 'unit', 'equipment_type')" v-if="can('delete', 'unit', 'equipment_type') && activeEquipmentTypeObj?.equipmentCount == 0"
class="w-5 h-5 cursor-pointer" class="w-5 h-5 cursor-pointer"
@click="openDeleteModal" @click="openDeleteModal"
/> />

View file

@ -52,7 +52,7 @@
<div class="flex flex-row justify-end gap-2"> <div class="flex flex-row justify-end gap-2">
<RouterLink <RouterLink
:to="{ name: 'admin-unit-inspection_plan' }" :to="{ name: 'admin-unit-inspection' }"
primary-outline primary-outline
button button
class="w-fit!" class="w-fit!"

View file

@ -5,7 +5,6 @@
:totalCount="nextTotalCount" :totalCount="nextTotalCount"
:indicateLoading="nextLoading == 'loading'" :indicateLoading="nextLoading == 'loading'"
@load-data="(offset, count, search) => fetchNextInspections(offset, count, search)" @load-data="(offset, count, search) => fetchNextInspections(offset, count, search)"
@search="(search) => fetchNextInspections(0, maxEntriesPerPage, search, true)"
> >
<template #pageRow="{ row }: { row: InspectionNextViewModel }"> <template #pageRow="{ row }: { row: InspectionNextViewModel }">
<RouterLink <RouterLink

View file

@ -5,7 +5,6 @@
:totalCount="totalCount" :totalCount="totalCount"
:indicateLoading="loading == 'loading'" :indicateLoading="loading == 'loading'"
@load-data="(offset, count, search) => fetchRunningInspections(offset, count, search)" @load-data="(offset, count, search) => fetchRunningInspections(offset, count, search)"
@search="(search) => fetchRunningInspections(0, maxEntriesPerPage, search, true)"
> >
<template #pageRow="{ row }: { row: MinifiedInspectionViewModel }"> <template #pageRow="{ row }: { row: MinifiedInspectionViewModel }">
<RouterLink <RouterLink

View file

@ -5,7 +5,6 @@
:totalCount="totalCount" :totalCount="totalCount"
:indicateLoading="loading == 'loading'" :indicateLoading="loading == 'loading'"
@load-data="(offset, count, search) => fetchMaintenances(offset, count, search)" @load-data="(offset, count, search) => fetchMaintenances(offset, count, search)"
@search="(search) => fetchMaintenances(0, maxEntriesPerPage, search, true)"
> >
<template #pageRow="{ row }: { row: MaintenanceViewModel }"> <template #pageRow="{ row }: { row: MaintenanceViewModel }">
<MaintenanceListItem :maintenance="row" /> <MaintenanceListItem :maintenance="row" />

View file

@ -5,7 +5,6 @@
:totalCount="totalCount" :totalCount="totalCount"
:indicateLoading="loading == 'loading'" :indicateLoading="loading == 'loading'"
@load-data="(offset, count, search) => fetchDoneRepairs(offset, count, search)" @load-data="(offset, count, search) => fetchDoneRepairs(offset, count, search)"
@search="(search) => fetchDoneRepairs(0, maxEntriesPerPage, search, true)"
> >
<template #pageRow="{ row }: { row: RepairViewModel }"> <template #pageRow="{ row }: { row: RepairViewModel }">
<RepairListItem :repair="row" /> <RepairListItem :repair="row" />

View file

@ -5,7 +5,6 @@
:totalCount="totalCount" :totalCount="totalCount"
:indicateLoading="loading == 'loading'" :indicateLoading="loading == 'loading'"
@load-data="(offset, count, search) => fetchOpenRepairs(offset, count, search)" @load-data="(offset, count, search) => fetchOpenRepairs(offset, count, search)"
@search="(search) => fetchOpenRepairs(0, maxEntriesPerPage, search, true)"
> >
<template #pageRow="{ row }: { row: RepairViewModel }"> <template #pageRow="{ row }: { row: RepairViewModel }">
<RepairListItem :repair="row" /> <RepairListItem :repair="row" />

View file

@ -5,7 +5,6 @@
:totalCount="totalCount" :totalCount="totalCount"
:indicateLoading="false" :indicateLoading="false"
@load-data="(offset, count, search) => fetchDamageReportForVehicle(offset, count, search)" @load-data="(offset, count, search) => fetchDamageReportForVehicle(offset, count, search)"
@search="(search) => fetchDamageReportForVehicle(0, 25, search, true)"
> >
<template #pageRow="{ row }: { row: DamageReportViewModel }"> <template #pageRow="{ row }: { row: DamageReportViewModel }">
<RouterLink <RouterLink

View file

@ -4,8 +4,7 @@
:items="inspections" :items="inspections"
:totalCount="totalCount" :totalCount="totalCount"
:indicateLoading="false" :indicateLoading="false"
@load-data="(offset, count, search) => {}" @load-data="(offset, count, search) => fetchInspectionForVehicle(offset, count, search)"
@search="(search) => {}"
> >
<template #pageRow="{ row }: { row: InspectionViewModel }"> <template #pageRow="{ row }: { row: InspectionViewModel }">
<RouterLink <RouterLink
@ -46,6 +45,8 @@ import { useVehicleInspectionStore } from "@/stores/admin/unit/vehicle/inspectio
import { PencilSquareIcon } from "@heroicons/vue/24/outline"; import { PencilSquareIcon } from "@heroicons/vue/24/outline";
import Pagination from "@/components/Pagination.vue"; import Pagination from "@/components/Pagination.vue";
import type { InspectionViewModel } from "@/viewmodels/admin/unit/inspection/inspection.models"; import type { InspectionViewModel } from "@/viewmodels/admin/unit/inspection/inspection.models";
import { off } from "process";
import { count } from "console";
</script> </script>
<script lang="ts"> <script lang="ts">
@ -63,7 +64,7 @@ export default defineComponent({
methods: { methods: {
...mapActions(useVehicleInspectionStore, ["fetchInspectionForVehicle"]), ...mapActions(useVehicleInspectionStore, ["fetchInspectionForVehicle"]),
fetchItem() { fetchItem() {
this.fetchInspectionForVehicle(); this.fetchInspectionForVehicle(0, 25, "", true);
}, },
}, },
}); });

View file

@ -5,7 +5,6 @@
:totalCount="totalCount" :totalCount="totalCount"
:indicateLoading="loading == 'loading'" :indicateLoading="loading == 'loading'"
@load-data="(offset, count, search) => fetchRepairForVehicle(offset, count, search)" @load-data="(offset, count, search) => fetchRepairForVehicle(offset, count, search)"
@search="(search) => fetchRepairForVehicle(0, 25, search, true)"
> >
<template #pageRow="{ row }: { row: RepairViewModel }"> <template #pageRow="{ row }: { row: RepairViewModel }">
<RouterLink <RouterLink

View file

@ -9,7 +9,7 @@
<PencilIcon class="w-5 h-5" /> <PencilIcon class="w-5 h-5" />
</RouterLink> </RouterLink>
<TrashIcon <TrashIcon
v-if="can('delete', 'unit', 'vehicle_type')" v-if="can('delete', 'unit', 'vehicle_type') && activeVehicleTypeObj?.vehicleCount == 0"
class="w-5 h-5 cursor-pointer" class="w-5 h-5 cursor-pointer"
@click="openDeleteModal" @click="openDeleteModal"
/> />

View file

@ -5,7 +5,6 @@
:totalCount="totalCount" :totalCount="totalCount"
:indicateLoading="false" :indicateLoading="false"
@load-data="(offset, count, search) => fetchDamageReportForWearable(offset, count, search)" @load-data="(offset, count, search) => fetchDamageReportForWearable(offset, count, search)"
@search="(search) => fetchDamageReportForWearable(0, 25, search, true)"
> >
<template #pageRow="{ row }: { row: DamageReportViewModel }"> <template #pageRow="{ row }: { row: DamageReportViewModel }">
<RouterLink <RouterLink

View file

@ -4,8 +4,7 @@
:items="inspections" :items="inspections"
:totalCount="totalCount" :totalCount="totalCount"
:indicateLoading="false" :indicateLoading="false"
@load-data="(offset, count, search) => {}" @load-data="(offset, count, search) => fetchInspectionForWearable(offset, count, search)"
@search="(search) => {}"
> >
<template #pageRow="{ row }: { row: InspectionViewModel }"> <template #pageRow="{ row }: { row: InspectionViewModel }">
<RouterLink <RouterLink
@ -46,6 +45,7 @@ import { useWearableInspectionStore } from "@/stores/admin/unit/wearable/inspect
import { PencilSquareIcon } from "@heroicons/vue/24/outline"; import { PencilSquareIcon } from "@heroicons/vue/24/outline";
import Pagination from "@/components/Pagination.vue"; import Pagination from "@/components/Pagination.vue";
import type { InspectionViewModel } from "@/viewmodels/admin/unit/inspection/inspection.models"; import type { InspectionViewModel } from "@/viewmodels/admin/unit/inspection/inspection.models";
import { count } from "console";
</script> </script>
<script lang="ts"> <script lang="ts">
@ -63,7 +63,7 @@ export default defineComponent({
methods: { methods: {
...mapActions(useWearableInspectionStore, ["fetchInspectionForWearable"]), ...mapActions(useWearableInspectionStore, ["fetchInspectionForWearable"]),
fetchItem() { fetchItem() {
this.fetchInspectionForWearable(); this.fetchInspectionForWearable(0, 25, "", true);
}, },
}, },
}); });

View file

@ -5,7 +5,6 @@
:totalCount="totalCount" :totalCount="totalCount"
:indicateLoading="loading == 'loading'" :indicateLoading="loading == 'loading'"
@load-data="(offset, count, search) => fetchRepairForWearable(offset, count, search)" @load-data="(offset, count, search) => fetchRepairForWearable(offset, count, search)"
@search="(search) => fetchRepairForWearable(0, 25, search, true)"
> >
<template #pageRow="{ row }: { row: RepairViewModel }"> <template #pageRow="{ row }: { row: RepairViewModel }">
<RouterLink <RouterLink

View file

@ -9,7 +9,7 @@
<PencilIcon class="w-5 h-5" /> <PencilIcon class="w-5 h-5" />
</RouterLink> </RouterLink>
<TrashIcon <TrashIcon
v-if="can('delete', 'unit', 'wearable_type')" v-if="can('delete', 'unit', 'wearable_type') && activeWearableTypeObj?.wearableCount == 0"
class="w-5 h-5 cursor-pointer" class="w-5 h-5 cursor-pointer"
@click="openDeleteModal" @click="openDeleteModal"
/> />