@kipicore/dbcore 1.1.290 → 1.1.292

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.
@@ -3,18 +3,18 @@
3
3
  const AcademicCalendarModule = require('./seeders/Data/AcademicCalendarModule');
4
4
  // const AdministrativeStaffModule = require('./seeders/Data/AdministrativeStaffModule');
5
5
  const AnnouncementsModule = require('./seeders/Data/AnnouncementsModule');
6
- // // const AssetsModule = require('./seeders/Data/AssetsModule');
6
+ // const AssetsModule = require('./seeders/Data/AssetsModule');
7
7
  const AttendanceModule = require('./seeders/Data/AttendanceModule');
8
8
  const BannerModule = require('./seeders/Data/BannerModule');
9
9
  const BatchModule = require('./seeders/Data/BatchModule');
10
10
  const DivisionModule = require('./seeders/Data/DivisionModule');
11
- const SchoolRegistration = require('./seeders/Data/SchoolRegistration');
11
+ // const SchoolRegistration = require('./seeders/Data/SchoolRegistration');
12
12
  // // const BoardModule = require('./seeders/Data/BoardModule ');
13
13
  const ClassroomModule = require('./seeders/Data/ClassroomModule');
14
14
  // const EventModule = require('./seeders/Data/EventModule');
15
15
  const ExamsAndResultsModule = require('./seeders/Data/ExamsAndResultsModule');
16
16
  const FeeAndDiscountModule = require('./seeders/Data/FeeAndDiscountModule');
17
- // // const FileModule = require('./seeders/Data/FileModule');
17
+ // const FileModule = require('./seeders/Data/FileModule');
18
18
  const InstituteModule = require('./seeders/Data/InstituteModule');
19
19
  const InventoryModule = require('./seeders/Data/InventoryModule');
20
20
  // // const ParentModule = require('./seeders/Data/ParentModule');
@@ -35,6 +35,7 @@ const IndexModule = require('./seeders/Data/IndexModule');
35
35
  const HolidayModule = require('./seeders/Data/HolidayModule');
36
36
  const EventModule = require('./seeders/Data/EventModule');
37
37
  const RoleModule = require('./seeders/Data/RoleModule');
38
+ const KipiStorageModule = require('./seeders/Data/KipiStorageModule');
38
39
  const ToDoModule = require('./seeders/Data/To-doModule');
39
40
  const HomeworkModule = require('./seeders/Data/HomeworkModule');
40
41
  const TestimonialsModule = require('./seeders/Data/TestimonialsModule');
@@ -67,7 +68,7 @@ const GreetingModule = require('./seeders/Data/greetingModule');
67
68
  const TaskManagementModule = require('./seeders/Data/taskManagementModule');
68
69
  const UserRoleModule = require('./seeders/Data/UserRoleModule');
69
70
  // const DashboardManagementModule = require('./seeders/Data/dashboardManagementModule'); // Need to uncomment dashboard module is ready
