79 lines
2.3 KiB
Vue
79 lines
2.3 KiB
Vue
<script setup>
|
|
import LeftMenu from 'components/LeftMenu.vue';
|
|
import { getUrl } from 'composables/getUrl';
|
|
import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
|
|
import { useStateStore } from 'stores/useStateStore';
|
|
import { computed } from 'vue';
|
|
import { useI18n } from 'vue-i18n';
|
|
import { useRoute } from 'vue-router';
|
|
import ClaimDescriptor from './ClaimDescriptor.vue';
|
|
|
|
import { onMounted } from 'vue';
|
|
const stateStore = useStateStore();
|
|
const { t } = useI18n();
|
|
const route = useRoute();
|
|
const $props = defineProps({
|
|
id: {
|
|
type: Number,
|
|
required: false,
|
|
default: null,
|
|
},
|
|
});
|
|
const entityId = computed(() => {
|
|
return $props.id || route.params.id;
|
|
});
|
|
|
|
let salixUrl;
|
|
onMounted(async () => {
|
|
salixUrl = await getUrl(`claim/${entityId.value}`);
|
|
});
|
|
</script>
|
|
<template>
|
|
<Teleport to="#searchbar" v-if="stateStore.isHeaderMounted()">
|
|
<VnSearchbar
|
|
data-key="ClaimList"
|
|
url="Claims/filter"
|
|
:label="t('Search claim')"
|
|
:info="t('You can search by claim id or customer name')"
|
|
/>
|
|
</Teleport>
|
|
<QDrawer v-model="stateStore.leftDrawer" show-if-above :width="256">
|
|
<QScrollArea class="fit">
|
|
<ClaimDescriptor />
|
|
<QSeparator />
|
|
<LeftMenu source="card" />
|
|
<QSeparator />
|
|
<QList>
|
|
<QItem
|
|
active-class="text-primary"
|
|
clickable
|
|
v-ripple
|
|
:href="`${salixUrl}/action`"
|
|
>
|
|
<QItemSection avatar><QIcon name="vn:actions"></QIcon></QItemSection>
|
|
<QItemSection>{{ t('Action') }}</QItemSection>
|
|
</QItem>
|
|
</QList>
|
|
</QScrollArea>
|
|
</QDrawer>
|
|
<QPageContainer>
|
|
<QPage>
|
|
<QToolbar class="bg-vn-dark justify-end">
|
|
<div id="st-data"></div>
|
|
<QSpace />
|
|
<div id="st-actions"></div>
|
|
</QToolbar>
|
|
<div class="q-pa-md"><RouterView></RouterView></div>
|
|
</QPage>
|
|
</QPageContainer>
|
|
</template>
|
|
|
|
<i18n>
|
|
es:
|
|
Search claim: Buscar reclamación
|
|
You can search by claim id or customer name: Puedes buscar por id de la reclamación o nombre del cliente
|
|
Details: Detalles
|
|
Notes: Notas
|
|
Action: Acción
|
|
</i18n>
|