#8448 - devToTest #1254
|
@ -6,6 +6,7 @@ import CrudModel from 'components/CrudModel.vue';
|
||||||
import FetchData from 'components/FetchData.vue';
|
import FetchData from 'components/FetchData.vue';
|
||||||
import VnSelect from 'components/common/VnSelect.vue';
|
import VnSelect from 'components/common/VnSelect.vue';
|
||||||
import { tMobile } from 'composables/tMobile';
|
import { tMobile } from 'composables/tMobile';
|
||||||
|
import VnSelectWorker from 'src/components/common/VnSelectWorker.vue';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
|
||||||
|
@ -157,19 +158,14 @@ const columns = computed(() => [
|
||||||
auto-width
|
auto-width
|
||||||
@keyup.ctrl.enter.stop="claimDevelopmentForm.saveChanges()"
|
@keyup.ctrl.enter.stop="claimDevelopmentForm.saveChanges()"
|
||||||
>
|
>
|
||||||
<VnSelect
|
<VnSelectWorker
|
||||||
|
v-if="col.name == 'worker'"
|
||||||
v-model="row[col.model]"
|
v-model="row[col.model]"
|
||||||
:url="col.url"
|
|
||||||
:where="col.where"
|
|
||||||
:sort-by="col.sortBy"
|
|
||||||
:options="col.options"
|
|
||||||
:option-value="col.optionValue"
|
|
||||||
:option-label="col.optionLabel"
|
|
||||||
:autofocus="col.tabIndex == 1"
|
:autofocus="col.tabIndex == 1"
|
||||||
input-debounce="0"
|
input-debounce="0"
|
||||||
hide-selected
|
hide-selected
|
||||||
>
|
>
|
||||||
<template #option="scope" v-if="col.name == 'worker'">
|
<template #option="scope">
|
||||||
<QItem v-bind="scope.itemProps">
|
<QItem v-bind="scope.itemProps">
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<QItemLabel>{{ scope.opt?.name }}</QItemLabel>
|
<QItemLabel>{{ scope.opt?.name }}</QItemLabel>
|
||||||
|
@ -180,7 +176,20 @@ const columns = computed(() => [
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
</template>
|
</template>
|
||||||
</VnSelect>
|
</VnSelectWorker>
|
||||||
|
<VnSelect
|
||||||
|
v-else
|
||||||
|
v-model="row[col.model]"
|
||||||
|
:url="col.url"
|
||||||
|
:where="col.where"
|
||||||
|
:sort-by="col.sortBy"
|
||||||
|
:options="col.options"
|
||||||
|
:option-value="col.optionValue"
|
||||||
|
:option-label="col.optionLabel"
|
||||||
|
:autofocus="col.tabIndex == 1"
|
||||||
|
input-debounce="0"
|
||||||
|
hide-selected
|
||||||
|
/>
|
||||||
</QTd>
|
</QTd>
|
||||||
</template>
|
</template>
|
||||||
<template #item="props">
|
<template #item="props">
|
||||||
|
|
|
@ -120,13 +120,13 @@ const developmentColumns = ref([
|
||||||
{
|
{
|
||||||
name: 'claimReason',
|
name: 'claimReason',
|
||||||
label: 'claim.reason',
|
label: 'claim.reason',
|
||||||
field: (row) => row.claimReason.description,
|
field: (row) => row.claimReason?.description,
|
||||||
sortable: true,
|
sortable: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'claimResult',
|
name: 'claimResult',
|
||||||
label: 'claim.result',
|
label: 'claim.result',
|
||||||
field: (row) => row.claimResult.description,
|
field: (row) => row.claimResult?.description,
|
||||||
sortable: true,
|
sortable: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -17,6 +17,7 @@ import axios from 'axios';
|
||||||
import VnTable from 'src/components/VnTable/VnTable.vue';
|
import VnTable from 'src/components/VnTable/VnTable.vue';
|
||||||
import VnBtnSelect from 'src/components/common/VnBtnSelect.vue';
|
import VnBtnSelect from 'src/components/common/VnBtnSelect.vue';
|
||||||
import FetchData from 'src/components/FetchData.vue';
|
import FetchData from 'src/components/FetchData.vue';
|
||||||
|
import useOpenURL from 'src/composables/useOpenURL';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const stateStore = useStateStore();
|
const stateStore = useStateStore();
|
||||||
|
@ -123,6 +124,12 @@ const columns = computed(() => [
|
||||||
isPrimary: true,
|
isPrimary: true,
|
||||||
action: (row) => showLog(row),
|
action: (row) => showLog(row),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: t('Grafana'),
|
||||||
|
icon: 'vn:grafana',
|
||||||
|
isPrimary: true,
|
||||||
|
action: ({ id }) => openGrafana(id),
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
@ -192,10 +199,16 @@ const getExpeditionState = async (expedition) => {
|
||||||
}));
|
}));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const openGrafana = (expeditionFk) => {
|
||||||
|
useOpenURL(
|
||||||
|
`https://grafana.verdnatura.es/d/d552ab74-85b4-4e7f-a279-fab7cd9c6124/control-de-expediciones?orgId=1&var-expeditionFk=${expeditionFk}`
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
stateStore.rightDrawer = true;
|
stateStore.rightDrawer = true;
|
||||||
const filteredColumns = columns.value.filter((col) => col.name !== 'history');
|
const filteredColumns = columns.value.filter(({ name }) => name !== 'history');
|
||||||
allColumnNames.value = filteredColumns.map((col) => col.name);
|
allColumnNames.value = filteredColumns.map(({ name }) => name);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue