feat: refs #8441 add VehicleInvoiceIn component with invoice management functionality #1567

Open
jtubau wants to merge 67 commits from 8441-createVehicleInvoiceInSection into dev
5 changed files with 13 additions and 7 deletions
Showing only changes of commit b8be248af9 - Show all commits

View File

@ -79,9 +79,13 @@ const columns = computed(() => [
]);
async function unassignInvoice(id) {
await axios.delete(`VehicleInvoiceIns/${id}`);
notify(t('globals.dataSaved'), 'positive');
tableRef.value.reload();
try {
await axios.delete(`VehicleInvoiceIns/${id}`);
jtubau marked this conversation as resolved Outdated

Si falla el delete mostrará la notificación de dataSaved Haz algo así:
async () => { try { await axios.delete(Vehicles/${entity.id}); notify('vehicle.remove', 'positive'); $router.push({ name: 'VehicleList' }); } catch (e) { throw e; } }

Si falla el delete mostrará la notificación de _dataSaved_ Haz algo así: ` async () => { try { await axios.delete(`Vehicles/${entity.id}`); notify('vehicle.remove', 'positive'); $router.push({ name: 'VehicleList' }); } catch (e) { throw e; } }`
notify(t('vehicle.ticket.invoiceUnlinked'), 'positive');
tableRef.value.reload();
} catch (e) {
throw e;
jtubau marked this conversation as resolved Outdated

throw e

throw e
}
}
</script>

View File

@ -21,5 +21,6 @@ vehicle:
ticket:
assignedInvoices: Assigned Invoices
assignInvoice: Assign invoice
invoiceUnlinked: Invoice unlinked
jtubau marked this conversation as resolved Outdated

el adjetivo va delante en inglés

el adjetivo va delante en inglés

cambiado

cambiado
unassignInvoice: Unassign invoice
unassignInvoiceConfirmation: This invoice will be unassigned from this vehicle! Continue anyway?

View File

@ -21,5 +21,6 @@ vehicle:
ticket:
assignedInvoices: Facturas vinculadas
assignInvoice: Vincular factura
invoiceUnlinked: Factura desvinculada
unassignInvoice: Desvincular factura
unassignInvoiceConfirmation: Esta factura se desvinculará de este vehículo! ¿Continuar de todas formas?

View File

@ -17,7 +17,7 @@ route:
clientFk: Id cliente
countryFk: Pais
warehouseFk: Almacén
shipped: Fecha preparación
shipped: F. preparación
jtubau marked this conversation as resolved Outdated

Poner todas las fechas con el mismo formato. F. x

Poner todas las fechas con el mismo formato. F. x
agencyModeName: Agencia Ruta
agencyAgreement: Agencia Acuerdo
issued: F. emisión
@ -58,6 +58,6 @@ route:
routeFk: Id ruta
country: País
clientFk: Id cliente
shipped: Fecha preparación
shipped: F. preparación
viewCmr: Ver CMR
downloadCmrs: Descargar CMRs

View File

@ -1,4 +1,4 @@
describe.only('Vehicle Invoice In', () => {
describe('Vehicle Invoice In', () => {
const selectors = {
jtubau marked this conversation as resolved Outdated

getLinkSelector

getLinkSelector
firstRowSupplier: 'tr:first-child > .expand > .no-padding > .link',
firstRowInvoice:
@ -42,7 +42,7 @@ describe.only('Vehicle Invoice In', () => {
it('Should unassign an invoice', () => {
cy.dataCy(selectors.unassignBtn).last().click();
cy.clickConfirm();
cy.checkNotification('Data saved');
cy.checkNotification('Invoice unlinked');
});
describe('Supplier pop-ups', () => {
jtubau marked this conversation as resolved Outdated

Creo que con validar que se abra el popup es suficiente.

Creo que con validar que se abra el popup es suficiente.