This commit is contained in:
parent
3657a6f7a7
commit
d210138fff
|
@ -0,0 +1,19 @@
|
|||
import axios from 'axios';
|
||||
|
||||
export async function getUrl(route, appName = 'salix') {
|
||||
let url;
|
||||
const env = process.env.NODE_ENV === 'development' ? 'dev' : process.env.NODE_ENV;
|
||||
const filter = {
|
||||
where: {and: [
|
||||
{appName: appName},
|
||||
{environment: env}
|
||||
]}
|
||||
};
|
||||
|
||||
await axios.get('Urls/findOne', {params: {filter}})
|
||||
.then(res => {
|
||||
url = res.data.url + route;
|
||||
});
|
||||
|
||||
return url;
|
||||
}
|
|
@ -1,12 +1,35 @@
|
|||
<script setup>
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useStateStore } from 'stores/useStateStore';
|
||||
import ClaimDescriptor from './ClaimDescriptor.vue';
|
||||
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, onMounted } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useRoute } from 'vue-router';
|
||||
import ClaimDescriptor from './ClaimDescriptor.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}`);
|
||||
});
|
||||
|
||||
function openNewTab(url) {
|
||||
window.open(url, '_blank');
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<Teleport to="#searchbar" v-if="stateStore.isHeaderMounted()">
|
||||
|
@ -22,6 +45,53 @@ const { t } = useI18n();
|
|||
<ClaimDescriptor />
|
||||
<QSeparator />
|
||||
<LeftMenu source="card" />
|
||||
<QSeparator />
|
||||
<QList>
|
||||
<QItem
|
||||
active-class="text-primary"
|
||||
@click="openNewTab(salixUrl + '/detail')"
|
||||
clickable
|
||||
v-ripple
|
||||
>
|
||||
<QItemSection avatar>
|
||||
<QIcon name="disabled_by_default" />
|
||||
</QItemSection>
|
||||
<QItemSection> {{ t('Details') }} </QItemSection>
|
||||
</QItem>
|
||||
<QItem
|
||||
active-class="text-primary"
|
||||
@click="openNewTab(salixUrl + '/note/index')"
|
||||
clickable
|
||||
v-ripple
|
||||
>
|
||||
<QItemSection avatar>
|
||||
<QIcon name="disabled_by_default" />
|
||||
</QItemSection>
|
||||
<QItemSection> {{ t('Notes') }} </QItemSection>
|
||||
</QItem>
|
||||
<QItem
|
||||
active-class="text-primary"
|
||||
@click="openNewTab(salixUrl + '/development')"
|
||||
clickable
|
||||
v-ripple
|
||||
>
|
||||
<QItemSection avatar>
|
||||
<QIcon name="disabled_by_default" />
|
||||
</QItemSection>
|
||||
<QItemSection> {{ t('Development') }} </QItemSection>
|
||||
</QItem>
|
||||
<QItem
|
||||
active-class="text-primary"
|
||||
@click="openNewTab(salixUrl + '/action')"
|
||||
clickable
|
||||
v-ripple
|
||||
>
|
||||
<QItemSection avatar>
|
||||
<QIcon name="disabled_by_default" />
|
||||
</QItemSection>
|
||||
<QItemSection> {{ t('Action') }} </QItemSection>
|
||||
</QItem>
|
||||
</QList>
|
||||
</QScrollArea>
|
||||
</QDrawer>
|
||||
<QPageContainer>
|
||||
|
@ -35,4 +105,8 @@ const { t } = useI18n();
|
|||
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
|
||||
Development: Trazabilidad
|
||||
Action: Acción
|
||||
</i18n>
|
||||
|
|
Loading…
Reference in New Issue