0
0
Fork 0

fix: customer credit opinion

This commit is contained in:
Alex Moreno 2024-08-14 10:11:52 +02:00
parent c31aa3258f
commit bd83a959f7
1 changed files with 18 additions and 32 deletions

View File

@ -16,7 +16,7 @@ import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.v
const { t } = useI18n();
const route = useRoute();
const clientInformasRef = ref(null);
const clientInformasRef = ref();
const rows = ref([]);
const filter = {
@ -71,45 +71,35 @@ watch(
clientInformasRef.value?.fetch();
}
);
const onDataSaved = () => {
clientInformasRef.value?.fetch();
};
</script>
<template>
<FetchData
ref="clientInformasRef"
url="ClientInformas"
: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`"
@on-data-saved="onDataSaved"
@on-data-saved="clientInformasRef.fetch()"
>
<template #form="{ data }">
<VnRow>
<div class="col">
<VnInput
:label="t('Rating')"
clearable
type="number"
v-model.number="data.rating"
/>
</div>
<div class="col">
<VnInput
:label="t('Recommended credit')"
clearable
type="number"
v-model.number="data.recommendedCredit"
/>
</div>
<VnInput
:label="t('Rating')"
clearable
type="number"
v-model.number="data.rating"
/>
<VnInput
:label="t('Recommended credit')"
clearable
type="number"
v-model.number="data.recommendedCredit"
/>
</VnRow>
</template>
</FormModel>
@ -125,17 +115,13 @@ const onDataSaved = () => {
class="card-width q-px-lg"
>
<template #body-cell-employee="{ row }">
<QTd auto-width @click.stop>
<QBtn color="blue" flat no-caps>{{ row.worker.user.nickname }}</QBtn>
<QTd @click.stop>
<span class="link">{{ row.worker.user.nickname }}</span>
<WorkerDescriptorProxy :id="row.clientFk" />
</QTd>
</template>
</QTable>
</div>
<h5 class="flex justify-center color-vn-label" v-else>
{{ t('globals.noResults') }}
</h5>
</template>
<i18n>