diff --git a/src/components/ui/VnFilterPanel.vue b/src/components/ui/VnFilterPanel.vue
index 9cd5a052f..dfe0e57ab 100644
--- a/src/components/ui/VnFilterPanel.vue
+++ b/src/components/ui/VnFilterPanel.vue
@@ -4,6 +4,8 @@ import { useI18n } from 'vue-i18n';
import { useArrayData } from 'composables/useArrayData';
import toDate from 'filters/toDate';
+import VnFilterPanelChip from 'components/ui/VnFilterPanelChip.vue';
+
const { t } = useI18n();
const props = defineProps({
dataKey: {
@@ -24,11 +26,32 @@ const props = defineProps({
type: Boolean,
default: true,
},
+ unremovableParams: {
+ type: Array,
+ required: false,
+ default: () => [],
+ description:
+ 'Algunos filtros vienen con parametros de búsqueda por default y necesitan tener si o si un valor, por eso de ser necesario, esta prop nos sirve para saber que filtros podemos remover y cuales no',
+ },
+ exprBuilder: {
+ type: Function,
+ default: null,
+ },
+ hiddenTags: {
+ type: Array,
+ default: () => [],
+ },
+ customTags: {
+ type: Array,
+ default: () => [],
+ },
});
-const emit = defineEmits(['refresh', 'clear', 'search']);
+const emit = defineEmits(['refresh', 'clear', 'search', 'init', 'remove']);
-const arrayData = useArrayData(props.dataKey);
+const arrayData = useArrayData(props.dataKey, {
+ exprBuilder: props.exprBuilder,
+});
const store = arrayData.store;
const userParams = ref({});
@@ -37,12 +60,16 @@ onMounted(() => {
if (Object.keys(store.userParams).length > 0) {
userParams.value = JSON.parse(JSON.stringify(store.userParams));
}
+ emit('init', { params: userParams.value });
});
const isLoading = ref(false);
async function search() {
isLoading.value = true;
const params = { ...userParams.value };
+ store.userParamsChanged = true;
+ store.filter.skip = 0;
+ store.skip = 0;
const { params: newParams } = await arrayData.addFilter({ params });
userParams.value = newParams;
@@ -63,32 +90,50 @@ async function reload() {
}
async function clearFilters() {
- userParams.value = {};
isLoading.value = true;
- await arrayData.applyFilter({ params: {} });
- if (!props.showAll) store.data = [];
- isLoading.value = false;
+ store.userParamsChanged = true;
+ store.filter.skip = 0;
+ store.skip = 0;
+ // Filtrar los params no removibles
+ const removableFilters = Object.keys(userParams.value).filter((param) =>
+ props.unremovableParams.includes(param)
+ );
+ const newParams = {};
+ // Conservar solo los params que no son removibles
+ for (const key of removableFilters) {
+ newParams[key] = userParams.value[key];
+ }
+ userParams.value = { ...newParams }; // Actualizar los params con los removibles
+ await arrayData.applyFilter({ params: userParams.value });
+ if (!props.showAll) {
+ store.data = [];
+ }
+
+ isLoading.value = false;
emit('clear');
}
-const tags = computed(() => {
- const params = [];
+const tagsList = computed(() =>
+ Object.entries(userParams.value)
+ .filter(([key, value]) => value && !(props.hiddenTags || []).includes(key))
+ .map(([key, value]) => ({
+ label: key,
+ value: value,
+ }))
+);
- for (const param in userParams.value) {
- if (!userParams.value[param]) continue;
- params.push({
- label: param,
- value: userParams.value[param],
- });
- }
-
- return params;
-});
+const tags = computed(() =>
+ tagsList.value.filter((tag) => !(props.customTags || []).includes(tag.label))
+);
+const customTags = computed(() =>
+ tagsList.value.filter((tag) => (props.customTags || []).includes(tag.label))
+);
async function remove(key) {
userParams.value[key] = null;
await search();
+ emit('remove', key);
}
function formatValue(value) {
@@ -144,21 +189,17 @@ function formatValue(value) {
{{ t(`No filters applied`) }}
-
@@ -166,7 +207,15 @@ function formatValue(value) {
"{{ chip.value }}"
-
+
+
diff --git a/src/components/ui/VnFilterPanelChip.vue b/src/components/ui/VnFilterPanelChip.vue
new file mode 100644
index 000000000..89aad39e8
--- /dev/null
+++ b/src/components/ui/VnFilterPanelChip.vue
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
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/VnTree.vue b/src/components/ui/VnTree.vue
new file mode 100644
index 000000000..c382ef9f2
--- /dev/null
+++ b/src/components/ui/VnTree.vue
@@ -0,0 +1,159 @@
+
+
+
+
+
+
+
+
+ {{ node.name }}
+
+
+
+
+ {{ t('Remove') }}
+
+
+
+
+ {{ t('Create') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ es:
+ Departments: Departamentos
+ Remove: Quitar
+ Create: Crear
+ Are you sure you want to delete it?: ¿Seguro que quieres eliminarlo?
+ Delete department: Eliminar departamento
+
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 523340cc9..3f031f1d1 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;
@@ -132,6 +129,7 @@ export function useArrayData(key, userOptions) {
async function applyFilter({ filter, params }) {
if (filter) store.userFilter = filter;
+ store.filter = {};
if (params) store.userParams = Object.assign({}, params);
await fetch({ append: false });
@@ -144,7 +142,8 @@ export function useArrayData(key, userOptions) {
userParams = sanitizerParams(userParams, store?.exprBuilder);
store.userParams = userParams;
-
+ store.skip = 0;
+ store.filter.skip = 0;
await fetch({ append: false });
return { filter, params };
}
@@ -155,7 +154,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/css/app.scss b/src/css/app.scss
index 65db51d30..bcc75ab38 100644
--- a/src/css/app.scss
+++ b/src/css/app.scss
@@ -53,3 +53,8 @@ body.body--dark {
color: var(--vn-text);
border-radius: 8px;
}
+
+/* Estilo para el asterisco en campos requeridos */
+.q-field.required .q-field__label:after {
+ content: ' *';
+}
diff --git a/src/filters/dateRange.js b/src/filters/dateRange.js
new file mode 100644
index 000000000..4c0cfe654
--- /dev/null
+++ b/src/filters/dateRange.js
@@ -0,0 +1,8 @@
+export default function dateRange(value) {
+ const minHour = new Date(value);
+ minHour.setHours(0, 0, 0, 0);
+ const maxHour = new Date(value);
+ maxHour.setHours(23, 59, 59, 59);
+
+ return [minHour, maxHour];
+}
diff --git a/src/filters/index.js b/src/filters/index.js
index b0c441641..f0120e663 100644
--- a/src/filters/index.js
+++ b/src/filters/index.js
@@ -7,6 +7,7 @@ import toCurrency from './toCurrency';
import toPercentage from './toPercentage';
import toLowerCamel from './toLowerCamel';
import dashIfEmpty from './dashIfEmpty';
+import dateRange from './dateRange';
export {
toLowerCase,
@@ -18,4 +19,5 @@ export {
toCurrency,
toPercentage,
dashIfEmpty,
+ dateRange,
};
diff --git a/src/i18n/en/index.js b/src/i18n/en/index.js
index 4e69f05b7..139977e32 100644
--- a/src/i18n/en/index.js
+++ b/src/i18n/en/index.js
@@ -49,7 +49,6 @@ export default {
microsip: 'Open in MicroSIP',
noSelectedRows: `You don't have any line selected`,
downloadCSVSuccess: 'CSV downloaded successfully',
- // labels compartidos entre vistas
reference: 'Reference',
agency: 'Agency',
wareHouseOut: 'Warehouse Out',
@@ -63,6 +62,8 @@ export default {
selectRows: 'Select all { numberRows } row(s)',
allRows: 'All { numberRows } row(s)',
markAll: 'Mark all',
+ noResults: 'No results',
+ system: 'System',
},
errors: {
statusUnauthorized: 'Access denied',
@@ -109,11 +110,28 @@ export default {
customer: {
pageTitles: {
customers: 'Customers',
+ create: 'Create',
list: 'List',
webPayments: 'Web Payments',
+ extendedList: 'Extended list',
+ notifications: 'Notifications',
+ defaulter: 'Defaulter',
createCustomer: 'Create customer',
summary: 'Summary',
- basicData: 'Basic Data',
+ basicData: 'Basic data',
+ fiscalData: 'Fiscal data',
+ billingData: 'Billing data',
+ consignees: 'Consignees',
+ notes: 'Notes',
+ credits: 'Credits',
+ greuges: 'Greuges',
+ balance: 'Balance',
+ recoveries: 'Recoveries',
+ webAccess: 'Web access',
+ log: 'Log',
+ sms: 'Sms',
+ creditManagement: 'Credit management',
+ others: 'Others',
},
list: {
phone: 'Phone',
@@ -204,6 +222,52 @@ export default {
salesPerson: 'Sales person',
contactChannel: 'Contact channel',
},
+ extendedList: {
+ tableVisibleColumns: {
+ id: 'Identifier',
+ name: 'Name',
+ fi: 'Tax number',
+ salesPersonFk: 'Salesperson',
+ credit: 'Credit',
+ creditInsurance: 'Credit insurance',
+ phone: 'Phone',
+ mobile: 'Mobile',
+ street: 'Street',
+ countryFk: 'Country',
+ provinceFk: 'Province',
+ city: 'City',
+ postcode: 'Postcode',
+ email: 'Email',
+ created: 'Created',
+ businessTypeFk: 'Business type',
+ payMethodFk: 'Billing data',
+ sageTaxTypeFk: 'Sage tax type',
+ sageTransactionTypeFk: 'Sage tr. type',
+ isActive: 'Active',
+ isVies: 'Vies',
+ isTaxDataChecked: 'Verified data',
+ isEqualizated: 'Is equalizated',
+ isFreezed: 'Freezed',
+ hasToInvoice: 'Invoice',
+ hasToInvoiceByAddress: 'Invoice by address',
+ isToBeMailed: 'Mailing',
+ hasLcr: 'Received LCR',
+ hasCoreVnl: 'VNL core received',
+ hasSepaVnl: 'VNL B2B received',
+ },
+ },
+ },
+ entry: {
+ pageTitles: {
+ entries: 'Entries',
+ list: 'List',
+ createEntry: 'New entry',
+ summary: 'Summary',
+ create: 'Create',
+ },
+ list: {
+ newEntry: 'New entry',
+ },
},
ticket: {
pageTitles: {
@@ -548,6 +612,82 @@ export default {
country: 'Country',
},
},
+ order: {
+ pageTitles: {
+ order: 'Orders',
+ orderList: 'List',
+ create: 'Create',
+ summary: 'Summary',
+ basicData: 'Basic Data',
+ catalog: 'Catalog',
+ volume: 'Volume',
+ lines: 'Lines',
+ },
+ field: {
+ salesPersonFk: 'Sales Person',
+ clientFk: 'Client',
+ isConfirmed: 'Confirmed',
+ created: 'Created',
+ landed: 'Landed',
+ hour: 'Hour',
+ agency: 'Agency',
+ total: 'Total',
+ },
+ form: {
+ clientFk: 'Client',
+ addressFk: 'Address',
+ landed: 'Landed',
+ agencyModeFk: 'Agency',
+ },
+ list: {
+ newOrder: 'New Order',
+ },
+ summary: {
+ basket: 'Basket',
+ nickname: 'Nickname',
+ company: 'Company',
+ confirmed: 'Confirmed',
+ notConfirmed: 'Not confirmed',
+ created: 'Created',
+ landed: 'Landed',
+ phone: 'Phone',
+ createdFrom: 'Created From',
+ address: 'Address',
+ notes: 'Notes',
+ subtotal: 'Subtotal',
+ total: 'Total',
+ vat: 'VAT',
+ state: 'State',
+ alias: 'Alias',
+ items: 'Items',
+ orderTicketList: 'Order Ticket List',
+ details: 'Details',
+ item: 'Item',
+ description: 'Description',
+ quantity: 'Quantity',
+ price: 'Price',
+ amount: 'Amount',
+ },
+ },
+ department: {
+ pageTitles: {
+ basicData: 'Basic data',
+ department: 'Department',
+ summary: 'Summary',
+ },
+ name: 'Name',
+ code: 'Code',
+ chat: 'Chat',
+ bossDepartment: 'Boss Department',
+ email: 'Email',
+ selfConsumptionCustomer: 'Self-consumption customer',
+ telework: 'Telework',
+ notifyOnErrors: 'Notify on errors',
+ worksInProduction: 'Works in production',
+ hasToRefill: 'Fill in days without physical check-ins',
+ hasToSendMail: 'Send check-ins by email',
+ departmentRemoved: 'Department removed',
+ },
worker: {
pageTitles: {
workers: 'Workers',
@@ -555,6 +695,8 @@ export default {
basicData: 'Basic data',
summary: 'Summary',
notifications: 'Notifications',
+ workerCreate: 'New worker',
+ department: 'Department',
},
list: {
name: 'Name',
@@ -564,6 +706,7 @@ export default {
active: 'Active',
department: 'Department',
schedule: 'Schedule',
+ newWorker: 'New worker',
},
card: {
workerId: 'Worker ID',
@@ -595,6 +738,25 @@ export default {
subscribed: 'Subscribed to the notification',
unsubscribed: 'Unsubscribed from the notification',
},
+ create: {
+ name: 'Name',
+ lastName: 'Last name',
+ birth: 'Birth',
+ fi: 'Fi',
+ code: 'Worker code',
+ phone: 'Phone',
+ postcode: 'Postcode',
+ province: 'Province',
+ city: 'City',
+ street: 'Street',
+ webUser: 'Web user',
+ personalEmail: 'Personal email',
+ company: 'Company',
+ boss: 'Boss',
+ payMethods: 'Pay method',
+ iban: 'IBAN',
+ bankEntity: 'Swift / BIC',
+ },
imageNotFound: 'Image not found',
},
wagon: {
@@ -670,6 +832,15 @@ export default {
list: 'List',
create: 'Create',
summary: 'Summary',
+ basicData: 'Basic data',
+ fiscalData: 'Fiscal data',
+ billingData: 'Billing data',
+ log: 'Log',
+ accounts: 'Accounts',
+ contacts: 'Contacts',
+ addresses: 'Addresses',
+ consumption: 'Consumption',
+ agencyTerm: 'Agency agreement',
},
list: {
payMethod: 'Pay method',
@@ -714,6 +885,10 @@ export default {
create: 'Create',
summary: 'Summary',
extraCommunity: 'Extra community',
+ travelCreate: 'New travel',
+ basicData: 'Basic data',
+ history: 'History',
+ thermographs: 'Termographs',
},
summary: {
confirmed: 'Confirmed',
diff --git a/src/i18n/es/index.js b/src/i18n/es/index.js
index 4b74bc685..43f624cb3 100644
--- a/src/i18n/es/index.js
+++ b/src/i18n/es/index.js
@@ -62,6 +62,8 @@ export default {
selectRows: 'Seleccionar las { numberRows } filas(s)',
allRows: 'Todo { numberRows } filas(s)',
markAll: 'Marcar todo',
+ noResults: 'Sin resultados',
+ system: 'Sistema',
},
errors: {
statusUnauthorized: 'Acceso denegado',
@@ -108,11 +110,28 @@ export default {
customer: {
pageTitles: {
customers: 'Clientes',
+ create: 'Crear',
list: 'Listado',
webPayments: 'Pagos Web',
+ extendedList: 'Listado extendido',
+ notifications: 'Notificaciones',
+ defaulter: 'Morosos',
createCustomer: 'Crear cliente',
- basicData: 'Datos básicos',
summary: 'Resumen',
+ basicData: 'Datos básicos',
+ fiscalData: 'Datos fiscales',
+ billingData: 'Forma de pago',
+ consignees: 'Consignatarios',
+ notes: 'Notas',
+ credits: 'Créditos',
+ greuges: 'Greuges',
+ balance: 'Balance',
+ recoveries: 'Recobros',
+ webAccess: 'Acceso web',
+ log: 'Historial',
+ sms: 'Sms',
+ creditManagement: 'Gestión de crédito',
+ others: 'Otros',
},
list: {
phone: 'Teléfono',
@@ -202,6 +221,51 @@ export default {
salesPerson: 'Comercial',
contactChannel: 'Canal de contacto',
},
+ extendedList: {
+ tableVisibleColumns: {
+ id: 'Identificador',
+ name: 'Nombre',
+ fi: 'NIF / CIF',
+ salesPersonFk: 'Comercial',
+ credit: 'Crédito',
+ creditInsurance: 'Crédito asegurado',
+ phone: 'Teléfono',
+ mobile: 'Móvil',
+ street: 'Dirección fiscal',
+ countryFk: 'País',
+ provinceFk: 'Provincia',
+ city: 'Población',
+ postcode: 'Código postal',
+ email: 'Email',
+ created: 'Fecha creación',
+ businessTypeFk: 'Tipo de negocio',
+ payMethodFk: 'Forma de pago',
+ sageTaxTypeFk: 'Tipo de impuesto Sage',
+ sageTransactionTypeFk: 'Tipo tr. sage',
+ isActive: 'Activo',
+ isVies: 'Vies',
+ isTaxDataChecked: 'Datos comprobados',
+ isEqualizated: 'Recargo de equivalencias',
+ isFreezed: 'Congelado',
+ hasToInvoice: 'Factura',
+ hasToInvoiceByAddress: 'Factura por consigna',
+ isToBeMailed: 'Env. emails',
+ hasLcr: 'Recibido LCR',
+ hasCoreVnl: 'Recibido core VNL',
+ hasSepaVnl: 'Recibido B2B VNL',
+ },
+ },
+ },
+ entry: {
+ pageTitles: {
+ entries: 'Entradas',
+ list: 'Listado',
+ summary: 'Resumen',
+ create: 'Crear',
+ },
+ list: {
+ newEntry: 'Nueva entrada',
+ },
},
ticket: {
pageTitles: {
@@ -371,7 +435,7 @@ export default {
},
invoiceOut: {
pageTitles: {
- invoiceOuts: 'Crear factura',
+ invoiceOuts: 'Fact. emitidas',
list: 'Listado',
negativeBases: 'Bases Negativas',
globalInvoicing: 'Facturación global',
@@ -456,6 +520,63 @@ export default {
},
},
},
+ order: {
+ pageTitles: {
+ order: 'Cesta',
+ orderList: 'Listado',
+ create: 'Crear',
+ summary: 'Resumen',
+ basicData: 'Datos básicos',
+ catalog: 'Catálogo',
+ volume: 'Volumen',
+ lines: 'Líneas',
+ },
+ field: {
+ salesPersonFk: 'Comercial',
+ clientFk: 'Cliente',
+ isConfirmed: 'Confirmada',
+ created: 'Creado',
+ landed: 'F. entrega',
+ hour: 'Hora',
+ agency: 'Agencia',
+ total: 'Total',
+ },
+ form: {
+ clientFk: 'Cliente',
+ addressFk: 'Dirección',
+ landed: 'F. entrega',
+ agencyModeFk: 'Agencia',
+ },
+ list: {
+ newOrder: 'Nuevo Pedido',
+ },
+ summary: {
+ basket: 'Cesta',
+ nickname: 'Alias',
+ company: 'Empresa',
+ confirmed: 'Confirmada',
+ notConfirmed: 'No confirmada',
+ created: 'Creado',
+ landed: 'F. entrega',
+ phone: 'Teléfono',
+ createdFrom: 'Creado desde',
+ address: 'Dirección',
+ notes: 'Notas',
+ subtotal: 'Subtotal',
+ total: 'Total',
+ vat: 'IVA',
+ state: 'Estado',
+ alias: 'Alias',
+ items: 'Items',
+ orderTicketList: 'Tickets del pedido',
+ details: 'Detalles',
+ item: 'Item',
+ description: 'Descripción',
+ quantity: 'Cantidad',
+ price: 'Precio',
+ amount: 'Monto',
+ },
+ },
shelving: {
pageTitles: {
shelving: 'Carros',
@@ -547,6 +668,25 @@ export default {
country: 'País',
},
},
+ department: {
+ pageTitles: {
+ basicData: 'Basic data',
+ department: 'Departamentos',
+ summary: 'Resumen',
+ },
+ name: 'Nombre',
+ code: 'Código',
+ chat: 'Chat',
+ bossDepartment: 'Jefe de departamento',
+ email: 'Email',
+ selfConsumptionCustomer: 'Cliente autoconsumo',
+ telework: 'Teletrabaja',
+ notifyOnErrors: 'Notificar errores',
+ worksInProduction: 'Pertenece a producción',
+ hasToRefill: 'Completar días sin registros físicos',
+ hasToSendMail: 'Enviar fichadas por mail',
+ departmentRemoved: 'Departamento eliminado',
+ },
worker: {
pageTitles: {
workers: 'Trabajadores',
@@ -554,6 +694,8 @@ export default {
basicData: 'Datos básicos',
summary: 'Resumen',
notifications: 'Notificaciones',
+ workerCreate: 'Nuevo trabajador',
+ department: 'Departamentos',
},
list: {
name: 'Nombre',
@@ -563,6 +705,7 @@ export default {
active: 'Activo',
department: 'Departamento',
schedule: 'Horario',
+ newWorker: 'Nuevo trabajador',
},
card: {
workerId: 'ID Trabajador',
@@ -594,6 +737,25 @@ export default {
subscribed: 'Se ha suscrito a la notificación',
unsubscribed: 'Se ha dado de baja de la notificación',
},
+ create: {
+ name: 'Nombre',
+ lastName: 'Apellido',
+ birth: 'Fecha de nacimiento',
+ fi: 'DNI/NIF/NIE',
+ code: 'Código de trabajador',
+ phone: 'Teléfono',
+ postcode: 'Código postal',
+ province: 'Provincia',
+ city: 'Población',
+ street: 'Dirección',
+ webUser: 'Usuario Web',
+ personalEmail: 'Correo personal',
+ company: 'Empresa',
+ boss: 'Jefe',
+ payMethods: 'Método de pago',
+ iban: 'IBAN',
+ bankEntity: 'Swift / BIC',
+ },
imageNotFound: 'No se ha encontrado la imagen',
},
wagon: {
@@ -669,6 +831,15 @@ export default {
list: 'Listado',
create: 'Crear',
summary: 'Resumen',
+ basicData: 'Datos básicos',
+ fiscalData: 'Datos fiscales',
+ billingData: 'Forma de pago',
+ log: 'Historial',
+ accounts: 'Cuentas',
+ contacts: 'Contactos',
+ addresses: 'Direcciones',
+ consumption: 'Consumo',
+ agencyTerm: 'Acuerdo agencia',
},
list: {
payMethod: 'Método de pago',
@@ -687,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',
@@ -713,6 +884,10 @@ export default {
create: 'Crear',
summary: 'Resumen',
extraCommunity: 'Extra comunitarios',
+ travelCreate: 'Nuevo envío',
+ basicData: 'Datos básicos',
+ history: 'Historial',
+ thermographs: 'Termógrafos',
},
summary: {
confirmed: 'Confirmado',
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 fb47eeee2..e92e65fc7 100644
--- a/src/pages/Claim/Card/ClaimAction.vue
+++ b/src/pages/Claim/Card/ClaimAction.vue
@@ -282,6 +282,8 @@ async function importToNewRefundTicket() {
selection="multiple"
v-model:selected="selectedRows"
:grid="$q.screen.lt.md"
+ :pagination="{ rowsPerPage: 0 }"
+ :hide-bottom="true"
>
@@ -335,7 +337,23 @@ async function importToNewRefundTicket() {
- {{ column.value.description }}
+
+ updateDestination(
+ value,
+ props.row
+ )
+ "
+ />
{{ column.value }}
@@ -417,25 +435,6 @@ async function importToNewRefundTicket() {
-
+
en:
params:
diff --git a/src/pages/Claim/ClaimList.vue b/src/pages/Claim/ClaimList.vue
index 5729ac988..df9af4743 100644
--- a/src/pages/Claim/ClaimList.vue
+++ b/src/pages/Claim/ClaimList.vue
@@ -11,7 +11,7 @@ import VnLv from 'src/components/ui/VnLv.vue';
import CardList from 'src/components/ui/CardList.vue';
import ClaimSummaryDialog from './Card/ClaimSummaryDialog.vue';
import CustomerDescriptorProxy from 'src/pages/Customer/Card/CustomerDescriptorProxy.vue';
-import WorkerDescriptorProxy from '../Worker/Card/WorkerDescriptorProxy.vue';
+import VnUserLink from 'src/components/ui/VnUserLink.vue';
const stateStore = useStateStore();
const router = useRouter();
@@ -38,15 +38,6 @@ function viewSummary(id) {
},
});
}
-
-function viewDescriptor(id) {
- quasar.dialog({
- component: CustomerDescriptorProxy,
- componentProps: {
- id,
- },
- });
-}
@@ -96,20 +87,21 @@ function viewDescriptor(id) {
v-for="row of rows"
>
-
-
+
{{ row.clientName }}
-
+
-
- {{ row.workerName }}
-
+
+
diff --git a/src/pages/Claim/ClaimRmaList.vue b/src/pages/Claim/ClaimRmaList.vue
index 8eac83b1e..3774932e3 100644
--- a/src/pages/Claim/ClaimRmaList.vue
+++ b/src/pages/Claim/ClaimRmaList.vue
@@ -2,10 +2,13 @@
import { ref } from 'vue';
import { useI18n } from 'vue-i18n';
import { useQuasar } from 'quasar';
-import axios from 'axios';
+
import VnPaginate from 'src/components/ui/VnPaginate.vue';
-import { useArrayData } from 'src/composables/useArrayData';
import VnConfirm from 'src/components/ui/VnConfirm.vue';
+import VnInput from 'src/components/common/VnInput.vue';
+
+import { useArrayData } from 'src/composables/useArrayData';
+import axios from 'axios';
const quasar = useQuasar();
const { t } = useI18n();
@@ -65,7 +68,7 @@ async function remove({ id }) {
-
+ Balance
+
diff --git a/src/pages/Customer/Card/CustomerBasicData.vue b/src/pages/Customer/Card/CustomerBasicData.vue
index 47cb6e337..458d50082 100644
--- a/src/pages/Customer/Card/CustomerBasicData.vue
+++ b/src/pages/Customer/Card/CustomerBasicData.vue
@@ -7,6 +7,7 @@ import { useSession } from 'src/composables/useSession';
import FetchData from 'components/FetchData.vue';
import FormModel from 'components/FormModel.vue';
import VnRow from 'components/ui/VnRow.vue';
+import VnInput from 'src/components/common/VnInput.vue';
const route = useRoute();
const { t } = useI18n();
@@ -64,7 +65,7 @@ const filterOptions = {
-
-
-
-
-
+ Billing data
+
diff --git a/src/pages/Customer/Card/CustomerCard.vue b/src/pages/Customer/Card/CustomerCard.vue
index c833d0cf9..36ec263f0 100644
--- a/src/pages/Customer/Card/CustomerCard.vue
+++ b/src/pages/Customer/Card/CustomerCard.vue
@@ -5,6 +5,7 @@ import { useRoute } from 'vue-router';
import CustomerDescriptor from './CustomerDescriptor.vue';
import LeftMenu from 'components/LeftMenu.vue';
import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
+import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
const stateStore = useStateStore();
const route = useRoute();
@@ -28,11 +29,7 @@ const { t } = useI18n();
-
-
-
-
-
+
diff --git a/src/pages/Customer/Card/CustomerConsignees.vue b/src/pages/Customer/Card/CustomerConsignees.vue
new file mode 100644
index 000000000..bab2bd1ff
--- /dev/null
+++ b/src/pages/Customer/Card/CustomerConsignees.vue
@@ -0,0 +1,3 @@
+
+ Consignees
+
diff --git a/src/pages/Customer/Card/CustomerCreditManagement.vue b/src/pages/Customer/Card/CustomerCreditManagement.vue
new file mode 100644
index 000000000..fe24ddfd0
--- /dev/null
+++ b/src/pages/Customer/Card/CustomerCreditManagement.vue
@@ -0,0 +1,3 @@
+
+ Credit management
+
diff --git a/src/pages/Customer/Card/CustomerCredits.vue b/src/pages/Customer/Card/CustomerCredits.vue
new file mode 100644
index 000000000..e8a4c3b48
--- /dev/null
+++ b/src/pages/Customer/Card/CustomerCredits.vue
@@ -0,0 +1,3 @@
+
+ Credits
+
diff --git a/src/pages/Customer/Card/CustomerDescriptor.vue b/src/pages/Customer/Card/CustomerDescriptor.vue
index 282a4b958..222406d8a 100644
--- a/src/pages/Customer/Card/CustomerDescriptor.vue
+++ b/src/pages/Customer/Card/CustomerDescriptor.vue
@@ -4,9 +4,9 @@ import { useRoute } from 'vue-router';
import { useI18n } from 'vue-i18n';
import { toCurrency } from 'src/filters';
import CardDescriptor from 'components/ui/CardDescriptor.vue';
-import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
import VnLv from 'src/components/ui/VnLv.vue';
import useCardDescription from 'src/composables/useCardDescription';
+import VnUserLink from 'src/components/ui/VnUserLink.vue';
const $props = defineProps({
id: {
@@ -44,10 +44,10 @@ const setData = (entity) => (data.value = useCardDescription(entity.name, entity
-
- {{ entity.salesPersonUser.name }}
-
-
+
diff --git a/src/pages/Customer/Card/CustomerFiscalData.vue b/src/pages/Customer/Card/CustomerFiscalData.vue
new file mode 100644
index 000000000..ced6012b8
--- /dev/null
+++ b/src/pages/Customer/Card/CustomerFiscalData.vue
@@ -0,0 +1,3 @@
+
+ Fiscal data
+
diff --git a/src/pages/Customer/Card/CustomerGreuges.vue b/src/pages/Customer/Card/CustomerGreuges.vue
new file mode 100644
index 000000000..d322e04a5
--- /dev/null
+++ b/src/pages/Customer/Card/CustomerGreuges.vue
@@ -0,0 +1,3 @@
+
+ Greuges
+
diff --git a/src/pages/Customer/Card/CustomerLog.vue b/src/pages/Customer/Card/CustomerLog.vue
new file mode 100644
index 000000000..fe59bf2dc
--- /dev/null
+++ b/src/pages/Customer/Card/CustomerLog.vue
@@ -0,0 +1,3 @@
+
+ Log
+
diff --git a/src/pages/Customer/Card/CustomerNotes.vue b/src/pages/Customer/Card/CustomerNotes.vue
new file mode 100644
index 000000000..65ade2903
--- /dev/null
+++ b/src/pages/Customer/Card/CustomerNotes.vue
@@ -0,0 +1,3 @@
+
+ Notes
+
diff --git a/src/pages/Customer/Card/CustomerOthers.vue b/src/pages/Customer/Card/CustomerOthers.vue
new file mode 100644
index 000000000..bd4729cab
--- /dev/null
+++ b/src/pages/Customer/Card/CustomerOthers.vue
@@ -0,0 +1,3 @@
+
+ Others
+
diff --git a/src/pages/Customer/Card/CustomerRecoveries.vue b/src/pages/Customer/Card/CustomerRecoveries.vue
new file mode 100644
index 000000000..54274717c
--- /dev/null
+++ b/src/pages/Customer/Card/CustomerRecoveries.vue
@@ -0,0 +1,3 @@
+
+ Recoveries
+
diff --git a/src/pages/Customer/Card/CustomerSms.vue b/src/pages/Customer/Card/CustomerSms.vue
new file mode 100644
index 000000000..a567f6b47
--- /dev/null
+++ b/src/pages/Customer/Card/CustomerSms.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/pages/Customer/Card/CustomerSummary.vue b/src/pages/Customer/Card/CustomerSummary.vue
index 6693274ac..4ebd6efab 100644
--- a/src/pages/Customer/Card/CustomerSummary.vue
+++ b/src/pages/Customer/Card/CustomerSummary.vue
@@ -38,7 +38,7 @@ const balanceDue = computed(() => {
const balanceDueWarning = computed(() => (balanceDue.value ? 'negative' : ''));
const claimRate = computed(() => {
- return customer.value.claimsRatio.claimingRate * 100;
+ return customer.value.claimsRatio.claimingRate;
});
const priceIncreasingRate = computed(() => {
diff --git a/src/pages/Customer/Card/CustomerWebAccess.vue b/src/pages/Customer/Card/CustomerWebAccess.vue
new file mode 100644
index 000000000..95ec77c3d
--- /dev/null
+++ b/src/pages/Customer/Card/CustomerWebAccess.vue
@@ -0,0 +1,3 @@
+
+ Web access
+
diff --git a/src/pages/Customer/CustomerCreate.vue b/src/pages/Customer/CustomerCreate.vue
new file mode 100644
index 000000000..cfaef0855
--- /dev/null
+++ b/src/pages/Customer/CustomerCreate.vue
@@ -0,0 +1,266 @@
+
+
+
+ (workersOptions = data)"
+ auto-load
+ url="Workers/search?departmentCodes"
+ />
+ (postcodesOptions = data)"
+ auto-load
+ />
+ (businessTypesOptions = data)"
+ auto-load
+ url="BusinessTypes"
+ />
+ (citiesLocationOptions = data)"
+ auto-load
+ url="Towns/location"
+ />
+ (provincesLocationOptions = data)"
+ auto-load
+ url="Provinces/location"
+ />
+ (countriesOptions = data)"
+ auto-load
+ url="Countries"
+ />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ scope.opt.code }}
+ {{ scope.opt.code }} -
+ {{ scope.opt.town.name }} ({{
+ scope.opt.town.province.name
+ }},
+ {{
+ scope.opt.town.province.country.country
+ }})
+
+
+
+
+
+
+
+
+
+
+
+ {{ scope.opt.name }}
+
+ {{
+ `${scope.opt.name}, ${scope.opt.province.name} (${scope.opt.province.country.country})`
+ }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{
+ `${scope.opt.name} (${scope.opt.country.country})`
+ }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+es:
+ Comercial name: Nombre comercial
+ Salesperson: Comercial
+ Business type: Tipo de negocio
+ Tax number: NIF / CIF
+ Business name: Razón social
+ Street: Dirección fiscal
+ Postcode: Código postal
+ City: Población
+ Province: Provincia
+ Country: País
+ Web user: Usuario web
+ Email: Email
+ Is equalizated: Recargo de equivalencia
+
diff --git a/src/pages/Customer/CustomerFilter.vue b/src/pages/Customer/CustomerFilter.vue
index c276b0d3e..36a9add89 100644
--- a/src/pages/Customer/CustomerFilter.vue
+++ b/src/pages/Customer/CustomerFilter.vue
@@ -1,9 +1,11 @@
{{ t('globals.collapseMenu') }}
@@ -55,7 +59,7 @@ function viewSummary(id) {
-
+
@@ -63,18 +67,18 @@ function viewSummary(id) {
@@ -103,6 +107,12 @@ function viewSummary(id) {
+
+
+
+ {{ t('New client') }}
+
+
@@ -117,4 +127,5 @@ function viewSummary(id) {
es:
Search customer: Buscar cliente
You can search by customer id or name: Puedes buscar por id o nombre del cliente
+ New client: Nuevo cliente
diff --git a/src/pages/Customer/Defaulter/CustomerBalanceDueTotal.vue b/src/pages/Customer/Defaulter/CustomerBalanceDueTotal.vue
new file mode 100644
index 000000000..c4a50a10f
--- /dev/null
+++ b/src/pages/Customer/Defaulter/CustomerBalanceDueTotal.vue
@@ -0,0 +1,51 @@
+
+
+
+
+
{{ t('Total') }}
+
+
{{ t('Balance due') }}:
+
+ {{ toCurrency($props.amount) }}
+
+
+
+
+
+
+
+
+es:
+ Total: Total
+ Balance due: Saldo vencido
+
diff --git a/src/pages/Customer/Defaulter/CustomerDefaulter.vue b/src/pages/Customer/Defaulter/CustomerDefaulter.vue
new file mode 100644
index 000000000..d54d5df35
--- /dev/null
+++ b/src/pages/Customer/Defaulter/CustomerDefaulter.vue
@@ -0,0 +1,252 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ props.value }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+es:
+ Client: Cliente
+ Is worker: Es trabajador
+ Salesperson: Comercial
+ Country: País
+ P. Method: F. Pago
+ Balance D.: Saldo V.
+ Author: Autor
+ Last observation: Última observación
+ L. O. Date: Fecha Ú. O.
+ Credit I.: Crédito A.
+ From: Desde
+
diff --git a/src/pages/Customer/Defaulter/CustomerDefaulterFilter.vue b/src/pages/Customer/Defaulter/CustomerDefaulterFilter.vue
new file mode 100644
index 000000000..43ceb1bac
--- /dev/null
+++ b/src/pages/Customer/Defaulter/CustomerDefaulterFilter.vue
@@ -0,0 +1,238 @@
+
+
+
+ (clients = data)" auto-load url="Clients" />
+ (salespersons = data)"
+ auto-load
+ url="Workers/activeWithInheritedRole"
+ />
+ (countries = data)" auto-load url="Countries" />
+ (authors = data)"
+ auto-load
+ url="Workers/activeWithInheritedRole"
+ />
+
+
+
+
+ {{ t(`params.${tag.label}`) }}:
+ {{ formatFn(tag.value) }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+en:
+ params:
+ clientFk: Client
+ salesPersonFk: Salesperson
+ countryFk: Country
+ paymentMethod: P. Method
+ balance: Balance D.
+ workerFk: Author
+ date: L. O. Date
+ credit: Credit I.
+ defaulterSinced: From
+es:
+ params:
+ clientFk: Cliente
+ salesPersonFk: Comercial
+ countryFk: País
+ paymentMethod: F. Pago
+ balance: Saldo V.
+ workerFk: Autor
+ date: Fecha Ú. O.
+ credit: Crédito A.
+ defaulterSinced: Desde
+ Client: Cliente
+ Salesperson: Comercial
+ Country: País
+ P. Method: F. Pago
+ Balance D.: Saldo V.
+ Author: Autor
+ L. O. Date: Fecha Ú. O.
+ Credit I.: Crédito A.
+ From: Desde
+
diff --git a/src/pages/Customer/ExtendedList/CustomerExtendedList.vue b/src/pages/Customer/ExtendedList/CustomerExtendedList.vue
new file mode 100644
index 000000000..caee06d60
--- /dev/null
+++ b/src/pages/Customer/ExtendedList/CustomerExtendedList.vue
@@ -0,0 +1,568 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ dashIfEmpty(col.value) }}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/Customer/ExtendedList/CustomerExtendedListActions.vue b/src/pages/Customer/ExtendedList/CustomerExtendedListActions.vue
new file mode 100644
index 000000000..a7c51d714
--- /dev/null
+++ b/src/pages/Customer/ExtendedList/CustomerExtendedListActions.vue
@@ -0,0 +1,71 @@
+
+
+
+
+
+
+ {{ t('Client ticket list') }}
+
+
+
+
+ {{ t('Preview') }}
+
+
+
+
+
+
+es:
+ Client ticket list: Listado de tickets del cliente
+ Preview: Vista previa
+
diff --git a/src/pages/Customer/ExtendedList/CustomerExtendedListFilter.vue b/src/pages/Customer/ExtendedList/CustomerExtendedListFilter.vue
new file mode 100644
index 000000000..46b4e1e7b
--- /dev/null
+++ b/src/pages/Customer/ExtendedList/CustomerExtendedListFilter.vue
@@ -0,0 +1,617 @@
+
+
+
+ (clients = data)"
+ auto-load
+ />
+ (workers = data)"
+ auto-load
+ />
+ (workers = data)"
+ auto-load
+ />
+ (countriesOptions = data)"
+ auto-load
+ />
+ (provincesOptions = data)"
+ auto-load
+ url="Provinces"
+ />
+ (paymethodsOptions = data)"
+ auto-load
+ />
+ (businessTypesOptions = data)"
+ auto-load
+ />
+ (sageTaxTypesOptions = data)"
+ />
+ (sageTransactionTypesOptions = data)"
+ />
+
+
+
+ {{ t(`customer.extendedList.tableVisibleColumns.${tag.label}`) }}:
+
+ {{ formatFn(tag.value) }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+es:
+ Social name: Razón social
+
diff --git a/src/pages/Customer/Notifications/CustomerNotifications.vue b/src/pages/Customer/Notifications/CustomerNotifications.vue
new file mode 100644
index 000000000..cf66443b9
--- /dev/null
+++ b/src/pages/Customer/Notifications/CustomerNotifications.vue
@@ -0,0 +1,153 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ props.value }}
+
+
+
+
+
+
+
+
+
+
+
+
+es:
+ Identifier: Identificador
+ Social name: Razón social
+ Salesperson: Comercial
+ Phone: Teléfono
+ City: Población
+ Email: Email
+
diff --git a/src/pages/Customer/Notifications/CustomerNotificationsFilter.vue b/src/pages/Customer/Notifications/CustomerNotificationsFilter.vue
new file mode 100644
index 000000000..650158278
--- /dev/null
+++ b/src/pages/Customer/Notifications/CustomerNotificationsFilter.vue
@@ -0,0 +1,144 @@
+
+
+
+ (clients = data)"
+ auto-load
+ url="Clients"
+ />
+ (cities = data)" auto-load url="Towns" />
+
+
+
+ {{ t(`params.${tag.label}`) }}:
+ {{ formatFn(tag.value) }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+en:
+ params:
+ identifier: Identifier
+ socialName: Social name
+ city: City
+ phone: Phone
+ email: Email
+es:
+ params:
+ identifier: Identificador
+ socialName: Razón social
+ city: Población
+ phone: Teléfono
+ email: Email
+ Identifier: Identificador
+ Social name: Razón social
+ City: Población
+ Phone: Teléfono
+ Email: Email
+
diff --git a/src/pages/Customer/CustomerPayments.vue b/src/pages/Customer/Payments/CustomerPayments.vue
similarity index 98%
rename from src/pages/Customer/CustomerPayments.vue
rename to src/pages/Customer/Payments/CustomerPayments.vue
index 24e5efa39..de774e63e 100644
--- a/src/pages/Customer/CustomerPayments.vue
+++ b/src/pages/Customer/Payments/CustomerPayments.vue
@@ -7,7 +7,7 @@ import { useStateStore } from 'stores/useStateStore';
import { useArrayData } from 'composables/useArrayData';
import VnPaginate from 'components/ui/VnPaginate.vue';
import VnConfirm from 'components/ui/VnConfirm.vue';
-import CustomerDescriptorProxy from './Card/CustomerDescriptorProxy.vue';
+import CustomerDescriptorProxy from '../Card/CustomerDescriptorProxy.vue';
import { toDate, toCurrency } from 'filters/index';
import CustomerPaymentsFilter from './CustomerPaymentsFilter.vue';
@@ -123,8 +123,7 @@ function stateColor(row) {
-
- {{ t('Web Payments') }}
+
+ />
{{ t('Change view') }}
diff --git a/src/pages/Customer/CustomerPaymentsFilter.vue b/src/pages/Customer/Payments/CustomerPaymentsFilter.vue
similarity index 82%
rename from src/pages/Customer/CustomerPaymentsFilter.vue
rename to src/pages/Customer/Payments/CustomerPaymentsFilter.vue
index 7ee584d7f..a19b35a20 100644
--- a/src/pages/Customer/CustomerPaymentsFilter.vue
+++ b/src/pages/Customer/Payments/CustomerPaymentsFilter.vue
@@ -1,6 +1,8 @@
+
+ (workersOptions = data)"
+ auto-load
+ />
+ (clientsOptions = data)" auto-load />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/Department/Card/DepartmentCard.vue b/src/pages/Department/Card/DepartmentCard.vue
new file mode 100644
index 000000000..da9accee1
--- /dev/null
+++ b/src/pages/Department/Card/DepartmentCard.vue
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/Department/Card/DepartmentDescriptor.vue b/src/pages/Department/Card/DepartmentDescriptor.vue
new file mode 100644
index 000000000..1f7e6dcbb
--- /dev/null
+++ b/src/pages/Department/Card/DepartmentDescriptor.vue
@@ -0,0 +1,129 @@
+
+
+ {
+ department = data;
+ setData(data);
+ }
+ "
+ >
+
+
+ {{ t('Delete') }}
+
+
+
+
+
+
+
+
+
+
+
+ {{ t('Department workers') }}
+
+
+
+
+
+
+
+ es:
+ Department workers: Trabajadores del departamento
+
diff --git a/src/pages/Department/Card/DepartmentSummary.vue b/src/pages/Department/Card/DepartmentSummary.vue
new file mode 100644
index 000000000..40bb4c83d
--- /dev/null
+++ b/src/pages/Department/Card/DepartmentSummary.vue
@@ -0,0 +1,107 @@
+
+
+
+
+
+ {{ entity.name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/Entry/Card/EntryCard.vue b/src/pages/Entry/Card/EntryCard.vue
new file mode 100644
index 000000000..d4937e983
--- /dev/null
+++ b/src/pages/Entry/Card/EntryCard.vue
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/Entry/EntryCreate.vue b/src/pages/Entry/EntryCreate.vue
new file mode 100644
index 000000000..d4eb8a3ef
--- /dev/null
+++ b/src/pages/Entry/EntryCreate.vue
@@ -0,0 +1,135 @@
+
+
+
+ (suppliersOptions = data)"
+ auto-load
+ />
+ (travelsOptionsOptions = data)"
+ auto-load
+ />
+ (companiesOptions = data)"
+ auto-load
+ />
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ scope.opt?.nickname }}
+
+ #{{ scope.opt?.id }}
+
+
+
+
+
+
+
+
+
+
+
+ {{ scope.opt?.agencyModeName }} -
+ {{ scope.opt?.warehouseInName }} ({{
+ toDate(scope.opt?.shipped)
+ }}) → {{ scope.opt?.warehouseOutName }} ({{
+ toDate(scope.opt?.landed)
+ }})
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ es:
+ Supplier: Proveedor
+ Travel: Envío
+ Company: Empresa
+
diff --git a/src/pages/Entry/EntryList.vue b/src/pages/Entry/EntryList.vue
new file mode 100644
index 000000000..1baa9e019
--- /dev/null
+++ b/src/pages/Entry/EntryList.vue
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+ {{ t('entry.list.newEntry') }}
+
+
+
+
diff --git a/src/pages/Entry/EntryMain.vue b/src/pages/Entry/EntryMain.vue
new file mode 100644
index 000000000..66ce78f23
--- /dev/null
+++ b/src/pages/Entry/EntryMain.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/InvoiceIn/Card/InvoiceInBasicData.vue b/src/pages/InvoiceIn/Card/InvoiceInBasicData.vue
index 4572c4c16..a46978458 100644
--- a/src/pages/InvoiceIn/Card/InvoiceInBasicData.vue
+++ b/src/pages/InvoiceIn/Card/InvoiceInBasicData.vue
@@ -23,6 +23,7 @@ const userConfig = ref(null);
const suppliers = ref([]);
const suppliersRef = ref();
+const suppliersRefFilter = ref({ fields: ['id', 'nickname'], limit: 30 });
const currencies = ref([]);
const currenciesRef = ref();
const companies = ref([]);
@@ -130,13 +131,24 @@ async function upsert() {
});
}
}
+
+function supplierRefFilter(val) {
+ let where = { limit: 30 };
+ let params = {};
+ let key = 'nickname';
+
+ if (new RegExp(/\d/g).test(val)) {
+ key = 'id';
+ }
+ params = { [key]: { like: `%${val}%` } };
+ where = Object.assign(where, params);
+ suppliersRef.value.fetch({ where });
+}
(suppliers = data)"
/>
(currencies = data)"
+ auto-load
/>
(companies = data)"
+ auto-load
/>
(dmsTypes = data)"
+ auto-load
/>
(warehouses = data)"
+ auto-load
/>
(allowedContentTypes = data)"
+ auto-load
/>
@@ -406,7 +424,6 @@ async function upsert() {
:options="currencies"
option-value="id"
option-label="code"
- @input-value="currenciesRef.fetch()"
/>
@@ -417,7 +434,6 @@ async function upsert() {
:options="companies"
option-value="id"
option-label="code"
- @input-value="companiesRef.fetch()"
/>
@@ -459,7 +475,6 @@ async function upsert() {
:options="companies"
option-value="id"
option-label="code"
- @input-value="companiesRef.fetch()"
:rules="[requiredFieldRule]"
/>
@@ -471,7 +486,6 @@ async function upsert() {
:options="warehouses"
option-value="id"
option-label="name"
- @input-value="warehousesRef.fetch()"
:rules="[requiredFieldRule]"
/>
@@ -571,7 +584,6 @@ async function upsert() {
:options="companies"
option-value="id"
option-label="code"
- @input-value="companiesRef.fetch()"
:rules="[requiredFieldRule]"
/>
@@ -583,7 +595,6 @@ async function upsert() {
:options="warehouses"
option-value="id"
option-label="name"
- @input-value="warehousesRef.fetch()"
:rules="[requiredFieldRule]"
/>
diff --git a/src/pages/InvoiceIn/Card/InvoiceInCard.vue b/src/pages/InvoiceIn/Card/InvoiceInCard.vue
index 4d06cb41e..e22da75bf 100644
--- a/src/pages/InvoiceIn/Card/InvoiceInCard.vue
+++ b/src/pages/InvoiceIn/Card/InvoiceInCard.vue
@@ -4,6 +4,7 @@ import { useStateStore } from 'stores/useStateStore';
import InvoiceInDescriptor from './InvoiceInDescriptor.vue';
import LeftMenu from 'components/LeftMenu.vue';
import VnSearchbar from 'components/ui/VnSearchbar.vue';
+import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
import { useArrayData } from 'src/composables/useArrayData';
import { onMounted, watch } from 'vue';
import { useRoute } from 'vue-router';
@@ -74,11 +75,7 @@ onMounted(async () => {
-
-
-
-
-
+
diff --git a/src/pages/InvoiceIn/InvoiceInFilter.vue b/src/pages/InvoiceIn/InvoiceInFilter.vue
index 6348d4167..f8198d237 100644
--- a/src/pages/InvoiceIn/InvoiceInFilter.vue
+++ b/src/pages/InvoiceIn/InvoiceInFilter.vue
@@ -1,9 +1,12 @@
- onFetchCompanies(data)" auto-load />
- onFetchPrinters(data)" auto-load />
- onFetchClients(data)" auto-load />
+ (companiesOptions = data)"
+ auto-load
+ />
+ (printersOptions = data)" auto-load />
+ (clientsOptions = data)" auto-load />
{
class="form-container q-pa-md"
style="max-width: 256px"
>
-
+
{
val="one"
:label="t('oneClient')"
:dark="true"
+ class="q-mb-sm"
/>
{
+ is-outlined
+ />
+ is-outlined
+ />
-import { onMounted, ref, reactive } from 'vue';
+import { ref, computed, onBeforeMount } from 'vue';
import { useI18n } from 'vue-i18n';
-import CustomerDescriptorProxy from 'src/pages/Customer/Card/CustomerDescriptorProxy.vue';
-import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
-import invoiceOutService from 'src/services/invoiceOut.service';
-import { toCurrency } from 'src/filters';
import { QCheckbox, QBtn } from 'quasar';
+
+import CustomerDescriptorProxy from 'src/pages/Customer/Card/CustomerDescriptorProxy.vue';
+import InvoiceOutNegativeFilter from './InvoiceOutNegativeBasesFilter.vue';
+import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
+
+import { toCurrency } from 'src/filters';
import { useInvoiceOutGlobalStore } from 'src/stores/invoiceOutGlobal.js';
-import VnInputDate from 'components/common/VnInputDate.vue';
+import { useStateStore } from 'stores/useStateStore';
+import { useArrayData } from 'composables/useArrayData';
+import VnUserLink from 'src/components/ui/VnUserLink.vue';
const invoiceOutGlobalStore = useInvoiceOutGlobalStore();
-
-const rows = ref([]);
+const stateStore = useStateStore();
const { t } = useI18n();
-const dateRange = reactive({
- from: Date.vnFirstDayOfMonth().toISOString(),
- to: Date.vnLastDayOfMonth().toISOString(),
+const arrayData = ref(null);
+
+function exprBuilder(param, value) {
+ switch (param) {
+ case 'from':
+ case 'to':
+ return;
+ default:
+ return { [param]: value };
+ }
+}
+
+onBeforeMount(async () => {
+ const defaultParams = {
+ from: Date.vnFirstDayOfMonth().toISOString(),
+ to: Date.vnLastDayOfMonth().toISOString(),
+ };
+ arrayData.value = useArrayData('InvoiceOutNegative', {
+ url: 'InvoiceOuts/negativeBases',
+ limit: 0,
+ userParams: defaultParams,
+ exprBuilder: exprBuilder,
+ });
+ await arrayData.value.fetch({ append: false });
+
+ stateStore.rightDrawer = true;
});
+const rows = computed(() => arrayData.value.store.data);
+
const selectedCustomerId = ref(0);
const selectedWorkerId = ref(0);
-const filter = ref({
- company: null,
- country: null,
- clientId: null,
- client: null,
- amount: null,
- base: null,
- ticketId: null,
- active: null,
- hasToInvoice: null,
- verifiedData: null,
- comercial: null,
-});
-
const tableColumnComponents = {
company: {
component: 'span',
@@ -103,70 +117,70 @@ const tableColumnComponents = {
},
};
-const columns = ref([
+const columns = computed(() => [
{
- label: 'company',
+ label: t('invoiceOut.negativeBases.company'),
field: 'company',
name: 'company',
align: 'left',
},
{
- label: 'country',
+ label: t('invoiceOut.negativeBases.country'),
field: 'country',
name: 'country',
align: 'left',
},
{
- label: 'clientId',
+ label: t('invoiceOut.negativeBases.clientId'),
field: 'clientId',
name: 'clientId',
align: 'left',
},
{
- label: 'client',
+ label: t('invoiceOut.negativeBases.client'),
field: 'clientSocialName',
name: 'client',
align: 'left',
},
{
- label: 'amount',
+ label: t('invoiceOut.negativeBases.amount'),
field: 'amount',
name: 'amount',
align: 'left',
format: (value) => toCurrency(value),
},
{
- label: 'base',
+ label: t('invoiceOut.negativeBases.base'),
field: 'taxableBase',
name: 'base',
align: 'left',
},
{
- label: 'ticketId',
+ label: t('invoiceOut.negativeBases.ticketId'),
field: 'ticketFk',
name: 'ticketId',
align: 'left',
},
{
- label: 'active',
+ label: t('invoiceOut.negativeBases.active'),
field: 'isActive',
name: 'active',
align: 'left',
},
{
- label: 'hasToInvoice',
+ label: t('invoiceOut.negativeBases.hasToInvoice'),
field: 'hasToInvoice',
name: 'hasToInvoice',
align: 'left',
},
{
- label: 'verifiedData',
+ label: t('invoiceOut.negativeBases.verifiedData'),
field: 'isTaxDataChecked',
name: 'verifiedData',
align: 'left',
},
{
- label: 'comercial',
+ label: t('invoiceOut.negativeBases.comercial'),
field: 'comercialName',
name: 'comercial',
align: 'left',
@@ -174,8 +188,7 @@ const columns = ref([
]);
const downloadCSV = async () => {
- const params = filter.value;
-
+ const params = {}; // filter.value;
const filterParams = {
limit: 20,
where: {
@@ -187,57 +200,12 @@ const downloadCSV = async () => {
}
await invoiceOutGlobalStore.getNegativeBasesCsv(
- dateRange.from,
- dateRange.to,
- JSON.stringify(filterParams)
+ arrayData.value.store.userParams.from,
+ arrayData.value.store.userParams.to,
+ params
);
};
-const search = async () => {
- const and = [];
- Object.keys(filter.value).forEach((key) => {
- if (filter.value[key]) {
- and.push({
- [key]: filter.value[key],
- });
- }
- });
- const searchFilter = {
- limit: 20,
- };
-
- if (and.length) {
- searchFilter.where = {
- and,
- };
- }
-
- const params = {
- ...dateRange,
- filter: JSON.stringify(searchFilter),
- };
- rows.value = await invoiceOutService.getNegativeBases(params);
-};
-
-const refresh = () => {
- dateRange.from = Date.vnFirstDayOfMonth().toISOString();
- dateRange.to = Date.vnLastDayOfMonth().toISOString();
- filter.value = {
- company: null,
- country: null,
- clientId: null,
- client: null,
- amount: null,
- base: null,
- ticketId: null,
- active: null,
- hasToInvoice: null,
- verifiedData: null,
- comercial: null,
- };
- search();
-};
-
const selectCustomerId = (id) => {
selectedCustomerId.value = id;
};
@@ -245,86 +213,29 @@ const selectCustomerId = (id) => {
const selectWorkerId = (id) => {
selectedWorkerId.value = id;
};
-
-onMounted(() => refresh());
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
- {{ rows.length }} {{ t('results') }}
-
-
-
-
-
-
-
-
-
- {{ t(`invoiceOut.negativeBases.${col.label}`) }}
-
-
-
-
-
refresh());
v-if="props.col.name === 'clientId'"
:id="selectedCustomerId"
/>
-
@@ -359,11 +270,7 @@ onMounted(() => refresh());
diff --git a/src/pages/InvoiceOut/InvoiceOutNegativeBasesFilter.vue b/src/pages/InvoiceOut/InvoiceOutNegativeBasesFilter.vue
new file mode 100644
index 000000000..028246aeb
--- /dev/null
+++ b/src/pages/InvoiceOut/InvoiceOutNegativeBasesFilter.vue
@@ -0,0 +1,134 @@
+
+
+
+
+
+
+ {{ t(`params.${tag.label}`) }}:
+ {{ formatFn(tag.value) }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+en:
+ params:
+ from: From
+ to: To
+ company: Company
+ country: Country
+ clientId: Client Id
+ clientSocialName: Client
+ amount: Amount
+ comercialName: Comercial
+es:
+ params:
+ from: Desde
+ to: Hasta
+ company: Empresa
+ country: País
+ clientId: Id cliente
+ clientSocialName: Cliente
+ amount: Importe
+ comercialName: Comercial
+ Date is required: La fecha es requerida
+
+
diff --git a/src/pages/Login/LoginMain.vue b/src/pages/Login/LoginMain.vue
index 2e4fd91ca..e2ccdac16 100644
--- a/src/pages/Login/LoginMain.vue
+++ b/src/pages/Login/LoginMain.vue
@@ -3,12 +3,13 @@ import { ref } from 'vue';
import { Notify, useQuasar } from 'quasar';
import { useI18n } from 'vue-i18n';
import { useRouter } from 'vue-router';
-import axios from 'axios';
import { useSession } from 'src/composables/useSession';
import { useLogin } from 'src/composables/useLogin';
import VnLogo from 'components/ui/VnLogo.vue';
+import VnInput from 'src/components/common/VnInput.vue';
+import axios from 'axios';
const quasar = useQuasar();
const session = useSession();
@@ -68,13 +69,14 @@ async function onSubmit() {
-
-
{{ t('twoFactor.insert') }}
-
-
+
+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();
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/Order/Card/OrderCatalogFilter.vue b/src/pages/Order/Card/OrderCatalogFilter.vue
new file mode 100644
index 000000000..c325a9b05
--- /dev/null
+++ b/src/pages/Order/Card/OrderCatalogFilter.vue
@@ -0,0 +1,471 @@
+
+
+
+
+
+
+
+ {{ t(selectedCategory?.name || '') }}
+
+
+ {{ t(selectedType?.name || '') }}
+
+
+ {{ t(`params.${tag.label}`) }}:
+ {{ formatFn(tag.value) }}
+
+
+
+
+
+
+ {{ JSON.parse(chip).tagSelection?.name }}:
+ {{
+ (JSON.parse(chip).values || [])
+ .map((item) => item.value)
+ .join(' | ')
+ }}
+
+
+
+
+
+
+
+
+
+
+ {{ t(category.name) }}
+
+
+
+
+
+
+ {
+ selectedTypeFk = value;
+ searchFn();
+ }
+ "
+ >
+
+
+
+ {{ opt.name }}
+
+ {{ opt.categoryName }}
+
+
+
+
+
+
+
+
+
+
+ onOrderChange(value, params, searchFn)
+ "
+ />
+
+
+
+
+ onOrderFieldChange(value, params, searchFn)
+ "
+ />
+
+
+
+
+
+
+
+
+
+
+
+
+ (tagOptions = data)"
+ />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+en:
+ params:
+ type: Type
+ orderBy: Order By
+ tag: Tag
+ value: Value
+ order: Order
+es:
+ params:
+ type: Tipo
+ orderBy: Ordenar por
+ tag: Etiqueta
+ value: Valor
+ order: Orden
+ Plant: Planta
+ Flower: Flor
+ Handmade: Confección
+ Green: Verde
+ Accessories: Complemento
+ Fruit: Fruta
+
diff --git a/src/pages/Order/Card/OrderCatalogItem.vue b/src/pages/Order/Card/OrderCatalogItem.vue
new file mode 100644
index 000000000..bc448eb8c
--- /dev/null
+++ b/src/pages/Order/Card/OrderCatalogItem.vue
@@ -0,0 +1,180 @@
+
+
+
+
+
+
+
+
{{ item.name }}
+
{{ item.subName }}
+
+
+
+
+
+
+
+
+
+
+
+
+es:
+ to: to
+ price-kg: Precio por Kg
+en:
+ to: hasta
+ price-kg: Price per Kg
+
diff --git a/src/pages/Order/Card/OrderCatalogItemDialog.vue b/src/pages/Order/Card/OrderCatalogItemDialog.vue
new file mode 100644
index 000000000..d5464ed1a
--- /dev/null
+++ b/src/pages/Order/Card/OrderCatalogItemDialog.vue
@@ -0,0 +1,82 @@
+
+
+
+
+
+
+
+
+
+ {{ item.warehouse }}
+ |
+
+ {
+ item.quantity += item.grouping;
+ }
+ "
+ >
+ {{ item.grouping }}
+
+ x {{ toCurrency(item.price) }}
+ |
+
+
+ |
+
+
+
+
+
+ {{ t('globals.add') }}
+
+
+
+
+
+
+
diff --git a/src/pages/Order/Card/OrderDescriptor.vue b/src/pages/Order/Card/OrderDescriptor.vue
new file mode 100644
index 000000000..1c770194a
--- /dev/null
+++ b/src/pages/Order/Card/OrderDescriptor.vue
@@ -0,0 +1,139 @@
+
+
+
+ (total = response)"
+ auto-load
+ />
+
+
+
+
+
+
+
+
+
+ {{ entity?.client?.salesPersonUser?.name || '-' }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ t('order.summary.orderTicketList') }}
+
+
+ {{ t('claim.card.customerSummary') }}
+
+
+
+
+
diff --git a/src/pages/Order/Card/OrderDescriptorMenu.vue b/src/pages/Order/Card/OrderDescriptorMenu.vue
new file mode 100644
index 000000000..2e36aa3c5
--- /dev/null
+++ b/src/pages/Order/Card/OrderDescriptorMenu.vue
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+ {{ t('deleteOrder') }}
+
+
+
+
+en:
+ deleteOrder: Delete order
+ confirmDeletion: Confirm deletion
+ confirmDeletionMessage: Are you sure you want to delete this order?
+
+es:
+ deleteOrder: Eliminar pedido
+ confirmDeletion: Confirmar eliminación
+ confirmDeletionMessage: Seguro que quieres eliminar este pedido?
+
+
diff --git a/src/pages/Order/Card/OrderFilter.vue b/src/pages/Order/Card/OrderFilter.vue
new file mode 100644
index 000000000..b49f0b115
--- /dev/null
+++ b/src/pages/Order/Card/OrderFilter.vue
@@ -0,0 +1,265 @@
+
+
+
+ (agencyList = data)"
+ />
+ (salesPersonList = data)"
+ :params="{ departmentCodes: ['VT'] }"
+ auto-load
+ />
+ (sourceList = data)"
+ auto-load
+ />
+
+
+
+ {{ t(`params.${tag.label}`) }}:
+ {{ formatFn(tag.value) }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ opt.name }}
+
+ {{ opt.nickname }},{{ opt.code }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+en:
+ params:
+ search: Includes
+ clientFk: Client
+ agencyModeFk: Agency
+ salesPersonFk: Sales Person
+ from: From
+ to: To
+ orderFk: Order
+ sourceApp: Application
+ myTeam: My Team
+ isConfirmed: Is Confirmed
+ showEmpty: Show Empty
+ customerId: Customer ID
+ agency: Agency
+ salesPerson: Sales Person
+ fromLanded: From Landed
+ toLanded: To Landed
+ orderId: Order ID
+ application: Application
+ myTeam: My Team
+ isConfirmed: Order Confirmed
+ showEmpty: Show Empty
+es:
+ params:
+ search: Búsqueda
+ clientFk: Cliente
+ agencyModeFk: Agencia
+ salesPersonFk: Comercial
+ from: Desde
+ to: Hasta
+ orderFk: Cesta
+ sourceApp: Aplicación
+ myTeam: Mi Equipo
+ isConfirmed: Confirmado
+ showEmpty: Mostrar vacías
+ customerId: ID Cliente
+ agency: Agencia
+ salesPerson: Comercial
+ fromLanded: Desde F. entrega
+ toLanded: Hasta F. entrega
+ orderId: ID Cesta
+ application: Aplicación
+ myTeam: Mi Equipo
+ isConfirmed: Confirmado
+ showEmpty: Mostrar vacías
+
diff --git a/src/pages/Order/Card/OrderForm.vue b/src/pages/Order/Card/OrderForm.vue
new file mode 100644
index 000000000..42aee7640
--- /dev/null
+++ b/src/pages/Order/Card/OrderForm.vue
@@ -0,0 +1,208 @@
+
+
+
+ (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)
+ "
+ />
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/Order/Card/OrderSearchbar.vue b/src/pages/Order/Card/OrderSearchbar.vue
new file mode 100644
index 000000000..a768768a5
--- /dev/null
+++ b/src/pages/Order/Card/OrderSearchbar.vue
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+es:
+ Search order: Buscar orden
+ You can search orders by reference: Puedes buscar por referencia de la orden
+
diff --git a/src/pages/Order/Card/OrderSummary.vue b/src/pages/Order/Card/OrderSummary.vue
new file mode 100644
index 000000000..9b26891a1
--- /dev/null
+++ b/src/pages/Order/Card/OrderSummary.vue
@@ -0,0 +1,255 @@
+
+
+
+
+
+
+
+
+
+
+ {{ 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/Order/Card/OrderSummaryDialog.vue b/src/pages/Order/Card/OrderSummaryDialog.vue
new file mode 100644
index 000000000..ebe891f4a
--- /dev/null
+++ b/src/pages/Order/Card/OrderSummaryDialog.vue
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/Order/OrderCatalog.vue b/src/pages/Order/OrderCatalog.vue
new file mode 100644
index 000000000..55f5e7da1
--- /dev/null
+++ b/src/pages/Order/OrderCatalog.vue
@@ -0,0 +1,114 @@
+
+
+
+
+
+
+
+
+
+
+ {{ t('globals.collapseMenu') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ t('globals.noResults') }}
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/Order/OrderLines.vue b/src/pages/Order/OrderLines.vue
new file mode 100644
index 000000000..0dce70831
--- /dev/null
+++ b/src/pages/Order/OrderLines.vue
@@ -0,0 +1,295 @@
+
+
+
+ (order = data)"
+ auto-load
+ />
+ (orderSummary.total = data)"
+ auto-load
+ />
+ (orderSummary.vat = data)"
+ auto-load
+ />
+
+
+
+ {{ t('globals.noResults') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ row?.item?.name }}
+
+
+ {{ t('ID') }}: {{ row.id }}
+
+
+
+
+
+
+ {{ row.item.subName }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ t('confirm') }}
+
+
+
+
+
+
+
+en:
+ summary: Summary
+ subtotal: Subtotal
+ VAT: VAT
+ total: Total
+ item: Item
+ warehouse: Warehouse
+ shipped: Shipped
+ quantity: Quantity
+ price: Price
+ amount: Amount
+ remove: Remove
+ confirmDeletion: Confirm deletion,
+ confirmDeletionMessage: Are you sure you want to delete this item?
+ confirm: Confirm
+es:
+ summary: Resumen
+ subtotal: Subtotal
+ VAT: IVA
+ total: Total
+ item: Artículo
+ warehouse: Almacén
+ shipped: F. envío
+ quantity: Cantidad
+ price: Precio
+ amount: Importe
+ remove: Eliminar
+ confirmDeletion: Confirmar eliminación,
+ confirmDeletionMessage: Seguro que quieres eliminar este artículo?
+ confirm: Confirmar
+
diff --git a/src/pages/Order/OrderList.vue b/src/pages/Order/OrderList.vue
new file mode 100644
index 000000000..362a68b4d
--- /dev/null
+++ b/src/pages/Order/OrderList.vue
@@ -0,0 +1,162 @@
+
+
+
+
+
+
+
+
+
+
+
+ {{ t('globals.collapseMenu') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ row?.name || '-' }}
+
+
+
+
+
+
+
+ {{ row?.clientName || '-' }}
+
+
+
+
+
+
+
+
+
+ {{ toDate(row?.landed) }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ t('order.list.newOrder') }}
+
+
+
+
+
+
+
diff --git a/src/pages/Order/OrderMain.vue b/src/pages/Order/OrderMain.vue
new file mode 100644
index 000000000..66ce78f23
--- /dev/null
+++ b/src/pages/Order/OrderMain.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/Order/OrderVolume.vue b/src/pages/Order/OrderVolume.vue
new file mode 100644
index 000000000..4f4c269f6
--- /dev/null
+++ b/src/pages/Order/OrderVolume.vue
@@ -0,0 +1,161 @@
+
+
+
+ (volumeSummary = data)"
+ auto-load
+ />
+
+
+
+ {{ t('globals.noResults') }}
+
+
+
+
+
+
+
loadVolumes(data)"
+ >
+
+
+
+
+
+
+
+
+
+
+
+ {{ row.item.subName }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+en:
+ summary: Summary
+ total: Total
+ boxes: Boxes
+ item: Item
+ subName: Subname
+ quantity: Quantity
+ volume: m³ per quantity
+es:
+ summary: Resumen
+ total: Total
+ boxes: Cajas
+ item: Artículo
+ subName: Subname
+ quantity: Cantidad
+ volume: m³ por cantidad
+
diff --git a/src/pages/Route/Cmr/CmrFilter.vue b/src/pages/Route/Cmr/CmrFilter.vue
index bab300672..a5bf5513b 100644
--- a/src/pages/Route/Cmr/CmrFilter.vue
+++ b/src/pages/Route/Cmr/CmrFilter.vue
@@ -1,9 +1,11 @@
-
-
-
-
-
+
-
-
Supplier accounts
diff --git a/src/pages/Supplier/Card/SupplierAddresses.vue b/src/pages/Supplier/Card/SupplierAddresses.vue
new file mode 100644
index 000000000..dd82abe78
--- /dev/null
+++ b/src/pages/Supplier/Card/SupplierAddresses.vue
@@ -0,0 +1 @@
+Supplier addresses
diff --git a/src/pages/Supplier/Card/SupplierAgencyTerm.vue b/src/pages/Supplier/Card/SupplierAgencyTerm.vue
new file mode 100644
index 000000000..2a0c341cf
--- /dev/null
+++ b/src/pages/Supplier/Card/SupplierAgencyTerm.vue
@@ -0,0 +1 @@
+Supplier agency term
diff --git a/src/pages/Supplier/Card/SupplierBasicData.vue b/src/pages/Supplier/Card/SupplierBasicData.vue
new file mode 100644
index 000000000..582da48f3
--- /dev/null
+++ b/src/pages/Supplier/Card/SupplierBasicData.vue
@@ -0,0 +1 @@
+Supplier basic data
diff --git a/src/pages/Supplier/Card/SupplierBillingData.vue b/src/pages/Supplier/Card/SupplierBillingData.vue
new file mode 100644
index 000000000..849737fa7
--- /dev/null
+++ b/src/pages/Supplier/Card/SupplierBillingData.vue
@@ -0,0 +1 @@
+Supplier billing data
diff --git a/src/pages/Supplier/Card/SupplierCard.vue b/src/pages/Supplier/Card/SupplierCard.vue
index cf94c9e8d..5b44159df 100644
--- a/src/pages/Supplier/Card/SupplierCard.vue
+++ b/src/pages/Supplier/Card/SupplierCard.vue
@@ -2,6 +2,9 @@
import { useI18n } from 'vue-i18n';
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();
@@ -18,16 +21,15 @@ const { t } = useI18n();
-
+
+
+
-
-
-
-
-
+
+
diff --git a/src/pages/Supplier/Card/SupplierConsumption.vue b/src/pages/Supplier/Card/SupplierConsumption.vue
new file mode 100644
index 000000000..df1dead17
--- /dev/null
+++ b/src/pages/Supplier/Card/SupplierConsumption.vue
@@ -0,0 +1 @@
+Supplier consumption
diff --git a/src/pages/Supplier/Card/SupplierContacts.vue b/src/pages/Supplier/Card/SupplierContacts.vue
new file mode 100644
index 000000000..ca58d4ab7
--- /dev/null
+++ b/src/pages/Supplier/Card/SupplierContacts.vue
@@ -0,0 +1 @@
+Supplier contacts
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/SupplierFiscalData.vue b/src/pages/Supplier/Card/SupplierFiscalData.vue
new file mode 100644
index 000000000..dd018ac60
--- /dev/null
+++ b/src/pages/Supplier/Card/SupplierFiscalData.vue
@@ -0,0 +1 @@
+Supplier fiscal data
diff --git a/src/pages/Supplier/Card/SupplierLog.vue b/src/pages/Supplier/Card/SupplierLog.vue
new file mode 100644
index 000000000..2733e958d
--- /dev/null
+++ b/src/pages/Supplier/Card/SupplierLog.vue
@@ -0,0 +1 @@
+Supplier log
diff --git a/src/pages/Supplier/Card/SupplierSummary.vue b/src/pages/Supplier/Card/SupplierSummary.vue
index e9fbffe96..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());
@@ -53,7 +53,7 @@ const isAdministrative = computed(() => {
>
@@ -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 9b792483b..ebe0518f2 100644
--- a/src/pages/Supplier/SupplierCreate.vue
+++ b/src/pages/Supplier/SupplierCreate.vue
@@ -1,10 +1,13 @@
-
-
-
-
-
-
-
-
-
-
-
-
- {{ 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 4114b0c8e..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());
@@ -160,13 +160,10 @@ async function changeState(value) {
-
- {{ ticket.client?.salesPersonUser?.name }}
-
-
+
import { ref } from 'vue';
import { useI18n } from 'vue-i18n';
+
import FetchData from 'components/FetchData.vue';
import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
+import VnInput from 'src/components/common/VnInput.vue';
+
import toDateString from 'filters/toDateString';
-import VnInputDate from "components/common/VnInputDate.vue";
+import VnInputDate from 'components/common/VnInputDate.vue';
const { t } = useI18n();
const props = defineProps({
@@ -53,29 +56,33 @@ const warehouses = ref();
-
+
-
-
-
+
-
+
@@ -92,6 +99,9 @@ const warehouses = ref();
emit-value
map-options
use-input
+ dense
+ outlined
+ rounded
:input-debounce="0"
/>
@@ -110,15 +120,18 @@ const warehouses = ref();
option-label="name"
emit-value
map-options
+ dense
+ outlined
+ rounded
/>
-
@@ -184,6 +197,9 @@ const warehouses = ref();
option-label="name"
emit-value
map-options
+ dense
+ outlined
+ rounded
/>
@@ -201,6 +217,9 @@ const warehouses = ref();
option-label="name"
emit-value
map-options
+ dense
+ outlined
+ rounded
/>
@@ -218,6 +237,9 @@ const warehouses = ref();
option-label="name"
emit-value
map-options
+ dense
+ outlined
+ rounded
/>
@@ -232,7 +254,7 @@ en:
params:
search: Contains
clientFk: Customer
- orderFK: Order
+ orderFk: Order
from: From
to: To
salesPersonFk: Salesperson
@@ -249,7 +271,7 @@ es:
params:
search: Contiene
clientFk: Cliente
- orderFK: Pedido
+ orderFk: Pedido
from: Desde
to: Hasta
salesPersonFk: Comercial
diff --git a/src/pages/Ticket/TicketList.vue b/src/pages/Ticket/TicketList.vue
index 7d7429630..9186eb6ad 100644
--- a/src/pages/Ticket/TicketList.vue
+++ b/src/pages/Ticket/TicketList.vue
@@ -87,7 +87,7 @@ function viewSummary(id) {
v-for="row of rows"
:key="row.id"
:id="row.id"
- :title="`${row.nickname} (${row.id})`"
+ :title="`${row.nickname}`"
@click="navigate(row.id)"
>
diff --git a/src/pages/Travel/Card/TravelCard.vue b/src/pages/Travel/Card/TravelCard.vue
index 6309c14ab..34ecc25ee 100644
--- a/src/pages/Travel/Card/TravelCard.vue
+++ b/src/pages/Travel/Card/TravelCard.vue
@@ -1,21 +1,23 @@
-
+
+
+
-
-
-
-
-
+
+
diff --git a/src/pages/Travel/Card/TravelSummary.vue b/src/pages/Travel/Card/TravelSummary.vue
index ad4659b11..3bc5f0584 100644
--- a/src/pages/Travel/Card/TravelSummary.vue
+++ b/src/pages/Travel/Card/TravelSummary.vue
@@ -2,15 +2,17 @@
import { onMounted, ref, computed, onUpdated } from 'vue';
import { useRoute, useRouter } from 'vue-router';
import { useI18n } from 'vue-i18n';
+
+import { QCheckbox, QIcon } from 'quasar';
import CardSummary from 'components/ui/CardSummary.vue';
import VnLv from 'src/components/ui/VnLv.vue';
-import { getUrl } from 'src/composables/getUrl';
-import { toDate } from 'src/filters';
-import travelService from 'src/services/travel.service';
-import { QCheckbox, QIcon } from 'quasar';
-import { toCurrency } from 'filters/index';
import VnRow from 'components/ui/VnRow.vue';
+import travelService from 'src/services/travel.service';
+import { toDate, toCurrency } from 'src/filters';
+import { getUrl } from 'src/composables/getUrl';
+import axios from 'axios';
+
onUpdated(() => summaryRef.value.fetch());
const route = useRoute();
@@ -40,9 +42,17 @@ const cloneTravel = () => {
redirectToCreateView(stringifiedTravelData);
};
+const cloneTravelWithEntries = () => {
+ try {
+ axios.post(`Travels/${$props.id}/cloneWithEntries`);
+ } catch (err) {
+ console.err('Error cloning travel with entries');
+ }
+};
+
const headerMenuOptions = [
{ name: t('travel.summary.cloneShipping'), action: cloneTravel },
- { name: t('travel.summary.CloneTravelAndEntries'), action: null },
+ { name: t('travel.summary.CloneTravelAndEntries'), action: cloneTravelWithEntries },
{ name: t('travel.summary.AddEntry'), action: null },
];
@@ -185,7 +195,7 @@ const openEntryDescriptor = () => {};
>
diff --git a/src/pages/Travel/ExtraCommunity.vue b/src/pages/Travel/ExtraCommunity.vue
index cef3ed998..62292f115 100644
--- a/src/pages/Travel/ExtraCommunity.vue
+++ b/src/pages/Travel/ExtraCommunity.vue
@@ -8,6 +8,7 @@ import SupplierDescriptorProxy from 'src/pages/Supplier/Card/SupplierDescriptorP
import TravelDescriptorProxy from 'src/pages/Travel/Card/TravelDescriptorProxy.vue';
import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
import ExtraCommunityFilter from './ExtraCommunityFilter.vue';
+import VnInput from 'src/components/common/VnInput.vue';
import { useStateStore } from 'stores/useStateStore';
import { toCurrency } from 'src/filters';
@@ -102,111 +103,109 @@ const tableColumnComponents = {
},
};
-const columns = computed(() => {
- return [
- {
- label: 'id',
- field: 'id',
- name: 'id',
- align: 'left',
- showValue: true,
- },
- {
- label: t('supplier.pageTitles.supplier'),
- field: 'cargoSupplierNickname',
- name: 'cargoSupplierNickname',
- align: 'left',
- showValue: true,
- },
- {
- label: t('globals.agency'),
- field: 'agencyModeName',
- name: 'agencyModeName',
- align: 'left',
- showValue: true,
- },
- {
- label: t('globals.amount'),
- name: 'invoiceAmount',
- field: 'entries',
- align: 'left',
- showValue: true,
- format: (value) =>
- toCurrency(
- value
- ? value.reduce((sum, entry) => {
- return sum + (entry.invoiceAmount || 0);
- }, 0)
- : 0
- ),
- },
- {
- label: t('globals.reference'),
- field: 'ref',
- name: 'ref',
- align: 'left',
- showValue: false,
- },
- {
- label: t('globals.packages'),
- field: 'stickers',
- name: 'stickers',
- align: 'left',
- showValue: true,
- },
- {
- label: t('kg'),
- field: 'kg',
- name: 'kg',
- align: 'left',
- showValue: true,
- },
- {
- label: t('physicKg'),
- field: 'loadedKg',
- name: 'loadedKg',
- align: 'left',
- showValue: true,
- },
- {
- label: 'KG Vol.',
- field: 'volumeKg',
- name: 'volumeKg',
- align: 'left',
- showValue: true,
- },
- {
- label: t('globals.wareHouseOut'),
- field: 'warehouseOutName',
- name: 'warehouseOutName',
- align: 'left',
- showValue: true,
- },
- {
- label: t('shipped'),
- field: 'shipped',
- name: 'shipped',
- align: 'left',
- format: (value) => toDate(value.substring(0, 10)),
- showValue: true,
- },
- {
- label: t('globals.wareHouseIn'),
- field: 'warehouseInName',
- name: 'warehouseInName',
- align: 'left',
- showValue: true,
- },
- {
- label: t('landed'),
- field: 'landed',
- name: 'landed',
- align: 'left',
- format: (value) => toDate(value.substring(0, 10)),
- showValue: true,
- },
- ];
-});
+const columns = computed(() => [
+ {
+ label: 'id',
+ field: 'id',
+ name: 'id',
+ align: 'left',
+ showValue: true,
+ },
+ {
+ label: t('supplier.pageTitles.supplier'),
+ field: 'cargoSupplierNickname',
+ name: 'cargoSupplierNickname',
+ align: 'left',
+ showValue: true,
+ },
+ {
+ label: t('globals.agency'),
+ field: 'agencyModeName',
+ name: 'agencyModeName',
+ align: 'left',
+ showValue: true,
+ },
+ {
+ label: t('globals.amount'),
+ name: 'invoiceAmount',
+ field: 'entries',
+ align: 'left',
+ showValue: true,
+ format: (value) =>
+ toCurrency(
+ value
+ ? value.reduce((sum, entry) => {
+ return sum + (entry.invoiceAmount || 0);
+ }, 0)
+ : 0
+ ),
+ },
+ {
+ label: t('globals.reference'),
+ field: 'ref',
+ name: 'ref',
+ align: 'left',
+ showValue: false,
+ },
+ {
+ label: t('globals.packages'),
+ field: 'stickers',
+ name: 'stickers',
+ align: 'left',
+ showValue: true,
+ },
+ {
+ label: t('kg'),
+ field: 'kg',
+ name: 'kg',
+ align: 'left',
+ showValue: true,
+ },
+ {
+ label: t('physicKg'),
+ field: 'loadedKg',
+ name: 'loadedKg',
+ align: 'left',
+ showValue: true,
+ },
+ {
+ label: 'KG Vol.',
+ field: 'volumeKg',
+ name: 'volumeKg',
+ align: 'left',
+ showValue: true,
+ },
+ {
+ label: t('globals.wareHouseOut'),
+ field: 'warehouseOutName',
+ name: 'warehouseOutName',
+ align: 'left',
+ showValue: true,
+ },
+ {
+ label: t('shipped'),
+ field: 'shipped',
+ name: 'shipped',
+ align: 'left',
+ format: (value) => toDate(value.substring(0, 10)),
+ showValue: true,
+ },
+ {
+ label: t('globals.wareHouseIn'),
+ field: 'warehouseInName',
+ name: 'warehouseInName',
+ align: 'left',
+ showValue: true,
+ },
+ {
+ label: t('landed'),
+ field: 'landed',
+ name: 'landed',
+ align: 'left',
+ format: (value) => toDate(value.substring(0, 10)),
+ showValue: true,
+ },
+]);
async function getData() {
await arrayData.fetch({ append: false });
@@ -314,7 +313,7 @@ onMounted(async () => {
label-set="Save"
label-cancel="Close"
>
- {
diff --git a/src/pages/Travel/TravelFilter.vue b/src/pages/Travel/TravelFilter.vue
index 2c2d80488..52a755c34 100644
--- a/src/pages/Travel/TravelFilter.vue
+++ b/src/pages/Travel/TravelFilter.vue
@@ -1,9 +1,12 @@
+
+
+ onFetchWorkerConfig(data)"
+ :filter="workerConfigFilter"
+ auto-load
+ />
+ (postcodesOptions = data)"
+ auto-load
+ />
+ (provincesOptions = data)"
+ :filter="provincesFilter"
+ auto-load
+ />
+ (townsOptions = data)"
+ :filter="townsFilter"
+ auto-load
+ />
+ (companiesOptions = data)"
+ auto-load
+ />
+ (workersOptions = data)"
+ auto-load
+ />
+ (payMethodsOptions = data)"
+ auto-load
+ />
+ (bankEntitiesOptions = data)"
+ auto-load
+ />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ scope.opt.code }}
+ {{ scope.opt.code }} -
+ {{ scope.opt.town.name }} ({{
+ scope.opt.town.province.name
+ }},
+ {{
+ scope.opt.town.province.country.country
+ }})
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ scope.opt.name }}
+ {{ scope.opt.name }},
+ {{ scope.opt.province.name }} ({{
+ scope.opt.province.country.country
+ }})
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ scope.opt.name }}
+ {{ scope.opt.nickname }},
+ {{ scope.opt.code }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ scope.opt.bic }}
+ {{ scope.opt.name }}
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/Worker/WorkerDepartment.vue b/src/pages/Worker/WorkerDepartment.vue
new file mode 100644
index 000000000..3c0e5fdd0
--- /dev/null
+++ b/src/pages/Worker/WorkerDepartment.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+es:
+ Search worker: Buscar trabajador
+ You can search by worker id or name: Puedes buscar por id o nombre del trabajador
+
diff --git a/src/pages/Worker/WorkerFilter.vue b/src/pages/Worker/WorkerFilter.vue
index 079905c4f..680a17937 100644
--- a/src/pages/Worker/WorkerFilter.vue
+++ b/src/pages/Worker/WorkerFilter.vue
@@ -1,8 +1,10 @@
@@ -101,6 +105,12 @@ function viewSummary(id) {
+
+
+
+ {{ t('worker.list.newWorker') }}
+
+
diff --git a/src/router/modules/Supplier.js b/src/router/modules/Supplier.js
index 198a9581e..6ce1a7688 100644
--- a/src/router/modules/Supplier.js
+++ b/src/router/modules/Supplier.js
@@ -11,7 +11,17 @@ export default {
redirect: { name: 'SupplierMain' },
menus: {
main: ['SupplierList'],
- card: [],
+ card: [
+ 'SupplierBasicData',
+ 'SupplierFiscalData',
+ 'SupplierBillingData',
+ 'SupplierLog',
+ 'SupplierAccounts',
+ 'SupplierContacts',
+ 'SupplierAddresses',
+ 'SupplierConsumption',
+ 'SupplierAgencyTerm',
+ ],
},
children: [
{
@@ -55,6 +65,95 @@ export default {
component: () =>
import('src/pages/Supplier/Card/SupplierSummary.vue'),
},
+ {
+ path: 'basic-data',
+ name: 'SupplierBasicData',
+ meta: {
+ title: 'basicData',
+ icon: 'vn:settings',
+ },
+ component: () =>
+ import('src/pages/Supplier/Card/SupplierBasicData.vue'),
+ },
+ {
+ path: 'fiscal-data',
+ name: 'SupplierFiscalData',
+ meta: {
+ title: 'fiscalData',
+ icon: 'vn:dfiscales',
+ },
+ component: () =>
+ import('src/pages/Supplier/Card/SupplierFiscalData.vue'),
+ },
+ {
+ path: 'billing-data',
+ name: 'SupplierBillingData',
+ meta: {
+ title: 'billingData',
+ icon: 'vn:payment',
+ },
+ component: () =>
+ import('src/pages/Supplier/Card/SupplierBillingData.vue'),
+ },
+ {
+ path: 'log',
+ name: 'SupplierLog',
+ meta: {
+ title: 'log',
+ icon: 'vn:History',
+ },
+ component: () => import('src/pages/Supplier/Card/SupplierLog.vue'),
+ },
+ {
+ path: 'account',
+ name: 'SupplierAccounts',
+ meta: {
+ title: 'accounts',
+ icon: 'vn:account',
+ },
+ component: () =>
+ import('src/pages/Supplier/Card/SupplierAccounts.vue'),
+ },
+ {
+ path: 'contact',
+ name: 'SupplierContacts',
+ meta: {
+ title: 'contacts',
+ icon: 'contact_phone',
+ },
+ component: () =>
+ import('src/pages/Supplier/Card/SupplierContacts.vue'),
+ },
+ {
+ path: 'address',
+ name: 'SupplierAddresses',
+ meta: {
+ title: 'addresses',
+ icon: 'vn:delivery',
+ },
+ component: () =>
+ import('src/pages/Supplier/Card/SupplierAddresses.vue'),
+ },
+ {
+ path: 'consumption',
+ name: 'SupplierConsumption',
+ meta: {
+ title: 'consumption',
+ icon: 'show_chart',
+ },
+ component: () =>
+ import('src/pages/Supplier/Card/SupplierConsumption.vue'),
+ },
+ {
+ path: 'agency-term',
+ name: 'SupplierAgencyTerm',
+ meta: {
+ title: 'agencyTerm',
+ icon: 'vn:agency-term',
+ },
+ component: () =>
+ import('src/pages/Supplier/Card/SupplierAgencyTerm.vue'),
+ },
],
},
],
diff --git a/src/router/modules/customer.js b/src/router/modules/customer.js
index 832a1e0fd..3c8445f42 100644
--- a/src/router/modules/customer.js
+++ b/src/router/modules/customer.js
@@ -10,8 +10,29 @@ export default {
component: RouterView,
redirect: { name: 'CustomerMain' },
menus: {
- main: ['CustomerList', 'CustomerPayments'],
- card: ['CustomerBasicData'],
+ main: [
+ 'CustomerList',
+ 'CustomerPayments',
+ 'CustomerExtendedList',
+ 'CustomerNotifications',
+ 'CustomerDefaulter',
+ ],
+ card: [
+ 'CustomerBasicData',
+ 'CustomerFiscalData',
+ 'CustomerBillingData',
+ 'CustomerConsignees',
+ 'CustomerNotes',
+ 'CustomerCredits',
+ 'CustomerGreuges',
+ 'CustomerBalance',
+ 'CustomerRecoveries',
+ 'CustomerWebAccess',
+ 'CustomerLog',
+ 'CustomerSms',
+ 'CustomerCreditManagement',
+ 'CustomerOthers',
+ ],
},
children: [
{
@@ -29,6 +50,14 @@ export default {
},
component: () => import('src/pages/Customer/CustomerList.vue'),
},
+ {
+ path: 'create',
+ name: 'CustomerCreate',
+ meta: {
+ title: 'create',
+ },
+ component: () => import('src/pages/Customer/CustomerCreate.vue'),
+ },
{
path: 'payments',
name: 'CustomerPayments',
@@ -36,7 +65,42 @@ export default {
title: 'webPayments',
icon: 'vn:onlinepayment',
},
- component: () => import('src/pages/Customer/CustomerPayments.vue'),
+ component: () =>
+ import('src/pages/Customer/Payments/CustomerPayments.vue'),
+ },
+ {
+ path: 'extendedList',
+ name: 'CustomerExtendedList',
+ meta: {
+ title: 'extendedList',
+ icon: 'vn:client',
+ },
+ component: () =>
+ import(
+ 'src/pages/Customer/ExtendedList/CustomerExtendedList.vue'
+ ),
+ },
+ {
+ path: 'notifications',
+ name: 'CustomerNotifications',
+ meta: {
+ title: 'notifications',
+ icon: 'notifications',
+ },
+ component: () =>
+ import(
+ 'src/pages/Customer/Notifications/CustomerNotifications.vue'
+ ),
+ },
+ {
+ path: 'defaulter',
+ name: 'CustomerDefaulter',
+ meta: {
+ title: 'defaulter',
+ icon: 'vn:risk',
+ },
+ component: () =>
+ import('src/pages/Customer/Defaulter/CustomerDefaulter.vue'),
},
],
},
@@ -66,6 +130,132 @@ export default {
component: () =>
import('src/pages/Customer/Card/CustomerBasicData.vue'),
},
+ {
+ path: 'fiscal-data',
+ name: 'CustomerFiscalData',
+ meta: {
+ title: 'fiscalData',
+ icon: 'vn:dfiscales',
+ },
+ component: () =>
+ import('src/pages/Customer/Card/CustomerFiscalData.vue'),
+ },
+ {
+ path: 'billing-data',
+ name: 'CustomerBillingData',
+ meta: {
+ title: 'billingData',
+ icon: 'vn:payment',
+ },
+ component: () =>
+ import('src/pages/Customer/Card/CustomerBillingData.vue'),
+ },
+ {
+ path: 'consignees',
+ name: 'CustomerConsignees',
+ meta: {
+ title: 'consignees',
+ icon: 'vn:delivery',
+ },
+ component: () =>
+ import('src/pages/Customer/Card/CustomerConsignees.vue'),
+ },
+ {
+ path: 'notes',
+ name: 'CustomerNotes',
+ meta: {
+ title: 'notes',
+ icon: 'vn:notes',
+ },
+ component: () => import('src/pages/Customer/Card/CustomerNotes.vue'),
+ },
+ {
+ path: 'credits',
+ name: 'CustomerCredits',
+ meta: {
+ title: 'credits',
+ icon: 'vn:credit',
+ },
+ component: () =>
+ import('src/pages/Customer/Card/CustomerCredits.vue'),
+ },
+ {
+ path: 'greuges',
+ name: 'CustomerGreuges',
+ meta: {
+ title: 'greuges',
+ icon: 'vn:greuge',
+ },
+ component: () =>
+ import('src/pages/Customer/Card/CustomerGreuges.vue'),
+ },
+ {
+ path: 'balance',
+ name: 'CustomerBalance',
+ meta: {
+ title: 'balance',
+ icon: 'vn:invoice',
+ },
+ component: () =>
+ import('src/pages/Customer/Card/CustomerBalance.vue'),
+ },
+ {
+ path: 'recoveries',
+ name: 'CustomerRecoveries',
+ meta: {
+ title: 'recoveries',
+ icon: 'vn:recovery',
+ },
+ component: () =>
+ import('src/pages/Customer/Card/CustomerRecoveries.vue'),
+ },
+ {
+ path: 'web-access',
+ name: 'CustomerWebAccess',
+ meta: {
+ title: 'webAccess',
+ icon: 'vn:web',
+ },
+ component: () =>
+ import('src/pages/Customer/Card/CustomerWebAccess.vue'),
+ },
+ {
+ path: 'log',
+ name: 'CustomerLog',
+ meta: {
+ title: 'log',
+ icon: 'vn:History',
+ },
+ component: () => import('src/pages/Customer/Card/CustomerLog.vue'),
+ },
+ {
+ path: 'sms',
+ name: 'CustomerSms',
+ meta: {
+ title: 'sms',
+ icon: 'sms',
+ },
+ component: () => import('src/pages/Customer/Card/CustomerSms.vue'),
+ },
+ {
+ path: 'credit-management',
+ name: 'CustomerCreditManagement',
+ meta: {
+ title: 'creditManagement',
+ icon: 'paid',
+ },
+ component: () =>
+ import('src/pages/Customer/Card/CustomerCreditManagement.vue'),
+ },
+ {
+ path: 'others',
+ name: 'CustomerOthers',
+ meta: {
+ title: 'others',
+ icon: 'pending',
+ },
+ component: () => import('src/pages/Customer/Card/CustomerOthers.vue'),
+ },
],
},
],
diff --git a/src/router/modules/department.js b/src/router/modules/department.js
new file mode 100644
index 000000000..aaffc3460
--- /dev/null
+++ b/src/router/modules/department.js
@@ -0,0 +1,46 @@
+import { RouterView } from 'vue-router';
+
+export default {
+ path: '/department',
+ name: 'Department',
+ meta: {
+ title: 'department',
+ icon: 'vn:greuge',
+ },
+ component: RouterView,
+ redirect: { name: 'DepartmentCard' },
+ menus: {
+ main: [],
+ card: ['DepartmentBasicData'],
+ },
+ children: [
+ {
+ name: 'DepartmentCard',
+ path: 'department/:id',
+ component: () => import('src/pages/Department/Card/DepartmentCard.vue'),
+ redirect: { name: 'DepartmentSummary' },
+ children: [
+ {
+ name: 'DepartmentSummary',
+ path: 'summary',
+ meta: {
+ title: 'summary',
+ icon: 'launch',
+ },
+ component: () =>
+ import('src/pages/Department/Card/DepartmentSummary.vue'),
+ },
+ {
+ name: 'DepartmentBasicData',
+ path: 'basic-data',
+ meta: {
+ title: 'basicData',
+ icon: 'vn:settings',
+ },
+ component: () =>
+ import('src/pages/Department/Card/DepartmentBasicData.vue'),
+ },
+ ],
+ },
+ ],
+};
diff --git a/src/router/modules/entry.js b/src/router/modules/entry.js
new file mode 100644
index 000000000..6a1cd6173
--- /dev/null
+++ b/src/router/modules/entry.js
@@ -0,0 +1,61 @@
+import { RouterView } from 'vue-router';
+
+export default {
+ path: '/entry',
+ name: 'Entry',
+ meta: {
+ title: 'entries',
+ icon: 'vn:entry',
+ },
+ component: RouterView,
+ redirect: { name: 'EntryMain' },
+ menus: {
+ main: ['EntryList'],
+ card: [],
+ },
+ children: [
+ {
+ path: '',
+ name: 'EntryMain',
+ component: () => import('src/pages/Entry/EntryMain.vue'),
+ redirect: { name: 'EntryList' },
+ children: [
+ {
+ path: 'list',
+ name: 'EntryList',
+ meta: {
+ title: 'list',
+ icon: 'view_list',
+ },
+ component: () => import('src/pages/Entry/EntryList.vue'),
+ },
+ {
+ path: 'create',
+ name: 'EntryCreate',
+ meta: {
+ title: 'create',
+ },
+ component: () => import('src/pages/Entry/EntryCreate.vue'),
+ },
+ ],
+ },
+ // {
+ // name: 'EntryCard',
+ // path: ':id',
+ // component: () => import('src/pages/Entry/Card/EntryCard.vue'),
+ // redirect: { name: 'EntrySummary' },
+ // children: [
+ // {
+ // name: 'EntrySummary',
+ // path: 'summary',
+ // meta: {
+ // title: 'summary',
+ // icon: 'launch',
+ // },
+ // component: () =>
+ // import('src/pages/Entry/Card/EntrySummary.vue'),
+ // },
+ // ],
+ // },
+ ],
+};
diff --git a/src/router/modules/index.js b/src/router/modules/index.js
index 0ab5bf2b2..cc5034959 100644
--- a/src/router/modules/index.js
+++ b/src/router/modules/index.js
@@ -9,6 +9,9 @@ import Wagon from './wagon';
import Route from './route';
import Supplier from './Supplier';
import Travel from './travel';
+import Order from './order';
+import Department from './department';
+import Entry from './entry';
export default [
Customer,
@@ -21,5 +24,8 @@ export default [
Route,
Supplier,
Travel,
+ Order,
invoiceIn,
+ Department,
+ Entry,
];
diff --git a/src/router/modules/order.js b/src/router/modules/order.js
new file mode 100644
index 000000000..4599394cd
--- /dev/null
+++ b/src/router/modules/order.js
@@ -0,0 +1,96 @@
+import { RouterView } from 'vue-router';
+
+export default {
+ path: '/order',
+ name: 'Order',
+ meta: {
+ title: 'order',
+ icon: 'vn:basket',
+ },
+ component: RouterView,
+ redirect: { name: 'OrderMain' },
+ menus: {
+ main: ['OrderList'],
+ card: ['OrderBasicData', 'OrderCatalog', 'OrderVolume', 'OrderLines'],
+ },
+ children: [
+ {
+ path: '',
+ name: 'OrderMain',
+ component: () => import('src/pages/Order/OrderMain.vue'),
+ redirect: { name: 'OrderList' },
+ children: [
+ {
+ path: 'list',
+ name: 'OrderList',
+ meta: {
+ title: 'orderList',
+ icon: 'view_list',
+ },
+ component: () => import('src/pages/Order/OrderList.vue'),
+ },
+ {
+ path: 'create',
+ name: 'OrderCreate',
+ meta: {
+ title: 'create',
+ },
+ component: () => import('src/pages/Order/Card/OrderForm.vue'),
+ },
+ ],
+ },
+ {
+ name: 'OrderCard',
+ path: ':id',
+ component: () => import('src/pages/Order/Card/OrderCard.vue'),
+ redirect: { name: 'OrderSummary' },
+ children: [
+ {
+ name: 'OrderSummary',
+ path: 'summary',
+ meta: {
+ title: 'summary',
+ icon: 'launch',
+ },
+ component: () => import('src/pages/Order/Card/OrderSummary.vue'),
+ },
+ {
+ name: 'OrderBasicData',
+ path: 'basic-data',
+ meta: {
+ title: 'basicData',
+ icon: 'vn:settings',
+ },
+ component: () => import('src/pages/Order/Card/OrderForm.vue'),
+ },
+ {
+ name: 'OrderCatalog',
+ path: 'catalog',
+ meta: {
+ title: 'catalog',
+ icon: 'vn:basket',
+ },
+ component: () => import('src/pages/Order/OrderCatalog.vue'),
+ },
+ {
+ name: 'OrderVolume',
+ path: 'volume',
+ meta: {
+ title: 'volume',
+ icon: 'vn:volume',
+ },
+ component: () => import('src/pages/Order/OrderVolume.vue'),
+ },
+ {
+ name: 'OrderLines',
+ path: 'line',
+ meta: {
+ title: 'lines',
+ icon: 'vn:lines',
+ },
+ component: () => import('src/pages/Order/OrderLines.vue'),
+ },
+ ],
+ },
+ ],
+};
diff --git a/src/router/modules/travel.js b/src/router/modules/travel.js
index bd0a2067d..43c444ae2 100644
--- a/src/router/modules/travel.js
+++ b/src/router/modules/travel.js
@@ -11,7 +11,7 @@ export default {
redirect: { name: 'TravelMain' },
menus: {
main: ['TravelList', 'ExtraCommunity'],
- card: [],
+ card: ['TravelBasicData', 'TravelHistory', 'TravelThermographs'],
},
children: [
{
@@ -42,7 +42,7 @@ export default {
path: 'create',
name: 'TravelCreate',
meta: {
- title: 'extraCommunity',
+ title: 'travelCreate',
icon: '',
},
component: () => import('src/pages/Travel/TravelCreate.vue'),
@@ -63,6 +63,36 @@ export default {
},
component: () => import('src/pages/Travel/Card/TravelSummary.vue'),
},
+ {
+ name: 'TravelBasicData',
+ path: 'basic-data',
+ meta: {
+ title: 'basicData',
+ icon: 'vn:settings',
+ // roles: [],
+ },
+ // component: () => import(),
+ },
+ {
+ name: 'TravelHistory',
+ path: 'history',
+ meta: {
+ title: 'history',
+ icon: 'history',
+ // roles: [],
+ },
+ // component: () => import(),
+ },
+ {
+ name: 'TravelThermographs',
+ path: 'thermographs',
+ meta: {
+ title: 'thermographs',
+ icon: 'vn:thermometer',
+ // roles: [],
+ },
+ // component: () => import(),
+ },
],
},
],
diff --git a/src/router/modules/worker.js b/src/router/modules/worker.js
index e5ee7c1a2..27a6f19a9 100644
--- a/src/router/modules/worker.js
+++ b/src/router/modules/worker.js
@@ -10,8 +10,9 @@ export default {
component: RouterView,
redirect: { name: 'WorkerMain' },
menus: {
- main: ['WorkerList'],
+ main: ['WorkerList', 'WorkerDepartment'],
card: ['WorkerNotificationsManager'],
+ departmentCard: ['BasicData'],
},
children: [
{
@@ -29,6 +30,24 @@ export default {
},
component: () => import('src/pages/Worker/WorkerList.vue'),
},
+ {
+ path: 'department',
+ name: 'WorkerDepartment',
+ meta: {
+ title: 'department',
+ icon: 'vn:greuge',
+ },
+ component: () => import('src/pages/Worker/WorkerDepartment.vue'),
+ },
+ {
+ path: 'create',
+ name: 'WorkerCreate',
+ meta: {
+ title: 'workerCreate',
+ icon: '',
+ },
+ component: () => import('src/pages/Worker/WorkerCreate.vue'),
+ },
],
},
{
diff --git a/src/router/routes.js b/src/router/routes.js
index 550fcf64e..6a2fa6a97 100644
--- a/src/router/routes.js
+++ b/src/router/routes.js
@@ -8,7 +8,10 @@ import wagon from './modules/wagon';
import supplier from './modules/Supplier';
import route from './modules/route';
import travel from './modules/travel';
+import department from './modules/department';
import shelving from 'src/router/modules/shelving';
+import order from 'src/router/modules/order';
+import entry from 'src/router/modules/entry';
const routes = [
{
@@ -56,9 +59,12 @@ const routes = [
invoiceOut,
invoiceIn,
wagon,
+ order,
route,
supplier,
travel,
+ department,
+ entry,
{
path: '/:catchAll(.*)*',
name: 'NotFound',
diff --git a/src/services/invoiceOut.service.js b/src/services/invoiceOut.service.js
deleted file mode 100644
index 6232f319d..000000000
--- a/src/services/invoiceOut.service.js
+++ /dev/null
@@ -1,49 +0,0 @@
-import axios from 'axios';
-
-const request = async (method, url, params = {}) => {
- try {
- let response;
-
- if (method === 'GET') {
- response = await axios.get(url, { params });
- } else if (method === 'POST') {
- response = await axios.post(url, params);
- }
- return response.data;
- } catch (err) {
- console.error(`Error with ${method} request to ${url}`, err);
- return err.response;
- }
-};
-
-const invoiceOutService = {
- getNegativeBases: async (params) => {
- return await request('GET', 'InvoiceOuts/negativeBases', params);
- },
-
- getNegativeBasesCsv: async (params) => {
- return await request('GET', 'InvoiceOuts/negativeBasesCsv', params);
- },
-
- getInvoiceDate: async (params) => {
- return await request('GET', 'InvoiceOuts/getInvoiceDate', params);
- },
-
- getFindOne: async (params) => {
- return await request('GET', 'InvoiceOutConfigs/findOne', params);
- },
-
- getClientsToInvoice: async (params) => {
- return await request('POST', 'InvoiceOuts/clientsToInvoice', params);
- },
-
- invoiceClient: async (params) => {
- return await request('POST', 'InvoiceOuts/invoiceClient', params);
- },
-
- makePdfAndNotify: async (invoiceId, params) => {
- return await request('POST', `InvoiceOuts/${invoiceId}/makePdfAndNotify`, params);
- },
-};
-
-export default invoiceOutService;
diff --git a/src/stores/invoiceOutGlobal.js b/src/stores/invoiceOutGlobal.js
index 71e4c3537..7151aac5f 100644
--- a/src/stores/invoiceOutGlobal.js
+++ b/src/stores/invoiceOutGlobal.js
@@ -1,8 +1,10 @@
import { defineStore } from 'pinia';
import { useUserConfig } from 'src/composables/useUserConfig';
-import invoiceOutService from 'src/services/invoiceOut.service';
-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();
@@ -60,18 +62,29 @@ export const useInvoiceOutGlobalStore = defineStore({
},
async fetchInvoiceOutConfig(companyFk) {
- this.formInitialData.companyFk = companyFk;
- const params = { companyFk: companyFk };
- const { issued } = await invoiceOutService.getInvoiceDate(params);
- const stringDate = issued.substring(0, 10);
- this.minInvoicingDate = stringDate;
- this.formInitialData.invoiceDate = stringDate;
+ try {
+ this.formInitialData.companyFk = companyFk;
+ const params = { companyFk: companyFk };
+
+ const { data } = await axios.get('InvoiceOuts/getInvoiceDate', {
+ params,
+ });
+
+ const stringDate = data.issued.substring(0, 10);
+ this.minInvoicingDate = stringDate;
+ this.formInitialData.invoiceDate = stringDate;
+ } catch (err) {
+ console.error('Error fetching invoice out global initial data');
+ throw new Error();
+ }
},
async fetchParallelism() {
const filter = { fields: ['parallelism'] };
- const { parallelism } = await invoiceOutService.getFindOne(filter);
- this.parallelism = parallelism;
+ const { data } = await axios.get('InvoiceOutConfigs/findOne', {
+ filter,
+ });
+ this.parallelism = data.parallelism;
},
async makeInvoice(formData, clientsToInvoice) {
@@ -90,11 +103,12 @@ export const useInvoiceOutGlobalStore = defineStore({
if (clientsToInvoice == 'all') params.clientId = undefined;
- const addressesResponse = await invoiceOutService.getClientsToInvoice(
+ const addressesResponse = await await axios.post(
+ 'InvoiceOuts/clientsToInvoice',
params
);
- this.addresses = addressesResponse;
+ this.addresses = addressesResponse.data;
if (!this.addresses || !this.addresses.length > 0) {
notify(
@@ -151,31 +165,45 @@ export const useInvoiceOutGlobalStore = defineStore({
},
async invoiceClient(address, formData) {
- if (this.nRequests === this.parallelism || this.isInvoicing) return;
+ try {
+ if (this.nRequests === this.parallelism || this.isInvoicing) return;
- if (this.status === 'stopping') {
- if (this.nRequests) return;
- this.invoicing = false;
- this.status = 'done';
- return;
- }
+ if (this.status === 'stopping') {
+ if (this.nRequests) return;
+ this.invoicing = false;
+ this.status = 'done';
+ return;
+ }
- const params = {
- clientId: address.clientId,
- addressId: address.id,
- invoiceDate: new Date(formData.invoiceDate),
- maxShipped: new Date(formData.maxShipped),
- companyFk: formData.companyFk,
- };
+ const params = {
+ clientId: address.clientId,
+ addressId: address.id,
+ invoiceDate: new Date(formData.invoiceDate),
+ maxShipped: new Date(formData.maxShipped),
+ companyFk: formData.companyFk,
+ };
- this.status = 'invoicing';
- this.invoicing = true;
+ this.status = 'invoicing';
+ this.invoicing = true;
- const invoiceResponse = await invoiceOutService.invoiceClient(params);
+ const invoiceResponse = await axios.post(
+ 'InvoiceOuts/invoiceClient',
+ params
+ );
- if (invoiceResponse.data.error) {
- if (invoiceResponse.status >= 400 && invoiceResponse.status < 500) {
- this.invoiceClientError(address, invoiceResponse);
+ if (invoiceResponse.data) {
+ this.makePdfAndNotify(invoiceResponse.data, address);
+ }
+
+ this.isInvoicing = false;
+ } catch (err) {
+ if (
+ err &&
+ err.response &&
+ err.response.status >= 400 &&
+ err.response.status < 500
+ ) {
+ this.invoiceClientError(address, err.response);
this.addressIndex++;
return;
} else {
@@ -187,11 +215,6 @@ export const useInvoiceOutGlobalStore = defineStore({
);
throw new Error('Critical invoicing error, process stopped');
}
- } else {
- this.isInvoicing = false;
- if (invoiceResponse.data) {
- this.makePdfAndNotify(invoiceResponse.data, address);
- }
}
},
@@ -200,7 +223,7 @@ export const useInvoiceOutGlobalStore = defineStore({
this.nRequests++;
this.totalPdfs++;
const params = { printerFk: this.printer };
- await invoiceOutService.makePdfAndNotify(invoiceId, params);
+ await axios.post(`InvoiceOuts/${invoiceId}/makePdfAndNotify`, params);
this.nPdfs++;
this.nRequests--;
} catch (err) {
@@ -219,14 +242,18 @@ export const useInvoiceOutGlobalStore = defineStore({
throw err;
},
- async getNegativeBasesCsv(from, to, filter = {}) {
+ async getNegativeBasesCsv() {
try {
- const params = { from: from, to: to, filter };
- const CSVResponse = await invoiceOutService.getNegativeBasesCsv(params);
+ const arrayData = useArrayData('InvoiceOutNegative');
+ const params = arrayData.store.currentFilter;
- if (CSVResponse.data && CSVResponse.data.error) throw new Error();
+ const { data } = await axios.get('InvoiceOuts/negativeBasesCsv', {
+ params,
+ });
- const status = exportFile('negativeBases.csv', CSVResponse, {
+ if (data.data && data.data.error) throw new Error();
+
+ const status = exportFile('negativeBases.csv', data, {
encoding: 'windows-1252',
mimeType: 'text/csv;charset=windows-1252;',
});
@@ -236,6 +263,7 @@ export const useInvoiceOutGlobalStore = defineStore({
}
} catch (err) {
notify('invoiceOut.negativeBases.errors.downloadCsvFailed', 'negative');
+ throw new Error();
}
},
diff --git a/src/stores/useArrayDataStore.js b/src/stores/useArrayDataStore.js
index 223406a33..115c161dd 100644
--- a/src/stores/useArrayDataStore.js
+++ b/src/stores/useArrayDataStore.js
@@ -19,6 +19,7 @@ export const useArrayDataStore = defineStore('arrayDataStore', () => {
order: '',
data: ref(),
isLoading: false,
+ userParamsChanged: false,
exprBuilder: null,
};
}
diff --git a/src/stores/useNavigationStore.js b/src/stores/useNavigationStore.js
index 5daa618d5..2eda6f686 100644
--- a/src/stores/useNavigationStore.js
+++ b/src/stores/useNavigationStore.js
@@ -14,10 +14,12 @@ export const useNavigationStore = defineStore('navigationStore', () => {
'invoiceIn',
'worker',
'shelving',
+ 'order',
'wagon',
'route',
'supplier',
'travel',
+ 'entry',
];
const pinnedModules = ref([]);
const role = useRole();
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 60d8c5be1..9d3adbc73 100644
--- a/test/cypress/integration/invoiceIn/invoiceInList.spec.js
+++ b/test/cypress/integration/invoiceIn/invoiceInList.spec.js
@@ -9,6 +9,7 @@ describe('InvoiceInList', () => {
beforeEach(() => {
cy.login('developer');
cy.visit(`/#/invoice-in`);
+ cy.clickFilterSearchBtn();
});
it('should redirect on clicking a invoice', () => {
diff --git a/test/cypress/integration/vnSearchBar.spec.js b/test/cypress/integration/vnSearchBar.spec.js
new file mode 100644
index 000000000..d6dea0780
--- /dev/null
+++ b/test/cypress/integration/vnSearchBar.spec.js
@@ -0,0 +1,19 @@
+///
+describe('VnSearchBar', () => {
+ beforeEach(() => {
+ cy.login('developer');
+ cy.visit('/');
+ });
+
+ it('should redirect to new customer', () => {
+ cy.visit('#/customer/1112/basic-data')
+ cy.openLeftMenu();
+ cy.get('.q-item > .q-item__label').should('have.text',' #1112')
+ cy.closeLeftMenu();
+ cy.clearSearchbar();
+ cy.writeSearchbar('1{enter}');
+ cy.openLeftMenu();
+ cy.get('.q-item > .q-item__label').should('have.text',' #1')
+ cy.closeLeftMenu();
+ });
+});
diff --git a/test/cypress/support/commands.js b/test/cypress/support/commands.js
index 4dfde6e21..e4d1cebe1 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) => {
@@ -166,7 +163,28 @@ Cypress.Commands.add('openRightMenu', (element) => {
cy.get('#actions-append').click();
});
+Cypress.Commands.add('openLeftMenu', (element) => {
+ if (element) cy.waitForElement(element);
+ cy.get('.q-toolbar > .q-btn--round.q-btn--dense > .q-btn__content > .q-icon').click();
+});
+Cypress.Commands.add('closeLeftMenu', (element) => {
+ if (element) cy.waitForElement(element);
+ cy.get('.fullscreen').click();
+});
+
+Cypress.Commands.add('clearSearchbar', (element) => {
+ if (element) cy.waitForElement(element);
+ cy.get('#searchbar > form > label > div:nth-child(1) input').clear();
+});
+
+Cypress.Commands.add('writeSearchbar', (value) => {
+ cy.get('#searchbar > form > label > div:nth-child(1) input').type(value);
+});
Cypress.Commands.add('validateContent', (selector, expectedValue) => {
cy.get(selector).should('have.text', expectedValue);
});
+
+Cypress.Commands.add('clickFilterSearchBtn', () => {
+ cy.get('.q-item__section > .q-btn > .q-btn__content > .q-icon').click();
+});
// registerCommands();
diff --git a/test/vitest/__tests__/components/Paginate.spec.js b/test/vitest/__tests__/components/Paginate.spec.js
index af9fb41a1..2a22ce438 100644
--- a/test/vitest/__tests__/components/Paginate.spec.js
+++ b/test/vitest/__tests__/components/Paginate.spec.js
@@ -119,7 +119,7 @@ describe('VnPaginate', () => {
await vm.onLoad(index, done);
expect(vm.pagination.page).toEqual(2);
- expect(done).toHaveBeenCalledWith(true);
+ expect(done).toHaveBeenCalledWith(false);
});
});
});
diff --git a/test/vitest/__tests__/components/common/VnSearchBar.spec.js b/test/vitest/__tests__/components/common/VnSearchBar.spec.js
new file mode 100644
index 000000000..fd0a026ef
--- /dev/null
+++ b/test/vitest/__tests__/components/common/VnSearchBar.spec.js
@@ -0,0 +1,53 @@
+import { vi, describe, expect, it, beforeAll, beforeEach, afterEach } from 'vitest';
+import { createWrapper, axios } from 'app/test/vitest/helper';
+import VnSearchbar from 'components/ui/VnSearchbar.vue';
+
+
+describe('VnSearchBar', () => {
+ let vm;
+ let wrapper;
+
+ beforeAll(() => {
+ wrapper = createWrapper(VnSearchbar, {
+ propsData: {
+ dataKey: 'CustomerList',
+ label: 'Search customer',
+ info: 'Info customer',
+ },
+ });
+ vm = wrapper.vm;
+ vm.route.matched = [
+ {
+ path: '/',
+ },
+ {
+ path: '/customer',
+ },
+ {
+ path: '/customer/:id',
+ },
+ {
+ path: '/customer/:id/basic-data',
+ },
+ ];
+ });
+
+ afterEach(() => {
+ vi.clearAllMocks();
+ });
+ it('should be defined', async () => {
+ expect(vm.searchText).toBeDefined();
+ expect(vm.searchText).toEqual('');
+ });
+ it('should redirect', async () => {
+ vi.spyOn(vm.router,'push');
+ vm.searchText = '1';
+ await vm.search();
+ expect(vm.router.push).toHaveBeenCalledWith('/customer/1/basic-data');
+ vm.searchText = '1112';
+ expect(vm.searchText).toEqual('1112');
+ vi.spyOn(vm.router,'push');
+ await vm.search();
+ expect(vm.router.push).toHaveBeenCalledWith('/customer/1112/basic-data');
+ });
+});
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');
+ });
+});
diff --git a/test/vitest/__tests__/pages/Customer/CustomerPayments.spec.js b/test/vitest/__tests__/pages/Customer/CustomerPayments.spec.js
index 5d096f113..13293f596 100644
--- a/test/vitest/__tests__/pages/Customer/CustomerPayments.spec.js
+++ b/test/vitest/__tests__/pages/Customer/CustomerPayments.spec.js
@@ -1,11 +1,10 @@
import { vi, describe, expect, it, beforeAll, afterEach } from 'vitest';
import { createWrapper, axios } from 'app/test/vitest/helper';
-import CustomerPayments from 'pages/Customer/CustomerPayments.vue';
+import CustomerPayments from 'src/pages/Customer/Payments/CustomerPayments.vue';
describe('CustomerPayments', () => {
let vm;
-
beforeAll(() => {
vm = createWrapper(CustomerPayments, {
global: {
@@ -13,7 +12,7 @@ describe('CustomerPayments', () => {
mocks: {
fetch: vi.fn(),
},
- }
+ },
}).vm;
});
@@ -28,11 +27,10 @@ describe('CustomerPayments', () => {
await vm.confirmTransaction({ id: 1 });
-
expect(vm.quasar.notify).toHaveBeenCalledWith(
expect.objectContaining({
message: 'Payment confirmed',
- type: 'positive'
+ type: 'positive',
})
);
});