rez_core 5.0.136 → 5.0.138
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config/bull.config.js +3 -3
- package/dist/config/bull.config.js.map +1 -1
- package/dist/module/export/controller/export.controller.js +2 -1
- package/dist/module/export/controller/export.controller.js.map +1 -1
- package/dist/module/export/export.module.js +2 -1
- package/dist/module/export/export.module.js.map +1 -1
- package/dist/module/export/service/export.service.d.ts +3 -1
- package/dist/module/export/service/export.service.js +20 -6
- package/dist/module/export/service/export.service.js.map +1 -1
- package/dist/module/filter/dto/filter-request.dto.d.ts +1 -0
- package/dist/module/layout_preference/layout_preference.module.js +1 -1
- package/dist/module/layout_preference/layout_preference.module.js.map +1 -1
- package/dist/module/meta/service/entity-attribute-update.service.js +0 -1
- package/dist/module/meta/service/entity-attribute-update.service.js.map +1 -1
- package/dist/module/meta/service/media-data.service.d.ts +7 -1
- package/dist/module/meta/service/media-data.service.js +17 -2
- package/dist/module/meta/service/media-data.service.js.map +1 -1
- package/dist/module/meta/service/resolver.service.js +0 -2
- package/dist/module/meta/service/resolver.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/config/bull.config.ts +3 -3
- package/src/module/export/controller/export.controller.ts +2 -0
- package/src/module/export/export.module.ts +3 -1
- package/src/module/export/service/export.service.ts +26 -6
- package/src/module/filter/dto/filter-request.dto.ts +1 -0
- package/src/module/layout_preference/layout_preference.module.ts +1 -1
- package/src/module/meta/service/entity-attribute-update.service.ts +1 -3
- package/src/module/meta/service/media-data.service.ts +17 -2
- package/src/module/meta/service/resolver.service.ts +0 -2
- package/src/resources/uat.properties.yaml +3 -0
package/package.json
CHANGED
|
@@ -13,9 +13,9 @@ export class BullConfigService implements SharedBullConfigurationFactory {
|
|
|
13
13
|
createSharedConfiguration(): BullModuleOptions {
|
|
14
14
|
return {
|
|
15
15
|
redis: {
|
|
16
|
-
host: this.configService.get<string>('REDIS_HOST'
|
|
17
|
-
port: this.configService.get<number>('REDIS_PORT'
|
|
18
|
-
password: this.configService.get<string>('REDIS_PASSWORD'
|
|
16
|
+
host: this.configService.get<string>('REDIS_HOST'),
|
|
17
|
+
port: this.configService.get<number>('REDIS_PORT'),
|
|
18
|
+
password: this.configService.get<string>('REDIS_PASSWORD'),
|
|
19
19
|
db: this.configService.get<number>('REDIS_DB', 0),
|
|
20
20
|
// Enable offline queue to handle Redis disconnections
|
|
21
21
|
enableOfflineQueue: true,
|
|
@@ -33,6 +33,7 @@ export class ExportController {
|
|
|
33
33
|
attributeFilter,
|
|
34
34
|
tabs,
|
|
35
35
|
sortby,
|
|
36
|
+
view
|
|
36
37
|
} = body;
|
|
37
38
|
|
|
38
39
|
const { ...otherQueryParams } = queryParams;
|
|
@@ -51,6 +52,7 @@ export class ExportController {
|
|
|
51
52
|
customLevelType: levelType,
|
|
52
53
|
customLevelId: levelId,
|
|
53
54
|
customAppCode: appCode,
|
|
55
|
+
view
|
|
54
56
|
},
|
|
55
57
|
);
|
|
56
58
|
|
|
@@ -3,9 +3,11 @@ import { EntityModule } from '../meta/entity.module';
|
|
|
3
3
|
import { FilterModule } from '../filter/filter.module';
|
|
4
4
|
import { ExportService } from './service/export.service';
|
|
5
5
|
import { ExportController } from './controller/export.controller';
|
|
6
|
+
import { LayoutModule } from '../layout/layout.module';
|
|
7
|
+
import { LayoutPreferenceModule } from '../layout_preference/layout_preference.module';
|
|
6
8
|
|
|
7
9
|
@Module({
|
|
8
|
-
imports: [EntityModule, FilterModule],
|
|
10
|
+
imports: [EntityModule, FilterModule, LayoutPreferenceModule],
|
|
9
11
|
providers: [ExportService],
|
|
10
12
|
exports: [ExportService],
|
|
11
13
|
controllers: [ExportController]
|
|
@@ -8,6 +8,7 @@ import { ExcelsheetData } from '../../../utils/dto/excelsheet-data.dto';
|
|
|
8
8
|
import { AttributeMasterService } from '../../meta/service/attribute-master.service';
|
|
9
9
|
import { EntityMasterService } from '../../meta/service/entity-master.service';
|
|
10
10
|
import { FilterService } from '../../filter/service/filter.service';
|
|
11
|
+
import { LayoutPreferenceRepository } from '../../layout_preference/repository/layout_preference.repository';
|
|
11
12
|
|
|
12
13
|
@Injectable()
|
|
13
14
|
export class ExportService {
|
|
@@ -16,6 +17,7 @@ export class ExportService {
|
|
|
16
17
|
private readonly attributeMasterService: AttributeMasterService,
|
|
17
18
|
private readonly entityMasterService: EntityMasterService,
|
|
18
19
|
private readonly filterService: FilterService,
|
|
20
|
+
private readonly layoutPreferenceRepo: LayoutPreferenceRepository,
|
|
19
21
|
) {
|
|
20
22
|
}
|
|
21
23
|
|
|
@@ -54,11 +56,29 @@ export class ExportService {
|
|
|
54
56
|
dto.loggedInUser,
|
|
55
57
|
);
|
|
56
58
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
+
let labelValueJson = [] as any;
|
|
60
|
+
|
|
61
|
+
if ('current' === dto.view?.toLowerCase()) {
|
|
62
|
+
|
|
63
|
+
const layoutPreference = await this.layoutPreferenceRepo.findByEntityUserId(
|
|
64
|
+
dto.entity_type,
|
|
65
|
+
dto.loggedInUser.level_id,
|
|
66
|
+
dto.loggedInUser.level_type,
|
|
67
|
+
dto.loggedInUser.id,
|
|
68
|
+
'layout',
|
|
69
|
+
);
|
|
70
|
+
|
|
71
|
+
if (layoutPreference) {
|
|
72
|
+
const layoutJson = layoutPreference.mapped_json;
|
|
73
|
+
labelValueJson = layoutJson.column.show_list;
|
|
74
|
+
}
|
|
75
|
+
} else {
|
|
76
|
+
const attributes = await this.attributeMasterService.findAttributesByMappedEntityType(
|
|
59
77
|
dto.entity_type,
|
|
60
78
|
dto.loggedInUser,
|
|
61
79
|
);
|
|
80
|
+
attributes.map(attibute => labelValueJson.push({label: attibute.name , value: attibute.attribute_key}));
|
|
81
|
+
}
|
|
62
82
|
|
|
63
83
|
let filterData = await this.filterService.applyFilterWrapper(dto);
|
|
64
84
|
let entityList = filterData.data.entity_list;
|
|
@@ -69,10 +89,10 @@ export class ExportService {
|
|
|
69
89
|
rowList: [],
|
|
70
90
|
};
|
|
71
91
|
|
|
72
|
-
if (
|
|
73
|
-
sheet.headers =
|
|
74
|
-
const attributeList =
|
|
75
|
-
(col) => col.
|
|
92
|
+
if (labelValueJson) {
|
|
93
|
+
sheet.headers = labelValueJson.map((col) => col.label);
|
|
94
|
+
const attributeList = labelValueJson.map(
|
|
95
|
+
(col) => col.value,
|
|
76
96
|
);
|
|
77
97
|
|
|
78
98
|
sheet.rowList = entityList.map((item) =>
|
|
@@ -17,6 +17,6 @@ import { AttributeMaster } from '../meta/entity/attribute-master.entity';
|
|
|
17
17
|
{ provide: 'LayoutPreferenceService', useClass: LayoutPreferenceService },
|
|
18
18
|
LayoutPreferenceRepository,
|
|
19
19
|
],
|
|
20
|
-
exports: ['LayoutPreferenceService'],
|
|
20
|
+
exports: ['LayoutPreferenceService',LayoutPreferenceRepository],
|
|
21
21
|
})
|
|
22
22
|
export class LayoutPreferenceModule {}
|
|
@@ -14,9 +14,7 @@ constructor(
|
|
|
14
14
|
async execute(payload: any): Promise<any> {
|
|
15
15
|
|
|
16
16
|
let { entity, user, config } = payload;
|
|
17
|
-
console.log(entity)
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
// console.log(entity)
|
|
20
18
|
if (entity.entity_type !== 'LEAD') {
|
|
21
19
|
entity = await this.getEntityData('LEAD', entity.parent_id,user );
|
|
22
20
|
}
|
|
@@ -157,7 +157,6 @@ export class MediaDataService extends EntityServiceImpl {
|
|
|
157
157
|
Bucket: this.bucketName,
|
|
158
158
|
Key: mediaData.media_url,
|
|
159
159
|
Expires: Number(expiresIn) || 60 * 5,
|
|
160
|
-
ResponseContentDisposition: 'inline',
|
|
161
160
|
});
|
|
162
161
|
return {
|
|
163
162
|
signedUrl,
|
|
@@ -180,6 +179,16 @@ export class MediaDataService extends EntityServiceImpl {
|
|
|
180
179
|
loggedInUser,
|
|
181
180
|
);
|
|
182
181
|
const mediaData = entityData as MediaData;
|
|
182
|
+
let fileSize: number | undefined;
|
|
183
|
+
if (this.bucketName) {
|
|
184
|
+
const head = await this.s3
|
|
185
|
+
.headObject({
|
|
186
|
+
Bucket: this.bucketName,
|
|
187
|
+
Key: mediaData.media_url,
|
|
188
|
+
})
|
|
189
|
+
.promise();
|
|
190
|
+
fileSize = head.ContentLength;
|
|
191
|
+
}
|
|
183
192
|
|
|
184
193
|
if (!mediaData) {
|
|
185
194
|
throw new Error('Media not found');
|
|
@@ -195,7 +204,13 @@ export class MediaDataService extends EntityServiceImpl {
|
|
|
195
204
|
),
|
|
196
205
|
});
|
|
197
206
|
|
|
198
|
-
return
|
|
207
|
+
return {
|
|
208
|
+
signedUrl,
|
|
209
|
+
fileName: mediaData.file_name,
|
|
210
|
+
id: mediaData.id,
|
|
211
|
+
size: fileSize,
|
|
212
|
+
uploadedDate: mediaData.created_date,
|
|
213
|
+
};
|
|
199
214
|
} catch (error) {
|
|
200
215
|
console.error('Error generating inline URL:', error);
|
|
201
216
|
throw new Error('Failed to generate inline URL');
|
|
@@ -38,8 +38,6 @@ export class ResolverService {
|
|
|
38
38
|
entityData: any,
|
|
39
39
|
entityType: string,
|
|
40
40
|
): Promise<any> {
|
|
41
|
-
console.log('entityData - ', entityData);
|
|
42
|
-
console.log('\nentityType - ', entityType);
|
|
43
41
|
const attributeItems =
|
|
44
42
|
await this.attributeMasterRepo.findAttributesByMappedEntityType(
|
|
45
43
|
entityType,
|