@kipicore/dbcore 1.1.289 → 1.1.291

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.
@@ -34,7 +34,7 @@ module.exports = {
34
34
  name: module.name,
35
35
  code: module.code,
36
36
  app_type: appType,
37
- status: 'ACTIVE',
37
+ status: 'INACTIVE',
38
38
  is_default: true,
39
39
  created_at: new Date(),
40
40
  updated_at: new Date(),
@@ -60,7 +60,7 @@ module.exports = {
60
60
  name: feature.name,
61
61
  code: feature.code,
62
62
  app_type: fAppType,
63
- status: 'ACTIVE',
63
+ status: 'INACTIVE',
64
64
  is_default: true,
65
65
  module_id: moduleId,
66
66
  created_at: new Date(),
@@ -86,7 +86,7 @@ module.exports = {
86
86
  name: action.name,
87
87
  code: action.code,
88
88
  app_type: aAppType,
89
- status: 'ACTIVE',
89
+ status: 'INACTIVE',
90
90
  is_default: true,
91
91
  module_id: moduleId,
92
92
  feature_id: currentFeatureId,
@@ -33,12 +33,12 @@ const FeeAndDiscountModule = {
33
33
  {
34
34
  name: 'Manage Bank Account Details',
35
35
  code: 'FEE.BANKACCOUNT',
36
- appType: [appTypeEnum.SCHOOL_APP],
36
+ appType: [appTypeEnum.SCHOOL_APP, appTypeEnum.INSTITUTE_APP],
37
37
  actions: [
38
- { name: 'Add', code: 'FEE.BANKACCOUNT.ADD', appType: [appTypeEnum.SCHOOL_APP] },
39
- { name: 'Update', code: 'FEE.BANKACCOUNT.UPDATE', appType: [appTypeEnum.SCHOOL_APP] },
40
- { name: 'View', code: 'FEE.BANKACCOUNT.VIEW', appType: [appTypeEnum.SCHOOL_APP] },
41
- { name: 'Delete', code: 'FEE.BANKACCOUNT.DELETE', appType: [appTypeEnum.SCHOOL_APP] },
38
+ { name: 'Add', code: 'FEE.BANKACCOUNT.ADD', appType: [appTypeEnum.SCHOOL_APP, appTypeEnum.INSTITUTE_APP] },
39
+ { name: 'Update', code: 'FEE.BANKACCOUNT.UPDATE', appType: [appTypeEnum.SCHOOL_APP, appTypeEnum.INSTITUTE_APP] },
40
+ { name: 'View', code: 'FEE.BANKACCOUNT.VIEW', appType: [appTypeEnum.SCHOOL_APP, appTypeEnum.INSTITUTE_APP] },
41
+ { name: 'Delete', code: 'FEE.BANKACCOUNT.DELETE', appType: [appTypeEnum.SCHOOL_APP, appTypeEnum.INSTITUTE_APP] },
42
42
  // { name: 'Approval', code: 'FEE.MANAGEMENT.APPROVAL', appType: [appTypeEnum.SCHOOL_APP] },
43
43
  ],
44
44
  },
@@ -99,14 +99,14 @@ class LectureModel extends sequelize_1.Model {
99
99
  throw new Error(errorMessages_1.LECTURE_ERROR_MESSAGES.BATCH_OCCUPIED);
100
100
  }
101
101
  if (lecture.classRoomId) {
102
- const classRoomConflict = await LectureModel.findOne({ where: { ...where, classRoomId: lecture.classRoomId }, ...options });
102
+ const classRoomConflict = await LectureModel.findOne({ where: { ...(0, utils_1.omit)(where, ['slotId']), classRoomId: lecture.classRoomId }, ...options });
103
103
  if (classRoomConflict)
104
104
  throw new Error(errorMessages_1.LECTURE_ERROR_MESSAGES.CLASSROOM_OCCUPIED);
105
105
  }
106
106
  // const teacherConflictWhere = omit(where, ['slotId']);
107
107
  if (lecture.primaryUserId) {
108
108
  const teacherConflict = await LectureModel.findOne({
109
- where: { ...where, primaryUserId: lecture.primaryUserId },
109
+ where: { ...(0, utils_1.omit)(where, ['slotId']), primaryUserId: lecture.primaryUserId },
110
110
  ...options,
111
111
  });
112
112
  if (teacherConflict)
@@ -114,7 +114,7 @@ class LectureModel extends sequelize_1.Model {
114
114
  }
115
115
  if (lecture.secondaryUserId) {
116
116
  const teacherConflict = await LectureModel.findOne({
117
- where: { ...where, secondaryUserId: lecture.secondaryUserId },
117
+ where: { ...(0, utils_1.omit)(where, ['slotId']), secondaryUserId: lecture.secondaryUserId },
118
118
  ...options,
119
119
  });
120
120
  if (teacherConflict)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kipicore/dbcore",
3
- "version": "1.1.289",
3
+ "version": "1.1.291",
4
4
  "description": "Reusable DB core package with Postgres, MongoDB, models, services, interfaces, and types",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",