@kipicore/dbcore 1.1.151 → 1.1.153
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
CHANGED
|
@@ -621,6 +621,7 @@ export declare enum TO_DO_STATUS {
|
|
|
621
621
|
export declare const SVG_URL_PATH = "public/svg";
|
|
622
622
|
export declare const UPLOAD_PATH = "public/uploads";
|
|
623
623
|
export declare const DEFAULT_INSTITUTED_LOGO = "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRXqqjmZohb-t9cT5vqbD1HgMUfSA8bzoKdjg&s";
|
|
624
|
+
export declare const DEFAULT_USER_LOGO = "https://cdn-icons-png.flaticon.com/512/3135/3135715.png";
|
|
624
625
|
export declare const API_URL: string;
|
|
625
626
|
export declare const GOOGLE_AUTH: {
|
|
626
627
|
CLIENT_ID: any;
|
package/dist/constants/app.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
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
|
-
exports.
|
|
6
|
-
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 = void 0;
|
|
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.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;
|
|
@@ -754,6 +754,7 @@ var TO_DO_STATUS;
|
|
|
754
754
|
exports.SVG_URL_PATH = 'public/svg';
|
|
755
755
|
exports.UPLOAD_PATH = 'public/uploads';
|
|
756
756
|
exports.DEFAULT_INSTITUTED_LOGO = 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRXqqjmZohb-t9cT5vqbD1HgMUfSA8bzoKdjg&s';
|
|
757
|
+
exports.DEFAULT_USER_LOGO = 'https://cdn-icons-png.flaticon.com/512/3135/3135715.png';
|
|
757
758
|
exports.API_URL = env_1.ENV_VARIABLE.SERVER_URL + '/api/v1';
|
|
758
759
|
exports.GOOGLE_AUTH = {
|
|
759
760
|
CLIENT_ID: env_1.ENV_VARIABLE.GOOGLE_CLIENT_ID,
|
package/dist/helpers/utils.d.ts
CHANGED
package/dist/helpers/utils.js
CHANGED
|
@@ -555,21 +555,19 @@ function chunkArray(array, size) {
|
|
|
555
555
|
function formatDateIfNeeded(value) {
|
|
556
556
|
if (!value)
|
|
557
557
|
return value;
|
|
558
|
-
|
|
559
|
-
|
|
558
|
+
function isStrictISODate(val) {
|
|
559
|
+
return /^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d+)?Z?)?$/.test(val);
|
|
560
|
+
}
|
|
560
561
|
if (value instanceof Date) {
|
|
561
|
-
|
|
562
|
+
return value.toLocaleDateString('en-GB');
|
|
562
563
|
}
|
|
563
|
-
|
|
564
|
-
else if (typeof value === 'string') {
|
|
564
|
+
if (typeof value === 'string' && isStrictISODate(value)) {
|
|
565
565
|
const parsed = new Date(value);
|
|
566
566
|
if (!isNaN(parsed.getTime())) {
|
|
567
|
-
|
|
567
|
+
return parsed.toLocaleDateString('en-GB');
|
|
568
568
|
}
|
|
569
569
|
}
|
|
570
|
-
|
|
571
|
-
return value;
|
|
572
|
-
return date.toLocaleDateString('en-GB');
|
|
570
|
+
return value;
|
|
573
571
|
}
|
|
574
572
|
function resolvePath(value, parts) {
|
|
575
573
|
if (value === undefined || value === null)
|
|
@@ -607,7 +605,13 @@ function extractFromObject(data, config) {
|
|
|
607
605
|
const userdata = data.map(item => {
|
|
608
606
|
const row = {};
|
|
609
607
|
config.columns.forEach(col => {
|
|
610
|
-
|
|
608
|
+
if (Array.isArray(col.field)) {
|
|
609
|
+
const values = col.field.map(path => getNestedValueForArray(item, path)).filter(v => v !== '-' && v !== undefined && v !== null);
|
|
610
|
+
row[col.title] = values.length ? values.join(col.joinContent ?? ' ') : '-';
|
|
611
|
+
}
|
|
612
|
+
else {
|
|
613
|
+
row[col.title] = getNestedValueForArray(item, col.field);
|
|
614
|
+
}
|
|
611
615
|
});
|
|
612
616
|
return row;
|
|
613
617
|
});
|
|
@@ -44,14 +44,14 @@ const typeManagementModel_1 = __importDefault(require("../psql/typeManagementMod
|
|
|
44
44
|
const instituteModel_1 = __importDefault(require("../psql/instituteModel"));
|
|
45
45
|
const instituteEntityModel_1 = __importDefault(require("../psql/instituteEntityModel"));
|
|
46
46
|
const BasicInformationSchema = new mongoose_1.Schema({
|
|
47
|
-
firstName: { type: String, required:
|
|
48
|
-
lastName: { type: String, required:
|
|
47
|
+
firstName: { type: String, required: false },
|
|
48
|
+
lastName: { type: String, required: false },
|
|
49
49
|
middleName: { type: String, required: false },
|
|
50
50
|
birthPlace: { type: String, required: false },
|
|
51
|
-
email: { type: String, required:
|
|
52
|
-
mobile: { type: String, required:
|
|
53
|
-
gender: { type: String, required:
|
|
54
|
-
dob: { type: Date, required:
|
|
51
|
+
email: { type: String, required: false },
|
|
52
|
+
mobile: { type: String, required: false },
|
|
53
|
+
gender: { type: String, required: false },
|
|
54
|
+
dob: { type: Date, required: false },
|
|
55
55
|
address1: { type: String, required: false },
|
|
56
56
|
}, { _id: false });
|
|
57
57
|
const AcademicInformationSchema = new mongoose_1.Schema({
|
|
@@ -68,14 +68,14 @@ const LastSchoolSchema = new mongoose_1.Schema({
|
|
|
68
68
|
result: { type: Number, required: false },
|
|
69
69
|
}, { _id: false });
|
|
70
70
|
const GuardianInformationSchema = new mongoose_1.Schema({
|
|
71
|
-
firstName: { type: String, required:
|
|
72
|
-
lastName: { type: String, required:
|
|
71
|
+
firstName: { type: String, required: false },
|
|
72
|
+
lastName: { type: String, required: false },
|
|
73
73
|
middleName: { type: String, required: false },
|
|
74
|
-
mobile: { type: String, required:
|
|
74
|
+
mobile: { type: String, required: false },
|
|
75
75
|
relation: { type: String, required: false },
|
|
76
76
|
email: { type: String, required: false },
|
|
77
|
-
guardianQualification: { type: String, required:
|
|
78
|
-
guardianOccupation: { type: String, required:
|
|
77
|
+
guardianQualification: { type: String, required: false },
|
|
78
|
+
guardianOccupation: { type: String, required: false },
|
|
79
79
|
guardianOccupationDetails: { type: String, required: false },
|
|
80
80
|
motherName: { type: String, required: false },
|
|
81
81
|
}, { _id: false });
|
|
@@ -115,15 +115,15 @@ const AddressSchema = new mongoose_1.Schema({
|
|
|
115
115
|
}, { _id: false });
|
|
116
116
|
const InquirySchema = new mongoose_1.Schema({
|
|
117
117
|
instituteId: { type: String, required: false },
|
|
118
|
-
basicInformation: { type: BasicInformationSchema, required: false },
|
|
119
|
-
academicInformation: { type: AcademicInformationSchema, required: false },
|
|
120
|
-
guardianInformation: { type: GuardianInformationSchema, required: false },
|
|
121
|
-
lastSchoolInformation: { type: LastSchoolSchema, required: false },
|
|
122
|
-
address: { type: AddressSchema, required: false },
|
|
118
|
+
basicInformation: { type: BasicInformationSchema, required: false, default: {} },
|
|
119
|
+
academicInformation: { type: AcademicInformationSchema, required: false, default: {} },
|
|
120
|
+
guardianInformation: { type: GuardianInformationSchema, required: false, default: {} },
|
|
121
|
+
lastSchoolInformation: { type: LastSchoolSchema, required: false, default: {} },
|
|
122
|
+
address: { type: AddressSchema, required: false, default: {} },
|
|
123
123
|
referredBy: {
|
|
124
124
|
type: String,
|
|
125
125
|
enum: Object.values(app_1.INQUIRY_REFERRED_BY),
|
|
126
|
-
required:
|
|
126
|
+
required: false,
|
|
127
127
|
},
|
|
128
128
|
others: {
|
|
129
129
|
type: String,
|
package/package.json
CHANGED