forked from verdnatura/salix-front
Correcciones generales customers 37
This commit is contained in:
parent
a3097a9223
commit
4a2a855f58
|
@ -252,8 +252,9 @@ const sendEmailAction = () => {
|
||||||
@click.stop="showDialog = true"
|
@click.stop="showDialog = true"
|
||||||
class="q-ml-md"
|
class="q-ml-md"
|
||||||
color="primary"
|
color="primary"
|
||||||
name="add"
|
name="outgoing_mail"
|
||||||
size="sm"
|
size="sm"
|
||||||
|
style="font-variation-settings: 'FILL' 1"
|
||||||
v-if="row.isCompensation"
|
v-if="row.isCompensation"
|
||||||
>
|
>
|
||||||
<QTooltip>
|
<QTooltip>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { computed, reactive, ref } from 'vue';
|
import { computed, ref, watch } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@ import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.v
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
|
||||||
|
const clientInformasRef = ref(null);
|
||||||
const rows = ref([]);
|
const rows = ref([]);
|
||||||
|
|
||||||
const filter = {
|
const filter = {
|
||||||
|
@ -33,29 +34,6 @@ const filter = {
|
||||||
limit: 20,
|
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(() => [
|
const columns = computed(() => [
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
@ -71,19 +49,28 @@ const columns = computed(() => [
|
||||||
name: 'employee',
|
name: 'employee',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'right',
|
||||||
field: 'rating',
|
field: 'rating',
|
||||||
label: t('Rating'),
|
label: t('Rating'),
|
||||||
name: 'rating',
|
name: 'rating',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'right',
|
||||||
field: 'recommendedCredit',
|
field: 'recommendedCredit',
|
||||||
format: (value) => toCurrency(value),
|
format: (value) => toCurrency(value),
|
||||||
label: t('Recommended credit'),
|
label: t('Recommended credit'),
|
||||||
name: 'recommendedCredit',
|
name: 'recommendedCredit',
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => route.params.id,
|
||||||
|
(newValue) => {
|
||||||
|
if (!newValue) return;
|
||||||
|
filter.where.clientFk = newValue;
|
||||||
|
clientInformasRef.value?.fetch();
|
||||||
|
}
|
||||||
|
);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -91,10 +78,12 @@ const columns = computed(() => [
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
@on-fetch="(data) => (rows = data)"
|
@on-fetch="(data) => (rows = data)"
|
||||||
auto-load
|
auto-load
|
||||||
|
ref="clientInformasRef"
|
||||||
url="ClientInformas"
|
url="ClientInformas"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<FormModel
|
<FormModel
|
||||||
|
:form-initial-data="{}"
|
||||||
:observe-form-changes="false"
|
:observe-form-changes="false"
|
||||||
:url-create="`Clients/${route.params.id}/setRating`"
|
:url-create="`Clients/${route.params.id}/setRating`"
|
||||||
>
|
>
|
||||||
|
@ -128,24 +117,12 @@ const columns = computed(() => [
|
||||||
hide-bottom
|
hide-bottom
|
||||||
row-key="id"
|
row-key="id"
|
||||||
v-model:selected="selected"
|
v-model:selected="selected"
|
||||||
class="card-width q-pa-lg"
|
class="card-width q-px-lg"
|
||||||
>
|
>
|
||||||
<template #body-cell="props">
|
<template #body-cell-employee="{ row }">
|
||||||
<QTd :props="props">
|
<QTd auto-width @click.stop>
|
||||||
<QTr :props="props" class="cursor-pointer">
|
<QBtn color="blue" flat no-caps>{{ row.worker.user.nickname }}</QBtn>
|
||||||
<component
|
<WorkerDescriptorProxy :id="row.clientFk" />
|
||||||
: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>
|
|
||||||
</QTd>
|
</QTd>
|
||||||
</template>
|
</template>
|
||||||
</QTable>
|
</QTable>
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
<template>Worker PBX</template>
|
|
@ -0,0 +1 @@
|
||||||
|
<template>Worker PDA</template>
|
Loading…
Reference in New Issue