damage report routing
This commit is contained in:
parent
36ca3d90a7
commit
4faf93c3ce
3 changed files with 97 additions and 48 deletions
|
@ -1,45 +1,17 @@
|
|||
<template>
|
||||
<MainTemplate>
|
||||
<template #topBar>
|
||||
<div class="flex flex-row items-center justify-between pt-5 pb-3 px-7">
|
||||
<h1 class="font-bold text-xl h-8">Schadensmeldungen</h1>
|
||||
</div>
|
||||
</template>
|
||||
<template #diffMain>
|
||||
<div class="flex flex-col w-full h-full gap-2 justify-center px-7">
|
||||
<div class="w-full flex flex-row justify-center">
|
||||
<div
|
||||
v-for="tab in tabs"
|
||||
:key="tab.route"
|
||||
@click="isActive = tab.route"
|
||||
class="w-full p-0.5 first:pl-0 last:pr-0 cursor-pointer"
|
||||
>
|
||||
<p
|
||||
:class="[
|
||||
'w-full rounded-lg py-2.5 text-sm text-center font-medium leading-5 focus:ring-0 outline-none',
|
||||
isActive == tab.route
|
||||
? 'bg-red-200 shadow border-b-2 border-primary rounded-b-none'
|
||||
: ' hover:bg-red-200',
|
||||
]"
|
||||
>
|
||||
{{ tab.title }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<Pagination
|
||||
:items="damageReports"
|
||||
:totalCount="totalCount"
|
||||
:indicateLoading="loading == 'loading'"
|
||||
@load-data="(offset, count, search) => fetchDamageReports(offset, count, search)"
|
||||
@search="(search) => fetchDamageReports(0, maxEntriesPerPage, search, true)"
|
||||
>
|
||||
<template #pageRow="{ row }: { row: DamageReportViewModel }">
|
||||
<DamageReportListItem :damageReport="row" />
|
||||
</template>
|
||||
</Pagination>
|
||||
</div>
|
||||
</template>
|
||||
</MainTemplate>
|
||||
<div class="flex flex-col w-full h-full gap-2 justify-center px-7">
|
||||
<Pagination
|
||||
:items="damageReports"
|
||||
:totalCount="totalCount"
|
||||
:indicateLoading="loading == 'loading'"
|
||||
@load-data="(offset, count, search) => fetchDamageReports(offset, count, search)"
|
||||
@search="(search) => fetchDamageReports(0, maxEntriesPerPage, search, true)"
|
||||
>
|
||||
<template #pageRow="{ row }: { row: DamageReportViewModel }">
|
||||
<DamageReportListItem :damageReport="row" />
|
||||
</template>
|
||||
</Pagination>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
|
@ -57,12 +29,6 @@ import DamageReportListItem from "../../../../components/admin/unit/damageReport
|
|||
export default defineComponent({
|
||||
data() {
|
||||
return {
|
||||
tabs: [
|
||||
{ route: "open", title: "offen" },
|
||||
{ route: "done", title: "bearbeitet" },
|
||||
],
|
||||
isActive: "open",
|
||||
currentPage: 0,
|
||||
maxEntriesPerPage: 25,
|
||||
};
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue