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

View file

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

View file

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

View file

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

View file

@ -9,7 +9,7 @@
<PencilIcon class="w-5 h-5" />
</RouterLink>
<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"
@click="openDeleteModal"
/>

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -9,7 +9,7 @@
<PencilIcon class="w-5 h-5" />
</RouterLink>
<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"
@click="openDeleteModal"
/>

View file

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

View file

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

View file

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

View file

@ -9,7 +9,7 @@
<PencilIcon class="w-5 h-5" />
</RouterLink>
<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"
@click="openDeleteModal"
/>