@kipicore/dbcore 1.1.180 → 1.1.182
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/constants/app.d.ts +9 -0
- package/dist/constants/app.js +12 -1
- package/dist/constants/errorMessages.d.ts +8 -0
- package/dist/constants/errorMessages.js +10 -1
- package/dist/constants/successMessages.d.ts +12 -0
- package/dist/interfaces/bankAccountDetailsInterface.d.ts +4 -1
- package/dist/interfaces/feeConfigInterface.d.ts +13 -0
- package/dist/interfaces/feeConfigInterface.js +2 -0
- package/dist/interfaces/index.d.ts +3 -0
- package/dist/interfaces/index.js +3 -0
- package/dist/interfaces/instituteFeeInterface.d.ts +11 -0
- package/dist/interfaces/instituteFeeInterface.js +2 -0
- package/dist/interfaces/schoolFee1Interface.d.ts +33 -0
- package/dist/interfaces/schoolFee1Interface.js +2 -0
- package/dist/models/mongodb/feeConfigModel.d.ts +4 -0
- package/dist/models/mongodb/feeConfigModel.js +86 -0
- package/dist/models/mongodb/index.d.ts +3 -0
- package/dist/models/mongodb/index.js +7 -1
- package/dist/models/mongodb/instituteFeeModel.d.ts +4 -0
- package/dist/models/mongodb/instituteFeeModel.js +73 -0
- package/dist/models/mongodb/schoolFee1Model.d.ts +4 -0
- package/dist/models/mongodb/schoolFee1Model.js +228 -0
- package/dist/types/feeConfigType.d.ts +2 -0
- package/dist/types/feeConfigType.js +2 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.js +3 -0
- package/dist/types/instituteFeeType.d.ts +2 -0
- package/dist/types/instituteFeeType.js +2 -0
- package/dist/types/schoolFee1Type.d.ts +3 -0
- package/dist/types/schoolFee1Type.js +2 -0
- package/package.json +1 -1
package/dist/constants/app.d.ts
CHANGED
|
@@ -1000,3 +1000,12 @@ export declare enum STUDENT_LEAVE_TYPE {
|
|
|
1000
1000
|
TODAY = "TODAY",
|
|
1001
1001
|
HALF_DAY = "HALF_DAY"
|
|
1002
1002
|
}
|
|
1003
|
+
export declare enum BANK_ACCOUNT_TYPE {
|
|
1004
|
+
SCHOOL = "SCHOOL",
|
|
1005
|
+
TRUST = "TRUST"
|
|
1006
|
+
}
|
|
1007
|
+
export declare enum FEE_COLLECTION_TYPE {
|
|
1008
|
+
SUBJECT_WISE = "SUBJECT_WISE",
|
|
1009
|
+
BATCH_WISE = "BATCH_WISE",
|
|
1010
|
+
STANDARD_WISE = "STANDARD_WISE"
|
|
1011
|
+
}
|
package/dist/constants/app.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.USER_DETAILS = exports.NO_TYPE = exports.ADMISSION_TYPE = exports.INSTITUTE_ENTITY_TYPE_SEQUENCE = exports.INSTITUTE_ENTITY_TYPE_STATUS = exports.INSTITUTE_ENTITY_STATUS = exports.SCHOOL_SHIFT = exports.WORKIN_DAY_STATUS = exports.LEAVE_STATUS = exports.LEAVE = exports.LEAVE_TYPE = exports.OFFER_NAME = exports.OFFER_TYPE = exports.INSTITUTE_STATUS = exports.FEE_PAYMENT_STATUS = exports.PAYMENT_TYPE = exports.FEE_TYPE_FREQUENCY = exports.FEE_REMINDER_SETTING_FREQUENCY = exports.FEE_REMINDER_SETTING_TYPE = exports.TERM_DURATION = exports.FEE_REMINDER_SETTING_STATUS = exports.GREETING_TYPE = exports.TRIP_TYPE = exports.USER_COURSE_STATUS = exports.COMMAN_STATUS = exports.TOKEN_TYPES = exports.USER_TYPES = exports.ACADEMIC_CALENDARS_TYPE = exports.RETURN_STATUS = exports.ASSIGN_TYPE = exports.GENDER = exports.SCHOOL_SUB_TYPE = exports.SCHOOL_TYPE = exports.ATTENDANCE_TYPE = exports.ATTENDANCE_STATUS = exports.USER_INVENTORY_ACTION = exports.INVENTORY_TYPE = exports.USER_STATUS = exports.PDF_MICRO_SERVICE_END_POINT = exports.MOBILE_VERIFICATION = exports.EMAIL_VERIFICATION = exports.PAGINATION_UPDATE_ORDER = exports.PAGINATION_ORDER = exports.DEFAULT_BATCH_TITLE = exports.DEFAULT_CLASS_ROOM_TITLE = exports.PAGINATION = exports.USER_INSTITUTE_META_STATUS_REJECTED_COUNT = exports.ONE_THOUSAND = exports.ONE_HUNDRED = exports.SIXTY = void 0;
|
|
4
4
|
exports.SVA_NAME = exports.QDC_NAME = exports.USER_PAYOUT_TYPE = exports.PARENTS_CHILDREN_CURRENT = exports.CHAPTER_INDEX_FILE_TYPE = exports.FEE_HISTORY_STATUS = exports.USER_CHAPTER_INDEX_STATUS = exports.CHAPTER_INDEX_TYPE = exports.IMAGE__NAME = exports.INQUIRY_STATUS = exports.INQUIRY_REFERRED_BY = exports.EXAM_GROUP_STANDARD_RESULT = exports.EXAM_GROUP_STATUS = exports.SUBJECT_INDEX_TYPE = exports.LECTURE_SLOT_DURATION = exports.EXAM_ANSWER_SHEET_QUESTION_RESULT = exports.PAYMENT_TERMS_TYPE = exports.PAYMENT_TERMS_STATUS = exports.EXAM_ANSWER_SHEET_RESULT_TYPE = exports.EXAM_ANSWER_SHEET_RESULT_STATUS = exports.EXAM_ANSWER_SHEET_STATUS = exports.EXAM_VALID_ANSWER_TYPE = exports.EXAM_ANSWER_SELECTION_TYPE = exports.EXAM_STATUS = exports.COURSE_STATUS = exports.EXAM_MODE = exports.GREETING_STATUS = exports.USER_HAS_ANNOUCEMENT_STATUS = exports.ANNOUCEMENT_STATUS = exports.TYPE_OF_USER = exports.ANNOUCEMENT_SCHEDULE_TYPE = exports.APPROVE_REQUEST_STATUS = exports.APPROVE_REQUEST_TYPE = exports.TYPE_MANAGEMENT_STATUS = exports.TYPE_MANAGEMENT_TYPE = exports.FILE_TYPE = exports.ACADEMIC_CALENDARS_STATUS = exports.BANNER_TYPE = exports.APP_TYPE = exports.FEED_BACK_STATUS = exports.FEED_BACK_TYPE = exports.FACILITY_TYPE = exports.EMPLOYMENT_TYPE = exports.USER_INSTITUTE_META_STATUS = exports.USER_HAS_PARENT_STATUS = exports.GUARDIANS_USER_META_MODEL_STATUS = exports.DISABILITY_TYPE = exports.WORK_CATEGORY = exports.BLOG_STATUS = exports.WORK_TYPE = void 0;
|
|
5
5
|
exports.PDF_CHEQUE_FREQUENCY = exports.PDF_CHEQUE_STATUS = exports.LANGUAGES = exports.HOME_WORK_STATUS = exports.SOCKET_EVENTS = exports.SUBSCRIPTION_PLAN_FILES_TYPE = exports.VALID_CURRENCY = exports.SUBSCRIPTION_PLAN_CHARGE_INTERVAL = exports.DISCOUNT_TYPE = exports.CONTACT_FEED_BACK_TYPE = exports.PLANNER_SYNC_STATUS = exports.NOTIFICATION_ACTION = exports.NOTIFICATION_MODULE_TYPE = exports.NOTIFICATION_STATUS = exports.NOTIFICATION_TYPE = exports.PROJECT_ASSESSMENT_OPTION_STATUS = exports.USER_BOOK_ASSESSMENT_STATUS = exports.BOOK_ASSESSMENT_DATE_STATUS = exports.TASK_MANAGEMENT_STATUS = exports.USER_DETAILS_FILED = exports.DEVICE_TYPE = exports.templateKeyWord = exports.bankAccountRegexMap = exports.EMAIL_SUBJECTS = exports.PDF_TEMPLATES = exports.EMAIL_TEMPLATES = exports.PINCODE_API_URL = exports.APPLE_AUTH = exports.META_AUTH = exports.GOOGLE_AUTH = exports.API_URL = exports.DEFAULT_USER_LOGO = exports.DEFAULT_INSTITUTED_LOGO = exports.UPLOAD_PATH = exports.SVG_URL_PATH = exports.TO_DO_STATUS = exports.LECTURE_TITLE = exports.LECTURE_STATUS = exports.SCHOOL_INFORMATION_STEP = exports.CASTE = exports.RELIGION_CASTE = exports.NATIONALITY = exports.CATEGORY = exports.IS_PRINCIPAL = exports.FEE_TYPE = exports.BOOLEAN_STATUS = exports.PROPERTY_STATUS = exports.DESIGNATION_OF_PERSON = exports.TRUST_REGISTERED_UNDER = exports.TRUST_TYPE = void 0;
|
|
6
|
-
exports.STUDENT_LEAVE_TYPE = exports.STUDENT_LEAVE_STATUS = exports.CERTIFICATE_TYPE = exports.CERTIFICATE_FOR = exports.SHEET_TYPE = exports.COMPETITION_USER_ROLE = exports.RESULT_STATUS = exports.COMPETITION_STATUS = exports.STATUS_BY_PARENTS = exports.COMPETITION_TYPE = exports.CAMPUS_CARNIVAL_STATUS = exports.COMPETITION_TYPE_CATEGORY = exports.INCOME_EXPENSE_SOURCE = exports.INCOME_EXPENSE_TYPE = exports.APPOINTMENT_STATUS = exports.MAINTENANCE_TYPE = exports.MAINTENANCE_MODE = exports.MAINTENANCE_MODULE_NAME = exports.ASSIGN_FILE_TYPE = exports.LOST_FOUND_ITEM_STATUS = exports.FREE_SUBSCRIPTION_SEQUENCE = exports.INITIAL_FREE_STORAGE_IN_GB = exports.INITIAL_FREE_COIN = exports.PAYMENT_PROCESSING_CALLBACK_URL = exports.PAYMENT_PROCESSING_PAGE_URL = exports.PAYMENT_PROCESSING_STATUS_URL = exports.COIN_PURCHASE_GST_PERCENTAGE = exports.WALLET_TRANSACTION_VALID_DATE_FOR_OTP_IN_MINUTES = exports.WALLET_TRANSACTION_VALID_DATE_IN_MINUTES = exports.PAYMENT_METHODS = exports.PAYMENT_GATEWAY_TYPES = exports.JOB_ACTION = exports.ONE_GB_BYTES = exports.CHARGE_PER_TRANSACTION_ITEM_UNIT = exports.INSTITUTE_SUBSCRIPTION_PLAN_STATUS = exports.WALLET_TRANSACTION_USERS_TYPE = exports.WALLET_HISTORY_STATUS = exports.WALLET_HISTORY_ACTION = exports.WALLET_HISTORY_ITEM_TYPE = exports.WALLET_HISTORY_TYPE = exports.REPLACE_TEACHER_STATUS = exports.TEACHER_TYPE = exports.INVOICE_TYPE = exports.PURCHASE_STATUS = exports.COLUMN_LIST_TITLE = exports.INVOICE_PAYMENT_TYPE = void 0;
|
|
6
|
+
exports.FEE_COLLECTION_TYPE = exports.BANK_ACCOUNT_TYPE = exports.STUDENT_LEAVE_TYPE = exports.STUDENT_LEAVE_STATUS = exports.CERTIFICATE_TYPE = exports.CERTIFICATE_FOR = exports.SHEET_TYPE = exports.COMPETITION_USER_ROLE = exports.RESULT_STATUS = exports.COMPETITION_STATUS = exports.STATUS_BY_PARENTS = exports.COMPETITION_TYPE = exports.CAMPUS_CARNIVAL_STATUS = exports.COMPETITION_TYPE_CATEGORY = exports.INCOME_EXPENSE_SOURCE = exports.INCOME_EXPENSE_TYPE = exports.APPOINTMENT_STATUS = exports.MAINTENANCE_TYPE = exports.MAINTENANCE_MODE = exports.MAINTENANCE_MODULE_NAME = exports.ASSIGN_FILE_TYPE = exports.LOST_FOUND_ITEM_STATUS = exports.FREE_SUBSCRIPTION_SEQUENCE = exports.INITIAL_FREE_STORAGE_IN_GB = exports.INITIAL_FREE_COIN = exports.PAYMENT_PROCESSING_CALLBACK_URL = exports.PAYMENT_PROCESSING_PAGE_URL = exports.PAYMENT_PROCESSING_STATUS_URL = exports.COIN_PURCHASE_GST_PERCENTAGE = exports.WALLET_TRANSACTION_VALID_DATE_FOR_OTP_IN_MINUTES = exports.WALLET_TRANSACTION_VALID_DATE_IN_MINUTES = exports.PAYMENT_METHODS = exports.PAYMENT_GATEWAY_TYPES = exports.JOB_ACTION = exports.ONE_GB_BYTES = exports.CHARGE_PER_TRANSACTION_ITEM_UNIT = exports.INSTITUTE_SUBSCRIPTION_PLAN_STATUS = exports.WALLET_TRANSACTION_USERS_TYPE = exports.WALLET_HISTORY_STATUS = exports.WALLET_HISTORY_ACTION = exports.WALLET_HISTORY_ITEM_TYPE = exports.WALLET_HISTORY_TYPE = exports.REPLACE_TEACHER_STATUS = exports.TEACHER_TYPE = exports.INVOICE_TYPE = exports.PURCHASE_STATUS = exports.COLUMN_LIST_TITLE = exports.INVOICE_PAYMENT_TYPE = void 0;
|
|
7
7
|
const env_1 = require("../configs/env");
|
|
8
8
|
exports.SIXTY = 60;
|
|
9
9
|
exports.ONE_HUNDRED = 100;
|
|
@@ -1254,3 +1254,14 @@ var STUDENT_LEAVE_TYPE;
|
|
|
1254
1254
|
STUDENT_LEAVE_TYPE["TODAY"] = "TODAY";
|
|
1255
1255
|
STUDENT_LEAVE_TYPE["HALF_DAY"] = "HALF_DAY";
|
|
1256
1256
|
})(STUDENT_LEAVE_TYPE || (exports.STUDENT_LEAVE_TYPE = STUDENT_LEAVE_TYPE = {}));
|
|
1257
|
+
var BANK_ACCOUNT_TYPE;
|
|
1258
|
+
(function (BANK_ACCOUNT_TYPE) {
|
|
1259
|
+
BANK_ACCOUNT_TYPE["SCHOOL"] = "SCHOOL";
|
|
1260
|
+
BANK_ACCOUNT_TYPE["TRUST"] = "TRUST";
|
|
1261
|
+
})(BANK_ACCOUNT_TYPE || (exports.BANK_ACCOUNT_TYPE = BANK_ACCOUNT_TYPE = {}));
|
|
1262
|
+
var FEE_COLLECTION_TYPE;
|
|
1263
|
+
(function (FEE_COLLECTION_TYPE) {
|
|
1264
|
+
FEE_COLLECTION_TYPE["SUBJECT_WISE"] = "SUBJECT_WISE";
|
|
1265
|
+
FEE_COLLECTION_TYPE["BATCH_WISE"] = "BATCH_WISE";
|
|
1266
|
+
FEE_COLLECTION_TYPE["STANDARD_WISE"] = "STANDARD_WISE";
|
|
1267
|
+
})(FEE_COLLECTION_TYPE || (exports.FEE_COLLECTION_TYPE = FEE_COLLECTION_TYPE = {}));
|
|
@@ -1250,3 +1250,11 @@ export declare enum USER_DIRECTORY_ERROR_MESSAGES {
|
|
|
1250
1250
|
NOT_FOUND = "Unable to find directory data",
|
|
1251
1251
|
ALREADY_EXISTS = "Directory name already exists!"
|
|
1252
1252
|
}
|
|
1253
|
+
export declare enum INSTITUTE_FEE_ERROR_MESSAGES {
|
|
1254
|
+
CREATE_FAIL = "Unable to save Institute Fee",
|
|
1255
|
+
GET_FAIL = "Unable to retrieve Institute Fee",
|
|
1256
|
+
UPDATE_FAIL = "Unable to update Institute Fee",
|
|
1257
|
+
DELETE_FAIL = "Unable to delete Institute Fee",
|
|
1258
|
+
NOT_FOUND = "Unable to find Institute Fee",
|
|
1259
|
+
DUPLICATE = "Institute Fee already exists for the given criteria"
|
|
1260
|
+
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FILE_STORAGE_ERROR_MESSAGES = exports.EXAM_HAS_ANSWER_SHEET_ERROR_MESSAGES = exports.EXAM_ERROR_MESSAGES = exports.ANNOUCEMENT_ERROR_MESSAGES = exports.PARENTS_ERROR_MESSAGES = exports.USER_INSTITUTE_META_ERROR_MESSAGES = exports.INSTITUTE_ENTITY_ERROR_MESSAGES = exports.INSTITUTE_ENTITY_TYPE_ERROR_MESSAGES = exports.INSTITUTE_ERROR_MESSAGES = exports.MODULE_ERROR_MESSAGES = exports.ROLE_ERROR_MESSAGES = exports.TYPE_MANAGEMENT_ERROR_MESSAGES = exports.CLASSROOM_ERROR_MESSAGES = exports.BATCH_ERROR_MESSAGES = exports.ACADEMIC_CALENDAR_ERROR_MESSAGES = exports.EVENT_ERROR_MESSAGES = exports.HOLIDAY_ERROR_MESSAGES = exports.USER_HAS_ROLL_NUMBER_ERROR_MESSAGES = exports.USER_HAS_OFFER_ERROR_MESSAGES = exports.FEE_REMINDER_ERROR_MESSAGES = exports.FEE_REMINDER_SETTING_ERROR_MESSAGES = exports.FEEREMINDER_ERROR_MESSAGES = exports.FEESCOLLECTION_ERROR_MESSAGES = exports.USER_FEE_TYPE_ERROR_MESSAGES = exports.SCHOOL_FEE_ERROR_MESSAGES = exports.FEE_TYPE_ERROR_MESSAGES = exports.FACILITY_ERROR_MESSAGES = exports.OFFER_ERROR_MESSAGES = exports.INVENTORY_HISTORY_ERROR_MESSAGES = exports.PAYMENT_TERMS_ERROR_MESSAGES = exports.INVENTORY_ERROR_MESSAGES = exports.CATEGORY_ERROR_MESSAGES = exports.USER_HAS_INVENTORY_ERROR_MESSAGES = exports.SUBJECT_HAS_FEE_ERROR_MESSAGES = exports.FEE_HISTORY_ERROR_MESSAGES = exports.MASTER_LEAVE_ERROR_MESSAGES = exports.LEAVE_ERROR_MESSAGES = exports.SUBSCRIPTION_ERROR_MESSAGES = exports.FEEDBACK_ERROR_MESSAGES = exports.SCHOOL_FEES_COLLECTION_ERROR_MESSAGES = exports.ACCOUNT_RECEIPT_ERROR_MESSAGES = exports.SCHOOL_SHIFT_ERROR_MESSAGES = exports.BANK_ACCOUNT_DETAILS_ERROR_MESSAGES = exports.INFORMATION_SUPPORT_ERROR_MESSAGES = exports.INQUIRY_ERROR_MESSAGES = exports.APPROVE_REQUEST_ERROR_MESSAGES = exports.BANNER_ERROR_MESSAGES = exports.USER_FEE_TYPE_ACCOUNT_ERROR_MESSAGES = exports.USER_ERROR_MESSAGES = exports.ERROR_MESSAGES = void 0;
|
|
4
4
|
exports.WALLET_ERROR_MESSAGES = exports.REPLACE_TEACHER_ERROR_MESSAGES = exports.CERTIFICATES_HISTORY_ERROR_MESSAGES = exports.CERTIFICATES_MANAGEMENT_ERROR_MESSAGES = exports.DASHBOARD_MANAGEMENT_ERROR_MESSAGES = exports.PDC_HISTORY_ERROR_MESSAGES = exports.COLUMN_ERROR_MESSAGES = exports.INVOICE_ERROR_MESSAGES = exports.PRODUCT_ERROR_MESSAGES = exports.SUB_CATEGORY_ERROR_MESSAGES = exports.VENDOR_MANAGEMENT_ERROR_MESSAGES = exports.COIN_PURCHASE_OFFER_ERROR_MESSAGES = exports.SYLLABUS_ERROR_MESSAGES = exports.DAILY_BOOK_ERROR_MESSAGES = exports.USER_HAS_HOME_WORK_ERROR_MESSAGES = exports.HOME_WORK_ERROR_MESSAGES = exports.CLOUD_STORAGE_ERROR_MESSAGES = exports.SUBSCRIPTION_PLAN_ERROR_MESSAGES = exports.FLOOR_MANAGEMENT_ERROR_MESSAGES = exports.SIGNED_URL_ERROR_MESSAGES = exports.CAREER_ERROR_MESSAGES = exports.RULES_REGULATION_ERROR_MESSAGES = exports.NOTIFICATION_ERROR_MESSAGES = exports.PHOTO_GALLERY_ERROR_MESSAGES = exports.CONTACT_FEED_BACK_ERROR_MESSAGES = exports.GENERATE_ID_CARD_ERROR_MESSAGES = exports.VEHICLE_ERROR_MESSAGES = exports.BATCH_SUBJECT_PROJECT_ASSESSMENT_ERROR_MESSAGES = exports.USER_BOOK_ASSESSMENT_ERROR_MESSAGES = exports.BATCH_SUBJECT_BOOK_ASSESSMENT_ERROR_MESSAGES = exports.TASK_MANAGEMENT_ERROR_MESSAGES = exports.EXAM_GROUP_ERROR_MESSAGES = exports.USER_PAYOUT_HISTORY_ERROR_MESSAGES = exports.USER_PAYOUT_ERROR_MESSAGES = exports.SUBJECT_INDEX_ERROR_MESSAGES = exports.TESTIMONIAL_ERROR_MESSAGES = exports.DRIVER_ERROR_MESSAGES = exports.BLOG_ERROR_MESSAGES = exports.VIDEO_ANALYST_ERROR_MESSAGES = exports.PDC_CHEQUE_ERROR_MESSAGES = exports.GREETING_ERROR_MESSAGES = exports.USER_HAS_COURSE_ERROR_MESSAGES = exports.COURSE_ERROR_MESSAGES = exports.TO_DO_ERROR_MESSAGES = exports.SLOT_ERROR_MESSAGES = exports.TRIP_ERROR_MESSAGES = exports.LECTURE_ERROR_MESSAGES = exports.WORKING_DAYS_ERROR_MESSAGES = exports.USER_SCHOOL_METADATA_ERROR_MESSAGES = exports.ATTENDANCE_ERROR_MESSAGES = void 0;
|
|
5
|
-
exports.USER_DIRECTORY_ERROR_MESSAGES = exports.STUDENT_LEAVE_REQUEST_ERROR_MESSAGES = exports.EVENT_TEMPLATES_ERROR_MESSAGES = exports.POLL_SELECTION_ERROR_MESSAGES = exports.POLL_CREATE_ERROR_MESSAGES = exports.SHEET_FIELD_ERROR_MESSAGES = exports.CLONE_LIST_ERROR_MESSAGES = exports.COMPETITION_USER_ERROR_MESSAGES = exports.COMPETITION_GROUP_ERROR_MESSAGES = exports.COMPETITION_ERROR_MESSAGES = exports.CAMPUS_CARNIVAL_ERROR_MESSAGES = exports.INCOME_EXPENSE_ERROR_MESSAGES = exports.APPOINTMENT_HISTORY_ERROR_MESSAGES = exports.APPOINTMENT_ERROR_MESSAGES = exports.MAINTENANCE_ERROR_MESSAGES = exports.SEATING_ARRANGEMENT_ERROR_MESSAGES = exports.ASSIGN_FILE_ERROR_MESSAGES = exports.THEME_ERROR_MESSAGES = exports.B_DAY_WISH_ERROR_MESSAGES = exports.ADDITIONAL_DETAIL_ERROR_MESSAGES = exports.ADVERTISEMENT_ERROR_MESSAGES = exports.WORK_OFF_DAYS_ERROR_MESSAGES = exports.ENTITY_WISE_CALENDAR_ERROR_MESSAGES = exports.CAMPUS_ERROR_MESSAGES = exports.CANTEEN_ERROR_MESSAGES = exports.LOST_FOUND_ITEM_ERROR_MESSAGES = exports.PAYMENT_TRANSACTION_ERROR_MESSAGES = exports.USER_REQUIRED_STEPS_ERROR_MESSAGES = exports.JOB_APPLY_ERROR_MESSAGES = exports.ENTITY_GROUP_ERROR_MESSAGES = exports.USER_HAS_STORAGE_ERROR_MESSAGES = exports.INSTITUTE_SUBSCRIPTION_PLAN_ERROR_MESSAGES = exports.WALLET_TRANSACTION_ERROR_MESSAGES = exports.WALLET_HISTORY_ERROR_MESSAGES = void 0;
|
|
5
|
+
exports.INSTITUTE_FEE_ERROR_MESSAGES = exports.USER_DIRECTORY_ERROR_MESSAGES = exports.STUDENT_LEAVE_REQUEST_ERROR_MESSAGES = exports.EVENT_TEMPLATES_ERROR_MESSAGES = exports.POLL_SELECTION_ERROR_MESSAGES = exports.POLL_CREATE_ERROR_MESSAGES = exports.SHEET_FIELD_ERROR_MESSAGES = exports.CLONE_LIST_ERROR_MESSAGES = exports.COMPETITION_USER_ERROR_MESSAGES = exports.COMPETITION_GROUP_ERROR_MESSAGES = exports.COMPETITION_ERROR_MESSAGES = exports.CAMPUS_CARNIVAL_ERROR_MESSAGES = exports.INCOME_EXPENSE_ERROR_MESSAGES = exports.APPOINTMENT_HISTORY_ERROR_MESSAGES = exports.APPOINTMENT_ERROR_MESSAGES = exports.MAINTENANCE_ERROR_MESSAGES = exports.SEATING_ARRANGEMENT_ERROR_MESSAGES = exports.ASSIGN_FILE_ERROR_MESSAGES = exports.THEME_ERROR_MESSAGES = exports.B_DAY_WISH_ERROR_MESSAGES = exports.ADDITIONAL_DETAIL_ERROR_MESSAGES = exports.ADVERTISEMENT_ERROR_MESSAGES = exports.WORK_OFF_DAYS_ERROR_MESSAGES = exports.ENTITY_WISE_CALENDAR_ERROR_MESSAGES = exports.CAMPUS_ERROR_MESSAGES = exports.CANTEEN_ERROR_MESSAGES = exports.LOST_FOUND_ITEM_ERROR_MESSAGES = exports.PAYMENT_TRANSACTION_ERROR_MESSAGES = exports.USER_REQUIRED_STEPS_ERROR_MESSAGES = exports.JOB_APPLY_ERROR_MESSAGES = exports.ENTITY_GROUP_ERROR_MESSAGES = exports.USER_HAS_STORAGE_ERROR_MESSAGES = exports.INSTITUTE_SUBSCRIPTION_PLAN_ERROR_MESSAGES = exports.WALLET_TRANSACTION_ERROR_MESSAGES = exports.WALLET_HISTORY_ERROR_MESSAGES = void 0;
|
|
6
6
|
var ERROR_MESSAGES;
|
|
7
7
|
(function (ERROR_MESSAGES) {
|
|
8
8
|
ERROR_MESSAGES["CREATE_FAIL"] = "Unable to save data in DB!";
|
|
@@ -1387,3 +1387,12 @@ var USER_DIRECTORY_ERROR_MESSAGES;
|
|
|
1387
1387
|
USER_DIRECTORY_ERROR_MESSAGES["NOT_FOUND"] = "Unable to find directory data";
|
|
1388
1388
|
USER_DIRECTORY_ERROR_MESSAGES["ALREADY_EXISTS"] = "Directory name already exists!";
|
|
1389
1389
|
})(USER_DIRECTORY_ERROR_MESSAGES || (exports.USER_DIRECTORY_ERROR_MESSAGES = USER_DIRECTORY_ERROR_MESSAGES = {}));
|
|
1390
|
+
var INSTITUTE_FEE_ERROR_MESSAGES;
|
|
1391
|
+
(function (INSTITUTE_FEE_ERROR_MESSAGES) {
|
|
1392
|
+
INSTITUTE_FEE_ERROR_MESSAGES["CREATE_FAIL"] = "Unable to save Institute Fee";
|
|
1393
|
+
INSTITUTE_FEE_ERROR_MESSAGES["GET_FAIL"] = "Unable to retrieve Institute Fee";
|
|
1394
|
+
INSTITUTE_FEE_ERROR_MESSAGES["UPDATE_FAIL"] = "Unable to update Institute Fee";
|
|
1395
|
+
INSTITUTE_FEE_ERROR_MESSAGES["DELETE_FAIL"] = "Unable to delete Institute Fee";
|
|
1396
|
+
INSTITUTE_FEE_ERROR_MESSAGES["NOT_FOUND"] = "Unable to find Institute Fee";
|
|
1397
|
+
INSTITUTE_FEE_ERROR_MESSAGES["DUPLICATE"] = "Institute Fee already exists for the given criteria";
|
|
1398
|
+
})(INSTITUTE_FEE_ERROR_MESSAGES || (exports.INSTITUTE_FEE_ERROR_MESSAGES = INSTITUTE_FEE_ERROR_MESSAGES = {}));
|
|
@@ -858,3 +858,15 @@ export declare enum USER_DIRECTORY_SUCCESS_MESSAGES {
|
|
|
858
858
|
UPDATE_SUCCESS = "Directory updated successfully!",
|
|
859
859
|
DELETE_SUCCESS = "Directory deleted successfully!"
|
|
860
860
|
}
|
|
861
|
+
export declare enum FEE_CONFIG_SUCCESS_MESSAGES {
|
|
862
|
+
CREATE_SUCCESS = "Fee Config created successfully!",
|
|
863
|
+
GET_SUCCESS = "Fee Config retrieved successfully!",
|
|
864
|
+
UPDATE_SUCCESS = "Fee Config updated successfully!"
|
|
865
|
+
}
|
|
866
|
+
export declare enum INSTITUTE_FEE_SUCCESS_MESSAGES {
|
|
867
|
+
CREATE_SUCCESS = "institute fee created successfully!",
|
|
868
|
+
GET_SUCCESS = "institute fee retrieved successfully!",
|
|
869
|
+
UPDATE_SUCCESS = "institute fee updated successfully!",
|
|
870
|
+
DELETE_SUCCESS = "institute fee deleted successfully!",
|
|
871
|
+
FEE_PAY_SUCCESS = "institute fee paid successfully"
|
|
872
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IDefaultAttributes } from './commonInterface';
|
|
2
|
-
import { COMMAN_STATUS, BOOLEAN_STATUS } from '../constants/app';
|
|
2
|
+
import { COMMAN_STATUS, BOOLEAN_STATUS, PAYMENT_TYPE, BANK_ACCOUNT_TYPE } from '../constants/app';
|
|
3
3
|
export interface IBankAccountDetailsInterfaceModelAttributes extends IDefaultAttributes {
|
|
4
4
|
id: string;
|
|
5
5
|
accountHolderName: string;
|
|
@@ -12,5 +12,8 @@ export interface IBankAccountDetailsInterfaceModelAttributes extends IDefaultAtt
|
|
|
12
12
|
isDefault: BOOLEAN_STATUS;
|
|
13
13
|
isSelfAccount: BOOLEAN_STATUS;
|
|
14
14
|
academicCalendarId?: string;
|
|
15
|
+
type?: BANK_ACCOUNT_TYPE;
|
|
15
16
|
oldId?: string;
|
|
17
|
+
paymentMethod?: PAYMENT_TYPE[];
|
|
18
|
+
note?: string;
|
|
16
19
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Document } from 'mongoose';
|
|
2
|
+
import { IDefaultAttributes } from './commonInterface';
|
|
3
|
+
import { FEE_COLLECTION_TYPE, PAYMENT_TYPE } from '../constants';
|
|
4
|
+
export interface IFeeConfigModelAttributes extends IDefaultAttributes, Document {
|
|
5
|
+
id: string;
|
|
6
|
+
instituteId: string;
|
|
7
|
+
academicCalendarId: string;
|
|
8
|
+
feeCollectionTypes: FEE_COLLECTION_TYPE[];
|
|
9
|
+
paymentMethods: PAYMENT_TYPE[];
|
|
10
|
+
isRefundable: boolean;
|
|
11
|
+
isTaxable: boolean;
|
|
12
|
+
oldId?: string;
|
|
13
|
+
}
|
|
@@ -162,3 +162,6 @@ export * from './pollSelectionInterface';
|
|
|
162
162
|
export * from './eventTemplatesInterface';
|
|
163
163
|
export * from './studentLeaveRequestInterface';
|
|
164
164
|
export * from './userDirectoryInterface';
|
|
165
|
+
export * from './feeConfigInterface';
|
|
166
|
+
export * from './schoolFee1Interface';
|
|
167
|
+
export * from './instituteFeeInterface';
|
package/dist/interfaces/index.js
CHANGED
|
@@ -178,3 +178,6 @@ __exportStar(require("./pollSelectionInterface"), exports);
|
|
|
178
178
|
__exportStar(require("./eventTemplatesInterface"), exports);
|
|
179
179
|
__exportStar(require("./studentLeaveRequestInterface"), exports);
|
|
180
180
|
__exportStar(require("./userDirectoryInterface"), exports);
|
|
181
|
+
__exportStar(require("./feeConfigInterface"), exports);
|
|
182
|
+
__exportStar(require("./schoolFee1Interface"), exports);
|
|
183
|
+
__exportStar(require("./instituteFeeInterface"), exports);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Document } from 'mongoose';
|
|
2
|
+
import { IDefaultAttributes } from './commonInterface';
|
|
3
|
+
export interface IInstituteFeeModelAttributes extends IDefaultAttributes, Document {
|
|
4
|
+
id: string;
|
|
5
|
+
instituteId: string;
|
|
6
|
+
academicCalendarId: string;
|
|
7
|
+
subjectId: string;
|
|
8
|
+
batchId: string;
|
|
9
|
+
feeAmount: number;
|
|
10
|
+
oldId?: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Document } from 'mongoose';
|
|
2
|
+
import { PAYMENT_TERMS_TYPE, PAYMENT_TYPE } from '../constants/app';
|
|
3
|
+
import { IDefaultAttributes } from './commonInterface';
|
|
4
|
+
export interface ITerms1Schema {
|
|
5
|
+
date: Date;
|
|
6
|
+
amount: number;
|
|
7
|
+
}
|
|
8
|
+
export interface IFeeStructure {
|
|
9
|
+
terms: ITerms1Schema[];
|
|
10
|
+
totalAmount: number;
|
|
11
|
+
frequency: PAYMENT_TERMS_TYPE;
|
|
12
|
+
isNotApplicableForGirls: boolean;
|
|
13
|
+
isRefundable: boolean;
|
|
14
|
+
isTaxable: boolean;
|
|
15
|
+
isRequired: boolean;
|
|
16
|
+
title: string;
|
|
17
|
+
}
|
|
18
|
+
export interface IFee1Schema {
|
|
19
|
+
feeTypeId: string;
|
|
20
|
+
isCreditAllowed: boolean;
|
|
21
|
+
paymentMethod: PAYMENT_TYPE[];
|
|
22
|
+
bankIds: string[];
|
|
23
|
+
fesStructure: IFeeStructure[];
|
|
24
|
+
}
|
|
25
|
+
export interface ISchoolFee1ModelAttributes extends IDefaultAttributes, Document {
|
|
26
|
+
id: string;
|
|
27
|
+
instituteId: string;
|
|
28
|
+
stdId: string[];
|
|
29
|
+
commonDueDate: number;
|
|
30
|
+
fees: IFee1Schema[];
|
|
31
|
+
academicCalendarId: string;
|
|
32
|
+
oldId?: string;
|
|
33
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
const mongoose_1 = __importStar(require("mongoose"));
|
|
37
|
+
const app_1 = require("../../constants/app");
|
|
38
|
+
const FeeConfigSchema = new mongoose_1.Schema({
|
|
39
|
+
instituteId: {
|
|
40
|
+
type: String,
|
|
41
|
+
required: true,
|
|
42
|
+
},
|
|
43
|
+
academicCalendarId: {
|
|
44
|
+
type: String,
|
|
45
|
+
required: true,
|
|
46
|
+
},
|
|
47
|
+
feeCollectionTypes: [
|
|
48
|
+
{
|
|
49
|
+
type: String,
|
|
50
|
+
enum: Object.values(app_1.FEE_COLLECTION_TYPE),
|
|
51
|
+
required: true,
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
paymentMethods: [
|
|
55
|
+
{
|
|
56
|
+
type: String,
|
|
57
|
+
enum: Object.values(app_1.PAYMENT_TYPE),
|
|
58
|
+
required: true,
|
|
59
|
+
},
|
|
60
|
+
],
|
|
61
|
+
isRefundable: {
|
|
62
|
+
type: Boolean,
|
|
63
|
+
required: false,
|
|
64
|
+
},
|
|
65
|
+
isTaxable: {
|
|
66
|
+
type: Boolean,
|
|
67
|
+
required: false,
|
|
68
|
+
},
|
|
69
|
+
oldId: {
|
|
70
|
+
type: String,
|
|
71
|
+
},
|
|
72
|
+
createdBy: {
|
|
73
|
+
type: String,
|
|
74
|
+
},
|
|
75
|
+
updatedBy: {
|
|
76
|
+
type: String,
|
|
77
|
+
},
|
|
78
|
+
deletedBy: {
|
|
79
|
+
type: String,
|
|
80
|
+
},
|
|
81
|
+
}, {
|
|
82
|
+
timestamps: true,
|
|
83
|
+
versionKey: false,
|
|
84
|
+
});
|
|
85
|
+
const FeeConfigModel = mongoose_1.default.model('feeConfigs', FeeConfigSchema);
|
|
86
|
+
exports.default = FeeConfigModel;
|
|
@@ -50,3 +50,6 @@ export { default as SheetFieldMappingModel } from './sheetFieldModel';
|
|
|
50
50
|
export { default as CreatePollModel } from './createPollModel';
|
|
51
51
|
export { default as PollSelectionModel } from './pollSelectionModel';
|
|
52
52
|
export { default as EventTemplatesModel } from './eventTemplatesModel';
|
|
53
|
+
export { default as FeeConfigModel } from './feeConfigModel';
|
|
54
|
+
export { default as SchoolFee1Model } from './schoolFee1Model';
|
|
55
|
+
export { default as InstituteFeeModel } from './instituteFeeModel';
|
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.CreatePollModel = exports.SheetFieldMappingModel = exports.FileUploadUserDetails = exports.CompetitionUsersModel = exports.CompetitionGroupModel = exports.CompetitionModel = exports.CampusCarnivalModel = exports.AppointmentHistoryModel = exports.AppointmentModel = exports.SeatingArrangementModel = exports.AssignFileModel = exports.ThemeModel = exports.BDayWishModel = exports.AdditionalDetailModel = exports.CanteenModel = exports.WalletTransactionModel = exports.VideoAnalystModel = exports.UserSchoolMetaModel = exports.UserInstituteMetaModel = exports.UserDetailsModel = exports.UniqueNumberCounterModel = exports.TaskManagementModel = exports.SubscriptionPlanModel = exports.SubjectIndexModel = exports.SchoolFeeModel = exports.ReplaceTeacherModel = exports.PlannerModel = exports.PhotosGalleryModel = exports.JobApplyModel = exports.InvoiceModel = exports.InquiryModel = exports.InformationSupportModel = exports.HolidayModel = exports.GenerateIdCardModel = exports.FeedBackModel = exports.FeeReminderTypeModel = exports.ExamModel = exports.ExamHasAnswerSheetModel = exports.ExamGroupModel = exports.EventModel = exports.DashboardManagementModel = exports.DailyBookModel = exports.ColumnModel = exports.CertificatesManagementModel = exports.CertificatesHistoryModel = exports.CareerModel = exports.BlogModel = exports.AttendanceModel = exports.ApprovalRequestModel = exports.connectMongoDb = void 0;
|
|
7
|
-
exports.EventTemplatesModel = exports.PollSelectionModel = void 0;
|
|
7
|
+
exports.InstituteFeeModel = exports.SchoolFee1Model = exports.FeeConfigModel = exports.EventTemplatesModel = exports.PollSelectionModel = void 0;
|
|
8
8
|
const mongoose_1 = __importDefault(require("mongoose"));
|
|
9
9
|
const env_1 = require("../../configs/env");
|
|
10
10
|
const transformIdInQueryPlugin_1 = __importDefault(require("./plugin/transformIdInQueryPlugin"));
|
|
@@ -126,3 +126,9 @@ var pollSelectionModel_1 = require("./pollSelectionModel");
|
|
|
126
126
|
Object.defineProperty(exports, "PollSelectionModel", { enumerable: true, get: function () { return __importDefault(pollSelectionModel_1).default; } });
|
|
127
127
|
var eventTemplatesModel_1 = require("./eventTemplatesModel");
|
|
128
128
|
Object.defineProperty(exports, "EventTemplatesModel", { enumerable: true, get: function () { return __importDefault(eventTemplatesModel_1).default; } });
|
|
129
|
+
var feeConfigModel_1 = require("./feeConfigModel");
|
|
130
|
+
Object.defineProperty(exports, "FeeConfigModel", { enumerable: true, get: function () { return __importDefault(feeConfigModel_1).default; } });
|
|
131
|
+
var schoolFee1Model_1 = require("./schoolFee1Model");
|
|
132
|
+
Object.defineProperty(exports, "SchoolFee1Model", { enumerable: true, get: function () { return __importDefault(schoolFee1Model_1).default; } });
|
|
133
|
+
var instituteFeeModel_1 = require("./instituteFeeModel");
|
|
134
|
+
Object.defineProperty(exports, "InstituteFeeModel", { enumerable: true, get: function () { return __importDefault(instituteFeeModel_1).default; } });
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
const mongoose_1 = __importStar(require("mongoose"));
|
|
37
|
+
const InstituteFeeSchema = new mongoose_1.Schema({
|
|
38
|
+
instituteId: {
|
|
39
|
+
type: String,
|
|
40
|
+
required: true,
|
|
41
|
+
},
|
|
42
|
+
academicCalendarId: {
|
|
43
|
+
type: String,
|
|
44
|
+
required: true,
|
|
45
|
+
},
|
|
46
|
+
subjectId: {
|
|
47
|
+
type: String,
|
|
48
|
+
},
|
|
49
|
+
batchId: {
|
|
50
|
+
type: String,
|
|
51
|
+
},
|
|
52
|
+
feeAmount: {
|
|
53
|
+
type: Number,
|
|
54
|
+
required: true,
|
|
55
|
+
},
|
|
56
|
+
oldId: {
|
|
57
|
+
type: String,
|
|
58
|
+
},
|
|
59
|
+
createdBy: {
|
|
60
|
+
type: String,
|
|
61
|
+
},
|
|
62
|
+
updatedBy: {
|
|
63
|
+
type: String,
|
|
64
|
+
},
|
|
65
|
+
deletedBy: {
|
|
66
|
+
type: String,
|
|
67
|
+
},
|
|
68
|
+
}, {
|
|
69
|
+
timestamps: true,
|
|
70
|
+
versionKey: false,
|
|
71
|
+
});
|
|
72
|
+
const InstituteFeeModel = mongoose_1.default.model('instituteFees', InstituteFeeSchema);
|
|
73
|
+
exports.default = InstituteFeeModel;
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
const mongoose_1 = __importStar(require("mongoose"));
|
|
40
|
+
const app_1 = require("../../constants/app");
|
|
41
|
+
const errorMessages_1 = require("../../constants/errorMessages");
|
|
42
|
+
const instituteModel_1 = __importDefault(require("../psql/instituteModel"));
|
|
43
|
+
const userInstituteMetaModel_1 = __importDefault(require("./userInstituteMetaModel"));
|
|
44
|
+
const feeTypeModel_1 = __importDefault(require("../psql/feeTypeModel"));
|
|
45
|
+
const termsSchema = new mongoose_1.Schema({
|
|
46
|
+
date: {
|
|
47
|
+
type: Date,
|
|
48
|
+
required: true,
|
|
49
|
+
},
|
|
50
|
+
amount: {
|
|
51
|
+
type: Number,
|
|
52
|
+
default: 0,
|
|
53
|
+
required: true,
|
|
54
|
+
},
|
|
55
|
+
// paidAmount: {
|
|
56
|
+
// type: Number,
|
|
57
|
+
// default: 0,
|
|
58
|
+
// required: false,
|
|
59
|
+
// },
|
|
60
|
+
}, { _id: false });
|
|
61
|
+
const feeStructureSchema = new mongoose_1.Schema({
|
|
62
|
+
title: {
|
|
63
|
+
type: String,
|
|
64
|
+
required: true,
|
|
65
|
+
},
|
|
66
|
+
frequency: {
|
|
67
|
+
type: String,
|
|
68
|
+
enum: Object.values(app_1.PAYMENT_TERMS_TYPE),
|
|
69
|
+
required: true,
|
|
70
|
+
},
|
|
71
|
+
terms: {
|
|
72
|
+
type: [termsSchema],
|
|
73
|
+
required: true,
|
|
74
|
+
default: [],
|
|
75
|
+
},
|
|
76
|
+
totalAmount: {
|
|
77
|
+
type: Number,
|
|
78
|
+
required: true,
|
|
79
|
+
default: 0,
|
|
80
|
+
},
|
|
81
|
+
isNotApplicableForGirls: {
|
|
82
|
+
type: Boolean,
|
|
83
|
+
default: false,
|
|
84
|
+
},
|
|
85
|
+
isRefundable: {
|
|
86
|
+
type: Boolean,
|
|
87
|
+
default: false,
|
|
88
|
+
},
|
|
89
|
+
isTaxable: {
|
|
90
|
+
type: Boolean,
|
|
91
|
+
default: false,
|
|
92
|
+
},
|
|
93
|
+
isRequired: {
|
|
94
|
+
type: Boolean,
|
|
95
|
+
},
|
|
96
|
+
}, { _id: false });
|
|
97
|
+
const feeSchema = new mongoose_1.Schema({
|
|
98
|
+
feeTypeId: {
|
|
99
|
+
type: String,
|
|
100
|
+
required: true,
|
|
101
|
+
},
|
|
102
|
+
isCreditAllowed: {
|
|
103
|
+
type: Boolean,
|
|
104
|
+
},
|
|
105
|
+
paymentMethod: {
|
|
106
|
+
type: [String],
|
|
107
|
+
enum: Object.values(app_1.PAYMENT_TYPE),
|
|
108
|
+
default: [],
|
|
109
|
+
},
|
|
110
|
+
bankIds: {
|
|
111
|
+
type: [String],
|
|
112
|
+
default: [],
|
|
113
|
+
},
|
|
114
|
+
fesStructure: {
|
|
115
|
+
type: [feeStructureSchema],
|
|
116
|
+
required: true,
|
|
117
|
+
default: [],
|
|
118
|
+
},
|
|
119
|
+
}, { _id: false });
|
|
120
|
+
const schoolFee1Schema = new mongoose_1.Schema({
|
|
121
|
+
instituteId: {
|
|
122
|
+
type: String,
|
|
123
|
+
required: true,
|
|
124
|
+
},
|
|
125
|
+
stdId: {
|
|
126
|
+
type: [String],
|
|
127
|
+
required: true,
|
|
128
|
+
},
|
|
129
|
+
commonDueDate: {
|
|
130
|
+
type: Number,
|
|
131
|
+
required: true,
|
|
132
|
+
},
|
|
133
|
+
fees: {
|
|
134
|
+
type: [feeSchema],
|
|
135
|
+
default: [],
|
|
136
|
+
required: true,
|
|
137
|
+
},
|
|
138
|
+
oldId: {
|
|
139
|
+
type: String,
|
|
140
|
+
required: false,
|
|
141
|
+
},
|
|
142
|
+
academicCalendarId: {
|
|
143
|
+
type: String,
|
|
144
|
+
required: false,
|
|
145
|
+
},
|
|
146
|
+
createdBy: {
|
|
147
|
+
type: String,
|
|
148
|
+
required: false,
|
|
149
|
+
},
|
|
150
|
+
updatedBy: {
|
|
151
|
+
type: String,
|
|
152
|
+
required: false,
|
|
153
|
+
},
|
|
154
|
+
deletedBy: {
|
|
155
|
+
type: String,
|
|
156
|
+
required: false,
|
|
157
|
+
},
|
|
158
|
+
}, {
|
|
159
|
+
timestamps: true,
|
|
160
|
+
versionKey: false,
|
|
161
|
+
});
|
|
162
|
+
schoolFee1Schema.pre('save', async function (next) {
|
|
163
|
+
const schoolFee1 = this;
|
|
164
|
+
try {
|
|
165
|
+
if (!schoolFee1.fees || schoolFee1.fees.length === 0 || schoolFee1.fees.every(fee => fee.fesStructure.length === 0)) {
|
|
166
|
+
return next(new Error('Fees array cannot be empty.'));
|
|
167
|
+
}
|
|
168
|
+
if (schoolFee1.instituteId) {
|
|
169
|
+
const institute = await instituteModel_1.default.findByPk(schoolFee1.instituteId);
|
|
170
|
+
if (!institute) {
|
|
171
|
+
return next(new Error(errorMessages_1.INSTITUTE_ERROR_MESSAGES.NOT_FOUND));
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
if (schoolFee1.stdId) {
|
|
175
|
+
const stdExits = await userInstituteMetaModel_1.default.findOne({
|
|
176
|
+
userId: schoolFee1.instituteId,
|
|
177
|
+
instituteId: schoolFee1.instituteId,
|
|
178
|
+
...(schoolFee1.academicCalendarId && { academicCalendarId: schoolFee1.academicCalendarId }),
|
|
179
|
+
entities: { $all: schoolFee1.stdId },
|
|
180
|
+
});
|
|
181
|
+
if (!stdExits) {
|
|
182
|
+
return next(new Error(errorMessages_1.USER_INSTITUTE_META_ERROR_MESSAGES.STD_NOT_FOUND));
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
// const expectedLengths: Record<PAYMENT_TERMS_TYPE, number> = {
|
|
186
|
+
// YEARLY: 1,
|
|
187
|
+
// MONTHLY: 12,
|
|
188
|
+
// HALF_YEARLY: 2,
|
|
189
|
+
// QUARTERLY: 4,
|
|
190
|
+
// FULL_PAYMENT: 1,
|
|
191
|
+
// };
|
|
192
|
+
for (const fee of schoolFee1.fees) {
|
|
193
|
+
if (fee.feeTypeId) {
|
|
194
|
+
const feeType = await feeTypeModel_1.default.findByPk(fee.feeTypeId);
|
|
195
|
+
if (!feeType)
|
|
196
|
+
return next(new Error(errorMessages_1.FEE_TYPE_ERROR_MESSAGES.NOT_FOUND));
|
|
197
|
+
}
|
|
198
|
+
for (const structure of fee.fesStructure) {
|
|
199
|
+
// OPTIONAL: Frequency-based term length validation
|
|
200
|
+
// if (
|
|
201
|
+
// structure.frequency &&
|
|
202
|
+
// expectedLengths[structure.frequency] !== structure.terms.length
|
|
203
|
+
// ) {
|
|
204
|
+
// return next(
|
|
205
|
+
// new Error(
|
|
206
|
+
// `Invalid terms length for ${structure.frequency}. Expected ${expectedLengths[structure.frequency]}, but got ${structure.terms.length}.`
|
|
207
|
+
// )
|
|
208
|
+
// );
|
|
209
|
+
// }
|
|
210
|
+
const totalTermsAmount = structure.terms.reduce((sum, term) => sum + term.amount, 0);
|
|
211
|
+
if (totalTermsAmount !== structure.totalAmount) {
|
|
212
|
+
return next(new Error(`Total amount mismatch for feeTypeId ${fee.feeTypeId}(${structure.title}): Expected ${structure.totalAmount}, but sum of terms is ${totalTermsAmount}.`));
|
|
213
|
+
}
|
|
214
|
+
for (const term of structure.terms) {
|
|
215
|
+
if (!(term.date instanceof Date) || isNaN(term.date.getTime())) {
|
|
216
|
+
return next(new Error(`Invalid date format in terms for feeTypeId ${fee.feeTypeId} (${structure.title}).`));
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
next();
|
|
222
|
+
}
|
|
223
|
+
catch (error) {
|
|
224
|
+
return next(error);
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
const SchoolFee1Model = mongoose_1.default.model('schoolFee1', schoolFee1Schema);
|
|
228
|
+
exports.default = SchoolFee1Model;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -153,3 +153,6 @@ export * from './campusCarnivalType';
|
|
|
153
153
|
export * from './eventTemplatesType';
|
|
154
154
|
export * from './studentLeaveRequestType';
|
|
155
155
|
export * from './userDirectoryType';
|
|
156
|
+
export * from './feeConfigType';
|
|
157
|
+
export * from './schoolFee1Type';
|
|
158
|
+
export * from './instituteFeeType';
|
package/dist/types/index.js
CHANGED
|
@@ -169,3 +169,6 @@ __exportStar(require("./campusCarnivalType"), exports);
|
|
|
169
169
|
__exportStar(require("./eventTemplatesType"), exports);
|
|
170
170
|
__exportStar(require("./studentLeaveRequestType"), exports);
|
|
171
171
|
__exportStar(require("./userDirectoryType"), exports);
|
|
172
|
+
__exportStar(require("./feeConfigType"), exports);
|
|
173
|
+
__exportStar(require("./schoolFee1Type"), exports);
|
|
174
|
+
__exportStar(require("./instituteFeeType"), exports);
|
package/package.json
CHANGED