Solucion a comentarios 17
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
parent
d06271b91d
commit
3bcd4984f5
|
@ -66,6 +66,10 @@ body.body--dark {
|
|||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.card-width {
|
||||
width: 800px;
|
||||
}
|
||||
|
||||
.vn-card-list {
|
||||
width: 100%;
|
||||
max-width: 60em;
|
||||
|
|
|
@ -129,7 +129,7 @@ const updateData = () => {
|
|||
<QSeparator class="q-mx-lg" vertical />
|
||||
|
||||
<div class="flex">
|
||||
<div class="flex items-center">
|
||||
<div class="flex items-center" v-if="item?.insurances.length">
|
||||
<div class="flex q-mr-xl">
|
||||
<div class="q-mr-sm color-vn-label">
|
||||
{{ t('Credit') }}:
|
||||
|
|
|
@ -1,17 +1,22 @@
|
|||
<script setup>
|
||||
import { reactive, ref } from 'vue';
|
||||
import { computed, reactive, ref } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useRoute } from 'vue-router';
|
||||
|
||||
import { QBtn } from 'quasar';
|
||||
|
||||
import { toCurrency, toDateHourMin } from 'src/filters';
|
||||
|
||||
import FetchData from 'components/FetchData.vue';
|
||||
import FormModel from 'components/FormModel.vue';
|
||||
import VnRow from 'components/ui/VnRow.vue';
|
||||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const route = useRoute();
|
||||
|
||||
const informationOptions = ref([]);
|
||||
const rows = ref([]);
|
||||
|
||||
const filter = {
|
||||
include: [
|
||||
|
@ -32,12 +37,64 @@ const initialData = reactive({
|
|||
rating: null,
|
||||
recommendedCredit: null,
|
||||
});
|
||||
|
||||
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',
|
||||
field: 'created',
|
||||
format: (value) => toDateHourMin(value),
|
||||
label: t('Since'),
|
||||
name: 'since',
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
field: (row) => row.worker.user.nickname,
|
||||
label: t('Employee'),
|
||||
name: 'employee',
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
field: 'rating',
|
||||
label: t('Rating'),
|
||||
name: 'rating',
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
field: 'recommendedCredit',
|
||||
format: (value) => toCurrency(value),
|
||||
label: t('Recommended credit'),
|
||||
name: 'recommendedCredit',
|
||||
},
|
||||
]);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<FetchData
|
||||
:filter="filter"
|
||||
@on-fetch="(data) => (informationOptions = data)"
|
||||
@on-fetch="(data) => (rows = data)"
|
||||
auto-load
|
||||
url="ClientInformas"
|
||||
/>
|
||||
|
@ -68,10 +125,41 @@ const initialData = reactive({
|
|||
</VnRow>
|
||||
</template>
|
||||
</FormModel>
|
||||
|
||||
<QTable
|
||||
:columns="columns"
|
||||
:pagination="{ rowsPerPage: 0 }"
|
||||
:rows="rows"
|
||||
hide-bottom
|
||||
row-key="id"
|
||||
v-model:selected="selected"
|
||||
class="q-pa-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>
|
||||
</QTd>
|
||||
</template>
|
||||
</QTable>
|
||||
</template>
|
||||
|
||||
<i18n>
|
||||
es:
|
||||
Rating: Clasificación
|
||||
Recommended credit: Crédito recomendado
|
||||
Since: Desde
|
||||
Employee: Empleado
|
||||
</i18n>
|
||||
|
|
|
@ -83,7 +83,7 @@ function handleLocation(data, location) {
|
|||
:label="t('Sage transaction type')"
|
||||
:options="typesTransactions"
|
||||
hide-selected
|
||||
option-label="vat"
|
||||
option-label="transaction"
|
||||
option-value="id"
|
||||
v-model="data.sageTransactionTypeFk"
|
||||
>
|
||||
|
|
|
@ -287,3 +287,8 @@ const creditWarning = computed(() => {
|
|||
</template>
|
||||
</CardSummary>
|
||||
</template>
|
||||
|
||||
<i18n>
|
||||
es:
|
||||
Latest tickets: Últimos tickets
|
||||
</i18n>
|
||||
|
|
|
@ -135,42 +135,47 @@ const onSubmit = async () => {
|
|||
</QBtnGroup>
|
||||
</Teleport>
|
||||
|
||||
<QCard class="q-pa-lg">
|
||||
<QCardSection>
|
||||
<QForm>
|
||||
<VnRow class="row q-gutter-md q-mb-md">
|
||||
<div class="col">
|
||||
<QCheckbox :label="t('Enable web access')" v-model="active" />
|
||||
</div>
|
||||
</VnRow>
|
||||
<div class="full-width flex justify-center">
|
||||
<QCard class="card-width q-pa-lg">
|
||||
<QCardSection>
|
||||
<QForm>
|
||||
<VnRow class="row q-gutter-md q-mb-md">
|
||||
<div class="col">
|
||||
<QCheckbox :label="t('Enable web access')" v-model="active" />
|
||||
</div>
|
||||
</VnRow>
|
||||
|
||||
<VnRow class="row q-gutter-md q-mb-md">
|
||||
<div class="col">
|
||||
<VnInput :label="t('User')" clearable v-model="name" />
|
||||
</div>
|
||||
<div class="col">
|
||||
<VnInput
|
||||
:label="t('Recovery email')"
|
||||
:rules="validate('client.email')"
|
||||
clearable
|
||||
type="email"
|
||||
v-model="email"
|
||||
>
|
||||
<template #append>
|
||||
<QIcon name="info" class="cursor-pointer">
|
||||
<QTooltip>{{
|
||||
t(
|
||||
'This email is used for user to regain access their account'
|
||||
)
|
||||
}}</QTooltip>
|
||||
</QIcon>
|
||||
</template>
|
||||
</VnInput>
|
||||
</div>
|
||||
</VnRow>
|
||||
</QForm>
|
||||
</QCardSection>
|
||||
</QCard>
|
||||
<VnRow class="row q-gutter-md q-mb-md">
|
||||
<div class="col">
|
||||
<VnInput :label="t('User')" clearable v-model="name" />
|
||||
</div>
|
||||
</VnRow>
|
||||
|
||||
<VnRow class="row q-gutter-md q-mb-md">
|
||||
<div class="col">
|
||||
<VnInput
|
||||
:label="t('Recovery email')"
|
||||
:rules="validate('client.email')"
|
||||
clearable
|
||||
type="email"
|
||||
v-model="email"
|
||||
>
|
||||
<template #append>
|
||||
<QIcon name="info" class="cursor-pointer">
|
||||
<QTooltip>{{
|
||||
t(
|
||||
'This email is used for user to regain access their account'
|
||||
)
|
||||
}}</QTooltip>
|
||||
</QIcon>
|
||||
</template>
|
||||
</VnInput>
|
||||
</div>
|
||||
</VnRow>
|
||||
</QForm>
|
||||
</QCardSection>
|
||||
</QCard>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<i18n>
|
||||
|
|
|
@ -69,7 +69,7 @@ const columns = computed(() => [
|
|||
url="CreditInsurances"
|
||||
/>
|
||||
|
||||
<QPage class="column items-center q-pa-md">
|
||||
<QPage class="column items-center q-pa-md" v-if="rows.length">
|
||||
<QTable
|
||||
:columns="columns"
|
||||
:pagination="{ rowsPerPage: 12 }"
|
||||
|
@ -93,6 +93,10 @@ const columns = computed(() => [
|
|||
</template>
|
||||
</QTable>
|
||||
</QPage>
|
||||
|
||||
<h5 class="flex justify-center color-vn-label" v-else>
|
||||
{{ t('globals.noResults') }}
|
||||
</h5>
|
||||
</template>
|
||||
|
||||
<i18n>
|
||||
|
|
|
@ -366,17 +366,6 @@ export default {
|
|||
],
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'credit-contracts',
|
||||
name: 'CustomerCreditContracts',
|
||||
meta: {
|
||||
title: 'creditContracts',
|
||||
},
|
||||
component: () =>
|
||||
import(
|
||||
'src/pages/Customer/Card/CustomerCreditContracts.vue'
|
||||
),
|
||||
},
|
||||
{
|
||||
path: 'credit-contracts',
|
||||
name: 'CreditContractsCard',
|
||||
|
@ -439,7 +428,7 @@ export default {
|
|||
{
|
||||
name: 'CustomerConsumption',
|
||||
title: 'consumption',
|
||||
icon: 'vn:lines',
|
||||
icon: 'show_chart',
|
||||
},
|
||||
{
|
||||
name: 'CustomerMandates',
|
||||
|
|
Loading…
Reference in New Issue