0
0
Fork 0

Merge pull request 'Se hacen correcciones en base a comentarios en el PR' (#56) from branch-PR-2-fixes into branch-PR-2

Reviewed-on: hyervoni/salix-front-mindshore#56
This commit is contained in:
Carlos Fonseca 2024-01-04 15:25:33 +00:00
commit fb7a3c208c
1 changed files with 9 additions and 14 deletions

View File

@ -38,14 +38,14 @@ onBeforeMount(async () => {
const rows = computed(() => arrayData.value.store.data); const rows = computed(() => arrayData.value.store.data);
const selected = ref([]); const selected = ref([]);
const worderId = ref(0); const workerId = ref(0);
const customerId = ref(0); const customerId = ref(0);
const tableColumnComponents = { const tableColumnComponents = {
client: { client: {
component: QBtn, component: QBtn,
props: () => ({ flat: true, color: 'blue' }), props: () => ({ flat: true, color: 'blue' }),
event: (prop) => selectClientId(prop.row.clientFk), event: ({ row }) => selectCustomerId(row.clientFk),
}, },
isWorker: { isWorker: {
component: QCheckbox, component: QCheckbox,
@ -58,7 +58,7 @@ const tableColumnComponents = {
salesperson: { salesperson: {
component: QBtn, component: QBtn,
props: () => ({ flat: true, color: 'blue' }), props: () => ({ flat: true, color: 'blue' }),
event: (prop) => selectSalespersonId(prop.row.salesPersonFk), event: ({ row }) => selectWorkerId(row.salesPersonFk),
}, },
country: { country: {
component: 'span', component: 'span',
@ -78,7 +78,7 @@ const tableColumnComponents = {
author: { author: {
component: QBtn, component: QBtn,
props: () => ({ flat: true, color: 'blue' }), props: () => ({ flat: true, color: 'blue' }),
event: (prop) => selectAuthorId(prop.row.workerFk), event: ({ row }) => selectWorkerId(row.workerFk),
}, },
lastObservation: { lastObservation: {
component: 'span', component: 'span',
@ -173,19 +173,14 @@ const columns = computed(() => {
]; ];
}); });
const selectClientId = (id) => { const selectCustomerId = (id) => {
worderId.value = 0; workerId.value = 0;
customerId.value = id; customerId.value = id;
}; };
const selectSalespersonId = (id) => { const selectWorkerId = (id) => {
customerId.value = 0; customerId.value = 0;
worderId.value = id; workerId.value = id;
};
const selectAuthorId = (id) => {
customerId.value = 0;
worderId.value = id;
}; };
</script> </script>
@ -226,7 +221,7 @@ const selectAuthorId = (id) => {
> >
{{ props.value }} {{ props.value }}
<WorkerDescriptorProxy v-if="worderId" :id="worderId" /> <WorkerDescriptorProxy v-if="workerId" :id="workerId" />
<CustomerDescriptorProxy v-else :id="customerId" /> <CustomerDescriptorProxy v-else :id="customerId" />
</component> </component>
</QTr> </QTr>