Merge pull request '#6930 FIX Show report and File.getPath' (!2215) from 6930_FIX_dms_TokenMultimedia into dev
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
Reviewed-on: #2215 Reviewed-by: Alex Moreno <alexm@verdnatura.es>
This commit is contained in:
commit
8b20a56407
|
@ -14,7 +14,7 @@ class File {
|
||||||
*/
|
*/
|
||||||
getPath(dmsUrl) {
|
getPath(dmsUrl) {
|
||||||
const serializedParams = this.$httpParamSerializer({
|
const serializedParams = this.$httpParamSerializer({
|
||||||
access_token: this.vnToken.token
|
access_token: this.vnToken.tokenMultimedia
|
||||||
});
|
});
|
||||||
|
|
||||||
return `${dmsUrl}?${serializedParams}`;
|
return `${dmsUrl}?${serializedParams}`;
|
||||||
|
|
|
@ -15,7 +15,7 @@ class Report {
|
||||||
*/
|
*/
|
||||||
show(path, params) {
|
show(path, params) {
|
||||||
params = Object.assign({
|
params = Object.assign({
|
||||||
access_token: this.vnToken.token
|
access_token: this.vnToken.tokenMultimedia
|
||||||
}, params);
|
}, params);
|
||||||
const serializedParams = this.$httpParamSerializer(params);
|
const serializedParams = this.$httpParamSerializer(params);
|
||||||
const query = serializedParams ? `?${serializedParams}` : '';
|
const query = serializedParams ? `?${serializedParams}` : '';
|
||||||
|
|
|
@ -34,7 +34,8 @@ module.exports = Self => {
|
||||||
http: {
|
http: {
|
||||||
path: '/:id/claim-pickup-pdf',
|
path: '/:id/claim-pickup-pdf',
|
||||||
verb: 'GET'
|
verb: 'GET'
|
||||||
}
|
},
|
||||||
|
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');
|
||||||
|
|
|
@ -45,7 +45,8 @@ module.exports = Self => {
|
||||||
http: {
|
http: {
|
||||||
path: '/:id/campaign-metrics-pdf',
|
path: '/:id/campaign-metrics-pdf',
|
||||||
verb: 'GET'
|
verb: 'GET'
|
||||||
}
|
},
|
||||||
|
accessScopes: ['read:multimedia']
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.campaignMetricsPdf = (ctx, id) => Self.printReport(ctx, id, 'campaign-metrics');
|
Self.campaignMetricsPdf = (ctx, id) => Self.printReport(ctx, id, 'campaign-metrics');
|
||||||
|
|
|
@ -33,7 +33,8 @@ module.exports = Self => {
|
||||||
http: {
|
http: {
|
||||||
path: '/:id/entry-order-pdf',
|
path: '/:id/entry-order-pdf',
|
||||||
verb: 'GET'
|
verb: 'GET'
|
||||||
}
|
},
|
||||||
|
accessScopes: ['read:multimedia']
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.entryOrderPdf = (ctx, id) => Self.printReport(ctx, id, 'entry-order');
|
Self.entryOrderPdf = (ctx, id) => Self.printReport(ctx, id, 'entry-order');
|
||||||
|
|
|
@ -34,7 +34,8 @@ module.exports = Self => {
|
||||||
http: {
|
http: {
|
||||||
path: '/:reference/exportation-pdf',
|
path: '/:reference/exportation-pdf',
|
||||||
verb: 'GET'
|
verb: 'GET'
|
||||||
}
|
},
|
||||||
|
accessScopes: ['read:multimedia']
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.exportationPdf = (ctx, reference) => Self.printReport(ctx, reference, 'exportation');
|
Self.exportationPdf = (ctx, reference) => Self.printReport(ctx, reference, 'exportation');
|
||||||
|
|
|
@ -37,7 +37,8 @@ module.exports = Self => {
|
||||||
http: {
|
http: {
|
||||||
path: '/:reference/invoice-csv',
|
path: '/:reference/invoice-csv',
|
||||||
verb: 'GET'
|
verb: 'GET'
|
||||||
}
|
},
|
||||||
|
accessScopes: ['read:multimedia']
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.invoiceCsv = async reference => {
|
Self.invoiceCsv = async reference => {
|
||||||
|
|
|
@ -39,7 +39,8 @@ module.exports = Self => {
|
||||||
http: {
|
http: {
|
||||||
path: '/negativeBasesCsv',
|
path: '/negativeBasesCsv',
|
||||||
verb: 'GET'
|
verb: 'GET'
|
||||||
}
|
},
|
||||||
|
accessScopes: ['read:multimedia']
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.negativeBasesCsv = async(ctx, options) => {
|
Self.negativeBasesCsv = async(ctx, options) => {
|
||||||
|
|
|
@ -44,7 +44,8 @@ module.exports = Self => {
|
||||||
http: {
|
http: {
|
||||||
path: '/:id/campaign-metrics-pdf',
|
path: '/:id/campaign-metrics-pdf',
|
||||||
verb: 'GET'
|
verb: 'GET'
|
||||||
}
|
},
|
||||||
|
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');
|
||||||
|
|
|
@ -37,7 +37,8 @@ module.exports = Self => {
|
||||||
http: {
|
http: {
|
||||||
path: '/:id/delivery-note-csv',
|
path: '/:id/delivery-note-csv',
|
||||||
verb: 'GET'
|
verb: 'GET'
|
||||||
}
|
},
|
||||||
|
accessScopes: ['read:multimedia']
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.deliveryNoteCsv = async id => {
|
Self.deliveryNoteCsv = async id => {
|
||||||
|
|
|
@ -41,7 +41,8 @@ module.exports = Self => {
|
||||||
http: {
|
http: {
|
||||||
path: '/:id/delivery-note-pdf',
|
path: '/:id/delivery-note-pdf',
|
||||||
verb: 'GET'
|
verb: 'GET'
|
||||||
}
|
},
|
||||||
|
accessScopes: ['read:multimedia']
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.deliveryNotePdf = (ctx, id) => Self.printReport(ctx, id, 'delivery-note');
|
Self.deliveryNotePdf = (ctx, id) => Self.printReport(ctx, id, 'delivery-note');
|
||||||
|
|
|
@ -78,7 +78,8 @@ module.exports = Self => {
|
||||||
http: {
|
http: {
|
||||||
path: '/extra-community-pdf',
|
path: '/extra-community-pdf',
|
||||||
verb: 'GET'
|
verb: 'GET'
|
||||||
}
|
},
|
||||||
|
accessScopes: ['read:multimedia']
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.extraCommunityPdf = ctx => Self.printReport(ctx, null, 'extra-community');
|
Self.extraCommunityPdf = ctx => Self.printReport(ctx, null, 'extra-community');
|
||||||
|
|
|
@ -144,7 +144,7 @@ class Controller extends Section {
|
||||||
const currentFilter = this.$.model.currentFilter;
|
const currentFilter = this.$.model.currentFilter;
|
||||||
|
|
||||||
return Object.assign({
|
return Object.assign({
|
||||||
authorization: this.vnToken.token,
|
authorization: this.vnToken.tokenMultimedia,
|
||||||
filter: currentFilter
|
filter: currentFilter
|
||||||
}, userParams);
|
}, userParams);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue