diff --git a/src/components/ui/VnNotes.vue b/src/components/ui/VnNotes.vue
index f02551575..fac74837f 100644
--- a/src/components/ui/VnNotes.vue
+++ b/src/components/ui/VnNotes.vue
@@ -1,11 +1,11 @@
-
+
-
+
-
- {{ `${note.worker.firstName} ${note.worker.lastName}` }}
-
-
+
+
{{ toDateHour(note.created) }}
@@ -115,6 +116,10 @@ async function insert() {
diff --git a/src/components/ui/VnSubToolbar.vue b/src/components/ui/VnSubToolbar.vue
new file mode 100644
index 000000000..81a1820f1
--- /dev/null
+++ b/src/components/ui/VnSubToolbar.vue
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/components/ui/VnUserLink.vue b/src/components/ui/VnUserLink.vue
new file mode 100644
index 000000000..33836550a
--- /dev/null
+++ b/src/components/ui/VnUserLink.vue
@@ -0,0 +1,21 @@
+
+
+
+
+ {{ $props.defaultName ? $props.name ?? t('globals.system') : $props.name }}
+
+
+
+
+
diff --git a/src/composables/useArrayData.js b/src/composables/useArrayData.js
index 9f0be6b1d..9f66a0e89 100644
--- a/src/composables/useArrayData.js
+++ b/src/composables/useArrayData.js
@@ -58,7 +58,7 @@ export function useArrayData(key, userOptions) {
}
}
- async function fetch({ append = false }) {
+ async function fetch({ append = false, updateRouter = true }) {
if (!store.url) return;
cancelRequest();
@@ -90,7 +90,7 @@ export function useArrayData(key, userOptions) {
Object.assign(params, userParams);
store.isLoading = true;
-
+ store.currentFilter = params;
const response = await axios.get(store.url, {
signal: canceller.signal,
params,
@@ -100,15 +100,12 @@ export function useArrayData(key, userOptions) {
hasMoreData.value = response.data.length === limit;
- if (append === true) {
+ if (append) {
if (!store.data) store.data = [];
for (const row of response.data) store.data.push(row);
- }
-
- if (append === false) {
+ } else {
store.data = response.data;
-
- updateStateParams();
+ updateRouter && updateStateParams();
}
store.isLoading = false;
@@ -156,7 +153,9 @@ export function useArrayData(key, userOptions) {
delete store.userParams[param];
delete params[param];
if (store.filter?.where) {
- delete store.filter.where[Object.keys(exprBuilder ? exprBuilder(param) : param)[0]];
+ delete store.filter.where[
+ Object.keys(exprBuilder ? exprBuilder(param) : param)[0]
+ ];
if (Object.keys(store.filter.where).length === 0) {
delete store.filter.where;
}
diff --git a/src/composables/useUserConfig.js b/src/composables/useUserConfig.js
index 692943978..e05d7fb5c 100644
--- a/src/composables/useUserConfig.js
+++ b/src/composables/useUserConfig.js
@@ -16,7 +16,7 @@ export function useUserConfig() {
return data;
} catch (error) {
- notify('globals.errors.userConfig', 'negative');
+ notify('errors.userConfig', 'negative');
console.error('Error fetching user config:', error);
}
}
diff --git a/src/css/app.scss b/src/css/app.scss
index f0c26d482..bcc75ab38 100644
--- a/src/css/app.scss
+++ b/src/css/app.scss
@@ -17,9 +17,9 @@ a {
// Removes chrome autofill background
input:-webkit-autofill,
select:-webkit-autofill {
- color: $input-text-color !important;
+ color: var(--vn-text) ;
font-family: $typography-font-family;
- -webkit-text-fill-color: $input-text-color !important;
+ -webkit-text-fill-color: var(--vn-text) ;
-webkit-background-clip: text !important;
background-clip: text !important;
}
diff --git a/src/i18n/en/index.js b/src/i18n/en/index.js
index d6c569618..bd59edad1 100644
--- a/src/i18n/en/index.js
+++ b/src/i18n/en/index.js
@@ -62,7 +62,8 @@ export default {
selectRows: 'Select all { numberRows } row(s)',
allRows: 'All { numberRows } row(s)',
markAll: 'Mark all',
- noResults: 'No results'
+ noResults: 'No results',
+ system: 'System',
},
errors: {
statusUnauthorized: 'Access denied',
@@ -109,6 +110,7 @@ export default {
customer: {
pageTitles: {
customers: 'Customers',
+ create: 'Create',
list: 'List',
webPayments: 'Web Payments',
extendedList: 'Extended list',
@@ -905,6 +907,41 @@ export default {
payDemFk: 'Payment deadline',
payDay: 'Pay day',
},
+ accounts: {
+ iban: 'Iban',
+ bankEntity: 'Bank entity',
+ beneficiary: 'Beneficiary',
+ },
+ contacts: {
+ name: 'Name',
+ phone: 'Phone',
+ mobile: 'Mobile',
+ email: 'Email',
+ observation: 'Notes',
+ },
+ addresses: {
+ street: 'Street',
+ postcode: 'Postcode',
+ phone: 'Phone',
+ name: 'Name',
+ city: 'City',
+ province: 'Province',
+ mobile: 'Mobile',
+ },
+ agencyTerms: {
+ agencyFk: 'Agency',
+ minimumM3: 'Minimum M3',
+ packagePrice: 'Package Price',
+ kmPrice: 'Km Price',
+ m3Price: 'M3 Price',
+ routePrice: 'Route price',
+ minimumKm: 'Minimum Km',
+ },
+ consumption: {
+ entry: 'Entry',
+ date: 'Date',
+ reference: 'Reference',
+ },
},
travel: {
pageTitles: {
@@ -944,6 +981,7 @@ export default {
components: {
topbar: {},
userPanel: {
+ copyToken: 'Token copied to clipboard',
settings: 'Settings',
logOut: 'Log Out',
},
diff --git a/src/i18n/es/index.js b/src/i18n/es/index.js
index 6fd60bfd9..94f508429 100644
--- a/src/i18n/es/index.js
+++ b/src/i18n/es/index.js
@@ -62,7 +62,8 @@ export default {
selectRows: 'Seleccionar las { numberRows } filas(s)',
allRows: 'Todo { numberRows } filas(s)',
markAll: 'Marcar todo',
- noResults: 'Sin resultados'
+ noResults: 'Sin resultados',
+ system: 'Sistema',
},
errors: {
statusUnauthorized: 'Acceso denegado',
@@ -109,6 +110,7 @@ export default {
customer: {
pageTitles: {
customers: 'Clientes',
+ create: 'Crear',
list: 'Listado',
webPayments: 'Pagos Web',
extendedList: 'Listado extendido',
@@ -856,7 +858,7 @@ export default {
payDeadline: 'Plazo de pago',
payDay: 'Día de pago',
account: 'Cuenta',
- fiscalData: 'Data fiscal',
+ fiscalData: 'Datos fiscales',
sageTaxType: 'Tipo de impuesto Sage',
sageTransactionType: 'Tipo de transacción Sage',
sageWithholding: 'Retención sage',
@@ -904,6 +906,41 @@ export default {
payDemFk: 'Plazo de pago',
payDay: 'Día de pago',
},
+ accounts: {
+ iban: 'Iban',
+ bankEntity: 'Entidad bancaria',
+ beneficiary: 'Beneficiario',
+ },
+ contacts: {
+ name: 'Nombre',
+ phone: 'Teléfono',
+ mobile: 'Móvil',
+ email: 'Email',
+ observation: 'Notas',
+ },
+ addresses: {
+ street: 'Dirección',
+ postcode: 'Código postal',
+ phone: 'Teléfono',
+ name: 'Nombre',
+ city: 'Población',
+ province: 'Provincia',
+ mobile: 'Móvil',
+ },
+ agencyTerms: {
+ agencyFk: 'Agencia',
+ minimumM3: 'M3 mínimos',
+ packagePrice: 'Precio bulto',
+ kmPrice: 'Precio Km',
+ m3Price: 'Precio M3',
+ routePrice: 'Precio ruta',
+ minimumKm: 'Km mínimos',
+ },
+ consumption: {
+ entry: 'Entrada',
+ date: 'Fecha',
+ reference: 'Referencia',
+ },
},
travel: {
pageTitles: {
@@ -943,6 +980,7 @@ export default {
components: {
topbar: {},
userPanel: {
+ copyToken: 'Token copiado al portapapeles',
settings: 'Configuración',
logOut: 'Cerrar sesión',
},
diff --git a/src/i18n/index.js b/src/i18n/index.js
index 7344be49a..a375812df 100644
--- a/src/i18n/index.js
+++ b/src/i18n/index.js
@@ -1,6 +1,8 @@
import en from './en';
import es from './es';
-
+export const localeEquivalence = {
+ 'en':'en-GB'
+}
export default {
en: en,
es: es,
diff --git a/src/layouts/MainLayout.vue b/src/layouts/MainLayout.vue
index 9c076d98c..021ee685a 100644
--- a/src/layouts/MainLayout.vue
+++ b/src/layouts/MainLayout.vue
@@ -1,7 +1,6 @@
diff --git a/src/layouts/OutLayout.vue b/src/layouts/OutLayout.vue
index f21e6e568..8e9ab3e41 100644
--- a/src/layouts/OutLayout.vue
+++ b/src/layouts/OutLayout.vue
@@ -26,6 +26,7 @@ const userLocale = computed({
}
},
});
+
const darkMode = computed({
get() {
return Dark.isActive;
diff --git a/src/pages/Claim/Card/ClaimAction.vue b/src/pages/Claim/Card/ClaimAction.vue
index 44575f1d6..e92e65fc7 100644
--- a/src/pages/Claim/Card/ClaimAction.vue
+++ b/src/pages/Claim/Card/ClaimAction.vue
@@ -127,11 +127,14 @@ async function updateDestination(claimDestinationFk, row, options = {}) {
}
async function regularizeClaim() {
- const query = `Claims/${claimId}/regularizeClaim`;
-
- await axios.post(query);
+ await axios.post(`Claims/${claimId}/regularizeClaim`);
+ await claimRef.value.fetch();
+ await arrayData.fetch({ append: false });
+ quasar.notify({
+ message: t('globals.dataSaved'),
+ type: 'positive',
+ });
if (claim.value.responsibility >= Math.ceil(DEFAULT_MAX_RESPONSABILITY) / 2) {
- await claimRef.value.fetch();
quasar
.dialog({
component: VnConfirm,
@@ -141,29 +144,19 @@ async function regularizeClaim() {
},
})
.onOk(async () => await onUpdateGreugeAccept());
- } else {
- quasar.notify({
- message: t('globals.dataSaved'),
- type: 'positive',
- });
}
- await arrayData.fetch({ append: false });
-}
-
-async function updateGreuge(greuges) {
- const { data } = await axios.post(`Greuges`, greuges);
- quasar.notify({
- message: t('globals.dataSaved'),
- type: 'positive',
- });
- return data;
}
async function onUpdateGreugeAccept() {
- const greugeTypeFreightId = await getGreugeTypeId();
- const freightPickUpPrice = await getGreugeConfig();
+ const greugeTypeFreightId = (
+ await axios.get(`GreugeTypes/findOne`, {
+ filter: { where: { code: 'freightPickUp' } },
+ })
+ ).data.id;
+ const freightPickUpPrice = (await axios.get(`GreugeConfigs/findOne`)).data
+ .freightPickUpPrice;
- await updateGreuge({
+ await axios.post(`Greuges`, {
clientFk: claim.value.clientFk,
description: `${t('ClaimGreugeDescription')} ${claimId}`.toUpperCase(),
amount: freightPickUpPrice,
@@ -176,19 +169,6 @@ async function onUpdateGreugeAccept() {
});
}
-async function getGreugeTypeId() {
- const params = { filter: { where: { code: 'freightPickUp' } } };
- const query = `GreugeTypes/findOne`;
- const { data } = await axios.get(query, { params });
- return data.id;
-}
-
-async function getGreugeConfig() {
- const query = `GreugeConfigs/findOne`;
- const { data } = await axios.get(query);
- return data.freightPickUpPrice;
-}
-
async function save(data) {
const query = `Claims/${claimId}/updateClaimAction`;
await axios.patch(query, data);
@@ -302,6 +282,8 @@ async function importToNewRefundTicket() {
selection="multiple"
v-model:selected="selectedRows"
:grid="$q.screen.lt.md"
+ :pagination="{ rowsPerPage: 0 }"
+ :hide-bottom="true"
>
@@ -355,7 +337,23 @@ async function importToNewRefundTicket() {
- {{ column.value.description }}
+
+ updateDestination(
+ value,
+ props.row
+ )
+ "
+ />
{{ column.value }}
@@ -437,25 +435,6 @@ async function importToNewRefundTicket() {
-
diff --git a/src/pages/Order/Card/OrderCard.vue b/src/pages/Order/Card/OrderCard.vue
index 4163e22a4..7ac083c37 100644
--- a/src/pages/Order/Card/OrderCard.vue
+++ b/src/pages/Order/Card/OrderCard.vue
@@ -2,6 +2,7 @@
import LeftMenu from 'components/LeftMenu.vue';
import { useStateStore } from 'stores/useStateStore';
import OrderDescriptor from 'pages/Order/Card/OrderDescriptor.vue';
+import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
const stateStore = useStateStore();
@@ -15,9 +16,8 @@ const stateStore = useStateStore();
-
-
-
+
+
diff --git a/src/pages/Order/Card/OrderCatalogFilter.vue b/src/pages/Order/Card/OrderCatalogFilter.vue
index 0859e14a6..c325a9b05 100644
--- a/src/pages/Order/Card/OrderCatalogFilter.vue
+++ b/src/pages/Order/Card/OrderCatalogFilter.vue
@@ -1,11 +1,14 @@
-
-
-
-
-
(clientList = data)"
:filter="{ fields: ['id', 'name', 'defaultAddressFk'] }"
auto-load
/>
-
-
-
-
- fetchAddressList(client.defaultAddressFk)
- "
- >
-
-
-
-
- {{ `${scope.opt.id}: ${scope.opt.name}` }}
-
-
-
-
-
-
-
- fetchAgencyList(data.landed, data.addressFk)
- "
- >
-
-
-
-
- {{
- `${scope.opt.nickname}: ${scope.opt.street},${scope.opt.city}`
- }}
-
-
-
-
-
-
-
-
-
- fetchAgencyList(data.landed, data.addressFk)
- "
- />
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+ fetchAddressList(client.defaultAddressFk)
+ "
+ >
+
+
+
+
+ {{ `${scope.opt.id}: ${scope.opt.name}` }}
+
+
+
+
+
+
+
+ fetchAgencyList(data.landed, data.addressFk)
+ "
+ >
+
+
+
+
+ {{
+ `${scope.opt.nickname}: ${scope.opt.street},${scope.opt.city}`
+ }}
+
+
+
+
+
+
+
+
+
+ fetchAgencyList(data.landed, data.addressFk)
+ "
+ />
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/Order/Card/OrderSummary.vue b/src/pages/Order/Card/OrderSummary.vue
index 0ddae2d16..9b26891a1 100644
--- a/src/pages/Order/Card/OrderSummary.vue
+++ b/src/pages/Order/Card/OrderSummary.vue
@@ -56,148 +56,161 @@ const detailsColumns = ref([
-
-
- {{ t('order.summary.basket') }} #{{ entity?.id }} -
- {{ entity?.client?.name }} ({{ entity?.clientFk }})
-
-
-
-
-
-
-
- {{ dashIfEmpty(entity?.address?.nickname) }}
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ dashIfEmpty(entity?.address?.phone) }}
-
-
-
-
-
-
-
-
-
-
-
- {{ entity?.note }}
-
-
-
-
-
- {{ t('order.summary.subtotal') }}
-
-
- {{ toCurrency(entity?.subTotal) }}
-
-
-
-
- {{ t('order.summary.vat') }}
-
-
- {{ toCurrency(entity?.VAT) }}
-
-
-
-
- {{ t('order.summary.total') }}
-
-
- {{ toCurrency(entity?.total) }}
-
-
-
-
-
-
-
-
- {{ t('order.summary.item') }}
- {{ t('order.summary.description') }}
- {{ t('order.summary.quantity') }}
- {{ t('order.summary.price') }}
- {{ t('order.summary.amount') }}
-
-
-
-
-
- {{ props.row.item?.id }}
-
-
-
- {{ props.row.item.name }}
-
- {{ props.row.item.subName }}
-
-
-
-
-
- {{ props.row.quantity }}
-
-
- {{ props.row.price }}
-
-
- {{ toCurrency(props.row?.quantity * props.row?.price) }}
-
-
-
-
-
-
-
+
+
+
+
+ {{ t('order.summary.basket') }} #{{ entity?.id }} -
+ {{ entity?.client?.name }} ({{ entity?.clientFk }})
+
+
+
+
+
+
+
+ {{ dashIfEmpty(entity?.address?.nickname) }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ dashIfEmpty(entity?.address?.phone) }}
+
+
+
+
+
+
+
+
+
+
+
+ {{ entity?.note }}
+
+
+
+
+
+ {{ t('order.summary.subtotal') }}
+
+
+ {{
+ toCurrency(entity?.subTotal)
+ }}
+
+
+
+
+ {{ t('order.summary.vat') }}
+
+
+ {{ toCurrency(entity?.VAT) }}
+
+
+
+
+ {{ t('order.summary.total') }}
+
+
+ {{ toCurrency(entity?.total) }}
+
+
+
+
+
+
+
+
+ {{ t('order.summary.item') }}
+ {{ t('order.summary.description') }}
+ {{ t('order.summary.quantity') }}
+ {{ t('order.summary.price') }}
+ {{ t('order.summary.amount') }}
+
+
+
+
+
+ {{ props.row.item?.id }}
+
+
+
+ {{ props.row.item.name }}
+
+ {{ props.row.item.subName }}
+
+
+
+
+
+ {{ props.row.quantity }}
+
+
+ {{ props.row.price }}
+
+
+ {{
+ toCurrency(props.row?.quantity * props.row?.price)
+ }}
+
+
+
+
+
+
+
+
diff --git a/src/pages/Supplier/Card/SupplierAddressesCreate.vue b/src/pages/Supplier/Card/SupplierAddressesCreate.vue
new file mode 100644
index 000000000..8ad0959f5
--- /dev/null
+++ b/src/pages/Supplier/Card/SupplierAddressesCreate.vue
@@ -0,0 +1,182 @@
+
+
+
+ (postcodesOptions = data)"
+ auto-load
+ />
+ (provincesOptions = data)"
+ auto-load
+ url="Provinces"
+ />
+ (townsLocationOptions = data)"
+ auto-load
+ url="Towns/location"
+ />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ scope.opt.code }}
+ {{ scope.opt.code }} -
+ {{ scope.opt.town.name }} ({{
+ scope.opt.town.province.name
+ }},
+ {{
+ scope.opt.town.province.country.country
+ }})
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/Supplier/Card/SupplierAgencyTerm.vue b/src/pages/Supplier/Card/SupplierAgencyTerm.vue
index 2a0c341cf..a300ae8e7 100644
--- a/src/pages/Supplier/Card/SupplierAgencyTerm.vue
+++ b/src/pages/Supplier/Card/SupplierAgencyTerm.vue
@@ -1 +1,139 @@
-Supplier agency term
+
+
+ (agenciesOptions = data)"
+ auto-load
+ />
+
+
+
+
+
+
+
+
+ {{ row.agency?.name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ t('Remove row') }}
+
+
+
+
+
+
+
+
+
+
+ {{ t('supplier.list.newSupplier') }}
+
+
+
+
+
+ es:
+ Remove row: Eliminar fila
+
diff --git a/src/pages/Supplier/Card/SupplierAgencyTermCreate.vue b/src/pages/Supplier/Card/SupplierAgencyTermCreate.vue
new file mode 100644
index 000000000..00f0b868f
--- /dev/null
+++ b/src/pages/Supplier/Card/SupplierAgencyTermCreate.vue
@@ -0,0 +1,113 @@
+
+
+
+ (agenciesOptions = data)"
+ auto-load
+ />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/Supplier/Card/SupplierCard.vue b/src/pages/Supplier/Card/SupplierCard.vue
index 04115cc3d..6b6e8c7f7 100644
--- a/src/pages/Supplier/Card/SupplierCard.vue
+++ b/src/pages/Supplier/Card/SupplierCard.vue
@@ -4,6 +4,7 @@ import { useStateStore } from 'stores/useStateStore';
import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
import LeftMenu from 'components/LeftMenu.vue';
import SupplierDescriptor from './SupplierDescriptor.vue';
+import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
const stateStore = useStateStore();
const { t } = useI18n();
@@ -27,11 +28,7 @@ const { t } = useI18n();
-
-
-
-
-
+
diff --git a/src/pages/Supplier/Card/SupplierConsumption.vue b/src/pages/Supplier/Card/SupplierConsumption.vue
index df1dead17..714499f63 100644
--- a/src/pages/Supplier/Card/SupplierConsumption.vue
+++ b/src/pages/Supplier/Card/SupplierConsumption.vue
@@ -1 +1,192 @@
-Supplier consumption
+
+
+
+ (suppliersConsumption = data)"
+ :filter="{
+ where: { supplierFk: route.params.id },
+ order: ['itemTypeFk', 'itemName', 'itemSize'],
+ }"
+ :params="userParams"
+ auto-load
+ />
+
+
+
+
+ {{ t('Open as PDF') }}
+
+
+
+
+ {{ t('Send to email') }}
+
+
+
+
+
+
+
+
+
+
+ {{
+ t('supplier.consumption.entry')
+ }}
+ {{ row.id }}
+ {{ t('supplier.consumption.date') }}
+ {{ toDate(row.shipped) }}
+ {{
+ t('supplier.consumption.reference')
+ }}
+ {{ row.invoiceNumber }}
+
+
+ {{ buy.itemName }}
+
+
+ {{ buy.subName }}
+
+
+ {{ dashIfEmpty(buy.quantity) }}
+ {{ dashIfEmpty(buy.price) }}
+ {{ dashIfEmpty(buy.total) }}
+
+
+
+ {{ t('Total entry') }}:
+ {{ calculateTotal(row.buys) }}
+
+
+
+
+
+
+
+
+
+
+es:
+ Total entry: Total entrada
+ Open as PDF: Abrir como PDF
+ Send to email: Enviar por email
+ This supplier does not have a contact with an email address: Este proveedor no tiene un email de contacto
+
diff --git a/src/pages/Supplier/Card/SupplierContacts.vue b/src/pages/Supplier/Card/SupplierContacts.vue
index ca58d4ab7..d69b74a4c 100644
--- a/src/pages/Supplier/Card/SupplierContacts.vue
+++ b/src/pages/Supplier/Card/SupplierContacts.vue
@@ -1 +1,118 @@
-Supplier contacts
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ t('Remove contact') }}
+
+
+
+
+
+
+
+
+ {{ t('Add contact') }}
+
+
+
+
+
+
+
+
+
+
+
+ es:
+ Add contact: Añadir contacto
+ Remove contact: Remover contacto
+
diff --git a/src/pages/Supplier/Card/SupplierDescriptor.vue b/src/pages/Supplier/Card/SupplierDescriptor.vue
index 910d36489..43857fd1e 100644
--- a/src/pages/Supplier/Card/SupplierDescriptor.vue
+++ b/src/pages/Supplier/Card/SupplierDescriptor.vue
@@ -78,11 +78,11 @@ const setData = (entity) => {
diff --git a/src/pages/Supplier/Card/SupplierSummary.vue b/src/pages/Supplier/Card/SupplierSummary.vue
index 8f09b5510..29b0c18c4 100644
--- a/src/pages/Supplier/Card/SupplierSummary.vue
+++ b/src/pages/Supplier/Card/SupplierSummary.vue
@@ -3,11 +3,11 @@ import { onMounted, ref, computed, onUpdated } from 'vue';
import { useRoute } from 'vue-router';
import { useI18n } from 'vue-i18n';
import CardSummary from 'components/ui/CardSummary.vue';
-import WorkerDescriptorProxy from 'pages/Worker/Card/WorkerDescriptorProxy.vue';
import VnLv from 'src/components/ui/VnLv.vue';
import { getUrl } from 'src/composables/getUrl';
import { useRole } from 'src/composables/useRole';
import { dashIfEmpty } from 'src/filters';
+import VnUserLink from 'src/components/ui/VnUserLink.vue';
onUpdated(() => summaryRef.value.fetch());
@@ -71,13 +71,10 @@ const isAdministrative = computed(() => {
-
- {{ dashIfEmpty(supplier.worker?.user?.nickname) }}
-
-
+
diff --git a/src/pages/Supplier/SupplierCreate.vue b/src/pages/Supplier/SupplierCreate.vue
index d6cfaeb42..ebe0518f2 100644
--- a/src/pages/Supplier/SupplierCreate.vue
+++ b/src/pages/Supplier/SupplierCreate.vue
@@ -5,6 +5,7 @@ import VnSearchbar from 'components/ui/VnSearchbar.vue';
import FormModel from 'components/FormModel.vue';
import VnRow from 'components/ui/VnRow.vue';
import VnInput from 'src/components/common/VnInput.vue';
+import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
import { useStateStore } from 'stores/useStateStore';
@@ -28,11 +29,7 @@ const newSupplierForm = reactive({
-
-
-
-
-
+
-
-
-
-
-
+
+
diff --git a/src/pages/Ticket/Card/TicketDescriptor.vue b/src/pages/Ticket/Card/TicketDescriptor.vue
index d2a407874..37ed13c2e 100644
--- a/src/pages/Ticket/Card/TicketDescriptor.vue
+++ b/src/pages/Ticket/Card/TicketDescriptor.vue
@@ -8,7 +8,7 @@ import CardDescriptor from 'components/ui/CardDescriptor.vue';
import TicketDescriptorMenu from './TicketDescriptorMenu.vue';
import VnLv from 'src/components/ui/VnLv.vue';
import useCardDescription from 'src/composables/useCardDescription';
-import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
+import VnUserLink from 'src/components/ui/VnUserLink.vue';
const $props = defineProps({
id: {
@@ -106,13 +106,10 @@ const setData = (entity) =>
-
- {{ entity.client.salesPersonUser.name }}
-
-
+
diff --git a/src/pages/Ticket/Card/TicketSms.vue b/src/pages/Ticket/Card/TicketSms.vue
index b145be50e..ff7de6611 100644
--- a/src/pages/Ticket/Card/TicketSms.vue
+++ b/src/pages/Ticket/Card/TicketSms.vue
@@ -1,118 +1,16 @@
-
-
-
-
-
-
-
-
-
-
-
-
- {{ row.sms.sender.name }}
-
-
-
-
-
-
- {{
- formatNumer(row.sms.destination)
- }}
- {{ row.sms.message }}
-
-
- {{
- date.formatDate(
- row.sms.created,
- 'YYYY-MM-DD HH:mm:ss'
- )
- }}
-
-
- {{ row.sms.status }}
-
-
-
-
-
-
-
-
+
diff --git a/src/pages/Ticket/Card/TicketSummary.vue b/src/pages/Ticket/Card/TicketSummary.vue
index cfc35c032..65523bb82 100644
--- a/src/pages/Ticket/Card/TicketSummary.vue
+++ b/src/pages/Ticket/Card/TicketSummary.vue
@@ -8,10 +8,10 @@ import CardSummary from 'components/ui/CardSummary.vue';
import FetchData from 'components/FetchData.vue';
import FetchedTags from 'components/ui/FetchedTags.vue';
import InvoiceOutDescriptorProxy from 'pages/InvoiceOut/Card/InvoiceOutDescriptorProxy.vue';
-import WorkerDescriptorProxy from 'pages/Worker/Card/WorkerDescriptorProxy.vue';
import VnLv from 'src/components/ui/VnLv.vue';
import VnLinkPhone from 'src/components/ui/VnLinkPhone.vue';
import { getUrl } from 'src/composables/getUrl';
+import VnUserLink from 'src/components/ui/VnUserLink.vue';
onUpdated(() => summaryRef.value.fetch());
@@ -49,7 +49,7 @@ async function setData(data) {
function formattedAddress() {
if (!ticket.value) return '';
- const address = this.ticket.address;
+ const address = ticket.value.address;
const postcode = address.postalCode;
const province = address.province ? `(${address.province.name})` : '';
@@ -58,7 +58,7 @@ function formattedAddress() {
function isEditable() {
try {
- return !this.ticket.ticketState.state.alertLevel;
+ return !ticket.value.ticketState.state.alertLevel;
} catch (e) {
console.error(e);
}
@@ -67,10 +67,10 @@ function isEditable() {
}
async function changeState(value) {
- if (!this.ticket.id) return;
+ if (!ticket.value.id) return;
const formData = {
- ticketFk: this.ticket.id,
+ ticketFk: ticket.value.id,
code: value,
};
@@ -160,13 +160,10 @@ async function changeState(value) {
-
- {{ ticket.client?.salesPersonUser?.name }}
-
-
+
diff --git a/src/pages/Travel/Card/TravelCard.vue b/src/pages/Travel/Card/TravelCard.vue
index b5e555a44..34ecc25ee 100644
--- a/src/pages/Travel/Card/TravelCard.vue
+++ b/src/pages/Travel/Card/TravelCard.vue
@@ -2,6 +2,7 @@
import { useStateStore } from 'stores/useStateStore';
import TravelDescriptor from './TravelDescriptor.vue';
import LeftMenu from 'components/LeftMenu.vue';
+import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
const stateStore = useStateStore();
@@ -15,11 +16,8 @@ const stateStore = useStateStore();
-
-
-
-
-
+
+
diff --git a/src/pages/Travel/ExtraCommunity.vue b/src/pages/Travel/ExtraCommunity.vue
index 62292f115..b9f4f002e 100644
--- a/src/pages/Travel/ExtraCommunity.vue
+++ b/src/pages/Travel/ExtraCommunity.vue
@@ -262,7 +262,16 @@ onMounted(async () => {
-
+
+
+ {{ t('Open as PDF') }}
+
+
@@ -415,4 +424,5 @@ es:
physicKg: KG físico
shipped: F. envío
landed: F. llegada
+ Open as PDF: Abrir como PDF
diff --git a/src/pages/Travel/TravelCreate.vue b/src/pages/Travel/TravelCreate.vue
index 4f5d82593..c8ac7e690 100644
--- a/src/pages/Travel/TravelCreate.vue
+++ b/src/pages/Travel/TravelCreate.vue
@@ -8,7 +8,7 @@ import VnSelectFilter from 'src/components/common/VnSelectFilter.vue';
import FormModel from 'components/FormModel.vue';
import VnRow from 'components/ui/VnRow.vue';
import VnInput from 'src/components/common/VnInput.vue';
-
+import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
import { toDate } from 'src/filters';
const { t } = useI18n();
@@ -57,11 +57,7 @@ onBeforeMount(() => {
auto-load
/>
-
-
-
-
-
+
-
-
-
-
-
+
+
diff --git a/src/pages/Worker/Card/WorkerSummary.vue b/src/pages/Worker/Card/WorkerSummary.vue
index 970a0dee4..26328b9cd 100644
--- a/src/pages/Worker/Card/WorkerSummary.vue
+++ b/src/pages/Worker/Card/WorkerSummary.vue
@@ -2,12 +2,12 @@
import { ref, onMounted, computed } from 'vue';
import { useRoute } from 'vue-router';
import { useI18n } from 'vue-i18n';
-import CardSummary from 'components/ui/CardSummary.vue';
+import { dashIfEmpty } from 'src/filters';
import { getUrl } from 'src/composables/getUrl';
import VnLv from 'src/components/ui/VnLv.vue';
-import WorkerDescriptorProxy from './WorkerDescriptorProxy.vue';
-import { dashIfEmpty } from 'src/filters';
import VnLinkPhone from 'src/components/ui/VnLinkPhone.vue';
+import CardSummary from 'components/ui/CardSummary.vue';
+import VnUserLink from 'src/components/ui/VnUserLink.vue';
const route = useRoute();
const { t } = useI18n();
@@ -83,13 +83,11 @@ const filter = {
-
- {{ dashIfEmpty(worker.boss?.name) }}
-
-
+
diff --git a/src/pages/Worker/WorkerCreate.vue b/src/pages/Worker/WorkerCreate.vue
index ce623e6c1..eb9dc70f6 100644
--- a/src/pages/Worker/WorkerCreate.vue
+++ b/src/pages/Worker/WorkerCreate.vue
@@ -11,6 +11,7 @@ import VnSelectCreate from 'src/components/common/VnSelectCreate.vue';
import CreateBankEntityForm from 'src/components/CreateBankEntityForm.vue';
import CustomerCreateNewPostcode from 'src/components/CreateNewPostcodeForm.vue';
import VnInput from 'src/components/common/VnInput.vue';
+import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
import { useUserConfig } from 'src/composables/useUserConfig';
@@ -125,11 +126,7 @@ onMounted(async () => {
/>
-
-
-
-
-
+
import('src/pages/Supplier/Card/SupplierAddresses.vue'),
},
+ {
+ path: 'address/create',
+ name: 'SupplierAddressesCreate',
+ component: () =>
+ import('src/pages/Supplier/Card/SupplierAddressesCreate.vue'),
+ },
{
path: 'consumption',
name: 'SupplierConsumption',
@@ -154,6 +160,12 @@ export default {
component: () =>
import('src/pages/Supplier/Card/SupplierAgencyTerm.vue'),
},
+ {
+ path: 'agency-term/create',
+ name: 'SupplierAgencyTermCreate',
+ component: () =>
+ import('src/pages/Supplier/Card/SupplierAgencyTermCreate.vue'),
+ },
],
},
],
diff --git a/src/router/modules/invoiceIn.js b/src/router/modules/invoiceIn.js
index a5509908c..fd77619d0 100644
--- a/src/router/modules/invoiceIn.js
+++ b/src/router/modules/invoiceIn.js
@@ -16,6 +16,7 @@ export default {
'InvoiceInVat',
'InvoiceInDueDay',
'InvoiceInIntrastat',
+ 'InvoiceInLog',
],
},
children: [
@@ -92,6 +93,15 @@ export default {
component: () =>
import('src/pages/InvoiceIn/Card/InvoiceInIntrastat.vue'),
},
+ {
+ name: 'InvoiceInLog',
+ path: 'log',
+ meta: {
+ title: 'log',
+ icon: 'history',
+ },
+ component: () => import('src/pages/InvoiceIn/Card/InvoiceInLog.vue'),
+ },
],
},
],
diff --git a/src/stores/invoiceOutGlobal.js b/src/stores/invoiceOutGlobal.js
index 7b763df63..7151aac5f 100644
--- a/src/stores/invoiceOutGlobal.js
+++ b/src/stores/invoiceOutGlobal.js
@@ -1,7 +1,9 @@
import { defineStore } from 'pinia';
import { useUserConfig } from 'src/composables/useUserConfig';
-import useNotify from 'src/composables/useNotify.js';
import { exportFile } from 'quasar';
+import { useArrayData } from 'composables/useArrayData';
+import useNotify from 'src/composables/useNotify.js';
+
import axios from 'axios';
const { notify } = useNotify();
@@ -240,9 +242,10 @@ export const useInvoiceOutGlobalStore = defineStore({
throw err;
},
- async getNegativeBasesCsv(from, to) {
+ async getNegativeBasesCsv() {
try {
- const params = { from: from, to: to };
+ const arrayData = useArrayData('InvoiceOutNegative');
+ const params = arrayData.store.currentFilter;
const { data } = await axios.get('InvoiceOuts/negativeBasesCsv', {
params,
diff --git a/src/stores/useNavigationStore.js b/src/stores/useNavigationStore.js
index 6964c9401..2eda6f686 100644
--- a/src/stores/useNavigationStore.js
+++ b/src/stores/useNavigationStore.js
@@ -11,6 +11,7 @@ export const useNavigationStore = defineStore('navigationStore', () => {
'claim',
'ticket',
'invoiceOut',
+ 'invoiceIn',
'worker',
'shelving',
'order',
@@ -18,7 +19,6 @@ export const useNavigationStore = defineStore('navigationStore', () => {
'route',
'supplier',
'travel',
- 'invoiceIn',
'entry',
];
const pinnedModules = ref([]);
diff --git a/src/stores/useStateStore.js b/src/stores/useStateStore.js
index 74b65e71f..328df9978 100644
--- a/src/stores/useStateStore.js
+++ b/src/stores/useStateStore.js
@@ -5,6 +5,7 @@ export const useStateStore = defineStore('stateStore', () => {
const isMounted = ref(false);
const leftDrawer = ref(false);
const rightDrawer = ref(false);
+ const subToolbar = ref(false);
function toggleLeftDrawer() {
leftDrawer.value = !leftDrawer.value;
@@ -14,6 +15,10 @@ export const useStateStore = defineStore('stateStore', () => {
rightDrawer.value = !rightDrawer.value;
}
+ function toggleSubToolbar() {
+ subToolbar.value = !subToolbar.value;
+ }
+
function setMounted() {
isMounted.value = true;
}
@@ -31,10 +36,7 @@ export const useStateStore = defineStore('stateStore', () => {
}
function isSubToolbarShown() {
- return (
- !!document.querySelector('#st-data') &&
- !!document.querySelector('#st-actions')
- );
+ return subToolbar.value;
}
return {
@@ -47,5 +49,6 @@ export const useStateStore = defineStore('stateStore', () => {
isLeftDrawerShown,
isRightDrawerShown,
isSubToolbarShown,
+ toggleSubToolbar,
};
});
diff --git a/test/cypress/integration/invoiceIn/invoiceInList.spec.js b/test/cypress/integration/invoiceIn/invoiceInList.spec.js
index bd722edab..60d8c5be1 100644
--- a/test/cypress/integration/invoiceIn/invoiceInList.spec.js
+++ b/test/cypress/integration/invoiceIn/invoiceInList.spec.js
@@ -1,8 +1,8 @@
///
describe('InvoiceInList', () => {
const firstCard = '.q-card:nth-child(1)';
- const firstId =
- '.q-card:nth-child(1) .list-items > .vn-label-value:first-child > .value > span';
+ const firstChipId =
+ ':nth-child(1) > :nth-child(1) > .justify-between > .flex > .q-chip > .q-chip__content';
const firstDetailBtn = '.q-card:nth-child(1) .q-btn:nth-child(2)';
const summaryHeaders = '.summaryBody .header';
@@ -12,9 +12,10 @@ describe('InvoiceInList', () => {
});
it('should redirect on clicking a invoice', () => {
- cy.get(firstId)
+ cy.get(firstChipId)
.invoke('text')
- .then((id) => {
+ .then((content) => {
+ const id = content.substring(4);
cy.get(firstCard).click();
cy.url().should('include', `/invoice-in/${id}/summary`);
});
diff --git a/test/cypress/integration/wagon/wagonCreate.spec.js b/test/cypress/integration/wagon/wagonCreate.spec.js
index 62eadc5fd..9aff3a819 100644
--- a/test/cypress/integration/wagon/wagonCreate.spec.js
+++ b/test/cypress/integration/wagon/wagonCreate.spec.js
@@ -6,6 +6,7 @@ describe('WagonCreate', () => {
});
it('should create and delete a new wagon', () => {
+ cy.waitForElement('.q-card');
cy.get('input').eq(0).type('1234');
cy.get('input').eq(1).type('1234ABCD');
cy.get('input').eq(2).type('100');
@@ -16,18 +17,14 @@ describe('WagonCreate', () => {
cy.get('button[type="submit"]').click();
// Check data has been saved successfully
- cy.get('div.text-h6').contains('1234').click();
- cy.get('input').eq(0).should('have.value', '1234');
- cy.get('input').eq(1).should('have.value', '1234ABCD');
- cy.get('input').eq(2).should('have.value', '100');
- cy.get('input').eq(3).should('have.value', 'Wagon Type #1');
+ cy.waitForElement('.q-card');
+
+ cy.get('.title').should('have.text', '1234');
+ cy.get('[title-label="Plate"] > .value > span').should('have.text', '1234ABCD');
+ cy.get(':nth-child(2) > .value > span').should('have.text', '100');
+ cy.get(':nth-child(3) > .value > span').should('have.text', 'Wagon Type #1');
// Delete wagon type created
- cy.go('back');
- cy.get('div.text-h6')
- .contains('1234')
- .parentsUntil('div.q-card')
- .find('div.q-card__actions')
- .find('button').last().click();
+ cy.get('.actions > .q-btn--standard').click();
});
});
diff --git a/test/cypress/integration/wagonType/wagonTypeCreate.spec.js b/test/cypress/integration/wagonType/wagonTypeCreate.spec.js
index ae74dff16..bcf7fe841 100644
--- a/test/cypress/integration/wagonType/wagonTypeCreate.spec.js
+++ b/test/cypress/integration/wagonType/wagonTypeCreate.spec.js
@@ -5,13 +5,13 @@ describe('WagonTypeCreate', () => {
cy.visit('/#/wagon/type/create');
});
- function chooseColor(color){
+ function chooseColor(color) {
cy.get('div.shelving-down').eq(1).click();
cy.get('div.q-color-picker__cube').eq(color).click();
cy.get('div.q-card__section').find('button').click();
}
- function addTray(position){
+ function addTray(position) {
cy.get('div.action-button').last().find('button').click();
cy.focused().type(position);
cy.focused().blur();
@@ -38,7 +38,9 @@ describe('WagonTypeCreate', () => {
cy.get('button[type="submit"]').click();
// Check data has been saved successfully
- cy.get('div.text-h6').contains('Example for testing').click();
+ cy.get(':nth-child(1) > :nth-child(1) > .justify-between > .flex > .title')
+ .contains('Example for testing')
+ .click();
cy.get('input').first().should('have.value', 'Example for testing');
cy.get('div.wagon-tray').should('have.length', 4);
cy.get('div.position').eq(0).find('input').should('have.value', '150');
@@ -47,11 +49,8 @@ describe('WagonTypeCreate', () => {
// Delete wagon type created
cy.go('back');
- cy.get('div.text-h6')
- .contains('Example for testing')
- .parentsUntil('div.q-card')
- .find('div.q-card__actions')
- .find('button').last().click();
-
+ cy.get(
+ ':nth-child(2) > :nth-child(1) > .card-list-body > .actions > .q-btn--standard'
+ ).click();
});
});
diff --git a/test/cypress/integration/worker/workerList.spec.js b/test/cypress/integration/worker/workerList.spec.js
index 2ab84c623..b5c57f920 100644
--- a/test/cypress/integration/worker/workerList.spec.js
+++ b/test/cypress/integration/worker/workerList.spec.js
@@ -1,6 +1,6 @@
describe('WorkerList', () => {
const workerFieldNames =
- '.card-list-body > .list-items > :nth-child(2) > .value > span';
+ '.card-list-body > .list-items > :nth-child(1) > .value > span';
beforeEach(() => {
cy.viewport(1280, 720);
cy.login('developer');
diff --git a/test/cypress/support/commands.js b/test/cypress/support/commands.js
index 4dfde6e21..fc3a593ad 100755
--- a/test/cypress/support/commands.js
+++ b/test/cypress/support/commands.js
@@ -138,23 +138,20 @@ Cypress.Commands.add('validateRow', (rowSelector, expectedValues) => {
Cypress.Commands.add('removeRow', (rowIndex) => {
let rowsBefore;
- let rowsAfter;
-
- cy.get('tr')
+ cy.get('tbody > tr:visible')
.its('length')
.then((length) => {
- rowsBefore = length;
cy.get('.q-checkbox').eq(rowIndex).click();
cy.removeCard();
cy.get('.q-dialog button').eq(2).click();
+ rowsBefore = length;
})
.then(() => {
- cy.get('tr')
- .its('length')
- .then((length) => {
- rowsAfter = length;
- expect(rowsBefore).to.eq(rowsAfter + 1);
- });
+ // Check the existence of tbody before performing the second assertion.
+ cy.get('tbody').then(($tbody) => {
+ if ($tbody.length > 0)
+ cy.get('tbody > tr:visible').should('have.length', rowsBefore - 1);
+ });
});
});
Cypress.Commands.add('openListSummary', (row) => {
diff --git a/test/vitest/__tests__/components/common/VnSms.spec.js b/test/vitest/__tests__/components/common/VnSms.spec.js
new file mode 100644
index 000000000..e0f8c1868
--- /dev/null
+++ b/test/vitest/__tests__/components/common/VnSms.spec.js
@@ -0,0 +1,25 @@
+import { vi, describe, expect, it, beforeAll, afterEach } from 'vitest';
+import { createWrapper, axios } from 'app/test/vitest/helper';
+import VnSms from 'src/components/ui/VnSms.vue';
+
+describe('VnSms', () => {
+ let vm;
+
+ beforeAll(() => {
+ vm = createWrapper(VnSms, {
+ global: {
+ stubs: ['VnPaginate'],
+ mocks: {},
+ },
+ }).vm;
+ });
+
+ afterEach(() => {
+ vi.clearAllMocks();
+ });
+
+ it('should format number correctly', () => {
+ const formattedNumber = vm.formatNumber('123456789012');
+ expect(formattedNumber).toBe('1234 56789012');
+ });
+});