Correccion de comentarios3
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details

This commit is contained in:
carlosfonseca 2024-02-12 13:54:17 -05:00
parent 11eb597fa3
commit 3cf3687b84
14 changed files with 171 additions and 60 deletions

View File

@ -225,11 +225,13 @@ export default {
socialName: 'Fiscal name',
businessType: 'Business type',
contact: 'Contact',
youCanSaveMultipleEmails: 'You can save multiple emails',
email: 'Email',
phone: 'Phone',
mobile: 'Mobile',
salesPerson: 'Sales person',
contactChannel: 'Contact channel',
previousClient: 'Previous client',
},
extendedList: {
tableVisibleColumns: {

View File

@ -224,11 +224,14 @@ export default {
socialName: 'Nombre fiscal',
businessType: 'Tipo de negocio',
contact: 'Contacto',
youCanSaveMultipleEmails:
'Puedeguardar varios correos electrónicos encadenandolos mediante comas sin espacios, ejemplo: user@dominio.com,user2@dominio.com siendo el primer correo electrónico el principal',
email: 'Email',
phone: 'Teléfono',
mobile: 'Móvil',
salesPerson: 'Comercial',
contactChannel: 'Canal de contacto',
previousClient: 'Cliente anterior',
},
extendedList: {
tableVisibleColumns: {

View File

@ -3,15 +3,17 @@ import { computed, onBeforeMount, ref } from 'vue';
import { useI18n } from 'vue-i18n';
import { useRoute } from 'vue-router';
import { date, QCheckbox, QBtn, useQuasar } from 'quasar';
import axios from 'axios';
import { QCheckbox, QBtn, useQuasar, QField, QPopupEdit } from 'quasar';
import { toCurrency } from 'src/filters';
import { toCurrency, toDate, toDateHour } from 'src/filters';
import { useState } from 'src/composables/useState';
import { useStateStore } from 'stores/useStateStore';
import { useValidator } from 'src/composables/useValidator';
import FetchData from 'components/FetchData.vue';
import VnSelectFilter from 'src/components/common/VnSelectFilter.vue';
import VnInput from 'src/components/common/VnInput.vue';
import CustomerNewPayment from 'src/pages/Customer/components/CustomerNewPayment.vue';
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
@ -58,7 +60,8 @@ const tableColumnComponents = {
event: () => {},
},
description: {
component: 'span',
component: QField,
attrs: () => ({ readonly: true, dense: true }),
props: () => {},
event: () => {},
},
@ -96,14 +99,14 @@ const columns = computed(() => [
{
align: 'left',
field: 'payed',
format: (value) => date.formatDate(value, 'DD/MM/YYYY'),
format: (value) => toDate(value),
label: t('Date'),
name: 'payed',
},
{
align: 'left',
field: 'created',
format: (value) => date.formatDate(value, 'DD/MM/YYYY hh:mm'),
format: (value) => toDateHour(value),
label: t('Creation date'),
name: 'created',
},
@ -182,6 +185,15 @@ const updateCompanyId = (id) => {
}
getData();
};
const saveFieldValue = async (event) => {
try {
const payload = { description: event.value };
await axios.patch(`Receipts/${event.key}`, payload);
} catch (err) {
return err;
}
};
</script>
<template>
@ -223,9 +235,35 @@ const updateCompanyId = (id) => {
v-bind="tableColumnComponents[props.col.name].props(props)"
@click="tableColumnComponents[props.col.name].event(props)"
>
<template v-if="props.col.name !== 'isConciliate'">
<template
v-if="
props.col.name !== 'isConciliate' &&
props.col.name !== 'description'
"
>
{{ props.value }}
</template>
<template v-if="props.col.name === 'description'" #control>
<div class="self-center full-width no-outline" tabindex="0">
{{ props.value }}
</div>
<QPopupEdit
:key="props.col.name"
label-cancel="Close"
label-set="Save"
v-model="props.field"
>
<VnInput
@keyup.enter="saveFieldValue(props)"
autofocus
clearable
dense
v-model="props.row.description"
/>
</QPopupEdit>
</template>
<WorkerDescriptorProxy
:id="props.row.workerFk"
v-if="props.col.name === 'userName'"
@ -275,6 +313,13 @@ const updateCompanyId = (id) => {
</QPageSticky>
</template>
<style lang="scss" scoped>
.col-content {
border-radius: 4px;
padding: 6px;
}
</style>
<i18n>
es:
Company: Empresa

View File

@ -60,8 +60,14 @@ const filterOptions = {
@on-fetch="(data) => (businessTypes = data)"
auto-load
/>
<fetch-data
:filter="filter"
@on-fetch="(data) => (clients = data)"
auto-load
url="Clients"
/>
<FormModel :url="`Clients/${route.params.id}`" model="customer" auto-load>
<FormModel :url="`Clients/${route.params.id}`" auto-load model="customer">
<template #form="{ data, validate, filter }">
<VnRow class="row q-gutter-md q-mb-md">
<div class="col">
@ -75,15 +81,15 @@ const filterOptions = {
</div>
<div class="col">
<QSelect
v-model="data.businessTypeFk"
:options="businessTypes"
option-value="code"
option-label="description"
emit-value
:label="t('customer.basicData.businessType')"
map-options
:rules="validate('client.businessTypeFk')"
:input-debounce="0"
:label="t('customer.basicData.businessType')"
:options="businessTypes"
:rules="validate('client.businessTypeFk')"
emit-value
map-options
option-label="description"
option-value="code"
v-model="data.businessTypeFk"
/>
</div>
</VnRow>
@ -103,7 +109,15 @@ const filterOptions = {
clearable
type="email"
v-model="data.email"
/>
>
<template #append>
<QIcon name="info" class="cursor-info">
<QTooltip>{{
t('customer.basicData.youCanSaveMultipleEmails')
}}</QTooltip>
</QIcon>
</template>
</VnInput>
</div>
</VnRow>
<VnRow class="row q-gutter-md q-mb-md">
@ -127,24 +141,24 @@ const filterOptions = {
<VnRow class="row q-gutter-md q-mb-md">
<div class="col">
<QSelect
v-model="data.salesPersonFk"
:options="workers"
option-value="id"
option-label="name"
emit-value
:label="t('customer.basicData.salesPerson')"
map-options
use-input
@filter="(value, update) => filter(value, update, filterOptions)"
:rules="validate('client.salesPersonFk')"
:input-debounce="0"
:label="t('customer.basicData.salesPerson')"
:options="workers"
:rules="validate('client.salesPersonFk')"
@filter="(value, update) => filter(value, update, filterOptions)"
emit-value
map-options
option-label="name"
option-value="id"
use-input
v-model="data.salesPersonFk"
>
<template #prepend>
<QAvatar color="orange">
<QImg
v-if="data.salesPersonFk"
:src="`/api/Images/user/160x160/${data.salesPersonFk}/download?access_token=${token}`"
spinner-color="white"
v-if="data.salesPersonFk"
/>
</QAvatar>
</template>
@ -152,18 +166,48 @@ const filterOptions = {
</div>
<div class="col">
<QSelect
v-model="data.contactChannelFk"
:options="contactChannels"
option-value="id"
option-label="name"
emit-value
:label="t('customer.basicData.contactChannel')"
map-options
:rules="validate('client.contactChannelFk')"
:input-debounce="0"
:label="t('customer.basicData.contactChannel')"
:options="contactChannels"
:rules="validate('client.contactChannelFk')"
emit-value
map-options
option-label="name"
option-value="id"
v-model="data.contactChannelFk"
/>
</div>
</VnRow>
<VnRow class="row q-gutter-md q-mb-md">
<div class="col">
<QSelect
:input-debounce="0"
:label="t('customer.basicData.previousClient')"
:options="clients"
:rules="validate('client.transferorFk')"
emit-value
map-options
option-label="name"
option-value="id"
v-model="data.transferorFk"
>
<template #append>
<QIcon name="info" class="cursor-pointer">
<QTooltip>{{
t(
'In case of a company succession, specify the grantor company'
)
}}</QTooltip>
</QIcon>
</template>
</QSelect>
</div>
</VnRow>
</template>
</FormModel>
</template>
<i18n>
es:
In case of a company succession, specify the grantor company: En el caso de que haya habido una sucesión de empresa, indicar la empresa cedente
</i18n>

View File

@ -3,9 +3,9 @@ import { computed, ref } from 'vue';
import { useI18n } from 'vue-i18n';
import { useRoute, useRouter } from 'vue-router';
import { date, QBtn } from 'quasar';
import { QBtn } from 'quasar';
import { toCurrency } from 'src/filters';
import { toCurrency, toDateHour } from 'src/filters';
import FetchData from 'components/FetchData.vue';
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
@ -55,7 +55,7 @@ const columns = computed(() => [
field: 'created',
label: t('Since'),
name: 'created',
format: (value) => date.formatDate(value, 'DD/MM/YYYY hh:mm'),
format: (value) => toDateHour(value),
},
{
align: 'left',

View File

@ -2,10 +2,13 @@
import { ref, computed } from 'vue';
import { useRoute } from 'vue-router';
import { useI18n } from 'vue-i18n';
import { toCurrency } from 'src/filters';
import useCardDescription from 'src/composables/useCardDescription';
import CardDescriptor from 'components/ui/CardDescriptor.vue';
import VnLv from 'src/components/ui/VnLv.vue';
import useCardDescription from 'src/composables/useCardDescription';
import VnUserLink from 'src/components/ui/VnUserLink.vue';
const $props = defineProps({
@ -95,7 +98,10 @@ const setData = (entity) => (data.value = useCardDescription(entity.name, entity
</QCardActions>
</template>
<template #actions="{ entity }">
<QCardActions>
<div class="flex justify-center q-mb-md">
<QIcon color="primary" name="vn:noweb" size="sm" />
</div>
<QCardActions class="flex justify-center">
<QBtn
:to="{
name: 'TicketList',
@ -118,6 +124,20 @@ const setData = (entity) => (data.value = useCardDescription(entity.name, entity
>
<QTooltip>{{ t('invoiceOutList') }}</QTooltip>
</QBtn>
<QBtn
:to="{
name: 'OrderCreate',
params: { id: entity.id },
}"
size="md"
icon="vn:basketadd"
color="primary"
>
<QTooltip>{{ t('invoiceOutList') }}</QTooltip>
</QBtn>
<QBtn size="md" icon="vn:Person" color="primary">
<QTooltip>{{ t('invoiceOutList') }}</QTooltip>
</QBtn>
</QCardActions>
</template>
</CardDescriptor>

View File

@ -3,8 +3,10 @@ import { computed, ref } from 'vue';
import { useI18n } from 'vue-i18n';
import { useRoute, useRouter } from 'vue-router';
import { date, QBadge, QBtn, QCheckbox } from 'quasar';
import { QBadge, QBtn, QCheckbox } from 'quasar';
import { downloadFile } from 'src/composables/downloadFile';
import { toDateHour } from 'src/filters';
import FetchData from 'components/FetchData.vue';
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
@ -161,7 +163,7 @@ const columns = computed(() => [
field: (value) => value.dms.created,
label: t('Created'),
name: 'created',
format: (value) => date.formatDate(value, 'DD/MM/YYYY hh:mm'),
format: (value) => toDateHour(value),
},
{
align: 'right',

View File

@ -5,7 +5,7 @@ import { useRoute, useRouter } from 'vue-router';
import { date, QBtn } from 'quasar';
import { toCurrency } from 'src/filters';
import { toCurrency, toDateHour } from 'src/filters';
import FetchData from 'components/FetchData.vue';
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
@ -73,7 +73,7 @@ const columns = computed(() => [
field: 'shipped',
label: t('Date'),
name: 'date',
format: (value) => date.formatDate(value, 'DD/MM/YYYY hh:mm'),
format: (value) => toDateHour(value),
},
{
align: 'left',

View File

@ -3,9 +3,7 @@ import { ref, computed } from 'vue';
import { useI18n } from 'vue-i18n';
import { useRoute, useRouter } from 'vue-router';
import { date, QBtn } from 'quasar';
import { toCurrency } from 'src/filters';
import { toCurrency, toDate } from 'src/filters';
import FetchData from 'components/FetchData.vue';
@ -49,14 +47,14 @@ const columns = computed(() => [
field: 'started',
label: t('Since'),
name: 'since',
format: (value) => date.formatDate(value, 'DD/MM/YYYY'),
format: (value) => toDate(value),
},
{
align: 'left',
field: 'finished',
label: t('To'),
name: 'to',
format: (value) => date.formatDate(value, 'DD/MM/YYYY'),
format: (value) => toDate(value),
},
{
align: 'left',

View File

@ -3,10 +3,11 @@ import { ref, computed } from 'vue';
import { useI18n } from 'vue-i18n';
import { useRoute, useRouter } from 'vue-router';
import { date, QBtn } from 'quasar';
import { QBtn } from 'quasar';
import FetchData from 'components/FetchData.vue';
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
import { toDateHour } from 'src/filters';
const { t } = useI18n();
const route = useRoute();
@ -54,7 +55,7 @@ const columns = computed(() => [
field: 'created',
label: t('Sent'),
name: 'sent',
format: (value) => date.formatDate(value, 'DD/MM/YYYY hh:mm'),
format: (value) => toDateHour(value),
},
{
align: 'left',

View File

@ -3,9 +3,7 @@ import { computed, ref } from 'vue';
import { useI18n } from 'vue-i18n';
import { useRoute } from 'vue-router';
import { date } from 'quasar';
import { toCurrency } from 'src/filters';
import { toCurrency, toDateHour } from 'src/filters';
import FetchData from 'components/FetchData.vue';
@ -43,7 +41,7 @@ const columns = computed(() => [
{
align: 'left',
field: 'created',
format: (value) => date.formatDate(value, 'DD/MM/YYYY'),
format: (value) => toDateHour(value),
label: t('Created'),
name: 'created',
},

View File

@ -182,7 +182,7 @@ const inputFileRef = ref();
>
<template #append>
<QBtn
icon="attach_file_add"
icon="vn:attach"
flat
round
padding="xs"

View File

@ -160,7 +160,7 @@ const inputFileRef = ref();
>
<template #append>
<QBtn
icon="attach_file_add"
icon="vn:attach"
flat
round
padding="xs"

View File

@ -136,9 +136,7 @@ const onDataSaved = async () => {
<QIcon name="close" size="sm" />
</span>
<h5 class="flex justify-center q-mt-xs">
{{ t('New payment') }}
</h5>
<h5 class="q-mt-none">{{ t('New payment') }}</h5>
<VnRow class="row q-gutter-md q-mb-md">
<div class="col">