0
0
Fork 0

Correcciones generales customers 37

This commit is contained in:
carlosfonseca 2024-03-14 11:54:22 -05:00
parent a3097a9223
commit 4a2a855f58
4 changed files with 24 additions and 44 deletions

View File

@ -252,8 +252,9 @@ const sendEmailAction = () => {
@click.stop="showDialog = true"
class="q-ml-md"
color="primary"
name="add"
name="outgoing_mail"
size="sm"
style="font-variation-settings: 'FILL' 1"
v-if="row.isCompensation"
>
<QTooltip>

View File

@ -1,5 +1,5 @@
<script setup>
import { computed, reactive, ref } from 'vue';
import { computed, ref, watch } from 'vue';
import { useI18n } from 'vue-i18n';
import { useRoute } from 'vue-router';
@ -16,6 +16,7 @@ import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.v
const { t } = useI18n();
const route = useRoute();
const clientInformasRef = ref(null);
const rows = ref([]);
const filter = {
@ -33,29 +34,6 @@ const filter = {
limit: 20,
};
const tableColumnComponents = {
since: {
component: 'span',
props: () => {},
event: () => {},
},
employee: {
component: QBtn,
props: () => ({ flat: true, color: 'blue' }),
event: () => {},
},
rating: {
component: 'span',
props: () => {},
event: () => {},
},
recommendedCredit: {
component: 'span',
props: () => {},
event: () => {},
},
};
const columns = computed(() => [
{
align: 'left',
@ -71,19 +49,28 @@ const columns = computed(() => [
name: 'employee',
},
{
align: 'left',
align: 'right',
field: 'rating',
label: t('Rating'),
name: 'rating',
},
{
align: 'left',
align: 'right',
field: 'recommendedCredit',
format: (value) => toCurrency(value),
label: t('Recommended credit'),
name: 'recommendedCredit',
},
]);
watch(
() => route.params.id,
(newValue) => {
if (!newValue) return;
filter.where.clientFk = newValue;
clientInformasRef.value?.fetch();
}
);
</script>
<template>
@ -91,10 +78,12 @@ const columns = computed(() => [
:filter="filter"
@on-fetch="(data) => (rows = data)"
auto-load
ref="clientInformasRef"
url="ClientInformas"
/>
<FormModel
:form-initial-data="{}"
:observe-form-changes="false"
:url-create="`Clients/${route.params.id}/setRating`"
>
@ -128,24 +117,12 @@ const columns = computed(() => [
hide-bottom
row-key="id"
v-model:selected="selected"
class="card-width q-pa-lg"
class="card-width q-px-lg"
>
<template #body-cell="props">
<QTd :props="props">
<QTr :props="props" class="cursor-pointer">
<component
:is="tableColumnComponents[props.col.name].component"
class="col-content"
v-bind="tableColumnComponents[props.col.name].props(props)"
@click="tableColumnComponents[props.col.name].event(props)"
>
{{ props.value }}
<WorkerDescriptorProxy
:id="props.row.workerFk"
v-if="props.col.name === 'employee'"
/>
</component>
</QTr>
<template #body-cell-employee="{ row }">
<QTd auto-width @click.stop>
<QBtn color="blue" flat no-caps>{{ row.worker.user.nickname }}</QBtn>
<WorkerDescriptorProxy :id="row.clientFk" />
</QTd>
</template>
</QTable>

View File

@ -0,0 +1 @@
<template>Worker PBX</template>

View File

@ -0,0 +1 @@
<template>Worker PDA</template>