70
- // const CertificateManagementModule = require('./seeders/Data/certificateManagementModule'); // Need to uncomment certificate module is ready
71
+ const CertificateManagementModule = require('./seeders/Data/certificateManagementModule'); // Need to uncomment certificate module is ready
71
72
  const allModules = [
72
73
  AcademicCalendarModule,
73
74
  // AdministrativeStaffModule,
@@ -76,7 +77,8 @@ const allModules = [
76
77
  BannerModule,
77
78
  BatchModule,
78
79
  DivisionModule,
79
- SchoolRegistration,
80
+ KipiStorageModule,
81
+ // SchoolRegistration,
80
82
  // BoardModule,
81
83
  EventModule,
82
84
  ExamsAndResultsModule,
@@ -133,7 +135,7 @@ const allModules = [
133
135
  GreetingModule,
134
136
  TaskManagementModule,
135
137
  // DashboardManagementModule // Need to uncomment dashboard module is ready
136
- // CertificateManagementModule // Need to uncomment certificate module is ready
138
+ CertificateManagementModule, // Need to uncomment certificate module is ready
137
139
  UserRoleModule,
138
140
  ];
139
141
  module.exports = allModules;
@@ -0,0 +1,2 @@
1
+ export function up(queryInterface: any): Promise<void>;
2
+ export function down(queryInterface: any): Promise<void>;
@@ -0,0 +1,51 @@
1
+ 'use strict';
2
+ module.exports = {
3
+ async up(queryInterface) {
4
+ const transaction = await queryInterface.sequelize.transaction();
5
+ try {
6
+ // Update modules table
7
+ await queryInterface.bulkUpdate('modules', {
8
+ name: 'Homework & ClassWork',
9
+ updated_at: new Date(),
10
+ }, {
11
+ code: 'HOMEWORK',
12
+ }, { transaction });
13
+ // Update module_features table
14
+ await queryInterface.bulkUpdate('module_features', {
15
+ name: 'Homework & ClassWork Management',
16
+ updated_at: new Date(),
17
+ }, {
18
+ code: 'HOMEWORK.MANAGEMENT',
19
+ }, { transaction });
20
+ await transaction.commit();
21
+ }
22
+ catch (error) {
23
+ await transaction.rollback();
24
+ throw error;
25
+ }
26
+ },
27
+ async down(queryInterface) {
28
+ const transaction = await queryInterface.sequelize.transaction();
29
+ try {
30
+ // Revert modules table
31
+ await queryInterface.bulkUpdate('modules', {
32
+ name: 'HomeWork',
33
+ updated_at: new Date(),
34
+ }, {
35
+ code: 'HOMEWORK',
36
+ }, { transaction });
37
+ // Revert module_features table
38
+ await queryInterface.bulkUpdate('module_features', {
39
+ name: 'HomeWork Management',
40
+ updated_at: new Date(),
41
+ }, {
42
+ code: 'HOMEWORK.MANAGEMENT',
43
+ }, { transaction });
44
+ await transaction.commit();
45
+ }
46
+ catch (error) {
47
+ await transaction.rollback();
48
+ throw error;
49
+ }
50
+ },
51
+ };
@@ -19,6 +19,16 @@ const AcademicCalendarModule = {
19
19
  { name: 'Approval', code: 'ACADEMICCALENDAR.ACADEMICYEAR.APPROVAL', appType: [appTypeEnum.INSTITUTE_APP, appTypeEnum.SCHOOL_APP] },
20
20
  ],
21
21
  },
22
+ {
23
+ name: 'Clone Data Management',
24
+ code: 'ACADEMICCALENDAR.CLONE',
25
+ appType: [appTypeEnum.SCHOOL_APP],
26
+ actions: [
27
+ { name: 'Add', code: 'ACADEMICCALENDAR.CLONE.ADD', appType: [appTypeEnum.SCHOOL_APP] },
28
+ { name: 'Update', code: 'ACADEMICCALENDAR.CLONE.UPDATE', appType: [appTypeEnum.SCHOOL_APP] },
29
+ { name: 'View', code: 'ACADEMICCALENDAR.CLONE.VIEW', appType: [appTypeEnum.SCHOOL_APP] },
30
+ ],
31
+ },
22
32
  ],
23
33
  };
24
34
  module.exports = AcademicCalendarModule;
@@ -54,6 +54,42 @@ const FeeAndDiscountModule = {
54
54
  // { name: 'Approval', code: 'FEE.MANAGEMENT.APPROVAL', appType: [appTypeEnum.SCHOOL_APP] },
55
55
  ],
56
56
  },
