0
0
Fork 0

Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 6893-redirectOnFetchOneRecord

This commit is contained in:
Jorge Penadés 2024-03-27 08:35:24 +01:00
commit 375461abd7
35 changed files with 28 additions and 58 deletions

View File

@ -29,7 +29,7 @@ module.exports = configure(function (/* ctx */) {
// app boot file (/src/boot)
// --> boot files are part of "main.js"
// https://v2.quasar.dev/quasar-cli/boot-files
boot: ['i18n', 'axios', 'vnDate', 'validations', 'quasar'],
boot: ['i18n', 'axios', 'vnDate', 'validations', 'quasar.defaults'],
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#css
css: ['app.scss'],

View File

@ -0,0 +1,5 @@
import { QTable } from 'quasar';
import setDefault from './setDefault';
setDefault(QTable, 'pagination', { rowsPerPage: 0 });
setDefault(QTable, 'hidePagination', true);

View File

@ -0,0 +1,18 @@
export default function (component, key, value) {
const prop = component.props[key];
switch (typeof prop) {
case 'object':
prop.default = value;
break;
case 'function':
component.props[key] = {
type: prop,
default: value,
};
break;
case 'undefined':
throw new Error('unknown prop: ' + key);
default:
throw new Error('unhandled type: ' + typeof prop);
}
}

View File

@ -0,0 +1 @@
export * from './defaults/qTable';

View File

@ -202,7 +202,6 @@ const selectItem = ({ id }) => {
<QTable
:columns="tableColumns"
:rows="tableRows"
:pagination="{ rowsPerPage: 0 }"
:loading="loading"
:hide-header="!tableRows || !tableRows.length > 0"
:no-data-label="t('Enter a new search')"

View File

@ -200,7 +200,6 @@ const selectTravel = ({ id }) => {
<QTable
:columns="tableColumns"
:rows="tableRows"
:pagination="{ rowsPerPage: 0 }"
:loading="loading"
:hide-header="!tableRows || !tableRows.length > 0"
:no-data-label="t('Enter a new search')"

View File

@ -218,7 +218,6 @@ function parseDms(data) {
/>
<QTable
:columns="columns"
:pagination="{ rowsPerPage: 0 }"
:rows="rows"
class="full-width q-mt-md"
hide-bottom

View File

@ -291,8 +291,6 @@ async function importToNewRefundTicket() {
selection="multiple"
v-model:selected="selectedRows"
:grid="$q.screen.lt.md"
:pagination="{ rowsPerPage: 0 }"
:hide-bottom="true"
>
<template #body-cell-ticket="{ value }">
<QTd align="center">

View File

@ -150,10 +150,8 @@ const columns = computed(() => [
<QTable
:columns="columns"
:rows="rows"
:pagination="{ rowsPerPage: 0 }"
row-key="$index"
selection="multiple"
hide-pagination
v-model:selected="selected"
:grid="$q.screen.lt.md"
table-header-class="text-left"

View File

@ -201,11 +201,9 @@ function showImportDialog() {
:columns="columns"
:rows="rows"
:dense="$q.screen.lt.md"
:pagination="{ rowsPerPage: 0 }"
row-key="id"
selection="multiple"
v-model:selected="selected"
hide-pagination
:grid="$q.screen.lt.md"
>
<template #body-cell-claimed="{ row, value }">

View File

@ -121,7 +121,6 @@ function cancel() {
class="my-sticky-header-table"
:columns="columns"
:rows="claimableSales"
:pagination="{ rowsPerPage: 10 }"
row-key="saleFk"
selection="multiple"
v-model:selected="selected"

View File

@ -198,7 +198,6 @@ const updateCompanyId = (id) => {
<QTable
:columns="columns"
:pagination="{ rowsPerPage: 12 }"
:rows="rows"
class="full-width q-mt-md"
row-key="id"

View File

@ -97,13 +97,7 @@ const toCustomerCreditCreate = () => {
<template>
<QPage class="column items-center q-pa-md">
<QTable
:columns="columns"
:pagination="{ rowsPerPage: 12 }"
:rows="rows"
class="full-width q-mt-md"
row-key="id"
>
<QTable :columns="columns" :rows="rows" class="full-width q-mt-md" row-key="id">
<template #body-cell="props">
<QTd :props="props">
<QTr :props="props" class="cursor-pointer">

View File

@ -140,7 +140,6 @@ const toCustomerGreugeCreate = () => {
<QTable
:columns="columns"
:pagination="{ rowsPerPage: 12 }"
:rows="rows"
class="full-width q-mt-md"
row-key="id"

View File

@ -97,7 +97,6 @@ const toCustomerRecoverieCreate = () => {
<QPage class="column items-center q-pa-md">
<QTable
:columns="columns"
:pagination="{ rowsPerPage: 12 }"
:rows="rows"
class="full-width q-mt-md"
row-key="id"

View File

@ -224,10 +224,8 @@ const refreshData = () => {
<QPage class="column items-center q-pa-md">
<QTable
:columns="columns"
:pagination="{ rowsPerPage: 0 }"
:rows="rows"
class="full-width q-mt-md"
hide-bottom
row-key="clientFk"
selection="multiple"
v-model:selected="selected"

View File

@ -510,7 +510,6 @@ const selectSalesPersonId = (id) => (selectedSalesPersonId.value = id);
<QPage class="column items-center q-pa-md">
<QTable
:columns="columns"
:pagination="{ rowsPerPage: 12 }"
:rows="rows"
class="full-width q-mt-md"
row-key="id"

View File

@ -108,10 +108,8 @@ const selectCustomerId = (id) => {
<QPage class="column items-center q-pa-md">
<QTable
:columns="columns"
:pagination="{ rowsPerPage: 0 }"
:rows="rows"
class="full-width q-mt-md"
hide-bottom
row-key="id"
selection="multiple"
v-model:selected="selected"

View File

@ -151,10 +151,8 @@ function stateColor(row) {
:columns="columns"
:rows="rows"
row-key="id"
:pagination="{ rowsPerPage: 0 }"
:grid="grid || $q.screen.lt.sm"
class="q-mt-xs custom-table"
hide-pagination
>
<template #body-cell-actions="{ row }">
<QTd auto-width class="text-center">

View File

@ -238,12 +238,7 @@ const redirectToBuysView = () => {
</div>
</VnRow>
<VnRow>
<QTable
:columns="columns"
:rows="importData.buys"
:pagination="{ rowsPerPage: 0 }"
hide-pagination
>
<QTable :columns="columns" :rows="importData.buys">
<template #body-cell-item="{ row, col }">
<QTd auto-width>
<VnSelectDialog

View File

@ -659,7 +659,6 @@ onUnmounted(() => (stateStore.rightDrawer = false));
:columns="columns"
selection="multiple"
row-key="id"
:pagination="{ rowsPerPage: 0 }"
class="full-width q-mt-md"
:visible-columns="visibleColumns"
v-model:selected="rowsSelected"

View File

@ -111,7 +111,6 @@ const onSave = (data) => data.deletes && router.push(`/invoice-in/${invoiceId}/s
:rows="rows"
row-key="$index"
selection="single"
hide-pagination
:grid="$q.screen.lt.sm"
:pagination="{ rowsPerPage: 0 }"
>

View File

@ -99,7 +99,6 @@ async function insert() {
:columns="columns"
:rows="rows"
row-key="$index"
hide-pagination
:grid="$q.screen.lt.sm"
>
<template #body-cell-duedate="{ row }">

View File

@ -134,7 +134,6 @@ function getTotal(type) {
:columns="columns"
:rows="rows"
row-key="$index"
hide-pagination
:grid="$q.screen.lt.sm"
>
<template #body-cell="{ row, col }">

View File

@ -356,7 +356,6 @@ function getLink(param) {
:columns="dueDayColumns"
:rows="invoiceIn.invoiceInDueDay"
flat
hide-pagination
>
<template #header="props">
<QTr :props="props" class="bg">
@ -385,7 +384,6 @@ function getLink(param) {
:columns="intrastatColumns"
:rows="invoiceIn.invoiceInIntrastat"
flat
hide-pagination
>
<template #header="props">
<QTr :props="props" class="bg">

View File

@ -184,10 +184,8 @@ async function addExpense() {
selection="multiple"
:columns="columns"
:rows="rows"
row-key="$index"
hide-pagination
row-key="$index"
:grid="$q.screen.lt.sm"
:pagination="{ rowsPerPage: 0 }"
>
<template #body-cell-expense="{ row, col }">
<QTd auto-width>

View File

@ -133,9 +133,7 @@ onUnmounted(() => {
v-if="rows.length > 0"
:rows="rows"
:columns="columns"
hide-bottom
row-key="id"
:pagination="{ rowsPerPage: 0 }"
class="full-width q-mt-md"
>
<template #body-cell="props">

View File

@ -166,9 +166,7 @@ const downloadCSV = async () => {
<QTable
:columns="columns"
:rows="rows"
hide-bottom
row-key="clientId"
:pagination="{ rowsPerPage: 0 }"
class="full-width q-mt-md"
>
<template #body-cell-clientId="{ row }">

View File

@ -162,7 +162,6 @@ const detailsColumns = ref([
:columns="detailsColumns"
:rows="entity?.rows"
flat
hide-pagination
>
<template #header="props">
<QTr :props="props">

View File

@ -205,10 +205,8 @@ const ticketColumns = ref([
<QTable
:columns="ticketColumns"
:rows="entity?.tickets"
:rows-per-page-options="[0]"
row-key="id"
flat
hide-pagination
>
<template #body-cell-city="{ value, row }">
<QTd auto-width>

View File

@ -123,8 +123,6 @@ function downloadPdfs() {
:columns="columns"
:rows="rows"
:dense="$q.screen.lt.md"
:pagination="{ rowsPerPage: null }"
hide-pagination
row-key="cmrFk"
selection="multiple"
v-model:selected="selected"

View File

@ -151,7 +151,6 @@ onMounted(async () => {
:rows="rows"
row-key="id"
hide-header
:pagination="{ rowsPerPage: 0 }"
class="full-width q-mt-md"
:no-data-label="t('No results')"
>

View File

@ -289,7 +289,6 @@ async function setTravelData(travelData) {
<QTable
:rows="entriesTableRows"
:columns="entriesTableColumns"
hide-bottom
row-key="id"
class="full-width q-mt-md"
>
@ -354,7 +353,6 @@ async function setTravelData(travelData) {
<QTable
:rows="thermographs"
:columns="thermographsTableColumns"
hide-bottom
row-key="id"
class="full-width q-mt-md"
/>

View File

@ -145,7 +145,6 @@ const removeThermograph = async (id) => {
:rows="rows"
:columns="TableColumns"
:no-data-label="t('No results')"
:rows-per-page-options="[0]"
row-key="id"
class="full-width q-mt-md"
>

View File

@ -453,9 +453,7 @@ const handleDragScroll = (event) => {
<QTable
:rows="rows"
:columns="columns"
hide-bottom
row-key="clientId"
:pagination="{ rowsPerPage: 0 }"
class="full-width"
table-style="user-select: none;"
@drag="handleDragScroll($event)"