forked from verdnatura/salix-front
fix: customer credit opinion
This commit is contained in:
parent
c31aa3258f
commit
bd83a959f7
|
@ -16,7 +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 clientInformasRef = ref();
|
||||||
const rows = ref([]);
|
const rows = ref([]);
|
||||||
|
|
||||||
const filter = {
|
const filter = {
|
||||||
|
@ -71,45 +71,35 @@ watch(
|
||||||
clientInformasRef.value?.fetch();
|
clientInformasRef.value?.fetch();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
const onDataSaved = () => {
|
|
||||||
clientInformasRef.value?.fetch();
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<FetchData
|
<FetchData
|
||||||
|
ref="clientInformasRef"
|
||||||
|
url="ClientInformas"
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
@on-fetch="(data) => (rows = data)"
|
@on-fetch="(data) => (rows = data)"
|
||||||
auto-load
|
auto-load
|
||||||
ref="clientInformasRef"
|
|
||||||
url="ClientInformas"
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<FormModel
|
<FormModel
|
||||||
:form-initial-data="{}"
|
:form-initial-data="{}"
|
||||||
:observe-form-changes="false"
|
|
||||||
:url-create="`Clients/${route.params.id}/setRating`"
|
:url-create="`Clients/${route.params.id}/setRating`"
|
||||||
@on-data-saved="onDataSaved"
|
@on-data-saved="clientInformasRef.fetch()"
|
||||||
>
|
>
|
||||||
<template #form="{ data }">
|
<template #form="{ data }">
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<div class="col">
|
<VnInput
|
||||||
<VnInput
|
:label="t('Rating')"
|
||||||
:label="t('Rating')"
|
clearable
|
||||||
clearable
|
type="number"
|
||||||
type="number"
|
v-model.number="data.rating"
|
||||||
v-model.number="data.rating"
|
/>
|
||||||
/>
|
<VnInput
|
||||||
</div>
|
:label="t('Recommended credit')"
|
||||||
<div class="col">
|
clearable
|
||||||
<VnInput
|
type="number"
|
||||||
:label="t('Recommended credit')"
|
v-model.number="data.recommendedCredit"
|
||||||
clearable
|
/>
|
||||||
type="number"
|
|
||||||
v-model.number="data.recommendedCredit"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</VnRow>
|
</VnRow>
|
||||||
</template>
|
</template>
|
||||||
</FormModel>
|
</FormModel>
|
||||||
|
@ -125,17 +115,13 @@ const onDataSaved = () => {
|
||||||
class="card-width q-px-lg"
|
class="card-width q-px-lg"
|
||||||
>
|
>
|
||||||
<template #body-cell-employee="{ row }">
|
<template #body-cell-employee="{ row }">
|
||||||
<QTd auto-width @click.stop>
|
<QTd @click.stop>
|
||||||
<QBtn color="blue" flat no-caps>{{ row.worker.user.nickname }}</QBtn>
|
<span class="link">{{ row.worker.user.nickname }}</span>
|
||||||
<WorkerDescriptorProxy :id="row.clientFk" />
|
<WorkerDescriptorProxy :id="row.clientFk" />
|
||||||
</QTd>
|
</QTd>
|
||||||
</template>
|
</template>
|
||||||
</QTable>
|
</QTable>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h5 class="flex justify-center color-vn-label" v-else>
|
|
||||||
{{ t('globals.noResults') }}
|
|
||||||
</h5>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<i18n>
|
<i18n>
|
||||||
|
|
Loading…
Reference in New Issue