refs #5835
gitea/salix-front/pipeline/head This commit looks good Details

This commit is contained in:
Jorge Penadés 2023-12-12 09:01:32 +01:00
parent 22a634e7eb
commit 2c5dc276b2
3 changed files with 32 additions and 29 deletions

View File

@ -4,12 +4,12 @@ import { dashIfEmpty } from 'src/filters';
const $props = defineProps({
label: { type: String, default: null },
value: { type: [Number, String, Boolean], default: null },
titleLabel: { type: String, default: null },
titleValue: { type: [Number, String, Boolean], default: null },
value: {
type: [String, Boolean],
default: null,
},
info: { type: String, default: null },
dash: { type: Boolean, default: true },
ellipsisValue: { type: Boolean, default: true },
});
const isBooleanValue = computed(() => typeof $props.value === 'boolean');
</script>
@ -17,10 +17,10 @@ const isBooleanValue = computed(() => typeof $props.value === 'boolean');
<div class="vn-label-value">
<div v-if="$props.label || $slots.label" class="label">
<slot name="label">
<span :title="$props.titleLabel ?? $props.label">{{ $props.label }}</span>
<span>{{ $props.label }}</span>
</slot>
</div>
<div class="value" :class="{ ellipsis: $props.ellipsisValue }">
<div class="value">
<span v-if="isBooleanValue">
<QIcon
:name="$props.value ? `check` : `close`"
@ -43,8 +43,3 @@ const isBooleanValue = computed(() => typeof $props.value === 'boolean');
</div>
</div>
</template>
<style lang="scss" scoped>
.ellipsis {
text-overflow: ellipsis !important;
}
</style>

View File

@ -405,7 +405,7 @@ export default {
pageTitles: {
invoiceIns: 'Fact. recibidas',
list: 'Listado',
createInvoiceOut: 'Crear fact. recibida',
createInvoiceIn: 'Crear fact. recibida',
summary: 'Resumen',
basicData: 'Datos básicos',
vat: 'IVA',

View File

@ -37,6 +37,10 @@ const inputFileRef = ref();
const editDmsRef = ref();
const createDmsRef = ref();
const requiredFieldRule = (val) => val || t('Required field');
const dateMask = '####-##-##';
const fillMask = '_';
async function checkFileExists(dmsId) {
if (!dmsId) return;
try {
@ -212,10 +216,14 @@ async function upsert() {
<QInput
:label="t('Expedition date')"
v-model="data.issued"
mask="####-##-##"
:mask="dateMask"
>
<template #append>
<QIcon name="event" class="cursor-pointer" fill-mask="_">
<QIcon
name="event"
class="cursor-pointer"
:fill-mask="fillMask"
>
<QPopupProxy
cover
transition-show="scale"
@ -240,8 +248,8 @@ async function upsert() {
<QInput
:label="t('Operation date')"
v-model="data.operated"
mask="####-##-##"
fill-mask="_"
:mask="dateMask"
:fill-mask="fillMask"
autofocus
>
<template #append>
@ -251,7 +259,7 @@ async function upsert() {
transition-show="scale"
transition-hide="scale"
>
<QDate v-model="data.operated" mask="YYYY-MM-DD">
<QDate v-model="data.operated" :mask="dateMask">
<div class="row items-center justify-end">
<QBtn
v-close-popup
@ -332,8 +340,8 @@ async function upsert() {
v-model="data.bookEntried"
clearable
clear-icon="close"
mask="####-##-##"
fill-mask="_"
:mask="dateMask"
:fill-mask="fillMask"
>
<template #append>
<QIcon name="event" class="cursor-pointer">
@ -342,7 +350,7 @@ async function upsert() {
transition-show="scale"
transition-hide="scale"
>
<QDate v-model="data.bookEntried" mask="YYYY-MM-DD">
<QDate v-model="data.bookEntried" :mask="dateMask">
<div class="row items-center justify-end">
<QBtn
v-close-popup
@ -363,8 +371,8 @@ async function upsert() {
v-model="data.booked"
clearable
clear-icon="close"
mask="####-##-##"
fill-mask="_"
:mask="dateMask"
:fill-mask="fillMask"
>
<template #append>
<QIcon name="event" class="cursor-pointer">
@ -373,7 +381,7 @@ async function upsert() {
transition-show="scale"
transition-hide="scale"
>
<QDate v-model="data.booked" mask="YYYY-MM-DD">
<QDate v-model="data.booked" :mask="maskDate">
<div class="row items-center justify-end">
<QBtn
v-close-popup
@ -452,7 +460,7 @@ async function upsert() {
option-value="id"
option-label="code"
@input-value="companiesRef.fetch()"
:rules="[(val) => val || t('Required field')]"
:rules="[requiredFieldRule]"
/>
</QItem>
<QItem>
@ -464,7 +472,7 @@ async function upsert() {
option-value="id"
option-label="name"
@input-value="warehousesRef.fetch()"
:rules="[(val) => val || t('Required field')]"
:rules="[requiredFieldRule]"
/>
<VnSelectFilter
class="full-width q-pa-xs"
@ -474,7 +482,7 @@ async function upsert() {
option-value="id"
option-label="name"
@input-value="dmsTypesRef.fetch()"
:rules="[(val) => val || t('Required field')]"
:rules="[requiredFieldRule]"
/>
</QItem>
<QItem>
@ -564,7 +572,7 @@ async function upsert() {
option-value="id"
option-label="code"
@input-value="companiesRef.fetch()"
:rules="[(val) => val || t('Required field')]"
:rules="[requiredFieldRule]"
/>
</QItem>
<QItem>
@ -576,7 +584,7 @@ async function upsert() {
option-value="id"
option-label="name"
@input-value="warehousesRef.fetch()"
:rules="[(val) => val || t('Required field')]"
:rules="[requiredFieldRule]"
/>
<VnSelectFilter
class="full-width q-pa-xs"
@ -586,7 +594,7 @@ async function upsert() {
option-value="id"
option-label="name"
@input-value="dmsTypesRef.fetch()"
:rules="[(val) => val || t('Required field')]"
:rules="[requiredFieldRule]"
/>
</QItem>
<QItem>