0
0
Fork 0
This commit is contained in:
Alex Moreno 2024-09-24 07:48:58 +02:00
commit 98a3b03be7
10 changed files with 96 additions and 86 deletions

View File

@ -420,7 +420,7 @@ function handleOnDataSaved(_) {
<QBtn
v-if="$props.rightSearch"
icon="filter_alt"
class="bg-vn-section-color q-ml-md"
class="bg-vn-section-color q-ml-sm"
dense
@click="stateStore.toggleRightDrawer()"
/>
@ -507,8 +507,12 @@ function handleOnDataSaved(_) {
:key="index"
:title="btn.title"
:icon="btn.icon"
class="q-px-sm text-primary-light"
class="q-pa-xs"
flat
dense
:class="
btn.isPrimary ? 'text-primary-light' : 'color-vn-text '
"
:style="`visibility: ${
(btn.show && btn.show(row)) ?? true ? 'visible' : 'hidden'
}`"
@ -767,10 +771,16 @@ es:
}
}
.q-table th {
.q-table {
th {
padding: 0;
}
}
&__top {
padding: 12px 0px;
top: 0;
}
}
.vnTable {
thead tr th {
position: sticky;
@ -779,11 +789,11 @@ es:
thead tr:first-child th {
top: 0;
}
.q-table__top {
<<<<<<< HEAD .q-table__top {
top: 0;
padding: 12px 0;
}
tbody {
=======>>>>>>>d13cab0a240a3a10db97a793022ba0f5ded48965 tbody {
.q-checkbox {
display: flex;
margin-bottom: 9px;

View File

@ -135,7 +135,7 @@ onMounted(async () => {
});
</script>
<template>
<QBtn icon="vn:visible_columns" class="bg-vn-section-color q-mr-md q-px-sm" dense>
<QBtn icon="vn:visible_columns" class="bg-vn-section-color q-mr-sm q-px-sm" dense>
<QPopupProxy ref="popupProxyRef">
<QCard class="column q-pa-md">
<QIcon name="info" size="sm" class="info-icon">

View File

@ -901,6 +901,7 @@ supplier:
account: Account
payMethod: Pay Method
payDay: Pay Day
country: Country
summary:
responsible: Responsible
notes: Notes

View File

@ -885,6 +885,7 @@ supplier:
account: Cuenta
payMethod: Método de pago
payDay: Dia de pago
country: País
summary:
responsible: Responsable
notes: Notas

View File

@ -139,7 +139,11 @@ const columns = computed(() => [
</VnTable>
</template>
<style lang="scss" scoped>
.full-width .vn-row > * {
flex: 0.4;
.full-width .vn-row {
margin-bottom: 0;
flex-direction: row;
> * {
max-width: 125px;
}
}
</style>

View File

@ -132,7 +132,6 @@ const openTab = (id) =>
:table="{
'row-key': 'id',
selection: 'multiple',
'hide-bottom': true,
}"
default-mode="table"
:row-click="({ id }) => openTab(id)"

View File

@ -54,7 +54,6 @@ const columns = computed(() => [
label: t('salesTicketsTable.problems'),
name: 'totalProblems',
align: 'left',
columnFilter: false,
attrs: {
dense: true,
@ -65,7 +64,6 @@ const columns = computed(() => [
name: 'id',
field: 'id',
align: 'left',
columnFilter: {
component: 'number',
name: 'id',
@ -108,9 +106,7 @@ const columns = computed(() => [
{
label: t('salesTicketsTable.date'),
name: 'shippedDate',
style: { 'max-width': '100px' },
align: 'left',
columnFilter: {
component: 'date',
name: 'shippedDate',
@ -164,7 +160,6 @@ const columns = computed(() => [
label: t('salesTicketsTable.state'),
name: 'state',
align: 'left',
style: { 'max-width': '100px' },
columnFilter: {
component: 'select',
name: 'stateFk',
@ -193,7 +188,6 @@ const columns = computed(() => [
label: t('salesTicketsTable.zone'),
name: 'zoneFk',
align: 'left',
columnFilter: {
component: 'select',
name: 'zoneFk',
@ -210,8 +204,6 @@ const columns = computed(() => [
name: 'totalWithVat',
field: 'totalWithVat',
align: 'left',
style: { 'max-width': '75px' },
columnFilter: {
component: 'number',
name: 'totalWithVat',
@ -370,7 +362,7 @@ const openTab = (id) =>
</QCheckbox>
</template>
<template #column-totalProblems="{ row }">
<QTd class="no-padding" style="max-width: 60px">
<span>
<QIcon
v-if="row.isTaxDataChecked === 0"
name="vn:no036"
@ -424,30 +416,27 @@ const openTab = (id) =>
>
<QTooltip>{{ $t('salesTicketsTable.tooLittle') }}</QTooltip>
</QIcon>
</QTd>
</span>
</template>
<template #column-id="{ row }">
<QTd class="no-padding">
<span class="link" @click.stop.prevent>
{{ row.id }}
<TicketDescriptorProxy :id="row.id" />
</span>
</QTd>
</template>
<template #column-clientFk="{ row }">
<QTd class="no-padding" @click.stop :title="row.nickname">
<span class="link">{{ row.nickname }}</span>
<div @click.stop :title="row.nickname">
<span class="link" v-text="row.nickname" />
<CustomerDescriptorProxy :id="row.clientFk" />
</QTd>
</div>
</template>
<template #column-salesPersonFk="{ row }">
<QTd class="no-padding" @click.stop :title="row.userName">
<div @click.stop :title="row.userName">
<span class="link" v-text="dashIfEmpty(row.userName)" />
<WorkerDescriptorProxy :id="row.salesPersonFk" />
</QTd>
</div>
</template>
<template #column-shippedDate="{ row }">
<QTd class="no-padding">
<QBadge
v-bind="getBadgeAttrs(row.shippedDate)"
class="q-pa-sm"
@ -455,15 +444,12 @@ const openTab = (id) =>
>
{{ formatShippedDate(row.shippedDate) }}
</QBadge>
</QTd>
</template>
<template #column-provinceFk="{ row }">
<QTd class="no-padding">
<span :title="row.province" v-text="row.province" />
</QTd>
</template>
<template #column-state="{ row }">
<QTd class="no-padding" @click.stop.prevent>
<div @click.stop.prevent>
<div v-if="row.refFk">
<span class="link">{{ row.refFk }}</span>
<InvoiceOutDescriptorProxy :id="row.invoiceOutId" />
@ -477,23 +463,20 @@ const openTab = (id) =>
>
{{ row.state }}
</QBadge>
</QTd>
</div>
</template>
<template #column-isFragile="{ row }">
<QTd class="no-padding">
<QIcon v-if="row.isFragile" name="local_bar" color="primary" size="sm">
<QTooltip>{{ $t('salesTicketsTable.isFragile') }}</QTooltip>
</QIcon>
</QTd>
</template>
<template #column-zoneFk="{ row }">
<QTd class="no-padding" @click.stop.prevent :title="row.zoneName">
<div @click.stop.prevent :title="row.zoneName">
<span class="link">{{ row.zoneName }}</span>
<ZoneDescriptorProxy :id="row.zoneFk" />
</QTd>
</div>
</template>
<template #column-totalWithVat="{ row }">
<QTd class="no-padding">
<QBadge
:color="totalPriceColor(row) || 'transparent'"
:text-color="totalPriceColor(row) ? 'black' : 'white'"
@ -502,7 +485,11 @@ const openTab = (id) =>
>
{{ toCurrency(row.totalWithVat) }}
</QBadge>
</QTd>
</template>
</VnTable>
</template>
<style lang="scss" scoped>
td .q-icon {
margin: 0 2px;
}
</style>

View File

@ -75,6 +75,19 @@ const columns = computed(() => [
},
visible: false,
},
{
align: 'left',
label: t('supplier.list.tableVisibleColumns.country'),
name: 'country',
columnFilter: {
component: 'select',
name: 'countryFk',
attrs: {
url: 'countries',
fields: ['id', 'name'],
},
},
},
]);
</script>

View File

@ -28,18 +28,8 @@ const route = useRoute();
const router = useRouter();
const state = useState();
const { notify } = useNotify();
const thermographFilter = {
fields: ['thermographFk'],
where: {
travelFk: null,
},
order: 'thermographFk ASC',
};
const fetchTravelThermographsRef = ref(null);
const allowedContentTypes = ref('');
const user = state.getUser();
const thermographsOptions = ref([]);
const dmsTypesOptions = ref([]);
const companiesOptions = ref([]);
const warehousesOptions = ref([]);
@ -168,24 +158,15 @@ const updateThermograph = async () => {
};
const onThermographCreated = async (data) => {
await fetchTravelThermographsRef.value.fetch();
thermographForm.thermographId = data.thermographId;
thermographForm.thermographId = data.id;
};
</script>
<template>
<FetchData
url="DmsContainers/allowedContentTypes"
@on-fetch="(data) => (allowedContentTypes = data.join(', '))"
auto-load
/>
<FetchData
ref="fetchTravelThermographsRef"
url="TravelThermographs"
@on-fetch="(data) => (thermographsOptions = data)"
:filter="thermographFilter"
auto-load
/>
<FetchData
url="DmsTypes"
:filter="{ order: 'name' }"
@ -239,15 +220,20 @@ const onThermographCreated = async (data) => {
<VnSelectDialog
:label="t('travel.thermographs.thermograph')"
v-model="thermographForm.thermographId"
:options="thermographsOptions"
url="TravelThermographs"
option-value="thermographFk"
option-label="thermographFk"
:fields="['thermographFk']"
:where="{ travelFk: null }"
sort-by="thermographFk ASC"
:disable="viewAction === 'edit'"
:tooltip="t('New thermograph')"
>
<template #form>
<CreateThermographForm
@on-data-saved="onThermographCreated($event, data)"
@on-data-saved="
(data) => (thermographForm.thermographId = data.id)
"
/>
</template>
</VnSelectDialog>
@ -323,7 +309,6 @@ const onThermographCreated = async (data) => {
</QForm>
</QPage>
</template>
<i18n>
es:
Select files: Selecciona ficheros

View File

@ -64,6 +64,15 @@ const agencyOptions = ref([]);
type="number"
min="0"
/>
<VnInput
class="mw-10"
v-model="data.itemMaxLength"
:label="t('Max length m³')"
clearable
type="number"
min="0"
/>
</VnRow>
<VnRow>
@ -128,4 +137,5 @@ es:
Bonus: Bonificación
Inflation: Inflación
Volumetric: Volumétrico
Max length : Medida máxima tumbado
</i18n>