diff --git a/src/composables/getUrl.js b/src/composables/getUrl.js
index e020d7f18..f2bd9ddb9 100644
--- a/src/composables/getUrl.js
+++ b/src/composables/getUrl.js
@@ -1,14 +1,11 @@
import axios from 'axios';
export async function getUrl(route, appName = 'salix') {
- let url;
const filter = {
where: { and: [{ appName: appName }, { environment: process.env.NODE_ENV }] },
};
- await axios.get('Urls/findOne', { params: { filter } }).then((res) => {
- url = res.data.url + route;
- });
-
- return url;
+ const { data } = await axios.get('Urls/findOne', { params: { filter } });
+ const url = data.url;
+ return route ? url + route : url;
}
diff --git a/src/composables/tMobile.js b/src/composables/tMobile.js
new file mode 100644
index 000000000..a6a000b81
--- /dev/null
+++ b/src/composables/tMobile.js
@@ -0,0 +1,8 @@
+import { useQuasar } from 'quasar';
+import { useI18n } from 'vue-i18n';
+
+export function tMobile(...args) {
+ const quasar = useQuasar();
+ const { t } = useI18n();
+ if (!quasar.platform.is.mobile) return t(...args);
+}
diff --git a/src/composables/useArrayData.js b/src/composables/useArrayData.js
index c7808f9a8..9aff0eaa8 100644
--- a/src/composables/useArrayData.js
+++ b/src/composables/useArrayData.js
@@ -38,11 +38,11 @@ export function useArrayData(key, userOptions) {
'limit',
'skip',
'userParams',
- 'userFilter'
+ 'userFilter',
];
if (typeof userOptions === 'object') {
for (const option in userOptions) {
- const isEmpty = userOptions[option] == null || userOptions[option] == ''
+ const isEmpty = userOptions[option] == null || userOptions[option] == '';
if (isEmpty || !allowedOptions.includes(option)) continue;
if (Object.prototype.hasOwnProperty.call(store, option)) {
@@ -73,7 +73,7 @@ export function useArrayData(key, userOptions) {
Object.assign(params, store.userParams);
- store.isLoading = true
+ store.isLoading = true;
const response = await axios.get(store.url, {
signal: canceller.signal,
params,
@@ -94,7 +94,7 @@ export function useArrayData(key, userOptions) {
updateStateParams();
}
- store.isLoading = false
+ store.isLoading = false;
canceller = null;
}
@@ -136,7 +136,7 @@ export function useArrayData(key, userOptions) {
}
async function refresh() {
- await fetch({ append: false });
+ if (Object.values(store.userParams).length) await fetch({ append: false });
}
function updateStateParams() {
@@ -153,8 +153,8 @@ export function useArrayData(key, userOptions) {
});
}
- const totalRows = computed(() => store.data && store.data.length || 0);
- const isLoading = computed(() => store.isLoading || false)
+ const totalRows = computed(() => (store.data && store.data.length) || 0);
+ const isLoading = computed(() => store.isLoading || false);
return {
fetch,
@@ -167,6 +167,6 @@ export function useArrayData(key, userOptions) {
hasMoreData,
totalRows,
updateStateParams,
- isLoading
+ isLoading,
};
}
diff --git a/src/composables/useValidator.js b/src/composables/useValidator.js
index ef2dcbd90..bc48332a2 100644
--- a/src/composables/useValidator.js
+++ b/src/composables/useValidator.js
@@ -3,15 +3,13 @@ import { useI18n } from 'vue-i18n';
import axios from 'axios';
import validator from 'validator';
-
const models = ref(null);
export function useValidator() {
if (!models.value) fetch();
function fetch() {
- axios.get('Schemas/ModelInfo')
- .then(response => models.value = response.data)
+ axios.get('Schemas/ModelInfo').then((response) => (models.value = response.data));
}
function validate(propertyRule) {
@@ -38,19 +36,18 @@ export function useValidator() {
const { t } = useI18n();
const validations = function (validation) {
-
return {
presence: (value) => {
let message = `Value can't be empty`;
if (validation.message)
- message = t(validation.message) || validation.message
+ message = t(validation.message) || validation.message;
- return !validator.isEmpty(value ? String(value) : '') || message
+ return !validator.isEmpty(value ? String(value) : '') || message;
},
length: (value) => {
const options = {
min: validation.min || validation.is,
- max: validation.max || validation.is
+ max: validation.max || validation.is,
};
value = String(value);
@@ -69,14 +66,14 @@ export function useValidator() {
},
numericality: (value) => {
if (validation.int)
- return validator.isInt(value) || 'Value should be integer'
- return validator.isNumeric(value) || 'Value should be a number'
+ return validator.isInt(value) || 'Value should be integer';
+ return validator.isNumeric(value) || 'Value should be a number';
},
- custom: (value) => validation.bindedFunction(value) || 'Invalid value'
+ custom: (value) => validation.bindedFunction(value) || 'Invalid value',
};
};
return {
- validate
+ validate,
};
-}
\ No newline at end of file
+}
diff --git a/src/css/app.scss b/src/css/app.scss
index fa43bdcef..a49ff3f28 100644
--- a/src/css/app.scss
+++ b/src/css/app.scss
@@ -32,12 +32,18 @@ body.body--light {
--vn-text: #000000;
--vn-gray: #f5f5f5;
--vn-label: #5f5f5f;
+ --vn-dark: white;
}
body.body--dark {
--vn-text: #ffffff;
--vn-gray: #313131;
--vn-label: #a8a8a8;
+ --vn-dark: #292929;
+}
+
+.bg-vn-dark {
+ background-color: var(--vn-dark);
}
html [vnRow],
diff --git a/src/css/quasar.variables.scss b/src/css/quasar.variables.scss
index 808bf3468..6a3700561 100644
--- a/src/css/quasar.variables.scss
+++ b/src/css/quasar.variables.scss
@@ -21,6 +21,7 @@ $positive: #21ba45;
$negative: #c10015;
$info: #31ccec;
$warning: #f2c037;
+$vnColor: #8ebb27;
// Pendiente de cuadrar con la base de datos
$success: $positive;
diff --git a/src/i18n/en/index.js b/src/i18n/en/index.js
index d7519ba53..948332d46 100644
--- a/src/i18n/en/index.js
+++ b/src/i18n/en/index.js
@@ -32,10 +32,11 @@ export default {
rowAdded: 'Row added',
rowRemoved: 'Row removed',
pleaseWait: 'Please wait...',
- noPinnedModules: 'You have dont have any pinned modules',
+ noPinnedModules: `You don't have any pinned modules`,
summary: {
basicData: 'Basic data',
},
+ noSelectedRows: `You don't have any line selected`,
},
errors: {
statusUnauthorized: 'Access denied',
@@ -67,6 +68,11 @@ export default {
twoFactor: 'Two-Factor',
},
},
+ verifyEmail: {
+ pageTitles: {
+ verifyEmail: 'Email verification',
+ },
+ },
dashboard: {
pageTitles: {
dashboard: 'Dashboard',
@@ -265,6 +271,7 @@ export default {
lines: 'Lines',
rma: 'RMA',
photos: 'Photos',
+ development: 'Development',
log: 'Audit logs',
notes: 'Notes',
},
@@ -482,15 +489,18 @@ export default {
},
cmr: {
list: {
- total: 'Total records',
- cmrFk: 'Cmr id',
+ results: 'results',
+ cmrFk: 'CMR id',
hasCmrDms: `Attached in gestdoc`,
true: 'Yes',
false: 'No',
ticketFk: 'Ticketd id',
+ routeFk: 'Route id',
country: 'Country',
clientFk: 'Client id',
shipped: 'Preparation date',
+ viewCmr: 'View CMR',
+ downloadCmrs: 'Download CMRs',
},
},
},
diff --git a/src/i18n/es/index.js b/src/i18n/es/index.js
index fc2c80f55..9b452ab22 100644
--- a/src/i18n/es/index.js
+++ b/src/i18n/es/index.js
@@ -36,6 +36,7 @@ export default {
summary: {
basicData: 'Datos básicos',
},
+ noSelectedRows: `No tienes ninguna línea seleccionada`,
},
errors: {
statusUnauthorized: 'Acceso denegado',
@@ -67,6 +68,11 @@ export default {
twoFactor: 'Doble factor',
},
},
+ verifyEmail: {
+ pageTitles: {
+ verifyEmail: 'Verificación de correo',
+ },
+ },
dashboard: {
pageTitles: {
dashboard: 'Tablón',
@@ -263,6 +269,7 @@ export default {
basicData: 'Datos básicos',
lines: 'Líneas',
rma: 'RMA',
+ development: 'Trazabilidad',
photos: 'Fotos',
log: 'Registros de auditoría',
notes: 'Notas',
@@ -482,15 +489,18 @@ export default {
},
cmr: {
list: {
- total: 'Total registros',
- cmrFk: 'Id cmr',
+ results: 'resultados',
+ cmrFk: 'Id CMR',
hasCmrDms: 'Adjuntado en gestdoc',
true: 'Sí',
false: 'No',
ticketFk: 'Id ticket',
+ routeFk: 'Id ruta',
country: 'País',
clientFk: 'Id cliente',
shipped: 'Fecha preparación',
+ viewCmr: 'Ver CMR',
+ downloadCmrs: 'Descargar CMRs',
},
},
},
diff --git a/src/layouts/OutLayout.vue b/src/layouts/OutLayout.vue
index 6ea14622f..f21e6e568 100644
--- a/src/layouts/OutLayout.vue
+++ b/src/layouts/OutLayout.vue
@@ -80,7 +80,7 @@ const langs = ['en', 'es'];
-
+
@@ -97,15 +97,4 @@ const langs = ['en', 'es'];
min-height: inherit;
flex-direction: column;
}
-
-.formCard {
- max-width: 350px;
- min-width: 300px;
-}
-
-@media (max-width: $breakpoint-xs-max) {
- .formCard {
- min-width: 100%;
- }
-}
diff --git a/src/pages/Claim/Card/ClaimCard.vue b/src/pages/Claim/Card/ClaimCard.vue
index 9f1ecc416..03b9889f0 100644
--- a/src/pages/Claim/Card/ClaimCard.vue
+++ b/src/pages/Claim/Card/ClaimCard.vue
@@ -44,17 +44,6 @@ onMounted(async () => {
-
-
-
-
- {{ t('Development') }}
-
{
-
-
+
+
+
+
+
+
+
@@ -80,6 +74,5 @@ es:
You can search by claim id or customer name: Puedes buscar por id de la reclamación o nombre del cliente
Details: Detalles
Notes: Notas
- Development: Trazabilidad
Action: Acción
diff --git a/src/pages/Claim/Card/ClaimDescriptor.vue b/src/pages/Claim/Card/ClaimDescriptor.vue
index 914de2eb2..af7e84d38 100644
--- a/src/pages/Claim/Card/ClaimDescriptor.vue
+++ b/src/pages/Claim/Card/ClaimDescriptor.vue
@@ -3,6 +3,8 @@ import { ref, computed } from 'vue';
import { useRoute } from 'vue-router';
import { useI18n } from 'vue-i18n';
import { toDate } from 'src/filters';
+import { useState } from 'src/composables/useState';
+
import TicketDescriptorProxy from 'pages/Ticket/Card/TicketDescriptorProxy.vue';
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
import ClaimDescriptorMenu from 'pages/Claim/Card/ClaimDescriptorMenu.vue';
@@ -19,6 +21,7 @@ const $props = defineProps({
});
const route = useRoute();
+const state = useState();
const { t } = useI18n();
const entityId = computed(() => {
@@ -67,6 +70,7 @@ function stateColor(code) {
const data = ref(useCardDescription());
const setData = (entity) => {
data.value = useCardDescription(entity.client.name, entity.id);
+ state.set('ClaimDescriptor', entity);
};
diff --git a/src/pages/Claim/Card/ClaimDevelopment.vue b/src/pages/Claim/Card/ClaimDevelopment.vue
new file mode 100644
index 000000000..0c83bdadd
--- /dev/null
+++ b/src/pages/Claim/Card/ClaimDevelopment.vue
@@ -0,0 +1,266 @@
+
+
+ (claimReasons = data)"
+ auto-load
+ />
+ (claimResults = data)"
+ auto-load
+ />
+ (claimResponsibles = data)"
+ auto-load
+ />
+ (claimRedeliveries = data)"
+ auto-load
+ />
+ (workers = data)"
+ auto-load
+ />
+
+
+
+
+
+
+
+
+
+ {{ scope.opt?.name }}
+
+ {{ scope.opt?.nickname }}
+ {{ scope.opt?.code }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+es:
+ Reason: Motivo
+ Result: Consecuencia
+ Responsible: Responsable
+ Worker: Trabajador
+ Redelivery: Devolución
+
diff --git a/src/pages/Claim/Card/ClaimLines.vue b/src/pages/Claim/Card/ClaimLines.vue
index 9d2a12804..c03291b85 100644
--- a/src/pages/Claim/Card/ClaimLines.vue
+++ b/src/pages/Claim/Card/ClaimLines.vue
@@ -6,9 +6,8 @@ import { useQuasar } from 'quasar';
import { useRoute } from 'vue-router';
import { useArrayData } from 'composables/useArrayData';
import { useStateStore } from 'stores/useStateStore';
-import VnPaginate from 'components/ui/VnPaginate.vue';
+import CrudModel from 'components/CrudModel.vue';
import FetchData from 'components/FetchData.vue';
-import VnConfirm from 'components/ui/VnConfirm.vue';
import { toDate, toCurrency, toPercentage } from 'filters/index';
import VnDiscount from 'components/common/vnDiscount.vue';
@@ -17,6 +16,7 @@ import ClaimLinesImport from './ClaimLinesImport.vue';
const quasar = useQuasar();
const route = useRoute();
const { t } = useI18n();
+
const stateStore = useStateStore();
const arrayData = useArrayData('ClaimLines');
const store = arrayData.store;
@@ -36,16 +36,17 @@ const linesFilter = {
},
};
+const claimLinesForm = ref();
const claim = ref(null);
async function onFetchClaim(data) {
claim.value = data;
-
fetchMana();
}
const amount = ref(0);
const amountClaimed = ref(0);
async function onFetch(rows) {
+ if (!rows || rows.length) return;
amount.value = rows.reduce(
(acumulator, { sale }) => acumulator + sale.price * sale.quantity,
0
@@ -141,60 +142,20 @@ function onUpdateDiscount(response) {
});
}
-async function confirmRemove() {
- const rows = selected.value;
- const count = rows.length;
-
- if (count === 0) {
- return quasar.notify({
- message: 'You must select at least one row',
- type: 'warning',
- });
- }
-
- quasar
- .dialog({
- component: VnConfirm,
- componentProps: {
- title: t('Delete claimed sales'),
- message: t('You are about to remove {count} rows', count, { count }),
- data: { rows },
- promise: remove,
- },
- })
- .onOk(() => {
- for (const row of rows) {
- const orgData = store.data;
- const index = orgData.findIndex((item) => item.id === row.id);
- store.data.splice(index, 1);
- selected.value = [];
- }
- });
-}
-
-async function remove({ rows }) {
- if (!rows.length) return;
- const body = { deletes: rows.map((row) => row.id) };
- await axios.post(`ClaimBeginnings/crud`, body);
- quasar.notify({
- type: 'positive',
- message: t('globals.rowRemoved'),
- });
-}
-
function showImportDialog() {
quasar
.dialog({
component: ClaimLinesImport,
+ componentProps: {
+ ticketId: claim.value.ticketFk,
+ },
})
- .onOk(() => arrayData.refresh());
+ .onOk(() => claimLinesForm.value.reload());
}
-
+
- {{ t('Claimed lines') }}
-
{{ t('Amount') }}
@@ -211,7 +172,7 @@ function showImportDialog() {
-
+
-
@@ -361,46 +327,12 @@ function showImportDialog() {
-
+
-
-
-
- {{ t('globals.remove') }}
-
-
- {{ t('globals.add') }}
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
@@ -421,7 +353,6 @@ en:
You are about to remove {count} row |
You are about to remove {count} rows'
es:
- Claimed lines: Líneas reclamadas
Delivered: Entregado
Quantity: Cantidad
Claimed: Reclamada
diff --git a/src/pages/Claim/Card/ClaimLinesImport.vue b/src/pages/Claim/Card/ClaimLinesImport.vue
index 26e59bbc0..be8914eec 100644
--- a/src/pages/Claim/Card/ClaimLinesImport.vue
+++ b/src/pages/Claim/Card/ClaimLinesImport.vue
@@ -14,6 +14,13 @@ const route = useRoute();
const quasar = useQuasar();
const { t } = useI18n();
+const $props = defineProps({
+ ticketId: {
+ type: Number,
+ required: true,
+ },
+});
+
const columns = computed(() => [
{
name: 'delivered',
@@ -99,7 +106,7 @@ function cancel() {
(claimableSales = data)"
auto-load
/>
diff --git a/src/pages/Claim/Card/ClaimNotes.vue b/src/pages/Claim/Card/ClaimNotes.vue
index 94b53c8a2..84d350e38 100644
--- a/src/pages/Claim/Card/ClaimNotes.vue
+++ b/src/pages/Claim/Card/ClaimNotes.vue
@@ -25,7 +25,7 @@ const body = {
};
-
+
-
-
-
-
-
- {{ t('globals.add') }}
-
-
-
-
-
-
-
-
-
-
-
- {{ t('globals.add') }}
-
-
-
+
+
+
+
+ {{ t('globals.add') }}
+
+
diff --git a/src/pages/Claim/Card/ClaimRma.vue b/src/pages/Claim/Card/ClaimRma.vue
index c59c11845..bba901d7b 100644
--- a/src/pages/Claim/Card/ClaimRma.vue
+++ b/src/pages/Claim/Card/ClaimRma.vue
@@ -1,48 +1,34 @@
-
-
+
-
+
@@ -107,7 +88,7 @@ async function remove({ id }) {
{{ t('claim.rma.user') }}
- {{ row.worker.user.name }}
+ {{ row?.worker?.user?.name }}
@@ -133,7 +114,7 @@ async function remove({ id }) {
round
color="orange"
icon="vn:bin"
- @click="confirmRemove(row.id)"
+ @click="claimRmaRef.remove([row])"
>
{{ t('globals.remove') }}
@@ -143,33 +124,11 @@ async function remove({ id }) {
-
+
-
-
-
-
- {{ t('globals.add') }}
-
-
-
-
-
-
-
-
-
-
-
+
+
@@ -178,16 +137,6 @@ async function remove({ id }) {
width: 100%;
max-width: 60em;
}
-.q-toolbar {
- background-color: $grey-9;
-}
-.sticky-page {
- padding-top: 66px;
-}
-
-.q-page-sticky {
- z-index: 2998;
-}
diff --git a/src/pages/Customer/Card/CustomerCard.vue b/src/pages/Customer/Card/CustomerCard.vue
index 3a1c28d18..c833d0cf9 100644
--- a/src/pages/Customer/Card/CustomerCard.vue
+++ b/src/pages/Customer/Card/CustomerCard.vue
@@ -1,11 +1,13 @@
@@ -25,8 +27,13 @@ const { t } = useI18n();
-
-
+
+
+
+
+
+
+
diff --git a/src/pages/Customer/CustomerPayments.vue b/src/pages/Customer/CustomerPayments.vue
index 608aca2af..24e5efa39 100644
--- a/src/pages/Customer/CustomerPayments.vue
+++ b/src/pages/Customer/CustomerPayments.vue
@@ -110,12 +110,18 @@ function stateColor(row) {
-
+
-
+
{{ t('Web Payments') }}
@@ -138,7 +144,7 @@ function stateColor(row) {
order="created DESC"
:limit="20"
:offset="50"
- auto-load
+ :auto-load="!!$route?.query.params"
>
@@ -167,6 +173,13 @@ function stateColor(row) {
+
+
+
+ {{ row.id }}
+
+
+
@@ -175,6 +188,13 @@ function stateColor(row) {
+
+
+
+ {{ row.customerName }}
+
+
+
@@ -188,9 +208,9 @@ function stateColor(row) {
-
+
-
+
-
diff --git a/src/pages/Customer/CustomerPaymentsFilter.vue b/src/pages/Customer/CustomerPaymentsFilter.vue
index d2a9160ab..56fb52d79 100644
--- a/src/pages/Customer/CustomerPaymentsFilter.vue
+++ b/src/pages/Customer/CustomerPaymentsFilter.vue
@@ -9,10 +9,14 @@ const props = defineProps({
required: true,
},
});
+
+function isValidNumber(value) {
+ return /^(\d|\d+(\.|,)?\d+)$/.test(value);
+}
-
+
{{ t(`params.${tag.label}`) }}:
@@ -49,9 +53,99 @@ const props = defineProps({
-
+ {
+ if (value.includes(','))
+ params.amount = params.amount.replace(',', '.');
+ }
+ "
+ :rules="[
+ (val) =>
+ isValidNumber(val) || !val || 'Please type a number',
+ ]"
+ >
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -67,12 +161,19 @@ en:
orderFk: Order
clientFk: Customer
amount: Amount
+ from: From
+ to: To
es:
params:
orderFk: Pedido
clientFk: Cliente
amount: Importe
+ from: Desde
+ to: Hasta
Order ID: ID pedido
Customer ID: ID cliente
Amount: Importe
+ Please type a number: Por favor, escriba un número
+ From: Desde
+ To: Hasta
diff --git a/src/pages/InvoiceOut/Card/InvoiceOutCard.vue b/src/pages/InvoiceOut/Card/InvoiceOutCard.vue
index 5cbe72396..d24eb3ef2 100644
--- a/src/pages/InvoiceOut/Card/InvoiceOutCard.vue
+++ b/src/pages/InvoiceOut/Card/InvoiceOutCard.vue
@@ -25,8 +25,13 @@ const { t } = useI18n();
-
-
+
+
+
+
+
+
+
diff --git a/src/pages/Login/LoginMain.vue b/src/pages/Login/LoginMain.vue
index 7c0bbbd44..2e4fd91ca 100644
--- a/src/pages/Login/LoginMain.vue
+++ b/src/pages/Login/LoginMain.vue
@@ -8,6 +8,8 @@ import axios from 'axios';
import { useSession } from 'src/composables/useSession';
import { useLogin } from 'src/composables/useLogin';
+import VnLogo from 'components/ui/VnLogo.vue';
+
const quasar = useQuasar();
const session = useSession();
const loginCache = useLogin();
@@ -64,14 +66,8 @@ async function onSubmit() {
-
-
+
+
-
+
diff --git a/src/pages/Login/TwoFactor.vue b/src/pages/Login/TwoFactor.vue
index f14e85418..1c99e8dec 100644
--- a/src/pages/Login/TwoFactor.vue
+++ b/src/pages/Login/TwoFactor.vue
@@ -48,7 +48,7 @@ async function onSubmit() {
}
-
+
{{ t('twoFactor.insert') }}
@@ -77,4 +77,15 @@ async function onSubmit() {
-
+
diff --git a/src/pages/Login/VerifyEmail.vue b/src/pages/Login/VerifyEmail.vue
new file mode 100644
index 000000000..dae20e8b6
--- /dev/null
+++ b/src/pages/Login/VerifyEmail.vue
@@ -0,0 +1,124 @@
+
+
+
+
+
+
+ {
+ "en": {
+ "verifyEmail": "Your email has been successfully verified. You can now log in to enjoy all the features of our platform.",
+ "goToShop": "Go to the shop",
+ "logIn": "Log In"
+ },
+ "es": {
+ "verifyEmail": "Su correo electrónico ha sido verificado con éxito. Ahora puede iniciar sesión para disfrutar de todas las funcionalidades de nuestra plataforma.",
+ "goToShop": "Ir a la tienda",
+ "logIn": "Iniciar sesión"
+ },
+ "fr": {
+ "verifyEmail": "Votre courrier électronique a été vérifié avec succès. Vous pouvez maintenant vous connecter pour profiter de toutes les fonctionnalités de notre plateforme.",
+ "goToShop": "Aller à la boutique",
+ "logIn": "Se connecter"
+ },
+ "pt": {
+ "verifyEmail": "Seu e-mail foi verificado com sucesso. Agora você pode fazer o login para aproveitar todas as funcionalidades da nossa plataforma.",
+ "goToShop": "Ir para a loja",
+ "logIn": "Fazer login"
+ },
+ "it": {
+ "verifyEmail": "La tua email è stata verificata con successo. Ora puoi accedere per godere di tutte le funzionalità della nostra piattaforma.",
+ "goToShop": "Vai al negozio",
+ "logIn": "Accedi"
+ }
+ }
+
+
+
diff --git a/src/pages/Route/Cmr/CmrFilter.vue b/src/pages/Route/Cmr/CmrFilter.vue
index eeb111304..b8948652a 100644
--- a/src/pages/Route/Cmr/CmrFilter.vue
+++ b/src/pages/Route/Cmr/CmrFilter.vue
@@ -28,7 +28,11 @@ const countries = ref();
-
+
@@ -46,7 +50,11 @@ const countries = ref();
-
+
@@ -55,7 +63,24 @@ const countries = ref();
-
+
+
+
+
+
+
+
+
+
+
@@ -78,9 +103,9 @@ const countries = ref();
emit-value
map-options
>
-
-
-
+
+
+
@@ -99,7 +124,9 @@ const countries = ref();
transition-hide="rotate"
>
-
+
import { computed, ref } from 'vue';
import { useI18n } from 'vue-i18n';
+import { Notify } from 'quasar';
import { useStateStore } from 'stores/useStateStore';
import VnPaginate from 'components/ui/VnPaginate.vue';
import { useSession } from 'src/composables/useSession';
import { toDate } from 'filters/index';
import CmrFilter from './CmrFilter.vue';
+import TicketDescriptorProxy from 'pages/Ticket/Card/TicketDescriptorProxy.vue';
+import CustomerDescriptorProxy from 'pages/Customer/Card/CustomerDescriptorProxy.vue';
const stateStore = useStateStore();
const { t } = useI18n();
const session = useSession();
const token = session.getToken();
+const selected = ref([]);
const columns = computed(() => [
{
@@ -33,6 +37,12 @@ const columns = computed(() => [
field: (row) => row.ticketFk,
sortable: true,
},
+ {
+ name: 'routeFkFk',
+ label: t('route.cmr.list.routeFk'),
+ field: (row) => row.routeFk,
+ sortable: true,
+ },
{
name: 'clientFk',
label: t('route.cmr.list.clientFk'),
@@ -54,10 +64,31 @@ const columns = computed(() => [
sortable: true,
headerStyle: 'padding-left: 33px',
},
+ {
+ name: 'icons',
+ align: 'center',
+ field: (row) => row.cmrFk,
+ },
]);
-function getProjectUrl() {
+function getApiUrl() {
return new URL(window.location).origin;
}
+function getCmrUrl(value) {
+ return `${getApiUrl()}/api/Routes/${value}/cmr?access_token=${token}`;
+}
+function downloadPdfs() {
+ if (!selected.value.length) {
+ Notify.create({
+ message: t('globals.noSelectedRows'),
+ type: 'warning',
+ });
+ return;
+ }
+ let cmrs = [];
+ for (let value of selected.value) cmrs.push(value.cmrFk);
+ // prettier-ignore
+ return window.open(`${getApiUrl()}/api/Routes/downloadCmrsZip?ids=${cmrs.join(',')}&access_token=${token}`);
+}
@@ -76,21 +107,18 @@ function getProjectUrl() {
:dense="$q.screen.lt.md"
:pagination="{ rowsPerPage: null }"
hide-pagination
+ row-key="cmrFk"
+ selection="multiple"
+ v-model:selected="selected"
:grid="$q.screen.lt.md"
auto-load
>
- {{ `${t('route.cmr.list.total')}: ${rows.length}` }}
-
-
-
-
- {{ value }}
-
-
+
+
+ {{ `${rows.length} ${t('route.cmr.list.results')}` }}
+
+
@@ -104,13 +132,46 @@ function getProjectUrl() {
/>
+
+
+ {{ value }}
+
+
+
+
+
+ {{ value }}
+
+
+
+
+
+
+
+
+ {{ t('route.cmr.list.viewCmr') }}
+
+
+
+
+
+
+
+
+ {{ t('route.cmr.list.downloadCmrs') }}
+
@@ -120,7 +181,7 @@ function getProjectUrl() {
.list {
padding-top: 15px;
padding-bottom: 15px;
- max-width: 900px;
+ max-width: 1000px;
width: 100%;
}
.grid-style-transition {
diff --git a/src/pages/Ticket/Card/TicketCard.vue b/src/pages/Ticket/Card/TicketCard.vue
index e0ad5054d..91921f827 100644
--- a/src/pages/Ticket/Card/TicketCard.vue
+++ b/src/pages/Ticket/Card/TicketCard.vue
@@ -25,8 +25,13 @@ const { t } = useI18n();
-
-
+
+
+
+
+
+
+
diff --git a/src/pages/Wagon/WagonCreate.vue b/src/pages/Wagon/WagonCreate.vue
index 3f7824975..123e01d36 100644
--- a/src/pages/Wagon/WagonCreate.vue
+++ b/src/pages/Wagon/WagonCreate.vue
@@ -20,7 +20,7 @@ const $props = defineProps({
});
const entityId = computed(() => $props.id || route.params.id);
-let wagonTypes;
+let wagonTypes = [];
let originalData = {};
const wagon = ref({});
const filteredWagonTypes = ref(wagonTypes);
diff --git a/src/pages/Worker/Card/WorkerCard.vue b/src/pages/Worker/Card/WorkerCard.vue
index 3d6b46e11..972eb52ec 100644
--- a/src/pages/Worker/Card/WorkerCard.vue
+++ b/src/pages/Worker/Card/WorkerCard.vue
@@ -25,8 +25,13 @@ const { t } = useI18n();
-
-
+
+
+
+
+
+
+
diff --git a/src/pages/Worker/Card/WorkerSummary.vue b/src/pages/Worker/Card/WorkerSummary.vue
index 05ccdc373..7c8accc5d 100644
--- a/src/pages/Worker/Card/WorkerSummary.vue
+++ b/src/pages/Worker/Card/WorkerSummary.vue
@@ -1,6 +1,5 @@