rez_core 2.2.144 → 2.2.146
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/module/dashboard/controller/dashboard.controller.d.ts +1 -0
- package/dist/module/dashboard/controller/dashboard.controller.js +13 -0
- package/dist/module/dashboard/controller/dashboard.controller.js.map +1 -1
- package/dist/module/dashboard/dashboard.module.js +2 -0
- package/dist/module/dashboard/dashboard.module.js.map +1 -1
- package/dist/module/dashboard/repository/dashboard.repository.d.ts +1 -0
- package/dist/module/dashboard/repository/dashboard.repository.js +3 -0
- package/dist/module/dashboard/repository/dashboard.repository.js.map +1 -1
- package/dist/module/dashboard/service/dashboard.service.d.ts +4 -1
- package/dist/module/dashboard/service/dashboard.service.js +20 -2
- package/dist/module/dashboard/service/dashboard.service.js.map +1 -1
- package/dist/module/meta/service/entity-dynamic.service.js +69 -121
- package/dist/module/meta/service/entity-dynamic.service.js.map +1 -1
- package/dist/module/workflow/controller/task.controller.d.ts +2 -0
- package/dist/module/workflow/controller/task.controller.js.map +1 -1
- package/dist/module/workflow/service/task.service.d.ts +7 -0
- package/dist/module/workflow/service/task.service.js +21 -0
- package/dist/module/workflow/service/task.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/module/dashboard/controller/dashboard.controller.ts +11 -0
- package/src/module/dashboard/dashboard.module.ts +2 -0
- package/src/module/dashboard/repository/dashboard.repository.ts +4 -0
- package/src/module/dashboard/service/dashboard.service.ts +28 -1
- package/src/module/meta/service/entity-dynamic.service.ts +180 -290
- package/src/module/workflow/controller/task.controller.ts +2 -0
- package/src/module/workflow/service/task.service.ts +40 -0
- package/.vscode/extensions.json +0 -5
|
@@ -315,6 +315,8 @@ export class TaskService extends EntityServiceImpl {
|
|
|
315
315
|
mapped_entity_id: number;
|
|
316
316
|
stage_id: number;
|
|
317
317
|
action_id: number;
|
|
318
|
+
reason_code?: string | number;
|
|
319
|
+
remark?: string;
|
|
318
320
|
},
|
|
319
321
|
): Promise<any> {
|
|
320
322
|
// Logic to move task based on the provided body parameters
|
|
@@ -338,6 +340,17 @@ export class TaskService extends EntityServiceImpl {
|
|
|
338
340
|
body.action_id,
|
|
339
341
|
);
|
|
340
342
|
|
|
343
|
+
if (body.reason_code && body.remark) {
|
|
344
|
+
await this.createSystemNote(
|
|
345
|
+
{
|
|
346
|
+
reason_code: body.reason_code,
|
|
347
|
+
remark: body.remark,
|
|
348
|
+
mapped_entity_id: body.mapped_entity_id,
|
|
349
|
+
},
|
|
350
|
+
loggedInUser,
|
|
351
|
+
);
|
|
352
|
+
}
|
|
353
|
+
|
|
341
354
|
return 'Task moved successfully';
|
|
342
355
|
}
|
|
343
356
|
|
|
@@ -387,4 +400,31 @@ export class TaskService extends EntityServiceImpl {
|
|
|
387
400
|
|
|
388
401
|
return { message: 'Task deleted successfully' };
|
|
389
402
|
}
|
|
403
|
+
|
|
404
|
+
async createSystemNote(
|
|
405
|
+
entity: {
|
|
406
|
+
reason_code: string | number;
|
|
407
|
+
remark: string;
|
|
408
|
+
mapped_entity_id: number;
|
|
409
|
+
},
|
|
410
|
+
loggedInUser: any,
|
|
411
|
+
) {
|
|
412
|
+
if (!entity || !entity.mapped_entity_id || !entity.reason_code) return null;
|
|
413
|
+
|
|
414
|
+
const [reason] = await this.dataSource.query(
|
|
415
|
+
`SELECT name FROM cr_list_master_items WHERE id = ? AND organization_id = ?`,
|
|
416
|
+
[entity.reason_code, loggedInUser.organization_id],
|
|
417
|
+
);
|
|
418
|
+
|
|
419
|
+
const notePayload = {
|
|
420
|
+
note_title: reason ? reason.name : entity.reason_code,
|
|
421
|
+
note: entity.remark,
|
|
422
|
+
is_system: true,
|
|
423
|
+
mapped_entity_type: 'LEAD',
|
|
424
|
+
entity_type: 'LNO',
|
|
425
|
+
mapped_entity_id: entity.mapped_entity_id,
|
|
426
|
+
} as any;
|
|
427
|
+
|
|
428
|
+
return await super.createEntity(notePayload, loggedInUser);
|
|
429
|
+
}
|
|
390
430
|
}
|