@7365admin1/core 3.2.0 → 3.3.0
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/CHANGELOG.md +6 -0
- package/dist/index.d.ts +14 -2
- package/dist/index.js +126 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +125 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -3062,6 +3062,7 @@ declare function usePersonController(): {
|
|
|
3062
3062
|
getPeopleByNRIC: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
3063
3063
|
getPersonByUserId: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
3064
3064
|
reviewResidentPerson: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
3065
|
+
suspendResidentById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
3065
3066
|
};
|
|
3066
3067
|
|
|
3067
3068
|
type TRobotMetadata = {
|
|
@@ -5572,7 +5573,7 @@ declare function MIncidentReport(value: TIncidentReport): {
|
|
|
5572
5573
|
approvedByName: string;
|
|
5573
5574
|
remarks: string | null;
|
|
5574
5575
|
status: "pending" | "approved" | "rejected";
|
|
5575
|
-
|
|
5576
|
+
platform: string;
|
|
5576
5577
|
createdAt: string | Date;
|
|
5577
5578
|
updatedAt: string | Date | undefined;
|
|
5578
5579
|
deletedAt: string | Date | undefined;
|
|
@@ -7286,6 +7287,15 @@ declare function MFormEntry(value: TFormEntry): {
|
|
|
7286
7287
|
updatedAt: Date | null;
|
|
7287
7288
|
deletedAt: Date | null;
|
|
7288
7289
|
};
|
|
7290
|
+
interface residentFormEntry {
|
|
7291
|
+
typeOfForm: string;
|
|
7292
|
+
unitNumber: string;
|
|
7293
|
+
status: string;
|
|
7294
|
+
site: string | ObjectId;
|
|
7295
|
+
org: string | ObjectId;
|
|
7296
|
+
fields: Record<string, any>;
|
|
7297
|
+
}
|
|
7298
|
+
declare const residentFormEntry: Joi.ObjectSchema<any>;
|
|
7289
7299
|
|
|
7290
7300
|
declare const online_forms_namespace_collection = "online-forms";
|
|
7291
7301
|
declare function useFormEntryRepo(): {
|
|
@@ -7307,6 +7317,7 @@ declare function useFormEntryRepo(): {
|
|
|
7307
7317
|
updateFormEntryById: (_id: string | ObjectId, value: TFormEntry) => Promise<number>;
|
|
7308
7318
|
createTextIndex: () => Promise<void>;
|
|
7309
7319
|
deleteOnlineFormById: (_id: string | ObjectId, session?: ClientSession) => Promise<number>;
|
|
7320
|
+
addResidentForm: (value: residentFormEntry, session?: ClientSession) => Promise<ObjectId>;
|
|
7310
7321
|
};
|
|
7311
7322
|
|
|
7312
7323
|
declare function useFormEntryController(): {
|
|
@@ -7316,6 +7327,7 @@ declare function useFormEntryController(): {
|
|
|
7316
7327
|
getFormEntryById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
7317
7328
|
updateFormEntryById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
7318
7329
|
deleteFormEntryById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
7330
|
+
residentFormSubmission: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
7319
7331
|
};
|
|
7320
7332
|
|
|
7321
7333
|
declare enum BuildingLevelStatus {
|
|
@@ -7392,4 +7404,4 @@ declare function useBuildingLevelController(): {
|
|
|
7392
7404
|
getBuildingLevelList: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
7393
7405
|
};
|
|
7394
7406
|
|
|
7395
|
-
export { ANPRMode, AccessTypeProps, AppServiceType, AssignCardConfig, BuildingLevelStatus, BuildingStatus, BulkCardUpdate, BulletinOrder, BulletinRecipient, BulletinSort, BulletinStatus, BulletinVideoOrder, BulletinVideoSort, Camera, CameraType, DEVICE_STATUS, DOBStatus, DayOfWeek, DynamicFormFields, EAccessCardTypes, EAccessCardUserTypes, EmailSender, EntryOrder, EntrySort, EventOrder, EventSort, EventStatus, EventType, FacilitySort, FacilityStatus, FormEntryStatus, GuestSort, GuestStatus, IAccessCard, IAccessCardTransaction, MAccessCard, MAccessCardTransaction, MAddress, MAttendance, MAttendanceSettings, MBillingConfiguration, MBillingItem, MBuilding, MBuildingLevel, MBuildingUnit, MBulletinBoard, MBulletinVideo, MCategoryPreloved, MChannelPreloved, MChat, MChatPreloved, MCustomer, MCustomerSite, MDocumentManagement, MEntryPassSettings, MEventManagement, MFeedback, MFile, MFormEntry, MGuestManagement, MIncidentReport, MManpowerDesignations, MManpowerMonitoring, MManpowerRemarks, MManpowerSites, MMember, MNfcPatrolLog, MNfcPatrolRoute, MNfcPatrolSettings, MNfcPatrolSettingsUpdate, MNfcPatrolTag, MOccurrenceBook, MOccurrenceEntry, MOccurrenceSubject, MOnlineForm, MOrg, MOvernightParkingApprovalHours, MOvernightParkingRequest, MPatrolLog, MPatrolQuestion, MPatrolRoute, MPerson, MPost, MPostFavorite, MPromoCode, MRobot, MRole, MRoleV2, MServiceProvider, MServiceProviderBilling, MSession, MSite, MSiteCamera, MSiteFacility, MSiteFacilityBooking, MStatementOfAccount, MSubcategoryPreloved, MSubscription, MUnitBilling, MUser, MVehicle, MVehicleTransaction, MVerification, MVerificationV2, MVisitorTransaction, MWorkOrder, OrgNature, OvernightParkingRequestSort, OvernightParkingRequestStatus, PERSON_TYPES, PMDashboardCollection, PStatus, Period, PersonStatus, PersonType, PersonTypes, PostOrder, PostSort, PostStatus, QrTagProps, SiteAddress, SiteCategories, SiteStatus, SortFields, SortOrder, Status, SubjectOrder, SubjectSort, SubscriptionType, TAccessMngmntSettings, TActionStatus, TAddress, TAffectedEntities, TAffectedInjured, TAppServiceType, TApprovedBy, TApprover, TAttendance, TAttendanceCheckIn, TAttendanceCheckOut, TAttendanceCheckTime, TAttendanceLocation, TAttendanceSettings, TAttendanceSettingsGetBySite, TAuthorities, TAuthoritiesCalled, TBilling, TBillingConfiguration, TBillingItem, TBuilding, TBuildingLevel, TBuildingUnit, TBulletinBoard, TBulletinVideo, TCamera, TCategoryPreloved, TChannelPreloved, TChat, TChatPreloved, TCheckPoint$1 as TCheckPoint, TComplaintInfo, TComplaintReceivedTo, TCounter, TCustomer, TCustomerSite, TDayNumber, TDaySchedule, TDefaultAccessCard, TDesignations, TDocs, TDocumentCreate, TDocumentManagement, TEntryPassSettings, TEventManagement, TFeedback, TFeedbackMetadata, TFeedbackUpdate, TFeedbackUpdateCategory, TFeedbackUpdateServiceProvider, TFeedbackUpdateStatus, TFeedbackUpdateToCompleted, TFile, TFiles, TFormEntry, TGetAttendancesByUserQuery, TGetAttendancesQuery, TGuestManagement, TIncidentInformation, TIncidentReport, TIncidentTypeAndTime, TInvoice, TKeyRef, TManpowerDesignations, TManpowerDesignationsUpdate, TManpowerMonitoring, TManpowerMonitoringUpdate, TManpowerRemarks, TManpowerRemarksStatusUpdate, TManpowerRemarksUpdate, TManpowerSearchFilter, TManpowerSites, TMember, TMemberUpdateStatus, TMessagePreloved, TMiniRole, TNfcPatrolLog, TNfcPatrolRoute, TNfcPatrolRouteEdit, TNfcPatrolSettings, TNfcPatrolSettingsGetBySite, TNfcPatrolSettingsUpdate, TNfcPatrolTag, TNfcPatrolTagConfigureReset, TNfcPatrolTagEdit, TNfcPatrolTagUpdateData, TOccurrenceBook, TOccurrenceEntry, TOccurrenceSubject, TOnlineForm, TOrg, TOvernightParkingApprovalHours, TOvernightParkingRequest, TPatrolLog, TPatrolQuestion, TPatrolRoute, TPerson, TPlaceOfIncident, TPlates, TPost, TPostFavorite, TPrice, TPriceType, TPromoCode, TPromoTier, TRecipientOfComplaint, TRemarks, TResident, TRobot, TRobotMetadata, TRole, TRoleV2, TRoute, TSOABillingItem, TSOAStatus, TServiceProvider, TServiceProviderBilling, TSession, TSessionCreate, TShifts, TSite, TSiteCamera, TSiteFacility, TSiteFacilityBooking, TSiteInfo, TSiteInformation, TSiteMetadata, TSiteUpdateBlock, TStatementOfAccount, TSubcategoryPreloved, TSubmissionForm, TSubscription, TUnitBilling, TUnits, TUpdateFormEntry, TUpdateName, TUser, TUserCreate, TVehicle, TVehicleTransaction, TVehicleUpdate, TVerification, TVerificationMetadata, TVerificationMetadataV2, TVerificationV2, TVisitorTransaction, TWorkOrder, TWorkOrderMetadata, TWorkOrderUpdate, TWorkOrderUpdateStatus, TWorkOrderUpdateToCompleted, TanyoneDamageToProperty, UseAccessManagementRepo, UserStatus, VehicleCategory, VehicleOrder, VehicleSort, VehicleStatus, VehicleType, VerificationLinkType, VerificationStatus, VerificationSubjectType, VerificationType, VisitorSort, VisitorStatus, addressSchema, allowedFieldsSite, allowedNatures, attendanceSchema, attendanceSettingsSchema, building_level_namespace_collection, building_units_namespace_collection, buildings_namespace_collection, bulletin_boards_namespace_collection, calculatePercentage, chatSchema, createManpowerRemarksDaily, customerSchema, designationsSchema, events_namespace_collection, facility_bookings_namespace_collection, feedbackSchema, feedbacks2_namespace_collection, feedbacks_namespace_collection, formatDahuaDate, getPeriodRangeWithPrevious, guests_namespace_collection, incidentReport, incidentReportLog, incidents_namespace_collection, landscapeDashboardCollection, logCamera, mAndEDashboardCollection, manpowerDesignationsSchema, manpowerEvents, manpowerMonitoringSchema, manpowerRemarksSchema, manpowerSitesSchema, nfcPatrolSettingsSchema, nfcPatrolSettingsSchemaUpdate, occurrence_book_namespace_collection, online_forms_namespace_collection, orgSchema, overnight_parking_requests_namespace_collection, parseDahuaFind, pestDashboardCollection, poolDashboardCollection, promoCodeSchema, remarksSchema, robotSchema, schema, schemaApprovedBy, schemaApprover, schemaBilling, schemaBillingConfiguration, schemaBillingItem, schemaBuilding, schemaBuildingLevel, schemaBuildingUnit, schemaBuildingUpdateOptions, schemaBulletinBoard, schemaBulletinVideo, schemaCategoryPreloved, schemaChannelPreloved, schemaChatPreloved, schemaCustomerSite, schemaDocumentManagement, schemaEntryPassSettings, schemaEventManagement, schemaFiles, schemaFormEntry, schemaGuestManagement, schemaIncidentReport, schemaMultipleDocumentManagement, schemaNfcPatrolLog, schemaNfcPatrolRoute, schemaNfcPatrolTag, schemaNfcPatrolTagUpdateData, schemaOccurrenceBook, schemaOccurrenceEntry, schemaOccurrenceSubject, schemaOnlineForm, schemaOvernightParkingApprovalHours, schemaOvernightParkingRequest, schemaPatrolLog, schemaPatrolQuestion, schemaPatrolRoute, schemaPerson, schemaPlate, schemaPost, schemaPostFavorite, schemaServiceProvider, schemaServiceProviderBilling, schemaSiteCamera, schemaSiteFacility, schemaSiteFacilityBooking, schemaStatementOfAccount, schemaSubcategoryPreloved, schemaUnitBilling, schemaUpdateBuildingLevel, schemaUpdateBulletinBoard, schemaUpdateBulletinVideo, schemaUpdateCategoryPreloved, schemaUpdateChatPreloved, schemaUpdateDocumentManagement, schemaUpdateEntryPassSettings, schemaUpdateEventManagement, schemaUpdateFormEntry, schemaUpdateGuestManagement, schemaUpdateIncidentReport, schemaUpdateOccurrenceBook, schemaUpdateOccurrenceEntry, schemaUpdateOccurrenceSubject, schemaUpdateOnlineForm, schemaUpdateOptions, schemaUpdateOvernightParkingRequest, schemaUpdatePatrolLog, schemaUpdatePatrolQuestion, schemaUpdatePatrolRoute, schemaUpdatePerson, schemaUpdatePost, schemaUpdatePostFavorite, schemaUpdateServiceProviderBilling, schemaUpdateSiteBillingConfiguration, schemaUpdateSiteBillingItem, schemaUpdateSiteCamera, schemaUpdateSiteFacility, schemaUpdateSiteFacilityBooking, schemaUpdateSiteUnitBilling, schemaUpdateStatementOfAccount, schemaUpdateSubcategoryPreloved, schemaUpdateVisTrans, schemaVehicleTransaction, schemaVisitorTransaction, schemeCamera, schemeLogCamera, securityDashboardCollection, shiftSchema, siteSchema, site_people_namespace_collection, tokenSchema, updateRemarksStatusEod, updateRemarksisAcknowledged, updateSiteSchema, useAccessManagementController, useAddressRepo, useAttendanceController, useAttendanceRepository, useAttendanceSettingsController, useAttendanceSettingsRepository, useAttendanceSettingsService, useAuthController, useAuthControllerV2, useAuthService, useAuthServiceV2, useBuildingController, useBuildingLevelController, useBuildingLevelRepo, useBuildingLevelService, useBuildingRepo, useBuildingService, useBuildingUnitController, useBuildingUnitRepo, useBuildingUnitService, useBulletinBoardController, useBulletinBoardRepo, useBulletinBoardService, useBulletinVideoController, useBulletinVideoRepo, useBulletinVideoService, useCategoryPrelovedController, useCategoryPrelovedRepo, useChannelPrelovedController, useChannelPrelovedRepo, useChatController, useChatPrelovedController, useChatPrelovedRepo, useChatRepo, useCounterModel, useCounterRepo, useCustomerController, useCustomerRepo, useCustomerSiteController, useCustomerSiteRepo, useCustomerSiteService, useDahuaService, useDashboardController, useDashboardRepo, useDocumentManagementController, useDocumentManagementRepo, useDocumentManagementService, useEntryPassSettingsController, useEntryPassSettingsRepo, useEventManagementController, useEventManagementRepo, useEventManagementService, useFeedbackController, useFeedbackRepo, useFeedbackService, useFileController, useFileRepo, useFileService, useFormEntryController, useFormEntryRepo, useGuestManagementController, useGuestManagementRepo, useGuestManagementService, useHrmLabsAttendanceCtrl, useHrmLabsAttendanceSrvc, useIncidentReportController, useIncidentReportRepo, useIncidentReportService, useInvoiceController, useInvoiceModel, useInvoiceRepo, useManpowerDesignationCtrl, useManpowerDesignationRepo, useManpowerMonitoringCtrl, useManpowerMonitoringRepo, useManpowerMonitoringSrvc, useManpowerRemarkCtrl, useManpowerRemarksRepo, useManpowerSitesCtrl, useManpowerSitesRepo, useManpowerSitesSrvc, useMemberController, useMemberRepo, useNewDashboardController, useNewDashboardRepo, useNfcPatrolLogController, useNfcPatrolLogRepo, useNfcPatrolLogService, useNfcPatrolRouteController, useNfcPatrolRouteRepo, useNfcPatrolRouteService, useNfcPatrolSettingsController, useNfcPatrolSettingsRepository, useNfcPatrolSettingsService, useNfcPatrolTagController, useNfcPatrolTagRepo, useNfcPatrolTagService, useOccurrenceBookController, useOccurrenceBookRepo, useOccurrenceBookService, useOccurrenceEntryController, useOccurrenceEntryRepo, useOccurrenceEntryService, useOccurrenceSubjectController, useOccurrenceSubjectRepo, useOccurrenceSubjectService, useOnlineFormController, useOnlineFormRepo, useOrgController, useOrgControllerV2, useOrgRepo, useOvernightParkingController, useOvernightParkingRepo, useOvernightParkingRequestController, useOvernightParkingRequestRepo, useOvernightParkingRequestService, usePatrolLogController, usePatrolLogRepo, usePatrolQuestionController, usePatrolQuestionRepo, usePatrolRouteController, usePatrolRouteRepo, usePersonController, usePersonRepo, usePostFavoriteController, usePostFavoriteRepo, usePostFavoriteService, usePostPrelovedController, usePostPrelovedRepo, usePriceController, usePriceModel, usePriceRepo, usePromoCodeController, usePromoCodeRepo, useRedDotPaymentController, useRedDotPaymentRepo, useRedDotPaymentSvc, useRobotController, useRobotRepo, useRobotService, useRoleController, useRoleControllerV2, useRoleRepo, useRoleRepoV2, useRoleServiceV2, useServiceProviderBillingController, useServiceProviderBillingRepo, useServiceProviderBillingService, useServiceProviderController, useServiceProviderRepo, useSessionRepo, useSiteBillingConfigurationController, useSiteBillingConfigurationRepo, useSiteBillingItemController, useSiteBillingItemRepo, useSiteCameraController, useSiteCameraRepo, useSiteCameraService, useSiteController, useSiteFacilityBookingController, useSiteFacilityBookingRepo, useSiteFacilityBookingService, useSiteFacilityController, useSiteFacilityRepo, useSiteFacilityService, useSiteRepo, useSiteService, useSiteUnitBillingController, useSiteUnitBillingRepo, useSiteUnitBillingService, useStatementOfAccountController, useStatementOfAccountRepo, useSubcategoryPrelovedController, useSubcategoryPrelovedRepo, useSubscriptionController, useSubscriptionRepo, useSubscriptionService, useUserController, useUserControllerV2, useUserRepo, useUserRepoV2, useUserService, useUserServiceV2, useVehicleController, useVehicleRepo, useVehicleService, useVerificationController, useVerificationControllerV2, useVerificationRepo, useVerificationRepoV2, useVerificationService, useVerificationServiceV2, useVisitorTransactionController, useVisitorTransactionRepo, useVisitorTransactionService, useWorkOrderController, useWorkOrderRepo, useWorkOrderService, userSchema, vehicleSchema, vehicles_namespace_collection, visitors_namespace_collection, workOrderSchema, work_orders2_namespace_collection, work_orders_namespace_collection };
|
|
7407
|
+
export { ANPRMode, AccessTypeProps, AppServiceType, AssignCardConfig, BuildingLevelStatus, BuildingStatus, BulkCardUpdate, BulletinOrder, BulletinRecipient, BulletinSort, BulletinStatus, BulletinVideoOrder, BulletinVideoSort, Camera, CameraType, DEVICE_STATUS, DOBStatus, DayOfWeek, DynamicFormFields, EAccessCardTypes, EAccessCardUserTypes, EmailSender, EntryOrder, EntrySort, EventOrder, EventSort, EventStatus, EventType, FacilitySort, FacilityStatus, FormEntryStatus, GuestSort, GuestStatus, IAccessCard, IAccessCardTransaction, MAccessCard, MAccessCardTransaction, MAddress, MAttendance, MAttendanceSettings, MBillingConfiguration, MBillingItem, MBuilding, MBuildingLevel, MBuildingUnit, MBulletinBoard, MBulletinVideo, MCategoryPreloved, MChannelPreloved, MChat, MChatPreloved, MCustomer, MCustomerSite, MDocumentManagement, MEntryPassSettings, MEventManagement, MFeedback, MFile, MFormEntry, MGuestManagement, MIncidentReport, MManpowerDesignations, MManpowerMonitoring, MManpowerRemarks, MManpowerSites, MMember, MNfcPatrolLog, MNfcPatrolRoute, MNfcPatrolSettings, MNfcPatrolSettingsUpdate, MNfcPatrolTag, MOccurrenceBook, MOccurrenceEntry, MOccurrenceSubject, MOnlineForm, MOrg, MOvernightParkingApprovalHours, MOvernightParkingRequest, MPatrolLog, MPatrolQuestion, MPatrolRoute, MPerson, MPost, MPostFavorite, MPromoCode, MRobot, MRole, MRoleV2, MServiceProvider, MServiceProviderBilling, MSession, MSite, MSiteCamera, MSiteFacility, MSiteFacilityBooking, MStatementOfAccount, MSubcategoryPreloved, MSubscription, MUnitBilling, MUser, MVehicle, MVehicleTransaction, MVerification, MVerificationV2, MVisitorTransaction, MWorkOrder, OrgNature, OvernightParkingRequestSort, OvernightParkingRequestStatus, PERSON_TYPES, PMDashboardCollection, PStatus, Period, PersonStatus, PersonType, PersonTypes, PostOrder, PostSort, PostStatus, QrTagProps, SiteAddress, SiteCategories, SiteStatus, SortFields, SortOrder, Status, SubjectOrder, SubjectSort, SubscriptionType, TAccessMngmntSettings, TActionStatus, TAddress, TAffectedEntities, TAffectedInjured, TAppServiceType, TApprovedBy, TApprover, TAttendance, TAttendanceCheckIn, TAttendanceCheckOut, TAttendanceCheckTime, TAttendanceLocation, TAttendanceSettings, TAttendanceSettingsGetBySite, TAuthorities, TAuthoritiesCalled, TBilling, TBillingConfiguration, TBillingItem, TBuilding, TBuildingLevel, TBuildingUnit, TBulletinBoard, TBulletinVideo, TCamera, TCategoryPreloved, TChannelPreloved, TChat, TChatPreloved, TCheckPoint$1 as TCheckPoint, TComplaintInfo, TComplaintReceivedTo, TCounter, TCustomer, TCustomerSite, TDayNumber, TDaySchedule, TDefaultAccessCard, TDesignations, TDocs, TDocumentCreate, TDocumentManagement, TEntryPassSettings, TEventManagement, TFeedback, TFeedbackMetadata, TFeedbackUpdate, TFeedbackUpdateCategory, TFeedbackUpdateServiceProvider, TFeedbackUpdateStatus, TFeedbackUpdateToCompleted, TFile, TFiles, TFormEntry, TGetAttendancesByUserQuery, TGetAttendancesQuery, TGuestManagement, TIncidentInformation, TIncidentReport, TIncidentTypeAndTime, TInvoice, TKeyRef, TManpowerDesignations, TManpowerDesignationsUpdate, TManpowerMonitoring, TManpowerMonitoringUpdate, TManpowerRemarks, TManpowerRemarksStatusUpdate, TManpowerRemarksUpdate, TManpowerSearchFilter, TManpowerSites, TMember, TMemberUpdateStatus, TMessagePreloved, TMiniRole, TNfcPatrolLog, TNfcPatrolRoute, TNfcPatrolRouteEdit, TNfcPatrolSettings, TNfcPatrolSettingsGetBySite, TNfcPatrolSettingsUpdate, TNfcPatrolTag, TNfcPatrolTagConfigureReset, TNfcPatrolTagEdit, TNfcPatrolTagUpdateData, TOccurrenceBook, TOccurrenceEntry, TOccurrenceSubject, TOnlineForm, TOrg, TOvernightParkingApprovalHours, TOvernightParkingRequest, TPatrolLog, TPatrolQuestion, TPatrolRoute, TPerson, TPlaceOfIncident, TPlates, TPost, TPostFavorite, TPrice, TPriceType, TPromoCode, TPromoTier, TRecipientOfComplaint, TRemarks, TResident, TRobot, TRobotMetadata, TRole, TRoleV2, TRoute, TSOABillingItem, TSOAStatus, TServiceProvider, TServiceProviderBilling, TSession, TSessionCreate, TShifts, TSite, TSiteCamera, TSiteFacility, TSiteFacilityBooking, TSiteInfo, TSiteInformation, TSiteMetadata, TSiteUpdateBlock, TStatementOfAccount, TSubcategoryPreloved, TSubmissionForm, TSubscription, TUnitBilling, TUnits, TUpdateFormEntry, TUpdateName, TUser, TUserCreate, TVehicle, TVehicleTransaction, TVehicleUpdate, TVerification, TVerificationMetadata, TVerificationMetadataV2, TVerificationV2, TVisitorTransaction, TWorkOrder, TWorkOrderMetadata, TWorkOrderUpdate, TWorkOrderUpdateStatus, TWorkOrderUpdateToCompleted, TanyoneDamageToProperty, UseAccessManagementRepo, UserStatus, VehicleCategory, VehicleOrder, VehicleSort, VehicleStatus, VehicleType, VerificationLinkType, VerificationStatus, VerificationSubjectType, VerificationType, VisitorSort, VisitorStatus, addressSchema, allowedFieldsSite, allowedNatures, attendanceSchema, attendanceSettingsSchema, building_level_namespace_collection, building_units_namespace_collection, buildings_namespace_collection, bulletin_boards_namespace_collection, calculatePercentage, chatSchema, createManpowerRemarksDaily, customerSchema, designationsSchema, events_namespace_collection, facility_bookings_namespace_collection, feedbackSchema, feedbacks2_namespace_collection, feedbacks_namespace_collection, formatDahuaDate, getPeriodRangeWithPrevious, guests_namespace_collection, incidentReport, incidentReportLog, incidents_namespace_collection, landscapeDashboardCollection, logCamera, mAndEDashboardCollection, manpowerDesignationsSchema, manpowerEvents, manpowerMonitoringSchema, manpowerRemarksSchema, manpowerSitesSchema, nfcPatrolSettingsSchema, nfcPatrolSettingsSchemaUpdate, occurrence_book_namespace_collection, online_forms_namespace_collection, orgSchema, overnight_parking_requests_namespace_collection, parseDahuaFind, pestDashboardCollection, poolDashboardCollection, promoCodeSchema, remarksSchema, residentFormEntry, robotSchema, schema, schemaApprovedBy, schemaApprover, schemaBilling, schemaBillingConfiguration, schemaBillingItem, schemaBuilding, schemaBuildingLevel, schemaBuildingUnit, schemaBuildingUpdateOptions, schemaBulletinBoard, schemaBulletinVideo, schemaCategoryPreloved, schemaChannelPreloved, schemaChatPreloved, schemaCustomerSite, schemaDocumentManagement, schemaEntryPassSettings, schemaEventManagement, schemaFiles, schemaFormEntry, schemaGuestManagement, schemaIncidentReport, schemaMultipleDocumentManagement, schemaNfcPatrolLog, schemaNfcPatrolRoute, schemaNfcPatrolTag, schemaNfcPatrolTagUpdateData, schemaOccurrenceBook, schemaOccurrenceEntry, schemaOccurrenceSubject, schemaOnlineForm, schemaOvernightParkingApprovalHours, schemaOvernightParkingRequest, schemaPatrolLog, schemaPatrolQuestion, schemaPatrolRoute, schemaPerson, schemaPlate, schemaPost, schemaPostFavorite, schemaServiceProvider, schemaServiceProviderBilling, schemaSiteCamera, schemaSiteFacility, schemaSiteFacilityBooking, schemaStatementOfAccount, schemaSubcategoryPreloved, schemaUnitBilling, schemaUpdateBuildingLevel, schemaUpdateBulletinBoard, schemaUpdateBulletinVideo, schemaUpdateCategoryPreloved, schemaUpdateChatPreloved, schemaUpdateDocumentManagement, schemaUpdateEntryPassSettings, schemaUpdateEventManagement, schemaUpdateFormEntry, schemaUpdateGuestManagement, schemaUpdateIncidentReport, schemaUpdateOccurrenceBook, schemaUpdateOccurrenceEntry, schemaUpdateOccurrenceSubject, schemaUpdateOnlineForm, schemaUpdateOptions, schemaUpdateOvernightParkingRequest, schemaUpdatePatrolLog, schemaUpdatePatrolQuestion, schemaUpdatePatrolRoute, schemaUpdatePerson, schemaUpdatePost, schemaUpdatePostFavorite, schemaUpdateServiceProviderBilling, schemaUpdateSiteBillingConfiguration, schemaUpdateSiteBillingItem, schemaUpdateSiteCamera, schemaUpdateSiteFacility, schemaUpdateSiteFacilityBooking, schemaUpdateSiteUnitBilling, schemaUpdateStatementOfAccount, schemaUpdateSubcategoryPreloved, schemaUpdateVisTrans, schemaVehicleTransaction, schemaVisitorTransaction, schemeCamera, schemeLogCamera, securityDashboardCollection, shiftSchema, siteSchema, site_people_namespace_collection, tokenSchema, updateRemarksStatusEod, updateRemarksisAcknowledged, updateSiteSchema, useAccessManagementController, useAddressRepo, useAttendanceController, useAttendanceRepository, useAttendanceSettingsController, useAttendanceSettingsRepository, useAttendanceSettingsService, useAuthController, useAuthControllerV2, useAuthService, useAuthServiceV2, useBuildingController, useBuildingLevelController, useBuildingLevelRepo, useBuildingLevelService, useBuildingRepo, useBuildingService, useBuildingUnitController, useBuildingUnitRepo, useBuildingUnitService, useBulletinBoardController, useBulletinBoardRepo, useBulletinBoardService, useBulletinVideoController, useBulletinVideoRepo, useBulletinVideoService, useCategoryPrelovedController, useCategoryPrelovedRepo, useChannelPrelovedController, useChannelPrelovedRepo, useChatController, useChatPrelovedController, useChatPrelovedRepo, useChatRepo, useCounterModel, useCounterRepo, useCustomerController, useCustomerRepo, useCustomerSiteController, useCustomerSiteRepo, useCustomerSiteService, useDahuaService, useDashboardController, useDashboardRepo, useDocumentManagementController, useDocumentManagementRepo, useDocumentManagementService, useEntryPassSettingsController, useEntryPassSettingsRepo, useEventManagementController, useEventManagementRepo, useEventManagementService, useFeedbackController, useFeedbackRepo, useFeedbackService, useFileController, useFileRepo, useFileService, useFormEntryController, useFormEntryRepo, useGuestManagementController, useGuestManagementRepo, useGuestManagementService, useHrmLabsAttendanceCtrl, useHrmLabsAttendanceSrvc, useIncidentReportController, useIncidentReportRepo, useIncidentReportService, useInvoiceController, useInvoiceModel, useInvoiceRepo, useManpowerDesignationCtrl, useManpowerDesignationRepo, useManpowerMonitoringCtrl, useManpowerMonitoringRepo, useManpowerMonitoringSrvc, useManpowerRemarkCtrl, useManpowerRemarksRepo, useManpowerSitesCtrl, useManpowerSitesRepo, useManpowerSitesSrvc, useMemberController, useMemberRepo, useNewDashboardController, useNewDashboardRepo, useNfcPatrolLogController, useNfcPatrolLogRepo, useNfcPatrolLogService, useNfcPatrolRouteController, useNfcPatrolRouteRepo, useNfcPatrolRouteService, useNfcPatrolSettingsController, useNfcPatrolSettingsRepository, useNfcPatrolSettingsService, useNfcPatrolTagController, useNfcPatrolTagRepo, useNfcPatrolTagService, useOccurrenceBookController, useOccurrenceBookRepo, useOccurrenceBookService, useOccurrenceEntryController, useOccurrenceEntryRepo, useOccurrenceEntryService, useOccurrenceSubjectController, useOccurrenceSubjectRepo, useOccurrenceSubjectService, useOnlineFormController, useOnlineFormRepo, useOrgController, useOrgControllerV2, useOrgRepo, useOvernightParkingController, useOvernightParkingRepo, useOvernightParkingRequestController, useOvernightParkingRequestRepo, useOvernightParkingRequestService, usePatrolLogController, usePatrolLogRepo, usePatrolQuestionController, usePatrolQuestionRepo, usePatrolRouteController, usePatrolRouteRepo, usePersonController, usePersonRepo, usePostFavoriteController, usePostFavoriteRepo, usePostFavoriteService, usePostPrelovedController, usePostPrelovedRepo, usePriceController, usePriceModel, usePriceRepo, usePromoCodeController, usePromoCodeRepo, useRedDotPaymentController, useRedDotPaymentRepo, useRedDotPaymentSvc, useRobotController, useRobotRepo, useRobotService, useRoleController, useRoleControllerV2, useRoleRepo, useRoleRepoV2, useRoleServiceV2, useServiceProviderBillingController, useServiceProviderBillingRepo, useServiceProviderBillingService, useServiceProviderController, useServiceProviderRepo, useSessionRepo, useSiteBillingConfigurationController, useSiteBillingConfigurationRepo, useSiteBillingItemController, useSiteBillingItemRepo, useSiteCameraController, useSiteCameraRepo, useSiteCameraService, useSiteController, useSiteFacilityBookingController, useSiteFacilityBookingRepo, useSiteFacilityBookingService, useSiteFacilityController, useSiteFacilityRepo, useSiteFacilityService, useSiteRepo, useSiteService, useSiteUnitBillingController, useSiteUnitBillingRepo, useSiteUnitBillingService, useStatementOfAccountController, useStatementOfAccountRepo, useSubcategoryPrelovedController, useSubcategoryPrelovedRepo, useSubscriptionController, useSubscriptionRepo, useSubscriptionService, useUserController, useUserControllerV2, useUserRepo, useUserRepoV2, useUserService, useUserServiceV2, useVehicleController, useVehicleRepo, useVehicleService, useVerificationController, useVerificationControllerV2, useVerificationRepo, useVerificationRepoV2, useVerificationService, useVerificationServiceV2, useVisitorTransactionController, useVisitorTransactionRepo, useVisitorTransactionService, useWorkOrderController, useWorkOrderRepo, useWorkOrderService, userSchema, vehicleSchema, vehicles_namespace_collection, visitors_namespace_collection, workOrderSchema, work_orders2_namespace_collection, work_orders_namespace_collection };
|
package/dist/index.js
CHANGED
|
@@ -6064,6 +6064,7 @@ __export(src_exports, {
|
|
|
6064
6064
|
poolDashboardCollection: () => poolDashboardCollection,
|
|
6065
6065
|
promoCodeSchema: () => promoCodeSchema,
|
|
6066
6066
|
remarksSchema: () => remarksSchema,
|
|
6067
|
+
residentFormEntry: () => residentFormEntry,
|
|
6067
6068
|
robotSchema: () => robotSchema,
|
|
6068
6069
|
schema: () => schema,
|
|
6069
6070
|
schemaApprovedBy: () => schemaApprovedBy,
|
|
@@ -35159,10 +35160,37 @@ function usePersonService() {
|
|
|
35159
35160
|
session?.endSession();
|
|
35160
35161
|
}
|
|
35161
35162
|
}
|
|
35163
|
+
async function suspendResidentById(id) {
|
|
35164
|
+
const session = import_node_server_utils111.useAtlas.getClient()?.startSession();
|
|
35165
|
+
if (!session) {
|
|
35166
|
+
throw new import_node_server_utils111.BadRequestError("Database session not available.");
|
|
35167
|
+
}
|
|
35168
|
+
try {
|
|
35169
|
+
session.startTransaction();
|
|
35170
|
+
const person = await _getByUserId(id.toString());
|
|
35171
|
+
if (!person)
|
|
35172
|
+
throw new import_node_server_utils111.NotFoundError("Person not found.");
|
|
35173
|
+
await _updateById(person._id, { status: "deleted" }, session);
|
|
35174
|
+
if (person.user) {
|
|
35175
|
+
await _updateUserFieldById(
|
|
35176
|
+
{ _id: person.user.toString(), field: "status", value: "suspended" },
|
|
35177
|
+
session
|
|
35178
|
+
);
|
|
35179
|
+
}
|
|
35180
|
+
await session.commitTransaction();
|
|
35181
|
+
return "Resident suspended successfully.";
|
|
35182
|
+
} catch (error) {
|
|
35183
|
+
await session.abortTransaction();
|
|
35184
|
+
throw error;
|
|
35185
|
+
} finally {
|
|
35186
|
+
session.endSession();
|
|
35187
|
+
}
|
|
35188
|
+
}
|
|
35162
35189
|
return {
|
|
35163
35190
|
add,
|
|
35164
35191
|
updateById,
|
|
35165
|
-
reviewResidentPerson
|
|
35192
|
+
reviewResidentPerson,
|
|
35193
|
+
suspendResidentById
|
|
35166
35194
|
};
|
|
35167
35195
|
}
|
|
35168
35196
|
|
|
@@ -35182,7 +35210,8 @@ function usePersonController() {
|
|
|
35182
35210
|
const {
|
|
35183
35211
|
add: _add,
|
|
35184
35212
|
updateById: _updateById,
|
|
35185
|
-
reviewResidentPerson: _reviewResidentPerson
|
|
35213
|
+
reviewResidentPerson: _reviewResidentPerson,
|
|
35214
|
+
suspendResidentById: _suspendResidentById
|
|
35186
35215
|
} = usePersonService();
|
|
35187
35216
|
async function add(req, res, next) {
|
|
35188
35217
|
const payload = { ...req.body };
|
|
@@ -35526,6 +35555,26 @@ function usePersonController() {
|
|
|
35526
35555
|
const result = await _reviewResidentPerson(_id, req.body);
|
|
35527
35556
|
res.status(200).json({ message: result });
|
|
35528
35557
|
return;
|
|
35558
|
+
} catch (error2) {
|
|
35559
|
+
console.log("error", error2.message);
|
|
35560
|
+
console.log("error", error2);
|
|
35561
|
+
import_node_server_utils112.logger.log({ level: "error", message: error2.message });
|
|
35562
|
+
next(error2);
|
|
35563
|
+
return;
|
|
35564
|
+
}
|
|
35565
|
+
}
|
|
35566
|
+
async function suspendResidentById(req, res, next) {
|
|
35567
|
+
const _id = req.params.id;
|
|
35568
|
+
const { error } = import_joi60.default.string().hex().required().validate(_id);
|
|
35569
|
+
if (error) {
|
|
35570
|
+
import_node_server_utils112.logger.log({ level: "error", message: error.message });
|
|
35571
|
+
next(new import_node_server_utils112.BadRequestError(error.message));
|
|
35572
|
+
return;
|
|
35573
|
+
}
|
|
35574
|
+
try {
|
|
35575
|
+
const result = await _suspendResidentById(_id);
|
|
35576
|
+
res.status(200).json({ message: result });
|
|
35577
|
+
return;
|
|
35529
35578
|
} catch (error2) {
|
|
35530
35579
|
import_node_server_utils112.logger.log({ level: "error", message: error2.message });
|
|
35531
35580
|
next(error2);
|
|
@@ -35544,7 +35593,8 @@ function usePersonController() {
|
|
|
35544
35593
|
getPeopleByPlateNumber,
|
|
35545
35594
|
getPeopleByNRIC,
|
|
35546
35595
|
getPersonByUserId,
|
|
35547
|
-
reviewResidentPerson
|
|
35596
|
+
reviewResidentPerson,
|
|
35597
|
+
suspendResidentById
|
|
35548
35598
|
};
|
|
35549
35599
|
}
|
|
35550
35600
|
|
|
@@ -53308,7 +53358,7 @@ function MIncidentReport(value) {
|
|
|
53308
53358
|
approvedByName: value.approvedByName ?? "",
|
|
53309
53359
|
remarks: value.remarks ?? null,
|
|
53310
53360
|
status: value.status ?? "pending",
|
|
53311
|
-
|
|
53361
|
+
platform: value.platform ?? "",
|
|
53312
53362
|
createdAt: value.createdAt ?? /* @__PURE__ */ new Date(),
|
|
53313
53363
|
updatedAt: value.updatedAt,
|
|
53314
53364
|
deletedAt: value.deletedAt
|
|
@@ -65030,6 +65080,26 @@ function MFormEntry(value) {
|
|
|
65030
65080
|
deletedAt: value.deletedAt ?? null
|
|
65031
65081
|
};
|
|
65032
65082
|
}
|
|
65083
|
+
var residentFormEntry = import_joi144.default.object({
|
|
65084
|
+
_id: import_joi144.default.string().hex().optional().allow("", null),
|
|
65085
|
+
typeOfForm: import_joi144.default.string().required(),
|
|
65086
|
+
unitNumber: import_joi144.default.string().optional().allow(null, ""),
|
|
65087
|
+
fields: import_joi144.default.object().pattern(
|
|
65088
|
+
import_joi144.default.string(),
|
|
65089
|
+
import_joi144.default.alternatives().try(
|
|
65090
|
+
import_joi144.default.string(),
|
|
65091
|
+
import_joi144.default.number(),
|
|
65092
|
+
import_joi144.default.boolean(),
|
|
65093
|
+
import_joi144.default.valid(null)
|
|
65094
|
+
)
|
|
65095
|
+
).required(),
|
|
65096
|
+
status: import_joi144.default.string().optional().allow("", null),
|
|
65097
|
+
org: import_joi144.default.string().hex().optional().allow("", null),
|
|
65098
|
+
site: import_joi144.default.string().hex().optional().allow("", null),
|
|
65099
|
+
createdAt: import_joi144.default.date().optional().allow("", null),
|
|
65100
|
+
updatedAt: import_joi144.default.date().optional().allow("", null),
|
|
65101
|
+
deletedAt: import_joi144.default.date().optional().allow("", null)
|
|
65102
|
+
});
|
|
65033
65103
|
|
|
65034
65104
|
// src/repositories/online-forms-v2.repository.ts
|
|
65035
65105
|
var import_node_server_utils249 = require("@7365admin1/node-server-utils");
|
|
@@ -65228,13 +65298,38 @@ function useFormEntryRepo() {
|
|
|
65228
65298
|
throw new Error(error.message);
|
|
65229
65299
|
}
|
|
65230
65300
|
}
|
|
65301
|
+
async function addResidentForm(value, session) {
|
|
65302
|
+
try {
|
|
65303
|
+
value.site = new import_mongodb146.ObjectId(value.site);
|
|
65304
|
+
value.org = new import_mongodb146.ObjectId(value.org);
|
|
65305
|
+
const res = await collection.insertOne(value, { session });
|
|
65306
|
+
delNamespace().then(() => {
|
|
65307
|
+
import_node_server_utils249.logger.info(
|
|
65308
|
+
`Cache cleared for namespace: ${online_forms_namespace_collection}`
|
|
65309
|
+
);
|
|
65310
|
+
}).catch((err) => {
|
|
65311
|
+
import_node_server_utils249.logger.error(
|
|
65312
|
+
`Failed to clear cache for namespace: ${online_forms_namespace_collection}`,
|
|
65313
|
+
err
|
|
65314
|
+
);
|
|
65315
|
+
});
|
|
65316
|
+
return res.insertedId;
|
|
65317
|
+
} catch (error) {
|
|
65318
|
+
const isDuplicated = error.message.includes("duplicate");
|
|
65319
|
+
if (isDuplicated) {
|
|
65320
|
+
throw new import_node_server_utils249.BadRequestError("Online Form already exists.");
|
|
65321
|
+
}
|
|
65322
|
+
throw error;
|
|
65323
|
+
}
|
|
65324
|
+
}
|
|
65231
65325
|
return {
|
|
65232
65326
|
add,
|
|
65233
65327
|
getAll,
|
|
65234
65328
|
getFormEntryById,
|
|
65235
65329
|
updateFormEntryById,
|
|
65236
65330
|
createTextIndex,
|
|
65237
|
-
deleteOnlineFormById
|
|
65331
|
+
deleteOnlineFormById,
|
|
65332
|
+
addResidentForm
|
|
65238
65333
|
};
|
|
65239
65334
|
}
|
|
65240
65335
|
|
|
@@ -65249,7 +65344,8 @@ function useFormEntryController() {
|
|
|
65249
65344
|
getAll: _getAll,
|
|
65250
65345
|
getFormEntryById: _getFormEntryById,
|
|
65251
65346
|
updateFormEntryById: _updateFormEntryById,
|
|
65252
|
-
deleteOnlineFormById: _deleteOnlineFormById
|
|
65347
|
+
deleteOnlineFormById: _deleteOnlineFormById,
|
|
65348
|
+
addResidentForm: _addResidentForm
|
|
65253
65349
|
} = useFormEntryRepo();
|
|
65254
65350
|
function toCamelCase(str) {
|
|
65255
65351
|
return str.replace(/\s(.)/g, (_, char) => char.toUpperCase()).replace(/\s+/g, "").replace(/^(.)/, (_, char) => char.toLowerCase());
|
|
@@ -65428,13 +65524,35 @@ function useFormEntryController() {
|
|
|
65428
65524
|
return;
|
|
65429
65525
|
}
|
|
65430
65526
|
}
|
|
65527
|
+
async function residentFormSubmission(req, res, next) {
|
|
65528
|
+
const payload = { ...req.body };
|
|
65529
|
+
const { error } = residentFormEntry.validate(payload, {
|
|
65530
|
+
abortEarly: false
|
|
65531
|
+
});
|
|
65532
|
+
if (error) {
|
|
65533
|
+
const messages = error.details.map((d) => d.message).join(", ");
|
|
65534
|
+
import_node_server_utils250.logger.log({ level: "error", message: messages });
|
|
65535
|
+
next(new import_node_server_utils250.BadRequestError(messages));
|
|
65536
|
+
return;
|
|
65537
|
+
}
|
|
65538
|
+
try {
|
|
65539
|
+
const data = await _addResidentForm(payload);
|
|
65540
|
+
res.status(201).json({ message: data });
|
|
65541
|
+
return;
|
|
65542
|
+
} catch (error2) {
|
|
65543
|
+
import_node_server_utils250.logger.log({ level: "error", message: error2.message });
|
|
65544
|
+
next(error2);
|
|
65545
|
+
return;
|
|
65546
|
+
}
|
|
65547
|
+
}
|
|
65431
65548
|
return {
|
|
65432
65549
|
add,
|
|
65433
65550
|
uploadFormEntrys,
|
|
65434
65551
|
getAll,
|
|
65435
65552
|
getFormEntryById,
|
|
65436
65553
|
updateFormEntryById,
|
|
65437
|
-
deleteFormEntryById
|
|
65554
|
+
deleteFormEntryById,
|
|
65555
|
+
residentFormSubmission
|
|
65438
65556
|
};
|
|
65439
65557
|
}
|
|
65440
65558
|
|
|
@@ -65834,6 +65952,7 @@ function useBuildingLevelController() {
|
|
|
65834
65952
|
poolDashboardCollection,
|
|
65835
65953
|
promoCodeSchema,
|
|
65836
65954
|
remarksSchema,
|
|
65955
|
+
residentFormEntry,
|
|
65837
65956
|
robotSchema,
|
|
65838
65957
|
schema,
|
|
65839
65958
|
schemaApprovedBy,
|