@neutron.co.id/pendidikan-operation 1.29.8 → 1.30.1
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/build/@packages/pendidikan-operation/@package/actions/deleteStudentProgram/deleteStudentProgram.action.cjs +77 -0
- package/build/@packages/pendidikan-operation/@package/actions/deleteStudentProgram/deleteStudentProgram.action.mjs +75 -0
- package/build/@packages/pendidikan-operation/@package/actions/deleteStudentProgram/deleteStudentProgram.schema.cjs +11 -0
- package/build/@packages/pendidikan-operation/@package/actions/deleteStudentProgram/deleteStudentProgram.schema.mjs +9 -0
- package/build/@packages/pendidikan-operation/@package/actions/exportStudentProgram/exportStudentProgram.action.cjs +171 -0
- package/build/@packages/pendidikan-operation/@package/actions/exportStudentProgram/exportStudentProgram.action.mjs +169 -0
- package/build/@packages/pendidikan-operation/@package/actions/exportStudentProgram/exportStudentProgram.schema.cjs +11 -0
- package/build/@packages/pendidikan-operation/@package/actions/exportStudentProgram/exportStudentProgram.schema.mjs +9 -0
- package/build/@packages/pendidikan-operation/@package/actions/giveModuleAccessByProgram/giveModuleAccessByProgram.action.cjs +200 -0
- package/build/@packages/pendidikan-operation/@package/actions/giveModuleAccessByProgram/giveModuleAccessByProgram.action.mjs +198 -0
- package/build/@packages/pendidikan-operation/@package/actions/giveModuleAccessByProgram/giveModuleAccessByProgram.schema.cjs +14 -0
- package/build/@packages/pendidikan-operation/@package/actions/giveModuleAccessByProgram/giveModuleAccessByProgram.schema.mjs +12 -0
- package/build/{providers → @packages/pendidikan-operation/@package/providers}/akademik/useAkademik.cjs +53 -4
- package/build/{providers → @packages/pendidikan-operation/@package/providers}/akademik/useAkademik.mjs +53 -4
- package/build/_virtual/_commonjsHelpers.cjs +5 -0
- package/build/_virtual/_commonjsHelpers.mjs +3 -0
- package/build/_virtual/papaparse.cjs +5 -0
- package/build/_virtual/papaparse.mjs +3 -0
- package/build/actions/checkStudentProgramExistance/checkStudentProgramExistance.action.d.ts +1 -1
- package/build/actions/checkStudentProgramExistance/checkStudentProgramExistance.schema.d.ts +2 -2
- package/build/actions/deleteStudentProgram/deleteStudentProgram.action.d.ts +13 -0
- package/build/actions/deleteStudentProgram/deleteStudentProgram.schema.d.ts +8 -0
- package/build/actions/deleteStudentProgram/index.d.ts +1 -0
- package/build/actions/exportStudentProgram/exportStudentProgram.action.d.ts +13 -0
- package/build/actions/exportStudentProgram/exportStudentProgram.schema.d.ts +8 -0
- package/build/actions/exportStudentProgram/index.d.ts +1 -0
- package/build/actions/giveModuleAccessByProgram/giveModuleAccessByProgram.action.d.ts +13 -0
- package/build/actions/giveModuleAccessByProgram/giveModuleAccessByProgram.schema.d.ts +11 -0
- package/build/actions/giveModuleAccessByProgram/index.d.ts +2 -0
- package/build/actions/index.d.ts +3 -0
- package/build/actions/jadwal/setAksesModulSiswaDiClassGroup/setAksesModulSiswaDiClassGroup.action.d.ts +1 -1
- package/build/actions/jadwal/setAksesModulSiswaDiClassGroup/setAksesModulSiswaDiClassGroup.schema.d.ts +2 -2
- package/build/index.cjs +110 -99
- package/build/index.d.ts +12 -2
- package/build/index.mjs +109 -102
- package/build/providers/akademik/useAkademik.d.ts +12 -2
- package/package.json +12 -6
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/akademik/action.getStaffId.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/akademik/action.getStaffId.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/akademik/action.getStaffPoint.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/akademik/action.getStaffPoint.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/akademik/action.getStudentId.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/akademik/action.getStudentId.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/akademik/action.getStudentPoint.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/akademik/action.getStudentPoint.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/akademik/action.getTeacherPoint.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/akademik/action.getTeacherPoint.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/akademik/action.presenceSessionStudent.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/akademik/action.presenceSessionStudent.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/akademik/action.presenceSessionTeacher.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/akademik/action.presenceSessionTeacher.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/akademik/action.syncCommitment.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/akademik/action.syncCommitment.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/akademik/action.syncStudentAdmisi.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/akademik/action.syncStudentAdmisi.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/akademik/action.syncStudentBranch.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/akademik/action.syncStudentBranch.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/akademik/action.syncStudentInformation.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/akademik/action.syncStudentInformation.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/akademik/action.syncStudents.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/akademik/action.syncStudents.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/akademik/sendPointNotification/sendPointNotification.action.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/akademik/sendPointNotification/sendPointNotification.action.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/akademik/sendPointNotification/sendPointNotification.schema.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/akademik/sendPointNotification/sendPointNotification.schema.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/akademik/studentReport/syncStudentReport.action.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/akademik/studentReport/syncStudentReport.action.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/akademik/studentReport/syncStudentReport.schema.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/akademik/studentReport/syncStudentReport.schema.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/akademik/updateReportStudent/updateReportStudent.action.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/akademik/updateReportStudent/updateReportStudent.action.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/akademik/updateReportStudent/updateReportStudent.schema.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/akademik/updateReportStudent/updateReportStudent.schema.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/checkProgramExistance/checkProgramExistance.action.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/checkProgramExistance/checkProgramExistance.action.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/checkProgramExistance/checkProgramExistance.schema.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/checkProgramExistance/checkProgramExistance.schema.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/checkStudentProgramExistance/checkStudentProgramExistance.action.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/checkStudentProgramExistance/checkStudentProgramExistance.action.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/checkStudentProgramExistance/checkStudentProgramExistance.schema.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/checkStudentProgramExistance/checkStudentProgramExistance.schema.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/importData/importData.action.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/importData/importData.action.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/importData/importData.schema.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/importData/importData.schema.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/jadwal/action.allConflict.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/jadwal/action.allConflict.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/jadwal/action.bulkDeleteSession.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/jadwal/action.bulkDeleteSession.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/jadwal/action.bulkUpdateSession.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/jadwal/action.bulkUpdateSession.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/jadwal/action.checkClassAttendance.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/jadwal/action.checkClassAttendance.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/jadwal/action.classSessionInventoryOccurs.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/jadwal/action.classSessionInventoryOccurs.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/jadwal/action.classSessionInventoryPreparation.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/jadwal/action.classSessionInventoryPreparation.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/jadwal/action.createManySession.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/jadwal/action.createManySession.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/jadwal/action.customSaveOneClassSession.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/jadwal/action.customSaveOneClassSession.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/jadwal/action.deleteManySession.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/jadwal/action.deleteManySession.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/jadwal/action.prepareConflict.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/jadwal/action.prepareConflict.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/jadwal/action.userCountStats.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/jadwal/action.userCountStats.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/jadwal/getClassSessionConflicts/getClassSessionConflicts.action.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/jadwal/getClassSessionConflicts/getClassSessionConflicts.action.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/jadwal/getClassSessionConflicts/getClassSessionConflicts.schema.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/jadwal/getClassSessionConflicts/getClassSessionConflicts.schema.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/jadwal/sendClassConsultationNotification/sendClassConsultationNotification.action.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/jadwal/sendClassConsultationNotification/sendClassConsultationNotification.action.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/jadwal/sendClassConsultationNotification/sendClassConsultationNotification.schema.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/jadwal/sendClassConsultationNotification/sendClassConsultationNotification.schema.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/jadwal/sendClassSessionNotification/sendClassSessionNotification.action.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/jadwal/sendClassSessionNotification/sendClassSessionNotification.action.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/jadwal/sendClassSessionNotification/sendClassSessionNotification.schema.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/jadwal/sendClassSessionNotification/sendClassSessionNotification.schema.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/jadwal/setAksesModulSiswaDiClassGroup/setAksesModulSiswaDiClassGroup.action.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/jadwal/setAksesModulSiswaDiClassGroup/setAksesModulSiswaDiClassGroup.action.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/jadwal/setAksesModulSiswaDiClassGroup/setAksesModulSiswaDiClassGroup.schema.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/jadwal/setAksesModulSiswaDiClassGroup/setAksesModulSiswaDiClassGroup.schema.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/jadwal/setClassSessionDependencies/setClassSessionDependencies.action.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/jadwal/setClassSessionDependencies/setClassSessionDependencies.action.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/jadwal/setClassSessionDependencies/setClassSessionDependencies.schema.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/jadwal/setClassSessionDependencies/setClassSessionDependencies.schema.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/jadwal/setTravelWageSessions/setTravelWageSessions.action.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/jadwal/setTravelWageSessions/setTravelWageSessions.action.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/jadwal/setTravelWageSessions/setTravelWageSessions.schema.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/jadwal/setTravelWageSessions/setTravelWageSessions.schema.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/jadwal/syncClassGroups/syncClassGroups.action.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/jadwal/syncClassGroups/syncClassGroups.action.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/jadwal/syncClassGroups/syncClassGroups.schema.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/jadwal/syncClassGroups/syncClassGroups.schema.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/jadwal/syncClassSessions/syncClassSessions.action.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/jadwal/syncClassSessions/syncClassSessions.action.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/jadwal/syncClassSessions/syncClassSessions.schema.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/jadwal/syncClassSessions/syncClassSessions.schema.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/mediaScanter/prepareMediaScanterGradingInsert/prepareMediaScanterGradingInsert.action.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/mediaScanter/prepareMediaScanterGradingInsert/prepareMediaScanterGradingInsert.action.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/mediaScanter/prepareMediaScanterGradingInsert/prepareMediaScanterGradingInsert.schema.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/mediaScanter/prepareMediaScanterGradingInsert/prepareMediaScanterGradingInsert.schema.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/penilaian/getGradingComponentByType/getGradingComponentByType.action.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/penilaian/getGradingComponentByType/getGradingComponentByType.action.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/penilaian/getGradingComponentByType/getGradingComponentByType.schema.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/penilaian/getGradingComponentByType/getGradingComponentByType.schema.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/penilaian/getGradingCount/action.getGradingCount.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/penilaian/getGradingCount/action.getGradingCount.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/penilaian/getGradingStudent/getGradingStudent.action.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/penilaian/getGradingStudent/getGradingStudent.action.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/penilaian/getGradingStudent/getGradingStudent.schema.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/penilaian/getGradingStudent/getGradingStudent.schema.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/penilaian/getGradingTypeByYear/getGradingTypeByYear.action.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/penilaian/getGradingTypeByYear/getGradingTypeByYear.action.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/penilaian/getGradingTypeByYear/getGradingTypeByYear.schema.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/penilaian/getGradingTypeByYear/getGradingTypeByYear.schema.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/penilaian/getScoreStudent/getScoreStudent.action.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/penilaian/getScoreStudent/getScoreStudent.action.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/penilaian/getScoreStudent/getScoreStudent.schema.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/penilaian/getScoreStudent/getScoreStudent.schema.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/penilaian/refreshGrading/refreshGrading.action.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/penilaian/refreshGrading/refreshGrading.action.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/penilaian/refreshGrading/refreshGrading.schema.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/penilaian/refreshGrading/refreshGrading.schema.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/penilaian/refreshManyGrading/refreshManyGrading.action.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/penilaian/refreshManyGrading/refreshManyGrading.action.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/penilaian/refreshManyGrading/refreshManyGrading.schema.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/penilaian/refreshManyGrading/refreshManyGrading.schema.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/penilaian/sendScoreNotification/sendScoreNotification.action.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/penilaian/sendScoreNotification/sendScoreNotification.action.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/penilaian/sendScoreNotification/sendScoreNotification.schema.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/penilaian/sendScoreNotification/sendScoreNotification.schema.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/prepareExperience/prepareExperience.action.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/prepareExperience/prepareExperience.action.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/prepareExperience/prepareExperience.schema.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/prepareExperience/prepareExperience.schema.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/rasionalisasi/action.addManyGradingComponent.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/rasionalisasi/action.addManyGradingComponent.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/rasionalisasi/action.calculateGrading.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/rasionalisasi/action.calculateGrading.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/rasionalisasi/action.calculateManyComparator.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/rasionalisasi/action.calculateManyComparator.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/rasionalisasi/action.calculateOneComparator.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/rasionalisasi/action.calculateOneComparator.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/rasionalisasi/action.clearAllOverrides.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/rasionalisasi/action.clearAllOverrides.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/rasionalisasi/action.clearGrading.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/rasionalisasi/action.clearGrading.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/rasionalisasi/action.clearOneOverrides.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/rasionalisasi/action.clearOneOverrides.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/rasionalisasi/action.createGradingAndScores.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/rasionalisasi/action.createGradingAndScores.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/rasionalisasi/action.generateGrading.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/rasionalisasi/action.generateGrading.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/rasionalisasi/action.rasionalizeGrading.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/rasionalisasi/action.rasionalizeGrading.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/rasionalisasi/action.updateGradingAndScores.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/rasionalisasi/action.updateGradingAndScores.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/refreshModuleAccess/refreshModuleAccess.action.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/refreshModuleAccess/refreshModuleAccess.action.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/refreshModuleAccess/refreshModuleAccess.schema.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/refreshModuleAccess/refreshModuleAccess.schema.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/replaceModuleAccess/replaceModuleAccess.action.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/replaceModuleAccess/replaceModuleAccess.action.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/replaceModuleAccess/replaceModuleAccess.schema.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/replaceModuleAccess/replaceModuleAccess.schema.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/replaceModuleAccessManyStudent/replaceModuleAccessManyStudent.action.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/replaceModuleAccessManyStudent/replaceModuleAccessManyStudent.action.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/replaceModuleAccessManyStudent/replaceModuleAccessManyStudent.schema.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/replaceModuleAccessManyStudent/replaceModuleAccessManyStudent.schema.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/tanya/action.acceptQuestion.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/tanya/action.acceptQuestion.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/tanya/action.editAnswer.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/tanya/action.editAnswer.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/tanya/action.getQuestionCount.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/tanya/action.getQuestionCount.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/tanya/action.hasUnderstand.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/tanya/action.hasUnderstand.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/tanya/action.notUnderstand.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/tanya/action.notUnderstand.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/tanya/action.reminderQuestions.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/tanya/action.reminderQuestions.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/tanya/action.sendAnswer.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/tanya/action.sendAnswer.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/tanya/action.sendQuestion.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/tanya/action.sendQuestion.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/updateMany/updateMany.action.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/updateMany/updateMany.action.mjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/updateMany/updateMany.schema.cjs +0 -0
- /package/build/{actions → @packages/pendidikan-operation/@package/actions}/updateMany/updateMany.schema.mjs +0 -0
- /package/build/{constants.cjs → @packages/pendidikan-operation/@package/constants.cjs} +0 -0
- /package/build/{constants.mjs → @packages/pendidikan-operation/@package/constants.mjs} +0 -0
- /package/build/{hooks → @packages/pendidikan-operation/@package/hooks}/hook.officePendidikan.cjs +0 -0
- /package/build/{hooks → @packages/pendidikan-operation/@package/hooks}/hook.officePendidikan.mjs +0 -0
- /package/build/{providers → @packages/pendidikan-operation/@package/providers}/data/useImportData.cjs +0 -0
- /package/build/{providers → @packages/pendidikan-operation/@package/providers}/data/useImportData.mjs +0 -0
- /package/build/{providers → @packages/pendidikan-operation/@package/providers}/jadwal/useJadwal.cjs +0 -0
- /package/build/{providers → @packages/pendidikan-operation/@package/providers}/jadwal/useJadwal.mjs +0 -0
- /package/build/{providers → @packages/pendidikan-operation/@package/providers}/mediaScanter/useMediaScanter.cjs +0 -0
- /package/build/{providers → @packages/pendidikan-operation/@package/providers}/mediaScanter/useMediaScanter.mjs +0 -0
- /package/build/{providers → @packages/pendidikan-operation/@package/providers}/penilaian/usePenilaian.cjs +0 -0
- /package/build/{providers → @packages/pendidikan-operation/@package/providers}/penilaian/usePenilaian.mjs +0 -0
- /package/build/{providers → @packages/pendidikan-operation/@package/providers}/useNotif.cjs +0 -0
- /package/build/{providers → @packages/pendidikan-operation/@package/providers}/useNotif.mjs +0 -0
- /package/build/{providers → @packages/pendidikan-operation/@package/providers}/useSync.cjs +0 -0
- /package/build/{providers → @packages/pendidikan-operation/@package/providers}/useSync.mjs +0 -0
- /package/build/{providers → @packages/pendidikan-operation/@package/providers}/useTelemetry.cjs +0 -0
- /package/build/{providers → @packages/pendidikan-operation/@package/providers}/useTelemetry.mjs +0 -0
- /package/build/{utils → @packages/pendidikan-operation/@package/utils}/util.logger.cjs +0 -0
- /package/build/{utils → @packages/pendidikan-operation/@package/utils}/util.logger.mjs +0 -0
- /package/build/{utils → @packages/pendidikan-operation/@package/utils}/util.number.cjs +0 -0
- /package/build/{utils → @packages/pendidikan-operation/@package/utils}/util.number.mjs +0 -0
- /package/build/{utils → @packages/pendidikan-operation/@package/utils}/util.score.cjs +0 -0
- /package/build/{utils → @packages/pendidikan-operation/@package/utils}/util.score.mjs +0 -0
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const core = require('@neon.id/core');
|
|
4
|
+
const operation = require('@neon.id/operation');
|
|
5
|
+
const utils = require('@neon.id/utils');
|
|
6
|
+
const useAkademik = require('../../providers/akademik/useAkademik.cjs');
|
|
7
|
+
const query = require('@neon.id/query');
|
|
8
|
+
const giveModuleAccessByProgram_schema = require('./giveModuleAccessByProgram.schema.cjs');
|
|
9
|
+
const useTelemetry = require('../../providers/useTelemetry.cjs');
|
|
10
|
+
|
|
11
|
+
const giveModuleAccessByProgram = operation.Action.define({
|
|
12
|
+
key: "giveModuleAccessByProgram",
|
|
13
|
+
name: "Refresh Module Access",
|
|
14
|
+
type: "command",
|
|
15
|
+
category: "domain",
|
|
16
|
+
execute: async (input, stream) => {
|
|
17
|
+
if (!stream)
|
|
18
|
+
throw core.Result.fail("streamRequired");
|
|
19
|
+
const { validate } = operation.useValidation(stream, giveModuleAccessByProgram_schema.GiveModuleAccessByProgramSchema);
|
|
20
|
+
const { getManyModules, getManyStudentProgram, setGerbangAccess, deleteGerbangAccess } = useAkademik.useAkademik(stream);
|
|
21
|
+
const data = validate(input);
|
|
22
|
+
const dbs = stream.core.dbs;
|
|
23
|
+
const dbStudentProgram = dbs["neu-akademik"].models["neu:akademik:studentProgram"];
|
|
24
|
+
return useTelemetry.useTelemetry(
|
|
25
|
+
stream,
|
|
26
|
+
"giveModuleAccessByProgram",
|
|
27
|
+
{
|
|
28
|
+
userId: stream?.context?.identitas?.userId,
|
|
29
|
+
data
|
|
30
|
+
},
|
|
31
|
+
async () => {
|
|
32
|
+
try {
|
|
33
|
+
const { items: studentPrograms } = await getManyStudentProgram({
|
|
34
|
+
query: query.Query.define({
|
|
35
|
+
filter: { _id: { $in: data.studentProgramIds } },
|
|
36
|
+
fields: {
|
|
37
|
+
id: 1,
|
|
38
|
+
paymentStatus: 1,
|
|
39
|
+
startedAt: 1,
|
|
40
|
+
endedAt: 1,
|
|
41
|
+
virtualCourseCollection: {
|
|
42
|
+
id: 1,
|
|
43
|
+
name: 1,
|
|
44
|
+
neutronModules: { id: 1 }
|
|
45
|
+
},
|
|
46
|
+
studentId: 1,
|
|
47
|
+
student: { id: 1, email: 1, userId: 1 }
|
|
48
|
+
}
|
|
49
|
+
})
|
|
50
|
+
});
|
|
51
|
+
const now = Date.now();
|
|
52
|
+
for (const sp of studentPrograms) {
|
|
53
|
+
utils.guard(sp, "studentProgramNotFound");
|
|
54
|
+
utils.guard(sp.paymentStatus === "paid", "studentProgramIsNotPaid");
|
|
55
|
+
if (sp.startedAt && sp.endedAt) {
|
|
56
|
+
const startedAt = new Date(sp.startedAt).getTime();
|
|
57
|
+
const endedAt = new Date(sp.endedAt).getTime();
|
|
58
|
+
utils.guard(
|
|
59
|
+
now > startedAt || now < endedAt,
|
|
60
|
+
"studentProgramPeriodExpired"
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
const allModuleIds = [
|
|
65
|
+
...new Set(
|
|
66
|
+
studentPrograms.flatMap(
|
|
67
|
+
(sp) => sp.virtualCourseCollection?.flatMap(
|
|
68
|
+
(x) => x.neutronModules?.map((m) => m.id || "") || []
|
|
69
|
+
) || []
|
|
70
|
+
)
|
|
71
|
+
)
|
|
72
|
+
];
|
|
73
|
+
const userIds = studentPrograms.map((sp) => sp.student?.userId || "");
|
|
74
|
+
const deleteManyQuery = {
|
|
75
|
+
givenTo: { $in: userIds },
|
|
76
|
+
$and: [
|
|
77
|
+
{ "meta.moduleId": { $exists: true } },
|
|
78
|
+
{ "meta.moduleId": { $nin: allModuleIds } }
|
|
79
|
+
]
|
|
80
|
+
};
|
|
81
|
+
await deleteGerbangAccess(deleteManyQuery);
|
|
82
|
+
const { items: modules } = await getManyModules({
|
|
83
|
+
query: _prepareQueryModules({ moduleIds: allModuleIds })
|
|
84
|
+
});
|
|
85
|
+
utils.guard(modules?.length, "moduleNotFound");
|
|
86
|
+
const moduleMap = new Map(modules.map((m) => [m.id, m]));
|
|
87
|
+
const bulkOps = studentPrograms.flatMap(
|
|
88
|
+
(sp) => (sp.virtualCourseCollection ?? []).flatMap(
|
|
89
|
+
(vc) => (vc.neutronModules ?? []).flatMap((nm) => {
|
|
90
|
+
const module = moduleMap.get(nm.id);
|
|
91
|
+
if (!module)
|
|
92
|
+
return [];
|
|
93
|
+
const key = `neu:app:module:${module.id}`;
|
|
94
|
+
const statements = prepareStatements(
|
|
95
|
+
module.courseCollectionIds || []
|
|
96
|
+
);
|
|
97
|
+
return [
|
|
98
|
+
{
|
|
99
|
+
updateOne: {
|
|
100
|
+
filter: { key, givenTo: sp.student?.userId },
|
|
101
|
+
update: {
|
|
102
|
+
$set: {
|
|
103
|
+
key,
|
|
104
|
+
status: "active",
|
|
105
|
+
givenBy: data.staffId,
|
|
106
|
+
givenTo: sp.student?.userId,
|
|
107
|
+
applicationId: "61b41fc1db516fc9dcdc0eec",
|
|
108
|
+
statements,
|
|
109
|
+
startedAt: sp.startedAt,
|
|
110
|
+
endedAt: sp.endedAt,
|
|
111
|
+
meta: { moduleId: new core.ObjectId(module.id) },
|
|
112
|
+
version: "2022-07-21",
|
|
113
|
+
updatedAt: /* @__PURE__ */ new Date(),
|
|
114
|
+
updatedBy: data.staffId
|
|
115
|
+
},
|
|
116
|
+
$setOnInsert: {
|
|
117
|
+
createdAt: /* @__PURE__ */ new Date(),
|
|
118
|
+
createdBy: data.staffId
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
upsert: true
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
];
|
|
125
|
+
})
|
|
126
|
+
)
|
|
127
|
+
);
|
|
128
|
+
await setGerbangAccess(bulkOps);
|
|
129
|
+
const allKeys = modules.map((m) => `neu:app:module:${m.id}`);
|
|
130
|
+
await stream.actions.data.syncMany.execute(
|
|
131
|
+
{
|
|
132
|
+
model: "neo:gerbang:access",
|
|
133
|
+
useDry: false,
|
|
134
|
+
query: query.Query.define({
|
|
135
|
+
filter: { key: { $in: allKeys }, givenTo: { $in: userIds } }
|
|
136
|
+
})
|
|
137
|
+
},
|
|
138
|
+
stream
|
|
139
|
+
);
|
|
140
|
+
await dbStudentProgram.updateMany(
|
|
141
|
+
{ _id: { $in: data.studentProgramIds } },
|
|
142
|
+
{ $set: { givenAt: /* @__PURE__ */ new Date() } }
|
|
143
|
+
);
|
|
144
|
+
await stream.actions.data.syncMany.execute(
|
|
145
|
+
{
|
|
146
|
+
model: "neu:akademik:studentProgram",
|
|
147
|
+
useDry: false,
|
|
148
|
+
query: query.Query.define({
|
|
149
|
+
filter: { _id: { $in: data.studentProgramIds } },
|
|
150
|
+
fields: { id: 1 }
|
|
151
|
+
})
|
|
152
|
+
},
|
|
153
|
+
stream
|
|
154
|
+
);
|
|
155
|
+
return core.Result.ok({
|
|
156
|
+
state: "moduleRefreshed",
|
|
157
|
+
message: "Module refreshed.",
|
|
158
|
+
data: {}
|
|
159
|
+
});
|
|
160
|
+
} catch (error) {
|
|
161
|
+
if (error?.isFailure)
|
|
162
|
+
throw error;
|
|
163
|
+
console.error(error);
|
|
164
|
+
return core.Result.fail({
|
|
165
|
+
state: `giveModuleAccessByProgramFailed`,
|
|
166
|
+
message: `Failed to set module.`,
|
|
167
|
+
error: error?.toString()
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
);
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
function _prepareQueryModules(input) {
|
|
175
|
+
return query.Query.define({
|
|
176
|
+
filter: {
|
|
177
|
+
_id: { $in: input.moduleIds }
|
|
178
|
+
},
|
|
179
|
+
fields: {
|
|
180
|
+
id: 1,
|
|
181
|
+
name: 1,
|
|
182
|
+
code: 1,
|
|
183
|
+
status: 1,
|
|
184
|
+
startedAt: 1,
|
|
185
|
+
endedAt: 1,
|
|
186
|
+
courseCollectionIds: 1
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
function prepareStatements(ids) {
|
|
191
|
+
return ids.map((id) => {
|
|
192
|
+
return {
|
|
193
|
+
effect: "allow",
|
|
194
|
+
action: "neo:belajar:learnCourse",
|
|
195
|
+
object: `neo:belajar:courseCollection:${id}`
|
|
196
|
+
};
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
exports.giveModuleAccessByProgram = giveModuleAccessByProgram;
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { Result, ObjectId } from '@neon.id/core';
|
|
2
|
+
import { Action, useValidation } from '@neon.id/operation';
|
|
3
|
+
import { guard } from '@neon.id/utils';
|
|
4
|
+
import { useAkademik } from '../../providers/akademik/useAkademik.mjs';
|
|
5
|
+
import { Query } from '@neon.id/query';
|
|
6
|
+
import { GiveModuleAccessByProgramSchema } from './giveModuleAccessByProgram.schema.mjs';
|
|
7
|
+
import { useTelemetry } from '../../providers/useTelemetry.mjs';
|
|
8
|
+
|
|
9
|
+
const giveModuleAccessByProgram = Action.define({
|
|
10
|
+
key: "giveModuleAccessByProgram",
|
|
11
|
+
name: "Refresh Module Access",
|
|
12
|
+
type: "command",
|
|
13
|
+
category: "domain",
|
|
14
|
+
execute: async (input, stream) => {
|
|
15
|
+
if (!stream)
|
|
16
|
+
throw Result.fail("streamRequired");
|
|
17
|
+
const { validate } = useValidation(stream, GiveModuleAccessByProgramSchema);
|
|
18
|
+
const { getManyModules, getManyStudentProgram, setGerbangAccess, deleteGerbangAccess } = useAkademik(stream);
|
|
19
|
+
const data = validate(input);
|
|
20
|
+
const dbs = stream.core.dbs;
|
|
21
|
+
const dbStudentProgram = dbs["neu-akademik"].models["neu:akademik:studentProgram"];
|
|
22
|
+
return useTelemetry(
|
|
23
|
+
stream,
|
|
24
|
+
"giveModuleAccessByProgram",
|
|
25
|
+
{
|
|
26
|
+
userId: stream?.context?.identitas?.userId,
|
|
27
|
+
data
|
|
28
|
+
},
|
|
29
|
+
async () => {
|
|
30
|
+
try {
|
|
31
|
+
const { items: studentPrograms } = await getManyStudentProgram({
|
|
32
|
+
query: Query.define({
|
|
33
|
+
filter: { _id: { $in: data.studentProgramIds } },
|
|
34
|
+
fields: {
|
|
35
|
+
id: 1,
|
|
36
|
+
paymentStatus: 1,
|
|
37
|
+
startedAt: 1,
|
|
38
|
+
endedAt: 1,
|
|
39
|
+
virtualCourseCollection: {
|
|
40
|
+
id: 1,
|
|
41
|
+
name: 1,
|
|
42
|
+
neutronModules: { id: 1 }
|
|
43
|
+
},
|
|
44
|
+
studentId: 1,
|
|
45
|
+
student: { id: 1, email: 1, userId: 1 }
|
|
46
|
+
}
|
|
47
|
+
})
|
|
48
|
+
});
|
|
49
|
+
const now = Date.now();
|
|
50
|
+
for (const sp of studentPrograms) {
|
|
51
|
+
guard(sp, "studentProgramNotFound");
|
|
52
|
+
guard(sp.paymentStatus === "paid", "studentProgramIsNotPaid");
|
|
53
|
+
if (sp.startedAt && sp.endedAt) {
|
|
54
|
+
const startedAt = new Date(sp.startedAt).getTime();
|
|
55
|
+
const endedAt = new Date(sp.endedAt).getTime();
|
|
56
|
+
guard(
|
|
57
|
+
now > startedAt || now < endedAt,
|
|
58
|
+
"studentProgramPeriodExpired"
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
const allModuleIds = [
|
|
63
|
+
...new Set(
|
|
64
|
+
studentPrograms.flatMap(
|
|
65
|
+
(sp) => sp.virtualCourseCollection?.flatMap(
|
|
66
|
+
(x) => x.neutronModules?.map((m) => m.id || "") || []
|
|
67
|
+
) || []
|
|
68
|
+
)
|
|
69
|
+
)
|
|
70
|
+
];
|
|
71
|
+
const userIds = studentPrograms.map((sp) => sp.student?.userId || "");
|
|
72
|
+
const deleteManyQuery = {
|
|
73
|
+
givenTo: { $in: userIds },
|
|
74
|
+
$and: [
|
|
75
|
+
{ "meta.moduleId": { $exists: true } },
|
|
76
|
+
{ "meta.moduleId": { $nin: allModuleIds } }
|
|
77
|
+
]
|
|
78
|
+
};
|
|
79
|
+
await deleteGerbangAccess(deleteManyQuery);
|
|
80
|
+
const { items: modules } = await getManyModules({
|
|
81
|
+
query: _prepareQueryModules({ moduleIds: allModuleIds })
|
|
82
|
+
});
|
|
83
|
+
guard(modules?.length, "moduleNotFound");
|
|
84
|
+
const moduleMap = new Map(modules.map((m) => [m.id, m]));
|
|
85
|
+
const bulkOps = studentPrograms.flatMap(
|
|
86
|
+
(sp) => (sp.virtualCourseCollection ?? []).flatMap(
|
|
87
|
+
(vc) => (vc.neutronModules ?? []).flatMap((nm) => {
|
|
88
|
+
const module = moduleMap.get(nm.id);
|
|
89
|
+
if (!module)
|
|
90
|
+
return [];
|
|
91
|
+
const key = `neu:app:module:${module.id}`;
|
|
92
|
+
const statements = prepareStatements(
|
|
93
|
+
module.courseCollectionIds || []
|
|
94
|
+
);
|
|
95
|
+
return [
|
|
96
|
+
{
|
|
97
|
+
updateOne: {
|
|
98
|
+
filter: { key, givenTo: sp.student?.userId },
|
|
99
|
+
update: {
|
|
100
|
+
$set: {
|
|
101
|
+
key,
|
|
102
|
+
status: "active",
|
|
103
|
+
givenBy: data.staffId,
|
|
104
|
+
givenTo: sp.student?.userId,
|
|
105
|
+
applicationId: "61b41fc1db516fc9dcdc0eec",
|
|
106
|
+
statements,
|
|
107
|
+
startedAt: sp.startedAt,
|
|
108
|
+
endedAt: sp.endedAt,
|
|
109
|
+
meta: { moduleId: new ObjectId(module.id) },
|
|
110
|
+
version: "2022-07-21",
|
|
111
|
+
updatedAt: /* @__PURE__ */ new Date(),
|
|
112
|
+
updatedBy: data.staffId
|
|
113
|
+
},
|
|
114
|
+
$setOnInsert: {
|
|
115
|
+
createdAt: /* @__PURE__ */ new Date(),
|
|
116
|
+
createdBy: data.staffId
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
upsert: true
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
];
|
|
123
|
+
})
|
|
124
|
+
)
|
|
125
|
+
);
|
|
126
|
+
await setGerbangAccess(bulkOps);
|
|
127
|
+
const allKeys = modules.map((m) => `neu:app:module:${m.id}`);
|
|
128
|
+
await stream.actions.data.syncMany.execute(
|
|
129
|
+
{
|
|
130
|
+
model: "neo:gerbang:access",
|
|
131
|
+
useDry: false,
|
|
132
|
+
query: Query.define({
|
|
133
|
+
filter: { key: { $in: allKeys }, givenTo: { $in: userIds } }
|
|
134
|
+
})
|
|
135
|
+
},
|
|
136
|
+
stream
|
|
137
|
+
);
|
|
138
|
+
await dbStudentProgram.updateMany(
|
|
139
|
+
{ _id: { $in: data.studentProgramIds } },
|
|
140
|
+
{ $set: { givenAt: /* @__PURE__ */ new Date() } }
|
|
141
|
+
);
|
|
142
|
+
await stream.actions.data.syncMany.execute(
|
|
143
|
+
{
|
|
144
|
+
model: "neu:akademik:studentProgram",
|
|
145
|
+
useDry: false,
|
|
146
|
+
query: Query.define({
|
|
147
|
+
filter: { _id: { $in: data.studentProgramIds } },
|
|
148
|
+
fields: { id: 1 }
|
|
149
|
+
})
|
|
150
|
+
},
|
|
151
|
+
stream
|
|
152
|
+
);
|
|
153
|
+
return Result.ok({
|
|
154
|
+
state: "moduleRefreshed",
|
|
155
|
+
message: "Module refreshed.",
|
|
156
|
+
data: {}
|
|
157
|
+
});
|
|
158
|
+
} catch (error) {
|
|
159
|
+
if (error?.isFailure)
|
|
160
|
+
throw error;
|
|
161
|
+
console.error(error);
|
|
162
|
+
return Result.fail({
|
|
163
|
+
state: `giveModuleAccessByProgramFailed`,
|
|
164
|
+
message: `Failed to set module.`,
|
|
165
|
+
error: error?.toString()
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
);
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
function _prepareQueryModules(input) {
|
|
173
|
+
return Query.define({
|
|
174
|
+
filter: {
|
|
175
|
+
_id: { $in: input.moduleIds }
|
|
176
|
+
},
|
|
177
|
+
fields: {
|
|
178
|
+
id: 1,
|
|
179
|
+
name: 1,
|
|
180
|
+
code: 1,
|
|
181
|
+
status: 1,
|
|
182
|
+
startedAt: 1,
|
|
183
|
+
endedAt: 1,
|
|
184
|
+
courseCollectionIds: 1
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
function prepareStatements(ids) {
|
|
189
|
+
return ids.map((id) => {
|
|
190
|
+
return {
|
|
191
|
+
effect: "allow",
|
|
192
|
+
action: "neo:belajar:learnCourse",
|
|
193
|
+
object: `neo:belajar:courseCollection:${id}`
|
|
194
|
+
};
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
export { giveModuleAccessByProgram };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const z = require('@neon.id/z');
|
|
4
|
+
|
|
5
|
+
const GiveModuleAccessByProgramSchema = z.z.object({
|
|
6
|
+
studentProgramIds: z.z.array(z.z.objectId()).min(1).explain({
|
|
7
|
+
label: "Student Program IDs"
|
|
8
|
+
}),
|
|
9
|
+
staffId: z.z.string().optional().explain({
|
|
10
|
+
label: "Staff ID"
|
|
11
|
+
})
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
exports.GiveModuleAccessByProgramSchema = GiveModuleAccessByProgramSchema;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from '@neon.id/z';
|
|
2
|
+
|
|
3
|
+
const GiveModuleAccessByProgramSchema = z.object({
|
|
4
|
+
studentProgramIds: z.array(z.objectId()).min(1).explain({
|
|
5
|
+
label: "Student Program IDs"
|
|
6
|
+
}),
|
|
7
|
+
staffId: z.string().optional().explain({
|
|
8
|
+
label: "Staff ID"
|
|
9
|
+
})
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
export { GiveModuleAccessByProgramSchema };
|
|
@@ -21,20 +21,22 @@ function useAkademik(stream) {
|
|
|
21
21
|
getOneModule,
|
|
22
22
|
getManySubjects,
|
|
23
23
|
getManyTopics,
|
|
24
|
-
getManyStudents
|
|
24
|
+
getManyStudents,
|
|
25
|
+
getManyStudentProgram,
|
|
26
|
+
getOneStudentProgram
|
|
25
27
|
};
|
|
26
28
|
async function setGerbangAccess(operations) {
|
|
27
29
|
console.log(operations);
|
|
28
30
|
await dbGerbang.bulkWrite(operations);
|
|
29
31
|
}
|
|
30
32
|
async function updateGerbangAccess(key, updates) {
|
|
31
|
-
await dbGerbang.updateMany({ key }, { $set: updates });
|
|
33
|
+
return await dbGerbang.updateMany({ key }, { $set: updates });
|
|
32
34
|
}
|
|
33
35
|
async function deleteGerbangAccess(filter) {
|
|
34
36
|
await dbGerbang.deleteMany(filter);
|
|
35
37
|
}
|
|
36
38
|
async function syncGerbangAccess(key) {
|
|
37
|
-
await actions.syncMany.execute(
|
|
39
|
+
return await actions.syncMany.execute(
|
|
38
40
|
{
|
|
39
41
|
model: "neo:gerbang:access",
|
|
40
42
|
useDry: false,
|
|
@@ -90,7 +92,6 @@ function useAkademik(stream) {
|
|
|
90
92
|
return result.value;
|
|
91
93
|
}
|
|
92
94
|
async function getManyModules(input) {
|
|
93
|
-
console.log("fragment", input.fragment);
|
|
94
95
|
const result = await actions.getMany.execute(
|
|
95
96
|
{
|
|
96
97
|
model: "neu:akademik:module",
|
|
@@ -107,6 +108,54 @@ function useAkademik(stream) {
|
|
|
107
108
|
]);
|
|
108
109
|
return { items, meta };
|
|
109
110
|
}
|
|
111
|
+
async function getOneStudentProgram(stream2, studentProgramId) {
|
|
112
|
+
const result = await actions.getMany.execute(
|
|
113
|
+
{
|
|
114
|
+
model: "neu:akademik:studentProgram",
|
|
115
|
+
query: query.Query.define({
|
|
116
|
+
filter: {
|
|
117
|
+
_id: studentProgramId
|
|
118
|
+
},
|
|
119
|
+
fields: {
|
|
120
|
+
id: 1,
|
|
121
|
+
programId: 1,
|
|
122
|
+
paymentStatus: 1,
|
|
123
|
+
virtualCourseCollectionIds: 1,
|
|
124
|
+
startedAt: 1,
|
|
125
|
+
endedAt: 1,
|
|
126
|
+
virtualCourseCollection: {
|
|
127
|
+
id: 1,
|
|
128
|
+
name: 1,
|
|
129
|
+
neutronModules: {
|
|
130
|
+
id: 1
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
})
|
|
135
|
+
},
|
|
136
|
+
stream2
|
|
137
|
+
);
|
|
138
|
+
if (result.isFailure)
|
|
139
|
+
throw result;
|
|
140
|
+
return result.value[0];
|
|
141
|
+
}
|
|
142
|
+
async function getManyStudentProgram(input) {
|
|
143
|
+
const result = await actions.getMany.execute(
|
|
144
|
+
{
|
|
145
|
+
model: "neu:akademik:studentProgram",
|
|
146
|
+
query: input.query
|
|
147
|
+
},
|
|
148
|
+
stream
|
|
149
|
+
);
|
|
150
|
+
if (result.isFailure)
|
|
151
|
+
throw result;
|
|
152
|
+
const items = result.value;
|
|
153
|
+
const meta = value.ValueUtil.omitValues(result.payload.meta || {}, [
|
|
154
|
+
"model",
|
|
155
|
+
"query"
|
|
156
|
+
]);
|
|
157
|
+
return { items, meta };
|
|
158
|
+
}
|
|
110
159
|
async function getOneModule(stream2, id) {
|
|
111
160
|
const result = await actions.getMany.execute(
|
|
112
161
|
{
|
|
@@ -19,20 +19,22 @@ function useAkademik(stream) {
|
|
|
19
19
|
getOneModule,
|
|
20
20
|
getManySubjects,
|
|
21
21
|
getManyTopics,
|
|
22
|
-
getManyStudents
|
|
22
|
+
getManyStudents,
|
|
23
|
+
getManyStudentProgram,
|
|
24
|
+
getOneStudentProgram
|
|
23
25
|
};
|
|
24
26
|
async function setGerbangAccess(operations) {
|
|
25
27
|
console.log(operations);
|
|
26
28
|
await dbGerbang.bulkWrite(operations);
|
|
27
29
|
}
|
|
28
30
|
async function updateGerbangAccess(key, updates) {
|
|
29
|
-
await dbGerbang.updateMany({ key }, { $set: updates });
|
|
31
|
+
return await dbGerbang.updateMany({ key }, { $set: updates });
|
|
30
32
|
}
|
|
31
33
|
async function deleteGerbangAccess(filter) {
|
|
32
34
|
await dbGerbang.deleteMany(filter);
|
|
33
35
|
}
|
|
34
36
|
async function syncGerbangAccess(key) {
|
|
35
|
-
await actions.syncMany.execute(
|
|
37
|
+
return await actions.syncMany.execute(
|
|
36
38
|
{
|
|
37
39
|
model: "neo:gerbang:access",
|
|
38
40
|
useDry: false,
|
|
@@ -88,7 +90,6 @@ function useAkademik(stream) {
|
|
|
88
90
|
return result.value;
|
|
89
91
|
}
|
|
90
92
|
async function getManyModules(input) {
|
|
91
|
-
console.log("fragment", input.fragment);
|
|
92
93
|
const result = await actions.getMany.execute(
|
|
93
94
|
{
|
|
94
95
|
model: "neu:akademik:module",
|
|
@@ -105,6 +106,54 @@ function useAkademik(stream) {
|
|
|
105
106
|
]);
|
|
106
107
|
return { items, meta };
|
|
107
108
|
}
|
|
109
|
+
async function getOneStudentProgram(stream2, studentProgramId) {
|
|
110
|
+
const result = await actions.getMany.execute(
|
|
111
|
+
{
|
|
112
|
+
model: "neu:akademik:studentProgram",
|
|
113
|
+
query: Query.define({
|
|
114
|
+
filter: {
|
|
115
|
+
_id: studentProgramId
|
|
116
|
+
},
|
|
117
|
+
fields: {
|
|
118
|
+
id: 1,
|
|
119
|
+
programId: 1,
|
|
120
|
+
paymentStatus: 1,
|
|
121
|
+
virtualCourseCollectionIds: 1,
|
|
122
|
+
startedAt: 1,
|
|
123
|
+
endedAt: 1,
|
|
124
|
+
virtualCourseCollection: {
|
|
125
|
+
id: 1,
|
|
126
|
+
name: 1,
|
|
127
|
+
neutronModules: {
|
|
128
|
+
id: 1
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
})
|
|
133
|
+
},
|
|
134
|
+
stream2
|
|
135
|
+
);
|
|
136
|
+
if (result.isFailure)
|
|
137
|
+
throw result;
|
|
138
|
+
return result.value[0];
|
|
139
|
+
}
|
|
140
|
+
async function getManyStudentProgram(input) {
|
|
141
|
+
const result = await actions.getMany.execute(
|
|
142
|
+
{
|
|
143
|
+
model: "neu:akademik:studentProgram",
|
|
144
|
+
query: input.query
|
|
145
|
+
},
|
|
146
|
+
stream
|
|
147
|
+
);
|
|
148
|
+
if (result.isFailure)
|
|
149
|
+
throw result;
|
|
150
|
+
const items = result.value;
|
|
151
|
+
const meta = ValueUtil.omitValues(result.payload.meta || {}, [
|
|
152
|
+
"model",
|
|
153
|
+
"query"
|
|
154
|
+
]);
|
|
155
|
+
return { items, meta };
|
|
156
|
+
}
|
|
108
157
|
async function getOneModule(stream2, id) {
|
|
109
158
|
const result = await actions.getMany.execute(
|
|
110
159
|
{
|
|
@@ -7,7 +7,7 @@ export interface CheckStudentProgramExistanceOutput {
|
|
|
7
7
|
export interface CheckStudentProgramExistanceMeta {
|
|
8
8
|
}
|
|
9
9
|
export declare const checkStudentProgramExistance: Action<"checkStudentProgramExistance", {
|
|
10
|
-
studentId: string;
|
|
11
10
|
programId: string;
|
|
11
|
+
studentId: string;
|
|
12
12
|
}, CheckStudentProgramExistanceOutput, CheckStudentProgramExistanceMeta>;
|
|
13
13
|
export type CheckStudentProgramExistanceAction = typeof checkStudentProgramExistance;
|
|
@@ -3,9 +3,9 @@ export declare const CheckStudentProgramExistanceSchema: z.ZodObject<{
|
|
|
3
3
|
studentId: z.ZodString;
|
|
4
4
|
programId: z.ZodString;
|
|
5
5
|
}, "strip", z.ZodTypeAny, {
|
|
6
|
-
studentId: string;
|
|
7
6
|
programId: string;
|
|
8
|
-
}, {
|
|
9
7
|
studentId: string;
|
|
8
|
+
}, {
|
|
10
9
|
programId: string;
|
|
10
|
+
studentId: string;
|
|
11
11
|
}>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Action } from '@neon.id/operation';
|
|
2
|
+
import type { z } from '@neon.id/z';
|
|
3
|
+
import { DeleteStudentProgramSchema } from './deleteStudentProgram.schema';
|
|
4
|
+
export type DeleteStudentProgramInput = z.parse<typeof DeleteStudentProgramSchema>;
|
|
5
|
+
export interface DeleteStudentProgramOutput {
|
|
6
|
+
code: number;
|
|
7
|
+
}
|
|
8
|
+
export interface DeleteStudentProgramMeta {
|
|
9
|
+
}
|
|
10
|
+
export declare const deleteStudentProgram: Action<"deleteStudentProgram", {
|
|
11
|
+
studentProgramId: string;
|
|
12
|
+
}, DeleteStudentProgramOutput, DeleteStudentProgramMeta>;
|
|
13
|
+
export type DeleteStudentProgramAction = typeof deleteStudentProgram;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './deleteStudentProgram.action';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Action } from '@neon.id/operation';
|
|
2
|
+
import type { z } from '@neon.id/z';
|
|
3
|
+
import { ExportStudentProgramSchema } from './exportStudentProgram.schema';
|
|
4
|
+
export type ExportStudentProgramInput = z.parse<typeof ExportStudentProgramSchema>;
|
|
5
|
+
export interface ExportStudentProgramOutput {
|
|
6
|
+
url: string;
|
|
7
|
+
}
|
|
8
|
+
export interface ExportStudentProgramMeta {
|
|
9
|
+
}
|
|
10
|
+
export declare const exportStudentProgram: Action<"exportStudentProgram", {
|
|
11
|
+
branchIds?: string[] | undefined;
|
|
12
|
+
}, ExportStudentProgramOutput, ExportStudentProgramMeta>;
|
|
13
|
+
export type ExportStudentProgramAction = typeof exportStudentProgram;
|