@kipicore/dbcore 1.1.491 → 1.1.493
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.
|
@@ -75,6 +75,20 @@ const FeeConfigSchema = new mongoose_1.Schema({
|
|
|
75
75
|
},
|
|
76
76
|
],
|
|
77
77
|
},
|
|
78
|
+
penaltyFees: {
|
|
79
|
+
penaltyPaymentMethods: [
|
|
80
|
+
{
|
|
81
|
+
type: String,
|
|
82
|
+
enum: Object.values(app_1.PAYMENT_TYPE),
|
|
83
|
+
default: [],
|
|
84
|
+
},
|
|
85
|
+
],
|
|
86
|
+
bankAccounts: [
|
|
87
|
+
{
|
|
88
|
+
type: String,
|
|
89
|
+
},
|
|
90
|
+
],
|
|
91
|
+
},
|
|
78
92
|
oldId: {
|
|
79
93
|
type: String,
|
|
80
94
|
},
|
|
@@ -91,14 +91,13 @@ class LectureModel extends sequelize_1.Model {
|
|
|
91
91
|
};
|
|
92
92
|
if (lecture.id)
|
|
93
93
|
where = { ...where, id: { [sequelize_1.Op.ne]: lecture.id } };
|
|
94
|
-
if (lecture.classRoomId && lecture?.title?.toLowerCase()?.includes('lecture')) {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
}
|
|
94
|
+
// if (lecture.classRoomId && lecture?.title?.toLowerCase()?.includes('lecture')) {
|
|
95
|
+
// const classRoomConflict = await LectureModel.findOne({
|
|
96
|
+
// where: { ...where, classRoomId: lecture.classRoomId },
|
|
97
|
+
// ...options,
|
|
98
|
+
// });
|
|
99
|
+
// if (classRoomConflict) throw new Error(LECTURE_ERROR_MESSAGES.CLASSROOM_OCCUPIED);
|
|
100
|
+
// }
|
|
102
101
|
if (lecture.primaryUserId) {
|
|
103
102
|
const teacherConflict = await LectureModel.findOne({
|
|
104
103
|
where: { ...where, primaryUserId: lecture.primaryUserId },
|
|
@@ -115,13 +114,11 @@ class LectureModel extends sequelize_1.Model {
|
|
|
115
114
|
if (teacherConflict)
|
|
116
115
|
throw new Error(errorMessages_1.LECTURE_ERROR_MESSAGES.TEACHER_OCCUPIED);
|
|
117
116
|
}
|
|
118
|
-
if (lecture.batchId) {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
throw new Error(errorMessages_1.LECTURE_ERROR_MESSAGES.BATCH_OCCUPIED);
|
|
124
|
-
}
|
|
117
|
+
// if (lecture.batchId) {
|
|
118
|
+
// if (lecture.slotId) where.slotId = lecture.slotId;
|
|
119
|
+
// const batchConflict = await LectureModel.findOne({ where: { ...where, batchId: lecture.batchId }, ...options });
|
|
120
|
+
// if (batchConflict) throw new Error(LECTURE_ERROR_MESSAGES.BATCH_OCCUPIED);
|
|
121
|
+
// }
|
|
125
122
|
// const teacherConflictWhere = omit(where, ['slotId']);
|
|
126
123
|
}
|
|
127
124
|
if (lecture.batchId) {
|
package/package.json
CHANGED