Solucion a comentarios 14
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
This commit is contained in:
parent
bb10714824
commit
86199d8197
|
@ -1,6 +1,6 @@
|
|||
<script setup>
|
||||
import VnAvatar from 'src/components/ui/VnAvatar.vue';
|
||||
import { toDateHour } from 'src/filters';
|
||||
import { toDateHourMinSec } from 'src/filters';
|
||||
import { ref } from 'vue';
|
||||
import axios from 'axios';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
@ -51,7 +51,7 @@ async function insert() {
|
|||
/>
|
||||
|
||||
<slot name="actions">
|
||||
{{ toDateHour(note.created) }}
|
||||
{{ toDateHourMinSec(note.created) }}
|
||||
</slot>
|
||||
</QItem>
|
||||
</QCardSection>
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
import toLowerCase from './toLowerCase';
|
||||
import toDate from './toDate';
|
||||
import toDateString from './toDateString';
|
||||
import toDateHour from './toDateHour';
|
||||
import toDateHourMin from './toDateHourMin';
|
||||
import toDateHourMinSec from './toDateHourMinSec';
|
||||
import toRelativeDate from './toRelativeDate';
|
||||
import toCurrency from './toCurrency';
|
||||
import toPercentage from './toPercentage';
|
||||
|
@ -16,7 +17,8 @@ export {
|
|||
toDate,
|
||||
toHour,
|
||||
toDateString,
|
||||
toDateHour,
|
||||
toDateHourMin,
|
||||
toDateHourMinSec,
|
||||
toRelativeDate,
|
||||
toCurrency,
|
||||
toPercentage,
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
export default function toDateHourMin(date) {
|
||||
const dateHour = new Date(date).toLocaleDateString('es-ES', {
|
||||
timeZone: 'Europe/Madrid',
|
||||
year: 'numeric',
|
||||
month: '2-digit',
|
||||
day: '2-digit',
|
||||
hour: '2-digit',
|
||||
minute: '2-digit',
|
||||
});
|
||||
return dateHour;
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
export default function toDateHour(date) {
|
||||
export default function toDateHourMinSec(date) {
|
||||
const dateHour = new Date(date).toLocaleDateString('es-ES', {
|
||||
timeZone: 'Europe/Madrid',
|
||||
year: 'numeric',
|
|
@ -10,6 +10,7 @@ const { t } = useI18n();
|
|||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
|
||||
const client = ref(null);
|
||||
const provincesLocation = ref([]);
|
||||
|
||||
const addressFilter = {
|
||||
|
@ -51,6 +52,10 @@ const setProvince = (provinceFk) => {
|
|||
return result[0]?.name || '';
|
||||
};
|
||||
|
||||
const isDefaultAddress = (address) => {
|
||||
return client?.value?.defaultAddressFk === address.id ? 1 : 0;
|
||||
};
|
||||
|
||||
const toCustomerAddressCreate = () => {
|
||||
router.push({ name: 'CustomerAddressCreate' });
|
||||
};
|
||||
|
@ -67,6 +72,11 @@ const toCustomerAddressEdit = (addressId) => {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<FetchData
|
||||
@on-fetch="(data) => (client = data)"
|
||||
auto-load
|
||||
:url="`Clients/${route.params.id}`"
|
||||
/>
|
||||
<FetchData
|
||||
@on-fetch="(data) => (provincesLocation = data)"
|
||||
auto-load
|
||||
|
@ -88,11 +98,21 @@ const toCustomerAddressEdit = (addressId) => {
|
|||
:class="{
|
||||
'address-card': true,
|
||||
'q-mb-md': index < rows.length - 1,
|
||||
'item-disabled': !item.isActive,
|
||||
}"
|
||||
@click="toCustomerAddressEdit(item.id)"
|
||||
>
|
||||
<div class="q-ml-xs q-mr-md flex items-center">
|
||||
<QIcon name="star" size="md" color="primary" />
|
||||
<QIcon
|
||||
:style="{
|
||||
'font-variation-settings': `'FILL' ${isDefaultAddress(
|
||||
item
|
||||
)}`,
|
||||
}"
|
||||
color="primary"
|
||||
name="star"
|
||||
size="md"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<div class="text-weight-bold q-mb-sm">
|
||||
|
@ -161,6 +181,10 @@ const toCustomerAddressEdit = (addressId) => {
|
|||
background-color: var(--vn-light-gray);
|
||||
}
|
||||
}
|
||||
|
||||
.item-disabled {
|
||||
opacity: 0.6;
|
||||
}
|
||||
</style>
|
||||
|
||||
<i18n>
|
||||
|
|
|
@ -6,7 +6,7 @@ import { useRoute } from 'vue-router';
|
|||
import axios from 'axios';
|
||||
import { QCheckbox, QBtn, useQuasar, QField, QPopupEdit } from 'quasar';
|
||||
|
||||
import { toCurrency, toDate, toDateHour } from 'src/filters';
|
||||
import { toCurrency, toDate, toDateHourMinSec } from 'src/filters';
|
||||
import { useState } from 'src/composables/useState';
|
||||
import { useStateStore } from 'stores/useStateStore';
|
||||
import { useValidator } from 'src/composables/useValidator';
|
||||
|
@ -106,7 +106,7 @@ const columns = computed(() => [
|
|||
{
|
||||
align: 'left',
|
||||
field: 'created',
|
||||
format: (value) => toDateHour(value),
|
||||
format: (value) => toDateHourMinSec(value),
|
||||
label: t('Creation date'),
|
||||
name: 'creationDate',
|
||||
},
|
||||
|
@ -256,13 +256,13 @@ const saveFieldValue = async (event) => {
|
|||
</div>
|
||||
|
||||
<div v-else>
|
||||
<QBtn
|
||||
:label="props.value"
|
||||
flat
|
||||
rounded
|
||||
class="dotted-border-btn"
|
||||
no-caps
|
||||
/>
|
||||
<QField dense readonly>
|
||||
<template #control>
|
||||
<div class="self-center full-width no-outline">
|
||||
{{ props.row.description }}
|
||||
</div>
|
||||
</template>
|
||||
</QField>
|
||||
<QPopupEdit
|
||||
:key="props.col.name"
|
||||
label-cancel="Close"
|
||||
|
|
|
@ -5,7 +5,7 @@ import { useRoute, useRouter } from 'vue-router';
|
|||
|
||||
import { QBtn } from 'quasar';
|
||||
|
||||
import { toCurrency, toDateHour } from 'src/filters';
|
||||
import { toCurrency, toDateHourMin } 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) => toDateHour(value),
|
||||
format: (value) => toDateHourMin(value),
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
|
|
|
@ -57,20 +57,15 @@ const setData = (entity) => (data.value = useCardDescription(entity.name, entity
|
|||
/>
|
||||
</template>
|
||||
</VnLv>
|
||||
<VnLv
|
||||
:label="t('customer.card.credit')"
|
||||
:value="toCurrency(entity.credit)"
|
||||
class="col-11"
|
||||
/>
|
||||
<VnLv :label="t('customer.card.credit')" :value="toCurrency(entity.credit)" />
|
||||
<VnLv
|
||||
:label="t('customer.card.risk')"
|
||||
:value="toCurrency(entity.debt)"
|
||||
class="col-11"
|
||||
:info="t('customer.summary.descriptorInfo')"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('customer.card.securedCredit')"
|
||||
:value="toCurrency(entity.creditInsurance)"
|
||||
:info="t('customer.summary.descriptorInfo')"
|
||||
/>
|
||||
<VnLv :label="t('customer.card.payMethod')" :value="entity.payMethod.name" />
|
||||
<VnLv :label="t('customer.card.debt')" :value="toCurrency(entity.debt)" />
|
||||
|
|
|
@ -6,7 +6,7 @@ import { useRoute, useRouter } from 'vue-router';
|
|||
import { QBadge, QBtn, QCheckbox } from 'quasar';
|
||||
|
||||
import { downloadFile } from 'src/composables/downloadFile';
|
||||
import { toDateHour } from 'src/filters';
|
||||
import { toDateHourMinSec } from 'src/filters';
|
||||
|
||||
import FetchData from 'components/FetchData.vue';
|
||||
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
||||
|
@ -163,7 +163,7 @@ const columns = computed(() => [
|
|||
field: (value) => value.dms.created,
|
||||
label: t('Created'),
|
||||
name: 'created',
|
||||
format: (value) => toDateHour(value),
|
||||
format: (value) => toDateHourMinSec(value),
|
||||
},
|
||||
{
|
||||
align: 'right',
|
||||
|
|
|
@ -80,9 +80,7 @@ const onPostcodeCreated = async ({ code, provinceFk, townFk, countryFk }, formDa
|
|||
>
|
||||
<template #append>
|
||||
<QIcon name="info" class="cursor-info">
|
||||
<QTooltip>{{
|
||||
t('Only letters, numbers and spaces can be used')
|
||||
}}</QTooltip>
|
||||
<QTooltip>{{ t('onlyLetters') }}</QTooltip>
|
||||
</QIcon>
|
||||
</template>
|
||||
</VnInput>
|
||||
|
@ -117,7 +115,18 @@ const onPostcodeCreated = async ({ code, provinceFk, townFk, countryFk }, formDa
|
|||
option-label="vat"
|
||||
option-value="id"
|
||||
v-model="data.sageTransactionTypeFk"
|
||||
/>
|
||||
>
|
||||
<template #option="scope">
|
||||
<QItem v-bind="scope.itemProps">
|
||||
<QItemSection>
|
||||
<QItemLabel>{{ scope.opt.name }}</QItemLabel>
|
||||
<QItemLabel caption>
|
||||
{{ `${scope.opt.id}: ${scope.opt.transaction}` }}
|
||||
</QItemLabel>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
</template>
|
||||
</VnSelectFilter>
|
||||
</div>
|
||||
</VnRow>
|
||||
|
||||
|
@ -234,11 +243,7 @@ const onPostcodeCreated = async ({ code, provinceFk, townFk, countryFk }, formDa
|
|||
<QCheckbox :label="t('Vies')" v-model="data.isVies" />
|
||||
<QIcon name="info" class="cursor-info q-ml-sm" size="sm">
|
||||
<QTooltip>
|
||||
{{
|
||||
t(
|
||||
'When activating it, do not enter the country code in the ID field'
|
||||
)
|
||||
}}
|
||||
{{ t('whenActivatingIt') }}
|
||||
</QTooltip>
|
||||
</QIcon>
|
||||
</div>
|
||||
|
@ -267,11 +272,7 @@ const onPostcodeCreated = async ({ code, provinceFk, townFk, countryFk }, formDa
|
|||
/>
|
||||
<QIcon class="cursor-info q-ml-sm" name="info" size="sm">
|
||||
<QTooltip>
|
||||
{{
|
||||
t(
|
||||
"In order to invoice, this field is not contulted, but the consignee's ET. When modifiying this field if the invoice by address option is not checked, the change will be automatically propagated to all addresses, otherwise the user will be asked if he wants to propagate it or not"
|
||||
)
|
||||
}}
|
||||
{{ t('inOrderToInvoice') }}
|
||||
</QTooltip>
|
||||
</QIcon>
|
||||
</div>
|
||||
|
@ -304,7 +305,6 @@ const onPostcodeCreated = async ({ code, provinceFk, townFk, countryFk }, formDa
|
|||
<i18n>
|
||||
es:
|
||||
Social name: Razón social
|
||||
Only letters, numbers and spaces can be used: Sólo se pueden usar letras, números y espacios
|
||||
Tax number: NIF / CIF
|
||||
Street: Dirección fiscal
|
||||
Sage tax type: Tipo de impuesto Sage
|
||||
|
@ -317,12 +317,17 @@ es:
|
|||
Frozen: Congelado
|
||||
Has to invoice: Factura
|
||||
Vies: Vies
|
||||
When activating it, do not enter the country code in the ID field: Al activarlo, no informar el código del país en el campo nif.
|
||||
Notify by email: Notificar vía e-mail
|
||||
Invoice by address: Facturar por consignatario
|
||||
Is equalizated: Recargo de equivalencia
|
||||
In order to invoice, this field is not contulted, but the consignee's ET. When modifiying this field if the invoice by address option is not checked, the change will be automatically propagated to all addresses, otherwise the user will be asked if he wants to propagate it or not: Para facturar no se consulta este campo, sino el RE de consignatario. Al modificar este campo si no esta marcada la casilla Facturar por consignatario, se propagará automaticamente el cambio a todos lo consignatarios, en caso contrario preguntará al usuario si quiere o no propagar.
|
||||
Verified data: Datos comprobados
|
||||
Incoterms authorization: Autorización incoterms
|
||||
Electronic invoice: Factura electrónica
|
||||
onlyLetters: Sólo se pueden usar letras, números y espacios
|
||||
whenActivatingIt: Al activarlo, no informar el código del país en el campo nif
|
||||
inOrderToInvoice: Para facturar no se consulta este campo, sino el RE de consignatario. Al modificar este campo si no esta marcada la casilla Facturar por consignatario, se propagará automaticamente el cambio a todos lo consignatarios, en caso contrario preguntará al usuario si quiere o no propagar
|
||||
en:
|
||||
onlyLetters: Only letters, numbers and spaces can be used
|
||||
whenActivatingIt: When activating it, do not enter the country code in the ID field
|
||||
inOrderToInvoice: In order to invoice, this field is not contulted, but the consignee's ET. When modifiying this field if the invoice by address option is not checked, the change will be automatically propagated to all addresses, otherwise the user will be asked if he wants to propagate it or not
|
||||
</i18n>
|
||||
|
|
|
@ -5,7 +5,7 @@ import { useRoute, useRouter } from 'vue-router';
|
|||
|
||||
import { date, QBtn } from 'quasar';
|
||||
|
||||
import { toCurrency, toDateHour } from 'src/filters';
|
||||
import { toCurrency, toDateHourMinSec } 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) => toDateHour(value),
|
||||
format: (value) => toDateHourMinSec(value),
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
|
|
|
@ -3,7 +3,7 @@ import { computed, ref } from 'vue';
|
|||
import { useI18n } from 'vue-i18n';
|
||||
import { useRoute } from 'vue-router';
|
||||
|
||||
import { toDateHour } from 'src/filters';
|
||||
import { toDateHourMinSec } from 'src/filters';
|
||||
|
||||
import FetchData from 'components/FetchData.vue';
|
||||
|
||||
|
@ -74,14 +74,14 @@ const columns = computed(() => [
|
|||
field: 'created',
|
||||
label: t('Register date'),
|
||||
name: 'registerDate',
|
||||
format: (value) => toDateHour(value),
|
||||
format: (value) => toDateHourMinSec(value),
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
field: 'finished',
|
||||
label: t('End date'),
|
||||
name: 'endDate',
|
||||
format: (value) => (value ? toDateHour(value) : '-'),
|
||||
format: (value) => (value ? toDateHourMinSec(value) : '-'),
|
||||
},
|
||||
]);
|
||||
</script>
|
||||
|
|
|
@ -7,7 +7,7 @@ import { QBtn } from 'quasar';
|
|||
|
||||
import FetchData from 'components/FetchData.vue';
|
||||
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
||||
import { toDateHour } from 'src/filters';
|
||||
import { toDateHourMinSec } from 'src/filters';
|
||||
|
||||
const { t } = useI18n();
|
||||
const route = useRoute();
|
||||
|
@ -55,7 +55,7 @@ const columns = computed(() => [
|
|||
field: 'created',
|
||||
label: t('Sent'),
|
||||
name: 'sent',
|
||||
format: (value) => toDateHour(value),
|
||||
format: (value) => toDateHourMinSec(value),
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
|
|
|
@ -3,7 +3,7 @@ import { computed, ref } from 'vue';
|
|||
import { useI18n } from 'vue-i18n';
|
||||
import { useRoute } from 'vue-router';
|
||||
|
||||
import { toCurrency, toDateHour } from 'src/filters';
|
||||
import { toCurrency, toDateHourMinSec } from 'src/filters';
|
||||
|
||||
import FetchData from 'components/FetchData.vue';
|
||||
import CustomerCloseIconTooltip from '../components/CustomerCloseIconTooltip.vue';
|
||||
|
@ -74,7 +74,7 @@ const columns = computed(() => [
|
|||
field: 'created',
|
||||
label: t('Date'),
|
||||
name: 'date',
|
||||
format: (value) => toDateHour(value),
|
||||
format: (value) => toDateHourMinSec(value),
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
|
|
|
@ -32,7 +32,7 @@ const setClientsConfirmTransaction = async () => {
|
|||
<QIcon
|
||||
@click.stop="setClientsConfirmTransaction"
|
||||
color="primary"
|
||||
name="check"
|
||||
name="done_all"
|
||||
size="sm"
|
||||
>
|
||||
<QTooltip>{{ t('Confirm transaction') }}</QTooltip>
|
||||
|
|
|
@ -3,7 +3,7 @@ import { computed, ref } from 'vue';
|
|||
import { useI18n } from 'vue-i18n';
|
||||
import { useRoute } from 'vue-router';
|
||||
|
||||
import { toCurrency, toDateHour } from 'src/filters';
|
||||
import { toCurrency, toDateHourMinSec } from 'src/filters';
|
||||
|
||||
import FetchData from 'components/FetchData.vue';
|
||||
|
||||
|
@ -41,7 +41,7 @@ const columns = computed(() => [
|
|||
{
|
||||
align: 'left',
|
||||
field: 'created',
|
||||
format: (value) => toDateHour(value),
|
||||
format: (value) => toDateHourMinSec(value),
|
||||
label: t('Created'),
|
||||
name: 'created',
|
||||
},
|
||||
|
|
|
@ -3,7 +3,7 @@ import { computed, ref } from 'vue';
|
|||
import { useRoute } from 'vue-router';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useStateStore } from 'stores/useStateStore';
|
||||
import { dashIfEmpty, toCurrency, toDateHour } from 'src/filters';
|
||||
import { dashIfEmpty, toCurrency, toDateHourMinSec } from 'src/filters';
|
||||
import VnLv from 'components/ui/VnLv.vue';
|
||||
import CardSummary from 'components/ui/CardSummary.vue';
|
||||
import CustomerDescriptorProxy from 'pages/Customer/Card/CustomerDescriptorProxy.vue';
|
||||
|
@ -86,15 +86,15 @@ const detailsColumns = ref([
|
|||
<QCard class="vn-one">
|
||||
<VnLv
|
||||
:label="t('order.summary.created')"
|
||||
:value="toDateHour(entity?.created)"
|
||||
:value="toDateHourMinSec(entity?.created)"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('order.summary.confirmed')"
|
||||
:value="toDateHour(entity?.confirmed)"
|
||||
:value="toDateHourMinSec(entity?.confirmed)"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('order.summary.landed')"
|
||||
:value="toDateHour(entity?.landed)"
|
||||
:value="toDateHourMinSec(entity?.landed)"
|
||||
/>
|
||||
<VnLv :label="t('order.summary.phone')">
|
||||
<template #value>
|
||||
|
|
Loading…
Reference in New Issue