|
@@ -430,7 +430,11 @@ module.exports = app => {
|
|
|
const account = JSON.parse(dskAccount.dsk_account);
|
|
const account = JSON.parse(dskAccount.dsk_account);
|
|
|
const compilation = await dsk.getCompilation(data.mobile);
|
|
const compilation = await dsk.getCompilation(data.mobile);
|
|
|
response.data = {};
|
|
response.data = {};
|
|
|
- response.data.compilation = compilation && compilation.length > 0 ? ctx.helper._.filter(compilation, { type: 'highway' }) : [];
|
|
|
|
|
|
|
+ if (data.filterCompilationType) {
|
|
|
|
|
+ response.data.compilation = compilation && compilation.length > 0 ? ctx.helper._.filter(compilation, { type: data.filterCompilationType }) : [];
|
|
|
|
|
+ } else {
|
|
|
|
|
+ response.data.compilation = compilation || [];
|
|
|
|
|
+ }
|
|
|
if (data.getProject) {
|
|
if (data.getProject) {
|
|
|
const compilationInfo = data.compilationId ? ctx.helper._.find(compilation, { ID: data.compilationId }) : null;
|
|
const compilationInfo = data.compilationId ? ctx.helper._.find(compilation, { ID: data.compilationId }) : null;
|
|
|
const compilationId = compilationInfo ? compilationInfo.ID : (compilation.length > 0 ? compilation[0].ID : null);
|
|
const compilationId = compilationInfo ? compilationInfo.ID : (compilation.length > 0 ? compilation[0].ID : null);
|