6157-actionClaim #106
|
@ -31,82 +31,6 @@ const $props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
// watch(
|
|
||||||
// () => $props,
|
|
||||||
// (props) => {
|
|
||||||
// fetch(props.url);
|
|
||||||
// },
|
|
||||||
// { deep: true }
|
|
||||||
// );
|
|
||||||
|
|
||||||
// const emit = defineEmits(['onFetch']);
|
|
||||||
// const arrayData = computed(() => {
|
|
||||||
// const currentArrayData = useArrayData($props.dataKey);
|
|
||||||
// const newArrayData = useArrayData($props.dataKey, {
|
|
||||||
// url: $props.url,
|
|
||||||
// filter: $props.filter,
|
|
||||||
// });
|
|
||||||
// console.log(currentArrayData.store.url, currentArrayData?.store?.url != $props.url);
|
|
||||||
// if (currentArrayData?.store?.url != $props.url) newArrayData.fetch({ append: false });
|
|
||||||
// return newArrayData;
|
|
||||||
// });
|
|
||||||
|
|
||||||
// watch(
|
|
||||||
// () => arrayData,
|
|
||||||
// (arrayData) => {
|
|
||||||
// console.log('watch CHANGE??', arrayData.value.store.data);
|
|
||||||
// entity.value = arrayData.value.store.data;
|
|
||||||
// emit('onFetch', arrayData.value.store.data);
|
|
||||||
// },
|
|
||||||
// { deep: true }
|
|
||||||
// );
|
|
||||||
|
|
||||||
// const slots = useSlots();
|
|
||||||
// const { t } = useI18n();
|
|
||||||
// let lastUrl = ref(null);
|
|
||||||
// const entity = ref();
|
|
||||||
|
|
||||||
// async function fetch(url) {
|
|
||||||
// console.log('FETCH??', arrayData.value.store.url, url);
|
|
||||||
// if (arrayData.value.store.url == url) return;
|
|
||||||
// useArrayData($props.dataKey, {
|
|
||||||
// url: url ?? $props.url,
|
|
||||||
// filter: $props.filter,
|
|
||||||
// });
|
|
||||||
// await arrayData.value.fetch({ append: false });
|
|
||||||
// console.log('FETCH?? 2', url, $props.url);
|
|
||||||
// // if (arrayData.value.store.data) emit('onFetch', arrayData.value.store.data);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// watch($props, async () => {
|
|
||||||
// if (lastUrl.value == $props.url) return;
|
|
||||||
// entity.value = arrayData.value.store.data;
|
|
||||||
// // await fetch();
|
|
||||||
// });
|
|
||||||
|
|
||||||
// onMounted(async () => {
|
|
||||||
// console.log('onMounted');
|
|
||||||
// fetch($props.url);
|
|
||||||
// });
|
|
||||||
|
|
||||||
/*
|
|
||||||
|
|
||||||
ArrayData es null. la url tb
|
|
||||||
|
|
||||||
Watch → arrayData
|
|
||||||
url diferent a la nostra fetch
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
// onMounted(async () => {
|
|
||||||
// console.log('onMounted');
|
|
||||||
// fetch($props.url);
|
|
||||||
// });
|
|
||||||
const slots = useSlots();
|
const slots = useSlots();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const emit = defineEmits(['onFetch']);
|
const emit = defineEmits(['onFetch']);
|
||||||
|
@ -119,26 +43,11 @@ const arrayData = computed(() => {
|
||||||
url: $props.url,
|
url: $props.url,
|
||||||
filter: $props.filter,
|
filter: $props.filter,
|
||||||
});
|
});
|
||||||
console.log(
|
|
||||||
'URLS ',
|
|
||||||
currentArrayData.store.url,
|
|
||||||
$props.dataKey,
|
|
||||||
$props.url,
|
|
||||||
current?.url
|
|
||||||
);
|
|
||||||
if (current?.url != $props.url) newArrayData.fetch({ append: false });
|
if (current?.url != $props.url) newArrayData.fetch({ append: false });
|
||||||
if (newArrayData.store.data) emit('onFetch', newArrayData.store.data);
|
if (newArrayData.store.data) emit('onFetch', newArrayData.store.data);
|
||||||
|
|
||||||
return newArrayData;
|
return newArrayData;
|
||||||
});
|
});
|
||||||
|
|
||||||
watch(
|
|
||||||
() => arrayData,
|
|
||||||
(arrayData) => {
|
|
||||||
console.log('watch CHANGE??', arrayDataStore.get($props.dataKey));
|
|
||||||
},
|
|
||||||
{ deep: true }
|
|
||||||
);
|
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div class="descriptor">
|
<div class="descriptor">
|
||||||
|
|
|
@ -7,7 +7,6 @@ const arrayDataStore = useArrayDataStore();
|
||||||
|
|
||||||
export function useArrayData(key, userOptions) {
|
export function useArrayData(key, userOptions) {
|
||||||
if (!key) throw new Error('ArrayData: A key is required to use this composable');
|
if (!key) throw new Error('ArrayData: A key is required to use this composable');
|
||||||
console.log('CALLED WITH KEY → ', key, userOptions);
|
|
||||||
if (!arrayDataStore.get(key)) {
|
if (!arrayDataStore.get(key)) {
|
||||||
arrayDataStore.set(key);
|
arrayDataStore.set(key);
|
||||||
}
|
}
|
||||||
|
@ -74,7 +73,6 @@ export function useArrayData(key, userOptions) {
|
||||||
Object.assign(params, store.userParams);
|
Object.assign(params, store.userParams);
|
||||||
|
|
||||||
store.isLoading = true;
|
store.isLoading = true;
|
||||||
console.log('ARRAY FETCH', store.url);
|
|
||||||
const response = await axios.get(store.url, {
|
const response = await axios.get(store.url, {
|
||||||
signal: canceller.signal,
|
signal: canceller.signal,
|
||||||
params,
|
params,
|
||||||
|
|
|
@ -1,23 +1,25 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, computed, watchEffect, onMounted, onUnmounted } from 'vue';
|
import { ref, computed, watchEffect } from 'vue';
|
||||||
|
import { useQuasar } from 'quasar';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { useStateStore } from 'src/stores/useStateStore';
|
import { useStateStore } from 'src/stores/useStateStore';
|
||||||
import { toDate, toPercentage, toCurrency } from 'filters/index';
|
import { toDate, toPercentage, toCurrency } from 'filters/index';
|
||||||
|
import { tMobile } from 'src/composables/tMobile';
|
||||||
import CrudModel from 'src/components/CrudModel.vue';
|
import CrudModel from 'src/components/CrudModel.vue';
|
||||||
import FetchData from 'src/components/FetchData.vue';
|
import FetchData from 'src/components/FetchData.vue';
|
||||||
import TicketDescriptorProxy from 'src/pages/Ticket/Card/TicketDescriptorProxy.vue';
|
|
||||||
import VnSelectFilter from 'src/components/common/VnSelectFilter.vue';
|
import VnSelectFilter from 'src/components/common/VnSelectFilter.vue';
|
||||||
import { useArrayData } from 'src/composables/useArrayData';
|
import TicketDescriptorProxy from 'src/pages/Ticket/Card/TicketDescriptorProxy.vue';
|
||||||
import { tMobile } from 'src/composables/tMobile';
|
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
const quasar = useQuasar();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const stateStore = computed(() => useStateStore());
|
const stateStore = computed(() => useStateStore());
|
||||||
|
const claim = ref(null);
|
||||||
const claimId = route.params.id;
|
const claimId = route.params.id;
|
||||||
const dialog = ref(false);
|
const dialogDestination = ref(false);
|
||||||
const dialogOption = ref(null);
|
const claimDestinationFk = ref(null);
|
||||||
const resolvedStateId = ref(null);
|
const resolvedStateId = ref(null);
|
||||||
const claimActionsForm = ref();
|
const claimActionsForm = ref();
|
||||||
const rows = ref([]);
|
const rows = ref([]);
|
||||||
|
@ -25,14 +27,8 @@ const selectedRows = ref([]);
|
||||||
const destinationTypes = ref([]);
|
const destinationTypes = ref([]);
|
||||||
const destinations = ref([]);
|
const destinations = ref([]);
|
||||||
const totalClaimed = ref(null);
|
const totalClaimed = ref(null);
|
||||||
const responsibility = ref(5); // pending to get from ClaimDescriptor
|
const maxResponsibility = computed(() => 5);
|
||||||
const manaCharger = ref(false); // pending to get from ClaimDescriptor
|
const dialogGreuge = ref(false);
|
||||||
const claimData = useArrayData('claimData');
|
|
||||||
// ClaimEnds/filter?filter={ claimFk: route.param.id}
|
|
||||||
// for update responsability and mana /Claims/id/updateClaimAction
|
|
||||||
|
|
||||||
// onMounted(() => (stateStore.value.rightDrawer = true));
|
|
||||||
// onUnmounted(() => (stateStore.value.rightDrawer = false));
|
|
||||||
|
|
||||||
const columns = computed(() => [
|
const columns = computed(() => [
|
||||||
{
|
{
|
||||||
|
@ -107,14 +103,6 @@ function getDestination(destinationId) {
|
||||||
return destinationTypes.value.find((type) => type.id == destinationId);
|
return destinationTypes.value.find((type) => type.id == destinationId);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function updateDestination(claimDestinationFk, row) {
|
|
||||||
if (claimDestinationFk) {
|
|
||||||
await axios.post('Claims/updateClaimDestination', {
|
|
||||||
claimDestinationFk,
|
|
||||||
rows: [row],
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
async function deleteSale(sale) {
|
async function deleteSale(sale) {
|
||||||
await axios.post(`ClaimEnds/deleteClamedSales`, { sales: [sale] });
|
await axios.post(`ClaimEnds/deleteClamedSales`, { sales: [sale] });
|
||||||
claimActionsForm.value.reload();
|
claimActionsForm.value.reload();
|
||||||
|
@ -129,8 +117,103 @@ async function updateDestinations(claimDestinationFk) {
|
||||||
claimActionsForm.value.reload();
|
claimActionsForm.value.reload();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function updateDestination(claimDestinationFk, row) {
|
||||||
carlossa marked this conversation as resolved
|
|||||||
|
if (claimDestinationFk) {
|
||||||
|
await axios.post('Claims/updateClaimDestination', {
|
||||||
|
claimDestinationFk,
|
||||||
|
rows: [row],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function regularizeClaim() {
|
||||||
|
const query = `Claims/${claimId}/regularizeClaim`;
|
||||||
|
|
||||||
|
await axios.post(query);
|
||||||
|
if (claim.value.responsibility >= Math.ceil(maxResponsibility.value) / 2) {
|
||||||
|
dialogGreuge.value = true;
|
||||||
|
} else {
|
||||||
|
quasar.notify({
|
||||||
|
message: t('globals.dataSaved'),
|
||||||
|
type: 'positive',
|
||||||
|
});
|
||||||
|
|
||||||
|
claimActionsForm.value.reload();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function updateGreuge(greuges) {
|
||||||
|
const { data } = await axios.post(`Greuges`, greuges);
|
||||||
|
quasar.notify({
|
||||||
|
message: t('globals.dataSaved'),
|
||||||
|
type: 'positive',
|
||||||
|
});
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function onUpdateGreugeAccept() {
|
||||||
|
const greugeTypeFreightId = await getGreugeTypeId();
|
||||||
|
const freightPickUpPrice = await getGreugeConfig();
|
||||||
|
|
||||||
|
await updateGreuge({
|
||||||
|
clientFk: claim.value.clientFk,
|
||||||
|
description: `${t('ClaimGreugeDescription')} ${claimId}`.toUpperCase(),
|
||||||
|
amount: freightPickUpPrice,
|
||||||
|
greugeTypeFk: greugeTypeFreightId,
|
||||||
|
ticketFk: claim.value.ticketFk,
|
||||||
|
});
|
||||||
|
quasar.notify({
|
||||||
|
message: t('globals.dataSaved'),
|
||||||
|
type: 'positive',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function getGreugeTypeId() {
|
||||||
|
const params = { filter: { where: { code: 'freightPickUp' } } };
|
||||||
|
const query = `GreugeTypes/findOne`;
|
||||||
|
const { data } = await axios.get(query, { params });
|
||||||
|
return data.id;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function getGreugeConfig() {
|
||||||
|
const query = `GreugeConfigs/findOne`;
|
||||||
|
const { data } = await axios.get(query);
|
||||||
|
return data.freightPickUpPrice;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function save(data) {
|
||||||
|
const query = `Claims/${claimId}/updateClaimAction`;
|
||||||
|
await axios.patch(query, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
async function importToNewRefundTicket() {
|
||||||
|
const query = `ClaimBeginnings/${claimId}/importToNewRefundTicket`;
|
||||||
|
await axios.post(query);
|
||||||
|
claimActionsForm.value.reload();
|
||||||
|
quasar.notify({
|
||||||
|
message: t('globals.dataSaved'),
|
||||||
|
type: 'positive',
|
||||||
|
});
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
|
<FetchData
|
||||||
|
:url="`Claims/${claimId}`"
|
||||||
|
@on-fetch="(data) => (claim = data)"
|
||||||
|
auto-load
|
||||||
|
/>
|
||||||
|
<FetchData
|
||||||
|
url="ClaimStates/findOne"
|
||||||
|
@on-fetch="(data) => (resolvedStateId = data.id)"
|
||||||
|
auto-load
|
||||||
|
:where="{ code: 'resolved' }"
|
||||||
|
/>
|
||||||
|
<FetchData
|
||||||
|
url="ClaimDestinations"
|
||||||
|
auto-load
|
||||||
|
@on-fetch="(data) => (destinationTypes = data)"
|
||||||
|
/>
|
||||||
<template v-if="stateStore.isHeaderMounted()">
|
<template v-if="stateStore.isHeaderMounted()">
|
||||||
<Teleport to="#actions-append">
|
<Teleport to="#actions-append">
|
||||||
<div class="row q-gutter-x-sm">
|
<div class="row q-gutter-x-sm">
|
||||||
|
@ -148,7 +231,13 @@ async function updateDestinations(claimDestinationFk) {
|
||||||
</div>
|
</div>
|
||||||
</Teleport>
|
</Teleport>
|
||||||
</template>
|
</template>
|
||||||
<QDrawer v-model="stateStore.rightDrawer" side="right" :width="300" show-if-above>
|
<QDrawer
|
||||||
|
v-model="stateStore.rightDrawer"
|
||||||
|
side="right"
|
||||||
|
:width="300"
|
||||||
|
show-if-above
|
||||||
|
v-if="claim"
|
||||||
|
>
|
||||||
<QScrollArea class="fit text-grey-8 q-mt-lg">
|
<QScrollArea class="fit text-grey-8 q-mt-lg">
|
||||||
<div class="totalClaim q-mb-md">
|
<div class="totalClaim q-mb-md">
|
||||||
{{ `${t('Total claimed')}: ${toCurrency(totalClaimed)}` }}
|
{{ `${t('Total claimed')}: ${toCurrency(totalClaimed)}` }}
|
||||||
|
@ -160,10 +249,12 @@ async function updateDestinations(claimDestinationFk) {
|
||||||
{{ t('claim.summary.actions') }}
|
{{ t('claim.summary.actions') }}
|
||||||
</p>
|
</p>
|
||||||
<QSlider
|
<QSlider
|
||||||
class="responsability { 'background-color:primary': quasar.platform.is.mobile }"
|
class="responsibility { 'background-color:primary': quasar.platform.is.mobile }"
|
||||||
v-model="responsibility"
|
v-model="claim.responsibility"
|
||||||
label
|
|
||||||
:label-value="t('claim.summary.responsibility')"
|
:label-value="t('claim.summary.responsibility')"
|
||||||
|
@update:model-value="
|
||||||
|
(value) => save({ responsibility: value })
|
||||||
|
"
|
||||||
label-always
|
label-always
|
||||||
color="primary"
|
color="primary"
|
||||||
markers
|
markers
|
||||||
|
@ -178,26 +269,18 @@ async function updateDestinations(claimDestinationFk) {
|
||||||
</QItem>
|
</QItem>
|
||||||
</QCard>
|
</QCard>
|
||||||
<QItemLabel class="mana q-mb-md">
|
<QItemLabel class="mana q-mb-md">
|
||||||
<QCheckbox v-model="manaCharger" />
|
<QCheckbox
|
||||||
|
v-model="claim.isChargedToMana"
|
||||||
|
@update:model-value="(value) => save({ isChargedToMana: value })"
|
||||||
|
/>
|
||||||
<span>{{ t('mana') }}</span>
|
<span>{{ t('mana') }}</span>
|
||||||
</QItemLabel>
|
</QItemLabel>
|
||||||
</QScrollArea>
|
</QScrollArea>
|
||||||
</QDrawer>
|
</QDrawer>
|
||||||
<FetchData
|
|
||||||
url="ClaimDestinations"
|
|
||||||
auto-load
|
|
||||||
@on-fetch="(data) => (destinationTypes = data)"
|
|
||||||
/>
|
|
||||||
<FetchData
|
|
||||||
:url="`ClaimStates/findOne`"
|
|
||||||
:where="{ code: 'resolved' }"
|
|
||||||
auto-load
|
|
||||||
@on-fetch="(data) => (resolvedStateId = data)"
|
|
||||||
/>
|
|
||||||
<Teleport to="#st-data" v-if="stateStore.isSubToolbarShown()"> </Teleport>
|
<Teleport to="#st-data" v-if="stateStore.isSubToolbarShown()"> </Teleport>
|
||||||
|
|
||||||
<div class="claim-action">
|
<div class="claim-action">
|
||||||
<CrudModel
|
<CrudModel
|
||||||
|
v-if="claim"
|
||||||
data-key="ClaimEnds"
|
data-key="ClaimEnds"
|
||||||
url="ClaimEnds/filter"
|
url="ClaimEnds/filter"
|
||||||
save-url="ClaimEnds/crud"
|
save-url="ClaimEnds/crud"
|
||||||
|
@ -314,8 +397,10 @@ async function updateDestinations(claimDestinationFk) {
|
||||||
:label="tMobile('Regularize')"
|
:label="tMobile('Regularize')"
|
||||||
:title="t('Regularize')"
|
:title="t('Regularize')"
|
||||||
icon="check"
|
icon="check"
|
||||||
|
@click="regularizeClaim"
|
||||||
|
:disable="claim.claimStateFk == resolvedStateId"
|
||||||
/>
|
/>
|
||||||
<!--disabled="(ClaimDescriptor)claimStateFk == resolvedStateId"-->
|
|
||||||
<QBtn
|
<QBtn
|
||||||
color="primary"
|
color="primary"
|
||||||
text-color="white"
|
text-color="white"
|
||||||
|
@ -324,7 +409,7 @@ async function updateDestinations(claimDestinationFk) {
|
||||||
:label="tMobile('Change destination')"
|
:label="tMobile('Change destination')"
|
||||||
:title="t('Change destination')"
|
:title="t('Change destination')"
|
||||||
icon="swap_horiz"
|
icon="swap_horiz"
|
||||||
@click="dialog = !dialog"
|
@click="dialogDestination = !dialogDestination"
|
||||||
/>
|
/>
|
||||||
<QBtn
|
<QBtn
|
||||||
color="primary"
|
color="primary"
|
||||||
|
@ -333,11 +418,12 @@ async function updateDestinations(claimDestinationFk) {
|
||||||
:label="tMobile('Import claim')"
|
:label="tMobile('Import claim')"
|
||||||
:title="t('Import claim')"
|
:title="t('Import claim')"
|
||||||
icon="Upload"
|
icon="Upload"
|
||||||
|
@click="importToNewRefundTicket"
|
||||||
|
:disable="claim.claimStateFk == resolvedStateId"
|
||||||
/>
|
/>
|
||||||
<!--disabled="(ClaimDescriptor)claimStateFk == resolvedStateId"-->
|
|
||||||
</template>
|
</template>
|
||||||
</CrudModel>
|
</CrudModel>
|
||||||
<QDialog v-model="dialog">
|
<QDialog v-model="dialogDestination">
|
||||||
<QCard>
|
<QCard>
|
||||||
<QCardSection>
|
<QCardSection>
|
||||||
<QItem class="q-pa-none">
|
<QItem class="q-pa-none">
|
||||||
|
@ -349,7 +435,7 @@ async function updateDestinations(claimDestinationFk) {
|
||||||
</QCardSection>
|
</QCardSection>
|
||||||
<QCardSection>
|
<QCardSection>
|
||||||
<VnSelectFilter
|
<VnSelectFilter
|
||||||
v-model="dialogOption"
|
v-model="claimDestinationFk"
|
||||||
:options="destinationTypes"
|
:options="destinationTypes"
|
||||||
option-label="description"
|
option-label="description"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
|
@ -363,15 +449,39 @@ async function updateDestinations(claimDestinationFk) {
|
||||||
v-close-popup
|
v-close-popup
|
||||||
/>
|
/>
|
||||||
<QBtn
|
<QBtn
|
||||||
:disable="!dialogOption"
|
:disable="!claimDestinationFk"
|
||||||
:label="t('globals.save')"
|
:label="t('globals.save')"
|
||||||
color="primary"
|
color="primary"
|
||||||
v-close-popup
|
v-close-popup
|
||||||
@click="updateDestinations(dialogOption)"
|
@click="updateDestinations(claimDestinationFk)"
|
||||||
/>
|
/>
|
||||||
</QCardActions>
|
</QCardActions>
|
||||||
</QCard>
|
</QCard>
|
||||||
</QDialog>
|
</QDialog>
|
||||||
carlossa marked this conversation as resolved
alexm
commented
Com? Com?
|
|||||||
|
<QDialog v-model="dialogGreuge">
|
||||||
|
<QCardSection>
|
||||||
|
<QItem class="q-pa-none">
|
||||||
|
<span class="q-dialog__title text-white">
|
||||||
|
{{ t('dialogGreuge title') }}
|
||||||
|
</span>
|
||||||
|
<QBtn icon="close" flat round dense v-close-popup />
|
||||||
|
</QItem>
|
||||||
|
<QCardActions class="justify-end q-mr-sm">
|
||||||
|
<QBtn
|
||||||
|
flat
|
||||||
|
:label="t('globals.close')"
|
||||||
|
color="primary"
|
||||||
|
v-close-popup
|
||||||
|
/>
|
||||||
|
<QBtn
|
||||||
|
:label="t('globals.save')"
|
||||||
|
color="primary"
|
||||||
|
v-close-popup
|
||||||
|
@click="onUpdateGreugeAccept"
|
||||||
|
/>
|
||||||
|
</QCardActions>
|
||||||
|
</QCardSection>
|
||||||
|
</QDialog>
|
||||||
</div>
|
</div>
|
||||||
carlossa marked this conversation as resolved
alexm
commented
Aço si ja esta en els descriptors, en els summarys te que haver alguna clase ja feta (si no fesla) Aço si ja esta en els descriptors, en els summarys te que haver alguna clase ja feta (si no fesla)
|
|||||||
</template>
|
</template>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
@ -409,7 +519,7 @@ async function updateDestinations(claimDestinationFk) {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
margin: 5px;
|
margin: 5px;
|
||||||
}
|
}
|
||||||
.responsability {
|
.responsibility {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
margin-left: 40px;
|
margin-left: 40px;
|
||||||
}
|
}
|
||||||
|
@ -418,14 +528,14 @@ async function updateDestinations(claimDestinationFk) {
|
||||||
color: white;
|
color: white;
|
||||||
float: inline-start;
|
float: inline-start;
|
||||||
}
|
}
|
||||||
|
|
||||||
.qdrawer {
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
<i18n>
|
<i18n>
|
||||||
en:
|
en:
|
||||||
mana: Is paid with mana
|
mana: Is paid with mana
|
||||||
dialog title: Change destination to all selected rows
|
dialog title: Change destination to all selected rows
|
||||||
|
dialogGreuge title: Insert greuges on client card
|
||||||
|
ClaimGreugeDescription: Claim Id
|
||||||
|
|
||||||
es:
|
es:
|
||||||
mana: Cargado al maná
|
mana: Cargado al maná
|
||||||
Delivered: Descripción
|
Delivered: Descripción
|
||||||
|
@ -443,4 +553,6 @@ es:
|
||||||
Import claim: Importar reclamación
|
Import claim: Importar reclamación
|
||||||
dialog title: Cambiar destino en todas las filas seleccionadas
|
dialog title: Cambiar destino en todas las filas seleccionadas
|
||||||
Remove: Eliminar
|
Remove: Eliminar
|
||||||
|
dialogGreuge title: Insertar greuges en la ficha del cliente
|
||||||
|
ClaimGreugeDescription: Id reclamación
|
||||||
</i18n>
|
</i18n>
|
||||||
|
|
|
@ -69,7 +69,6 @@ function stateColor(code) {
|
||||||
}
|
}
|
||||||
const data = ref(useCardDescription());
|
const data = ref(useCardDescription());
|
||||||
const setData = (entity) => {
|
const setData = (entity) => {
|
||||||
console.log('SET ENTITY SETDATA', entity);
|
|
||||||
if (!entity) return;
|
if (!entity) return;
|
||||||
data.value = useCardDescription(entity.client.name, entity.id);
|
data.value = useCardDescription(entity.client.name, entity.id);
|
||||||
state.set('ClaimDescriptor', entity);
|
state.set('ClaimDescriptor', entity);
|
||||||
|
|
|
@ -7,6 +7,7 @@ import FetchData from 'components/FetchData.vue';
|
||||||
import VnSelectFilter from 'components/common/VnSelectFilter.vue';
|
import VnSelectFilter from 'components/common/VnSelectFilter.vue';
|
||||||
import { getUrl } from 'composables/getUrl';
|
import { getUrl } from 'composables/getUrl';
|
||||||
import { tMobile } from 'composables/tMobile';
|
import { tMobile } from 'composables/tMobile';
|
||||||
|
import router from 'src/router';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
|
||||||
|
@ -102,10 +103,6 @@ const columns = computed(() => [
|
||||||
tabIndex: 5,
|
tabIndex: 5,
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
function goToAction() {
|
|
||||||
location.href = `${salixUrl}/action`;
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<FetchData
|
<FetchData
|
||||||
|
@ -148,7 +145,7 @@ function goToAction() {
|
||||||
:data-required="{ claimFk: route.params.id }"
|
:data-required="{ claimFk: route.params.id }"
|
||||||
v-model:selected="selected"
|
v-model:selected="selected"
|
||||||
auto-load
|
auto-load
|
||||||
@save-changes="goToAction"
|
@save-changes="$router.push(`/claim/${route.params.id}/action`)"
|
||||||
:default-save="false"
|
:default-save="false"
|
||||||
>
|
>
|
||||||
<template #body="{ rows }">
|
<template #body="{ rows }">
|
||||||
|
|
Loading…
Reference in New Issue
Y esto también!!