Merge branch 'dev' into 7601_futureAgency
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
commit
0901c57b12
|
@ -0,0 +1,2 @@
|
|||
export const langs = ['en', 'es'];
|
||||
export const decimalPlaces = 2;
|
|
@ -27,7 +27,7 @@ function columnName(col) {
|
|||
</script>
|
||||
<template>
|
||||
<VnFilterPanel v-bind="$attrs" :search-button="true" :disable-submit-event="true">
|
||||
<template #body="{ params, orders }">
|
||||
<template #body="{ params, orders, searchFn }">
|
||||
<div
|
||||
class="row no-wrap flex-center"
|
||||
v-for="col of columns.filter((c) => c.columnFilter ?? true)"
|
||||
|
@ -52,6 +52,7 @@ function columnName(col) {
|
|||
<slot
|
||||
name="moreFilterPanel"
|
||||
:params="params"
|
||||
:search-fn="searchFn"
|
||||
:orders="orders"
|
||||
:columns="columns"
|
||||
/>
|
||||
|
|
|
@ -106,7 +106,14 @@ function checkIsMain() {
|
|||
:data-key="dataKey"
|
||||
:array-data="arrayData"
|
||||
:columns="columns"
|
||||
>
|
||||
<template #moreFilterPanel="{ params, orders, searchFn }">
|
||||
<slot
|
||||
name="moreFilterPanel"
|
||||
v-bind="{ params, orders, searchFn }"
|
||||
/>
|
||||
</template>
|
||||
</VnTableFilter>
|
||||
</slot>
|
||||
</template>
|
||||
</RightAdvancedMenu>
|
||||
|
|
|
@ -635,6 +635,8 @@ wagon:
|
|||
name: Name
|
||||
|
||||
supplier:
|
||||
search: Search supplier
|
||||
searchInfo: Search supplier by id or name
|
||||
list:
|
||||
payMethod: Pay method
|
||||
account: Account
|
||||
|
|
|
@ -644,6 +644,8 @@ wagon:
|
|||
volume: Volumen
|
||||
name: Nombre
|
||||
supplier:
|
||||
search: Buscar proveedor
|
||||
searchInfo: Buscar proveedor por id o nombre
|
||||
list:
|
||||
payMethod: Método de pago
|
||||
account: Cuenta
|
||||
|
@ -651,6 +653,7 @@ supplier:
|
|||
tableVisibleColumns:
|
||||
nif: NIF/CIF
|
||||
account: Cuenta
|
||||
|
||||
summary:
|
||||
responsible: Responsable
|
||||
verified: Verificado
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<script setup>
|
||||
import { Dark, Quasar } from 'quasar';
|
||||
import { computed } from 'vue';
|
||||
import { computed, onMounted } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { localeEquivalence } from 'src/i18n/index';
|
||||
import quasarLang from 'src/utils/quasarLang';
|
||||
import { langs } from 'src/boot/defaults/constants.js';
|
||||
|
||||
const { t, locale } = useI18n();
|
||||
|
||||
const userLocale = computed({
|
||||
get() {
|
||||
return locale.value;
|
||||
|
@ -28,7 +28,6 @@ const darkMode = computed({
|
|||
Dark.set(value);
|
||||
},
|
||||
});
|
||||
const langs = ['en', 'es'];
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
|
@ -119,7 +119,7 @@ const openSendEmailDialog = async () => {
|
|||
openConfirmationModal(
|
||||
t('The consumption report will be sent'),
|
||||
t('Please, confirm'),
|
||||
() => sendCampaignMetricsEmail({ address: arrayData.store.data.email })
|
||||
() => sendCampaignMetricsEmail({ address: arrayData.store.data.email }),
|
||||
);
|
||||
};
|
||||
const sendCampaignMetricsEmail = ({ address }) => {
|
||||
|
|
|
@ -1,19 +1,13 @@
|
|||
<script setup>
|
||||
import VnCard from 'components/common/VnCard.vue';
|
||||
import SupplierDescriptor from './SupplierDescriptor.vue';
|
||||
import VnCardBeta from 'src/components/common/VnCardBeta.vue';
|
||||
import filter from './SupplierFilter.js';
|
||||
</script>
|
||||
<template>
|
||||
<VnCard
|
||||
<VnCardBeta
|
||||
data-key="Supplier"
|
||||
url="Suppliers"
|
||||
:filter="filter"
|
||||
:descriptor="SupplierDescriptor"
|
||||
search-data-key="SupplierList"
|
||||
:searchbar-props="{
|
||||
url: 'Suppliers/filter',
|
||||
searchUrl: 'table',
|
||||
label: 'Search suppliers',
|
||||
}"
|
||||
:filter="filter"
|
||||
/>
|
||||
</template>
|
||||
|
|
|
@ -16,6 +16,7 @@ import axios from 'axios';
|
|||
import { useStateStore } from 'stores/useStateStore';
|
||||
import { useState } from 'src/composables/useState';
|
||||
import { useArrayData } from 'composables/useArrayData';
|
||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||
|
||||
const state = useState();
|
||||
const stateStore = useStateStore();
|
||||
|
@ -173,10 +174,11 @@ onMounted(async () => {
|
|||
</div>
|
||||
</div>
|
||||
</Teleport>
|
||||
<QPage class="column items-center q-pa-md">
|
||||
<Teleport to="#right-panel" v-if="stateStore.isHeaderMounted()">
|
||||
<RightMenu>
|
||||
<template #right-panel>
|
||||
<SupplierConsumptionFilter data-key="SupplierConsumption" />
|
||||
</Teleport>
|
||||
</template>
|
||||
</RightMenu>
|
||||
<QTable
|
||||
:rows="rows"
|
||||
row-key="id"
|
||||
|
@ -225,7 +227,6 @@ onMounted(async () => {
|
|||
</QTr>
|
||||
</template>
|
||||
</QTable>
|
||||
</QPage>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
|
|
@ -2,14 +2,15 @@
|
|||
import { computed, ref } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import VnTable from 'components/VnTable/VnTable.vue';
|
||||
import VnSearchbar from 'components/ui/VnSearchbar.vue';
|
||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||
import SupplierListFilter from './SupplierListFilter.vue';
|
||||
import VnSection from 'src/components/common/VnSection.vue';
|
||||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||
import FetchData from 'src/components/FetchData.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const tableRef = ref();
|
||||
|
||||
const dataKey = 'SupplierList';
|
||||
const provincesOptions = ref([]);
|
||||
const columns = computed(() => [
|
||||
{
|
||||
align: 'left',
|
||||
|
@ -104,19 +105,26 @@ const columns = computed(() => [
|
|||
},
|
||||
]);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<VnSearchbar data-key="SuppliersList" :limit="20" :label="t('Search suppliers')" />
|
||||
<RightMenu>
|
||||
<template #right-panel>
|
||||
<SupplierListFilter data-key="SuppliersList" />
|
||||
</template>
|
||||
</RightMenu>
|
||||
<FetchData
|
||||
url="Provinces"
|
||||
:filter="{ fields: ['id', 'name'], order: 'name ASC' }"
|
||||
@on-fetch="(data) => (provincesOptions = data)"
|
||||
auto-load
|
||||
/>
|
||||
<VnSection
|
||||
:data-key="dataKey"
|
||||
:columns="columns"
|
||||
prefix="supplier"
|
||||
:array-data-props="{
|
||||
url: 'Suppliers/filter',
|
||||
order: 'id ASC',
|
||||
}"
|
||||
>
|
||||
<template #body>
|
||||
<VnTable
|
||||
ref="tableRef"
|
||||
data-key="SuppliersList"
|
||||
url="Suppliers/filter"
|
||||
redirect="supplier"
|
||||
:data-key="dataKey"
|
||||
:create="{
|
||||
urlCreate: 'Suppliers/newSupplier',
|
||||
title: t('Create Supplier'),
|
||||
|
@ -124,19 +132,36 @@ const columns = computed(() => [
|
|||
formInitialData: {},
|
||||
mapper: (data) => {
|
||||
data.name = data.socialName;
|
||||
|
||||
delete data.socialName;
|
||||
return data;
|
||||
},
|
||||
}"
|
||||
:right-search="false"
|
||||
order="id ASC"
|
||||
:columns="columns"
|
||||
redirect="supplier"
|
||||
:right-search="false"
|
||||
>
|
||||
<template #more-create-dialog="{ data }">
|
||||
<VnInput :label="t('globals.name')" v-model="data.socialName" :uppercase="true" />
|
||||
<VnInput
|
||||
:label="t('globals.name')"
|
||||
v-model="data.socialName"
|
||||
:uppercase="true"
|
||||
/>
|
||||
</template>
|
||||
</VnTable>
|
||||
</template>
|
||||
<template #moreFilterPanel="{ params, searchFn }">
|
||||
<VnSelect
|
||||
:label="t('globals.params.provinceFk')"
|
||||
v-model="params.provinceFk"
|
||||
@update:model-value="searchFn()"
|
||||
:options="provincesOptions"
|
||||
filled
|
||||
dense
|
||||
class="q-px-sm q-pr-lg"
|
||||
/>
|
||||
</template>
|
||||
</VnSection>
|
||||
</template>
|
||||
|
||||
<i18n>
|
||||
es:
|
||||
|
|
|
@ -1,122 +0,0 @@
|
|||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
|
||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
import FetchData from 'components/FetchData.vue';
|
||||
|
||||
const props = defineProps({
|
||||
dataKey: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const provincesOptions = ref([]);
|
||||
const countriesOptions = ref([]);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<FetchData
|
||||
url="Provinces"
|
||||
:filter="{ fields: ['id', 'name'], order: 'name ASC'}"
|
||||
@on-fetch="(data) => (provincesOptions = data)"
|
||||
auto-load
|
||||
/>
|
||||
<FetchData
|
||||
url="countries"
|
||||
:filter="{ fields: ['id', 'name'], order: 'name ASC'}"
|
||||
@on-fetch="(data) => (countriesOptions = data)"
|
||||
auto-load
|
||||
/>
|
||||
<VnFilterPanel
|
||||
:data-key="props.dataKey"
|
||||
:search-button="true"
|
||||
:unremovable-params="['supplierFk']"
|
||||
>
|
||||
<template #tags="{ tag, formatFn }">
|
||||
<div class="q-gutter-x-xs">
|
||||
<strong>{{ t(`params.${tag.label}`) }}: </strong>
|
||||
<span>{{ formatFn(tag.value) }}</span>
|
||||
</div>
|
||||
</template>
|
||||
<template #body="{ params, searchFn }">
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<VnInput
|
||||
v-model="params.search"
|
||||
:label="t('params.search')"
|
||||
is-outlined
|
||||
/>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<VnInput
|
||||
v-model="params.nickname"
|
||||
:label="t('params.nickname')"
|
||||
is-outlined
|
||||
/>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<VnInput v-model="params.nif" :label="t('params.nif')" is-outlined />
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<VnSelect
|
||||
:label="t('params.provinceFk')"
|
||||
v-model="params.provinceFk"
|
||||
@update:model-value="searchFn()"
|
||||
:options="provincesOptions"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
hide-selected
|
||||
dense
|
||||
outlined
|
||||
rounded
|
||||
/>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<VnSelect
|
||||
:label="t('params.countryFk')"
|
||||
v-model="params.countryFk"
|
||||
@update:model-value="searchFn()"
|
||||
:options="countriesOptions"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
hide-selected
|
||||
dense
|
||||
outlined
|
||||
rounded
|
||||
/>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
</template>
|
||||
</VnFilterPanel>
|
||||
</template>
|
||||
|
||||
<i18n>
|
||||
en:
|
||||
params:
|
||||
search: General search
|
||||
nickname: Alias
|
||||
nif: Tax number
|
||||
provinceFk: Province
|
||||
countryFk: Country
|
||||
es:
|
||||
params:
|
||||
search: Búsqueda general
|
||||
nickname: Alias
|
||||
nif: NIF/CIF
|
||||
provinceFk: Provincia
|
||||
countryFk: País
|
||||
</i18n>
|
|
@ -1,19 +1,12 @@
|
|||
import { RouterView } from 'vue-router';
|
||||
|
||||
export default {
|
||||
path: '/supplier',
|
||||
name: 'Supplier',
|
||||
const supplierCard = {
|
||||
name: 'SupplierCard',
|
||||
path: ':id',
|
||||
component: () => import('src/pages/Supplier/Card/SupplierCard.vue'),
|
||||
redirect: { name: 'SupplierSummary' },
|
||||
meta: {
|
||||
title: 'suppliers',
|
||||
icon: 'vn:supplier',
|
||||
moduleName: 'Supplier',
|
||||
keyBinding: 'p',
|
||||
},
|
||||
component: RouterView,
|
||||
redirect: { name: 'SupplierMain' },
|
||||
menus: {
|
||||
main: ['SupplierList'],
|
||||
card: [
|
||||
menu: [
|
||||
'SupplierBasicData',
|
||||
'SupplierFiscalData',
|
||||
'SupplierBillingData',
|
||||
|
@ -27,38 +20,6 @@ export default {
|
|||
'SupplierDms',
|
||||
],
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
name: 'SupplierMain',
|
||||
component: () => import('src/components/common/VnModule.vue'),
|
||||
redirect: { name: 'SupplierList' },
|
||||
children: [
|
||||
{
|
||||
path: 'list',
|
||||
name: 'SupplierList',
|
||||
meta: {
|
||||
title: 'list',
|
||||
icon: 'view_list',
|
||||
},
|
||||
component: () => import('src/pages/Supplier/SupplierList.vue'),
|
||||
},
|
||||
{
|
||||
path: 'create',
|
||||
name: 'SupplierCreate',
|
||||
meta: {
|
||||
title: 'supplierCreate',
|
||||
icon: 'add',
|
||||
},
|
||||
component: () => import('src/pages/Supplier/SupplierCreate.vue'),
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'SupplierCard',
|
||||
path: ':id',
|
||||
component: () => import('src/pages/Supplier/Card/SupplierCard.vue'),
|
||||
redirect: { name: 'SupplierSummary' },
|
||||
children: [
|
||||
{
|
||||
name: 'SupplierSummary',
|
||||
|
@ -67,8 +28,7 @@ export default {
|
|||
title: 'summary',
|
||||
icon: 'launch',
|
||||
},
|
||||
component: () =>
|
||||
import('src/pages/Supplier/Card/SupplierSummary.vue'),
|
||||
component: () => import('src/pages/Supplier/Card/SupplierSummary.vue'),
|
||||
},
|
||||
{
|
||||
path: 'basic-data',
|
||||
|
@ -77,8 +37,7 @@ export default {
|
|||
title: 'basicData',
|
||||
icon: 'vn:settings',
|
||||
},
|
||||
component: () =>
|
||||
import('src/pages/Supplier/Card/SupplierBasicData.vue'),
|
||||
component: () => import('src/pages/Supplier/Card/SupplierBasicData.vue'),
|
||||
},
|
||||
{
|
||||
path: 'fiscal-data',
|
||||
|
@ -87,8 +46,7 @@ export default {
|
|||
title: 'fiscalData',
|
||||
icon: 'vn:dfiscales',
|
||||
},
|
||||
component: () =>
|
||||
import('src/pages/Supplier/Card/SupplierFiscalData.vue'),
|
||||
component: () => import('src/pages/Supplier/Card/SupplierFiscalData.vue'),
|
||||
},
|
||||
{
|
||||
path: 'billing-data',
|
||||
|
@ -97,8 +55,7 @@ export default {
|
|||
title: 'billingData',
|
||||
icon: 'vn:payment',
|
||||
},
|
||||
component: () =>
|
||||
import('src/pages/Supplier/Card/SupplierBillingData.vue'),
|
||||
component: () => import('src/pages/Supplier/Card/SupplierBillingData.vue'),
|
||||
},
|
||||
{
|
||||
path: 'log',
|
||||
|
@ -116,8 +73,7 @@ export default {
|
|||
title: 'accounts',
|
||||
icon: 'vn:credit',
|
||||
},
|
||||
component: () =>
|
||||
import('src/pages/Supplier/Card/SupplierAccounts.vue'),
|
||||
component: () => import('src/pages/Supplier/Card/SupplierAccounts.vue'),
|
||||
},
|
||||
{
|
||||
path: 'contact',
|
||||
|
@ -126,8 +82,7 @@ export default {
|
|||
title: 'contacts',
|
||||
icon: 'contact_phone',
|
||||
},
|
||||
component: () =>
|
||||
import('src/pages/Supplier/Card/SupplierContacts.vue'),
|
||||
component: () => import('src/pages/Supplier/Card/SupplierContacts.vue'),
|
||||
},
|
||||
{
|
||||
path: 'address',
|
||||
|
@ -136,8 +91,7 @@ export default {
|
|||
title: 'addresses',
|
||||
icon: 'vn:delivery',
|
||||
},
|
||||
component: () =>
|
||||
import('src/pages/Supplier/Card/SupplierAddresses.vue'),
|
||||
component: () => import('src/pages/Supplier/Card/SupplierAddresses.vue'),
|
||||
},
|
||||
{
|
||||
path: 'address/create',
|
||||
|
@ -152,8 +106,7 @@ export default {
|
|||
title: 'balance',
|
||||
icon: 'balance',
|
||||
},
|
||||
component: () =>
|
||||
import('src/pages/Supplier/Card/SupplierBalance.vue'),
|
||||
component: () => import('src/pages/Supplier/Card/SupplierBalance.vue'),
|
||||
},
|
||||
{
|
||||
path: 'consumption',
|
||||
|
@ -162,8 +115,7 @@ export default {
|
|||
title: 'consumption',
|
||||
icon: 'show_chart',
|
||||
},
|
||||
component: () =>
|
||||
import('src/pages/Supplier/Card/SupplierConsumption.vue'),
|
||||
component: () => import('src/pages/Supplier/Card/SupplierConsumption.vue'),
|
||||
},
|
||||
{
|
||||
path: 'agency-term',
|
||||
|
@ -172,8 +124,7 @@ export default {
|
|||
title: 'agencyTerm',
|
||||
icon: 'vn:agency-term',
|
||||
},
|
||||
component: () =>
|
||||
import('src/pages/Supplier/Card/SupplierAgencyTerm.vue'),
|
||||
component: () => import('src/pages/Supplier/Card/SupplierAgencyTerm.vue'),
|
||||
},
|
||||
{
|
||||
path: 'dms',
|
||||
|
@ -191,6 +142,54 @@ export default {
|
|||
import('src/pages/Supplier/Card/SupplierAgencyTermCreate.vue'),
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
export default {
|
||||
name: 'Supplier',
|
||||
path: '/supplier',
|
||||
meta: {
|
||||
title: 'suppliers',
|
||||
icon: 'vn:supplier',
|
||||
moduleName: 'Supplier',
|
||||
keyBinding: 'p',
|
||||
menu: ['SupplierList'],
|
||||
},
|
||||
component: RouterView,
|
||||
redirect: { name: 'SupplierMain' },
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
name: 'SupplierMain',
|
||||
component: () => import('src/components/common/VnModule.vue'),
|
||||
redirect: { name: 'SupplierIndexMain' },
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
name: 'SupplierIndexMain',
|
||||
redirect: { name: 'SupplierList' },
|
||||
component: () => import('src/pages/Supplier/SupplierList.vue'),
|
||||
children: [
|
||||
{
|
||||
path: 'list',
|
||||
name: 'SupplierList',
|
||||
meta: {
|
||||
title: 'list',
|
||||
icon: 'view_list',
|
||||
},
|
||||
},
|
||||
supplierCard,
|
||||
],
|
||||
},
|
||||
{
|
||||
path: 'create',
|
||||
name: 'SupplierCreate',
|
||||
meta: {
|
||||
title: 'supplierCreate',
|
||||
icon: 'add',
|
||||
},
|
||||
component: () => import('src/pages/Supplier/SupplierCreate.vue'),
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue