Merge pull request 'MASTER_4689-hotFix(route_index): fix driverRoutePdf' (!1095) from hotFix_driverRoutePdf2 into master
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
Reviewed-on: #1095 Reviewed-by: Joan Sanchez <joan@verdnatura.es>
This commit is contained in:
commit
3564cbe246
|
@ -6,9 +6,9 @@ module.exports = Self => {
|
|||
accepts: [
|
||||
{
|
||||
arg: 'id',
|
||||
type: 'number',
|
||||
type: 'string',
|
||||
required: true,
|
||||
description: 'The client id',
|
||||
description: 'The route id',
|
||||
http: {source: 'path'}
|
||||
},
|
||||
{
|
||||
|
|
|
@ -39,10 +39,7 @@ export default class Controller extends Section {
|
|||
routes.push(route.id);
|
||||
const routesId = routes.join(',');
|
||||
|
||||
this.vnReport.show('driver-route', {
|
||||
authorization: this.vnToken.token,
|
||||
routeId: routesId
|
||||
});
|
||||
this.vnReport.show(`Routes/${routesId}/driver-route-pdf`);
|
||||
}
|
||||
|
||||
openClonationDialog() {
|
||||
|
|
|
@ -49,14 +49,12 @@ describe('Component vnRouteIndex', () => {
|
|||
const data = controller.$.model.data;
|
||||
data[0].checked = true;
|
||||
data[2].checked = true;
|
||||
const expectedParams = {
|
||||
authorization: null,
|
||||
routeId: '1,3'
|
||||
};
|
||||
|
||||
const routeIds = '1,3';
|
||||
|
||||
controller.showRouteReport();
|
||||
|
||||
expect(controller.vnReport.show).toHaveBeenCalledWith('driver-route', expectedParams);
|
||||
expect(controller.vnReport.show).toHaveBeenCalledWith(`Routes/${routeIds}/driver-route-pdf`);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -14,6 +14,9 @@ module.exports = {
|
|||
const routes = await this.fetchRoutes(ids);
|
||||
const tickets = await this.fetchTickets(ids);
|
||||
|
||||
if (!tickets || !tickets.id)
|
||||
throw new Error('This route(s) not have ticket(s)');
|
||||
|
||||
const map = new Map();
|
||||
|
||||
for (let route of routes)
|
||||
|
|
|
@ -23,3 +23,4 @@ import: Importe
|
|||
route: Ruta
|
||||
routeId: Ruta {0}
|
||||
ticket: Ticket
|
||||
This route(s) not have ticket(s): Esta ruta(s) no tiene ticket(s)
|
||||
|
|
Loading…
Reference in New Issue