57
+ {
58
+ name: 'Assign Service Fees',
59
+ code: 'FEE.ASSIGNFEE',
60
+ appType: [appTypeEnum.SCHOOL_APP],
61
+ actions: [
62
+ { name: 'Add', code: 'FEE.ASSIGNFEE.ADD', appType: [appTypeEnum.SCHOOL_APP] },
63
+ { name: 'Update', code: 'FEE.ASSIGNFEE.UPDATE', appType: [appTypeEnum.SCHOOL_APP] },
64
+ { name: 'View', code: 'FEE.ASSIGNFEE.VIEW', appType: [appTypeEnum.SCHOOL_APP] },
65
+ { name: 'Delete', code: 'FEE.ASSIGNFEE.DELETE', appType: [appTypeEnum.SCHOOL_APP] },
66
+ // { name: 'Approval', code: 'FEE.MANAGEMENT.APPROVAL', appType: [appTypeEnum.SCHOOL_APP] },
67
+ ],
68
+ },
69
+ {
70
+ name: 'Fee Adjustment',
71
+ code: 'FEE.FEEADJUSTMENT',
72
+ appType: [appTypeEnum.SCHOOL_APP],
73
+ actions: [
74
+ { name: 'Add', code: 'FEE.FEEADJUSTMENT.ADD', appType: [appTypeEnum.SCHOOL_APP] },
75
+ { name: 'Update', code: 'FEE.FEEADJUSTMENT.UPDATE', appType: [appTypeEnum.SCHOOL_APP] },
76
+ { name: 'View', code: 'FEE.FEEADJUSTMENT.VIEW', appType: [appTypeEnum.SCHOOL_APP] },
77
+ { name: 'Delete', code: 'FEE.FEEADJUSTMENT.DELETE', appType: [appTypeEnum.SCHOOL_APP] },
78
+ // { name: 'Approval', code: 'FEE.MANAGEMENT.APPROVAL', appType: [appTypeEnum.SCHOOL_APP] },
79
+ ],
80
+ },
81
+ {
82
+ name: 'Fees Configuration',
83
+ code: 'FEE.CONFIGURATION',
84
+ appType: [appTypeEnum.SCHOOL_APP, appTypeEnum.INSTITUTE_APP],
85
+ actions: [
86
+ { name: 'Add', code: 'FEE.CONFIGURATION.ADD', appType: [appTypeEnum.SCHOOL_APP, appTypeEnum.INSTITUTE_APP] },
87
+ { name: 'Update', code: 'FEE.CONFIGURATION.UPDATE', appType: [appTypeEnum.SCHOOL_APP, appTypeEnum.INSTITUTE_APP] },
88
+ { name: 'View', code: 'FEE.CONFIGURATION.VIEW', appType: [appTypeEnum.SCHOOL_APP, appTypeEnum.INSTITUTE_APP] },
89
+ { name: 'Delete', code: 'FEE.CONFIGURATION.DELETE', appType: [appTypeEnum.SCHOOL_APP, appTypeEnum.INSTITUTE_APP] },
90
+ // { name: 'Approval', code: 'FEE.MANAGEMENT.APPROVAL', appType: [appTypeEnum.SCHOOL_APP] },
91
+ ],
92
+ },
57
93
  {
58
94
  name: 'Fees History',
59
95
  code: 'FEE.HISTORY',
@@ -2,12 +2,12 @@
2
2
  /* eslint-disable @typescript-eslint/no-require-imports */
3
3
  const appTypeEnum = require('./appType');
4
4
  const HomeworkModule = {
5
- name: 'Homework',
5
+ name: 'Homework & ClassWork',
6
6
  code: 'HOMEWORK',
7
7
  appType: [appTypeEnum.INSTITUTE_APP, appTypeEnum.SCHOOL_APP],
8
8
  features: [
9
9
  {
10
- name: 'Homework Management',
10
+ name: 'Homework & ClassWork Management',
11
11
  code: 'HOMEWORK.MANAGEMENT',
12
12
  appType: [appTypeEnum.INSTITUTE_APP, appTypeEnum.SCHOOL_APP],
13
13
  actions: [
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
3
+ const appTypeEnum = require('./appType');
4
+ const KipiStorageModule = {
5
+ name: 'Kip Storage',
6
+ code: ' KIPI',
7
+ appType: [appTypeEnum.SCHOOL_APP],
8
+ features: [
9
+ {
10
+ name: 'Kip Store Management',
11
+ code: ' KIPI.STORAGE',
12
+ appType: [appTypeEnum.SCHOOL_APP],
13
+ actions: [
14
+ { name: 'Add', code: ' KIPI.STORAGE.ADD', appType: [appTypeEnum.SCHOOL_APP] },
15
+ { name: 'Update', code: ' KIPI.STORAGE.UPDATE', appType: [appTypeEnum.SCHOOL_APP] },
16
+ { name: 'View', code: ' KIPI.STORAGE.VIEW', appType: [appTypeEnum.SCHOOL_APP] },
17
+ { name: 'Delete', code: ' KIPI.STORAGE.DELETE', appType: [appTypeEnum.SCHOOL_APP] },
18
+ ],
19
+ },
20
+ ],
21
+ };
22
+ module.exports = KipiStorageModule;
@@ -99,7 +99,7 @@ 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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kipicore/dbcore",
3
- "version": "1.1.290",
3
+ "version": "1.1.292",
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",
@@ -1,22 +0,0 @@
1
- "use strict";
2
- // eslint-disable-next-line @typescript-eslint/no-require-imports
3
- const appTypeEnum = require('./appType');
4
- const TimetableModule = {
5
- name: 'School',
6
- code: 'SCHOOL',
7
- appType: [appTypeEnum.SCHOOL_APP],
8
- features: [
9
- {
10
- name: 'School Registration',
11
- code: 'SCHOOL.REGISTRATION',
12
- appType: [appTypeEnum.SCHOOL_APP],
13
- actions: [
14
- { name: 'Add', code: 'SCHOOL.REGISTRATION.ADD', appType: [appTypeEnum.SCHOOL_APP] },
15
- { name: 'Update', code: 'SCHOOL.REGISTRATION.UPDATE', appType: [appTypeEnum.SCHOOL_APP] },
16
- { name: 'View', code: 'SCHOOL.REGISTRATION.VIEW', appType: [appTypeEnum.SCHOOL_APP] },
17
- { name: 'Delete', code: 'SCHOOL.REGISTRATION.DELETE', appType: [appTypeEnum.SCHOOL_APP] },
18
- ],
19
- },
20
- ],
21
- };
22
- module.exports = TimetableModule;