refactor: refs #7549 optimize claim data retrieval in handleWorker function
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
parent
c1b6d96aef
commit
c3ae161eb0
|
@ -8,6 +8,7 @@ import VnSelect from 'components/common/VnSelect.vue';
|
|||
import { tMobile } from 'composables/tMobile';
|
||||
import VnSelectWorker from 'src/components/common/VnSelectWorker.vue';
|
||||
import axios from 'axios';
|
||||
import { useArrayData } from 'composables/useArrayData';
|
||||
|
||||
const route = useRoute();
|
||||
|
||||
|
@ -20,6 +21,7 @@ const claimResponsibles = ref([]);
|
|||
const claimRedeliveries = ref([]);
|
||||
const selected = ref([]);
|
||||
const saveButtonRef = ref();
|
||||
const arrayData = useArrayData('Claim');
|
||||
|
||||
const developmentsFilter = computed(() => {
|
||||
return {
|
||||
|
@ -119,7 +121,7 @@ const handleWorker = async (row) => {
|
|||
(responsible) => responsible.description === 'Comerciales',
|
||||
);
|
||||
|
||||
const { data: claim } = await axios.get(`Claims/${route.params.id}`);
|
||||
const claim = arrayData.store.data;
|
||||
|
||||
if (claimResponsibleFk === commercialResponsible?.id) {
|
||||
row.workerFk = claim.workerFk;
|
||||
|
|
Loading…
Reference in New Issue