rez_core 2.2.13 → 2.2.14

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rez_core",
3
- "version": "2.2.13",
3
+ "version": "2.2.14",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "private": false,
@@ -46,4 +46,18 @@ export class ActionCategoryController {
46
46
  );
47
47
  return result;
48
48
  }
49
+
50
+ @Post('/getactioncategorydata')
51
+ @HttpCode(HttpStatus.OK)
52
+ async getActionCategory(
53
+ @Req() req: Request & { user: any },
54
+ @Body('action_cat_id') action_cat_id: number,
55
+ ) {
56
+ const loggedInUser = req.user.userData;
57
+ const result = this.actionCategoryService.getActionCategory(
58
+ loggedInUser,
59
+ action_cat_id,
60
+ );
61
+ return result;
62
+ }
49
63
  }
@@ -47,4 +47,18 @@ export class ActionCategoryService extends EntityServiceImpl {
47
47
  value: result?.[0]?.reason_code || null,
48
48
  };
49
49
  }
50
+
51
+ async getActionCategory(loggedInUser: UserData, action_cat_id: number) {
52
+ const { organization_id } = loggedInUser;
53
+ const result = await this.dataSource.query(
54
+ `
55
+ SELECT *
56
+ FROM cr_wf_action_category
57
+ WHERE organization_id = ? AND id = ?
58
+ `,
59
+ [organization_id, action_cat_id],
60
+ );
61
+
62
+ return result;
63
+ }
50
64
  }