7226-testToMaster_2416 #2320
|
@ -30,7 +30,7 @@ module.exports = Self => {
|
||||||
path: `/:id/downloadFile`,
|
path: `/:id/downloadFile`,
|
||||||
verb: 'GET'
|
verb: 'GET'
|
||||||
},
|
},
|
||||||
accessScopes: ['read:multimedia']
|
// accessScopes: ['read:multimedia']
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.downloadFile = async function(ctx, id) {
|
Self.downloadFile = async function(ctx, id) {
|
||||||
|
|
|
@ -43,7 +43,7 @@ module.exports = Self => {
|
||||||
path: `/:id/download`,
|
path: `/:id/download`,
|
||||||
verb: 'GET'
|
verb: 'GET'
|
||||||
},
|
},
|
||||||
accessScopes: ['read:multimedia']
|
// accessScopes: ['read:multimedia']
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.download = async function(id, fileCabinet, filter) {
|
Self.download = async function(id, fileCabinet, filter) {
|
||||||
|
|
|
@ -48,7 +48,7 @@ module.exports = Self => {
|
||||||
path: `/:collection/:size/:id/download`,
|
path: `/:collection/:size/:id/download`,
|
||||||
verb: 'GET'
|
verb: 'GET'
|
||||||
},
|
},
|
||||||
accessScopes: ['read:multimedia']
|
// accessScopes: ['read:multimedia']
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.download = async function(ctx, collection, size, id) {
|
Self.download = async function(ctx, collection, size, id) {
|
||||||
|
|
|
@ -33,6 +33,7 @@ BEGIN
|
||||||
ii.operated = IFNULL(ii.operated,d.operated),
|
ii.operated = IFNULL(ii.operated,d.operated),
|
||||||
ii.issued = IFNULL(ii.issued,d.issued),
|
ii.issued = IFNULL(ii.issued,d.issued),
|
||||||
ii.bookEntried = IFNULL(ii.bookEntried,d.bookEntried),
|
ii.bookEntried = IFNULL(ii.bookEntried,d.bookEntried),
|
||||||
|
e.isBooked = TRUE,
|
||||||
e.isConfirmed = TRUE
|
e.isConfirmed = TRUE
|
||||||
WHERE d.id = vDuaFk;
|
WHERE d.id = vDuaFk;
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,8 @@ export default class Token {
|
||||||
|
|
||||||
getStorage(storage) {
|
getStorage(storage) {
|
||||||
this.token = storage.getItem('vnToken');
|
this.token = storage.getItem('vnToken');
|
||||||
this.tokenMultimedia = storage.getItem('vnTokenMultimedia');
|
// Cambio realizado temporalmente
|
||||||
|
this.tokenMultimedia = this.token; // storage.getItem('vnTokenMultimedia');
|
||||||
if (!this.token) return;
|
if (!this.token) return;
|
||||||
const created = storage.getItem('vnTokenCreated');
|
const created = storage.getItem('vnTokenCreated');
|
||||||
this.created = created && new Date(created);
|
this.created = created && new Date(created);
|
||||||
|
|
|
@ -117,6 +117,21 @@
|
||||||
"video/mp4"
|
"video/mp4"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"supplierStorage": {
|
||||||
|
"name": "supplierStorage",
|
||||||
|
"connector": "loopback-component-storage",
|
||||||
|
"provider": "filesystem",
|
||||||
|
"root": "./storage/dms",
|
||||||
|
"maxFileSize": "31457280",
|
||||||
|
"allowedContentTypes": [
|
||||||
|
"image/png",
|
||||||
|
"image/jpeg",
|
||||||
|
"image/jpg",
|
||||||
|
"image/webp",
|
||||||
|
"video/mp4",
|
||||||
|
"application/pdf"
|
||||||
|
]
|
||||||
|
},
|
||||||
"accessStorage": {
|
"accessStorage": {
|
||||||
"name": "accessStorage",
|
"name": "accessStorage",
|
||||||
"connector": "loopback-component-storage",
|
"connector": "loopback-component-storage",
|
||||||
|
|
|
@ -35,7 +35,7 @@ module.exports = Self => {
|
||||||
path: '/:id/claim-pickup-pdf',
|
path: '/:id/claim-pickup-pdf',
|
||||||
verb: 'GET'
|
verb: 'GET'
|
||||||
},
|
},
|
||||||
accessScopes: ['read:multimedia']
|
//accessScopes: ['read:multimedia']
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.claimPickupPdf = (ctx, id) => Self.printReport(ctx, id, 'claim-pickup-order');
|
Self.claimPickupPdf = (ctx, id) => Self.printReport(ctx, id, 'claim-pickup-order');
|
||||||
|
|
|
@ -33,7 +33,7 @@ module.exports = Self => {
|
||||||
path: `/:id/downloadFile`,
|
path: `/:id/downloadFile`,
|
||||||
verb: 'GET'
|
verb: 'GET'
|
||||||
},
|
},
|
||||||
accessScopes: ['read:multimedia']
|
//accessScopes: ['read:multimedia']
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.downloadFile = async function(ctx, id) {
|
Self.downloadFile = async function(ctx, id) {
|
||||||
|
|
|
@ -46,7 +46,7 @@ module.exports = Self => {
|
||||||
path: '/:id/campaign-metrics-pdf',
|
path: '/:id/campaign-metrics-pdf',
|
||||||
verb: 'GET'
|
verb: 'GET'
|
||||||
},
|
},
|
||||||
accessScopes: ['read:multimedia']
|
//accessScopes: ['read:multimedia']
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.campaignMetricsPdf = (ctx, id) => Self.printReport(ctx, id, 'campaign-metrics');
|
Self.campaignMetricsPdf = (ctx, id) => Self.printReport(ctx, id, 'campaign-metrics');
|
||||||
|
|
|
@ -34,7 +34,7 @@ module.exports = Self => {
|
||||||
path: '/:id/entry-order-pdf',
|
path: '/:id/entry-order-pdf',
|
||||||
verb: 'GET'
|
verb: 'GET'
|
||||||
},
|
},
|
||||||
accessScopes: ['read:multimedia']
|
//accessScopes: ['read:multimedia']
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.entryOrderPdf = (ctx, id) => Self.printReport(ctx, id, 'entry-order');
|
Self.entryOrderPdf = (ctx, id) => Self.printReport(ctx, id, 'entry-order');
|
||||||
|
|
|
@ -32,7 +32,7 @@ module.exports = Self => {
|
||||||
path: '/:id/download',
|
path: '/:id/download',
|
||||||
verb: 'GET'
|
verb: 'GET'
|
||||||
},
|
},
|
||||||
accessScopes: ['read:multimedia']
|
// accessScopes: ['read:multimedia']
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.download = async function(ctx, id, options) {
|
Self.download = async function(ctx, id, options) {
|
||||||
|
|
|
@ -32,7 +32,7 @@ module.exports = Self => {
|
||||||
path: '/downloadZip',
|
path: '/downloadZip',
|
||||||
verb: 'GET'
|
verb: 'GET'
|
||||||
},
|
},
|
||||||
accessScopes: ['read:multimedia']
|
// accessScopes: ['read:multimedia']
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.downloadZip = async function(ctx, ids, options) {
|
Self.downloadZip = async function(ctx, ids, options) {
|
||||||
|
|
|
@ -35,7 +35,7 @@ module.exports = Self => {
|
||||||
path: '/:reference/exportation-pdf',
|
path: '/:reference/exportation-pdf',
|
||||||
verb: 'GET'
|
verb: 'GET'
|
||||||
},
|
},
|
||||||
accessScopes: ['read:multimedia']
|
// accessScopes: ['read:multimedia']
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.exportationPdf = (ctx, reference) => Self.printReport(ctx, reference, 'exportation');
|
Self.exportationPdf = (ctx, reference) => Self.printReport(ctx, reference, 'exportation');
|
||||||
|
|
|
@ -38,7 +38,7 @@ module.exports = Self => {
|
||||||
path: '/:reference/invoice-csv',
|
path: '/:reference/invoice-csv',
|
||||||
verb: 'GET'
|
verb: 'GET'
|
||||||
},
|
},
|
||||||
accessScopes: ['read:multimedia']
|
// accessScopes: ['read:multimedia']
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.invoiceCsv = async reference => {
|
Self.invoiceCsv = async reference => {
|
||||||
|
|
|
@ -40,7 +40,7 @@ module.exports = Self => {
|
||||||
path: '/negativeBasesCsv',
|
path: '/negativeBasesCsv',
|
||||||
verb: 'GET'
|
verb: 'GET'
|
||||||
},
|
},
|
||||||
accessScopes: ['read:multimedia']
|
// accessScopes: ['read:multimedia']
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.negativeBasesCsv = async(ctx, options) => {
|
Self.negativeBasesCsv = async(ctx, options) => {
|
||||||
|
|
|
@ -11,7 +11,7 @@ module.exports = Self => {
|
||||||
path: `/download`,
|
path: `/download`,
|
||||||
verb: 'POST',
|
verb: 'POST',
|
||||||
},
|
},
|
||||||
accessScopes: ['read:multimedia']
|
//accessScopes: ['read:multimedia']
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.download = async() => {
|
Self.download = async() => {
|
||||||
|
|
|
@ -30,7 +30,7 @@ module.exports = Self => {
|
||||||
path: '/downloadCmrsZip',
|
path: '/downloadCmrsZip',
|
||||||
verb: 'GET'
|
verb: 'GET'
|
||||||
},
|
},
|
||||||
accessScopes: ['read:multimedia']
|
//accessScopes: ['read:multimedia']
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.downloadCmrsZip = async function(ctx, ids, options) {
|
Self.downloadCmrsZip = async function(ctx, ids, options) {
|
||||||
|
|
|
@ -30,7 +30,7 @@ module.exports = Self => {
|
||||||
path: '/downloadZip',
|
path: '/downloadZip',
|
||||||
verb: 'GET'
|
verb: 'GET'
|
||||||
},
|
},
|
||||||
accessScopes: ['read:multimedia']
|
//accessScopes: ['read:multimedia']
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.downloadZip = async function(ctx, id, options) {
|
Self.downloadZip = async function(ctx, id, options) {
|
||||||
|
|
|
@ -35,7 +35,7 @@ module.exports = Self => {
|
||||||
path: '/:id/driver-route-pdf',
|
path: '/:id/driver-route-pdf',
|
||||||
verb: 'GET'
|
verb: 'GET'
|
||||||
},
|
},
|
||||||
accessScopes: ['read:multimedia']
|
//accessScopes: ['read:multimedia']
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ module.exports = Self => {
|
||||||
path: '/:id/campaign-metrics-pdf',
|
path: '/:id/campaign-metrics-pdf',
|
||||||
verb: 'GET'
|
verb: 'GET'
|
||||||
},
|
},
|
||||||
accessScopes: ['read:multimedia']
|
// accessScopes: ['read:multimedia']
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.campaignMetricsPdf = (ctx, id) => Self.printReport(ctx, id, 'supplier-campaign-metrics');
|
Self.campaignMetricsPdf = (ctx, id) => Self.printReport(ctx, id, 'supplier-campaign-metrics');
|
||||||
|
|
|
@ -8,6 +8,9 @@
|
||||||
"SupplierDms": {
|
"SupplierDms": {
|
||||||
"dataSource": "vn"
|
"dataSource": "vn"
|
||||||
},
|
},
|
||||||
|
"SupplierContainer": {
|
||||||
|
"dataSource": "supplierStorage"
|
||||||
|
},
|
||||||
"SupplierAddress": {
|
"SupplierAddress": {
|
||||||
"dataSource": "vn"
|
"dataSource": "vn"
|
||||||
},
|
},
|
||||||
|
|
|
@ -35,6 +35,6 @@ module.exports = Self => {
|
||||||
WHERE tc.ticketFk = ? AND s.order < s2.id
|
WHERE tc.ticketFk = ? AND s.order < s2.id
|
||||||
LIMIT 1;`,
|
LIMIT 1;`,
|
||||||
[ticketFk], myOptions);
|
[ticketFk], myOptions);
|
||||||
return result.length > 0 && result[0]['ticketFk'] > 0;
|
return result[0]?.ticketFk > 0 && result[0].ticketFk;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -27,7 +27,7 @@ describe('ticketCollection hasUncheckedTicket()', () => {
|
||||||
}, myOptions);
|
}, myOptions);
|
||||||
const result = await models.TicketCollection.hasUncheckedTicket(ticketFk, myOptions);
|
const result = await models.TicketCollection.hasUncheckedTicket(ticketFk, myOptions);
|
||||||
|
|
||||||
expect(result).toBe(true);
|
expect(result).toBeTruthy();
|
||||||
await tx.rollback();
|
await tx.rollback();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
await tx.rollback();
|
await tx.rollback();
|
||||||
|
|
|
@ -38,7 +38,7 @@ module.exports = Self => {
|
||||||
path: '/:id/delivery-note-csv',
|
path: '/:id/delivery-note-csv',
|
||||||
verb: 'GET'
|
verb: 'GET'
|
||||||
},
|
},
|
||||||
accessScopes: ['read:multimedia']
|
//accessScopes: ['read:multimedia']
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.deliveryNoteCsv = async id => {
|
Self.deliveryNoteCsv = async id => {
|
||||||
|
|
|
@ -42,7 +42,7 @@ module.exports = Self => {
|
||||||
path: '/:id/delivery-note-pdf',
|
path: '/:id/delivery-note-pdf',
|
||||||
verb: 'GET'
|
verb: 'GET'
|
||||||
},
|
},
|
||||||
accessScopes: ['read:multimedia']
|
//accessScopes: ['read:multimedia']
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.deliveryNotePdf = (ctx, id) => Self.printReport(ctx, id, 'delivery-note');
|
Self.deliveryNotePdf = (ctx, id) => Self.printReport(ctx, id, 'delivery-note');
|
||||||
|
|
|
@ -79,7 +79,7 @@ module.exports = Self => {
|
||||||
path: '/extra-community-pdf',
|
path: '/extra-community-pdf',
|
||||||
verb: 'GET'
|
verb: 'GET'
|
||||||
},
|
},
|
||||||
accessScopes: ['read:multimedia']
|
//accessScopes: ['read:multimedia']
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.extraCommunityPdf = ctx => Self.printReport(ctx, null, 'extra-community');
|
Self.extraCommunityPdf = ctx => Self.printReport(ctx, null, 'extra-community');
|
||||||
|
|
|
@ -30,7 +30,7 @@ module.exports = Self => {
|
||||||
path: `/:id/downloadFile`,
|
path: `/:id/downloadFile`,
|
||||||
verb: 'GET'
|
verb: 'GET'
|
||||||
},
|
},
|
||||||
accessScopes: ['read:multimedia']
|
//accessScopes: ['read:multimedia']
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.downloadFile = async function(ctx, id) {
|
Self.downloadFile = async function(ctx, id) {
|
||||||
|
|
Loading…
Reference in New Issue