1(this.webpackJsonpui=this.webpackJsonpui||[]).push([[0],{1071:function(e,t,n){"use strict";Array.prototype.distinct=function(){for(var e=[],t=0;t<this.length;t++)this.indexOf(this[t])<t&&e.push(this[t]);this.removeAll(e)},Array.prototype.pushAll=function(e){var t=this;e.forEach((function(e){return t.push(e)}))},Array.prototype.remove=function(e){return!!this.includes(e)&&(this.splice(this.indexOf(e),1),!0)},Array.prototype.removeAll=function(e){for(var t=0;t<e.length;){this.remove(e[t])||t++}}},1101:function(e,t){},1103:function(e,t){},1134:function(e,t){},1216:function(e,t){},1478:function(e,t,n){},1479:function(e,t,n){"use strict";n.r(t);var r,i,o=n(0),a=n(1),s=n.n(a),d=n(86),c=n.n(d),l=n(20),u=n(118),p=n(124),f=(n(217),n(26)),h=(n(54),n(150)),v=(n(262),n(746),n(281)),m=(n(520),n(44)),g=(n(115),n(47)),b=(n(521),n(51)),y=(n(99),n(8)),O=(n(21),n(14)),j=n(251),I=n(702),S=n(6),E=(n(30),n(60)),R=n.n(E),_=n(163),T=Object(_.a)(),C=n(284),x=function(){function e(){}return e.generate=function(e,t,n){var r=Object(u.g)(e,t);if(n){var i=C.stringify(n);i&&(r+="?"+i)}return r},e.generateFull=function(e,t,n){var r="/"==e.charAt(0)?"":"/";return location.protocol+"//"+location.host+r+this.generate(e,t,n)},e.generateDownload=function(t){return this.generateFull(e.FILE_DOWNLOAD,{id:t},{})},e.isMatch=function(e,t){var n=Object(u.h)(t,{path:e,exact:!0,strict:!1});return null!=n&&void 0!=n},e.BASE_ROUTE=$appPath&&$appPath.length>0?"/"+$appPath:"",e.HOME=e.BASE_ROUTE+"/",e.LOGIN=e.BASE_ROUTE+"/login",e.PROFILE=e.BASE_ROUTE+"/profile",e.REQUEST_RESET_PASSWORD=e.BASE_ROUTE+"/reset-password",e.RESET_PASSWORD_LINK=e.BASE_ROUTE+"/resetPassword",e.REGISTER=e.BASE_ROUTE+"/register",e.CONFIRM_EMAIL=e.BASE_ROUTE+"/confirmEmail",e.RESEND_CONFIRMATION_EMAIL=e.BASE_ROUTE+"/resend-confirmation-email",e.DASHBOARD=e.BASE_ROUTE+"/dashboard",e.CONFIGURATIONS=e.BASE_ROUTE+"/configuration",e.LOOKUP_CONFIGURATIONS=e.CONFIGURATIONS+"/lookups",e.POST_SECONDARY_HOME=e.BASE_ROUTE+"/postSecondary",e.ANNOUNCEMENTS=e.BASE_ROUTE+"/announcements",e.ANNOUNCEMENT_DETAILS=e.ANNOUNCEMENTS+"/:id",e.NEW_ANNOUNCEMENT=e.ANNOUNCEMENTS+"/new",e.APS_GENERAL_EDUCATION=e.CONFIGURATIONS+"/apsGeneralEducation",e.APS_GENERAL_EDUCATION_DETAILS=e.APS_GENERAL_EDUCATION+"/:id",e.NEW_APS_GENERAL_EDUCATION=e.APS_GENERAL_EDUCATION+"/new",e.AWARD_TYPE=e.CONFIGURATIONS+"/awardType",e.AWARD_TYPE_DETAILS=e.AWARD_TYPE+"/:id",e.NEW_AWARD_TYPE=e.AWARD_TYPE+"/new",e.CATEGORIES=e.CONFIGURATIONS+"/categories",e.CATEGORY_DETAILS=e.CATEGORIES+"/:id",e.NEW_CATEGORY=e.CATEGORIES+"/new",e.CHANGE_REQUESTS=e.BASE_ROUTE+"/changeRequests",e.CHANGE_REQUEST_DRAFT=e.CHANGE_REQUESTS+"/draft/:key",e.CHANGE_REQUEST_DRAFT_ID=e.CHANGE_REQUESTS+"/draft/:id",e.CHANGE_REQUEST_DETAILS=e.CHANGE_REQUESTS+"/details/:id",e.CHANGE_REQUEST_APPROVAL=e.CHANGE_REQUESTS+"/approval/:approvalId",e.CHANGE_REQUEST_APPROVAL_REDIRECT=e.CHANGE_REQUESTS+"/redirect/:approvalId",e.CHANGE_REQUEST_TYPE=e.CONFIGURATIONS+"/changeRequestType",e.CHANGE_REQUEST_TYPE_DETAILS=e.CHANGE_REQUEST_TYPE+"/details/:id",e.CONTACTS=e.BASE_ROUTE+"/contact",e.CONTACT_TYPE=e.BASE_ROUTE+"/contactType",e.CONTACT_TYPE_DETAILS=e.CONTACT_TYPE+"/:id",e.NEW_CONTACT_TYPE=e.CONTACT_TYPE+"/new",e.ADMINISTRATIVE_CHANGE_REQUEST_ENTRY=e.CHANGE_REQUESTS+"/ac/entry/new",e.EXISTING_ADMINISTRATIVE_CHANGE_REQUEST_ENTRY_1=e.CHANGE_REQUESTS+"/ac/entry/1/:id",e.EXISTING_ADMINISTRATIVE_CHANGE_REQUEST_ENTRY_2=e.CHANGE_REQUESTS+"/ac/entry/2/:id",e.EXISTING_ADMINISTRATIVE_CHANGE_REQUEST_ENTRY_REVIEW=e.CHANGE_REQUESTS+"/ac/entry/review/:id",e.EXISTING_ADMINISTRATIVE_CHANGE_REQUEST_ENTRY_SUBMITTED=e.CHANGE_REQUESTS+"/ac/entry/submitted/:id",e.NEW_DISCIPLINE_CHANGE_REQUEST_ENTRY=e.CHANGE_REQUESTS+"/nd/entry/new",e.EXISTING_NEW_DISCIPLINE_CHANGE_REQUEST_ENTRY_1=e.CHANGE_REQUESTS+"/nd/entry/1/:id",e.EXISTING_NEW_DISCIPLINE_CHANGE_REQUEST_ENTRY_2=e.CHANGE_REQUESTS+"/nd/entry/2/:id",e.EXISTING_NEW_DISCIPLINE_CHANGE_REQUEST_ENTRY_REVIEW=e.CHANGE_REQUESTS+"/nd/entry/review/:id",e.EXISTING_NEW_DISCIPLINE_CHANGE_REQUEST_ENTRY_SUBMITTED=e.CHANGE_REQUESTS+"/nd/entry/submitted/:id",e.NEW_COURSE_CHANGE_REQUEST_ENTRY=e.CHANGE_REQUESTS+"/nc/entry/new",e.EXISTING_NEW_COURSE_CHANGE_REQUEST_ENTRY_1=e.CHANGE_REQUESTS+"/nc/entry/1/:id",e.EXISTING_NEW_COURSE_CHANGE_REQUEST_ENTRY_2=e.CHANGE_REQUESTS+"/nc/entry/2/:id",e.EXISTING_NEW_COURSE_CHANGE_REQUEST_ENTRY_REVIEW=e.CHANGE_REQUESTS+"/nc/entry/review/:id",e.EXISTING_NEW_COURSE_CHANGE_REQUEST_ENTRY_SUBMITTED=e.CHANGE_REQUESTS+"/nc/entry/submitted/:id",e.COURSE_MODIFICATION_CHANGE_REQUEST_ENTRY=e.CHANGE_REQUESTS+"/cm/entry/new",e.EXISTING_COURSE_MODIFICATION_CHANGE_REQUEST_ENTRY_1=e.CHANGE_REQUESTS+"/cm/entry/1/:id",e.EXISTING_COURSE_MODIFICATION_CHANGE_REQUEST_ENTRY_2=e.CHANGE_REQUESTS+"/cm/entry/2/:id",e.EXISTING_COURSE_MODIFICATION_CHANGE_REQUEST_ENTRY_3=e.CHANGE_REQUESTS+"/cm/entry/3/:id",e.EXISTING_COURSE_MODIFICATION_CHANGE_REQUEST_ENTRY_REVIEW=e.CHANGE_REQUESTS+"/cm/entry/review/:id",e.EXISTING_COURSE_MODIFICATION_CHANGE_REQUEST_ENTRY_SUBMITTED=e.CHANGE_REQUESTS+"/cm/entry/submitted/:id",e.COURSE_DEACTIVATION_CHANGE_REQUEST_ENTRY=e.CHANGE_REQUESTS+"/cd/entry/new",e.EXISTING_COURSE_DEACTIVATION_CHANGE_REQUEST_ENTRY_1=e.CHANGE_REQUESTS+"/cd/entry/1/:id",e.EXISTING_COURSE_DEACTIVATION_CHANGE_REQUEST_ENTRY_2=e.CHANGE_REQUESTS+"/cd/entry/2/:id",e.EXISTING_COURSE_DEACTIVATION_CHANGE_REQUEST_ENTRY_REVIEW=e.CHANGE_REQUESTS+"/cd/entry/review/:id",e.EXISTING_COURSE_DEACTIVATION_CHANGE_REQUEST_ENTRY_SUBMITTED=e.CHANGE_REQUESTS+"/cd/entry/submitted/:id",e.NEW_NOTICE_OF_INTENT_CHANGE_REQUEST_ENTRY=e.CHANGE_REQUESTS+"/noi/entry/new",e.EXISTING_NOTICE_OF_INTENT_CHANGE_REQUEST_ENTRY_1=e.CHANGE_REQUESTS+"/noi/entry/1/:id",e.EXISTING_NOTICE_OF_INTENT_CHANGE_REQUEST_ENTRY_2=e.CHANGE_REQUESTS+"/noi/entry/2/:id",e.EXISTING_NOTICE_OF_INTENT_CHANGE_REQUEST_ENTRY_3=e.CHANGE_REQUESTS+"/noi/entry/3/:id",e.EXISTING_NOTICE_OF_INTENT_CHANGE_REQUEST_ENTRY_4
1=e.CHANGE_REQUESTS+"/noi/entry/4/:id",e.EXISTING_NOTICE_OF_INTENT_CHANGE_REQUEST_ENTRY_5=e.CHANGE_REQUESTS+"/noi/entry/5/:id",e.EXISTING_NOTICE_OF_INTENT_CHANGE_REQUEST_ENTRY_6=e.CHANGE_REQUESTS+"/noi/entry/6/:id",e.EXISTING_NOTICE_OF_INTENT_CHANGE_REQUEST_ENTRY_7=e.CHANGE_REQUESTS+"/noi/entry/7/:id",e.EXISTING_NOTICE_OF_INTENT_CHANGE_REQUEST_ENTRY_8=e.CHANGE_REQUESTS+"/noi/entry/8/:id",e.EXISTING_NOTICE_OF_INTENT_CHANGE_REQUEST_ENTRY_REVIEW=e.CHANGE_REQUESTS+"/noi/entry/review/:id",e.EXISTING_NOTICE_OF_INTENT_CHANGE_REQUEST_ENTRY_SUBMITTED=e.CHANGE_REQUESTS+"/noi/entry/submitted/:id",e.PROGRAM_DEACTIVATION_CHANGE_REQUEST_ENTRY=e.CHANGE_REQUESTS+"/pd/entry/new",e.EXISTING_PROGRAM_DEACTIVATION_CHANGE_REQUEST_ENTRY_1=e.CHANGE_REQUESTS+"/pd/entry/1/:id",e.EXISTING_PROGRAM_DEACTIVATION_CHANGE_REQUEST_ENTRY_2=e.CHANGE_REQUESTS+"/pd/entry/2/:id",e.EXISTING_PROGRAM_DEACTIVATION_CHANGE_REQUEST_ENTRY_REVIEW=e.CHANGE_REQUESTS+"/pd/entry/review/:id",e.EXISTING_PROGRAM_DEACTIVATION_CHANGE_REQUEST_ENTRY_SUBMITTED=e.CHANGE_REQUESTS+"/pd/entry/submitted/:id",e.NEW_PROGRAM_MODIFICATION_CHANGE_REQUEST_ENTRY=e.CHANGE_REQUESTS+"/pm/entry/new",e.EXISTING_PROGRAM_MODIFICATION_CHANGE_REQUEST_ENTRY_1=e.CHANGE_REQUESTS+"/pm/entry/1/:id",e.EXISTING_PROGRAM_MODIFICATION_CHANGE_REQUEST_ENTRY_2=e.CHANGE_REQUESTS+"/pm/entry/2/:id",e.EXISTING_PROGRAM_MODIFICATION_CHANGE_REQUEST_ENTRY_3=e.CHANGE_REQUESTS+"/pm/entry/3/:id/award/:awardId",e.EXISTING_PROGRAM_MODIFICATION_CHANGE_REQUEST_ENTRY_4
1=e.CHANGE_REQUESTS+"/pm/entry/4/:id/award/:awardId",e.EXISTING_PROGRAM_MODIFICATION_CHANGE_REQUEST_ENTRY_5=e.CHANGE_REQUESTS+"/pm/entry/5/:id",e.EXISTING_PROGRAM_MODIFICATION_CHANGE_REQUEST_ENTRY_6=e.CHANGE_REQUESTS+"/pm/entry/6/:id",e.EXISTING_PROGRAM_MODIFICATION_CHANGE_REQUEST_ENTRY_REVIEW=e.CHANGE_REQUESTS+"/pm/entry/review/:id",e.EXISTING_PROGRAM_MODIFICATION_CHANGE_REQUEST_ENTRY_SUBMITTED=e.CHANGE_REQUESTS+"/pm/entry/submitted/:id",e.NEW_PROGRAM_CHANGE_REQUEST_ENTRY=e.CHANGE_REQUESTS+"/np/entry/new",e.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_1=e.CHANGE_REQUESTS+"/np/entry/1/:id",e.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_2=e.CHANGE_REQUESTS+"/np/entry/2/:id",e.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_3=e.CHANGE_REQUESTS+"/np/entry/3/:id",e.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_4=e.CHANGE_REQUESTS+"/np/entry/4/:id",e.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_5=e.CHANGE_REQUESTS+"/np/entry/5/:id",e.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_6=e.CHANGE_REQUESTS+"/np/entry/6/:id",e.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_7=e.CHANGE_REQUESTS+"/np/entry/7/:id",e.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_8=e.CHANGE_REQUESTS+"/np/entry/8/:id",e.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_9=e.CHANGE_REQUESTS+"/np/entry/9/:id",e.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_10=e.CHANGE_REQUESTS+"/np/entry/10/:id/award/:awardId",e.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_11=e.CHANGE_REQUESTS+"/np/entry/11/:id/award/:awardId",e.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_12=e.CHANGE_REQUESTS+"/np/entry/12/:id",e.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_13=e.CHANGE_REQUESTS+"/np/entry/13/:id",e.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_14=e.CHANGE_REQUESTS+"/np/entry/14/:id",e.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_15=e.CHANGE_REQUESTS+"/np/entry/15/:id",e.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_REVIEW=e.CHANGE_REQUESTS+"/np/entry/review/:id",e.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_SUBMITTED=e.CHANGE_REQUESTS+"/np/entry/submitted/:id",e.SECONDARY_HOME=e.BASE_ROUTE+"/secondary",e.COURSES=e.BASE_ROUTE+"/courses",e.COURSE_DETAILS=e.COURSES+"/institutionCourse/:institutionCourseId",e.NEW_COURSE=e.COURSES+"/new",e.PROGRAMS=e.BASE_ROUTE+"/programs",e.PROGRAM_DETAILS=e.PROGRAMS+"/:id",e.INSTITUITION_COURSE_BLOCK_DETAILS=e.COURSES+"/block/:id",e.NEW_INSTITUITION_COURSE_BLOCK=e.COURSES+"/block/new",e.CREDIT_TYPES=e.CONFIGURATIONS+"/creditTypes",e.CREDIT_TYPE_DETAILS=e.CREDIT_TYPES+"/:id",e.NEW_CREDIT_TYPE=e.CREDIT_TYPES+"/new",e.DISCIPLINES=e.CONFIGURATIONS+"/disciplines",e.DISCIPLINE_DETAILS=e.DISCIPLINES+"/:id",e.NEW_DISCIPLINE=e.DISCIPLINES+"/new",e.DOCUMENTARCHIVES=e.BASE_ROUTE+"/documentArchives",e.INSTITUTIONS=e.BASE_ROUTE+"/institutions",e.INSTITUTION_DETAILS=e.INSTITUTIONS+"/:id",e.NEW_INSTITUTION=e.INSTITUTIONS+"/new",e.INSTITUTION_USERS="/:institutionId/users",e.INSTITUTION_USER_DETAILS=e.INSTITUTION_USERS+"/:userId",e.USER_INSTITUTION_DETAILS=e.BASE_ROUTE+"/users/:userId/institutions/:institutionId",e.COURSE_INSTITUTION_DETAILS=e.BASE_ROUTE+"/courses/:courseId/institutions/:institutionId/institutionCourse/:institutionCourseId",e.INSTITUTION_COURSE_DETAILS="/:institutionId/courses/:courseId/institutionCourse/:institutionCourseId",e.SINGLE_INSTITUTION_COURSE_DETAILS="/:institutionId/courses/:courseId/institutionCourseDetails",e.ADMIN_RESOURCES=e.BASE_ROUTE+"/adminResources",e.RESOURCES=e.BASE_ROUTE+"/resources",e.DOWNLOADS_SECTION=e.BASE_ROUTE+"/downloads",e.CONSULTANTS=e.BASE_ROUTE+"/consultants",e.PAST_ANNOUNCEMENTS=e.BASE_ROUTE+"/announcements",e.USERS=e.BASE_ROUTE+"/users",e.USER_DETAILS=e.USERS+"/:id",e.ADD_USER=e.USERS+"/new",e.AA_USER_IMPORT_TEMPLATE=e.BASE_ROUTE+"api/aaUsers/aaUserTemplate",e.USER_SETTINGS=e.BASE_ROUTE+"/userSettings",e.API_TOKEN_USERS=e.BASE_ROUTE+"/apiTokenUsers",e.API_TOKEN_USER_DETAILS=e.API_TOKEN_USERS+"/:id",e.ROLES=e.CONFIGURATIONS+"/roles",e.ROLE_DETAILS=e.ROLES+"/:id",e.NEW_ROLE=e.ROLES+"/new",e.TERMS=e.CONFIGURATIONS+"/terms",e.TERM_DETAILS=e.TERMS+"/:id",e.NEW_TERM=e.TERMS+"/new",e.THIRD_PARTY_CREDENTIAL_TYPES=e.CONFIGURATIONS+"/thirdPartyCredentialTypes",e.THIRD_PARTY_CREDENTIAL_TYPE_DETAILS=e.THIRD_PARTY_CREDENTIAL_TYPES+"/:id",e.NEW_THIRD_PARTY_CREDENTIAL_TYPE=e.THIRD_PARTY_CREDENTIAL_TYPES+"/new",e.RACIAL_ETHNIC_GROUPS=e.CONFIGURATIONS+"/racialEthnicGroups",e.RACIAL_ETHNIC_GROUP_DETAILS=e.RACIAL_ETHNIC_GROUPS+"/:id",e.NEW_RACIAL_ETHNIC_GROUP=e.RACIAL_ETHNIC_GROUPS+"/new",e.CIPS=e.CONFIGURATIONS+"/cips",e.CIP_DETAILS=e.CIPS+"/:id",e.NEW_CIP=e.CIPS+"/new",e.PROGRAM_CLASSIFICATION=e.CONFIGURATIONS+"/programClassification",e.PROGRAM_CLASSIFICATION_DETAILS=e.PROGRAM_CLASSIFICATION+"/:id",e.NEW_PROGRAM_CLASSIFICATION=e.PROGRAM_CLASSIFICATION+"/new",e.NOTICE_OF_INTENT_CHANGE_REQUEST_WORKFORCE_LINK=e.CONFIGURATIONS+"/noticeOfIntentChangeRequestWorkForceLink",e.EXT
1ERNAL_INSTITUTIONS=e.CONFIGURATIONS+"/externalInstitution",e.EXTERNAL_INSTITUTIONS_DETAILS=e.EXTERNAL_INSTITUTIONS+"/:id",e.NEW_EXTERNAL_INSTITUTIONS=e.EXTERNAL_INSTITUTIONS+"/new",e.GENDER=e.CONFIGURATIONS+"/gender",e.GENDER_DETAILS=e.GENDER+"/:id",e.NEW_GENDER=e.GENDER+"/new",e.GENERAL_EDUCATION=e.CONFIGURATIONS+"/generalEducation",e.GENERAL_EDUCATION_DETAILS=e.GENERAL_EDUCATION+"/:id",e.NEW_GENERAL_EDUCATION=e.GENERAL_EDUCATION+"/new",e.INSTRUCTIONAL_LEVEL=e.CONFIGURATIONS+"/instructionalLevel",e.INSTRUCTIONAL_LEVEL_DETAILS=e.INSTRUCTIONAL_LEVEL+"/:id",e.NEW_INSTRUCTIONAL_LEVEL=e.INSTRUCTIONAL_LEVEL+"/new",e.IOWA_VARIATION=e.CONFIGURATIONS+"/iowaVariation",e.IOWA_VARIATION_DETAILS=e.IOWA_VARIATION+"/:id",e.NEW_IOWA_VARIATION=e.IOWA_VARIATION+"/new",e.OBJECT_PURPOSE=e.CONFIGURATIONS+"/objectPurposes",e.OBJECT_PURPOSE_DETAILS=e.OBJECT_PURPOSE+"/:id",e.NEW_OBJECT_PURPOSE=e.OBJECT_PURPOSE+"/new",e.SPECIAL_EMPHASIS=e.CONFIGURATIONS+"/specialEmphases",e.SPECIAL_EMPHASIS_DETAILS=e.SPECIAL_EMPHASIS+"/:id",e.NEW_SPECIAL_EMPHASIS=e.SPECIAL_EMPHASIS+"/new",e.ACADEMIC_YEARS=e.BASE_ROUTE+"/academicYears",e.SELF_STUDIES_ACADEMIC_YEAR_DASHBOARD=e.ACADEMIC_YEARS+"/academicYear/:academicYearId",e.SERVICE_AREAS=e.BASE_ROUTE+"/:academicYearId/serviceAreas",e.ALL_SERVICE_AREAS=e.BASE_ROUTE+"/serviceAreas",e.NEW_SERVICE_AREA=e.BASE_ROUTE+"/serviceArea/new",e.SERVICE_AREA_DETAILS=e.BASE_ROUTE+"/serviceArea/:id",e.ACADEMIC_YEAR_SERVICE_AREAS_CONFIGURATION=e.SELF_STUDIES_ACADEMIC_YEAR_DASHBOARD+"/configuration/serviceAreas",e.DATA_REVIEW_SERVICE_AREAS=e.BASE_ROUTE+"/secondary/academicYears/:academicYearId/config/serviceAreas",e.SERVICE_AREA_CONFIGURATION=e.CONFIGURATIONS+"/secondary/serviceAreas",e.FEDERAL_CLUSTERS=e.BASE_ROUTE+"/:academicYearId/federalClusters",e.ACADEMIC_YEAR_FEDERAL_CLUSTERS_CONFIGURATION=e.SELF_STUDIES_ACADEMIC_YEAR_DASHBOARD+"/configuration/federalClusters",e.ALL_FEDERAL_CLUSTERS=e.BASE_ROUTE+"/federalClusters",e.NEW_FEDERAL_CLUSTER=e.BASE_ROUTE+"/federalCluster/new",e.FEDERAL_CLUSTER_DETAILS=e.BASE_ROUTE+"/federalCluster/:id",e.DATA_REVIEW_FEDERAL_CLUSTERS=e.BASE_ROUTE+"/secondary/academicYears/:academicYearId/config/federalClusters",e.FEDERAL_CLUSTERS_CONFIGURATION=e.CONFIGURATIONS+"/secondary/federalClusters",e.TRANSFER_MAJOR_LACTS_CATEGORY=e.CONFIGURATIONS+"/transferMajorLactsCategory",e.TRANSFER_MAJOR_LACTS_CATEGORY_DETAILS=e.TRANSFER_MAJOR_LACTS_CATEGORY+"/:id",e.NEW_TRANSFER_MAJOR_LACTS_CATEGORY=e.TRANSFER_MAJOR_LACTS_CATEGORY+"/new",e.TRANSFER_MAJOR_COURSE_BLOCK=e.CONFIGURATIONS+"/transferMajorCourseBlock",e.TRANSFER_MAJOR_COURSE_BLOCK_DETAILS=e.TRANSFER_MAJOR_COURSE_BLOCK+"/:id",e.NEW_TRANSFER_MAJOR_COURSE_BLOCK=e.TRANSFER_MAJOR_COURSE_BLOCK+"/new",e.TRANSFER_MAJOR_GENERAL_EDUCATION_TYPE=e.CONFIGURATIONS+"/TransferMajorGeneralEducationType",e.TRANSFER_MAJOR_GENERAL_EDUCATION_TYPE_DETAILS=e.TRANSFER_MAJOR_GENERAL_EDUCATION_TYPE+"/:id",e.NEW_TRANSFER_MAJOR_GENERAL_EDUCATION_TYPE=e.TRANSFER_MAJOR_GENERAL_EDUCATION_TYPE+"/new",e.TRANSFER_MAJOR_DISCIPLINE_FRAMEWORK_ELEMENT=e.CONFIGURATIONS+"/transferMajorDisciplineFrameworkElement",e.TRANSFER_MAJOR_DISCIPLINE_FRAMEWORK_ELEMENT_DETAILS=e.TRANSFER_MAJOR_DISCIPLINE_FRAMEWORK_ELEMENT+"/:id",e.NEW_TRANSFER_MAJOR_DISCIPLINE_FRAMEWORK_ELEMENT=e.TRANSFER_MAJOR_DISCIPLINE_FRAMEWORK_ELEMENT+"/new",e.TYPE_OF_PROGRAM=e.CONFIGURATIONS+"/typeOfProgram",e.TYPE_OF_PROGRAM_DETAILS=e.TYPE_OF_PROGRAM+"/:id",e.NEW_TYPE_OF_PROGRAM=e.TYPE_OF_PROGRAM+"/new",e.REGIONS=e.CONFIGURATIONS+"/rpp",e.REGION_DETAIL=e.REGIONS+"/:rppId",e.REGIONAL_PLANNING_PARTNERS=e.HOME+"secondary/rpp",e.NEW_REGIONAL_PLANNING_PARTNER_DETAIL=e.REGIONAL_PLANNING_PARTNERS+"/new",e.REGIONAL_PLANNING_PARTNER_DETAIL=e.REGIONAL_PLANNING_PARTNERS+"secondary/rpp/:id",e.DATA_REVIEW_REGIONAL_PLANNING_PARTNER="/secondary/academicYears/:academicYear/config/regions",e.ACADEMIC_YEAR_REGIONAL_PLANNING_PARTNER_CONFIGURATION=e.SELF_STUDIES_ACADEMIC_YEAR_DASHBOARD+"/configuration/RPP",e.WORK_ITEMS=e.BASE_ROUTE+"/workItems",e.WORK_BASED_LEARNING_TYPE=e.CONFIGURATIONS+"/workBasedLearningType",e.WORK_BASED_LEARNING_DETAILS=e.WORK_BASED_LEARNING_TYPE+"/:id",e.NEW_WORK_BASED_LEARNING_TYPE=e.WORK_BASED_LEARNING_TYPE+"/new",e.UNAUTHORIZED=e.BASE_ROUTE+"/u
1nauthorized",e.SECURITY_BASE=e.BASE_ROUTE+"/security",e.SECURITY_USERS=e.SECURITY_BASE+"/users",e.SECURITY_USER_DETAIL=e.SECURITY_USERS+"/:id",e.SECURITY_ROLEGROUPS=e.SECURITY_BASE+"/roleGroups",e.SECURITY_ROLEGROUP_DETAIL=e.SECURITY_ROLEGROUPS+"/:id",e.SELF_STUDIES_LIST=e.BASE_ROUTE+"/selfStudy/academicYears/:academicYearId/config/selfStudies",e.SELF_STUDIES_REVIEW=e.BASE_ROUTE+"/selfStudy/academicYears/:academicYearId/review/selfStudies",e.SELF_STUDIES_ACADEMIC_YEAR_LIST=e.BASE_ROUTE+"/academicYearList/academicYears/:academicYearId/config/selfStudies",e.SELF_STUDIES_DETAILS=e.BASE_ROUTE+"/secondary/selfStudy/:id",e.SELF_STUDIES_DISPLAY=e.BASE_ROUTE+"/secondary/selfStudyDisplay/:id",e.SELF_STUDIES_RESPONSE_DISPLAY=e.BASE_ROUTE+"/selfStudy/:selfStudyId/selfStudyResponseDisplay/:id",e.NEW_SELF_STUDY=e.BASE_ROUTE+"/selfStudy/new",e.COMPLETE_SELF_STUDIES=e.BASE_ROUTE+"/self-studies/config/academicYear/:academicYearId/selfStudyResponse/:selfStudyResponseId/sectionIndex/:sectionIndex",e.SELF_STUDIES_CONFIGURATION=e.BASE_ROUTE+"/self-studies-configuration/:academicYearId",e.NEW_ACADEMIC_YEAR=e.ACADEMIC_YEARS+"/new/:academicYearId",e.ALL_ACADEMIC_YEARS=e.ACADEMIC_YEARS+"/academicYearList",e.ACADEMIC_YEAR_DASHBOARD_FROM_LIST=e.ALL_ACADEMIC_YEARS+"/academicYear/:academicYearId",e.SELF_STUDIES_CONFIGURATION_FROM_LIST=e.ALL_ACADEMIC_YEARS+"/academicYear/self-studies-configuration/:academicYearId",e.NEW_ACADEMIC_YEAR_FROM_LIST=e.ALL_ACADEMIC_YEARS+"/academicYear-list/self-studies-configuration/:academicYearId",e.ACADEMIC_YEAR_SELF_STUDY_RANKING_REPORT=e.SELF_STUDIES_ACADEMIC_YEAR_DASHBOARD+"/report/selfStudyRanking",e.ACADEMIC_YEAR_PROGRAM_CONSULTANT_COMMENT_REPORT=e.SELF_STUDIES_ACADEMIC_YEAR_DASHBOARD+"/report/programConsultantComment",e.ACADEMIC_YEAR_SELF_STUDY_AGGREGATE_REPORT=e.SELF_STUDIES_ACADEMIC_YEAR_DASHBOARD+"/report/selfStudyAggregate",e.ACADEMIC_YEAR_CONFIGURATION=e.SELF_STUDIES_ACADEMIC_YEAR_DASHBOARD+"/configuration/academicYear",e.AREA_EDUCATION_AGENCIES=e.BASE_ROUTE+"/:academicYearId/area-education-agencies",e.ACADEMIC_YEAR_AREA_EDUCATION_AGENCIES_CONFIGURATION=e.SELF_STUDIES_ACADEMIC_YEAR_DASHBOARD+"/configuration/area-education-agencies",e.ALL_AREA_EDUCATION_AGENCIES=e.BASE_ROUTE+"/area-education-agencies",e.NEW_AREA_EDUCATION_AGENCY=e.BASE_ROUTE+"/area-education-agency/new",e.AREA_EDUCATION_AGENCY_DETAILS=e.BASE_ROUTE+"/area-education-agency/:id",e.REVIEW_AREA_EDUCATION_AGENCY=e.BASE_ROUTE+"/academicYears/open/areaEducationAgency/:academicYearId",e.DATA_REVIEW_AREA_EDUCATION_AGENCY=e.BASE_ROUTE+"/secondary/academicYears/:academicYearId/config/areaEducationAgency",e.AREA_EDUCATION_AGENCIES_CONFIGURATION=e.CONFIGURATIONS+"/secondary/area-education-agencies",e.ACADEMIC_YEAR_CONTACTS_REPORT=e.BASE_ROUTE+"/academicYears/:academicYearId/reports/contactsReport",e.ACADEMIC_YEAR_CAREER_ACADEMY_REPORT=e.BASE_ROUTE+"/academicYears/:academicYearId/reports/careerAcademyReport",e.ACADEMIC_YEAR_ACTION_PLAN_REPORT=e.BASE_ROUTE+"/academicYears/:academicYearId/reports/actionPlanReport",e.ACADEMIC_YEAR_SCENARIO_REPORT=e.BASE_ROUTE+"/academicYears/:academicYearId/reports/scenarioReport",e.ACADEMIC_YEAR_PROGRAM_MASTER_REPORT=e.BASE_ROUTE+"/academicYears/:academicYearId/reports/programMasterReport",e.ACADEMIC_YEAR_EDUCATION_PROGRAM_REPORT=e.BASE_ROUTE+"/academicYears/:academicYearId/reports/educationProgramReport",e.DISTRICTS=e.BASE_ROUTE+"/selfStudy/academicYears/:academicYearId/config/districts",e.DISTRICTS_ACADEMIC_YEAR_LIST=e.BASE_ROUTE+"/academicYearList/academicYears/:academicYearId/config/districts",e.PUBLIC_DISTRICTS=e.BASE_ROUTE+"/secondary/districts",e.ALL_DISTRICTS=e.BASE_ROUTE+"/districts",e.NEW_DISTRICT=e.BASE_ROUTE+"/district/new",e.DISTRICT_DETAILS=e.BASE_ROUTE+"/secondary/district/:id",e.DATA_REVIEW_DISTRICTS=e.BASE_ROUTE+"/secondary/academicYears/:academicYearId/config/districts",e.DATA_REVIEW_DISTRICT_CONTACTS=e.BASE_ROUTE+"/secondary/academicYears/:academicYearId/config/districtContacts",e.DISTRICT_IMPORT_TEMPLATE=e.BASE_ROUTE+"api/districts/districtTemplate",e.DISTRICT_CONTACT_IMPORT_TEMPLATE=e.BASE_ROUTE+"api/districts/districtContactTemplate",e.ACADEMIC_YEAR_DISTRICT_CONFIGURATION=e.SELF_STUDIES_ACADEMIC_YEAR_DASHBOARD+"/configuration/district",e.ACADEMIC_YEAR_DISTRICT_CONTACT_CONFIGURATION=e.SELF_STUDIES_ACADEMIC_YEAR_DASHBOARD+"/configuration/districtContact",e.SECONDARY_PROGRAM_TYPES=e.BASE_ROUTE+"/:academicYearId/SecondaryProgramScenario",e.ALL_SECONDARY_PROGRAM_TYPES=e.BASE_ROUTE+"/SecondaryProgramScenarios",e.NEW_SECONDARY_PROGRAM_TYPE=e.BASE_ROUTE+"/SecondaryProgramScenario/new",e.SECONDARY_PROGRAM_TYPE_DETAILS=e.BASE_ROUTE+"/SecondaryProgramScenario/:id",e.DATA_REVIEW_SECONDARY_PROGRAM_TYPES=e.BASE_ROUTE+"/secondary/
1academicYears/:academicYearId/config/programTypes",e.SCENARIO_CONFIGURATION=e.CONFIGURATIONS+"/secondary/scenario",e.ACADEMIC_YEAR_SCENARIOS_CONFIGURATION=e.SELF_STUDIES_ACADEMIC_YEAR_DASHBOARD+"/configuration/scenarios",e.SECONDARY_PROGRAMS=e.BASE_ROUTE+"/selfStudy/academicYears/:academicYearId/config/programs",e.PUBLIC_PROGRAMS=e.BASE_ROUTE+"/secondary/programs",e.SECONDARY_PROGRAMS_ACADEMIC_YEAR_LIST=e.BASE_ROUTE+"/academicYearList/academicYears/:academicYearId/config/programs",e.ALL_SECONDARY_PROGRAMS=e.BASE_ROUTE+"/secondary/programs",e.NEW_SECONDARY_PROGRAM=e.BASE_ROUTE+"/secondaryProgram/new",e.SECONDARY_PROGRAM_DETAILS=e.BASE_ROUTE+"/secondary/programs/:id",e.DATA_REVIEW_SECONDARY_PROGRAMS=e.BASE_ROUTE+"/secondary/academicYears/:academicYearId/config/programs",e.SECONDARY_PROGRAM_IMPORT_TEMPLATE=e.BASE_ROUTE+"api/secondaryPrograms/secondaryProgramTemplate",e.ACADEMIC_YEAR_SECONDARY_PROGRAM_CONFIGURATION=e.SELF_STUDIES_ACADEMIC_YEAR_DASHBOARD+"/configuration/secondaryProgram",e.SECONDARY_CIP_NUMBERS=e.ACADEMIC_YEARS+"/secondary/:academicYearId/cip",e.SECONDARY_CIP_NUMBERS_CONFIGURATION=e.CONFIGURATIONS+"/secondary/cip",e.ALL_SECONDARY_CIP_NUMBERS=e.ACADEMIC_YEAR_DASHBOARD_FROM_LIST+"/secondary/cip",e.NEW_SECONDARY_CIP_NUMBER=e.ACADEMIC_YEARS+"/secondaryCipNumber/new",e.SECONDARY_CIP_NUMBER_DETAILS=e.ACADEMIC_YEARS+"/secondary/cip/:id",e.DATA_REVIEW_SECONDARY_CIP_NUMBERS=e.BASE_ROUTE+"/secondary/academicYears/:academicYearId/config/cipNumbers",e.SECONDARY_CIP_NUMBER_IMPORT_TEMPLATE=e.BASE_ROUTE+"api/secondaryCipNumbers/secondaryCipNumberTemplate",e.ACADEMIC_YEAR_SECONDARY_CIP_NUMBER_CONFIGURATION=e.SELF_STUDIES_ACADEMIC_YEAR_DASHBOARD+"/configuration/secondaryCipNumber",e.SECONDARY_COURSES=e.BASE_ROUTE+"/selfStudy/academicYears/:academicYearId/config/secondaryCourses",e.SECONDARY_COURSES_ACADEMIC_YEAR_LIST=e.BASE_ROUTE+"/academicYearList/academicYears/:academicYearId/config/secondaryCourses",e.ALL_SECONDARY_COURSES=e.BASE_ROUTE+"/secondary/courses",e.NEW_SECONDARY_COURSE=e.BASE_ROUTE+"/secondaryCourse/new",e.SECONDARY_COURSE_DETAILS=e.BASE_ROUTE+"/secondary/courses/:id",e.DATA_REVIEW_SECONDARY_COURSES=e.BASE_ROUTE+"/secondary/academicYears/:academicYearId/config/courses",e.SECONDARY_COURSE_IMPORT_TEMPLATE=e.BASE_ROUTE+"api/secondaryCourses/secondaryCourseTemplate",e.ACADEMIC_YEAR_SECONDARY_COURSES_CONFIGURATION=e.SELF_STUDIES_ACADEMIC_YEAR_DASHBOARD+"/configuration/secondaryCourses",e.SECONDARY_PROGRAM_COURSES=e.BASE_ROUTE+"/secondary/:academicYearId/programCourses",e.ALL_SECONDARY_PROGRAM_COURSES=e.BASE_ROUTE+"/secondary/programCourses",e.DATA_REVIEW_SECONDARY_PROGRAM_COURSES=e.BASE_ROUTE+"/secondary/academicYears/:academicYearId/config/programCourses",e.SECONDARY_PROGRAM_COURSES_IMPORT_TEMPLATE=e.BASE_ROUTE+"api/secondaryProgramCourses/secondaryProgramCourseTemplate",e.ACADEMIC_YEAR_SECONDARY_PROGRAM_COURSES_CONFIGURATION=e.SELF_STUDIES_ACADEMIC_YEAR_DASHBOARD+"/configuration/secondaryProgramCourses",e.GROUPS_BASE=e.BASE_ROUTE+"/groups",e.GROUP_DETAILS=e.GROUPS_BASE+"/edit/:id",e.FILE_DOWNLOAD=e.BASE_ROUTE+"api/files/file/:id",e.COURSE_SYLLABUS=e.BASE_ROUTE+"api/courses/courseSyllabus/:institutionCourseDetailId",e.PROGRAM_DETAILED_COURSE_LISTING=e.BASE_ROUTE+"api/program/programDetailedCourseListing/:programDetailId",e.PROGRAM_COMPARISON_REPORT=e.BASE_ROUTE+"api/ProgramModificationChangeRequests/programComparisonReport/:changeRequestId",e.SIDE_BY_SIDE_REPORT=e.BASE_ROUTE+"api/ProgramModificationChangeRequests/programSideBySideComparisonReport/:changeRequestId",e.DRAFT_AS28_REPORT=e.BASE_ROUTE+"api/NewProgramChangeRequests/draftAS28Report/:changeRequestId",e.PREVIOUS_PROGRAM_CURRICULUM_REPORT=e.BASE_ROUTE+"api/ProgramModificationChangeRequests/previousProgramCurriculumReport/:programDetailId",e.COMPLIANCE_REPORT=e.BASE_ROUTE+"api/program/complianceReport",e.NOTICE_OF_INTENT_REPORT=e.BASE_ROUTE+"api/downloads/noiReport",e.NOTICE_OF_INTENT_ICCPHSE_REPORT=e.BASE_ROUTE+"api/downloads/noiICCPHSEReport",e.PROGRAM_REPORT=e.BASE_ROUTE+"api/downloads/programReport",e.NEW_PROGRAM_PROPOSAL=e.BASE_ROUTE+"api/downloads/newProgramProposal",e.LABOR_MARKET_INFO_REPORT=e.BASE_ROUTE+"api/downloads/laborMarketInformationReport",e.COMMON_COURSE_NUMBERING_REPORT=e.BASE_ROUTE+"api/courses/ccn",e.USER_CIP_NUMBER_ASSIGNMENT=e.BASE_ROUTE+"api/users/consultantCipNumberAssignment",e.INSTITUTION_COURSE_BLOCK_REPORT=e.BASE_ROUTE+"api/institutionCourseBlocks/courseBlockReport",e.COURSE_ATTACHED_REPORT=e.BASE_ROUTE+"api/courses/courseAttachedReport",e.CHANGE_REQUEST_APPROVAL_FLOW_REPORT=e.BASE_ROUTE+"api/changeRequestsApprovalWorkFlow/changeRequestApprovalWorkFlowReport",e.PROGRAM_MASTER_REPORT=e.BASE_ROUTE+"api/downloads/programMasterReport",e.EXPORT_EPR=e.BASE_ROUTE+"api/downloads/exportEPR",e.BULK_COURSE_TEMPLATE=e.BASE_ROUTE+"api/changeRequests/coursesTemplate",e.SELF_STUDY_RANKING_REPORT=e.BASE_ROUTE+"api/selfStudies/selfStudyRankingExport",e.PROGRAM_CONSULTANT_COMMENTS=e.BASE_ROUTE+"api/selfStudies/programConsultantCommentsExport",e.SELF_STUDY_ACTION_PLAN_REPORT=e.BASE_ROUTE+"api/selfStudies/actionPlanReportExport",e.SELF_STUDY_AGGREGATE_REPORT=e.BASE_ROUTE+"api/selfStudies/selfStudyAggregateExport",e.SELF_STUDY_PROGRAM_MASTER_REPORT=e.BASE_ROUTE+"api/selfStudies/programMasterReportExport",e.SELF_STUDY_EDUCATION_PROGRAM_REPORT=e.BASE_ROUTE+"api/selfStudies/educationProgramReportExport",e}();!function(e){e.VERSION_CHECK="VERSION_CHECK",e.VERSION_OUTDATED="VERSION_OUTDATED",e.VERSION_RESET="
1VERSION_RESET"}(r||(r={}));var A={check:function(e,t){return function(n,i){i().Version.Outdated||e===t||n(function(e,t){return{type:r.VERSION_OUTDATED,data:{Client:e,Api:t}}}(e,t))}},reset:function(){return function(e,t){i&&clearTimeout(i),i=setTimeout((function(){e({type:r.VERSION_RESET,data:null})}),3e5)}}};var P=null;var N=function(e,t,n,r){this.title=e,this.message=t,this.errors=n,this.exception=r},w=function(){function e(){}return e.handle=function(e){if(e.ok||e.redirected){var t=e.headers.get("api-version");if(null!=t&&$apiVersion!==t){P&&P.dispatch(A.check($apiVersion,t))}return e.redirected&&(window.location.href=e.url),e}if(401!==e.status&&405!==e.status){var n=new N(e.status+" "+e.statusText),r=e.headers.get("Content-Type");if(r&&r.indexOf("/json")>0)return e.json().then((function(e){return n.message=((null===e||void 0===e?void 0:e.errors)||[]).join("\n"),n.errors=e.errors,n.exception=e.exception,Promise.reject(n)}));throw n.message+=(null!=n.message?"\n\n\n":"")+"{RESPONSE}: "+JSON.stringify(e),n}var i=T.location.pathname+T.location.search;return T.push(x.generate(x.LOGIN,{},{returnUrl:i})),e},e}();function D(e,t){return t.push(e),function(){var n=t.indexOf(e);n>=0&&t.splice(n,1)}}var q,F=[],M=[];!function(e){e.GET="GET",e.POST="POST",e.PUT="PUT",e.DELETE="DELETE"}(q||(q={}));var Y,U=function(){function e(){this.baseUrl="/"+($appPath&&$appPath.length>0?$appPath+"/":""),this.preRequests=[],this.postRequests=[]}return e.prototype.addPreRequestProcessor=function(e){return D(e,this.preRequests)},e.prototype.addPostRequestProcessor=function(e){return D(e,this.postRequests)},e.prototype.clearPreRequestProcessor=function(){this.preRequests=[]},e.prototype.clearPostRequestProcessor=function(){this.postRequests=[]},e.prototype.SendRequest=function(e,t,n,r,i){var o=t.toUpperCase();return this.send(e,n,o,r,i)},e.prototype.send=function(e,t,n,r,i){return(i?this.getFilePromise(e,t,n):this.getBasePromise(e,t,n,r)).then((function(e){var t=e.headers.get("Content-Type");return t&&t.indexOf("/json")>0?e.json():e.text()})).catch((function(e){return Promise.reject(e)}))},e.prototype.getBasePromise=function(e,t,n,r){var i=this.getRequestPromise(e,t,n,r),o=this.resolveUrl(t),a=i.then((function(e){return fetch(o,e).then(w.handle)}));return this.appendToResponsePromise(e,o,n,a)},e.prototype.getFilePromise=function(e,t,n){var r=this.getRequestPromise(e,t,n,!0),i=this.resolveUrl(t);e&&(i+="?_payload="+JSON.stringify(e));var o=r.then((function(){return new Promise((function(e,t){R.a.download(i,(function(n){n?t(n):e(new Response)}))}))}));return this.appendToResponsePromise(e,i,n,o)},e.prototype.createRequestObject=function(e,t,n){if(!n)return this.createRequestObjectFormData(e,t);var r={method:t,headers:{Accept:"application/json","Content-Type":"application/json",Cache:"no-cache"},credentials:"include"};return t!==q.GET&&(r.body=JSON.stringify(e)),r},e.prototype.createRequestObjectFormData=function(e,t){if(!(e instanceof FormData))throw new Error("request object is not of type FormData");return{method:t,body:e,credentials:"include"}},e.prototype.getRequestPromise=function(e,t,n,r){var i=this.createRequestObject(e,n,r),o=Promise.resolve(i);return F.reverse().forEach((function(e){o=o.then((function(n){return e.success(t,n)}),e.error)})),this.preRequests.reverse().forEach((function(e){o=o.then((function(n){return e.success(t,n)}),e.error)})),o},e.prototype.appendToResponsePromise=function(e,t,n,r){return M.reverse().forEach((function(e){r=r.then((function(){return e.success}),e.error)})),this.postRequests.reverse().forEach((function(e){r=r.then(e.success,e.error)})),r},e.prototype.resolveUrl=function(e){return this.baseUrl+e.replace(/^\//,"")},e}(),L=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),k=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return L(t,e),t.prototype.login=function(e){var t="api/Account/Login";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.register=function(e){var t="api/Account/Register";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.confirmEmail=function(e,t){var n="api/Account/ConfirmEmail",r=n.indexOf("?")>0?"&":"?";return null!=e&&(n+=r+"userId="+encodeURIComponent(e),r="&"),null!=t&&(n+=r+"code="+encodeURIComponent(t),r="&"),n=n.replace(/null|undefined/gi,""),this.SendRequest(null,"get",n,!0,!1)},t.prototype.resendConfirmEmail=function(e){var t="api/Account/ResendConfirmEmail";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.resendConfirmByEmail=function(e){var t="api/Account/ResendConfirmByEmail";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.forgotPassword=function(e){var t="api/Account/ForgotPassword",n=t.indexOf("?")>0?"&":"?";return null!=e&&(t+=n+"email="+encodeURIComponent(e),n="&"),t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.resetPassword=function(e){var t="api/Account/ResetPassword";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.validateResetPasswordToken=function(e){var t="api/Account/ValidateResetPasswordToken";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.validatePassword=function(e){var t="api/Account/ValidatePassword",n=t.indexOf("?")>0?"&":"?";return null!=e&&(t+=n+"password="+encodeURIComponent(e),n="&"),t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.changePassword=function(e){var t="api/Account/ChangePassword";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.logout=function(){var e="api/Account/Logout";return e=e.replace(/null|undefined/gi,""),this.SendRequest(null,"get",e,!0,!1)},t.prototype.getCurrentUser=function(){var e="api/Account/GetCurrentUser";return e=e.replace(/null|undefined/gi,""),this.SendRequest(null,"get",e,!0,!1)},t.prototype.ping=function(){var e="api/Account/Ping";return e=e.replace(/null|undefined/gi,""),this.SendRequest(null,"get",e,!0,!1)},t}(U),G=new k,V=function(){function e(e){this.userId=e.userId,this.userName=e.userName,this.roles=Object.freeze(e.roles),this.featureFlags=Object.freeze(e.featureFlags),this.institutionIds=e.institutionIds,this.districtIds=e.districtIdentifiers,this.rppIds=e.rppIds,this.firstName=e.firstName,this.lastName=e.lastName,this.fullName=e.fullName,this.isStateUser=e.isStateUser,this.initials=e.initials}return e.prototype.isInRole=function(e){return this.roles.indexOf(e)>=0},e.prototype.hasFeatureFlag=function(e){return this.featureFlags.indexOf(e)>=0},e.prototype.hasInstitutions=function(){return this.institutionIds.length>0},e.prototype.getRoles=function(){return this.roles},e}(),B=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),W=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return B(t,e),t.prototype.getDistrictTableData=function(e,t,n,r){var i="api/districts",o=i.indexOf("?")>0?"&":"?";return null!=t&&(i+=o+"academicYearId="+t,o="&"),null!=n&&(i+=o+"isPublic="+n,o="&"),null!=r&&(i+=o+"rppId="+r,o="&"),i=i.replace(/null|undefined/gi,""),this.SendRequest(e,"post",i,!0,!1)},t.prototype.districtTemplate=function(){var e="api/districts/districtTemplate";return e=e.replace(/null|undefined/gi,""),this.SendRequest(null,"get",e,!0,!1)},t.prototype.academicYearHasDistricts=function(e){var t="api/districts/hasDistricts/"+e;return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.getDistrictDetails=function(e){var t="api/districts/get";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getDistricts=function(e){var t="api/districts/getDistricts";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getAllDistricts=function(e){var t="api/districts/getAllDistricts";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.saveDistrictDetails=function(e){var t="api/districts/save";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.deleteDistrict=function(e){var t="api/districts/deleteDistrict";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.districtImporter=function(e){var t="api/districts/districtImporter";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!1,!1)},t.prototype.searchForDistricts=function(e){var t="api/districts/searchForDistricts";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getDistrictsForUser=function(e){var t="api/districts/getDistrictsUser";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.districtContactTemplate=function(){var e="api/districts/districtContactTemplate";return e=e.replace(/null|undefined/gi,""),this.SendRequest(null,"get",e,!0,!1)},t.prototype.getDistrictContactsDataTable=function(e,t,n){var r="api/districts/getDistrictContactsDataTable",i=r.indexOf("?")>0?"&":"?";return null!=t&&(r+=i+"academicYearId="+t,i="&"),null!=n&&(r+=i+"districtId="+encodeURIComponent(n),i="&"),r=r.replace(/null|undefined/gi,""),this.SendRequest(e,"post",r,!0,!1)},t.prototype.getDistrictContacts=function(e){var t="api/districts/getDistrictContacts";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.saveDistrictContactDetails=function(e){var t="api/districts/saveContact";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.deleteDistrictContact=function(e){var t="api/districts/deleteDistrictContact";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.districtContactImporter=function(e){var t="api/districts/districtContactImporter";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!1,!1)},t}(U),z=new W,H=function(e){return Object.assign({id:"00000000-0000-0000-0000-000000000000",academicYear:null,districtId:null},e)},Q={create:function(e){return Object.assign({},e)}},K={className:"DistrictDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",districtId:0,academicYear:0,areaEducationAgencyIdentifier:0,name:"",regionIdentifier:0,region:null,regionPlanningPartnerId:"00000000-0000-0000-0000-000000000000",areaEducationAgency:null,areaEducationAgencyId:"00000000-0000-0000-0000-000000000000",districtApprovalUserId:"00000000-0000-0000-0000-000000000000",districtApprovalUser:null,display:""},e)},id:"id",districtId:"districtId",academicYear:"academicYear",areaEducationAgencyIdentifier:"areaEducationAgencyIdentifier",name:"name",regionIdentifier:"regionIdentifier",region:"region",regionPlanningPartnerId:"regionPlanningPartnerId",areaEducationAgency:"areaEducationAgency",areaEducationAgencyId:"areaEducationAgencyId",districtApprovalUserId:"districtApprovalUserId",districtApprovalUser:"districtApprovalUser",dis
1play:"display"},X=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{d(r.next(e))}catch(t){o(t)}}function s(e){try{d(r.throw(e))}catch(t){o(t)}}function d(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}d((r=r.apply(e,t||[])).next())}))},J=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};!function(e){e.DISTRICT_SELECT="DISTRICT_SELECT",e.DISTRICT_ID_SELECT="DISTRICT_SELECT",e.DISTRICT_DEFAULT_SELECT="DISTRICT_DEFAULT_SELECT"}(Y||(Y={}));var $={select:Z,idSelect:ee,defaultSelect:function(e){return function(t){var n,r;if(!(null===e||void 0===e?void 0:e.isStateUser)){var i=null!==(r=null===(n=null===e||void 0===e?void 0:e.districtIds)||void 0===n?void 0:n.length)&&void 0!==r&&r?null===e||void 0===e?void 0:e.districtIds[0]:null;return t(ee(null!==i&&void 0!==i?i:0))}return t(Z(null))}}};function Z(e){return{type:Y.DISTRICT_SELECT,data:e}}function ee(e){var t=this;return function(n){return X(t,void 0,void 0,(function(){var t,r;return J(this,(function(i){switch(i.label){case 0:return t=H({districtId:e}),r={},[4,z.getDistrictDetails(t).then((function(e){var t;e&&(r=null!==(t=e.district)&&void 0!==t?t:K.create())}))];case 1:return i.sent(),n(Z(null!==r&&void 0!==r?r:null)),[2]}}))}))}}var te,ne={className:"InstitutionDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",name:"",abbreviation:"",code:0,display:""},e)},id:"id",name:"name",abbreviation:"abbreviation",code:"code",display:"display"},re=n(3),ie=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),oe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ie(t,e),t.prototype.getOneStringId=function(e,t){var n="api/lookups/getOne/"+encodeURIComponent(e)+"/string/"+encodeURIComponent(t);return n=n.replace(/null|undefined/gi,""),this.SendRequest(null,"get",n,!0,!1)},t.prototype.getOneIntId=function(e,t){var n="api/lookups/getOne/"+encodeURIComponent(e)+"/int/"+t;return n=n.replace(/null|undefined/gi,""),this.SendRequest(null,"get",n,!0,!1)},t.prototype.getOneGuidId=function(e,t){var n="api/lookups/getOne/"+encodeURIComponent(e)+"/guid/"+encodeURIComponent(t);return n=n.replace(/null|undefined/gi,""),this.SendRequest(null,"get",n,!0,!1)},t.prototype.getAll=function(e,t){var n="api/lookups/getAll/"+encodeURIComponent(e),r=n.indexOf("?")>0?"&":"?";return null!=t&&(n+=r+"includeInactive="+t,r="&"),n=n.replace(/null|undefined/gi,""),this.SendRequest(null,"get",n,!0,!1)},t.prototype.invalidateCache=function(e){var t="api/lookups/InvalidateCache",n=t.indexOf("?")>0?"&":"?";return null!=e&&(t+=n+"name="+encodeURIComponent(e||""),n="&"),t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"get",t,!0,!1)},t}
1(U),ae=new oe,se=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{d(r.next(e))}catch(t){o(t)}}function s(e){try{d(r.throw(e))}catch(t){o(t)}}function d(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}d((r=r.apply(e,t||[])).next())}))},de=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},ce=new(function(){function e(){}return e.prototype.getAll=function(e,t){return this.getAllDTO(e,t).then((function(e){return e.map((function(e){return e.data}))}))},e.prototype.getOne=function(e,t,n){var r;return se(this,void 0,Promise,(function(){var i;return de(this,(function(o){switch(o.label){case 0:return[4,this.getAllDTO(e,n)];case 1:return i=o.sent(),[2,null===(r=i.find((function(e){return e.key===t})))||void 0===r?void 0:r.data]}}))}))},e.prototype.getAllDTO=function(t,n){var r=(null!==n&&void 0!==n&&n?e._allCache:e._allActiveCache).get(t);return r?this.fromLocal(r,t):ae.getAll(t,n).then((function(r){return n?e._allCache.set(t,r):e._allActiveCache.set(t,r),r}))},e.prototype.getOneDTO=function(t,n,r){var i=r?e._singleCache:e._singleActiveCache,o=r?e._allCache:e._allActiveCache;return o[t]&&(i[t]=o[t]),this.fromLocal(i[t],t,n).then((function(i){return r?e._singleCache[t]=i:e._singleActiveCache[t]=i,i.find((function(e){return e.key===n}))}))},e.prototype.invalidateCache=function(t){t?(e._allCache[t]=null,e._allActiveCache[t]=null,e._singleCache[t]=null,e._singleActiveCache[t]=null):(e._allCache=new Map,e._allActiveCache=new Map,e._singleCache=new Map,e._singleActiveCache=new Map),ae.invalidateCache(t)},e.prototype.fromLocal=function(e,t,n){var r=this,i=Promise.resolve([]);return e||(e=[]),null==n||e.find((function(e){return e.key===n}))?i=Promise.resolve(e):"number"===typeof n?i=ae.getOneIntId(t,n).then((function(t){return r.updateCache(e,t)})):(n instanceof re.default||"string"===typeof n)&&(i=ae.getOneStringId(t,n).then((function(t){return r.updateCache(e,t)}))),i.then((function(e){return r.filterAndSort(e)}))},e.prototype.updateCache=function(e,t){return t&&!e.find((function(e){return e.key===t.key}))&&e.push(t),e},e.prototype.filterAndSort=function(e,t){return e.filter((function(e){return e.isActive||e.key===t})).sort((function(e,t){var n,r,i,o=e.displayOrder-t.displayOrder;return 0===o&&(o=null!==(i=null===(n=e.name)||void 0===n?void 0:n.localeCompare(null!==(r=t.name)&&void 0!==r?r:""))&&void 0!==i?i:0),o}))},e._allActiveCache=new Map,e._allCache=new Map,e._singleActiveCache=new Map,e._singleCache=new Map,e}()),le=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{d(r.next(e))}catch(t){o(t)}}function s(e){try{d(r.throw(e))}catch(t){o(t)}}function d(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}d((r=r.apply(e,t||[])).next())}))},ue=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;
1function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};!function(e){e.INSTITUTION_SELECT="INSTITUTION_SELECT",e.INSTITUTION_ID_SELECT="INSTITUTION_SELECT",e.INSTITUTION_DEFAULT_SELECT="INSTITUTION_DEFAULT_SELECT"}(te||(te={}));var pe={select:fe,idSelect:he,defaultSelect:function(e){return function(t){var n,r;if(!(null===e||void 0===e?void 0:e.isStateUser)){var i=null!==(r=null===(n=null===e||void 0===e?void 0:e.institutionIds)||void 0===n?void 0:n.length)&&void 0!==r&&r?null===e||void 0===e?void 0:e.institutionIds[0]:null;return t(he(null!==i&&void 0!==i?i:re.default.Empty()))}return t(fe(null))}}};function fe(e){return{type:te.INSTITUTION_SELECT,data:e}}function he(e){var t=this;return function(n){return le(t,void 0,void 0,(function(){var t;return ue(this,(function(r){switch(r.label){case 0:return[4,ce.getOne(ne.className,e)];case 1:return t=r.sent(),n(fe(null!==t&&void 0!==t?t:null)),[2]}}))}))}}var ve,me=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ge=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return me(t,e),t.prototype.getRegionalPlanningPartnerTableData=function(e,t){var n="api/regionalPlanningPartners",r=n.indexOf("?")>0?"&":"?";return null!=t&&(n+=r+"academicYear="+t,r="&"),n=n.replace(/null|undefined/gi,""),this.SendRequest(e,"post",n,!0,!1)}
1,t.prototype.getRegionDetails=function(e){var t="api/regionalPlanningPartners/getRPPDetails";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getRegionalPlanningPartners=function(e){var t="api/regionalPlanningPartners/regionalPlanningPartners/"+e;return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.getRegionalPlanningPartnersByUser=function(e){var t="api/regionalPlanningPartners/regionalPlanningPartnersByUser";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getRegionalPlanningPartnersByAcademicYear=function(e){var t="api/regionalPlanningPartners/regionalPlanningPartnersByAcademicYear";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.saveRegionalPlanningPartnerDetails=function(e){var t="api/regionalPlanningPartners/save";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.deleteRegionalPlanningPartner=function(e){var t="api/regionalPlanningPartners/delete";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.searchRPPUsers=function(e){var t="api/regionalPlanningPartners/searchRPPUsers";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getAllRpps=function(){var e="api/regionalPlanningPartners/getAllRpps";return e=e.replace(/null|undefined/gi,""),this.SendRequest(null,"post",e,!0,!1)},t}(U),be=new ge,ye=function(e){return Object.assign({id:"00000000-0000-0000-0000-000000000000",academicYear:null,rppId:null},e)},Oe={className:"RegionalPlanningPartnerDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",academicYear:0,regionalPlanningPartnerIdentifier:0,name:"",institutionId:"00000000-0000-0000-0000-000000000000",institution:null,display:""},e)},id:"id",academicYear:"academicYear",regionalPlanningPartnerIdentifier:"regionalPlanningPartnerIdentifier",name:"name",institutionId:"institutionId",institution:"institution",display:"display"},je=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{d(r.next(e))}catch(t){o(t)}}function s(e){try{d(r.throw(e))}catch(t){o(t)}}function d(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}d((r=r.apply(e,t||[])).next())}))},Ie=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};!function(e){e.RPP_SELECT="RPP_SELECT",e.RPP_ID_SELECT="RPP_SELECT",e.RPP_DEFAULT_SELECT="RPP_DEFAULT_SELECT"}(ve||(ve={}));var Se,Ee={select:Re,idSelect:_e,defaultSelect:function(e){return function(t){var n,r;if(!(null===e||void 0===e?void 0:e.isStateUser)){var i=null!==(r=null===(n=null===e||void 0===e?void 0:e.rppIds)||void 0===n?void 0:n.length)&&void 0!==r&&r?null===e||void 0===e?void 0:e.rppIds[0]:null;return t(_e(null!==i&&void 0!==i?i:0))}return t(Re(null))}}};function Re(e){return{type:ve.RPP_SELECT,data:e}}function _e(e){var t=this;return function(n){return je(t,void 0,void 0,(function(){var t,r;return Ie(this,(function(i){switch(i.label){case 0:return t=ye({rppId:e}),r={}
1,[4,be.getRegionDetails(t).then((function(e){var t;e&&(r=null!==(t=e.regionPlanningPartner)&&void 0!==t?t:Oe.create())}))];case 1:return i.sent(),n(Re(null!==r&&void 0!==r?r:null)),[2]}}))}))}}!function(e){e.USER_SESSION_CHECKING="USER_SESSION_CHECKING",e.USER_SESSION_CHECK="USER_SESSION_CHECK",e.USER_SESSION_LOADING="USER_SESSION_LOADING",e.USER_SESSION_LOGIN="USER_SESSION_LOGIN",e.USER_SESSION_LOGIN_ERROR="USER_SESSION_LOGIN_ERROR",e.USER_SESSION_LOGOUT="USER_SESSION_LOGOUT",e.USER_SESSION_CHANGED="USER_SESSION_CHANGED",e.USER_SESSION_SET_LAST_INTERACTION="USER_SESSION_SET_LAST_INTERACTION"}(Se||(Se={}));var Te={login:function(e){return function(t){t(Pe(!0)),G.login(e).then((function(e){e.succeeded?Ce(t,!0):(t(xe(e.errors.join("\n"))),t(Pe(!1)))})).catch((function(){t(xe("Login failed.")),t(Pe(!1))}))}},logout:function(){return function(e){G.logout().then((function(){e(Ne(null)),e(pe.select(null)),e($.select(null)),e(Ee.select(null)),S.b.success("Log Out Successful"),T.push(x.HOME)})).catch((function(){e(Pe(!1))}))}},check:function(){return function(e,t){var n=t().UserSession;n.Value?e(Ne(n.Value)):(e(Ae(!0)),Ce(e,!1))}},refresh:function(e){return function(t){t(Ne(e?new V(e):null))}},setLastInteraction:function(){return{type:Se.USER_SESSION_SET_LAST_INTERACTION,data:null}}};function Ce(e,t){var n=t?Pe:Ae;G.getCurrentUser().then((function(t){if(t){var r=new V(t);e(Ne(r)),e(pe.defaultSelect(r)),e($.defaultSelect(r)),e(Ee.defaultSelect(r))}else e(Ne(null));e(n(!1))})).catch((function(){e(n(!1))}))}function xe(e){return{type:Se.USER_SESSION_LOGIN_ERROR,data:e}}function Ae(e){return{type:Se.USER_SESSION_CHECKING,data:e}}function Pe(e){return{type:Se.USER_SESSION_LOADING,data:e}}function Ne(e){return{type:Se.USER_SESSION_CHANGED,data:e}}var we=function(){return we=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},we.apply(this,arguments)},De={Loading:!1,Checking:!0,Value:null,Result:null,ErrorMessage:null,LastInteraction:null};var qe=function(){return qe=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},qe.apply(this,arguments)},Fe={Selected:null,OrganizationId:null};var Me=function(){return Me=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Me.apply(this,arguments)},Ye={Selected:null,InstitutionId:null};var Ue=function(){return Ue=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ue.apply(this,arguments)},Le={Selected:null,DistrictId:null};var ke=function(){return ke=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ke.apply(this,arguments)},Ge={Selected:null,RPPId:null};var Ve=function(){return Ve=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ve.apply(this,arguments)},Be={Client:$apiVersion,Api:null,Outdated:!1};var We=Object(j.b)({UserSession:function(e,t){void 0===e&&(e=De);var n=e,r=null,i=null;switch(t.type){case Se.USER_SESSION_CHANGED:r=t.data?Object.freeze(t.data):t.data,n=we(we({},e),{Value:r,Result:null,ErrorMessage:null});break;case Se.USER_SESSION_LOADING:i=e.Result,t.data&&(i=null),n=we(we({},e),{Loading:t.data,Result:i});break;case Se.USER_SESSION_CHECKING:n=we(we({},e),{Checking:t.data,ErrorMessage:t.data});break;case Se.USER_SESSION_LOGIN_ERROR:n=we(we({},e),{ErrorMessage:t.data});break;default:return n}return Object.freeze(n)},Version:function(e,t){void 0===e&&(e=Be);var n=e;switch(t.type){case r.VERSION_OUTDATED:n=Ve(Ve(Ve({},e),t.data||{}),{Outdated:!0});break;case r.VERSION_RESET:n=Ve(Ve({},e),{Outdated:!1})}return n},Organization:function(e,t){var n,r;void 0===e&&(e=Fe);var i=e;return t.type!==te.INSTITUTION_SELECT?i:(i=qe(qe({},e),{Selected:t.data,OrganizationId:null!==(r=null===(n=t.data)||void 0===n?void 0:n.Id)&&void 0!==r?r:null}),Object.freeze(i))},Institution:function(e,t){var n,r;void 0===e&&(e=Ye);var i=e;return t.type!==te.INSTITUTION_SELECT?i:(i=Me(Me({},e),{Selected:t.data,InstitutionId:null!==(r=null===(n=t.data)||void 0===n?void 0:n.Id)&&void 0!==r?r:null}),Object.freeze(i))},District:function(e,t){var n,r;void 0===e&&(e=Le);var i=e;return t.type!==Y.DISTRICT_SELECT?i:(i=Ue(Ue({},e),{Selected:t.data,DistrictId:null!==(r=null===(n=t.data)||void 0===n?void 0:n.Id)&&void 0!==r?r:null}),Object.freeze(i))},RegionalPlanningPartner:function(e,t){var n,r;void 0===e&&(e=Ge);var i=e;return t.type!==ve.RPP_SELECT?i:(i=ke(ke({},e),{Selected:t.data,RPPId:null!==(r=null===(n=t.data)||void 0===n?void 0:n.regionPlanningPartnerIdentifier)&&void 0!==r?r:null}),Object.freeze(i))}}),ze="qci_react_template",He=function(){try{var e=sessionStorage.getItem(ze);if(null===e&&(localStorage.setItem("REQUESTING_STORE",Date.now().toString()),localStorage.removeItem("REQUESTING_STORE")),null===e)return;return JSON.parse(e)}catch(t){return}}(),Qe=Object(j.c)((function(e,t){var n=We(e,t);return Object.isFrozen(n)?n:Object.freeze(n)}),He,Object(j.a)(I.a));Qe.subscribe((function(){!function(e){try{var t={localize:e.localize,Institution:e.Institution},n=JSON.stringify(t);sessionStorage.setItem(ze,n)}catch(r){}}(Qe.getState())}));var Ke,Xe=function(){function e(){}return e.Get=function(){return Qe.getState().UserSession.Value},e}(),Je=function(){function e(){}
1return e.isAuthorized=function(e,t){for(var n=Xe.Get(),r=0;r<e.length;r++)if(null===n||void 0===n?void 0:n.hasFeatureFlag(e[r]))return!0;return!1},e}(),$e=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ze=function(e){function t(t){var n=e.call(this,t)||this;return n.state={},n}return $e(t,e),t.prototype.render=function(){var e=null;return(this.props.validFeatureFlags&&Je.isAuthorized(this.props.validFeatureFlags,this.props.institution)||!this.props.validFeatureFlags&&Xe.Get())&&(e=this.props.children),e},t}(a.Component),et=n(1495),tt=n(1496),nt=n(729),rt=n(13),it=(n(38),n(165)),ot=(n(312),n(37)),at=(n(72),n(16)),st=n(1490),dt=n(1491),ct=n(27),lt=(n(49),n(378)),ut=(n(783),n(18)),pt=(n(52),n(15)),ft=(n(34),n(17)),ht=n.n(ft),vt=n(9),mt=n.n(vt),gt=function(e){return Object.assign({userName:"",password:""},e)},bt="userName",yt="password",Ot=function(){function e(){}return e.maxLength=function(t,n){return{max:t,message:e.formatMessage("cannot be longer than "+t+" characters.",n)}},e.minLength=function(t,n){return{min:t,message:e.formatMessage("must be longer than "+t+" characters.",n)}},e.onlyAlphanumericCharacters=function(t){return{pattern:new RegExp(/^[A-Za-z0-9]+$/),message:e.formatMessage("can only be alpha characters.",t)}},e.onlyAlphaCharacters=function(t){return{pattern:new RegExp(/^[A-Za-z]+$/),message:e.formatMessage("can only be alpha characters.",t)}},e.onlyNumericCharacters=function(t){return{pattern:new RegExp(/^[0-9]+$/),message:e.formatMessage("can only be numeric characters.",t)}},e.required=function(t){return{required:!0,message:e.formatMessage("is required.",t)}},e.https=function(t){return{pattern:new RegExp(/^(http|https):\/\//),message:e.formatMessage("must include https:// or http://",t)}},e.cipNumberValidator=function(t){return{pattern:new RegExp(/^[0-9]{1,2}$|^[0-9]{1,2}(\.\d{2})$|^[0-9]{1,2}(\.\d{4})$/),message:e.formatMessage("Invalid formtat",t)}},e.phoneNumberValidator=function(t){return{pattern:new RegExp(/^\d{3}-\d{3}-\d{4}$/),message:e.formatMessage("Invalid formtat",t)}},e.fieldsMatchValidator=function(e,t){return{validator:function(n,r,i){if(r&&(e.current&&e.current.getFieldValue(t)!==r))return i("error");return i()},message:"Fields do not match"}},e.formatMessage=function(e,t){return(t||"Field")+" "+e},e}(),jt=n(32),It=n.n(jt),St=n(497),Et=n.n(St);!function(e){e[e.NONE=0]="NONE",e[e.SUCCESS=1]="SUCCESS",e[e.ERROR=2]="ERROR",e[e.WARNING=3]="WARNING",e[e.VALIDATING=4]="VALIDATING"}(Ke||(Ke={}));var Rt=Ke,_t=function(){function e(){}return e.getValidation=function(e,t,n){var r;if(n&&t&&(null===(r=t[e])||void 0===r?void 0:r.length)>0){var i=Rt.NONE,o=[];return t[e].forEach((function(e){e.status===Rt.ERROR?i=Rt.ERROR:i!=Rt.ERROR&&e.status==Rt.WARNING?i=Rt.WARNING:i!=Rt.ERROR&&i!=Rt.WARNING&&e.status==Rt.VALIDATING?i=Rt.VALIDATING:i!=Rt.ERROR&&i!=Rt.WARNING&&i!=Rt.VALIDATING&&e.status==Rt.SUCCESS&&(i=Rt.SUCCESS),e.message&&o.push(e.message)})),{hasFeedback:n,validateStatus:Tt(i),help:o.join("\n"),messages:o}}return null},e.passwordStrengthValidator=function(e,t,n){null!==t&&void 0!==t&&""!==t||n("error"),Et()(t).score>=$zxcvbnMin&&n(),n("error")},e.passwordsMatchValidator=function(e){return function(t,n){return n&&e!==n?Promise.reject("Passwords do not match."):Promise.resolve()}},e.termInputYearValidator=function(e,t,n){return function(r,i){var o,a;if(i&&t&&t.year){var s=It()(null===(o=e.find((function(e){return e.id==i.termId})))||void 0===o?void 0:o.startDate),d=It()(null===(a=e.find((function(e){return e.id==t.termId})))||void 0===a?void 0:a.startDate),c=s.month()+2>12?s.month()+2-12:s.month()+2,l=d.month()+2>12?d.month()+2-12:d.month()+2;if("retire"==n&&0!=i.year&&null!=i.year&&i.year<t.year)return Promise.reject("Retire year cannot be less than Install year.");if("install"==n&&i.year>t.year)return Promise.reject("Install year cannot be greater than Retire year.");if(0!=i.year&&i.year==t.year){if("retire"==n&&(s.isSame(d)||c<l))return Promise.reject("Term cannot be the same or before install term.");if("install"==n&&(s.isSame(d)||c>l))return Promise.reject("Term cannot be the same or after retire term.")}}return i&&i!=re.default.Empty()?Promise.resolve():Promise.reject("Value is Required")}},e.termAndYearValidatorNullable=function(){return function(e,t){if(!t||t!=re.default.Empty())return Promise.resolve();if(t){if(!t.year&&t.termId!=re.default.Empty())return Promise.reject("Enter a Year.");if(t.year&&(""==t.termId||t.termId==re.default.Empty()))return Promise.reject("Select a Term.")}}},e.termAndYearValidator=function(){return function(e,t){if(t){if(!t.year&&t.termId!=re.default.Empty())return Promise.reject("Enter a Year.");if(t.year&&(""==t.termId||t.termId==re.default.Empty()))return Promise.reject("Select a Term.")}if(!t||t!=re.default.Empty())return Promise.resolve()}},e.minMaxValueValidator=function(){return function(e,t){if(t){if((void 0==t.min||Number.isNaN(t.min))&&(void 0==t.max||Number.isNaN(t.max)))return Promise.resolve();if((void 0==t.max||Number.isNaN(t.max))&&!Number.isNaN(t.min))return Promise.reject("Enter Maximum Value.");if((void 0==t.min||Number.isNaN(t.min))&&!Number.isNaN(t.max))return Promise.reject("Enter Minimum Value.")}return Promise.resolve()}},e.valueExistsValidator=function(e){return function(){var t=!1;return e.forEach((function(e){void 0!=e&&(t=!0)})),t?Promise.resolve():Promise.reject("Atleast one field or field group needs a value.")}},e}();function Tt(e){switch(e){case Rt.SUCCESS:return"success";case Rt.WARNING:return"warning";case Rt.ERROR:return"error";
1case Rt.VALIDATING:return"validating";case Rt.NONE:default:return""}}var Ct=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),xt=function(){return xt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},xt.apply(this,arguments)},At=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._formItems=(new Map).set(bt,{required:!0,name:bt,label:"Email Address",rules:[Ot.required()]}).set(yt,{required:!0,name:yt,label:"Password",rules:[Ot.required()]}),n.focusPassword=function(){var e,t;null!==n.passwordInput&&void 0!==n.passwordInput&&(null===(t=null===(e=n.passwordInput)||void 0===e?void 0:e.current)||void 0===t||t.focus())},n.handleSubmit=function(){var e=gt(n._formRef?n._formRef.current.getFieldsValue():null);e.userName&&e.password?n.props.loginAction(e):n.showPassword()},n.showPassword=function(){var e=gt(n._formRef?n._formRef.current.getFieldsValue():null);null!==e&&e.userName&&(n.setState({showPassword:!0}),n.focusPassword())},n.passwordInput=a.createRef(),n.state={showPassword:!1},n}return Ct(t,e),t.prototype.componentDidUpdate=function(){null!==this.props.userName&&null===this.props.error&&(this.props.returnUrl?T.push(this.props.returnUrl):T.push(x.DASHBOARD))},t.prototype.render=function(){return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsx)("div",xt({style:this.props.style},{children:Object(o.jsxs)(ht.a,xt({ref:this._formRef,layout:"vertical",onFinish:this.handleSubmit,requiredMark:!0},{children:[Object(o.jsx)(ot.a.Title,xt({level:4,className:"align-center"},{children:"STICS Login"}),void 0),this.renderErrors(),Object(o.jsx)(mt.a,xt({},this._formItems.get(bt),_t.getValidation(bt,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:this.state.loading,prefix:Object(o.jsx)(st.a,{},void 0)},void 0)}),void 0),this.renderPassword(),Object(o.jsx)(ht.a.Item,{children:Object(o.jsx)(rt.a,xt({type:"primary",htmlType:"submit",shape:"round",size:"large",disabled:this.state.loading,loading:this.state.loading,block:!0},{children:this.state.showPassword?"Login":"Next"}),void 0)},void 0),Object(o.jsxs)(y.b,xt({direction:"vertical",className:"align-center"},{children:[Object(o.jsx)(at.a,xt({className:"align-center",to:x.generate(x.REQUEST_RESET_PASSWORD)},{children:"Forgot Password?"}),void 0),Object(o.jsx)(at.a,xt({className:"align-center",to:x.generate(x.RESEND_CONFIRMATION_EMAIL)},{children:"Resend Confirmation Email"}),void 0)]}),void 0),Object(o.jsx)(lt.a,{},void 0),Object(o.jsxs)(y.b,xt({direction:"vertical",className:"align-center"},{children:[Object(o.jsx)(ot.a.Title,xt({level:4,className:"align-center"},{children:"Have an Iowa Department of Education Portal Account?"}),void 0),Object(o.jsx)(ot.a.Paragraph,xt({className:"align-center"},{children:"Please make sure to log into your account via the portal."}),void 0),Object(o.jsx)(rt.a,xt({shape:"round",size:"large",href:"https://portal.ed.iowa.gov/IowaLandingPage/Landing.aspx",className:"align-center"},{children:"Go to Portal"}),void 0)]}),void 0)]}),void 0)}),void 0)},t.prototype.renderErrors=function(){if(this.props.errorMessage){var e=this.props.errorMessage;return Object(o.jsx)(ct.a,{message:"Error",description:e,type:"error",showIcon:!0},void 0)}},t.prototype.renderPassword=function(){if(this.state.showPassword)return Object(o.jsx)(ht.a.Item,xt({},this._formItems.get(yt),_t.getValidation(yt,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a.Password,{ref:this.passwordInput,disabled:this.state.loading,prefix:Object(o.jsx)(dt.a,{},void 0)},void 0)}),void 0)},t}(a.Component);var Pt=Object(l.b)((function(e){var t,n,r,i,o;return{loading:e.UserSession.Loading,submitting:e.UserSession.Loading,error:e.UserSession.Result,userName:null!==(r=null===(n=null===(t=e.UserSession)||void 0===t?void 0:t.Value)||void 0===n?void 0:n.userName)&&void 0!==r?r:null,errorMessage:null!==(o=null===(i=e.UserSession)||void 0===i?void 0:i.ErrorMessage)&&void 0!==o?o:null}}),(function(e){return{loginAction:function(t){return e(Te.login(t))}}}))(At),Nt=n(1492),wt=n(1493),Dt=n(1494),qt=n(704),Ft=n.n(qt),Mt=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Yt=function(){return Yt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Yt.apply(this,arguments)},Ut=function(e){function t(t){var n=e.call(this,t)||this;return n.logout=function(){n.props.logoutAction&&n.props.logoutAction()},n.state={loading:!1},n}return Mt(t,e),t.prototype.render=function(){if(this.props.userInfo){var e=Object(o.jsxs)("div",{children:[this.renderUserInfo(),this.renderActions()]},void 0);return Object(o.jsx)(it.a,Yt({placement:"bottomRight",title:"",content:e,trigger:"click"},{children:Object(o.jsx)(rt.a,{shape:"circle",size:"large",type:"primary",icon:Object(o.jsx)(Nt.a,{},void 0)},void 0)}),"user_popover")}},t.prototype.renderActions=function(){return Object(o.jsx)("div",Yt({className:"align-center"},{children:Object(o.jsxs)(y.b,Yt({direction:"vertical",style:{marginTop:"10px"}},{children:[Object(o.jsx)(at.a,Yt({to:x.generate(x.USER_SETTINGS)},{children:Object(o.jsx)(rt.a,Yt({block:!0,shape:"round",icon:Object(o.jsx)(wt.a,{},void 0)},{children:"Settings"}),void 0)}),void 0),Object(o.jsx)(rt.a,Yt({block:!0,shape:"round",onClick:this.logout,icon:Object(o.jsx)(Dt.a,{},void 0)},{children:"Logout"}),void 0)]}),void 0)}),void 0)},t.prototype.renderUserInfo=function(){var e,t;return Object(o.jsxs)(b.a,Yt({gutter:[15,10]},{children:[Object(o.jsx)(m.a,{children:Object(o.jsx)(Ft.a,{size:64,icon:Object(o.jsx)(Nt.a,{},void 0)},void 0)},void 0),Object(o.jsxs)(m.a,{children:[Object(o.jsx)(ot.a.Title,Yt({level:5},{children:null===(e=this.props.userInfo)||void 0===e?void 0:e.fullName}),void 0),Object(o.jsx)(ot.a.Text,{children:null===(t=this.props.userInfo)||void 0===t?void 0:t.userName},void 0)]},void 0)]}),void 0)},t}(a.Component);var Lt=Object(l.b)((function(e){return{userInfo:e.UserSession.Value}}),(function(e){return{logoutAction:function(){return e(Te.logout())}}}
1))(Ut),kt=n(202),Gt=n(36),Vt=(n(84),function(e){return Object.assign({userId:"00000000-0000-0000-0000-000000000000"},e)}),Bt=function(e){return Object.assign({userId:"00000000-0000-0000-0000-000000000000"},e)},Wt=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),zt=function(){return zt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},zt.apply(this,arguments)},Ht=function(e){function t(t){var n=e.call(this,t)||this;return n.loadInstitutions=function(){return ce.getAll(ne.className).then((function(e){e&&n.setState({institutions:null!==e&&void 0!==e?e:[]})}))},n.loadDistricts=function(){var e,t=Vt({userId:null===(e=n.props.userInfo)||void 0===e?void 0:e.userId});z.getDistrictsForUser(t).then((function(e){var t;e&&n.setState({districts:null!==(t=e.districts)&&void 0!==t?t:[]})})).catch((function(){n.setState({error:!1})}))},n.loadRPPs=function(){var e,t=Bt({userId:null===(e=n.props.userInfo)||void 0===e?void 0:e.userId});be.getRegionalPlanningPartnersByUser(t).then((function(e){var t;e&&n.setState({rpps:null!==(t=e.regions)&&void 0!==t?t:[]})})).catch((function(){n.setState({error:!1})}))},n.stateSelected=function(){n.props.selectInstitution(null),n.props.selectRPP(null),n.props.selectDistrict(null)},n.institutionSelected=function(e){var t,r=null!==(t=n.state.institutions.filter((function(t){return t.id==e}))[0])&&void 0!==t?t:null;n.props.selectDistrict(null),n.props.selectInstitution(r),n.props.selectRPP(null)},n.RppSelected=function(e){var t,r=null!==(t=n.state.rpps.filter((function(t){return t.regionalPlanningPartnerIdentifier==e}))[0])&&void 0!==t?t:null;n.props.selectDistrict(null),n.props.selectInstitution(null),n.props.selectRPP(r)},n.districtSelector=function(e){var t,r=null!==(t=n.state.districts.filter((function(t){return t.districtId==e}))[0])&&void 0!==t?t:null;n.props.selectDistrict(r),n.props.selectInstitution(null),n.props.selectRPP(null)},n.selectSingle=function(){if(n.props.userInfo)if(n.props.userInfo.institutionIds.length>0){var e=n.props.userInfo.institutionIds[0];n.institutionSelected(e)}else if(n.props.userInfo.districtIds.length>0){var t=n.props.userInfo.districtIds[0];n.districtSelector(t)}else if(n.props.userInfo.rppIds.length>0){var r=n.props.userInfo.rppIds[0];n.RppSelected(r)}},n.state={institutions:[],districts:[],rpps:[],loading:!1,error:!1},n}return Wt(t,e),t.prototype.componentDidMount=function(){var e=this,t=[];t.push(this.loadInstitutions()),t.push(this.loadDistricts()),t.push(this.loadRPPs()),Promise.all(t).then((function(){e.setState({loading:!1})}))},t.prototype.render=function(){if(this.props.userInfo)return this.props.userInfo.institutionIds.length+this.props.userInfo.districtIds.length+this.props.userInfo.rppIds.length>1||(this.props.userInfo.institutionIds.length>0||this.props.userInfo.districtIds.length>0||this.props.userInfo.rppIds.length>0)&&this.props.userInfo.isStateUser?this.renderMultiple():(this.selectSingle(),Object(o.jsx)(ot.a.Text,zt({style:{color:"white",marginRight:15}},{children:this.getName()}),void 0))},t.prototype.getName=function(){var e,t,n,r,i,o,a;return(null===(e=this.props.selectedInstitution)||void 0===e?void 0:e.abbreviation)?null===(t=this.props.selectedInstitution)||void 0===t?void 0:t.name:(null===(n=this.props.selectedDistrict)||void 0===n?void 0:n.districtId)?null===(r=this.props.selectedDistrict)||void 0===r?void 0:r.name:(null===(i=this.props.selectedRPP)||void 0===i?void 0:i.regionalPlanningPartnerIdentifier)?null===(o=this.props.selectedRPP)||void 0===o?void 0:o.name:(null===(a=this.props.userInfo)||void 0===a?void 0:a.isStateUser)?"State of Iowa":void 0},t.prototype.renderMultiple=function(){var e=Object(o.jsx)("div",{children:this.renderOrganizations()},void 0);return Object(o.jsx)(it.a,zt({placement:"bottomRight",title:"",content:e,trigger:"click"},{children:Object(o.jsxs)(rt.a,zt({type:"link",style:{color:"white"}},{children:[this.getName()," ",Object(o.jsx)(kt.a,{},void 0)]}),void 0)}),"organization_popover")},t.prototype.renderOrganizations=function(){var e,t,n,r,i,a,s,d,
1c,l,u,p,f,h,v,m,g,b=this;if((null===(e=this.props.userInfo)||void 0===e?void 0:e.institutionIds)&&(null===(t=this.props.userInfo)||void 0===t?void 0:t.institutionIds.length)>0||(null===(n=this.props.userInfo)||void 0===n?void 0:n.districtIds)&&(null===(r=this.props.userInfo)||void 0===r?void 0:r.districtIds.length)>0||(null===(i=this.props.userInfo)||void 0===i?void 0:i.rppIds)&&(null===(a=this.props.userInfo)||void 0===a?void 0:a.rppIds.length)>0){var y=[];(null===(s=this.props.selectedInstitution)||void 0===s?void 0:s.abbreviation)?y.push(null!==(d=this.props.selectedInstitution.id)&&void 0!==d?d:re.default.Empty()):(null===(c=this.props.selectedDistrict)||void 0===c?void 0:c.districtId)?y.push(null!==(l=this.props.selectedDistrict.districtId)&&void 0!==l?l:0):(null===(u=this.props.selectedRPP)||void 0===u?void 0:u.regionalPlanningPartnerIdentifier)?y.push(null!==(p=this.props.selectedRPP.regionalPlanningPartnerIdentifier)&&void 0!==p?p:0):y=[];var O=[];if(!0===this.props.userInfo.isStateUser&&O.push(Object(o.jsx)(Gt.a.Item,zt({onClick:function(){return b.stateSelected()}},{children:"State of Iowa"}),re.default.Empty())),O.push(null===(f=this.props.userInfo)||void 0===f?void 0:f.institutionIds.map((function(e){return b.renderInstitution(e)}))),O.push(null===(v=null===(h=this.props.userInfo)||void 0===h?void 0:h.districtIds)||void 0===v?void 0:v.map((function(e){return b.renderDistrict(e)}))),O.push(null===(g=null===(m=this.props.userInfo)||void 0===m?void 0:m.rppIds)||void 0===g?void 0:g.map((function(e){return b.renderRPP(e)}))),0===y.length)if(!0===this.props.userInfo.isStateUser);else if(this.props.userInfo.institutionIds.length>0){var j=this.props.userInfo.institutionIds[0];y.push(this.props.userInfo.institutionIds[0]),this.institutionSelected(j)}else if(this.props.userInfo.districtIds.length>0){var I=this.props.userInfo.districtIds[0];y.push(I),this.districtSelector(I)}else if(this.props.userInfo.rppIds.length>0){var S=this.props.userInfo.rppIds[0];y.push(S),this.RppSelected(S)}return Object(o.jsx)(Gt.a,zt({theme:"light",selectedKeys:y,style:{marginTop:"10px",marginLeft:"-16px",marginRight:"-16px"}},{children:O}),void 0)}},t.prototype.renderInstitution=function(e){var t,n=this,r=null!==(t=this.state.institutions.filter((function(t){return t.id==e}))[0])&&void 0!==t?t:null;return null==r?Object(o.jsx)(Gt.a.Item,zt({onClick:function(){return n.stateSelected()}},{children:"State of Iowa"}),e):this.state.institutions.length>0?Object(o.jsx)(Gt.a.Item,zt({onClick:function(){var e;return n.institutionSelected(null!==(e=r.id)&&void 0!==e?e:re.default.Empty())}},{children:r.name}),e):Object(o.jsx)(pt.a.Input,{active:!0},void 0)},t.prototype.renderDistrict=function(e){var t,n,r=this,i=null!==(t=this.state.districts.filter((function(t){return t.districtId==e}))[0])&&void 0!==t?t:null;return this.state.districts.length>0?Object(o.jsx)(Gt.a.Item,zt({onClick:function(){return r.districtSelector(i.districtId)}},{children:null!==(n=null===i||void 0===i?void 0:i.name)&&void 0!==n?n:""}),e):Object(o.jsx)(pt.a.Input,{active:!0},void 0)},t.prototype.renderRPP=function(e){var t,n,r=this,i=null!==(t=this.state.rpps.filter((function(t){return t.regionalPlanningPartnerIdentifier==e}))[0])&&void 0!==t?t:null;return this.state.rpps.length>0?Object(o.jsx)(Gt.a.Item,zt({onClick:function(){return r.RppSelected(i.regionalPlanningPartnerIdentifier)}},{children:null!==(n=null===i||void 0===i?void 0:i.name)&&void 0!==n?n:""}),e):Object(o.jsx)(pt.a.Input,{active:!0},void 0)},t}(a.Component);var Qt=Object(l.b)((function(e){return{userInfo:e.UserSession.Value,selectedInstitution:e.Institution.Selected,selectedDistrict:e.District.Selected,selectedRPP:e.RegionalPlanningPartner.Selected}}),(function(e){return{logoutAction:function(){return e(Te.logout())},selectInstitution:function(t){return e(pe.select(t))},selectDistrict:function(t){return e($.select(t))},selectRPP:function(t){return e(Ee.select(t))}}}))(Ht),Kt=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Xt=function(){return Xt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Xt.apply(this,arguments)},Jt=p.a.Header,$t=function(e){function t(t){var n=e.call(this,t)||this;return n.loadInstitutions=function(){return ce.getAll(ne.className).then((function(e){e&&n.setState({institutions:null!==e&&void 0!==e?e:[]})}))},n.state={institutions:[],loading:!1},n}return Kt(t,e),t.prototype.componentDidMount=function(){var e=this,t=[];t.push(this.loadInstitutions()),Promise.all(t).then((function(){e.setState({loading:!1})}
1))},t.prototype.render=function(){return Object(o.jsx)(Jt,Xt({className:"app-header"},{children:Object(o.jsxs)(b.a,Xt({style:{paddingLeft:"20px",paddingRight:"20px"},className:"align-center"},{children:[Object(o.jsx)(Ze,{children:this.renderMenuToggle()},void 0),Object(o.jsx)(y.b,Xt({style:{marginLeft:"20px",marginRight:"auto"}},{children:Object(o.jsx)(at.a,Xt({to:x.HOME},{children:Object(o.jsxs)(y.b,Xt({direction:"horizontal",size:"large"},{children:[Object(o.jsx)("img",{src:"/IDOE-logo-grayscale.svg",alt:"IDOE.STICS",style:{width:"40px",height:"40px"}},void 0),Object(o.jsx)("div",{children:Object(o.jsx)(ot.a.Title,Xt({level:4,style:{color:"white"},className:"header-title"},{children:"Iowa Department of Education"}),void 0)},void 0)]}),void 0)}),void 0)}),void 0),this.renderUserDropdown()]}),void 0)}),void 0)},t.prototype.renderMenuToggle=function(){var e=this.props.collapsed?Object(o.jsx)(et.a,{onClick:this.props.toggleMenu,className:"header-icon"},void 0):Object(o.jsx)(tt.a,{onClick:this.props.toggleMenu,className:"header-icon"},void 0);return Object(o.jsx)("div",Xt({className:"align-center"},{children:e}),void 0)},t.prototype.renderUserDropdown=function(){return this.props.userInfo?Object(o.jsxs)(y.b,{children:[Object(o.jsx)(Qt,{},void 0),Object(o.jsx)(Lt,{},void 0)]},void 0):this.renderLogin()},t.prototype.renderLogin=function(){var e=Object(o.jsx)(Pt,{style:{width:"300px"}},void 0);return Object(o.jsx)(it.a,Xt({placement:"bottomRight",title:"",content:e,trigger:"click"},{children:Object(o.jsxs)(rt.a,Xt({shape:"round",size:"large",type:"primary"},{children:["Login ",Object(o.jsx)(nt.a,{},void 0)]}),void 0)}),"login_popover")},t}(a.Component);var Zt=Object(l.b)((function(e){return{userInfo:e.UserSession.Value}}),(function(e){return{logoutAction:function(){return e(Te.logout())}}}))($t),en=n(1497),tn=n(1498),nn=n(1499),rn=n(1500),on=n(414),an=n(1501),sn=n(1502),dn=n(1503),cn=n(1504),ln=n(1505),un=n(1506),pn=n(730),fn=n(1507),hn=n(1508),vn=n(1509),mn=n(1510),gn=function(){function e(){}return e.SYSTEM_ADMIN="SYSTEM_ADMIN",e.MANAGE_AA_USER="MANAGE_AA_USER",e.CONFIG_ACADEMIC_YEAR="CONFIG_ACADEMIC_YEAR",e.EDIT_AREA_EDUCATION_AGENCY="EDIT_AREA_EDUCATION_AGENCY",e.EDIT_ANNOUNCEMENT="EDIT_ANNOUNCEMENT",e.EDIT_APS_GENERAL_EDUCATION="EDIT_APS_GENERAL_EDUCATION",e.VIEW_APS_GENERAL_EDUCATION="VIEW_APS_GENERAL_EDUCATION",e.EDIT_AWARD_TYPE="EDIT_AWARD_TYPE",e.VIEW_AWARD_TYPE="VIEW_AWARD_TYPE",e.EDIT_PROGRAM_CLASSIFICATION="EDIT_PROGRAM_CLASSIFICATION",e.VIEW_PROGRAM_CLASSIFICATION="VIEW_PROGRAM_CLASSIFICATION",e.EDIT_CATEGORY="EDIT_CATEGORY",e.VIEW_CATEGORY="VIEW_CATEGORY",e.EDIT_CHANGE_REQUEST="EDIT_CHANGE_REQUEST",e.VIEW_CHANGE_REQUEST="VIEW_CHANGE_REQUEST",e.APPROVE_CHANGE_REQUEST="APPROVE_CHANGE_REQUEST",e.OVERRIDE_CHANGE_REQUEST_USER="OVERRIDE_CHANGE_REQUEST_USER",e.OVERRIDE_APPROVAL_USER="OVERRIDE_APPROVAL_USER",e.MANAGE_APPROVAL_USER="MANAGE_APPROVAL_USER",e.CREATE_ADMINISTRATIVE_CHANGE_REQUEST="CREATE_ADMINISTRATIVE_CHANGE_REQUEST",e.CREATE_NEW_DISCIPLINE_CHANGE_REQUEST="CREATE_NEW_DISCIPLINE_CHANGE_REQUEST",e.CREATE_NEW_COURSE_CHANGE_REQUEST="CREATE_NEW_COURSE_CHANGE_REQUEST",e.CREATE_COURSE_DEACTIVATION_CHANGE_REQUEST="CREATE_COURSE_DEACTIVATION_CHANGE_REQUEST",e.CREATE_MODIFY_COURSE_CHANGE_REQUEST="CREATE_MODIFY_COURSE_CHANGE_REQUEST",e.CREATE_NOTICE_OF_INTENT_REQUEST="CREATE_NOTICE_OF_INTENT_REQUEST",e.CREATE_NEW_PROGRAM_REQUEST="CREATE_NEW_PROGRAM_REQUEST",e.CREATE_PROGRAM_MODIFICATION_CHANGE_REQUEST="CREATE_PROGRAM_MODIFICATION_CHANGE_REQUEST",e.CREATE_PROGRAM_DEACTIVATION_REQUEST="CREATE_PROGRAM_DEACTIVATION_REQUEST",e.EDIT_COURSE="EDIT_COURSE",e.VIEW_COURSE="VIEW_COURSE",e.EDIT_CONTACT="EDIT_CONTACT",e.EDIT_CONTACT_TYPE="EDIT_CONTACT_TYPE",e.VIEW_CONTACT_TYPE="VIEW_CONTACT_TYPE",e.EDIT_CREDIT_TYPE="EDIT_CREDIT_TYPE",e.VIEW_CREDIT_TYPE="VIEW_CREDIT_TYPE",e.EDIT_DISCIPLINE="EDIT_DISCIPLINE",e.VIEW_DISCIPLINE="VIEW_DISCIPLINE",e.EDIT_DISTRICT="EDIT_DISTRICT",e.MANAGE_DISTRICT_USERS="MANAGE_DISTRICT_USERS",e.MANAGE_DISTRICT_CONTACT="MANAGE_DISTRICT_CONTACT",e.DOWNLOAD_REPORTS="DOWNLOAD_REPORTS",e.VIEW_DOCUMENT_ARCHIVE="VIEW_DOCUMENT_ARCHIVE",e.EDIT_EXTERNAL_INSTITUTIONS="EDIT_EXTERNAL_INSTITUTIONS",e.VIEW_EXTERNAL_INSTITUTIONS="VIEW_EXTERNAL_INSTITUTIONS",e.EDIT_FEDERAL_CLUSTER="EDIT_FEDERAL_CLUSTER",e.EDIT_GENDER="EDIT_GENDER",e.VIEW_GENDER="VIEW_GENDER",e.EDIT_GENERAL_EDUCATION="EDIT_GENERAL_EDUCATION",e.VIEW_GENERAL_EDUCATION="VIEW_GENERAL_EDUCATION",e.EDIT_ROLE="EDIT_ROLE",e.VIEW_ROLE="VIEW_ROLE",e.EDIT_REGIONAL_PLANNING_PARTNER="EDIT_REGIONAL_PLANNING_PARTNER",e.EDIT_INSTITUTION="EDIT_INSTITUTION",e.VIEW_INSTITUTION="VIEW_INSTITUTION",e.EDIT_INSTITUTION_COURSE_BLOCK="EDIT_INSTITUTION_COURSE_BLOCK",e.VIEW_INSTITUTION_COURSE_BLOCK="VIEW_INSTITUTION_COURSE_BLOCK",e.EDIT_INSTITUTION_CREDIT_TYPE_MINUTE="EDIT_INSTITUTION_CREDIT_TYPE_MINUTE",e.VIEW_INSTITUTION_CREDIT_TYPE_MINUTE="VIEW_INSTITUTION_CREDIT_TYPE_MINUTE",e.EDIT_INSTITUTION_LOCATION="EDIT_INSTITUTION_LOCATION",e.VIEW_INSTITUTION_LOCATION="VIEW_INSTITUTION_LOCATION",e.EDIT_INSTITUTION_PRESIDENT="EDIT_INSTITUTION_PRESIDENT",e.VIEW_INSTITUTION_PRESIDENT="
1VIEW_INSTITUTION_PRESIDENT",e.MANAGE_INSTITUTION_USER="MANAGE_INSTITUTION_USER",e.EDIT_INSTRUCTIONAL_LEVEL="EDIT_INSTRUCTIONAL_LEVEL",e.VIEW_INSTRUCTIONAL_LEVEL="VIEW_INSTRUCTIONAL_LEVEL",e.EDIT_IOWA_VARIATION="EDIT_IOWA_VARIATION",e.VIEW_IOWA_VARIATION="VIEW_IOWA_VARIATION",e.EDIT_PROGRAM="EDIT_PROGRAM",e.VIEW_PROGRAM="VIEW_PROGRAM",e.EDIT_TERM="EDIT_TERM",e.VIEW_TERM="VIEW_TERM",e.EDIT_THIRD_PARTY_CREDENTIAL_TYPE="EDIT_THIRD_PARTY_CREDENTIAL_TYPE",e.VIEW_THIRD_PARTY_CREDENTIAL_TYPE="VIEW_THIRD_PARTY_CREDENTIAL_TYPE",e.EDIT_USER="EDIT_USER",e.VIEW_USER="VIEW_USER",e.EDIT_CIP_NUMBER_ASSIGNMENTS="EDIT_CIP_NUMBER_ASSIGNMENTS",e.VIEW_CIP_NUMBER_ASSIGNMENTS="VIEW_CIP_NUMBER_ASSIGNMENTS",e.MANAGE_RPP_USERS="MANAGE_RPP_USERS",e.EDIT_CIP_NUMBER="EDIT_CIP_NUMBER",e.VIEW_CIP_NUMBER="VIEW_CIP_NUMBER",e.EDIT_OBJECT_PURPOSE="EDIT_OBJECT_PURPOSE",e.VIEW_OBJECT_PURPOSE="VIEW_OBJECT_PURPOSE",e.EDIT_RESOURCE="EDIT_RESOURCE",e.EDIT_RACIAL_EHTNIC_GROUPS="EDIT_RACIAL_EHTNIC_GROUPS",e.VIEW_RACIAL_EHTNIC_GROUPS="VIEW_RACIAL_EHTNIC_GROUPS",e.ASSIGN_DISTRICT_RESPONDER="ASSIGN_DISTRICT_RESPONDER",e.ASSIGN_RPP_RESPONDER="ASSIGN_RPP_RESPONDER",e.ASSIGN_DE_CONSULTANT_RESPONDER="ASSIGN_DE_CONSULTANT_RESPONDER",e.APPROVE_DISTRICT_RESPONSE="APPROVE_DISTRICT_RESPONSE",e.EDIT_PROGRAM_REVIEW="EDIT_PROGRAM_REVIEW",e.EDIT_DISTRICT_RESPONSE="EDIT_DISTRICT_RESPONSE",e.EDIT_RPP_RESPONSE="EDIT_RPP_RESPONSE",e.EDIT_DE_RESPONSE="EDIT_DE_RESPONSE",e.VIEW_CURRENT_PROGRAM_STATUS="VIEW_CURRENT_PROGRAM_STATUS",e.VIEW_DISTRICT_RESPONSE="VIEW_DISTRICT_RESPONSE",e.VIEW_RPP_RESPONSE="VIEW_RPP_RESPONSE",e.VIEW_DE_CONSULTANT_RESPONSE="VIEW_DE_CONSULTANT_RESPONSE",e.EDIT_SPECIAL_EMPHASIS="EDIT_SPECIAL_EMPHASIS",e.VIEW_SPECIAL_EMPHASIS="VIEW_SPECIAL_EMPHASIS",e.EDIT_SECONDARY_PROGRAM="EDIT_SECONDARY_PROGRAM",e.EDIT_SECONDARY_PROGRAM_SCENARIO="EDIT_SECONDARY_PROGRAM_SCENARIO",e.EDIT_SECONDARY_COURSE="EDIT_SECONDARY_COURSE",e.EDIT_SECONDARY_CIP_NUMBER="EDIT_SECONDARY_CIP_NUMBER",e.EDIT_SECONDARY_PROGRAM_COURSE="EDIT_SECONDARY_PROGRAM_COURSE",e.EDIT_TRANSFER_MAJOR_LACTS_CATEGORY="EDIT_TRANSFER_MAJOR_LACTS_CATEGORY",e.VIEW_TRANSFER_MAJOR_LACTS_CATEGORY="VIEW_TRANSFER_MAJOR_LACTS_CATEGORY",e.EDIT_TRANSFER_MAJOR_COURSE_BLOCKS="EDIT_TRANSFER_MAJOR_COURSE_BLOCKS",e.VIEW_TRANSFER_MAJOR_COURSE_BLOCKS="VIEW_TRANSFER_MAJOR_COURSE_BLOCKS",e.EDIT_TRANSFER_MAJOR_GENERAL_EDUCATION_TYPE="EDIT_TRANSFER_MAJOR_GENERAL_EDUCATION_TYPE",e.VIEW_TRANSFER_MAJOR_GENERAL_EDUCATION_TYPE="VIEW_TRANSFER_MAJOR_GENERAL_EDUCATION_TYPE",e.EDIT_TRANSFER_MAJOR_DISCIPLINE_FRAMEWORKS="EDIT_TRANSFER_MAJOR_DISCIPLINE_FRAMEWORKS",e.VIEW_TRANSFER_MAJOR_DISCIPLINE_FRAMEWORKS="VIEW_TRANSFER_MAJOR_DISCIPLINE_FRAMEWORKS",e.EDIT_TYPE_OF_PROGRAM="EDIT_TYPE_OF_PROGRAM",e.VIEW_TYPE_OF_PROGRAM="VIEW_TYPE_OF_PROGRAM",e.EDIT_SERVICE_AREA="EDIT_SERVICE_AREA",e.EDIT_USER_ROLE="EDIT_USER_ROLE",e.VIEW_USER_ROLE="VIEW_USER_ROLE",e.EDIT_WORKFLOW="EDIT_WORKFLOW",e.VIEW_ALL_WORK_ITEMS="VIEW_ALL_WORK_ITEMS",e.VIEW_INSTITUTION_WORK_ITEMS="VIEW_INSTITUTION_WORK_ITEMS",e.EDIT_WORK_BASED_LEARNING="EDIT_WORK_BASED_LEARNING",e.VIEW_WORK_BASED_LEARNING="VIEW_WORK_BASED_LEARNING",e.SUPPORT_CONTACT="SUPPORT_CONTACT",e.VIEW_API_TOKEN_USER="VIEW_API_TOKEN_USER",e.MANAGE_API_TOKEN_USER="MANAGE_API_TOKEN_USER",e}(),bn={SectionsNames:function(){function e(){}return e.DASHBOARD="dashboard",e.ANNOUNCEMENTS="announcements",e.SECONDARY_COURSES="secondaryCourses",e.CHANGE_REQUESTS="changeRequests",e.DISCIPLINES="disciplines",e.DISTRICTS="districts",e.CATEGORIES="categories",e.CREDIT_TYPES="crediTypes",e.COURSES="courses",e.CONTACTS="contacts",e.PROGRAMS="programs",e.INSTITUTIONS="institutions",e.USERS="users",e.DOCUMENTARCHIVE="documentArchive",e.CONSULTANTS="consultants",e.DOWNLOADS="downloads",e.RESOURCES="resources",e.CONFIGURATIONS="configuration",e.SECONDARY_PROGRAM="secondaryProgram",e.RPP="rpp",e.ROLES="roles",e.TERMS="terms",e.CIP_NUMBERS="cips",e.SPECIAL_EMPHASES="specialEmphasis",e.LOOKUP_CONFIGURATIONS="lookup_configuration",e.WORKFLOW_CONFIGURATIONS="workflows_configuration",e.WORK_ITEMS="work_items",e.API_TOKEN_USERS="api_token_users",e}(),SectionFeatureFlags:function(){function e(){}return e.ANNOUNCEMENTS=[gn.EDIT_ANNOUNCEMENT],e.AWARD_TYPE=[gn.EDIT_AWARD_TYPE,gn.VIEW_AWARD_TYPE],e.APS_GENERAL_EDUCATION=[gn.EDIT_APS_GENERAL_EDUCATION,gn.VIEW_APS_GENERAL_EDUCATION],e.CHANGE_REQUESTS=[gn.EDIT_CHANGE_REQUEST,gn.VIEW_CHANGE_REQUEST],e.DISCIPLINES=[gn.EDIT_DISCIPLINE,gn.VIEW_DISCIPLINE],e.DOCUMENTARCHIVE=[gn.VIEW_DOCUMENT_ARCHIVE],e.CATEGORIES=[gn.EDIT_CATEGORY,gn.VIEW_CATEGORY],e.CREDIT_TYPES=[gn.EDIT_CREDIT_TYPE,gn.VIEW_CREDIT_TYPE],e.COURSES=[gn.EDIT_COURSE,gn.VIEW_COURSE],e.CONTACT=[gn.EDIT_CONTACT],e.PROGRAMS=[gn.EDIT_PROGRAM,gn.VIEW_PROGRAM],e.INSTITUTIONS=[gn.EDIT_INSTITUTION,gn.VIEW_INSTITUTION],e.EXTERNAL_INSTITUTIONS=[gn.EDIT_EXTERNAL_INSTITUTIONS,gn.VIEW_EXTERNAL_INSTITUTIONS],e.GENDERS=[gn.EDIT_GENDER,gn.VIEW_GENDER],e.GENERAL_EDUCATION=[gn.EDIT_GENERAL_EDUCATION,gn.VIEW_GENERAL_EDUCATION],e.USERS=[gn.EDIT_USER,gn.VIEW_USER,gn.EDIT_USER_ROLE,gn.VIEW_USER_ROLE,gn.MANAGE_INSTITUTION_USER],e.ROLES=[gn.EDIT_ROLE,gn.VIEW_ROLE],e.TERMS=[gn.EDIT_TERM,gn.VIEW_TERM],e.CIP_NUMBERS=[gn.EDIT_CIP_NUMBER,gn.VIEW_CIP_NUMBER],e.INSTRUCTIONAL_LEVEL=[gn.EDIT_INSTRUCTIONAL_LEVEL,gn.VIEW_INSTRUCTIONAL_LEVEL],e.IOWA_VARIATION=[gn.EDIT_IOWA_VARIATION,gn.VIEW_IOWA_VARIATION],e.OBJECT_PURPOSE=[gn.EDIT_OBJECT_PURPOSE,gn.VIEW_OBJECT_PURPOSE],e.SPECIAL_EMPHASES=[gn.EDIT_SPECIAL_EMPHASIS,gn.VIEW_SPECIAL_EMPHASIS],e.TRANSFER_MAJOR_COURSE_BLOCKS=[gn.EDIT_TRANSFER_MAJOR_COURSE_BLOCKS,gn.VIEW_TRANSFER_MAJOR_COURSE_BLOCKS],e.TRANSFER_MAJOR_LACTS_CATEGORY=[gn.EDIT_TRANSFER_MAJOR_LACTS_CATEGORY,gn.VIEW_TRANSFER_MAJOR_LACTS_CATEGORY],e.TRANSFER_MAJOR_DISCIPLINE_FRAMEWORKS=[gn.EDIT_TRANSFER_MAJOR_DISCIPLINE_FRAMEWORKS,gn.VIEW_TRANSFER_MAJOR_DISCIPLINE_FRAMEWORKS],e.TRANSFER_MAJOR_GENERAL_EDUCATION_TYPE=[gn.EDIT_TRANSFER_MAJOR_GENERAL_EDUCATION_TYPE,gn.VIEW_TRANSFER_MAJOR_GENERAL_EDUCATION_TYPE],e.TYPE_OF_PROGRAM=[gn.EDIT_TYPE_OF_PROGRAM,gn.VIEW_TYPE_OF_PROGRAM],e.API_TOKEN_USERS=[gn.MANAGE_API_TOKEN_USER,gn.VIEW_API_TOKEN_USER],e.DISTRICT=[gn.EDIT_DISTRICT,gn.MANAGE_DISTRICT_CONTACT,gn.MANAGE_DISTRICT_USERS],e.RPP=[gn.EDIT_REGIONAL_PLANNING_PARTNER,gn.MANAGE_RPP_USERS],e.SECONDARY_PROGRAM=[gn.EDIT_SECONDARY_PROGRAM],e.SECONDARY_COURSES=[gn.EDIT_SECONDARY_COURSE],e.PROGRAM_REVIEW=[gn.APPROVE_DISTRICT_RESPONSE,gn.ASSIGN_DISTRICT_RESPONDER,gn.ASSIGN_RPP_RESPONDER,gn.ASSIGN_DE_CONSULTANT_RESPONDER,gn.EDIT_PROGRAM_REVIEW,gn.EDIT_DISTRICT_RESPONSE,gn.EDIT_RPP_RESPONSE,gn.EDIT_DE_RESPONSE,gn.VIEW_CURRENT_PROGRAM_STATUS,gn.VIEW_DISTRICT_RESPONSE,gn.VIEW_RPP_RESPONSE,gn.VIEW_DE_CONSULTANT_RESPONSE],e.CONFIGURATIONS=e.CATEGORIES.concat(e.AWARD_TYPE).concat(e.APS_GENERAL_EDUCATION).concat(e.CIP_NUMBERS).c
1oncat(e.COURSES).concat(e.EXTERNAL_INSTITUTIONS).concat(e.GENDERS).concat(e.GENERAL_EDUCATION).concat(e.CREDIT_TYPES).concat(e.DISCIPLINES).concat(e.OBJECT_PURPOSE).concat(e.ROLES).concat(e.INSTRUCTIONAL_LEVEL).concat(e.IOWA_VARIATION).concat(e.SPECIAL_EMPHASES).concat(e.TRANSFER_MAJOR_COURSE_BLOCKS).concat(e.TRANSFER_MAJOR_LACTS_CATEGORY).concat(e.TRANSFER_MAJOR_DISCIPLINE_FRAMEWORKS).concat(e.TRANSFER_MAJOR_GENERAL_EDUCATION_TYPE).concat(e.TYPE_OF_PROGRAM).concat(e.TERMS),e}()},yn=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),On=function(){return On=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},On.apply(this,arguments)},jn=p.a.Sider,In=function(e){function t(t){var n=e.call(this,t)||this;return n.state={current:""},n}return yn(t,e),t.prototype.render=function(){var e=[this.state.current],t=null!=this.props.institution&&void 0!=this.props.institution,n=!this.props.institution&&Je.isAuthorized([gn.EDIT_RESOURCE])?Object(o.jsx)(at.a,On({to:x.generate(x.ADMIN_RESOURCES)},{children:"Resources"}),void 0):Object(o.jsx)(at.a,On({to:x.generate(x.RESOURCES)},{children:"Resources"}),void 0);return Object(o.jsx)(jn,On({trigger:null,collapsible:!0,collapsed:this.props.collapsed,theme:"dark",width:250,collapsedWidth:80,breakpoint:"lg"},{children:Object(o.jsxs)(Gt.a,On({theme:"dark",defaultSelectedKeys:[bn.SectionsNames.DASHBOARD],selectedKeys:e,mode:"inline"},{children:[Object(o.jsx)(Gt.a.Item,On({title:"Dashboard",icon:Object(o.jsx)(en.a,{},void 0)},{children:Object(o.jsx)(at.a,On({to:x.generate(x.HOME)},{children:"Dashboard"}),void 0)}),bn.SectionsNames.DASHBOARD),Object(o.jsx)(Gt.a.Item,On({title:"Work Items",icon:Object(o.jsx)(tn.a,{},void 0)},{children:Object(o.jsx)(at.a,On({to:x.generate(x.WORK_ITEMS)},{children:"Work Items"}),void 0)}),bn.SectionsNames.WORK_ITEMS),this.renderAnnouncements(t),this.renderSecondariesEducation(t,n),Object(o.jsxs)(Gt.a.SubMenu,On({title:"Users"},{children:[Object(o.jsx)(Gt.a.Item,On({title:"Users",icon:Object(o.jsx)(nn.a,{},void 0),hidden:!Je.isAuthorized(bn.SectionFeatureFlags.USERS)},{children:Object(o.jsx)(at.a,On({to:x.generate(x.USERS)},{children:"Users"}),void 0)}),bn.SectionsNames.USERS),Object(o.jsx)(Gt.a.Item,On({title:"API Token Users",icon:Object(o.jsx)(nn.a,{},void 0),hidden:!Je.isAuthorized(bn.SectionFeatureFlags.API_TOKEN_USERS)},{children:Object(o.jsx)(at.a,On({to:x.generate(x.API_TOKEN_USERS)},{children:"API Token Users"}),void 0)}),"API Token Users")]}),void 0),this.renderStateActions(t),this.renderDocumentArchives()]}),void 0)}),void 0)},t.prototype.renderDocumentArchives=function(){return Object(o.jsx)(Gt.a.Item,On({title:"DocumentArchive",icon:Object(o.jsx)(rn.a,{},void 0),hidden:!Je.isAuthorized(bn.SectionFeatureFlags.DOCUMENTARCHIVE)},{children:Object(o.jsx)(at.a,On({to:x.generate(x.DOCUMENTARCHIVES)},{children:"Document Archive"}),void 0)}),bn.SectionsNames.DOCUMENTARCHIVE)},t.prototype.renderSecondariesEducation=function(e,t){var n,r,i,a,s,d,c,l=this,u=Je.isAuthorized(bn.SectionFeatureFlags.DISTRICT)||Je.isAuthorized(bn.SectionFeatureFlags.RPP)||Je.isAuthorized(bn.SectionFeatureFlags.SECONDARY_PROGRAM)||Je.isAuthorized(bn.SectionFeatureFlags.SECONDARY_COURSES)||Je.isAuthorized(bn.SectionFeatureFlags.PROGRAM_REVIEW),p=Je.isAuthorized(bn.SectionFeatureFlags.CHANGE_REQUESTS)||Je.isAuthorized(bn.SectionFeatureFlags.PROGRAMS)||Je.isAuthorized(bn.SectionFeatureFlags.COURSES)||Je.isAuthorized([gn.EDIT_CONTACT])||Je.isAuthorized(bn.SectionFeatureFlags.INSTITUTIONS)||Je.isAuthorized([gn.EDIT_RESOURCE]);return(null!==(r=null===(n=this.props.userInfo)||void 0===n?void 0:n.districtIds.findIndex((function(e){var t;return e==(null===(t=l.props.selectedDistrict)||void 0===t?void 0:t.districtId)})))&&void 0!==r?r:-1)>-1||(null!==(a=null===(i=this.props.userInfo)||void 0===i?void 0:i.rppIds.findIndex((function(e){var t;return e==(null===(t=l.props.selectedRPP)||void 0===t?void 0:t.regi
1onalPlanningPartnerIdentifier)})))&&void 0!==a?a:-1)>-1||u&&!p?this.renderSecondaryEducation():(null!==(d=null===(s=this.props.userInfo)||void 0===s?void 0:s.institutionIds.findIndex((function(e){var t;return e==(null===(t=l.props.institution)||void 0===t?void 0:t.id)})))&&void 0!==d?d:-1)>-1||!u&&p?this.renderPostSecondaryEducation(e,t):(null===(c=this.props.userInfo)||void 0===c?void 0:c.isStateUser)||u&&p?Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(Gt.a.SubMenu,On({title:"Secondary Education"},{children:this.renderSecondaryEducation()}),void 0),Object(o.jsx)(Gt.a.SubMenu,On({title:"Post-Secondary Education"},{children:this.renderPostSecondaryEducation(e,t)}),void 0)]},void 0):void 0},t.prototype.renderSecondaryEducation=function(){return Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(Gt.a.Item,On({title:"Program Review Years",icon:Object(o.jsx)(on.a,{},void 0)},{children:Object(o.jsx)(at.a,On({to:x.generate(x.ACADEMIC_YEARS)},{children:"Program Review Years"}),void 0)}),"Program Review Years"),Object(o.jsx)(Gt.a.Item,On({title:"Districts",icon:Object(o.jsx)(an.a,{},void 0),hidden:!Je.isAuthorized(bn.SectionFeatureFlags.DISTRICT)},{children:Object(o.jsx)(at.a,On({to:x.generate(x.ALL_DISTRICTS)},{children:"Districts"}),void 0)}),"Districts"),Object(o.jsx)(Gt.a.Item,On({title:"RPP",icon:Object(o.jsx)(sn.a,{},void 0),hidden:!Je.isAuthorized(bn.SectionFeatureFlags.RPP)},{children:Object(o.jsx)(at.a,On({to:x.generate(x.REGIONAL_PLANNING_PARTNERS)},{children:"RPP"}),void 0)}),"RPP"),Object(o.jsx)(Gt.a.Item,On({title:"Programs",icon:Object(o.jsx)(dn.a,{},void 0),hidden:!Je.isAuthorized(bn.SectionFeatureFlags.SECONDARY_PROGRAM)},{children:Object(o.jsx)(at.a,On({to:x.generate(x.ALL_SECONDARY_PROGRAMS)},{children:"Programs"}),void 0)}),"Programs"),Object(o.jsx)(Gt.a.Item,On({title:"Courses",icon:Object(o.jsx)(cn.a,{},void 0),hidden:!Je.isAuthorized(bn.SectionFeatureFlags.SECONDARY_COURSES)},{children:Object(o.jsx)(at.a,On({to:x.generate(x.ALL_SECONDARY_COURSES)},{children:"Courses"}),void 0)}),bn.SectionsNames.COURSES)]},void 0)},t.prototype.renderPostSecondaryEducation=function(e,t){return Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(Gt.a.Item,On({title:"Change Requests",icon:Object(o.jsx)(ln.a,{},void 0),hidden:!Je.isAuthorized(bn.SectionFeatureFlags.CHANGE_REQUESTS)},{children:Object(o.jsx)(at.a,On({to:x.generate(x.CHANGE_REQUESTS)},{children:"Change Requests"}),void 0)}),bn.SectionsNames.CHANGE_REQUESTS),this.renderInstitutionDetails(e),Object(o.jsx)(Gt.a.Item,On({title:"Programs",icon:Object(o.jsx)(dn.a,{},void 0),hidden:!Je.isAuthorized(bn.SectionFeatureFlags.PROGRAMS)},{children:Object(o.jsx)(at.a,On({to:x.generate(x.PROGRAMS)},{children:"Programs"}),void 0)}),bn.SectionsNames.PROGRAMS),Object(o.jsx)(Gt.a.Item,On({title:"Courses",icon:Object(o.jsx)(cn.a,{},void 0),hidden:!Je.isAuthorized(bn.SectionFeatureFlags.COURSES)},{children:Object(o.jsx)(at.a,On({to:x.generate(x.COURSES)},{children:"Courses"}),void 0)}),bn.SectionsNames.COURSES),Object(o.jsx)(Gt.a.Item,On({title:"Resources",icon:Object(o.jsx)(un.a,{},void 0)},{children:t}),bn.SectionsNames.RESOURCES),Object(o.jsx)(Gt.a.Item,On({title:"Downloads",icon:Object(o.jsx)(pn.a,{},void 0)},{children:Object(o.jsx)(at.a,On({to:x.generate(x.DOWNLOADS_SECTION)},{children:"Downloads"}),void 0)}),bn.SectionsNames.DOWNLOADS),Object(o.jsx)(Gt.a.Item,On({title:"Contacts",icon:Object(o.jsx)(fn.a,{},void 0),hidden:!Je.isAuthorized([gn.EDIT_CONTACT])},{children:Object(o.jsx)(at.a,On({to:x.generate(x.CONTACTS)},{children:"Contacts"}),void 0)}),bn.SectionsNames.CONTACTS),Object(o.jsx)(Gt.a.Item,On({title:"Consultants",icon:Object(o.jsx)(hn.a,{},void 0)},{children:Object(o.jsx)(at.a,On({to:x.generate(x.CONSULTANTS)},{children:"Consultants"}),void 0)}),bn.SectionsNames.CONSULTANTS)]},void 0)},t.prototype.renderStateActions=function(e){if(!e)return Object(o.jsx)(Gt.a.Item,On({title:"Configuration",icon:Object(o.jsx)(vn.a,{},void 0),hidden:!Je.isAuthorized(bn.SectionFeatureFlags.CONFIGURATIONS)},{children:Object(o.jsx)(at.a,On({to:x.generate(x.CONFIGURATIONS)},{children:"Configuration"}),void 0)}),bn.SectionsNames.CONFIGURATIONS)}
1,t.prototype.renderInstitutionDetails=function(e){var t,n;return e?Object(o.jsx)(Gt.a.Item,On({title:"Community College Details",icon:Object(o.jsx)(an.a,{},void 0),hidden:!Je.isAuthorized(bn.SectionFeatureFlags.INSTITUTIONS)},{children:Object(o.jsx)(at.a,On({to:x.generate(x.INSTITUTION_DETAILS,{id:null!==(n=null===(t=this.props.institution)||void 0===t?void 0:t.id)&&void 0!==n?n:""})},{children:"Community College"}),void 0)}),bn.SectionsNames.INSTITUTIONS):Je.isAuthorized([gn.EDIT_INSTITUTION])?Object(o.jsx)(Gt.a.Item,On({title:"Community Colleges",icon:Object(o.jsx)(an.a,{},void 0),hidden:!Je.isAuthorized(bn.SectionFeatureFlags.INSTITUTIONS)},{children:Object(o.jsx)(at.a,On({to:x.generate(x.INSTITUTIONS)},{children:"Community Colleges"}),void 0)}),bn.SectionsNames.INSTITUTIONS):void 0},t.prototype.renderAnnouncements=function(e){if(!e)return Object(o.jsx)(Gt.a.Item,On({title:"Announcements",icon:Object(o.jsx)(mn.a,{},void 0),hidden:!Je.isAuthorized(bn.SectionFeatureFlags.ANNOUNCEMENTS)},{children:Object(o.jsx)(at.a,On({to:x.generate(x.ANNOUNCEMENTS)},{children:"Announcements"}),void 0)}),bn.SectionsNames.ANNOUNCEMENTS)},t}(a.Component),Sn=function(){function e(){}return e.FULL={xs:{span:24,offset:0},sm:{span:24,offset:0},md:{span:24,offset:0},lg:{span:24,offset:0},xl:{span:24,offset:0},xxl:{span:24,offset:0}},e.EXTRA_EXTRA_WIDE={xs:{span:24,offset:0},sm:{span:24,offset:0},md:{span:24,offset:0},lg:{span:22,offset:1},xl:{span:20,offset:2},xxl:{span:18,offset:3}},e.EXTRA_WIDE={xs:{span:24,offset:0},sm:{span:24,offset:0},md:{span:22,offset:1},lg:{span:20,offset:2},xl:{span:18,offset:3},xxl:{span:16,offset:4}},e.WIDE={xs:{span:24,offset:0},sm:{span:22,offset:1},md:{span:20,offset:2},lg:{span:18,offset:3},xl:{span:16,offset:4},xxl:{span:14,offset:5}},e.MEDIUM={xs:{span:24,offset:0},sm:{span:22,offset:1},md:{span:18,offset:4},lg:{span:14,offset:5},xl:{span:12,offset:6},xxl:{span:10,offset:7}},e.SMALLISH={xs:{span:24,offset:0},sm:{span:16,offset:4},md:{span:14,offset:5},lg:{span:12,offset:6},xl:{span:10,offset:7},xxl:{span:8,offset:8}},e.SMALL={xs:{span:24,offset:0},sm:{span:14,offset:5},md:{span:12,offset:6},lg:{span:10,offset:7},xl:{span:8,offset:8},xxl:{span:6,offset:9}},e.TINY={xs:{span:24,offset:0},sm:{span:12,offset:6},md:{span:10,offset:7},lg:{span:8,offset:8},xl:{span:6,offset:9},xxl:{span:4,offset:10}},e}(),En=function(){function e(){}return e.FULL={xs:{span:24},sm:{span:24},md:{span:24},lg:{span:24},xl:{span:24},xxl:{span:24}},e.ONE_EIGHTH={xs:{span:24},sm:{span:24},md:{span:24},lg:{span:3},xl:{span:3},xxl:{span:3}},e.ONE_SIXTH={xs:{span:24},sm:{span:24},md:{span:24},lg:{span:4},xl:{span:4},xxl:{span:4}},e.THREE_EIGHTHS={xs:{span:24},sm:{span:24},md:{span:24},lg:{span:9},xl:{span:9},xxl:{span:9}},e.FIVE_EIGHTHS={xs:{span:24},sm:{span:24},md:{span:24},lg:{span:15},xl:{span:15},xxl:{span:15}},e.THREE_QUARTERS={xs:{span:24},sm:{span:24},md:{span:24},lg:{span:18},xl:{span:18},xxl:{span:18}},e.TWO_THIRDS={xs:{span:24},sm:{span:24},md:{span:24},lg:{span:16},xl:{span:16},xxl:{span:16}},e.HALF={xs:{span:24},sm:{span:24},md:{span:24},lg:{span:24},xl:{span:12},xxl:{span:12}},e.ONE_THIRD={xs:{span:24},sm:{span:24},md:{span:24},lg:{span:8},xl:{span:8},xxl:{span:8}},e.ONE_QUARTER={xs:{span:24},sm:{span:24},md:{span:24},lg:{span:6},xl:{span:6},xxl:{span:6}},e.FIVE_SIXTH={xs:{span:24},sm:{span:24},md:{span:24},lg:{span:20},xl:{span:20},xxl:{span:20}},e.CENTERED_HALF={xs:{span:24},sm:{span:24},md:{span:24},lg:{span:24},xl:{span:12,offset:6},xxl:{span:12,offset:6}},e.CENTERED_THREE_QUARTERS={xs:{span:24},sm:{span:24},md:{span:24},lg:{span:24},xl:{span:18,offset:3},xxl:{span:18,offset:3}},e}(),Rn=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),_n=function(){return _n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},_n.apply(this,arguments)},Tn=function(e){function t(t){var n=e.call(this,t)||this;return n.toggle=function(){n.setState({collapsed:!n.state.collapsed})},n.onCollapse=n.onCollapse.bind(n),n.toggleMenu=n.toggleMenu.bind(n),n.state={collapsed:!0},n}return Rn(t,e),t.prototype.toggleMenu=function(){this.setState({collapsed:!this.state.collapsed})},t.prototype.onCollapse=function(e){this.setState({collapsed:e})},t.prototype.render=function(){return Object(o.jsx)(g.a,_n({componentSize:"middle"},{children:Object(o.jsxs)(p.a,_n({style:{minHeight:"100vh"}},{children:[Object(o.jsx)(Zt,{toggleMenu:this.toggleMenu,collapsed:this.state.collapsed},void 0),Object(o.jsx)(p.a,{children:Object(o.jsxs)(p.a,{children:[Object(o.jsx)(Ze,{children:Object(o.jsx)(In,{collapseMenu:this.toggleMenu,collapsed:this.state.collapsed,institution:this.props.institution},void 0)},void 0),this.renderContent()]},void 0)},void 0),Object(o.jsx)(v.a,{},void 0)]}),void 0)}),void 0)},t.prototype.renderContent=function(){var e={},t="";switch(this.props.width){case"full":e=Sn.FULL,t="width-full";break;case"tiny":e=Sn.TINY,t="width-tiny";break;case"small":e=Sn.SMALL,t="width-small";break;case"smallish":e=Sn.SMALLISH,t="width-small";break;case"medium":e=Sn.MEDIUM,t="width-medium";break;case"extraWide":e=Sn.EXTRA_WIDE,t="width-extraWide";break;case"extraExtraWide":e=Sn.EXTRA_EXTRA_WIDE,t="width-extraWide";break;default:e=Sn.WIDE,t="width-wide"}return Object(o.jsx)(p.a,{children:Object(o.jsx)(O.Content,{children:Object(o.jsxs)(y.b,_n({direction:"vertical",size:"small"},{children:[Object(o.jsx)(b.a,{children:Object(o.jsx)("div",{id:"headerPortal",className:"breadcrumb-area"},void 0)},void 0),Object(o.jsx)(b.a,{children:Object(o.jsx)(m.a,_n({},e,{className:t},{children:this.props.children}),void 0)},void 0)]}),void 0)},void 0)},void 0)},t}(a.Component);var Cn=Object(u.i)(Object(l.b)((function(e){return{institution:e.Institution.Selected}}),(function(e){return{logoutAction:function(){return e(Te.logout())}}}))(Tn)),xn=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),An=function(){return An=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},An.apply(this,arguments)},Pn=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},Nn=function(e){function t(t){return e.call(this,t)||this}return xn(t,e),t.prototype.getComponent=function(e){var t,n=this.props.layout,r=this.props.component,i=null!==(t=this.props.width)&&void 0!==t?t:"default";if(!r)throw new Error("component prop must be set!");return n||(n=Cn),Object(o.jsx)(n,An({},e,{width:i}
1,{children:Object(o.jsx)(r,An({},e),void 0)}),void 0)},t.prototype.render=function(){var e=this,t=this.props,n=(t.component,Pn(t,["component"]));return Object(o.jsx)(u.c,An({},n,{render:function(t){return e.getComponent(t)}}),void 0)},t}(a.Component),wn=n(127),Dn=(n(206),function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),qn=function(){return qn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},qn.apply(this,arguments)},Fn=function(e){function t(t){return e.call(this,t)||this}return Dn(t,e),t.prototype.render=function(){return Object(o.jsx)(wn.a,{status:"403",title:"Unauthorized",subTitle:"Sorry, you are not authorized to access this page.",extra:Object(o.jsx)(at.a,qn({to:"/"},{children:Object(o.jsx)(rt.a,qn({type:"primary"},{children:"Home"}),void 0)}),void 0)},void 0)},t}(a.Component),Mn=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Yn=function(){return Yn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Yn.apply(this,arguments)},Un=function(e,t,n){return function(r){var i=function(i){function a(e){var t=i.call(this,e)||this;if(!r)throw new Error('componentWrapper function was passed "null" for the "InnerComponent" argument.');return t}return Mn(a,i),a.prototype.render=function(){var i,a,s=!1,d=!!(e&&e.length>0),c=!!(t&&t.length>0);if(!this.props.user){var l=T.location.pathname+T.location.search;return Object(o.jsx)(u.b,{to:x.generate(x.LOGIN,{},{returnUrl:l})},void 0)}if(n&&!this.props.user)s=!1;else{if(d||c||(s=!0),!s&&d)for(var p=0,f=null!==(i=null===e||void 0===e?void 0:e.length)&&void 0!==i?i:0;p<f;p++)if(e&&this.props.user.hasFeatureFlag(e[p])){s=!0;break}if(!s&&c)for(p=0,f=null!==(a=null===t||void 0===t?void 0:t.length)&&void 0!==a?a:0;p<f;p++)if(t&&this.props.user.userName===t[p]){s=!0;break}}return s?Object(o.jsx)(r,Yn({},this.props),void 0):Object(o.jsx)(Fn,{},void 0)},a}(a.Component);return Object(l.b)((function(e){return{user:e.UserSession.Value}}),(function(e){return{checkAction:function(){return e(Te.check())}}}))(i)}},Ln=n(509),kn=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Gn=function(e){function t(t){var n=e.call(this,t)||this;return n.handleIdle=function(){var e,t=null!==(e=n.props.warnMinutes)&&void 0!==e?e:0;0===t?n.handleLogout():f.a.warn({title:"Are you still there?",okText:"I'm Still Here",onOk:n.handleActive,content:Object(o.jsxs)("div",{children:[Object(o.jsx)(ot.a.Paragraph,{children:"You are about to be logged out due to inactivity."},void 0),Object(o.jsx)(Ln.a,{ref:function(e){return n.warnRef=e},timeout:6e4*t,onIdle:n.handleLogout},"warn_timer")]},void 0)})},n.handleActive=function(){n.props.onActive&&n.props.onActive()},n.handleLogout=function(){n.props.logoutAction(),f.a.destroyAll(),f.a.info({title:"Logged Out",content:"You have been logged out due to inactivity."})},n.state={},n}return kn(t,e),t.prototype.render=function(){var e,t=this,n=(this.props.idleMinutes>0?this.props.idleMinutes:15)-(null!==(e=this.props.warnMinutes)&&void 0!==e?e:0);return this.props.userInfo?Object(o.jsx)(Ln.a,{ref:function(e){return t.idleRef=e},timeout:6e4*n,onIdle:this.handleIdle},"idle_timer"):null},t}(a.Component);var Vn=Object(l.b)((function(e){return{userInfo:e.UserSession.Value}}),(function(e){return{logoutAction:function(){return e(Te.logout())}}}))(Gn),Bn=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Wn=function(){return Wn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Wn.apply(this,arguments)},zn=function(e){function t(t){var n=e.call(this,t)||this;return n.toggle=function(){n.setState({collapsed:!n.state.collapsed})},n.onCollapse=n.onCollapse.bind(n),n.toggleMenu=n.toggleMenu.bind(n),n.state={collapsed:!1},n}return Bn(t,e),t.prototype.toggleMenu=function(){this.setState({collapsed:!this.state.collapsed})},t.prototype.onCollapse=function(e){this.setState({collapsed:e})},t.prototype.handlePing=function(){G.ping()},t.prototype.render=function(){var e=$idleTimer;return Object(o.jsx)(g.a,Wn({componentSize:"middle"},{children:Object(o.jsxs)(p.a,Wn({style:{minHeight:"100vh"}},{children:[Object(o.jsx)(Vn,{idleMinutes:e,warnMinutes:1,onActive:this.handlePing},void 0),Object(o.jsx)(Zt,{toggleMenu:this.toggleMenu,collapsed:this.state.collapsed},void 0),Object(o.jsx)(p.a,{children:Object(o.jsxs)(p.a,{children:[Object(o.jsx)(Ze,{children:Object(o.jsx)(In,{collapseMenu:this.toggleMenu,collapsed:this.state.collapsed,institution:this.props.organization,selectedDistrict:this.props.selectedDistrict,selectedRPP:this.props.selectedRPP,userInfo:this.props.userInfo},void 0)},void 0),this.renderContent()]},void 0)},void 0),Object(o.jsx)(v.a,{},void 0)]}),void 0)}),void 0)},t.prototype.renderContent=function(){var e={},t="";switch(this.props.width){case"full":e=Sn.FULL,t="width-full";break;case"tiny":e=Sn.TINY,t="width-tiny";break;case"small":e=Sn.SMALL,t="width-small";break;case"smallish":e=Sn.SMALLISH,t="width-small";break;case"medium":e=Sn.MEDIUM,t="width-medium";break;case"extraWide":e=Sn.EXTRA_WIDE,t="width-extraWide";break;case"extraExtraWide":e=Sn.EXTRA_EXTRA_WIDE,t="width-extraWide";break;default:e=Sn.WIDE,t="width-wide"}return Object(o.jsx)(p.a,{children:Object(o.jsx)(O.Content,{children:Object(o.jsxs)(y.b,Wn({direction:"vertical",size:"small"},{children:[Object(o.jsx)(b.a,{children:Object(o.jsx)("div",{id:"headerPortal",className:"breadcrumb-area"},void 0)},void 0),Object(o.jsx)(b.a,{children:Object(o.jsx)(m.a,Wn({},e,{className:t},{children:this.props.children}),void 0)},void 0)]}),void 0)},void 0)},void 0)},t}(a.Component);var Hn=Object(u.i)(Object(l.b)((function(e){return{organization:e.Organization.Selected,selectedDistrict:e.District.Selected,selectedRPP:e.RegionalPlanningPartner.Selected,userInfo:e.UserSession.Value}}),(function(e){return{logoutAction:function(){return e(Te.logout())}}}))(zn)),Qn=n(11),Kn=(n(24),n(42)),Xn=(n(170),function(){function e(){}return e.home=function(){return[{breadcrumbName:"Home",path:x.generate(x.HOME)}]},e.secondary=function(){return this.home().concat([{breadcrumbName:"Secondary",path:x.generate(x.SECONDARY_HOME)}])},e.postSecondary=function(){return this.home().concat([{breadcrumbName:"Post-Secondary",path:x.generate(x.POST_SECONDARY_HOME)}])},e.documentArchive=function(){return this.home().concat([{breadcrumbName:"Document Archive",path:x.generate(x.DOCUMENTARCHIVES)}])},e.academicYearList=function(){return this.academicYears().concat([{breadcrumbName:"All",path:x.generate(x.ALL_ACADEMIC_YEARS)}])},e.districtListFromSelfStudies=function(e){return this.academicYearDashboard(Number.parseInt(e)).concat([{breadcrumbName:"Districts",path:x.generate(x.DISTRICTS,{academicYearId:e})}])},e.districtReview=function(e){return this.academicYearDashboard(e).concat([{breadcrumbName:"Districts",path:x.generate(x.DISTRICTS,{academicYearId:e})}])},e.districtList=function(){return null==Xe.Get()?this.home().concat([{breadcrumbName:"Districts",path:x.generate(x.ALL_DISTRICTS)}]):this.secondary().concat([{breadcrumbName:"Districts",path:x.generate(x.ALL_DISTRICTS)}])},e.districtDetailPage=function(e,t,n){return this.districtList().concat([{breadcrumbName:e,path:x.generate(x.DISTRICT_DETAILS,{id:t},{academicYear:n})}])},e.districtDetailPageFromRPP=function(e,t,n,r,i){return this.regionDetailPage(t,i).concat([{breadcrumbName:e,path:x.generate(x.DISTRICT_DETAILS,{id:n},{academicYear:r})}])},e.secondaryProgramReview=function(e){return this.academicYearDashboard(e).concat([{breadcrumbName:"Program",path:x.generate(x.SECONDARY_PROGRAMS,{academicYearId:e})}])},e.secondaryProgramList=function(){return null==Xe.Get()?this.home().concat([{breadcrumbName:"Programs",path:x.generate(x.ALL_SECONDARY_PROGRAMS)}]):this.secondary().concat([{breadcrumbName:"Programs",path:x.generate(x.ALL_SECONDARY_PROGRAMS)}])},e.secondaryProgramDetailPage=function(e,t,n,r,i,o){return null==Xe.Get()?i==re.default.Empty()||null==i?this.secondaryProgramList().concat([{breadcrumbName:e,path:x.generate(x.SECONDARY_PROGRAM_DETAILS,{id:null!==t&&void 0!==t?t:re.default.Empty()},{academicYear:n})}]):this.districtDetailPage(null!==o&&void 0!==o?o:"",null!==i&&void 0!==i?i:re.default.Empty(),n).concat([{breadcrumbName:e,path:x.generate(x.SECONDARY_PROGRAM_DETAILS,{id:null!==t&&void 0!==t?t:re.default.Empty()},{academicYear:n})}]):r?this.secondaryProgramReview(n).concat([{breadcrumbName:e,path:x.generate(x.SECONDARY_PROGRAM_DETAILS,{id:t})}]):this.secondaryProgramList().concat([{breadcrumbName:e,path:x.generate(x.SECONDARY_PROGRAM_DETAILS,{id:t},{academicYear:n})}])},e.secondaryProgramDetailFromDistrict=function(e,t,n,r,i,o){return null==Xe.Get()?this.districtDetailPage(null!==o&&void 0!==o?o:"",null!==i&&void 0!==i?i:re.default.Empty(),n).concat([{breadcrumbName:e,path:x.generate(x.SECONDARY_PROGRAM_DETAILS,{id:null!==t&&void 0!==t?t:re.default.Empty()},{academicYear:n})}]):this.districtDetailPage(null!==o&&void 0!==o?o:"",null!==i&&void 0!==i?i:re.default.Empty(),n).concat([{breadcrumbName:e,path:x.generate(x.SECONDARY_PROGRAM_DETAILS,{id:t})}])},e.selfStudyListFromSelfStudies=function(e,t){return t?this.academicYearDashboardFromAcademicList(e).concat([{breadcrumbName:"Program Review",path:x.generate(x.SECONDARY_PROGRAMS,{academicYearId:e})}]):this.academicYearDashboard(e).concat([{breadcrumbName:"Program Review",path:x.generate(x.SECONDARY_PROGRAMS,{academicYearId:e})}])},e.selfStudyReport=function(e){return this.academicYearDashboard(e).concat([{breadcrumbName:"Program Review Ranking Report",path:x.generate(x.ACADEMIC_YEAR_SELF_STUDY_RANKING_REPORT,{academicYearId:e})}])},e.programConsultantCommentReport=function(e){return this.academicYearDashboard(e).concat([{breadcrumbName:"Program Consultant Comment Report",path:x.generate(x.ACADEMIC_YEAR_PROGRAM_CONSULTANT_COMMENT_REPORT,{academicYearId:e})}])},e.aggregateReport=function(e){return this.academicYearDashboard(e).concat([{breadcrumbName:"Aggregate Report",path:x.generate(x.ACADEMIC_YEAR_PROGRAM_CONSULTANT_COMMENT_REPORT,{academicYearId:e})}])},e.selfStudyList=function(e){return this.academicYears().concat([{breadcrumbName:"Program Review Years "+e,path:x.generate(x.ACADEMIC_YEAR_DASHBOARD_FROM_LIST,{academicYearId:e})}])},e.selfStudyListPage=function(e){return this.academicYearDashboard(e).concat([{breadcrumbName:"Confirm Programs",path:x.generate(x.SELF_STUDIES_REVIEW,{academicYearId:e})}])},e.selfStudyDisplayPage=function(e,t,n){return this.academicYearDashboard(t).concat([{breadcrumbName:n,path:x.generate(x.SELF_STUDIES_DISPLAY,{id:e})}])},e.selfStudyDisplayPageFromProgramForReview=function(e,t,n){return this.selfStudyListPage(t).concat([{breadcrumbName:n,path:x.generate(x.SELF_STUDIES_DISPLAY,{id:e})}])},e.selfStudyDetailPage=function(e,t,n,r,i){return i?this.selfStudyListFromSelfStudies(n,r).concat([{breadcrumbName:e,path:x.generate(x.SECONDARY_PROGRAM_DETAILS,{id:t})}
1]):this.selfStudyList(n).concat([{breadcrumbName:e,path:x.generate(x.SECONDARY_PROGRAM_DETAILS,{id:t})}])},e.selfStudyDetailFromDistrict=function(e,t,n,r,i){return this.districtDetailPage(r,i,n).concat([{breadcrumbName:e,path:x.generate(x.SELF_STUDIES_DISPLAY,{id:t})}])},e.secondaryCipNumberReview=function(e){return this.academicYearDashboard(e).concat([{breadcrumbName:"Secondary CIP Number",path:x.generate(x.SECONDARY_CIP_NUMBERS,{academicYearId:e})}])},e.completeSelfStudy=function(e,t,n,r,i){return this.selfStudyDisplayPage(r,n,t).concat([{breadcrumbName:e,path:x.generate(x.COMPLETE_SELF_STUDIES,{selfStudyResponseId:re.default.Empty(),academicYearId:n,sectionIndex:0},{step:i})}])},e.secondaryCipNumberList=function(){return this.postSecondary().concat([{breadcrumbName:"CIP Numbers",path:x.generate(x.ALL_SECONDARY_PROGRAMS)}])},e.secondaryCipNumberConfigurationList=function(){return this.configuration().concat([{breadcrumbName:"CIP Numbers",path:x.generate(x.SECONDARY_CIP_NUMBERS_CONFIGURATION)}])},e.secondaryCipNumberDetailPage=function(e,t,n,r,i){return i?this.secondaryCipNumberReview(n).concat([{breadcrumbName:e,path:x.generate(x.SECONDARY_CIP_NUMBER_DETAILS,{id:t})}]):this.secondaryCipNumberList().concat([{breadcrumbName:e,path:x.generate(x.SECONDARY_CIP_NUMBER_DETAILS,{id:t})}])},e.secondaryCourseListFromSelfStudies=function(e,t){return t?this.academicYearDashboardFromAcademicList(Number.parseInt(e)).concat([{breadcrumbName:"Courses",path:x.generate(x.SECONDARY_COURSES,{academicYearId:e})}]):this.academicYearDashboard(Number.parseInt(e)).concat([{breadcrumbName:"Courses",path:x.generate(x.SECONDARY_COURSES,{academicYearId:e})}])},e.secondaryCourseReview=function(e){return this.academicYearDashboard(e).concat([{breadcrumbName:"Courses",path:x.generate(x.SECONDARY_COURSES,{academicYearId:e})}])},e.secondaryCourseList=function(){return this.secondary().concat([{breadcrumbName:"Courses",path:x.generate(x.ALL_SECONDARY_COURSES)}])},e.secondaryCourseDetailPage=function(e,t,n,r,i,o,a,s,d){return null==Xe.Get()?this.secondaryProgramDetailPage(null!==d&&void 0!==d?d:"",null!==s&&void 0!==s?s:re.default.Empty(),n,i,o,a).concat([{breadcrumbName:e,path:x.generate(x.SECONDARY_COURSE_DETAILS,{id:null!==t&&void 0!==t?t:re.default.Empty()})}]):i?this.secondaryCourseListFromSelfStudies(n.toString(),r).concat([{breadcrumbName:e,path:x.generate(x.SECONDARY_COURSE_DETAILS,{id:t},{academicYear:n})}]):this.secondaryCourseList().concat([{breadcrumbName:e,path:x.generate(x.SECONDARY_COURSE_DETAILS,{id:t},{academicYear:n})}])},e.secondaryCourseDetailFromSecondaryPRogram=function(e,t,n,r,i,o,a,s,d){return this.secondaryProgramDetailPage(null!==d&&void 0!==d?d:"",null!==s&&void 0!==s?s:re.default.Empty(),n,i,o,a).concat([{breadcrumbName:e,path:x.generate(x.SECONDARY_COURSE_DETAILS,{id:null!==t&&void 0!==t?t:re.default.Empty()})}])},e.academicYearActionPlanReport=function(e){return this.academicYearDashboard(e).concat([{breadcrumbName:"Action Plan Report",path:x.generate(x.ACADEMIC_YEAR_ACTION_PLAN_REPORT,{academicYearId:e})}])},e.academicYearProgramMasterReport=function(e){return this.academicYearDashboard(e).concat([{breadcrumbName:"Program Master Report",path:x.generate(x.ACADEMIC_YEAR_PROGRAM_MASTER_REPORT,{academicYearId:e})}])},e.academicYearCareerAcademyReport=function(e){return this.academicYearDashboard(e).concat([{breadcrumbName:"Career Academy Report",path:x.generate(x.ACADEMIC_YEAR_CAREER_ACADEMY_REPORT,{academicYearId:e})}])},e.academicYearContactsReport=function(e){return this.academicYearDashboard(e).concat([{breadcrumbName:"Contacts Report",path:x.generate(x.ACADEMIC_YEAR_CONTACTS_REPORT,{academicYearId:e})}])},e.academicYearScenarioReport=function(e){return this.academicYearDashboard(e).concat([{breadcrumbName:"Scenario Report",path:x.generate(x.ACADEMIC_YEAR_SCENARIO_REPORT,{academicYearId:e})}])},e.academicYearEducationProgramReport=function(e){return this.academicYearDashboard(e).concat([{breadcrumbName:"Education Program Report",path:x.generate(x.ACADEMIC_YEAR_EDUCATION_PROGRAM_REPORT,{academicYearId:e})}])},e.academicYearDataReview=function(e){return this.academicYearDashboard(e).concat([{breadcrumbName:"Data Review",path:""}])},e.secondaryProgramCourseReview=function(e){return this.academicYearDashboard(e).concat([{breadcrumbName:"Program Courses",path:x.generate(x.DATA_REVIEW_SECONDARY_PROGRAM_COURSES,{academicYearId:e})}])},e.areaEducationAgencyReview=function(e){return this.academicYearDashboard(e).concat([{breadcrumbName:"Area Education Agency",path:x.generate(x.AREA_EDUCATION_AGENCIES,{academicYearId:e})}])},e.areaEducationAgencyList=function(e,t){return t?this.newAcademicYearFromA
1cademicList(e).concat([{breadcrumbName:"Area Education Agencies",path:x.generate(x.REVIEW_AREA_EDUCATION_AGENCY,{academicYearId:e},{reviewAcademicYear:!0})}]):this.academicYearDashboardFromAcademicList(e).concat([{breadcrumbName:"Area Education Agencies",path:x.generate(x.ALL_AREA_EDUCATION_AGENCIES)}])},e.areaEducationAgencyConfigurationList=function(){return this.configuration().concat([{breadcrumbName:"Area Education Agencies",path:x.generate(x.AREA_EDUCATION_AGENCIES_CONFIGURATION)}])},e.academicYearAreaEducationAgencyConfigurationList=function(e){return this.academicYearDashboard(e).concat([{breadcrumbName:"Area Education Agencies",path:x.generate(x.ACADEMIC_YEAR_AREA_EDUCATION_AGENCIES_CONFIGURATION,{academicYearId:e})}])},e.academicYearDatesConfigurationList=function(e){return this.academicYearDashboard(e).concat([{breadcrumbName:"Dates",path:x.generate(x.ACADEMIC_YEAR_CONFIGURATION,{academicYearId:e})}])},e.academicYearServiceAreaConfigurationList=function(e){return this.academicYearDashboard(e).concat([{breadcrumbName:"Service Areas",path:x.generate(x.ACADEMIC_YEAR_SERVICE_AREAS_CONFIGURATION,{academicYearId:e})}])},e.academicYearFederalClusterConfigurationList=function(e){return this.academicYearDashboard(e).concat([{breadcrumbName:"Federal Clusters",path:x.generate(x.ACADEMIC_YEAR_FEDERAL_CLUSTERS_CONFIGURATION,{academicYearId:e})}])},e.academicYearScenariosConfigurationList=function(e){return this.academicYearDashboard(e).concat([{breadcrumbName:"Scenarios",path:x.generate(x.ACADEMIC_YEAR_SCENARIOS_CONFIGURATION,{academicYearId:e})}])},e.academicYearRPPConfigurationList=function(e){return this.academicYearDashboard(e).concat([{breadcrumbName:"Regional Planning Partners",path:x.generate(x.ACADEMIC_YEAR_REGIONAL_PLANNING_PARTNER_CONFIGURATION,{academicYearId:e})}])},e.academicYearSecondaryCipNumberConfigurationList=function(e){return this.academicYearDashboard(e).concat([{breadcrumbName:"CIP Numbers",path:x.generate(x.ACADEMIC_YEAR_SECONDARY_CIP_NUMBER_CONFIGURATION,{academicYearId:e})}])},e.academicYearDistrictConfigurationList=function(e){return this.academicYearDashboard(e).concat([{breadcrumbName:"Districts",path:x.generate(x.ACADEMIC_YEAR_DISTRICT_CONFIGURATION,{academicYearId:e})}])},e.academicYearDistrictContactsConfigurationList=function(e){return this.academicYearDashboard(e).concat([{breadcrumbName:"District Contacts",path:x.generate(x.ACADEMIC_YEAR_DISTRICT_CONTACT_CONFIGURATION,{academicYearId:e})}])},e.academicYearSecondaryProgramsConfigurationList=function(e){return this.academicYearDashboard(e).concat([{breadcrumbName:"Programs",path:x.generate(x.ACADEMIC_YEAR_SECONDARY_PROGRAM_CONFIGURATION,{academicYearId:e})}])},e.academicYearSecondaryProgramsConfigurationDetail=function(e,t){return this.academicYearSecondaryProgramsConfigurationList(e).concat([{breadcrumbName:"Program Details",path:x.generate(x.SECONDARY_PROGRAM_DETAILS,{id:t})}])},e.academicYearSecondaryCoursesConfigurationList=function(e){return this.academicYearDashboard(e).concat([{breadcrumbName:"Courses",path:x.generate(x.ACADEMIC_YEAR_SECONDARY_COURSES_CONFIGURATION,{academicYearId:e})}])},e.academicYearSecondaryProgramCoursesConfigurationList=function(e){return this.academicYearDashboard(e).concat([{breadcrumbName:"Program Courses",path:x.generate(x.ACADEMIC_YEAR_SECONDARY_PROGRAM_COURSES_CONFIGURATION,{academicYearId:e})}])},e.areaEducationAgencyDetailPage=function(e,t,n,r,i,o){return o?this.areaEducationAgencyList(n,o).concat([{breadcrumbName:e,path:x.generate(x.AREA_EDUCATION_AGENCY_DETAILS,{id:t},{academicYearId:n,fromAcademicYearList:r,fromSelfStudies:i,reviewAcademicYear:o})}]):i?this.areaEducationAgencyReview(n).concat([{breadcrumbName:e,path:x.generate(x.AREA_EDUCATION_AGENCY_DETAILS,{id:t})}]):this.areaEducationAgencyList(n,o).concat([{breadcrumbName:e,path:x.generate(x.AREA_EDUCATION_AGENCY_DETAILS,{id:t})}])},e.SecondaryProgramScenarioReview=function(e){return this.academicYearDashboard(Number.parseInt(e)).concat([{breadcrumbName:"ProgramType",path:x.generate(x.SECONDARY_PROGRAM_TYPES,{academicYearId:e})}])},e.SecondaryProgramScenarioList=function(){return this.home().concat([{breadcrumbName:"ProgramTypes",path:x.generate(x.ALL_SECONDARY_PROGRAM_TYPES)}])},e.ScenarioConfigurationList=function(){return this.configuration().concat([{breadcrumbName:"Scenarios",path:x.generate(x.SCENARIO_CONFIGURATION)}])},e.SecondaryProgramScenarioDetailPage=function(e,t,n,r,i){return i?this.SecondaryProgramScenarioReview(n.toString()).concat([{breadcrumbName:e,path:x.generate(x.SECONDARY_PROGRAM_TYPE_DETAILS,{id:t})}]):this.SecondaryProgramScenarioList().concat([{breadcrumbName:e,path:x.generate(x.SECONDARY_PROGRAM_TYPE_DETAILS,{id:t})}])},e.secondaryProgramCourseListFromSelfStudies=function(e,t){return t?this.academicYearDashboardFromAcademicList(Number.parseInt(e)).concat([{breadcrumbName:"ProgramCourse",path:x.generate(x.SECONDARY_PROGRAM_COURSES,{academicYearId:e})}]):this.academicYearDashboard(Number.parseInt(e)).concat([{breadcrumbName:"ProgramCourse",path:x.generate(x.SECONDARY_PROGRAM_COURSES,{academicYearId:e})}])},e.secondaryProgramCourseList=function(){return this.home().concat([{breadcrumbName:"Program Courses",path:x.generate(x.ALL_SECONDARY_PROGRAM_COURSES)}])},e.announcementList=function(){return this.home().concat([{breadcrumbName:"Announcements",path:x.generate(x.ANNOUNCEMENTS)}])},e.allAnnouncements=function(){return this.home().concat([{breadcrumbName:"Announcements",path:x.generate(x.ANNOUNCEMENTS)}])},e.announcementDetails=function(e,t){var n=t==re.default.Empty()?x.generate(x.NEW_ANNOUNCEMENT):x.generate(x.ANNOUNCEMENT_DETAILS,{id:t});return this.announcementList().concat([{breadcrumbName:e,path:n}])},e.awardTypeList=function(){return this.configuration().concat([{breadcrumbName:"Award Type",path:x.generate(x.AWARD_TYPE)}])},e.thirdPartyCredentialTypeList=function(){return this.configuration().concat([{breadcrumbName:"Third Party Credential Type",path:x.generate(x.THIRD_PARTY_CREDENTIAL_TYPES)}])},e.thirdPartyCredentialTypeDetails=function(e,t){var n=0==t?x.generate(x.NEW_THIRD_PARTY_CREDENTIAL_TYPE):x.generate(x.THIRD_PARTY_CREDENTIAL_TYPE_DETAILS,{id:t});return this.thirdPartyCredentialTypeList().concat([{breadcrumbName:e,path:n}])},e.awardTypeDetails=function(e,t){var n=0==t?x.generate(x.NEW_AWARD_TYPE):x.generate(x.AWARD_TYPE_DETAILS,{id:t});return this.awardTypeList().concat([{breadcrumbName:e,path:n}])},e.apsGeneralEducationList=function(){return this.configuration().concat([{breadcrumbName:"APS General Education",path:x.generate(x.APS_GENERAL_EDUCATION)}])}
1,e.apsGeneralEducationDetails=function(e,t){var n=0==t?x.generate(x.NEW_APS_GENERAL_EDUCATION):x.generate(x.APS_GENERAL_EDUCATION_DETAILS,{id:t});return this.apsGeneralEducationList().concat([{breadcrumbName:e,path:n}])},e.categoryList=function(){return this.configuration().concat([{breadcrumbName:"Categories",path:x.generate(x.CATEGORIES)}])},e.categoryDetails=function(e,t){var n=t==re.default.Empty()?x.generate(x.NEW_CATEGORY):x.generate(x.CATEGORY_DETAILS,{id:t});return this.categoryList().concat([{breadcrumbName:e,path:n}])},e.changeRequestList=function(){return this.postSecondary().concat([{breadcrumbName:"Change Requests",path:x.generate(x.CHANGE_REQUESTS)}])},e.changeRequestDetails=function(e,t){return this.changeRequestList().concat([{breadcrumbName:e,path:x.generate(x.CHANGE_REQUEST_DETAILS,{id:t})}])},e.changeRequestApproval=function(e,t){return this.changeRequestList().concat([{breadcrumbName:e,path:x.generate(x.CHANGE_REQUEST_APPROVAL,{id:t})}])},e.changeRequestTypes=function(){return this.configuration().concat([{breadcrumbName:"Change Request Types",path:x.generate(x.CHANGE_REQUEST_TYPE)}])},e.changeRequestTypeDetails=function(e,t){var n=0==t?x.generate(x.CHANGE_REQUEST_TYPE):x.generate(x.CHANGE_REQUEST_TYPE_DETAILS,{id:t});return this.changeRequestTypes().concat([{breadcrumbName:e,path:n}])},e.programList=function(){return this.postSecondary().concat([{breadcrumbName:"Programs",path:x.generate(x.PROGRAMS)}])},e.programDetails=function(e,t){return this.programList().concat([{breadcrumbName:e,path:x.generate(x.PROGRAM_DETAILS,{id:t})}])},e.courseList=function(){return this.postSecondary().concat([{breadcrumbName:"Courses",path:x.generate(x.COURSES)}])},e.courseDetails=function(e,t,n,r){var i=r==re.default.Empty()?x.generate(x.NEW_COURSE):x.generate(x.COURSE_DETAILS,{institutionCourseId:r});return this.courseList().concat([{breadcrumbName:e,path:i}])},e.courseDetailFromSecondaryCourses=function(e,t,n,r,i,o,a){var s=r==re.default.Empty()?x.generate(x.NEW_COURSE):x.generate(x.COURSE_DETAILS,{institutionCourseId:r});return this.secondaryCourseDetailPage(i,o,a,!1,!1).concat([{breadcrumbName:e,path:s}])},e.contactList=function(){return this.postSecondary().concat([{breadcrumbName:"Contacts",path:x.generate(x.CONTACTS)}])},e.institutionCourseBlockDetails=function(e,t){return this.courseList().concat([{breadcrumbName:e,path:x.generate(x.INSTITUITION_COURSE_BLOCK_DETAILS,{id:t})}])},e.singleInstitutionCourseDetails=function(e,t,n){return this.courseList().concat([{breadcrumbName:e,path:x.generate(x.SINGLE_INSTITUTION_COURSE_DETAILS,{courseId:t,institutionId:n})}])},e.institutionCourseDetails=function(e,t,n,r,i){return this.institutionDetails(e,t).concat([{breadcrumbName:n,path:x.generate(x.INSTITUTION_COURSE_DETAILS,{courseId:r,institutionId:t,institutionCourseId:i})}])},e.courseInstitutionDetials=function(e,t,n,r,i){return this.courseDetails(e,t,r,i).concat([{breadcrumbName:n,path:x.generate(x.COURSE_INSTITUTION_DETAILS,{courseId:t,institutionId:r,institutionCourseId:i})}])},e.configuration=function(){return this.home().concat([{breadcrumbName:"Configuration",path:x.generate(x.CONFIGURATIONS)}])},e.creditTypeList=function(){return this.configuration().concat([{breadcrumbName:"Credit Types",path:x.generate(x.CREDIT_TYPES)}])},e.creditTypeDetails=function(e,t){var n=t==re.default.Empty()?x.generate(x.NEW_CREDIT_TYPE):x.generate(x.CREDIT_TYPE_DETAILS,{id:t});return this.creditTypeList().concat([{breadcrumbName:e,path:n}])},e.contactTypeList=function(){return this.configuration().concat([{breadcrumbName:"Contact Types",path:x.generate(x.CONTACT_TYPE)}])},e.contactTypeDetails=function(e,t){var n=0==t?x.generate(x.NEW_CREDIT_TYPE):x.generate(x.CREDIT_TYPE_DETAILS,{id:t});return this.contactTypeList().concat([{breadcrumbName:e,path:n}])},e.dashboard=function(){return[{breadcrumbName:"Home",path:""}]},e.disciplineList=function(){return this.configuration().concat([{breadcrumbName:"Disciplines",path:x.generate(x.DISCIPLINES)}])},e.disciplineDetails=function(e,t){var n=t==re.default.Empty()?x.generate(x.NEW_DISCIPLINE):x.generate(x.DISCIPLINE_DETAILS,{id:t});return this.disciplineList().concat([{breadcrumbName:e,path:n}])},e.institutionList=function(){return this.postSecondary().concat([{breadcrumbName:"Institutions",path:x.generate(x.INSTITUTIONS)}])}
1,e.singleInstitutionDetails=function(e,t){return this.home().concat([{breadcrumbName:e,path:x.generate(x.INSTITUTION_DETAILS,{id:t})}])},e.institutionDetails=function(e,t){var n=t==re.default.Empty()?x.generate(x.NEW_INSTITUTION):x.generate(x.INSTITUTION_DETAILS,{id:t});return this.institutionList().concat([{breadcrumbName:e,path:n}])},e.institutionUserDetails=function(e,t,n,r){return this.institutionDetails(e,t).concat([{breadcrumbName:n,path:x.generate(x.USER_INSTITUTION_DETAILS,{userId:r,institutionId:t})}])},e.userInstitutionDetials=function(e,t,n,r){return this.userDetails(e,t).concat([{breadcrumbName:n,path:x.generate(x.INSTITUTION_USER_DETAILS,{userId:t,institutionId:r})}])},e.newNoticeOfIntentChangeRequests=function(){return this.changeRequestList().concat([{breadcrumbName:"Notice Of Intent Request",path:x.generate(x.CHANGE_REQUESTS)}])},e.newDisciplineChangeRequestEntry=function(e,t){var n=t==re.default.Empty()?x.generate(x.NEW_DISCIPLINE_CHANGE_REQUEST_ENTRY):x.generate(x.EXISTING_NEW_DISCIPLINE_CHANGE_REQUEST_ENTRY_1,{id:t});return this.changeRequestList().concat([{breadcrumbName:e,path:n}])},e.administrativeChangeRequestEntry=function(e,t){var n=t==re.default.Empty()?x.generate(x.ADMINISTRATIVE_CHANGE_REQUEST_ENTRY):x.generate(x.EXISTING_ADMINISTRATIVE_CHANGE_REQUEST_ENTRY_1,{id:t});return this.changeRequestList().concat([{breadcrumbName:e,path:n}])},e.newCourseChangeRequestEntry=function(e,t){var n=t==re.default.Empty()?x.generate(x.NEW_COURSE_CHANGE_REQUEST_ENTRY):x.generate(x.EXISTING_NEW_COURSE_CHANGE_REQUEST_ENTRY_1,{id:t});return this.changeRequestList().concat([{breadcrumbName:e,path:n}])},e.courseDeactivationChangeRequestEntry=function(e,t){var n=t==re.default.Empty()?x.generate(x.COURSE_DEACTIVATION_CHANGE_REQUEST_ENTRY):x.generate(x.EXISTING_COURSE_DEACTIVATION_CHANGE_REQUEST_ENTRY_1,{id:t});return this.changeRequestList().concat([{breadcrumbName:e,path:n}])},e.courseModificationChangeRequestEntry=function(e,t){var n=t==re.default.Empty()?x.generate(x.COURSE_MODIFICATION_CHANGE_REQUEST_ENTRY):x.generate(x.EXISTING_COURSE_MODIFICATION_CHANGE_REQUEST_ENTRY_2,{id:t});return this.changeRequestList().concat([{breadcrumbName:e,path:n}])},e.newProgramChangeRequestEntry=function(e,t){var n=t==re.default.Empty()?x.generate(x.NEW_PROGRAM_CHANGE_REQUEST_ENTRY):x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_1,{id:t});return this.changeRequestList().concat([{breadcrumbName:e,path:n}])},e.noticeOfIntentChangeRequestEntry=function(e,t){var n=t==re.default.Empty()?x.generate(x.NEW_NOTICE_OF_INTENT_CHANGE_REQUEST_ENTRY):x.generate(x.EXISTING_NOTICE_OF_INTENT_CHANGE_REQUEST_ENTRY_1,{id:t});return this.changeRequestList().concat([{breadcrumbName:e,path:n}])},e.programDeactivationChangeRequestEntry=function(e,t){var n=t==re.default.Empty()?x.generate(x.PROGRAM_DEACTIVATION_CHANGE_REQUEST_ENTRY):x.generate(x.EXISTING_PROGRAM_DEACTIVATION_CHANGE_REQUEST_ENTRY_1,{id:t});return this.changeRequestList().concat([{breadcrumbName:e,path:n}])},e.programModificationChangeRequestEntry=function(e,t){var n=t==re.default.Empty()?x.generate(x.NEW_PROGRAM_MODIFICATION_CHANGE_REQUEST_ENTRY):x.generate(x.EXISTING_PROGRAM_MODIFICATION_CHANGE_REQUEST_ENTRY_1,{id:t});return this.changeRequestList().concat([{breadcrumbName:e,path:n}])},e.publicConsultantSearch=function(){return this.postSecondary().concat([{breadcrumbName:"Consultants",path:x.generate(x.CONSULTANTS)}])},e.adminResources=function(){return this.postSecondary().concat([{breadcrumbName:"Resources",path:x.generate(x.ADMIN_RESOURCES)}])},e.publicResources=function(){return this.postSecondary().concat([{breadcrumbName:"Resources",path:x.generate(x.RESOURCES)}])},e.downLoads=function(){return this.postSecondary().concat([{breadcrumbName:"Downloads",path:x.generate(x.DOWNLOADS_SECTION)}])},e.roleDetails=function(e,t){var n=t==re.default.Empty()?x.generate(x.NEW_ROLE):x.generate(x.ROLE_DETAILS,{id:t});return this.roleList().concat([{breadcrumbName:e,path:n}])},e.roleList=function(){return this.configuration().concat([{breadcrumbName:"Roles",path:x.generate(x.ROLES)}])},e.cipNumberList=function(){return this.configuration().concat([{breadcrumbName:"CIP Numbers",path:x.generate(x.CIPS)}])},e.cipNumberDetails=function(e,t){var n=t==re.default.Empty()?x.generate(x.NEW_CIP):x.generate(x.CIP_DETAILS,{id:t});return this.cipNumberList().concat([{breadcrumbName:e,path:n}])},e.NoticeOfIntentChangeRequestWorkForceLinkList=function(){return this.configuration().concat([{breadcrumbName:"Workforce Informational Links",path:x.generate(x.NOTICE_OF_INTENT_CHANGE_REQUEST_WORKFORCE_LINK)}])},e.programClassificationList=function(){return this.configuration().concat([{breadcrumbName:"Program Classifications",path:x.generate(x.PROGRAM_CLASSIFICATION)}])}
1,e.programClassificationDetails=function(e,t){var n=0==t?x.generate(x.NEW_PROGRAM_CLASSIFICATION):x.generate(x.PROGRAM_CLASSIFICATION_DETAILS,{id:t});return this.programClassificationList().concat([{breadcrumbName:e,path:n}])},e.instructionalLevelList=function(){return this.configuration().concat([{breadcrumbName:"Instructional Levels",path:x.generate(x.INSTRUCTIONAL_LEVEL)}])},e.instructionalLevelDetails=function(e,t){var n=0==t?x.generate(x.NEW_INSTRUCTIONAL_LEVEL):x.generate(x.INSTRUCTIONAL_LEVEL_DETAILS,{id:t});return this.instructionalLevelList().concat([{breadcrumbName:e,path:n}])},e.workBasedLearningTypeList=function(){return this.configuration().concat([{breadcrumbName:"Work Based Learning Types",path:x.generate(x.WORK_BASED_LEARNING_TYPE)}])},e.workBasedLearningTypeDetails=function(e,t){var n=0==t?x.generate(x.NEW_WORK_BASED_LEARNING_TYPE):x.generate(x.WORK_BASED_LEARNING_DETAILS,{id:t});return this.workBasedLearningTypeList().concat([{breadcrumbName:e,path:n}])},e.externalInstitutionList=function(){return this.configuration().concat([{breadcrumbName:"External Institutions",path:x.generate(x.EXTERNAL_INSTITUTIONS)}])},e.externalIntitutionDetails=function(e,t){var n=0==t?x.generate(x.NEW_EXTERNAL_INSTITUTIONS):x.generate(x.EXTERNAL_INSTITUTIONS_DETAILS,{id:t});return this.externalInstitutionList().concat([{breadcrumbName:e,path:n}])},e.genderList=function(){return this.configuration().concat([{breadcrumbName:"Genders",path:x.generate(x.GENDER)}])},e.genderDetails=function(e,t){var n=0==t?x.generate(x.NEW_GENDER):x.generate(x.GENDER_DETAILS,{id:t});return this.genderList().concat([{breadcrumbName:e,path:n}])},e.generalEducationList=function(){return this.configuration().concat([{breadcrumbName:"General Education",path:x.generate(x.GENERAL_EDUCATION)}])},e.generalEducationDetails=function(e,t){var n=0==t?x.generate(x.NEW_GENERAL_EDUCATION):x.generate(x.GENERAL_EDUCATION_DETAILS,{id:t});return this.generalEducationList().concat([{breadcrumbName:e,path:n}])},e.iowaVariationList=function(){return this.configuration().concat([{breadcrumbName:"Iowa Variations",path:x.generate(x.IOWA_VARIATION)}])},e.iowaVariationDetails=function(e,t){var n=0==t?x.generate(x.NEW_IOWA_VARIATION):x.generate(x.IOWA_VARIATION_DETAILS,{id:t});return this.iowaVariationList().concat([{breadcrumbName:e,path:n}])},e.objectPurposeList=function(){return this.configuration().concat([{breadcrumbName:"Object Purposes",path:x.generate(x.OBJECT_PURPOSE)}])},e.objectPurposeDetails=function(e,t){var n=0==t?x.generate(x.NEW_OBJECT_PURPOSE):x.generate(x.OBJECT_PURPOSE_DETAILS,{id:t});return this.objectPurposeList().concat([{breadcrumbName:e,path:n}])},e.specialEmphasisList=function(){return this.configuration().concat([{breadcrumbName:"Special Emphases",path:x.generate(x.SPECIAL_EMPHASIS)}])},e.specialEmphasisDetails=function(e,t){var n=0==t?x.generate(x.NEW_SPECIAL_EMPHASIS):x.generate(x.SPECIAL_EMPHASIS_DETAILS,{id:t});return this.specialEmphasisList().concat([{breadcrumbName:e,path:n}])},e.racialEthnicGroupList=function(){return this.configuration().concat([{breadcrumbName:"Racial/Ethnic Groups",path:x.generate(x.RACIAL_ETHNIC_GROUPS)}])},e.racialEthnicGroupDetails=function(e,t){var n=0==t?x.generate(x.NEW_RACIAL_ETHNIC_GROUP):x.generate(x.RACIAL_ETHNIC_GROUP_DETAILS,{id:t});return this.racialEthnicGroupList().concat([{breadcrumbName:e,path:n}])},e.federalClusterReview=function(e){return this.academicYearDashboard(Number.parseInt(e)).concat([{breadcrumbName:"Federal Clusters",path:x.generate(x.FEDERAL_CLUSTERS,{academicYearId:e})}])},e.federalClusterList=function(){return this.home().concat([{breadcrumbName:"Federal Clusters",path:x.generate(x.ALL_FEDERAL_CLUSTERS)}])},e.federalClusterConfigurationList=function(){return this.configuration().concat([{breadcrumbName:"Federal Clusters",path:x.generate(x.FEDERAL_CLUSTERS_CONFIGURATION)}])},e.federalClusterDetailPage=function(e,t,n,r,i){return i?this.federalClusterReview(n.toString()).concat([{breadcrumbName:e,path:x.generate(x.FEDERAL_CLUSTER_DETAILS,{id:t})}]):this.federalClusterList().concat([{breadcrumbName:e,path:x.generate(x.FEDERAL_CLUSTER_DETAILS,{id:t})}])},e.serviceAreaReview=function(e){return this.academicYearDashboard(Number.parseInt(e)).concat([{breadcrumbName:"Service Areas",path:x.generate(x.SERVICE_AREAS,{academicYearId:e})}])},e.serviceAreaList=function(){return this.home().concat([{breadcrumbName:"Service Areas",path:x.generate(x.ALL_SERVICE_AREAS)}])},e.serviceAreaConfigurationList=function(){return this.configuration().concat([{breadcrumbName:"Service Areas",path:x.generate(x.FEDERAL_CLUSTERS_CONFIGURATION)}])},e.serviceAreaDetailPage=function(e,t,n,r,i){return i?this.serviceAreaReview(n.toString()).concat([{breadcrumbName:e,path:x.generate(x.SERVICE_AREA_DETAILS,{id:t})}]):this.serviceAreaList().concat([{breadcrumbName:e,path:x.generate(x.SERVICE_AREA_DETAILS,{id:t})}])},e.transferMajorLactsCategoryList=function(){return this.configuration().concat([{breadcrumbName:"Transfer Major Lacts Category",path:x.generate(x.TRANSFER_MAJOR_LACTS_CATEGORY)}])},e.transferMajorLactsCategoryDetails=function(e,t){var n=0==t?x.generate(x.NEW_TRANSFER_MAJOR_LACTS_CATEGORY):x.generate(x.TRANSFER_MAJOR_LACTS_CATEGORY_DETAILS,{id:t});return this.transferMajorLactsCategoryList().concat([{breadcrumbName:e,path:n}])},e.transferMajorCourseBlockList=function(){return this.configuration().concat([{breadcrumbName:"Transfer Major Course Block",path:x.generate(x.TRANSFER_MAJOR_COURSE_BLOCK)}])}
1,e.transferMajorCourseBlockDetails=function(e,t){var n=0==t?x.generate(x.NEW_TRANSFER_MAJOR_COURSE_BLOCK):x.generate(x.TRANSFER_MAJOR_COURSE_BLOCK_DETAILS,{id:t});return this.transferMajorCourseBlockList().concat([{breadcrumbName:e,path:n}])},e.transferMajorDisciplineFrameworkElementList=function(){return this.configuration().concat([{breadcrumbName:"Discipline Framework Element",path:x.generate(x.TRANSFER_MAJOR_DISCIPLINE_FRAMEWORK_ELEMENT)}])},e.transferMajorDisciplineFrameworkElementDetails=function(e,t){var n=0==t?x.generate(x.NEW_TRANSFER_MAJOR_DISCIPLINE_FRAMEWORK_ELEMENT):x.generate(x.TRANSFER_MAJOR_DISCIPLINE_FRAMEWORK_ELEMENT_DETAILS,{id:t});return this.transferMajorDisciplineFrameworkElementList().concat([{breadcrumbName:e,path:n}])},e.transferMajorGeneralEducationTypeList=function(){return this.configuration().concat([{breadcrumbName:"General Education Type",path:x.generate(x.TRANSFER_MAJOR_GENERAL_EDUCATION_TYPE)}])},e.transferMajorGeneralEducationTypeDetails=function(e,t){var n=0==t?x.generate(x.NEW_TRANSFER_MAJOR_GENERAL_EDUCATION_TYPE):x.generate(x.TRANSFER_MAJOR_GENERAL_EDUCATION_TYPE_DETAILS,{id:t});return this.transferMajorGeneralEducationTypeList().concat([{breadcrumbName:e,path:n}])},e.typeOfProgramList=function(){return this.configuration().concat([{breadcrumbName:"Type Of Program",path:x.generate(x.TYPE_OF_PROGRAM)}])},e.typeOfProgramDetails=function(e,t){var n=0==t?x.generate(x.NEW_TYPE_OF_PROGRAM):x.generate(x.TYPE_OF_PROGRAM_DETAILS,{id:t});return this.typeOfProgramList().concat([{breadcrumbName:e,path:n}])},e.termList=function(){return this.configuration().concat([{breadcrumbName:"Terms",path:x.generate(x.TERMS)}])},e.termDetails=function(e,t){var n=t==re.default.Empty()?x.generate(x.NEW_TERM):x.generate(x.TERM_DETAILS,{id:t});return this.termList().concat([{breadcrumbName:e,path:n}])},e.userSettings=function(){return[{breadcrumbName:"User Settings",path:x.generate(x.USER_SETTINGS)}]},e.userList=function(){return this.home().concat([{breadcrumbName:"Users",path:x.generate(x.USERS)}])},e.userDetails=function(e,t){return this.userList().concat([{breadcrumbName:e,path:x.generate(x.USER_DETAILS,{id:t})}])},e.apiTokenUserList=function(){return this.home().concat([{breadcrumbName:"API Token Users",path:x.generate(x.API_TOKEN_USERS)}])},e.apiTokenUserDetails=function(e,t){return this.apiTokenUserList().concat([{breadcrumbName:e,path:x.generate(x.API_TOKEN_USER_DETAILS,{id:t})}])},e.workItems=function(){return this.home().concat([{breadcrumbName:"Work Items",path:x.generate(x.WORK_ITEMS)}])},e.academicYears=function(){return this.secondary().concat([{breadcrumbName:"Program Review Years",path:x.generate(x.ACADEMIC_YEARS)}])},e.selfStudyConfiguration=function(e){return this.academicYearDashboard(e).concat([{breadcrumbName:"Self Study Configuration",path:x.generate(x.SELF_STUDIES_CONFIGURATION,{academicYearId:e})}])},e.selfStudyConfigurationFromAcademicList=function(e){return this.academicYearDashboardFromAcademicList(e).concat([{breadcrumbName:"Self Study Configuration",path:x.generate(x.SELF_STUDIES_CONFIGURATION_FROM_LIST,{academicYearId:e})}])},e.academicYearDashboard=function(e){return this.academicYears().concat([{breadcrumbName:e.toString()+" - "+(e+1).toString(),path:x.generate(x.SELF_STUDIES_ACADEMIC_YEAR_DASHBOARD,{academicYearId:e})}])},e.academicYearDashboardFromAcademicList=function(e){return this.academicYearList().concat([{breadcrumbName:e.toString(),path:x.generate(x.ACADEMIC_YEAR_DASHBOARD_FROM_LIST,{academicYearId:e})}])},e.newAcademicYearFromAcademicList=function(e){return this.academicYearList().concat([{breadcrumbName:e.toString(),path:x.generate(x.NEW_ACADEMIC_YEAR_FROM_LIST,{academicYearId:e})}])},e.regionListPage=function(){return this.secondary().concat([{breadcrumbName:"Regional Planning Partners",path:x.generate(x.REGIONAL_PLANNING_PARTNERS)}])},e.regionDetailPage=function(e,t){return this.regionListPage().concat([{breadcrumbName:e,path:x.generate(x.REGIONAL_PLANNING_PARTNER_DETAIL,{id:t})}])},e.regionConfigurationListPage=function(){return this.configuration().concat([{breadcrumbName:"Regional Planning Partners",path:x.generate(x.REGIONAL_PLANNING_PARTNERS)}])}
1,e.regionConfigurationDetailPage=function(e,t){return this.regionConfigurationListPage().concat([{breadcrumbName:e,path:x.generate(x.REGIONAL_PLANNING_PARTNER_DETAIL,{id:t})}])},e}()),Jn=n(383),$n=(n(1482),function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Zn=function(){return Zn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Zn.apply(this,arguments)},er=function(e){function t(t){return e.call(this,t)||this}return $n(t,e),t.prototype.render=function(){return document.title="STICS"+(this.props.title?" | "+this.props.title:""),this.props.show?Object(o.jsx)(ot.a.Title,Zn({level:3,className:"page-title",style:this.props.style},{children:this.props.title}),void 0):null},t}(a.Component),tr=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),nr=function(){return nr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},nr.apply(this,arguments)},rr=function(e){function t(t){var n=e.call(this,t)||this;return n.componentDidMount=function(){n.portalRoot=document.getElementById("headerPortal"),n.portalRoot&&n.portalRoot.appendChild(n.el)},n.componentWillUnmount=function(){n.portalRoot&&n.portalRoot.removeChild(n.el)},n.el=document.createElement("div"),n.state={},n}return tr(t,e),t.prototype.render=function(){var e=this.props,t=e.breadcrumb?e.breadcrumb:void 0;if(e.breadcrumbs){var n=this.props.breadcrumbs;n&&n.length>0&&(t={routes:n,itemRender:this.itemRender,separator:"|"})}var r=e.onBack?e.onBack:e.showBack?function(){T.goBack()}:void 0,i=Object(o.jsxs)(a.Fragment,{children:[this.renderPageTitle(),Object(o.jsx)(Jn.a,nr({},e,{onBack:r,breadcrumb:nr({},t)},{children:this.props.children}),void 0)]},void 0);return c.a.createPortal(i,this.el)},t.prototype.itemRender=function(e){return Object(o.jsx)(at.a,nr({to:e.path},{children:e.breadcrumbName}),void 0)},t.prototype.renderPageTitle=function(){var e,t;if(this.props.pageTitle||this.props.title){var n=this.props.pageTitle?this.props.pageTitle:null!==(t=null===(e=this.props.title)||void 0===e?void 0:e.toString())&&void 0!==t?t:"";return Object(o.jsx)(er,{title:n},void 0)}return null},t}(a.Component),ir=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),or=function(){return or=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},or.apply(this,arguments)},ar=function(e){function t(t){var n=e.call(this,t)||this;return n.goBack=function(){T.replace(x.generate(x.HOME))},n.state={loading:!1},n}return ir(t,e),t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Post-Secondary",onBack:this.goBack,breadcrumbs:Xn.postSecondary()},void 0),Object(o.jsx)(y.b,or({direction:"vertical",size:"large"},{children:Object(o.jsx)(Qn.a,or({title:""},{children:Object(o.jsxs)(Kn.b,{children:[Je.isAuthorized(bn.SectionFeatureFlags.CHANGE_REQUESTS)?Object(o.jsx)(Ze,or({validFeatureFlags:[]},{children:Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(at.a,or({to:x.generate(x.CHANGE_REQUESTS)},{children:"Change Request"}),void 0)},void 0)}),void 0):null,Je.isAuthorized(bn.SectionFeatureFlags.INSTITUTIONS)?Object(o.jsx)(Ze,or({validFeatureFlags:bn.SectionFeatureFlags.INSTITUTIONS},{children:Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(at.a,or({to:x.generate(x.INSTITUTIONS)},{children:"Community Colleges"}),void 0)},void 0)}),void 0):null,Je.isAuthorized(bn.SectionFeatureFlags.PROGRAMS)?Object(o.jsx)(Ze,or({validFeatureFlags:bn.SectionFeatureFlags.PROGRAMS},{children:Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(at.a,or({to:x.generate(x.PROGRAMS)},{children:"Programs"}),void 0)},void 0)}),void 0):null,Je.isAuthorized(bn.SectionFeatureFlags.COURSES)?Object(o.jsx)(Ze,or({validFeatureFlags:bn.SectionFeatureFlags.COURSES},{children:Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(at.a,or({to:x.generate(x.COURSES)},{children:"Courses"}),void 0)},void 0)}),void 0):null,Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(at.a,or({to:x.generate(x.ADMIN_RESOURCES)},{children:"Resources"}),void 0)},void 0),Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(at.a,or({to:x.generate(x.DOWNLOADS_SECTION)},{children:"Downloads"}),void 0)},void 0),Je.isAuthorized([gn.EDIT_CONTACT])?Object(o.jsx)(Ze,or({validFeatureFlags:[gn.EDIT_CONTACT]},{children:Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(at.a,or({to:x.generate(x.CONTACTS)},{children:"Contacts"}),void 0)},void 0)}),void 0):null,Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(at.a,or({to:x.generate(x.CONSULTANTS)},{children:"Consultants"}),void 0)},void 0)]},void 0)}),void 0)}),void 0)]},void 0)},t}(a.Component);var sr=Object(u.i)(Object(l.b)((function(e){return{institution:e.Institution.Selected}}))(ar)),dr=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),cr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return dr(t,e),t.prototype.getAnnouncementTableData=function(e){var t="api/announcements";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getAnnouncementDetails=function(e){var t="api/announcements/"+encodeURIComponent(e);return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.getAnnouncementsForUser=function(e){var t="api/announcements/getAnnouncementsForUser";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.saveAnnouncementDetails=function(e){var t="api/announcements/save";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t}(U),lr=new cr,ur=n(96),pr=(n(197),n(19)),fr=(n(53),function(e){return Object.assign({announcementId:"00000000-0000-0000-0000-000000000000",announcement:null},e)}),hr={className:"AnnouncementDTO",create:function(e){return Object.assign(Q.create(),{id:null,institutionIds:[],roleIds:[],announcementTypeId:0,announcementType:null,announcementInstitutions:[],announcementRoles:[],title:"",message:"",showOnDate:new Date(0).toISOString(),showUntilDate:new Date(0).toISOString(),showDates:[],isPublic:!1,status:""},e)},id:"id",institutionIds:"institutionIds",roleIds:"roleIds",announcementTypeId:"announcementTypeId",announcementType:"announcementType",announcementInstitutions:"announcementInstitutions",announcementRoles:"announcementRoles",title:"title",message:"message",showOnDate:"showOnDate",showUntilDate:"showUntilDate",showDates:"showDates",isPublic:"isPublic",status:"status"},vr={className:"AnnouncementTypeDTO",create:function(e){return Object.assign(Q.create(),{id:0,name:"",displayOrder:0},e)},id:"id",name:"name",displayOrder:"displayOrder"},mr={className:"RoleDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",name:"",concurrencyStamp:"",aaRoleTypeId:null,aaRoleType:null,roleTypeId:0,roleType:null,roleFeatureFlags:[],roleFeatureFlagIds:[]},e)},id:"id",name:"name",concurrencyStamp:"concurrencyStamp",aaRoleTypeId:"aaRoleTypeId",aaR
1oleType:"aaRoleType",roleTypeId:"roleTypeId",roleType:"roleType",roleFeatureFlags:"roleFeatureFlags",roleFeatureFlagIds:"roleFeatureFlagIds"},gr=function(){return gr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},gr.apply(this,arguments)},br=function(){function e(){}return e.getProgress=function(e,t){var n;if(e){for(var r=0,i=0,o=0,a=Array.from(t);o<a.length;o++){var s=a[o],d=s[0],c=s[1];r+=c.required?1:0,i+=c.required&&(null===(n=e.current)||void 0===n?void 0:n.getFieldValue(d))?1:0}return r>0?100/r*i:i>=0?100:0}return 0},e.canSubmit=function(e,t){return this.getProgress(e,t)>=100},e.hasChanged=function(e,t){for(var n,r=0,i=Array.from(t);r<i.length;r++){var o=i[r][0];if(null===(n=e.current)||void 0===n?void 0:n.isFieldTouched(o))return!0}return!1},e.getOptions=function(e){return e?e.map((function(e){return Object(o.jsx)(pr.a.Option,gr({value:e.key},{children:e.name}),e.key)})):null},e}(),yr=n(1511),Or=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),jr=function(){return jr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},jr.apply(this,arguments)},Ir=function(e){function t(t){var n=e.call(this,t)||this;return n.handleClick=function(){n.props.promptConfirm?f.a.confirm({title:"Reset Form?",content:"Are you sure you want to reset this form?",onOk:function(){n.props.onConfirm()},okType:"danger",okText:"Reset"}):n.props.onConfirm()},n.state={},n}return Or(t,e),t.prototype.render=function(){var e=this.props.onClick?this.props.onClick:this.handleClick;return Object(o.jsx)(rt.a,jr({},this.props,{icon:Object(o.jsx)(yr.a,{},void 0),type:"text",loading:this.props.resetting||this.props.loading,onClick:e},{children:"Reset"}),void 0)},t}(a.Component),Sr=n(228),Er=n(1512),Rr=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),_r=function(){return _r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},_r.apply(this,arguments)},Tr=function(e){function t(t){var n=e.call(this,t)||this;return n.state={},n}return Rr(t,e),t.prototype.render=function(){var e=this.props.htmlType?this.props.htmlType:"submit",t=this.props.type?this.props.type:"primary";return Object(o.jsx)(rt.a,_r({},this.props,{htmlType:e,type:t,icon:this.props.saved?Object(o.jsx)(Sr.a,{},void 0):Object(o.jsx)(Er.a,{},void 0),loading:this.props.saving||this.props.loading},{children:"Save"}),void 0)},t}(a.Component),Cr=n(417),xr=n.n(Cr),Ar=n(705),Pr=n.n(Ar),Nr=(n(962),function(){return Nr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Nr.apply(this,arguments)});var wr,Dr,qr,Fr,Mr=function(e){var t,n,r=a.useState(xr.a.createEditorState(e.value)),i=r[0],s=r[1],d=Object(a.useRef)();return Object(a.useEffect)((function(){e.value&&i.toHTML()!==e.value&&!e.readonly&&s(xr.a.createEditorState(e.value)),d.current&&function(){var e={};null===(e=document.querySelector('[data-title = "Undo"]'))||void 0===e||e.setAttribute("title","Undo"),null===(e=document.querySelector('[data-title = "Redo"]'))||void 0===e||e.setAttribute("title","Redo"),null===(e=document.querySelector('[data-title = "Color"]'))||void 0===e||e.setAttribute("title","Color"),null===(e=document.querySelector('[data-title = "Bold"]'))||void 0===e||e.setAttribute("title","Bold"),null===(e=document.querySelector('[data-title = "Italic"]'))||void 0===e||e.setAttribute("title","Italic"),null===(e=document.querySelector('[data-title = "Underline"]'))||void 0===e||e.setAttribute("title","Underline"),null===(e=document.querySelector('[data-title = "Strike Through"]'))||void 0===e||e.setAttribute("title","Strike Through"),null===(e=document.querySelector('[data-title = "Super Script"]'))||void 0===e||e.setAttribute("title","Super Script"),null===(e=document.querySelector('[data-title = "Sub Script"]'))||void 0===e||e.setAttribute("title","Sub Script"),null===(e=document.querySelector('[data-title = "Remove Styles"]'))||void 0===e||e.setAttribute("title","Remove Styles"),null===(e=document.querySelector('[data-title = "Emoji"]'))||void 0===e||e.setAttribute("title","Emoji"),null===(e=document.querySelector('[data-title = "Increase Indent"]'))||void 0===e||e.setAttribute("title","Increase Indent"),null===(e=document.querySelector('[data-title = "Decrease Indent"]'))||void 0===e||e.setAttribute("title","Decrease Indent"),null===(e=document.querySelector('[data-title = "Left Alignment"]'))||void 0===e||e.setAttribute("title","Left Alignment"),null===(e=document.querySelector('[data-title = "Center Alignment"]'))||void 0===e||e.setAttribute("title","Center Alignment"),null===(e=document.querySelector('[data-title = "Right Alignment"]'))||void 0===e||e.setAttribute("title","Right Alignment"),null===(e=document.querySelector('[data-title = "Justify Alignment"]'))||void 0===e||e.setAttribute("title","Justify Alignment"),null===(e=document.querySelector('[data-title = "Unordered List"]'))||void 0===e||e.setAttribute("title","Unordered List"),null===(e=document.querySelector('[data-title = "Ordered List"]'))||void 0===e||e.setAttribute("title","Ordered List"),null===(e=document.querySelector('[data-title = "Quote"]'))||void 0===e||e.setAttribute("title","Quote"),null===(e=document.querySelector('[data-title = "Code"]'))||void 0===e||e.setAttribute("title","Code"),null===(e=document.querySelector('[data-title = "Media"]'))||void 0===e||e.setAttribute("title","Media"),null===(e=document.querySelector('[data-title = "Link"]'))||void 0===e||e.setAttribute("title","Link"),null===(e=document.querySelector('[data-title = "Unlink"]'))||void 0===e||e.setAttribute("title","Unlink"),null===(e=document.querySelector('[data-title = "Horizontal Line"]'))||void 0===e||e.setAttribute("title","Horizontal Line"),null===(e=document.querySelector('[data-title = "Clear"]'))||void 0===e||e.setAttribute("title","Clear"),null===(e=document.querySelector('[data-title = "Fullscreen"]'))||void 0===e||e.setAttribute("title","Fullscreen"),null===(e=document.querySelector('[role = "textbox"]'))||void 0===e||e.setAttribute("title","Textbox")}()}),[e.value]),e.readonly?e.value?Object(o.jsx)("div",{dangerouslySetInnerHTML:{__html:Pr.a.sanitize(null!==(t=e.value)&&void 0!==t?t:"")}},void 0):null:Object(o.jsx)(xr.a,Nr({},e,{ref:d,contentStyle:{height:null!==(n=e.height)&&void 0!==n?n:150,wordBreak:"break-word"},value:i,language:"en",onChange:function(t){var n,r=null!==(n=null===t||void 0===t?void 0:t.toHTML())&&void 0!==n?n:"";s(t),e.onChange&&e.onChange(r)}}),void 0)},Yr=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ur=function(){return Ur=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ur.apply(this,arguments)},Lr=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n.getFormItems=function(){return(new Map).set(hr.title,{required:!0,name:hr.title,label:"Title",rules:[Ot.required(),Ot.maxLength(150)]}).set(hr.message,{required:!0,name:hr.message,label:"Message",rules:[Ot.required(),Ot.maxLength(5e3)]}).set(hr.announcementTypeId,{required:!0,name:hr.announcementTypeId,label:"Announcement Type",rules:[Ot.required()]}).set(hr.showDates,{required:!0,name:hr.showDates,label:"Show Dates",rules:[Ot.required()]}).set(hr.institutionIds,{required:!1,name:hr.institutionIds,label:"Institutions"}).set(hr.roleIds,{required:!1,name:hr.roleIds,label:"Roles"})},n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields()},n.cleanResultDates=function(e){return null!=e&&(e.showOnDate=It()(e.showOnDate),e.showUntilDate=It()(e.showUntilDate),e.showDates=[It()(e.showOnDate),It()(e.showUntilDate)]),e},n.loadExisting=function(){return lr.getAnnouncementDetails(n.props.AnnouncementId).then((function(e){var t,r;e&&e.announcement&&(e.announcement=n.cleanResultDates(e.announcement),n.setState({announcement:null!==(t=e.announcement)&&void 0!==t?t:hr.create()}),null===(r=n._formRef.current)||void 0===r||r.resetFields())})).catch((function(){n.setState({error:!0})}
1))},n.loadAnnouncementTypes=function(){return ce.getAll(vr.className).then((function(e){n.setState({announcementTypes:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadInstitutions=function(){return ce.getAll(ne.className).then((function(e){n.setState({institutions:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadRoles=function(){return ce.getAll(mr.className).then((function(e){n.setState({roles:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.handleSubmit=function(){n.setState({submitting:!0});var e=n._formRef?n._formRef.current.getFieldsValue():null,t=fr({announcementId:n.props.AnnouncementId,announcement:hr.create(Ur(Ur({},e),{showOnDate:It()(e.showDates[0]),showUntilDate:It()(e.showDates[1]),showDates:[It()(e.showDates[0]),It()(e.showDates[1])]}))});lr.saveAnnouncementDetails(t).then((function(e){var t;(null===e||void 0===e?void 0:e.succeeded)?(null!=e.announcement&&(e.announcement=n.cleanResultDates(e.announcement)),n.setState({announcement:null!==(t=null===e||void 0===e?void 0:e.announcement)&&void 0!==t?t:hr.create()}),S.b.success("Success!"),n.props.onSave&&e.announcementId&&(n.props.onSave(e.announcementId),n.resetForm())):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Error Saving"))})).catch((function(e){n.setState({error:e}),S.b.error("Error Saving")})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.handleChange=function(){n.setState({altered:!0})},n.state={announcement:hr.create({institutionIds:[],roleIds:[],announcementTypeId:"",showOnDate:null,showUntilDate:null}),institutions:[],roles:[],announcementTypes:[]},n}return Yr(t,e),t.prototype.componentDidMount=function(){this.fetchData()},t.prototype.componentDidUpdate=function(e){this.props.AnnouncementId&&this.props.AnnouncementId!=e.AnnouncementId&&this.fetchData()},t.prototype.fetchData=function(){var e=this;this.setState({loading:!0});var t=[];0==this.state.announcementTypes.length&&t.push(this.loadAnnouncementTypes()),0==this.state.institutions.length&&t.push(this.loadInstitutions()),0==this.state.roles.length&&t.push(this.loadRoles()),this.props.AnnouncementId!=re.default.Empty()&&t.push(this.loadExisting()),Promise.all(t).then((function(){e.setState({loading:!1})}))},t.prototype.render=function(){var e=this;if(this.state.loading)return Object(o.jsx)(pt.a,{active:!0},void 0);var t=this.getFormItems();return Object(o.jsxs)(y.b,Ur({size:"small",direction:"vertical"},{children:[this.renderErrors(),Object(o.jsxs)(ht.a,Ur({ref:this._formRef,layout:"vertical",initialValues:this.state.announcement,onValuesChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!0},{children:[Object(o.jsx)(mt.a,Ur({},t.get(hr.title),_t.getValidation(hr.title,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,Ur({},t.get(hr.message),_t.getValidation(hr.message,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(Mr,{readonly:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,Ur({},t.get(hr.announcementTypeId),_t.getValidation(hr.announcementTypeId,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(pr.a,Ur({disabled:!this.props.isEditing||this.state.loading||this.state.submitting},{children:this.state.announcementTypes.map((function(t){return e.renderAnnouncementTypeOption(t)}))}),void 0)}),void 0),Object(o.jsx)(mt.a,Ur({},t.get(hr.showDates),_t.getValidation(hr.showDates,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ur.a.RangePicker,{format:"M/D/YYYY",disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,Ur({},t.get(hr.institutionIds),_t.getValidation(hr.institutionIds,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(pr.a,Ur({allowClear:!0,mode:"multiple",disabled:!this.props.isEditing||this.state.loading||this.state.submitting},{children:this.state.institutions.map((function(t){return e.renderInstitutionOption(t)}))}),void 0)}),void 0),Object(o.jsx)(mt.a,Ur({},t.get(hr.roleIds),_t.getValidation(hr.roleIds,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(pr.a,Ur({allowClear:!0,mode:"multiple",disabled:!this.props.isEditing||this.state.loading||this.state.submitting},{children:this.state.roles.map((function(t){return e.renderRoleOption(t)}))}),void 0)}),void 0),this.renderSave()]}),void 0)]}),void 0)},t.prototype.renderRoleOption=function(e){if(e.id)return Object(o.jsx)(pr.a.Option,Ur({value:e.id},{children:e.name}),e.id)},t.prototype.renderInstitutionOption=function(e){if(e.id)return Object(o.jsx)(pr.a.Option,Ur({value:e.id},{children:e.name}),e.id)},t.prototype.renderAnnouncementTypeOption=function(e){if(e.id)return Object(o.jsx)(pr.a.Option,Ur({value:e.id},{children:e.name}),e.id)},t.prototype.renderSave=function(){var e=this.getFormItems();
1if(this.props.isEditing&&Je.isAuthorized([gn.EDIT_ANNOUNCEMENT]))return Object(o.jsx)(Ze,Ur({validFeatureFlags:[gn.EDIT_ANNOUNCEMENT]},{children:Object(o.jsxs)(y.b,Ur({direction:"horizontal"},{children:[Object(o.jsx)(Tr,{disabled:!br.canSubmit(this._formRef,e),saving:this.state.submitting},void 0),Object(o.jsx)(Ir,{disabled:!br.hasChanged(this._formRef,e),onConfirm:this.resetForm},void 0)]}),void 0)}),void 0)},t.prototype.renderErrors=function(){if(this.state.error)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t}(a.Component),kr=n(136),Gr=n(1513),Vr=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Br=function(e){function t(t){var n=e.call(this,t)||this;return n.state={},n}return Vr(t,e),t.prototype.render=function(){var e=this.props.isEditing?Object(o.jsx)(kr.a,{},void 0):Object(o.jsx)(Gr.a,{},void 0),t=this.props.isEditing?"Cancel":"Edit";return Object(o.jsx)(rt.a,{type:"link",size:"small",onClick:this.props.onClick,icon:e,title:t},void 0)},t}(a.Component),Wr=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),zr=function(e){function t(t){var n=e.call(this,t)||this;return n.shouldPrompt=function(e){if(n.props.rootRoute&&e&&e.pathname&&e.pathname.indexOf(n.props.rootRoute)>=0)return!0;var t=n.props.when;return!("function"===typeof t?t():t||!1)||(n.props.message||"Unsaved Changes! Are you sure you want to leave?")},n.unloadEventHandler=function(e){!0!==n.shouldPrompt()&&(e.stopImmediatePropagation(),e.returnValue=!0)},n.state={},n}return Wr(t,e),t.prototype.componentDidMount=function(){window.addEventListener("beforeunload",this.unloadEventHandler)},t.prototype.componentWillUnmount=function(){window.removeEventListener("beforeunload",this.unloadEventHandler)},t.prototype.render=function(){return Object(o.jsx)(u.a,{message:this.shouldPrompt},void 0)},t}(a.Component),Hr=function(){function e(){}return e.getParameter=function(t,n){var r,i=new URLSearchParams(location.search);return n||(n=e.DEFAULT_STRING),null==i?n:null!==(r=i.get(t))&&void 0!==r?r:n},e.getIntParameter=function(t,n){var r;return n||(n=e.DEFAULT_INT),null!==(r=parseInt(this.getParameter(t,n.toString())))&&void 0!==r?r:n},e.getFloatParameter=function(t,n){var r;return n||(n=e.DEFAULT_FLOAT),null!==(r=parseFloat(this.getParameter(t,n.toString())))&&void 0!==r?r:n},e.getPathPart=function(t,n,r){var i;return r||(r=e.DEFAULT_STRING),null==t?r:null!==(i=t.params[n])&&void 0!==i?i:r},e.getIntPathPart=function(t,n,r){var i;return r||(r=e.DEFAULT_INT),null!==(i=parseInt(this.getPathPart(t,n,r.toString())))&&void 0!==i?i:r},e.getFloatPathPart=function(t,n,r){var i;return r||(r=e.DEFAULT_FLOAT),null!==(i=parseFloat(this.getPathPart(t,n,r.toString())))&&void 0!==i?i:r},e.DEFAULT_STRING="",e.DEFAULT_INT=0,e.DEFAULT_FLOAT=0,e}(),Qr=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Kr=function(){return Kr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Kr.apply(this,arguments)},Xr=function(e){function t(t){var n=e.call(this,t)||this;return n._AnnouncementDetailsRef=a.createRef(),n.loadAnnouncement=function(e){n.setState({loading:!0}),lr.getAnnouncementDetails(e).then((function(t){t.announcement&&n.setState({AnnouncementId:e,Announcement:t.announcement})})).catch((function(){n.setState({error:!0}),S.b.error("Announcement could not be loaded")})).finally((function(){n.setState({loading:!1})}
1))},n.toggleEdit=function(){var e;n.state.isEditing&&(null===(e=n._AnnouncementDetailsRef.current)||void 0===e||e.resetForm()),n.setState({isEditing:!n.state.isEditing})},n.announcementDetailsSaved=function(e){n.setState({isEditing:!1}),e!=n.state.AnnouncementId?T.replace(x.generate(x.ANNOUNCEMENT_DETAILS,{id:e})):n.loadAnnouncement(e)},n.goToAnnouncements=function(){T.push(x.generate(x.ANNOUNCEMENTS))},n.state={AnnouncementId:re.default.Empty()},n}return Qr(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");"new"==e?this.setState({isEditing:!0}):this.loadAnnouncement(e)},t.prototype.render=function(){var e,t,n=this.state.loading?"...":this.state.AnnouncementId==re.default.Empty()?"New Announcement":null!==(t=null===(e=this.state.Announcement)||void 0===e?void 0:e.title)&&void 0!==t?t:"...";return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:n,pageTitle:n,onBack:this.goToAnnouncements,breadcrumbs:Xn.announcementDetails(n,this.state.AnnouncementId),loading:this.state.loading},void 0),Object(o.jsx)(zr,{when:this.state.isEditing},void 0),Object(o.jsx)(y.b,Kr({direction:"vertical",size:"middle"},{children:this.renderDetailsCard()}),void 0)]},void 0)},t.prototype.renderDetailsCard=function(){var e=this.state.AnnouncementId==re.default.Empty()?null:Object(o.jsx)(Ze,Kr({validFeatureFlags:[gn.EDIT_ANNOUNCEMENT]},{children:Object(o.jsx)(Br,{onClick:this.toggleEdit,isEditing:this.state.isEditing},void 0)}),void 0);return Object(o.jsx)(Qn.a,Kr({title:"Details",extra:e},{children:Object(o.jsx)(Lr,{ref:this._AnnouncementDetailsRef,AnnouncementId:this.state.AnnouncementId,isEditing:this.state.isEditing,onSave:this.announcementDetailsSaved},void 0)}),void 0)},t}(a.Component),Jr=Object(u.i)(Xr),$r=function(){function e(){}return e.getCurrentTime=function(){return It()()},e.getTimeOfDayDisplay=function(){var e=this.now().hour();return e<12&&e>=4?"Morning":e>=12&&e<17?"Afternoon":"Evening"},e.getCurrentYear=function(){return Number.parseInt(this.now().format("YYYY"))},e.getCurrentMonth=function(){return Number.parseInt(this.now().format("M"))},e.getCurrentDay=function(){return Number.parseInt(this.now().format("D"))},e.now=function(){return It()()},e.getShortMonthString=function(e){return e?It.a.monthsShort(e-1):""},e.getLongMonthString=function(e){return e?It.a.months(e-1):""},e.getDateStamp=function(){return this.now().format("YYYYMMDD")},e.shortDateAndTime=function(e){if(e){var t=It.a.isMoment(e)?e:It()(e);return t.isValid()?t.format("M/D/YYYY h:mm a"):""}},e.shortDate=function(e,t){if(e){var n=It.a.isMoment(e)?e:It()(e);return n.isValid()?Object(o.jsx)("span",{children:n.format(t||"M/D/YYYY")},void 0):""}},e.shortTime=function(e){if(e){var t=It.a.isMoment(e)?e:It()(e);return t.isValid()||(t=It()(e,"h:mm:ss a")).isValid()?Object(o.jsx)("span",{children:t.format("h:mm a")},void 0):""}},e.longDate=function(e){if(e){var t=It.a.isMoment(e)?e:It()(e);return t.isValid()?Object(o.jsx)("span",{children:t.format("MMMM D, YYYY")},void 0):""}},e.longDateString=function(e){if(e){var t=It.a.isMoment(e)?e:It()(e);return t.isValid()?t.format("MMMM D, YYYY"):""}},e.longMonthAndDay=function(e){if(e){var t=It.a.isMoment(e)?e:It()(e);return t.isValid()?Object(o.jsx)("span",{children:t.format("MMMM D")},void 0):""}},e.mediumDate=function(e){if(e){var t=It.a.isMoment(e)?e:It()(e);return t.isValid()?Object(o.jsx)("span",{children:t.format("MMMM D, YYYY")},void 0):""}},e.dateAndTime=function(e){if(e){var t=It.a.isMoment(e)?e:It()(e);return t.isValid()?Object(o.jsx)("span",{children:t.format("M/D/YYYY h:mm a")},void 0):""}},e.shortFormat=function(e){return It()(e).format("M/D/YYYY")},e.dateRangeShortFormat=function(t,n){return e.shortFormat(t)+" - "+e.shortFormat(n)},e.isWithinRange=function(e,t){return It()(new Date)>=It()(e)&&It()(new Date)<=It()(t)},e.isBeforeRange=function(e){return It()(new Date)<It()(e)},e.isBefore=function(e,t){return It()(e)<It()(t)},e.isAfterRange=function(e){return It()(new Date)>It()(e)},e.isExpired=function(e){return parseInt(this.now().year().toString())>parseInt(It()(e).year().toString())+1},e.isFutureDate=function(e){return e>It()().endOf("day")},e}(),Zr=function(){function e(){}return e.getAnnouncementStatus=function(e,t){return $r.isWithinRange(e,t)?"Active":$r.isBeforeRange(e)?"Upcoming":"Shown"},e}(),ei=function(){function e(){}return e.shorten=function(e,t,n){return e&&(null===e||void 0===e?void 0:e.length)<=t?e:(null===e||void 0===e?void 0:e.substring(0,t-(n?4:1)))+(n?"...":"")}
1,e.ignoreCaseComapre=function(e,t){return-1!==e.toUpperCase().indexOf(t.toUpperCase())},e.newLineFormat=function(e,t){return t?e.join(",\n"):e.join(",")},e.ellipsisCharacterLimit=function(e,t){return e&&e.length>=t?e.substring(0,t)+"...":e},e.newLineCharacterLimit=function(e,t){if(e&&e.length>=t){for(var n="",r=0;r<e.length;r+=t)n+=e.substring(r,r+t)+"\n";return n}return e},e}(),ti=function(){function e(){}return e.ACTIVE="Active",e.UPCOMING="Upcoming",e.SHOWN="Shown",e}(),ni=function(){function e(){}return e.STATE=1,e.INSTITUTION=2,e.CONSULTANT=3,e.DISTRICT=4,e.RPP=5,e}(),ri=function(){function e(){}return e.ACTIVE=1,e.COMPLETE=2,e.CANCELLED=3,e.REMOVED=4,e}(),ii=function(){function e(){}return e.REVIEWCHANGEREQUEST=1,e.CHANGEREQUESTDRAFT=2,e.APPROVALREDIRECT=3,e.RESPONSETOSELFSTUDY=4,e.SUBMITSELFSTUDY=5,e.ASSIGNDISTRICTUSER=6,e.REVISESELFSTUDY=7,e.ASSIGNRPPCONSULTANT=8,e.ASSIGNDECONSULTANT=9,e}(),oi={className:"AcademicYearStatusTypeDTO",create:function(e){return Object.assign(Q.create(),{id:0,name:""},e)},id:"id",name:"name"},ai={className:"ApprovalStatusTypeDTO",create:function(e){return Object.assign(Q.create(),{id:0,name:"",displayOrder:0},e)},id:"id",name:"name",displayOrder:"displayOrder"},si={className:"AwardTypeDTO",create:function(e){return Object.assign(Q.create(),{id:0,name:"",code:"",order:0,maxWeeks:0,minCredits:0,maxCredits:0,transferMajor:!1,averageCredits:null,generalEducationCredits:null,generalEducationCategories:null,techCorePercentage:null,display:"",nonTrasferMajorProgramTypeId:null,transferMajorProgramTypeId:null,nonTransferMajorProgramType:null,transferMajorProgramType:null,iowaVariationIds:[],instructionalLevels:[],typeOfPrograms:[],specialEmphases:[],objectPurposes:[],childAwardTypes:[],generalEducationCreditLimits:[],apsGeneralEducationCreditLimits:[]},e)},id:"id",name:"name",code:"code",order:"order",maxWeeks:"maxWeeks",minCredits:"minCredits",maxCredits:"maxCredits",transferMajor:"transferMajor",averageCredits:"averageCredits",generalEducationCredits:"generalEducationCredits",generalEducationCategories:"generalEducationCategories",techCorePercentage:"techCorePercentage",display:"display",nonTrasferMajorProgramTypeId:"nonTrasferMajorProgramTypeId",transferMajorProgramTypeId:"transferMajorProgramTypeId",nonTransferMajorProgramType:"nonTransferMajorProgramType",transferMajorProgramType:"transferMajorProgramType",iowaVariationIds:"iowaVariationIds",instructionalLevels:"instructionalLevels",typeOfPrograms:"typeOfPrograms",specialEmphases:"specialEmphases",objectPurposes:"objectPurposes",childAwardTypes:"childAwardTypes",generalEducationCreditLimits:"generalEducationCreditLimits",apsGeneralEducationCreditLimits:"apsGeneralEducationCreditLimits"},di={className:"CategoryDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",code:"",name:"",statusType:null,statusTypeId:0,display:""},e)},id:"id",code:"code",name:"name",statusType:"statusType",statusTypeId:"statusTypeId",display:"display"},ci={className:"ChangeRequestStatusTypeDTO",create:function(e){return Object.assign(Q.create(),{id:0,name:""},e)},id:"id",name:"name"},li={className:"ChangeRequestTypeDTO",create:function(e){return Object.assign(Q.create(),{id:0,name:"",code:"",selectable:!1,daysValid:0,cutoffWindow:0},e)},id:"id",name:"name",code:"code",selectable:"selectable",daysValid:"daysValid",cutoffWindow:"cutoffWindow"},ui={className:"ContactTypeDTO",create:function(e){return Object.assign(Q.create(),{id:0,displayOrder:0,name:""},e)},id:"id",displayOrder:"displayOrder",name:"name"},pi={className:"IowaVariationDTO",create:function(e){return Object.assign(Q.create(),{id:0,order:0,code:"",name:"",specialUse:!1,display:""},e)},id:"id",order:"order",code:"code",name:"name",specialUse:"specialUse",display:"display"},fi={className:"ResourceCategoryDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",name:""},e)},id:"id",name:"name"},hi={className:"RoleTypeDTO",create:function(e){return Object.assign(Q.create(),{id:0,name:"",displayOrder:0},e)},id:"id",name:"name",displayOrder:"displayOrder"},vi={className:"SelfStudyStatusTypeDTO",create:function(e){return Object.assign(Q.create(),{id:0,name:""},e)},id:"id",name:"name"},mi={className:"SelfStudyResponseTypeDTO",create:function(e){return Object.assign(Q.create(),{id:0,name:""},e)},id:"id",name:"name"},gi={className:"StatusTypeDTO",create:function(e){return Object.assign(Q.create(),{id:0,name:"",displayOrder:0},e)},id:"id",name:"name",displayOrder:"displayOrder"},bi={className:"SecondaryProgramStatusTypeDTO",create:function(e){return Object.assign(Q.create(),{id:0,name:"",displayOrder:0,selectable:!1},e)},id:"id",name:"name",displayOrder:"displayOrder",selectable:"selectable"},yi={className:"ProgramClassificationDTO",create:function(e){return Object.assign(Q.create(),{id:0,displayOrder:0,name:""},e)},id:"id",displayOrder:"displayOrder",name:"name"},Oi={className:"DocumentStatusDTO",create:function(e){return Object.assign(Q.create(),{id:0,name:""},e)},id:"id",name:"name"},ji={className:"DocumentTypeDTO",create:function(e){return Object.assign(Q.create(),{id:0,name:""},e)},id:"id",name:"name"},Ii=function(){function e(){}return e.RoleTypes=function(){return ce.getAll(hi.className).then((function(e){return e.map((function(e){var t;return{text:e.name,value:null===(t=e.id)||void 0===t?void 0:t.toString()}}))}))},e.ResourceCategories=function(){return ce.getAll(fi.className).then((function(e){return e.map((function(e){var t;return{text:e.name,value:null===(t=e.id)||void 0===t?void 0:t.toString()}}))}))},e.Categories=function(){return ce.getAll(di.className).then((function(e){return e.map((function(e){var t;return{text:e.name,value:null===(t=e.id)||void 0===t?void 0:t.toString()}}))}))},e.AwardTypes=function(e){return ce.getAll(si.className,e).then((function(e){return e.map((function(e){return{text:e.code,value:e.id.toString()}}))}))},e.ApprovalStatus=function(){return ce.getAll(ai.className).then((function(e){return e.map((function(e){return{text:e.name,value:e.id.toString()}}))}))},e.ChangeRequestTypeOptions=function(){return ce.getAll(li.className).then((function(e){return e?e.map((function(e){return{text:e.name,value:e.id.toString()}})):[]}))},e.Institutions=function(){return ce.getAll(ne.className).then((function(e){return e.sort((function(e,t){return e.code-t.code})).map((function(e){return{text:e.code+" - "+e.name,value:e.id}}))}))},e.CommunityCollegeids=function(){return ce.getAll(ne.className).then((function(e){return e.map((function(e){return{text:e.code,value:e.code}}))}
1))},e.ContactTypes=function(){return ce.getAll(ui.className).then((function(e){return e.map((function(e){return{text:e.name,value:e.id.toString()}}))}))},e.ChangeRequestStatusTypes=function(){return ce.getAll(ci.className).then((function(e){return e.map((function(e){return{text:e.name,value:e.id.toString()}}))}))},e.IowaVariations=function(){return ce.getAll(pi.className).then((function(e){return e.map((function(e){return{text:e.display,value:e.id.toString()}}))}))},e.StatusTypes=function(){return ce.getAll(gi.className).then((function(e){return e.map((function(e){return{text:e.name,value:e.id.toString()}}))}))},e.ProgramClassificationTypes=function(){return ce.getAll(yi.className).then((function(e){return e.map((function(e){return{text:e.name,value:e.id.toString()}}))}))},e.GetWorkItemStatusTypes=function(){return[{value:ri.ACTIVE.toString(),text:"Active"},{value:ri.CANCELLED.toString(),text:"Cancelled"},{value:ri.COMPLETE.toString(),text:"Complete"},{value:ri.REMOVED.toString(),text:"Removed"}]},e.GetWorkItemTypes=function(){return[{value:ii.APPROVALREDIRECT.toString(),text:"Approval Redirect"},{value:ii.CHANGEREQUESTDRAFT.toString(),text:"Change Request Draft"},{value:ii.REVIEWCHANGEREQUEST.toString(),text:"Review Change Request"},{value:ii.RESPONSETOSELFSTUDY.toString(),text:"Response To Program"}]},e.GetTrueOrFalse=function(){return[{value:"true",text:"Yes"},{value:"false",text:"No"}]},e.AnnouncementTypes=function(){return ce.getAll(vr.className).then((function(e){return e.map((function(e){return{text:e.name,value:e.id.toString()}}))}))},e.DocumentTypes=function(){return ce.getAll(ji.className).then((function(e){return e.map((function(e){return{text:e.name,value:e.id.toString()}}))}))},e.DocumentStatuses=function(){return ce.getAll(Oi.className).then((function(e){return e.map((function(e){return{text:e.name,value:e.id.toString()}}))}))},e.AcademicYearStatusTypes=function(){return ce.getAll(oi.className).then((function(e){return e.map((function(e){return{text:e.name,value:e.id.toString()}}))}))},e.AnnouncementStatusTypes=function(){return[{text:ti.ACTIVE,value:ti.ACTIVE},{text:ti.UPCOMING,value:ti.UPCOMING},{text:ti.SHOWN,value:ti.SHOWN}]},e.Roles=function(){return ce.getAll(mr.className).then((function(e){return e.map((function(e){var t;return{text:e.name,value:null===(t=e.id)||void 0===t?void 0:t.toString()}}))}))},e.InstitutionRoles=function(){return ce.getAll(mr.className).then((function(e){return e.filter((function(e){return e.roleTypeId==ni.INSTITUTION})).map((function(e){var t;return{text:e.name,value:null===(t=e.id)||void 0===t?void 0:t.toString()}}))}))},e.StateRoles=function(){return ce.getAll(mr.className).then((function(e){return e.filter((function(e){return e.roleTypeId==ni.STATE})).map((function(e){var t;return{text:e.name,value:null===(t=e.id)||void 0===t?void 0:t.toString()}}))}))},e.SecondaryProgramStatus=function(){return ce.getAll(bi.className).then((function(e){return e.map((function(e){var t;return{text:e.name,value:null===(t=e.id)||void 0===t?void 0:t.toString()}}))}))},e.SelfStudyStatusTypes=function(){return ce.getAll(vi.className).then((function(e){return e.map((function(e){return{text:e.name,value:e.id}}))}))},e.SelfStudyResponseTypes=function(){return ce.getAll(mi.className).then((function(e){return e.map((function(e){return{text:e.name,value:e.id}}))}))},e}(),Si=n(229),Ei=n(728),Ri=n(732),_i=n(1514),Ti=n(105),Ci=(n(236),n(45)),xi=(n(91),n(101)),Ai=(n(208),n(172)),Pi=(n(587),n(46)),Ni=(n(123),n(58)),wi=(n(117),function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Di=function(){return Di=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Di.apply(this,arguments)},qi=/\$\s?|(,*)|(\w+)/g,Fi=/(\..*)\./g,Mi=/\.0+$|(\.0?[1-9]+)0+$/,Yi=/(?!^-)[^0-9,.]/g,Ui=function(e){function t(t){var n=e.call(this,t)||this;return n._inputRef=a.createRef(),n.formatter=n.formatter.bind(n),n.parser=n.parser.bind(n),n.onFocus=n.onFocus.bind(n),n.onBlur=n.onBlur.bind(n),"number"===typeof n.props.precision?n.formatterFunction=new Intl.NumberFormat(void 0,{maximumFractionDigits:n.props.precision,minimumFractionDigits:null===n.props.minFractionDigits?n.props.precision:n.props.minFractionDigits}).format:n.formatterFunction=new Intl.NumberFormat(void 0,{maximumFractionDigits:5,minimumFractionDigits:null===n.props.minFractionDigits?0:n.props.minFractionDigits}).format,n}return wi(t,e),t.prototype.getFormat=function(e){if("number"===typeof e&&isNaN(e)||"string"===typeof e&&"NaN"===e||""===e||void 0===e)return"";var t=parseFloat((""+e).replace(qi,""));return this.formatterFunction(t)},t.prototype.formatter=function(e){if(!this._inputRef.current||!this._inputRef.current.state.focused)return this.getFormat(e);var t=(""+e).replace(Fi,"$1").replace(Yi,"");return this.justFocused?(this.justFocused=!1,t.replace(Mi,"$1")):t},t.prototype.parser=function(e){return(e||"").replace(qi,"")},t.prototype.onFocus=function(e){var t=e.target;this.justFocused=!0,setTimeout((function(){return t.setSelectionRange(0,9999)}
1),100)},t.prototype.onBlur=function(e){var t=e.target,n=this.getFormat(t.value);t.value=n,this.justFocused=!1},t.prototype.render=function(){var e={ref:this._inputRef,onFocus:this.onFocus,onBlur:this.onBlur,formatter:this.formatter,parser:this.parser},t=Di(Di({},e),this.props);return t.className="right-align "+this.props.className,Object(o.jsx)(Ni.a,Di({},t),void 0)},t}(a.Component),Li=Ui,ki=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Gi=function(e){function t(t){var n=e.call(this,t)||this;return n.isDirty=!1,n.onChange=function(e){n.isDirty=!0;var t=e.target.value,r=n.parseValue(t);null!=r&&n.props.minuteStep&&(r=n.roundToNearestXXMinutes(r,n.props.minuteStep)),n.setState({raw:t,value:r})},n.roundToNearestXXMinutes=function(e,t){var n=t-(e.minute()+e.second()/60)%t;return n=n>t/2?n=-t+n:n,e.clone().add(n,"minutes").seconds(0)},n.parseValue=function(e){if(e){var t=It()(e,"HHmm");if(t.isValid()||3!==e.length||(t=It()("0"+e,"HHmm")),t.isValid())return t}},n.sendChange=function(){n.props.onChange&&n.isDirty&&(n.isDirty=!1,n.props.onChange(n.state.value))},n.state={value:t.value||void 0,editing:!1,raw:t.value?t.value.format("HHmm"):void 0},n}return ki(t,e),t.prototype.componentDidUpdate=function(e,t){e.value!==this.props.value&&this.setState({value:this.props.value||void 0,raw:this.props.value?this.props.value.format("HHmm"):""})},t.prototype.render=function(){var e=this,t=this.state,n=t.raw,r=t.value,i=t.editing,a=i?n:r?r.format(this.props.format||"HH:mm"):void 0;return Object(o.jsx)(ut.a,{onFocus:function(t){var n=t.target;e.setState({editing:!0},(function(){n.select()}))},onBlur:function(){return e.setState({editing:!1},e.sendChange)},type:i?"number":"",size:this.props.size||"small",value:a,placeholder:"Time",onChange:this.onChange,disabled:this.props.disabled||!1,className:this.props.className,style:this.props.style},void 0)},t}(a.Component),Vi=(n(971),{create:function(e){return Object.assign({columnProp:"",initialSearchValue:null,filterVisible:!1,searchText:null,filtered:!1,renderDataTransform:null},e)}}),Bi={create:function(e){return Object.assign({columnProp:null,filter:null},e)},columnProp:"columnProp",filter:"filter"},Wi=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),zi=function(){return zi=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},zi.apply(this,arguments)},Hi=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},Qi=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r},Ki=ur.a.RangePicker,Xi=Ai.a.Group,Ji=Ci.a.Item,$i=Ti.a.Group;!function(e){e[e.NONE=0]="NONE",e[e.Text=1]="Text",e[e.Date=2]="Date",e[e.DateRange=3]="DateRange",e[e.DateYearRange=4]="DateYearRange",e[e.DropdownSingle=5]="DropdownSingle",e[e.DropdownMulti=6]="DropdownMulti",e[e.BooleanCheckbox=7]="BooleanCheckbox",e[e.BooleanRadio=8]="BooleanRadio"}(wr||(wr={})),function(e){e[e.Text=1]="Text",e[e.Date=2]="Date",e[e.Number=3]="Number",e[e.Boolean=4]="Boolean"}(Dr||(Dr={})),function(e){e[e.Hidden=0]="Hidden",e[e.Text=1]="Text",e[e.Date=2]="Date",e[e.Time=3]="Time",e[e.Number=4]="Number",e[e.Dropdown=5]="Dropdown",e[e.BooleanCheckbox=6]="BooleanCheckbox",e[e.BooleanToggle=7]="BooleanToggle",e[e.BooleanRadio=8]="BooleanRadio",e[e.CUSTOM=9]="CUSTOM"}(qr||(qr={})),function(e){e[e.Generic=0]="Generic",e[e.Link=1]="Link",e[e.Export=2]="Export",e[e.Reset=3]="Reset"}(Fr||(Fr={}));var Zi=a.createContext({});function eo(e){for(var t=[e];e;e=e.parentNode)t.unshift(e);return t}var to=function(e){var t=e.index,n=e.edit,r=e.canEdit,i=e.record,a=e.className,s=Hi(e,["index","edit","canEdit","record","className"]),d=Ci.a.useForm()[0];return Object(o.jsx)(Ci.a,zi({form:d,component:!1,initialValues:i}
1,{children:Object(o.jsx)(Zi.Provider,zi({value:d},{children:Object(o.jsx)("tr",zi({},s,{className:"editable-row "+(a||""),onClick:function(e){n&&r&&e&&"checkbox"===e.target.type&&!0!==e.target.disabled&&setTimeout((function(){return n(i,d,t,!1)}),0)},onBlur:function(e){var o=function(e,t){var n=eo(e),r=eo(t);if(n[0]!==r[0])return null;for(var i=0;i<n.length;i++)if(n[i]!==r[i])return n[i-1]}(e.target,e.relatedTarget);n&&r&&e&&"text"===e.target.type&&!0!==e.target.disabled&&(!o||"TD"!==o.nodeName&&"TR"!==o.nodeName)&&setTimeout((function(){return n(i,d,t,!1)}),0)}}),void 0)}),void 0)}),void 0)},no=function(e){var t,n=e.editing,r=e.dataIndex,i=e.title,s=e.inputType,d=e.inputStyle,c=e.inputClass,l=e.inputSize,u=e.decimalPrecision,p=e.placeholder,f=e.disabled,h=e.required,v=e.renderDataTransform,m=e.record,g=e.index,b=e.customEditor,y=e.additional,O=e.onChange,j=e.onEnter,I=e.onEscape,S=e.className,E=Hi(e,["editing","dataIndex","title","inputType","inputStyle","inputClass","inputSize","decimalPrecision","placeholder","disabled","required","renderDataTransform","record","index","customEditor","additional","onChange","onEnter","onEscape","className"]),R=Object(a.useContext)(Zi),_=function(e,t){if(!e||!t)return null;var n=e;return Array.isArray(t)?t.forEach((function(e){n=n[e]})):n=e[t],n}(m,r);switch(s){case qr.Hidden:t=Object(o.jsxs)(a.Fragment,{children:[Object(o.jsx)(ut.a,{type:"hidden"},void 0),_]},void 0);break;case qr.Number:t=Object(o.jsx)(Li,zi({onChange:function(e){return O?O(e,R):null},onKeyUp:function(e){return T(e)},disabled:!!f,precision:u,placeholder:p,size:l,className:c,style:zi({},d)},y),void 0);break;case qr.Time:t=Object(o.jsx)(Gi,zi({onChange:function(e){return O?O(e,R):null},format:"h:mm a",minuteStep:15,disabled:!!f,size:l,className:c,style:zi({},d)},y),void 0);break;case qr.BooleanCheckbox:t=Object(o.jsx)(Ti.a,zi({onChange:function(e){return O?O(e.target.checked,R):null},disabled:!!f,className:c,style:zi({},d)},y),void 0);break;case qr.CUSTOM:if(!b){console.error("CustomEditor Props not found."),t=Object(o.jsx)("span",zi({style:{color:"red"}},{children:"Error"}),void 0);break}t=b(R,m,zi({editing:n,dataIndex:r,title:i,inputType:s,inputStyle:d,inputClass:c,inputSize:l,decimalPrecision:u,placeholder:p,disabled:f,required:h,renderDataTransform:v,record:m,index:g,customEditor:b,additional:y,onChange:O,onEnter:j,onEscape:I,className:S},E));break;default:t=Object(o.jsx)(ut.a,zi({onChange:function(e){return O?O(e.target.value,R):null},onKeyUp:function(e){return T(e)},disabled:!!f,size:l,placeholder:p,className:c,style:zi({},d)},y),void 0)}var T=function(e){switch(e.key){case"Enter":j&&j(R,m);break;case"Esc":case"Escape":I&&I();break;default:return}},C=void 0,x=void 0;return n?(C="value",s!==qr.BooleanCheckbox&&s!==qr.BooleanRadio&&s!==qr.BooleanToggle||(C="checked"),x=s===qr.CUSTOM?b?b(R,m,{onChange:O?function(e){return O(e.target.value,R)}:null,onKeyUp:function(e){return T(e)},onPressEnter:function(){j&&j(R,m)}}):Object(o.jsx)("span",zi({style:{color:"red"}},{children:"Error"}),void 0):Object(o.jsx)(Ji,zi({name:r,style:{margin:0},valuePropName:C,rules:[{required:h,message:"*"}]},{children:t}),void 0)):x=E.children,Object(o.jsx)("td",zi({className:(n?"editable-cell ":"")+(S||"")},E,{children:m&&m.isTotalRow&&s!==qr.CUSTOM?Object(o.jsx)(o.Fragment,{},void 0):x}),void 0)},ro=function(e){function t(n){var r,i,s,d,c=e.call(this,n)||this;c.searchInputs={},c.echo=0,c.selectedRowIds=[],c._tableRef=a.createRef(),c.saveOnClickOutside=function(e,t,n,r){var i=function(i){null===i.target.closest(".editable-row")&&(c.state.editingRecord&&c.save(e,t,n,r),o())},o=function(){document.removeEventListener("click",i)};document.removeEventListener("click",i),document.addEventListener("click",i)},c.getObjectValueByPath=function(e,t){for(var n=(t=(t=t.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"")).split("."),r=0,i=n.length;r<i;++r){var o=n[r];if(!(o in e))return;e=e[o]}return e},c.getGlobalSearch=function(){return c.props.globalSearch?Object(o.jsx)(ut.a.Search,{title:"Search",placeholder:"Search",className:"generic-filter",enterButton:Object(o.jsx)(Si.a,{},void 0),size:"middle",value:c.state.globalFilter||"",onChange:function(e){return c.setState({globalFilter:e.target.value})},onPressEnter:function(){return c.onSearch()},onSearch:function(){return c.onSearch()}},void 0):null},c.onInputChange=function(e,t,n,r){var i=zi({},t);i.searchText="checkbox"===e.target.type?e.target.checked:e.target.value,c.setState({columnStates:c.getUpdatedColumnStateList(i)},(function(){n&&n.focus(),r&&r(i)}))},c.onDateInputChange=function(e,t,n,r){var i=zi({},n);i.searchText=t,c.setState({columnStates:c.getUpdatedColumnStateList(i)},(function(){var e=document.getElementById(r);e&&e.focus()}))},c.onDateRangeInputChange=function(e,t,n,r){var i=zi({},n);i.searchText=t[0]&&t[1]?t[0]+" - "+t[1]:null,c.setState({columnStates:c.getUpdatedColumnStateList(i)},(function(){r.focus()}))},c.onSearch=function(e){var t=[],n=c.state.filters.map((function(e){return e}));if(e){var r=zi({},e),i=r.searchText;r.filterVisible=!1,r.filtered=!!i;var o=n.filter((function(e){return e.columnProp===r.columnProp}));o.length>0?o[0].filter=i:n.push({columnProp:r.columnProp,filter:i}),t=c.getUpdatedColumnStateList(r)}else t=c.state.columnStates;if(c.props.serverSide)c.setState({filters:n,pagination:zi(zi({},c.state.pagination),{current:1}),columnStates:t},(function(){return c.callFetchData(c.state.pagination,n,c.state.sorter,c.state.globalFilter)}));else{var a=(c.props.data||[]).map((function(e){var r=!0;
1n.forEach((function(n){var i=new RegExp(n.filter?n.filter:"","gi"),o=t.filter((function(e){return e.columnProp===n.columnProp}))[0],a=o.renderDataTransform?o.renderDataTransform(e[o.columnProp],e):e[o.columnProp];switch(o.columnType||typeof a){case Dr.Text:r=r&&!!a&&a.match(i);break;case Dr.Date:n.filter&&It()(a).isValid()&&It()(n.filter).isValid()&&(r=r&&It()(n.filter).isSame(It()(a)));break;case"string":r=r&&a.match(i);break;case Dr.Number:case"number":r=r&&a.toString().match(i);break;case Dr.Boolean:case"boolean":r=r&&(!n.filter||a.toString()===n.filter);break;case"object":if(It.a.isMoment(a)&&n.filter){var s=n.filter.split(" - ");2===s.length&&(r=r&&a.isBetween(It()(s[0]),It()(s[1]),"days","[]"))}}}));var i=!0;return c.state.globalFilter&&c.state.globalFilter.split(",").forEach((function(t){t=t.trim();var n=new RegExp(t||"","gi"),r=!1;for(var o in e)if(e.hasOwnProperty(o)){var a=e[o];switch(typeof a){case"string":r=r||!!a.match(n);break;case"number":r=r||!!a.toString().match(n);break;case"boolean":r=r||!t||a.toString()===t;break;case"object":It.a.isMoment(a)}}i=i&&r})),r&&i?zi({},e):null})).filter((function(e){return!!e}));c.setState({filters:n,columnStates:t,filteredData:a,sumResult:c.getLocalSumResult(a)})}c.saveTableState({columnKey:c.state.sorter.columnKey,field:c.state.sorter.field,order:c.state.sorter.order},n,t,c.state.globalFilter)},c.isEditing=function(e){return e===c.state.editingRecord},c.edit=function(e,t,n,r){if(!c.props.editOptions||c.props.editOptions.fullTableEdit||n!==c.state.editingIndex){var i=function(){t&&(c.editingRowForm=t),c.setState({editingRecord:e,editingIndex:n})};r&&c.saveOnClickOutside(t||c.editingRowForm,e||{},n||-1),t?c.save(t,e||{},n||-1,(function(e){e&&i()})):i()}},c.save=function(e,t,n,r){e.validateFields().then((function(e){var n=!1;for(var i in e)It.a.isMoment(e[i])&&(i.toLowerCase().indexOf("time")>-1&&-1===i.toLowerCase().indexOf("date")?e[i]=e[i].format("HH:mm:ss"):e[i]=e[i].format());for(var i in e)e[i]!==t[i]&&(n=!0);var o=function(e,t){c.setState({data:e&&t?t:c.state.data,editingRecord:null,editingIndex:null},(function(){c.refresh(),r&&r(e)}))};n&&(c.props.editOptions&&c.props.editOptions.saveRow?c.props.editOptions.saveRow(t,e,(function(e,t){e&&o(e,t)})):o(!0))})).catch((function(){}))},c.cancel=function(){c.setState({editingRecord:null,editingIndex:null},(function(){return c.props.editOptions&&c.props.editOptions.cancelEdit?c.props.editOptions.cancelEdit():null}))},c.getLocalSumResult=function(e){if(!c.props.showSum)return null;var t=c.props.columns;if(e.length<=1)return null;var n={};return t.forEach((function(e){n[e.dataIndex||""]=void 0})),e.forEach((function(e){t.forEach((function(t){var r=(t.dataIndex||"").split("."),i=e;r.forEach((function(e){return i=i[e]}));var o=i;n[t.dataIndex||""]=(n[t.dataIndex||""]||0)+(o||0)}))})),n||null};var l={};if(n.stateSaving&&n.stateSaving.enabled){var u=n.stateSaving.perSession?sessionStorage.getItem(c.getStateSavingTableKey()):localStorage.getItem(c.getStateSavingTableKey());if(u){l=JSON.parse(u);var p=c.props.columns.map((function(e){return e.dataIndex||e.key}));((l.filters||[]).some((function(e){return!p.includes(e.columnProp||"")}))||l.sorter.columnKey&&!p.includes(l.sorter.columnKey||"")||(l.columnStates||[]).some((function(e){return!p.includes(e.columnProp||"")})))&&(l={})}}var f={};if((n.columns||[]).some((function(e){return e.defaultSortOrder}))){var h=(c.props.columns||[]).find((function(e){return e.defaultSortOrder}));h&&(f.columnKey=h.dataIndex||h.key,f.field=h.dataIndex||h.key,f.order=h.defaultSortOrder)}return c.state={pagination:c.props.tableProps&&!1===c.props.tableProps.pagination?{hideOnSinglePage:!0,pageSize:1e6}:{defaultPageSize:(null===(i=null===(r=c.props.tableProps)||void 0===r?void 0:r.pagination)||void 0===i?void 0:i.defaultPageSize)||t.DefaultPageSize,pageSizeOptions:(null===(d=null===(s=c.props.tableProps)||void 0===s?void 0:s.pagination)||void 0===d?void 0:d.pageSizeOptions)||t.DefaultPageSizeOptions,defaultCurrent:1,position:c.props.paginationPosition||["bottomRight"],showSizeChanger:!0,showTotal:function(e,t){return c.state.pagination.dataTableUnfilteredTotal&&c.state.pagination.dataTableUnfilteredTotal!==e?"Showing "+t[0]+" to "+t[1]+" of "+e+" filtered from "+c.state.pagination.dataTableUnfilteredTotal+" total":"Showing "+t[0]+" to "+t[1]+" of "+e}},sumResult:n.serverSide?null:n.showSum?c.getLocalSumResult(n.data||[]):null,sorter:n.stateSaving&&n.stateSaving.enabled&&l.sorter?l.sorter:f,filters:n.stateSaving&&n.stateSaving.enabled&&l.filters?l.filters:c.props.columns.filter((function(e){return null!==e.initialFilterValue&&void 0!==e.initialFilterValue})).map((function(e){return Bi.create({columnProp:e.dataIndex||e.key,filter:e.initialFilterValue})})),globalFilter:null,columnStates:n.stateSaving&&n.stateSaving.enabled&&l.columnStates&&l.columnStates.length===c.props.columns.length?l.columnStates:c.props.columns.map((function(e){return Vi.create({columnProp:e.dataIndex||e.key,columnType:e.columnType,initialSearchValue:e.initialFilterValue,searchText:null!==e.initialFilterValue&&void 0!==e.initialFilterValue?e.initialFilterValue:"",filtered:null!==e.initialFilterValue&&void 0!==e.initialFilterValue,renderDataTransform:e.renderDataTransform})})),data:[],filteredData:null,editingRecord:null,loading:!1},c.handleTableChange=c.handleTableChange.bind(c),c}return Wi(t,e),t.prototype.componentDidMount=function(){this.props.serverSide?this.callFetchData(this.state.pagination,this.state.filters,this.state.sorter,this.state.globalFilter):this.setState({data:this.props.data||[]}),this._tableRef.current.querySelector("table").tabIndex=0},t.prototype.componentDidUpdate=function(e){e.fetchData!=this.props.fetchData&&(this.props.serverSide?this.callFetchData(this.state.pagination,this.state.filters,this.state.sorter,this.state.globalFilter):this.setState({data:this.props.data||[]}));var t=this._tableRef.current.querySelector(".ant-pagination-options-size-changer");t&&t.setAttribute("role","button")},t.prototype.resetTable=function(){var e=this,t=zi({},this.state.pagination);t.current=1;var n=this.state.columnStates.map((function(e){return e.filtered=null!==e.initialSearchValue&&void 0!==e.initialSearchValue,e.filterVisible=!1,e.searchText=null!==e.initialSearchValue&&void 0!==e.initialSearchValue?e.initialSearchValue:"",e})),r={};if((this.props.columns||[]).some((function(e){return e.defaultSortOrder}))){var i=(this.props.columns||[]).find((function(e){return e.defaultSortOrder}));i&&(r.columnKey=i.dataIndex||i.key,r.field=i.dataIndex||i.key,r.order=i.defaultSortOrder)}this.setState({pagination:t,sorter:r,filters:n.filter((function(e){return null!==e.initialSearchValue&&void 0!==e.initialSearchValue})).map((function(e){return Bi.create({columnProp:e.columnProp,filter:e.initialSearchValue})})),globalFilter:null,columnStates:n},(function(){return e.refresh()})),this.saveTableState({},[],n,null)},t.prototype.getSelected=function(){return this.selectedRowIds},t.prototype.refresh=function(){var e=this;this.props.serverSide?this.callFetchData(this.state.pagination,this.state.filters,this.state.sorter,this.state.globalFilter):this.setState({data:this.props.data||[],filteredData:null,sumResult:this.getLocalSumResult(this.props.data||[])},(function(){e.state.columnStates.filter((function(e){return e.filtered}
1)).forEach((function(t){return e.onSearch(t)}))}))},t.prototype.render=function(){var e=this,t=zi({},this.props.tableProps);t.dataSource=this.state.filteredData||this.state.data,t.pagination=this.state.pagination,t.size=t.size||"small",t.onChange=this.handleTableChange,void 0===t.loading&&(t.loading=this.state.loading);var n=this.props.columns.map((function(e){return e}));!0===this.props.selectable&&(n=Qi([this.getSelectColumn()],n));var r=n.map((function(e,t){return e.editOptions&&e.editOptions.editable?zi(zi({},e),{index:t}):e}));if(this.props.showSum){var i=this.state.sumResult;i&&(t.components={body:{wrapper:function(e){var t=Hi(e,[]);return Object(o.jsx)("tbody",zi({},t,{children:Object(o.jsxs)("tr",zi({className:"ant-table-row dtSumRow"},{children:[t.rowSelection?Object(o.jsx)("td",{className:"ant-table-selection-column"},void 0):null,r.map((function(e,t){var n=e.dataIndex,r=e.key,a=e.align,s=i&&n?i[n]:void 0;return e.sumRender?s=e.sumRender(s,i):e.columnType!==Dr.Number?s=void 0:e.render&&(s=e.render(s,i,0)),Object(o.jsx)("td",zi({style:{textAlign:a}},{children:s}),"sumCol_"+(n||r))}))]}),"sumRow")}),void 0)}}})}if(this.props.editOptions&&this.props.columns.some((function(e){return!!e.editOptions&&e.editOptions.editable}))){var s=t.components?t.components.body:{};t.components=zi(zi({},t.components),{body:zi(zi({},s),{row:to,cell:no})}),this.props.editOptions&&this.props.editOptions.rowClickForEdit||this.props.editOptions&&this.props.editOptions.fullTableEdit?t.onRow=function(t,n){return{record:t,index:n,edit:e.edit,canEdit:e.props.editOptions&&e.props.editOptions.allowEdit}}:(this.props.onRowClick&&(t.onRow=function(t,n){return{onClick:function(){return e.props.onRowClick?e.props.onRowClick(t):void 0}}}),r.push({title:"",dataIndex:"actions",render:function(t,n,r){var i=e.isEditing(n);return Object(o.jsx)("div",zi({style:{display:"flex",justifyContent:"center"}},{children:i?Object(o.jsxs)(a.Fragment,{children:[Object(o.jsx)(Zi.Consumer,{children:function(t){return e.props.editOptions&&e.props.editOptions.useIconButtons?Object(o.jsx)(rt.a,{size:"small",icon:Object(o.jsx)(Sr.a,{},void 0),style:{marginRight:5},title:"Done",shape:"circle",type:"primary",onClick:function(){return e.save(t,n,r)}},void 0):Object(o.jsx)("a",zi({href:"javascript:;",onClick:function(){return e.save(t,n,r)},style:{marginRight:5}},{children:"Done"}),void 0)}},void 0),e.props.editOptions&&e.props.editOptions.useIconButtons?Object(o.jsx)(rt.a,{size:"small",icon:Object(o.jsx)(kr.a,{},void 0),shape:"circle",danger:!0,title:"Cancel",onClick:function(){return e.cancel()}},void 0):Object(o.jsx)("a",zi({href:"javascript:;",onClick:function(){return e.cancel()}},{children:"Cancel"}),void 0)]},void 0):e.props.editOptions&&e.props.editOptions.useIconButtons?Object(o.jsx)(rt.a,{size:"small",icon:Object(o.jsx)(Ei.a,{},void 0),shape:"circle",title:"Edit",onClick:function(){return e.edit(n,e.editingRowForm,r)}},void 0):Object(o.jsx)("a",zi({onClick:function(){return e.edit(n,e.editingRowForm,r)}},{children:"Edit"}),void 0)}),void 0)}}))}else this.props.onRowClick&&(t.onRow=function(t,n){return{onClick:function(){return e.props.onRowClick?e.props.onRowClick(t):void 0}}});!!this.props.styleOptions&&this.props.styleOptions.compact;r=r.map((function(t){return t.editOptions&&t.editOptions.editable?zi(zi({},t),{onCell:function(n){return{record:n,inputType:t.editOptions?t.editOptions.type:"",dataIndex:t.dataIndex,title:t.title,inputStyle:t.editOptions?t.editOptions.inputStyle:{},inputClass:t.editOptions?t.editOptions.inputClass:"",inputSize:void 0,decimalPrecision:t.editOptions?t.editOptions.decimalPrecision:void 0,placeholder:t.editOptions?t.editOptions.placeholder:void 0,customEditor:t.editOptions?t.editOptions.customEditor:null,additional:t.editOptions?t.editOptions.additional:null,disabled:!!t.editOptions&&t.editOptions.disabled,required:!!t.editOptions&&t.editOptions.required,onChange:t.editOptions?t.editOptions.onChange:null,onEnter:e.save,onEscape:e.cancel,renderDataTransform:t.renderDataTransform}}}):t})),t.columns=r.map((function(t){var n,r=zi({},t),i=e.getColumnState(t),o=!0;switch(t.filterType){case wr.Text:r.filterDropdown=e.textFilter(i,t.title),r.onFilterDropdownVisibleChange=e.onFilterVisibleChangeWithFocus(i);break;case wr.Date:r.filterDropdown=e.dateFilter(i,t.title),r.onFilterDropdownVisibleChange=e.onFilterVisibleChangeWithFocus(i);break;case wr.DateRange:r.filterDropdown=e.dateRangeFilter(i,t.title),r.onFilterDropdownVisibleChange=e.onFilterVisibleChangeWithFocus(i);break;case wr.DateYearRange:r.filterDropdown=e.dateYearRangeFilter(i,t.title),r.onFilterDropdownVisibleChange=e.onFilterVisibleChangeWithFocus(i);break;case wr.BooleanCheckbox:r.filterDropdown=e.booleanCheckboxFilter(i,t.title),r.onFilterDropdownVisibleChange=e.onFilterVisibleChange(i);break;case wr.BooleanRadio:r.filterDropdown=e.booleanRadioFilter(i,t.title),r.onFilterDropdownVisibleChange=e.onFilterVisibleChange(i);break;case wr.DropdownSingle:case wr.DropdownMulti:if(!t.dropdownFilterOptions){console.error("No Dropdown Options Provided for Dropdown Filter. Column: "+t.title);break}r.filterDropdown=e.dropdownFilter(i,t),r.onFilterDropdownVisibleChange=e.onFilterVisibleChange(i);break;default:o=!1}o&&(r.filterDropdownVisible=i.filterVisible,r.filterIcon=e.filterIcon(i));var a=r.render;return r.render=a?function(e,n,r){return a(t.renderDataTransform?t.renderDataTransform(e,n):e,n,r)}:t.renderDataTransform?t.renderDataTransform:void 0,e.state.sorter&&(!0!==e.state.sorter||e.props.serverSide||(r.sorter=function(e,t){return r.dataIndex?[e[r.dataIndex],t[r.dataIndex]].sort()[0]===e[r.dataIndex]?1:-1:0}),r.sortOrder=e.state.sorter.columnKey?e.state.sorter.columnKey===r.dataIndex&&e.state.sorter.order:r.sortOrder),(r.children||[]).forEac
1h((function(t){t.sortOrder=e.state.sorter.columnKey===t.dataIndex&&e.state.sorter.order})),t.editOptions&&t.editOptions.editable&&(r.onCell=function(n){return{record:n,inputType:t.editOptions?t.editOptions.type:"",inputSize:void 0,dataIndex:t.dataIndex,title:t.title,editing:!(!e.props.editOptions||!e.props.editOptions.fullTableEdit)||e.isEditing(n),inputStyle:t.editOptions?t.editOptions.inputStyle:{},inputClass:t.editOptions?t.editOptions.inputClass:"",decimalPrecision:t.editOptions?t.editOptions.decimalPrecision:void 0,placeholder:t.editOptions?t.editOptions.placeholder:void 0,customEditor:t.editOptions?t.editOptions.customEditor:null,additional:t.editOptions?t.editOptions.additional:null,disabled:!!t.editOptions&&t.editOptions.disabled,onChange:t.editOptions?t.editOptions.onChange:null,onEnter:e.save,onEscape:e.cancel,renderDataTransform:t.renderDataTransform}}),r.key||(r.key=Array.isArray(r.dataIndex)?r.dataIndex.join():null===(n=r.dataIndex)||void 0===n?void 0:n.toString()),r}));var d=this.state,c=d.pagination,l=d.filters,u=d.sorter,p=["datatable"];return this.props.styleOptions&&(this.props.styleOptions.bordered&&p.push("datatable-bordered"),this.props.styleOptions.alternatingRowHighlight&&p.push("datatable-alternating-row"),this.props.styleOptions.compact&&p.push("datatable-compact")),this.props.editOptions&&this.props.editOptions.rowClickForEdit&&p.push("cursor-hand"),this.props.onRowClick&&p.push("cursor-hand"),Object(o.jsxs)("div",zi({className:p.join(" ")},{children:[this.props.title||this.props.buttonBar||this.props.globalSearch?Object(o.jsxs)("div",zi({className:"datatable-header",style:{display:"flex"}},{children:[this.props.title?Object(o.jsx)(ot.a.Title,zi({level:3},{children:this.props.title}),void 0):null,this.getGlobalSearch(),this.props.buttonBar?Object(o.jsx)("div",zi({className:"dataTable-button-bar"},{children:this.props.buttonBar.map((function(t){var n=t,r=n.dataTableButtonType,i=(n.export,n.to,Hi(n,["dataTableButtonType","export","to"]));switch(r){case Fr.Export:i.onClick=function(){return t.export(e.getTableStateDTO(c,l,u,e.state.globalFilter))};break;case Fr.Reset:t.onClick=function(){return e.resetTable()};
1case Fr.Link:}return Object(a.createElement)(rt.a,zi({},i,{icon:t.icon,key:t.label}),t.label)}))}),void 0):null]}),void 0):null,Object(o.jsx)(Pi.a,zi({ref:this._tableRef},t),void 0)]}),void 0)},t.prototype.getRowKey=function(e,t){return"function"===typeof this.props.tableProps.rowKey?this.props.tableProps.rowKey(e,t):""+this.getObjectValueByPath(e,""+(this.props.tableProps.rowKey||"id"))},t.prototype.getSelectColumn=function(){var e=this;this.selectedRowIds=this.selectedRowIds.filter((function(t){return(e.state.filteredData||e.state.data).some((function(n,r){return e.getRowKey(n,r)===t}))}));var t=this.selectedRowIds.length,n=(this.state.filteredData||this.state.data).length;return{columnProps:{title:Object(o.jsx)(Ti.a,{checked:t>0&&t===n,indeterminate:0!==t&&t!==n,onChange:function(t){var n=e.selectedRowIds;n=t.target.checked?(e.state.filteredData||e.state.data).map((function(t,n){return e.getRowKey(t,n)})):[],e.selectedRowIds=n,e.forceUpdate()}},void 0),dataIndex:"selectColumn_box",render:function(t,n,r){var i=e.getRowKey(n,r);return!e.props.selectVisibility||e.props.selectVisibility(n)?Object(o.jsx)(Ti.a,{checked:-1!==e.selectedRowIds.indexOf(i),onChange:function(t){var n=e.selectedRowIds.filter((function(e){return e!==i}));t.target.checked&&n.push(i),e.selectedRowIds=n,e.forceUpdate()}},void 0):Object(o.jsx)(o.Fragment,{},void 0)},width:20}}},t.prototype.getStateSavingTableKey=function(){return this.props.stateSaving&&this.props.stateSaving.tableUniqueKey?"DataTable_"+this.props.stateSaving.tableUniqueKey:(console.log("State saving unique table key not set!"),"")},t.prototype.callFetchData=function(e,t,n,r){var i=this;if(this.props.fetchData&&"function"===typeof this.props.fetchData){var o=this.getTableStateDTO(e,t,n,r);this.props.fetchData(o,(function(){return o.echo===i.echo}),(function(t){var n=zi({},e);n.total=t.filteredCount,n.dataTableUnfilteredTotal=t.totalCount,n.pageSize*(n.current-1)>t.filteredCount&&(n.current=0),i.setState({data:t.results||[],pagination:n,sumResult:t.sumResult})}))}else if(this.props.fetchData&&this.props.fetchData.fetch){var a=this.getTableStateDTO(e,t,n,r);this.setState({loading:!0}),this.props.fetchData.fetch(a).then((function(t){if(a.echo===i.echo){var n=zi({},e);n.total=t.filteredCount,n.dataTableUnfilteredTotal=t.totalCount,n.pageSize*(n.current-1)>t.filteredCount&&(n.current=0),i.setState({data:t.results||[],loading:!1,pagination:n,sumResult:t.sumResult},(function(){i.props.fetchData&&"function"!==typeof i.props.fetchData&&i.props.fetchData.success&&i.props.fetchData.success(t.results||[])}))}})).catch((function(e){var t;i.setState({loading:!1}),i.props.fetchData&&"function"!==typeof i.props.fetchData&&i.props.fetchData.fail?i.props.fetchData.fail(e):xi.a.error({message:i.props.fetchData&&"function"!==typeof i.props.fetchData&&i.props.fetchData.failureMessage?null===(t=i.props.fetchData)||void 0===t?void 0:t.failureMessage:"Failed to retrieve data."})}))}},t.prototype.handleTableChange=function(e,t,n){var r=zi({},this.state.pagination);r.current=e.current,r.pageSize=e.pageSize,this.setState({pagination:r,sorter:n}),this.callFetchData(r,this.state.filters,n,this.state.globalFilter),this.props.stateSaving&&this.props.stateSaving.enabled&&(this.state.sorter.columnKey===n.columnKey&&this.state.sorter.order===n.order||this.saveTableState({columnKey:n.columnKey,field:n.field,order:n.order},this.state.filters,this.state.columnStates,this.state.globalFilter))},t.prototype.saveTableState=function(e,t,n,r){if(this.props.stateSaving&&this.props.stateSaving.enabled){var i=JSON.stringify({sorter:e,filters:t,columnStates:n,globalFilter:r});this.props.stateSaving.perSession?sessionStorage.setItem(this.getStateSavingTableKey(),i):localStorage.setItem(this.getStateSavingTableKey(),i)}},t.prototype.getTableStateDTO=function(e,t,n,r){var i,o;return this.echo+=1,{pageLength:null!==(i=(null===e||void 0===e?void 0:e.pageSize)||(null===e||void 0===e?void 0:e.defaultPageSize))&&void 0!==i?i:-1,page:(null!==(o=(null===e||void 0===e?void 0:e.current)||(null===e||void 0===e?void 0:e.defaultCurrent))&&void 0!==o?o:0)-1,sortField:n.field||null,sortOrder:n.order||null,echo:this.echo,filters:t,globalFilter:r}},t.prototype.textFilter=function(e,t){var n=this;return e?Object(o.jsxs)("div",zi({className:"text-filter-dropdown"},{children:[Object(o.jsx)(ut.a,{ref:function(t){return n.searchInputs[e.columnProp]=t},placeholder:"Search"+t,value:e.searchText||"",onChange:function(t){return n.onInputChange(t,e)},onPressEnter:function(){return n.onSearch(e)},allowClear:!0,width:130},void 0),Object(o.jsx)(rt.a,zi({type:"primary",onClick:function(){return n.onSearch(e)}},{children:"Search"}),void 0)]}),void 0):Object(o.jsx)(a.Fragment,{},void 0)},t.prototype.dateFilter=function(e,t){var n,r=this,i="button_"+e.columnProp;return Object(o.jsxs)("div",zi({ref:function(e){return n=e},className:"date-filter-dropdown"},{children:[Object(o.jsx)(ur.a,{ref:function(t){return r.searchInputs[e.columnProp]=t},placeholder:"Search"+t,onChange:function(t,n){return r.onDateInputChange(t,n,e,i)},getPopupContainer:function(){return n}
1,format:"M/D/YYYY",allowClear:!0},void 0),Object(o.jsx)(rt.a,zi({id:i,type:"primary",onClick:function(){return r.onSearch(e)}},{children:"Search"}),void 0)]}),void 0)},t.prototype.dateRangeFilter=function(e,t){var n,r=this,i="button_"+e.columnProp;return Object(o.jsxs)("div",zi({ref:function(e){return n=e},className:"daterange-filter-dropdown"},{children:[Object(o.jsx)(Ki,{ref:function(t){return r.searchInputs[e.columnProp]=t},onChange:function(t,n){return r.onDateRangeInputChange(t,n,e,document.getElementById(i))},onOpenChange:function(t){return r.onDateRangePickerOpenChange(t,e)},getPopupContainer:function(){return n},format:"M/D/YYYY",allowClear:!0},void 0),Object(o.jsx)(rt.a,zi({id:i,type:"primary",onClick:function(){return r.onSearch(e)}},{children:"Search"}),void 0)]}),void 0)},t.prototype.dateYearRangeFilter=function(e,t){var n,r=this,i="button_"+e.columnProp;return Object(o.jsxs)("div",zi({ref:function(e){return n=e},className:"daterange-filter-dropdown"},{children:[Object(o.jsx)(Ki,{ref:function(t){return r.searchInputs[e.columnProp]=t},onChange:function(t,n){return r.onDateRangeInputChange(t,n,e,document.getElementById(i))},onOpenChange:function(t){return r.onDateRangePickerOpenChange(t,e)},getPopupContainer:function(){return n},format:"YYYY",picker:"year",allowClear:!0},void 0),Object(o.jsx)(rt.a,zi({id:i,type:"primary",onClick:function(){return r.onSearch(e)}},{children:"Search"}),void 0)]}),void 0)},t.prototype.booleanCheckboxFilter=function(e,t){var n=this;return Object(o.jsx)("div",zi({className:"boolean-checkbox-filter-dropdown"},{children:Object(o.jsx)(Ti.a,{ref:function(t){return n.searchInputs[e.columnProp]=t},onChange:function(t){return n.onInputChange(t,e,undefined,(function(e){return n.onSearch(e)}))},checked:!!e.searchText},void 0)}),void 0)},t.prototype.booleanRadioFilter=function(e,t){var n=this,r="button_"+e.columnProp;return Object(o.jsxs)("div",zi({className:"boolean-radio-filter-dropdown"},{children:[Object(o.jsxs)(Xi,zi({ref:function(t){return n.searchInputs[e.columnProp]=t},onChange:function(t){return n.onInputChange(t,e,document.getElementById(r))},value:e.searchText?e.searchText:""},{children:[Object(o.jsx)(Ai.a,zi({value:"true"},{children:"Yes"}),void 0),Object(o.jsx)(Ai.a,zi({value:"false"},{children:"No"}),void 0),Object(o.jsx)(Ai.a,zi({value:""},{children:"All"}),void 0)]}),void 0),Object(o.jsx)(rt.a,zi({id:r,type:"primary",onClick:function(){return n.onSearch(e)}},{children:"Search"}),void 0)]}),void 0)},t.prototype.dropdownFilter=function(e,t){var n=this,r=t.dropdownFilterOptions||[];return Object(o.jsxs)("div",zi({style:{padding:5,minWidth:90}},{children:[t.filterType===wr.DropdownMulti?Object(o.jsx)($i,zi({onChange:function(t){return n.onInputChange({target:{value:t.join(","),type:"text"}},e)},value:(e.searchText||"").split(","),style:{textAlign:"left"}},{children:r.map((function(i,s){return Object(o.jsxs)(a.Fragment,{children:[Object(o.jsx)(Ti.a,zi({ref:function(t){return n.searchInputs[e.columnProp]=t},value:i.value},{children:i.text}),void 0),s<r.length-1?Object(o.jsx)("br",{},void 0):null]},t.title+"_dpdn_"+s)}))}),void 0):Object(o.jsx)(Xi,zi({ref:function(t){return n.searchInputs[e.columnProp]=t},onChange:function(t){return n.onInputChange(t,e)},value:e.searchText||void 0,style:{textAlign:"left"}},{children:r.map((function(e,n){return Object(o.jsxs)(a.Fragment,{children:[Object(o.jsx)(Ai.a,zi({value:e.value},{children:e.text}),void 0),n<r.length-1?Object(o.jsx)("br",{},void 0):null]},t.title+"_dpdn_"+n)}))}),void 0),Object(o.jsx)("hr",{},void 0),Object(o.jsxs)("div",zi({style:{display:"flex",justifyContent:"space-between"}},{children:[Object(o.jsx)("a",zi({onClick:function(){return n.onInputChange({target:{value:"",type:"text"}},e,null,(function(e){return n.onSearch(e)}))}},{children:"Reset"}),void 0),Object(o.jsx)(rt.a,zi({size:"small",type:"primary",onClick:function(){return n.onSearch(e)}},{children:"Okay"}),void 0)]}),void 0)]}),void 0)},t.prototype.filterIcon=function(e){return e.filtered?Object(o.jsx)(Ri.a,{style:{color:"#108ee9"}},void 0):Object(o.jsx)(_i.a,{style:{color:"#aaa"}},void 0)},t.prototype.onFilterVisibleChangeWithFocus=function(e){var t=this;return function(n){var r=zi({},e);r.filterVisible=n,t.setState({columnStates:t.getUpdatedColumnStateList(r)},(function(){setTimeout((function(){t.searchInputs[r.columnProp]&&t.searchInputs[r.columnProp].focus()}),0)}))}},t.prototype.onFilterVisibleChange=function(e){var t=this;return function(n){var r=zi({},e);r.filterVisible=n,t.setState({columnStates:t.getUpdatedColumnStateList(r)})}},t.prototype.onDateRangePickerOpenChange=function(e,t){},t.prototype.getColumnState=function(e){return this.state.columnStates.find((function(t){return t.columnProp===(e.dataIndex||e.key)}))||Vi.create({columnProp:e.dataIndex||e.key,columnType:e.columnType,initialSearchValue:e.initialFilterValue||"",searchText:null!==e.initialFilterValue&&void 0!==e.initialFilterValue?e.initialFilterValue:"",filtered:null!==e.initialFilterValue&&void 0!==e.initialFilterValue,renderDataTransform:e.renderDataTransform})},t.prototype.getUpdatedColumnStateList=function(e){return this.state.columnStates.map((function(t){return t.columnProp===e.columnProp?e:t}))},t.DefaultPageSize=25,t.DefaultPageSizeOptions=["25","50","75","100"],t}(a.Component),io=ro,oo=function(){function e(){}return e.Default=function(e,t,n,r){return{dataTableButtonType:Fr.Generic,label:e,onClick:t,icon:n,loading:r}},e.Primary=function(e,t){return{dataTableButtonType:Fr.Generic,label:e,onClick:t,type:"primary",icon:void 0}},e.Danger=function(e,t){return{dataTableButtonType:Fr.Generic,label:e,onClick:t,danger:!0,icon:void 0}},e.Export=function(e,t){return{dataTableButtonType:Fr.Export,label:"Export",export:e,loading:t,disabled:t,icon:void 0}},e.Reset=function(){return{dataTableButtonType:Fr.Reset,label:"Reset",icon:void 0}},e.Link=function(e,t){return{dataTableButtonType:Fr.Link,label:e,to:t,icon:void 0}},e}(),ao=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),so=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(){Ii.AnnouncementTypes().then((function(e){n.setState({announcementTypes:e})})),n.setState({announcementStatusTypes:Ii.AnnouncementStatusTypes()}),Ii.Institutions().then((function(e){n.setState({institutions:e})})),Ii.Roles().then((function(e){n.setState({roleTypes:e})}))},n.getColumnDefinitions=function(){return[{title:"Title",dataIndex:hr.title,sorter:!0,width:200,filterType:wr.Text,ellipsis:!0},{title:"Message",dataIndex:hr.message,sorter:!0,filterType:wr.Text,width:300,ellipsis:!0},{title:"Type",dataIndex:hr.announcementTypeId,width:150,render:function(e,t){var n;return null===(n=t.announcementType)||void 0===n?void 0:n.name},sorter:!0,ellipsis:!0,filterType:wr.DropdownMulti,dropdownFilterOptions:n.state.announcementTypes},{title:"Institutions",dataIndex:hr.announcementInstitutions,width:150,render:function(e,t){return null!=t.announcementInstitutions?ei.newLineFormat(t.announcementInstitutions.map((function(e){var t;return null===(t=e.institution)||void 0===t?void 0:t.abbreviation})),!0):""},filterType:wr.DropdownMulti,dropdownFilterOptions:n.state.institutions},{title:"Roles",dataIndex:hr.announcementRoles,width:150,render:function(e,t){return null!=t.announcementRoles?ei.newLineFormat(t.announcementRoles.map((function(e){var t;return null===(t=e.role)||void 0===t?void 0:t.name})),!0):""},filterType:wr.DropdownMulti,dropdownFilterOptions:n.state.roleTypes}
1,{title:"Show Dates",dataIndex:hr.showOnDate,width:150,render:function(e,t){return $r.dateRangeShortFormat(t.showOnDate,t.showUntilDate)},sorter:!0,filterType:wr.DateRange},{title:"Status",dataIndex:hr.status,width:150,render:function(e,t){return Zr.getAnnouncementStatus(t.showOnDate,t.showUntilDate)},sorter:!0,filterType:wr.DropdownMulti,dropdownFilterOptions:n.state.announcementStatusTypes}]},n.openAnnouncement=function(e){e.id&&T.push(x.generate(x.ANNOUNCEMENT_DETAILS,{id:e.id},{}))},n.addAnnouncement=function(){T.push(x.generate(x.NEW_ANNOUNCEMENT))},n.state={institutions:[],roleTypes:[],announcementTypes:[],announcementStatusTypes:[]},n}return ao(t,e),t.prototype.componentDidMount=function(){this.fetchData()},t.prototype.render=function(){var e=this,t=[];return t.push(oo.Reset()),Je.isAuthorized([gn.EDIT_ANNOUNCEMENT])&&t.push(oo.Default("New Announcement",(function(){return e.addAnnouncement()}))),Object(o.jsx)(io,{ref:function(t){return e._dataTable=t},onRowClick:this.openAnnouncement,serverSide:!0,tableProps:{rowKey:"id",scroll:{x:1750}},globalSearch:!0,buttonBar:t,columns:this.getColumnDefinitions(),fetchData:{fetch:function(e){return lr.getAnnouncementTableData(e)}},stateSaving:{enabled:!0,tableUniqueKey:"announcement_list"}},void 0)},t}(a.Component),co=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),lo=function(e){function t(t){return e.call(this,t)||this}return co(t,e),t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Announcements",breadcrumbs:Xn.announcementList()},void 0),Object(o.jsx)(Qn.a,{children:Object(o.jsx)(so,{},void 0)},void 0)]},void 0)},t}(a.Component),uo=Object(u.i)(lo),po=n(153),fo=(n(266),function(e){return Object.assign({userId:"00000000-0000-0000-0000-000000000000",includeShown:!1,fetchAmount:0,loadedAmount:0},e)}),ho=n(249),vo=(n(557),function(){function e(){}return e.SUCCESS=1,e.WARNING=2,e.DANGER=3,e.INFORMATIONAL=4,e}()),mo=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),go=function(){return go=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},go.apply(this,arguments)},bo=function(e){function t(t){return e.call(this,t)||this}return mo(t,e),t.prototype.render=function(){var e,t="";switch(null===(e=this.props.announcement.announcementType)||void 0===e?void 0:e.id){case vo.SUCCESS:t="card-success";break;case vo.INFORMATIONAL:t="card-informational";break;case vo.DANGER:t="card-danger";break;case vo.WARNING:t="card-warning"}return Object(o.jsx)(y.b,go({direction:"vertical"},{children:Object(o.jsxs)(Qn.a,go({className:t,type:"inner",title:this.props.announcement.title,extra:Object(o.jsx)(ot.a.Text,{children:$r.mediumDate(this.props.announcement.showOnDate)},void 0)},{children:[Object(o.jsx)(Mr,{value:this.props.announcement.message,defaultValue:this.props.announcement.message,readonly:!0},void 0),this.renderInstitutionTags(this.props.announcement),this.renderRoleTags(this.props.announcement)]}),this.props.announcement.id)}),void 0)},t.prototype.renderInstitutionTags=function(e){var t;return null===(t=e.announcementInstitutions)||void 0===t?void 0:t.map((function(e){var t;return Object(o.jsx)(ho.a,{children:null===(t=e.institution)||void 0===t?void 0:t.abbreviation},e.institutionId)}))},t.prototype.renderRoleTags=function(e){var t;return null===(t=e.announcementRoles)||void 0===t?void 0:t.map((function(e){var t;return Object(o.jsx)(ho.a,{children:null===(t=e.role)||void 0===t?void 0:t.name},e.roleId)}))},t}(a.Component),yo=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Oo=function(){return Oo=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Oo.apply(this,arguments)},jo=function(e){function t(t){var n,r=e.call(this,t)||this;return r.loadAnnouncements=function(){r.setState({loading:!0});var e=fo({includeShown:r.props.includeShown,fetchAmount:r.props.fetchAmount,loadedAmount:r.state.loadedAmount});return lr.getAnnouncementsForUser(e).then((function(e){var t,n,i=null!==(t=e.announcement)&&void 0!==t?t:[],o=r.state.announcements;o.pushAll(i),e.announcement&&r.setState({announcements:o,actionAvailable:!!r.props.actionAvailable||(null===i||void 0===i?void 0:i.length)>=r.state.fetchAmount,loadedAmount:null!==(n=r.state.loadedAmount+e.announcement.length)&&void 0!==n?n:0})})).catch((function(){r.setState({error:!0})}
1)).finally((function(){r.setState({loading:!1})}))},r.state={announcements:[],loadedAmount:0,actionAvailable:!1,fetchAmount:null!==(n=t.fetchAmount)&&void 0!==n?n:5},r}return yo(t,e),t.prototype.componentDidMount=function(){var e,t;this.loadAnnouncements(),this.setState({fetchAmount:null!==(e=this.props.fetchAmount)&&void 0!==e?e:5,actionAvailable:null!==(t=this.props.actionAvailable)&&void 0!==t&&t})},t.prototype.render=function(){return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(y.b,Oo({direction:"vertical"},{children:[this.renderAnnouncements(),this.renderAction()]}),void 0)},t.prototype.renderAction=function(){if(this.state.actionAvailable)return Object(o.jsx)(rt.a,Oo({className:"align-center",shape:"round",icon:this.props.actionButtonIcon?this.props.actionButtonIcon:Object(o.jsx)(kt.a,{},void 0),size:"small",onClick:this.props.actionButtonAction?this.props.actionButtonAction:this.loadAnnouncements,disabled:!this.state.actionAvailable},{children:this.props.actionButtonText?this.props.actionButtonText:"Load More"}),void 0)},t.prototype.renderAnnouncements=function(){return this.state.announcements.length>0?this.state.announcements.map((function(e){return Object(o.jsx)(bo,{announcement:e},e.id)})):Object(o.jsx)(po.a,{image:po.a.PRESENTED_IMAGE_SIMPLE,description:"There are no announcements at this time."},void 0)},t}(a.Component),Io=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),So=function(e){function t(t){var n=e.call(this,t)||this;return n.goToHome=function(){T.push(x.generate(x.HOME))},n}return Io(t,e),t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Announcements",onBack:this.goToHome,breadcrumbs:Xn.allAnnouncements()},void 0),Object(o.jsx)(Qn.a,{children:Object(o.jsx)(jo,{includeShown:!0,fetchAmount:15},void 0)},void 0)]},void 0)},t}(a.Component),Eo=Object(u.i)(So),Ro=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),_o=function(){return _o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},_o.apply(this,arguments)},To=function(e){function t(t){var n=e.call(this,t)||this;return n.state={alreadyConfirmed:!1,confirmSuccess:!1,loading:!0,code:"",userId:""},n}return Ro(t,e),t.prototype.componentDidMount=function(){var e=this,t=Hr.getParameter("code"),n=Hr.getParameter("userId");this.setState({code:t,userId:n}),n&&t?(this.setState({submitting:!0}),G.confirmEmail(n,t).then((function(t){t.succeeded?e.setState({confirmSuccess:!t.alreadyConfirmed,alreadyConfirmed:t.alreadyConfirmed,error:null}):e.setState({error:!0,message:t.errors.join("\n"),confirmSuccess:!1})})).catch((function(t){e.setState({error:!0,message:t.message,confirmSuccess:!1})})).finally((function(){e.setState({loading:!1,submitting:!1})}))):this.setState({loading:!1,submitting:!1,error:!0,confirmSuccess:!1})},t.prototype.render=function(){return this.state.error?this.renderError():this.state.alreadyConfirmed?this.renderAlreadyConfirmed():this.state.confirmSuccess?this.renderSuccess():this.renderChecking()},t.prototype.renderError=function(){var e="Invalid link. Please request another and try again.";return this.state.message&&(e=this.state.message),Object(o.jsx)(Qn.a,{children:Object(o.jsx)(wn.a,{status:"error",title:"Account Not Confirmed",subTitle:e,extra:Object(o.jsx)(rt.a,_o({htmlType:"button",size:"large",disabled:this.state.loading},{children:Object(o.jsx)(at.a,_o({to:x.RESEND_CONFIRMATION_EMAIL},{children:"Resend Confirmation Email"}),void 0)}),void 0)},void 0)},void 0)},t.prototype.renderAlreadyConfirmed=function(){return Object(o.jsx)(Qn.a,{children:Object(o.jsx)(wn.a,{status:"warning",title:"Already Verified",subTitle:"This account has already been verified. Please login to use the system or request a password reset.",extra:Object(o.jsxs)(y.b,_o({direction:"vertical"},{children:[Object(o.jsx)(rt.a,_o({htmlType:"button",size:"large",disabled:this.state.loading},{children:Object(o.jsx)(at.a,_o({to:x.LOGIN},{children:"Go to Login"}),void 0)}),void 0),Object(o.jsx)(rt.a,_o({htmlType:"button",size:"large",disabled:this.state.loading},{children:Object(o.jsx)(at.a,_o({to:x.REQUEST_RESET_PASSWORD},{children:"Reset Password"}),void 0)}),void 0)]}),void 0)},void 0)},void 0)},t.prototype.renderChecking=function(){return Object(o.jsx)(Qn.a,{children:Object(o.jsx)(h.a,{tip:"Loading...",size:"large"},void 0)},void 0)},t.prototype.renderSuccess=function(){return Object(o.jsx)(Qn.a,{children:Object(o.jsx)(wn.a,{status:"success",title:"Account Confirmed",subTitle:"Your account has been confirmed. Please check your email for instructions to reset your password."},void 0)},void 0)},t}(a.Component);var Co=Object(u.i)(Object(l.b)((function(e){var t,n;return{loading:e.UserSession.Loading,error:e.UserSession.Result,userName:null!==(n=null===(t=e.UserSession.Value)||void 0===t?void 0:t.userName)&&void 0!==n?n:null}}))(To)),xo=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ao=function(e){function t(t){var n=e.call(this,t)||this,r=C.parse(t.location.search);return n.state={returnUrl:r.returnUrl},n}return xo(t,e),t.prototype.render=function(){return Object(o.jsx)(p.a,{children:Object(o.jsx)(Qn.a,{children:Object(o.jsx)(Pt,{returnUrl:this.state.returnUrl},void 0)},void 0)},void 0)},t}(a.Component),Po=Object(u.i)(Ao),No=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),wo=function(){return wo=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},wo.apply(this,arguments)},Do=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n.handleSubmit=function(){n.setState({loading:!0});var e=n._formRef?n._formRef.current.getFieldsValue():null;G.forgotPassword(e.email).then((function(){n.setState({loading:!1,resetSuccess:!0,error:!1})}),(function(e){n.setState({loading:!1,error:!0,message:e.message,resetSuccess:!1})}))},n.state={resetSuccess:!1},n}return No(t,e),t.prototype.render=function(){return this.state.resetSuccess?this.renderSuccess():this.renderForm()},t.prototype.renderForm=function(){return Object(o.jsxs)(Qn.a,{children:[Object(o.jsx)(er,{title:"Reset Password"},void 0),Object(o.jsx)(ot.a.Title,wo({level:5},{children:"Please enter the email associated with your account."}),void 0),this.renderMessage(),Object(o.jsxs)(Ci.a,wo({ref:this._formRef,layout:"vertical",onFinish:this.handleSubmit,requiredMark:!1},{children:[Object(o.jsx)(Ci.a.Item,wo({name:"email",label:"Email Address",rules:[{required:!0,message:"Email is required"}]},{children:Object(o.jsx)(ut.a,{disabled:this.state.loading,prefix:Object(o.jsx)(st.a,{},void 0)},void 0)}),void 0),Object(o.jsx)(Ci.a.Item,{children:Object(o.jsx)(rt.a,wo({type:"primary",htmlType:"submit",size:"large",disabled:this.state.loading,loading:this.state.loading,block:!0},{children:"Reset Password"}),void 0)},void 0)]}),void 0)]},void 0)},t.prototype.renderMessage=function(){if(this.state.error){var e="An error occurred while trying to send the reset password email.";return this.state.message&&(e=this.state.message),Object(o.jsx)(ct.a,{message:"Error",description:e,type:"error",showIcon:!0},void 0)}},t.prototype.renderSuccess=function(){return Object(o.jsx)(Qn.a,{children:Object(o.jsx)(wn.a,{title:"Check Your Inbox",icon:Object(o.jsx)(st.a,{},void 0),subTitle:"An email with a link to reset your password was sent to the email you provided. Please check your inbox and follow the included
1steps to reset your password.",extra:Object(o.jsx)(at.a,wo({to:x.generate(x.LOGIN)},{children:Object(o.jsx)(rt.a,wo({type:"primary",size:"large"},{children:"Go to Login"}),void 0)}),void 0)},void 0)},void 0)},t}(a.Component),qo=Object(u.i)(Do),Fo=function(e){return Object.assign({email:"",userId:"00000000-0000-0000-0000-000000000000"},e)},Mo=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Yo=function(){return Yo=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Yo.apply(this,arguments)},Uo=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n.handleSubmit=function(){n.setState({loading:!0});var e=n._formRef?n._formRef.current.getFieldsValue():null,t=Fo({email:e.email});G.resendConfirmEmail(t).then((function(){n.setState({loading:!1,resendSuccess:!0,error:!1})}),(function(e){n.setState({loading:!1,error:!0,message:e.message,resendSuccess:!1})}))},n.state={resendSuccess:!1},n}return Mo(t,e),t.prototype.render=function(){return this.state.resendSuccess?this.renderSuccess():this.renderForm()},t.prototype.renderForm=function(){return Object(o.jsxs)(Qn.a,{children:[Object(o.jsx)(er,{title:"Resend Confirmation Email"},void 0),Object(o.jsx)(ot.a.Paragraph,{children:"Please enter the email associated with your new account."},void 0),this.renderMessage(),Object(o.jsxs)(Ci.a,Yo({ref:this._formRef,layout:"vertical",onFinish:this.handleSubmit,requiredMark:!1},{children:[Object(o.jsx)(Ci.a.Item,Yo({name:"email",label:"Email Address",rules:[{required:!0,message:"Email is required"}]},{children:Object(o.jsx)(ut.a,{prefix:Object(o.jsx)(st.a,{},void 0),disabled:this.state.loading},void 0)}),void 0),Object(o.jsx)(Ci.a.Item,{children:Object(o.jsx)(rt.a,Yo({type:"primary",htmlType:"submit",size:"large",disabled:this.state.loading,loading:this.state.loading,block:!0},{children:"Resend Email"}),void 0)},void 0)]}),void 0)]},void 0)},t.prototype.renderMessage=function(){if(this.state.error){var e="An error occurred while trying to resend the confirmation email.";return this.state.message&&(e=this.state.message),Object(o.jsx)(ct.a,{message:"Error",description:e,type:"error",showIcon:!0},void 0)}},t.prototype.renderSuccess=function(){return Object(o.jsx)(Qn.a,{children:Object(o.jsx)(wn.a,{title:"Check Your Inbox",icon:Object(o.jsx)(st.a,{},void 0),subTitle:"An email with a link to confirm your account was sent to the email you provided. Please check your inbox and follow the included steps to confirm your account.",extra:Object(o.jsx)(at.a,Yo({to:x.generate(x.LOGIN)},{children:Object(o.jsx)(rt.a,Yo({type:"primary",size:"large"},{children:"Go to Login"}),void 0)}),void 0)},void 0)},void 0)},t}(a.Component),Lo=Object(u.i)(Uo),ko=n(707),Go=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Vo=function(e){function t(t){var n=e.call(this,t)||this;return n.state={},n}return Go(t,e),t.prototype.render=function(){return Object(o.jsx)(ct.a,{message:"Password Tips",description:Object(o.jsxs)(ot.a.Paragraph,{children:[Object(o.jsx)("text",{children:"To help keep your data safe, we require the use of strong passwords. Follow these tips for creating a strong password:"},void 0),Object(o.jsxs)("ul",{children:[Object(o.jsx)("li",{children:"Use a longer password"},void 0),Object(o.jsx)("li",{children:"Include numbers, symbols, and uppercase and lowercase letters"},void 0),Object(o.jsx)("li",{children:"Avoid using common words or phrases"},void 0),Object(o.jsx)("li",{children:"Avoid using personal information"},void 0)]},void 0)]},void 0),type:"info",showIcon:!0},void 0)},t}(a.Component),Bo=function(e){return Object.assign({userId:"00000000-0000-0000-0000-000000000000",code:"",isUserSettings:!1,currentPassword:"",password:"",confirmPassword:""},e)},Wo="currentPassword",zo="password",Ho="confirmPassword",Qo=function(e){return Object.assign({userId:"00000000-0000-0000-0000-000000000000",code:""},e)},Ko=n(1515),Xo=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Jo=function(){return Jo=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Jo.apply(this,arguments)},$o=function(e){function t(t){var n=e.call(this,t)||this;return n.state={},n}return Xo(t,e),t.prototype.render=function(){var e=this.props.htmlType?this.props.htmlType:"submit",t=this.props.type?this.props.type:"primary";return Object(o.jsx)(rt.a,Jo({},this.props,{htmlType:e,type:t,icon:this.props.submitted?Object(o.jsx)(Sr.a,{},void 0):Object(o.jsx)(Ko.a,{},void 0),loading:this.props.submitting||this.props.loading},{children:"Submit"}),void 0)},t}(a.Component),Zo=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ea=function(){return ea=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ea.apply(this,arguments)},ta=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n.getFields=function(){var e=(new Map).set(zo,{required:!0,name:zo,label:"New Password",rules:[Ot.required(),Ot.maxLength(150)]}).set(Ho,{required:!0,name:Ho,label:"Confirm New Password",rules:[Ot.required(),Ot.maxLength(150),Ot.fieldsMatchValidator(n._formRef,zo)]});return n.props.code||e.set(Wo,{required:!0,name:Wo,label:"Current Password",rules:[Ot.required(),Ot.maxLength(150)]}),e},n.submit=function(){n.handleSubmit()},n.reset=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields(),n.setState({altered:!1,submitted:!1})},n.validateToken=function(){var e=Qo({code:n.props.code,userId:n.props.userId});return G.validateResetPasswordToken(e).then((function(e){e.succeeded&&n.setState({linkVerified:!0})}))},n.handleChange=function(){n.setState({altered:!0})},n.handleSubmit=function(){if(br.canSubmit(n._formRef,n.getFields())){n.setState({submitting:!0});var e=n._formRef?n._formRef.current.getFieldsValue():null,t=Bo(ea(ea({},e),{code:n.props.code,userId:n.props.userId}));G.resetPassword(t).then((function(e){var t;e.succeeded?(S.b.success("Password Updated"),n.reset(),n.props.onSave&&(n.props.onSave(),null===(t=n._formRef.current)||void 0===t||t.resetFields()),n.setState({fieldErrors:null,errors:null,submitted:!0,error:!1})):(S.b.error("Not Updated"),n.setState({fieldErrors:e.fieldErrors,errors:e.errors,submitted:!0,error:!0})),n.setState({resetSuccess:!0})})).catch((function(e){n.setState({error:e,resetSuccess:!1})})).finally((function(){n.setState({loading:!1,submitting:!1})}
1))}},n.state={linkVerified:!1,resetSuccess:!1},n}return Zo(t,e),t.prototype.componentDidUpdate=function(e){var t=this;if(this.props.userId&&this.props.code&&this.props.userId!=e.userId&&this.props.code!=e.code){var n=[];this.props.code&&this.props.userId&&n.push(this.validateToken()),Promise.all(n).then((function(){t.setState({loading:!1})}))}},t.prototype.render=function(){return!this.state.linkVerified&&this.props.code?this.renderChecking():!this.state.error&&this.state.resetSuccess&&this.props.code?this.renderSuccss():this.state.linkVerified||void 0==this.props.code?this.renderForm():this.renderChecking()},t.prototype.renderSuccss=function(){return Object(o.jsx)(wn.a,{status:"success",title:"Password Reset",subTitle:"Your password has successfully been reset. Please login to continue.",extra:Object(o.jsx)(at.a,ea({to:x.generate(x.LOGIN)},{children:Object(o.jsx)(rt.a,ea({size:"large",disabled:this.state.loading},{children:"Go to Login"}),void 0)}),void 0)},void 0)},t.prototype.renderForm=function(){var e=this.props.code?"Please enter a new password.":"";return Object(o.jsxs)(ht.a,ea({ref:this._formRef,layout:"vertical",onValuesChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!0},{children:[Object(o.jsx)(ot.a.Title,ea({level:5},{children:e}),void 0),Object(o.jsxs)(y.b,ea({direction:"vertical"},{children:[Object(o.jsx)(Vo,{},void 0),this.renderErrors(),this.renderCurrentPassword(),Object(o.jsx)(ht.a.Item,ea({},this.getFields().get(zo),_t.getValidation(zo,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ko.PasswordInput,{inputProps:{disabled:!this.props.isEditing||this.state.loading||this.state.submitting}},void 0)}),void 0),Object(o.jsx)(ht.a.Item,ea({},this.getFields().get(Ho),_t.getValidation(Ho,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a.Password,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),this.renderActions()]}),void 0)]}),void 0)},t.prototype.renderErrors=function(){var e,t;if(this.state.error){var n=null!==(t=null===(e=this.state.errors)||void 0===e?void 0:e.join("\n"))&&void 0!==t?t:"";return Object(o.jsx)(ct.a,{description:n,showIcon:!0,type:"error",message:"Error"},void 0)}return null},t.prototype.renderCurrentPassword=function(){return this.props.code?null:Object(o.jsx)(ht.a.Item,ea({},this.getFields().get(Wo),_t.getValidation(Wo,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a.Password,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0)},t.prototype.renderActions=function(){return this.props.isEditing?Object(o.jsx)(y.b,ea({direction:"horizontal",wrap:!0},{children:Object(o.jsx)($o,{disabled:this.state.loading||this.state.submitting,submitting:this.state.submitting},void 0)}),void 0):null},t.prototype.renderError=function(){var e="The link you used was invalid. Please ensure you are using the correct link to reset your password. If you need to request a new link, please request a new one below.";return this.state.error&&this.state.message&&(e=this.state.message),Object(o.jsx)(wn.a,{status:"error",title:"Error",subTitle:e,extra:Object(o.jsx)(at.a,ea({to:x.generate(x.REQUEST_RESET_PASSWORD)},{children:Object(o.jsx)(rt.a,ea({htmlType:"button",size:"large",loading:this.state.submitted,disabled:this.state.loading},{children:"Request Password Reset"}),void 0)}),void 0)},void 0)},t.prototype.renderChecking=function(){return Object(o.jsx)(h.a,{className:"center",tip:"Validating Link...",size:"large"},void 0)},t}(a.Component),na=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ra=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n.state={userId:re.default.Empty(),code:""},n}return na(t,e),t.prototype.componentDidMount=function(){var e=Hr.getParameter("code"),t=Hr.getParameter("userId");this.setState({code:e,userId:t})},t.prototype.render=function(){return Object(o.jsx)(Qn.a,{children:Object(o.jsx)(ta,{code:this.state.code,userId:this.state.userId,isEditing:!0},void 0)},void 0)},t}(a.Component),ia=Object(u.i)(ra),oa=n(726),aa=n(1522),sa=n(1523),da=n(299),ca=n(301),la=n(57),ua=(n(87),n(102)),pa=(n(238),n(48)),fa=(n(120),function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),ha=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return fa(t,e),t.prototype.getChangeRequestTableData=function(e,t,n,r,i){var o="api/changeRequests/list/"+encodeURIComponent(t)+"/"+encodeURIComponent(n),a=o.indexOf("?")>0?"&":"?";return null!=r&&(o+=a+"programId="+r,a="&"),null!=i&&(o+=a+"courseId="+i,a="&"),o=o.replace(/null|undefined/gi,""),this.SendRequest(e,"post",o,!0,!1)},t.prototype.getChangeRequestsDataTableExport=function(e,t,n){var r="api/changeRequests/list/"+encodeURIComponent(t)+"/"+encodeURIComponent(n)+"/export";return r=r.replace(/null|undefined/gi,""),this.SendRequest(e,"post",r,!0,!1)},t.prototype.getChangeRequestDetails=function(e){var t="api/changeRequests/"+encodeURIComponent(e);return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.getBaseChangeRequestDetails=function(e){var t="api/changeRequests/base/"+encodeURIComponent(e);return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.getChangeRequestDraft=function(e){var t="api/changeRequests/draft";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getChangeRequestApproval=function(e){var t="api/changeRequests/getApproval";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getChangeRequestApprovalOnDetailsHandler=function(e){var t="api/changeRequests/getChangeRequestApprovalOnDetailsHandler";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.saveChangeRequestDetails=function(e){var t="api/changeRequests/save";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.submitChangeRequest=function(e){var t="api/changeRequests/submit";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.saveChangeRequestAdditionalDetails=function(e){var t="api/changeRequests/saveAdditionalDetails";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!1,!1)},t.prototype.getAdditionalDetails=function(e){var t="api/changeRequests/getAdditionalDetails";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.cancelChangeRequest=function(e){var t="api/changeRequests/cancelChangeRequest";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.addComment=function(e){var t="api/changeRequests/addComment";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.approve=function(e){var t="api/changeRequests/approve";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.deny=function(e){var t="api/changeRequests/deny";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.comments=function(e){var t="api/changeRequests/comments";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.redirectApproval=function(e){var t="api/changeRequests/redirectApproval";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.manualApproval=function(e){var t="api/changeRequests/manualApproval";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.manualReject=function(e){var t="api/changeRequests/manualReject";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)}
1,t.prototype.resendEmails=function(e){var t="api/changeRequests/resendEmails/"+encodeURIComponent(e);return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.bulkCourseRequest=function(e){var t="api/changeRequests/bulkCourseRequest";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!1,!1)},t.prototype.coursesTemplate=function(){var e="api/changeRequests/coursesTemplate";return e=e.replace(/null|undefined/gi,""),this.SendRequest(null,"get",e,!0,!1)},t}(U),va=new ha,ma=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ga=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ma(t,e),t.prototype.searchForPrograms=function(e){var t="api/program/searchForPrograms";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getProgramsByInstitutionId=function(e){var t="api/program/getProgramsByInstitutionId";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getProgramTableData=function(e,t,n,r){var i="api/program/list/"+encodeURIComponent(t),o=i.indexOf("?")>0?"&":"?";return null!=n&&(i+=o+"termId="+encodeURIComponent(n),o="&"),null!=r&&(i+=o+"year="+r,o="&"),i=i.replace(/null|undefined/gi,""),this.SendRequest(e,"post",i,!0,!1)},t.prototype.getProgram=function(e){var t="api/program/"+encodeURIComponent(e);return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.getProgramHeader=function(e){var t="api/program/programHeader/"+encodeURIComponent(e);return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.getProgramWithAllDetails=function(e){var t="api/program/getProgramWithAllDetails/"+encodeURIComponent(e);return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.getProgramDetail=function(e){var t="api/program/getProgramDetail/"+encodeURIComponent(e);return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.getProgramAward=function(e){var t="api/program/getProgramAward/"+encodeURIComponent(e);return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.getProgramAwardTerm=function(e){var t="api/program/getProgramAwardTerm/"+encodeURIComponent(e);return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.courseSyllabus=function(e){var t="api/program/programDetailedCourseListing/"+encodeURIComponent(e);return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"get",t,!0,!1)},t.prototype.complianceReport=function(e,t,n){var r="api/program/complianceReport",i=r.indexOf("?")>0?"&":"?";return null!=e&&(r+=i+"termId="+encodeURIComponent(e),i="&"),null!=t&&(r+=i+"year="+t,i="&"),null!=n&&(r+=i+"institutionId="+encodeURIComponent(n),i="&"),r=r.replace(/null|undefined/gi,""),this.SendRequest(null,"get",r,!0,!1)},t.prototype.saveProgramDetails=function(e){var t="api/program/save";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.saveAdvisoryBoard=function(e){var t="api/program/saveAdvisoryBoard";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getAdvisoryBoard=function(e,t){var n="api/program/getAdvisoryBoard/"+encodeURIComponent(t);return n=n.replace(/null|undefined/gi,""),this.SendRequest(e,"post",n,!0,!1)},t}(U),ba=new ga,ya=n(1516),Oa=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ja=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Oa(t,e),t.prototype.getChangeRequestApprovalTableData=function(e,t){var n="api/changeRequestApprovalApiController/list/"+encodeURIComponent(t);return n=n.replace(/null|undefined/gi,""),this.SendRequest(e,"post",n,!0,!1)},t.prototype.saveChangeRequestApprovalUser=function(e){var t="api/changeRequestApprovalApiController/saveChangeRequestApprovalUser";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t}(U),Ia=new ja,Sa=function(){function e(){}return e.PENDING=1,e.WAITING=2,e.APPROVED=3,e.DECLINED=4,e.SKIPPED=5,e}(),Ea=function(){function e(){}return e.DRAFT=1,e.SUBMITTED=2,e.AWATINGREVIEW=3,e.INREVIEW=4,e.ATTENTIONREQUIRED=5,e.APPROVED=6,e.CANCELLED=7,e}(),Ra={className:"ChangeRequestApprovalDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",changeRequestId:"00000000-0000-0000-0000-000000000000",changeRequest:null,userId:null,user:null,changeRequestTypeId:0,stepNumber:0,roleId:"00000000-0000-0000-0000-000000000000",role:null,approvalStatusTypeId:0,approvalStatusType:null,activeOn:new Date(0).toISOString(),expiresOn:null,reviewed:null},e)},id:"id",changeRequestId:"changeRequestId",changeRequest:"changeRequest",userId:"userId",user:"user",changeRequestTypeId:"changeRequestTypeId",stepNumber:"stepNumber",roleId:"roleId",role:"role",approvalStatusTypeId:"approvalStatusTypeId",approvalStatusType:"approvalStatusType",activeOn:"activeOn",expiresOn:"expiresOn",reviewed:"reviewed"},_a={className:"UserDTO",create:function(e){return Object.assign(Q.create(),{id:null,username:"",firstName:"",lastName:"",fullName:"",phoneNumber:"",display:"",statusTypeId:0,aaUserLogin:"",status:null,lockoutStart:null,lockoutEnd:null,institutionNames:[],districtNames:[],districtIdentifiers:[],rppIds:[],roleIds:[],roles:[],isLocked:!1,fullDisplay:"",initials:""},e)},id:"id",username:"username",firstName:"firstName",lastName:"lastName",fullName:"fullName",phoneNumber:"phoneNumber",display:"display",statusTypeId:"statusTypeId",aaUserLogin:"aaUserLogin",status:"status",lockoutStart:"lockoutStart",lockoutEnd:"lockoutEnd",institutionNames:"institutionNames",districtNames:"districtNames",districtIdentifiers:"districtIdentifiers",rppIds:"rppIds",roleIds:"roleIds",roles:"roles",isLocked:"isLocked",fullDisplay:"fullDisplay",initials:"initials"},Ta=function(e){return Object.assign({changeRequestId:"00000000-0000-0000-0000-000000000000",comment:""},e)},Ca="comment",xa=function(e){return Object.assign({changeRequestApprovalId:"00000000-0000-0000-0000-000000000000",comment:""},e)},Aa="comment",Pa=function(e){return Object.assign({changeRequestApprovalId:"00000000-0000-0000-0000-000000000000",comment:""},e)},Na="comment",wa=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Da=function(){return Da=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Da.apply(this,arguments)},qa=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n.getFormItems=function(){return(new Map).set(Ca,{label:"If you any additional comments please enter them before approving or rejecting.",name:Ca})}
1,n.confirmApprove=function(){f.a.confirm({title:"Approve Change Request?",type:"error",content:"Are you sure you wish to approve this change request?",okText:"Approve Change Request",cancelText:"Cancel",onOk:function(){return n.handleApprove()},okButtonProps:{icon:Object(o.jsx)(Sr.a,{},void 0)}})},n.confirmDeny=function(){f.a.confirm({title:"Reject Change Request?",content:"Are you sure you wish to reject this change request? It will be sent back to the submitting user.",okText:"Reject Change Request",cancelText:"Cancel",onOk:function(){return n.handleDeny()},okButtonProps:{danger:!0,icon:Object(o.jsx)(kr.a,{},void 0)}})},n.handleDeny=function(){var e,t,r;n.setState({submitting:!0});var i=Pa({comment:null!==(t=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldValue(Na))&&void 0!==t?t:"",ChangeRequestApprovalId:null!==(r=n.props.approvalId)&&void 0!==r?r:re.default.Empty()});va.deny(i).then((function(e){var t;(null===e||void 0===e?void 0:e.succeeded)?(null===(t=n._formRef.current)||void 0===t||t.resetFields(),n.props.onSubmit&&n.props.onSubmit()):S.b.error("Error")})).catch((function(e){n.setState({error:e}),S.b.error("Error")})).finally((function(){n.setState({submitting:!1})}))},n.handleApprove=function(){var e,t,r;n.setState({submitting:!0});var i=xa({comment:null!==(t=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldValue(Aa))&&void 0!==t?t:"",changeRequestApprovalId:null!==(r=n.props.approvalId)&&void 0!==r?r:re.default.Empty()});va.approve(i).then((function(e){var t;(null===e||void 0===e?void 0:e.succeeded)?(null===(t=n._formRef.current)||void 0===t||t.resetFields(),n.props.onSubmit&&n.props.onSubmit()):S.b.error("Error")})).catch((function(e){n.setState({error:e}),S.b.error("Error")})).finally((function(){n.setState({submitting:!1})}))},n.handleComment=function(){var e,t;n.setState({submitting:!0});var r=Ta({comment:null!==(t=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldValue(Ca))&&void 0!==t?t:"",changeRequestId:n.props.changeRequest.id});va.addComment(r).then((function(e){var t;(null===e||void 0===e?void 0:e.succeeded)||(null===(t=n._formRef.current)||void 0===t||t.resetFields(),S.b.error("Error"))})).catch((function(e){n.setState({error:e}),S.b.error("Error")})).finally((function(){n.setState({submitting:!1})}))},n.state={submitting:!1},n}return wa(t,e),t.prototype.render=function(){return Object(o.jsx)(y.b,Da({direction:"vertical"},{children:this.renderAddComment()}),void 0)},t.prototype.renderAddComment=function(){var e=this.getFormItems();return Object(o.jsxs)(Ci.a,Da({ref:this._formRef,layout:"vertical",onFinish:this.handleComment,requiredMark:!0},{children:[Object(o.jsx)(Ci.a.Item,Da({},e.get(Ca),{children:Object(o.jsx)(ut.a.TextArea,{},void 0)}),void 0),this.renderActions()]}),void 0)},t.prototype.renderActions=function(){if(this.props.approvalId)return Object(o.jsxs)(y.b,Da({direction:"horizontal",wrap:!0},{children:[Object(o.jsx)(rt.a,Da({type:"primary",onClick:this.confirmDeny,danger:!0,loading:this.state.submitting,icon:Object(o.jsx)(kr.a,{},void 0)},{children:"Reject"}),void 0),Object(o.jsx)(rt.a,Da({type:"primary",onClick:this.confirmApprove,loading:this.state.submitting,icon:Object(o.jsx)(Sr.a,{},void 0)},{children:"Approve"}),void 0)]}),void 0)},t}(a.Component),Fa=function(e){return Object.assign({changeRequestApprovalId:"00000000-0000-0000-0000-000000000000",userId:"00000000-0000-0000-0000-000000000000"},e)},Ma=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ya=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ma(t,e),t.prototype.addUser=function(e){var t="api/users/addUser";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getUsersList=function(e,t,n,r){var i="api/users/list/"+encodeURIComponent(t),o=i.indexOf("?")>0?"&":"?";return null!=n&&(i+=o+"districtIdentifier="+n,o="&"),null!=r&&(i+=o+"rppId="+r,o="&"),i=i.replace(/null|undefined/gi,""),this.SendRequest(e,"post",i,!0,!1)}
1,t.prototype.exportUsersList=function(e,t){var n="api/users/list/"+encodeURIComponent(t)+"/export";return n=n.replace(/null|undefined/gi,""),this.SendRequest(e,"post",n,!0,!1)},t.prototype.getUserDetails=function(e){var t="api/users/"+encodeURIComponent(e);return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.getFeatureFlagsAndRolesForUser=function(e){var t="api/users/getFeatureFlagsAndRolesForUser",n=t.indexOf("?")>0?"&":"?";return null!=e&&(t+=n+"userId="+encodeURIComponent(e),n="&"),t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.saveUser=function(e){var t="api/users/save";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.saveFeatureFlagsAndRolesForUser=function(e){var t="api/users/saveFeatureFlagsAndRolesForUser";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.deleteUser=function(e){var t="api/users/deleteUser";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.searchForConsultants=function(e,t,n,r,i){var o="api/users/consultantSearch",a=o.indexOf("?")>0?"&":"?";return null!=t&&(o+=a+"cipNumberId="+t,a="&"),null!=n&&(o+=a+"firstName="+encodeURIComponent(n),a="&"),null!=r&&(o+=a+"lastName="+encodeURIComponent(r),a="&"),null!=i&&(o+=a+"email="+encodeURIComponent(i),a="&"),o=o.replace(/null|undefined/gi,""),this.SendRequest(e,"post",o,!0,!1)},t.prototype.consultantCipNumberAssignment=function(e,t,n,r){var i="api/users/consultantCipNumberAssignment",o=i.indexOf("?")>0?"&":"?";return null!=e&&(i+=o+"cipNumberId="+e,o="&"),null!=t&&(i+=o+"firstName="+encodeURIComponent(t),o="&"),null!=n&&(i+=o+"lastName="+encodeURIComponent(n),o="&"),null!=r&&(i+=o+"email="+encodeURIComponent(r),o="&"),i=i.replace(/null|undefined/gi,""),this.SendRequest(null,"get",i,!0,!1)},t.prototype.downloadUsers=function(){var e="api/users/downloadUsers";return e=e.replace(/null|undefined/gi,""),this.SendRequest(null,"post",e,!0,!1)},t.prototype.lockUser=function(e){var t="api/users/lock";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.unlockUser=function(e){var t="api/users/unlock";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.searchForuser=function(e){var t="api/users/search";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.searchForIDOEConsultantUser=function(e){var t="api/users/searchIDOEConsultantUser";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.resendUserConfirmationEmail=function(e){var t="api/users/resendUserConfirmationEmail";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.resendResetPasswordEmail=function(e){var t="api/users/resendResetPasswordEmail";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t}(U),Ua=new Ya,La=function(e){return Object.assign({searchString:""},e)},ka=n(137),Ga=n(146),Va=(n(270),function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Ba=function(){return Ba=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ba.apply(this,arguments)},Wa=function(e){function t(t){var n=e.call(this,t)||this;return n.handleSearch=function(e){n.props.onSearch&&n.props.onSearch(e)},n.handleSelect=function(e){var t,r=null===(t=n.props.options)||void 0===t?void 0:t.filter((function(t){return t.display==e}))[0];n.setState({value:r.value,selectedOption:r}),n.props.onChange&&n.props.onChange(r.value),n.props.onSelect&&n.props.onSelect(r.value)},n.clear=function(){n.setState({selectedOption:null,value:null})},n.state={},n}return Va(t,e),t.prototype.componentDidMount=function(){void 0!=this.props.value&&this.setState({value:this.props.value})},t.prototype.componentDidUpdate=function(e){var t,n=this;void 0!=this.props.value&&this.props.value!=e.value&&this.setState({value:this.props.value,selectedOption:null});var r=null===(t=this.props.options)||void 0===t?void 0:t.filter((function(e){return e.value==n.props.value}))[0];void 0!=r&&null!=r&&(null!=this.state.selectedOption&&void 0!=this.state.selectedOption||this.handleSelect(r.display))},t.prototype.render=function(){var e,t=void 0;return this.props.options.length>0?t=this.props.options.map((function(e){return{key:e.display,value:e.display,label:e.display}})):this.state.selectedOption&&(t=[{key:this.state.selectedOption.display,value:this.state.selectedOption.display,label:this.state.selectedOption.display}]),Object(o.jsxs)(ut.a.Group,{children:[Object(o.jsx)(Ga.a,Ba({allowClear:!0,onClear:this.clear},this.props,{showSearch:!0,options:t,defaultValue:this.props.initialValue,onSelect:this.handleSelect,onSearch:this.handleSearch,value:null===(e=this.state.selectedOption)||void 0===e?void 0:e.display,style:this.props.searching?{width:"95%"}:{width:"100%"}}),void 0),this.props.searching?Object(o.jsx)(ka.a,{style:{width:"5%",alignSelf:"center"}},void 0):null]},void 0)},t}(a.Component);var za=function(e){var t,n,r=a.useState([]),i=r[0],s=r[1],d=a.useState([]),c=d[0],l=d[1],u=a.useState(e.defaultValue),p=u[0],f=u[1],h=a.useState(!1),v=h[0],m=h[1];return console.log(e.defaultValue),Object(a.useEffect)((function(){var t;f(null!==(t=e.defaultValue)&&void 0!==t?t:null)}),[e.defaultValue]),0==i.length&&e.value&&((n=[]).push({value:e.value,display:e.value.fullDisplay}),s(n)),0==i.length&&e.value&&((n=[]).push(e.value),l(n)),Object(o.jsx)(Wa,{disabled:e.disabled,initialValue:null===(t=e.defaultValue)||void 0===t?void 0:t.display,value:p,options:i,onSearch:function(e){if(e.length>2){var t=La({searchString:e});m(!0),Ua.searchForuser(t).then((function(e){var t,n,r=null===(t=e.users)||void 0===t?void 0:t.map((function(e){return{value:e.id,display:e.fullDisplay}}));l(null!==(n=e.users)&&void 0!==n?n:[]),s(r),m(!1)}))}},onChange:function(t){var n,r=null!==(n=c.filter((function(e){return e.id===t||e.fullDisplay===t}))[0])&&void 0!==n?n:t;f(r),e.onChange&&e.onChange(r)},searching:v},void 0)},Ha=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Qa=function(){return Qa=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Qa.apply(this,arguments)},Ka=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._formItems=(new Map).set("user",{label:"Please Select a User",required:!0,name:"user"}),n.fetchData=function(){Ii.Roles().then((function(e){n.setState({roles:null!==e&&void 0!==e?e:[]})})),Ii.ApprovalStatus().then((function(e){n.setState({approvalStatus:null!==e&&void 0!==e?e:[]})}))},n.getColumnDefinitions=function(){var e,t,r=[{title:"Step",dataIndex:Ra.stepNumber,filterType:wr.DropdownMulti,sorter:!0,width:10},{title:"Role",dataIndex:Ra.roleId,render:function(e,t){var r;return null===(r=n.state.roles.find((function(e){return e.value==t.roleId})))||void 0===r?void 0:r.text},filterType:wr.DropdownMulti,dropdownFilterOptions:n.state.roles,sorter:!0,width:50},{title:"User",dataIndex:Ra.userId,render:function(e,t){var r,i=Je.isAuthorized([gn.MANAGE_APPROVAL_USER])?Object(o.jsx)(rt.a,Qa({title:"Switch Approval User",onClick:function(){var e;return n.openAddUserModal(t.user,null!==(e=t.id)&&void 0!==e?e:re.default.Empty())},type:"link"},{children:Object(o.jsx)(ya.a,{},void 0)}),void 0):null;return Object(o.jsxs)(o.Fragment,{children:[null===(r=t.user)||void 0===r?void 0:r.display," ",i]},void 0)},sorter:!0,filterType:wr.Text,width:100}];
1r.push({title:"Status",dataIndex:Ra.approvalStatusTypeId,render:function(e,t){var r;return null===(r=n.state.approvalStatus.find((function(e){return e.value==t.approvalStatusTypeId})))||void 0===r?void 0:r.text},sorter:!0,filterType:wr.DropdownMulti,dropdownFilterOptions:n.state.approvalStatus,width:100}),r.push({title:"Reviewed",dataIndex:Ra.reviewed,render:function(e,t){return $r.shortDateAndTime(t.reviewed)},width:100});var i=n.props.changeRequest.statusTypeId===Ea.APPROVED,a=n.props.changeRequest.isExpired,s=null!==(t=null===(e=n.props.changeRequest.changeRequestApprovals)||void 0===e?void 0:e.findIndex((function(e){return e.approvalStatusTypeId!=Sa.APPROVED&&e.approvalStatusTypeId!=Sa.DECLINED})))&&void 0!==t?t:-1;return!n.props.disableActions&&!i&&!a&&s>-1&&Je.isAuthorized([gn.OVERRIDE_APPROVAL_USER])&&r.push({dataIndex:Ra.className,render:function(e,t){if((null===t||void 0===t?void 0:t.approvalStatusTypeId)==Sa.PENDING)return Object(o.jsx)(rt.a,Qa({onClick:function(){var e;return n.openModal(null!==(e=t.id)&&void 0!==e?e:re.default.Empty())}},{children:"Approve/Reject"}),t.id)},width:125}),r},n.openAddUserModal=function(e,t){n.setState({showSwitchUserModal:!0,selectedUser:e,selectedApprovalId:t})},n.closeAddUserModal=function(){n.setState({showSwitchUserModal:!1,selectedUser:null,selectedApprovalId:void 0})},n.modalSubmit=function(){var e,t=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldsValue();if(void 0!=t.user&&null!=t.user){var r=Fa({userId:t.user.id,changeRequestApprovalId:n.state.selectedApprovalId});Ia.saveChangeRequestApprovalUser(r).then((function(e){(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("User Added Successfully!"),n.closeAddUserModal()):S.b.error("Error Adding User")})).catch((function(){S.b.error("Error Adding User")}))}else S.b.error("Error Adding User")},n.renderAddReponseUser=function(){var e;return Object(o.jsx)(f.a,Qa({visible:n.state.showSwitchUserModal,title:"Switch Approval User",onOk:n.modalSubmit,onCancel:n.closeAddUserModal,footer:[Object(o.jsx)(rt.a,Qa({onClick:n.closeAddUserModal},{children:"Close"}),"back"),Object(o.jsx)(rt.a,Qa({type:"primary",onClick:n.modalSubmit},{children:"Select"}),"submit")]},{children:Object(o.jsx)(Ci.a,Qa({ref:n._formRef,layout:"vertical",requiredMark:!0},{children:Object(o.jsx)(Ci.a.Item,Qa({},n._formItems.get("user"),_t.getValidation("user",n.state.fieldErrors,n.state.submitted),{children:Object(o.jsx)(za,{defaultValue:null!==(e=n.state.selectedUser)&&void 0!==e?e:_a.create()},void 0)}),void 0)}),void 0)}),void 0)},n.openModal=function(e){n.setState({showModal:!0,selectedApprovalId:e})},n.handleApprovalSubmitted=function(){var e,t;n.setState({showModal:!1,selectedApprovalId:void 0}),n.props.approvalSubmitted&&n.props.approvalSubmitted(null!==(e=n.props.changeRequestId)&&void 0!==e?e:re.default.Empty()),null===(t=n._dataTable)||void 0===t||t.refresh()},n.state={addNewChangeRequest:!1,roles:[],changeRequestApproval:Ra.create(),approvalStatus:[],showModal:!1,showSwitchUserModal:!1,selectedUser:null,selectedApprovalId:re.default.Empty()},n}return Ha(t,e),t.prototype.componentDidMount=function(){this.fetchData()},t.prototype.renderApproveRejectModal=function(){return Object(o.jsx)(f.a,Qa({visible:this.state.showModal,title:"Ap
1prove/Reject",footer:null,onCancel:this.handleApprovalSubmitted},{children:Object(o.jsx)(qa,{changeRequest:this.props.changeRequest,approvalId:this.state.selectedApprovalId,onSubmit:this.handleApprovalSubmitted},void 0)}),void 0)},t.prototype.render=function(){var e=this,t=[];return t.push(oo.Reset()),Object(o.jsxs)("div",{children:[this.renderAddReponseUser(),this.renderApproveRejectModal(),Object(o.jsx)(io,{ref:function(t){return e._dataTable=t},stateSaving:{enabled:!0,tableUniqueKey:"changeRequest_approvals_list"},serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},buttonBar:t,columns:this.getColumnDefinitions(),fetchData:{fetch:function(t){var n;return Ia.getChangeRequestApprovalTableData(t,null!==(n=e.props.changeRequestId)&&void 0!==n?n:re.default.Empty())}}},void 0)]},void 0)},t}(a.Component),Xa=function(){function e(){}return e.ADMINISTRATIVECHANGE=1,e.NOTICEOFINTENT=2,e.NEWCOURSE=3,e.NEWDISCIPLINE=4,e.NEWPROGRAM=5,e.PROGRAMDEACTIVATION=6,e.PROGRAMMODIFICATION=7,e.COURSEMODIFICATION=8,e.TRANSFERMAJORPROGRAMMODIFICATION=9,e.NEWTRANSFERMAJORPROGRAM=10,e.COURSEDEACTIVATION=11,e}(),Ja="additionalFiles",$a={className:"ChangeRequestDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",number:0,changeRequestTypeId:0,institutionId:"00000000-0000-0000-0000-000000000000",institution:null,changeRequestType:null,title:"",requestingUserId:null,statusTypeId:0,createdOn:null,requestedOn:null,approvedOn:null,createdOnDisplay:"",requestedOnDisplay:"",approvedOnDisplay:"",additionalComments:"",additionalResources:[],changeRequestApprovals:[],comments:[],display:"",displayNumber:"",requestingUser:null,administrativeChangeRequest:null,newDisciplineChangeRequest:null,noticeOfIntentChangeRequest:null,newCourseChangeRequest:null,courseDeactivationChangeRequest:null,courseModificationChangeRequest:null,programDeactivationChangeRequest:null,programModificationChangeRequest:null,newProgramChangeRequest:null,termName:"",termYear:null,changeRequestStatusType:null,isExpired:null},e)},id:"id",number:"number",changeRequestTypeId:"changeRequestTypeId",institutionId:"institutionId",institution:"institution",changeRequestType:"changeRequestType",title:"title",requestingUserId:"requestingUserId",statusTypeId:"statusTypeId",createdOn:"createdOn",requestedOn:"requestedOn",approvedOn:"approvedOn",createdOnDisplay:"createdOnDisplay",requestedOnDisplay:"requestedOnDisplay",approvedOnDisplay:"approvedOnDisplay",additionalComments:"additionalComments",additionalResources:"additionalResources",changeRequestApprovals:"changeRequestApprovals",comments:"comments",display:"display",displayNumber:"displayNumber",requestingUser:"requestingUser",administrativeChangeRequest:"administrativeChangeRequest",newDisciplineChangeRequest:"newDisciplineChangeRequest",noticeOfIntentChangeRequest:"noticeOfIntentChangeRequest",newCourseChangeRequest:"newCourseChangeRequest",courseDeactivationChangeRequest:"courseDeactivationChangeRequest",courseModificationChangeRequest:"courseModificationChangeRequest",programDeactivationChangeRequest:"programDeactivationChangeRequest",programModificationChangeRequest:"programModificationChangeRequest",newProgramChangeRequest:"newProgramChangeRequest",termName:"termName",termYear:"termYear",changeRequestStatusType:"changeRequestStatusType",isExpired:"isExpired"},Za=function(){function e(){}return e.attachFileToModel=function(e,t,n,r){var i=new FormData;return i.append(e,JSON.stringify(t)),i.append(n,r),i},e.attachFilesToModel=function(e,t,n,r){var i=new FormData;if(i.append(e,JSON.stringify(t)),r)for(var o=0;o<r.length;o++)i.append(n,r[o]);return i},e}(),es=n(187),ts=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ns=function(){return ns=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ns.apply(this,arguments)},rs=function(e){function t(t){var n=e.call(this,t)||this;return n.state={},n}return ts(t,e),t.prototype.render=function(){var e=this.props.htmlType?this.props.htmlType:"button",t=this.props.type?this.props.type:"default";return Object(o.jsx)(rt.a,ns({},this.props,{htmlType:e,type:t,icon:Object(o.jsx)(es.a,{},void 0),loading:this.props.submitting||this.props.loading},{children:"Go Back"}),void 0)},t}(a.Component),is=n(161),os=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),as=function(){return as=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},as.apply(this,arguments)},ss=function(e){function t(t){var n=e.call(this,t)||this;return n.state={},n}return os(t,e),t.prototype.render=function(){var e,t=this.props.htmlType?this.props.htmlType:"submit",n=this.props.type?this.props.type:"primary";return Object(o.jsx)(rt.a,as({},this.props,{htmlType:t,type:n,icon:Object(o.jsx)(is.a,{},void 0),loading:this.props.submitting||this.props.loading},{children:null!==(e=this.props.title)&&void 0!==e?e:"Save and Continue"}),void 0)},t}(a.Component),ds=n(1517),cs=n(246),ls=(n(1048),n(725)),us=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ps=function(){return ps=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ps.apply(this,arguments)},fs=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r},hs=function(e){function t(t){var n=e.call(this,t)||this;return n.handleChange=function(e){if(n.props.onUploaded&&"removed"!==e.file.status&&n.props.onUploaded(e.file),n.props.onRemoved&&"removed"===e.file.status)n.props.onRemoved(e.file);else{var t=e.fileList.map((function(e){return e.originFileObj}));t.removeAll([void 0]),n.setState({newList:t}),n.triggerChange()}},n.handleRemove=function(e){var t=n.props.existingList,r=n.state.removedList;t.some((function(t){return t.uid==e.uid}))&&(r.push(e.uid),n.setState({removedList:r})),n.triggerChange()},n.beforeUpload=function(e){var t=[],r=n.state.newList;n.setState({newList:fs(r)});var i=new FileReader;return i.readAsDataURL(e),i.onload=function(){r.length==n.props.maxCount&&r.splice(0,1),r.push(e),r.map((function(n,i){e.
1name===n.name&&(t.push(i),t.length>1)&&r.splice(i,1)})),n.setState({newList:fs(r)}),n.triggerChange()},!1},n.triggerChange=function(){if(n.props.onChange){var e={newFiles:n.state.newList,existingFiles:n.state.existingList,removedFiles:n.state.removedList};n.props.onChange(e)}},n.goToLink=function(e){window.open(e,"_blank")},n.renderFileLinks=function(){var e,t,r;return null!==(t=null===(e=n.props.existingList)||void 0===e?void 0:e.length)&&void 0!==t&&t?Object(o.jsx)(y.b,ps({direction:"vertical"},{children:null===(r=n.props.existingList)||void 0===r?void 0:r.map((function(e){return n.renderLink(e)}))}),void 0):null},n.renderLink=function(e){return Object(o.jsx)(rt.a,ps({type:"link",onClick:function(){var t;return n.goToLink(null!==(t=e.url)&&void 0!==t?t:"/")}},{children:e.name}),void 0)},n.handleChange=n.handleChange.bind(n),n.handleRemove=n.handleRemove.bind(n),n.beforeUpload=n.beforeUpload.bind(n),n.triggerChange=n.triggerChange.bind(n),n.goToLink=n.goToLink.bind(n),n.state={loading:!1,error:!1,success:!1,newList:[],existingList:[],removedList:[]},n}return us(t,e),t.prototype.componentDidUpdate=function(e){this.props.value&&this.props.value!=e.value&&this.setState({existingList:this.props.value.existingFiles})},t.prototype.render=function(){var e,t,n,r,i,a=null!==(e=this.props.existingList)&&void 0!==e?e:[];return this.props.readonly?this.renderFileLinks():this.props.cropImage?Object(o.jsx)(ls.a,ps({grid:!0,rotate:!0,aspect:3},{children:Object(o.jsx)(cs.a.Dragger,ps({},this.props,{name:"file",defaultFileList:a,beforeUpload:this.beforeUpload,onChange:this.handleChange,onRemove:this.handleRemove},{children:this.props.disabled?Object(o.jsxs)(ot.a.Text,{children:[Object(o.jsx)(ds.a,{className:"app-icon"},void 0)," ",(null!==(n=null===(t=this.props.existingList)||void 0===t?void 0:t.length)&&void 0!==n?n:0)+this.state.newList.length," Files Uploaded"]},void 0):Object(o.jsxs)(ot.a.Text,{children:[Object(o.jsx)(ds.a,{className:"app-icon"},void 0)," Click or drag file to this area to upload"]},void 0)}),void 0)}),void 0):Object(o.jsx)(cs.a.Dragger,ps({},this.props,{name:"file",defaultFileList:a,beforeUpload:this.beforeUpload,onChange:this.handleChange,onRemove:this.handleRemove},{children:this.props.disabled?Object(o.jsxs)(ot.a.Text,{children:[Object(o.jsx)(ds.a,{className:"app-icon"},void 0)," ",(null!==(i=null===(r=this.props.existingList)||void 0===r?void 0:r.length)&&void 0!==i?i:0)+this.state.newList.length," Files Uploaded"]},void 0):Object(o.jsxs)(ot.a.Text,{children:[Object(o.jsx)(ds.a,{className:"app-icon"},void 0)," ",this.props.text?this.props.text:"Click or drag file to this area to upload"]},void 0)}),void 0)},t}(a.Component),vs=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ms=function(){return ms=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ms.apply(this,arguments)},gs=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n.getFormItems=function(){var e=[Xa.COURSEMODIFICATION,Xa.PROGRAMMODIFICATION,Xa.TRANSFERMAJORPROGRAMMODIFICATION],t=!1,r="Do you have any additional comments to add to this request?",i=[Ot.maxLength(5e3)];return e.findIndex((function(e){return e==n.props.changeRequest.changeRequestTypeId}))>-1&&(i.push(Ot.required()),t=!0,r="Please summarize the changes you are making and add any additional comments you may have regarding this request."),(new Map).set($a.additionalComments,{required:t,name:$a.additionalComments,label:r,rules:i}).set($a.additionalResources,{name:$a.additionalResources,label:"Additional Files"})},n.resetForm=function(){var e;n.setState({altered:!1}),null===(e=n._formRef.current)||void 0===e||e.resetFields()},n.handleSubmit=function(){n.setState({submitting:!0}),n.save((function(e){var t;(null===e||void 0===e?void 0:e.succeeded)?(n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()}),n.resetForm(),n.props.onSubmit&&n.props.onSubmit()):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,submitted:!0}),S.b.error("Save Failed"))}),!0)},n.handleSave=function(){n.setState({submitting:!0}),n.save((function(e){var t;(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create(),submitted:!1,error:!1}),n.resetForm(),n.props.onSave&&n.props.onSave()):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,submitted:!1}),S.b.error("Save Failed"))}),!1)},n.save=function(e,t){var r,i;n.setState({saving:!0});var o=n._formRef?n._formRef.current.getFieldsValue():null;
1o.changeRequestId=n.props.changeRequest.id,o.finalize=t,o.removedFiles=null===(r=o.additionalResources)||void 0===r?void 0:r.removedFiles;var a=Za.attachFilesToModel("saveChangeRequestAdditionalDetails",o,Ja,null===(i=o.additionalResources)||void 0===i?void 0:i.newFiles);va.saveChangeRequestAdditionalDetails(a).then((function(t){e(t)})).catch((function(e){n.setState({error:e}),S.b.error("Save Failed")})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.handleChange=function(){n.setState({altered:!0})},n.render=function(){var e,t;if(n.state.loading||n.state.changeRequest.id==re.default.Empty())return Object(o.jsx)(pt.a,{active:!0},void 0);var r=null===(e=n.state.changeRequest.additionalResources)||void 0===e?void 0:e.map((function(e){var t,n;return{uid:e.azureBlobStorageId,url:x.generateDownload(null!==(t=e.azureBlobStorageId)&&void 0!==t?t:re.default.Empty()),name:null===(n=e.azureBlobFile)||void 0===n?void 0:n.fileName}}));return Object(o.jsxs)(y.b,ms({size:"small",direction:"vertical"},{children:[n.renderErrors(),Object(o.jsxs)(ht.a,ms({ref:n._formRef,layout:"vertical",initialValues:null!==(t=n.state.changeRequest)&&void 0!==t?t:$a.create(),onChange:n.handleChange,onFinish:n.handleSubmit,requiredMark:!0},{children:[Object(o.jsx)(mt.a,ms({},n.getFormItems().get($a.additionalComments),_t.getValidation($a.additionalComments,n.state.fieldErrors,n.state.submitted),{children:Object(o.jsx)(Mr,{readonly:n.props.readonly},void 0)}),void 0),Object(o.jsx)(ht.a.Item,ms({},n.getFormItems().get($a.additionalResources),_t.getValidation($a.additionalResources,n.state.fieldErrors,n.state.submitted),{children:Object(o.jsx)(hs,{disabled:n.props.readonly,existingList:r},void 0)}),void 0),n.renderActions()]}),void 0)]}),void 0)},n.renderErrors=function(){if(n.state.error)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:n.state.message},void 0)},n.state={changeRequest:$a.create(),additionalComments:"",additionalResources:{}},n}return vs(t,e),t.prototype.componentDidMount=function(){var e=this;this.props.changeRequest&&this.setState({fieldErrors:this.props.fieldErrors,submitted:this.props.submitted,changeRequest:this.props.changeRequest},(function(){return e.resetForm()}))},t.prototype.componentDidUpdate=function(e){this.props.changeRequest&&e.changeRequest!=this.props.changeRequest&&(this.setState({changeRequest:this.props.changeRequest,fieldErrors:this.props.fieldErrors,submitted:this.props.submitted}),this.resetForm()),this.props.loading!=e.loading&&this.setState({loading:this.props.loading})},t.prototype.renderActions=function(){var e=this;if(!this.props.readonly)return Object(o.jsxs)(y.b,ms({direction:"horizontal",wrap:!0},{children:[Object(o.jsx)(rs,{onClick:this.props.onPrevious},void 0),Object(o.jsx)(ss,{submitting:this.state.submitting},void 0),Object(o.jsx)(Tr,{type:"default",htmlType:"button",onClick:function(){return e.handleSave()},saving:this.state.submitting,saved:this.state.saved},void 0),Object(o.jsx)(Ir,{resetting:this.state.resetting,onConfirm:this.resetForm},void 0)]}),void 0)},t}(a.Component),bs=function(e){return Object.assign({changeRequestId:"00000000-0000-0000-0000-000000000000"},e)},ys=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Os=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ys(t,e),t.prototype.get=function(e){var t="api/administrativeChangeRequests/get";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.saveStep1=function(e){var t="api/administrativeChangeRequests/saveStep1";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.submitStep1=function(e){var t="api/administrativeChangeRequests/submitStep1";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t}(U),js=new Os,Is=function(e){return Object.assign({changeRequestId:null,institutionId:"00000000-0000-0000-0000-000000000000",administrativeChangeRequest:null},e)},Ss=function(e){return Object.assign({changeRequestId:null,institutionId:"00000000-0000-0000-0000-000000000000",administrativeChangeRequest:null},e)},Es={className:"AdministrativeChangeRequestDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",changeRequestId:"00000000-0000-0000-0000-000000000000",description:"",shortDe
1scription:""},e)},id:"id",changeRequestId:"changeRequestId",description:"description",shortDescription:"shortDescription"},Rs={className:"TermDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",name:"",startDate:new Date(0).toISOString()},e)},id:"id",name:"name",startDate:"startDate"},_s=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ts=function(){return Ts=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ts.apply(this,arguments)},Cs=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._formItems=(new Map).set(Es.description,{required:!0,name:Es.description,label:"Please describe your request. If your request regards a course, program, or notice of intent, please ensure that the request cannot be handled in a different type of change request.",rules:[Ot.required(),Ot.maxLength(1e4)]}).set(Es.shortDescription,{required:!0,name:Es.shortDescription,label:"Please give a short description of your request.",rules:[Ot.required(),Ot.maxLength(1e4)]}),n.resetForm=function(){var e;n.setState({altered:!1}),null===(e=n._formRef.current)||void 0===e||e.resetFields()},n.fetchData=function(){n.setState({loading:!0});var e=[];n.state.terms&&0!=n.state.terms.length||e.push(n.loadTerms()),n.props.changeRequestId&&n.props.changeRequestId!=re.default.Empty()&&e.push(n.loadChangeRequest()),Promise.all(e).then((function(){n.setState({loading:!!n.props.loading}),n.handleChange(),n.resetForm()}))},n.loadTerms=function(){return ce.getAll(Rs.className).then((function(e){e&&n.setState({terms:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadChangeRequest=function(){var e=bs({changeRequestId:n.props.changeRequestId});return js.get(e).then((function(e){var t,r,i;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create(),administrativeChangeRequest:null!==(i=null===(r=e.changeRequest)||void 0===r?void 0:r.administrativeChangeRequest)&&void 0!==i?i:Es.create({installTermId:""}),fieldErrors:n.props.changeRequestDetailsPage?null:e.fieldErrors})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.handleSubmit=function(){var e,t,r;n.setState({submitting:!0});var i=Ss({changeRequestId:null!==(e=n.props.changeRequestId)&&void 0!==e?e:re.default.Empty(),institutionId:n.props.selectedInstitution,administrativeChangeRequest:Es.create(null===(r=null===(t=n._formRef)||void 0===t?void 0:t.current)||void 0===r?void 0:r.getFieldsValue())});js.submitStep1(i).then((function(e){var t,r,i,o;n.setState({submitted:!0}),(null===e||void 0===e?void 0:e.succeeded)?(n.setState({saved:!0}),S.b.success("Saved"),n.props.onSave&&n.props.onSave(null!==(r=null===(t=e.changeRequest)||void 0===t?void 0:t.id)&&void 0!==r?r:re.default.Empty()),n.props.onSubmit&&n.props.onSubmit(null!==(o=null===(i=e.changeRequest)||void 0===i?void 0:i.id)&&void 0!==o?o:re.default.Empty())):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Submit Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Change request could not be saved.")})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.handleSave=function(){var e,t,r;n.setState({saving:!0});var i=Is({changeRequestId:null!==(e=n.props.changeRequestId)&&void 0!==e?e:re.default.Empty(),institutionId:n.props.selectedInstitution,administrativeChangeRequest:Es.create(null===(r=null===(t=n._formRef)||void 0===t?void 0:t.current)||void 0===r?void 0:r.getFieldsValue())});js.saveStep1(i).then((function(e){var t,r,i,o,a,s;n.setState({saved:!0}
1),(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()}),n.setState({changeRequest:null!==(r=e.changeRequest)&&void 0!==r?r:$a.create(),administrativeChangeRequest:null!==(o=null===(i=e.changeRequest)||void 0===i?void 0:i.administrativeChangeRequest)&&void 0!==o?o:Es.create()}),n.resetForm(),n.resetForm(),n.props.onSave&&n.props.onSave(null!==(s=null===(a=e.changeRequest)||void 0===a?void 0:a.id)&&void 0!==s?s:re.default.Empty())):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Submit Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Change request could not be saved.")})).finally((function(){n.setState({loading:!1,saving:!1})}))},n.handleChange=function(){n.setState({altered:!0})},n.render=function(){return n.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsx)(y.b,Ts({size:"small",direction:"vertical"},{children:Object(o.jsxs)(ht.a,Ts({ref:n._formRef,layout:"vertical",initialValues:n.state.administrativeChangeRequest,onValuesChange:n.handleChange,onFinish:n.handleSubmit,requiredMark:!0},{children:[Object(o.jsx)(mt.a,Ts({},n._formItems.get(Es.shortDescription),_t.getValidation(Es.shortDescription,n.state.fieldErrors,n.state.submitted||n.props.readonly),{children:Object(o.jsx)(ut.a.TextArea,{maxLength:75,showCount:!0,autoSize:{minRows:1},disabled:n.props.readonly},void 0)}),Es.shortDescription),Object(o.jsx)(mt.a,Ts({},n._formItems.get(Es.description),_t.getValidation(Es.description,n.state.fieldErrors,n.state.submitted||n.props.readonly),{children:Object(o.jsx)(ut.a.TextArea,{maxLength:1e4,showCount:!0,autoSize:{minRows:5},disabled:n.props.readonly},void 0)}),Es.description),n.renderActions()]}),void 0)}),void 0)},n.state={administrativeChangeRequest:Es.create({installTermId:""}),changeRequest:$a.create(),terms:[]},n}return _s(t,e),t.prototype.componentDidMount=function(){this.setState({fieldErrors:this.props.fieldErrors}),this.fetchData()},t.prototype.componentDidUpdate=function(e){this.props.changeRequestId&&e.changeRequestId!=this.props.changeRequestId&&(this.setState({fieldErrors:this.props.fieldErrors}),this.fetchData()),this.props.loading!=e.loading&&this.setState({loading:this.props.loading})},t.prototype.renderActions=function(){if(!this.props.readonly)return Object(o.jsxs)(y.b,Ts({direction:"horizontal",wrap:!0},{children:[Object(o.jsx)(ss,{submitting:this.state.submitting},void 0),Object(o.jsx)(Tr,{type:"default",htmlType:"button",onClick:this.handleSave,saving:this.state.saving,saved:this.state.saved},void 0),Object(o.jsx)(Ir,{resetting:this.state.resetting,onConfirm:this.resetForm},void 0)]}),void 0)},t}(a.Component),xs=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),As=function(){return As=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},As.apply(this,arguments)},Ps=function(e){function t(t){var n=e.call(this,t)||this;return n.render=function(){var e;return Object(o.jsx)(Ci.a,As({layout:"vertical"},{children:Object(o.jsxs)(y.b,As({size:"large",direction:"vertical"},{children:[Object(o.jsx)(Qn.a,As({type:"inner",title:"Course Information"},{children:Object(o.jsx)(Cs,{readonly:!0,loading:n.props.loading,selectedInstitution:null!==(e=n.props.changeRequest.institutionId)&&void 0!==e?e:re.default.Empty(),changeRequestId:n.props.changeRequest.id,changeRequestDetailsPage:n.props.changeRequestDetailsPage},void 0)}),void 0),Object(o.jsx)(Qn.a,As({type:"inner",size:"small",title:"Additional Details"},{children:Object(o.jsx)(gs,{readonly:!0,changeRequest:n.props.changeRequest,loading:n.props.loading},void 0)}),void 0)]}),void 0)}),void 0)},n}return xs(t,e),t}(a.Component),Ns=n(155),ws=n.n(Ns),Ds=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),qs=function(){return qs=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},qs.apply(this,arguments)},Fs=function(e){function t(t){var n=e.call(this,t)||this;return n.render=function(){var e,t,r,i;return n.props.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(Kn.b,qs({bordered:!0,size:"small",layout:"vertical"},{children:[Object(o.jsx)(ws.a,qs({label:"Request Type"},{children:null===(e=n.props.changeRequest.changeRequestType)||void 0===e?void 0:e.name}),void 0),Object(o.jsx)(ws.a,qs({label:"Community College"},{children:null===(t=n.props.changeRequest.institution)||void 0===t?void 0:t.name}),void 0),Object(o.jsx)(ws.a,qs({label:"Requesting User"},{children:null===(r=n.props.changeRequest.requestingUser)||void 0===r?void 0:r.fullDisplay}),void 0),Object(o.jsx)(ws.a,qs({label:"Status"},{children:null===(i=n.props.changeRequest.changeRequestStatusType)||void 0===i?void 0:i.name}),void 0),Object(o.jsx)(ws.a,qs({label:"Request Submitted"},{children:$r.longDate(n.props.changeRequest.requestedOn)}),void 0),Object(o.jsx)(ws.a,qs({label:"Approved"},{children:$r.longDate(n.props.changeRequest.approvedOn)}),void 0)]}),void 0)},n.state={},n}return Ds(t,e),t}(a.Component),Ms=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ys=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ms(t,e),t.prototype.get=function(e){var t="api/courseDeactivationChangeRequests/get";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.saveStep1=function(e){var t="api/courseDeactivationChangeRequests/saveStep1";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.submitStep1=function(e){var t="api/courseDeactivationChangeRequests/submitStep1";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t}(U),Us=new Ys,Ls=function(e){return Object.assign({institutionId:"00000000-0000-0000-0000-000000000000",courseDeactivationChangeRequest:null},e)},ks=function(e){return Object.assign({changeRequestId:null,institutionId:"00000000-0000-0000-0000-000000000000",courseDeactivationChangeRequest:null},e)},Gs=function(e){return Object.assign({changeRequestId:"00000000-0000-0000-0000-000000000000"},e)},Vs=function(e){return Object.assign({courseId:"00000000-0000-0000-0000-000000000000",installTerm:"00000000-0000-0000-0000-000000000000",installYear:0},e)},Bs={className:"CourseDeactivationChangeRequestDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",changeRequestId:"00000000-0000-0000-0000-000000000000",courseId:null,course:null,rationale:"",deactivationYearTerm:null,deactivationTermId:null,deactivationYear:null,deactivationTerm:null},e)},id:"id",changeRequestId:"changeRequestId",courseId:"courseId",course:"course",rationale:"rationale",deactivationYearTerm:"deactivationYearTerm",deactivationTermId:"deactivationTermId",deactivationYear:"deactivationYear",deactivationTerm:"deactivationTerm"},Ws=n(93),zs=(n(190),function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Hs=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return zs(t,e),t.prototype.getCourseTableData=function(e,t){var n="api/courses/list/"+encodeURIComponent(t);return n=n.replace(/null|undefined/gi,""),this.SendRequest(e,"post",n,!0,!1)}
1,t.prototype.exportCourseList=function(e,t){var n="api/courses/list/"+encodeURIComponent(t)+"/export";return n=n.replace(/null|undefined/gi,""),this.SendRequest(e,"post",n,!0,!1)},t.prototype.getCourseDetails=function(e){var t="api/courses/"+encodeURIComponent(e);return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.saveCourseDetails=function(e){var t="api/courses/save";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.importInstitutionCourses=function(e){var t="api/courses/import";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!1,!1)},t.prototype.getCourseByInstituionId=function(e){var t="api/courses/getCourseByInstitutionId";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getCourseByCourseIds=function(e){var t="api/courses/getCourseByCourseIds";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getCoursesInProgramModificationProgramAwards=function(e){var t="api/courses/getCoursesInProgramModificationProgramAwards";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getCoursesInNewProgramProgramAwards=function(e){var t="api/courses/getCoursesInNewProgramProgramAwards";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.searchForCourse=function(e){var t="api/courses/search";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.searchForCourseWithRetired=function(e){var t="api/courses/searchWithRetired";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.existingCourseSearch=function(e){var t="api/courses/existingCourseSearch";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.existingInstitutionCourseSearch=function(e){var t="api/courses/existingInstitutionCourseSearch";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.courseSyllabus=function(e){var t="api/courses/courseSyllabus/"+encodeURIComponent(e);return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"get",t,!0,!1)},t.prototype.commonCourseNumberingReport=function(e,t){var n="api/courses/ccn",r=n.indexOf("?")>0?"&":"?";return null!=e&&(n+=r+"termId="+encodeURIComponent(e),r="&"),null!=t&&(n+=r+"year="+t,r="&"),n=n.replace(/null|undefined/gi,""),this.SendRequest(null,"get",n,!0,!1)},t.prototype.exportCourseAttachedReport=function(e){var t="api/courses/courseAttachedReport",n=t.indexOf("?")>0?"&":"?";return null!=e&&(t+=n+"institutionId="+encodeURIComponent(e),n="&"),t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"get",t,!0,!1)},t.prototype.getCourseCourseBlocksTableData=function(e,t){var n="api/courses/courseCourseBlocks",r=n.indexOf("?")>0?"&":"?";return null!=t&&(n+=r+"courseId="+encodeURIComponent(t),r="&"),n=n.replace(/null|undefined/gi,""),this.SendRequest(e,"post",n,!0,!1)},t.prototype.getCourseProgramsTableData=function(e,t){var n="api/courses/coursePrograms",r=n.indexOf("?")>0?"&":"?";return null!=t&&(n+=r+"courseId="+encodeURIComponent(t),r="&"),n=n.replace(/null|undefined/gi,""),this.SendRequest(e,"post",n,!0,!1)},t}(U),Qs=new Hs,Ks=function(e){return Object.assign({disciplineId:null,catalogNumber:"",title:"",institutionId:null},e)},Xs="disciplineId",Js="catalogNumber",$s="title",Zs={className:"CourseDetailDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",courseId:"00000000-0000-0000-0000-000000000000",install:null,retire:null,title:"",installDisplay:"",retireDisplay:"",disciplineId:null,discipline:null,catalogNumber:"",variableCredits:!1,minCredits:0,maxCredits:0,display:""},e)},id:"id",courseId:"courseId",install:"install",retire:"retire",title:"title",installDisplay:"installDisplay",retireDisplay:"retireDisplay",disciplineId:"disciplineId",discipline:"discipline",catalogNumber:"catalogNumber",variableCredits:"variableCredits",minCredits:"minCredits",maxCredits:"maxCredits",display:"display"},ed={className:"CourseRequisiteDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",courseId:"00000000-0000-0000-0000-000000000000",requisiteCourseId:"00000000-0000-0000-0000-000000000000",requisiteCourseTitle:"",requisiteCourseDisplay:"",courseRequisiteTypeId:0,courseRequisiteType:null},e)},id:"id",courseId:"courseId",requisiteCourseId:"requisiteCourseId",requisiteCourseTitle:"requisiteCourseTitle",requisiteCourseDisplay:"requisiteCourseDisplay",courseRequisiteTypeId:"courseRequisiteTypeId",courseRequisiteType:"courseRequisiteType"},td={className:"CourseRequisiteTypeDTO",create:function(e){return Object.assign(Q.create(),{id:0,name:"",displayOrder:0},e)},id:"id",name:"name",displayOrder:"displayOrder"},nd={className:"DisciplineDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",code:"",name:"",statusTypeId:0,statusType:null,display:""},e)},id:"id",code:"code",name:"name",statusTypeId:"statusTypeId",statusType:"statusType",display:"display"},rd=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),id=function(){return id=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},id.apply(this,arguments)},od=function(e){function t(t){var n=e.call(this,t)||this;return n.state={},n}return rd(t,e),t.prototype.render=function(){return Object(o.jsx)(rt.a,id({},this.props,{icon:Object(o.jsx)(kr.a,{},void 0),loading:this.props.clearing||this.props.loading},{children:"Clear"}),void 0)},t}(a.Component),ad=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),sd=function(){return sd=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},sd.apply(this,arguments)},dd=function(e){function t(t){var n=e.call(this,t)||this;return n.state={},n}return ad(t,e),t.prototype.render=function(){var e=this.props.htmlType?this.props.htmlType:"submit",t=this.props.type?this.props.type:"primary";return Object(o.jsx)(rt.a,sd({},this.props,{htmlType:e,type:t,icon:Object(o.jsx)(Si.a,{},void 0),loading:this.props.searching},{children:"Search"}),void 0)},t}(a.Component),cd=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ld=function(){return ld=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ld.apply(this,arguments)},ud=function(e){function t(t){return e.call(this,t)||this}return cd(t,e),t.prototype.render=function(){var e,t=this.props.text||0==this.props.text?this.props.text:this.props.value;
1return t=this.props.ellipsis?ei.ellipsisCharacterLimit(t,30):t,Object(o.jsxs)(ot.a.Text,ld({style:this.props.style,className:this.props.errorMessage?"ant-error-message":"",strong:null===(e=this.props.strong)||void 0===e||e},{children:[" ",t," "]}),void 0)},t}(a.Component),pd=function(){return pd=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},pd.apply(this,arguments)};var fd,hd=function(e){var t=a.createRef(),n=a.useState(!1),r=n[0],i=n[1];return e.readOnly?Object(o.jsx)(ud,{text:e.value},void 0):Object(o.jsx)(pr.a,pd({ref:t},e,{open:r,onInputKeyDown:function(t){return n=t,void(r||""==n.code||"Escape"==n.code||"Tab"==n.code||"Backspace"==n.code?("Enter"==n.code&&r&&"multiple"!=e.mode||"Escape"==n.code)&&i(!1):i(!0));var n},onClick:function(){i(!r)},onBlur:function(){i(!1)},onChange:function(t,n){e.onChange&&e.onChange(t,n)}},{children:e.children}),void 0)},vd=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),md=function(){return md=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},md.apply(this,arguments)},gd=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._tableRef=a.createRef(),n.getFormItems=function(){return(new Map).set($s,{name:$s,label:"Title"}).set(Xs,{name:Xs,label:"Discipline"}).set(Js,{name:Js,label:"Catalog Number"}).set(ed.courseRequisiteTypeId,{required:!0,name:ed.courseRequisiteTypeId,label:"Course Requisite Type",requiredMark:!0,rules:[Ot.required()]})},n.loadDisciplines=function(){return ce.getAll(nd.className).then((function(e){e&&(e=e.sort((function(e,t){var n,r;return(null!==(n=null===e||void 0===e?void 0:e.code)&&void 0!==n?n:"")>(null!==(r=null===t||void 0===t?void 0:t.code)&&void 0!==r?r:"")?1:-1})),n.setState({disciplines:null!==e&&void 0!==e?e:[]}))})).catch((function(){n.setState({error:!0})}))},n.loadCourseRequisiteType=function(){return ce.getAll(td.className).then((function(e){e&&(e=e.sort((function(e,t){var n,r;return(null!==(n=e.displayOrder)&&void 0!==n?n:"")>(null!==(r=null===t||void 0===t?void 0:t.displayOrder)&&void 0!==r?r:"")?1:-1})),n.setState({courseRequisiteTypes:null!==e&&void 0!==e?e:[]}))})).catch((function(){n.setState({error:!0})}))},n.reset=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields(),n.setState({courses:[]})},n.getValue=function(){var e,t=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldsValue();return md(md({},n.state.value),{courseRequisiteTypeId:t.courseRequisiteTypeId})},n.getForm=function(){return n._formRef},n.handleSelected=function(e){var t,r,i,o=e[0];n.setState({selectedCourseId:null!==(t=o.courseId)&&void 0!==t?t:re.default.Empty(),value:{courseId:null!==(r=o.courseId)&&void 0!==r?r:re.default.Empty(),course:null!==o&&void 0!==o?o:null}}),e&&e[0]&&n.props.onChange&&n.props.onChange({courseId:null!==(i=o.courseId)&&void 0!==i?i:re.default.Empty(),course:null!==o&&void 0!==o?o:null})},n.clearSearch=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields()},n.handleChange=function(){var e;n.setState({searching:!0});var t=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldsValue(),r=Ks({disciplineId:""==t.disciplineId?null:t.disciplineId,catalogNumber:t.catalogNumber,title:t.title,institutionId:n.props.institutionId});n.props.includeRetired?Qs.searchForCourseWithRetired(r).then((function(e){var t;(null===e||void 0===e?void 0:e.succeeded)&&n.setState({courses:null!==(t=e.courses)&&void 0!==t?t:[],limited:e.exceedsNumberOfCourses})})).catch((function(e){n.setState({error:e})})).finally((function(){n.setState({loading:!1,searching:!1})})):Qs.searchForCourse(r).then((function(e){var t;(null===e||void 0===e?void 0:e.succeeded)&&n.setState({courses:null!==(t=e.courses)&&void 0!==t?t:[],limited:e.exceedsNumberOfCourses})})).catch((function(e){n.setState({error:e})})).finally((function(){n.setState({loading:!1,searching:!1})}
1))},n.existingCourse=function(e){var t=Ks(md(md({},e),{institutionId:n.props.institutionId}));n.props.includeRetired?Qs.searchForCourseWithRetired(t).then((function(e){var t;(null===e||void 0===e?void 0:e.succeeded)&&n.setState({courses:null!==(t=e.courses)&&void 0!==t?t:[],limited:e.exceedsNumberOfCourses})})).catch((function(e){n.setState({error:e})})).finally((function(){n.setState({loading:!1,submitting:!1})})):Qs.searchForCourse(t).then((function(e){var t;(null===e||void 0===e?void 0:e.succeeded)&&(n.setState({courses:null!==(t=e.courses)&&void 0!==t?t:[]}),e.exceedsNumberOfCourses&&S.b.info("All courses with current filters cannot be shown. Please use more filters"))})).catch((function(e){n.setState({error:e})})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.state={courses:[],disciplines:[],limited:!1,courseRequisiteTypes:[]},n}return vd(t,e),t.prototype.componentDidMount=function(){var e,t=this;this.setState({loading:!0});var n=[];this.state.disciplines&&0!=this.state.disciplines.length||n.push(this.loadDisciplines()),this.state.courseRequisiteTypes&&0!=this.state.courseRequisiteTypes.length||n.push(this.loadCourseRequisiteType()),void 0!=this.props.value&&this.setState({value:this.props.value}),(null===(e=this.props.value)||void 0===e?void 0:e.course)&&this.existingCourse(this.props.value.course),this.props.existingCourseId&&this.props.existingCourseId!=re.default.Empty()&&this.loadExistingCourse(this.props.existingCourseId),(this.props.catalogNumber||this.props.disciplineId)&&this.handleChange(),Promise.all(n).then((function(){t.setState({loading:!1})}))},t.prototype.componentDidUpdate=function(e){if(void 0!=this.props.value&&this.props.value!=e.value&&this.setState({value:this.props.value}),this._tableRef.current){var t=this._tableRef.current.querySelector(".ant-table-tbody").querySelectorAll(".ant-radio-input");t&&t.length>0&&t.forEach((function(e){e.setAttribute("aria-label","radio button")}))}},t.prototype.loadExistingCourse=function(e){var t=this;Qs.getCourseDetails(e).then((function(e){var n,r,i;(null===(n=e.course)||void 0===n?void 0:n.courseDetails)&&t.setState({courses:[null!==(r=e.course.currentDetail)&&void 0!==r?r:Zs.create()],selectedCourseId:null!==(i=e.course.id)&&void 0!==i?i:re.default.Empty()})})).catch((function(e){t.setState({error:e})})).finally((function(){t.setState({loading:!1,submitting:!1})}))},t.prototype.render=function(){var e,t,n,r,i=this;if(this.state.loading)return Object(o.jsx)(pt.a,{active:!0},void 0);var a=this.getFormItems(),s=md(md({},null===(e=this.state.value)||void 0===e?void 0:e.course),{disciplineId:null!==(t=this.props.disciplineId)&&void 0!==t?t:null,catalogNumber:null!==(n=this.props.catalogNumber)&&void 0!==n?n:void 0});return Object(o.jsxs)(y.b,md({direction:"vertical"},{children:[Object(o.jsx)(ot.a.Paragraph,md({italic:!0},{children:"Search for a course using the fields below to populate the table below to select a course."}),void 0),Object(o.jsxs)(ht.a,md({ref:this._formRef,layout:"vertical",initialValues:s,onChange:this.handleChange,requiredMark:!0},{children:[Object(o.jsxs)(y.b,md({direction:"vertical",size:"small"},{children:[Object(o.jsxs)(b.a,md({gutter:[16,16]},{children:[Object(o.jsx)(m.a,md({},En.HALF,{children:Object(o.jsx)(ht.a.Item,md({},a.get(Xs),{children:Object(o.jsx)(hd,md({dropdownMatchSelectWidth:!1,onChange:this.handleChange,allowClear:!0,showSearch:!0,optionFilterProp:"children"},{children:this.renderDisciplineOptions()}),void 0)}),void 0)}),void 0),Object(o.jsx)(m.a,md({},En.HALF,{children:Object(o.jsx)(ht.a.Item,md({},a.get(Js),{children:Object(o.jsx)(ut.a,{allowClear:!0},void 0)}),void 0)}),void 0)]}),void 0),Object(o.jsx)(ht.a.Item,md({},a.get($s),{children:Object(o.jsx)(ut.a,{allowClear:!0},void 0)}),void 0)]}),void 0),Object(o.jsxs)(y.b,md({direction:"horizontal"},{children:[Object(o.jsx)(dd,{htmlType:"button",onClick:this.handleChange,searching:this.state.searching},void 0),Object(o.jsx)(od,{htmlType:"button",onClick:this.clearSearch},void 0)]}),void 0),this.state.limited?Object(o.jsx)(ot.a.Text,{children:"Too many results. Please narrow your search above."},void 0):null,Object(o.jsxs)(Pi.a,md({dataSource:this.state.courses,ref:this._tableRef,pagination:!1,rowKey:Zs.courseId,rowSelection:{columnTitle:"Actions",columnWidth:100,t
1ype:"radio",onChange:function(e,t){i.handleSelected(t)},defaultSelectedRowKeys:[null!==(r=this.props.existingCourseId)&&void 0!==r?r:re.default.Empty()]}},{children:[Object(o.jsx)(Pi.a.Column,{title:"Discipline",dataIndex:Zs.discipline,width:125,render:function(e,t){var n,r;return Object(o.jsx)(Ws.a,md({title:null===(n=t.discipline)||void 0===n?void 0:n.name,placement:"right"},{children:null===(r=t.discipline)||void 0===r?void 0:r.code}),void 0)}},void 0),Object(o.jsx)(Pi.a.Column,{title:"Catalog Number",dataIndex:Zs.catalogNumber,width:125},void 0),Object(o.jsx)(Pi.a.Column,{title:"Title",dataIndex:Zs.title},void 0)]}),void 0),this.props.isCourseRequisite?Object(o.jsx)(ht.a.Item,md({},a.get(ed.courseRequisiteTypeId),{children:Object(o.jsx)(hd,md({dropdownMatchSelectWidth:!1,onChange:this.handleChange,allowClear:!0,showSearch:!0,optionFilterProp:"children"},{children:this.renderCourseRequisiteTypes()}),void 0)}),void 0):null]}),void 0)]}),void 0)},t.prototype.renderDisciplineOptions=function(){var e=this;return this.state.disciplines.map((function(t){return e.renderDisciplineOption(t)}))},t.prototype.renderDisciplineOption=function(e){if(e.id)return Object(o.jsx)(pr.a.Option,md({value:e.id},{children:e.display}),e.id)},t.prototype.renderCourseRequisiteType=function(e){if(e.id)return Object(o.jsx)(pr.a.Option,md({value:e.id},{children:e.name}),e.id)},t.prototype.renderCourseRequisiteTypes=function(){var e=this;return this.state.courseRequisiteTypes.map((function(t){return e.renderCourseRequisiteType(t)}))},t}(a.Component),bd=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),yd=function(){return yd=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},yd.apply(this,arguments)},Od=function(e){function t(t){var n=e.call(this,t)||this;return n.termIdentifier="term",n.yearIdentifier="year",n.handleChanged=function(e,t){n.props.onChange&&n.props.onChange({year:e,termId:t})},n.handleYearChanged=function(e){if(!Number.isNaN(e)){var t=e;n.setState({year:t}),n.handleChanged(t,n.state.termId)}},n.handleTermChanged=function(e){n.handleChanged(n.state.year,e)},n.handleTermChange=function(e){n.setState({termId:e})},n.handleYearChange=function(e){n.setState({year:e})},n.handleClick=function(e){var t,r;n.toggleOpen(e,!(null!==(r=null===(t=n.state.openSelect)||void 0===t?void 0:t.get(e))&&void 0!==r&&r))},n.handleBlur=function(e){n.toggleOpen(e,!1)},n.toggleOpen=function(e,t){var r=n.state.openSelect;r.set(n.termIdentifier,!1),r.set(n.yearIdentifier,!1),r.set(e,t),n.setState({openSelect:r})},n.state={year:void 0,termId:"",terms:[],openSelect:new Map},n}return bd(t,e),t.prototype.componentDidMount=function(){var e,t,n;this.loadTerms();var r=this.state.openSelect;r.set(this.termIdentifier,!1),r.set(this.yearIdentifier,!1),this.setState({termId:null!==(t=null===(e=this.props.value)||void 0===e?void 0:e.termId)&&void 0!==t?t:"",year:null===(n=this.props.value)||void 0===n?void 0:n.year,openSelect:r})},t.prototype.loadTerms=function(){var e=this;ce.getAll(Rs.className).then((function(t){e.setState({terms:t})}))},t.prototype.componentDidUpdate=function(e){this.props.value&&this.props.value!=e.value&&this.setState({termId:this.props.value.termId,year:this.props.value.year})},t.prototype.render=function(){for(var e,t=this,n=this.state.termId==re.default.Empty()||""==this.state.termId?void 0:this.state.termId,r=0==this.state.year?void 0:this.state.year,i=$r.getCurrentYear()+2,a=this.props.futureYears?$r.getCurrentYear():2021,s=[],d=i;d>=a;d--)s.push(d);return Object(o.jsx)("div",{children:this.props.readOnly?Object(o.jsxs)(y.b,yd({direction:"horizontal"},{children:[Object(o.jsx)(ud,{value:null===(e=this.state.terms.find((function(e){return e.id==n})))||void 0===e?void 0:e.name},void 0),Object(o.jsx)(ud,{value:r},void 0)]}),void 0):Object(o.jsxs)(ut.a.Group,yd({compact:!0},{children:[Object(o.jsx)("label",yd({title:"Term",htmlFor:this.termIdentifier},{children:Object(o.jsx)(hd,yd({dropdownMatchSelectWidth:!1,showArrow:!this.props.disabled,disabled:this.props.disabled||this.props.readOnly,value:n,onSelect:this.handleTermChanged,onChange:this.handleTermChanged,placeholder:"Term",allowClear:!0},{children:this.state.terms.map((function(e){return t.renderTermOption(e)}))}),void 0)}),void 0),Object(o.jsx)("label",yd({title:"Year",htmlFor:this.yearIdentifier},{children:this.props.anyYear?Object(o.jsx)(Ni.a,{onChange:this.handleYearChanged,disabled:this.props.disabled||this.props.readOnly,value:r,placeholder:"Year"},void 0):Object(o.jsx)(hd,yd({open:this.state.openSelect.get(this.yearIdentifier),onClick:function(){return t.handleClick(t.yearIdentifier)},onBlur:function(){return t.handleBlur(t.yearIdentifier)},dropdownMatchSelectWidth:!1,showArrow:!this.props.disabled,onSelect:this.handleYearChange,onChange:this.handleYearChanged,disabled:this.props.disabled||this.props.readOnly,value:r,placeholder:"Year",allowClear:!0},{children:s.map((function(e){return t.renderYear(e)}))}),void 0)}),void 0)]}),void 0)},void 0)},t.prototype.renderTermOption=function(e){if(e.id&&e.name)return Object(o.jsx)(pr.a.Option,yd({"aria-label":e.name,title:e.name,value:e.id},{children:e.name}),e.id)},t.prototype.renderYear=function(e){return Object(o.jsx)(pr.a.Option,yd({title:e.toString(),value:e},{children:e}),e)},t}(a.Component),jd=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Id=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return jd(t,e),t.prototype.get=function(e){var t="api/courseModificationChangeRequests/get";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.saveStep1=function(e){var t="api/courseModificationChangeRequests/saveStep1";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.submitStep1=function(e){var t="api/courseModificationChangeRequests/submitStep1";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.saveStep2=function(e){var t="api/courseModificationChangeRequests/saveStep2";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.submitStep2=function(e){var t="api/courseModificationChangeRequests/submitStep2";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.checkCourseModificationExisting=function(e){var t="api/courseModificationChangeRequests/checkCourseModificationExisting";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t}(U),Sd=new Id,Ed=n(88),Rd=n.n(Ed),_d=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Td=function(){return Td=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Td.apply(this,arguments)},Cd=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n.getFormItems=function(){return(new Map).set(Bs.courseId,{required:!0,name:Bs.courseId,rules:[Ot.required()]}).set(Bs.rationale,{label:"What is the rationale for deactivating this course?",required:!0,name:Bs.rationale,rules:[Ot.required(),Ot.maxLength(5e3)]}).set(Bs.deactivationYearTerm,{label:"When will this course be deactivated?",required:!0,name:Bs.deactivationYearTerm,rules:[Ot.required()]})},n.loadChangeRequest=function(){var e=Gs({changeRequestId:n.props.changeRequestId});return Us.get(e).then((function(e){var t,r,i;e&&(n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create(),courseDeactivation:null!==(i=null===(r=e.changeRequest)||void 0===r?void 0:r.courseDeactivationChangeRequest)&&void 0!==i?i:Bs.create(),fieldErrors:n.props.changeRequestDetailsPage?null:e.fieldErrors}),n.resetForm())})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.checkExisting=function(e){var t,r,i=n._formRef?n._formRef.current.getFieldsValue():null,o=Vs({courseId:void 0==i.courseId.courseId?i.courseId:i.courseId.courseId,installTerm:null===(t=i.deactivationYearTerm)||void 0===t?void 0:t.termId,installYear:null===(r=i.deactivationYearTerm)||void 0===r?void 0:r.year});Sd.checkCourseModificationExisting(o).then((function(t){t.existingCourseModification?Rd.a.confirm({title:"Existing Course Modification",content:"There is already a Course Modification scheduled for this course and term combination. Click confirm to continue with the deactivation.",onOk:e?n.handleSubmit:n.handleSave,okText:"Confirm",okButtonProps:{danger:!0}}):e?n.handleSubmit():n.handleSave()})).catch((function(){S.b.error("Incomplete form")}))},n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields()},n.handleSave=function(){var e,t,r,i,o,a,s;n.setState({saving:!0});var d=Bs.create(n._formRef?n._formRef.current.getFieldsValue():null);d.changeRequestId=null!==(e=n.props.changeRequestId)&&void 0!==e?e:re.default.Empty(),d.courseId=null!==(a=null!==(i=null===(r=null===(t=n._formRef.current)||void 0===t?void 0:t.getFieldValue(Bs.courseId))||void 0===r?void 0:r.courseId)&&void 0!==i?i:null===(o=n.state.courseDeactivation.course)||void 0===o?void 0:o.id)&&void 0!==a?a:re.default.Empty(),d.rationale=null===(s=n._formRef.current)||void 0===s?void 0:s.getFieldValue(Bs.rationale),d.deactivationTerm=""==d.deactivationTerm?null:d.deactivationTerm;var c=Ls({institutionId:n.props.institutionId,courseDeactivationChangeRequest:d});Us.saveStep1(c).then((function(e){var t,r,i,o;(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create(),courseDeactivation:null!==(i=null===(r=e.changeRequest)||void 0===r?void 0:r.courseDeactivationChangeRequest)&&void 0!==i?i:Bs.create()}),n.resetForm(),n.props.onSave&&(null===(o=e.changeRequest)||void 0===o?void 0:o.id)&&n.props.onSave(e.changeRequest.i
1d)):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Save Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Save Failed")})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.handleSubmit=function(){var e,t,r,i,o,a,s,d,c;n.setState({saving:!0});var l=Bs.create();l.changeRequestId=null!==(e=n.props.changeRequestId)&&void 0!==e?e:re.default.Empty(),l.courseId=null!==(a=null!==(i=null===(r=null===(t=n._formRef.current)||void 0===t?void 0:t.getFieldValue(Bs.courseId))||void 0===r?void 0:r.courseId)&&void 0!==i?i:null===(o=n.state.courseDeactivation.course)||void 0===o?void 0:o.id)&&void 0!==a?a:re.default.Empty(),l.rationale=null===(s=n._formRef.current)||void 0===s?void 0:s.getFieldValue(Bs.rationale),l.deactivationYearTerm=null===(d=n._formRef.current)||void 0===d?void 0:d.getFieldValue(Bs.deactivationYearTerm);var u=ks({changeRequestId:null!==(c=n.props.changeRequestId)&&void 0!==c?c:null,institutionId:n.props.institutionId,CourseDeactivationChangeRequest:l});Us.submitStep1(u).then((function(e){var t;n.setState({loading:!1,submitted:!0}),(null===e||void 0===e?void 0:e.succeeded)?n.props.onSubmit&&(null===(t=e.changeRequest)||void 0===t?void 0:t.id)&&n.props.onSubmit(e.changeRequest.id):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,submitted:!0}),S.b.error("Submit Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Submit Failed")})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.state={changeRequest:$a.create(),courseDeactivation:Bs.create()},n}return _d(t,e),t.prototype.componentDidMount=function(){this.props.changeRequestId&&(this.setState({fieldErrors:this.props.fieldErrors}),this.props.changeRequestId!=re.default.Empty()&&this.loadChangeRequest())},t.prototype.componentDidUpdate=function(e){this.props.changeRequestId&&this.props.changeRequestId!=e.changeRequestId&&(this.setState({fieldErrors:this.props.fieldErrors}),this.props.changeRequestId!=re.default.Empty()&&this.loadChangeRequest()),this.props.loading!=e.loading&&this.setState({loading:this.props.loading})},t.prototype.render=function(){var e=this;if(this.state.loading)return Object(o.jsx)(pt.a,{active:!0},void 0);var t=this.getFormItems();return Object(o.jsx)(O.Content,{children:Object(o.jsx)(Ci.a,Td({ref:this._formRef,layout:"vertical",onFinish:function(){return e.checkExisting(!0)}},{children:Object(o.jsxs)(y.b,Td({direction:"vertical"},{children:[this.renderSearch(),this.renderCourse(),Object(o.jsx)(mt.a,Td({initialValue:this.state.courseDeactivation.rationale},t.get(Bs.rationale),_t.getValidation(Bs.rationale,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ut.a.TextArea,{maxLength:5e3,autoSize:{minRows:5},showCount:!0,disabled:this.props.readonly},void 0)}),void 0),Object(o.jsx)(mt.a,Td({initialValue:this.state.courseDeactivation.deactivationYearTerm},t.get(Bs.deactivationYearTerm),_t.getValidation(Bs.deactivationYearTerm,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(Od,{futureYears:!0,disabled:this.props.readonly},void 0)}),void 0),this.renderActions()]}),void 0)}),void 0)},void 0)},t.prototype.renderCourse=function(){var e,t,n,r,i,a,s,d=null!==(r=null===(n=null===(t=null===(e=this.state.courseDeactivation)||void 0===e?void 0:e.course)||void 0===t?void 0:t.discipline)||void 0===n?void 0:n.code)&&void 0!==r?r:"";if(d+=null!==(s=" "+(null===(a=null===(i=this.state.courseDeactivation)||void 0===i?void 0:i.course)||void 0===a?void 0:a.catalogNumber))&&void 0!==s?s:"",this.props.readonly)return Object(o.jsx)(ud,{text:d},void 0)},t.prototype.renderSearch=function(){var e,t,n=this.getFormItems();if(!this.props.readonly)return Object(o.jsx)(mt.a,Td({initialValue:this.state.courseDeactivation.courseId},n.get(Bs.courseId),_t.getValidation(Bs.courseId,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(gd,{existingCourseId:null!==(t=null===(e=this.state.courseDeactivation.course)||void 0===e?void 0:e.id)&&void 0!==t?t:re.default.Empty(),institutionId:this.props.institutionId},void 0)}),void 0)},t.prototype.renderActions=function(){var e=this;if(!this.props.readonly)return Object(o.jsxs)(y.b,Td({direction:"horizontal",wrap:!0},{children:[Object(o.jsx)(ss,{submitting:this.state.submitting},void 0),Object(o.jsx)(Tr,{type:"default",htmlType:"button",onClick:function(){return e.checkExisting(
1)},saving:this.state.submitting,saved:this.state.saved},void 0),Object(o.jsx)(Ir,{resetting:this.state.resetting,onConfirm:this.resetForm},void 0)]}),void 0)},t.prototype.renderErrors=function(){if(this.state.fieldErrors)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t}(a.Component),xd=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ad=function(){return Ad=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ad.apply(this,arguments)},Pd=function(e){function t(t){var n=e.call(this,t)||this;return n.render=function(){var e;return Object(o.jsx)(Ci.a,Ad({layout:"vertical"},{children:Object(o.jsxs)(y.b,Ad({size:"large",direction:"vertical"},{children:[Object(o.jsx)(Qn.a,Ad({type:"inner",title:"Course Information"},{children:Object(o.jsx)(Cd,{readonly:!0,loading:n.props.loading,institutionId:null!==(e=n.props.changeRequest.institutionId)&&void 0!==e?e:re.default.Empty(),changeRequestId:n.props.changeRequest.id,changeRequestDetailsPage:n.props.changeRequestDetailsPage},void 0)}),void 0),Object(o.jsx)(Qn.a,Ad({type:"inner",size:"small",title:"Additional Details"},{children:Object(o.jsx)(gs,{readonly:!0,changeRequest:n.props.changeRequest,loading:n.props.loading},void 0)}),void 0)]}),void 0)}),void 0)},n}return xd(t,e),t}(a.Component),Nd=function(e){return Object.assign({changeRequestId:"00000000-0000-0000-0000-000000000000"},e)},wd=function(e){return Object.assign({changeRequestId:null,institutionId:"00000000-0000-0000-0000-000000000000",courseModificationChangeRequest:null},e)},Dd={className:"CourseModificationChangeRequestDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",changeRequestId:"00000000-0000-0000-0000-000000000000",catalogNumber:"",courseId:null,course:null,disciplineId:null,discipline:null,title:"",description:"",objectives:"",variableHours:null,categoryId:null,category:null,install:null,installTermId:null,installYear:null,installTerm:null,courseModificationChangeRequestCredits:[],courseModificationChangeRequestCourseRequisites:[]},e)},id:"id",changeRequestId:"changeRequestId",catalogNumber:"catalogNumber",courseId:"courseId",course:"course",disciplineId:"disciplineId",discipline:"discipline",title:"title",description:"description",objectives:"objectives",variableHours:"variableHours",categoryId:"categoryId",category:"category",install:"install",installTermId:"installTermId",installYear:"installYear",installTerm:"installTerm",courseModificationChangeRequestCredits:"courseModificationChangeRequestCredits",courseModificationChangeRequestCourseRequisites:"courseModificationChangeRequestCourseRequisites"},qd=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fd=function(){return Fd=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Fd.apply(this,arguments)},Md=function(e){function t(t){var n=e.call(this,t)||this;n._formRef=a.createRef(),n.getFormItems=function(){return(new Map).set(Dd.courseId,{required:!0,name:Dd.courseId,rules:[Ot.required()]})},n.loadChangeRequest=function(){var e=Nd({changeRequestId:n.props.changeRequestId});return Sd.get(e).then((function(e){var t,r,i;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create(),courseModification:null!==(i=null===(r=e.changeRequest)||void 0===r?void 0:r.courseModificationChangeRequest)&&void 0!==i?i:Dd.create({disciplineId:n.props.disciplineId,catalogNumber:n.props.catalogNumber}),fieldErrors:n.props.changeRequestDetailsPage?null:e.fieldErrors},(function(){return n.resetForm()}))})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields()},n.handleSubmit=function(){var e,t,r,i,o;n.setState({saving:!0});var a=Dd.create();a.changeRequestId=null!==(e=n.props.changeRequestId)&&void 0!==e?e:re.default.Empty(),a.courseId=null!==(i=null===(r=null===(t=n._formRef.current)||void 0===t?void 0:t.getFieldValue(Dd.courseId))||void 0===r?void 0:r.courseId)&&void 0!==i?i:re.default.Empty();var s=wd({changeRequestId:null!==(o=n.props.changeRequestId)&&void 0!==o?o:null,institutionId:n.props.institutionId,CourseModificationChangeRequest:a});Sd.submitStep1(s).then((function(e){var t;n.setState({loading:!1,submitted:!0}),(null===e||void 0===e?void 0:e.succeeded)?n.props.onSubmit&&(null===(t=e.changeRequest)||void 0===t?void 0:t.id)&&n.props.onSubmit(e.changeRequest.i
1d):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,submitted:!0}),S.b.error("Submit Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Submit Failed")})).finally((function(){n.setState({loading:!1,submitting:!1})}))};var r=Dd.create({disciplineId:n.props.disciplineId,catalogNumber:n.props.catalogNumber});return n.state={changeRequest:$a.create(),courseModification:r},n}return qd(t,e),t.prototype.componentDidUpdate=function(e){this.props.changeRequestId&&this.props.changeRequestId!=re.default.Empty()&&this.props.changeRequestId!=e.changeRequestId&&(this.setState({fieldErrors:this.props.fieldErrors}),this.loadChangeRequest()),this.props.disciplineId&&this.props.disciplineId!=e.disciplineId&&this.setState({fieldErrors:this.props.fieldErrors}),this.props.catalogNumber&&this.props.catalogNumber!=e.catalogNumber&&this.setState({fieldErrors:this.props.fieldErrors}),this.props.changeRequestId!=re.default.Empty()&&this.props.loading!=e.loading&&(this.loadChangeRequest(),this.setState({loading:this.props.loading}))},t.prototype.render=function(){return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsx)(O.Content,{children:Object(o.jsx)(Ci.a,Fd({ref:this._formRef,layout:"vertical",initialValues:this.state.courseModification,onFinish:this.handleSubmit},{children:Object(o.jsxs)(y.b,Fd({direction:"vertical"},{children:[this.renderSearch(),this.renderCourse(),this.renderActions()]}),void 0)}),void 0)},void 0)},t.prototype.renderCourse=function(){var e,t,n,r,i,a=null!==(n=null===(t=null===(e=this.state.courseModification)||void 0===e?void 0:e.discipline)||void 0===t?void 0:t.code)&&void 0!==n?n:"";if(a+=null!==(i=" "+(null===(r=this.state.courseModification)||void 0===r?void 0:r.catalogNumber))&&void 0!==i?i:"",this.props.readonly)return Object(o.jsx)(ud,{text:a},void 0)},t.prototype.renderSearch=function(){var e,t=this.getFormItems();if(!this.props.readonly)return Object(o.jsx)(mt.a,Fd({initialValue:{courseId:this.state.courseModification.courseId,course:this.state.courseModification.courseId,catalogNumber:this.state.courseModification.catalogNumber,disiplineId:this.state.courseModification.disciplineId}},t.get(Dd.courseId),_t.getValidation(Dd.courseId,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(gd,{includeRetired:!0,existingCourseId:null!==(e=this.state.courseModification.courseId)&&void 0!==e?e:"",institutionId:this.props.institutionId,catalogNumber:this.props.catalogNumber,disciplineId:this.props.disciplineId},void 0)}),void 0)},t.prototype.renderActions=function(){if(!this.props.readonly)return Object(o.jsxs)(y.b,Fd({direction:"horizontal",wrap:!0},{children:[Object(o.jsx)(ss,{submitting:this.state.submitting},void 0),Object(o.jsx)(Ir,{resetting:this.state.resetting,onConfirm:this.resetForm},void 0)]}),void 0)},t.prototype.renderErrors=function(){if(this.state.fieldErrors)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t}(a.Component),Yd=n(416),Ud=function(e){return Object.assign({courseModificationChangeRequest:null},e)},Ld=function(e){return Object.assign({courseModificationChangeRequest:null},e)},kd={className:"CourseModificationChangeRequestCourseRequisiteDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",courseModificationChangeRequestId:"00000000-0000-0000-0000-000000000000",requisiteCourseId:"00000000-0000-0000-0000-000000000000",requisiteCourse:null,courseRequisiteTypeId:0,courseRequisiteType:null},e)},id:"id",courseModificationChangeRequestId:"courseModificationChangeRequestId",requisiteCourseId:"requisiteCourseId",requisiteCourse:"requisiteCourse",courseRequisiteTypeId:"courseRequisiteTypeId",courseRequisiteType:"courseRequisiteType"},Gd={className:"CourseModificationChangeRequestCreditDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",courseModificationChangeRequestId:"00000000-0000-0000-0000-000000000000",creditTypeId:"00000000-0000-0000-0000-000000000000",minHours:null,maxHours:null,creditType:null},e)},id:"id",courseModificationChangeRequestId:"courseModificationChangeRequestId",creditTypeId:"creditTypeId",minHours:"minHours",maxHours:"maxHours",creditType:"creditType"},Vd={className:"CreditTypeDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",displayOrder:0,name:""},e)},id:"id",displayOrder:"displayOrder",name:"name"},Bd=n(200),Wd=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),zd=function(){return zd=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},zd.apply(this,arguments)},Hd=function(e){function t(t){var n=e.call(this,t)||this;return n.handleChanged=function(e){var t=n.state.value==e?null:e;n.setState({value:t}),n.props.onChange&&n.props.onChange(t)}
1,n.renderReadOnlySelected=function(e){var t,r,i,a,s=null!==(t=n.props.yesText)&&void 0!==t?t:"Yes",d=null!==(r=n.props.noText)&&void 0!==r?r:"No";return n.props.readonly?n.props.value?Object(o.jsx)(Bd.a,{},void 0):null:Object(o.jsxs)(y.b,zd({className:"custom-ant-space-horizontal",direction:"horizontal",wrap:!1},{children:[Object(o.jsx)(rt.a,zd({size:null!==(i=n.props.size)&&void 0!==i?i:"middle",disabled:n.props.disabled,className:"yes-no-input-button",type:null!=n.state.value&&1==n.state.value?"primary":e,onClick:function(){return n.handleChanged(!0)}},{children:s}),void 0),Object(o.jsx)(rt.a,zd({size:null!==(a=n.props.size)&&void 0!==a?a:"middle",disabled:n.props.disabled,type:null!=n.state.value&&0==n.state.value?"primary":e,onClick:function(){return n.handleChanged(!1)}},{children:d}),void 0)]}),void 0)},n.state={value:null},n}return Wd(t,e),t.prototype.componentDidMount=function(){void 0!=this.props.value&&this.setState({value:this.props.value})},t.prototype.componentDidUpdate=function(e){void 0!=this.props.value&&this.props.value!=e.value&&this.setState({value:this.props.value})},t.prototype.render=function(){var e=this.props.disabled?"text":"default";return Object(o.jsx)("div",zd({className:"yes-no-input"},{children:this.renderReadOnlySelected(e)}),void 0)},t}(a.Component),Qd=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Kd=function(){return Kd=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Kd.apply(this,arguments)},Xd=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._courseRequisiteFormRef=a.createRef(),n._courseSearch=a.createRef(),n.getFormItems=function(){var e;return(new Map).set(Dd.title,{name:Dd.title,label:"Course Title"}).set(Dd.courseId,{label:"Course",rules:[Ot.required(),Ot.maxLength(150)],initialValue:null===(e=n.state.courseModification.course)||void 0===e?void 0:e.display}).set(Dd.description,{required:!0,name:Dd.description,label:"Course Description",rules:[Ot.required(),Ot.maxLength(5e3)]}).set(Dd.objectives,{required:!0,name:Dd.objectives,label:"Please list learning outcomes/objectives for this course.",rules:[Ot.maxLength(5e3),Ot.required()]}).set(Dd.categoryId,{required:!0,name:Dd.categoryId,label:"Please select a category for this course.",rules:[Ot.required()]}).set(Dd.install,{required:!0,name:Dd.install,label:"When will these modifications be available?",rules:[Ot.required()]}).set(Dd.variableHours,{required:!0,name:Dd.variableHours,label:"Will this course offer variable credits?",rules:[Ot.required()]}).set(kd.courseRequisiteTypeId,{required:!0,name:kd.courseRequisiteTypeId,label:"Course Requisite Type",requiredMark:!0,rules:[Ot.required()]})},n.getCourseModificationCourseCourseRequisiteColumns=function(){return[{title:"Name",sorter:!1,dataIndex:kd.requisiteCourseId,render:function(e,t,r){var i,o,a,s,d,c=null===(i=n._formRef.current)||void 0===i?void 0:i.getFieldValue(Dd.courseModificationChangeRequestCourseRequisites)[r];return null!==(s=null===(a=null===(o=null===c||void 0===c?void 0:c.requisiteCourse)||void 0===o?void 0:o.currentDetail)||void 0===a?void 0:a.display)&&void 0!==s?s:null===(d=null===c||void 0===c?void 0:c.requisiteCourse)||void 0===d?void 0:d.display}},{title:"Type",dataIndex:kd.courseRequisiteTypeId,render:function(e,t,r){var i,o,a=null===(i=n._formRef.current)||void 0===i?void 0:i.getFieldValue(Dd.courseModificationChangeRequestCourseRequisites)[r];return null===(o=n.state.courseRequisiteTypes.find((function(e){return e.id==(null===a||void 0===a?void 0:a.courseRequisiteTypeId)})))||void 0===o?void 0:o.name}},{title:"Actions",dataIndex:"actions",render:function(e,t,r){var i,a=null===(i=n._formRef.current)||void 0===i?void 0:i.getFieldValue(Dd.courseModificationChangeRequestCourseRequisites)[r];return Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(rt.a,Kd({type:"link",onClick:function(){return n.edit
1CourseRequisite(a)}},{children:Object(o.jsx)(Gr.a,{},void 0)}),void 0),Object(o.jsx)(rt.a,Kd({type:"link",onClick:function(){return n.removeCourseRequisite(a)}},{children:Object(o.jsx)(Yd.a,{},void 0)}),void 0)]},void 0)}}]},n.getCreditTypeFormItems=function(e){return(new Map).set(Gd.creditTypeId,{name:[e,Gd.creditTypeId]}).set(Gd.minHours,{name:[e,Gd.minHours]}).set(Gd.maxHours,{name:[e,Gd.maxHours]})},n.resetForm=function(){var e;n.setState({altered:!1}),null===(e=n._formRef.current)||void 0===e||e.resetFields()},n.fetchData=function(){n.setState({loading:!0});var e=[];n.state.categories&&0!=n.state.categories.length||e.push(n.loadCategories()),n.state.creditTypes&&0!=n.state.creditTypes.length||e.push(n.loadCreditTypes()),n.props.changeRequestId!=re.default.Empty()&&e.push(n.loadChangeRequest()),n.state.courseRequisiteTypes&&0!=n.state.courseRequisiteTypes.length||e.push(n.loadCourseRequisiteType()),Promise.all(e).then((function(){n.setState({loading:!1}),n.resetForm()}))},n.loadChangeRequest=function(){var e=Nd({changeRequestId:n.props.changeRequestId});return Sd.get(e).then((function(e){var t,r,i;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create(),courseModification:null!==(i=null===(r=e.changeRequest)||void 0===r?void 0:r.courseModificationChangeRequest)&&void 0!==i?i:Dd.create(),fieldErrors:n.props.changeRequestDetailsPage?null:e.fieldErrors})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.loadCourseRequisiteType=function(){return ce.getAll(td.className).then((function(e){e&&(e=e.sort((function(e,t){var n,r;return(null!==(n=e.displayOrder)&&void 0!==n?n:"")>(null!==(r=null===t||void 0===t?void 0:t.displayOrder)&&void 0!==r?r:"")?1:-1})),n.setState({courseRequisiteTypes:null!==e&&void 0!==e?e:[]}))})).catch((function(){n.setState({error:!0})}))},n.loadCategories=function(){return ce.getAll(di.className).then((function(e){e&&n.setState({categories:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadCreditTypes=function(){return ce.getAll(Vd.className).then((function(e){e&&n.setState({creditTypes:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.handleChange=function(){n.setState({altered:!0})},n.handleSubmit=function(){var e,t,r;n.setState({submitting:!0});var i=n._formRef?n._formRef.current.getFieldsValue():null,o=Dd.create(i);o.changeRequestId=null!==(e=n.props.changeRequestId)&&void 0!==e?e:re.default.Empty(),o[Dd.courseId]=null!==(r=null===(t=n.state.courseModification)||void 0===t?void 0:t.courseId)&&void 0!==r?r:re.default.Empty();var a=Ld({courseModificationChangeRequest:o});Sd.submitStep2(a).then((function(e){var t,r,i,o;n.setState({submitted:!0}),(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Submitted"),n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:null,courseModification:null!==(i=null===(r=e.changeRequest)||void 0===r?void 0:r.courseModificationChangeRequest)&&void 0!==i?i:Dd.create()}),n.resetForm(),n.props.onSubmit&&(null===(o=e.changeRequest)||void 0===o?void 0:o.id)&&n.props.onSubmit()):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Submit Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Submit Failed")})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.handleSave=function(){var e;n.setState({saving:!0});var t=n._formRef?n._formRef.current.getFieldsValue():null,r=Dd.create(t);r.changeRequestId=null!==(e=n.props.changeRequestId)&&void 0!==e?e:re.default.Empty(),r.installTermId=""==r.installTerm?null:r.installTerm;var i=Ud({courseModificationChangeRequest:r});Sd.saveStep2(i).then((function(e){var t,r,i;(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create(),courseModification:null!==(i=null===(r=e.changeRequest)||void 0===r?void 0:r.courseModificationChangeRequest)&&void 0!==i?i:Dd.create()})):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Save Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Save Failed")})).finally((function(){n.setState({loading:!1,submitting:!1})}
1))},n.getCreditColumns=function(){var e,t=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldValue(Dd.variableHours),r=[{title:"Credit Type",dataIndex:Gd.creditTypeId,render:function(e,t,r){var i,a=null===(i=n._formRef.current)||void 0===i?void 0:i.getFieldValue(Dd.courseModificationChangeRequestCredits)[r].creditTypeId;if(a){var s=n.state.creditTypes.filter((function(e){return e.id==a}))[0];if(s)return Object(o.jsx)(ud,{text:s.name},void 0)}}},{title:t?"Min Credits":"Credits",dataIndex:Gd.minHours,render:function(e,t,r){return Object(o.jsx)("label",Kd({title:"Min"+r},{children:Object(o.jsx)(mt.a,Kd({},n.getCreditTypeFormItems(r).get(Gd.minHours),_t.getValidation(Gd.minHours+r,n.state.fieldErrors,n.state.submitted||n.props.readonly),{children:Object(o.jsx)(Ni.a,{disabled:n.props.readonly},void 0)}),void 0)}),void 0)}}];return t&&r.push({title:"Max Credits",dataIndex:Gd.maxHours,render:function(e,t,r){return Object(o.jsx)("label",Kd({title:"Max"+r},{children:Object(o.jsx)(mt.a,Kd({},n.getCreditTypeFormItems(r).get(Gd.maxHours),_t.getValidation(Gd.maxHours+r,n.state.fieldErrors,n.state.submitted||n.props.readonly),{children:Object(o.jsx)(Ni.a,{disabled:n.props.readonly},void 0)}),void 0)}),void 0)}}),r},n.handleAddCourseRequisite=function(){var e,t,r,i,o,a,s=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldsValue(),d=null===(t=n._courseSearch.current)||void 0===t?void 0:t.getValue();null===(i=null===(r=n._courseSearch.current)||void 0===r?void 0:r.getForm().current)||void 0===i||i.validateFields();var c=s.courseModificationChangeRequestCourseRequisites,l=[];return l.push(null===(a=null===(o=n._courseSearch.current)||void 0===o?void 0:o.getForm().current)||void 0===a?void 0:a.validateFields()),Promise.all(l).then((function(){var e;c||(c=[]),c.push({requisiteCourse:null===d||void 0===d?void 0:d.course,requisiteCourseId:null===d||void 0===d?void 0:d.courseId,courseRequisiteTypeId:null===d||void 0===d?void 0:d.courseRequisiteTypeId}),null===(e=n._formRef.current)||void 0===e||e.setFieldsValue({courseModificationChangeRequestCourseRequisites:c})}))},n.handleRemoveCourseRequisite=function(e){var t,r,i=null===(t=n._formRef.current)||void 0===t?void 0:t.getFieldValue(Dd.courseModificationChangeRequestCourseRequisites),o=i.find((function(t){return t.requisiteCourseId==e.requisiteCourseId}));i.remove(o),null===(r=n._formRef.current)||void 0===r||r.setFieldsValue({courseModificationChangeRequestCourseRequisites:i})},n.handleEditCourseRequisite=function(e){var t,r,i,o=null===(t=n._formRef.current)||void 0===t?void 0:t.getFieldValue(Dd.courseModificationChangeRequestCourseRequisites),a=null===(r=n._courseRequisiteFormRef.current)||void 0===r?void 0:r.getFieldValue(kd.courseRequisiteTypeId);o.find((function(t){return t.requisiteCourseId==e.requisiteCourseId})).courseRequisiteTypeId=a,null===(i=n._formRef.current)||void 0===i||i.setFieldsValue({courseModificationChangeRequestCourseRequisites:o})},n.addCourseRequisite=function(){var e,t;f.a.confirm({title:"Select Course",content:Object(o.jsx)(gd,{isCourseRequisite:!0,ref:n._c
1ourseSearch,institutionId:null!==(t=null===(e=n.state.changeRequest)||void 0===e?void 0:e.institutionId)&&void 0!==t?t:re.default.Empty()},void 0),onOk:function(){return n.handleAddCourseRequisite()},width:1e3})},n.removeCourseRequisite=function(e){f.a.confirm({title:"Remove Course Requisite",onOk:function(){return n.handleRemoveCourseRequisite(e)},okType:"danger",okText:"Remove",width:300})},n.state={changeRequest:null,disciplines:[],courseModification:Dd.create({disciplineId:"",categoryId:"",installTermId:"",courseModificationRequestCredits:[]}),categories:[],creditTypes:[],courseRequisiteTypes:[]},n}return Qd(t,e),t.prototype.componentDidMount=function(){this.props.changeRequestId&&this.setState({fieldErrors:this.props.fieldErrors}),this.fetchData()},t.prototype.componentDidUpdate=function(e){this.props.changeRequestId&&this.props.changeRequestId!=e.changeRequestId&&(this.setState({fieldErrors:this.props.fieldErrors}),this.fetchData()),this.props.loading!=e.loading&&this.setState({loading:this.props.loading})},t.prototype.editCourseRequisite=function(e){var t=this;f.a.confirm({title:"Edit Course Requisite",onOk:function(){return t.handleEditCourseRequisite(e)},content:Object(o.jsx)(ht.a,Kd({ref:this._courseRequisiteFormRef,layout:"vertical",initialValues:e,onFinish:function(){return t.handleEditCourseRequisite(e)},requiredMark:!0},{children:Object(o.jsx)(mt.a,Kd({},this.getFormItems().get(kd.courseRequisiteTypeId),{children:Object(o.jsx)(hd,Kd({dropdownMatchSelectWidth:!1,allowClear:!0,showSearch:!0,optionFilterProp:"children"},{children:this.renderCourseRequisiteTypes()}),void 0)}),void 0)}),void 0),okText:"Edit",okType:"primary",width:500})},t.prototype.render=function(){var e,t,n,r,i=this;if(this.state.loading)return Object(o.jsx)(pt.a,{active:!0},void 0);var a=(null!==(n=null===(t=null===(e=this.state.courseModification.course)||void 0===e?void 0:e.institutionCourses)||void 0===t?void 0:t.length)&&void 0!==n?n:0)>1,s=this.getFormItems();return Object(o.jsx)(y.b,Kd({size:"small",direction:"vertical"},{children:Object(o.jsx)(ht.a,Kd({ref:this._formRef,layout:"vertical",initialValues:this.state.courseModification,onValuesChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!0},{children:Object(o.jsxs)(y.b,Kd({size:"small",direction:"vertical"},{children:[Object(o.jsx)(mt.a,Kd({},s.get(Dd.courseId),_t.getValidation(Dd.courseId,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ud,{value:null===(r=this.state.courseModification.course)||void 0===r?void 0:r.display},void 0)}),void 0),Object(o.jsx)(mt.a,Kd({},s.get(Dd.title),_t.getValidation(Dd.title,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ud,{},void 0)}),void 0),Object(o.jsx)(mt.a,Kd({},s.get(Dd.categoryId),_t.getValidation(Dd.categoryId,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(hd,Kd({disabled:this.props.readonly},{children:this.state.categories.map((function(e){return i.renderCategoryOption(e)}))}),void 0)}),void 0),Object(o.jsx)(mt.a,Kd({},s.get(Dd.description),_t.getValidation(Dd.description,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(Mr,{readonly:this.props.readonly},void 0)}),void 0),Object(o.jsx)(mt.a,Kd({},s.get(Dd.objectives),_t.getValidation(Dd.objectives,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(Mr,{readonly:this.props.readonly},void 0)}),Dd.objectives),Object(o.jsx)(mt.a,Kd({},s.get(Dd.install),_t.getValidation(Dd.install,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(Od,{futureYears:!0,disabled:this.props.readonly},void 0)}),void 0),Object(o.jsx)(mt.a,Kd({},s.get(Dd.variableHours),_t.getValidation(Dd.variableHours,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(Hd,{disabled:this.props.readonly||a},void 0)}),void 0),Object(o.jsx)(ot.a.Paragraph,Kd({italic:!0},{children:"Please provide credits for at least one credit type in the table below."}),void 0),Object(o.jsx)(ht.a.List,Kd({name:Dd.courseModificationChangeRequestCredits},{children:function(e){return Object(o.jsx)(ht.a.Item,Kd({},_t.getValidation(Dd.courseModificationChangeRequestCredits,i.state.fieldErrors,i.state.submitted||i.props.readonly),{children:Object(o.jsx)(Pi.a,{dataSource:e,summary:function(){var e,t,n,r,a,s,d=null===(e=i._formRef.current)||void 0===e?void 0:e.getFieldValue(Dd.variableHours),c=null===(t=i._formRef.current)||void 0===t?void 0:t.getFieldValue(Dd.courseModificationChangeRequestCredits),l="",u=0;c&&c.length>0&&(l=null!==(n=null===c||void 0===c?void 0:c.map((function(e){var t;return null!==(t=e.minHours)&&void 0!==t?t:0})).reduce((function(e,t){return e+t})))&&void 0!==n?n:0,u=null!==(r=null===c||void 0===c?void 0:c.map((function(e){var t;return null!==(t=e.maxHours)&&void 0!==t?t:0})).reduce((function(e,t){return e+t})))&&void 0!==r?r:0);var p=l,f=u;return d||(p=p+" ("+(null===(s=null===(a=i.state.courseModification.course)||void 0===a?void 0:a.currentDetail)||void 0===s?void 0:s.minCredits)+" Required)"),Object(o.jsxs)(Pi.a.Summary.Row,{children:[Object(o.jsx)(Pi.a.Summary.Cell,{index:0},void 0),Object(o.jsx)(Pi.a.Summary.Cell,Kd({index:1},{children:Object(o.jsx)(ot.a.Text,Kd({strong:!0,type:"danger"},{children:p}),void 0)}),void 0),d?Object(o.jsx)(Pi.a.Summary.Cell,Kd({index:1},{children:Object(o.jsx)(ot.a.Text,Kd({strong:!0,type:"danger"},{children:f}),void 0)}),void 0):null]},void 0)}
1,columns:i.getCreditColumns(),pagination:!1},void 0)}),void 0)}}),void 0),Object(o.jsx)(ot.a.Title,Kd({level:5},{children:"Prerequisites/Co-Requisites"}),void 0),Object(o.jsxs)(y.b,Kd({direction:"vertical"},{children:[this.props.readonly?null:Object(o.jsx)(rt.a,Kd({onClick:this.addCourseRequisite},{children:"Add Course"}),void 0),Object(o.jsx)(ht.a.List,Kd({name:Dd.courseModificationChangeRequestCourseRequisites},{children:function(e){return Object(o.jsx)(Pi.a,{dataSource:e,columns:i.getCourseModificationCourseCourseRequisiteColumns(),pagination:!1},void 0)}}),void 0)]}),void 0),this.renderActions()]}),void 0)}),void 0)}),void 0)},t.prototype.renderActions=function(){if(!this.props.readonly)return Object(o.jsxs)(y.b,Kd({direction:"horizontal",wrap:!0},{children:[Object(o.jsx)(rs,{onClick:this.props.onPrevious},void 0),Object(o.jsx)(ss,{submitting:this.state.submitting},void 0),Object(o.jsx)(Tr,{type:"default",htmlType:"button",onClick:this.handleSave,saving:this.state.submitting,saved:this.state.saved},void 0),Object(o.jsx)(Ir,{resetting:this.state.resetting,onConfirm:this.resetForm},void 0)]}),void 0)},t.prototype.renderCategoryOption=function(e){if(e.id)return Object(o.jsx)(pr.a.Option,Kd({value:e.id},{children:e.name}),e.id)},t.prototype.renderCourseRequisiteType=function(e){if(e.id)return Object(o.jsx)(pr.a.Option,Kd({value:e.id},{children:e.name}),e.id)},t.prototype.renderCourseRequisiteTypes=function(){var e=this;return this.state.courseRequisiteTypes.map((function(t){return e.renderCourseRequisiteType(t)}))},t}(a.Component),Jd=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),$d=function(){return $d=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},$d.apply(this,arguments)},Zd=function(e){function t(t){var n=e.call(this,t)||this;return n.render=function(){var e;return Object(o.jsx)(Ci.a,$d({layout:"vertical"},{children:Object(o.jsxs)(y.b,$d({size:"large",direction:"vertical"},{children:[Object(o.jsx)(Qn.a,$d({type:"inner",title:"Course Selection"},{children:Object(o.jsx)(Md,{readonly:!0,loading:n.props.loading,institutionId:null!==(e=n.props.changeRequest.institutionId)&&void 0!==e?e:re.default.Empty(),changeRequestId:n.props.changeRequest.id,changeRequestDetailsPage:n.props.changeRequestDetailsPage},void 0)}),void 0),Object(o.jsx)(Qn.a,$d({type:"inner",title:"Course Information"},{children:Object(o.jsx)(Xd,{readonly:!0,loading:n.props.loading,changeRequestId:n.props.changeRequest.id,changeRequestDetailsPage:n.props.changeRequestDetailsPage},void 0)}),void 0),Object(o.jsx)(Qn.a,$d({type:"inner",size:"small",title:"Additional Details"},{children:Object(o.jsx)(gs,{readonly:!0,changeRequest:n.props.changeRequest,loading:n.props.loading,fieldErrors:n.props.fieldErrors,submitted:!0},void 0)}),void 0)]}),void 0)}),void 0)},n}return Jd(t,e),t}(a.Component),ec=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),tc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ec(t,e),t.prototype.save=function(e){var t="api/newCourseChangeRequests/saveStep1";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.submitStep1=function(e){var t="api/newCourseChangeRequests/submitStep1";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.get=function(e){var t="api/newCourseChangeRequests/get";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.existingNewCourseSearch=function(e){var t="api/newCourseChangeRequests/existingNewCourse";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t}(U),nc=new tc,rc=function(e){return Object.assign({disciplineId:null,catalogNumber:""},e)},ic=function(e){return Object.assign({disciplineId:null,catalogNumber:"",institutionId:"00000000-0000-0000-0000-000000000000"},e)},oc=function(e){return Object.assign({changeRequestId:"00000000-0000-0000-0000-000000000000"},e)},ac=function(e){return Object.assign({institutionId:"00000000-0000-0000-0000-000000000000",newCourseChangeRequest:null},e)},sc=function(e){return Object.assign({disciplineId:null,catalogNumber:""},e)},dc=function(e){return Object.assign({institutionId:"00000000-0000-0000-0000-000000000000",newCourseChangeRequest:null},e)},cc={className:"NewCourseChangeRequestCreditDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",newCourseChangeRequestId:"00000000-0000-0000-0000-000000000000",creditTypeId:"00000000-0000-0000-0000-000000000000",minHours:null,maxHours:null,displayOrder:0,creditType:null},e)},id:"id",newCourseChangeRequestId:"newCourseChangeRequestId",creditTypeId:"creditTypeId",minHours:"minHours",maxHours:"maxHours",displayOrder:"displayOrder",creditType:"creditType"},lc={className:"NewCourseChangeRequestDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",changeRequestId:"00000000-0000-0000-0000-000000000000",catalogNumber:"",disciplineId:null,discipline:null,title:"",description:"",objectives:"",variableHours:null,categoryId:null,category:null,install:null,installTermId:null,installYear:null,installTerm:null,existingCourse:!1,minCredits:0,maxCredits:0,newCourseRequestCredits:[],newCourseChangeRequestCourseRequisites:[]},e)},id:"id",changeRequestId:"changeRequestId",catalogNumber:"catalogNumber",disciplineId:"disciplineId",discipline:"discipline",title:"title",description:"description",objectives:"objectives",variableHours:"variableHours",categoryId:"categoryId",category:"category",install:"install",installTermId:"installTermId",installYear:"installYear",installTerm:"installTerm",existingCourse:"existingCourse",minCredits:"minCredits",maxCredits:"maxCredits",newCourseRequestCredits:"newCourseRequestCredits",newCourseChangeRequestCourseRequisites:"newCourseChangeRequestCourseRequisites"},uc={className:"NewCourseChangeRequestCourseRequisiteDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",newCourseChangeRequestId:"00000000-0000-0000-0000-000000000000",requisiteCourseId:"00000000-0000-0000-0000-000000000000",requisiteCourse:null,courseRequisiteTypeId:0,courseRequisiteType:null},e)},id:"id",newCourseChangeRequestId:"newCourseChangeRequestId",requisiteCourseId:"requisiteCourseId",requisiteCourse:"requisiteCourse",courseRequisiteTypeId:"courseRequisiteTypeId",courseRequisiteType:"courseRequisiteType"},pc=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),fc=function(){return fc=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},fc.apply(this,arguments)},hc=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._courseRequisiteFormRef=a.createRef(),n._courseSearch=a.createRef(),n.disciplineIdentifier="discipline",n.categoryIdentifier="category",n._formItems=(new Map).set(uc.courseRequisiteTypeId,{required:!0,name:uc.c
1ourseRequisiteTypeId,label:"Course Requisite Type",requiredMark:!0,rules:[Ot.required()]}),n.getFormItems=function(){return(new Map).set(lc.title,{required:!0,name:lc.title,label:"Please provide the course title.",rules:[Ot.required(),Ot.maxLength(150)]}).set(lc.description,{required:!0,name:lc.description,label:"Please provide a description for this course.",rules:[Ot.required(),Ot.maxLength(5e3)]}).set(lc.objectives,{required:!0,name:lc.objectives,label:"Please list learning outcomes/objectives for this course.",rules:[Ot.maxLength(5e3),Ot.required()]}).set(lc.catalogNumber,{required:!0,name:lc.catalogNumber,label:"What catalog number will this course use?",rules:[Ot.required(),Ot.onlyNumericCharacters(),Ot.maxLength(3)]}).set(lc.categoryId,{required:!0,name:lc.categoryId,label:"Please select a category for this course.",rules:[Ot.required()]}).set(lc.disciplineId,{required:!0,name:lc.disciplineId,label:"Please select the discipline for this course.",rules:[Ot.required()]}).set(lc.install,{required:!0,name:lc.install,label:"When will this course first be available?",rules:[Ot.required()]}).set(lc.variableHours,{required:!0,name:lc.variableHours,label:"Will this course offer variable credits?",rules:[Ot.required()]})},n.getCreditTypeFormItems=function(e){return(new Map).set(cc.creditTypeId,{name:[e,cc.creditTypeId]}).set(cc.minHours,{name:[e,cc.minHours]}).set(cc.maxHours,{name:[e,cc.maxHours]})},n.getCreditColumns=function(){var e,t=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldValue(lc.variableHours),r=[{title:"Credit Type",sorter:!1,dataIndex:cc.creditTypeId,render:function(e,t,r){var i,a=null===(i=n._formRef.current)||void 0===i?void 0:i.getFieldValue(lc.newCourseRequestCredits)[r].creditTypeId;if(a){var s=n.state.creditTypes.filter((function(e){return e.id==a}))[0];if(s)return Object(o.jsx)(ud,{text:s.name},void 0)}}},{title:t?"Min Credits":"Credits",dataIndex:cc.minHours,render:function(e,r,i){var a=t?"Min Credits":"Credits";return Object(o.jsx)(mt.a,fc({},n.getCreditTypeFormItems(i).get(cc.minHours),_t.getValidation(cc.minHours+i,n.state.fieldErrors,n.state.submitted||n.props.readonly),{children:Object(o.jsx)(Ni.a,{title:a,disabled:n.props.readonly,min:0},void 0)}),void 0)}}];return t&&r.push({title:"Max Credits",dataIndex:cc.maxHours,render:function(e,t,r){return Object(o.jsx)(mt.a,fc({},n.getCreditTypeFormItems(r).get(cc.maxHours),_t.getValidation(cc.maxHours+r,n.state.fieldErrors,n.state.submitted||n.props.readonly),{children:Object(o.jsx)(Ni.a,{title:"Max Credits",disabled:n.props.readonly,min:0},void 0)}),void 0)}}),r},n.getNewCourseCourseRequisiteColumns=function(){return[{title:"Name",sorter:!1,dataIndex:uc.requisiteCourseId,render:function(e,t,r){var i,o,a,s,d,c=null===(i=n._formRef.current)||void 0===i?void 0:i.getFieldValue(lc.newCourseChangeRequestCourseRequisites)[r];return null!==(s=null===(a=null===(o=null===c||void 0===c?void 0:c.requisiteCourse)||void 0===o?void 0:o.currentDetail)||void 0===a?void 0:a.display)&&void 0!==s?s:null===(d=null===c||void 0===c?void 0:c.requisiteCourse)||void 0===d?void 0:d.display}},{title:"Type",dataIndex:uc.courseRequisiteTypeId,render:function(e,t,r){var i,o,a=null===(i=n._formRef.current)||void 0===i?void 0:i.getFieldValue(lc.newCourseChangeRequestCourseRequisites)[r];return null===(o=n.state.courseRequisiteTypes.find((function(e){return e.id==(null===a||void 0===a?void 0:a.courseRequisiteTypeId)})))||void 0===o?void 0:o.name}},{title:"Actions",dataIndex:"actions",render:function(e,t,r){var i,a=null===(i=n._formRef.current)||void 0===i?void 0:i.getFieldValue(lc.newCourseChangeRequestCourseRequisites)[r];return Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(rt.a,fc({type:"link",onClick:function(){return n.editCourseRequisite(a)}},{children:Object(o.jsx)(Gr.a,{},void 0)}),void 0),Object(o.jsx)(rt.a,fc({type:"link",onClick:function(){return n.removeCourseRequisite(a)}},{children:Object(o.jsx)(Yd.a,{},void 0)}),void 0)]},void 0)}}]},n.resetForm=function(){var e;n.setState({altered:!1}),null===(e=n._formRef.current)||void 0===e||e.resetFields(),n.forceUpdate()},n.fetchData=function(){n.setState({loading:!0});var e=[];n.state.disciplines&&0!=n.state.disciplines.length||e.push(n.loadDisciplines()),n.state.courseRequisiteTypes&&0!=n.state.courseRequisiteTypes.length||e.push(n.loadCourseRequisiteType()),n.state.categories&&0!=n.state.categories.length||e.push(n.loadCategories()),n.state.creditTypes&&0!=n.state.creditTypes.length||e.push(n.loadCreditTypes()),n.props.changeRequestId!=re.default.Empty()&&e.push(n.loadChangeRequest()),Promise.all(e).then((function(){n.setState({loading:!1}),n.resetForm()}))},n.loadCategories=function(){return ce.getAll(di.className).then((function(e){e&&n.setState({categories:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}
1))},n.loadCreditTypes=function(){return ce.getAll(Vd.className).then((function(e){e&&n.setState({creditTypes:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadDisciplines=function(){return ce.getAll(nd.className).then((function(e){e&&(e=e.sort((function(e,t){var n,r;return(null!==(n=null===e||void 0===e?void 0:e.code)&&void 0!==n?n:"")>(null!==(r=null===t||void 0===t?void 0:t.code)&&void 0!==r?r:"")?1:-1})),n.setState({disciplines:null!==e&&void 0!==e?e:[]}))})).catch((function(){n.setState({error:!0})}))},n.loadCourseRequisiteType=function(){return ce.getAll(td.className).then((function(e){e&&(e=e.sort((function(e,t){var n,r;return(null!==(n=e.displayOrder)&&void 0!==n?n:"")>(null!==(r=null===t||void 0===t?void 0:t.displayOrder)&&void 0!==r?r:"")?1:-1})),n.setState({courseRequisiteTypes:null!==e&&void 0!==e?e:[]}))})).catch((function(){n.setState({error:!0})}))},n.loadChangeRequest=function(){var e=oc({changeRequestId:n.props.changeRequestId});return nc.get(e).then((function(e){var t,r,i,o,a,s,d,c,l,u,p,f;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create(),newCourseChangeRequest:null!==(i=null===(r=e.changeRequest)||void 0===r?void 0:r.newCourseChangeRequest)&&void 0!==i?i:lc.create(),existingCourse:null!==(s=null===(a=null===(o=e.changeRequest)||void 0===o?void 0:o.newCourseChangeRequest)||void 0===a?void 0:a.existingCourse)&&void 0!==s&&s,minCredits:null!==(l=null===(c=null===(d=e.changeRequest)||void 0===d?void 0:d.newCourseChangeRequest)||void 0===c?void 0:c.minCredits)&&void 0!==l?l:0,maxCredits:null!==(f=null===(p=null===(u=e.changeRequest)||void 0===u?void 0:u.newCourseChangeRequest)||void 0===p?void 0:p.maxCredits)&&void 0!==f?f:Number.MAX_SAFE_INTEGER,fieldErrors:n.props.changeRequestDetailsPage?null:e.fieldErrors})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.checkInstitutionCourse=function(){var e,t;n.setState({checking:!0});var r=lc.create(null!==(t=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldsValue())&&void 0!==t?t:null),i=ic({disciplineId:r.disciplineId,catalogNumber:r.catalogNumber,institutionId:n.props.selectedInstitution});Qs.existingInstitutionCourseSearch(i).then((function(e){null!=e.course?n.setState({institutionExistingCourse:!0,showInstitutionCourseModal:!0}):(n.setState({institutionExistingCourse:!1,showInstitutionCourseModal:!1}),n.checkExisting())}))},n.checkExisting=function(){var e,t;n.setState({checking:!0});var r=lc.create(null!==(t=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldsValue())&&void 0!==t?t:null),i=rc({disciplineId:r.disciplineId,catalogNumber:r.catalogNumber});Qs.existingCourseSearch(i).then((function(e){var t;e.course&&e.currentCourseDetails?(n.setState({existingCourse:!0,minCredits:e.currentCourseDetails.minCredits,maxCredits:e.currentCourseDetails.maxCredits}),null===(t=n._formRef.current)||void 0===t||t.setFieldsValue({title:e.currentCourseDetails.title,variableHours:e.currentCourseDetails.variableCredits}),Rd.a.info({title:"Existing Course",content:"There is already an existing course in the state for this discipline and catalog number. You must adopt to this course at your institution in order to be approved."})):n.setState({existingCourse:!1,minCredits:void 0,maxCredits:void 0})})).finally((function(){n.setState({checking:!1})}))},n.checkExistingNewCourseChangeRequest=function(){var e,t;n.setState({checking:!0});var r=lc.create(null!==(t=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldsValue())&&void 0!==t?t:null),i=sc({disciplineId:r.disciplineId,catalogNumber:r.catalogNumber});nc.existingNewCourseSearch(i).then((function(e){e.newCourseChangeRequest&&e.newCourseChangeRequest.length>0?(n.setState({showNewCourseChangeRequest:!0,existingNewCourseChangeRequest:!0}),Rd.a.info({title:"Course Reserved",content:"This discipline and catalog number combination is already reserved in a pending new course request. Please contact the state to learn more."})):(n.setState({showNewCourseChangeRequest:!1,existingNewCourseChangeRequest:!1}),n.checkInstitutionCourse())})).finally((function(){n.setState({checking:!1})}
1))},n.goToCourseModification=function(){var e,t,r=lc.create(null!==(t=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldsValue())&&void 0!==t?t:null),i=r.catalogNumber,o=r.disciplineId;T.push(x.generate(x.COURSE_MODIFICATION_CHANGE_REQUEST_ENTRY,{},{disciplineId:o,catalogNumber:i}))},n.handleChange=function(){n.setState({altered:!0})},n.handleSubmit=function(){var e,t,r;n.setState({submitting:!0});var i=lc.create(null!==(t=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldsValue())&&void 0!==t?t:null);i.changeRequestId=null!==(r=n.props.changeRequestId)&&void 0!==r?r:re.default.Empty();var o=dc({institutionId:n.props.selectedInstitution,newCourseChangeRequest:i});nc.submitStep1(o).then((function(e){var t,r,i,o,a,s,d,c,l,u,p,f,h;n.setState({submitted:!0}),(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:null,newCourseChangeRequest:null!==(i=null===(r=e.changeRequest)||void 0===r?void 0:r.newCourseChangeRequest)&&void 0!==i?i:n.state.newCourseChangeRequest,existingCourse:null!==(s=null===(a=null===(o=e.changeRequest)||void 0===o?void 0:o.newCourseChangeRequest)||void 0===a?void 0:a.existingCourse)&&void 0!==s&&s,minCredits:null!==(l=null===(c=null===(d=e.changeRequest)||void 0===d?void 0:d.newCourseChangeRequest)||void 0===c?void 0:c.minCredits)&&void 0!==l?l:0,maxCredits:null!==(f=null===(p=null===(u=e.changeRequest)||void 0===u?void 0:u.newCourseChangeRequest)||void 0===p?void 0:p.maxCredits)&&void 0!==f?f:Number.MAX_SAFE_INTEGER}),n.resetForm(),n.props.onSubmit&&(null===(h=e.changeRequest)||void 0===h?void 0:h.id)&&n.props.onSubmit(e.changeRequest.id)):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Submit Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Submit Failed")})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.handleSave=function(){var e,t,r;n.setState({saving:!0});var i=lc.create(null!==(t=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldsValue())&&void 0!==t?t:null);i.changeRequestId=null!==(r=n.props.changeRequestId)&&void 0!==r?r:re.default.Empty();var o=ac({institutionId:n.props.selectedInstitution,newCourseChangeRequest:i});nc.save(o).then((function(e){var t,r,i,o;(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:null,newCourseChangeRequest:null!==(i=null===(r=e.changeRequest)||void 0===r?void 0:r.newCourseChangeRequest)&&void 0!==i?i:n.state.newCourseChangeRequest}),n.props.onSave&&(null===(o=e.changeRequest)||void 0===o?void 0:o.id)&&n.props.onSave(e.changeRequest.id)):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Save Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Save Failed")})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.hideInstitutionCourseModal=function(){n.setState({showInstitutionCourseModal:!1})},n.handleAddCourseRequisite=function(){var e,t,r,i,o,a,s=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldsValue(),d=null===(t=n._courseSearch.current)||void 0===t?void 0:t.getValue();null===(i=null===(r=n._courseSearch.current)||void 0===r?void 0:r.getForm().current)||void 0===i||i.validateFields();var c=s.newCourseChangeRequestCourseRequisites,l=[];return l.push(null===(a=null===(o=n._courseSearch.current)||void 0===o?void 0:o.getForm().current)||void 0===a?void 0:a.validateFields()),Promise.all(l).then((function(){var e;c||(c=[]),c.push({requisiteCourse:null===d||void 0===d?void 0:d.course,requisiteCourseId:null===d||void 0===d?void 0:d.courseId,courseRequisiteTypeId:null===d||void 0===d?void 0:d.courseRequisiteTypeId}),null===(e=n._formRef.current)||void 0===e||e.setFieldsValue({newCourseChangeRequestCourseRequisites:c})}))},n.handleRemoveCourseRequisite=function(e){var t,r,i=null===(t=n._formRef.current)||void 0===t?void 0:t.getFieldValue(lc.newCourseChangeRequestCourseRequisites),o=i.find((function(t){return t.requisiteCourseId==e.requisiteCourseId}));i.remove(o),null===(r=n._formRef.current)||void 0===r||r.setFieldsValue({newCourseChangeRequestCourseRequisites:i})},n.handleEditCourseRequisite=function(e){var t,r,i,o=null===(t=n._formRef.current)||void 0===t?void 0:t.getFieldValue(lc.newCourseChangeRequestCourseRequisites),a=null===(r=n._courseRequisiteFormRef.current)||void 0===r?void 0:r.getFieldValue(uc.courseRequisiteTypeId);o.find((function(t){return t.requisiteCourseId==e.requisiteCourseId})).courseRequisiteTypeId=a,null===(i=n._formRef.current)||void 0===i||i.setFieldsValue({newCourseChangeRequestCourseRequisites:o})},n.addCourseRequisite=function(){var e,t,r;f.a.confirm({title:"Select Course",content:Object(o.jsx)(gd,{isCourseRequisite:!0,ref:n._c
1ourseSearch,institutionId:null!==(r=null!==(t=null===(e=n.state.changeRequest)||void 0===e?void 0:e.institutionId)&&void 0!==t?t:n.props.selectedInstitution)&&void 0!==r?r:re.default.Empty()},void 0),onOk:function(){return n.handleAddCourseRequisite()},width:1e3})},n.removeCourseRequisite=function(e){f.a.confirm({title:"Remove Course Requisite",onOk:function(){return n.handleRemoveCourseRequisite(e)},okType:"danger",okText:"Remove",width:300})},n.state={changeRequest:null,existingCourse:!1,institutionExistingCourse:!1,showInstitutionCourseModal:!1,disciplines:[],categories:[],creditTypes:[],showNewCourseChangeRequest:!1,existingNewCourseChangeRequest:!1,courseRequisites:[],courseRequisiteTypes:[]},n}return pc(t,e),t.prototype.componentDidMount=function(){var e=this;this.props.changeRequestId&&this.setState({fieldErrors:this.props.fieldErrors},(function(){return e.resetForm()})),this.fetchData()},t.prototype.componentDidUpdate=function(e){var t,n,r,i,o=this;if((this.props.changeRequestId&&this.props.changeRequestId!=e.changeRequestId&&(this.setState({fieldErrors:this.props.fieldErrors},(function(){return o.resetForm()})),this.fetchData()),(null===(t=this.state.creditTypes)||void 0===t?void 0:t.length)>0)&&0===(null!==(i=null===(r=null===(n=this.state.newCourseChangeRequest)||void 0===n?void 0:n.newCourseRequestCredits)||void 0===r?void 0:r.length)&&void 0!==i?i:0)){var a=this.state.creditTypes.map((function(e){return cc.create({creditType:e,creditTypeId:e.id,minHours:null,maxHours:null,displayOrder:e.displayOrder})})).sort((function(e,t){return e.displayOrder-t.displayOrder}));this.setState({newCourseChangeRequest:lc.create({disciplineId:null,categoryId:null,installTermId:null,variableHours:null,newCourseRequestCredits:a})}),this.resetForm()}this.props.loading!=e.loading&&this.setState({loading:this.props.loading})},t.prototype.editCourseRequisite=function(e){var t=this;f.a.confirm({title:"Edit Course Requisite",onOk:function(){return t.handleEditCourseRequisite(e)},content:Object(o.jsx)(ht.a,fc({ref:this._courseRequisiteFormRef,layout:"vertical",initialValues:e,onFinish:function(){return t.handleEditCourseRequisite(e)},requiredMark:!0},{children:Object(o.jsx)(mt.a,fc({},this._formItems.get(uc.courseRequisiteTypeId),{children:Object(o.jsx)(hd,fc({dropdownMatchSelectWidth:!1,allowClear:!0,showSearch:!0,optionFilterProp:"children"},{children:this.renderCourseRequisiteTypes()}),void 0)}),void 0)}),void 0),okText:"Edit",okType:"primary",width:500})},t.prototype.render=function(){var e=this;if(this.state.loading||!this.state.newCourseChangeRequest)return Object(o.jsx)(pt.a,{active:!0},void 0);var t=this.getFormItems();return Object(o.jsxs)(y.b,fc({size:"small",direction:"vertical"},{children:[this.renderInstitutionCourseExists(),this.renderInstitutionCourseExistsModal(),this.renderNewCourseChangeRequestExistsModal(),this.renderNewCourseChangeRequestExists(),Object(o.jsx)(ht.a,fc({ref:this._formRef,layout:"vertical",initialValues:this.state.newCourseChangeRequest,onValuesChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!0},{children:Object(o.jsxs)(y.b,fc({size:"small",direction:"vertical"},{children:[Object(o.jsx)(mt.a,fc({},t.get(lc.disciplineId),_t.getValidation(lc.disciplineId,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(hd,fc({disabled:this.props.readonly,onChange:this.checkExistingNewCourseChangeRequest,showSearch:!0,optionFilterProp:"children"},{children:this.state.disciplines.map((function(t){return e.renderDisciplineOption(t)}))}),void 0)}),lc.disciplineId),Object(o.jsx)(mt.a,fc({},t.get(lc.catalogNumber),_t.getValidation(lc.catalogNumber,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ut.a,{disabled:this.props.readonly,onChange:this.checkExistingNewCourseChangeRequest},void 0)}),lc.catalogNumber),Object(o.jsx)(mt.a,fc({},t.get(lc.title),_t.getValidation(lc.title,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ut.a,{disabled:this.props.readonly||this.state.existingCourse},void 0)}),lc.title),Object(o.jsx)(mt.a,fc({},t.get(lc.categoryId),_t.getValidation(lc.categoryId,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(hd,fc({disabled:this.props.readonly},{children:this.state.categories.map((function(t){return e.renderCategoryOption(t)}))}),void 0)}),lc.categoryId),Object(o.jsx)(mt.a,fc({},t.get(lc.description),_t.getValidation(lc.description,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ut.a.TextArea,{maxLength:5e3,autoSize:{minRows:5},showCount:!0,disabled:this.props.readonly},void 0)}),lc.description),Object(o.jsx)(mt.a,fc({},t.get(lc.objectives),_t.getValidation(lc.objectives,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ut.a.TextArea,{maxLength:5e3,autoSize:{minRows:5},showCount:!0,disabled:this.props.readonly},void 0)}),lc.objectives),Object(o.jsx)(mt.a,fc({},t.get(lc.install),_t.getValidation(lc.install,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(Od,{futureYears:!0,disabled:this.props.readonly},void 0)}),lc.install),Object(o.jsx)(mt.a,fc({},t.get(lc.variableHours),_t.getValidation(lc.variableHours,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(H
1d,{disabled:this.props.readonly||this.state.existingCourse},void 0)}),lc.variableHours),Object(o.jsx)(ot.a.Paragraph,fc({italic:!0},{children:"Please provide credits for at least one credit type in the table below."}),void 0),Object(o.jsx)(ht.a.List,fc({name:lc.newCourseRequestCredits},{children:function(t){return Object(o.jsx)(ht.a.Item,fc({},_t.getValidation(lc.newCourseRequestCredits,e.state.fieldErrors,e.state.submitted||e.props.readonly),{children:Object(o.jsx)(Pi.a,{dataSource:t,summary:function(){var t,n,r,i,a=null===(t=e._formRef.current)||void 0===t?void 0:t.getFieldValue(lc.variableHours),s=null===(n=e._formRef.current)||void 0===n?void 0:n.getFieldValue(lc.newCourseRequestCredits),d=null!==(r=null===s||void 0===s?void 0:s.map((function(e){var t;return null!==(t=e.minHours)&&void 0!==t?t:0})).reduce((function(e,t){return e+t})))&&void 0!==r?r:0,c=null!==(i=null===s||void 0===s?void 0:s.map((function(e){var t;return null!==(t=e.maxHours)&&void 0!==t?t:0})).reduce((function(e,t){return e+t})))&&void 0!==i?i:0,l=d,u=c;return e.state.existingCourse&&!a&&(l=l+" ("+e.state.minCredits+" Required)"),Object(o.jsxs)(Pi.a.Summary.Row,{children:[Object(o.jsx)(Pi.a.Summary.Cell,{index:0},void 0),Object(o.jsx)(Pi.a.Summary.Cell,fc({index:1},{children:Object(o.jsx)(ot.a.Text,fc({strong:!0,type:"danger"},{children:l}),void 0)}),void 0),a?Object(o.jsx)(Pi.a.Summary.Cell,fc({index:1},{children:Object(o.jsx)(ot.a.Text,fc({strong:!0,type:"danger"},{children:u}),void 0)}),void 0):null]},void 0)},columns:e.getCreditColumns(),pagination:!1},void 0)}),void 0)}}),void 0),Object(o.jsx)(ot.a.Title,fc({level:5},{children:"Prerequisites/Co-Requisites"}),void 0),Object(o.jsxs)(y.b,fc({direction:"vertical"},{children:[this.props.readonly?null:Object(o.jsx)(rt.a,fc({onClick:this.addCourseRequisite},{children:"Add Course"}),void 0),Object(o.jsx)(ht.a.List,fc({name:lc.newCourseChangeRequestCourseRequisites},{children:function(t){return Object(o.jsx)(Pi.a,{dataSource:t,columns:e.getNewCourseCourseRequisiteColumns(),pagination:!1},void 0)}}),void 0)]}),void 0),this.renderActions()]}),void 0)}),void 0)]}),void 0)},t.prototype.renderInstitutionCourseExistsModal=function(){if(this.state.showInstitutionCourseModal)return Object(o.jsxs)(f.a,fc({title:"Existing Course",visible:this.state.showInstitutionCourseModal,footer:null,onCancel:this.hideInstitutionCourseModal},{children:[Object(o.jsx)(ot.a.Paragraph,{children:"This course already exists at your institution. Please complete a Course Modification to apply any changes."},void 0),Object(o.jsx)(rt.a,fc({icon:Object(o.jsx)(is.a,{},void 0),onClick:this.goToCourseModification},{children:"Create Course Modification Change Request"}),void 0)]}),void 0)},t.prototype.renderInstitutionCourseExists=function(){if(this.state.institutionExistingCourse)return Object(o.jsx)(ct.a,{type:"error",showIcon:!0,message:"Existing Course",description:Object(o.jsxs)("div",{children:[Object(o.jsx)(ot.a.Paragraph,{children:"This course already exists at your institution. Please complete a Course Modification to apply any changes."},void 0),Object(o.jsx)(rt.a,fc({icon:Object(o.jsx)(is.a,{},void 0),onClick:this.goToCourseModification},{children:"Create Course Modification Change Request"}),void 0)]},void 0)},void 0)},t.prototype.renderNewCourseChangeRequestExistsModal=function(){if(this.state.showNewCourseChangeRequest)return Object(o.jsx)(f.a,fc({title:"Course Reserved",visible:this.state.showInstitutionCourseModal,footer:null,onCancel:this.hideInstitutionCourseModal},{children:Object(o.jsx)(ot.a.Paragraph,{children:"This discipline and catalog number combination is already reserved in a pending new course request. Please contact the state to learn more."},void 0)}),void 0)},t.prototype.renderNewCourseChangeRequestExists=function(){if(this.state.existingNewCourseChangeRequest)return Object(o.jsx)(ct.a,{type:"error",showIcon:!0,message:"Course Reserved",description:Object(o.jsx)("div",{children:Object(o.jsx)(ot.a.Paragraph,{children:"This discipline and catalog number combination is already reserved in a pending new course request. Please contact the state to learn more."},void 0)},void 0)},void 0)},t.prototype.renderActions=function(){if(!this.props.readonly)return Object(o.jsxs)(y.b,fc({direction:"horizontal",wrap:!0},{children:[Object(o.jsx)(ss,{disabled:this.state.institutionExistingCourse||this.state.existingNewCourseChangeRequest,submitting:this.state.submitting},void 0),Object(o.jsx)(Tr,{disabled:this.state.institutionExistingCourse||this.state.existingNewCourseChangeRequest,type:"default",htmlType:"button",onClick:this.handleSave,saving:this.state.submitting,saved:this.state.saved},void 0),Object(o.jsx)(Ir,{resetting:this.state.resetting,onConfirm:this.resetForm},void 0)]}),void 0)},t.prototype.renderCategoryOption=function(e){if(e.id)return Object(o.jsxs)(pr.a.Option,fc({value:e.id},{children:[e.code," - ",e.name]}),e.id)},t.prototype.renderDisciplineOption=function(e){if(e.id)return Object(o.jsxs)(pr.a.Option,fc({value:e.id},{children:[e.code," - ",e.name]}),e.id)},t.prototype.renderCourseRequisiteType=function(e){if(e.id)return Object(o.jsx)(pr.a.Option,fc({value:e.id},{children:e.name}),e.id)},t.prototype.renderCourseRequisiteTypes=function(){var e=this;return this.state.courseRequisiteTypes.map((function(t){return e.renderCourseRequisiteType(t)}))},t}(a.Component),vc=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),mc=function(){return mc=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},mc.apply(this,arguments)},gc=function(e){function t(t){var n=e.call(this,t)||this;return n.render=function(){return n.props.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(y.b,mc({direction:"vertical"},{children:[Object(o.jsx)(Qn.a,mc({type:"inner",size:"small",title:"Course Details"},{children:Object(o.jsx)(hc,{readonly:!0,selectedInstitution:n.props.changeRequest.institutionId,loading:n.props.loading,changeRequestId:n.props.changeRequest.i
1d,changeRequestDetailsPage:n.props.changeRequestDetailsPage},void 0)}),void 0),Object(o.jsx)(Qn.a,mc({type:"inner",size:"small",title:"Additional Details"},{children:Object(o.jsx)(gs,{readonly:!0,changeRequest:n.props.changeRequest,loading:n.props.loading},void 0)}),void 0)]}),void 0)},n.state={},n}return vc(t,e),t}(a.Component),bc=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),yc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return bc(t,e),t.prototype.save=function(e){var t="api/NewDisciplineChangeRequests/save";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.submit=function(e){var t="api/NewDisciplineChangeRequests/submit";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.get=function(e){var t="api/NewDisciplineChangeRequests/get";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t}(U),Oc=new yc,jc=function(e){return Object.assign({changeRequestId:null,institutionId:"00000000-0000-0000-0000-000000000000",newDisciplineChangeRequest:null},e)},Ic=function(e){return Object.assign({changeRequestId:null,institutionId:"00000000-0000-0000-0000-000000000000",newDisciplineChangeRequest:null},e)},Sc=function(e){return Object.assign({changeRequestId:"00000000-0000-0000-0000-000000000000"},e)},Ec={className:"NewDisciplineChangeRequestDTO",create:function(e){return Object.assign(Q.create(),{id:null,changeRequestId:null,code:"",name:"",rationale:"",additionalRationale:"",install:null,installTermId:null,installYear:null,installTerm:null},e)},id:"id",changeRequestId:"changeRequestId",code:"code",name:"name",rationale:"rationale",additionalRationale:"additionalRationale",install:"install",installTermId:"installTermId",installYear:"installYear",installTerm:"installTerm"},Rc=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),_c=function(){return _c=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},_c.apply(this,arguments)},Tc=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._formItems=(new Map).set(Ec.code,{required:!0,name:Ec.code,label:"What is the prefix you are requesting?",rules:[Ot.required(),Ot.maxLength(3),Ot.onlyAlphaCharacters()]}).set(Ec.name,{required:!0,name:Ec.name,label:"Please provide a descriptive name for this prefix.",rules:[Ot.required(),Ot.maxLength(150)]}).set(Ec.rationale,{required:!0,name:Ec.rationale,label:"Please provide a rationale for this new discipline. Include any course catalog numbers you plan to use.",rules:[Ot.required(),Ot.maxLength(5e3)]}).set(Ec.additionalRationale,{required:!0,name:Ec.additionalRationale,label:"Why do no other disciplines meet the requirements?",rules:[Ot.required(),Ot.maxLength(5e3)]}).set(Ec.install,{required:!0,name:Ec.install,label:"What term will this discipline first be offered?",rules:[Ot.required()]}),n.loadChangeRequest=function(){var e=Sc({changeRequestId:n.props.changeRequestId});return Oc.get(e).then((function(e){var t,r,i;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create(),fieldErrors:n.props.changeRequestDetailsPage?null:e.fieldErrors,newDisciplineChangeRequest:null!==(i=null===(r=e.changeRequest)||void 0===r?void 0:r.newDisciplineChangeRequest)&&void 0!==i?i:Ec.create()},(function(){return n.resetForm()}))})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.resetForm=function(){var e;n.setState({altered:!1}),null===(e=n._formRef.current)||void 0===e||e.resetFields()},n.handleSubmit=function(){var e,t,r;n.setState({submitting:!0});var i=Ic({changeRequestId:null!==(e=n.props.changeRequestId)&&void 0!==e?e:re.default.Empty(),institutionId:n.props.selectedInstitution,newDisciplineChangeRequest:Ec.create(null===(r=null===(t=n._formRef)||void 0===t?void 0:t.current)||void 0===r?void 0:r.getFieldsValue())});Oc.submit(i).then((function(e){var t,r;n.setState({submitted:!0}),(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()}
1),(null===(r=e.changeRequest)||void 0===r?void 0:r.id)&&(n.props.onSave&&(n.props.onSave(e.changeRequest.id),n.resetForm()),n.props.onSubmit&&n.props.onSubmit(e.changeRequest.id))):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Save Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Save Failed")})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.handleSave=function(){var e;n.setState({saving:!0});var t=Ec.create(n._formRef?n._formRef.current.getFieldsValue():null);t.installTermId=""==t.installTerm?null:t.installTerm;var r=jc({changeRequestId:null!==(e=n.props.changeRequestId)&&void 0!==e?e:null,institutionId:n.props.selectedInstitution,newDisciplineChangeRequest:t});Oc.save(r).then((function(e){var t,r,i,o;(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create(),newDisciplineChangeRequest:null!==(i=null===(r=e.changeRequest)||void 0===r?void 0:r.newDisciplineChangeRequest)&&void 0!==i?i:Ec.create()}),n.resetForm(),n.props.onSave&&(null===(o=e.changeRequest)||void 0===o?void 0:o.id)&&n.props.onSave(e.changeRequest.id)):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Save Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Save Failed")})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.handleChange=function(){n.setState({altered:!0})},n.render=function(){return n.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsx)(y.b,_c({size:"small",direction:"vertical"},{children:Object(o.jsxs)(ht.a,_c({ref:n._formRef,layout:"vertical",initialValues:n.state.newDisciplineChangeRequest,onValuesChange:n.handleChange,onFinish:n.handleSubmit,requiredMark:!0},{children:[Object(o.jsx)(mt.a,_c({},n._formItems.get(Ec.code),_t.getValidation(Ec.code,n.state.fieldErrors,n.state.submitted||n.props.readonly),{children:Object(o.jsx)(ut.a,{disabled:n.props.readonly},void 0)}),Ec.code),Object(o.jsx)(mt.a,_c({},n._formItems.get(Ec.name),_t.getValidation(Ec.name,n.state.fieldErrors,n.state.submitted||n.props.readonly),{children:Object(o.jsx)(ut.a,{disabled:n.props.readonly},void 0)}),Ec.name),Object(o.jsx)(mt.a,_c({},n._formItems.get(Ec.rationale),_t.getValidation(Ec.rationale,n.state.fieldErrors,n.state.submitted||n.props.readonly),{children:Object(o.jsx)(ut.a.TextArea,{maxLength:5e3,showCount:!0,autoSize:{minRows:5},disabled:n.props.readonly},void 0)}),Ec.rationale),Object(o.jsx)(mt.a,_c({},n._formItems.get(Ec.additionalRationale),_t.getValidation(Ec.additionalRationale,n.state.fieldErrors,n.state.submitted||n.props.readonly),{children:Object(o.jsx)(ut.a.TextArea,{maxLength:5e3,showCount:!0,autoSize:{minRows:5},disabled:n.props.readonly},void 0)}),Ec.additionalRationale),Object(o.jsx)(mt.a,_c({},n._formItems.get(Ec.install),_t.getValidation(Ec.install,n.state.fieldErrors,n.state.submitted||n.props.readonly),{children:Object(o.jsx)(Od,{futureYears:!0,disabled:n.props.readonly},void 0)}),Ec.install),n.renderActions()]}),void 0)}),void 0)},n.state={newDisciplineChangeRequest:Ec.create({installTermId:""}),changeRequest:$a.create()},n}return Rc(t,e),t.prototype.componentDidMount=function(){this.props.changeRequestId&&this.props.changeRequestId!=re.default.Empty()&&this.loadChangeRequest()},t.prototype.componentDidUpdate=function(e){var t=this;this.props.changeRequestId&&this.props.changeRequestId!=re.default.Empty()&&e.changeRequestId!=this.props.changeRequestId&&this.loadChangeRequest(),this.props.loading!=e.loading&&this.setState({loading:this.props.loading},(function(){return t.resetForm()}))},t.prototype.renderActions=function(){var e=this;if(!this.props.readonly)return Object(o.jsxs)(y.b,_c({direction:"horizontal",wrap:!0},{children:[Object(o.jsx)(ss,{submitting:this.state.submitting},void 0),Object(o.jsx)(Tr,{type:"default",htmlType:"button",onClick:function(){return e.handleSave()},saving:this.state.submitting,saved:this.state.saved},void 0),Object(o.jsx)(Ir,{resetting:this.state.resetting,onConfirm:this.resetForm},void 0)]}),void 0)},t}(a.Component),Cc=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),xc=function(){return xc=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},xc.apply(this,arguments)},Ac=function(e){function t(t){var n=e.call(this,t)||this;return n.render=function(){return n.props.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(y.b,xc({direction:"vertical"},{children:[Object(o.jsx)(Qn.a,xc({type:"inner",size:"small",title:"Discipline Details"},{children:Object(o.jsx)(Tc,{readonly:!0,loading:n.props.loading,selectedInstitution:n.props.changeRequest.institutionId,changeRequestId:n.props.changeRequest.i
1d,fieldErrors:n.props.fieldErrors,changeRequestDetailsPage:n.props.changeRequestDetailsPage},void 0)}),void 0),Object(o.jsx)(Qn.a,xc({type:"inner",size:"small",title:"Additional Details"},{children:Object(o.jsx)(gs,{readonly:!0,loading:n.props.loading,changeRequest:n.props.changeRequest},void 0)}),void 0)]}),void 0)},n.state={},n}return Cc(t,e),t}(a.Component),Pc=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Nc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Pc(t,e),t.prototype.getInstitutionLocationsDataTable=function(e,t){var n="api/institutionLocations",r=n.indexOf("?")>0?"&":"?";return null!=t&&(n+=r+"institutionId="+encodeURIComponent(t),r="&"),n=n.replace(/null|undefined/gi,""),this.SendRequest(e,"post",n,!0,!1)},t.prototype.getInstitutionLocationDetails=function(e){var t="api/institutionLocations/"+encodeURIComponent(e);return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.getInstitutionLocations=function(e){var t="api/institutionLocations/get",n=t.indexOf("?")>0?"&":"?";return null!=e&&(t+=n+"institutionId="+encodeURIComponent(e),n="&"),t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.saveInstitutionLocation=function(e){var t="api/institutionLocations/save";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.removeInstitutionLocation=function(e){var t="api/institutionLocations/removeCourseFromInstitutionCourseBlockDetail";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t}(U),wc=new Nc,Dc=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),qc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Dc(t,e),t.prototype.saveStep1=function(e){var t="api/NewProgramChangeRequests/saveStep1";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.saveStep2=function(e){var t="api/NewProgramChangeRequests/saveStep2";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.saveStep3=function(e){var t="api/NewProgramChangeRequests/saveStep3";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.saveStep4=function(e){var t="api/NewProgramChangeRequests/saveStep4";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.saveStep5=function(e){var t="api/NewProgramChangeRequests/saveStep5";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.saveStep6=function(e){var t="api/NewProgramChangeRequests/saveStep6";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!1,!1)},t.prototype.saveStep7=function(e){var t="api/NewProgramChangeRequests/saveStep7";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!1,!1)},t.prototype.saveStep8=function(e){var t="api/NewProgramChangeRequests/saveStep8";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.saveStep9=function(e){var t="api/NewProgramChangeRequests/saveStep9";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.saveStep10=function(e){var t="api/NewProgramChangeRequests/saveStep10";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.saveStep11=function(e){var t="api/NewProgramChangeRequests/saveStep11";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.saveStep12=function(e){var t="api/NewProgramChangeRequests/saveStep12";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.saveStep13=function(e){var t="api/NewProgramChangeRequests/saveStep13";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.saveStep14=function(e){var t="api/NewProgramChangeRequests/saveStep14";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.submitStep1=function(e){var t="api/NewProgramChangeRequests/submitStep1";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.submitStep2=function(e){var t="api/NewProgramChangeRequests/submitStep2";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.submitStep3=function(e){var t="api/NewProgramChangeRequests/submitStep3";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.submitStep4=function(e){var t="api/NewProgramChangeRequests/submitStep4";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.submitStep5=function(e){var t="api/NewProgramChangeRequests/submitStep5";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.submitStep6=function(e){var t="api/NewProgramChangeRequests/submitStep6";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!1,!1)},t.prototype.submitStep7=function(e){var t="api/NewProgramChangeRequests/submitStep7";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!1,!1)},t.prototype.submitStep8=function(e){var t="api/NewProgramChangeRequests/submitStep8";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.submitStep9=function(e){var t="api/NewProgramChangeRequests/submitStep9";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.submitStep10=function(e){var t="api/NewProgramChangeRequests/submitStep10";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.submitStep11=function(e){var t="api/NewProgramChangeRequests/submitStep11";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.submitStep12=function(e){var t="api/NewProgramChangeRequests/submitStep12";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.submitStep13=function(e){var t="api/NewProgramChangeRequests/submitStep13";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.submitStep14=function(e){var t="api/NewProgramChangeRequests/submitStep14";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.checkNOIApproval=function(e){var t="api/NewProgramChangeRequests/checkNOIApproval";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.get=function(e){var t="api/NewProgramChangeRequests/get";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getStep1=function(e){var t="api/NewProgramChangeRequests/getStep1";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getStep2=function(e){var t="api/NewProgramChangeRequests/getStep2";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getStep3=function(e){var t="api/NewProgramChangeRequests/getStep3";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getStep4=function(e){var t="api/NewProgramChangeRequests/getStep4";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getStep5=function(e){var t="api/NewProgramChangeRequests/getStep5";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getStep6=function(e){var t="api/NewProgramChangeRequests/getStep6";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getStep7=function(e){var t="api/NewProgramChangeRequests/getStep7";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getStep8=function(e){var t="api/NewProgramChangeRequests/getStep8";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getStep9=function(e){var t="api/NewProgramChangeRequests/getStep9";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getStep10=function(e){var t="api/NewProgramChangeRequests/getStep10";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getStep11=function(e){var t="api/NewProgramChangeRequests/getStep11";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getStep11Term=function(e){var t="api/NewProgramChangeRequests/getStep11Term";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getStep12=function(e){var t="api/NewProgramChangeRequests/getStep12";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getStep13=function(e){var t="api/NewProgramChangeRequests/getStep13";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getStep14=function(e){var t="api/NewProgramChangeRequests/getStep14";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getStep15=function(e){var t="api/NewProgramChangeRequests/getStep15";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.removeAwardFromNewProgramProgram=function(e){var t="api/NewProgramChangeRequests/removeAwardFromNewProgramProgramHandler";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.validateNewProgramChangeRequestStep11=function(e){var t="api/NewProgramChangeRequests/validateNewProgramChangeRequestStep11";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.draftAS28Report=function(e){var t="api/NewProgramChangeRequests/draftAS28Report/"+encodeURIComponent(e);return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"get",t,!0,!1)},t}(U),Fc=new qc,Mc=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Yc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Mc(t,e),t.prototype.getAwardTypeTableData=function(e){var t="api/awardType";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getAwardTypeDataTableExport=function(e){var t="api/awardType/export";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getAwardTypeDetails=function(e){var t="api/awardType/"+e;return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"get",t,!0,!1)},t.prototype.saveAwardTypeDetails=function(e){var t="api/awardType/save";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getAwardTypes=function(){var e="api/awardType/getAwardTypes";return e=e.replace(/null|undefined/gi,""),this.SendRequest(null,"post",e,!0,!1)},t.prototype.deleteAwardType=function(e){var t="api/awardType/deleteAwardType";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getChildAwardTypes=function(e){var t="api/awardType/getChildAwardTypes";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t}(U),Uc=new Yc,Lc=function(e){return Object.assign({newProgramChangeRequest:null},e)},kc=function(e){return Object.assign({changeRequestId:"00000000-0000-0000-0000-000000000000",programAwardId:"00000000-0000-0000-0000-000000000000"},e)},Gc=function(e){return Object.assign({id:null},e)},Vc={className:"InstructionalLevelDTO",create:function(e){return Object.assign(Q.create(),{id:0,name:"",code:"",display:""},e)}
1,id:"id",name:"name",code:"code",display:"display"},Bc={className:"ModeOfDeliveryDTO",create:function(e){return Object.assign(Q.create(),{id:0,name:"",displayOrder:0},e)},id:"id",name:"name",displayOrder:"displayOrder"},Wc={className:"NewProgramChangeRequestDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",changeRequestId:"00000000-0000-0000-0000-000000000000",additionlCommentsICCPHSE:"",noticeOfIntentChangeRequestId:null,noticeOfIntentChangeRequest:null,changeRequest:null,cipReclassification:null,programId:null,program:null,isTransferMajorProgram:null,institutionId:null,statusTypeId:null,statusType:null,cipNumberId:null,cipNumber:null,iowaVariationId:null,iowaVariation:null,primrayAwardTypeId:null,primrayAwardType:null,title:"",install:null,boardOfTrusteesDateOfApproval:new Date(0).toISOString(),curriculumApprovalProcessDateOfApproval:new Date(0).toISOString(),advisoryBoardApprovalDate:new Date(0).toISOString(),newProgramProgramAwards:[],newProgramAdvisoryBoardContacts:[],institution:null,previousCipNumberId:null,needForProgram:"",anticipatedAnnualEnrollment:null,anticipatedAnnualCompleters:null,requiresWorkExperiences:null,requiredWorkExperiences:"",secondaryPathways:"",postSecondaryPathways:"",uniqueProgramFeatures:"",sharedProgramEntities:"",collaborationEfforts:"",statePriority:"",programDuplicationAdditionalComments:"",additionalLaborMarketInformation:"",externalAccreditationRequirements:null,externalAccreditationRequirementDetails:"",programMarketingLink:"",standardsAndBenchmarks:"",contacts:[],consultantMeetings:[],occupations:[],industryResources:[],noticeOfIntentCompleterData:[],externalInstitutions:[],externalInstitutionLinkages:[],externalInstitutionIds:[]},e)},id:"id",changeRequestId:"changeRequestId",additionlCommentsICCPHSE:"additionlCommentsICCPHSE",noticeOfIntentChangeRequestId:"noticeOfIntentChangeRequestId",noticeOfIntentChangeRequest:"noticeOfIntentChangeRequest",changeRequest:"changeRequest",cipReclassification:"cipReclassification",programId:"programId",program:"program",isTransferMajorProgram:"isTransferMajorProgram",institutionId:"institutionId",statusTypeId:"statusTypeId",statusType:"statusType",cipNumberId:"cipNumberId",cipNumber:"cipNumber",iowaVariationId:"iowaVariationId",iowaVariation:"iowaVariation",primrayAwardTypeId:"primrayAwardTypeId",primrayAwardType:"primrayAwardType",title:"title",install:"install",boardOfTrusteesDateOfApproval:"boardOfTrusteesDateOfApproval",curriculumApprovalProcessDateOfApproval:"curriculumApprovalProcessDateOfApproval",advisoryBoardApprovalDate:"advisoryBoardApprovalDate",newProgramProgramAwards:"newProgramProgramAwards",newProgramAdvisoryBoardContacts:"newProgramAdvisoryBoardContacts",institution:"institution",previousCipNumberId:"previousCipNumberId",needForProgram:"needForProgram",anticipatedAnnualEnrollment:"anticipatedAnnualEnrollment",anticipatedAnnualCompleters:"anticipatedAnnualCompleters",requiresWorkExperiences:"requiresWorkExperiences",requiredWorkExperiences:"requiredWorkExperiences",secondaryPathways:"secondaryPathways",postSecondaryPathways:"postSecondaryPathways",uniqueProgramFeatures:"uniqueProgramFeatures",sharedProgramEntities:"sharedProgramEntities",collaborationEfforts:"collaborationEfforts",statePriority:"statePriority",programDuplicationAdditionalComments:"programDuplicationAdditionalComments",additionalLaborMarketInformation:"additionalLaborMarketInformation",externalAccreditationRequirements:"externalAccreditationRequirements",externalAccreditationRequirementDetails:"externalAccreditationRequirementDetails",programMarketingLink:"programMarketingLink",standardsAndBenchmarks:"standardsAndBenchmarks",contacts:"contacts",consultantMeetings:"consultantMeetings",occupations:"occupations",industryResources:"industryResources",noticeOfIntentCompleterData:"noticeOfIntentCompleterData",externalInstitutions:"externalInstitutions",externalInstitutionLinkages:"externalInstitutionLinkages",externalInstitutionIds:"externalInstitutionIds"},zc={className:"NewProgramProgramAwardDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",awardTitle:"",description:"",order:0,newProgramChangeRequestId:"00000000-0000-0000-0000-000000000000",awardTypeId:null,awardType:null,instructionalLevelId:null,instructionalLevel:null,typeOfProgramId:null,typeOfProgram:null,specialEmphasisId:null,
1specialEmphasis:null,objectPurposeId:null,objectPurpose:null,prerequisite:null,totalWeeks:null,totalCredits:null,terms:[],newProgramProgramAwardInsitutionLocationIds:[],newProgramProgramAwardInstitutionLocation:[],programAwardModesOfDeliveryIds:[],programAwardModesOfDelivery:[],thirdPartyCredentials:[]},e)},id:"id",awardTitle:"awardTitle",description:"description",order:"order",newProgramChangeRequestId:"newProgramChangeRequestId",awardTypeId:"awardTypeId",awardType:"awardType",instructionalLevelId:"instructionalLevelId",instructionalLevel:"instructionalLevel",typeOfProgramId:"typeOfProgramId",typeOfProgram:"typeOfProgram",specialEmphasisId:"specialEmphasisId",specialEmphasis:"specialEmphasis",objectPurposeId:"objectPurposeId",objectPurpose:"objectPurpose",prerequisite:"prerequisite",totalWeeks:"totalWeeks",totalCredits:"totalCredits",terms:"terms",newProgramProgramAwardInsitutionLocationIds:"newProgramProgramAwardInsitutionLocationIds",newProgramProgramAwardInstitutionLocation:"newProgramProgramAwardInstitutionLocation",programAwardModesOfDeliveryIds:"programAwardModesOfDeliveryIds",programAwardModesOfDelivery:"programAwardModesOfDelivery",thirdPartyCredentials:"thirdPartyCredentials"},Hc={className:"ObjectPurposeDTO",create:function(e){return Object.assign(Q.create(),{id:0,name:"",code:"",display:""},e)},id:"id",name:"name",code:"code",display:"display"},Qc={className:"SpecialEmphasisDTO",create:function(e){return Object.assign(Q.create(),{id:0,name:"",code:"",display:""},e)},id:"id",name:"name",code:"code",display:"display"},Kc={className:"TypeOfProgramDTO",create:function(e){return Object.assign(Q.create(),{id:0,name:"",code:"",apsGeneralEducation:!1,display:""},e)},id:"id",name:"name",code:"code",apsGeneralEducation:"apsGeneralEducation",display:"display"},Xc=n(727),Jc=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),$c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Jc(t,e),t.prototype.getThirdPartyCredentialTypeTableData=function(e){var t="api/thirdPartyCredentialType";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getThirdPartyCredentialTypeDataTableExport=function(e){var t="api/thirdPartyCredentialType/export";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getThirdPartyCredentialTypeDetails=function(e){var t="api/thirdPartyCredentialType/"+e;return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"get",t,!0,!1)},t.prototype.saveThirdPartyCredentialTypeDetails=function(e){var t="api/thirdPartyCredentialType/save";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getThirdPartyCredentialTypes=function(e){var t="api/thirdPartyCredentialType/getThirdPartyCredentialTypes",n=t.indexOf("?")>0?"&":"?";return null!=e&&(t+=n+"isSecondaryProgram="+e,n="&"),t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.getMaxSecondaryThirdPartyCredentials=function(e){var t="api/thirdPartyCredentialType/getMaxSecondaryThirdPartyCredential",n=t.indexOf("?")>0?"&":"?";return null!=e&&(t+=n+"academicYear="+e,n="&"),t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.deleteThirdPartyCredentialType=function(e){var t="api/thirdPartyCredentialType/deleteThirdPartyCredentialType";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.postSecondaryThirdPartyCredentialImporter=function(){var e="api/thirdPartyCredentialType/postSecondaryThirdPartyCredentialImporter";return e=e.replace(/null|undefined/gi,""),this.SendRequest(null,"get",e,!0,!1)},t}(U),Zc=new $c;!function(e){e[e.REQUIRED=0]="REQUIRED",e[e.OPTIONAL=1]="OPTIONAL"}(fd||(fd={}));var el=fd,tl={className:"BaseProgramThirdPartyCredentialDTO",create:function(e){return Object.assign({id:0,programId:"00000000-0000-0000-0000-000000000000",thirdPartyCredentialTypeId:0,thirdPartyCredentialType:null,title:"",organization:"",requirement:null},e)},id:"id",programId:"programId",thirdPartyCredentialTypeId:"thirdPartyCredentialTypeId",thirdPartyCredentialType:"thirdPartyCredentialType",title:"title",organization:"organization",requirement:"requirement"},nl={className:"ProgramAwardDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",programDetailId:"00000000-0000-0000-0000-000000000000",title:"",description:"",order:0,awardTypeId:null,awardType:null,iowaVariationId:null,iowaVariation:null,instructionalLevelId:null,instructionalLevel:null,typeOfProgramId:null,typeOfProgram:null,specialEmphasisId:null,
1specialEmphasis:null,objectPurposeId:null,objectPurpose:null,institutionLocationId:null,institutionLocation:null,prerequisite:!1,totalWeeks:null,totalCredits:null,programAwardModesOfDeliveryIds:[],programAwardModesOfDelivery:[],programAwardInstitutionLocationIds:[],programAwardInstitutionLocations:[],thirdPartyCredentials:[],terms:[],deletedOn:null,deletedBy:""},e)},id:"id",programDetailId:"programDetailId",title:"title",description:"description",order:"order",awardTypeId:"awardTypeId",awardType:"awardType",iowaVariationId:"iowaVariationId",iowaVariation:"iowaVariation",instructionalLevelId:"instructionalLevelId",instructionalLevel:"instructionalLevel",typeOfProgramId:"typeOfProgramId",typeOfProgram:"typeOfProgram",specialEmphasisId:"specialEmphasisId",specialEmphasis:"specialEmphasis",objectPurposeId:"objectPurposeId",objectPurpose:"objectPurpose",institutionLocationId:"institutionLocationId",institutionLocation:"institutionLocation",prerequisite:"prerequisite",totalWeeks:"totalWeeks",totalCredits:"totalCredits",programAwardModesOfDeliveryIds:"programAwardModesOfDeliveryIds",programAwardModesOfDelivery:"programAwardModesOfDelivery",programAwardInstitutionLocationIds:"programAwardInstitutionLocationIds",programAwardInstitutionLocations:"programAwardInstitutionLocations",thirdPartyCredentials:"thirdPartyCredentials",terms:"terms",deletedOn:"deletedOn",deletedBy:"deletedBy"},rl=function(){return rl=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},rl.apply(this,arguments)};var il=function(e){return e.readonly?Object(o.jsx)(ud,{strong:e.strong,text:e.value},void 0):Object(o.jsx)(ut.a,rl({},e),void 0)},ol=function(){return ol=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ol.apply(this,arguments)};var al=function(e){var t,n,r,i,s,d=Object(a.useState)([]),c=d[0],l=d[1],u=Object(a.useState)([{value:el.OPTIONAL,text:"Optional"},{value:el.REQUIRED,text:"Required"}])[0];Object(a.useEffect)((function(){var t;Zc.getThirdPartyCredentialTypes(null!==(t=e.isSecondaryProgram)&&void 0!==t&&t).then((function(e){var t;l(null!==(t=e.thirdPartyCredentialType)&&void 0!==t?t:[])}))}),[]);var p=function(e){return(new Map).set(tl.title,{name:[e,tl.title],rules:[Ot.required()]}).set(tl.thirdPartyCredentialTypeId,{name:[e,tl.thirdPartyCredentialTypeId],rules:[Ot.required()]}).set(tl.organization,{name:[e,tl.organization],rules:[Ot.required()]}).set(tl.requirement,{name:[e,tl.requirement],rules:[Ot.required()]})},f=null!=e.componentIndex||void 0!=e.componentIndex,h=null!=e.componentIndex||void 0!=e.componentIndex?[e.componentIndex,nl.thirdPartyCredentials]:null!==(t=nl.thirdPartyCredentials)&&void 0!==t?t:"",v=e.isSecondaryProgram?f?tl.title+e.sectionIndex+e.componentIndex:tl.title:null!==(n=tl.title+e.awardIndex)&&void 0!==n?n:"",m=e.isSecondaryProgram?f?tl.thirdPartyCredentialTypeId+e.sectionIndex+e.componentIndex:tl.thirdPartyCredentialTypeId:null!==(r=tl.thirdPartyCredentialTypeId+e.awardIndex)&&void 0!==r?r:"",g=e.isSecondaryProgram?f?tl.organization+e.sectionIndex+e.componentIndex:tl.organization:null!==(i=tl.organization+e.awardIndex)&&void 0!==i?i:"",b=e.isSecondaryProgram?f?tl.requirement+e.sectionIndex+e.componentIndex:tl.requirement:null!==(s=tl.requirement+e.awardIndex)&&void 0!==s?s:"",O=function(e,t){return Object(o.jsx)("div",ol({style:{height:30,background:e%2===0?void 0:"#f0f0f0",border:"1pt solid #f0f0f0"}},{children:t}),void 0)};return e.pdfView?Object(o.jsxs)(y.b,{children:[Object(o.jsx)(ud,{text:"Third Party Credential"},void 0),Object(o.jsxs)(Pi.a,ol({style:{fontSize:8,border:"1pt solid #f0f0f0"},tableLayout:"auto",className:"table-half-size",dataSource:e.thirdPartyCredentials,pagination:!1,locale:{emptyText:"No Data"}},{children:[Object(o.jsx)(Pi.a.Column,{title:Object(o.jsx)("div",ol({style:{paddingBottom:10}},{children:"Title"}),void 0),dataIndex:tl.title,align:"left",render:function(e,t,n){return O(n,t.title)}},void 0),Object(o.jsx)(Pi.a.Column,{title:"Type",dataIndex:tl.thirdPartyCredentialTypeId,align:"left",render:function(e,t,n){var r;return O(n,null===(r=t.thirdPartyCredentialType)||void 0===r?void 0:r.name)}},void 0),Object(o.jsx)(Pi.a.Column,{title:"Organization",dataIndex:tl.organization,align:"left",render:function(e,t,n){return O(n,t.organization)}},void 0),Object(o.jsx)(Pi.a.Column,{title:"Requirement",dataIndex:tl.requirement,align:"left",render:function(e,t,n){return O(n,t.requirement==el.REQUIRED?"Required":"Optional")}},void 0)]}),void 0)]},void 0):Object(o.jsx)(Ci.a.List,ol({initialValue:e.thirdPartyCredentials,name:h},{children:function(t,n){var r=n.add,i=n.remove;return Object(o.jsxs)(y.b,ol({direction:"vertical"},{children:[Object(o.jsx)(ud,{text:"Third Party Credential"},void 0),Object(o.jsxs)(Pi.a,ol({tableLayout:"auto",className:"table-half-size",dataSource:t,pagination:!1,footer:function(){return Object(o.jsx)("div",{children:e.readonly?null:Object(o.jsx)(rt.a,ol({size:"small",type:"link",icon:Object(o.jsx)(Xc.a,{},void 0),onClick:function(){return r(tl.create({thirdPartyCredentialTypeId:null}))}},{children:"Add Third Party Credential"}),void 0)},void 0)}},{children:[Object(o.jsx)(Pi.a.Column,{title:"Title",dataIndex:tl.title,align:"left",render:function(t,n,r){return Object(o.jsx)(mt.a,ol({},p(r).get(tl.title),_t.getValidation(v+r,e.fieldErrors,e.submitted),{children:Object(o.jsx)(il,{strong:!1,readonly:e.readonly},void 0)}),void 0)}},void 0),Object(o.jsx)(Pi.a.Column,{title:"Type",dataIndex:tl.thirdPartyCredentialTypeId,align:"left",render:function(t,n,r){var i;return Object(o.jsx)(mt.a,ol({},p(r).get(tl.thirdPartyCredentialTypeId),_t.getValidation(m+r,e.fieldErrors,e.submitted),{children:e.readonly?null===(i=c.find((function(t){var n;return t.id==(null===(n=e.thirdPartyCredentials[r])||void 0===n?void 0:n.thirdPartyCredentialTypeId)})))||void 0===i?void 0:i.name:Object(o.jsx)(hd,ol({disabled:e.readonly,dropdownMatchSelectWidth:!1,allowClear:!0},{children:c.map((function(e){return function(e){if(e.id&&e.name)return Object(o.jsx)(pr.a.Option,ol({"aria-label":e.name,title:e.name,value:e.id},{children:e.name}),e.id)}(e)}))}),void 0)}),void 0)}},void 0),Object(o.jsx)(Pi.a.Column,{title:"Organization",dataIndex:tl.organization,align:"left",render:function(t,n,r){return Object(o.jsx)(mt.a,ol({},p(r).get(tl.organization),_t.getValidation(g+r,e.fieldErrors,e.submitted),{children:Object(o.jsx)(il,{strong:!1,readonly:e.readonly},void 0)}),void 0)}},void 0),Object(o.jsx)(Pi.a.Column,{title:"Requirement",dataIndex:tl.requirement,align:"left",render:function(t,n,r){var i,a;return Object(o.jsx)(mt.a,ol({},p(r).get(tl.requirement),_t.getValidation(b+r,e.fieldErrors,e.submitted),{children:e.readonly?null===(i=u.find((function(t){var n;return t.value==(null===(n=e.thirdPartyCredentials[r])||void 0===n?void 0:n.requirement)})))||void 0===i?void 0:i.text:Object(o.jsx)(hd,ol({disabled:e.readonly,value:null===(a=e.thirdPartyCredentials[r])||void 0===a?void 0:a.requirement,dropdownMatchSelectWidth:!1,allowClear:!0},{children:u.map((function(e){return t=e,Object(o.jsx)(pr.a.Option,ol({"aria-label":t.text,title:t.text,value:t.value},{children:t.text}),t.value);var t}))}),void 0)}),void 0)}},void 0),e.readonly?null:Object(o.jsx)(Pi.a.Column,{title:"Actions",dataIndex:tl.id,align:"center",render:function(e,t,n){return Object(o.jsx)(rt.a,{style:{position:"absolute",top:0,bottom:0,marginTop:"auto",marginBottom:"auto",marginLeft:"-15px",marginRight:"0"},type:"link",onClick:function(){return i(n)},icon:Object(o.jsx)(Yd.a,{},void 0)},void 0)}},void 0)]}),void 0)]}),void 0)}}),void 0)},sl=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),dl=function(){return dl=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},dl.apply(this,arguments)},cl=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._selectRef=a.createRef(),n._formItems=(new Map).set(zc.awardTitle,{required:!0,name:zc.awardTitle,label:"Award Title",rules:[Ot.required()]}).set(zc.awardTypeId,{required:!0,name:zc.awardTypeId,label:"Award Type",rules:[Ot.required()]}).set(zc.description,{required:!0,name:zc.description,label:"Award Description",rules:[Ot.required()]}).set(zc.instructionalLevelId,{required:!0,name:zc.instructionalLevelId,label:"Instructional Level",rules:[Ot.required()]}).set(zc.typeOfProgramId,{required:!0,name:zc.typeOfProgramId,label:"Type Of Program",rules:[Ot.required()]}).set(zc.specialEmphasisId,{required:!0,name:zc.specialEmphasisId,label:"Special Emphasis",rules:[Ot.required()]}).set(zc.objectPurposeId,{required:!0,name:zc.objectPurposeId,label:"Object Purpose",rules:[Ot.required()]}).set(zc.totalWeeks,{required:!0,name:zc.totalWeeks,label:"What is the total amount of weeks for this award?",rules:[Ot.required()]}).set(zc.totalCredits,{required:!0,name:zc.totalCredits,label:"What is the total amount of credits for this award?",rules:[Ot.required()]}).set(zc.programAwardModesOfDeliveryIds,{required:!0,name:zc.programAwardModesOfDeliveryIds,label:"How will this award be offered?",rules:[Ot.required()]}).set(zc.newProgramProgramAwardInsitutionLocationIds,{name:zc.newProgramProgramAwardInsitutionLocationIds,label:"At which location(s) will this program be offered?"}),n.resetForm=function(){var e;n.setState({altered:!1}),null===(e=n._formRef.current)||void 0===e||e.resetFields()},n.fetchData=function(){n.setState({loading:!0});var e=[];n.state.terms&&0!=n.state.terms.length||e.push(n.loadTerms()),n.state.instructionalLevels&&0!=n.state.instructionalLevels.length||e.push(n.loadInstructionalLevel()),n.state.typeOfPrograms&&0!=n.state.typeOfPrograms.length||e.push(n.loadTypeOfProgram()),n.state.specialEmphasis&&0!=n.state.specialEmphasis.length||e.push(n.loadSpecialEmphasis()),n.state.objectPurposes&&0!=n.state.objectPurposes.length||e.push(n.loadObjectPurpose()),n.state.modeOfDelivery&&0!=n.state.modeOfDelivery.length||e.push(n.loadModeOfDelivery()),n.state.iowaVariations&&0!=n.state.iowaVariations.length||e.push(n.loadIowaVariation()),0==n.state.institutionLocations.length&&e.push(n.loadInstitutionLocations()),n.props.changeRequestId&&n.props.changeRequestId!=re.default.Empty()&&e.push(n.loadChangeRequest()),Promise.all(e).then((function(){n.setState({loading:!1})}
1))},n.loadInstitutionLocations=function(){var e;wc.getInstitutionLocations(null!==(e=n.props.selectedInstitution)&&void 0!==e?e:re.default.Empty()).then((function(e){var t;(null===e||void 0===e?void 0:e.succeeded)?n.setState({institutionLocations:null!==(t=e.institutionLocations)&&void 0!==t?t:[]}):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Save Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Save Failed")}))},n.loadTerms=function(){return ce.getAll(Rs.className).then((function(e){e&&n.setState({terms:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadAwardTypes=function(){return ce.getAll(si.className).then((function(e){e&&n.setState({awardTypes:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadFilteredChildAwardTypes=function(e){return ce.getAll(si.className).then((function(t){if(t){var r=t.map((function(t){if(e.findIndex((function(e){return e==t.id}))>-1)return t}));r.removeAll([void 0]),n.setState({awardTypes:null!==r&&void 0!==r?r:[]})}})).catch((function(){n.setState({error:!0})}))},n.loadChildAwardTypes=function(e){var t=Gc({id:e});return Uc.getChildAwardTypes(t).then((function(e){var t;if(e){var r=null!==(t=e.childAwardTypes)&&void 0!==t?t:[];n.loadFilteredChildAwardTypes(r.map((function(e){return e.id})))}})).catch((function(){n.setState({error:!0})}))},n.loadIowaVariation=function(){return ce.getAll(pi.className).then((function(e){e&&n.setState({iowaVariations:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadTypeOfProgram=function(){return ce.getAll(Kc.className).then((function(e){e&&n.setState({typeOfPrograms:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadInstructionalLevel=function(){return ce.getAll(Vc.className).then((function(e){e&&n.setState({instructionalLevels:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadSpecialEmphasis=function(){return ce.getAll(Qc.className).then((function(e){e&&n.setState({specialEmphasis:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadObjectPurpose=function(){return ce.getAll(Hc.className).then((function(e){e&&n.setState({objectPurposes:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadModeOfDelivery=function(){return ce.getAll(Bc.className).then((function(e){e&&n.setState({modeOfDelivery:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadChangeRequest=function(){var e=kc({changeRequestId:n.props.changeRequestId,programAwardId:n.props.awardId});return Fc.getStep10(e).then((function(e){var t,r,i,o,a,s,d,c,l,u,p;if(e){var f=null!==(o=null===(i=null===(r=null===(t=e.changeRequest)||void 0===t?void 0:t.newProgramChangeRequest)||void 0===r?void 0:r.newProgramProgramAwards)||void 0===i?void 0:i.find((function(e){return e.id==n.props.awardId})))&&void 0!==o?o:zc.create({awardTypeId:null,iowaVariationId:null,instructionalLevelId:null,typeOfProgramId:null,specialEmphasisId:null,objectPurposeId:null,totalWeeks:null,totalCredits:null});(null===(s=null===(a=e.changeRequest)||void 0===a?void 0:a.newProgramChangeRequest)||void 0===s?void 0:s.isTransferMajorProgram)&&(f.awardTypeId=null!==(c=null===(d=e.changeRequest)||void 0===d?void 0:d.newProgramChangeRequest.primrayAwardTypeId)&&void 0!==c?c:null),(null===(l=e.changeRequest)||void 0===l?void 0:l.newProgramChangeRequest)&&1!=f.order?n.loadChildAwardTypes(null===(u=e.changeRequest)||void 0===u?void 0:u.newProgramChangeRequest.primrayAwardTypeId):n.loadAwardTypes(),n.setState({changeRequest:null!==(p=e.changeRequest)&&void 0!==p?p:$a.create(),award:f,fieldErrors:n.props.changeRequestDetailsPage?null:e.fieldErrors},(function(){return n.resetForm()}))}})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.handleChange=function(e){n.setState({altered:e})},n.handleSubmit=function(){var e,t,r,i;n.setState({submitting:!0});var o=zc.create(n._formRef?n._formRef.current.getFieldsValue():null);o.id=null!==(e=n.props.awardId)&&void 0!==e?e:re.default.Empty(),o.id!=re.default.Empty()&&(o.order=n.state.award.order),"new"==o.id&&(o.id=re.default.Empty());var a=n.state.changeRequest.newProgramChangeRequest,s=Wc.create({id:null!==(t=null===a||void 0===a?void 0:a.id)&&void 0!==t?t:re.default.Empty(),programId:null!==(r=null===a||void 0===a?void 0:a.programId)&&void 0!==r?r:re.default.Empty(),institutionId:null!==(i=n.state.changeRequest.institutionId)&&void 0!==i?i:re.default.Empty(),changeRequestId:n.state.changeRequest.i
1d==re.default.Empty()?n.props.changeRequestId:n.state.changeRequest.id,newProgramProgramAwards:[o]}),d=Lc({newProgramChangeRequest:s});Fc.submitStep10(d).then((function(e){var t,r,i,o,a,s,d;if(null===e||void 0===e?void 0:e.succeeded){S.b.success("Saved");var c=null!==(t=n.props.awardId)&&void 0!==t?t:re.default.Empty();(null===(i=null===(r=e.changeRequest)||void 0===r?void 0:r.newProgramChangeRequest)||void 0===i?void 0:i.newProgramProgramAwards)&&n.props.awardId==re.default.Empty()&&(c=null===(a=null===(o=e.changeRequest)||void 0===o?void 0:o.newProgramChangeRequest)||void 0===a?void 0:a.newProgramProgramAwards[(null===(d=null===(s=e.changeRequest)||void 0===s?void 0:s.newProgramChangeRequest)||void 0===d?void 0:d.newProgramProgramAwards.length)-1].id);var l=c;n.props.onSave&&n.props.onSave(l),n.props.onSubmit&&n.props.onSubmit(l)}else n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Save Failed")})).catch((function(e){n.setState({error:e}),S.b.error("Save Failed")})).finally((function(){n.setState({loading:!1,submitting:!1,submitted:!0})}))},n.handleSave=function(){var e,t,r,i;n.setState({submitting:!0});var o=zc.create(n._formRef?n._formRef.current.getFieldsValue():null);o.id=null!==(e=n.props.awardId)&&void 0!==e?e:re.default.Empty(),o.id!=re.default.Empty()&&(o.order=n.state.award.order),"new"==o.id&&(o.id=re.default.Empty());var a=n.state.changeRequest.newProgramChangeRequest,s=Wc.create({id:null!==(t=null===a||void 0===a?void 0:a.id)&&void 0!==t?t:re.default.Empty(),programId:null!==(r=null===a||void 0===a?void 0:a.programId)&&void 0!==r?r:re.default.Empty(),institutionId:null!==(i=n.state.changeRequest.institutionId)&&void 0!==i?i:re.default.Empty(),changeRequestId:n.state.changeRequest.id==re.default.Empty()?n.props.changeRequestId:n.state.changeRequest.id,newProgramProgramAwards:[o]}),d=Lc({newProgramChangeRequest:s});Fc.submitStep10(d).then((function(e){var t,r,i,o,a,s,d;if(null===e||void 0===e?void 0:e.succeeded){S.b.success("Saved");var c=null!==(t=n.props.awardId)&&void 0!==t?t:re.default.Empty();(null===(i=null===(r=e.changeRequest)||void 0===r?void 0:r.newProgramChangeRequest)||void 0===i?void 0:i.newProgramProgramAwards)&&n.props.awardId==re.default.Empty()&&(c=null===(a=null===(o=e.changeRequest)||void 0===o?void 0:o.newProgramChangeRequest)||void 0===a?void 0:a.newProgramProgramAwards[(null===(d=null===(s=e.changeRequest)||void 0===s?void 0:s.newProgramChangeRequest)||void 0===d?void 0:d.newProgramProgramAwards.length)-1].id);var l=c;n.props.onSave&&n.props.onSave(l)}else n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Save Failed")})).catch((function(e){n.setState({error:e}),S.b.error("Save Failed")})).finally((function(){n.setState({loading:!1,submitting:!1,submitted:!0})}))},n.getSelectedAward=function(){return n.state.awardTypes.find((function(e){var t;return e.id==(null===(t=n._formRef.current)||void 0===t?void 0:t.getFieldValue(zc.awardTypeId))}))},n.handleAwardTypeChange=function(){var e,t,r,i,o,a,s,d,c,l,u,p,f,h=null!==(e=n.state.awardTypes.find((function(e){var t;return e.id==(null===(t=n._formRef.current)||void 0===t?void 0:t.getFieldValue(zc.awardTypeId))})))&&void 0!==e?e:si.create();h.instructionalLevels.includes(null!==(r=null===(t=n._formRef.current)||void 0===t?void 0:t.getFieldValue(zc.instructionalLevelId))&&void 0!==r?r:0)||null===(i=n._formRef.current)||void 0===i||i.setFieldsValue({instructionalLevelId:void 0}),h.typeOfPrograms.includes(null!==(a=null===(o=n._formRef.current)||void 0===o?void 0:o.getFieldValue(zc.typeOfProgramId))&&void 0!==a?a:0)||null===(s=n._formRef.current)||void 0===s||s.setFieldsValue({typeOfProgramId:void 0}),h.specialEmphases.includes(null!==(c=null===(d=n._formRef.current)||void 0===d?void 0:d.getFieldValue(zc.specialEmphasisId))&&void 0!==c?c:0)||null===(l=n._formRef.current)||void 0===l||l.setFieldsValue({specialEmphasisId:void 0}),h.objectPurposes.includes(null!==(p=null===(u=n._formRef.current)||void 0===u?void 0:u.getFieldValue(zc.objectPurposeId))&&void 0!==p?p:0)||null===(f=n._formRef.current)||void 0===f||f.setFieldsValue({objectPurposeId:void 0})},n.renderErrors=function(){if(n.state.error)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:n.state.message},void 0)},n.state={changeRequest:$a.create(),changeRequests:[],award:zc.create({awardTypeId:null,iowaVariationId:null,instructionalLevelId:null,typeOfProgramId:null,specialEmphasisId:null,objectPurposeId:null,totalWeeks:null,totalCredits:null}),awardTypes:[],iowaVariations:[],instructionalLevels:[],modeOfDelivery:[],objectPurposes:[],specialEmphasis:[],terms:[],typeOfPrograms:[],institutionLocations:[]},n}return sl(t,e),t.prototype.componentDidMount=function(){this.fetchData()},t.prototype.componentDidUpdate=function(e){this.props.changeRequestId&&this.props.changeRequestId!=e.changeRequestId&&this.fetchData(),this.props.loading!=e.loading&&this.setState({loading:this.props.loading})},t.prototype.render=function(){var e,t,n,r,i,a=this;if(this.state.loading)return Object(o.jsx)(pt.a,{active:!0},void 0);var s=null===(e=this._formRef.current)||void 0===e?void 0:e.getFieldValue(zc.awardTypeId),d=s||(null===(t=this.state.changeRequest.newProgramChangeRequest)||void 0===t?void 0:t.primrayAwardTypeId);return Object(o.jsx)(y.b,dl({size:"small",direction:"vertical"},{children:Object(o.jsxs)(ht.a,dl({ref:this._formRef,layout:"vertical",initialValues:this.state.award,onFinish:this.handleSubmit,onValuesChange:this.handleChange,requiredMark:!this.props.readonly},{children:[Object(o.jsx)(mt.a,dl({id:"Title Award "+this.state.award.order},this._formItems.get(zc.awardTitle),_t.getValidation(zc.awardTitle+zc.className+this.state.award.order,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ut.a,{"aria-label":"Title Award "+this.state.award.order,id:"Title Award "+this.state.award.order,disabled:this.props.readonly},void 0)}),void 0),Object(o.jsx)("label",{title:"Award Type Award "+this.state.award.order,htmlFor:"Award Type Award "+this.state.award.order},void 0),Object(o.jsx)(mt.a,dl({},this._formItems.get(zc.awardTypeId),_t.getValidation(zc.awardTypeId+zc.className+this.state.award.order,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(hd,dl({id:"Award Type Award "+this.state.award.order,showArrow:!this.props.readonly,disabled:this.props.readonly||1==this.state.award.order||null!==(r=null===(n=this.state.changeRequest.newProgramChangeRequest)||void 0===n?void 0:n.isTransferMajorProgram)&&void 0!==r&&r,onChange:this.handleAwardTypeChange},{children:this.renderAwardTypes()}),void 0)}),void 0),Object(o.jsxs)(b.a,dl({gutter:[16,16]},{children:[Object(o.jsxs)(m.a,dl({},En.ONE_QUARTER,{children:[Object(o.jsx)("label",{title:"Instructional Level Award "+this.state.award.order,htmlFor:"Instructional Level Award "+this.state.award.order},void 0),Object(o.jsx)(mt.a,dl({},this._formItems.get(zc.instructionalLevelId),_t.getValidation(zc.instructionalLevelId+zc.className+this.state.award.order,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(hd,dl({id:"Instructional Level Award "+this.state.award.order,showArrow:!this.props.readonly,disabled:this.props.readonly},{children:this.state.instructionalLevels.filter((function(e){var t;return null===(t=a.state.awardTypes.find((function(e){return e.id==d})))||void 0===t?void 0:t.instructionalLevels.includes(e.id)}
1)).map((function(e){return a.renderInstructionalLevel(e)}))}),void 0)}),void 0)]}),void 0),Object(o.jsxs)(m.a,dl({},En.ONE_QUARTER,{children:[Object(o.jsx)("label",{title:"Type Of Program Award "+this.state.award.order,htmlFor:"Type Of Program Award "+this.state.award.order},void 0),Object(o.jsx)(mt.a,dl({},this._formItems.get(zc.typeOfProgramId),_t.getValidation(zc.typeOfProgramId+zc.className+this.state.award.order,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(hd,dl({id:"Type Of Program Award "+this.state.award.order,showArrow:!this.props.readonly,disabled:this.props.readonly},{children:this.state.typeOfPrograms.filter((function(e){var t;return null===(t=a.state.awardTypes.find((function(e){return e.id==d})))||void 0===t?void 0:t.typeOfPrograms.includes(e.id)})).map((function(e){return a.renderTypesOfProgram(e)}))}),void 0)}),void 0)]}),void 0),Object(o.jsxs)(m.a,dl({},En.ONE_QUARTER,{children:[Object(o.jsx)("label",{title:"Special Emphasis Award "+this.state.award.order,htmlFor:"Special Emphasis Award "+this.state.award.order},void 0),Object(o.jsx)(mt.a,dl({},this._formItems.get(zc.specialEmphasisId),_t.getValidation(zc.specialEmphasisId+zc.className+this.state.award.order,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(hd,dl({id:"Special Emphasis Award "+this.state.award.order,showArrow:!this.props.readonly,disabled:this.props.readonly},{children:this.state.specialEmphasis.filter((function(e){var t;return null===(t=a.state.awardTypes.find((function(e){return e.id==d})))||void 0===t?void 0:t.specialEmphases.includes(e.id)}
1)).map((function(e){return a.renderSpecialEmphasis(e)}))}),void 0)}),void 0)]}),void 0),Object(o.jsxs)(m.a,dl({},En.ONE_QUARTER,{children:[Object(o.jsx)("label",{title:"Object Purpose Award "+this.state.award.order,htmlFor:"Object Purpose Award "+this.state.award.order},void 0),Object(o.jsx)(mt.a,dl({},this._formItems.get(zc.objectPurposeId),_t.getValidation(zc.objectPurposeId+zc.className+this.state.award.order,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(hd,dl({id:"Object Purpose Award "+this.state.award.order,showArrow:!this.props.readonly,disabled:this.props.readonly},{children:this.state.objectPurposes.filter((function(e){var t;return null===(t=a.state.awardTypes.find((function(e){return e.id==d})))||void 0===t?void 0:t.objectPurposes.includes(e.id)})).map((function(e){return a.renderObjectPurpose(e)}))}),void 0)}),void 0)]}),void 0)]}),void 0),Object(o.jsx)("label",{title:"Description Award "+this.state.award.order,htmlFor:"Description Award "+this.state.award.order},void 0),Object(o.jsx)(mt.a,dl({},this._formItems.get(zc.description),_t.getValidation(zc.description+zc.className+this.state.award.order,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ut.a.TextArea,{id:"Description Award "+this.state.award.order,disabled:this.props.readonly,maxLength:5e3,showCount:!0,autoSize:{minRows:5}},void 0)}),void 0),this.renderWeeks(),this.renderCredits(),Object(o.jsx)("label",{title:"Mode of Delivery Award "+this.state.award.order,htmlFor:"Mode of Delivery Award "+this.state.award.order},void 0),Object(o.jsx)(mt.a,dl({},this._formItems.get(zc.programAwardModesOfDeliveryIds),_t.getValidation(zc.programAwardModesOfDeliveryIds+zc.className+this.state.award.order,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(hd,dl({id:"Mode of Delivery Award "+this.state.award.order,mode:"multiple",disabled:this.props.readonly},{children:this.state.modeOfDelivery.map((function(e){return a.renderModeOfDelivery(e)}))}),void 0)}),void 0),this.renderLocation(),Object(o.jsx)(al,{thirdPartyCredentials:null!==(i=this.state.award.thirdPartyCredentials)&&void 0!==i?i:[],awardIndex:this.state.award.order,readonly:this.props.readonly||this.state.loading||this.state.submitting,submitted:this.state.submitted,fieldErrors:this.state.fieldErrors},void 0),this.renderActions()]}),void 0)}),void 0)},t.prototype.renderWeeks=function(){var e,t,n=null!==(t=null===(e=this.getSelectedAward())||void 0===e?void 0:e.maxWeeks)&&void 0!==t?t:Number.MAX_SAFE_INTEGER;return Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)("label",{title:"Total Weeks Award "+this.state.award.order,htmlFor:"Total Weeks Award "+this.state.award.order},void 0),Object(o.jsx)(mt.a,dl({},this._formItems.get(zc.totalWeeks),_t.getValidation(zc.totalWeeks+zc.className+this.state.award.order,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(Ni.a,{id:"Total Weeks Award "+this.state.award.order,min:1,max:n,disabled:this.props.readonly},void 0)}),void 0)]},void 0)},t.prototype.renderCredits=function(){var e,t,n,r,i=null!==(t=null===(e=this.getSelectedAward())||void 0===e?void 0:e.minCredits)&&void 0!==t?t:0,a=null!==(r=null===(n=this.getSelectedAward())||void 0===n?void 0:n.maxCredits)&&void 0!==r?r:Number.MAX_SAFE_INTEGER;return Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)("label",{title:"Total Credits Award "+this.state.award.order,htmlFor:"Total Credits Award "+this.state.award.order},void 0),Object(o.jsx)(mt.a,dl({},this._formItems.get(zc.totalCredits),_t.getValidation("awardCredits"+zc.className+this.state.award.order,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(Ni.a,{id:"Total Credits Award "+this.state.award.order,min:i,max:a,disabled:this.props.readonly},void 0)}),void 0)]},void 0)},t.prototype.renderAwardTypes=function(){var e,t=this,n=this.state.awardTypes;return(null===(e=this.state.changeRequest.newProgramChangeRequest)||void 0===e?void 0:e.isTransferMajorProgram)&&(n=n.filter((function(e){return!0===e.transferMajor}))),n.map((function(e){return t.renderAwardType(e)}))},t.prototype.renderActions=function(){if(!this.props.readonly)return Object(o.jsxs)(y.b,dl({direction:"horizontal",wrap:!0},{children:[Object(o.jsx)(rs,{onClick:this.props.onPrevious},void 0),Object(o.jsx)(ss,{htmlType:"submit",submitting:this.state.submitting},void 0),Object(o.jsx)(Tr,{type:"default",htmlType:"button",onClick:this.handleSave,saving:this.state.submitting,saved:this.state.saved},void 0),Object(o.jsx)(Ir,{disabled:!this.state.altered,resetting:this.state.resetting,onConfirm:this.resetForm},void 0)]}),void 0)},t.prototype.renderLocation=function(){var e=this;if(this.state.institutionLocations.length>1)return Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)("label",{title:"Institution Location Award "+this.state.award.order,htmlFor:"Institution Location Award "+this.state.award.order},void 0),Object(o.jsx)(mt.a,dl({},this._formItems.get(zc.newProgramProgramAwardInsitutionLocationIds),_t.getValidation(zc.newProgramProgramAwardInsitutionLocationIds,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(hd,dl({id:"Institution Location Award "+this.state.award.order,mode:"multiple",disabled:this.props.readonly},{children:this.state.institutionLocations.map((function(t){return e.renderInstitutionLocations(t)}))}),void 0)}),void 0)]},void 0)},t.prototype.renderAwardType=function(e){var t,n;if(e.id)return Object(o.jsxs)(pr.a.Option,dl({value:null!==(t=e.id)&&void 0!==t?t:re.default.Empty()},{children:[e.code," - ",e.name]}),null!==(n=e.id)&&void 0!==n?n:re.default.Empty())},t.prototype.renderTypesOfProgram=function(e){var t,n;if(e.id)return Object(o.jsxs)(pr.a.Option,dl({value:null!==(t=e.id)&&void 0!==t?t:re.default.Empty()},{children:[e.code," - ",e.name]}),null!==(n=e.id)&&void 0!==n?n:re.default.Empty())},t.prototype.renderObjectPurpose=function(e){var t,n;if(e.id)return Object(o.jsxs)(pr.a.Option,dl({value:null!==(t=e.id)&&void 0!==t?t:re.default.Empty()},{children:[e.code," - ",e.name]}),null!==(n=e.id)&&void 0!==n?n:re.default.Empty())},t.prototype.renderSpecialEmphasis=function(e){var t,n;if(e.id)return Object(o.jsxs)(pr.a.Option,dl({value:null!==(t=e.id)&&void 0!==t?t:re.default.Empty()},{children:[e.code," - ",e.name]}),null!==(n=e.id)&&void 0!==n?n:re.default.Empty())},t.prototype.renderInstructionalLevel=function(e){var t,n;if(e.id)return Object(o.jsxs)(pr.a.Option,dl({value:null!==(t=e.id)&&void 0!==t?t:re.default.Empty()},{children:[e.code," - ",e.name]}),null!==(n=e.id)&&void 0!==n?n:re.default.Empty())},t.prototype.renderIowaVariation=function(e){var t,n;if(e.id)return Object(o.jsxs)(pr.a.Option,dl({value:null!==(t=e.id)&&void 0!==t?t:re.default.Empty()},{children:[e.code," - ",e.name]}),null!==(n=e.id)&&void 0!==n?n:re.default.Empty())},t.prototype.renderInstitutionLocations=function(e){var t,n;if(e.id)return Object(o.jsxs)(pr.a.Option,dl({value:null!==(t=e.id)&&void 0!==t?t:re.default.Empty()},{children:[e.name," - ",e.street1," "]}),null!==(n=e.id)&&void 0!==n?n:re.default.Empty())},t.prototype.renderModeOfDelivery=function(e){var t,n;if(e.id)return Object(o.jsxs)(pr.a.Option,dl({value:null!==(t=e.id)&&void 0!==t?t:re.default.Empty()},{children:[" ",e.name]}),null!==(n=e.id)&&void 0!==n?n:re.default.Empty())},t}(a.Component),ll=function(e){return Object.assign({changeRequestId:"00000000-0000-0000-0000-000000000000",programAwardId:"00000000-0000-0000-0000-000000000000"},e)},ul=function(e){return Object.assign({changeRequestId:"00000000-0000-0000-0000-000000000000",programAwardId:"00000000-0000-0000-0000-000000000000",termId:"00000000-0000-0000-0000-000000000000"},e)},pl=function(e){return Object.assign({changeRequestId:"00000000-0000-0000-0000-000000000000",newProgramAward:null},e)},fl=function(e){return Object.assign({changeRequestId:"00000000-0000-0000-0000-000000000000",totalCredits:0,totalTechCoreCredits:0,newProgramAward:null},e)},hl=function(e){return Object.assign({totalCredits:0,totalTechCoreCredits:0,changeRequestId:"00000000-0000-0000-0000-000000000000",programAward:null},e)},vl={className:"FlatNewProgramProgramTermCourseGroupOptionDTO",create:function(e){return Object.assign(Q.create(),{id:null,groupId:null,courseId:null,course:null,institutionCourseId:null,institutionCourse:null,courseBlockId:null,description:"",groupOptionType:null,groupOptionTypeId:null,workBasedLearningTypeId:null,workBasedLearningType:null,order:0,generalEducationId:null,apsGeneralEducationId:null,transferMajorCourseBlockId:null,transferMajorLactsCategoryId:null,transferMajorGeneralEducationTypeId:null,transferMajorDisciplineFrameworkElementId:null,credits:null,footnote:"",techCore:null,embeddedCredits:null,groupIndex:0,isVariableCredits:null},e)},id:"id",groupId:"groupId",courseId:"courseId",course:"course",institutionCourseId:"institutionCourseId",institutionCourse:"institutionCourse",courseBlockId:"courseBlockId",description:"description",groupOptionType:"groupOptionType",groupOptionTypeId:"groupOptionTypeId",workBasedLearningTypeId:"workBasedLearningTypeId",workBasedLearningType:"workBasedLearningType",order:"order",generalEducationId:"generalEducationId",apsGeneralEducationId:"apsGeneralEducationId",transferMajorCourseBlockId:"transferMajorCourseBlockId",transferMajorLactsCategoryId:"transferMajorLactsCategoryId",transferMajorGeneralEducationTypeId:"transferMajorGeneralEducationTypeId",transferMajorDisciplineFrameworkElementId:"transferMajorDisciplineFrameworkElementId",credits:"credits",footnote:"footnote",techCore:"techCore",embeddedCredits:"embeddedCredits",groupIndex:"groupIndex",isVariableCredits:"isVariableCredits"},ml={className:"NewProgramProgramTermDTO",create:function(e){return Object.assign(Q.create(),{id:null,programAwardId:"00000000-0000-0000-0000-000000000000",order:0,prerequisite:!1,informationalContent:"",termId:null,term:null,groups:[],flatCourseGroupOptions:[]},e)},id:"id",programAwardId:"programAwardId",order:"order",prerequisite:"prerequisite",informationalContent:"informationalContent",termId:"termId",term:"term",groups:"groups",flatCourseGroupOptions:"flatCourseGroupOptions"},gl={className:"ProgramTermDTO",create:function(e){return Object.assign(Q.create(),{id:null,order:0,prerequisite:!1,programAwardId:"00000000-0000-0000-0000-000000000000",informationalContent:"",termId:null,term:null,groups:[],flatCourseGroupOptions:[]},e)},id:"id",order:"order",prerequisite:"prerequisite",programAwardId:"programAwardId",informationalContent:"informationalContent",termId:"termId",term:"term",groups:"groups",flatCourseGroupOptions:"flatCourseGroupOptions"},bl={className:"YearTermDTO",create:function(e){return Object.assign({termId:null,year:null,term:null,display:""},e)},termId:"termId",year:"year",term:"term",display:"display"},yl=n(1518),Ol=function(){function e(){}return e.MAIN=1,e.ALTERNATE=2,e.OPTIONAL=3,e}(),jl={className:"APSGeneralEducationDTO",create:function(e){return Object.assign(Q.create(),{id:0,displayOrder:0,code:"",name:""},e)},id:"id",displayOrder:"displayOrder",code:"code",name:"name"},Il={className:"CourseDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",disciplineId:"00000000-0000-0000-0000-000000000000",discipline:null,catalogNumber:"",install:null,retire:null,deletedOn:null,deletedBy:"",createdOn:null,createdBy:"",updatedOn:null,updatedBy:"",institutionCourses:[],courseDetails:[],currentDetail:null,display:"",installDisplay:"",status:null},e)},id:"id",disciplineId:"disciplineId",discipline:"discipline",catalogNumber:"catalogNumber",install:"install",retire:"retire",deletedOn:"deletedOn",deletedBy:"deletedBy",createdOn:"createdOn",createdBy:"createdBy",updatedOn:"updatedOn",updatedBy:"updatedBy",institutionCourses:"institutionCourses",courseDetails:"courseDetails",currentDetail:"currentDetail",display:"display",installDisplay:"installDisplay",status:"status"},Sl={className:"FlatProgramModificationProgramTermCourseGroupOptionDTO",create:function(e){return Object.assign(Q.create(),{id:null,groupId:null,courseId:null,course:null,institutionCourseId:null,institutionCourse:null,workBasedLearningTypeId:null,workBasedLearningType:null,courseBlockId:null,description:"",groupOptionTypeId:null,groupOptionType:null,order:0,generalEducationId:null,apsGeneralEducationId:null,transferMajorCourseBlockId:null,transferMajorLactsCategoryId:null,transferMajorGeneralEducationTypeId:null,transferMajorDisciplineFrameworkElementId:null,credits:null,footnote:"",techCore:null,embeddedCredits:null,groupIndex:0,isVariableCredits:null},e)},id:"id",groupId:"groupId",courseId:"courseId",course:"course",institutionCourseId:"institutionCourseId",institutionCourse:"institutionCourse",workBasedLearningTypeId:"workBasedLearningTypeId",workBasedLearningType:"workBasedLearningType",courseBlockId:"courseBlockId",description:"description",groupOptionTypeId:"groupOptionTypeId",groupOptionType:"groupOptionType",order:"order",generalEducationId:"generalEducationId",apsGeneralEducationId:"apsGeneralEducationId",transferMajorCourseBlockId:"transferMajorCourseBlockId",transferMajorLactsCategoryId:"transferMajorLactsCategoryId",transferMajorGeneralEducationTypeId:"transferMajorGeneralEducationTypeId",transferMajorDisciplineFrameworkElementId:"transferMajorDisciplineFrameworkElementId",credits:"credits",footnote:"footnote",techCore:"techCore",embeddedCredits:"embeddedCredits",groupIndex:"groupIndex",isVariableCredits:"isVariableCredits"},El={className:"GeneralEducationDTO",create:function(e){return Object.assign(Q.create(),{id:0,displayOrder:0,code:"",name:"",embeddedCredits:!1,parentGeneralEducationId:null,parent:null},e)},id:"id",displayOrder:"displayOrder",code:"code",name:"name",embeddedCredits:"embeddedCredits",parentGeneralEducationId:"parentGeneralEducationId",parent:"parent"},Rl={className:"GroupOptionTypeDTO",create:function(e){return Object.assign(Q.create(),{id:0,name:"",displayOrder:0},e)},id:"id",name:"name",displayOrder:"displayOrder"},_l={className:"ProgramModificationProgramTermDTO",create:function(e){return Object.assign(Q.create(),{id:null,programAwardId:"00000000-0000-0000-0000-000000000000",order:0,prerequisite:!1,informationalContent:"",termId:null,term:null,groups:[],flatCourseGroupOptions:[]},e)},id:"id",programAwardId:"programAwardId",order:"order",prerequisite:"prerequisite",informationalContent:"informationalContent",termId:"termId",term:"term",groups:"groups",flatCourseGroupOptions:"flatCourseGroupOptions"},Tl={className:"ProgramTermCourseGroupOptionDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",groupId:null,courseId:null,course:null,courseBlockId:null,courseBlock:null,description:"",groupOptionTypeId:null,order:0,generalEducationId:null,apsGeneralEducationId:null,transferMajorCourseBlockId:null,transferMajorLactsCategoryId:null,transferMajorGeneralEducationTypeId:null,transferMajorDisciplineFrameworkElementId:null,workBasedLearningTypeId:null,workBasedLearningType:null,credits:null,footnote:"",techCore:null,embeddedCredits:null},e)},id:"id",groupId:"groupId",courseId:"courseId",course:"course",courseBlockId:"courseBlockId",courseBlock:"courseBlock",description:"description",groupOptionTypeId:"groupOptionTypeId",order:"order",generalEducationId:"generalEducationId",apsGeneralEducationId:"apsGeneralEducationId",transferMajorCourseBlockId:"transferMajorCourseBlockId",transferMajorLactsCategoryId:"transferMajorLactsCategoryId",transferMajorGeneralEducationTypeId:"transferMajorGeneralEducationTypeId",transferMajorDisciplineFrameworkElementId:"transferMajorDisciplineFrameworkElementId",workBasedLearningTypeId:"workBasedLearningTypeId",workBasedLearningType:"workBasedLearningType",credits:"credits",footnote:"footnote",techCore:"techCore",embeddedCredits:"embeddedCredits"},Cl={className:"TransferMajorCourseBlockDTO",create:function(e){return Object.assign(Q.create(),{id:0,name:""},e)},id:"id",name:"name"},xl={className:"TransferMajorDisciplineFrameworkElementDTO",create:function(e){return Object.assign(Q.create(),{id:0,name:"",transferMajorDisciplineFrameworkElementCourses:[]},e)},id:"id",name:"name",transferMajorDisciplineFrameworkElementCourses:"transferMajorDisciplineFrameworkElementCourses"},Al={className:"T
1ransferMajorGeneralEducationTypeDTO",create:function(e){return Object.assign(Q.create(),{id:0,name:""},e)},id:"id",name:"name"},Pl={className:"TransferMajorLactsCategoryDTO",create:function(e){return Object.assign(Q.create(),{id:0,name:""},e)},id:"id",name:"name"},Nl={className:"WorkBasedLearningTypeDTO",create:function(e){return Object.assign(Q.create(),{id:0,name:""},e)},id:"id",name:"name"},wl=n(211),Dl=n.n(wl),ql=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fl=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ql(t,e),t.prototype.getTransferMajorDisciplineFrameworkElementCoursesDataTable=function(e,t){var n="api/transferMajorDisciplineFrameworkElementCourse",r=n.indexOf("?")>0?"&":"?";return null!=t&&(n+=r+"transferMajorDisciplineFrameworkElementId="+t,r="&"),n=n.replace(/null|undefined/gi,""),this.SendRequest(e,"post",n,!0,!1)},t.prototype.getTransferMajorDisciplineFrameworkElementCourseDataTableExport=function(e){var t="api/transferMajorDisciplineFrameworkElementCourse/export";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.addTransferMajorDisciplineFrameworkElementCourse=function(e){var t="api/transferMajorDisciplineFrameworkElementCourse/add";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getTransferMajorDisciplineFrameworkElementCourses=function(e){var t="api/transferMajorDisciplineFrameworkElementCourse/get";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.deleteTransferMajorDisciplineFrameworkElementCourse=function(e){var t="api/transferMajorDisciplineFrameworkElementCourse/deleteTransferMajorDisciplineFrameworkElementCourse";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t}(U),Ml=new Fl,Yl=function(e){return Object.assign({transferMajorDisciplineFrameworkId:0,instutionId:null,installTerm:null},e)},Ul={className:"InstitutionCourseDetailDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",courseId:"00000000-0000-0000-0000-000000000000",description:"",institutionCourseId:"00000000-0000-0000-0000-000000000000",institutionCourse:null,institutionCourseCredits:[],courseRequisites:[],install:null,retire:null,variableHours:!1,categoryId:null,category:null,objectives:"",disciplineId:null,discipline:null,catalogNumber:"",title:"",installDisplay:"",retireDisplay:"",totalMinCredits:0,totalMaxCredits:0,totalCredits:"",versionDisplay:"",display:""},e)},id:"id",courseId:"courseId",description:"description",institutionCourseId:"institutionCourseId",institutionCourse:"institutionCourse",institutionCourseCredits:"institutionCourseCredits",courseRequisites:"courseRequisites",install:"install",retire:"retire",variableHours:"variableHours",categoryId:"categoryId",category:"category",objectives:"objectives",disciplineId:"disciplineId",discipline:"discipline",catalogNumber:"catalogNumber",title:"title",installDisplay:"installDisplay",retireDisplay:"retireDisplay",totalMinCredits:"totalMinCredits",totalMaxCredits:"totalMaxCredits",totalCredits:"totalCredits",versionDisplay:"versionDisplay",display:"display"},Ll={className:"TransferMajorDisciplineFrameworkElementCourseDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",transferMajorDisciplineFrameworkElementId:0,courseId:"00000000-0000-0000-0000-000000000000",transferMajorDisciplineFramework:null,course:null},e)},id:"id",transferMajorDisciplineFrameworkElementId:"transferMajorDisciplineFrameworkElementId",courseId:"courseId",transferMajorDisciplineFramework:"transferMajorDisciplineFramework",course:"course"},kl=function(){return kl=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},kl.apply(this,arguments)},Gl=a.forwardRef((function(e,t){var n,r=a.createRef(),i=Object(a.useState)(!1),s=i[0],d=i[1],c=Object(a.useState)({})[0],l=Object(a.useState)({institutionCourseId:null!==(n=null===e||void 0===e?void 0:e.existingCourseId)&&void 0!==n?n:re.default.Empty(),transferMajorDisciplineFrameworkElementId:e.transferMajorDisciplineFrameworkElementId}),u=l[0],p=l[1],f=Object(a.useState)(e.existingCourseId),h=f[0],v=f[1],m=Object(a.useState)({}),g=m[0],b=m[1],y=Object(a.useState)([]),O=y[0],j=y[1],I=Object(a.useState)([]),S=I[0],E=I[1],R=Object(a.useState)(!1)[0];Object(a.useImperativeHandle)(t,(function(){return{getValue:function(){return _()},validateFields:function(){return T()}}}));var _=function(){return u},T=function(){var e;return null===(e=r.current)||void 0===e?void 0:e.validateFields()};Object(a.useEffect)((function(){d(!0),v(e.existingCourseId);var t=[];O&&0!=O.length||t.push(C()),e.transferMajorDisciplineFrameworkElementId&&t.push(x(e.transferMajorDisciplineFrameworkElementId)),Promise.all(t).then((function(){d(!1)}))}),[]);var C=function(){return ce.getAll(xl.className).then((function(e){e&&j(null!==e&&void 0!==e?e:[])}))},x=function(t){var n=Yl({transferMajorDisciplineFrameworkId:t,instutionId:e.institutionId,installTerm:e.installTerm});return Ml.getTransferMajorDisciplineFrameworkElementCourses(n).then((function(e){var t;e&&E(null!==(t=e.transferMajorDisciplineFrameworkElementCourses)&&void 0!==t?t:[])}))},A=function(e){if(e.id)return Object(o.jsx)(pr.a.Option,kl({value:e.id},{children:e.name}),e.id)};return s?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(Dl.a,kl({ref:r,layout:"vertical",initialValues:{id:e.transferMajorDisciplineFrameworkElementId},requiredMark:!0},{children:[Object(o.jsx)(mt.a,kl({}
1,(new Map).set(xl.id,{required:!0,name:xl.id,label:"Discipline Framework Elements",rules:[Ot.required()]}).set(Ll.courseId,{required:!0,name:Ll.courseId,label:"Courses",rules:[Ot.required()]}).get(xl.id),_t.getValidation(xl.id,c,R),{children:Object(o.jsx)(hd,kl({onSelect:function(e){var t;v(void 0),x(e),b(null!==(t=O.find((function(t){return t.id==e})))&&void 0!==t?t:xl.create())},dropdownMatchSelectWidth:!1,allowClear:!0,showSearch:!0,optionFilterProp:"children"},{children:O.map((function(e){return A(e)}))}),void 0)}),void 0),Object(o.jsxs)(Pi.a,kl({dataSource:S,pagination:!1,rowKey:Ul.courseId,rowSelection:{columnTitle:"Select",columnWidth:100,type:"radio",onChange:function(t,n){!function(t){var n,r,i,o,a,s=null===(i=null===(r=null===(n=t[0].course)||void 0===n?void 0:n.institutionCourses)||void 0===r?void 0:r.find((function(t){return t.institutionId==e.institutionId})))||void 0===i?void 0:i.currentDetail;v(null!==(o=null===s||void 0===s?void 0:s.courseId)&&void 0!==o?o:re.default.Empty()),p({institutionCourseId:null!==(a=null===s||void 0===s?void 0:s.institutionCourseId)&&void 0!==a?a:re.default.Empty(),institutionCourseDetail:null!==s&&void 0!==s?s:null,transferMajorDisciplineFrameworkElementId:g.id})}(n)},defaultSelectedRowKeys:[null!==h&&void 0!==h?h:re.default.Empty()],selectedRowKeys:[null!==h&&void 0!==h?h:re.default.Empty()]}},{children:[Object(o.jsx)(Pi.a.Column,{title:"Discipline",dataIndex:Ul.discipline,width:125,render:function(e,t){var n,r,i,a;return Object(o.jsx)(Ws.a,kl({title:null===(r=null===(n=t.course)||void 0===n?void 0:n.discipline)||void 0===r?void 0:r.name,placement:"right"},{children:null===(a=null===(i=t.course)||void 0===i?void 0:i.discipline)||void 0===a?void 0:a.code}),void 0)}},void 0),Object(o.jsx)(Pi.a.Column,{title:"Catalog Number",dataIndex:Ul.catalogNumber,width:125,render:function(e,t){var n;return null===(n=t.course)||void 0===n?void 0:n.catalogNumber}},void 0),Object(o.jsx)(Pi.a.Column,{title:"Title",dataIndex:Ul.title,render:function(t,n){var r,i,o,a;return null===(a=null===(o=null===(i=null===(r=n.course)||void 0===r?void 0:r.institutionCourses)||void 0===i?void 0:i.find((function(t){return t.institutionId==e.institutionId})))||void 0===o?void 0:o.currentDetail)||void 0===a?void 0:a.title}},void 0)]}),void 0)]}),void 0)}));Gl.displayName="DisciplineFrameworkCourseSearch";var Vl=Gl,Bl=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Wl=function(){return Wl=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Wl.apply(this,arguments)},zl=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._formItems=(new Map).set(Tl.footnote,{name:Tl.footnote,label:"Footnote"}),n.submit=function(){return(n._formRef?n._formRef.current.getFieldsValue():null).footnote},n.reset=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields()},n.handleChange=function(){n.setState({altered:!0})},n.state={programTermCourseOption:{}},n}return Bl(t,e),t.prototype.render=function(){if(this.state.loading)return Object(o.jsx)(pt.a,{active:!0},void 0);var e={};return e[Tl.footnote]=this.props.footnote,Object(o.jsx)(y.b,Wl({size:"small",direction:"vertical"},{children:Object(o.jsx)(ht.a,Wl({ref:this._formRef,layout:"vertical",initialValues:e,onValuesChange:this.handleChange},{children:Object(o.jsx)(mt.a,Wl({},this._formItems.get(Tl.footnote),_t.getValidation(Tl.footnote,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a.TextArea,{rows:7},void 0)}),void 0)}),void 0)}),void 0)},t.prototype.renderErrors=function(){if(this.state.error)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t}(a.Component),Hl=zl,Ql=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Kl=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ql(t,e),t.prototype.getInstitutionCourseBlockTableData=function(e,t){var n="api/institutionCourseBlocks",r=n.indexOf("?")>0?"&":"?";return null!=t&&(n+=r+"institutionId="+encodeURIComponent(t),r="&"),n=n.replace(/null|undefined/gi,""),this.SendRequest(e,"post",n,!0,!1)}
1,t.prototype.getInstitutionCourseBlockDetails=function(e){var t="api/institutionCourseBlocks/"+encodeURIComponent(e);return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.saveInstitutionCourseBlock=function(e){var t="api/institutionCourseBlocks/save";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getInstitutionCourseBlocks=function(e){var t="api/institutionCourseBlocks/get";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getCoursesForInstitutionCourseBlockDetailTableData=function(e,t){var n="api/institutionCourseBlocks/coursesForInstitutioinCourseBlockDetail",r=n.indexOf("?")>0?"&":"?";return null!=t&&(n+=r+"institutionCoureBlockDetailid="+encodeURIComponent(t),r="&"),n=n.replace(/null|undefined/gi,""),this.SendRequest(e,"post",n,!0,!1)},t.prototype.searchForCourses=function(e,t,n){var r="api/institutionCourseBlocks/searchForCourses",i=r.indexOf("?")>0?"&":"?";return null!=e&&(r+=i+"searchText="+encodeURIComponent(e),i="&"),null!=t&&(r+=i+"institutionCourseBlockDetailid="+encodeURIComponent(t),i="&"),null!=n&&(r+=i+"institutionId="+encodeURIComponent(n),i="&"),r=r.replace(/null|undefined/gi,""),this.SendRequest(null,"post",r,!0,!1)},t.prototype.getProgramsForInstitutionCourseBlockDetailTableData=function(e,t){var n="api/institutionCourseBlocks/programsForInstitutioinCourseBlockDetail",r=n.indexOf("?")>0?"&":"?";return null!=t&&(n+=r+"institutionCoureBlockid="+encodeURIComponent(t),r="&"),n=n.replace(/null|undefined/gi,""),this.SendRequest(e,"post",n,!0,!1)},t.prototype.getCourseBlocksInProgramTerms=function(e){var t="api/institutionCourseBlocks/getCourseBlocksInProgramTerms";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getCourseBlocksInNewProgramProgramTerms=function(e){var t="api/institutionCourseBlocks/getCourseBlocksInNewProgramProgramTerms";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getCourseBlocksInProgramModificationProgramTerms=function(e){var t="api/institutionCourseBlocks/getCourseBlocksInProgramModificationProgramTerms";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.addCourseToInstitutionCourseBlockDetail=function(e){var t="api/institutionCourseBlocks/addCourseToInstitutionCourseBlockDetail";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.removeCourseFromInstitutionCourseBlockDetail=function(e){var t="api/institutionCourseBlocks/removeCourseFromInstitutionCourseBlockDetail";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.exportNOI=function(e){var t="api/institutionCourseBlocks/courseBlockReport",n=t.indexOf("?")>0?"&":"?";return null!=e&&(t+=n+"institutionId="+encodeURIComponent(e),n="&"),t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"get",t,!0,!1)},t}(U),Xl=new Kl,Jl=Xl,$l=function(e){return Object.assign({institutionId:"00000000-0000-0000-0000-000000000000"},e)},Zl={className:"InstitutionCourseBlockDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",institutionCourseBlockDetails:[],institutionId:"00000000-0000-0000-0000-000000000000",currentDetail:null},e)},id:"id",institutionCourseBlockDetails:"institutionCourseBlockDetails",institutionId:"institutionId",currentDetail:"currentDetail"},eu=Zl,tu=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),nu=function(){return nu=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},nu.apply(this,arguments)},ru=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._formItems=(new Map).set(eu.id,{required:!0,name:eu.id,label:"Course Block",rules:[Ot.required()]}),n.loadInstitutionCourseBlocks=function(){var e=$l({institutionId:n.props.institutionId});Jl.getInstitutionCourseBlocks(e).then((function(e){var t;e&&n.setState({courseBlocks:null!==(t=e.institutionCourseBlocks)&&void 0!==t?t:[]})})).catch((function(){n.setState({error:!0})}
1))},n.submit=function(){var e=n._formRef?n._formRef.current.getFieldsValue():null;return n.props.onSelect&&n.props.onSelect(e.id),n.state.courseBlocks.find((function(t){return t.id==e.id}))},n.reset=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields()},n.handleChange=function(){n.setState({altered:!0})},n.validateFields=function(){var e;return null===(e=n._formRef.current)||void 0===e?void 0:e.validateFields()},n.state={selectedCourseBlockId:"",courseBlocks:[]},n}return tu(t,e),t.prototype.componentDidMount=function(){var e,t,n=this,r=[];""==this.state.selectedCourseBlockId&&(this.setState({selectedCourseBlockId:null!==(e=this.props.courseBlockId)&&void 0!==e?e:""}),null===(t=this._formRef.current)||void 0===t||t.setFieldsValue({id:this.props.courseBlockId})),this.props.courseBlocks&&0!=this.props.courseBlocks.length?this.setState({courseBlocks:this.props.courseBlocks}):this.state.courseBlocks&&0!=this.state.courseBlocks.length||(r.push(this.loadInstitutionCourseBlocks()),Promise.all(r).then((function(){n.setState({loading:!1})})))},t.prototype.componentDidUpdate=function(e){var t,n=this;if(e.courseBlockId!=this.props.courseBlockId){var r=[];""==this.state.selectedCourseBlockId&&this.setState({selectedCourseBlockId:null!==(t=this.props.courseBlockId)&&void 0!==t?t:""}),this.props.courseBlocks&&0!=this.props.courseBlocks.length?this.setState({courseBlocks:this.props.courseBlocks}):this.state.courseBlocks&&0!=this.state.courseBlocks.length||(r.push(this.loadInstitutionCourseBlocks()),Promise.all(r).then((function(){n.setState({loading:!1})})))}},t.prototype.render=function(){var e=this;if(this.state.loading)return Object(o.jsx)(pt.a,{active:!0},void 0);var t={id:this.state.selectedCourseBlockId};return Object(o.jsx)(y.b,nu({size:"small",direction:"vertical"},{children:Object(o.jsx)(ht.a,nu({ref:this._formRef,layout:"vertical",initialValues:t,onValuesChange:this.handleChange,requiredMark:!0},{children:Object(o.jsx)(mt.a,nu({},this._formItems.get(eu.id),_t.getValidation(eu.id,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(pr.a,nu({showSearch:!0,optionFilterProp:"children"},{children:this.state.courseBlocks.map((function(t){return e.renderCourseBlocks(t)}))}),void 0)}),void 0)}),void 0)}),void 0)},t.prototype.renderCourseBlocks=function(e){var t,n,r;if(e.id)return Object(o.jsx)(pr.a.Option,nu({value:null!==(t=e.id)&&void 0!==t?t:re.default.Empty()},{children:null===(n=e.currentDetail)||void 0===n?void 0:n.title}),null!==(r=e.id)&&void 0!==r?r:re.default.Empty())},t.prototype.renderErrors=function(){if(this.state.error)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t}(a.Component),iu=ru,ou=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),au=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ou(t,e),t.prototype.getInstitutionCourseTableData=function(e,t,n,r){var i="api/institutionCourses",o=i.indexOf("?")>0?"&":"?";return null!=t&&(i+=o+"institutionId="+encodeURIComponent(t),o="&"),null!=n&&(i+=o+"termId="+encodeURIComponent(n),o="&"),null!=r&&(i+=o+"year="+r,o="&"),i=i.replace(/null|undefined/gi,""),this.SendRequest(e,"post",i,!0,!1)},t.prototype.getInstitutionsForCourseTableData=function(e,t){var n="api/institutionCourses/institutionsForCourse",r=n.indexOf("?")>0?"&":"?";return null!=t&&(n+=r+"courseId="+encodeURIComponent(t),r="&"),n=n.replace(/null|undefined/gi,""),this.SendRequest(e,"post",n,!0,!1)},t.prototype.searchForInstituionCourses=function(e){var t="api/institutionCourses/searchInstitutionCourse";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.searchForInstitutionCourseByString=function(e){var t="api/institutionCourses/searchForInstitutionCourseByStringHandler";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getInstitutionCourseDetailByCourseIdandInstitutionId=function(e,t){var n="api/institutionCourses/getInstitutionCourseDetailByCourseIdandInstitutionId",r=n.indexOf("?")>0?"&":"?";return null!=e&&(n+=r+"courseId="+encodeURIComponent(e),r="&"),null!=t&&(n+=r+"institutionId="+encodeURIComponent(t),r="&"),n=n.replace(/null|undefined/gi,""),this.SendRequest(null,"post",n,!0,!1)},t.prototype.getInstitutionCourseDetail=function(e){var t="api/institutionCourses/getInstitutionCourseDetail",n=t.indexOf("?")>0?"&":"?";return null!=e&&(t+=n+"institutionCourseId="+encodeURIComponent(e),n="&"),t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.getInstitutionCourses=function(e){var t="api/institutionCourses/getInstitutionCourses";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.searchForCourses=function(e){var t="api/institutionCourses/searchForCourses";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.saveInstitutionCourseDetails=function(e){var t="api/institutionCourses/save";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.generateCCNFile=function(e,t,n){var r="api/institutionCourses/generateCCNFile",i=r.indexOf("?")>0?"&":"?";return null!=t&&(r+=i+"termId="+encodeURIComponent(t),i="&"),null!=n&&(r+=i+"year="+n,i="&"),r=r.replace(/null|undefined/gi,""),this.SendRequest(e,"post",r,!0,!1)},t}(U),su=new au,du=su,cu=function(e){return Object.assign({disciplineId:null,catalogNumber:"",title:"",institutionId:null,installTerm:null,includeRetired:null},e)},lu="disciplineId",uu="catalogNumber",pu="title",fu=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),hu=function(){return hu=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},hu.apply(this,arguments)},vu=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._tableRef=a.createRef(),n.getFormItems=function(){return(new Map).set(pu,{name:pu,label:"Title"}).set(lu,{name:lu,label:"Discipline"}).set(uu,{name:uu,label:"Catalog Number"})},n.loadDisciplines=function(){return ce.getAll(nd.className).then((function(e){e&&(e=e.sort((function(e,t){var n,r;return(null!==(n=null===e||void 0===e?void 0:e.code)&&void 0!==n?n:"")>(null!==(r=null===t||void 0===t?void 0:t.code)&&void 0!==r?r:"")?1:-1})),n.setState({disciplines:null!==e&&void 0!==e?e:[]}))})).catch((function(){n.setState({error:!0})}
1))},n.reset=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields(),n.setState({institutionCourseDetails:[]})},n.getValue=function(){return n.state.value},n.validateFields=function(){var e;return null===(e=n._formRef.current)||void 0===e?void 0:e.validateFields()},n.handleSelected=function(e){var t,r,i,o=e[0];n.setState({selectedCourseId:null!==(t=o.institutionCourseId)&&void 0!==t?t:re.default.Empty(),value:{institutionCourseId:null!==(r=o.institutionCourseId)&&void 0!==r?r:re.default.Empty(),institutionCourseDetail:null!==o&&void 0!==o?o:null}}),e&&e[0]&&n.props.onChange&&n.props.onChange({institutionCourseId:null!==(i=o.institutionCourseId)&&void 0!==i?i:re.default.Empty(),institutionCourseDetail:null!==o&&void 0!==o?o:null})},n.clearSearch=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields()},n.handleChange=function(){var e;n.setState({searching:!0});var t=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldsValue(),r=cu({disciplineId:""==t.disciplineId?null:t.disciplineId,catalogNumber:t.catalogNumber,title:t.title,institutionId:n.props.institutionId,installTerm:n.props.installTerm});du.searchForInstituionCourses(r).then((function(e){var t;(null===e||void 0===e?void 0:e.succeeded)&&n.setState({institutionCourseDetails:null!==(t=e.institutionCourseDetails)&&void 0!==t?t:[],limited:e.exceedsNumberOfCourses})})).catch((function(e){n.setState({error:e})})).finally((function(){n.setState({searching:!1})}))},n.existingCourse=function(e){var t=cu(hu(hu({},e),{institutionId:n.props.institutionId}));du.searchForInstituionCourses(t).then((function(e){var t;(null===e||void 0===e?void 0:e.succeeded)&&(n.setState({institutionCourseDetails:null!==(t=e.institutionCourseDetails)&&void 0!==t?t:[]}),e.exceedsNumberOfCourses&&S.b.info("All courses with current filters cannot be shown. Please use more filters"))})).catch((function(e){n.setState({error:e})})).finally((function(){n.setState({submitting:!1})}))},n.state={institutionCourseDetails:[],disciplines:[],limited:!1,installTerm:bl.create()},n}return fu(t,e),t.prototype.componentDidMount=function(){var e,t,n=this;this.setState({loading:!0});var r=[];this.state.disciplines&&0!=this.state.disciplines.length||r.push(this.loadDisciplines()),void 0!=this.props.value&&this.setState({value:this.props.value}),(null===(e=this.props.value)||void 0===e?void 0:e.institutionCourseDetail)&&r.push(this.existingCourse(this.props.value.institutionCourseDetail)),this.props.existingCourseId&&this.props.existingCourseId!=re.default.Empty()&&r.push(this.loadExistingCourse(this.props.existingCourseId,null!==(t=this.props.institutionId)&&void 0!==t?t:re.default.Empty())),(this.props.catalogNumber||this.props.disciplineId)&&this.handleChange(),Promise.all(r).then((function(){n.setState({loading:!1})}))},t.prototype.componentDidUpdate=function(e){if(void 0!=this.props.value&&this.props.value!=e.value&&this.setState({value:this.props.value}),this._tableRef.current){var t=this._tableRef.current.querySelector(".ant-table-tbody").querySelectorAll(".ant-radio-input");t&&t.length>0&&t.forEach((function(e){e.setAttribute("aria-label","radio button")}))}},t.prototype.loadExistingCourse=function(e,t){var n=this;du.getInstitutionCourseDetailByCourseIdandInstitutionId(e,t).then((function(e){var t,r,i;(null===(t=e.institutionCourse)||void 0===t?void 0:t.institutionCourseDetails)&&n.setState({institutionCourseDetails:[null!==(r=e.institutionCourse.currentDetail)&&void 0!==r?r:Ul.create()],selectedCourseId:null!==(i=e.institutionCourse.id)&&void 0!==i?i:re.default.Empty()})})).catch((function(e){n.setState({error:e})})).finally((function(){n.setState({submitting:!1})}))},t.prototype.render=function(){var e,t,n,r,i=this;if(this.state.loading)return Object(o.jsx)(pt.a,{active:!0},void 0);var a=this.getFormItems(),s=hu(hu({},null===(e=this.state.value)||void 0===e?void 0:e.institutionCourseDetail),{disciplineId:null!==(t=this.props.disciplineId)&&void 0!==t?t:null,catalogNumber:null!==(n=this.props.catalogNumber)&&void 0!==n?n:void 0});return Object(o.jsxs)(y.b,hu({direction:"vertical",size:"large"},{children:[Object(o.jsx)(ot.a.Paragraph,hu({italic:!0},{children:"Search for a course using the fields below to populate the table below to select a course."}),void 0),Object(o.jsxs)(ht.a,hu({ref:this._formRef,layout:"vertical",initialValues:s,onChange:this.handleChange},{children:[Object(o.jsxs)(y.b,hu({direction:"vertical",size:"small"},{children:[Object(o.jsxs)(b.a,hu({gutter:[16,16]},{children:[Object(o.jsx)(m.a,hu({},En.HALF,{children:Object(o.jsx)(ht.a.Item,hu({},a.get(lu),{children:Object(o.jsx)(hd,hu({dropdownMatchSelectWidth:!1,onChange:this.handleChange,allowClear:!0,showSearch:!0,optionFilterProp:"children"},{children:this.renderDisciplineOptions()}),void 0)}),void 0)}),void 0),Object(o.jsx)(m.a,hu({},En.HALF,{children:Object(o.jsx)(ht.a.Item,hu({},a.get(uu),{children:Object(o.jsx)(ut.a,{allowClear:!0},void 0)}),void 0)}),void 0)]}),void 0),Object(o.jsx)(ht.a.Item,hu({},a.get(pu),{children:Object(o.jsx)(ut.a,{allowClear:!0},void 0)}),void 0)]}),void 0),Object(o.jsxs)(y.b,hu({direction:"horizontal"},{children:[Object(o.jsx)(dd,{htmlType:"button",onClick:this.handleChange,searching:this.state.searching},void 0),Object(o.jsx)(od,{htmlType:"button",onClick:this.clearSearch},void 0)]}),void 0)]}),void 0),this.state.limited?Object(o.jsx)(ot.a.Text,{children:"Too many results. Please narrow your search above."},void 0):null,Object(o.jsxs)(Pi.a,hu({dataSource:this.state.institutionCourseDetails,ref:this._tableRef,pagination:!1,rowKey:Ul.courseId,rowSelection:{columnTitle:"Actions",columnWidth:100,t
1ype:"radio",onChange:function(e,t){i.handleSelected(t)},defaultSelectedRowKeys:[null!==(r=this.props.existingCourseId)&&void 0!==r?r:re.default.Empty()]}},{children:[Object(o.jsx)(Pi.a.Column,{title:"Discipline",dataIndex:Ul.discipline,width:125,render:function(e,t){var n,r;return Object(o.jsx)(Ws.a,hu({title:null===(n=t.discipline)||void 0===n?void 0:n.name,placement:"right"},{children:null===(r=t.discipline)||void 0===r?void 0:r.code}),void 0)}},void 0),Object(o.jsx)(Pi.a.Column,{title:"Catalog Number",dataIndex:Ul.catalogNumber,width:125},void 0),Object(o.jsx)(Pi.a.Column,{title:"Title",dataIndex:Ul.title},void 0)]}),void 0)]}),void 0)},t.prototype.renderDisciplineOptions=function(){var e=this;return this.state.disciplines.map((function(t){return e.renderDisciplineOption(t)}))},t.prototype.renderDisciplineOption=function(e){if(e.id)return Object(o.jsx)(pr.a.Option,hu({value:e.id},{children:e.display}),e.id)},t}(a.Component),mu=vu,gu=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),bu=function(){return bu=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},bu.apply(this,arguments)},yu=function(e){function t(t){var n=e.call(this,t)||this;return n.handleChanged=function(e,t){n.props.onChange&&n.props.onChange({min:e,max:t})},n.handleMinimumChanged=function(e){var t=e.target.valueAsNumber;n.setState({min:t}),n.handleChanged(t,n.state.max)},n.handleMaximumChanged=function(e){var t=e.target.valueAsNumber;n.setState({max:t}),n.handleChanged(n.state.min,t)},n.handleCheckMax=function(e){var t,r=e.target.valueAsNumber,i=n.state.min&&r<n.state.min?n.state.min:r;n.props.max&&(i=(null!==(t=n.props.max)&&void 0!==t?t:Number.MAX_SAFE_INTEGER)<i?n.props.max:i,n.props.min&&(i=n.props.min>i?n.props.min:i)),n.setState({max:i}),n.handleChanged(n.state.min,i)},n.handleCheckMin=function(e){var t=e.target.valueAsNumber,r=n.state.max&&t>n.state.max?n.state.max:t;n.props.min&&(r=n.props.min>r?n.props.min:r,n.props.max&&(r=n.props.max<r?n.props.max:r)),n.setState({min:r}),n.handleChanged(r,n.state.max)},n.state={min:void 0,max:void 0},n}return gu(t,e),t.prototype.componentDidMount=function(){var e,t;this.setState({max:null===(e=this.props.value)||void 0===e?void 0:e.max,min:null===(t=this.props.value)||void 0===t?void 0:t.min})},t.prototype.componentDidUpdate=function(e){var t,n;this.props.value&&this.props.value!=e.value&&this.setState({max:null===(t=this.props.value)||void 0===t?void 0:t.max,min:null===(n=this.props.value)||void 0===n?void 0:n.min})},t.prototype.render=function(){var e,t,n,r,i=null!==(e=this.props.max)&&void 0!==e?e:Number.MAX_SAFE_INTEGER,a={min:"",max:""};if((null===(t=this.props.prefix)||void 0===t?void 0:t.max)&&this.props.prefix.min){var s=this.props.prefix;a.min=s.min,a.max=s.max}else this.props.showPrefix&&(a.min="Min",a.max="Max");var d=null!==(n=this.props.min)&&void 0!==n?n:0;return Object(o.jsxs)(ut.a.Group,bu({compact:!0,size:null!==(r=this.props.size)&&void 0!==r?r:"default"},{children:[Object(o.jsx)("label",bu({title:"Minimum",htmlFor:"Minimum"},{children:Object(o.jsx)(ut.a,{type:"number",className:"min-max-input",prefix:a.min,value:this.state.min,min:d,max:i,disabled:this.props.disabled,onPressEnter:this.handleCheckMin,onBlur:this.handleCheckMin,allowClear:this.props.allowClear,onChange:this.handleMinimumChanged},void 0)}),void 0),Object(o.jsx)("label",bu({title:"Maximum",htmlFor:"Maximum"},{children:Object(o.jsx)(ut.a,{type:"number",className:"min-max-input",prefix:a.max,value:this.state.max,min:d,max:i,disabled:this.props.disabled,onPressEnter:this.handleCheckMax,onBlur:this.handleCheckMax,allowClear:this.props.allowClear,onChange:this.handleMaximumChanged},void 0)}),void 0)]}),void 0)},t}(a.Component),Ou=yu,ju=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Iu=function(){return Iu=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Iu.apply(this,arguments)},Su=function(e){function t(t){var n=e.call(this,t)||this;return n._addCourseFormRef=a.createRef(),n._addInstitutionCourseFormRef=a.createRef(),n._disciplineFrameworkCourseSearchRef=a.createRef(),n._addCourseBlockFormRef=a.createRef(),n._footnoteFormRef=a.createRef(),n._formRef=a.createRef(),n._tableRef=a.createRef(),n.resetForm=function(){var e;n.setState({altered:!1}),null===(e=n._formRef.current)||void 0===e||e.resetFields()},n.fetchData=function(){n.setState({loading:!0});var e=[];n.state.groupOptionTypes&&0!=n.state.groupOptionTypes.length||e.push(n.loadGroupOptionTypes()),n.state.transferMajorCourseBlocks&&0!=n.state.transferMajorCourseBlocks.length||e.push(n.loadTransferMajorCourseBlock()),n.state.transferMajorLactsCategories&&0!=n.state.transferMajorLactsCategories.length||e.push(n.loadTransferMajorLactsCategories()),n.state.generalEducationTypes&&0!=n.state.generalEducationTypes.length||e.push(n.loadGeneralEducationType()),n.state.apsGeneralEducationType&&0!=n.state.apsGeneralEducationType.length||e.push(n.loadAPSGeneralEducationType()),n.state.generalEducationCategory&&0!=n.state.generalEducationCategory.length||e.push(n.loadTransferMajorGeneralEducationCategory()),n.state.disciplineFrameworkElement&&0!=n.state.disciplineFrameworkElement.length||e.push(n.loadTransferMajorDisciplineFrameworkElement()),n.state.workBasedLearningTypes&&0!=n.state.workBasedLearningTypes.length||e.push(n.loadWorkBasedLearningType()),Promise.all(e).then((function(){n.handleCreditsChange(),n.setState({loading:!1})}
1))},n.loadGroupOptionTypes=function(){return ce.getAll(Rl.className).then((function(e){e&&n.setState({groupOptionTypes:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadTransferMajorCourseBlock=function(){return ce.getAll(Cl.className).then((function(e){e&&n.setState({transferMajorCourseBlocks:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadTransferMajorLactsCategories=function(){return ce.getAll(Pl.className).then((function(e){e&&n.setState({transferMajorLactsCategories:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadTransferMajorGeneralEducationCategory=function(){return ce.getAll(Al.className).then((function(e){e&&n.setState({generalEducationCategory:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadTransferMajorDisciplineFrameworkElement=function(){return ce.getAll(xl.className).then((function(e){e&&n.setState({disciplineFrameworkElement:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadGeneralEducationType=function(){return ce.getAll(El.className).then((function(e){e&&n.setState({generalEducationTypes:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadWorkBasedLearningType=function(){return ce.getAll(Nl.className).then((function(e){e&&n.setState({workBasedLearningTypes:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadAPSGeneralEducationType=function(){return ce.getAll(jl.className).then((function(e){e&&n.setState({apsGeneralEducationType:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.getProgramTermFormItems=function(e){return(new Map).set(Tl.courseId,{name:[e,Tl.courseId]}).set(Tl.courseBlockId,{name:[e,Tl.courseBlockId]}).set(Tl.credits,{name:[e,Tl.credits]}).set(Tl.groupOptionTypeId,{name:[e,Tl.groupOptionTypeId]}).set(Tl.generalEducationId,{name:[e,Tl.generalEducationId]}).set(Tl.workBasedLearningTypeId,{name:[e,Tl.workBasedLearningTypeId]}
1).set(Tl.apsGeneralEducationId,{name:[e,Tl.apsGeneralEducationId]}).set(Tl.techCore,{name:[e,Tl.techCore]}).set(Tl.transferMajorLactsCategoryId,{name:[e,Tl.transferMajorLactsCategoryId]}).set(Tl.transferMajorDisciplineFrameworkElementId,{name:[e,Tl.transferMajorDisciplineFrameworkElementId]}).set(Tl.transferMajorGeneralEducationTypeId,{name:[e,Tl.transferMajorGeneralEducationTypeId]}).set(Tl.embeddedCredits,{name:[e,Tl.embeddedCredits]}).set(Tl.footnote,{name:[e,Tl.footnote]})},n.getProgramTermsFormItems=function(e){return(new Map).set(_l.informationalContent,{label:"Additional Information",name:[e,_l.informationalContent]})},n.getOption=function(e){var t,r,i=null==n._formRef.current?n.state.value.flatCourseGroupOptions:null===(t=n._formRef.current)||void 0===t?void 0:t.getFieldsValue().flatCourseGroupOptions;if(n.props.readonly&&!n.props.programDisplay&&(i=i.filter((function(e){return null!=e.courseId||null!=e.courseBlockId}))),(null===i||void 0===i?void 0:i.length)>0)return null!==(r=i[e])&&void 0!==r?r:null},n.getMinMax=function(e){var t,n,r,i,o=e.course,a=void 0==(null===o||void 0===o?void 0:o.variableHours)?e.isVariableCredits:null===o||void 0===o?void 0:o.variableHours;return{min:null!==(n=null===(t=e.credits)||void 0===t?void 0:t.min)&&void 0!==n?n:0,max:null!==(i=null===(r=e.credits)||void 0===r?void 0:r.max)&&void 0!==i?i:0,isVariable:a}},n.editCourse=function(e){var t,r,i=null===(t=n._addInstitutionCourseFormRef.current)||void 0===t?void 0:t.getValue(),o=[];return o.push(null===(r=n._addInstitutionCourseFormRef.current)||void 0===r?void 0:r.validateFields()),Promise.all(o).then((function(){var t,r,o,a,s;if(i){if(i.institutionCourseDetail){var d=Il.create(i.institutionCourseDetail),c=n._formRef.current,l=null===c||void 0===c?void 0:c.getFieldsValue();l.flatCourseGroupOptions[e].course=d,l.flatCourseGroupOptions[e].courseId=null===(t=i.institutionCourseDetail)||void 0===t?void 0:t.courseId,l.flatCourseGroupOptions[e].description=null===(r=i.institutionCourseDetail)||void 0===r?void 0:r.display,l.flatCourseGroupOptions[e].credits={min:null===(o=i.institutionCourseDetail)||void 0===o?void 0:o.totalMaxCredits,max:null===(a=i.institutionCourseDetail)||void 0===a?void 0:a.totalMinCredits},l.flatCourseGroupOptions[e].isVariableCredits=null===(s=i.institutionCourseDetail)||void 0===s?void 0:s.variableHours;var u=n.state.value;u.flatCourseGroupOptions=l.flatCourseGroupOptions,null===c||void 0===c||c.setFieldsValue(l),n.props.onChange&&n.props.onChange(u,e),n.handleCreditsChange()}return new Promise((function(e){e("Course Edited")}))}return S.b.error("Course not selected."),new Promise((function(e,t){t("Course Not Selected")}))}))},n.editCourseBlock=function(e){var t,r,i=null===(t=n._addCourseBlockFormRef.current)||void 0===t?void 0:t.submit(),o=[];return o.push(null===(r=n._addCourseBlockFormRef.current)||void 0===r?void 0:r.validateFields()),Promise.all(o).then((function(){var t,r,o;if(i){var a=n._formRef.current,s=null===a||void 0===a?void 0:a.getFieldsValue();s.flatCourseGroupOptions[e].courseBlock=i,s.flatCourseGroupOptions[e].courseBlockId=i.id,s.flatCourseGroupOptions[e].description="BLK"+(null!==(r=null===(t=i.currentDetail)||void 0===t?void 0:t.code)&&void 0!==r?r:"")+(null===(o=i.currentDetail)||void 0===o?void 0:o.title);var d=n.state.value;return d.flatCourseGroupOptions=s.flatCourseGroupOptions,null===a||void 0===a||a.setFieldsValue(s),n.props.onChange&&n.props.onChange(d),new Promise((function(e){e("Course Block Edited")}))}return S.b.error("Course Block not selected."),new Promise((function(e,t){t("Course Not Selected")}))}))},n.submitFootnote=function(e){var t,r=null===(t=n._footnoteFormRef.current)||void 0===t?void 0:t.submit();if(void 0!=r&&null!=r){var i=n._formRef.current,o=null===i||void 0===i?void 0:i.getFieldsValue();o.flatCourseGroupOptions[e].footnote=r;var a=n.state.value;a.flatCourseGroupOptions=o.flatCourseGroupOptions,null===i||void 0===i||i.setFieldsValue(o),n.props.onChange&&n.props.onChange(a)}},n.submitAddCourseBlock=function(e,t){var r,i,o=null===(r=n._addCourseBlockFormRef.current)||void 0===r?void 0:r.submit(),a=[];return a.push(null===(i=n._addCourseBlockFormRef.current)||void 0===i?void 0:i.validateFields()),Promise.all(a).then((function(){var r,i,a,s,d,
1c,l,u;if(o){var p=null===(r=n._formRef.current)||void 0===r?void 0:r.getFieldValue(_l.flatCourseGroupOptions),f=p.filter((function(t){return t.groupIndex==e})),h=(null!==(a=null===(i=f[f.length-2])||void 0===i?void 0:i.order)&&void 0!==a?a:0)+1;if(1==f.length&&e>1){var v=p.filter((function(t){return t.groupIndex==e-1}));h=(null!==(d=null===(s=v[v.length-2])||void 0===s?void 0:s.order)&&void 0!==d?d:0)+1}var m=f[f.length-1],g=p.findIndex((function(e){return e.groupIndex==m.groupIndex&&e.order==m.order}));return t(Sl.create({id:re.default.NewGuid(),courseBlock:o,courseBlockId:o.id,description:"BLK"+(null!==(l=null===(c=o.currentDetail)||void 0===c?void 0:c.code)&&void 0!==l?l:"")+" - "+(null===(u=o.currentDetail)||void 0===u?void 0:u.title),groupIndex:e,order:h}),g),new Promise((function(e){e("Course Block Added")}))}return S.b.error("Course Block not selected."),new Promise((function(e,t){t("Course Not Selected")}))}))},n.submitAddCourse=function(e,t){var r,i,o=null===(r=n._addInstitutionCourseFormRef.current)||void 0===r?void 0:r.getValue(),a=[];return a.push(null===(i=n._addInstitutionCourseFormRef.current)||void 0===i?void 0:i.validateFields()),Promise.all(a).then((function(){var r,i,a,s,d,c,l,u,p,f;if(o){var h=null===(r=n._formRef.current)||void 0===r?void 0:r.getFieldValue(_l.flatCourseGroupOptions),v=h.filter((function(t){return t.groupIndex==e})),m=(null!==(a=null===(i=v[v.length-2])||void 0===i?void 0:i.order)&&void 0!==a?a:0)+1;if(1==v.length&&e>1){var g=h.filter((function(t){return t.groupIndex==e-1}));m=(null!==(d=null===(s=g[g.length-2])||void 0===s?void 0:s.order)&&void 0!==d?d:0)+1}var b=v[v.length-1],y=h.findIndex((function(e){return e.groupIndex==b.groupIndex&&e.order==b.order})),O=Il.create(o.institutionCourseDetail);return t(Sl.create({id:re.default.NewGuid(),course:O,courseId:null===(c=o.institutionCourseDetail)||void 0===c?void 0:c.courseId,description:null===(l=o.institutionCourseDetail)||void 0===l?void 0:l.display,credits:{min:null===(u=o.institutionCourseDetail)||void 0===u?void 0:u.totalMaxCredits,max:null===(p=o.institutionCourseDetail)||void 0===p?void 0:p.totalMinCredits},groupIndex:e,order:m,isVariableCredits:null===(f=o.institutionCourseDetail)||void 0===f?void 0:f.variableHours}),y),n.handleCreditsChange(),new Promise((function(e){e("Course Added")}))}return S.b.error("Course not selected."),new Promise((function(e,t){t("Course Not Selected")}))}))},n.editDisciplineFrameworkCourses=function(e){var t,r,i=null===(t=n._disciplineFrameworkCourseSearchRef.current)||void 0===t?void 0:t.getValue(),o=[];return o.push(null===(r=n._addInstitutionCourseFormRef.current)||void 0===r?void 0:r.validateFields()),Promise.all(o).then((function(){var t,r,o,a,s;if(i.institutionCourseId&&i.institutionCourseId!=re.default.Empty()){var d=n._formRef.current,c=null===d||void 0===d?void 0:d.getFieldsValue();if(c.flatCourseGroupOptions[e].courseId,c.flatCourseGroupOptions[e].courseId!=i.institutionCourseId){var l=Il.create(i.institutionCourseDetail);c.flatCourseGroupOptions[e].course=l,c.flatCourseGroupOptions[e].transferMajorDisciplineFrameworkElementId=i.transferMajorDisciplineFrameworkElementId,c.flatCourseGroupOptions[e].courseId=null===(t=i.institutionCourseDetail)||void 0===t?void 0:t.courseId,c.flatCourseGroupOptions[e].description=null===(r=i.institutionCourseDetail)||void 0===r?void 0:r.display,c.flatCourseGroupOptions[e].credits={min:null===(o=i.institutionCourseDetail)||void 0===o?void 0:o.totalMaxCredits,max:null===(a=i.institutionCourseDetail)||void 0===a?void 0:a.totalMinCredits},c.flatCourseGroupOptions[e].isVariableCredits=null===(s=i.institutionCourseDetail)||void 0===s?void 0:s.variableHours;var u=n.state.value;u.flatCourseGroupOptions=c.flatCourseGroupOptions,null===d||void 0===d||d.setFieldsValue(c),n.props.onChange&&n.props.onChange(u,e),n.handleCreditsChange()}return new Promise((function(e){e("Course Edited")}))}return S.b.error("Course not selected."),new Promise((function(e,t){t("Course Not Selected")}))}))},n.submitAddDisciplineFrameworkCourse=function(e,t){var r,i=n._disciplineFrameworkCourseSearchRef.current.getValue(),o=[];return o.push(null===(r=n._disciplineFrameworkCourseSearchRef.current)||void 0===r?void 0:r.validateFields()),Promise.all(o).then((function(){var r,o,a,s,d,c,l,u,p,f;if(i.institutionCourseId&&i.institutionCourseId!=re.default.Empty()){var h=null===(r=n._formRef.current)||void 0===r?void 0:r.getFieldValue(_l.flatCourseGroupOptions),v=h.filter((function(t){return t.groupIndex==e})),m=(null!==(a=null===(o=v[v.length-2])||void 0===o?void 0:o.order)&&void 0!==a?a:0)+1;if(1==v.length&&e>1){var g=h.filter((function(t){return t.groupIndex==e-1}));m=(null!==(d=null===(s=g[g.length-2])||void 0===s?void 0:s.order)&&void 0!==d?d:0)+1}var b=v[v.length-1],y=h.findIndex((function(e){return e.groupIndex==b.groupIndex&&e.order==b.order})),O=Il.create(i.institutionCourseDetail);return t(Sl.create({id:re.default.NewGuid(),course:O,courseId:null===(c=i.institutionCourseDetail)||void 0===c?void 0:c.courseId,description:null===(l=i.institutionCourseDetail)||void 0===l?void 0:l.display,credits:{min:null===(u=i.institutionCourseDetail)||void 0===u?void 0:u.totalMaxCredits,max:null===(p=i.institutionCourseDetail)||void 0===p?void 0:p.totalMinCredits},groupIndex:e,order:m,isVariableCredits:null===(f=i.institutionCourseDetail)||void 0===f?void 0:f.variableHours,transferMajorDisciplineFrameworkElementId:i.transferMajorDisciplineFrameworkElementId}),y),n.handleCreditsChange(),new Promise((function(e){e("Course Added")}))}return S.b.error("Course not selected."),new Promise((function(e,t){t("Course Not Selected")}))}))},n.getAllOptions=function(){var e,t,r,i=null!==(t=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldValue(_l.flatCourseGroupOptions))&&void 0!==t?t:null===(r=n.props.value)||void 0===r?void 0:r.flatCourseGroupOptions;return i&&n.props.readonly&&!n.props.programDisplay&&(i=i.filter((function(e){return null!=e.courseId||null!=e.courseBlockId}))),i},n.addGroup=function(e){var t,r=null===(t=n._formRef.current)||void 0===t?void 0:t.getFieldValue(_l.flatCourseGroupOptions),i=0;null===r||void 0===r||r.forEach((function(e){return i=e.groupIndex>i?e.groupIndex:i})),e(Sl.create({id:re.default.NewGuid(),groupIndex:i+1,order:1e4}))},n.removeOption=function(e,t){e(t),n.handleCreditsChange()},n.removeGroup=function(e,t,r){e(r),n.handleCreditsChange()},n.handleChange=function(){var e,t=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldsValue(),r=n.state.value;r&&(r.flatCourseGroupOptions=t.flatCourseGroupOptions,n.props.onChange&&n.props.onChange(r),n.props.onOptionChange&&n.props.onOptionChange(r)),n.setState({altered:!0,value:null!==r&&void 0!==r?r:_l.create()})},n.handleCreditsChange=function(){var e,t,r,i,o,a,s,d,c,l,u,p,f,h=null!==(e=n.getAllOptions())&&void 0!==e?e:[],v=0,m=0;if((null===h||void 0===h?void 0:h.length)>0){var g=(null!==(t=null===h||void 0===h?void 0:h.filter((function(e){return e.groupOptionTypeId==Ol.MAIN||null==e.groupOptionTypeId})))&&void 0!==t?t:[]).map((function(e){var t,n;return null!==(n=null===(t=null===e||void 0===e?void 0:e.credits)||void 0===t?void 0:t.min)&&void 0!==n?n:0}));g.length>0&&(v=null!==(r=g.reduce((function(e,t){return e+t})))&&void 0!==r?r:0);var b=[];h.forEach((function(e){if(!b.includes(e.groupIndex)){var t=null===h||void 0===h?void 0:h.filter((function(t){return t.groupIndex==e.groupIndex&&t.groupOptionTypeId!=Ol.OPTIONAL&&(null!=t.courseId||null!=t.courseBlockId)}));if(t.findIndex((function(e){return!e.techCore}))<0){var n=t.map((function(e){return e.groupOptionTypeId})),r=null;
1n.forEach((function(e){var n=0,i=t.filter((function(t){return t.groupOptionTypeId===e})).map((function(e){var t,n;return null!==(n=null===(t=e.credits)||void 0===t?void 0:t.min)&&void 0!==n?n:0}));i.forEach((function(e){return n+=e})),(null==n||n<(null!==r&&void 0!==r?r:Number.MAX_SAFE_INTEGER))&&(r=n)})),m+=null!==r&&void 0!==r?r:0,b.push(e.groupIndex)}}})),n.setState({totalTermCredits:v,totalTermTechCoreCredits:m}),n.props.onCreditsChanged&&n.props.onCreditsChanged(n.state.value.order?n.state.value.order:null!==(o=null===(i=n.props.value)||void 0===i?void 0:i.order)&&void 0!==o?o:-1,v,m,n.state.programAward.id&&n.state.programAward.id!=re.default.Empty()?n.state.programAward.id:null!==(s=null===(a=n.props.programAward)||void 0===a?void 0:a.id)&&void 0!==s?s:re.default.Empty()),n.props.onTermLoaded&&n.props.onTermLoaded(null!==(c=null===(d=n.props.value)||void 0===d?void 0:d.id)&&void 0!==c?c:re.default.Empty())}else n.props.onTermLoaded&&0==(null===(u=null===(l=n.props.value)||void 0===l?void 0:l.groups)||void 0===u?void 0:u.length)&&n.props.onTermLoaded(null!==(f=null===(p=n.props.value)||void 0===p?void 0:p.id)&&void 0!==f?f:re.default.Empty())},n.handleFieldChange=function(e){var t,r=n.state.fieldErrors;if(null!=e[0].value&&e[0].touched&&"techCore"==e[0].name[2]){var i=n.getOption(e[0].name[1]);(null!==r&&void 0!==r?r:[])[Tl.techCore+n.state.programAward.order+(null!==(t=n.state.value.order)&&void 0!==t?t:0)+i.groupIndex+i.order]=[],n.setState({fieldErrors:r})}},n.openAddItemPopover=function(e,t){n.setState({showAddItemPopover:n.props.termIndex+""+e+t})},n.closeAddItemPopover=function(){n.setState({showAddItemPopover:null})},n.renderToolTipContent=function(e,t){return Object(o.jsxs)(y.b,Iu({direction:"vertical"},{children:["Please select the option type.",Object(o.jsxs)(y.b,{children:[Object(o.jsx)(rt.a,Iu({onClick:function(){return n.openCourseModal(e,t)}},{children:"Course"}),void 0),Object(o.jsx)(rt.a,Iu({onClick:function(){return n.openCourseBlockModal(e,t)}},{children:"Course Block"}),void 0)]},void 0),n.props.transferMajor?Object(o.jsx)(rt.a,Iu({onClick:function(){return n.openDisciplineFrameworkCourseModal(e,t)}},{children:"Discipline Framework Course"}),void 0):null,Object(o.jsx)(rt.a,Iu({type:"link",onClick:n.closeAddItemPopover},{children:"Close"}),void 0)]}),void 0)},n.render=function(){var e,t,r;if(n.state.loading||n.props.loading)return Object(o.jsx)(pt.a,{active:!0},void 0);var i=null!==(e=n.state.value)&&void 0!==e?e:[];return n.props.readonly&&!n.props.programDisplay&&(i.flatCourseGroupOptions=null!==(r=null===(t=n.state.value.flatCourseGroupOptions)||void 0===t?void 0:t.filter((function(e){return null!=e.courseId||null!=e.courseBlockId})))&&void 0!==r?r:[]),Object(o.jsx)(y.b,Iu({size:"small",direction:"vertical"},{children:Object(o.jsx)(ht.a,Iu({ref:n._formRef,layout:"vertical",initialValues:i,onValuesChange:n.handleChange,onFieldsChange:n.handleFieldChange,requiredMark:!0},{children:Object(o.jsxs)(y.b,Iu({direction:"vertical"},{children:[Object(o.jsx)(ht.a.List,Iu({name:_l.flatCourseGroupOptions},{children:function(e,t){var r,i,a,s,d,c,l,u=t.add,p=t.remove,f=null===(r=n._formRef.current)||void 0===r?void 0:r.getFieldsValue(),h=!1;f&&f.flatCourseGroupOptions&&(null!==(a=null===(i=f.flatCourseGroupOptions)||void 0===i?void 0:i.length)&&void 0!==a?a:0)>0?f.flatCourseGroupOptions.forEach((function(e){var t,r;void 0!=e&&(null===(r=null===(t=n.state.generalEducationTypes)||void 0===t?void 0:t.find((function(t){return e.generalEducationId==t.id})))||void 0===r?void 0:r.embeddedCredits)&&(h=!0)})):n.state.value.flatCourseGroupOptions&&(null===(s=n.state.value)||void 0===s||s.flatCourseGroupOptions.forEach((function(e){var t,r;(null===(r=null===(t=n.state.generalEducationTypes)||void 0===t?void 0:t.find((function(t){return e.generalEducationId==t.id})))||void 0===r?void 0:r.embeddedCredits)&&(h=!0)})));var v=e;return n.props.readonly&&!n.props.programDisplay&&(v=null!==(c=null===(d=n.state.value.flatCourseGroupOptions)||void 0===d?void 0:d.filter((function(e){return null!=e.courseId||null!=e.courseBlockId})))&&void 0!==c?c:[]),Object(o.jsxs)(Pi.a,Iu({ref:n._tableRef,className:"diable-table-hover",dataSource:v,pagination:!1,scroll:{x:500},footer:function(){return Object(o.jsx)("div",{children:n.props.readonly||n.props.programDisplay?null:Object(o.jsx)(rt.a,Iu({onClick:function(){return n.addGroup(u)}},{children:"Add Course/Course Block Group"}),void 0)},void 0)}},{children:[Object(o.jsx)(Pi.a.Column,{title:"",align:"center",width:"27px",dataIndex:Sl.id,ellipsis:n.props.readonly&&!n.props.programDisplay,render:function(e,t,r){var i=n.getAllOptions();if(i){var a=n.getOption(r),s=i.filter((function(e){return e.groupIndex==a.groupIndex}));if(a){var d=s.findIndex((function(e){return e.id==a.id&&(null!=a.c
1ourseId||null!=a.courseBlockId)})),c=60*s.length,l=(null===a||void 0===a?void 0:a.groupIndex)%2==0?"table-span-light":"table-span-dark";return{children:Object(o.jsx)("div",{className:l,style:{height:c}},void 0),props:{rowSpan:0==d||1==s.length?s.length:0}}}}}},void 0),Object(o.jsx)(Pi.a.Column,{title:"Course/Block",width:"350px",dataIndex:Tl.description,ellipsis:n.props.readonly&&!n.props.programDisplay,render:function(e,t,r){var i,a,s,d,c,l,p,f,h,v,m=n.getOption(r);if(null!=m&&(null!=m.description&&""!=m.description||null!=m.title&&(null!=(null===m||void 0===m?void 0:m.courseId)||null!=(null===m||void 0===m?void 0:m.courseBlockId)))){var g=null!=(null===m||void 0===m?void 0:m.courseId)?m.transferMajorDisciplineFrameworkElementId?function(){return n.editDisciplineFrameworkCourseModal(m.groupIndex,r)}:function(){return n.editCourseModal(m.groupIndex,r)}:function(){return n.editCourseBlockModal(m.groupIndex,r)},b=n.props.readonly||n.props.programDisplay||!n.props.isEditing?null:Object(o.jsx)(rt.a,{type:"link",onClick:g,icon:Object(o.jsx)(Ei.a,{},void 0)},void 0),y=m.description?m.description:"";return""==y&&(m.courseId?y=null===(a=null===(i=m.course)||void 0===i?void 0:i.currentDetail)||void 0===a?void 0:a.display:m.courseBlockId&&(y=m.courseBlock&&(null===(s=m.courseBlock)||void 0===s?void 0:s.currentDetail)?"BLK"+(null!==(l=null===(c=null===(d=m.courseBlock)||void 0===d?void 0:d.currentDetail)||void 0===c?void 0:c.code)&&void 0!==l?l:"")+" - "+(null===(f=null===(p=m.courseBlock)||void 0===p?void 0:p.currentDetail)||void 0===f?void 0:f.title):"BLK-"+(null===(v=null===(h=m.courseBlock)||void 0===h?void 0:h.currentDetail)||void 0===v?void 0:v.code))),Object(o.jsxs)("span",{children:[y,b]},void 0)}if(!n.props.readonly&&!n.props.programDisplay&&null==(null===m||void 0===m?void 0:m.courseId)&&null==(null===m||void 0===m?void 0:m.courseBlockId))return Object(o.jsx)("div",{children:Object(o.jsx)(it.a,Iu({placement:"topLeft",trigger:"click",content:n.renderToolTipContent(m.groupIndex,u),visible:n.state.showAddItemPopover==n.props.termIndex+""+m.groupIndex+r,onVisibleChange:function(){return n.openAddItemPopover(m.groupIndex,r)}},{children:Object(o.jsx)(rt.a,Iu({size:"small",type:"link",icon:Object(o.jsx)(Xc.a,{},void 0)},{children:"Add Option"}),void 0)}),void 0)},void 0)}},void 0),Object(o.jsx)(Pi.a.Column,{title:"Credits",dataIndex:Tl.credits,ellipsis:n.props.readonly&&!n.props.programDisplay,width:n.props.readonly||!n.props.isEditing?"125px":"75px",align:"center",render:function(e,t,r){var i,a,s,d=n.getOption(r);if(d&&(null!=d.courseId||null!=d.courseBlockId)){var c=n.getMinMax(d),l="";return!n.props.readonly&&n.props.isEditing||(null!=d.courseBlockId?l=(null===(i=d.credits)||void 0===i?void 0:i.min)+"-"+(null===(a=d.credits)||void 0===a?void 0:a.max):null!=d.courseId&&(l=(null===c||void 0===c?void 0:c.isVariable)?d.credits.min+"-"+d.credits.max:d.credits.min)),Object(o.jsx)(mt.a,Iu({},n.getProgramTermFormItems(r).get(Tl.credits),_t.getValidation(Tl.credits+n.state.programAward.order+(null!==(s=n.state.value.order)&&void 0!==s?s:0)+d.groupIndex+d.order,n.state.fieldErrors,n.state.submitted||n.props.readonly),{children:n.props.readonly||!n.props.isEditing?l:c.isVariable||d.courseBlockId?Object(o.jsx)(Ou,{onChange:n.handleCreditsChange,size:"small",showPrefix:!0,min:c.min,disabled:n.props.readonly||!n.props.isEditing},void 0):c.min||0==c.min?c.min:null}),void 0)}}},void 0),Object(o.jsx)(Pi.a.Column,{title:"Designation",width:"100px",ellipsis:n.props.readonly&&!n.props.programDisplay,dataIndex:Tl.groupOptionTypeId,render:function(e,t,r){var i,a,s=n.getOption(r),d=" Term "+n.props.termIndex+" Group "+s.groupIndex+" Option "+s.order;if(s&&(null!=s.courseId||null!=s.courseBlockId))return n.props.readonly||!n.props.isEditing?null===(i=n.state.groupOptionTypes.find((function(e){return e.id==s.groupOptionTypeId})))||void 0===i?void 0:i.name:Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)("label",{title:"Designation"+d,htmlFor:"Designation"+d},void 0),Object(o.jsx)(mt.a,Iu({},n.getProgramTermFormItems(r).get(Tl.groupOptionTypeId),_t.getValidation(Tl.groupOptionTypeId+n.state.programAward.order+(null!==(a=n.state.value.order)&&void 0!==a?a:0)+s.groupIndex+s.order,n.state.fieldErrors,n.state.submitted||n.props.readonly),{children:Object(o.jsx)(hd,Iu({id:"Designation"+d,onChange:n.handleCreditsChange,size:"small",showArrow:!n.props.readonly,disabled:n.props.readonly||!n.props.isEditing,allowClear:!0,dropdownMatchSelectWidth:!1},{children:n.state.groupOptionTypes.map((function(e){return n.renderGroupOptionType(e)}))}),void 0)}),void 0)]},void 0)}},void 0),n.props.transferMajor?null:Object(o.jsx)(Pi.a.Column,{title:"General Education",width:"150px",ellipsis:n.props.readonly&&!n.props.programDisplay,dataIndex:Tl.generalEducationId,render:function(e,t,r){var i,a,s=n.getOption(r),d=" Term "+n.props.termIndex+" Group "+s.groupIndex+" Option "+s.order;if(s&&(null!=s.courseId||null!=s.courseBlockId))return n.props.readonly||!n.props.isEditing?null===(i=n.state.generalEducationTypes.find((function(e){return e.id==s.generalEducationId})))||void 0===i?void 0:i.name:Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)("label",{title:"General Education"+d,htmlFor:"General Education"+d},void 0),Object(o.jsx)(mt.a,Iu({},n.getProgramTermFormItems(r).get(Tl.generalEducationId),_t.getValidation(Tl.generalEducationId+n.state.programAward.order+(null!==(a=n.state.value.order)&&void 0!==a?a:0)+s.groupIndex+s.order,n.state.fieldErrors,n.state.submitted||n.props.readonly),{children:Object(o.jsx)(hd,Iu({id:"General Education"+d,size:"small",dropdownMatchSelectWidth:!1,showArrow:!n.props.readonly,allowClear:!0,disabled:n.props.readonly||!n.props.isEditing},{children:n.state.generalEducationTypes.map((function(e){return n.renderGeneralEducation(e)}))}),void 0)}),void 0)]},void 0)}},void 0),n.props.transferMajor?null:Object(o.jsx)(Pi.a.Column,{title:"Work Based Learning",width:"150px",ellipsis:n.props.readonly&&!n.props.programDisplay,dataIndex:Tl.workBasedLearningTypeId,render:function(e,t,r){var i,a,s=n.getOption(r),d=" Term "+n.props.termIndex+" Group "+s.groupIndex+" Option "+s.order;if(s&&(null!=s.courseId||null!=s.courseBlockId))return n.props.readonly||!n.props.isEditing?null===(i=n.state.workBasedLearningTypes.find((function(e){return e.id==s.workBasedLearningTypeId})))||void 0===i?void 0:i.name:Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)("label",{title:"Work Based Learning"+d,htmlFor:"Work Based Learning"+d},void 0),Object(o.jsx)(mt.a,Iu({},n.getProgramTermFormItems(r).get(Tl.workBasedLearningTypeId),_t.getValidation(Tl.workBasedLearningTypeId+n.state.programAward.order+(null!==(a=n.state.value.order)&&void 0!==a?a:0)+s.groupIndex+s.order,n.state.fieldErrors,n.state.submitted||n.props.readonly),{children:Object(o.jsx)(hd,Iu({id:"Work Based Learning"+d,size:"small",dropdownMatchSelectWidth:!1,showArrow:!n.props.readonly,allowClear:!0,disabled:n.props.readonly||!n.props.isEditing},{children:n.state.workBasedLearningTypes.map((function(e){return n.renderWorkBasedLearning(e)}
1))}),void 0)}),void 0)]},void 0)}},void 0),(null===(l=n.state.programAward.typeOfProgram)||void 0===l?void 0:l.apsGeneralEducation)?Object(o.jsx)(Pi.a.Column,{title:"APS General Education",width:"170px",ellipsis:n.props.readonly&&!n.props.programDisplay,dataIndex:Tl.apsGeneralEducationId,render:function(e,t,r){var i,a,s=n.getOption(r),d=" Term "+n.props.termIndex+" Group "+s.groupIndex+" Option "+s.order;if(s&&(null!=s.courseId||null!=s.courseBlockId))return n.props.readonly||!n.props.isEditing?null===(i=n.state.apsGeneralEducationType.find((function(e){return e.id==s.apsGeneralEducationId})))||void 0===i?void 0:i.name:Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)("label",{title:"APS General Education"+d,htmlFor:"APS General Education"+d},void 0),Object(o.jsx)(mt.a,Iu({},n.getProgramTermFormItems(r).get(Tl.apsGeneralEducationId),_t.getValidation(Tl.apsGeneralEducationId.toLowerCase()+n.state.programAward.order+(null!==(a=n.state.value.order)&&void 0!==a?a:0)+s.groupIndex+s.order,n.state.fieldErrors,n.state.submitted||n.props.readonly),{children:Object(o.jsx)(hd,Iu({id:"APS General Education"+d,size:"small",showArrow:!n.props.readonly,dropdownMatchSelectWidth:!1,allowClear:!0,disabled:n.props.readonly||!n.props.isEditing},{children:n.state.apsGeneralEducationType.map((function(e){return n.renderAPSGeneralEducation(e)}))}),void 0)}),void 0)]},void 0)}},void 0):null,h?Object(o.jsx)(Pi.a.Column,{title:"Embedded Credits",width:"150px",ellipsis:n.props.readonly&&!n.props.programDisplay,dataIndex:Tl.embeddedCredits,render:function(e,t,r){var i,a,s,d=n.getOption(r);if(d&&(null!=d.courseId||null!=d.courseBlockId)&&((null===(i=d.generalEducation)||void 0===i?void 0:i.embeddedCredits)||(null===(a=n.state.generalEducationTypes.find((function(e){return e.id==d.generalEducationId})))||void 0===a?void 0:a.embeddedCredits))){var c=" Term "+n.props.termIndex+" Group "+d.groupIndex+" Option "+d.order;return n.props.readonly||!n.props.isEditing?d.embeddedCredits:Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)("label",{title:"Embedded Credits"+c,htmlFor:"Embedded Credits"+c},void 0),Object(o.jsx)(mt.a,Iu({},n.getProgramTermFormItems(r).get(Tl.embeddedCredits),_t.getValidation(Tl.embeddedCredits+n.state.programAward.order+(null!==(s=n.state.value.order)&&void 0!==s?s:0)+d.groupIndex+d.order,n.state.fieldErrors,n.state.submitted||n.props.readonly),{children:Object(o.jsx)(Ni.a,{id:"Embedded Credits"+c,size:"small",disabled:n.props.readonly||!n.props.isEditing},void 0)}),void 0)]},void 0)}}},void 0):null,n.props.transferMajor?null:Object(o.jsx)(Pi.a.Column,{title:"Tech Core",ellipsis:n.props.readonly&&!n.props.programDisplay,width:"100px",align:"center",dataIndex:Tl.techCore,render:function(e,t,r){var i,a=n.getOption(r);if(a&&(null!=a.courseId||null!=a.courseBlockId))return Object(o.jsx)(mt.a,Iu({},n.getProgramTermFormItems(r).get(Tl.techCore),_t.getValidation(Tl.techCore+n.state.programAward.order+(null!==(i=n.state.value.order)&&void 0!==i?i:0)+a.groupIndex+a.order,n.state.fieldErrors,n.state.submitted||n.props.readonly),{children:Object(o.jsx)(Hd,{onChange:n.handleCreditsChange,readonly:n.props.readonly||!n.props.isEditing,disabled:n.props.readonly||!n.props.isEditing,size:"small"},void 0)}),void 0)}},void 0),n.props.transferMajor?Object(o.jsx)(Pi.a.Column,{title:"General Education",width:"150px",dataIndex:Tl.transferMajorGeneralEducationTypeId,ellipsis:n.props.readonly&&!n.props.programDisplay,render:function(e,t,r){var i,a,s=n.getOption(r);if(s&&(null!=s.courseId||null!=s.courseBlockId)){var d=" Term "+n.props.termIndex+" Group "+s.groupIndex+" Option "+s.order;return n.props.readonly||!n.props.isEditing?null===(i=n.state.generalEducationCategory.find((function(e){return e.id==s.transferMajorGeneralEducationTypeId})))||void 0===i?void 0:i.name:Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)("label",{title:"General Education"+d,htmlFor:"General Education"+d},void 0),Object(o.jsx)(mt.a,Iu({},n.getProgramTermFormItems(r).get(Tl.transferMajorGeneralEducationTypeId),_t.getValidation(Tl.transferMajorGeneralEducationTypeId+n.state.programAward.order+(null!==(a=n.state.value.order)&&void 0!==a?a:0)+s.groupIndex+s.order,n.state.fieldErrors,n.state.submitted||n.props.readonly),{children:Object(o.jsx)(hd,Iu({id:"General Education"+d,size:"small",dropdownMatchSelectWidth:!1,showArrow:!n.props.readonly,allowClear:!0,disabled:n.props.readonly||!n.props.isEditing},{children:n.state.generalEducationCategory.map((function(e){return n.renderTransferMajorGeneralEducationCategory(e)}))}),void 0)}),void 0)]},void 0)}}},void 0):null,n.props.transferMajor?Object(o.jsx)(Pi.a.Column,{title:"LACTS Category",width:"150px",dataIndex:Tl.transferMajorLactsCategoryId,ellipsis:n.props.readonly&&!n.props.programDisplay,render:function(e,t,r){var i,a,s=n.getOption(r);if(s&&(null!=s.courseId||null!=s.courseBlockId)){var d=" Term "+n.props.termIndex+" Group "+s.groupIndex+" Option "+s.order;return n.props.readonly||!n.props.isEditing?null===(i=n.state.transferMajorLactsCategories.find((function(e){return e.id==s.transferMajorLactsCategoryId})))||void 0===i?void 0:i.name:Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)("label",{title:"LACTS Category"+d,htmlFor:"LACTS Category"+d},void 0),Object(o.jsx)(mt.a,Iu({},n.getProgramTermFormItems(r).get(Tl.transferMajorLactsCategoryId),_t.getValidation(Tl.transferMajorLactsCategoryId+n.state.programAward.order+(null!==(a=n.state.value.order)&&void 0!==a?a:0)+s.groupIndex+s.order,n.state.fieldErrors,n.state.submitted||n.props.readonly),{children:Object(o.jsx)(hd,Iu({id:"LACTS Category"+d,size:"small",dropdownMatchSelectWidth:!1,showArrow:!n.props.readonly,allowClear:!0,disabled:n.props.readonly||!n.props.isEditing},{children:n.state.transferMajorLactsCategories.map((function(e){return n.renderTransferMajorLactsCategories(e)}))}),void 0)}),void 0)]},void 0)}}},void 0):null,n.props.transferMajor?Object(o.jsx)(Pi.a.Column,{title:"Discipline Framework Element",width:"150px",ellipsis:n.props.readonly&&!n.props.programDisplay,dataIndex:Tl.transferMajorDisciplineFrameworkElementId,render:function(e,t,r){var i,o,a=n.getOption(r);
1if(a&&(null!=a.courseId||null!=a.courseBlockId))return null===(o=null===(i=n.state.disciplineFrameworkElement)||void 0===i?void 0:i.find((function(e){return e.id==a.transferMajorDisciplineFrameworkElementId})))||void 0===o?void 0:o.name}},void 0):null,Object(o.jsx)(Pi.a.Column,{title:"Footnote",width:"250px",ellipsis:n.props.readonly&&!n.props.programDisplay,dataIndex:Tl.footnote,render:function(e,t,r){var i,a=n.getOption(r);if(a&&(null!=a.courseId||null!=a.courseBlockId)){var s=" Term "+n.props.termIndex+" Group "+a.groupIndex+" Option "+a.order;return a.footnote?Object(o.jsx)(Ws.a,Iu({title:a.footnote,placement:"bottomLeft"},{children:Object(o.jsx)(mt.a,Iu({},n.getProgramTermFormItems(r).get(Tl.footnote),_t.getValidation(Tl.footnote+n.state.programAward.order+(null!==(i=n.state.value.order)&&void 0!==i?i:0)+a.groupIndex+a.order,n.state.fieldErrors,n.state.submitted||n.props.readonly),{children:Object(o.jsxs)(y.b,Iu({id:"Footnote"+s,direction:"horizontal"},{children:[a.footnote,!n.props.readonly&&n.props.isEditing?Object(o.jsx)(rt.a,{size:"small",type:"link",onClick:function(){return n.openFootnoteModal(r)},icon:Object(o.jsx)(Ei.a,{},void 0)},void 0):null]}),void 0)}),void 0)}),void 0):!n.props.readonly&&n.props.isEditing?Object(o.jsx)(rt.a,Iu({size:"small",type:"link",onClick:function(){return n.openFootnoteModal(r)},icon:Object(o.jsx)(Xc.a,{},void 0)},{children:"Add Note"}),void 0):null}}},void 0),n.props.programDisplay||n.props.readonly?null:Object(o.jsx)(Pi.a.Column,{title:"Remove Option",ellipsis:n.props.readonly&&!n.props.programDisplay,sorter:!1,width:"15px",render:function(e,t,r){var i=n.getOption(r);if(i&&(null!=i.courseId||null!=i.courseBlockId)&&!n.props.readonly&&!n.props.programDisplay)return Object(o.jsx)(Ws.a,Iu({placement:"left",title:"Remove Option"},{children:Object(o.jsx)(rt.a,{icon:Object(o.jsx)(Yd.a,{},void 0),onClick:function(){return n.removeOption(p,r)},type:"link"},void 0)}),void 0)}},void 0),n.props.programDisplay||n.props.readonly?null:Object(o.jsx)(Pi.a.Column,{title:"Remove Group",dataIndex:Sl.id,ellipsis:n.props.readonly&&!n.props.programDisplay,align:"center",width:"10px",render:function(e,t,r){var i=n.getAllOptions();if(i){var a=n.getOption(r),s=i.filter((function(e){return e.groupIndex==a.groupIndex})),d=0;i.forEach((function(e){(null===e||void 0===e?void 0:e.groupIndex)<a.groupIndex&&(d+=1)}));var c=d,l=[];if(s.forEach((function(){l.push(c++)})),a){var u=s.findIndex((function(e){return e.id==a.id&&(null!=a.courseId||null!=a.courseBlockId)})),f=60*s.length,h=(null===a||void 0===a?void 0:a.groupIndex)%2==0?"table-span-light":"table-span-dark";return{children:Object(o.jsx)("div",Iu({className:h,style:{height:f,width:35}},{children:n.props.readonly||n.props.programDisplay?null:Object(o.jsx)(Ws.a,Iu({placement:"left",title:"Remove Group"},{children:Object(o.jsx)(rt.a,{style:{position:"absolute",top:0,bottom:0,marginTop:"auto",marginBottom:"auto",marginLeft:"-15px",marginRight:"0"},className:"ant-btn-link-light",type:"link",onClick:function(){return n.removeGroup(p,a.groupIndex,l)},icon:Object(o.jsx)(yl.a,{},void 0)},void 0)}),void 0)}),void 0),props:{rowSpan:0==u||1==s.length?s.length:0}}}}}},void 0)]}),void 0)}}),void 0),Object(o.jsxs)("b",{children:[" Total Credits: ",n.state.totalTermCredits]},void 0),n.props.transferMajor?null:Object(o.jsxs)("b",{children:["Total Tech Core Credits: ",n.state.totalTermTechCoreCredits]},void 0)]}),void 0)}),void 0)}),void 0)},n.renderErrors=function(){if(n.state.error)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:n.state.message},void 0)},n.state={apsGeneralEducationType:[],value:_l.create(),programAward:nl.create(),groupOptionTypes:[],generalEducationTypes:[],transferMajorCourseBlocks:[],transferMajorLactsCategories:[],otherTerms:[],disciplineFrameworkElement:[],generalEducationCategory:[],totalTermCredits:0,totalTermTechCoreCredits:0,workBasedLearningTypes:[],showAddItemPopover:""},n}return ju(t,e),t.prototype.componentDidMount=function(){var e,t,n=this;if(this.props.value&&this.props.value!=this.state.value){this.setState({value:this.props.value,programAward:null!==(e=this.props.programAward)&&void 0!==e?e:nl.create(),fieldErrors:this.props.fieldErrors,submitted:this.props.submitted},(function(){return n.resetForm()}));var r={};if(r[_l.flatCourseGroupOptions]=this.props.value.flatCourseGroupOptions,null===(t=this._formRef.current)||void 0===t||t.setFieldsValue(r),this._tableRef.current)this._tableRef.current.querySelector("table").tabIndex=0;this.setState({fieldErrors:this.props.fieldErrors,submitted:this.props.submitted}),this.fetchData()}},t.prototype.componentDidUpdate=function(e){var t,n,r,i,o=this;if(this.props.value&&this.props.value.flatCourseGroupOptions!=(null===(t=e.value)||void 0===t?void 0:t.flatCourseGroupOptions)){this.fetchData(),this.handleCreditsChange(),this.setState({value:this.props.value,programAward:null!==(n=this.props.programAward)&&void 0!==n?n:nl.create(),fieldErrors:this.props.fieldErrors,submitted:this.props.submitted},(function(){return o.resetForm()}));var a={};a[_l.flatCourseGroupOptions]=this.props.value.flatCourseGroupOptions,null===(r=this._formRef.current)||void 0===r||r.setFieldsValue(a)}(this.props.loading!=e.loading&&this.setState({loading:this.props.loading}),this.props.programAward!=e.programAward&&this.setState({programAward:null!==(i=this.props.programAward)&&void 0!==i?i:nl.create()}),this.props.fieldErrors==e.fieldErrors&&this.props.submitted==e.submitted||this.setState({fieldErrors:this.props.fieldErrors,submitted:this.props.submitted}),this._tableRef.current)&&(this._tableRef.current.querySelector("table").tabIndex=0)},t.prototype.editCourseModal=function(e,t){var n,r=this,i=this._formRef.current,a=(null===i||void 0===i?void 0:i.getFieldsValue()).flatCourseGroupOptions[t],s=a.course;f.a.confirm({title:"Select Course",content:Object(o.jsx)(mu,{existingCourseId:a.courseId,value:{institutionCourseId:s.institutionCourseId},ref:this._addInstitutionCourseFormRef,institutionId:null!==(n=this.props.selectedInstitution)&&void 0!==n?n:re.default.Empty(),installTerm:this.props.installTerm},void 0),onOk:function(){return r.editCourse(t)},width:1e3})},t.prototype.editCourseBlockModal=function(e,t){var n,r=this,i=this._formRef.current,a=(null===i||void 0===i?void 0:i.getFieldsValue()).flatCourseGroupOptions[t];f.a.confirm({title:"Select Course Block",content:Object(o.jsx)(iu,{courseBlockId:a.courseBlockId,ref:this._addCourseBlockFormRef,institutionId:null!==(n=this.props.selectedInstitution)&&void 0!==n?n:re.default.Empty()},void 0),onOk:function(){return r.editCourseBlock(t)},width:1e3})},t.prototype.openFootnoteModal=function(e){var t,n,r,i,a=this,s=null===(t=this._formRef.current)||void 0===t?void 0:t.getFieldValue(_l.flatCourseGroupOptions);f.a.confirm({title:"Edit Footnote",content:Object(o.jsx)(Hl,{ref:this._footnoteFormRef,footnote:null!==(r=null===(n=s[e])||void 0===n?void 0:n.footnote)&&void 0!==r?r:"",institutionId:null!==(i=this.props.selectedInstitution)&&void 0!==i?i:re.default.Empty()},void 0),onOk:function(){return a.submitFootnote(e)},width:1e3})},t.prototype.openCourseBlockModal=function(e,t){var n,r=this;this.setState({showAddItemPopover:null}),f.a.confirm({title:"Select Course Block",content:Object(o.jsx)(iu,{ref:this._addCourseBlockFormRef,institutionId:null!==(n=this.props.selectedInstitution)&&void 0!==n?n:re.default.Empty()},void 0),onOk:function(){return r.submitAddCourseBlock(e,t)},width:1e3})},t.prototype.openCourseModal=function(e,t){var n,r=this;this.setState({showAddItemPopover:null}),f.a.confirm({title:"Select Course",content:Object(o.jsx)(mu,{ref:this._addInstitutionCourseFormRef,institutionId:null!==(n=this.props.selectedInstitution)&&void 0!==n?n:re.default.Empty(),installTerm:this.props.installTerm},void 0),onOk:function(){return r.submitAddCourse(e,t)},width:1e3})},t.prototype.openDisciplineFrameworkCourseModal=function(e,t){var n,r=this;return this.setState({showAddItemPopover:null}),f.a.confirm({title:"Select Course",content:Object(o.jsx)(Vl,{ref:this._disciplineFrameworkCourseSearchRef,institutionId:null!==(n=this.props.selectedInstitution)&&void 0!==n?n:re.default.Empty(),installTerm:this.props.installTerm},void 0),onOk:function(){return r.submitAddDisciplineFrameworkCourse(e,t)},width:1e3})},t.prototype.editDisciplineFrameworkCourseModal=function(e,t){var n,r=this,i=this._formRef.current,a=(null===i||void 0===i?void 0:i.getFieldsValue()).flatCourseGroupOptions[t];f.a.confirm({title:"Select Course",content:Object(o.jsx)(Vl,{ref:this._disciplineFrameworkCourseSearchRef,existingCourseId:a.courseId,transferMajorDisciplineFrameworkElementId:a.transferMajorDisciplineFrameworkElementId,institutionId:null!==(n=this.props.selectedInstitution)&&void 0!==n?n:re.default.Empty(),installTerm:this.props.installTerm},void 0),onOk:function(){return r.editDisciplineFrameworkCourses(t)},width:1e3})},t.prototype.renderInstitutionCourse=function(e){var t,n,r,i,a,s,d;if(e.id){var c=0==(null!==(n=null===(t=e.course)||void 0===t?void 0:t.courseDetails)&&void 0!==n?n:[]).length?"":(null!==(i=null===(r=e.course)||void 0===r?void 0:r.courseDetails)&&void 0!==i?i:[])[0].title;return Object(o.jsxs)(pr.a.Option,Iu({value:null!==(a=e.id)&&void 0!==a?a:re.default.Empty()},{children:[c," - ",null===(s=e.course)||void 0===s?void 0:s.display]}),null!==(d=e.id)&&void 0!==d?d:re.default.Empty())}},t.prototype.renderInstitutionCourseBlocks=function(e){var t,n,r;if(e.id)return Object(o.jsx)(pr.a.Option,Iu({value:null!==(t=e.id)&&void 0!==t?t:re.default.Empty()},{children:null===(n=e.currentDetail)||void 0===n?void 0:n.title}),null!==(r=e.id)&&void 0!==r?r:re.default.Empty())},t.prototype.renderGroupOptionType=function(e){var t,n;if(e.id)return Object(o.jsx)(pr.a.Option,Iu({value:null!==(t=e.id)&&void 0!==t?t:re.default.Empty()},{children:e.name}),null!==(n=e.id)&&void 0!==n?n:re.default.Empty())},t.prototype.renderTransferMajorCourseBlock=function(e){var t,n;if(e.id)return Object(o.jsx)(pr.a.Option,Iu({value:null!==(t=e.id)&&void 0!==t?t:re.default.Empty()},{children:e.name}),null!==(n=e.id)&&void 0!==n?n:re.default.Empty())},t.prototype.renderTransferMajorLactsCategories=function(e){var t,n;if(e.id)return Object(o.jsx)(pr.a.Option,Iu({value:null!==(t=e.id)&&void 0!==t?t:re.default.Empty()},{children:e.name}),null!==(n=e.id)&&void 0!==n?n:re.default.Empty())},t.prototype.renderTransferMajorGeneralEducationCategory=function(e){var t,n;if(e.id)return Object(o.jsx)(pr.a.Option,Iu({value:null!==(t=e.id)&&void 0!==t?t:re.default.Empty()},{children:e.name}),null!==(n=e.id)&&void 0!==n?n:re.default.Empty())},t.prototype.renderTransferMajorDisciplineFrameworkElement=function(e){var t,n;if(e.id)return Object(o.jsx)(pr.a.Option,Iu({value:null!==(t=e.id)&&void 0!==t?t:re.default.Empty()},{children:e.name}),null!==(n=e.id)&&void 0!==n?n:re.default.Empty())},t.prototype.renderGeneralEducation=function(e){var t,n;if(e.id)return Object(o.jsx)(pr.a.Option,Iu({value:null!==(t=e.id)&&void 0!==t?t:re.default.Empty()},{children:e.name}),null!==(n=e.id)&&void 0!==n?n:re.default.Empty())},t.prototype.renderWorkBasedLearning=function(e){var t,n;if(e.id)return Object(o.jsx)(pr.a.Option,Iu({value:null!==(t=e.id)&&void 0!==t?t:re.default.Empty()},{children:e.name}),null!==(n=e.id)&&void 0!==n?n:re.default.Empty())}
1,t.prototype.renderAPSGeneralEducation=function(e){var t,n;if(e.id)return Object(o.jsx)(pr.a.Option,Iu({value:null!==(t=e.id)&&void 0!==t?t:re.default.Empty()},{children:e.name}),null!==(n=e.id)&&void 0!==n?n:re.default.Empty())},t}(a.Component),Eu=Su,Ru=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),_u=function(){return _u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},_u.apply(this,arguments)},Tu=function(e){function t(t){var n=e.call(this,t)||this;return n.termIdentifier="term",n.handleChanged=function(e){n.props.onChange&&n.props.onChange(e)},n.handleTermChanged=function(e){n.handleChanged(e)},n.handleTermChange=function(e){n.setState({termId:e})},n.handleClick=function(e){var t,r;n.toggleOpen(e,!(null!==(r=null===(t=n.state.openSelect)||void 0===t?void 0:t.get(e))&&void 0!==r&&r))},n.handleBlur=function(e){n.toggleOpen(e,!1)},n.toggleOpen=function(e,t){var r=n.state.openSelect;r.set(n.termIdentifier,!1),r.set(e,t),n.setState({openSelect:r})},n.state={termId:"",terms:[],openSelect:new Map},n}return Ru(t,e),t.prototype.componentDidMount=function(){var e;this.loadTerms();var t=this.state.openSelect;t.set(this.termIdentifier,!1),this.setState({termId:null!==(e=this.props.value)&&void 0!==e?e:"",openSelect:t})},t.prototype.loadTerms=function(){var e=this;ce.getAll(Rs.className).then((function(t){e.setState({terms:t})}))},t.prototype.componentDidUpdate=function(e){this.props.value&&this.props.value!=e.value&&this.setState({termId:this.props.value})},t.prototype.render=function(){var e,t=this,n=this.state.termId==re.default.Empty()||""==this.state.termId?void 0:this.state.termId;return Object(o.jsx)("div",{children:this.props.readOnly?Object(o.jsx)(y.b,_u({direction:"horizontal"},{children:Object(o.jsx)(ud,{value:null===(e=this.state.terms.find((function(e){return e.id==n})))||void 0===e?void 0:e.name},void 0)}),void 0):Object(o.jsx)(ut.a.Group,_u({compact:!0},{children:Object(o.jsx)("label",_u({title:"Term",htmlFor:this.termIdentifier},{children:Object(o.jsx)(hd,_u({dropdownMatchSelectWidth:!1,showArrow:!this.props.disabled,disabled:this.props.disabled||this.props.readOnly,value:n,onSelect:this.handleTermChanged,onChange:this.handleTermChanged,placeholder:"Term",allowClear:!0},{children:this.state.terms.map((function(e){return t.renderTermOption(e)}))}),void 0)}),void 0)}),void 0)},void 0)},t.prototype.renderTermOption=function(e){if(e.id&&e.name)return Object(o.jsx)(pr.a.Option,_u({"aria-label":e.name,title:e.name,value:e.id},{children:e.name}),e.id)},t}(a.Component),Cu=Tu,xu=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Au=function(){return Au=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Au.apply(this,arguments)},Pu=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._programTermEditor=a.createRef(),n.termsLoaded=!1,n.getNewProgramFormItems=function(e){return(new Map).set(zc.prerequisite,{name:zc.prerequisite,label:"Does this award have any prerequisites?"}).set(zc.terms,{name:[e,zc.terms]}).set(zc.terms,{name:[e,zc.terms]})},n.getProgramTermsFormItems=function(e){return(new Map).set(ml.informationalContent,{label:"Term Description",name:[e,ml.informationalContent]}).set(ml.termId,{label:"Term Type",name:[e,ml.termId]})},n.allTermsLoaded=function(){var e=!1;return n.state.termLoading.forEach((function(t){t.valueOf()&&(e=!0)})),e},n.onTermLoaded=function(e){var t=n.state.termLoading;t.set(e,!1),n.setState({termLoading:t})},n.resetForm=function(){var e;n.setState({altered:!1}),null===(e=n._formRef.current)||void 0===e||e.resetFields([zc.terms])},n.ValidateStep11=function(){n.setState({loading:!0,validating:!0});var e=0,t=0;
1n.state.totalCredits.forEach((function(t){return e+=t})),n.state.totalTechCoreCredits.forEach((function(e){return t+=e}));var r=hl({changeRequestId:n.props.changeRequestId,programAward:n.state.newProgramAward,totalCredits:e,totalTechCoreCredits:t});return Fc.validateNewProgramChangeRequestStep11(r).then((function(e){var t;if(e){var r=null!==(t=n.state.fieldErrors)&&void 0!==t?t:{};for(var i in e.fieldErrors)r[i]||(r[i]=e.fieldErrors[i]);n.props.onIsValid&&n.props.onIsValid(e.succeeded),n.setState({fieldErrors:n.props.changeRequestDetailsPage?null:r},(function(){return n.resetForm()}))}})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.loadChangeRequest=function(){n.setState({loading:!0});var e=ll({changeRequestId:n.props.changeRequestId,programAwardId:n.props.awardId}),t=[];return Fc.getStep11(e).then((function(e){var r,i,o,a,s,d,c,l,u,p;if(e){var f=null!==(a=null===(o=null===(i=null===(r=e.changeRequest)||void 0===r?void 0:r.newProgramChangeRequest)||void 0===i?void 0:i.newProgramProgramAwards)||void 0===o?void 0:o.find((function(e){return e.id==n.props.awardId})))&&void 0!==a?a:zc.create();null!=(null===f||void 0===f?void 0:f.terms)||n.props.readonly||(f.terms=[gl.create({order:1})]),0!=(null===(s=null===f||void 0===f?void 0:f.terms)||void 0===s?void 0:s.length)||n.props.readonly||f.terms.push(gl.create({order:1})),t=null!==(c=null===(d=f.terms)||void 0===d?void 0:d.map((function(e){return e.id})))&&void 0!==c?c:[],n.setState({changeRequest:null!==(l=e.changeRequest)&&void 0!==l?l:$a.create(),newProgramChangeRequest:null!==(p=null===(u=e.changeRequest)||void 0===u?void 0:u.newProgramChangeRequest)&&void 0!==p?p:Wc.create(),newProgramAward:f,fieldErrors:n.props.changeRequestDetailsPage?null:e.fieldErrors},(function(){return n.resetForm()}))}})).catch((function(){n.setState({error:!0,message:"Could not load change request."})})).finally((function(){if(0==t.length)n.setState({allTermsLoaded:!0});else{var e=[];t.forEach((function(t){return e.push(n.loadTerm(null!==t&&void 0!==t?t:re.default.Empty()))})),Promise.all(e).then((function(){n.termsLoaded=!0,n.resetForm()}))}}))},n.loadTerm=function(e){var t=n.state.termLoading;t.set(e,!0),n.setState({termLoading:t});var r=ul({changeRequestId:n.props.changeRequestId,programAwardId:n.props.awardId,institutionId:n.props.selectedInstitution,termId:e});return Fc.getStep11Term(r).then((function(e){var t,r,i,o;if(e){var a=n.state.newProgramAward;a.terms&&(a.terms[null!==(r=null===(t=a.terms)||void 0===t?void 0:t.findIndex((function(t){var n;return t.order==(null===(n=e.term)||void 0===n?void 0:n.order)})))&&void 0!==r?r:0]=null!==(i=e.term)&&void 0!==i?i:ml.create());var s=null!==(o=n.state.fieldErrors)&&void 0!==o?o:{};for(var d in e.fieldErrors)s[d]=e.fieldErrors[d];n.setState({newProgramAward:a,fieldErrors:n.props.changeRequestDetailsPage?null:s,allTermsLoaded:!1},(function(){return n.resetForm()}))}})).catch((function(){n.setState({error:!0,message:"Could not load change request."})})).finally((function(){if(e==re.default.Empty()){var t=n.state.termLoading;t.set(e,!1),n.setState({termLoading:t})}}))},n.calculateTotalCredits=function(e,t,r){var i=n.state.totalCredits;(i=i||(new Map).set(e,t)).set(e,t);var o=n.state.totalTechCoreCredits;(o=o||(new Map).set(e,r)).set(e,r),n.setState({totalCredits:i,totalTechCoreCredits:o})},n.handleChange=function(e){n.setState({altered:e})},n.handleSave=function(){n.setState({saving:!0});for(var e=zc.create(n._formRef?n._formRef.current.getFieldsValue():null),t=[],r=0;r<e.terms.length;r++){var i=e.terms[r];e.terms[r][zc.terms]?((i=e.terms[r][zc.terms])[ml.informationalContent]=e.terms[r][ml.informationalContent],i[ml.termId]=e.terms[r][ml.termId],i[vl.order]=e.terms[r][vl.order]):((i=e.terms[r])[ml.informationalContent]=e.terms[r][ml.informationalContent],i[ml.termId]=e.terms[r][ml.termId],i[vl.order]=e.terms[r][vl.order]),t.push(i)}e.terms=t,e[zc.id]=n.props.awardId;var o=zc.create(e),a=0,s=0;n.state.totalCredits.forEach((function(e){return a+=e})),n.state.totalTechCoreCredits.forEach((function(e){return s+=e}));var d=pl({newProgramAward:o,changeRequestId:n.state.changeRequest.i
1d,totalCredits:a,totalTechCoreCredits:s});Fc.saveStep11(d).then((function(e){var t,r,i,o,a,s,d,c,l,u,p,f;if(null===e||void 0===e?void 0:e.succeeded){S.b.success("Saved");var h=null!==(o=null===(i=null===(r=null===(t=e.changeRequest)||void 0===t?void 0:t.newProgramChangeRequest)||void 0===r?void 0:r.newProgramProgramAwards)||void 0===i?void 0:i.find((function(e){return e.id==n.props.awardId})))&&void 0!==o?o:zc.create();n.setState({changeRequest:null!==(a=e.changeRequest)&&void 0!==a?a:$a.create(),newProgramChangeRequest:null!==(d=null===(s=e.changeRequest)||void 0===s?void 0:s.newProgramChangeRequest)&&void 0!==d?d:Wc.create(),newProgramAward:null!==(p=null===(u=null===(l=null===(c=e.changeRequest)||void 0===c?void 0:c.newProgramChangeRequest)||void 0===l?void 0:l.newProgramProgramAwards)||void 0===u?void 0:u.find((function(e){return e.id==n.props.awardId})))&&void 0!==p?p:zc.create()}),null===(f=n._formRef.current)||void 0===f||f.setFieldsValue({terms:h.terms}),n.resetForm()}else n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Save Failed")})).catch((function(e){n.setState({error:e}),S.b.error("Save Failed")})).finally((function(){n.setState({loading:!1,saving:!1})}))},n.handleSubmit=function(){var e,t,r;n.setState({submitting:!0});for(var i=zc.create(n._formRef?n._formRef.current.getFieldsValue():null),o=[],a=0;a<i.terms.length;a++){var s=i.terms[a];i.terms[a][zc.terms]?((s=i.terms[a][zc.terms])[vl.order]=i.terms[a][vl.order],s[ml.informationalContent]=i.terms[a][ml.informationalContent],s[ml.termId]=i.terms[a][ml.termId],s[ml.programAwardId]=null!==(e=n.props.awardId)&&void 0!==e?e:re.default.Empty()):((s=i.terms[a])[vl.order]=i.terms[a][vl.order],s[ml.informationalContent]=i.terms[a][ml.informationalContent],s[ml.termId]=i.terms[a][ml.termId],s[ml.programAwardId]=null!==(t=n.props.awardId)&&void 0!==t?t:re.default.Empty()),o.push(s)}i.terms=o,i[zc.id]=n.props.awardId,i[zc.awardType]=null===(r=n.state.newProgramAward)||void 0===r?void 0:r.awardType,i[zc.awardTypeId]=n.state.newProgramAward.awardTypeId,i[zc.newProgramChangeRequestId]=n.state.newProgramChangeRequest.id;var d=zc.create(i);d.order=n.state.newProgramAward.order;var c=0,l=0;n.state.totalCredits.forEach((function(e){return c+=e})),n.state.totalTechCoreCredits.forEach((function(e){return l+=e}));var u=fl({newProgramAward:d,changeRequestId:n.state.changeRequest.id,totalCredits:c,totalTechCoreCredits:l});Fc.submitStep11(u).then((function(e){var t;(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.props.onSubmit&&n.props.onSubmit(),n.props.onSave&&(e.changeRequest&&n.props.onSave(null!==(t=e.changeRequest.id)&&void 0!==t?t:re.default.Empty()),n.resetForm())):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Save Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Save Failed")})).finally((function(){n.setState({loading:!1,submitting:!1,submitted:!0})}))},n.handleNewAwardPrequisiteOnClick=function(e){var t,r,i,o,a=n._formRef?n._formRef.current.getFieldsValue():null,s=n.state.newProgramAward,d=a.terms,c=[];if(e)c.push(gl.create({order:0})),c.pushAll(d),null===(t=n._formRef.current)||void 0===t||t.resetFields([0,zc.terms]);else if(1==s.prerequisite){var l=n.state.totalCredits,u=n.state.totalTechCoreCredits;u.delete(0),l.delete(0),n.setState({totalCredits:l,totalTechCoreCredits:u}),null===d||void 0===d||d.remove(d[0]),c.pushAll(d)}else c.pushAll(d);null===(r=s.terms)||void 0===r||r.removeAll(s.terms),null===(i=s.terms)||void 0===i||i.pushAll(c),s.prerequisite=e,null===(o=n._formRef.current)||void 0===o||o.setFieldsValue({terms:s.terms}),n.setState({newProgramAward:s})},n.addTerm=function(e,t){t(gl.create({order:e&&0!=e.length&&void 0!=e[e.length-1]?e[e.length-1].order+1:1}))},n.removeTerm=function(e,t,r){var i=n.state.totalCredits,o=n.state.totalTechCoreCredits,a=r?e.name:e.name+1;i.delete(a),o.delete(a),n.setState({totalCredits:i,totalTechCoreCredits:o}),t(e.name)}
1,n.renderCreditLimitErrors=function(){var e;if(n.state.fieldErrors)return null===(e=_t.getValidation("awardCredits"+n.state.newProgramAward.order,n.state.fieldErrors,n.state.submitted||n.props.readonly))||void 0===e?void 0:e.messages.map((function(e){return n.renderErrors(e)}))},n.renderTechCoreCreditsErrors=function(){var e;if(n.state.fieldErrors)return null===(e=_t.getValidation("techCoreCredits"+n.state.newProgramAward.order,n.state.fieldErrors,n.state.submitted||n.props.readonly))||void 0===e?void 0:e.messages.map((function(e){return n.renderErrors(e)}))},n.renderTermsErrors=function(){var e;if(n.state.fieldErrors)return null===(e=_t.getValidation("termData"+n.state.newProgramAward.order,n.state.fieldErrors,n.state.submitted||n.props.readonly))||void 0===e?void 0:e.messages.map((function(e){return n.renderErrors(e)}))},n.renderErrors=function(e){return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:e||n.state.message},void 0)},n.state={addTerm:!1,changeRequest:$a.create(),changeRequests:[],newProgramChangeRequest:Wc.create(),newProgramAward:zc.create(),existingProgramTerms:[],validating:!1,allTermsLoaded:!1,termLoading:new Map,totalCredits:new Map,totalTechCoreCredits:new Map},n}return xu(t,e),t.prototype.componentDidMount=function(){var e=this;if(this.props.changeRequestId&&this.props.changeRequestId!=re.default.Empty()){this.setState({loading:!0});var t=[];t.push(this.loadChangeRequest()),Promise.all(t).then((function(){e.setState({loading:!1}),e.resetForm()}))}},t.prototype.componentDidUpdate=function(e){var t,n=this;this.props.changeRequestId&&this.props.changeRequestId!=re.default.Empty()&&e.changeRequestId!=this.props.changeRequestId&&((t=[]).push(this.loadChangeRequest()),Promise.all(t).then((function(){n.setState({loading:!1}),n.resetForm()})));this.props.review&&!this.allTermsLoaded()&&!this.state.allTermsLoaded&&this.termsLoaded&&!this.state.validating&&this.state.termLoading.size>0&&this.state.newProgramAward.id!=re.default.Empty()&&((t=[]).push(this.ValidateStep11()),Promise.all(t).then((function(){n.setState({loading:!1,allTermsLoaded:!0,validating:!1})})))},t.prototype.render=function(){return this.state.loading||void 0==this.state.loading||this.props.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsx)(y.b,Au({size:"small",direction:"vertical"},{children:Object(o.jsx)(ht.a,Au({ref:this._formRef,layout:"vertical",initialValues:this.state.newProgramAward,onFinish:this.handleSubmit,requiredMark:!0},{children:Object(o.jsxs)(y.b,Au({direction:"vertical"},{children:[Object(o.jsx)(mt.a,Au({},this.getNewProgramFormItems(0).get(zc.prerequisite),_t.getValidation(zc.prerequisite+this.state.newProgramAward.order,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(Hd,{disabled:this.props.readonly,onChange:this.handleNewAwardPrequisiteOnClick},void 0)}),void 0),this.renderProgramTerm(),this.renderTermsErrors(),this.renderCreditLimitErrors(),this.renderTechCoreCreditsErrors(),this.renderActions()]}),void 0)}),void 0)}),void 0)},t.prototype.renderActions=function(){if(!this.props.readonly)return Object(o.jsxs)(y.b,Au({direction:"horizontal",wrap:!0},{children:[Object(o.jsx)(rs,{onClick:this.props.onPrevious},void 0),Object(o.jsx)(ss,{htmlType:"submit",submitting:this.state.submitting},void 0),Object(o.jsx)(Tr,{onClick:this.handleSave,type:"default",htmlType:"button",saving:this.state.saving},void 0),Object(o.jsx)(Ir,{disabled:!this.state.altered,resetting:this.state.resetting,onConfirm:this.resetForm},void 0)]}),void 0)},t.prototype.renderProgramTerm=function(){var e=this,t=0;this.state.totalCredits.forEach((function(e){return t+=e}));var n=0;return this.state.totalTechCoreCredits.forEach((function(e){return n+=e})),Object(o.jsx)(ht.a.List,Au({name:zc.terms},{children:function(r,i){var a,s,d=i.add,c=i.remove,l=null===(a=e._formRef.current)||void 0===a?void 0:a.getFieldValue(nl.terms);return void 0!=l&&0!=l.length||(l=null!==(s=e.state.newProgramAward.terms)&&void 0!==s?s:[]),Object(o.jsxs)(y.b,Au({direction:"vertical"},{children:[r.map((function(t,n){var r,i,a,s,d,u,p=(null===(r=e._formRef.current)||void 0===r?void 0:r.getFieldValue(zc.prerequisite))?null===(i=e._formRef.current)||void 0===i?void 0:i.getFieldValue(zc.prerequisite):e.state.newProgramAward?e.state.newProgramAward.prerequisite:null,f=p&&0==n?"Prerequisite":"Term "+(n+(p?0:1)),h=p&&0==n||e.props.readonly?null:Object(o.jsx)(rt.a,{onClick:function(){return e.removeTerm(t,c,p)},type:"link",icon:Object(o.jsx)(Yd.a,{},void 0)},void 0),v=(null!==l&&void 0!==l?l:[gl.create])[n],m={id:null===v||void 0===v?void 0:v.id,prerequisite:null===v||void 0===v?void 0:v.prerequisite,groups:null===v||void 0===v?void 0:v.groups,flatCourseGroupOptions:null===v||void 0===v?void 0:v.flatCourseGroupOptions,order:null===v||void 0===v?void 0:v.order},g=null!==(a=e.state.newProgramChangeRequest.isTransferMajorProgram)&&void 0!==a&&a;return Object(o.jsxs)(Qn.a,Au({type:"inner",size:"small",title:f,extra:h},{children:[Object(o.jsx)(mt.a,Au({},e.getProgramTermsFormItems(n).get(gl.termId),_t.getValidation(gl.termId+e.state.newProgramAward.order,e.state.fieldErrors,e.state.submitted||e.props.readonly),{children:Object(o.jsx)(Cu,{readOnly:e.props.readonly},void 0)}),void 0),Object(o.jsx)(mt.a,Au({},e.getProgramTermsFormItems(n).get(gl.informationalContent),_t.getValidation(gl.informationalContent+e.state.newProgramAward.order,e.state.fieldErrors,e.state.submitted||e.props.readonly),{children:Object(o.jsx)(Mr,{readonly:e.props.readonly},void 0)}),void 0),Object(o.jsx)(mt.a,Au({initialValue:m},e.getNewProgramFormItems(n).get(zc.terms),_t.getValidation(zc.terms,e.state.fieldErrors,e.state.submitted||e.props.readonly),{children:Object(o.jsx)(Eu,{ref:e._programTermEditor,programAward:e.state.newProgramAward,transferMajor:g,selectedInstitution:e.state.changeRequest.institutionId,loading:!!e.state.newProgramAward.terms&&(null===(s=e.state.termLoading)||void 0===s?void 0:s.get(null!==(d=m.id)&&void 0!==d?d:re.default.Empty())),readonly:e.props.readonly,termIndex:n,fieldErrors:e.state.fieldErrors,submitted:e.state.submitted||e.props.readonly,isEditing:!0,onCreditsChanged:e.calculateTotalCredits,onTermLoaded:e.onTermLoaded,prerequisite:p,installTerm:null!==(u=e.state.newProgramChangeRequest.install)&&void 0!==u?u:bl.create()},n)}),void 0)]}),t.key)})),e.props.readonly?null:Object(o.jsx)(rt.a,Au({onClick:function(){return e.addTerm(l,d)}},{children:"Add Term"}),void 0),Object(o.jsxs)("b",{children:["Award Total Credits: ",t]},void 0),e.state.newProgramChangeRequest.isTransferMajorProgram?null:Object(o.jsxs)("b",{children:["Award Total Tech Core Credits: ",n]},void 0)]}),void 0)}}),void 0)},t}(a.Component),Nu=Pu,wu=function(e){return Object.assign({newProgramChangeRequest:null},e)},Du=function(e){return Object.assign({changeRequestId:"00000000-0000-0000-0000-000000000000",programAwardId:"00000000-0000-0000-0000-000000000000"},e)},qu=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fu=function(){return Fu=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Fu.apply(this,arguments)},Mu=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n.getFormItems=function(){return(new Map).set(Wc.additionlCommentsICCPHSE,{name:Wc.additionlCommentsICCPHSE,label:"Please provide any additional comments that would be benef
1icial and informative for the state's public and private colleges in the ICCPHSE (Iowa Coordinating Council for Post High School Education).",rules:[Ot.maxLength(5e3)]})},n.loadChangeRequest=function(){var e=Du({changeRequestId:n.props.changeRequestId});return Fc.getStep12(e).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create(),fieldErrors:n.props.changeRequestDetailsPage?null:e.fieldErrors},(function(){return n.resetForm()}))})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.resetForm=function(){var e;n.setState({altered:!1}),null===(e=n._formRef.current)||void 0===e||e.resetFields()},n.handleSave=function(){var e,t;n.setState({saving:!0});var r=Wc.create(null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldsValue());r.changeRequestId=null!==(t=n.state.changeRequest.id)&&void 0!==t?t:re.default.Empty();var i=wu({newProgramChangeRequest:r});Fc.saveStep12(i).then((function(e){var t;(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()}),n.props.onSave&&(n.props.onSave(),n.resetForm())):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Save Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Save Failed")})).finally((function(){n.setState({loading:!1,saving:!1})}))},n.handleSubmit=function(){var e,t;n.setState({submitting:!0});var r=Wc.create(null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldsValue());r.changeRequestId=null!==(t=n.state.changeRequest.id)&&void 0!==t?t:re.default.Empty();var i=wu({newProgramChangeRequest:r});Fc.submitStep12(i).then((function(e){var t;(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()}),n.props.onSubmit&&n.props.onSubmit(),n.props.onSave&&(n.props.onSave(),n.resetForm())):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Save Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Save Failed")})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.handleChange=function(){n.setState({altered:!0})},n.render=function(){var e;return n.state.loading||n.state.changeRequest.id==re.default.Empty()?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(y.b,Fu({size:"small",direction:"vertical"},{children:[n.renderErrors(),Object(o.jsxs)(ht.a,Fu({ref:n._formRef,layout:"vertical",initialValues:null!==(e=n.state.changeRequest.newProgramChangeRequest)&&void 0!==e?e:Wc.create(),onChange:n.handleChange,onFinish:n.handleSubmit,requiredMark:!0},{children:[Object(o.jsx)(mt.a,Fu({},n.getFormItems().get(Wc.additionlCommentsICCPHSE),_t.getValidation(Wc.additionlCommentsICCPHSE,n.state.fieldErrors,n.state.submitted||n.props.readonly),{children:Object(o.jsx)(ut.a.TextArea,{disabled:n.props.readonly,maxLength:5e3,showCount:!0,autoSize:{minRows:5}},void 0)}),void 0),n.renderActions()]}),void 0)]}),void 0)},n.renderErrors=function(){if(n.state.error)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:n.state.message},void 0)},n.state={changeRequest:$a.create()},n}return qu(t,e),t.prototype.componentDidMount=function(){this.props.changeRequestId&&this.props.changeRequestId!=re.default.Empty()&&this.loadChangeRequest()},t.prototype.componentDidUpdate=function(e){this.props.changeRequestId&&e.changeRequestId!=this.props.changeRequestId&&this.props.changeRequestId&&this.props.changeRequestId!=re.default.Empty()&&this.loadChangeRequest(),this.props.loading!=e.loading&&this.setState({loading:this.props.loading})},t.prototype.renderActions=function(){if(!this.props.readonly)return Object(o.jsxs)(y.b,Fu({direction:"horizontal",wrap:!0},{children:[Object(o.jsx)(rs,{onClick:this.props.onPrevious},void 0),Object(o.jsx)(ss,{htmlType:"submit",submitting:this.state.submitting},void 0),Object(o.jsx)(Tr,{type:"default",htmlType:"button",onClick:this.handleSave,saving:this.state.saving,saved:this.state.saved},void 0),Object(o.jsx)(Ir,{resetting:this.state.resetting,onConfirm:this.resetForm},void 0)]}),void 0)},t}(a.Component),Yu=Mu,Uu=function(e){return Object.assign({newProgramChangeRequest:null},e)},Lu=function(e){return Object.assign({changeRequestId:"00000000-0000-0000-0000-000000000000",programAwardId:"00000000-0000-0000-0000-000000000000"},e)},ku={className:"RacialEthnicGroupDTO",create:function(e){return Object.assign(Q.create(),{id:0,name:"",abbreviation:""},e)},id:"id",name:"name",abbreviation:"abbreviation"},Gu=ku,Vu={className:"GenderDTO",create:function(e){return Object.assign(Q.create(),{id:0,abbreviation:"",name:""},e)},id:"id",abbreviation:"abbreviation",name:"name"},Bu=Vu,Wu={className:"NewProgramAdvisoryBoardContactDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",newProgramChangeRequestId:"00000000-0000-0000-0000-000000000000",newProgramChangeRequest:null,firstName:"",lastName:"",genderId:null,gender:null,employer:"",position:"",disability:null,organizedLabor:null,ethnicGroupId:null,ethnicGroup:null},e)},id:"id",newProgramChangeRequestId:"newProgramChangeRequestId",newProgramChangeRequest:"newProgramChangeRequest",firstName:"firstName",lastName:"lastName",genderId:"genderId",gender:"gender",employer:"employer",position:"position",disability:"disability",organizedLabor:"organizedLabor",ethnicGroupId:"ethnicGroupId",ethnicGroup:"ethnicGroup"},zu=Wu,Hu=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Qu=function(){return Qu=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Qu.apply(this,arguments)},Ku=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n.cleanDates=function(e){return e.advisoryBoardApprovalDate=It()(e.advisoryBoardApprovalDate),e},n.fetchData=function(){n.setState({loading:!0});var e=[];0==n.state.genders.length&&e.push(n.loadGenders()),0==n.state.racialEthnicGroups.length&&e.push(n.loadEthnicGroups()),n.props.changeRequestId&&n.props.changeRequestId!=re.default.Empty()&&e.push(n.loadChangeRequest()),Promise.all(e).then((function(){n.setState({loading:!1})}
1))},n.loadGenders=function(){return ce.getAll(Bu.className).then((function(e){e&&n.setState({genders:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadEthnicGroups=function(){return ce.getAll(Gu.className).then((function(e){e&&n.setState({racialEthnicGroups:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadChangeRequest=function(){var e=Lu({changeRequestId:n.props.changeRequestId});return Fc.getStep13(e).then((function(e){var t,r,i;if(e){var o=null!==(r=null===(t=e.changeRequest)||void 0===t?void 0:t.newProgramChangeRequest)&&void 0!==r?r:Wc.create();"1970-01-01T00:00:00.000Z"==o.advisoryBoardApprovalDate||"0001-01-01T00:00:00+00:00"==o.advisoryBoardApprovalDate?o.advisoryBoardApprovalDate="":o=n.cleanDates(o),n.setState({changeRequest:null!==(i=e.changeRequest)&&void 0!==i?i:$a.create(),newProgramChangeRequest:null!==o&&void 0!==o?o:Wc.create(),fieldErrors:n.props.changeRequestDetailsPage?null:e.fieldErrors},(function(){return n.resetForm()}))}})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.getAvisoryBoardFormItems=function(){return(new Map).set(Wc.advisoryBoardApprovalDate,{label:"Date Of Approval",name:Wc.advisoryBoardApprovalDate,required:!0,rules:[Ot.required()]})},n.getContactFormItems=function(e){return(new Map).set(Wc.advisoryBoardApprovalDate,{label:"Date Of Approval",name:Wc.advisoryBoardApprovalDate,required:!0,rules:[Ot.required()]}).set(zu.firstName,{name:[e,zu.firstName],label:"First Name"}).set(zu.lastName,{name:[e,zu.lastName],label:"Last Name"}).set(zu.employer,{name:[e,zu.employer],label:"Employer"}).set(zu.position,{name:[e,zu.position],label:"Postition"}).set(zu.genderId,{name:[e,zu.genderId],label:"Gender"}).set(zu.ethnicGroupId,{name:[e,zu.ethnicGroupId],label:"Ethnic Group"}).set(zu.disability,{name:[e,zu.disability],label:"Has the advisory board member self-identified as having a disability?"}).set(zu.organizedLabor,{name:[e,zu.organizedLabor],label:"Is this member a part of organized labor?"})},n.resetForm=function(){var e;n.setState({altered:!1}),null===(e=n._formRef.current)||void 0===e||e.resetFields()},n.handleChange=function(){n.setState({altered:!0})},n.handleSave=function(){var e,t;n.setState({saving:!0});var r=Wc.create(null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldsValue());r.changeRequestId=null!==(t=n.state.changeRequest.id)&&void 0!==t?t:re.default.Empty();var i=Uu({newProgramChangeRequest:r});Fc.saveStep13(i).then((function(e){var t,r,i,o;(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create(),newProgramChangeRequest:n.cleanDates(null!==(i=null===(r=e.changeRequest)||void 0===r?void 0:r.newProgramChangeRequest)&&void 0!==i?i:Wc.create())}),n.resetForm(),n.props.onSave&&(e.changeRequest&&n.props.onSave(null!==(o=e.changeRequest.id)&&void 0!==o?o:re.default.Empty()),n.resetForm())):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Save Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Save Failed")})).finally((function(){n.setState({loading:!1,saving:!1})}))},n.handleSubmit=function(){var e,t;n.setState({submitting:!0});var r=Wc.create(Qu(Qu({},null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldsValue()),{isTransferMajorProgram:n.state.newProgramChangeRequest.isTransferMajorProgram}));r.changeRequestId=null!==(t=n.state.changeRequest.id)&&void 0!==t?t:re.default.Empty();var i=Uu({newProgramChangeRequest:r});Fc.submitStep13(i).then((function(e){var t,r,i,o;(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create(),newProgramChangeRequest:n.cleanDates(null!==(i=null===(r=e.changeRequest)||void 0===r?void 0:r.newProgramChangeRequest)&&void 0!==i?i:Wc.create())}),n.props.onSubmit&&n.props.onSubmit(),n.props.onSave&&(e.changeRequest&&n.props.onSave(null!==(o=e.changeRequest.i
1d)&&void 0!==o?o:re.default.Empty()),n.resetForm())):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Save Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Save Failed")})).finally((function(){n.setState({loading:!1,submitting:!1,submitted:!0})}))},n.state={changeRequest:$a.create(),changeRequests:[],genders:[],racialEthnicGroups:[],newProgramChangeRequest:Wc.create({advisoryBoardApprovalDate:""})},n}return Hu(t,e),t.prototype.componentDidMount=function(){this.fetchData()},t.prototype.componentDidUpdate=function(e){this.props.changeRequestId&&this.props.changeRequestId!=e.changeRequestId&&this.fetchData(),this.props.loading!=e.loading&&this.setState({loading:this.props.loading})},t.prototype.render=function(){var e=this;return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(y.b,Qu({size:"small",direction:"vertical"},{children:[this.renderErrors(),Object(o.jsx)(ht.a,Qu({ref:this._formRef,layout:"vertical",initialValues:this.state.newProgramChangeRequest,onValuesChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!0},{children:Object(o.jsxs)(y.b,Qu({direction:"vertical"},{children:[Object(o.jsx)(mt.a,Qu({},this.getAvisoryBoardFormItems().get(Wc.advisoryBoardApprovalDate),_t.getValidation(Wc.advisoryBoardApprovalDate,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ur.a,{format:"M/D/YYYY",disabled:this.props.readonly,disabledDate:$r.isFutureDate},void 0)}),void 0),Object(o.jsx)(ot.a.Paragraph,Qu({italic:!0},{children:"Please provide the advisor information for this program."}),void 0),Object(o.jsx)(ht.a.List,Qu({name:Wc.newProgramAdvisoryBoardContacts},{children:function(t,n){var r=n.add,i=n.remove;return Object(o.jsxs)(y.b,Qu({direction:"vertical"},{children:[t.map((function(t,n){return e.renderAdvisors(n,i)})),e.renderAddAdditionalAdvisor(r)]}),void 0)}}),void 0),this.renderActions()]}),void 0)}),void 0)]}),void 0)},t.prototype.renderAdvisors=function(e,t){var n=this,r="Advisor "+(e+1),i=this.props.readonly?null:Object(o.jsx)(rt.a,{type:"link",icon:Object(o.jsx)(Yd.a,{},void 0),onClick:function(){return t(e)}},void 0);return Object(o.jsxs)(Qn.a,Qu({type:"inner",title:r,extra:i},{children:[Object(o.jsxs)(b.a,Qu({gutter:[16,16]},{children:[Object(o.jsx)(m.a,Qu({},En.HALF,{children:Object(o.jsx)(mt.a,Qu({},this.getContactFormItems(e).get(zu.firstName),_t.getValidation(zu.className.toLowerCase()+zu.firstName.toLowerCase()+e,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ut.a,{disabled:this.props.readonly},void 0)}),void 0)}),void 0),Object(o.jsx)(m.a,Qu({},En.HALF,{children:Object(o.jsx)(mt.a,Qu({},this.getContactFormItems(e).get(zu.lastName),_t.getValidation(zu.className.toLowerCase()+zu.lastName.toLowerCase()+e,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ut.a,{disabled:this.props.readonly},void 0)}),void 0)}),void 0)]}),void 0),Object(o.jsxs)(b.a,Qu({gutter:[16,16]},{children:[Object(o.jsx)(m.a,Qu({},En.HALF,{children:Object(o.jsx)(mt.a,Qu({},this.getContactFormItems(e).get(zu.employer),_t.getValidation(zu.className.toLowerCase()+zu.employer.toLowerCase()+e,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ut.a,{disabled:this.props.readonly},void 0)}),void 0)}),void 0),Object(o.jsx)(m.a,Qu({},En.HALF,{children:Object(o.jsx)(mt.a,Qu({},this.getContactFormItems(e).get(zu.position),_t.getValidation(zu.className.toLowerCase()+zu.position.toLowerCase()+e,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ut.a,{disabled:this.props.readonly},void 0)}),void 0)}),void 0)]}),void 0),Object(o.jsxs)(b.a,Qu({gutter:[16,16]},{children:[Object(o.jsx)(m.a,Qu({},En.HALF,{children:Object(o.jsx)(mt.a,Qu({},this.getContactFormItems(e).get(zu.genderId),_t.getValidation(zu.className.toLowerCase()+zu.genderId.toLowerCase()+e,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(hd,Qu({showArrow:!this.props.readonly,disabled:this.props.readonly,dropdownMatchSelectWidth:!1},{children:this.state.genders.map((function(e){return n.renderGender(e)}))}),void 0)}),void 0)}),void 0),Object(o.jsx)(m.a,Qu({},En.HALF,{children:Object(o.jsx)(mt.a,Qu({},this.getContactFormItems(e).get(zu.ethnicGroupId),_t.getValidation(zu.className.toLowerCase()+zu.ethnicGroupId.toLowerCase()+e,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(hd,Qu({showArrow:!this.props.readonly,disabled:this.props.readonly,dropdownMatchSelectWidth:!1},{children:this.state.racialEthnicGroups.map((function(e){return n.renderEthnicGroup(e)}))}),void 0)}),void 0)}),void 0)]}),void 0),Object(o.jsx)(b.a,Qu({gutter:[16,16]},{children:Object(o.jsx)(mt.a,Qu({},this.getContactFormItems(e).get(zu.organizedLabor),_t.getValidation(zu.className.toLowerCase()+zu.organizedLabor.toLowerCase()+e,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(H
1d,{disabled:this.props.readonly},void 0)}),void 0)}),void 0),Object(o.jsx)(b.a,Qu({gutter:[16,16]},{children:Object(o.jsx)(mt.a,Qu({},this.getContactFormItems(e).get(zu.disability),_t.getValidation(zu.className.toLowerCase()+zu.disability.toLowerCase()+e,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(Hd,{disabled:this.props.readonly},void 0)}),void 0)}),void 0)]}),void 0)},t.prototype.renderActions=function(){if(!this.props.readonly)return Object(o.jsxs)(y.b,Qu({direction:"horizontal",wrap:!0},{children:[Object(o.jsx)(rs,{onClick:this.props.onPrevious},void 0),Object(o.jsx)(ss,{htmlType:"submit",submitting:this.state.submitting},void 0),Object(o.jsx)(Tr,{onClick:this.handleSave,type:"default",htmlType:"button",saving:this.state.saving},void 0),Object(o.jsx)(Ir,{disabled:!this.state.altered,resetting:this.state.resetting,onConfirm:this.resetForm},void 0)]}),void 0)},t.prototype.renderAddAdditionalAdvisor=function(e){if(!this.props.readonly)return Object(o.jsx)(rt.a,Qu({onClick:function(){return e()},icon:Object(o.jsx)(Xc.a,{},void 0)},{children:"Add Additional Advisor"}),void 0)},t.prototype.renderGender=function(e){var t,n;if(e.id)return Object(o.jsx)(pr.a.Option,Qu({value:null!==(t=e.id)&&void 0!==t?t:re.default.Empty()},{children:e.name}),null!==(n=e.id)&&void 0!==n?n:re.default.Empty())},t.prototype.renderEthnicGroup=function(e){var t,n;if(e.id)return Object(o.jsx)(pr.a.Option,Qu({value:null!==(t=e.id)&&void 0!==t?t:re.default.Empty()},{children:e.name}),null!==(n=e.id)&&void 0!==n?n:re.default.Empty())},t.prototype.renderErrors=function(){if(this.state.error)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:this.state.message},void 0)},t}(a.Component),Xu=Ku,Ju=n(402),$u=n.n(Ju),Zu=function(e){return Object.assign({newProgramChangeRequest:null},e)},ep=function(e){return Object.assign({newProgramChangeRequest:null},e)},tp=function(e){return Object.assign({changeRequestId:"00000000-0000-0000-0000-000000000000",programAwardId:"00000000-0000-0000-0000-000000000000"},e)},np=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),rp=function(){return rp=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},rp.apply(this,arguments)},ip=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n.getSignOffsFormItems=function(){return(new Map).set(Wc.changeRequestId,{name:Wc.changeRequestId,label:"Do you agree to the terms above?"}).set(Wc.boardOfTrusteesDateOfApproval,{label:"Board of Trustees Date of Approval",name:Wc.boardOfTrusteesDateOfApproval,required:!0,rules:[Ot.required()]}).set(Wc.curriculumApprovalProcessDateOfApproval,{label:"Curriculum Approval Process Date of Approval ",name:Wc.curriculumApprovalProcessDateOfApproval,required:!0,rules:[Ot.required()]})},n.cleanDates=function(e){return e.boardOfTrusteesDateOfApproval=It()(e.boardOfTrusteesDateOfApproval),e.curriculumApprovalProcessDateOfApproval=It()(e.curriculumApprovalProcessDateOfApproval),e},n.loadChangeRequest=function(){var e=tp({changeRequestId:n.props.changeRequestId});return Fc.getStep14(e).then((function(e){var t,r,i;if(e){var o=null!==(r=null===(t=e.changeRequest)||void 0===t?void 0:t.newProgramChangeRequest)&&void 0!==r?r:Wc.create();"1970-01-01T00:00:00.000Z"==o.boardOfTrusteesDateOfApproval||"0001-01-01T00:00:00+00:00"==o.boardOfTrusteesDateOfApproval?o.boardOfTrusteesDateOfApproval="":n.cleanDates(o),"1970-01-01T00:00:00.000Z"==o.curriculumApprovalProcessDateOfApproval||"0001-01-01T00:00:00+00:00"==o.curriculumApprovalProcessDateOfApproval?o.curriculumApprovalProcessDateOfApproval="":n.cleanDates(o),n.setState({changeRequest:null!==(i=e.changeRequest)&&void 0!==i?i:$a.create(),newProgramChangeRequest:null!==o&&void 0!==o?o:Wc.create(),isTrusteesChecked:""!=o.boardOfTrusteesDateOfApproval,isCurriculumChecked:""!=o.curriculumApprovalProcessDateOfApproval,fieldErrors:n.props.changeRequestDetailsPage?null:e.fieldErrors},(function(){return n.resetForm()}))}})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.resetForm=function(){var e;n.setState({altered:!1}),null===(e=n._formRef.current)||void 0===e||e.resetFields()},n.handleChange=function(){n.setState({altered:!0})},n.handleSubmit=function(){var e,t;n.setState({submitting:!0});var r=Wc.create(null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldsValue());
1r.changeRequestId=null!==(t=n.state.changeRequest.id)&&void 0!==t?t:re.default.Empty();var i=ep({newProgramChangeRequest:r});Fc.submitStep14(i).then((function(e){var t;(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()}),n.props.onSubmit&&n.props.onSubmit(),n.props.onSave&&n.props.onSave()):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Save Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Save Failed")})).finally((function(){n.setState({loading:!1,submitting:!1,submitted:!0})}))},n.handleSave=function(){var e,t;n.setState({submitting:!0});var r=Wc.create(null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldsValue());r.changeRequestId=null!==(t=n.state.changeRequest.id)&&void 0!==t?t:re.default.Empty();var i=Zu({newProgramChangeRequest:r});Fc.saveStep14(i).then((function(e){var t;(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()}),n.props.onSave&&n.props.onSave()):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Save Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Save Failed")})).finally((function(){n.setState({loading:!1,submitting:!1,submitted:!0})}))},n.onTrusteesCheckboxClick=function(e){var t;n.setState({isTrusteesChecked:e.target.checked}),e.target.checked||null===(t=n._formRef.current)||void 0===t||t.setFieldsValue({boardOfTrusteesDateOfApproval:null})},n.onCurriculumCheckboxClick=function(e){var t;n.setState({isCurriculumChecked:e.target.checked}),e.target.checked||null===(t=n._formRef.current)||void 0===t||t.setFieldsValue({curriculumApprovalProcessDateOfApproval:null})},n.state={changeRequest:$a.create(),newProgramChangeRequest:Wc.create({boardOfTrusteesDateOfApproval:"",curriculumApprovalProcessDateOfApproval:""}),changeRequests:[],isTrusteesChecked:!1,isCurriculumChecked:!1},n}return np(t,e),t.prototype.componentDidMount=function(){this.props.changeRequestId&&this.props.changeRequestId!=re.default.Empty()&&this.loadChangeRequest()},t.prototype.componentDidUpdate=function(e){this.props.changeRequestId&&this.props.changeRequestId!=e.changeRequestId&&this.props.changeRequestId&&this.props.changeRequestId!=re.default.Empty()&&this.loadChangeRequest(),this.props.loading!=e.loading&&this.setState({loading:this.props.loading})},t.prototype.render=function(){return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(y.b,rp({size:"small",direction:"vertical"},{children:[this.renderErrors(),Object(o.jsx)(ht.a,rp({ref:this._formRef,layout:"vertical",initialValues:this.state.newProgramChangeRequest,onValuesChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!0},{children:Object(o.jsxs)(y.b,rp({direction:"vertical"},{children:[Object(o.jsxs)("ul",{children:[Object(o.jsx)("li",{children:"The applicant assures that in carrying out this program it will comply with federal and state laws which prohibit discrimination on the basis of race, color, national origin, gender, disability, religion, creed, age, or marital status in educational programs."},void 0),Object(o.jsx)("li",{children:"The applicant assures that equitable access will be provided to all students."},void 0),Object(o.jsx)("li",{children:"The applicant assures that multicultural, gender fair approaches will be used in planning and implementing programs."},void 0),Object(o.jsx)("li",{children:"The applicant assures that employers in work-site based training programs do not discriminate against employees or customers and provide an environment free of racial and sexual harassment."},void 0),Object(o.jsx)("li",{children:"Students will be accepted for on-the job training, clinical or work experiences, assigned to jobs and otherwise treated without regard to race, color, national origin, gender, marital status or disability."},void 0),Object(o.jsx)("li",{children:"The applicant assures that services to students with disabilities are provided in the least restrictive environment that will meet their needs."},void 0),Object(o.jsx)("li",{children:"The applicant assures that reasonable accommodations are provided to students with disabilities."},void 0),Object(o.jsx)("li",{children:"The applicant assures that the programs include competency-based applied learning which contributes to an individuals academic knowledge, higher-order reasoning and problem-solving skills, work attitudes, general employability skills, and occupational-specific skills."},void 0),Object(o.jsx)("li",{children:"If this program is a shared program with another community college, the applicant assures that the appropriate contracts and agreements are in place."},void 0),Object(o.jsx)("li",{children:"The applicant assures that instructors teaching in this program will be appropriately prepared."},void 0),Object(o.jsx)("li",{children:"The applicant assures that the college is in compliance with the Code of Iowa, Chapter 260C.14(1) concerning duplication of programs."},void 0)]},void 0),Object(o.jsx)($u.a,rp({disabled:this.props.readonly,checked:this.state.isCurriculumChecked,onChange:this.onCurriculumCheckboxClick},{children:Object(o.jsx)(ot.a.Text,rp({strong:!0},{children:"This program was approved through the college's curriculum approval process."}),void 0)}),void 0),Object(o.jsx)($u.a,rp({disabled:this.props.readonly,checked:this.state.isTrusteesChecked,onChange:this.onTrusteesCheckboxClick},{children:Object(o.jsx)(ot.a.Text,rp({strong:!0},{children:"The Board of Trustees have approved this program and the terms above."}),void 0)}),void 0),Object(o.jsx)(mt.a,rp({}
1,this.getSignOffsFormItems().get(Wc.curriculumApprovalProcessDateOfApproval),_t.getValidation(Wc.curriculumApprovalProcessDateOfApproval,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ur.a,{format:"M/D/YYYY",disabled:!this.state.isCurriculumChecked||this.props.readonly,disabledDate:$r.isFutureDate},void 0)}),void 0),Object(o.jsx)(mt.a,rp({},this.getSignOffsFormItems().get(Wc.boardOfTrusteesDateOfApproval),_t.getValidation(Wc.boardOfTrusteesDateOfApproval,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ur.a,{format:"M/D/YYYY",disabled:!this.state.isTrusteesChecked||this.props.readonly,disabledDate:$r.isFutureDate},void 0)}),void 0),this.renderActions()]}),void 0)}),void 0)]}),void 0)},t.prototype.renderActions=function(){if(!this.props.readonly)return Object(o.jsxs)(y.b,rp({direction:"horizontal",wrap:!0},{children:[Object(o.jsx)(rs,{onClick:this.props.onPrevious},void 0),Object(o.jsx)(ss,{htmlType:"submit",submitting:this.state.submitting},void 0)]}),void 0)},t.prototype.renderAddAdditionalAdvisor=function(e){if(!this.props.readonly)return Object(o.jsx)(rt.a,rp({onClick:function(){return e()},icon:Object(o.jsx)(Xc.a,{},void 0)},{children:"Add Additional Advisor"}),void 0)},t.prototype.renderGender=function(e){var t,n;if(e.id)return Object(o.jsx)(pr.a.Option,rp({value:null!==(t=e.id)&&void 0!==t?t:re.default.Empty()},{children:e.name}),null!==(n=e.id)&&void 0!==n?n:re.default.Empty())},t.prototype.renderErrors=function(){if(this.state.error)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:this.state.message},void 0)},t}(a.Component),op=ip,ap=n(300),sp=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),dp=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return sp(t,e),t.prototype.saveStep1=function(e){var t="api/noticeOfIntentChangeRequests/saveStep1";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.saveStep2=function(e){var t="api/noticeOfIntentChangeRequests/saveStep2";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.saveStep3=function(e){var t="api/noticeOfIntentChangeRequests/saveStep3";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.saveStep4=function(e){var t="api/noticeOfIntentChangeRequests/saveStep4";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.saveStep5=function(e){var t="api/noticeOfIntentChangeRequests/saveStep5";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.saveStep6=function(e){var t="api/noticeOfIntentChangeRequests/saveStep6";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!1,!1)},t.prototype.saveStep7=function(e){var t="api/noticeOfIntentChangeRequests/saveStep7";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!1,!1)},t.prototype.submitStep1=function(e){var t="api/noticeOfIntentChangeRequests/submitStep1";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.submitStep2=function(e){var t="api/noticeOfIntentChangeRequests/submitStep2";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.submitStep3=function(e){var t="api/noticeOfIntentChangeRequests/submitStep3";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.submitStep4=function(e){var t="api/noticeOfIntentChangeRequests/submitStep4";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.submitStep5=function(e){var t="api/noticeOfIntentChangeRequests/submitStep5";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.submitStep6=function(e){var t="api/noticeOfIntentChangeRequests/submitStep6";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!1,!1)},t.prototype.submitStep7=function(e){var t="api/noticeOfIntentChangeRequests/submitStep7";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!1,!1)},t.prototype.get=function(e){var t="api/noticeOfIntentChangeRequests/get";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getStep1=function(e){var t="api/noticeOfIntentChangeRequests/getStep1";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getStep2=function(e){var t="api/noticeOfIntentChangeRequests/getStep2";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getStep3=function(e){var t="api/noticeOfIntentChangeRequests/getStep3";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getStep4=function(e){var t="api/noticeOfIntentChangeRequests/getStep4";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getStep5=function(e){var t="api/noticeOfIntentChangeRequests/getStep5";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getStep6=function(e){var t="api/noticeOfIntentChangeRequests/getStep6";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getStep7=function(e){var t="api/noticeOfIntentChangeRequests/getStep7";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getAllNoticeOfIntents=function(e){var t="api/noticeOfIntentChangeRequests/getNoticeOfIntent";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getByCipReclassification=function(e){var t="api/noticeOfIntentChangeRequests/getByCipReclassification";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t}(U),cp=new dp,lp=cp,up=function(e){return Object.assign({changeRequestId:"00000000-0000-0000-0000-000000000000",instsitutionId:"00000000-0000-0000-0000-000000000000"},e)},pp=function(e){return Object.assign({changeRequestId:null,institutionId:"00000000-0000-0000-0000-000000000000",newProgramChangeRequest:null},e)},fp=function(e){return Object.assign({changeRequestId:null,institutionId:"00000000-0000-0000-0000-000000000000",newProgramChangeRequest:null},e)},hp=function(e){return Object.assign({changeRequestId:"00000000-0000-0000-0000-000000000000"},e)},vp={className:"ExternalInstitutionDTO",create:function(e){return Object.assign(Q.create(),{id:0,abbreviation:"",name:""},e)},id:"id",abbreviation:"abbreviation",name:"name"},mp=vp,gp=n(1519),bp=n(1520),yp=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Op=function(){return Op=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Op.apply(this,arguments)},jp=function(e){function t(t){var n=e.call(this,t)||this;n.handleClicked=n.handleClicked.bind(n);var r=!!t.checked&&t.checked;return n.state={checked:r},n}return yp(t,e),t.prototype.handleClicked=function(){var e,t=!(null!==(e=this.state.checked)&&void 0!==e&&e);this.setState({checked:t}),this.props.onClick&&this.props.onClick(t)},t.prototype.componentDidUpdate=function(e){var t;this.props.checked!=e.checked&&this.setState({checked:null!==(t=this.props.checked)&&void 0!==t&&t})},t.prototype.render=function(){var e="small"===this.props.textSize?"ant-btn-sm":"";return Object(o.jsxs)(rt.a,Op({disabled:this.props.disabled,className:"ant-btn-option btn-left-align "+(this.state.checked?"checked ":" ")+e,onClick:this.handleClicked,block:!0,size:"large",type:this.state.checked?"primary":"default"},{children:[this.props.checkBox?null:this.renderCheck(),this.props.children]}),void 0)},t.prototype.renderCheck=function(){var e=this.state.checked?Object(o.jsx)(gp.a,{},void 0):Object(o.jsx)(bp.a,{},void 0);return Object(o.jsx)("span",Op({style:{marginRight:10}},{children:e}),void 0)},t}(a.Component),Ip=jp,Sp=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ep=function(){return Ep=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ep.apply(this,arguments)},Rp=function(e){function t(t){var n=e.call(this,t)||this;return n.handleClicked=function(e,t){var r=t?e:null;n.setState({selectedValue:r}),n.props.onChange&&n.props.onChange(r)},n.resetSelected=function(){n.setState({selectedValue:null})},n.state={selectedValue:null},n}return Sp(t,e),t.prototype.componentDidMount=function(){this.setState({selectedValue:this.props.value})},t.prototype.componentDidUpdate=function(e){this.props.value&&this.props.value!=e.value&&this.setState({selectedValue:this.props.value})},t.prototype.render=function(){return this.props.readonly?this.renderSelected():Object(o.jsx)(y.b,Ep({direction:this.props.direction,size:"small"},{children:this.renderCheckBoxes()}),void 0)},t.prototype.renderCheckBoxes=function(){var e=this;return this.props.options.map((function(t){return e.renderCheckBox(t)}))},t.prototype.renderSelected=function(){var e,t=this,n=null===(e=this.props.options.filter((function(e){return e.id==t.state.selectedValue}))[0])||void 0===e?void 0:e.display;return n?Object(o.jsx)(ot.a.Text,Ep({strong:!0},{children:n}),void 0):this.props.emptyDescription?Object(o.jsx)(ot.a.Text,Ep({italic:!0},{children:this.props.emptyDescription}),void 0):null},t.prototype.renderCheckBox=function(e){var t=this;return e?Object(o.jsx)(Ip,Ep({checkBox:this.props.checkBox,disabled:this.props.disabled,value:e.id,onClick:function(n){return t.handleClicked(e.id,n)},checked:e.id==this.state.selectedValue},{children:e.display}),void 0):null},t.defaultProps={direction:"vertical"},t}(a.Component),_p=Rp,Tp=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Cp=function(){return Cp=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Cp.apply(this,arguments)},xp=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n.fetchData=function(){n.setState({loading:!0});var e=[];n.props.selectedInstitution!=re.default.Empty()&&e.push(n.loadNoticeOfIntents()),e.push(n.loadExternalInstitutions()),n.props.changeRequestId&&n.props.changeRequestId!=re.default.Empty()&&e.push(n.loadChangeRequest()),Promise.all(e).then((function(){n.setState({loading:!1})}
1))},n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields()},n.loadNoticeOfIntents=function(){var e,t,r=up({changeRequestId:null!==(e=n.props.changeRequestId)&&void 0!==e?e:re.default.Empty(),instsitutionId:null===(t=n.props)||void 0===t?void 0:t.selectedInstitution});return lp.getAllNoticeOfIntents(r).then((function(e){var t;e&&n.setState({noticeOfIntents:null!==(t=e.noticeOfIntents)&&void 0!==t?t:[]})})).catch((function(){n.setState({error:!0})}))},n.loadExternalInstitutions=function(){return ce.getAll(mp.className).then((function(e){e&&n.setState({externalInstitutions:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadChangeRequest=function(){var e=hp({changeRequestId:n.props.changeRequestId});return Fc.getStep1(e).then((function(e){var t,r,i;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create(),newProgram:null!==(i=null===(r=e.changeRequest)||void 0===r?void 0:r.newProgramChangeRequest)&&void 0!==i?i:Wc.create(),fieldErrors:n.props.changeRequestDetailsPage?null:e.fieldErrors},(function(){return n.resetForm()}))})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.handleChange=function(){n.setState({altered:!0})},n.handleSave=function(){var e,t,r;n.setState({saving:!0});var i=null!==(t=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldsValue())&&void 0!==t?t:Wc.create(),o=pp({changeRequestId:null!==(r=n.props.changeRequestId)&&void 0!==r?r:null,institutionId:n.props.selectedInstitution,newProgramChangeRequest:i});Fc.saveStep1(o).then((function(e){var t;(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.props.onSave&&e.changeRequest&&n.props.onSave(null!==(t=e.changeRequest.id)&&void 0!==t?t:re.default.Empty())):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Save Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Save Failed")})).finally((function(){n.setState({loading:!1,saving:!1})}))},n.handleSubmit=function(){var e,t,r;n.setState({submitting:!0});var i=null!==(t=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldsValue())&&void 0!==t?t:Wc.create(),o=fp({changeRequestId:null!==(r=n.props.changeRequestId)&&void 0!==r?r:null,institutionId:n.props.selectedInstitution,newProgramChangeRequest:i});Fc.submitStep1(o).then((function(e){var t,r;(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.props.onSave&&e.changeRequest&&n.props.onSave(null!==(t=e.changeRequest.id)&&void 0!==t?t:re.default.Empty()),n.props.onSubmit&&e.changeRequest&&n.props.onSubmit(null!==(r=e.changeRequest.id)&&void 0!==r?r:re.default.Empty())):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Save Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Save Failed")})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.promptExpiredNoticeOfIntent=function(){f.a.confirm({title:"Expired",content:"The Notice of Intent you have selected is expired. Additional steps may be required for this program approval.",okType:"primary",icon:Object(o.jsx)(ap.a,{},void 0),onCancel:function(){n.resetForm()}})},n.promptNoticeOfintentNotApproved=function(){f.a.confirm({title:"NOI Approval Needed",content:"The Notice of Intent you have selected has not been approved. Please wait for the NOI to be approved before submiiting.",okType:"primary",icon:Object(o.jsx)(ap.a,{},void 0),onCancel:function(){n.resetForm()}})},n.handleCheckboxChange=function(e){var t,r=null===(t=n.state.noticeOfIntents)||void 0===t?void 0:t.find((function(t){return t.noticeOfIntentChangeRequestId==e}));(null===r||void 0===r?void 0:r.expired)&&n.promptExpiredNoticeOfIntent(),(null===r||void 0===r?void 0:r.approved)||n.promptNoticeOfintentNotApproved(),n.handleChange()},n.setCheckBoxOptions=function(){var e;return null===(e=n.state.noticeOfIntents)||void 0===e?void 0:e.map((function(e){return{id:e.noticeOfIntentChangeRequestId,display:e.display}}))},n.goToNOI=function(){T.push(x.generate(x.NEW_NOTICE_OF_INTENT_CHANGE_REQUEST_ENTRY))},n.getFormItems=function(){var e,t,r=null!==(t=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldValue(Wc.isTransferMajorProgram))&&void 0!==t&&t;return(new Map).set(Wc.isTransferMajorProgram,{name:Wc.isTransferMajorProgram,label:"Is this request for a transfer major program?",required:!0,rules:[Ot.required()]}).set(Wc.noticeOfIntentChangeRequestId,{name:Wc.noticeOfIntentChangeRequestId,label:"Please select the notice of intent for this request. If you do not see the Notice of Intent you are looking for, please make sure it has been submitted.",required:r,rules:r?[]:[Ot.required()]}).set(Wc.externalInstitutionIds,{name:Wc.externalInstitutionIds,label:"Which regents are associated with this program?",required:r,rules:r?[Ot.required()]:[]})},n.state={changeRequest:$a.create(),newProgram:Wc.create(),noticeOfIntents:null,externalInstitutions:[]},n}return Tp(t,e),t.prototype.componentDidMount=function(){this.fetchData()},t.prototype.componentDidUpdate=function(e){this.props.changeRequestId&&this.props.changeRequestId!==e.changeRequestId&&this.fetchData()},t.prototype.render=function(){var e;if(this.state.loading&&this.props.changeRequestId&&null!=this.state.noticeOfIntents)return Object(o.jsx)(pt.a,{active:!0},void 0);var t=this.getFormItems();return Object(o.jsxs)(y.b,Cp({size:"small",direction:"vertical"},{children:[this.renderErrors(),Object(o.jsxs)(Ci.a,Cp({ref:this._formRef,layout:"vertical",initialValues:null!==(e=this.state.newProgram)&&void 0!==e?e:Wc.create(),onValuesChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!0},{children:[Object(o.jsx)(Ci.a.Item,Cp({},t.get(Wc.isTransferMajorProgram),_t.getValidation(Wc.isTransferMajorProgram,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(H
1d,{disabled:this.props.readonly||this.state.loading||this.state.saving||this.state.submitting},void 0)}),void 0),this.renderNonTransferMajor(t),this.renderTransferMajor(t)]}),void 0),this.renderActions()]}),void 0)},t.prototype.renderNonTransferMajor=function(e){var t,n,r,i,a=null!==(n=null===(t=this._formRef.current)||void 0===t?void 0:t.getFieldValue(Wc.isTransferMajorProgram))&&void 0!==n?n:null===(r=this.state.newProgram)||void 0===r?void 0:r.isTransferMajorProgram;if(null!=a&&void 0!=a&&!a){var s=null!==(i=this.setCheckBoxOptions())&&void 0!==i?i:[];return 0==s.length?Object(o.jsxs)(y.b,Cp({size:"small",direction:"vertical"},{children:[this.renderErrors(),Object(o.jsx)(ot.a.Paragraph,Cp({italic:!0},{children:"There are currently no active Notices of Intent for your institutuion. A Notice of Intent is required for all new programs. Please create and submit a Notice of Intent before proceeding with your requeest."}),void 0),Object(o.jsx)(rt.a,Cp({type:"primary",onClick:this.goToNOI},{children:"Create Notice of Intent"}),void 0)]}),void 0):Object(o.jsx)(mt.a,Cp({},e.get(Wc.noticeOfIntentChangeRequestId),_t.getValidation(Wc.noticeOfIntentChangeRequestId,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(_p,{disabled:this.props.readonly||this.state.loading||this.state.saving||this.state.submitting,options:s,onChange:this.handleCheckboxChange},void 0)}),void 0)}},t.prototype.renderTransferMajor=function(e){var t,n,r,i;if(null!==(i=null!==(n=null===(t=this._formRef.current)||void 0===t?void 0:t.getFieldValue(Wc.isTransferMajorProgram))&&void 0!==n?n:null===(r=this.state.newProgram)||void 0===r?void 0:r.isTransferMajorProgram)&&void 0!==i&&i)return Object(o.jsx)(mt.a,Cp({},e.get(Wc.externalInstitutionIds),_t.getValidation(Wc.noticeOfIntentChangeRequestId,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(hd,{mode:"multiple",disabled:this.props.readonly||this.state.loading||this.state.saving||this.state.submitting,options:this.state.externalInstitutions.map((function(e){return{value:e.id,label:e.name}}))},void 0)}),void 0)},t.prototype.renderActions=function(){var e,t,n,r,i,a,s=null!==(r=null!==(t=null===(e=this._formRef.current)||void 0===e?void 0:e.getFieldValue(Wc.isTransferMajorProgram))&&void 0!==t?t:null===(n=this.state.newProgram)||void 0===n?void 0:n.isTransferMajorProgram)&&void 0!==r&&r;if(!this.props.readonly&&(s||null!==(a=null===(i=this.state.noticeOfIntents)||void 0===i?void 0:i.length)&&void 0!==a&&a))return Object(o.jsxs)(y.b,Cp({direction:"horizontal",wrap:!0},{children:[Object(o.jsx)(ss,{submitting:this.state.submitting,onClick:this.handleSubmit},void 0),Object(o.jsx)(Tr,{type:"default",htmlType:"button",onClick:this.handleSave,saving:this.state.submitting,saved:this.state.saved},void 0),Object(o.jsx)(Ir,{resetting:this.state.resetting,onConfirm:this.resetForm},void 0)]}),void 0)},t.prototype.renderErrors=function(){if(this.state.error)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:this.state.message},void 0)},t}(a.Component),Ap=xp,Pp=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Np=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Pp(t,e),t.prototype.getCipTableData=function(e){var t="api/cips";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getCipssDataTableExport=function(e){var t="api/cips/export";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getCipDetails=function(e){var t="api/cips/"+encodeURIComponent(e);return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.saveCipDetails=function(e){var t="api/cips/save";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getActiveCipDetails=function(){var e="api/cips/getActiveCips";return e=e.replace(/null|undefined/gi,""),this.SendRequest(null,"post",e,!0,!1)},t.prototype.getCipNumbers=function(){var e="api/cips/getCipNumbers";return e=e.replace(/null|undefined/gi,""),this.SendRequest(null,"post",e,!0,!1)},t.prototype.getActiveNonTransferCipDetails=function(){var e="api/cips/getCipsNonTransfer";return e=e.replace(/null|undefined/gi,""),this.SendRequest(null,"post",e,!0,!1)},t.prototype.importCipNumbers=function(e){var t="api/cips/import";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!1,!1)},t.prototype.deleteCipNumber=function(e){var t="api/cips/deleteCipNumber";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.searchForCip=function(e){var t="api/cips/searchForCip";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t}(U),wp=new Np,Dp=wp,qp=function(e){return Object.assign({changeRequestId:null,institutionId:"00000000-0000-0000-0000-000000000000",newProgramChangeRequest:null},e)},Fp=function(e){return Object.assign({changeRequestId:"00000000-0000-0000-0000-000000000000"},e)},Mp=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Yp=function(){return Yp=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Yp.apply(this,arguments)},Up=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n.getFormItems=function(){var e,t,r,i,o=null!==(t=null===(e=n.state.cipNumberDetails.filter((function(e){var t;return e.id==(null===(t=n._formRef.current)||void 0===t?void 0:t.getFieldValue(Wc.cipNumberId))}))[0])||void 0===e?void 0:e.transferMajor)&&void 0!==t&&t,a=null===(r=n._formRef.current)||void 0===r?void 0:r.getFieldValue(Wc.requiresWorkExperiences),s=null===(i=n._formRef.current)||void 0===i?void 0:i.getFieldValue(Wc.cipReclassification);return(new Map).set(Wc.cipNumberId,{name:Wc.cipNumberId,label:"What CIP Number is this request for?",required:!0,rules:[Ot.required()]}).set(Wc.previousCipNumberId,{name:Wc.previousCipNumberId,label:"What was the previous CIP Number for the program?",required:s,rules:s?[Ot.required()]:[]}).set(Wc.isTransferMajorProgram,{name:Wc.isTransferMajorProgram,label:"Is this request for a transfer major program?",required:o,rules:o?[Ot.required()]:[]}).set(Wc.needForProgram,{required:!0,name:Wc.needForProgram,label:"What is the rationale or need for the program?",rules:[Ot.required(),Ot.maxLength(5e3)]}).set(Wc.anticipatedAnnualEnrollment,{required:!0,name:Wc.anticipatedAnnualEnrollment,label:"What is the anticipated annual enrollment for the program?",rules:[Ot.required()]}).set(Wc.anticipatedAnnualCompleters,{required:!0,name:Wc.anticipatedAnnualCompleters,label:"What is the anticipated annual number of completers for the program?",rules:[Ot.required()]}).set(Wc.cipReclassification,{name:Wc.cipReclassification,label:"Are you requesting the reclassification of a CIP number for an existing program?",required:!0,rules:[Ot.required()]}).set(Wc.requiresWorkExperiences,{name:Wc.requiresWorkExperiences,label:"Does the program include any required work experience and/or training?",required:!0,rules:[Ot.required()]}).set(Wc.requiredWorkExperiences,{name:Wc.requiredWorkExperiences,label:"Please describe the required work experiences and/or training needed for this program.",required:a,rules:a?[Ot.required()]:[]})},n.fetchData=function(){n.setState({loading:!0});var e=[];n.state.cipNumberDetails&&0!=n.state.cipNumberDetails.length||e.push(n.loadCipNumberDetails()),n.props.changeRequestId&&n.props.changeRequestId!=re.default.Empty()&&e.push(n.loadChangeRequest()),Promise.all(e).then((function(){n.setState({loading:!1})}
1))},n.loadCipNumberDetails=function(){return Dp.getActiveCipDetails().then((function(e){var t;e&&n.setState({cipNumberDetails:null!==(t=e.cipNumberDetails)&&void 0!==t?t:[]})})).catch((function(){n.setState({error:!0})}))},n.loadChangeRequest=function(){var e=Fp({changeRequestId:n.props.changeRequestId});return Fc.getStep2(e).then((function(e){var t,r,i;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create(),newProgramChangeRequest:null!==(i=null===(r=e.changeRequest)||void 0===r?void 0:r.newProgramChangeRequest)&&void 0!==i?i:Wc.create(),fieldErrors:n.props.changeRequestDetailsPage?null:e.fieldErrors},(function(){return n.resetForm()}))})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.resetForm=function(){var e;n.setState({altered:!1}),null===(e=n._formRef.current)||void 0===e||e.resetFields()},n.handleChange=function(e){n.setState({altered:e})},n.handleSave=function(){n.setState({saving:!0});var e=Wc.create(n._formRef?n._formRef.current.getFieldsValue():null),t=n.state.changeRequest.newProgramChangeRequest;(t=e).changeRequestId=n.state.changeRequest.id;var r=qp({newProgramChangeRequest:t});Fc.saveStep2(r).then((function(e){var t;(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()}),n.props.onSave&&e.changeRequest&&n.props.onSave()):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Save Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Save Failed")})).finally((function(){n.setState({loading:!1,saving:!1})}))},n.handleSubmit=function(){n.setState({submitting:!0});var e=Wc.create(n._formRef?n._formRef.current.getFieldsValue():null),t=n.state.changeRequest.newProgramChangeRequest;(t=e).changeRequestId=n.state.changeRequest.id;var r=qp({newProgramChangeRequest:t});Fc.submitStep2(r).then((function(e){(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.props.onSave&&n.props.onSave(),n.props.onSubmit&&n.props.onSubmit()):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Save Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Save Failed")})).finally((function(){n.setState({loading:!1,submitting:!1,submitted:!0})}))},n.renderRequiredWorkExperience=function(e){var t,r,i,a;if(null!==(a=null!==(r=null===(t=n._formRef.current)||void 0===t?void 0:t.getFieldValue(Wc.requiresWorkExperiences))&&void 0!==r?r:null===(i=n.state.newProgramChangeRequest)||void 0===i?void 0:i.requiredWorkExperiences)&&void 0!==a&&a)return Object(o.jsx)(mt.a,Yp({},e.get(Wc.requiredWorkExperiences),{children:Object(o.jsx)(ut.a.TextArea,{disabled:n.props.readonly||n.state.loading||n.state.saving||n.state.submitting,maxLength:5e3,showCount:!0,autoSize:{minRows:5}},void 0)}),void 0)},n.state={cipNumberDetails:[],changeRequest:$a.create(),newProgramChangeRequest:Wc.create({installTermId:"",installYear:$r.getCurrentYear(),cipNumberId:null,anticipatedAnnualEnrollment:null,anticipatedAnnualCompleters:null,requiresWorkExperiences:null,isTransferMajorProgram:null,cipReclassification:null}),changeRequests:[]},n}return Mp(t,e),t.prototype.componentDidMount=function(){this.props.changeRequestId&&this.fetchData()},t.prototype.componentDidUpdate=function(e){this.props.changeRequestId&&this.props.changeRequestId!=e.changeRequestId&&this.fetchData(),this.props.loading!=e.loading&&this.setState({loading:this.props.loading})},t.prototype.render=function(){var e,t,n=this;if(!0===this.state.loading||!0===this.props.loading||0===this.state.cipNumberDetails.length)return Object(o.jsx)(pt.a,{active:!0},void 0);var r=this.getFormItems();return Object(o.jsx)(ht.a,Yp({ref:this._formRef,layout:"vertical",initialValues:this.state.newProgramChangeRequest,onValuesChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!0},{children:Object(o.jsxs)(y.b,Yp({direction:"vertical"},{children:[this.renderErrors(),Object(o.jsx)(mt.a,Yp({},r.get(Wc.cipNumberId),_t.getValidation(Wc.cipNumberId,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(hd,Yp({showSearch:!0,disabled:this.props.readonly||this.state.loading||this.state.saving||this.state.submitting,optionFilterProp:"children"},{children:this.state.cipNumberDetails.map((function(e){return n.renderCipNumberOption(e)}))}),void 0)}),Wc.cipNumberId),Object(o.jsx)(mt.a,Yp({},r.get(Wc.needForProgram),_t.getValidation(Wc.needForProgram,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ut.a.TextArea,{disabled:this.props.readonly||this.state.loading||this.state.saving||this.state.submitting,maxLength:5e3,showCount:!0,autoSize:{minRows:5}},void 0)}),void 0),Object(o.jsx)(mt.a,Yp({},r.get(Wc.anticipatedAnnualEnrollment),_t.getValidation(Wc.anticipatedAnnualEnrollment,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(Ni.a,{disabled:this.props.readonly||this.state.loading||this.state.saving||this.state.submitting,min:0},void 0)}),void 0),Object(o.jsx)(mt.a,Yp({},r.get(Wc.anticipatedAnnualCompleters),_t.getValidation(Wc.anticipatedAnnualCompleters,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(Ni.a,{disabled:this.props.readonly||this.state.loading||this.state.saving||this.state.submitting,min:0},void 0)}),void 0),(null===(e=this.state.newProgramChangeRequest)||void 0===e?void 0:e.isTransferMajorProgram)?null:Object(o.jsx)(mt.a,Yp({},r.get(Wc.requiresWorkExperiences),_t.getValidation(Wc.requiresWorkExperiences,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(H
1d,{disabled:this.props.readonly||this.state.loading||this.state.saving||this.state.submitting},void 0)}),void 0),(null===(t=this.state.newProgramChangeRequest)||void 0===t?void 0:t.isTransferMajorProgram)?null:this.renderRequiredWorkExperience(r),this.renderActions()]}),void 0)}),void 0)},t.prototype.renderActions=function(){if(!this.props.readonly)return Object(o.jsxs)(y.b,Yp({direction:"horizontal",wrap:!0},{children:[Object(o.jsx)(rs,{onClick:this.props.onPrevious},void 0),Object(o.jsx)(ss,{htmlType:"submit",submitting:this.state.submitting},void 0),Object(o.jsx)(Tr,{type:"default",htmlType:"button",onClick:this.handleSave,saving:this.state.submitting,saved:this.state.saved},void 0),Object(o.jsx)(Ir,{disabled:this.props.readonly||this.state.loading||this.state.saving||this.state.submitting,resetting:this.state.resetting,onConfirm:this.resetForm},void 0)]}),void 0)},t.prototype.renderCipNumberOption=function(e){var t,n;if(e.cipNumberId&&(!(null===(t=this.state.newProgramChangeRequest)||void 0===t?void 0:t.isTransferMajorProgram)&&e.nonTransferMajor||(null===(n=this.state.newProgramChangeRequest)||void 0===n?void 0:n.isTransferMajorProgram)&&e.transferMajor))return Object(o.jsxs)(pr.a.Option,Yp({value:e.cipNumberId},{children:[e.display," - ",e.title]}),e.cipNumberId)},t.prototype.renderErrors=function(){if(this.state.error)return Object(o.jsx)(ct.a,{showIcon:!0,message:"Error Saving",type:"error",description:this.state.message},void 0)},t}(a.Component),Lp=Up,kp=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Gp=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return kp(t,e),t.prototype.getInstitutionUserTableData=function(e,t){var n="api/institutionUsers",r=n.indexOf("?")>0?"&":"?";return null!=t&&(n+=r+"institutionId="+encodeURIComponent(t),r="&"),n=n.replace(/null|undefined/gi,""),this.SendRequest(e,"post",n,!0,!1)},t.prototype.getInstitutionsForUserTableData=function(e,t){var n="api/institutionUsers/institutionsForUser",r=n.indexOf("?")>0?"&":"?";return null!=t&&(n+=r+"userId="+encodeURIComponent(t),r="&"),n=n.replace(/null|undefined/gi,""),this.SendRequest(e,"post",n,!0,!1)},t.prototype.getInstitutionUsersDataTableExport=function(e,t){var n="api/institutionUsers/export",r=n.indexOf("?")>0?"&":"?";return null!=t&&(n+=r+"institutionId="+encodeURIComponent(t),r="&"),n=n.replace(/null|undefined/gi,""),this.SendRequest(e,"post",n,!0,!1)},t.prototype.searchForUsersNotInInstitution=function(e,t){var n="api/institutionUsers/searchUsers",r=n.indexOf("?")>0?"&":"?";return null!=e&&(n+=r+"searchText="+encodeURIComponent(e),r="&"),null!=t&&(n+=r+"institutionId="+encodeURIComponent(t),r="&"),n=n.replace(/null|undefined/gi,""),this.SendRequest(null,"post",n,!0,!1)},t.prototype.searchForUsers=function(e){var t="api/institutionUsers/getUsers";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.searchForConsultants=function(e){var t="api/institutionUsers/getConsultants";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getUsersNotInContact=function(e){var t="api/institutionUsers/getAllUsers";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getInstitutionRolesForInsitutionUser=function(e,t){var n="api/institutionUsers/getInstitutionRoles",r=n.indexOf("?")>0?"&":"?";return null!=e&&(n+=r+"userId="+encodeURIComponent(e),r="&"),null!=t&&(n+=r+"institutionId="+encodeURIComponent(t),r="&"),n=n.replace(/null|undefined/gi,""),this.SendRequest(null,"post",n,!0,!1)},t.prototype.getInstitutionUserDetails=function(e,t){var n="api/institutionUsers/getInstitutionUser",r=n.indexOf("?")>0?"&":"?";return null!=e&&(n+=r+"userId="+encodeURIComponent(e),r="&"),null!=t&&(n+=r+"institutionId="+encodeURIComponent(t),r="&"),n=n.replace(/null|undefined/gi,""),this.SendRequest(null,"post",n,!0,!1)},t.prototype.addInstitutionUser=function(e){var t="api/institutionUsers/addInstitutionUser";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.removeInstitutionUser=function(e){var t="api/institutionUsers/removeInstitutionUser";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t}(U),Vp=new Gp,Bp=Vp,Wp=function(e){return Object.assign({changeRequestId:null,institutionId:"00000000-0000-0000-0000-000000000000",newProgramChangeRequest:null},e)},zp=function(e){return Object.assign({searchText:"",institutionId:"00000000-0000-0000-0000-000000000000",userIds:[]},e)},Hp=function(e){return Object.assign({newProgramChangeRequest:null},e)},Qp=function(e){return Object.assign({changeRequestId:"00000000-0000-0000-0000-000000000000"},e)},Kp={className:"NewProgramChangeRequestContactDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",newProgramChangeRequestId:"00000000-0000-0000-0000-000000000000",newProgramChangeRequest:null,userId:null,user:null,firstName:"",lastName:"",email:"",ph
1one:""},e)},id:"id",newProgramChangeRequestId:"newProgramChangeRequestId",newProgramChangeRequest:"newProgramChangeRequest",userId:"userId",user:"user",firstName:"firstName",lastName:"lastName",email:"email",phone:"phone"},Xp=Kp,Jp=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),$p=function(){return $p=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},$p.apply(this,arguments)},Zp=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n.firstNameIdentifier="firstName",n.lastNameIdentifier="lastName",n.emailIdentifier="email",n.getContactFormItems=function(e){return(new Map).set(Xp.userId,{name:[e,Xp.userId]}).set(Xp.firstName,{name:[e,Xp.firstName],required:!0,rules:[Ot.required()]}).set(Xp.lastName,{name:[e,Xp.lastName],required:!0,rules:[Ot.required()]}).set(Xp.email,{name:[e,Xp.email],required:!0,rules:[Ot.required()]}).set(Xp.phone,{name:[e,Xp.phone]})},n.getColumnDefinitionsForContactInformation=function(e){var t=n.state.userSearch,r=t.map((function(e){return{label:e.fullDisplay,key:e.id,value:e.id}}));return[{title:"First Name",dataIndex:Xp.firstName,render:function(e,i,a){return Object(o.jsx)(mt.a,$p({},n.getContactFormItems(a).get(Xp.firstName),_t.getValidation(Xp.firstName+a,n.state.fieldErrors,n.state.submitted||n.props.readonly),{children:Object(o.jsx)(Ga.a,$p({open:n.state.openSelect.get(n.firstNameIdentifier+a),onClick:function(){return n.handleClick(n.firstNameIdentifier+a)},onBlur:function(){return n.handleBlur(n.firstNameIdentifier+a)},disabled:n.props.readonly,options:r,onSearch:n.handleUserSearch,onSelect:function(e){return n.handleContactSelected(e,t,a)}},{children:Object(o.jsx)(ut.a,{title:"First Name",disabled:n.props.readonly},void 0)}),void 0)}),void 0)}},{title:"Last Name",dataIndex:Xp.lastName,render:function(e,i,a){return Object(o.jsx)(mt.a,$p({},n.getContactFormItems(a).get(Xp.lastName),_t.getValidation(Xp.lastName+a,n.state.fieldErrors,n.state.submitted||n.props.readonly),{children:Object(o.jsx)(Ga.a,$p({open:n.state.openSelect.get(n.lastNameIdentifier+a),onClick:function(){return n.handleClick(n.lastNameIdentifier+a)},onBlur:function(){return n.handleBlur(n.lastNameIdentifier+a)},disabled:n.props.readonly,options:r,onSearch:n.handleUserSearch,onSelect:function(e){return n.handleContactSelected(e,t,a)}},{children:Object(o.jsx)(ut.a,{title:"Last Name",disabled:n.props.readonly},void 0)}),void 0)}),void 0)}},{title:"Email",dataIndex:Xp.email,render:function(e,i,a){return Object(o.jsx)(mt.a,$p({},n.getContactFormItems(a).get(Xp.email),_t.getValidation(Xp.email+a,n.state.fieldErrors,n.state.submitted||n.props.readonly),{children:Object(o.jsx)(Ga.a,$p({open:n.state.openSelect.get(n.emailIdentifier+a),onClick:function(){return n.handleClick(n.emailIdentifier+a)},onBlur:function(){return n.handleBlur(n.emailIdentifier+a)},disabled:n.props.readonly,options:r,onSearch:n.handleUserSearch,onSelect:function(e){return n.handleContactSelected(e,t,a)}},{children:Object(o.jsx)(ut.a,{title:"Email",disabled:n.props.readonly},void 0)}),void 0)}),void 0)}},{title:"Phone Number",dataIndex:Xp.phone,render:function(e,t,r){return Object(o.jsx)(mt.a,$p({},n.getContactFormItems(r).get(Xp.phone),_t.getValidation(Xp.phone+r,n.state.fieldErrors,n.state.submitted||n.props.readonly),{children:Object(o.jsx)(ut.a,{title:"Phone Number",disabled:n.props.readonly},void 0)}),void 0)}},{title:"Actions",dataIndex:Xp.userId,width:"15px",render:function(t,r,i){var a,s;return n.props.readonly||(null===(s=null===(a=n._formRef.current)||void 0===a?void 0:a.getFieldValue(Wc.contacts))||void 0===s?void 0:s.length)<=1?null:Object(o.jsx)(rt.a,$p({type:"link",onClick:function(){return e(r.name)}},{children:Object(o.jsx)(Yd.a,{},void 0)}),void 0)},sorter:!1,filterType:wr.NONE}]},n.loadChangeRequest=function(){var e=Qp({changeRequestId:n.props.changeRequestId});return Fc.getStep3(e).then((function(e){var t,r,i,o,a;if(e){var s=n.state.openSelect,d=0;null===(r=null===(t=n.state.newProgramChangeRequest)||void 0===t?void 0:t.contacts)||void 0===r||r.forEach((function(){s.set(n.firstNameIdentifier+d,!1),s.set(n.lastNameIdentifier+d,!1),s.set(n.emailIdentifier+d,!1),d++})),n.setState({changeRequest:null!==(i=e.changeRequest)&&void 0!==i?i:$a.create(),newProgramChangeRequest:null!==(a=null===(o=e.changeRequest)||void 0===o?void 0:o.newProgramChangeRequest)&&void 0!==a?a:Wc.create(),fieldErrors:n.props.changeRequestDetailsPage?null:e.fieldErrors,openSelect:s},(function(){return n.resetForm()}))}})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.resetForm=function(){var e;n.setState({altered:!1}),null===(e=n._formRef.current)||void 0===e||e.resetFields()},n.handleChange=function(e){n.setState({altered:e})},n.toggleOpen=function(e,t){var r=n.state.openSelect;r.set(n.firstNameIdentifier,!1),r.set(n.lastNameIdentifier,!1),r.set(n.emailIdentifier,!1),r.set(e,t),n.setState({openSelect:r})},n.handleClick=function(e){var t,r;n.toggleOpen(e,!(null!==(r=null===(t=n.state.openSelect)||void 0===t?void 0:t.get(e))&&void 0!==r&&r))},n.handleBlur=function(e){n.toggleOpen(e,!1)},n.handleContactSelected=function(e,t,r){var i,o,a=t.filter((function(t){return t.id==e}))[0],s=null===(i=n._formRef.current)||void 0===i?void 0:i.getFieldValue(Wc.contacts);s[r]=$p($p({},s[r]),{firstName:a.firstName,lastName:a.lastName,phoneNumber:a.phoneNumber,email:a.username,userId:a.id}),a&&(null===(o=n._formRef.current)||void 0===o||o.setFieldsValue({contacts:s})),n.setState({userSearch:[]})},n.handleUserSearch=function(e){if(e.length>=3){var t=zp({institutionId:n.props.selectedInstitution,searchText:e});Bp.searchForUsers(t).then((function(e){e.users&&n.setState({userSearch:e.users})})).catch((function(){n.setState({error:!0})}
1)).finally((function(){n.setState({loading:!1})}))}},n.handleSave=function(){var e;n.setState({saving:!0});var t=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldsValue();t=$p($p({},n.state.changeRequest.newProgramChangeRequest),t);var r=Wp({newProgramChangeRequest:t});Fc.saveStep3(r).then((function(e){var t;(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()}),n.props.onSave&&n.props.onSave()):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Save Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Save Failed")})).finally((function(){n.setState({loading:!1,saving:!1})}))},n.handleSubmit=function(){var e,t;n.setState({submitting:!0});var r=null!==(t=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldsValue())&&void 0!==t?t:Wc.create();r=$p($p({},n.state.changeRequest.newProgramChangeRequest),r);var i=Hp({newProgramChangeRequest:r});Fc.submitStep3(i).then((function(e){(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.props.onSave&&n.props.onSave(),n.props.onSubmit&&n.props.onSubmit()):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Save Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Save Failed")})).finally((function(){n.setState({loading:!1,submitting:!1,submitted:!0})}))},n.state={changeRequest:$a.create(),changeRequests:[],newProgramChangeRequest:Wc.create(),consultantSearch:[],userSearch:[],openSelect:new Map},n}return Jp(t,e),t.prototype.componentDidMount=function(){this.props.changeRequestId&&this.props.changeRequestId&&this.props.changeRequestId!=re.default.Empty()&&this.loadChangeRequest()},t.prototype.componentDidUpdate=function(e){this.props.changeRequestId&&this.props.changeRequestId!=e.changeRequestId&&this.props.changeRequestId&&this.props.changeRequestId!=re.default.Empty()&&this.loadChangeRequest(),this.props.loading!=e.loading&&this.setState({loading:this.props.loading})},t.prototype.render=function(){var e=this;return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(y.b,$p({size:"small",direction:"vertical"},{children:[this.renderErrors(),Object(o.jsx)(ht.a,$p({ref:this._formRef,layout:"vertical",initialValues:this.state.newProgramChangeRequest,onFinish:this.handleSubmit,onValuesChange:this.handleChange},{children:Object(o.jsxs)(y.b,$p({direction:"vertical"},{children:[Object(o.jsx)(ot.a.Paragraph,$p({italic:!0},{children:"Please review the contact information for the point(s) of contact for this program."}),void 0),Object(o.jsx)(ht.a.List,$p({name:Wc.contacts},{children:function(t,n){var r=n.add,i=n.remove;return Object(o.jsxs)(y.b,$p({direction:"vertical"},{children:[Object(o.jsx)(Pi.a,{size:"small",dataSource:t,pagination:!1,columns:e.getColumnDefinitionsForContactInformation(i)},void 0),e.renderAddAdditionalContact(r)]}),void 0)}}),void 0),this.renderActions()]}),void 0)}),void 0)]}),void 0)},t.prototype.renderActions=function(){if(!this.props.readonly)return Object(o.jsxs)(y.b,$p({direction:"horizontal",wrap:!0},{children:[Object(o.jsx)(rs,{onClick:this.props.onPrevious},void 0),Object(o.jsx)(ss,{htmlType:"submit",submitting:this.state.submitting},void 0),Object(o.jsx)(Tr,{type:"default",htmlType:"button",onClick:this.handleSave,saving:this.state.submitting,saved:this.state.saved},void 0),Object(o.jsx)(Ir,{disabled:!this.state.altered,resetting:this.state.resetting,onConfirm:this.resetForm},void 0)]}),void 0)},t.prototype.renderAddAdditionalContact=function(e){if(!this.props.readonly)return Object(o.jsx)(rt.a,$p({onClick:function(){return e()},icon:Object(o.jsx)(Xc.a,{},void 0)},{children:"Add Additional Contact"}),void 0)},t.prototype.renderErrors=function(){var e;if(this.state.error){var t=null===(e=_t.getValidation(Wc.contacts,this.state.fieldErrors,this.state.submitted||this.props.readonly))||void 0===e?void 0:e.messages.join("\n");return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:t},void 0)}},t}(a.Component),ef=Zp,tf=function(e){return Object.assign({changeRequestId:null,institutionId:"00000000-0000-0000-0000-000000000000",newProgramChangeRequest:null},e)},nf=function(e){return Object.assign({institutionId:"00000000-0000-0000-0000-000000000000",userIds:[]},e)},rf=function(e){return Object.assign({changeRequestId:"00000000-0000-0000-0000-000000000000"},e)},of={className:"NoticeOfIntentChangeRequestConsultantMeetingConsultantDTO",create:function(e){return Object.assign(Q.create(),{id:null,noticeOfIntentChangeRequestMeetingId:"00000000-0000-0000-0000-000000000000",userId:"00000000-0000-0000-0000-000000000000",consultant:null},e)},id:"id",noticeOfIntentChangeRequestMeetingId:"noticeOfIntentChangeRequestMeetingId",userId:"userId",consultant:"consultant"},af=of,sf={className:"NoticeOfIntentChangeRequestConsultantMeetingDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",noticeOfIntentChangeRequestId:"00000000-0000-0000-0000-000000000000",consultantIds:[],noticeOfIntentChangeRequest:null,date:null,consultants:[]},e)},id:"id",noticeOfIntentChangeRequestId:"noticeOfIntentChangeRequestId",consultantIds:"consultantIds",noticeOfIntentChangeRequest:"noticeOfIntentChangeRequest",date:"date",consultants:"consultants"},df=sf,cf={className:"NoticeOfIntentChangeRequestDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",changeRequestId:"00000000-0000-0000-0000-000000000000",institutionId:"00000000-0000-0000-0000-000000000000",institution:null,cipNumberId:null,cipNumber:null,previousCipNumberId:null,previousCipNumber:null,primrayAwardTypeId:null,primrayAwardType:null,iowaVariationId:null,iowaVariation:null,cipReclassification:null,isTransferMajorProgram:null,needForProgram:"",anticipatedAnnualEnrollment:null,anticipatedAnnualCompleters:null,fiveYearAnticipatedEnrollment:null,fiveYearAnticipatedCompleters:null,requiresWorkExperiences:null,requiredWorkExperiences:"",secondaryPathways:"",postSecondaryPathways:"",uniqueProgramFeatures:"",sharedProgramEntities:"",additionalLaborMarketInformation:"",externalAccreditationRequirements:null,externalAccreditationRequirementDetails:"",collaborationEfforts:"",statePriority:"",programDuplicationAdditionalComments:"",institutionSimilarOffer
1ings:"",institutionProgramsAtNewLocation:"",plannedAwardTypes:[],contacts:[],consultantMeetings:[],occupations:[],industryResources:[],noticeOfIntentCompleterData:[],externalInstitutionLinkages:[]},e)},id:"id",changeRequestId:"changeRequestId",institutionId:"institutionId",institution:"institution",cipNumberId:"cipNumberId",cipNumber:"cipNumber",previousCipNumberId:"previousCipNumberId",previousCipNumber:"previousCipNumber",primrayAwardTypeId:"primrayAwardTypeId",primrayAwardType:"primrayAwardType",iowaVariationId:"iowaVariationId",iowaVariation:"iowaVariation",cipReclassification:"cipReclassification",isTransferMajorProgram:"isTransferMajorProgram",needForProgram:"needForProgram",anticipatedAnnualEnrollment:"anticipatedAnnualEnrollment",anticipatedAnnualCompleters:"anticipatedAnnualCompleters",fiveYearAnticipatedEnrollment:"fiveYearAnticipatedEnrollment",fiveYearAnticipatedCompleters:"fiveYearAnticipatedCompleters",requiresWorkExperiences:"requiresWorkExperiences",requiredWorkExperiences:"requiredWorkExperiences",secondaryPathways:"secondaryPathways",postSecondaryPathways:"postSecondaryPathways",uniqueProgramFeatures:"uniqueProgramFeatures",sharedProgramEntities:"sharedProgramEntities",additionalLaborMarketInformation:"additionalLaborMarketInformation",externalAccreditationRequirements:"externalAccreditationRequirements",externalAccreditationRequirementDetails:"externalAccreditationRequirementDetails",collaborationEfforts:"collaborationEfforts",statePriority:"statePriority",programDuplicationAdditionalComments:"programDuplicationAdditionalComments",institutionSimilarOfferings:"institutionSimilarOfferings",institutionProgramsAtNewLocation:"institutionProgramsAtNewLocation",plannedAwardTypes:"plannedAwardTypes",contacts:"contacts",consultantMeetings:"consultantMeetings",occupations:"occupations",industryResources:"industryResources",noticeOfIntentCompleterData:"noticeOfIntentCompleterData",externalInstitutionLinkages:"externalInstitutionLinkages"},lf=cf,uf=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),pf=function(){return pf=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},pf.apply(this,arguments)},ff=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n.getConsultantMeetingFormItems=function(e){return(new Map).set(df.date,{label:"When was this consultant meeting?",name:[e,df.date],required:!0,rules:[Ot.required()]}).set(df.consultantIds,{label:"Consultants",name:[e,df.consultantIds],required:!0,rules:[Ot.required()]})},n.cleanDates=function(e){var t;return null===(t=null===e||void 0===e?void 0:e.consultantMeetings)||void 0===t||t.forEach((function(e){e.date=It()(e.date)})),e},n.fetchData=function(){n.setState({loading:!0});var e=[];0==n.state.consultants.length&&e.push(n.getConsultants()),n.props.changeRequestId&&n.props.changeRequestId!=re.default.Empty()&&e.push(n.loadChangeRequest()),Promise.all(e).then((function(){n.setState({loading:!1})}))},n.getConsultants=function(){var e=nf({institutionId:n.props.selectedInstitution});return Bp.searchForConsultants(e).then((function(e){e.users&&n.setState({consultants:e.users})})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))},n.loadChangeRequest=function(){var e=rf({changeRequestId:n.props.changeRequestId});return Fc.getStep4(e).then((function(e){var t,r,i,o,a,s;if(e){var d=null!==(r=lf.create(pf({},null===(t=e.changeRequest)||void 0===t?void 0:t.newProgramChangeRequest)))&&void 0!==r?r:lf.create();0==(null===(i=(d=n.cleanDates(d)).consultantMeetings)||void 0===i?void 0:i.length)&&(d.consultantMeetings=[df.create({consultants:[af.create({userId:re.default.Empty()})],date:""})]),n.setState({changeRequest:null!==(o=e.changeRequest)&&void 0!==o?o:$a.create(),noticeOfIntent:d,newProgramChangeRequest:null!==(s=null===(a=e.changeRequest)||void 0===a?void 0:a.newProgramChangeRequest)&&void 0!==s?s:Wc.create(),fieldErrors:n.props.changeRequestDetailsPage?null:e.fieldErrors},(function(){return n.resetForm()}))}})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.resetForm=function(){var e;n.setState({altered:!1}),null===(e=n._formRef.current)||void 0===e||e.resetFields()},n.handleChange=function(e){n.setState({altered:e})},n.handleSave=function(){var e,t;n.setState({saving:!0});var r=n.state.newProgramChangeRequest;r.consultantMeetings=null!==(t=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldValue(lf.consultantMeetings))&&void 0!==t?t:[];n.state.changeRequest.newProgramChangeRequest;var i=tf({newProgramChangeRequest:r});Fc.saveStep4(i).then((function(e){(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.props.onSave&&n.props.onSave()):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Save Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Save Failed")})).finally((function(){n.setState({loading:!1,saving:!1})}
1))},n.handleSubmit=function(){var e,t;n.setState({submitting:!0});var r=n.state.newProgramChangeRequest;r.consultantMeetings=null!==(t=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldValue(lf.consultantMeetings))&&void 0!==t?t:[];n.state.changeRequest.newProgramChangeRequest;var i=tf({newProgramChangeRequest:r});Fc.submitStep4(i).then((function(e){(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.props.onSave&&n.props.onSave(),n.props.onSubmit&&n.props.onSubmit()):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Save Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Save Failed")})).finally((function(){n.setState({loading:!1,submitting:!1,submitted:!0})}))},n.state={changeRequest:$a.create(),changeRequests:[],newProgramChangeRequest:Wc.create(),noticeOfIntent:lf.create(),consultants:[],userSearch:[]},n}return uf(t,e),t.prototype.componentDidMount=function(){this.props.changeRequestId&&this.fetchData()},t.prototype.componentDidUpdate=function(e){this.props.changeRequestId&&this.props.changeRequestId!=e.changeRequestId&&this.fetchData(),this.props.loading!=e.loading&&this.setState({loading:this.props.loading})},t.prototype.render=function(){return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(y.b,pf({size:"small",direction:"vertical"},{children:[this.renderErrors(),Object(o.jsx)(ht.a,pf({ref:this._formRef,layout:"vertical",initialValues:this.state.noticeOfIntent,onValuesChange:this.handleChange,onFinish:this.handleSubmit},{children:Object(o.jsxs)(y.b,pf({direction:"vertical"},{children:[Object(o.jsx)(ot.a.Paragraph,pf({italic:!0},{children:"The IDOE requires at least one meeting with our consultants prior to submission. Please review these meetings below."}),void 0),this.renderConsultantMeetings(),this.renderActions()]}),void 0)}),void 0)]}),void 0)},t.prototype.renderActions=function(){if(!this.props.readonly)return Object(o.jsxs)(y.b,pf({direction:"horizontal",wrap:!0},{children:[Object(o.jsx)(rs,{onClick:this.props.onPrevious},void 0),Object(o.jsx)(ss,{htmlType:"submit",submitting:this.state.submitting},void 0),Object(o.jsx)(Tr,{type:"default",htmlType:"button",onClick:this.handleSave,saving:this.state.submitting,saved:this.state.saved},void 0),Object(o.jsx)(Ir,{disabled:!this.state.altered,resetting:this.state.resetting,onConfirm:this.resetForm},void 0)]}),void 0)},t.prototype.renderConsultantMeetings=function(){var e=this;return Object(o.jsx)(ht.a.List,pf({name:lf.consultantMeetings},{children:function(t,n){var r=n.add,i=n.remove;return Object(o.jsxs)(y.b,pf({direction:"vertical"},{children:[t.map((function(t,n){if(t)return e.renderConsultantMeeting(t,n,i)})),e.renderAdditionalMeeting(r)]}),void 0)}}),void 0)},t.prototype.renderAdditionalMeeting=function(e){if(!this.props.readonly)return Object(o.jsx)(rt.a,pf({onClick:function(){return e()},icon:Object(o.jsx)(Xc.a,{},void 0)},{children:"Add Additional Consultant Meeting"}),void 0)},t.prototype.renderConsultantMeeting=function(e,t,n){var r,i,a=this,s=(null===(i=null===(r=this._formRef.current)||void 0===r?void 0:r.getFieldValue(lf.consultantMeetings))||void 0===i?void 0:i.length)>1,d="Consultant Meeting "+(s?t+1:""),c=s&&!this.props.readonly?Object(o.jsx)(rt.a,{type:"link",size:"small",onClick:function(){return n(e.name)},icon:Object(o.jsx)(Yd.a,{},void 0)},void 0):null;return Object(o.jsx)(Qn.a,pf({type:"inner",size:"small",title:d,extra:c},{children:Object(o.jsxs)(y.b,pf({direction:"vertical"},{children:[Object(o.jsx)(mt.a,pf({},this.getConsultantMeetingFormItems(t).get(df.date),_t.getValidation(df.date+t,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ur.a,{format:"M/D/YYYY",disabled:this.props.readonly,disabledDate:$r.isFutureDate},void 0)}),void 0),Object(o.jsx)(ot.a.Paragraph,{children:"Please list all IDOE consultants that you met with."},void 0),Object(o.jsx)(mt.a,pf({},this.getConsultantMeetingFormItems(t).get(df.consultantIds),_t.getValidation(df.consultantIds+t,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(hd,pf({disabled:this.props.readonly,mode:"multiple",showSearch:!0,optionFilterProp:"children"},{children:this.state.consultants.map((function(e){return a.renderConsultantOption(e)}))}),void 0)}),void 0)]}),void 0)}),void 0)},t.prototype.renderConsultantOption=function(e){var t,n;return Object(o.jsx)(pr.a.Option,pf({value:null!==(t=e.id)&&void 0!==t?t:re.default.Empty()},{children:e.fullDisplay}),null!==(n=e.id)&&void 0!==n?n:re.default.Empty())},t.prototype.renderAddConsultant=function(e){if(!this.props.readonly)return Object(o.jsx)(rt.a,pf({icon:Object(o.jsx)(Xc.a,{},void 0),onClick:function(){return e()}},{children:"Add Consultant"}),void 0)},t.prototype.renderErrors=function(){if(this.state.error)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:this.state.message},void 0)},t}(a.Component),hf=ff,vf=function(){function e(){}return e.REGIONAL=1,e.STATE=2,e.NATIONAL=3,e}(),mf=vf,gf=function(e){return Object.assign({newProgramChangeRequest:null},e)},bf=function(e){return Object.assign({newProgramChangeRequest:null},e)},yf=function(e){return Object.assign({changeRequestId:"00000000-0000-0000-0000-000000000000"},e)},Of={className:"LocationTypeDTO",create:function(e){return Object.assign(Q.create(),{id:0,name:"",displayOrder:0},e)},id:"id",name:"name",displayOrder:"displayOrder"},jf=Of,If={className:"NoticeOfIntentChangeRequestOccupationDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",noticeOfIntentChangeRequestId:"00000000-0000-0000-0000-000000000000",noticeOfIntentChangeRequest:null,title:"",averageEntryLevelSalary:null,regionalStats:[],minimumEducationRequirements:"",professionalCredentialRequirements:null,professionalCredentialRequirementDetails:"",nontraditionalByGender:null,genderId:null,gender:null},e)},id:"id",noticeOfIntentChangeRequestId:"noticeOfIntentChangeRequestId",noticeOfIntentChangeRequest:"noticeOfIntentChangeRequest",title:"title",averageEntryLevelSalary:"averageEntryLevelSalary",regionalStats:"regionalStats",minimumEducationRequirements:"minimumEducationRequirements",professionalCredentialRequirements:"professionalCredentialRequirements",professionalCredentialRequirementDetails:"professionalCredentialRequirementDetails",nontraditionalByGender:"nontraditionalByGender",genderId:"genderId",gender:"gender"},Sf=If,Ef={className:"NoticeOfIntentChangeRequestRegionalStatsDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",noticeOfIntentChangeRequestOccupationId:"00000000-0000-0000-0000-000000000000",noticeOfIntentChangeRequestOccupation:null,locationTypeId:0,locationType:null,numberOfOpenings:null,shortTermGrowthRate:null,longTermGrowthRate:null},e)},id:"id",noticeOfIntentChangeRequestOccupationId:"noticeOfIntentChangeRequestOccupationId",noticeOfIntentChangeRequestOccupation:"noticeOfIntentChangeRequestOccupation",locationTypeId:"locationTypeId",locationType:"locationType",numberOfOpenings:"numberOfOpenings",shortTermGrowthRate:"shortTermGrowthRate",longTermGrowthRate:"longTermGrowthRate"},Rf=Ef,_f=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Tf=function(e){function t(t){var n=e.call(this,t)||this;return n.state={value:null,options:[]},n}return _f(t,e),t.prototype.componentDidMount=function(){void 0!=this.props.value&&this.setState({value:this.props.value}),void 0!=this.props.options&&this.setState({options:this.props.options})},t.prototype.componentDidUpdate=function(e){void 0!=this.props.value&&this.props.value!=e.value&&this.setState({value:this.props.value}),void 0!=this.props.options&&this.props.options!=e.options&&this.setState({options:this.props.options})},t.prototype.render=function(){var e,t,n,r=this;if(this.state.options&&this.state.value){var i=null!==(n=null===(t=null===(e=this.state.options)||void 0===e?void 0:e.filter((function(e){return e.value==r.state.value}))[0])||void 0===t?void 0:t.label)&&void 0!==n?n:"...";return Object(o.jsx)(ot.a.Text,{children:i},void 0)}return Object(o.jsx)(ot.a.Text,{children:"..."},void 0)},t}(a.Component),Cf=Tf,xf=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Af=function(){return Af=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Af.apply(this,arguments)},Pf=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n.getOccupationFormItems=function(e){var t,r,i,o,a=null===(r=null===(t=n._formRef.current)||void 0===t?void 0:t.getFieldValue(lf.occupations)[e])||void 0===r?void 0:r.nontraditionalByGender,s=null===(o=null===(i=n._formRef.current)||void 0===i?void 0:i.getFieldValue(lf.occupations)[e])||void 0===o?void 0:o.professionalCredentialRequirements;return(new Map).set(Sf.title,{required:!0,name:[e,Sf.title],label:"What is the name of the occupation?",rules:[Ot.required()]}).set(Sf.averageEntryLevelSalary,{required:!0,name:[e,Sf.averageEntryLevelSalary],label:"What is the average entry level salary for this occupation?",rules:[Ot.required()]}).set(Sf.minimumEducationRequirements,{required:!0,name:[e,Sf.minimumEducationRequirements],label:"Please provide the minimum educational requirements for this occupation.",rules:[Ot.required()]}).set(Sf.professionalCredentialRequirements,{required:!0,name:[e,Sf.professionalCredentialRequirements],label:"Are there any professional credential requirements for this occupation?",rules:[Ot.required()]}).set(Sf.professionalCredentialRequirementDetails,{required:s,name:[e,Sf.professionalCredentialRequirementDetails],label:"Please provide the professional credential requirements for this occupation.",rules:s?[Ot.required()]:[]}).set(Sf.nontraditionalByGender,{required:!0,name:[e,Sf.nontraditionalByGender],label:"Is this occupation nontraditional by gender? (Less than 25% of the workforce)",rules:[Ot.required()]}).set(Sf.genderId,{required:a,name:[e,Sf.genderId],label:"Which gender is this occupation nontraditional by?",rules:a?[Ot.required()]:[]})},n.getRegionalStatsFormItems=function(e){return(new Map).set(Rf.locationTypeId,{name:[e,Rf.locationTypeId]}).set(Rf.numberOfOpenings,{required:!0,name:[e,Rf.numberOfOpenings],rules:[Ot.required()]}).set(Rf.shortTermGrowthRate,{required:!0,name:[e,Rf.shortTermGrowthRate],rules:[Ot.required()]}).set(Rf.longTermGrowthRate,{required:!0,name:[e,Rf.longTermGrowthRate],rules:[Ot.required()]})},n.fetchData=function(){var e=[];0==n.state.locationTypes.length&&e.push(n.loadLocationTypes()),0==n.state.genders.length&&e.push(n.loadGenders()),n.props.changeRequestId&&n.props.changeRequestId!=re.default.Empty()&&e.push(n.loadChangeRequest()),Promise.all(e).then((function(){n.setState({loading:!1})}
1))},n.loadLocationTypes=function(){return n.setState({loading:!0}),ce.getAll(jf.className).then((function(e){n.setState({locationTypes:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))},n.loadGenders=function(){return n.setState({loading:!0}),ce.getAll(Bu.className).then((function(e){n.setState({genders:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))},n.loadChangeRequest=function(){var e=yf({changeRequestId:n.props.changeRequestId});return Fc.getStep5(e).then((function(e){var t,r,i,o,a,s;if(e){var d=null!==(r=lf.create(Af({},null===(t=e.changeRequest)||void 0===t?void 0:t.newProgramChangeRequest)))&&void 0!==r?r:lf.create();null==d&&(d=lf.create()),0==(null===(i=null===d||void 0===d?void 0:d.occupations)||void 0===i?void 0:i.length)&&(d.occupations=[Sf.create({regionalStats:[Rf.create({locationTypeId:mf.REGIONAL}),Rf.create({locationTypeId:mf.STATE}),Rf.create({locationTypeId:mf.NATIONAL})],nontraditionalByGender:null,professionalCredentialRequirements:null,genderId:null})]),n.setState({changeRequest:null!==(o=e.changeRequest)&&void 0!==o?o:$a.create(),noticeOfIntent:d,newProgramChangeRequest:null!==(s=null===(a=e.changeRequest)||void 0===a?void 0:a.newProgramChangeRequest)&&void 0!==s?s:Wc.create(),fieldErrors:n.props.changeRequestDetailsPage?null:e.fieldErrors},(function(){return n.resetForm()}))}})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.resetForm=function(){var e;n.setState({altered:!1}),null===(e=n._formRef.current)||void 0===e||e.resetFields()},n.handleChange=function(e){n.setState({altered:e})},n.handleSave=function(){var e,t;n.setState({saving:!0});var r=n.state.newProgramChangeRequest;r.occupations=null!==(t=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldValue(lf.occupations))&&void 0!==t?t:[];n.state.changeRequest.newProgramChangeRequest;var i=gf({newProgramChangeRequest:r});Fc.saveStep5(i).then((function(e){(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.props.onSave&&n.props.onSave()):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Save Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Save Failed")})).finally((function(){n.setState({loading:!1,saving:!1})}))},n.handleSubmit=function(){var e,t;n.setState({submitting:!0});var r=n.state.newProgramChangeRequest;r.occupations=null!==(t=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldValue(lf.occupations))&&void 0!==t?t:[];n.state.changeRequest.newProgramChangeRequest;var i=bf({newProgramChangeRequest:r});Fc.submitStep5(i).then((function(e){(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.props.onSave&&n.props.onSave(),n.props.onSubmit&&n.props.onSubmit()):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Save Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Save Failed")})).finally((function(){n.setState({loading:!1,submitting:!1,submitted:!0})}))},n.getRegionalStatsColumnDefinitions=function(e){return[{title:"Location Types",dataIndex:Rf.locationTypeId,render:function(e,t,r){return Object(o.jsx)(ht.a.Item,Af({},n.getRegionalStatsFormItems(r).get(Rf.locationTypeId),{children:Object(o.jsx)(Cf,{options:n.state.locationTypes.map((function(e){return{value:e.id,label:e.name}}))},void 0)}),void 0)}},{title:"Number of Openings",dataIndex:Rf.numberOfOpenings,render:function(t,r,i){return Object(o.jsx)(ht.a.Item,Af({},n.getRegionalStatsFormItems(i).get(Rf.numberOfOpenings),_t.getValidation(Rf.numberOfOpenings+(r.name+1)+e,n.state.fieldErrors,n.state.submitted||n.props.readonly||n.props.readonly),{children:Object(o.jsx)(Ni.a,{title:"Number of Openings",disabled:n.props.readonly,min:0},void 0)}),void 0)}},{title:"Short Term Growth Rate",dataIndex:Rf.shortTermGrowthRate,render:function(t,r,i){return Object(o.jsx)(ht.a.Item,Af({},n.getRegionalStatsFormItems(i).get(Rf.shortTermGrowthRate),_t.getValidation(Rf.shortTermGrowthRate+(r.name+1)+e,n.state.fieldErrors,n.state.submitted||n.props.readonly||n.props.readonly),{children:Object(o.jsx)(Ni.a,{title:"Short Term Growth Rate",max:999999,disabled:n.props.readonly,prefix:"%",min:0},void 0)}),void 0)}},{title:"Long Term Growth Rate",dataIndex:Rf.longTermGrowthRate,render:function(t,r,i){return Object(o.jsx)(ht.a.Item,Af({},n.getRegionalStatsFormItems(r.name).get(Rf.longTermGrowthRate),_t.getValidation(Rf.longTermGrowthRate+(r.name+1)+e,n.state.fieldErrors,n.state.submitted||n.props.readonly||n.props.readonly),{children:Object(o.jsx)(Ni.a,{title:"Long Term Growth Rate",max:999999,disabled:n.props.readonly,prefix:"%",min:0},void 0)}),void 0)}}]},n.state={changeRequest:$a.create(),changeRequests:[],newProgramChangeRequest:W
1c.create(),locationTypes:[],genders:[],noticeOfIntent:lf.create({externalAccreditationRequirements:null,occupations:[Sf.create()]})},n}return xf(t,e),t.prototype.componentDidMount=function(){this.fetchData()},t.prototype.componentDidUpdate=function(e){this.props.changeRequestId&&this.props.changeRequestId!=e.changeRequestId&&this.fetchData(),this.props.loading!=e.loading&&this.setState({loading:this.props.loading})},t.prototype.render=function(){var e=this;return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(y.b,Af({size:"small",direction:"vertical"},{children:[this.renderErrors(),Object(o.jsx)(ht.a,Af({ref:this._formRef,layout:"vertical",initialValues:this.state.noticeOfIntent,onValuesChange:this.handleChange,onFinish:this.handleSubmit},{children:Object(o.jsxs)(y.b,Af({direction:"vertical"},{children:[Object(o.jsx)(ot.a.Paragraph,Af({italic:!0},{children:"Please review the labor market information below for occupations related to the new program. Ensure that you have added all occupations for which you have information."}),void 0),Object(o.jsx)(ct.a,{type:"info",message:"The following links contain information to aid you in determining the labor market information for this program.",description:Object(o.jsxs)("ul",{children:[Object(o.jsx)("li",{children:Object(o.jsx)(at.a,Af({to:{pathname:"https://iowa.emsicc.com/"},target:"_blank"},{children:"Career Coach"}),void 0)},void 0),Object(o.jsx)("li",{children:Object(o.jsx)(at.a,Af({to:{pathname:"https://www.iowaworkforcedevelopment.gov/iowa-wage-report"},target:"_blank"},{children:"Iowa Workforce Development (Wages)"}),void 0)},void 0),Object(o.jsx)("li",{children:Object(o.jsx)(at.a,Af({to:{pathname:"https://www.iowaworkforcedevelopment.gov/occupational-projections"},target:"_blank"},{children:"Iowa Workforce Development (Occupational Projections)"}),void 0)},void 0),Object(o.jsx)("li",{children:Object(o.jsx)(at.a,Af({to:{pathname:"https://www.edeps.org/"},target:"_blank"},{children:"EDEPS"}),void 0)},void 0),Object(o.jsx)("li",{children:Object(o.jsx)(at.a,Af({to:{pathname:"https://www.economicmodeling.com/data/"},target:"_blank"},{children:"EMSI"}),void 0)},void 0)]},void 0)},void 0),Object(o.jsx)(ht.a.List,Af({name:lf.occupations},{children:function(t,n){var r=n.add,i=n.remove;return Object(o.jsxs)(y.b,Af({direction:"vertical"},{children:[t.map((function(t,n){return e.renderOccupation(t,i,n)})),e.renderAddOccupation(r)]}),void 0)}}),void 0),this.renderActions()]}),void 0)}),void 0)]}),void 0)},t.prototype.renderActions=function(){if(!this.props.readonly)return Object(o.jsxs)(y.b,Af({direction:"horizontal",wrap:!0},{children:[Object(o.jsx)(rs,{onClick:this.props.onPrevious},void 0),Object(o.jsx)(ss,{htmlType:"submit",submitting:this.state.submitting},void 0),Object(o.jsx)(Tr,{type:"default",htmlType:"button",onClick:this.handleSave,saving:this.state.submitting,saved:this.state.saved},void 0),Object(o.jsx)(Ir,{disabled:!this.state.altered,resetting:this.state.resetting,onConfirm:this.resetForm},void 0)]}),void 0)},t.prototype.renderAddOccupation=function(e){if(!this.props.readonly)return Object(o.jsx)(rt.a,Af({onClick:function(){return e(Sf.create({regionalStats:[Rf.create({locationTypeId:mf.REGIONAL}),Rf.create({locationTypeId:mf.STATE}),Rf.create({locationTypeId:mf.NATIONAL})],nontraditionalByGender:null,professionalCredentialRequirements:null,genderId:null}))},icon:Object(o.jsx)(Xc.a,{},void 0)},{children:"Add Additional Occupation"}),void 0)},t.prototype.renderOccupation=function(e,t,n){var r,i,a,s=this,d=null!==(a=(null===(i=null===(r=this._formRef.current)||void 0===r?void 0:r.getFieldValue(lf.occupations))||void 0===i?void 0:i.length)>1)&&void 0!==a&&a,c="Occupation "+(d?n+1:""),l=Object(o.jsx)(rt.a,{type:"link",size:"small",onClick:function(){return t(e.name)},icon:Object(o.jsx)(Yd.a,{},void 0)},void 0),u=this.getOccupationFormItems(n);return Object(o.jsx)(Qn.a,Af({type:"inner",size:"small",title:c,extra:d&&!this.props.readonly?l:null},{children:Object(o.jsxs)(y.b,Af({direction:"vertical"},{children:[Object(o.jsx)(ht.a.Item,Af({},u.get(Sf.title),_t.getValidation(Sf.title+n,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ut.a,{disabled:this.props.readonly},void 0)}),void 0),Object(o.jsx)(ht.a.Item,Af({},u.get(Sf.averageEntryLevelSalary),_t.getValidation(Sf.averageEntryLevelSalary+n,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(Ni.a,{disabled:this.props.readonly,min:0,addonBefore:"$"},void 0)}),void 0),Object(o.jsx)(ot.a.Text,Af({italic:!0},{children:"Please provide the following statistics about this occupation for each of the levels outlined below."}),void 0),Object(o.jsx)(ht.a.List,Af({name:[n,Sf.regionalStats]},{children:function(e){return Object(o.jsx)(y.b,Af({direction:"vertical"},{children:Object(o.jsx)(Pi.a,{pagination:!1,dataSource:e,columns:s.getRegionalStatsColumnDefinitions(n)},void 0)}),void 0)}}),void 0),Object(o.jsx)(ht.a.Item,Af({label:"Is this occupation nontraditional by gender? (Less than 25% of the workforce)"},u.get(Sf.nontraditionalByGender),_t.getValidation(Sf.nontraditionalByGender+n,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(H
1d,{disabled:this.props.readonly},void 0)}),void 0),this.renderGender(n,u),Object(o.jsx)(ht.a.Item,Af({},u.get(Sf.minimumEducationRequirements),_t.getValidation(Sf.minimumEducationRequirements+n,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ut.a.TextArea,{disabled:this.props.readonly,maxLength:5e3,showCount:!0,autoSize:{minRows:5}},void 0)}),void 0),Object(o.jsx)(ht.a.Item,Af({},u.get(Sf.professionalCredentialRequirements),_t.getValidation(Sf.professionalCredentialRequirements+n,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(Hd,{disabled:this.props.readonly},void 0)}),void 0),this.renderProfessionalCredentialRequirementDetails(n,u)]}),void 0)}),void 0)},t.prototype.renderGender=function(e,t){var n,r;if(null===(r=null===(n=this._formRef.current)||void 0===n?void 0:n.getFieldValue(lf.occupations)[e])||void 0===r?void 0:r.nontraditionalByGender)return Object(o.jsx)(ht.a.Item,Af({},t.get(Sf.genderId),_t.getValidation(Sf.genderId+e,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(hd,Af({disabled:this.props.readonly,dropdownMatchSelectWidth:!1},{children:this.state.genders.map((function(e){return Object(o.jsx)(pr.a.Option,Af({value:e.id},{children:e.name}),e.id)}))}),void 0)}),void 0)},t.prototype.renderProfessionalCredentialRequirementDetails=function(e,t){var n,r;if(null===(r=null===(n=this._formRef.current)||void 0===n?void 0:n.getFieldValue(lf.occupations)[e])||void 0===r?void 0:r.professionalCredentialRequirements)return Object(o.jsx)(ht.a.Item,Af({},t.get(Sf.professionalCredentialRequirementDetails),_t.getValidation(Sf.professionalCredentialRequirementDetails+e,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ut.a.TextArea,{disabled:this.props.readonly,maxLength:5e3,showCount:!0,autoSize:{minRows:5}},void 0)}),void 0)},t.prototype.renderErrors=function(){if(this.state.error)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:this.state.message},void 0)},t}(a.Component),Nf=Pf,wf=function(e){return Object.assign({industryFiles:[],removedFiles:[],newProgramChangeRequest:null},e)},Df="industryFiles",qf=function(e){return Object.assign({changeRequestId:"00000000-0000-0000-0000-000000000000"},e)},Ff=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Mf=function(){return Mf=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Mf.apply(this,arguments)},Yf=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n.getFormItems=function(){var e,t=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldValue(lf.externalAccreditationRequirements);return(new Map).set(lf.additionalLaborMarketInformation,{name:lf.additionalLaborMarketInformation,label:"Please provide any additional labor and market information."}).set(lf.externalAccreditationRequirements,{required:!0,name:lf.externalAccreditationRequirements,label:"Are there any external accreditation requirements for this program?",rules:[Ot.required()]}).set(lf.externalAccreditationRequirementDetails,{required:t,name:lf.externalAccreditationRequirementDetails,label:"Please provide any information about the external accreditation requirements.",rules:t?[Ot.required()]:[]}).set(Df,{name:Df,label:"Please provide any supporting labor market documents or information regarding industry standards and benchmarks."})},n.loadChangeRequest=function(){var e=qf({changeRequestId:n.props.changeRequestId});return Fc.getStep6(e).then((function(e){var t,r,i,o,a,s,d;if(e){var c=null===(t=e.changeRequest)||void 0===t?void 0:t.noticeOfIntentChangeRequest;(null===(r=e.changeRequest)||void 0===r?void 0:r.newProgramChangeRequest)&&(c=null!==(o=lf.create(Mf({},null===(i=e.changeRequest)||void 0===i?void 0:i.newProgramChangeRequest)))&&void 0!==o?o:lf.create()),null==c&&(c=lf.create()),n.setState({changeRequest:null!==(a=e.changeRequest)&&void 0!==a?a:$a.create(),noticeOfIntent:c,newProgramChangeRequest:null!==(d=null===(s=e.changeRequest)||void 0===s?void 0:s.newProgramChangeRequest)&&void 0!==d?d:Wc.create(),fieldErrors:n.props.changeRequestDetailsPage?null:e.fieldErrors},(function(){return n.resetForm()}))}})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.resetForm=function(){var e;n.setState({altered:!1}),null===(e=n._formRef.current)||void 0===e||e.resetFields()},n.handleChange=function(e){n.setState({altered:e})},n.handleSave=function(){var e,t,r,i,o,a;n.setState({saving:!0});var s=null!==(t=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldsValue())&&void 0!==t?t:null,d=null!==(r=n.state.changeRequest.newProgramChangeRequest)&&void 0!==r?r:Wc.create();
1(d=s).changeRequestId=n.state.changeRequest.id;var c=wf({newProgramChangeRequest:d,removedFiles:null!==(o=null===(i=s.industryFiles)||void 0===i?void 0:i.removedFiles)&&void 0!==o?o:[]}),l=Za.attachFilesToModel("saveNewProgramChangeRequestStep6",c,Df,null===(a=s.industryFiles)||void 0===a?void 0:a.newFiles);Fc.saveStep6(l).then((function(e){(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.props.onSave&&n.props.onSave()):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Save Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Save Failed")})).finally((function(){n.setState({loading:!1,saving:!1})}))},n.handleSubmit=function(){var e,t,r,i,o,a;n.setState({submitting:!0});var s=null!==(t=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldsValue())&&void 0!==t?t:null,d=null!==(r=n.state.changeRequest.newProgramChangeRequest)&&void 0!==r?r:Wc.create();(d=s).changeRequestId=n.state.changeRequest.id;var c=wf({newProgramChangeRequest:d,removedFiles:null!==(o=null===(i=s.industryFiles)||void 0===i?void 0:i.removedFiles)&&void 0!==o?o:[]}),l=Za.attachFilesToModel("submitNewProgramChangeRequestStep6",c,Df,null===(a=s.industryFiles)||void 0===a?void 0:a.newFiles);Fc.submitStep6(l).then((function(e){(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.props.onSave&&n.props.onSave(),n.props.onSubmit&&n.props.onSubmit()):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Save Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Save Failed")})).finally((function(){n.setState({loading:!1,submitting:!1,submitted:!0})}))},n.state={changeRequest:$a.create(),changeRequests:[],newProgramChangeRequest:Wc.create(),noticeOfIntent:lf.create({externalAccreditationRequirements:null})},n}return Ff(t,e),t.prototype.componentDidMount=function(){this.props.changeRequestId&&this.props.changeRequestId!=re.default.Empty()&&this.loadChangeRequest()},t.prototype.componentDidUpdate=function(e){this.props.changeRequestId&&this.props.changeRequestId!=e.changeRequestId&&this.props.changeRequestId&&this.props.changeRequestId!=re.default.Empty()&&this.loadChangeRequest(),this.props.loading!=e.loading&&this.setState({loading:this.props.loading})},t.prototype.render=function(){var e,t,n;if(this.state.loading)return Object(o.jsx)(pt.a,{active:!0},void 0);var r=null===(n=null===(t=null===(e=this.state.changeRequest)||void 0===e?void 0:e.newProgramChangeRequest)||void 0===t?void 0:t.industryResources)||void 0===n?void 0:n.map((function(e){var t,n;return{uid:e.azureBlobFileId,url:x.generateDownload(null!==(t=e.azureBlobFileId)&&void 0!==t?t:re.default.Empty()),name:null===(n=e.azureBlobFile)||void 0===n?void 0:n.fileName}})),i=this.getFormItems();return Object(o.jsxs)(y.b,Mf({size:"small",direction:"vertical"},{children:[this.renderErrors(),Object(o.jsx)(ht.a,Mf({ref:this._formRef,layout:"vertical",initialValues:this.state.noticeOfIntent,onValuesChange:this.handleChange,onFinish:this.handleSubmit},{children:Object(o.jsxs)(y.b,Mf({direction:"vertical"},{children:[Object(o.jsx)(ht.a.Item,Mf({},i.get(lf.additionalLaborMarketInformation),_t.getValidation(lf.additionalLaborMarketInformation,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ut.a.TextArea,{disabled:this.props.readonly,maxLength:5e3,showCount:!0,autoSize:{minRows:5}},void 0)}),void 0),Object(o.jsx)(ht.a.Item,Mf({},i.get(lf.externalAccreditationRequirements),_t.getValidation(lf.externalAccreditationRequirements,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(Hd,{disabled:this.props.readonly},void 0)}),void 0),this.renderExternalAccreditationRequirementDetails(i),Object(o.jsx)(ht.a.Item,Mf({},i.get(Df),_t.getValidation(Df,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(hs,{disabled:this.props.readonly,existingList:r},void 0)}),void 0),this.renderActions()]}),void 0)}),void 0)]}),void 0)},t.prototype.renderActions=function(){if(!this.props.readonly)return Object(o.jsxs)(y.b,Mf({direction:"horizontal",wrap:!0},{children:[Object(o.jsx)(rs,{onClick:this.props.onPrevious},void 0),Object(o.jsx)(ss,{htmlType:"submit",submitting:this.state.submitting},void 0),Object(o.jsx)(Tr,{type:"default",htmlType:"button",onClick:this.handleSave,saving:this.state.submitting,saved:this.state.saved},void 0),Object(o.jsx)(Ir,{disabled:!this.state.altered,resetting:this.state.resetting,onConfirm:this.resetForm},void 0)]}),void 0)},t.prototype.renderExternalAccreditationRequirementDetails=function(e){var t;if(null===(t=this._formRef.current)||void 0===t?void 0:t.getFieldValue(lf.externalAccreditationRequirements))return Object(o.jsx)(ht.a.Item,Mf({},e.get(lf.externalAccreditationRequirementDetails),_t.getValidation(lf.externalAccreditationRequirementDetails,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ut.a.TextArea,{disabled:this.props.readonly,maxLength:5e3,showCount:!0,autoSize:{minRows:5}},void 0)}),void 0)},t.prototype.renderProfessionalCredentialRequirementDetails=function(e,t,n){var r;if(null===(r=this._formRef.current)||void 0===r?void 0:r.getFieldValue([e,Sf.professionalCredentialRequirements]))return Object(o.jsx)(ht.a.Item,Mf({},n.get(Sf.professionalCredentialRequirementDetails),_t.getValidation(Sf.professionalCredentialRequirementDetails+t,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ut.a.TextArea,{disabled:this.props.readonly,maxLength:5e3,showCount:!0,autoSize:{minRows:5}},void 0)}),void 0)},t.prototype.renderErrors=function(){if(this.state.error)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:this.state.message},void 0)},t}(a.Component),Uf=Yf,Lf=function(){return Lf=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Lf.apply(this,arguments)},kf=function(){function e(){}return e.Delivery=function(){return Object(o.jsx)("svg",Lf({fill:"currentColor",height:"1em",width:"1em",viewBox:"0 0 1024 1024"},{children:Object(o.jsx)("path",{d:"M604.586667 682.666667a128.042667 128.042667 0 0 1 241.493333 0H853.333333v-153.002667L750.336 426.666667H640v85.333333a42.666667 42.666667 0 0 1-85.333333 0V384a42.666667 42.666667 0 0 1 42.666666-42.666667h170.666667a42.666667 42.666667 0 0 1 30.165333 12.501334l128 128A42.666667 42.666667 0 0 1 938.666667 512v213.333333a42.666667 42.666667 0 0 1-42.666667 42.666667h-49.92a128.042667 128.042667 0 0 1-241.493333 0H419.413333a128.042667 128.042667 0 0 1-241.493333 0H128a42.666667 42.666667 0 0 1-42.666667-42.666667V213.333333a42.666667 42.666667 0 0 1 42.666667-42.666666h469.333333a42.666667 42.666667 0 0 1 0 85.333333H170.666667v426.666667h7.253333a128.042667 128.042667 0 0 1 241.493333 0h185.173334zM298.666667 768a42.666667 42.666667 0 1 0 0-85.333333 42.666667 42.666667 0 0 0 0 85.333333z m426.666666 0a42.666667 42.666667 0 1 0 0-85.333333 42.666667 42.666667 0 0 0 0 85.333333z"},void 0)}),void 0)},e.Opportunity=function(){return Object(o.jsx)("svg",Lf({fill:"currentColor",height:"1em",width:"1em",viewBox:"0 0 32 32"},{children:Object(o.jsx)("path",{transform:"rotate(0,16,16) translate(0,4)",d:"M24.500027,14.002004C21.467007,14.002004 19.000027,16.468999 19.000027,19.502004 19.000027,22.535008 21.467007,25.002004 24.500027,25.002004 27.532986,25.002004 30.000027,22.535008 30.000027,19.502004 30.000027,16.468999 27.532986,14.002004 24.500027,14.002004z M7.500001,14.002004C5.2252512,14.002004,3.2688761,15.389691,2.4328604,17.363082L2.3748903,17.509857 2.1994905,18.03744 2.1734381,18.128992C2.0602303,18.568009 2.000001,19.028098 2.000001,19.502004 2.000001,22.535004 4.467001,25.002004 7.500001,25.002004 10.533001,25.002004 13.000001,22.535004 13.000001,19.502004 13.000001,16.469004 10.533001,14.002004 7.500001,14.002004z M15.939206,8.9522882C15.545721,8.9556608,15.226428,9.0952399,15.006881,9.2324688L15.00098,9.2364194 15.000754,11.659186 15.075281,11.65036C15.556776,11.597842,16.144188,11.574945,16.811798,11.628849L16.999039,11.646187 16.999039,9.2688005 16.979963,9.256799C16.596177,9.0294378,16.245251,8.9496648,15.939206,8.9522882z M23.20829,6.3456225C22.340861,6.3521848,21.246892,6.5072594,20.252475,7.0806594L20.212579,7.1049728 18.999035,8.8288836 18.999035,14.410729 19.199009,14.201003C20.557003,12.843003 22.432003,12.002004 24.500027,12.002004 25.792522,12.002004 27.00963,12.330519 28.072248,12.908449L28.106611,12.928229 26.372021,7.7238712 24.633024,6.4938574 24.586215,6.4579563 24.544474,6.450573C24.264176,6.4028802,23.786575,6.3412485,23.20829,6.3456225z M8.6780758,6.3411255C8.1502028,6.3453436,7.7170868,6.4036937,7.4566031,6.4493551L7.416667,6.4566317 7.3670263,6.4947033 5.628027,7.7247314 3.8991919,12.924901 3.9277744,12.908449C4.9903917,12.330519 6.2075014,12.002004 7.500001,12.002004 9.5680008,12.002004 11.443001,12.843004 12.801001,14.201004L13.000
1502,14.410233 13.001025,8.8297572 11.787456,7.1054115 11.746531,7.0804811C10.70086,6.4774299,9.5578618,6.334095,8.6780758,6.3411255z M10.185124,2.0031881C9.6730256,1.9844742,9.2024007,2.3126068,9.0130258,2.8376188L8.4696541,4.3490415 8.6238756,4.3456178C9.3537512,4.3374157,10.22665,4.4094777,11.128742,4.6674681L11.348025,4.7345967 11.348025,3.3146296C11.348025,2.653614 10.893025,2.0936012 10.288025,2.0115995 10.253588,2.0072241 10.219264,2.0044355 10.185124,2.0031881z M21.814942,2.0027256C21.780795,2.0041704 21.746467,2.0071821 21.712029,2.0118074 21.107031,2.0928087 20.652032,2.6528149 20.652031,3.3138218L20.652031,4.7341008 20.872401,4.6666188C21.774594,4.4085202,22.647627,4.3363991,23.377578,4.3446188L23.530712,4.3480229 22.987027,2.8368168C22.79859,2.3118114,22.327146,1.9810457,21.814942,2.0027256z M21.85965,1.2397766E-05C23.18833,-0.0036792755,24.394149,0.8403883,24.869023,2.1608095L25.859021,4.91084 27.600019,6.1428537C27.889018,6.3468561,28.107018,6.6338592,28.229017,6.9718628L31.61501,17.129976 31.613641,17.130433 31.662314,17.274011C31.881761,17.978144 32.000027,18.726503 32.000027,19.502004 32.000027,23.638005 28.636013,27.002004 24.500027,27.002004 20.363979,27.002004 17.000027,23.638005 17.000027,19.502004 17.000027,19.437379 17.000848,19.372942 17.00248,19.308703L17.003079,19.293 16.999039,19.293 16.999039,13.658892 16.874535,13.643665C16.116407,13.559817,15.486079,13.603933,15.04376,13.66962L15.000566,13.676399 15.000025,19.502004C15.000001,23.638003 11.636001,27.002004 7.500001,27.002004 3.3640013,27.002004 0,23.638003 0,19.502004 0,18.597254 0.1609726,17.729445 0.45578575,16.92571L0.49915314,16.815908 3.7640266,6.9957147C3.8940268,6.6337061,4.1110268,6.3466997,4.4020271,6.142695L6.1420259,4.9116664 7.1310263,2.1606026C7.6059017,0.84107208 8.8092594,-0.0020990372 10.139711,0.0010089874 10.277345,0.0013313293 10.416338,0.010708809 10.556026,0.029553413 12.148025,0.24455833 13.348025,1.6565914 13.348025,3.3146296L13.348025,5.8466883 14.375792,7.3070307 14.435163,7.2793007C15.266911,6.9104719,16.371924,6.7558708,17.563688,7.3034506L17.610907,7.3267097 18.652036,5.8478503 18.652036,3.3138218C18.652035,1.6568041 19.852033,0.24478817 21.44403,0.028785706 21.583436,0.009847641 21.722201,0.00039386749 21.85965,1.2397766E-05z"},void 0)}),void 0)},e.Payroll=function(){return Object(o.jsx)("svg",Lf({fill:"currentColor",height:"1em",width:"1em",viewBox:"0 0 32 32"},{children:Object(o.jsx)("path",{d:"M15,22.009974L20,22.009974C20.552,22.009974 21,22.456974 21,23.009974 21,23.562973 20.552,24.009974 20,24.009974L15,24.009974C14.448,24.009974 14,23.562973 14,23.009974 14,22.456974 14.448,22.009974 15,22.009974z M15,17.009974L20,17.009974C20.552,17.009974 21,17.456974 21,18.009974 21,18.562973 20.552,19.009974 20,19.009974L15,19.009974C14.448,19.009974 14,18.562973 14,18.009974 14,17.456974 14.448,17.009974 15,17.009974z M15,12.009974L20,12.009974C20.552,12.009974 21,12.456973 21,13.009974 21,13.562973 20.552,14.009974 20,14.009974L15,14.009974C14.448,14.009974 14,13.562973 14,13.009974 14,12.456973 14.448,12.009974 15,12.009974z M6.8820114,8.7729893L8.8820114,8.7729893 8.8820114,11.010175 9.0616055,11.014174C10.017544,11.043076,10.730014,11.173232,11.199015,11.405982L11.199015,13.241982C10.564013,12.784982 9.7460127,12.554982 8.7460117,12.554982 8.4700117,12.554982 8.1960115,12.581982 7.9220109,12.632982 7.6490107,12.684982 7.4040103,12.770982 7.1880102,12.889982 6.9710097,13.011982 6.7960095,13.163981 6.6600094,13.350982 6.5250096,13.538981 6.4570093,13.764981 6.4570093,14.030982 6.4570093,14.280981 6.5090094,14.497981 6.6140094,14.679981 6.7180095,14.862982 6.8700099,15.028981 7.0710101,15.179981 7.2710104,15.331982 7.5160103,15.477982 7.8050108,15.620981 8.0940113,15.765981 8.4290113,15.919981 8.8090115,16.085981 9.1990118,16.28898 9.5680122,16.503981 9.9140129,16.725981 10.261013,16.950981 10.565014,17.19898 10.828013,17.468981 11.091014,17.739981 11.300014,18.040981 11.453014,18.370981 11.607015,18.70298 11.684014,19.07798 11.684014,19.499981 11.684014,20.06798 11.569015,20.54698 11.340014,20.936979 11.111014,21.32798 10.802013,21.645979 10.414014,21.89098 10.026013,22.13698 9.5790129,22.311979 9.0740118,22.42198 9.0108871,22.435604 8.9473085,22.448385 8.8832798,22.460321L8.8820114,22.460539 8.8820114,24.816984 6.8820114,24.816984 6.8820114,22.552616 6.7820096,22.54298C6.5080094,22.51498 6.2280092,22.472979 5.942009,22.41798 5.6550083,22.36298 5.3840084,22.29698 5.1290078,22.218979 4.8740077,22.13998 4.6680074,22.05298 4.5120072,21.95298L4.5120072,20.03898C4.6840076,20.194981 4.8880076,20.335979 5.1250081,20.460979 5.3620081,20.585979 5.6140084,20.690979 5.8790088,20.776979 6.145009,20.86298 6.4100094,20.929979 6.6760097,20.975979 6.9420099,21.02298 7.1860099,21.04698 7.4100103,21.04698 8.1920109,21.04698 8.7740116,20.91798 9.157012,20.655979 9.5390129,20.395981 9.7310123,20.01898 9.7310123,19.52298 9.7310123,19.25798 9.6670122,19.026979 9.5390129,18.83198 9.4110126,18.63698 9.2330122,18.458981 9.0040121,18.29698 8.775012,18.13698 8.5050116,17.97998 8.1960115,17.83198 7.8860106,17.682981 7.5540104,17.52898 7.2000103,17.366982 6.8190098,17.16398 6.4650092,16.958981 6.1370091,16.749981 5.8090086,16.54298 5.5240083,16.311981 5.2820082,16.057981 5.0390081,15.806981 4.8490076,15.520981 4.7110076,15.202981 4.5730076,14.886981 4.5040073,14.513982 4.5040073,14.085981 4.5040073,13.559981 4.6220074,13.102982 4.8600078,12.714982 5.
10960078,12.327982 5.4090085,12.007982 5.7970085,11.753983 6.0880089,11.564981 6.4088216,11.411982 6.7598691,11.295404L6.8820114,11.2575z M18,2.4140015L18,6.0309906 21.616989,6.0309906z M2,2L2,30 22,30 22,8.0309887 16,8.0309887 16,2z M2,0L18.414001,0 24,5.5859985 24,30C24,31.103027,23.102997,32,22,32L2,32C0.89700317,32,0,31.103027,0,30L0,2C0,0.89697266,0.89700317,0,2,0z"},void 0)}),void 0)},e.Launch=function(){return Object(o.jsx)("svg",Lf({height:"1em",width:"1em",viewBox:"0 0 24 24"},{children:Object(o.jsx)("path",{fill:"currentColor",d:"M14,3V5H17.59L7.76,14.83L9.17,16.24L19,6.41V10H21V3M19,19H5V5H12V3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V12H19V19Z"},void 0)}),void 0)},e}(),Gf=kf,Vf=function(e){return Object.assign({newProgramChangeRequest:null,additionalFiles:[]},e)},Bf="additionalFiles",Wf=function(e){return Object.assign({cipNumberId:"00000000-0000-0000-0000-000000000000",awardTypeIds:[]},e)},zf=function(e){return Object.assign({changeRequestId:"00000000-0000-0000-0000-000000000000"},e)},Hf={className:"NewProgramChangeRequestInstitutionLinkageDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",externalInstitutionId:0,externalInstitution:null,newProgramChangeRequestId:"00000000-0000-0000-0000-000000000000",newProgramChangeRequest:null,description:"",azureBlobFileId:null,azureBlobFile:null},e)},id:"id",externalInstitutionId:"externalInstitutionId",externalInstitution:"externalInstitution",newProgramChangeRequestId:"newProgramChangeRequestId",newProgramChangeRequest:"newProgramChangeRequest",description:"description",azureBlobFileId:"azureBlobFileId",azureBlobFile:"azureBlobFile"},Qf=Hf,Kf={className:"NoticeOfIntentChangeRequestCompleterDataDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",noticeOfIntentChangeRequestId:"00000000-0000-0000-0000-000000000000",noticeOfIntentChangeRequest:null,institutionId:null,institution:null,awardTypeId:null,awardType:null,dataYear:null,completersPerYear:null},e)},id:"id",noticeOfIntentChangeRequestId:"noticeOfIntentChangeRequestId",noticeOfIntentChangeRequest:"noticeOfIntentChangeRequest",institutionId:"institutionId",institution:"institution",awardTypeId:"awardTypeId",awardType:"awardType",dataYear:"dataYear",completersPerYear:"completersPerYear"},Xf=Kf,Jf={className:"ProgramDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",institutionId:"00000000-0000-0000-0000-000000000000",institution:null,programDetails:[],programAdvisoryBoardMembers:[],currentDetail:null},e)},id:"id",institutionId:"institutionId",institution:"institution",programDetails:"programDetails",programAdvisoryBoardMembers:"programAdvisoryBoardMembers",currentDetail:"currentDetail"},$f=Jf,Zf=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),eh=function(){return eh=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},eh.apply(this,arguments)},th=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n.getFormItems=function(){var e,t=(null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldValue(lf.noticeOfIntentCompleterData).length)>0;return(new Map).set(lf.secondaryPathways,{name:lf.secondaryPathways,label:"Please describe any linkages this program will have with any secondary pathways."}).set(lf.postSecondaryPathways,{name:lf.postSecondaryPathways,label:"Please describe any linkages this program will have with any post-secondary pathways."}).set(lf.uniqueProgramFeatures,{required:t,name:lf.uniqueProgramFeatures,label:"Please describe any unique features this program will offer.",rules:t?[Ot.required()]:[]}).set(lf.sharedProgramEntities,{name:lf.sharedProgramEntities,label:"Please provide any shared content this program will have with any other colleges."}).set(lf.collaborationEfforts,{name:lf.collaborationEfforts,label:"Describe efforts to collaborate with other postsecondary institutions with similar programs. Attach any correspondence with affected
1institutions regarding the proposed program and other evidence of collaboration."}).set(lf.statePriority,{name:lf.statePriority,label:"If applicable, describe any special need for this program in the state of Iowa."}).set(lf.programDuplicationAdditionalComments,{name:lf.programDuplicationAdditionalComments,label:"Provide any additional comments regarding possible program duplication (e.g., why the program is unique and justified even though a similar program is offered, why harmful competition does not exist, etc)."})},n.getCompleterDataFormItems=function(e){return(new Map).set(Xf.institutionId,{name:[e,Xf.institutionId]}).set(Xf.awardTypeId,{name:[e,Xf.awardTypeId]}).set(Xf.completersPerYear,{name:[e,Xf.completersPerYear]}).set(Xf.dataYear,{name:[e,Xf.dataYear]})},n.getLinkagesDataFormItems=function(e){return(new Map).set(Qf.externalInstitutionId,{label:"Please select the corresponding external institution.",name:[e,Qf.externalInstitutionId],required:!0,rules:[Ot.required()]}).set(Qf.description,{label:"Please provide a description of the agreement.",name:[e,Qf.description],required:!0,rules:[Ot.required()]}).set(Qf.azureBlobFile,{label:"Please provide the agreement file between the institutions.",name:[e,Qf.azureBlobFile],required:!0,rules:[Ot.required()]})},n.fetchData=function(){n.setState({loading:!0});var e=[];0==n.state.awardTypes.length&&e.push(n.loadAwardTypes()),0==n.state.institutions.length&&e.push(n.loadInstitutions()),0==n.state.externalInstitutions.length&&e.push(n.loadExternalInstitutions()),n.props.changeRequestId&&n.props.changeRequestId!=re.default.Empty()&&e.push(n.loadChangeRequest()),Promise.all(e).then((function(){n.setState({loading:!1})}))},n.SearchForPrograms=function(e){var t,r,i=Wf({cipNumberId:null!==(t=e.cipNumberId)&&void 0!==t?t:re.default.Empty(),awardTypeIds:null===(r=e.plannedAwardTypes)||void 0===r?void 0:r.map((function(e){return e.awardTypeId}))});ba.searchForPrograms(i).then((function(e){var t;e.program&&n.setState({programs:null!==(t=e.program)&&void 0!==t?t:[]})})).catch((function(){n.setState({error:!0})}))},n.loadAwardTypes=function(){return ce.getAll(si.className).then((function(e){e&&n.setState({awardTypes:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadInstitutions=function(){return ce.getAll(ne.className).then((function(e){e&&n.setState({institutions:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadExternalInstitutions=function(){return ce.getAll(mp.className).then((function(e){e&&n.setState({externalInstitutions:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadChangeRequest=function(){var e=zf({changeRequestId:n.props.changeRequestId}),t=lf.create();return Fc.getStep7(e).then((function(e){var r,i,o,a,s;if(e){var d=null!==(i=lf.create(eh({},null===(r=e.changeRequest)||void 0===r?void 0:r.newProgramChangeRequest)))&&void 0!==i?i:lf.create();t=d,n.setState({changeRequest:null!==(o=e.changeRequest)&&void 0!==o?o:$a.create(),noticeOfIntent:d,newProgramChangeRequest:null!==(s=null===(a=e.changeRequest)||void 0===a?void 0:a.newProgramChangeRequest)&&void 0!==s?s:Wc.create(),fieldErrors:n.props.changeRequestDetailsPage?null:e.fieldErrors},(function(){return n.resetForm()}))}})).catch((function(){n.setState({error:!0,message:"Could not load change request."})})).finally((function(){n.SearchForPrograms(t)}))},n.resetForm=function(){var e;n.setState({altered:!1}),null===(e=n._formRef.current)||void 0===e||e.resetFields()},n.handleChange=function(e){n.setState({altered:e})},n.getColumnDefinitionsForOtherPrograms=function(e){var t=[{title:"Program",dataIndex:$f.className,render:function(e,t){var r;if((null!==(r=n.state.programs)&&void 0!==r?r:[]).find((function(e){if(e.programDetails&&e.programDetails.length>0&&e.programDetails[0].awards)return e.institutionId==t.institutionId&&e.programDetails[0].awards.findIndex((function(e){return e.awardTypeId==t.awardTypeId}))>=0})))return Object(o.jsx)(rt.a,eh({type:"link"},{children:Gf.Launch()}),void 0)}},{title:"Community College",dataIndex:Xf.institutionId,render:function(e,t,r){var i,a,s=(null!==(i=n.state.programs)&&void 0!==i?i:[]).find((function(e){if(e.programDetails&&e.programDetails.length>0&&e.programDetails[0].awards)return e.institutionId==t.institutionId&&e.programDetails[0].awards.findIndex((function(e){return e.awardTypeId==t.awardTypeId}))>=0}));return s?Object(o.jsx)(mt.a,eh({},n.getCompleterDataFormItems(r).get(Xf.institutionId),_t.getValidation(Xf.institutionId+t.name,n.state.fieldErrors,n.state.submitted||n.props.readonly),{children:Object(o.jsx)(ud,{text:null===(a=n.state.institutions.find((function(e){return e.id==s.institutionId})))||void 0===a?void 0:a.name},void 0)}),void 0):Object(o.jsx)("label",eh({title:"Community College",htmlFor:"Community College"},{children:Object(o.jsx)(mt.a,eh({},n.getCompleterDataFormItems(r).get(Xf.institutionId),_t.getValidation(Xf.institutionId+t.name,n.state.fieldErrors,n.state.submitted||n.props.readonly),{children:Object(o.jsx)(hd,eh({disabled:n.props.readonly,showSearch:!0,optionFilterProp:"children",filterOption:function(e,t){return(null===t||void 0===t?void 0:t.children.toLowerCase().indexOf(e.toLowerCase()))>=0}},{children:n.state.institutions.map((function(e){return n.renderInstitution(e)}))}),void 0)}),void 0)}),void 0)}},{title:"Award Type",dataIndex:Xf.awardTypeId,render:function(e,t,r){var i,a,s,d=(null!==(i=n.state.programs)&&void 0!==i?i:[]).find((function(e){if(e.programDetails&&e.programDetails.length>0&&e.programDetails[0].awards)return e.institutionId==t.institutionId&&e.programDetails[0].awards.findIndex((function(e){return e.awardTypeId==t.awardTypeId}))>=0}));if(d){var c=nl.create();return d.programDetails&&d.programDetails.length>0&&d.programDetails[0].awards&&(c=null!==(a=d.programDetails[0].awards.find((function(e){return e.awardTypeId==t.awardTypeId})))&&void 0!==a?a:nl.create()),c?Object(o.jsx)(mt.a,eh({},n.getCompleterDataFormItems(r).get(Xf.awardTypeId),_t.getValidation(Xf.awardTypeId+t.name,n.state.fieldErrors,n.state.submitted||n.props.readonly),{children:Object(o.jsx)(ud,{text:null===(s=n.state.awardTypes.find((function(e){return e.id==c.awardTypeId})))||void 0===s?void 0:s.name},void 0)}),void 0):Object(o.jsx)("label",eh({title:"Award Type",htmlFor:"Award Type"},{children:Object(o.jsx)(mt.a,eh({},n.getCompleterDataFormItems(r).get(Xf.awardTypeId),_t.getValidation(Xf.awardTypeId+t.name,n.state.fieldErrors,n.state.submitted||n.props.readonly),{children:Object(o.jsx)(hd,eh({disabled:n.props.readonly,showSearch:!0,optionFilterProp:"children",filterOption:function(e,t){return(null===t||void 0===t?void 0:t.children.toLowerCase().indexOf(e.toLowerCase()))>=0}},{children:n.state.awardTypes.map((function(e){return n.renderAwardType(e)}))}),void 0)}),void 0)}),void 0)}return Object(o.jsx)("label",eh({title:"Award Type",htmlFor:"Award Type"},{children:Object(o.jsx)(mt.a,eh({},n.getCompleterDataFormItems(r).get(Xf.awardTypeId),_t.getValidation(Xf.awardTypeId+t.name,n.state.fieldErrors,n.state.submitted||n.props.readonly),{children:Object(o.jsx)(hd,eh({disabled:n.props.readonly,showSearch:!0,optionFilterProp:"children",filterOption:function(e,t){return(null===t||void 0===t?void 0:t.children.toLowerCase().indexOf(e.toLowerCase()))>=0}},{children:n.state.awardTypes.map((function(e){return n.renderAwardType(e)}))}),void 0)}),void 0)}),void 0)}},{title:"State Program Completers",dataIndex:Xf.completersPerYear,render:function(e,t,r){return Object(o.jsx)(mt.a,eh({},n.getCompleterDataFormItems(r).get(Xf.completersPerYear),_t.getValidation(Xf.completersPerYear+t.name,n.state.fieldErrors,n.state.submitted||n.props.readonly),{children:Object(o.jsx)(Ni.a,{min:0,title:"State Program Completers",disabled:n.props.readonly},void 0)}),void 0)}},{title:"Data Year",dataIndex:Xf.dataYear,render:function(e,t,r){return Object(o.jsx)(mt.a,eh({},n.getCompleterDataFormItems(r).get(Xf.dataYear),_t.getValidation(Xf.dataYear+t.name,n.state.fieldErrors,n.state.submitted||n.props.readonly),{children:Object(o.jsx)(Ni.a,{min:2e3,title:"Data Year",disabled:n.props.readonly},void 0)}),void 0)}},{title:"Actions",dataIndex:Xf.className,render:function(t,r){var i,a=(null!==(i=n.state.programs)&&void 0!==i?i:[]).find((function(e){if(e.programDetails&&e.programDetails.length>0&&e.programDetails[0].awards)return e.institutionId==r.institutionId&&e.programDetails[0].awards.findIndex((function(e){return e.awardTypeId==r.awardTypeId}))>=0}));if(!n.props.readonly&&!a)return Object(o.jsx)(rt.a,{type:"link",icon:Object(o.jsx)(Yd.a,{},void 0),onClick:function(){return e(r.name)}},void 0)}}];return t},n.handleSave=function(){var e,t,r,i,o;n.setState({saving:!0});var a=null!==(r=null!==(t=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldsValue())&&void 0!==t?t:null)&&void 0!==r?r:Wc.create(),s=null!==(i=n.state.changeRequest.newProgramChangeRequest)&&void 0!==i?i:Wc.create();
1(s=a).changeRequestId=n.state.changeRequest.id;var d=Vf({newProgramChangeRequest:s}),c=[];if(s.externalInstitutionLinkages)for(var l=0;l<s.externalInstitutionLinkages.length;l++){var u=a.externalInstitutionLinkages[l];if(void 0!=u.azureBlobFile){var p=null===(o=u.azureBlobFile)||void 0===o?void 0:o.newFiles;void 0!=p&&c.push(p[0])}}var f=Za.attachFilesToModel("saveNewProgramChangeRequestStep7",d,Bf,c);Fc.saveStep7(f).then((function(e){(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.props.onSave&&n.props.onSave()):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Save Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Save Failed")})).finally((function(){n.setState({loading:!1,saving:!1})}))},n.handleSubmit=function(){var e,t,r,i,o;n.setState({submitting:!0});var a=null!==(r=null!==(t=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldsValue())&&void 0!==t?t:null)&&void 0!==r?r:Wc.create(),s=null!==(i=n.state.changeRequest.newProgramChangeRequest)&&void 0!==i?i:Wc.create();(s=a).changeRequestId=n.state.changeRequest.id;var d=Vf({newProgramChangeRequest:s}),c=[];if(s.externalInstitutionLinkages)for(var l=0;l<s.externalInstitutionLinkages.length;l++){var u=a.externalInstitutionLinkages[l];if(void 0!=u.azureBlobFile){var p=null===(o=u.azureBlobFile)||void 0===o?void 0:o.newFiles;void 0!=p&&c.push(p[0])}}var f=Za.attachFilesToModel("submitNewProgramChangeRequestStep7",d,Bf,c);Fc.submitStep7(f).then((function(e){(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.props.onSave&&(n.props.onSave(),n.resetForm()),n.props.onSubmit&&n.props.onSubmit()):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Save Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Save Failed")})).finally((function(){n.setState({loading:!1,submitting:!1,submitted:!0})}))},n.state={awardTypes:[],changeRequest:$a.create(),changeRequests:[],newProgramChangeRequest:Wc.create(),noticeOfIntent:lf.create(),institutions:[],externalInstitutions:[],programs:[]},n}return Zf(t,e),t.prototype.componentDidMount=function(){this.props.changeRequestId&&this.fetchData()},t.prototype.componentDidUpdate=function(e){this.props.changeRequestId&&this.props.changeRequestId!=e.changeRequestId&&this.fetchData(),this.props.loading!=e.loading&&this.setState({loading:this.props.loading})},t.prototype.render=function(){var e,t,n,r,i,a;if(this.state.loading)return Object(o.jsx)(pt.a,{active:!0},void 0);var s=this.getFormItems();return Object(o.jsxs)(y.b,eh({direction:"vertical"},{children:[this.renderErrors(),Object(o.jsx)(ht.a,eh({ref:this._formRef,layout:"vertical",initialValues:this.state.noticeOfIntent,onValuesChange:this.handleChange,onFinish:this.handleSubmit},{children:Object(o.jsxs)(y.b,eh({direction:"vertical"},{children:[Object(o.jsx)(mt.a,eh({},s.get(lf.secondaryPathways),_t.getValidation(lf.secondaryPathways,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ut.a.TextArea,{disabled:this.props.readonly,maxLength:5e3,showCount:!0,autoSize:{minRows:5}},void 0)}),void 0),(null===(e=this.state.newProgramChangeRequest)||void 0===e?void 0:e.isTransferMajorProgram)?null:Object(o.jsx)(mt.a,eh({},s.get(lf.postSecondaryPathways),_t.getValidation(lf.postSecondaryPathways,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ut.a.TextArea,{disabled:this.props.readonly,maxLength:5e3,showCount:!0,autoSize:{minRows:5}},void 0)}),void 0),(null===(t=this.state.newProgramChangeRequest)||void 0===t?void 0:t.isTransferMajorProgram)?null:Object(o.jsx)(mt.a,eh({},s.get(lf.sharedProgramEntities),_t.getValidation(lf.sharedProgramEntities,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ut.a.TextArea,{disabled:this.props.readonly,maxLength:5e3,showCount:!0,autoSize:{minRows:5}},void 0)}),void 0),(null===(n=this.state.newProgramChangeRequest)||void 0===n?void 0:n.isTransferMajorProgram)?null:Object(o.jsxs)(y.b,eh({direction:"vertical"},{children:[Object(o.jsxs)(ot.a.Text,{children:["Please provide completer information on any other programs offered at other colleges in the state. Refer to the ",Object(o.jsx)("b",{children:"Programs and Awards by CIP"},void 0)," file on the ",Object(o.jsx)(at.a,eh({target:"_blank",to:x.generate(x.RESOURCES)},{children:"resource page"}),void 0),"."]},void 0),this.renderCompletersData(),Object(o.jsx)(mt.a,eh({},s.get(lf.uniqueProgramFeatures),_t.getValidation(lf.uniqueProgramFeatures,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ut.a.TextArea,{disabled:this.props.readonly,maxLength:5e3,showCount:!0,autoSize:{minRows:5}},void 0)}),void 0)]}),void 0),(null===(r=this.state.newProgramChangeRequest)||void 0===r?void 0:r.isTransferMajorProgram)?null:Object(o.jsx)(mt.a,eh({},s.get(lf.collaborationEfforts),_t.getValidation(lf.collaborationEfforts,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ut.a.TextArea,{disabled:this.props.readonly,maxLength:5e3,showCount:!0,autoSize:{minRows:5}},void 0)}),void 0),(null===(i=this.state.newProgramChangeRequest)||void 0===i?void 0:i.isTransferMajorProgram)?null:Object(o.jsx)(mt.a,eh({},s.get(lf.statePriority),_t.getValidation(lf.statePriority,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ut.a.TextArea,{disabled:this.props.readonly,maxLength:5e3,showCount:!0,autoSize:{minRows:5}},void 0)}),void 0),(null===(a=this.state.newProgramChangeRequest)||void 0===a?void 0:a.isTransferMajorProgram)?null:Object(o.jsx)(mt.a,eh({},s.get(lf.programDuplicationAdditionalComments),_t.getValidation(lf.programDuplicationAdditionalComments,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ut.a.TextArea,{disabled:this.props.readonly,maxLength:5e3,showCount:!0,autoSize:{minRows:5}},void 0)}),void 0),this.renderInstitutionLinkages(),this.renderActions()]}),void 0)}),void 0)]}),void 0)},t.prototype.renderActions=function(){if(!this.props.readonly)return Object(o.jsxs)(y.b,eh({direction:"horizontal",wrap:!0},{children:[Object(o.jsx)(rs,{onClick:this.props.onPrevious},void 0),Object(o.jsx)(ss,{htmlType:"submit",submitting:this.state.submitting},void 0),Object(o.jsx)(Tr,{type:"default",htmlType:"button",onClick:this.handleSave,saving:this.state.submitting,saved:this.state.saved},void 0),Object(o.jsx)(Ir,{disabled:!this.state.altered,resetting:this.state.resetting,onConfirm:this.resetForm},void 0)]}),void 0)},t.prototype.renderCompletersData=function(){var e=this;return Object(o.jsx)(ht.a.List,eh({name:lf.noticeOfIntentCompleterData},{children:function(t,n){var r=n.add,i=n.remove;return Object(o.jsxs)(y.b,eh({direction:"vertical"},{children:[Object(o.jsx)(Pi.a,{pagination:!1,dataSource:t,columns:e.getColumnDefinitionsForOtherPrograms(i)},void 0),e.renderAddCompleterData(r)]}),void 0)}}),void 0)},t.prototype.renderAddCompleterData=function(e){if(!this.props.readonly)return Object(o.jsx)(rt.a,eh({onClick:function(){return e()},icon:Object(o.jsx)(Xc.a,{},void 0)},{children:"Add Completer Data"}),void 0)},t.prototype.renderInstitutionLinkages=function(){var e=this;return Object(o.jsxs)(y.b,eh({direction:"vertical"},{children:[Object(o.jsx)(ot.a.Paragraph,{children:"If there are any linkages to external institutions, please add them here."},void 0),Object(o.jsx)(ht.a.List,eh({name:Wc.externalInstitutionLinkages},{children:function(t,n){var r=n.add,i=n.remove;return Object(o.jsxs)(y.b,eh({direction:"vertical"},{children:[t.map((function(t,n){if(t)return e.renderInstitutionLinkage(t,n,i)})),e.renderAdditionalLinkage(r)]}),void 0)}}),void 0)]}),void 0)},t.prototype.renderAdditionalLinkage=function(e){if(!this.props.readonly)return Object(o.jsx)(rt.a,eh({onClick:function(){return e()},icon:Object(o.jsx)(Xc.a,{},void 0)},{children:"Add External Institution Linkage"}),void 0)},t.prototype.renderInstitutionLinkage=function(e,t,n){var r,i,a,s,d,
1c,l=this,u="External Institution Links "+((null===(i=null===(r=this._formRef.current)||void 0===r?void 0:r.getFieldValue(Wc.externalInstitutionLinkages))||void 0===i?void 0:i.length)>1?t+1:""),p=this.props.readonly?null:Object(o.jsx)(rt.a,{type:"link",size:"small",onClick:function(){return n(e.name)},icon:Object(o.jsx)(Yd.a,{},void 0)},void 0),f=[];if(null===(a=this.state.newProgramChangeRequest)||void 0===a?void 0:a.externalInstitutionLinkages){var h=null===(s=this.state.newProgramChangeRequest)||void 0===s?void 0:s.externalInstitutionLinkages[t];void 0!=h&&f.push({uid:h.azureBlobFileId,url:x.generateDownload(null!==(d=h.azureBlobFileId)&&void 0!==d?d:re.default.Empty()),name:null===(c=h.azureBlobFile)||void 0===c?void 0:c.fileName})}return Object(o.jsx)(Qn.a,eh({type:"inner",size:"small",title:u,extra:p},{children:Object(o.jsxs)(y.b,eh({direction:"vertical"},{children:[Object(o.jsx)(mt.a,eh({},this.getLinkagesDataFormItems(t).get(Qf.externalInstitutionId),_t.getValidation(Qf.externalInstitutionId+t,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(hd,eh({disabled:this.props.readonly,showSearch:!0,optionFilterProp:"children",filterOption:function(e,t){return(null===t||void 0===t?void 0:t.children.toLowerCase().indexOf(e.toLowerCase()))>=0}},{children:this.state.externalInstitutions.map((function(e){return l.renderExternalInstitution(e)}))}),void 0)}),void 0),Object(o.jsx)(mt.a,eh({},this.getLinkagesDataFormItems(t).get(Qf.description),_t.getValidation(Qf.description+t,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ut.a.TextArea,{disabled:this.props.readonly,maxLength:5e3,showCount:!0,autoSize:{minRows:5}},void 0)}),void 0),Object(o.jsx)(mt.a,eh({},this.getLinkagesDataFormItems(t).get(Qf.azureBlobFile),_t.getValidation(Qf.azureBlobFile+t,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(hs,{existingList:f,maxCount:1,disabled:this.props.readonly},void 0)}),void 0)]}),void 0)}),void 0)},t.prototype.renderInstitution=function(e){var t,n,r;if(e.id)return Object(o.jsx)(pr.a.Option,eh({title:null!==(t=e.name)&&void 0!==t?t:"",value:null!==(n=e.id)&&void 0!==n?n:re.default.Empty()},{children:e.name}),null!==(r=e.id)&&void 0!==r?r:re.default.Empty())},t.prototype.renderExternalInstitution=function(e){var t,n,r;if(e.id)return Object(o.jsx)(pr.a.Option,eh({title:null!==(t=e.name)&&void 0!==t?t:"",value:null!==(n=e.id)&&void 0!==n?n:re.default.Empty()},{children:e.name}),null!==(r=e.id)&&void 0!==r?r:re.default.Empty())},t.prototype.renderAwardType=function(e){var t,n,r;if(e.id){var i=null!==(t=e.display)&&void 0!==t?t:"";return Object(o.jsx)(pr.a.Option,eh({title:i,value:null!==(n=e.id)&&void 0!==n?n:re.default.Empty()},{children:i}),null!==(r=e.id)&&void 0!==r?r:re.default.Empty())}},t.prototype.renderErrors=function(){if(this.state.error)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:this.state.message},void 0)},t}(a.Component),nh=th,rh=function(e){return Object.assign({newProgramChangeRequest:null},e)},ih=function(e){return Object.assign({newProgramChangeRequest:null},e)},oh=function(e){return Object.assign({changeRequestId:"00000000-0000-0000-0000-000000000000"},e)},ah=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),sh=function(){return sh=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},sh.apply(this,arguments)},dh=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._formItems=(new Map).set(Wc.install,{required:!0,name:Wc.install,label:"When will this program first be offered?",rules:[Ot.required()]}).set(Wc.programMarketingLink,{required:!0,name:Wc.programMarketingLink,label:"Please provide a link to the website used to market this program.",rules:[Ot.required(),Ot.https()]}).set(Wc.standardsAndBenchmarks,{name:Wc.standardsAndBenchmarks,label:"If applicable, please describe the plan for assessing student attainment or program standards and benchmarks."}).set(Wc.title,{required:!0,name:Wc.title,label:"Please provide a title for this program.",rules:[Ot.required()]}).set(Wc.iowaVariationId,{required:!0,name:Wc.iowaVariationId,label:"Please select an Iowa variation.",rules:[Ot.required()]}).set(Wc.primrayAwardTypeId,{required:!0,name:Wc.primrayAwardTypeId,label:"Please select a primary award (This will affect the award type on the primary award).",rules:[Ot.required()]}),n.fetchData=function(){n.setState({loading:!0});var e=[];n.state.iowaVariations&&0!=n.state.iowaVariations.length||e.push(n.loadIowaVariation()),n.state.awardTypes&&0!=n.state.awardTypes.length||e.push(n.loadAwardTypes()),n.props.changeRequestId&&n.props.changeRequestId!=re.default.Empty()&&e.push(n.loadChangeRequest()),Promise.all(e).then((function(){n.setState({loading:!!n.props.loading})}))},n.loadIowaVariation=function(){return ce.getAll(pi.className).then((function(e){var t;e&&n.setState({iowaVariations:null!==(t=e.sort((function(e,t){return e.order-t.order})))&&void 0!==t?t:[]})})).catch((function(){n.setState({error:!0})}
1))},n.loadAwardTypes=function(){return ce.getAll(si.className).then((function(e){e&&n.setState({awardTypes:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadChangeRequest=function(){var e=oh({changeRequestId:n.props.changeRequestId});return Fc.getStep8(e).then((function(e){var t,r,i;e&&(n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create(),newProgramChangeRequest:null!==(i=null===(r=e.changeRequest)||void 0===r?void 0:r.newProgramChangeRequest)&&void 0!==i?i:Wc.create(),fieldErrors:n.props.changeRequestDetailsPage?null:e.fieldErrors},(function(){return n.resetForm()})),n.setVariationValidationState())})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.resetForm=function(){var e;n.setState({altered:!1}),null===(e=n._formRef.current)||void 0===e||e.resetFields()},n.handleChange=function(e){n.setState({altered:e})},n.handleSave=function(){n.setState({saving:!0});var e=n._formRef?n._formRef.current.getFieldsValue():null,t=n.state.newProgramChangeRequest;e=sh(sh({},t),e);var r=rh({newProgramChangeRequest:e});return Fc.saveStep8(r).then((function(e){(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.props.onSave&&n.props.onSave()):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Save Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Save Failed")})).finally((function(){n.setState({loading:!1,saving:!1})}))},n.handleSubmit=function(){n.setState({submitting:!0});var e=n._formRef?n._formRef.current.getFieldsValue():null,t=n.state.newProgramChangeRequest;e=sh(sh({},t),e);var r=ih({newProgramChangeRequest:e});Fc.submitStep8(r).then((function(e){var t,r,i,o,a;(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.props.onSave&&n.props.onSave(),n.props.onSubmit&&(null===(r=null===(t=e.changeRequest)||void 0===t?void 0:t.newProgramChangeRequest)||void 0===r?void 0:r.newProgramProgramAwards)&&n.props.onSubmit(null!==(a=null===(o=null===(i=e.changeRequest)||void 0===i?void 0:i.newProgramChangeRequest)||void 0===o?void 0:o.newProgramProgramAwards[0].id)&&void 0!==a?a:re.default.Empty())):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Save Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Save Failed")})).finally((function(){n.setState({loading:!1,submitting:!1,submitted:!0})}))},n.isAwardSelected=function(){var e;return!(!(null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldValue(Wc.primrayAwardTypeId))&&!n.state.newProgramChangeRequest.primrayAwardTypeId)},n.setVariationValidationState=function(){var e,t,r,i,o,a=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldValue(Wc.primrayAwardTypeId),s=a||n.state.newProgramChangeRequest.primrayAwardTypeId,d=null!==(r=null===(t=n._formRef.current)||void 0===t?void 0:t.getFieldValue(Wc.iowaVariationId))&&void 0!==r?r:n.state.newProgramChangeRequest.iowaVariationId,c=null!==(o=null===(i=n.state.awardTypes.find((function(e){return e.id==s})))||void 0===i?void 0:i.iowaVariationIds)&&void 0!==o?o:[],l=c.includes(d);n.setState({currentIowaVariationId:d,validIowaVariationIds:c,isCurrentIowaVariationValid:l})},n.state={awardTypes:[],changeRequest:$a.create(),changeRequests:[],newProgramChangeRequest:Wc.create({programId:null,externalInstitutionIds:[]}),externalInstitution:[],iowaVariations:[],currentIowaVariationId:null,validIowaVariationIds:null,isCurrentIowaVariationValid:!0},n}return ah(t,e),t.prototype.componentDidMount=function(){this.fetchData()},t.prototype.componentDidUpdate=function(e){this.props.changeRequestId&&this.props.changeRequestId!=e.changeRequestId&&this.fetchData(),this.props.loading!=e.loading&&this.setState({loading:this.props.loading})},t.prototype.render=function(){var e=this;return this.state.loading||null==this.props.changeRequestId||void 0==this.props.changeRequestId?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsx)(y.b,sh({size:"small",direction:"vertical"},{children:Object(o.jsxs)(ht.a,sh({ref:this._formRef,layout:"vertical",initialValues:this.state.newProgramChangeRequest,onValuesChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!this.props.readonly},{children:[Object(o.jsx)(mt.a,sh({},this._formItems.get(Wc.title),_t.getValidation(Wc.title,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ut.a,{disabled:this.props.readonly||this.state.loading||this.state.saving||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,sh({},this._formItems.get(Wc.primrayAwardTypeId),_t.getValidation(Wc.primrayAwardTypeId,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(hd,sh({showSearch:!0,showArrow:!this.props.readonly,optionFilterProp:"children",placeholder:"Select Primary Award",onChange:function(){return e.setVariationValidationState()},disabled:this.props.readonly||this.state.loading||this.state.saving||this.state.submitting},{children:this.renderAwardTypes()}),void 0)}),void 0),Object(o.jsx)(mt.a,sh({},this._formItems.get(Wc.iowaVariationId),_t.getValidation(Wc.iowaVariationId,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(hd,sh({showSearch:!0,showArrow:!this.props.readonly,optionFilterProp:"children",placeholder:"Select Iowa Variation",onChange:function(){return e.setVariationValidationState()},disabled:this.props.readonly||this.state.loading||this.state.saving||this.state.submitting||!this.isAwardSelected()},{children:this.renderIowaVariation()}),void 0)}),void 0),Object(o.jsx)(mt.a,sh({},this._formItems.get(Wc.install),_t.getValidation(Wc.install,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(Od,{futureYears:!0,disabled:this.props.readonly||this.state.loading||this.state.saving||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,sh({},this._formItems.get(Wc.programMarketingLink),_t.getValidation(Wc.programMarketingLink,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ut.a,{disabled:this.props.readonly||this.state.loading||this.state.saving||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,sh({},this._formItems.get(Wc.standardsAndBenchmarks),_t.getValidation(Wc.standardsAndBenchmarks,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ut.a.TextArea,{disabled:this.props.readonly,maxLength:5e3,showCount:!0,autoSize:{minRows:5}},void 0)}),void 0),this.renderActions()]}),void 0)}),void 0)},t.prototype.renderActions=function(){if(!this.props.readonly)return Object(o.jsxs)(y.b,sh({direction:"horizontal",wrap:!0},{children:[Object(o.jsx)(rs,{onClick:this.props.onPrevious},void 0),Object(o.jsx)(ss,{htmlType:"submit",submitting:this.state.submitting},void 0),Object(o.jsx)(Tr,{type:"default",htmlType:"button",onClick:this.handleSave,saving:this.state.submitting,saved:this.state.saved},void 0),Object(o.jsx)(Ir,{disabled:!this.state.altered,resetting:this.state.resetting,onConfirm:this.resetForm},void 0)]}),void 0)},t.prototype.renderAwardTypes=function(){var e,t=this,n=this.state.awardTypes;return(null===(e=this.state.newProgramChangeRequest)||void 0===e?void 0:e.isTransferMajorProgram)&&(n=n.filter((function(e){return!0===e.transferMajor}))),n.map((function(e){return t.renderAwardType(e)}))},t.prototype.renderAwardType=function(e){if(e.id)return Object(o.jsx)(pr.a.Option,sh({value:e.id},{children:e.display}),e.id)},t.prototype.renderIowaVariation=function(){var e=this;return this.state.iowaVariations.filter((function(t){var n,r;return(null===(n=e.state.validIowaVariationIds)||void 0===n?void 0:n.includes(t.id))||0==(null===(r=e.state.validIowaVariationIds)||void 0===r?void 0:r.length)||null==e.state.validIowaVariationIds||t.id==e.state.currentIowaVariationId})).map((function(t){if(t.id){var n=!e.state.isCurrentIowaVariationValid&&t.id==e.state.currentIowaVariationId;return Object(o.jsx)(pr.a.Option,sh({value:t.id,disabled:n}
1,{children:t.display}),t.id)}}))},t.prototype.renderErrors=function(){if(this.state.error)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:this.state.message},void 0)},t}(a.Component),ch=dh,lh=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),uh=function(){return uh=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},uh.apply(this,arguments)},ph=function(e){function t(t){var n=e.call(this,t)||this;return n.render=function(){return Object(o.jsxs)(y.b,uh({size:"large",direction:"vertical"},{children:[Object(o.jsx)(Qn.a,uh({title:"Notice Of Intent",type:"inner"},{children:Object(o.jsx)(Ap,{loading:n.props.loading,changeRequestId:n.props.changeRequest.id,selectedInstitution:n.props.changeRequest.institutionId,readonly:!0,changeRequestDetailsPage:n.props.changeRequestDetailsPage},void 0)}),void 0),Object(o.jsx)(Qn.a,uh({title:"Program Plan",type:"inner"},{children:Object(o.jsx)(Lp,{loading:n.props.loading,changeRequestId:n.props.changeRequest.id,selectedInstitution:n.props.changeRequest.institutionId,readonly:!0,changeRequestDetailsPage:n.props.changeRequestDetailsPage},void 0)}),void 0),Object(o.jsx)(Qn.a,uh({title:"Contact Information",type:"inner"},{children:Object(o.jsx)(ef,{loading:n.props.loading,changeRequestId:n.props.changeRequest.id,selectedInstitution:n.props.changeRequest.institutionId,readonly:!0,changeRequestDetailsPage:n.props.changeRequestDetailsPage},void 0)}),void 0),n.props.changeRequest.changeRequestTypeId==Xa.NEWPROGRAM?Object(o.jsx)(Qn.a,uh({title:"Consultant Meetings",type:"inner"},{children:Object(o.jsx)(hf,{loading:n.props.loading,changeRequestId:n.props.changeRequest.id,selectedInstitution:n.props.changeRequest.institutionId,readonly:!0,changeRequestDetailsPage:n.props.changeRequestDetailsPage},void 0)}),void 0):null,n.props.changeRequest.changeRequestTypeId==Xa.NEWPROGRAM?Object(o.jsx)(Qn.a,uh({title:"Occupational Information",type:"inner"},{children:Object(o.jsx)(Nf,{loading:n.props.loading,changeRequestId:n.props.changeRequest.id,selectedInstitution:n.props.changeRequest.institutionId,readonly:!0,changeRequestDetailsPage:n.props.changeRequestDetailsPage},void 0)}),void 0):null,n.props.changeRequest.changeRequestTypeId==Xa.NEWPROGRAM?Object(o.jsx)(Qn.a,uh({title:"Industry Information",type:"inner"},{children:Object(o.jsx)(Uf,{loading:n.props.loading,changeRequestId:n.props.changeRequest.id,selectedInstitution:n.props.changeRequest.institutionId,readonly:!0,changeRequestDetailsPage:n.props.changeRequestDetailsPage},void 0)}),void 0):null,Object(o.jsx)(Qn.a,uh({title:"Linking And Existing Entities",type:"inner"},{children:Object(o.jsx)(nh,{loading:n.props.loading,changeRequestId:n.props.changeRequest.id,selectedInstitution:n.props.changeRequest.institutionId,readonly:!0,changeRequestDetailsPage:n.props.changeRequestDetailsPage},void 0)}),void 0),Object(o.jsx)(Qn.a,uh({title:"Program Details",type:"inner"},{children:Object(o.jsx)(ch,{loading:n.props.loading,changeRequestId:n.props.changeRequest.id,selectedInstitution:n.props.changeRequest.institutionId,readonly:!0,changeRequestDetailsPage:n.props.changeRequestDetailsPage},void 0)}),void 0),n.renderAwards(),Object(o.jsx)(Qn.a,uh({title:"ICCPHSE",type:"inner"},{children:Object(o.jsx)(Yu,{loading:n.props.loading,changeRequestId:n.props.changeRequest.id,readonly:!0},void 0)}),void 0),n.props.changeRequest.changeRequestTypeId==Xa.NEWPROGRAM?Object(o.jsx)(Qn.a,uh({title:"Advisory Board",type:"inner"},{children:Object(o.jsx)(Xu,{loading:n.props.loading,changeRequestId:n.props.changeRequest.id,selectedInstitution:n.props.changeRequest.institutionId,readonly:!0,changeRequestDetailsPage:n.props.changeRequestDetailsPage},void 0)}),void 0):null,Object(o.jsx)(Qn.a,uh({title:"Sign Off",type:"inner"},{children:Object(o.jsx)(op,{loading:n.props.loading,changeRequestId:n.props.changeRequest.i
1d,selectedInstitution:n.props.changeRequest.institutionId,readonly:!0,changeRequestDetailsPage:n.props.changeRequestDetailsPage},void 0)}),void 0),Object(o.jsx)(Qn.a,uh({title:"Additional Information",type:"inner"},{children:Object(o.jsx)(gs,{loading:n.props.loading,changeRequest:n.props.changeRequest,readonly:!0},void 0)}),void 0)]}),void 0)},n.state={},n}return lh(t,e),t.prototype.renderAwards=function(){var e,t,n=this,r=0;if(this.props.changeRequest.id!=re.default.Empty())return null===(t=null===(e=this.props.changeRequest.newProgramChangeRequest)||void 0===e?void 0:e.newProgramProgramAwards)||void 0===t?void 0:t.map((function(e){return n.renderAward(e,++r)}))},t.prototype.renderAward=function(e,t){var n,r;return Object(o.jsx)(y.b,uh({direction:"vertical"},{children:Object(o.jsxs)(Qn.a,uh({title:"Award "+t,type:"inner",size:"small"},{children:[Object(o.jsx)(cl,{loading:this.props.loading,changeRequestId:this.props.changeRequest.id,selectedInstitution:this.props.changeRequest.institutionId,awardId:null!==(n=e.id)&&void 0!==n?n:re.default.Empty(),readonly:!0,changeRequestDetailsPage:this.props.changeRequestDetailsPage},void 0),Object(o.jsx)(Nu,{onIsValid:this.props.onIsValid,review:!0,loading:this.props.loading,changeRequestId:this.props.changeRequest.id,awardId:null!==(r=e.id)&&void 0!==r?r:re.default.Empty(),selectedInstitution:this.props.changeRequest.institutionId,readonly:!0,changeRequestDetailsPage:this.props.changeRequestDetailsPage},void 0)]}),void 0)}),void 0)},t}(a.Component),fh=ph,hh=function(e){return Object.assign({changeRequestId:null,institutionId:"00000000-0000-0000-0000-000000000000",noticeOfIntentChangeRequest:null},e)},vh=function(e){return Object.assign({changeRequestId:null,institutionId:"00000000-0000-0000-0000-000000000000",noticeOfIntentChangeRequest:null},e)},mh=function(e){return Object.assign({changeRequestId:"00000000-0000-0000-0000-000000000000"},e)},gh=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),bh=function(){return bh=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},bh.apply(this,arguments)},yh=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n.getFormItems=function(){var e,t,r,i,o=null!==(t=null===(e=n.state.cipNumberDetails.filter((function(e){var t;return e.id==(null===(t=n._formRef.current)||void 0===t?void 0:t.getFieldValue(lf.cipNumberId))}))[0])||void 0===e?void 0:e.transferMajor)&&void 0!==t&&t,a=null===(r=n._formRef.current)||void 0===r?void 0:r.getFieldValue(lf.requiresWorkExperiences),s=null===(i=n._formRef.current)||void 0===i?void 0:i.getFieldValue(lf.cipReclassification);return(new Map).set(lf.cipNumberId,{name:lf.cipNumberId,label:"What CIP Number is this request for?",required:!0,rules:[Ot.required()]}).set(lf.previousCipNumberId,{name:lf.previousCipNumberId,label:"What was the previous CIP Number for the program?",required:s,rules:s?[Ot.required()]:[]}).set(lf.primrayAwardTypeId,{name:lf.primrayAwardTypeId,label:"What is the primary award type? (This will affect the award type on the primary award)",required:!0,rules:[Ot.required()]}).set(lf.iowaVariationId,{name:lf.iowaVariationId,label:"Please select an Iowa Variation.",required:!0,rules:[Ot.required()]}).set(lf.isTransferMajorProgram,{name:lf.isTransferMajorProgram,label:"Is this request for a transfer major program?",required:o,rules:o?[Ot.required()]:[]}).set(lf.needForProgram,{required:!0,name:lf.needForProgram,label:"What is the rationale or need for the program?",rules:[Ot.required(),Ot.maxLength(5e3)]}).set(lf.anticipatedAnnualEnrollment,{required:!0,name:lf.anticipatedAnnualEnrollment,label:"What is the anticipated annual enrollment for the program?",rules:[Ot.required()]}).set(lf.anticipatedAnnualCompleters,{required:!0,name:lf.anticipatedAnnualCompleters,label:"What is the anticipated annual number of completers for the program?",rules:[Ot.required()]}).set(lf.fiveYearAnticipatedEnrollment,{required:!0,name:lf.fiveYearAnticipatedEnrollment,label:"What is the anticipated five year enrollment for the program?",rules:[Ot.required()]}).set(lf.fiveYearAnticipatedCompleters,{required:!0,name:lf.fiveYearAnticipatedCompleters,label:"What is the anticipated five year number of completers for the program?",rules:[Ot.required()]}).set(lf.cipReclassification,{name:lf.cipReclassification,label:"Are you requesting the reclassification of a CIP number for an existing program?",required:!0,rules:[Ot.required()]}).set(lf.requiresWorkExperiences,{name:lf.requiresWorkExperiences,label:"Does the program include any required work experience and/or training?",required:!0,rules:[Ot.required()]}).set(lf.requiredWorkExperiences,{name:lf.requiredWorkExperiences,label:"Please describe the required work experiences and/or training needed for this program.",required:a,rules:a?[Ot.required()]:[]})},n.resetForm=function(){var e;n.setState({altered:!1}),null===(e=n._formRef.current)||void 0===e||e.resetFields(),n.props.onChange&&n.props.onChange(!1)},n.getVlaue=function(){return n._formRef?n._formRef.current.getFieldsValue():null},n.fetchData=function(){n.setState({loading:!0});var e=[];n.state.cipNumberDetails&&0!=n.state.cipNumberDetails.length||e.push(n.loadCipNumberDetails()),n.state.awardTypes&&0!=n.state.awardTypes.length||e.push(n.loadAwardTypes()),n.state.iowaVariations&&0!=n.state.iowaVariations.length||e.push(n.loadIowaVariation()),n.props.changeRequestId&&n.props.changeRequestId==re.default.Empty()||e.push(n.loadChangeRequest()),Promise.all(e).then((function(){n.setState({loading:!1})}
1))},n.loadCipNumberDetails=function(){return Dp.getActiveNonTransferCipDetails().then((function(e){var t;e&&n.setState({cipNumberDetails:null!==(t=e.cipNumberDetails)&&void 0!==t?t:[]})})).catch((function(){n.setState({error:!0})}))},n.loadAwardTypes=function(){return ce.getAll(si.className).then((function(e){e&&n.setState({awardTypes:null!==e&&void 0!==e?e:[],loading:!1})})).catch((function(){n.setState({loading:!1})}))},n.loadIowaVariation=function(){return ce.getAll(pi.className).then((function(e){var t;e&&n.setState({iowaVariations:null!==(t=e.sort((function(e,t){return e.order-t.order})))&&void 0!==t?t:[],loading:!1})})).catch((function(){n.setState({loading:!1})}))},n.loadAwardType=function(){var e=lf.create(n._formRef?n._formRef.current.getFieldsValue():null).primrayAwardTypeId;return Uc.getAwardTypeDetails(null!==e&&void 0!==e?e:0).then((function(e){var t;if(e.awardType){var r=null!==(t=e.awardType)&&void 0!==t?t:si.create();n.setState({selectedAwardType:r})}})).catch((function(){n.setState({error:!0})}))},n.loadChangeRequest=function(){var e=mh({changeRequestId:n.props.changeRequestId});return lp.getStep1(e).then((function(e){var t,r,i,o,a,s;e&&(n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create(),noticeOfIntent:null!==(i=null===(r=e.changeRequest)||void 0===r?void 0:r.noticeOfIntentChangeRequest)&&void 0!==i?i:lf.create(),fieldErrors:e.fieldErrors,selectedAwardType:null!==(s=null===(a=null===(o=e.changeRequest)||void 0===o?void 0:o.noticeOfIntentChangeRequest)||void 0===a?void 0:a.primrayAwardType)&&void 0!==s?s:si.create()},(function(){return n.resetForm()})),n.setVariationValidationState())})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.handleChange=function(){n.setState({altered:!0}),n.props.onChange&&n.props.onChange(!0)},n.handleAwardTypeChange=function(){var e=[];e.push(n.loadAwardType()),Promise.all(e).then((function(){n.setState({loading:!1})})),n.setVariationValidationState()},n.handleSave=function(){var e,t,r,i,o;n.setState({saving:!0});var a=lf.create(n._formRef?n._formRef.current.getFieldsValue():null);a.id=null!==(r=null===(t=null===(e=n.state.changeRequest)||void 0===e?void 0:e.noticeOfIntentChangeRequest)||void 0===t?void 0:t.id)&&void 0!==r?r:re.default.Empty(),a.changeRequestId=null!==(i=n.props.changeRequestId)&&void 0!==i?i:re.default.Empty();var s=hh({changeRequestId:null!==(o=n.props.changeRequestId)&&void 0!==o?o:re.default.Empty(),institutionId:n.props.selectedInstitution,noticeOfIntentChangeRequest:a});lp.saveStep1(s).then((function(e){var t;(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.props.onSave&&(null===(t=e.changeRequest)||void 0===t?void 0:t.id)&&n.props.onSave(e.changeRequest.id)):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Save Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Save Failed")})).finally((function(){n.setState({loading:!1,saving:!1})}))},n.handleSubmit=function(){var e,t,r,i;n.setState({submitting:!0});var o=lf.create(n._formRef?n._formRef.current.getFieldsValue():null);o.id=null!==(r=null===(t=null===(e=n.state.changeRequest)||void 0===e?void 0:e.noticeOfIntentChangeRequest)||void 0===t?void 0:t.id)&&void 0!==r?r:re.default.Empty(),o.changeRequestId=null!==(i=n.props.changeRequestId)&&void 0!==i?i:re.default.Empty();var a=vh({noticeOfIntentChangeRequest:o,institutionId:n.props.selectedInstitution});lp.submitStep1(a).then((function(e){var t;n.setState({submitted:!0}),(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),(null===(t=e.changeRequest)||void 0===t?void 0:t.id)&&(n.props.onSave&&n.props.onSave(e.changeRequest.id),n.props.onSubmit&&n.props.onSubmit(e.changeRequest.id))):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Save Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Save Failed")})).finally((function(){n.setState({loading:!1,submitting:!1})}
1))},n.isAwardSelected=function(){var e;return!(!(null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldValue(lf.primrayAwardTypeId))&&!n.state.noticeOfIntent.primrayAwardTypeId)},n.renderTransferMajor=function(e){var t,r;if(null!==(r=null===(t=n._formRef.current)||void 0===t?void 0:t.getFieldValue(lf.isTransferMajorProgram))&&void 0!==r&&r)return Object(o.jsx)(mt.a,bh({},e.get(lf.isTransferMajorProgram),_t.getValidation(lf.isTransferMajorProgram,n.state.fieldErrors,n.state.submitted||n.props.readonly),{children:Object(o.jsx)(Hd,{disabled:n.props.readonly},void 0)}),void 0)},n.renderRequiredWorkExperience=function(e){var t,r;if(null!==(r=null===(t=n._formRef.current)||void 0===t?void 0:t.getFieldValue(lf.requiresWorkExperiences))&&void 0!==r&&r||n.state.noticeOfIntent.requiresWorkExperiences)return Object(o.jsx)(mt.a,bh({},e.get(lf.requiredWorkExperiences),_t.getValidation(lf.requiredWorkExperiences,n.state.fieldErrors,n.state.submitted||n.props.readonly),{children:Object(o.jsx)(ut.a.TextArea,{disabled:n.props.readonly,maxLength:5e3,showCount:!0,autoSize:{minRows:5}},void 0)}),void 0)},n.setVariationValidationState=function(){var e,t,r,i,o,a=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldValue(lf.primrayAwardTypeId),s=a||n.state.noticeOfIntent.primrayAwardTypeId,d=null!==(r=null===(t=n._formRef.current)||void 0===t?void 0:t.getFieldValue(lf.iowaVariationId))&&void 0!==r?r:n.state.noticeOfIntent.iowaVariationId,c=null!==(o=null===(i=n.state.awardTypes.find((function(e){return e.id==s})))||void 0===i?void 0:i.iowaVariationIds)&&void 0!==o?o:[],l=c.includes(d);n.setState({currentIowaVariationId:d,validIowaVariationIds:c,isCurrentIowaVariationValid:l})},n.state={awardTypes:[],cipNumberDetails:[],changeRequest:$a.create(),noticeOfIntent:lf.create({installTermId:"",installYear:$r.getCurrentYear(),cipNumberId:null,anticipatedAnnualEnrollment:null,anticipatedAnnualCompleters:null,requiresWorkExperiences:null,isTransferMajorProgram:null,cipReclassification:null}),iowaVariations:[],selectedIowaVariationId:0,selectedAwardType:si.create(),currentIowaVariationId:null,validIowaVariationIds:null,isCurrentIowaVariationValid:!0},n}return gh(t,e),t.prototype.componentDidMount=function(){this.props.changeRequestId&&this.fetchData()},t.prototype.componentDidUpdate=function(e){this.props.changeRequestId&&this.props.changeRequestId!=e.changeRequestId&&this.fetchData(),this.props.loading!=e.loading&&this.setState({loading:this.props.loading})},t.prototype.render=function(){var e,t=this;if(this.state.loading)return Object(o.jsx)(pt.a,{active:!0},void 0);var n=this.getFormItems(),r=null!==(e=this.state.noticeOfIntent)&&void 0!==e?e:lf.create();return r.primrayAwardTypeId=0==this.state.selectedAwardType.id?null:this.state.selectedAwardType.id,Object(o.jsx)(ht.a,bh({ref:this._formRef,layout:"vertical",initialValues:r,onValuesChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!0},{children:Object(o.jsxs)(y.b,bh({direction:"vertical"},{children:[this.renderErrors(),Object(o.jsx)(mt.a,bh({},n.get(lf.cipNumberId),_t.getValidation(lf.cipNumberId,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(hd,bh({showSearch:!0,disabled:this.props.readonly,optionFilterProp:"children"},{children:this.state.cipNumberDetails.map((function(e){return t.renderCipNumberOption(e)}))}),void 0)}),lf.cipNumberId),Object(o.jsx)(mt.a,bh({},n.get(lf.cipReclassification),_t.getValidation(lf.cipReclassification,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(Hd,{disabled:this.props.readonly},void 0)}),void 0),this.renderPreviousCipNumber(n),Object(o.jsx)(mt.a,bh({},n.get(lf.primrayAwardTypeId),_t.getValidation(lf.primrayAwardTypeId,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(hd,bh({showSearch:!0,disabled:this.props.readonly,optionFilterProp:"children",onChange:function(){return t.handleAwardTypeChange()}},{children:this.state.awardTypes.map((function(e){return t.renderAwardTypes(e)}))}),void 0)}),void 0),Object(o.jsx)(mt.a,bh({},n.get(lf.iowaVariationId),_t.getValidation(lf.iowaVariationId,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(hd,bh({showSearch:!0,disabled:this.props.readonly||!this.isAwardSelected(),optionFilterProp:"children",onChange:function(){return t.setVariationValidationState()}},{children:this.renderIowaVariations()}),void 0)}),void 0),this.renderTransferMajor(n),Object(o.jsx)(mt.a,bh({},n.get(lf.needForProgram),_t.getValidation(lf.needForProgram,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ut.a.TextArea,{disabled:this.props.readonly,maxLength:5e3,showCount:!0,autoSize:{minRows:5}},void 0)}),void 0),Object(o.jsx)(mt.a,bh({},n.get(lf.anticipatedAnnualEnrollment),_t.getValidation(lf.anticipatedAnnualEnrollment,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(Ni.a,{disabled:this.props.readonly,min:0},void 0)}),void 0),Object(o.jsx)(mt.a,bh({},n.get(lf.fiveYearAnticipatedEnrollment),_t.getValidation(lf.fiveYearAnticipatedEnrollment,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(Ni.a,{disabled:this.props.readonly,min:0},void 0)}),void 0),Object(o.jsx)(mt.a,bh({},n.get(lf.anticipatedAnnualCompleters),_t.getValidation(lf.anticipatedAnnualCompleters,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(Ni.a,{disabled:this.props.readonly,min:0},void 0)}),void 0),Object(o.jsx)(mt.a,bh({},n.get(lf.fiveYearAnticipatedCompleters),_t.getValidation(lf.fiveYearAnticipatedCompleters,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(Ni.a,{disabled:this.props.readonly,min:0},void 0)}),void 0),Object(o.jsx)(mt.a,bh({},n.get(lf.requiresWorkExperiences),_t.getValidation(lf.requiresWorkExperiences,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(H
1d,{disabled:this.props.readonly},void 0)}),void 0),this.renderRequiredWorkExperience(n),this.renderActions()]}),void 0)}),void 0)},t.prototype.renderActions=function(){if(!this.props.readonly)return Object(o.jsxs)(y.b,bh({direction:"horizontal",wrap:!0},{children:[Object(o.jsx)(ss,{submitting:this.state.submitting},void 0),Object(o.jsx)(Tr,{type:"default",htmlType:"button",onClick:this.handleSave,saving:this.state.submitting,saved:this.state.saved},void 0),Object(o.jsx)(Ir,{resetting:this.state.resetting,onConfirm:this.resetForm},void 0)]}),void 0)},t.prototype.renderPreviousCipNumber=function(e){var t,n=this;if((null===(t=this._formRef.current)||void 0===t?void 0:t.getFieldValue(lf.cipReclassification))||this.state.noticeOfIntent.cipReclassification)return Object(o.jsx)(mt.a,bh({},e.get(lf.previousCipNumberId),_t.getValidation(lf.previousCipNumberId,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(hd,bh({showSearch:!0,disabled:this.props.readonly,optionFilterProp:"children"},{children:this.state.cipNumberDetails.map((function(e){return n.renderCipNumberOption(e)}))}),void 0)}),lf.previousCipNumberId)},t.prototype.renderCipNumberOption=function(e){if(e.cipNumberId)return Object(o.jsxs)(pr.a.Option,bh({value:e.cipNumberId},{children:[e.display," - ",e.title]}),e.cipNumberId)},t.prototype.renderAwardTypes=function(e){if(e.id)return Object(o.jsx)(pr.a.Option,bh({value:e.id},{children:e.display}),e.id)},t.prototype.renderIowaVariations=function(){var e=this;return this.state.iowaVariations.filter((function(t){var n,r;return(null===(n=e.state.validIowaVariationIds)||void 0===n?void 0:n.includes(t.id))||0==(null===(r=e.state.validIowaVariationIds)||void 0===r?void 0:r.length)||null==e.state.validIowaVariationIds||t.id==e.state.currentIowaVariationId})).map((function(t){if(t.id){var n=!e.state.isCurrentIowaVariationValid&&t.id==e.state.currentIowaVariationId;return Object(o.jsx)(pr.a.Option,bh({value:t.id,disabled:n},{children:t.display}),t.id)}}))},t.prototype.renderErrors=function(){if(this.state.error)return Object(o.jsx)(ct.a,{showIcon:!0,message:"Error Saving",type:"error",description:this.state.message},void 0)},t}(a.Component),Oh=yh,jh=function(e){return Object.assign({changeRequestId:null,institutionId:"00000000-0000-0000-0000-000000000000",noticeOfIntentChangeRequest:null},e)},Ih=function(e){return Object.assign({noticeOfIntentChangeRequest:null},e)},Sh=function(e){return Object.assign({changeRequestId:"00000000-0000-0000-0000-000000000000"},e)},Eh={className:"NoticeOfIntentChangeRequestPlannedAwardTypeDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",noticeOfIntentChangeRequestId:"00000000-0000-0000-0000-000000000000",noticeOfIntentChangeRequest:null,awardTypeId:null,awardType:null,title:"",description:"",primaryAward:!1,install:null,instructionalLevelId:null,typeOfProgramId:null,specialEmphasisId:null,objectPurposeId:null,instructionalLevel:null,typeOfProgram:null,specialEmphasis:null,objectPurpose:null,noticeOfIntentChangeRequestPlannedAwardInstitutionLocationIds:[],noticeOfIntentChangeRequestPlannedAwardInstitutionLocations:[],noticeOfIntentChangeRequestPlannedAwardModeOfDeliverIds:[],noticeOfIntentChangeRequestPlannedAwardModeOfDeliveries:[]},e)},id:"id",noticeOfIntentChangeRequestId:"noticeOfIntentChangeRequestId",noticeOfIntentChangeRequest:"noticeOfIntentChangeRequest",awardTypeId:"awardTypeId",awardType:"awardType",title:"title",description:"description",primaryAward:"primaryAward",install:"install",instructionalLevelId:"instructionalLevelId",typeOfProgramId:"typeOfProgramId",specialEmphasisId:"specialEmphasisId",objectPurposeId:"objectPurposeId",instructionalLevel:"instructionalLevel",typeOfProgram:"typeOfProgram",specialEmphasis:"specialEmphasis",objectPurpose:"objectPurpose",noticeOfIntentChangeRequestPlannedAwardInstitutionLocationIds:"noticeOfIntentChangeRequestPlannedAwardInstitutionLocationIds",noticeOfIntentChangeRequestPlannedAwardInstitutionLocations:"noticeOfIntentChangeRequestPlannedAwardInstitutionLocations",noticeOfIntentChangeRequestPlannedAwardModeOfDeliverIds:"noticeOfIntentChangeRequestPlannedAwardModeOfDeliverIds",noticeOfIntentChangeRequestPlannedAwardModeOfDeliveries:"noticeOfIntentChangeRequestPlannedAwardModeOfDeliveries"},Rh=Eh,_h=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Th=function(){return Th=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Th.apply(this,arguments)},Ch=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n.getPlannedAwardFormItems=function(e){return(new Map).set(Rh.title,{required:!0,name:[e,R
1h.title],label:"Title",rules:[Ot.required()]}).set(Rh.awardTypeId,{required:!0,name:[e,Rh.awardTypeId],label:"Award Type",rules:[Ot.required()]}).set(Rh.description,{required:!0,name:[e,Rh.description],label:"Description",rules:[Ot.required(),Ot.maxLength(5e3)]}).set(Rh.install,{required:!0,name:[e,Rh.install],label:"What term will this program first be offered?",rules:[Ot.required()]}).set(Rh.instructionalLevelId,{required:!0,name:[e,Rh.instructionalLevelId],label:"Instructional Level",rules:[Ot.required()]}).set(Rh.typeOfProgramId,{required:!0,name:[e,Rh.typeOfProgramId],label:"Type Of Program",rules:[Ot.required()]}).set(Rh.specialEmphasisId,{required:!0,name:[e,Rh.specialEmphasisId],label:"Special Emphasis",rules:[Ot.required()]}).set(Rh.objectPurposeId,{required:!0,name:[e,Rh.objectPurposeId],label:"Object Purpose",rules:[Ot.required()]}).set(Rh.noticeOfIntentChangeRequestPlannedAwardInstitutionLocationIds,{required:!0,name:[e,Rh.noticeOfIntentChangeRequestPlannedAwardInstitutionLocationIds],label:"At which location(s) will this program be offered?",rules:[Ot.required()]}).set(Rh.noticeOfIntentChangeRequestPlannedAwardModeOfDeliverIds,{required:!0,name:[e,Rh.noticeOfIntentChangeRequestPlannedAwardModeOfDeliverIds],label:"How will this award be offered?",rules:[Ot.required()]})},n.resetForm=function(){var e;n.setState({altered:!1}),null===(e=n._formRef.current)||void 0===e||e.resetFields()},n.fetchData=function(){n.setState({loading:!0});var e=[];0==n.state.awardTypes.length&&e.push(n.loadAwardTypes()),n.state.instructionalLevels&&0!=n.state.instructionalLevels.length||e.push(n.loadInstructionalLevel()),n.state.typeOfPrograms&&0!=n.state.typeOfPrograms.length||e.push(n.loadTypeOfProgram()),n.state.specialEmphasis&&0!=n.state.specialEmphasis.length||e.push(n.loadSpecialEmphasis()),n.state.objectPurposes&&0!=n.state.objectPurposes.length||e.push(n.loadObjectPurpose()),(!n.state.institutionLocations||0==n.state.institutionLocations.length&&n.props.institutionId&&n.props.institutionId!=re.default.Empty())&&e.push(n.loadInstitutionLocation()),n.props.changeRequestId&&n.props.changeRequestId!=re.default.Empty()&&e.push(n.loadChangeRequest()),n.state.modeOfDelivery&&0!=n.state.modeOfDelivery.length||e.push(n.loadModeOfDelivery()),Promise.all(e).then((function(){n.setState({loading:!1})}))},n.loadAwardTypes=function(){return ce.getAll(si.className).then((function(e){e&&n.setState({awardTypes:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadChildAwardTypes=function(e){var t=Gc({id:e});return Uc.getChildAwardTypes(t).then((function(e){var t;e&&(n.setState({childAwardTypes:null!==(t=e.childAwardTypes)&&void 0!==t?t:[]}),n.setState({hasChildAwardTypes:null!=e.childAwardTypes&&e.childAwardTypes.length>1}))})).catch((function(){n.setState({error:!0})}))},n.loadInstructionalLevel=function(){return ce.getAll(Vc.className).then((function(e){e&&n.setState({instructionalLevels:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadTypeOfProgram=function(){return ce.getAll(Kc.className).then((function(e){e&&n.setState({typeOfPrograms:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadSpecialEmphasis=function(){return ce.getAll(Qc.className).then((function(e){e&&n.setState({specialEmphasis:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadObjectPurpose=function(){return ce.getAll(Hc.className).then((function(e){e&&n.setState({objectPurposes:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadInstitutionLocation=function(){var e;wc.getInstitutionLocations(null!==(e=n.props.institutionId)&&void 0!==e?e:re.default.Empty()).then((function(e){var t;(null===e||void 0===e?void 0:e.succeeded)?n.setState({institutionLocations:null!==(t=e.institutionLocations)&&void 0!==t?t:[]}):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Save Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Save Failed")}))},n.loadModeOfDelivery=function(){return ce.getAll(Bc.className).then((function(e){e&&n.setState({modeOfDelivery:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}
1))},n.loadChangeRequest=function(){var e=Sh({changeRequestId:n.props.changeRequestId});return lp.getStep2(e).then((function(e){var t,r,i,o;if(e){var a=null!==(r=null===(t=e.changeRequest)||void 0===t?void 0:t.noticeOfIntentChangeRequest)&&void 0!==r?r:lf.create();0==(null===(i=a.plannedAwardTypes)||void 0===i?void 0:i.length)&&a.plannedAwardTypes.push(Rh.create()),a.plannedAwardTypes&&(a.plannedAwardTypes[0].awardTypeId=a.primrayAwardTypeId,n.loadChildAwardTypes(a.primrayAwardTypeId)),n.setState({changeRequest:null!==(o=e.changeRequest)&&void 0!==o?o:$a.create(),noticeOfIntent:null!==a&&void 0!==a?a:lf.create(),fieldErrors:n.props.fieldErrors},(function(){return n.resetForm()}))}})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.getAward=function(){var e;return null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldValue(lf.plannedAwardTypes)},n.handleChange=function(){n.setState({altered:!0})},n.handleSave=function(){var e,t,r,i,o,a;n.setState({saving:!0});var s=null!==(t=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldsValue())&&void 0!==t?t:lf.create();s.changeRequestId=null!==(r=n.props.changeRequestId)&&void 0!==r?r:re.default.Empty(),s.id=null!==(a=null===(o=null===(i=n.state.changeRequest)||void 0===i?void 0:i.noticeOfIntentChangeRequest)||void 0===o?void 0:o.id)&&void 0!==a?a:re.default.Empty();var d=jh({noticeOfIntentChangeRequest:s});lp.saveStep2(d).then((function(e){var t;(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.props.onSave&&(null===(t=e.changeRequest)||void 0===t?void 0:t.id)&&n.props.onSave()):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Save Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Save Failed")})).finally((function(){n.setState({loading:!1,saving:!1})}))},n.handleSubmit=function(){var e,t,r,i,o;n.setState({submitting:!0});var a=lf.create(n._formRef?n._formRef.current.getFieldsValue():null);a.changeRequestId=null!==(e=n.props.changeRequestId)&&void 0!==e?e:re.default.Empty(),a.id=null!==(i=null===(r=null===(t=n.state.changeRequest)||void 0===t?void 0:t.noticeOfIntentChangeRequest)||void 0===r?void 0:r.id)&&void 0!==i?i:re.default.Empty();var s=Ih({changeRequestId:null!==(o=n.props.changeRequestId)&&void 0!==o?o:null,noticeOfIntentChangeRequest:a});lp.submitStep2(s).then((function(e){n.setState({submitted:!0}),(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.props.onSave&&n.props.onSave(),n.props.onSubmit&&n.props.onSubmit()):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Save Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Save Failed")})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.handleAwardTypeChange=function(e){var t,r,i,o,a,s,d,c,l,u,p,f,h,v,m=null!==(t=n.state.awardTypes.find((function(t){var r;return t.id==(null===(r=n._formRef.current)||void 0===r?void 0:r.getFieldValue([lf.plannedAwardTypes,e,Rh.awardTypeId]))})))&&void 0!==t?t:si.create(),g=null===(r=n._formRef.current)||void 0===r?void 0:r.getFieldsValue();m.instructionalLevels.includes(null!==(o=null===(i=n._formRef.current)||void 0===i?void 0:i.getFieldValue([lf.plannedAwardTypes,e,Rh.instructionalLevelId]))&&void 0!==o?o:0)||(g.plannedAwardTypes[e].instructionalLevelId=void 0,null===(a=n._formRef.current)||void 0===a||a.setFieldsValue({plannedAwardTypes:g.plannedAwardTypes})),m.typeOfPrograms.includes(null!==(d=null===(s=n._formRef.current)||void 0===s?void 0:s.getFieldValue([lf.plannedAwardTypes,e,Rh.typeOfProgramId]))&&void 0!==d?d:0)||(g.plannedAwardTypes[e].typeOfProgramId=void 0,null===(c=n._formRef.current)||void 0===c||c.setFieldsValue({plannedAwardTypes:g.plannedAwardTypes})),m.specialEmphases.includes(null!==(u=null===(l=n._formRef.current)||void 0===l?void 0:l.getFieldValue([lf.plannedAwardTypes,e,Rh.specialEmphasisId]))&&void 0!==u?u:0)||(g.plannedAwardTypes[e].specialEmphasisId=void 0,null===(p=n._formRef.current)||void 0===p||p.setFieldsValue({plannedAwardTypes:g.plannedAwardTypes})),m.objectPurposes.includes(null!==(h=null===(f=n._formRef.current)||void 0===f?void 0:f.getFieldValue([lf.plannedAwardTypes,e,Rh.objectPurposeId]))&&void 0!==h?h:0)||(g.plannedAwardTypes[e].objectPurposeId=void 0,null===(v=n._formRef.current)||void 0===v||v.setFieldsValue({plannedAwardTypes:g.plannedAwardTypes})),0==e&&n.loadChildAwardTypes(m.id)},n.state={changeRequest:$a.create(),noticeOfIntent:lf.create({installTermId:"",installYear:$r.getCurrentYear(),cipReclassification:null,cipNumberId:null,plannedAwardTypes:[Rh.create()]}),awardTypes:[],instructionalLevels:[],typeOfPrograms:[],specialEmphasis:[],objectPurposes:[],modeOfDelivery:[],institutionLocations:[],childAwardTypes:[],hasChildAwardTypes:!1},n}return _h(t,e),t.prototype.componentDidMount=function(){this.props.changeRequestId&&this.fetchData()},t.prototype.componentDidUpdate=function(e){this.props.changeRequestId&&this.props.changeRequestId!=e.changeRequestId&&this.fetchData(),this.props.loading!=e.loading&&this.setState({loading:this.props.loading})},t.prototype.render=function(){return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(y.b,Th({size:"small",direction:"vertical"},{children:[this.renderErrors(),Object(o.jsx)(ht.a,Th({ref:this._formRef,layout:"vertical",initialValues:this.state.noticeOfIntent,onValuesChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!0},{children:Object(o.jsxs)(y.b,Th({direction:"vertical"},{children:[Object(o.jsx)(ot.a.Paragraph,Th({italic:!0},{children:"If you do not know any of the following information, please contact your IDOE consultant."}),void 0),this.renderPlannedAwards(),this.renderActions()]}),void 0)}),void 0)]}),void 0)},t.prototype.renderActions=function(){if(!this.props.readonly)return Object(o.jsxs)(y.b,Th({direction:"horizontal",wrap:!0},{children:[Object(o.jsx)(rs,{onClick:this.props.onPrevious},void 0),Object(o.jsx)(ss,{submitting:this.state.submitting},void 0),Object(o.jsx)(Tr,{type:"default",htmlType:"button",onClick:this.handleSave,saving:this.state.submitting,saved:this.state.saved},void 0),Object(o.jsx)(Ir,{resetting:this.state.resetting,onConfirm:this.resetForm},void 0)]}),void 0)},t.prototype.renderPlannedAwards=function(){var e=this;return Object(o.jsx)(ht.a.List,Th({name:lf.plannedAwardTypes},{children:function(t,n){var r=n.add,i=n.remove;return Object(o.jsxs)(y.b,Th({direction:"vertical"},{children:[t.map((function(t,n){if(t)return e.renderPlannedAward(t,n,i)})),e.renderAddAward(r)]}),void 0)}}),void 0)},t.prototype.renderAddAward=function(e){if(!this.props.readonly&&this.state.hasChildAwardTypes)return Object(o.jsx)(rt.a,Th({onClick:function(){return e()},icon:Object(o.jsx)(Xc.a,{},void 0)},{children:"Add Award"}),void 0)},t.prototype.renderPlannedAward=function(e,t,n){var r,i=this,a=0==t?"Primary Award":"Additional Award "+t,s=Object(o.jsx)(rt.a,{type:"link",size:"small",id:""+t,onClick:function(){return n(e.name)},icon:Object(o.jsx)(Yd.a,{},void 0)},void 0),d=null===(r=this._formRef.current)||void 0===r?void 0:r.getFieldValue([lf.plannedAwardTypes,t,Rh.awardTypeId]),c=d||this.state.noticeOfIntent.primrayAwardTypeId,l=this.getPlannedAwardFormItems(t),u={xs:24,sm:24,md:24,lg:12,xl:12,xxl:6};return Object(o.jsxs)(Qn.a,Th({title:a,size:"small",type:"inner",extra:0==t||this.props.readonly?null:s},{children:[Object(o.jsxs)(b.a,Th({gutter:[16,16]},{children:[Object(o.jsx)(m.a,Th({},En.HALF,{children:Object(o.jsx)(mt.a,Th({},l.get(Rh.awardTypeId),_t.getValidation(Rh.awardTypeId+Rh.className+t,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(hd,Th({dropdownMatchSelectWidth:!1,disabled:this.props.readonly||0==t,showArrow:!this.props.readonly&&t>0,onChange:function(){return i.handleAwardTypeChange(t)}
1},{children:0==t?this.state.awardTypes.map((function(e){return i.renderAwardTypeOption(e)})):this.state.childAwardTypes.map((function(e){return i.renderAwardTypeOption(e)}))}),void 0)}),void 0)}),void 0),Object(o.jsx)(m.a,Th({},En.HALF,{children:Object(o.jsx)(mt.a,Th({},l.get(Rh.title),_t.getValidation(Rh.title+Rh.className+t,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ut.a,{disabled:this.props.readonly},void 0)}),void 0)}),void 0)]}),void 0),Object(o.jsxs)(b.a,Th({gutter:[16,16]},{children:[Object(o.jsx)(m.a,Th({},u,{children:Object(o.jsx)(mt.a,Th({},l.get(Rh.instructionalLevelId),_t.getValidation(Rh.instructionalLevelId+t,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(hd,Th({dropdownMatchSelectWidth:!1},{children:this.state.instructionalLevels.filter((function(e){var t;return null===(t=i.state.awardTypes.find((function(e){return e.id==c})))||void 0===t?void 0:t.instructionalLevels.includes(e.id)})).map((function(e){return i.renderInstructionalLevelOption(e)}))}),void 0)}),void 0)}),void 0),Object(o.jsx)(m.a,Th({},u,{children:Object(o.jsx)(mt.a,Th({},l.get(Rh.typeOfProgramId),_t.getValidation(Rh.typeOfProgramId+t,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(hd,Th({dropdownMatchSelectWidth:!1},{children:this.state.typeOfPrograms.filter((function(e){var t;return null===(t=i.state.awardTypes.find((function(e){return e.id==c})))||void 0===t?void 0:t.typeOfPrograms.includes(e.id)}
1)).map((function(e){return i.renderTypeOfProgramOption(e)}))}),void 0)}),void 0)}),void 0),Object(o.jsx)(m.a,Th({},u,{children:Object(o.jsx)(mt.a,Th({},l.get(Rh.specialEmphasisId),_t.getValidation(Rh.specialEmphasisId+t,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(hd,Th({dropdownMatchSelectWidth:!1},{children:this.state.specialEmphasis.filter((function(e){var t;return null===(t=i.state.awardTypes.find((function(e){return e.id==c})))||void 0===t?void 0:t.specialEmphases.includes(e.id)})).map((function(e){return i.renderSpecialEmphasis(e)}))}),void 0)}),void 0)}),void 0),Object(o.jsx)(m.a,Th({},u,{children:Object(o.jsx)(mt.a,Th({},l.get(Rh.objectPurposeId),_t.getValidation(Rh.objectPurposeId+t,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(hd,Th({dropdownMatchSelectWidth:!1},{children:this.state.objectPurposes.filter((function(e){var t;return null===(t=i.state.awardTypes.find((function(e){return e.id==c})))||void 0===t?void 0:t.objectPurposes.includes(e.id)}
1)).map((function(e){return i.renderObjectPurpose(e)}))}),void 0)}),void 0)}),void 0)]}),void 0),Object(o.jsx)(mt.a,Th({},l.get(Rh.description),_t.getValidation(Rh.description+t,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ut.a.TextArea,{disabled:this.props.readonly,maxLength:5e3,showCount:!0,autoSize:{minRows:5}},void 0)}),void 0),Object(o.jsx)(mt.a,Th({},l.get(Rh.install),_t.getValidation(Rh.install+t,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(Od,{futureYears:!0,disabled:this.props.readonly,minYear:$r.getCurrentYear()},void 0)}),void 0),Object(o.jsx)(mt.a,Th({},l.get(Rh.noticeOfIntentChangeRequestPlannedAwardModeOfDeliverIds),_t.getValidation(Rh.noticeOfIntentChangeRequestPlannedAwardModeOfDeliverIds+t,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(hd,Th({dropdownMatchSelectWidth:!1,mode:"multiple"},{children:this.state.modeOfDelivery.map((function(e){return i.renderModeOfDelivery(e)}))}),void 0)}),void 0),this.renderLocation(l,t)]}),void 0)},t.prototype.renderLocation=function(e,t){var n=this;if(this.state.institutionLocations.length>1)return Object(o.jsx)(mt.a,Th({},e.get(Rh.noticeOfIntentChangeRequestPlannedAwardInstitutionLocationIds),_t.getValidation(Rh.noticeOfIntentChangeRequestPlannedAwardInstitutionLocationIds+t,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(hd,Th({dropdownMatchSelectWidth:!1,mode:"multiple"},{children:this.state.institutionLocations.map((function(e){return n.renderInstitutionLocations(e)}))}),void 0)}),void 0)},t.prototype.renderObjectPurpose=function(e){return Object(o.jsxs)(pr.a.Option,Th({value:e.id},{children:[e.code," - ",e.name]}),e.id)},t.prototype.renderSpecialEmphasis=function(e){return Object(o.jsxs)(pr.a.Option,Th({value:e.id},{children:[e.code," - ",e.name]}),e.id)},t.prototype.renderTypeOfProgramOption=function(e){return Object(o.jsxs)(pr.a.Option,Th({value:e.id},{children:[e.code," - ",e.name]}),e.id)},t.prototype.renderInstructionalLevelOption=function(e){return Object(o.jsxs)(pr.a.Option,Th({value:e.id},{children:[e.code," - ",e.name]}),e.id)},t.prototype.renderAwardTypeOption=function(e){if(e.id)return Object(o.jsxs)(pr.a.Option,Th({value:e.id},{children:[e.code," - ",e.name]}),e.id)},t.prototype.renderInstitutionLocations=function(e){var t,n;if(e.id)return Object(o.jsxs)(pr.a.Option,Th({value:null!==(t=e.id)&&void 0!==t?t:re.default.Empty()},{children:[e.name," - ",e.street1," "]}),null!==(n=e.id)&&void 0!==n?n:re.default.Empty())},t.prototype.renderModeOfDelivery=function(e){var t,n;if(e.id)return Object(o.jsxs)(pr.a.Option,Th({value:null!==(t=e.id)&&void 0!==t?t:re.default.Empty()},{children:[" ",e.name]}),null!==(n=e.id)&&void 0!==n?n:re.default.Empty())},t.prototype.renderErrors=function(){if(this.state.error&&this.state.message)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:this.state.message},void 0)},t}(a.Component),xh=Ch,Ah=function(e){return Object.assign({noticeOfIntentChangeRequest:null},e)},Ph=function(e){return Object.assign({changeRequestId:null,institutionId:"00000000-0000-0000-0000-000000000000",noticeOfIntentChangeRequest:null},e)},Nh=function(e){return Object.assign({changeRequestId:"00000000-0000-0000-0000-000000000000"},e)},wh={className:"NoticeOfIntentChangeRequestContactDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",noticeOfIntentChangeRequestId:"00000000-0000-0000-0000-000000000000",noticeOfIntentChangeRequest:null,userId:null,user:null,firstName:"",lastName:"",email:"",phone:""},e)},id:"id",noticeOfIntentChangeRequestId:"noticeOfIntentChangeRequestId",noticeOfIntentChangeRequest:"noticeOfIntentChangeRequest",userId:"userId",user:"user",firstName:"firstName",lastName:"lastName",email:"email",phone:"phone"},Dh=wh,qh=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fh=function(){return Fh=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Fh.apply(this,arguments)},Mh=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n.firstNameIdentifier="firstName",n.lastNameIdentifier="lastName",n.emailIdentifier="email",n.getContactFormItems=function(e){return(new Map).set(Dh.userId,{name:[e,Dh.userId]}).set(Dh.firstName,{name:[e,Dh.firstName],required:!0,rules:[Ot.required()]}).set(Dh.lastName,{name:[e,Dh.lastName],required:!0,rules:[Ot.required()]}).set(Dh.email,{name:[e,Dh.email],required:!0,rules:[Ot.required()]}).set(Dh.phone,{name:[e,Dh.phone]})},n.getColumnDefinitionsForContactInformation=function(e){var t=n.state.userSearch,r=t.map((function(e){return{label:e.fullDisplay,key:e.id,value:e.id}}));return[{title:"First Name",dataIndex:Dh.firstName,render:function(e,i,a){return Object(o.jsx)(mt.a,Fh({},n.getContactFormItems(a).get(Dh.firstName),_t.getValidation(Dh.firstName+a,n.state.fieldErrors,n.state.submitted||n.props.readonly),{children:Object(o.jsx)(Ga.a,Fh({open:n.state.openSelect.get(n.firstNameIdentifier+a),onClick:function(){return n.handleClick(n.firstNameIdentifier+a)},onBlur:function(){return n.handleBlur(n.firstNameIdentifier+a)},disabled:n.props.readonly,options:r,onSearch:n.handleUserSearch,onSelect:function(e){return n.handleContactSelected(e,t,a)}},{children:Object(o.jsx)(ut.a,{title:"First Name",disabled:n.props.readonly},void 0)}),void 0)}),void 0)}},{title:"Last Name",dataIndex:Dh.lastName,render:function(e,i,a){return Object(o.jsx)(mt.a,Fh({},n.getContactFormItems(a).get(Dh.lastName),_t.getValidation(Dh.lastName+a,n.state.fieldErrors,n.state.submitted||n.props.readonly),{children:Object(o.jsx)(Ga.a,Fh({open:n.state.openSelect.get(n.lastNameIdentifier+a),onClick:function(){return n.handleClick(n.lastNameIdentifier+a)},onBlur:function(){return n.handleBlur(n.lastNameIdentifier+a)},disabled:n.props.readonly,options:r,onSearch:n.handleUserSearch,onSelect:function(e){return n.handleContactSelected(e,t,a)}},{children:Object(o.jsx)(ut.a,{title:"Last Name",disabled:n.props.readonly},void 0)}),void 0)}),void 0)}},{title:"Email",dataIndex:Dh.email,render:function(e,i,a){return Object(o.jsx)(mt.a,Fh({},n.getContactFormItems(a).get(Dh.email),_t.getValidation(Dh.email+a,n.state.fieldErrors,n.state.submitted||n.props.readonly),{children:Object(o.jsx)(Ga.a,Fh({open:n.state.openSelect.get(n.emailIdentifier+a),onClick:function(){return n.handleClick(n.emailIdentifier+a)},onBlur:function(){return n.handleBlur(n.emailIdentifier+a)},disabled:n.props.readonly,options:r,onSearch:n.handleUserSearch,onSelect:function(e){return n.handleContactSelected(e,t,a)}},{children:Object(o.jsx)(ut.a,{title:"Email",disabled:n.props.readonly},void 0)}),void 0)}),void 0)}},{title:"Phone Number",dataIndex:Dh.phone,render:function(e,t,r){return Object(o.jsx)(mt.a,Fh({},n.getContactFormItems(r).get(Dh.phone),_t.getValidation(Dh.phone+r,n.state.fieldErrors,n.state.submitted||n.props.readonly),{children:Object(o.jsx)(ut.a,{title:"Phone Number",disabled:n.props.readonly},void 0)}),void 0)}},{title:"Actions",dataIndex:Dh.userId,width:"15px",render:function(t,r){var i,a;
1return n.props.readonly||(null===(a=null===(i=n._formRef.current)||void 0===i?void 0:i.getFieldValue(lf.contacts))||void 0===a?void 0:a.length)<=1?null:Object(o.jsx)(rt.a,Fh({type:"link",onClick:function(){return e(r.name)}},{children:Object(o.jsx)(Yd.a,{},void 0)}),void 0)},sorter:!1,filterType:wr.NONE}]},n.loadChangeRequest=function(){var e=Nh({changeRequestId:n.props.changeRequestId});return lp.getStep3(e).then((function(e){var t,r,i,o,a,s,d,c;if(e){var l=null!==(r=null===(t=e.changeRequest)||void 0===t?void 0:t.noticeOfIntentChangeRequest)&&void 0!==r?r:lf.create();0==(null===(i=l.contacts)||void 0===i?void 0:i.length)&&(l.contacts=[Dh.create()]),0==(null===(o=l.consultantMeetings)||void 0===o?void 0:o.length)&&(l.consultantMeetings=[df.create({consultants:[af.create()],date:""})]);var u=n.state.openSelect,p=0;null===(a=l.contacts)||void 0===a||a.forEach((function(){u.set(n.firstNameIdentifier+p,!1),u.set(n.lastNameIdentifier+p,!1),u.set(n.emailIdentifier+p,!1),p++})),n.setState({changeRequest:null!==(s=e.changeRequest)&&void 0!==s?s:$a.create(),noticeOfIntent:null!==(c=null===(d=e.changeRequest)||void 0===d?void 0:d.noticeOfIntentChangeRequest)&&void 0!==c?c:lf.create(),fieldErrors:n.props.fieldErrors},(function(){return n.resetForm()}))}})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.toggleOpen=function(e,t){var r=n.state.openSelect;r.set(n.firstNameIdentifier,!1),r.set(n.lastNameIdentifier,!1),r.set(n.emailIdentifier,!1),r.set(e,t),n.setState({openSelect:r})},n.handleClick=function(e){var t,r;n.toggleOpen(e,!(null!==(r=null===(t=n.state.openSelect)||void 0===t?void 0:t.get(e))&&void 0!==r&&r))},n.handleBlur=function(e){n.toggleOpen(e,!1)},n.resetForm=function(){var e;n.setState({altered:!1}),null===(e=n._formRef.current)||void 0===e||e.resetFields(),n.props.onChange&&n.props.onChange(!1)},n.handleContactSelected=function(e,t,r){var i,o,a=t.filter((function(t){return t.id==e}))[0],s=null===(i=n._formRef.current)||void 0===i?void 0:i.getFieldValue(lf.contacts);s[r]=Fh(Fh({},s[r]),{firstName:a.firstName,lastName:a.lastName,phoneNumber:a.phoneNumber,email:a.username,userId:a.id}),a&&(null===(o=n._formRef.current)||void 0===o||o.setFieldsValue({contacts:s})),n.setState({userSearch:[]})},n.handleUserSearch=function(e){if(e.length>=3){var t=zp({institutionId:n.props.institutionId,searchText:e});Bp.searchForUsers(t).then((function(e){e.users&&n.setState({userSearch:e.users})})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))}},n.handleConsultantSearch=function(e){if(e.length>=3){var t=nf({institutionId:n.props.institutionId,searchText:e});Bp.searchForConsultants(t).then((function(e){e.users&&n.setState({consultantSearch:e.users})})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))}},n.handleSave=function(){var e;n.setState({saving:!0});var t=lf.create(n._formRef?n._formRef.current.getFieldsValue():null);t.changeRequestId=null!==(e=n.props.changeRequestId)&&void 0!==e?e:re.default.Empty();var r=Ah({noticeOfIntentChangeRequest:t});lp.saveStep3(r).then((function(e){(null===e||void 0===e?void 0:e.succeeded)?S.b.success("Saved"):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Save Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Save Failed")})).finally((function(){n.setState({loading:!1,saving:!1,altered:!1})}))},n.handleSubmit=function(){var e;n.setState({submitting:!0});var t=lf.create(n._formRef?n._formRef.current.getFieldsValue():null);t.changeRequestId=null!==(e=n.props.changeRequestId)&&void 0!==e?e:re.default.Empty();var r=Ph({noticeOfIntentChangeRequest:t});lp.submitStep3(r).then((function(e){n.setState({submitted:!0}),(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.props.onSubmit&&n.props.onSubmit()):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Save Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Save Failed")})).finally((function(){n.setState({loading:!1,submitting:!1})}
1))},n.handleChange=function(){n.setState({altered:!0}),n.props.onChange&&n.props.onChange(!0)},n.state={changeRequest:$a.create(),noticeOfIntent:lf.create(),consultantSearch:[],userSearch:[],openSelect:new Map},n}return qh(t,e),t.prototype.componentDidMount=function(){this.props.changeRequestId&&this.props.changeRequestId!=re.default.Empty()&&this.loadChangeRequest()},t.prototype.componentDidUpdate=function(e){this.props.changeRequestId&&this.props.changeRequestId!=re.default.Empty()&&this.props.changeRequestId!=e.changeRequestId&&this.loadChangeRequest(),this.props.loading!=e.loading&&this.setState({loading:this.props.loading})},t.prototype.render=function(){var e=this;return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(y.b,Fh({size:"small",direction:"vertical"},{children:[this.renderErrors(),Object(o.jsx)(ht.a,Fh({ref:this._formRef,layout:"vertical",initialValues:this.state.noticeOfIntent,onValuesChange:this.handleChange,onFinish:this.handleSubmit},{children:Object(o.jsxs)(y.b,Fh({direction:"vertical"},{children:[Object(o.jsx)(ot.a.Paragraph,Fh({italic:!0},{children:"Please provide the contact information for the point(s) of contact for this program."}),void 0),Object(o.jsx)(ht.a.List,Fh({name:lf.contacts},{children:function(t,n){var r=n.add,i=n.remove;return Object(o.jsxs)(y.b,Fh({direction:"vertical"},{children:[Object(o.jsx)(Pi.a,{size:"small",dataSource:t,pagination:!1,columns:e.getColumnDefinitionsForContactInformation(i)},void 0),e.renderAddAdditionalContact(r)]}),void 0)}}),void 0),this.renderActions()]}),void 0)}),void 0)]}),void 0)},t.prototype.renderActions=function(){if(!this.props.readonly)return Object(o.jsxs)(y.b,Fh({direction:"horizontal",wrap:!0},{children:[Object(o.jsx)(rs,{onClick:this.props.onPrevious},void 0),Object(o.jsx)(ss,{submitting:this.state.submitting},void 0),Object(o.jsx)(Tr,{type:"default",htmlType:"button",onClick:this.handleSave,saving:this.state.submitting,saved:this.state.saved},void 0),Object(o.jsx)(Ir,{resetting:this.state.resetting,onConfirm:this.resetForm},void 0)]}),void 0)},t.prototype.renderAddAdditionalContact=function(e){if(!this.props.readonly)return Object(o.jsx)(rt.a,Fh({onClick:function(){return e()},icon:Object(o.jsx)(Xc.a,{},void 0)},{children:"Add Additional Contact"}),void 0)},t.prototype.renderErrors=function(){if(this.state.error)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:this.state.message},void 0)},t}(a.Component),Yh=Mh,Uh=function(e){return Object.assign({noticeOfIntentChangeRequest:null},e)},Lh=function(e){return Object.assign({changeRequestId:null,institutionId:"00000000-0000-0000-0000-000000000000",noticeOfIntentChangeRequest:null},e)},kh=function(e){return Object.assign({changeRequestId:"00000000-0000-0000-0000-000000000000"},e)},Gh=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Vh=function(){return Vh=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Vh.apply(this,arguments)},Bh=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n.consultantIdentifier="consultant",n.getConsultantMeetingFormItems=function(e){return(new Map).set(df.date,{label:"When was this consultant meeting?",name:[e,df.date],required:!0,rules:[Ot.required()]}).set(df.consultantIds,{label:"Consultants",name:[e,df.consultantIds],required:!0,rules:[Ot.required()]})},n.cleanDates=function(e){var t;return null===(t=null===e||void 0===e?void 0:e.consultantMeetings)||void 0===t||t.forEach((function(e){e.date=It()(e.date)})),e},n.fetchData=function(){n.setState({loading:!0});var e=[];0==n.state.consultants.length&&e.push(n.getConsultants()),n.props.changeRequestId&&n.props.changeRequestId!=re.default.Empty()&&e.push(n.loadChangeRequest()),Promise.all(e).then((function(){n.setState({loading:!1})}
1))},n.getConsultants=function(){var e=nf({institutionId:n.props.institutionId});return Bp.searchForConsultants(e).then((function(e){e.users&&n.setState({consultants:e.users})})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))},n.loadChangeRequest=function(){var e=kh({changeRequestId:n.props.changeRequestId});return lp.getStep4(e).then((function(e){var t,r,i,o;if(e){var a=null!==(r=null===(t=e.changeRequest)||void 0===t?void 0:t.noticeOfIntentChangeRequest)&&void 0!==r?r:lf.create();0==(null===(i=(a=n.cleanDates(a)).consultantMeetings)||void 0===i?void 0:i.length)&&(a.consultantMeetings=[df.create({consultants:[af.create({userId:re.default.Empty()})],date:null})]),n.setState({changeRequest:null!==(o=e.changeRequest)&&void 0!==o?o:$a.create(),noticeOfIntent:null!==a&&void 0!==a?a:lf.create(),fieldErrors:n.props.fieldErrors},(function(){return n.resetForm()}))}})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.resetForm=function(){var e;n.setState({altered:!1}),null===(e=n._formRef.current)||void 0===e||e.resetFields(),n.props.onChange&&n.props.onChange(!1)},n.handleSave=function(){var e;n.setState({saving:!0});var t=lf.create(n._formRef?n._formRef.current.getFieldsValue():null);t.changeRequestId=null!==(e=n.props.changeRequestId)&&void 0!==e?e:re.default.Empty();var r=Uh({noticeOfIntentChangeRequest:t});lp.saveStep4(r).then((function(e){(null===e||void 0===e?void 0:e.succeeded)?S.b.success("Saved"):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Save Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Save Failed")})).finally((function(){n.setState({loading:!1,saving:!1,altered:!1})}))},n.handleSubmit=function(){var e;n.setState({submitting:!0});var t=lf.create(n._formRef?n._formRef.current.getFieldsValue():null);t.changeRequestId=null!==(e=n.props.changeRequestId)&&void 0!==e?e:re.default.Empty();var r=Lh({noticeOfIntentChangeRequest:t});lp.submitStep4(r).then((function(e){n.setState({submitted:!0}),(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.props.onSubmit&&n.props.onSubmit()):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Save Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Save Failed")})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.handleChange=function(){n.setState({altered:!0}),n.props.onChange&&n.props.onChange(!0)},n.state={changeRequest:$a.create(),noticeOfIntent:lf.create(),consultants:[],userSearch:[]},n}return Gh(t,e),t.prototype.componentDidMount=function(){this.props.changeRequestId&&this.fetchData()},t.prototype.componentDidUpdate=function(e){this.props.changeRequestId&&this.props.changeRequestId!=e.changeRequestId&&this.fetchData(),this.props.loading!=e.loading&&this.setState({loading:this.props.loading})},t.prototype.render=function(){return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(y.b,Vh({size:"small",direction:"vertical"},{children:[this.renderErrors(),Object(o.jsx)(ht.a,Vh({ref:this._formRef,layout:"vertical",initialValues:this.state.noticeOfIntent,onValuesChange:this.handleChange,onFinish:this.handleSubmit},{children:Object(o.jsxs)(y.b,Vh({direction:"vertical"},{children:[Object(o.jsx)(ot.a.Paragraph,Vh({italic:!0},{children:"The IDOE requires at least one meeting with our consultants prior to submission. Please document this and any addtional meetings below."}),void 0),this.renderConsultantMeetings(),this.renderActions()]}),void 0)}),void 0)]}),void 0)},t.prototype.renderActions=function(){if(!this.props.readonly)return Object(o.jsxs)(y.b,Vh({direction:"horizontal",wrap:!0},{children:[Object(o.jsx)(rs,{onClick:this.props.onPrevious},void 0),Object(o.jsx)(ss,{submitting:this.state.submitting},void 0),Object(o.jsx)(Tr,{type:"default",htmlType:"button",onClick:this.handleSave,saving:this.state.submitting,saved:this.state.saved},void 0),Object(o.jsx)(Ir,{resetting:this.state.resetting,onConfirm:this.resetForm},void 0)]}),void 0)},t.prototype.renderConsultantMeetings=function(){var e=this;return Object(o.jsx)(ht.a.List,Vh({name:lf.consultantMeetings},{children:function(t,n){var r=n.add,i=n.remove;return Object(o.jsxs)(y.b,Vh({direction:"vertical"},{children:[t.map((function(t,n){if(t)return e.renderConsultantMeeting(t,n,i)})),e.renderAdditionalMeeting(r)]}),void 0)}}),void 0)},t.prototype.renderAdditionalMeeting=function(e){if(!this.props.readonly)return Object(o.jsx)(rt.a,
1Vh({onClick:function(){return e()},icon:Object(o.jsx)(Xc.a,{},void 0)},{children:"Add Additional Consultant Meeting"}),void 0)},t.prototype.renderConsultantMeeting=function(e,t,n){var r,i,a=this,s=(null===(i=null===(r=this._formRef.current)||void 0===r?void 0:r.getFieldValue(lf.consultantMeetings))||void 0===i?void 0:i.length)>1,d="Consultant Meeting "+(s?t+1:""),c=s&&!this.props.readonly?Object(o.jsx)(rt.a,{type:"link",size:"small",onClick:function(){return n(e.name)},icon:Object(o.jsx)(Yd.a,{},void 0)},void 0):null;return Object(o.jsx)(Qn.a,Vh({type:"inner",size:"small",title:d,extra:c},{children:Object(o.jsxs)(y.b,Vh({direction:"vertical"},{children:[Object(o.jsx)(mt.a,Vh({},this.getConsultantMeetingFormItems(t).get(df.date),_t.getValidation(df.date+t,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ur.a,{format:"M/D/YYYY",disabled:this.props.readonly,disabledDate:$r.isFutureDate},void 0)}),void 0),Object(o.jsx)(ot.a.Paragraph,{children:"Please list all IDOE consultants that you met with."},void 0),Object(o.jsx)(mt.a,Vh({},this.getConsultantMeetingFormItems(t).get(df.consultantIds),_t.getValidation(df.consultantIds+t,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(hd,Vh({disabled:this.props.readonly,mode:"multiple",showSearch:!0,optionFilterProp:"children"},{children:this.state.consultants.map((function(e){return a.renderConsultantOption(e)}))}),void 0)}),void 0)]}),void 0)}),void 0)},t.prototype.renderConsultantOption=function(e){var t,n;return Object(o.jsx)(pr.a.Option,Vh({value:null!==(t=e.id)&&void 0!==t?t:re.default.Empty()},{children:e.fullDisplay}),null!==(n=e.id)&&void 0!==n?n:re.default.Empty())},t.prototype.renderAddConsultant=function(e){if(!this.props.readonly)return Object(o.jsx)(rt.a,Vh({icon:Object(o.jsx)(Xc.a,{},void 0),onClick:function(){return e()}},{children:"Add Consultant"}),void 0)},t.prototype.renderErrors=function(){if(this.state.error)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:this.state.message},void 0)},t}(a.Component),Wh=Bh,zh=n(1521),Hh=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Qh=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Hh(t,e),t.prototype.getNoticeOfIntentChangeRequestWorkForceLinkTableData=function(e){var t="api/noticeOfIntentChangeRequestWorkForceLink/getNoticeOfIntentChangeRequestWorkForceLinkTableData";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.saveNoticeOfIntentChangeRequestWorkForceLink=function(e){var t="api/noticeOfIntentChangeRequestWorkForceLink/saveNoticeOfIntentChangeRequestWorkForceLink";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.removeNoticeOfIntentChangeRequestWorkForceLink=function(e){var t="api/noticeOfIntentChangeRequestWorkForceLink/removeNoticeOfIntentChangeRequestWorkForceLink";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getNoticeOfIntentChangeRequestWorkForceLinks=function(e){var t="api/noticeOfIntentChangeRequestWorkForceLink/getNoticeOfIntentChangeRequestWorkForceLinks";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t}(U),Kh=new Qh,Xh=Kh,Jh=function(e){return Object.assign({noticeOfIntentChangeRequest:null,industryFiles:[],removedFiles:[]},e)},$h=function(e){return Object.assign({noticeOfIntentChangeRequest:null,industryFiles:[],removedFiles:[]},e)},Zh=function(e){return Object.assign({changeRequestId:"00000000-0000-0000-0000-000000000000"},e)},ev=function(e){return Object.assign({},e)},tv=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),nv=function(){return nv=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},nv.apply(this,arguments)},rv=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n.getOccupationFormItems=function(e){var t,r,i,o,a=null===(r=null===(t=n._formRef.current)||void 0===t?void 0:t.getFieldValue(lf.occupations)[e])||void 0===r?void 0:r.nontraditionalByGender,s=null===(o=null===(i=n._formRef.current)||void 0===i?void 0:i.getFieldValue(lf.occupations)[e])||void 0===o?void 0:o.professionalCredentialRequirements;return(new Map).set(Sf.title,{required:!0,name:[e,Sf.title],label:"What is the name of the occupation?",rules:[Ot.required()]}).set(Sf.averageEntryLevelSalary,{required:!0,name:[e,Sf.averageEntryLevelSalary],label:"What is the average entry level salary for this occupation?",rules:[Ot.required()]}).set(Sf.minimumEducationRequirements,{required:!0,name:[e,Sf.minimumEducationRequirements],label:"Please provide the minimum educational requirements for this occupation.",rules:[Ot.required()]}).set(Sf.professionalCredentialRequirements,{required:!0,name:[e,Sf.professionalCredentialRequirements],label:"Are there any professional credential requirements for this occupation?",rules:[Ot.required()]}).set(Sf.professionalCredentialRequirementDetails,{required:s,name:[e,Sf.professionalCredentialRequirementDetails],label:"Please provide the professional credential requirements for this occupation.",rules:s?[Ot.required()]:[]}).set(Sf.nontraditionalByGender,{required:!0,name:[e,Sf.nontraditionalByGender],label:"Is this occupation nontraditional by gender? (Less than 25% of the workforce)",rules:[Ot.required()]}).set(Sf.genderId,{required:a,name:[e,Sf.genderId],label:"Which gender is this occupation nontraditional by?",rules:a?[Ot.required()]:[]})},n.getRegionalStatsFormItems=function(e){return(new Map).set(Rf.locationTypeId,{name:[e,Rf.locationTypeId]}).set(Rf.numberOfOpenings,{required:!0,name:[e,Rf.numberOfOpenings],rules:[Ot.required()]}).set(Rf.shortTermGrowthRate,{required:!0,name:[e,Rf.shortTermGrowthRate],rules:[Ot.required()]}).set(Rf.longTermGrowthRate,{required:!0,name:[e,Rf.longTermGrowthRate],rules:[Ot.required()]})},n.fetchData=function(){n.setState({loading:!0});var e=[];0==n.state.locationTypes.length&&e.push(n.loadLocationTypes()),0==n.state.genders.length&&e.push(n.loadGenders()),n.props.changeRequestId&&n.props.changeRequestId!=re.default.Empty()&&e.push(n.loadChangeRequest()),e.push(n.loadNOILinks()),Promise.all(e).then((function(){n.setState({loading:!1})}
1))},n.loadLocationTypes=function(){return n.setState({loading:!0}),ce.getAll(jf.className).then((function(e){n.setState({locationTypes:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadGenders=function(){return n.setState({loading:!0}),ce.getAll(Bu.className).then((function(e){n.setState({genders:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadNOILinks=function(){var e=ev({changeRequestId:n.props.changeRequestId});return Xh.getNoticeOfIntentChangeRequestWorkForceLinks(e).then((function(e){var t;e&&n.setState({noticeOfIntentChangeRequestWorkForceLink:null!==(t=e.noticeOfIntentChangeRequestWorkForceLinks)&&void 0!==t?t:[]},(function(){return n.resetForm()}))})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.loadChangeRequest=function(){var e=Zh({changeRequestId:n.props.changeRequestId});return lp.getStep5(e).then((function(e){var t,r,i,o;if(e){var a=null!==(r=null===(t=e.changeRequest)||void 0===t?void 0:t.noticeOfIntentChangeRequest)&&void 0!==r?r:lf.create();null==a&&(a=lf.create()),0==(null===(i=null===a||void 0===a?void 0:a.occupations)||void 0===i?void 0:i.length)&&(a.occupations=[Sf.create({regionalStats:[Rf.create({locationTypeId:mf.REGIONAL}),Rf.create({locationTypeId:mf.STATE}),Rf.create({locationTypeId:mf.NATIONAL})],nontraditionalByGender:null,professionalCredentialRequirements:null,genderId:null})]),n.setState({changeRequest:null!==(o=e.changeRequest)&&void 0!==o?o:$a.create(),noticeOfIntent:null!==a&&void 0!==a?a:lf.create(),fieldErrors:n.props.fieldErrors},(function(){return n.resetForm()}))}})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.resetForm=function(){var e;n.setState({altered:!1}),null===(e=n._formRef.current)||void 0===e||e.resetFields(),n.props.onChange&&n.props.onChange(!1)},n.handleSave=function(){var e=n._formRef?n._formRef.current.getFieldsValue():null;e.changeRequestId=n.props.changeRequestId;var t=Jh({noticeOfIntentChangeRequest:e});lp.saveStep5(t).then((function(e){(null===e||void 0===e?void 0:e.succeeded)?S.b.success("Saved"):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Save Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Save Failed")})).finally((function(){n.setState({loading:!1,saving:!1,altered:!1})}))},n.handleSubmit=function(){var e,t,r=null!==(t=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldsValue())&&void 0!==t?t:null;r.changeRequestId=n.props.changeRequestId;var i=$h({noticeOfIntentChangeRequest:r});lp.submitStep5(i).then((function(e){n.setState({submitted:!0}),(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.props.onSubmit&&n.props.onSubmit()):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Save Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Save Failed")})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.handleChange=function(){n.setState({altered:!0}),n.props.onChange&&n.props.onChange(!0)},n.getRegionalStatsColumnDefinitions=function(e){return[{title:"Location Type",dataIndex:Rf.locationTypeId,render:function(e,t,r){return Object(o.jsx)(ht.a.Item,nv({},n.getRegionalStatsFormItems(r).get(Rf.locationTypeId),{children:Object(o.jsx)(Cf,{options:n.state.locationTypes.map((function(e){return{value:e.id,label:e.name}}))},void 0)}),void 0)}},{title:"Number of Openings",dataIndex:Rf.numberOfOpenings,render:function(t,r,i){return Object(o.jsx)(ht.a.Item,nv({},n.getRegionalStatsFormItems(i).get(Rf.numberOfOpenings),_t.getValidation(Rf.numberOfOpenings+(r.name+1)+e,n.state.fieldErrors,n.state.submitted||n.props.readonly),{children:Object(o.jsx)(Ni.a,{title:"Number of Openings",disabled:n.props.readonly,min:0},void 0)}),void 0)}},{title:"Short Term Growth Rate",dataIndex:Rf.shortTermGrowthRate,render:function(t,r,i){return Object(o.jsx)(ht.a.Item,nv({},n.getRegionalStatsFormItems(i).get(Rf.shortTermGrowthRate),_t.getValidation(Rf.shortTermGrowthRate+(r.name+1)+e,n.state.fieldErrors,n.state.submitted||n.props.readonly),{children:Object(o.jsx)(Ni.a,{title:"Short Term Growth Rate",max:999999,addonAfter:Object(o.jsx)(zh.a,{},void 0),disabled:n.props.readonly},void 0)}),void 0)}},{title:"Long Term Growth Rate",dataIndex:Rf.longTermGrowthRate,render:function(t,r,i){return Object(o.jsx)(ht.a.Item,nv({},n.getRegionalStatsFormItems(r.name).get(Rf.longTermGrowthRate),_t.getValidation(Rf.longTermGrowthRate+(r.name+1)+e,n.state.fieldErrors,n.state.submitted||n.props.readonly),{children:Object(o.jsx)(Ni.a,{title:"Long Term Growth Rate",max:999999,addonAfter:Object(o.jsx)(zh.a,{},void 0),disabled:n.props.readonly},void 0)}),void 0)}}]},n.renderNOILinks=function(){return n.state.noticeOfIntentChangeRequestWorkForceLink.map((function(e){var t;return Object(o.jsx)("li",{children:Object(o.jsx)(at.a,nv({to:{pathname:null!==(t=e.url)&&void 0!==t?t:""},target:"_blank"},{children:e.title}),void 0)}
1,e.title)}))},n.state={changeRequest:$a.create(),locationTypes:[],genders:[],noticeOfIntentChangeRequestWorkForceLink:[],noticeOfIntent:lf.create({externalAccreditationRequirements:null,occupations:[Sf.create()]})},n}return tv(t,e),t.prototype.componentDidMount=function(){this.props.changeRequestId&&this.fetchData()},t.prototype.componentDidUpdate=function(e){this.props.changeRequestId&&this.props.changeRequestId!=e.changeRequestId&&this.fetchData(),this.props.loading!=e.loading&&this.setState({loading:this.props.loading})},t.prototype.render=function(){var e=this;return this.props.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(y.b,nv({size:"small",direction:"vertical"},{children:[this.renderErrors(),Object(o.jsx)(ht.a,nv({ref:this._formRef,layout:"vertical",initialValues:this.state.noticeOfIntent,onValuesChange:this.handleChange,onFinish:this.handleSubmit},{children:Object(o.jsxs)(y.b,nv({direction:"vertical"},{children:[Object(o.jsx)(ot.a.Paragraph,nv({italic:!0},{children:"Please fill in the labor market information below for occupations related to the new program. Ensure that you have added all occupations for which you have information."}),void 0),Object(o.jsx)(ct.a,{type:"info",message:"The following links contain information to aid you in determining the labor market information for this program.",description:Object(o.jsx)("ul",{children:this.renderNOILinks()},void 0)},void 0),Object(o.jsx)(ht.a.List,nv({name:lf.occupations},{children:function(t,n){var r=n.add,i=n.remove;return Object(o.jsxs)(y.b,nv({direction:"vertical"},{children:[t.map((function(t,n){return e.renderOccupation(t,i,n)})),e.renderAddOccupation(r)]}),void 0)}}),void 0),this.renderActions()]}),void 0)}),void 0)]}),void 0)},t.prototype.renderAddOccupation=function(e){if(!this.props.readonly)return Object(o.jsx)(rt.a,nv({onClick:function(){return e(Sf.create({regionalStats:[Rf.create({locationTypeId:mf.REGIONAL}),Rf.create({locationTypeId:mf.STATE}),Rf.create({locationTypeId:mf.NATIONAL})],nontraditionalByGender:null,professionalCredentialRequirements:null,genderId:null}))},icon:Object(o.jsx)(Xc.a,{},void 0)},{children:"Add Additional Occupation"}),void 0)},t.prototype.renderActions=function(){if(!this.props.readonly)return Object(o.jsxs)(y.b,nv({direction:"horizontal",wrap:!0},{children:[Object(o.jsx)(rs,{onClick:this.props.onPrevious},void 0),Object(o.jsx)(ss,{submitting:this.state.submitting},void 0),Object(o.jsx)(Tr,{type:"default",htmlType:"button",onClick:this.handleSave,saving:this.state.submitting,saved:this.state.saved},void 0),Object(o.jsx)(Ir,{resetting:this.state.resetting,onConfirm:this.resetForm},void 0)]}),void 0)},t.prototype.renderOccupation=function(e,t,n){var r,i,a,s=this,d=null!==(a=(null===(i=null===(r=this._formRef.current)||void 0===r?void 0:r.getFieldValue(lf.occupations))||void 0===i?void 0:i.length)>1)&&void 0!==a&&a,c="Occupation "+(d?n+1:""),l=Object(o.jsx)(rt.a,{type:"link",size:"small",onClick:function(){return t(e.name)},icon:Object(o.jsx)(Yd.a,{},void 0)},void 0),u=this.getOccupationFormItems(n);return Object(o.jsx)(Qn.a,nv({type:"inner",size:"small",title:c,extra:d&&!this.props.readonly?l:null},{children:Object(o.jsxs)(y.b,nv({direction:"vertical"},{children:[Object(o.jsx)(ht.a.Item,nv({},u.get(Sf.title),_t.getValidation(Sf.title+n,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ut.a,{disabled:this.props.readonly},void 0)}),void 0),Object(o.jsx)(ht.a.Item,nv({},u.get(Sf.averageEntryLevelSalary),_t.getValidation(Sf.averageEntryLevelSalary+n,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(Ni.a,{disabled:this.props.readonly,min:0,addonBefore:"$"},void 0)}),void 0),Object(o.jsx)(ot.a.Text,nv({italic:!0},{children:"Please provide the following statistics about this occupation for each of the levels outlined below."}),void 0),Object(o.jsx)(ht.a.List,nv({name:[n,Sf.regionalStats]},{children:function(e){return Object(o.jsx)(y.b,nv({direction:"vertical"},{children:Object(o.jsx)(Pi.a,{pagination:!1,dataSource:e,columns:s.getRegionalStatsColumnDefinitions(n)},void 0)}),void 0)}}),void 0),Object(o.jsx)(ht.a.Item,nv({label:"Is this occupation nontraditional by gender? (Less than 25% of the workforce)"},u.get(Sf.nontraditionalByGender),_t.getValidation(Sf.nontraditionalByGender+n,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(H
1d,{disabled:this.props.readonly},void 0)}),void 0),this.renderGender(n,u),Object(o.jsx)(ht.a.Item,nv({},u.get(Sf.minimumEducationRequirements),_t.getValidation(Sf.minimumEducationRequirements+n,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ut.a.TextArea,{disabled:this.props.readonly,maxLength:5e3,showCount:!0,autoSize:{minRows:5}},void 0)}),void 0),Object(o.jsx)(ht.a.Item,nv({},u.get(Sf.professionalCredentialRequirements),_t.getValidation(Sf.professionalCredentialRequirements+n,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(Hd,{disabled:this.props.readonly},void 0)}),void 0),this.renderProfessionalCredentialRequirementDetails(n,u)]}),void 0)}),void 0)},t.prototype.renderGender=function(e,t){var n,r;if(null===(r=null===(n=this._formRef.current)||void 0===n?void 0:n.getFieldValue(lf.occupations)[e])||void 0===r?void 0:r.nontraditionalByGender)return Object(o.jsx)(ht.a.Item,nv({},t.get(Sf.genderId),_t.getValidation(Sf.genderId+e,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(hd,nv({disabled:this.props.readonly,dropdownMatchSelectWidth:!1},{children:this.state.genders.map((function(e){return Object(o.jsx)(pr.a.Option,nv({value:e.id},{children:e.name}),e.id)}))}),void 0)}),void 0)},t.prototype.renderProfessionalCredentialRequirementDetails=function(e,t){var n,r;if(null===(r=null===(n=this._formRef.current)||void 0===n?void 0:n.getFieldValue(lf.occupations)[e])||void 0===r?void 0:r.professionalCredentialRequirements)return Object(o.jsx)(ht.a.Item,nv({},t.get(Sf.professionalCredentialRequirementDetails),_t.getValidation(Sf.professionalCredentialRequirementDetails+e,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ut.a.TextArea,{disabled:this.props.readonly,maxLength:5e3,showCount:!0,autoSize:{minRows:5}},void 0)}),void 0)},t.prototype.renderErrors=function(){if(this.state.error)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:this.state.message},void 0)},t}(a.Component),iv=rv,ov=function(e){return Object.assign({noticeOfIntentChangeRequest:null,industryFiles:[],removedFiles:[]},e)},av="industryFiles",sv=function(e){return Object.assign({changeRequestId:"00000000-0000-0000-0000-000000000000"},e)},dv=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),cv=function(){return cv=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},cv.apply(this,arguments)},lv=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n.getFormItems=function(){var e,t=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldValue(lf.externalAccreditationRequirements);return(new Map).set(lf.additionalLaborMarketInformation,{name:lf.additionalLaborMarketInformation,label:"Please provide any additional labor and market information."}).set(lf.externalAccreditationRequirements,{required:!0,name:lf.externalAccreditationRequirements,label:"Are there any external accreditation requirements for this program?",rules:[Ot.required()]}).set(lf.externalAccreditationRequirementDetails,{required:t,name:lf.externalAccreditationRequirementDetails,label:"Please provide any information about the external accreditation requirements.",rules:t?[Ot.required()]:[]}).set(av,{name:av,label:"Please provide any supporting labor market documents or information regarding industry standards and benchmarks."})},n.loadChangeRequest=function(){var e=sv({changeRequestId:n.props.changeRequestId});return lp.getStep6(e).then((function(e){var t,r,i;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create(),noticeOfIntent:null!==(i=null===(r=e.changeRequest)||void 0===r?void 0:r.noticeOfIntentChangeRequest)&&void 0!==i?i:lf.create(),fieldErrors:n.props.fieldErrors},(function(){return n.resetForm()}))})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.resetForm=function(){var e;n.setState({altered:!1}),null===(e=n._formRef.current)||void 0===e||e.resetFields(),n.props.onChange&&n.props.onChange(!1)},n.handleSave=function(){var e,t,r,i,o,a=null!==(t=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldsValue())&&void 0!==t?t:null;a.changeRequestId=n.props.changeRequestId;var s=ov({noticeOfIntentChangeRequest:a,removedFiles:null!==(i=null===(r=a.industryFiles)||void 0===r?void 0:r.removedFiles)&&void 0!==i?i:[]}),d=Za.attachFilesToModel("saveNoticeOfIntentChangeRequestStep6",s,av,null===(o=a.industryFiles)||void 0===o?void 0:o.newFiles);lp.saveStep6(d).then((function(e){(null===e||void 0===e?void 0:e.succeeded)?S.b.success("Saved"):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Save Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Save Failed")})).finally((function(){n.setState({loading:!1,saving:!1,altered:!1})}))},n.handleSubmit=function(){var e,t,r,i,o,a=null!==(t=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldsValue())&&void 0!==t?t:null;a.changeRequestId=n.props.changeRequestId;var s=ov({noticeOfIntentChangeRequest:a,removedFiles:null!==(i=null===(r=a.industryFiles)||void 0===r?void 0:r.removedFiles)&&void 0!==i?i:[]}),d=Za.attachFilesToModel("submitNoticeOfIntentChangeRequestStep6",s,av,null===(o=a.industryFiles)||void 0===o?void 0:o.newFiles);lp.submitStep6(d).then((function(e){n.setState({submitted:!0}),(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.props.onSubmit&&n.props.onSubmit()):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Save Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Save Failed")})).finally((function(){n.setState({loading:!1,submitting:!1})}
1))},n.handleChange=function(){n.setState({altered:!0}),n.props.onChange&&n.props.onChange(!0)},n.state={changeRequest:$a.create(),locationTypes:[],genders:[],noticeOfIntent:lf.create({externalAccreditationRequirements:null})},n}return dv(t,e),t.prototype.componentDidMount=function(){this.props.changeRequestId&&this.props.changeRequestId!=re.default.Empty()&&this.loadChangeRequest()},t.prototype.componentDidUpdate=function(e){this.props.changeRequestId&&this.props.changeRequestId!=re.default.Empty()&&this.props.changeRequestId!=e.changeRequestId&&this.loadChangeRequest(),this.props.loading!=e.loading&&this.setState({loading:this.props.loading})},t.prototype.render=function(){var e,t,n;if(this.props.loading)return Object(o.jsx)(pt.a,{active:!0},void 0);var r=null===(n=null===(t=null===(e=this.state.changeRequest)||void 0===e?void 0:e.noticeOfIntentChangeRequest)||void 0===t?void 0:t.industryResources)||void 0===n?void 0:n.map((function(e){var t,n;return{uid:e.azureBlobFileId,url:x.generateDownload(null!==(t=e.azureBlobFileId)&&void 0!==t?t:re.default.Empty()),name:null===(n=e.azureBlobFile)||void 0===n?void 0:n.fileName}})),i=this.getFormItems();return Object(o.jsxs)(y.b,cv({size:"small",direction:"vertical"},{children:[this.renderErrors(),Object(o.jsx)(ht.a,cv({ref:this._formRef,layout:"vertical",initialValues:this.state.noticeOfIntent,onValuesChange:this.handleChange,onFinish:this.handleSubmit},{children:Object(o.jsxs)(y.b,cv({direction:"vertical"},{children:[Object(o.jsx)(ht.a.Item,cv({},i.get(lf.additionalLaborMarketInformation),_t.getValidation(lf.additionalLaborMarketInformation,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ut.a.TextArea,{disabled:this.props.readonly,maxLength:5e3,showCount:!0,autoSize:{minRows:5}},void 0)}),void 0),Object(o.jsx)(ht.a.Item,cv({},i.get(lf.externalAccreditationRequirements),_t.getValidation(lf.externalAccreditationRequirements,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(Hd,{disabled:this.props.readonly},void 0)}),void 0),this.renderExternalAccreditationRequirementDetails(i),Object(o.jsx)(ht.a.Item,cv({},i.get(av),_t.getValidation(av,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(hs,{disabled:this.props.readonly,existingList:r},void 0)}),void 0),this.renderActions()]}),void 0)}),void 0)]}),void 0)},t.prototype.renderActions=function(){if(!this.props.readonly)return Object(o.jsxs)(y.b,cv({direction:"horizontal",wrap:!0},{children:[Object(o.jsx)(rs,{onClick:this.props.onPrevious},void 0),Object(o.jsx)(ss,{submitting:this.state.submitting},void 0),Object(o.jsx)(Tr,{type:"default",htmlType:"button",onClick:this.handleSave,saving:this.state.submitting,saved:this.state.saved},void 0),Object(o.jsx)(Ir,{resetting:this.state.resetting,onConfirm:this.resetForm},void 0)]}),void 0)},t.prototype.renderExternalAccreditationRequirementDetails=function(e){var t;if(null===(t=this._formRef.current)||void 0===t?void 0:t.getFieldValue(lf.externalAccreditationRequirements))return Object(o.jsx)(ht.a.Item,cv({},e.get(lf.externalAccreditationRequirementDetails),_t.getValidation(lf.externalAccreditationRequirementDetails,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ut.a.TextArea,{disabled:this.props.readonly,maxLength:5e3,showCount:!0,autoSize:{minRows:5}},void 0)}),void 0)},t.prototype.renderProfessionalCredentialRequirementDetails=function(e,t,n){var r;if(null===(r=this._formRef.current)||void 0===r?void 0:r.getFieldValue([e,Sf.professionalCredentialRequirements]))return Object(o.jsx)(ht.a.Item,cv({},n.get(Sf.professionalCredentialRequirementDetails),_t.getValidation(Sf.professionalCredentialRequirementDetails+t,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ut.a.TextArea,{disabled:this.props.readonly,maxLength:5e3,showCount:!0,autoSize:{minRows:5}},void 0)}),void 0)},t.prototype.renderErrors=function(){if(this.state.error)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:this.state.message},void 0)},t}(a.Component),uv=lv,pv=function(e){return Object.assign({noticeOfIntentChangeRequest:null,additionalFiles:[]},e)},fv="additionalFiles",hv=function(e){return Object.assign({changeRequestId:"00000000-0000-0000-0000-000000000000"},e)},vv={className:"NoticeOfIntentChangeRequestInstitutionLinkageDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",externalInstitutionId:0,externalInstitution:null,noticeOfIntentChangeRequestId:"00000000-0000-0000-0000-000000000000",noticeOfIntentChangeRequest:null,description:"",azureBlobFileId:null,azureBlobFile:null},e)},id:"id",externalInstitutionId:"externalInstitutionId",externalInstitution:"externalInstitution",noticeOfIntentChangeRequestId:"noticeOfIntentChangeRequestId",noticeOfIntentChangeRequest:"noticeOfIntentChangeRequest",description:"description",azureBlobFileId:"azureBlobFileId",azureBlobFile:"azureBlobFile"},mv=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),gv=function(){return gv=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},gv.apply(this,arguments)},bv=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n.getFormItems=function(){var e,t=(null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldValue(lf.noticeOfIntentCompleterData).length)>0;return(new Map).set(lf.secondaryPathways,{name:lf.secondaryPathways,label:"Please describe any linkages this program will have with any secondary pathways."}).set(lf.postSecondaryPathways,{name:lf.postSecondaryPathways,label:"Please describe any linkages this program will have with any post-secondary pathways."}).set(lf.uniqueProgramFeatures,{required:t,name:lf.uniqueProgramFeatures,label:"Please describe any unique features this program will offer.",rules:t?[Ot.required()]:[]}).set(lf.sharedProgramEntities,{name:lf.sharedProgramEntities,label:"Please provide any shared content this program will have with any other colleges."}).set(lf.collaborationEfforts,{name:lf.collaborationEfforts,label:"Describe efforts to collaborate with other postsecondary institutions with similar programs. Provide any correspondence with affected
1institutions regarding the proposed program and other evidence of collaboration."}).set(lf.statePriority,{name:lf.statePriority,label:"If applicable, describe any special need for this program in the state of Iowa."}).set(lf.programDuplicationAdditionalComments,{name:lf.programDuplicationAdditionalComments,label:"Provide any additional comments regarding possible program duplication (e.g., why the program is unique and justified even though a similar program is offered, why harmful competition does not exist, etc)."}).set(lf.institutionSimilarOfferings,{name:lf.institutionSimilarOfferings,label:"List public and private institutions in the state which have similar offerings."}).set(lf.institutionProgramsAtNewLocation,{name:lf.institutionProgramsAtNewLocation,label:"List same or similar programs in new location."})},n.getCompleterDataFormItems=function(e){return(new Map).set(Xf.institutionId,{name:[e,Xf.institutionId]}).set(Xf.awardTypeId,{name:[e,Xf.awardTypeId]}).set(Xf.completersPerYear,{name:[e,Xf.completersPerYear]}).set(Xf.dataYear,{name:[e,Xf.dataYear]})},n.getLinkagesDataFormItems=function(e){return(new Map).set(vv.externalInstitutionId,{label:"Please select the corresponding external institution.",name:[e,vv.externalInstitutionId],required:!0,rules:[Ot.required()]}).set(vv.description,{label:"Please provide a description of the agreement.",name:[e,vv.description],required:!0,rules:[Ot.required()]}).set(vv.azureBlobFile,{label:"Please provide the agreement file between the institutions.",name:[e,vv.azureBlobFile],required:!0,rules:[Ot.required()]})},n.fetchData=function(){n.setState({loading:!0});var e=[];0==n.state.awardTypes.length&&e.push(n.loadAwardTypes()),0==n.state.institutions.length&&e.push(n.loadInstitutions()),0==n.state.externalInstitutions.length&&e.push(n.loadExternalInstitutions()),n.state.programs||n.state.noticeOfIntent||e.push(n.SearchForPrograms()),n.props.changeRequestId&&n.props.changeRequestId!=re.default.Empty()&&e.push(n.loadChangeRequest()),Promise.all(e).then((function(){n.setState({loading:!1})}))},n.loadChangeRequest=function(){var e=hv({changeRequestId:n.props.changeRequestId});return lp.getStep7(e).then((function(e){var t,r,i;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create(),noticeOfIntent:null!==(i=null===(r=e.changeRequest)||void 0===r?void 0:r.noticeOfIntentChangeRequest)&&void 0!==i?i:lf.create(),fieldErrors:n.props.fieldErrors},(function(){return n.resetForm()}))})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.SearchForPrograms=function(){var e,t,r,i,o,a,s=Wf({cipNumberId:null!==(r=null===(t=null===(e=n.state)||void 0===e?void 0:e.noticeOfIntent)||void 0===t?void 0:t.cipNumberId)&&void 0!==r?r:re.default.Empty(),awardTypeIds:null===(a=null===(o=null===(i=n.state)||void 0===i?void 0:i.noticeOfIntent)||void 0===o?void 0:o.plannedAwardTypes)||void 0===a?void 0:a.map((function(e){return e.awardTypeId}))});ba.searchForPrograms(s).then((function(e){var t;e.program&&n.setState({programs:null!==(t=e.program)&&void 0!==t?t:[]})})).catch((function(){n.setState({error:!0})}))},n.loadAwardTypes=function(){return ce.getAll(si.className).then((function(e){e&&n.setState({awardTypes:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadInstitutions=function(){return ce.getAll(ne.className).then((function(e){e&&n.setState({institutions:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadExternalInstitutions=function(){return ce.getAll(mp.className).then((function(e){e&&n.setState({externalInstitutions:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.resetForm=function(){var e;n.setState({altered:!1}),null===(e=n._formRef.current)||void 0===e||e.resetFields(),n.props.onChange&&n.props.onChange(!1)},n.handleSave=function(){var e,t,r,i=null!==(t=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldsValue())&&void 0!==t?t:null;i.changeRequestId=n.props.changeRequestId;var o=pv({noticeOfIntentChangeRequest:i}),a=[];if(i.externalInstitutionLinkages)for(var s=0;s<i.externalInstitutionLinkages.length;s++){var d=i.externalInstitutionLinkages[s];if(void 0!=d.azureBlobFile){var c=null===(r=d.azureBlobFile)||void 0===r?void 0:r.newFiles;void 0!=c&&a.push(c[0])}}var l=Za.attachFilesToModel("saveNoticeOfIntentChangeRequestStep7",o,fv,a);lp.saveStep7(l).then((function(e){(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.props.onSave&&n.props.onSave()):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Save Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Save Failed")})).finally((function(){n.setState({loading:!1,saving:!1,altered:!1})}))},n.handleSubmit=function(){var e,t,r,i=null!==(t=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldsValue())&&void 0!==t?t:null;i.changeRequestId=n.props.changeRequestId;var o=pv({noticeOfIntentChangeRequest:i}),a=[];if(i.externalInstitutionLinkages)for(var s=0;s<i.externalInstitutionLinkages.length;s++){var d=i.externalInstitutionLinkages[s];if(void 0!=d.azureBlobFile){var c=null===(r=d.azureBlobFile)||void 0===r?void 0:r.newFiles;void 0!=c&&a.push(c[0])}}var l=Za.attachFilesToModel("submitNoticeOfIntentChangeRequestStep7",o,fv,a);lp.submitStep7(l).then((function(e){n.setState({submitted:!0}),(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.props.onSave&&n.props.onSave(),n.props.onSubmit&&n.props.onSubmit()):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Save Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Save Failed")})).finally((function(){n.setState({loading:!1,submitting:!1})}
1))},n.handleChange=function(){n.setState({altered:!0}),n.props.onChange&&n.props.onChange(!0)},n.getColumnDefinitionsForOtherPrograms=function(e){var t=[{title:"Community College",dataIndex:Xf.institutionId,render:function(e,t,r){var i,a,s=(null!==(i=n.state.programs)&&void 0!==i?i:[]).find((function(e){if(e.programDetails&&e.programDetails.length>0&&e.programDetails[0].awards)return e.institutionId==t.institutionId&&e.programDetails[0].awards.findIndex((function(e){return e.awardTypeId==t.awardTypeId}))>=0}));return s?Object(o.jsx)(mt.a,gv({},n.getCompleterDataFormItems(r).get(Xf.institutionId),_t.getValidation(Xf.institutionId+t.name,n.state.fieldErrors,n.state.submitted||n.props.readonly),{children:Object(o.jsx)(ud,{text:null===(a=n.state.institutions.find((function(e){return e.id==s.institutionId})))||void 0===a?void 0:a.name},void 0)}),void 0):Object(o.jsx)("label",gv({title:"Community College",htmlFor:"Community College"},{children:Object(o.jsx)(mt.a,gv({},n.getCompleterDataFormItems(r).get(Xf.institutionId),_t.getValidation(Xf.institutionId+t.name,n.state.fieldErrors,n.state.submitted||n.props.readonly),{children:Object(o.jsx)(hd,gv({disabled:n.props.readonly,showSearch:!0,optionFilterProp:"children",filterOption:function(e,t){return(null===t||void 0===t?void 0:t.children.toLowerCase().indexOf(e.toLowerCase()))>=0}},{children:n.state.institutions.map((function(e){return n.renderInstitution(e)}))}),void 0)}),void 0)}),void 0)}},{title:"Award Type",dataIndex:Xf.awardTypeId,render:function(e,t,r){var i,a,s,d=(null!==(i=n.state.programs)&&void 0!==i?i:[]).find((function(e){if(e.programDetails&&e.programDetails.length>0&&e.programDetails[0].awards)return e.institutionId==t.institutionId&&e.programDetails[0].awards.findIndex((function(e){return e.awardTypeId==t.awardTypeId}))>=0}));if(d){var c=nl.create();return d.programDetails&&d.programDetails.length>0&&d.programDetails[0].awards&&(c=null!==(a=d.programDetails[0].awards.find((function(e){return e.awardTypeId==t.awardTypeId})))&&void 0!==a?a:nl.create()),c?Object(o.jsx)("label",gv({title:"Award Type",htmlFor:"Award Type"},{children:Object(o.jsx)(mt.a,gv({},n.getCompleterDataFormItems(r).get(Xf.awardTypeId),_t.getValidation(Xf.awardTypeId+t.name,n.state.fieldErrors,n.state.submitted||n.props.readonly),{children:Object(o.jsx)(ud,{text:null===(s=n.state.awardTypes.find((function(e){return e.id==c.awardTypeId})))||void 0===s?void 0:s.name},void 0)}),void 0)}),void 0):Object(o.jsx)("label",gv({title:"Award Type",htmlFor:"Award Type"},{children:Object(o.jsx)(mt.a,gv({},n.getCompleterDataFormItems(r).get(Xf.awardTypeId),_t.getValidation(Xf.awardTypeId+t.name,n.state.fieldErrors,n.state.submitted||n.props.readonly),{children:Object(o.jsx)(hd,gv({disabled:n.props.readonly,showSearch:!0,optionFilterProp:"children",filterOption:function(e,t){return(null===t||void 0===t?void 0:t.children.toLowerCase().indexOf(e.toLowerCase()))>=0}},{children:n.state.awardTypes.map((function(e){return n.renderAwardType(e)}))}),void 0)}),void 0)}),void 0)}return Object(o.jsx)("label",gv({title:"Award Type",htmlFor:"Award Type"},{children:Object(o.jsx)(mt.a,gv({},n.getCompleterDataFormItems(r).get(Xf.awardTypeId),_t.getValidation(Xf.awardTypeId+t.name,n.state.fieldErrors,n.state.submitted||n.props.readonly),{children:Object(o.jsx)(hd,gv({disabled:n.props.readonly,showSearch:!0,optionFilterProp:"children",filterOption:function(e,t){return(null===t||void 0===t?void 0:t.children.toLowerCase().indexOf(e.toLowerCase()))>=0}},{children:n.state.awardTypes.map((function(e){return n.renderAwardType(e)}))}),void 0)}),void 0)}),void 0)}},{title:"State Program Completers",dataIndex:Xf.completersPerYear,render:function(e,t,r){return Object(o.jsx)(mt.a,gv({},n.getCompleterDataFormItems(r).get(Xf.completersPerYear),_t.getValidation(Xf.completersPerYear+t.name,n.state.fieldErrors,n.state.submitted||n.props.readonly),{children:Object(o.jsx)(Ni.a,{title:"State Program Completers",disabled:n.props.readonly},void 0)}),void 0)}},{title:"Data Year",dataIndex:Xf.dataYear,render:function(e,t,r){return Object(o.jsx)(mt.a,gv({},n.getCompleterDataFormItems(r).get(Xf.dataYear),_t.getValidation(Xf.dataYear+t.name,n.state.fieldErrors,n.state.submitted||n.props.readonly),{children:Object(o.jsx)(Ni.a,{title:"Data Year",disabled:n.props.readonly},void 0)}),void 0)}},{title:"Actions",dataIndex:Xf.className,render:function(t,r){var i,a=(null!==(i=n.state.programs)&&void 0!==i?i:[]).find((function(e){if(e.programDetails&&e.programDetails.length>0&&e.programDetails[0].awards)return e.institutionId==r.institutionId&&e.programDetails[0].awards.findIndex((function(e){return e.awardTypeId==r.awardTypeId}))>=0}));if(!n.props.readonly&&!a)return Object(o.jsx)(rt.a,{type:"link",icon:Object(o.jsx)(Yd.a,{},void 0),onClick:function(){return e(r.name)}},void 0)}}];return t},n.state={awardTypes:[],changeRequest:$a.create(),noticeOfIntent:lf.create(),institutions:[],externalInstitutions:[],programs:[]},n}return mv(t,e),t.prototype.componentDidMount=function(){this.props.changeRequestId&&this.fetchData()},t.prototype.componentDidUpdate=function(e){this.props.changeRequestId&&this.props.changeRequestId!=e.changeRequestId&&this.fetchData(),this.props.loading!=e.loading&&this.setState({loading:this.props.loading})},t.prototype.render=function(){if(this.state.loading)return Object(o.jsx)(pt.a,{active:!0},void 0);var e=this.getFormItems();return Object(o.jsxs)(y.b,gv({size:"small",direction:"vertical"},{children:[this.renderErrors(),Object(o.jsxs)(ht.a,gv({ref:this._formRef,layout:"vertical",initialValues:this.state.noticeOfIntent,onValuesChange:this.handleChange,onFinish:this.handleSubmit},{children:[Object(o.jsx)(mt.a,gv({},e.get(lf.secondaryPathways),_t.getValidation(lf.secondaryPathways,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ut.a.TextArea,{disabled:this.props.readonly,maxLength:5e3,showCount:!0,autoSize:{minRows:5}},void 0)}),void 0),Object(o.jsx)(mt.a,gv({},e.get(lf.postSecondaryPathways),_t.getValidation(lf.postSecondaryPathways,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ut.a.TextArea,{disabled:this.props.readonly,maxLength:5e3,showCount:!0,autoSize:{minRows:5}},void 0)}),void 0),Object(o.jsx)(mt.a,gv({},e.get(lf.sharedProgramEntities),_t.getValidation(lf.sharedProgramEntities,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ut.a.TextArea,{disabled:this.props.readonly,maxLength:5e3,showCount:!0,autoSize:{minRows:5}},void 0)}),void 0),Object(o.jsxs)(y.b,gv({direction:"vertical"},{children:[Object(o.jsxs)(ot.a.Text,{children:["Please provide completer information on any other programs offered at other colleges in the state. Refer to the ",Object(o.jsx)("b",{children:"Programs and Awards by CIP"},void 0)," file on the ",Object(o.jsx)(at.a,gv({target:"_blank",to:x.generate(x.RESOURCES)},{children:"resource page"}),void 0),"."]},void 0),this.renderCompletersData(),Object(o.jsx)(mt.a,gv({},e.get(lf.uniqueProgramFeatures),_t.getValidation(lf.uniqueProgramFeatures,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ut.a.TextArea,{disabled:this.props.readonly,maxLength:5e3,showCount:!0,autoSize:{minRows:5}},void 0)}),void 0),Object(o.jsx)(mt.a,gv({},e.get(lf.collaborationEfforts),_t.getValidation(lf.collaborationEfforts,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ut.a.TextArea,{disabled:this.props.readonly,maxLength:5e3,showCount:!0,autoSize:{minRows:5}},void 0)}),void 0),Object(o.jsx)(mt.a,gv({},e.get(lf.statePriority),_t.getValidation(lf.statePriority,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ut.a.TextArea,{disabled:this.props.readonly,maxLength:5e3,showCount:!0,autoSize:{minRows:5}},void 0)}),void 0),Object(o.jsx)(mt.a,gv({},e.get(lf.programDuplicationAdditionalComments),_t.getValidation(lf.programDuplicationAdditionalComments,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ut.a.TextArea,{disabled:this.props.readonly,maxLength:5e3,showCount:!0,autoSize:{minRows:5}},void 0)}),void 0),this.renderInstitutionLinkages(),Object(o.jsx)(mt.a,gv({}
1,e.get(lf.institutionSimilarOfferings),_t.getValidation(lf.institutionSimilarOfferings,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ut.a.TextArea,{disabled:this.props.readonly,maxLength:5e3,showCount:!0,autoSize:{minRows:5}},void 0)}),void 0),Object(o.jsx)(mt.a,gv({},e.get(lf.institutionProgramsAtNewLocation),_t.getValidation(lf.institutionProgramsAtNewLocation,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ut.a.TextArea,{disabled:this.props.readonly,maxLength:5e3,showCount:!0,autoSize:{minRows:5}},void 0)}),void 0),Object(o.jsx)("br",{},void 0),this.renderActions()]}),void 0)]}),void 0)]}),void 0)},t.prototype.renderActions=function(){if(!this.props.readonly)return Object(o.jsxs)(y.b,gv({direction:"horizontal",wrap:!0},{children:[Object(o.jsx)(rs,{onClick:this.props.onPrevious},void 0),Object(o.jsx)(ss,{submitting:this.state.submitting},void 0),Object(o.jsx)(Tr,{type:"default",htmlType:"button",onClick:this.handleSave,saving:this.state.submitting,saved:this.state.saved},void 0),Object(o.jsx)(Ir,{resetting:this.state.resetting,onConfirm:this.resetForm},void 0)]}),void 0)},t.prototype.renderCompletersData=function(){var e=this;return Object(o.jsx)(ht.a.List,gv({name:lf.noticeOfIntentCompleterData},{children:function(t,n){var r=n.add,i=n.remove;return Object(o.jsxs)(y.b,gv({direction:"vertical"},{children:[Object(o.jsx)(Pi.a,{pagination:!1,dataSource:t,columns:e.getColumnDefinitionsForOtherPrograms(i)},void 0),e.renderAddCompleterData(r)]}),void 0)}}),void 0)},t.prototype.renderAddCompleterData=function(e){if(!this.props.readonly)return Object(o.jsx)(rt.a,gv({onClick:function(){return e()},icon:Object(o.jsx)(Xc.a,{},void 0)},{children:"Add Completer Data"}),void 0)},t.prototype.renderInstitutionLinkages=function(){var e=this;return Object(o.jsxs)(y.b,gv({direction:"vertical"},{children:[Object(o.jsx)(ot.a.Paragraph,{children:"If there are any linkages to external institutions, please add them here."},void 0),Object(o.jsx)(ht.a.List,gv({name:lf.externalInstitutionLinkages},{children:function(t,n){var r=n.add,i=n.remove;return Object(o.jsxs)(y.b,gv({direction:"vertical"},{children:[t.map((function(t,n){if(t)return e.renderInstitutionLinkage(t,n,i)})),e.renderAdditionalLinkage(r)]}),void 0)}}),void 0)]}),void 0)},t.prototype.renderAdditionalLinkage=function(e){if(!this.props.readonly)return Object(o.jsx)(rt.a,gv({onClick:function(){return e()},icon:Object(o.jsx)(Xc.a,{},void 0)},{children:"Add External Institution Linkage"}),void 0)},t.prototype.renderInstitutionLinkage=function(e,t,n){var r,i,a,s,d,c,l=this,u="External Institution Linkage "+((null===(i=null===(r=this._formRef.current)||void 0===r?void 0:r.getFieldValue(lf.externalInstitutionLinkages))||void 0===i?void 0:i.length)>1?t+1:""),p=this.props.readonly?null:Object(o.jsx)(rt.a,{type:"link",size:"small",onClick:function(){return n(e.name)},icon:Object(o.jsx)(Yd.a,{},void 0)},void 0),f=[];if(null===(a=this.state.noticeOfIntent)||void 0===a?void 0:a.externalInstitutionLinkages){var h=null===(s=this.state.noticeOfIntent)||void 0===s?void 0:s.externalInstitutionLinkages[t];void 0!=h&&f.push({uid:h.azureBlobFileId,url:x.generateDownload(null!==(d=h.azureBlobFileId)&&void 0!==d?d:re.default.Empty()),name:null===(c=h.azureBlobFile)||void 0===c?void 0:c.fileName})}return Object(o.jsx)(Qn.a,gv({type:"inner",size:"small",title:u,extra:p},{children:Object(o.jsxs)(y.b,gv({direction:"vertical"},{children:[Object(o.jsx)(mt.a,gv({},this.getLinkagesDataFormItems(t).get(vv.externalInstitutionId),_t.getValidation(vv.externalInstitutionId+t,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(hd,gv({disabled:this.props.readonly,showSearch:!0,optionFilterProp:"children",filterOption:function(e,t){return(null===t||void 0===t?void 0:t.children.toLowerCase().indexOf(e.toLowerCase()))>=0}},{children:this.state.externalInstitutions.map((function(e){return l.renderExternalInstitution(e)}))}),void 0)}),void 0),Object(o.jsx)(mt.a,gv({},this.getLinkagesDataFormItems(t).get(vv.description),_t.getValidation(vv.description+t,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ut.a.TextArea,{disabled:this.props.readonly,maxLength:5e3,showCount:!0,autoSize:{minRows:5}},void 0)}),void 0),Object(o.jsx)(mt.a,gv({},this.getLinkagesDataFormItems(t).get(vv.azureBlobFile),_t.getValidation(vv.azureBlobFile+t,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(hs,{existingList:f,maxCount:1,disabled:this.props.readonly},void 0)}),void 0)]}),void 0)}),void 0)},t.prototype.renderInstitution=function(e){var t,n,r;if(e.id)return Object(o.jsx)(pr.a.Option,gv({title:null!==(t=e.name)&&void 0!==t?t:"",value:null!==(n=e.id)&&void 0!==n?n:re.default.Empty()},{children:e.name}),null!==(r=e.id)&&void 0!==r?r:re.default.Empty())},t.prototype.renderExternalInstitution=function(e){var t,n,r;if(e.id)return Object(o.jsx)(pr.a.Option,gv({title:null!==(t=e.name)&&void 0!==t?t:"",value:null!==(n=e.id)&&void 0!==n?n:re.default.Empty()},{children:e.name}),null!==(r=e.id)&&void 0!==r?r:re.default.Empty())},t.prototype.renderAwardType=function(e){var t,n;if(e.id){var r=e.code+" - "+e.name;return Object(o.jsx)(pr.a.Option,gv({title:r,value:null!==(t=e.id)&&void 0!==t?t:re.default.Empty()},{children:r}),null!==(n=e.id)&&void 0!==n?n:re.default.Empty())}},t.prototype.renderErrors=function(){if(this.state.error)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:this.state.message},void 0)},t}(a.Component),yv=bv,Ov=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),jv=function(){return jv=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},jv.apply(this,arguments)},Iv=function(e){function t(t){var n=e.call(this,t)||this;return n.render=function(){return Object(o.jsxs)(y.b,jv({size:"large",direction:"vertical"},{children:[Object(o.jsx)(Qn.a,jv({title:"Program Plan",type:"inner"},{children:Object(o.jsx)(Oh,{loading:n.props.loading,fieldErrors:n.props.fieldErrors,changeRequestId:n.props.changeRequest.i
1d,selectedInstitution:n.props.changeRequest.institutionId,readonly:!0,changeRequestDetailsPage:n.props.changeRequestDetailsPage},void 0)}),void 0),Object(o.jsx)(Qn.a,jv({title:"Planned Awards",type:"inner"},{children:Object(o.jsx)(xh,{loading:n.props.loading,fieldErrors:n.props.fieldErrors,changeRequestId:n.props.changeRequest.id,readonly:!0,changeRequestDetailsPage:n.props.changeRequestDetailsPage},void 0)}),void 0),Object(o.jsx)(Qn.a,jv({title:"Contact Information",type:"inner"},{children:Object(o.jsx)(Yh,{loading:n.props.loading,fieldErrors:n.props.fieldErrors,institutionId:n.props.changeRequest.institutionId,changeRequestId:n.props.changeRequest.id,readonly:!0,changeRequestDetailsPage:n.props.changeRequestDetailsPage},void 0)}),void 0),Object(o.jsx)(Qn.a,jv({title:"Consultant Meetings",type:"inner"},{children:Object(o.jsx)(Wh,{loading:n.props.loading,fieldErrors:n.props.fieldErrors,institutionId:n.props.changeRequest.institutionId,changeRequestId:n.props.changeRequest.id,readonly:!0,changeRequestDetailsPage:n.props.changeRequestDetailsPage},void 0)}),void 0),Object(o.jsx)(Qn.a,jv({title:"Occupational Information",type:"inner"},{children:Object(o.jsx)(iv,{loading:n.props.loading,fieldErrors:n.props.fieldErrors,institutionId:n.props.changeRequest.institutionId,changeRequestId:n.props.changeRequest.id,readonly:!0,changeRequestDetailsPage:n.props.changeRequestDetailsPage},void 0)}),void 0),Object(o.jsx)(Qn.a,jv({title:"Industry Information",type:"inner"},{children:Object(o.jsx)(uv,{loading:n.props.loading,fieldErrors:n.props.fieldErrors,institutionId:n.props.changeRequest.institutionId,changeRequestId:n.props.changeRequest.id,readonly:!0,changeRequestDetailsPage:n.props.changeRequestDetailsPage},void 0)}),void 0),Object(o.jsx)(Qn.a,jv({title:"Linking And Existing Entities",type:"inner"},{children:Object(o.jsx)(yv,{loading:n.props.loading,fieldErrors:n.props.fieldErrors,changeRequestId:n.props.changeRequest.id,readonly:!0,changeRequestDetailsPage:n.props.changeRequestDetailsPage},void 0)}),void 0),Object(o.jsx)(Qn.a,jv({title:"Additional Information",type:"inner"},{children:Object(o.jsx)(gs,{loading:n.props.loading,fieldErrors:n.props.fieldErrors,changeRequest:n.props.changeRequest,readonly:!0},void 0)}),void 0)]}),void 0)},n.state={},n}return Ov(t,e),t}(a.Component),Sv=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ev=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Sv(t,e),t.prototype.get=function(e){var t="api/programDeactivationChangeRequests/get";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.submitStep1=function(e){var t="api/programDeactivationChangeRequests/submitStep1";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.saveStep1=function(e){var t="api/programDeactivationChangeRequests/saveStep1";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t}(U),Rv=new Ev,_v=function(e){return Object.assign({instituionId:"00000000-0000-0000-0000-000000000000"},e)},Tv=function(e){return Object.assign({changeRequestId:null,institutionId:"00000000-0000-0000-0000-000000000000",programDeactivationChangeRequest:null},e)},Cv=function(e){return Object.assign({changeRequestId:null,institutionId:"00000000-0000-0000-0000-000000000000",programDeactivationChangeRequest:null},e)},xv=function(e){return Object.assign({changeRequestId:"00000000-0000-0000-0000-000000000000"},e)},Av=function(e){return Object.assign({programId:"00000000-0000-0000-0000-000000000000",installTerm:"00000000-0000-0000-0000-000000000000",installYear:0},e)},Pv={className:"ProgramDeactivationChangeRequestDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",changeRequestId:"00000000-0000-0000-0000-000000000000",changeRequest:null,programId:null,program:null,rationale:"",studentPlan:"",deactivation:null},e)},id:"id",changeRequestId:"changeRequestId",changeRequest:"changeRequest",programId:"programId",program:"program",rationale:"rationale",studentPlan:"studentPlan",deactivation:"deactivation"},Nv=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),wv=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Nv(t,e),t.prototype.saveStep1=function(e){var t="api/ProgramModificationChangeRequests/saveStep1";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.saveStep4=function(e){var t="api/ProgramModificationChangeRequests/saveStep4";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.saveStep5=function(e){var t="api/ProgramModificationChangeRequests/saveStep5";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.searchForCoursesForPrograms=function(e){var t="api/ProgramModificationChangeRequests/searchForCoursesForPrograms";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.searchForCourseBlocksForPrograms=function(e){var t="api/ProgramModificationChangeRequests/searchForCourseBlocksForPrograms";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.submitStep1=function(e){var t="api/ProgramModificationChangeRequests/submitStep1";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.submitStep2=function(e){var t="api/ProgramModificationChangeRequests/submitStep2";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.submitStep3=function(e){var t="api/ProgramModificationChangeRequests/submitStep3";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.submitStep4=function(e){var t="api/ProgramModificationChangeRequests/submitStep4";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.submitStep5=function(e){var t="api/ProgramModificationChangeRequests/submitStep5";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.get=function(e){var t="api/ProgramModificationChangeRequests/get";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getStep1=function(e){var t="api/ProgramModificationChangeRequests/getStep1";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getStep2=function(e){var t="api/ProgramModificationChangeRequests/getStep2";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getStep3=function(e){var t="api/ProgramModificationChangeRequests/getStep3";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getStep4=function(e){var t="api/ProgramModificationChangeRequests/getStep4";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getStep4Term=function(e){var t="api/ProgramModificationChangeRequests/getStep4Term";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.validateProgramModificationChangeRequestStep4=function(e){var t="api/ProgramModificationChangeRequests/validateProgramModificationChangeRequestStep4";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getStep5=function(e){var t="api/ProgramModificationChangeRequests/getStep5";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getStep6=function(e){var t="api/ProgramModificationChangeRequests/getStep6";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.removeAwardFromProgramModificationProgramHandler=function(e){var t="api/ProgramModificationChangeRequests/removeAwardFromProgramModificationProgramHandler";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.programComparisonReport=function(e){var t="api/ProgramModificationChangeRequests/programComparisonReport/"+encodeURIComponent(e);return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"get",t,!0,!1)},t.prototype.programSideBySideComparisonReport=function(e){var t="api/ProgramModificationChangeRequests/programSideBySideComparisonReport/"+encodeURIComponent(e);return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"get",t,!0,!1)},t.prototype.previousProgramCurriculumReport=function(e){var t="api/ProgramModificationChangeRequests/previousProgramCurriculumReport/"+encodeURIComponent(e);return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"get",t,!0,!1)},t.prototype.checkProgramModificationExisting=function(e){var t="api/ProgramModificationChangeRequests/checkProgramModificationExisting";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t}(U),Dv=new wv,qv=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fv=function(){return Fv=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Fv.apply(this,arguments)},Mv=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n.getFormItems=function(){return(new Map).set(Pv.programId,{required:!0,name:Pv.programId,label:"What program are you deactivating?",rules:[Ot.required()]}).set(Pv.rationale,{label:"Why are you deactivating this program?",required:!0,name:Pv.rationale,rules:[Ot.required(),Ot.maxLength(5e3)]}).set(Pv.studentPlan,{label:"What is your plans for any residual students?",required:!0,name:Pv.studentPlan,rules:[Ot.required(),Ot.maxLength(5e3)]}).set(Pv.deactivation,{label:"When will this program be deactivated?",required:!0,name:Pv.deactivation,rules:[Ot.required()]})},n.fetchData=function(){n.setState({loading:!0});var e=[];n.state.programs&&0!=n.state.programs.length||n.props.institutionId==re.default.Empty()||e.push(n.getPrograms()),n.props.changeRequestId&&n.props.changeRequestId!=re.default.Empty()&&e.push(n.loadChangeRequest()),Promise.all(e).then((function(){n.setState({loading:!1},(function(){return n.resetForm()}))}))},n.loadChangeRequest=function(){var e=xv({changeRequestId:n.props.changeRequestId});return Rv.get(e).then((function(e){var t,r,i;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create(),programDeactivation:null!==(i=null===(r=e.changeRequest)||void 0===r?void 0:r.programDeactivationChangeRequest)&&void 0!==i?i:Pv.create(),fieldErrors:n.props.changeRequestDetailsPage?null:e.fieldErrors},(function(){return n.resetForm()}))})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.getPrograms=function(){var e=_v({instituionId:n.props.institutionId});return ba.getProgramsByInstitutionId(e).then((function(e){var t;e&&n.setState({programs:null!==(t=e.program)&&void 0!==t?t:[]})})).catch((function(){n.setState({error:!0,message:"Could not load programs."})}))},n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields()},n.checkExisting=function(e){var t,r,i=n._formRef?n._formRef.current.getFieldsValue():null,o=Av({programId:i.programId,installTerm:null===(t=i.deactivation)||void 0===t?void 0:t.termId,installYear:null===(r=i.deactivation)||void 0===r?void 0:r.year});Dv.checkProgramModificationExisting(o).then((function(t){t.existingProgramModification?Rd.a.confirm({title:"Existing Program Modification",content:"There is already a Program Modification scheduled for this program and term combination. Click confirm to continue with the deactivation.",onOk:e?n.handleSubmit:n.handleSave,okText:"Confirm",okButtonProps:{danger:!0}}):e?n.handleSubmit():n.handleSave()})).catch((function(){S.b.error("Incomplete form")}))},n.handleSave=function(){var e,t,r;n.setState({saving:!0});var i=Pv.create(Fv({},null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldsValue()));i.changeRequestId=null!==(t=n.props.changeRequestId)&&void 0!==t?t:re.default.Empty();var o=Tv({changeRequestId:null!==(r=n.props.changeRequestId)&&void 0!==r?r:null,institutionId:n.props.institutionId,ProgramDeactivationChangeRequest:i});Rv.saveStep1(o).then((function(e){n.setState({loading:!1,submitted:!0}),(null===e||void 0===e?void 0:e.succeeded)?S.b.success("Saved"):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,submitted:!0}),S.b.error("Save Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Save Failed")})).finally((function(){n.setState({loading:!1,saving:!1})}
1))},n.handleSubmit=function(){var e,t,r;n.setState({submitting:!0});var i=Pv.create(Fv({},null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldsValue()));i.changeRequestId=null!==(t=n.props.changeRequestId)&&void 0!==t?t:re.default.Empty();var o=Cv({changeRequestId:null!==(r=n.props.changeRequestId)&&void 0!==r?r:null,institutionId:n.props.institutionId,ProgramDeactivationChangeRequest:i});Rv.submitStep1(o).then((function(e){var t;n.setState({loading:!1,submitted:!0}),(null===e||void 0===e?void 0:e.succeeded)?n.props.onSubmit&&(null===(t=e.changeRequest)||void 0===t?void 0:t.id)&&n.props.onSubmit(e.changeRequest.id):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,submitted:!0}),S.b.error("Submit Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Submit Failed")})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.state={changeRequest:$a.create(),programDeactivation:Pv.create(),programs:[]},n}return qv(t,e),t.prototype.componentDidMount=function(){this.props.changeRequestId&&this.fetchData()},t.prototype.componentDidUpdate=function(e){this.props.changeRequestId&&this.props.changeRequestId!=e.changeRequestId&&this.fetchData(),this.props.loading!=e.loading&&this.setState({loading:this.props.loading})},t.prototype.render=function(){var e=this;if(this.state.loading)return Object(o.jsx)(pt.a,{active:!0},void 0);var t=this.getFormItems();return Object(o.jsx)(O.Content,{children:Object(o.jsx)(Ci.a,Fv({ref:this._formRef,layout:"vertical",onFinish:function(){return e.checkExisting(!0)},initialValues:this.state.programDeactivation},{children:Object(o.jsxs)(y.b,Fv({direction:"vertical"},{children:[Object(o.jsx)(mt.a,Fv({},t.get(Pv.programId),_t.getValidation(Pv.programId,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(hd,Fv({showSearch:!0,disabled:this.props.readonly||this.state.saving||this.state.submitting,showArrow:!this.props.readonly,optionFilterProp:"children",placeholder:"Select Program"},{children:this.state.programs.map((function(t){return e.renderProgram(t)}))}),void 0)}),Pv.programId),Object(o.jsx)(mt.a,Fv({},t.get(Pv.rationale),_t.getValidation(Pv.rationale,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ut.a.TextArea,{maxLength:5e3,autoSize:{minRows:5},showCount:!0,disabled:this.props.readonly||this.state.saving||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,Fv({},t.get(Pv.studentPlan),_t.getValidation(Pv.studentPlan,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ut.a.TextArea,{maxLength:5e3,autoSize:{minRows:5},showCount:!0,disabled:this.props.readonly||this.state.saving||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,Fv({},t.get(Pv.deactivation),_t.getValidation(Pv.deactivation,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(Od,{futureYears:!0,disabled:this.props.readonly||this.state.saving||this.state.submitting},void 0)}),void 0),this.renderActions()]}),void 0)}),void 0)},void 0)},t.prototype.renderActions=function(){var e=this;if(!this.props.readonly)return Object(o.jsxs)(y.b,Fv({direction:"horizontal",wrap:!0},{children:[Object(o.jsx)(ss,{submitting:this.state.submitting||this.state.saving},void 0),Object(o.jsx)(Tr,{type:"default",htmlType:"button",onClick:function(){return e.checkExisting()},saving:this.state.submitting||this.state.saving},void 0),Object(o.jsx)(Ir,{resetting:this.state.resetting,onConfirm:this.resetForm},void 0)]}),void 0)},t.prototype.renderProgram=function(e){if(e.id&&e.programDetails)return Object(o.jsx)(pr.a.Option,Fv({value:e.id},{children:e.programDetails[0].display}),e.id)},t.prototype.renderErrors=function(){if(this.state.fieldErrors)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t}(a.Component),Yv=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Uv=function(){return Uv=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Uv.apply(this,arguments)},Lv=function(e){function t(t){var n=e.call(this,t)||this;return n.render=function(){var e;return Object(o.jsx)(Ci.a,Uv({layout:"vertical"},{children:Object(o.jsxs)(y.b,Uv({size:"large",direction:"vertical"},{children:[Object(o.jsx)(Qn.a,Uv({type:"inner",title:"Program Information"},{children:Object(o.jsx)(Mv,{readonly:!0,loading:n.props.loading,institutionId:null!==(e=n.props.changeRequest.institutionId)&&void 0!==e?e:re.default.Empty(),changeRequestId:n.props.changeRequest.i
1d,changeRequestDetailsPage:n.props.changeRequestDetailsPage},void 0)}),void 0),Object(o.jsx)(Qn.a,Uv({type:"inner",size:"small",title:"Additional Details"},{children:Object(o.jsx)(gs,{readonly:!0,changeRequest:n.props.changeRequest,loading:n.props.loading},void 0)}),void 0)]}),void 0)}),void 0)},n}return Yv(t,e),t}(a.Component),kv=function(e){return Object.assign({institutionId:"00000000-0000-0000-0000-000000000000",changeRequestId:null},e)},Gv=function(e){return Object.assign({changeRequestId:"00000000-0000-0000-0000-000000000000"},e)},Vv=function(e){return Object.assign({changeRequestId:null,institutionId:"00000000-0000-0000-0000-000000000000",programModificationChangeRequest:null},e)},Bv=function(e){return Object.assign({changeRequestId:null,institutionId:"00000000-0000-0000-0000-000000000000",programModificationChangeRequest:null,programModificationProgramId:"00000000-0000-0000-0000-000000000000"},e)},Wv={className:"ProgramDetailDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",programId:"00000000-0000-0000-0000-000000000000",cipNumberId:"00000000-0000-0000-0000-000000000000",cipNumber:null,display:"",install:null,retire:null,iowaVariationId:null,iowaVariation:null,title:"",programMarketingLink:"",isTransferMajor:!1,submittedOn:null,approvedByAdvisoryBoard:null,approvedByDOE:null,curriculumApprovalProcessDateOfApproval:null,submittingUser:null,submittingUserId:null,program:null,awards:[],versionDisplay:""},e)},id:"id",programId:"programId",cipNumberId:"cipNumberId",cipNumber:"cipNumber",display:"display",install:"install",retire:"retire",iowaVariationId:"iowaVariationId",iowaVariation:"iowaVariation",title:"title",programMarketingLink:"programMarketingLink",isTransferMajor:"isTransferMajor",submittedOn:"submittedOn",approvedByAdvisoryBoard:"approvedByAdvisoryBoard",approvedByDOE:"approvedByDOE",curriculumApprovalProcessDateOfApproval:"curriculumApprovalProcessDateOfApproval",submittingUser:"submittingUser",submittingUserId:"submittingUserId",program:"program",awards:"awards",versionDisplay:"versionDisplay"},zv={className:"ProgramModificationChangeRequestDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",changeRequestId:"00000000-0000-0000-0000-000000000000",changeRequest:null,cipReclassification:null,programId:null,program:null,noticeOfIntentChangeRequestId:null,noticeOfIntentChangeRequest:null,institutionId:null,statusTypeId:0,statusType:null,cipNumberId:null,cipNumber:null,iowaVariationId:null,iowaVariation:null,title:"",programMarketingLink:"",install:null,advisoryBoardApprovalDate:new Date(0).toISOString(),curriculumApprovalProcessDateOfApproval:new Date(0).toISOString(),programModificationAwards:[],externalInstitutions:[],externalInstitutionIds:[],programModificationAdvisoryBoardContacts:[]},e)},id:"id",changeRequestId:"changeRequestId",changeRequest:"changeRequest",cipReclassification:"cipReclassification",programId:"programId",program:"program",noticeOfIntentChangeRequestId:"noticeOfIntentChangeRequestId",noticeOfIntentChangeRequest:"noticeOfIntentChangeRequest",institutionId:"institutionId",statusTypeId:"statusTypeId",statusType:"statusType",cipNumberId:"cipNumberId",cipNumber:"cipNumber",iowaVariationId:"iowaVariationId",iowaVariation:"iowaVariation",title:"title",programMarketingLink:"programMarketingLink",install:"install",advisoryBoardApprovalDate:"advisoryBoardApprovalDate",curriculumApprovalProcessDateOfApproval:"curriculumApprovalProcessDateOfApproval",programModificationAwards:"programModificationAwards",externalInstitutions:"externalInstitutions",externalInstitutionIds:"externalInstitutionIds",programModificationAdvisoryBoardContacts:"programModificationAdvisoryBoardContacts"},Hv=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Qv=function(){return Qv=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Qv.apply(this,arguments)},Kv=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._formItems=(new Map).set(zv.programId,{required:!0,name:zv.programId,label:"Please select a program to modify.",rules:[Ot.required()]}).set(zv.noticeOfIntentChangeRequestId,{required:!0,name:zv.noticeOfIntentChangeRequestId,label:"Please select the notice of intent corresponding to this reclassification.",rules:[Ot.required()]}).set(zv.cipReclassification,{required:!0,name:zv.cipReclassification,label:"Are you reclassifying the CIP number for this program?",rules:[Ot.required()]}).set(zv.install,{required:!0,name:zv.install,label:"When will these modifications take effect?",rules:[Ot.required()]}).set(zv.programMarketingLink,{required:!0,name:zv.programMarketingLink,label:"Please provide a link to the website used to market this program.",rules:[Ot.required(),Ot.https()]}).set(zv.iowaVariationId,{required:!0,name:zv.iowaVariationId,label:"Please select an Iowa Variation.",rules:[Ot.required()]}).set(zv.externalInstitutionIds,{required:!0,name:zv.externalInstitutionIds,label:"Please select the external institution.",rules:[Ot.required()]}).set(zv.title,{required:!0,name:zv.title,label:"Program Title",rules:[Ot.required()]}),n.resetForm=function(){var e;n.setState({altered:!1}),null===(e=n._formRef.current)||void 0===e||e.resetFields(),n.props.onChange&&n.props.onChange(!1)},n.fetchData=function(){n.setState({loading:!0});var e=[];n.state.programs&&0!=n.state.programs.length||e.push(n.getPrograms()),e.push(n.GetNoticeOfIntentByCipReclassification()),n.state.iowaVariation&&0!=n.state.iowaVariation.length||e.push(n.loadIowaVariation()),n.state.awardTypes&&0!=n.state.awardTypes.length||e.push(n.loadAwardTypes()),n.state.externalInstitution&&0!=n.state.externalInstitution.length||e.push(n.loadExternalInstitution()),n.props.changeRequestId&&n.props.changeRequestId==re.default.Empty()||e.push(n.loadChangeRequest()),Promise.all(e).then((function(){n.setState({loading:!1},(function(){return n.resetForm()}))}))},n.loadExternalInstitution=function(){return ce.getAll(mp.className).then((function(e){e&&n.setState({externalInstitution:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}
1))},n.loadIowaVariation=function(){return ce.getAll(pi.className).then((function(e){var t;e&&n.setState({iowaVariation:null!==(t=e.sort((function(e,t){return e.order-t.order})))&&void 0!==t?t:[]})})).catch((function(){n.setState({error:!0})}))},n.loadAwardTypes=function(){return ce.getAll(si.className).then((function(e){e&&n.setState({awardTypes:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.getPrograms=function(){var e=_v({instituionId:n.props.selectedInstitution});return ba.getProgramsByInstitutionId(e).then((function(e){var t;e&&n.setState({programs:null!==(t=e.program)&&void 0!==t?t:[]})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.GetNoticeOfIntentByCipReclassification=function(){var e,t=kv({institutionId:n.props.selectedInstitution,changeRequestId:null!==(e=n.props.changeRequestId)&&void 0!==e?e:re.default.Empty()});return lp.getByCipReclassification(t).then((function(e){var t;e&&n.setState({noticeOfIntent:null!==(t=e.changeRequests)&&void 0!==t?t:[]})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.loadChangeRequest=function(){var e=Gv({changeRequestId:n.props.changeRequestId});return Dv.getStep1(e).then((function(e){var t,r,i,o,a,s;if(e){var d=null!==(r=null===(t=e.changeRequest)||void 0===t?void 0:t.programModificationChangeRequest)&&void 0!==r?r:zv.create({externalInstitutionIds:[]}),c=null!==(a=null===(o=null===(i=d.programModificationAwards)||void 0===i?void 0:i.filter((function(e){return 1==e.order})).at(0))||void 0===o?void 0:o.awardTypeId)&&void 0!==a?a:null;d.program||(d.program=$f.create({programId:null})),n.setState({changeRequest:null!==(s=e.changeRequest)&&void 0!==s?s:$a.create(),programModification:d,fieldErrors:n.props.changeRequestDetailsPage?null:e.fieldErrors,primaryAwardId:c}),n.setVariationValidationState(c)}})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.handleSubmit=function(){var e,t;n.setState({submitting:!0});var r=zv.create(n._formRef?n._formRef.current.getFieldsValue():null);r.program=n.state.programModification.program,r.institutionId=n.props.selectedInstitution,r.noticeOfIntentChangeRequestId=null!==(e=r.noticeOfIntentChangeRequestId)&&void 0!==e?e:re.default.Empty(),r.programModificationAwards=n.state.programModification.programModificationAwards;var i=Bv({changeRequestId:null!==(t=n.props.changeRequestId)&&void 0!==t?t:null,institutionId:n.props.selectedInstitution,programModificationChangeRequest:r});Dv.submitStep1(i).then((function(e){var t,r,i,o,a;n.setState({submitted:!0}),(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create(),programModification:null!==(i=null===(r=e.changeRequest)||void 0===r?void 0:r.programModificationChangeRequest)&&void 0!==i?i:zv.create()}),n.resetForm(),n.props.onSave&&e.changeRequest&&n.props.onSave(null!==(o=e.changeRequest.id)&&void 0!==o?o:re.default.Empty()),n.props.onSubmit&&e.changeRequest&&n.props.onSubmit(null!==(a=e.changeRequest.id)&&void 0!==a?a:re.default.Empty())):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Save Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Save Failed")})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.handleSave=function(){var e,t;n.setState({saving:!0});var r=zv.create(n._formRef?n._formRef.current.getFieldsValue():null);r.noticeOfIntentChangeRequestId=null!==(e=r.noticeOfIntentChangeRequestId)&&void 0!==e?e:re.default.Empty();var i=Vv({changeRequestId:null!==(t=n.props.changeRequestId)&&void 0!==t?t:null,institutionId:n.props.selectedInstitution,programModificationChangeRequest:r});Dv.saveStep1(i).then((function(e){var t,r,i,o;(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create(),programModification:null!==(i=null===(r=e.changeRequest)||void 0===r?void 0:r.programModificationChangeRequest)&&void 0!==i?i:zv.create()}),n.resetForm(),n.props.onSave&&e.changeRequest&&n.props.onSave(null!==(o=e.changeRequest.i
1d)&&void 0!==o?o:re.default.Empty())):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Save Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Save Failed")})).finally((function(){n.setState({loading:!1,saving:!1})}))},n.handleChange=function(){n.setState({altered:!0}),n.props.onChange&&n.props.onChange(!0)},n.isProgramSelected=function(){var e,t;return!(!(null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldValue(zv.programId))&&!(null===(t=n.state.programModification.program)||void 0===t?void 0:t.id))},n.onProgramSelect=function(e){var t,r,i,o,a,s=n.state.programs.find((function(t){return t.id==e})),d=n._formRef?n._formRef.current:null,c=n.state.programModification;c.program=null!==s&&void 0!==s?s:$f.create(),(null===s||void 0===s?void 0:s.currentDetail)&&(c.title=null===s||void 0===s?void 0:s.currentDetail.title,c.programMarketingLink=null===s||void 0===s?void 0:s.currentDetail.programMarketingLink,c.iowaVariationId=s.currentDetail.iowaVariationId),null===d||void 0===d||d.setFieldsValue({title:c.title,programMarketingLink:c.programMarketingLink,iowaVariationId:c.iowaVariationId});var l=null!==(a=null===(o=null===(i=null===(r=null===(t=c.program)||void 0===t?void 0:t.currentDetail)||void 0===r?void 0:r.awards)||void 0===i?void 0:i.at(0))||void 0===o?void 0:o.awardTypeId)&&void 0!==a?a:null;n.setState({primaryAwardId:l}),n.setVariationValidationState(l)},n.renderErrors=function(){if(n.state.error)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:n.state.message},void 0)},n.setVariationValidationState=function(e){var t,r,i,o,a=void 0!==e?e:n.state.primaryAwardId,s=null!==(r=null===(t=n._formRef.current)||void 0===t?void 0:t.getFieldValue(zv.iowaVariationId))&&void 0!==r?r:n.state.programModification.iowaVariationId,d=null!==(o=null===(i=n.state.awardTypes.find((function(e){return e.id==a})))||void 0===i?void 0:i.iowaVariationIds)&&void 0!==o?o:[],c=d.includes(s);n.setState({currentIowaVariationId:s,validIowaVariationIds:d,isCurrentIowaVariationValid:c})},n.state={noticeOfIntent:[],changeRequest:$a.create(),programs:[],programModification:zv.create({programId:null,externalInstitutionIds:[]}),searchForPrograms:[],programModificationPrograms:[],existingProgramModificationProgram:re.default.Empty(),externalInstitution:[],iowaVariation:[],awardTypes:[],primaryAwardId:null,currentIowaVariationId:null,validIowaVariationIds:null,isCurrentIowaVariationValid:!0},n}return Hv(t,e),t.prototype.componentDidMount=function(){this.fetchData()},t.prototype.componentDidUpdate=function(e){this.props.changeRequestId&&e.changeRequestId!=this.props.changeRequestId&&this.fetchData()},t.prototype.render=function(){var e=this;return this.state.loading||this.props.loading||void 0==this.props.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsx)(y.b,Qv({size:"small",direction:"vertical"},{children:Object(o.jsxs)(ht.a,Qv({ref:this._formRef,layout:"vertical",initialValues:this.state.programModification,onValuesChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!this.props.readonly},{children:[this.renderSelectProgram(),this.renderProgramTitle(),Object(o.jsx)(mt.a,Qv({},this._formItems.get(zv.iowaVariationId),_t.getValidation(zv.iowaVariationId,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(hd,Qv({showSearch:!0,showArrow:!this.props.readonly,optionFilterProp:"children",placeholder:"Select Iowa Variation",disabled:this.props.readonly||this.state.saving||this.state.submitting||!this.isProgramSelected(),onChange:function(){return e.setVariationValidationState()}},{children:this.renderIowaVariation()}),void 0)}),void 0),this.renderExternalInstitution(),Object(o.jsx)(mt.a,Qv({},this._formItems.get(zv.cipReclassification),_t.getValidation(zv.cipReclassification,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(Hd,{disabled:this.props.readonly||this.state.saving||this.state.submitting||!this.isProgramSelected()},void 0)}),zv.cipReclassification),this.renderNOIForCipReclassification(),Object(o.jsx)(mt.a,Qv({},this._formItems.get(zv.install),_t.getValidation(zv.install,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(Od,{futureYears:!0,readOnly:this.props.readonly,disabled:this.state.saving||this.state.submitting||!this.isProgramSelected()},void 0)}),void 0),Object(o.jsx)(mt.a,Qv({},this._formItems.get(zv.programMarketingLink),_t.getValidation(zv.programMarketingLink,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ut.a,{disabled:this.props.readonly||this.state.saving||this.state.submitting||!this.isProgramSelected()},void 0)}),void 0),this.renderActions()]}),void 0)}),void 0)},t.prototype.renderActions=function(){if(!this.props.readonly)return Object(o.jsxs)(y.b,Qv({direction:"horizontal",wrap:!0},{children:[Object(o.jsx)(ss,{submitting:this.state.submitting||this.state.saving},void 0),Object(o.jsx)(Tr,{type:"default",htmlType:"button",onClick:this.handleSave,saving:this.state.submitting||this.state.saving,saved:this.state.saved},void 0),Object(o.jsx)(Ir,{disabled:this.state.submitting||this.state.saving,resetting:this.state.resetting,onConfirm:this.resetForm},void 0)]}),void 0)},t.prototype.renderSelectProgram=function(){var e=this,t=this.state.programs.map((function(t){return e.renderProgram(t)}));return Object(o.jsx)(mt.a,Qv({},this._formItems.get(zv.programId),_t.getValidation(zv.programId,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(hd,Qv({showSearch:!0,showArrow:!this.props.readonly,optionFilterProp:"children",placeholder:"Select Program",onChange:function(t){return e.onProgramSelect(t)},disabled:this.props.readonly||this.state.saving||this.state.submitting},{children:t}),void 0)}),zv.programId)},t.prototype.renderNOIForCipReclassification=function(){var e,t=this;return(null===(e=this._formRef.current)||void 0===e?void 0:e.getFieldValue(zv.cipReclassification))||!this._formRef.current&&this.state.programModification.cipReclassification?Object(o.jsx)(mt.a,Qv({},this._formItems.get(zv.noticeOfIntentChangeRequestId),_t.getValidation(zv.noticeOfIntentChangeRequestId,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(hd,Qv({showSearch:!0,placeholder:"Select Notice of Intent",optionFilterProp:"children",filterOption:function(e,t){return(null===t||void 0===t?void 0:t.children.toLowerCase().indexOf(e.toLowerCase()))>=0},disabled:this.props.readonly||!this.isProgramSelected()},{children:this.state.noticeOfIntent.map((function(e){return t.renderNOI(e)}))}),void 0)}),zv.noticeOfIntentChangeRequestId):null},t.prototype.renderExternalInstitution=function(){var e,t,n,r,i,a=this,s=null===(e=this._formRef.current)||void 0===e?void 0:e.getFieldValue(Wv.programId);if((null===(n=null===(t=this.state.programs.find((function(e){return e.id==s})))||void 0===t?void 0:t.currentDetail)||void 0===n?void 0:n.isTransferMajor)||(null===(i=null===(r=this.state.programModification.program)||void 0===r?void 0:r.currentDetail)||void 0===i?void 0:i.isTransferMajor))return Object(o.jsx)(mt.a,Qv({},this._formItems.get(zv.externalInstitutionIds),_t.getValidation(zv.externalInstitutionIds,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(hd,Qv({mode:"multiple",disabled:this.props.readonly||this.state.saving||this.state.submitting},{children:this.state.externalInstitution.map((function(e){return a.renderExternalInstitutionOptions(e)}))}),void 0)}),void 0)},t.prototype.renderProgramTitle=function(){var e,t,n=null===(e=this._formRef.current)||void 0===e?void 0:e.getFieldValue(Wv.programId);if(null===(t=this.state.programs.find((function(e){return e.id==n})))||void 0===t?void 0:t.currentDetail)return Object(o.jsx)(mt.a,Qv({},this._formItems.get(zv.title),_t.getValidation(zv.title,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(il,{disabled:this.props.readonly||this.state.saving||this.state.submitting},void 0)}),void 0)},t.prototype.renderExternalInstitutionOptions=function(e){var t,n;if(e.id)return Object(o.jsxs)(pr.a.Option,Qv({value:null!==(t=e.id)&&void 0!==t?t:re.default.Empty()},{children:[" ",e.name]}),null!==(n=e.id)&&void 0!==n?n:re.default.Empty())},t.prototype.renderProgram=function(e){if(e.id&&e.programDetails)return Object(o.jsx)(pr.a.Option,Qv({value:e.id},{children:e.programDetails[0].display}),e.id)},t.prototype.renderIowaVariation=function(){var e=this;return this.state.iowaVariation.filter((function(t){var n,r;return(null===(n=e.state.validIowaVariationIds)||void 0===n?void 0:n.includes(t.id))||0==(null===(r=e.state.validIowaVariationIds)||void 0===r?void 0:r.length)||null==e.state.validIowaVariationIds||t.id==e.state.currentIowaVariationId})).map((function(t){if(t.id){var n=!e.state.isCurrentIowaVariationValid&&t.id==e.state.currentIowaVariationId;return Object(o.jsx)(pr.a.Option,Qv({value:t.id,disabled:n}
1,{children:t.display}),t.id)}}))},t.prototype.renderNOI=function(e){var t,n,r,i;if(e.id)return Object(o.jsx)(pr.a.Option,Qv({value:null!==(n=null===(t=e.noticeOfIntentChangeRequest)||void 0===t?void 0:t.id)&&void 0!==n?n:re.default.Empty()},{children:e.display}),null!==(i=null===(r=e.noticeOfIntentChangeRequest)||void 0===r?void 0:r.id)&&void 0!==i?i:re.default.Empty())},t}(a.Component),Xv=Kv,Jv=function(e){return Object.assign({changeRequestId:"00000000-0000-0000-0000-000000000000",programAwardId:"00000000-0000-0000-0000-000000000000"},e)},$v=function(e){return Object.assign({programModificationChangeRequest:null},e)},Zv={className:"ProgramModificationProgramAwardDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",title:"",description:"",order:0,programModificationChangeRequestId:"00000000-0000-0000-0000-000000000000",awardTypeId:null,awardType:null,instructionalLevelId:null,instructionalLevel:null,typeOfProgramId:null,typeOfProgram:null,specialEmphasisId:null,specialEmphasis:null,objectPurposeId:null,objectPurpose:null,programAwardInstitutionLocationIds:[],programModificationProgramAwardInstitutionLocations:[],thirdPartyCredentials:[],prerequisite:!1,totalWeeks:null,totalCredits:null,programAwardModesOfDeliveryIds:[],programAwardModesOfDelivery:[],terms:[]},e)},id:"id",title:"title",description:"description",order:"order",programModificationChangeRequestId:"programModificationChangeRequestId",awardTypeId:"awardTypeId",awardType:"awardType",instructionalLevelId:"instructionalLevelId",instructionalLevel:"instructionalLevel",typeOfProgramId:"typeOfProgramId",typeOfProgram:"typeOfProgram",specialEmphasisId:"specialEmphasisId",specialEmphasis:"specialEmphasis",objectPurposeId:"objectPurposeId",objectPurpose:"objectPurpose",programAwardInstitutionLocationIds:"programAwardInstitutionLocationIds",programModificationProgramAwardInstitutionLocations:"programModificationProgramAwardInstitutionLocations",thirdPartyCredentials:"thirdPartyCredentials",prerequisite:"prerequisite",totalWeeks:"totalWeeks",totalCredits:"totalCredits",programAwardModesOfDeliveryIds:"programAwardModesOfDeliveryIds",programAwardModesOfDelivery:"programAwardModesOfDelivery",terms:"terms"},em=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),tm=function(){return tm=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},tm.apply(this,arguments)},nm=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._formItems=(new Map).set(Zv.title,{required:!0,name:Zv.title,label:"Award Title",rules:[Ot.required()]}).set(Zv.awardTypeId,{required:!0,name:Zv.awardTypeId,label:"Award Type",rules:[Ot.required()]}).set(Zv.description,{required:!0,name:Zv.description,label:"Award Description",rules:[Ot.required()]}).set(Zv.instructionalLevelId,{required:!0,name:Zv.instructionalLevelId,label:"Instructional Level",rules:[Ot.required()]}).set(Zv.typeOfProgramId,{required:!0,name:Zv.typeOfProgramId,label:"Type Of Program",rules:[Ot.required()]}).set(Zv.specialEmphasisId,{required:!0,name:Zv.specialEmphasisId,label:"Special Emphasis",rules:[Ot.required()]}).set(Zv.objectPurposeId,{required:!0,name:Zv.objectPurposeId,label:"Object Purpose",rules:[Ot.required()]}).set(Zv.totalWeeks,{required:!0,name:Zv.totalWeeks,label:"What is the total amount of weeks for this award?",rules:[Ot.required()]}).set(Zv.totalCredits,{required:!0,name:Zv.totalCredits,label:"What is the total amount of credits for this award?",rules:[Ot.required()]}).set(Zv.programAwardModesOfDeliveryIds,{required:!0,name:Zv.programAwardModesOfDeliveryIds,label:"How will this award be delivered?",rules:[Ot.required()]}).set(Zv.programAwardInstitutionLocationIds,{name:Zv.programAwardInstitutionLocationIds,label:"What campus will this award be provided at?"}),n.resetForm=function(){var e;n.setState({altered:!1}),null===(e=n._formRef.current)||void 0===e||e.resetFields(),n.props.onChange&&n.props.onChange(!1)},n.fetchData=function(){n.setState({loading:!0});var e=[];n.state.terms&&0!=n.state.terms.length||e.push(n.loadTerms()),n.state.instructionalLevels&&0!=n.state.instructionalLevels.length||e.push(n.loadInstructionalLevel()),n.state.typeOfPrograms&&0!=n.state.typeOfPrograms.length||e.push(n.loadTypeOfProgram()),n.state.specialEmphasis&&0!=n.state.specialEmphasis.length||e.push(n.loadSpecialEmphasis()),n.state.objectPurposes&&0!=n.state.objectPurposes.length||e.push(n.loadObjectPurpose()),n.state.modeOfDelivery&&0!=n.state.modeOfDelivery.length||e.push(n.loadModeOfDelivery()),n.state.iowaVariations&&0!=n.state.iowaVariations.length||e.push(n.loadIowaVariation()),n.props.changeRequestId&&n.props.changeRequestId==re.default.Empty()||e.push(n.loadChangeRequest()),0==n.state.institutionLocations.length&&n.props.selectedInstitution!=re.default.Empty()&&e.push(n.loadInstitutionLocations()),Promise.all(e).then((function(){n.setState({loading:!1},(function(){return n.resetForm()}))}))},n.loadInstitutionLocations=function(){var e;wc.getInstitutionLocations(null!==(e=n.props.selectedInstitution)&&void 0!==e?e:re.default.Empty()).then((function(e){var t;(null===e||void 0===e?void 0:e.succeeded)?n.setState({institutionLocations:null!==(t=e.institutionLocations)&&void 0!==t?t:[]}):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Save Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Save Failed")}))},n.loadTerms=function(){return ce.getAll(Rs.className).then((function(e){e&&n.setState({terms:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}
1))},n.loadAwardTypes=function(){return ce.getAll(si.className).then((function(e){e&&n.setState({awardTypes:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadFilteredChildAwardTypes=function(e){return ce.getAll(si.className).then((function(t){if(t){var r=t.map((function(t){if(e.findIndex((function(e){return e==t.id}))>-1)return t}));r.removeAll([void 0]),n.setState({awardTypes:null!==r&&void 0!==r?r:[]})}})).catch((function(){n.setState({error:!0})}))},n.loadChildAwardTypes=function(e){var t=Gc({id:e});return Uc.getChildAwardTypes(t).then((function(e){var t;if(e){var r=null!==(t=e.childAwardTypes)&&void 0!==t?t:[];n.loadFilteredChildAwardTypes(r.map((function(e){return e.id})))}})).catch((function(){n.setState({error:!0})}))},n.loadIowaVariation=function(){return ce.getAll(pi.className).then((function(e){e&&n.setState({iowaVariations:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadTypeOfProgram=function(){return ce.getAll(Kc.className).then((function(e){e&&n.setState({typeOfPrograms:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadInstructionalLevel=function(){return ce.getAll(Vc.className).then((function(e){e&&n.setState({instructionalLevels:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadSpecialEmphasis=function(){return ce.getAll(Qc.className).then((function(e){e&&n.setState({specialEmphasis:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadObjectPurpose=function(){return ce.getAll(Hc.className).then((function(e){e&&n.setState({objectPurposes:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadModeOfDelivery=function(){return ce.getAll(Bc.className).then((function(e){e&&n.setState({modeOfDelivery:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadChangeRequest=function(){var e=Jv({changeRequestId:n.props.changeRequestId,programAwardId:n.props.awardId});return Dv.getStep3(e).then((function(e){var t,r,i,o,a,s,d,c,l;if(e){var u=null!==(o=null===(i=(null!==(r=null===(t=e.changeRequest)||void 0===t?void 0:t.programModificationChangeRequest)&&void 0!==r?r:zv.create()).programModificationAwards)||void 0===i?void 0:i.find((function(e){return e.id==n.props.awardId})))&&void 0!==o?o:Zv.create({awardTypeId:null,iowaVariationId:null,instructionalLevelId:null,typeOfProgramId:null,specialEmphasisId:null,objectPurposeId:null,totalWeeks:null,totalCredits:null});1!=u.order&&(null===(s=null===(a=e.changeRequest)||void 0===a?void 0:a.programModificationChangeRequest)||void 0===s?void 0:s.programModificationAwards)?n.loadChildAwardTypes(null===(c=null===(d=e.changeRequest)||void 0===d?void 0:d.programModificationChangeRequest)||void 0===c?void 0:c.programModificationAwards[0].awardTypeId):n.loadAwardTypes(),n.setState({changeRequest:null!==(l=e.changeRequest)&&void 0!==l?l:$a.create(),award:u,fieldErrors:n.props.changeRequestDetailsPage?null:e.fieldErrors})}})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.handleSubmit=function(){var e,t,r,i;n.setState({submitting:!0});var o=Zv.create(n._formRef?n._formRef.current.getFieldsValue():null);o.id=null!==(e=n.props.awardId)&&void 0!==e?e:re.default.Empty(),o.id!=re.default.Empty()&&(o.order=n.state.award.order);var a=n.state.changeRequest.programModificationChangeRequest,s=zv.create({id:null!==(t=null===a||void 0===a?void 0:a.id)&&void 0!==t?t:re.default.Empty(),programId:null!==(r=null===a||void 0===a?void 0:a.programId)&&void 0!==r?r:re.default.Empty(),institutionId:null!==(i=n.state.changeRequest.institutionId)&&void 0!==i?i:re.default.Empty(),changeRequestId:n.state.changeRequest.id==re.default.Empty()?n.props.changeRequestId:n.state.changeRequest.id,programModificationAwards:[o]}),d=$v({programModificationChangeRequest:s});Dv.submitStep3(d).then((function(e){var t,r,i,o,a,s,d,c;if(null===e||void 0===e?void 0:e.succeeded){S.b.success("Saved"),n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()});var l=null!==(r=n.props.awardId)&&void 0!==r?r:re.default.Empty();(null===(o=null===(i=e.changeRequest)||void 0===i?void 0:i.programModificationChangeRequest)||void 0===o?void 0:o.programModificationAwards)&&n.props.awardId==re.default.Empty()&&(l=null===(s=null===(a=e.changeRequest)||void 0===a?void 0:a.programModificationChangeRequest)||void 0===s?void 0:s.programModificationAwards[(null===(c=null===(d=e.changeRequest)||void 0===d?void 0:d.programModificationChangeRequest)||void 0===c?void 0:c.programModificationAwards.length)-1].id);var u=l;n.props.onSubmit&&n.props.onSubmit(u),n.resetForm()}else n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Save Failed")})).catch((function(e){n.setState({error:e}),S.b.error("Save Failed")})).finally((function(){n.setState({loading:!1,submitting:!1,submitted:!0})}))},n.handleChange=function(){n.setState({altered:!0}),n.props.onChange&&n.props.onChange(!0)},n.handleAwardTypeChange=function(){var e,t,r,i,o,a,s,d,c,l,u,p,f,h=null!==(e=n.state.awardTypes.find((function(e){var t;return e.id==(null===(t=n._formRef.current)||void 0===t?void 0:t.getFieldValue(Zv.awardTypeId))})))&&void 0!==e?e:si.create();h.instructionalLevels.includes(null!==(r=null===(t=n._formRef.current)||void 0===t?void 0:t.getFieldValue(Zv.instructionalLevelId))&&void 0!==r?r:0)||null===(i=n._formRef.current)||void 0===i||i.setFieldsValue({instructionalLevelId:void 0}),h.typeOfPrograms.includes(null!==(a=null===(o=n._formRef.current)||void 0===o?void 0:o.getFieldValue(Zv.typeOfProgramId))&&void 0!==a?a:0)||null===(s=n._formRef.current)||void 0===s||s.setFieldsValue({typeOfProgramId:void 0}),h.specialEmphases.includes(null!==(c=null===(d=n._formRef.current)||void 0===d?void 0:d.getFieldValue(Zv.specialEmphasisId))&&void 0!==c?c:0)||null===(l=n._formRef.current)||void 0===l||l.setFieldsValue({specialEmphasisId:void 0}),h.objectPurposes.includes(null!==(p=null===(u=n._formRef.current)||void 0===u?void 0:u.getFieldValue(Zv.objectPurposeId))&&void 0!==p?p:0)||null===(f=n._formRef.current)||void 0===f||f.setFieldsValue({objectPurposeId:void 0})},n.render=function(){var e,t;if(n.state.loading)return Object(o.jsx)(pt.a,{active:!0},void 0);var r=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldValue(Zv.awardTypeId),i=r||0;return Object(o.jsx)(y.b,tm({size:"small",direction:"vertical"},{children:Object(o.jsxs)(ht.a,tm({ref:n._formRef,layout:"vertical",initialValues:n.state.award,onValuesChange:n.handleChange,onFinish:n.handleSubmit,requiredMark:!n.props.readonly},{children:[Object(o.jsx)(b.a,tm({gutter:[16,16]},{children:Object(o.jsxs)(m.a,tm({},En.ONE_THIRD,{children:[Object(o.jsx)("label",{title:"Award Type Award "+n.state.award.order,htmlFor:"Award Type Award "+n.state.award.order},void 0),Object(o.jsx)(mt.a,tm({},n._formItems.get(Zv.awardTypeId),_t.getValidation(Zv.awardTypeId+n.state.award.order,n.state.fieldErrors,n.state.submitted||n.props.readonly),{children:Object(o.jsx)(hd,tm({id:"Award Type Award "+n.state.award.order,showArrow:!n.props.readonly,disabled:n.props.readonly,onChange:n.handleAwardTypeChange},{children:n.state.awardTypes.map((function(e){return n.renderAwardType(e)}))}),void 0)}),void 0)]}),void 0)}),void 0),Object(o.jsx)(b.a,tm({gutter:[16,16]},{children:Object(o.jsx)(m.a,tm({},En.THREE_QUARTERS,{children:Object(o.jsx)(mt.a,tm({},n._formItems.get(Zv.title),_t.getValidation(Zv.title+n.state.award.order,n.state.fieldErrors,n.state.submitted||n.props.readonly),{children:Object(o.jsx)(ut.a,{"aria-label":"Title Award "+n.state.award.order,id:"Title Award "+n.state.award.order,disabled:n.props.readonly},void 0)}),void 0)}),void 0)}),void 0),Object(o.jsxs)(b.a,tm({gutter:[16,16]},{children:[Object(o.jsxs)(m.a,tm({},En.ONE_QUARTER,{children:[Object(o.jsx)("label",{title:"Instructional Level Award "+n.state.award.order,htmlFor:"Instructional Level Award "+n.state.award.order},void 0),Object(o.jsx)(mt.a,tm({},n._formItems.get(Zv.instructionalLevelId),_t.getValidation(Zv.instructionalLevelId+n.state.award.order,n.state.fieldErrors,n.state.submitted||n.props.readonly),{children:Object(o.jsx)(hd,tm({id:"Instructional Level Award "+n.state.award.order,showArrow:!n.props.readonly,disabled:n.props.readonly},{children:n.state.instructionalLevels.filter((function(e){var t;return null===(t=n.state.awardTypes.find((function(e){return e.id==i})))||void 0===t?void 0:t.instructionalLevels.includes(e.id)}
1)).map((function(e){return n.renderInsturctionalLevel(e)}))}),void 0)}),void 0)]}),void 0),Object(o.jsxs)(m.a,tm({},En.ONE_QUARTER,{children:[Object(o.jsx)("label",{title:"Type Of Program Award "+n.state.award.order,htmlFor:"Type Of Program Award "+n.state.award.order},void 0),Object(o.jsx)(mt.a,tm({},n._formItems.get(Zv.typeOfProgramId),_t.getValidation(Zv.typeOfProgramId+n.state.award.order,n.state.fieldErrors,n.state.submitted||n.props.readonly),{children:Object(o.jsx)(hd,tm({id:"Type Of Program Award "+n.state.award.order,showArrow:!n.props.readonly,disabled:n.props.readonly},{children:n.state.typeOfPrograms.filter((function(e){var t;return null===(t=n.state.awardTypes.find((function(e){return e.id==i})))||void 0===t?void 0:t.typeOfPrograms.includes(e.id)})).map((function(e){return n.renderTypesOfProgram(e)}))}),void 0)}),void 0)]}),void 0),Object(o.jsxs)(m.a,tm({},En.ONE_QUARTER,{children:[Object(o.jsx)("label",{title:"Special Emphasis Award "+n.state.award.order,htmlFor:"Special Emphasis Award "+n.state.award.order},void 0),Object(o.jsx)(mt.a,tm({},n._formItems.get(Zv.specialEmphasisId),_t.getValidation(Zv.specialEmphasisId+n.state.award.order,n.state.fieldErrors,n.state.submitted||n.props.readonly),{children:Object(o.jsx)(hd,tm({id:"Special Emphasis Award "+n.state.award.order,showArrow:!n.props.readonly,disabled:n.props.readonly},{children:n.state.specialEmphasis.filter((function(e){var t;return null===(t=n.state.awardTypes.find((function(e){return e.id==i})))||void 0===t?void 0:t.specialEmphases.includes(e.id)}
1)).map((function(e){return n.renderSpecialEmphasis(e)}))}),void 0)}),void 0)]}),void 0),Object(o.jsxs)(m.a,tm({},En.ONE_QUARTER,{children:[Object(o.jsx)("label",{title:"Object Purpose Award "+n.state.award.order,htmlFor:"Object Purpose Award "+n.state.award.order},void 0),Object(o.jsx)(mt.a,tm({},n._formItems.get(Zv.objectPurposeId),_t.getValidation(Zv.objectPurposeId+n.state.award.order,n.state.fieldErrors,n.state.submitted||n.props.readonly),{children:Object(o.jsx)(hd,tm({id:"Object Purpose Award "+n.state.award.order,showArrow:!n.props.readonly,disabled:n.props.readonly},{children:n.state.objectPurposes.filter((function(e){var t;return null===(t=n.state.awardTypes.find((function(e){return e.id==i})))||void 0===t?void 0:t.objectPurposes.includes(e.id)})).map((function(e){return n.renderObjectPurpose(e)}))}),void 0)}),void 0)]}),void 0)]}),void 0),Object(o.jsx)("label",{title:"Description Award "+n.state.award.order,htmlFor:"Description Award "+n.state.award.order},void 0),Object(o.jsx)(mt.a,tm({},n._formItems.get(Zv.description),_t.getValidation(Zv.description+n.state.award.order,n.state.fieldErrors,n.state.submitted||n.props.readonly),{children:Object(o.jsx)(Mr,{id:"Description Award "+n.state.award.order,readonly:n.props.readonly},void 0)}),void 0),Object(o.jsx)("label",{title:"Total Weeks Award "+n.state.award.order,htmlFor:"Total Weeks Award "+n.state.award.order},void 0),Object(o.jsx)(mt.a,tm({},n._formItems.get(Zv.totalWeeks),_t.getValidation(Zv.totalWeeks+n.state.award.order,n.state.fieldErrors,n.state.submitted||n.props.readonly),{children:Object(o.jsx)(Ni.a,{id:"Total Weeks Award "+n.state.award.order,disabled:n.props.readonly},void 0)}),void 0),Object(o.jsx)("label",{title:"Total Credits Award "+n.state.award.order,htmlFor:"Total Credits Award "+n.state.award.order},void 0),Object(o.jsx)(mt.a,tm({},n._formItems.get(Zv.totalCredits),_t.getValidation(Zv.totalCredits+n.state.award.order,n.state.fieldErrors,n.state.submitted||n.props.readonly),{children:Object(o.jsx)(Ni.a,{id:"Total Credits Award "+n.state.award.order,disabled:n.props.readonly},void 0)}),void 0),Object(o.jsx)("label",{title:"Mode of Delivery Award "+n.state.award.order,htmlFor:"Mode of Delivery Award "+n.state.award.order},void 0),Object(o.jsx)(mt.a,tm({},n._formItems.get(Zv.programAwardModesOfDeliveryIds),_t.getValidation(Zv.programAwardModesOfDeliveryIds+n.state.award.order,n.state.fieldErrors,n.state.submitted||n.props.readonly),{children:Object(o.jsx)(hd,tm({id:"Mode of Delivery Award "+n.state.award.order,mode:"multiple",disabled:n.props.readonly},{children:n.state.modeOfDelivery.map((function(e){return n.renderModeOfDelivery(e)}))}),void 0)}),void 0),n.renderLocation(),Object(o.jsx)(al,{thirdPartyCredentials:null!==(t=n.state.award.thirdPartyCredentials)&&void 0!==t?t:[],awardIndex:n.state.award.order,readonly:n.props.readonly||n.state.loading||n.state.submitting,submitted:n.state.submitted||n.props.readonly,fieldErrors:n.state.fieldErrors},void 0),n.renderActions()]}),void 0)}),void 0)},n.renderErrors=function(){if(n.state.error)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:n.state.message},void 0)},n.state={changeRequest:$a.create(),award:Zv.create({awardTypeId:null,iowaVariationId:null,instructionalLevelId:null,typeOfProgramId:null,specialEmphasisId:null,objectPurposeId:null,totalWeeks:null,totalCredits:null}),awardTypes:[],iowaVariations:[],instructionalLevels:[],modeOfDelivery:[],objectPurposes:[],specialEmphasis:[],terms:[],typeOfPrograms:[],institutionLocations:[]},n}return em(t,e),t.prototype.componentDidMount=function(){this.fetchData()},t.prototype.componentDidUpdate=function(e){this.props.changeRequestId&&e.changeRequestId!=this.props.changeRequestId&&this.fetchData(),this.props.loading!=e.loading&&this.setState({loading:this.props.loading})},t.prototype.renderActions=function(){if(!this.props.readonly)return Object(o.jsxs)(y.b,tm({direction:"horizontal",wrap:!0},{children:[Object(o.jsx)(rs,{onClick:this.props.onPrevious},void 0),Object(o.jsx)(ss,{submitting:this.state.submitting},void 0),Object(o.jsx)(Ir,{disabled:!this.state.altered,resetting:this.state.resetting,onConfirm:this.resetForm},void 0)]}),void 0)},t.prototype.renderLocation=function(){var e=this;if(this.state.institutionLocations.length>1)return Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)("label",{title:"Institution Location Award "+this.state.award.order,htmlFor:"Institution Location Award "+this.state.award.order},void 0),Object(o.jsx)(mt.a,tm({},this._formItems.get(Zv.programAwardInstitutionLocationIds),_t.getValidation(Zv.programAwardInstitutionLocationIds+this.state.award.order,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(hd,tm({id:"Institution Location Award "+this.state.award.order,mode:"multiple",disabled:this.props.readonly},{children:this.state.institutionLocations.map((function(t){return e.renderInstitutionLocations(t)}))}),void 0)}),void 0)]},void 0)},t.prototype.renderAwardType=function(e){var t,n;if(e.id)return Object(o.jsxs)(pr.a.Option,tm({value:null!==(t=e.id)&&void 0!==t?t:re.default.Empty()},{children:[e.code," - ",e.name]}),null!==(n=e.id)&&void 0!==n?n:re.default.Empty())},t.prototype.renderTypesOfProgram=function(e){var t,n;if(e.id)return Object(o.jsxs)(pr.a.Option,tm({value:null!==(t=e.id)&&void 0!==t?t:re.default.Empty()},{children:[e.code," - ",e.name]}),null!==(n=e.id)&&void 0!==n?n:re.default.Empty())},t.prototype.renderObjectPurpose=function(e){var t,n;if(e.id)return Object(o.jsxs)(pr.a.Option,tm({value:null!==(t=e.id)&&void 0!==t?t:re.default.Empty()},{children:[e.code," - ",e.name]}),null!==(n=e.id)&&void 0!==n?n:re.default.Empty())},t.prototype.renderSpecialEmphasis=function(e){var t,n;if(e.id)return Object(o.jsxs)(pr.a.Option,tm({value:null!==(t=e.id)&&void 0!==t?t:re.default.Empty()},{children:[e.code," - ",e.name]}),null!==(n=e.id)&&void 0!==n?n:re.default.Empty())},t.prototype.renderInsturctionalLevel=function(e){var t,n;if(e.id)return Object(o.jsxs)(pr.a.Option,tm({value:null!==(t=e.id)&&void 0!==t?t:re.default.Empty()},{children:[e.code," - ",e.name]}),null!==(n=e.id)&&void 0!==n?n:re.default.Empty())},t.prototype.renderIowaVariation=function(e){var t,n;if(e.id)return Object(o.jsxs)(pr.a.Option,tm({value:null!==(t=e.id)&&void 0!==t?t:re.default.Empty()},{children:[e.code," - ",e.name]}),null!==(n=e.id)&&void 0!==n?n:re.default.Empty())},t.prototype.renderInstitutionLocations=function(e){var t,n;if(e.id)return Object(o.jsxs)(pr.a.Option,tm({value:null!==(t=e.id)&&void 0!==t?t:re.default.Empty()},{children:[e.name," - ",e.street1," "]}),null!==(n=e.id)&&void 0!==n?n:re.default.Empty())},t.prototype.renderModeOfDelivery=function(e){var t,n;if(e.id)return Object(o.jsxs)(pr.a.Option,tm({value:null!==(t=e.id)&&void 0!==t?t:re.default.Empty()},{children:[" ",e.name]}),null!==(n=e.id)&&void 0!==n?n:re.default.Empty())},t}(a.Component),rm=function(e){return Object.assign({changeRequestId:"00000000-0000-0000-0000-000000000000",programAwardId:"00000000-0000-0000-0000-000000000000"},e)},im=function(e){return Object.assign({changeRequestId:"00000000-0000-0000-0000-000000000000",programAwardId:"00000000-0000-0000-0000-000000000000",termId:"00000000-0000-0000-0000-000000000000"},e)},om=function(e){return Object.assign({changeRequestId:"00000000-0000-0000-0000-000000000000",programModificationProgramAward:null},e)},am=function(e){return Object.assign({changeRequestId:"00000000-0000-0000-0000-000000000000",totalCredits:0,totalTechCoreCredits:0,programModificationProgramAward:null},e)},sm=function(e){return Object.assign({totalCredits:0,totalTechCoreCredits:0,changeRequestId:"00000000-0000-0000-0000-000000000000",programAward:null},e)},dm=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),cm=function(){return cm=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},cm.apply(this,arguments)},lm=function(e){function t(t){var n=e.call(this,t)||this;return n.state={},n}return dm(t,e),t.prototype.render=function(){var e=this.props.htmlType?this.props.htmlType:"button",t=this.props.type?this.props.type:"default";return Object(o.jsx)(rt.a,cm({},this.props,{htmlType:e,type:t,icon:Object(o.jsx)(es.a,{},void 0),loading:this.props.submitting||this.props.loading},{children:"Previous"}),void 0)},t}(a.Component),um=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),pm=function(){return pm=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},pm.apply(this,arguments)},fm=function(e){function t(t){var n=e.call(this,t)||this;return n._programTermEditor=a.createRef(),n._searchForProgramTermRef=a.createRef(),n._formRef=a.createRef(),n.termsLoaded=!1,n.getProgramModificationFormItems=function(e){return(new Map).set(Zv.prerequisite,{required:!0,name:Zv.prerequisite,label:"Does this award have any prerequisites?",rules:[Ot.required()]}).set(Zv.terms,{name:[e,Zv.terms]}).set(Zv.totalCredits,{name:Zv.totalCredits})},n.getProgramTermsFormItems=function(e){return(new Map).set(_l.informationalContent,{label:"Term Description",name:[e,_l.informationalContent]}
1).set(_l.termId,{label:"Term Type",name:[e,_l.termId]})},n.allTermsLoaded=function(){var e=!1;return n.state.termLoading.forEach((function(t){t.valueOf()&&(e=!0)})),e},n.handleTermsLoaded=function(e){var t=n.state.termLoading;t.set(e,!1),n.setState({termLoading:t})},n.ValidateStep4=function(){n.setState({loading:!0,validating:!0});var e=0,t=0;n.state.totalCredits.forEach((function(t){return e+=t})),n.state.totalTechCoreCredits.forEach((function(e){return t+=e}));var r=sm({changeRequestId:n.props.changeRequestId,programAward:n.state.programAward,totalCredits:e,totalTechCoreCredits:t});return Dv.validateProgramModificationChangeRequestStep4(r).then((function(e){var t;if(e){var r=null!==(t=n.state.fieldErrors)&&void 0!==t?t:{};for(var i in e.fieldErrors)r[i]||(r[i]=e.fieldErrors[i]);n.props.onIsValid&&n.props.onIsValid(e.succeeded),n.setState({fieldErrors:n.props.changeRequestDetailsPage?null:r})}})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.loadChangeRequest=function(){var e=rm({changeRequestId:n.props.changeRequestId,programAwardId:n.props.awardId}),t=[];return Dv.getStep4(e).then((function(e){var r,i,o,a,s,d,c,l,u,p,f;if(e){var h=null!==(a=null===(o=null===(i=null===(r=e.changeRequest)||void 0===r?void 0:r.programModificationChangeRequest)||void 0===i?void 0:i.programModificationAwards)||void 0===o?void 0:o.find((function(e){return e.id==n.props.awardId})))&&void 0!==a?a:Zv.create();0!=(null===(s=null===h||void 0===h?void 0:h.terms)||void 0===s?void 0:s.length)||n.props.readonly||h.terms.push(gl.create({order:1})),0!=(null===(d=null===h||void 0===h?void 0:h.terms)||void 0===d?void 0:d.length)||n.props.readonly||h.terms.push(gl.create({order:1})),t=null!==(l=null===(c=h.terms)||void 0===c?void 0:c.map((function(e){return e.id})))&&void 0!==l?l:[],n.setState({changeRequest:null!==(u=e.changeRequest)&&void 0!==u?u:$a.create(),programModification:null!==(f=null===(p=e.changeRequest)||void 0===p?void 0:p.programModificationChangeRequest)&&void 0!==f?f:zv.create(),programAward:h,fieldErrors:n.props.changeRequestDetailsPage?null:e.fieldErrors})}})).catch((function(){n.setState({error:!0,message:"Could not load change request."})})).finally((function(){var e=[];t.forEach((function(t){return e.push(n.loadTerm(null!==t&&void 0!==t?t:re.default.Empty()))})),Promise.all(e).then((function(){n.termsLoaded=!0,n.resetForm()}))}))},n.loadTerm=function(e){var t=n.state.termLoading;t.set(e,!0),n.setState({termLoading:t});var r=im({changeRequestId:n.props.changeRequestId,programAwardId:n.props.awardId,institutionId:n.props.selectedInstitution,termId:e});return Dv.getStep4Term(r).then((function(e){var t,r,i,o;if(e){var a=n.state.programAward;a.terms&&(a.terms[null!==(r=null===(t=a.terms)||void 0===t?void 0:t.findIndex((function(t){var n;return t.order==(null===(n=e.term)||void 0===n?void 0:n.order)})))&&void 0!==r?r:0]=null!==(i=e.term)&&void 0!==i?i:_l.create());var s=null!==(o=n.state.fieldErrors)&&void 0!==o?o:{};for(var d in e.fieldErrors)s[d]||(s[d]=e.fieldErrors[d]);n.setState({programAward:a,fieldErrors:n.props.changeRequestDetailsPage?null:s,allTermsLoaded:!1},(function(){return n.resetForm()}))}})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.resetForm=function(){var e;n.setState({altered:!1}),null===(e=n._formRef.current)||void 0===e||e.resetFields([Zv.terms])},n.copyExistingTerm=function(e,t){var r=n.state.existingProgramTerms.find((function(e){var t;return e.id==(null===(t=n._searchForProgramTermRef.current)||void 0===t?void 0:t.submit())}));if(r){var i={id:re.default.Empty(),order:t};e(gl.create(pm(pm({},r),i))),n.setState({addTerm:!1})}},n.handleSave=function(){var e,t;n.setState({saving:!0});for(var r=Zv.create(n._formRef?n._formRef.current.getFieldsValue():null),i=[],o=0;o<r.terms.length;o++){var a=r.terms[o];r.terms[o][Zv.terms]?((a=r.terms[o][Zv.terms])[Sl.order]=r.terms[o][Sl.order],a[_l.informationalContent]=r.terms[o][_l.informationalContent],a[_l.termId]=r.terms[o][_l.termId],a[_l.programAwardId]=null!==(e=n.props.awardId)&&void 0!==e?e:re.default.Empty()):((a=r.terms[o])[Sl.order]=r.terms[o][Sl.order],a[_l.informationalContent]=r.terms[o][_l.informationalContent],a[_l.termId]=r.terms[o][_l.termId],a[_l.programAwardId]=null!==(t=n.props.awardId)&&void 0!==t?t:re.default.Empty()),i.push(a)}r.terms=i,r[Zv.id]=n.props.awardId;var s=0,d=0;
1n.state.totalCredits.forEach((function(e){return s+=e})),n.state.totalTechCoreCredits.forEach((function(e){return d+=e}));var c=om({changeRequestId:n.state.changeRequest.id==re.default.Empty()?n.props.changeRequestId:n.state.changeRequest.id,programModificationProgramAward:r,totalCredits:s,totalTechCoreCredits:d});Dv.saveStep4(c).then((function(e){var t,r,i,o,a,s,d,c,l,u,p,f;if(null===e||void 0===e?void 0:e.succeeded){S.b.success("Saved");var h=null!==(o=null===(i=null===(r=null===(t=e.changeRequest)||void 0===t?void 0:t.programModificationChangeRequest)||void 0===r?void 0:r.programModificationAwards)||void 0===i?void 0:i.find((function(e){return e.id==n.props.awardId})))&&void 0!==o?o:Zv.create();n.setState({changeRequest:null!==(a=e.changeRequest)&&void 0!==a?a:$a.create(),programModification:null!==(d=null===(s=e.changeRequest)||void 0===s?void 0:s.programModificationChangeRequest)&&void 0!==d?d:zv.create(),programAward:null!==(p=null===(u=null===(l=null===(c=e.changeRequest)||void 0===c?void 0:c.programModificationChangeRequest)||void 0===l?void 0:l.programModificationAwards)||void 0===u?void 0:u.find((function(e){return e.id==n.props.awardId})))&&void 0!==p?p:Zv.create()}),null===(f=n._formRef.current)||void 0===f||f.setFieldsValue({terms:h.terms}),n.resetForm()}else n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Save Failed")})).catch((function(e){n.setState({error:e}),S.b.error("Save Failed")})).finally((function(){n.setState({loading:!1,saving:!1})}))},n.calculateTotalCredits=function(e,t,r){var i=n.state.totalCredits;(i=i||(new Map).set(e,t)).set(e,t);var o=n.state.totalTechCoreCredits;(o=o||(new Map).set(e,r)).set(e,r),n.setState({totalCredits:i,totalTechCoreCredits:o})},n.handleSubmit=function(){var e,t;n.setState({submitted:!0,submitting:!0});for(var r=Zv.create(n._formRef?n._formRef.current.getFieldsValue():null),i=[],o=0;o<r.terms.length;o++){var a=r.terms[o];r.terms[o][Zv.terms]?((a=r.terms[o][Zv.terms])[Sl.order]=r.terms[o][Sl.order],a[_l.informationalContent]=r.terms[o][_l.informationalContent],a[_l.termId]=r.terms[o][_l.termId],a[_l.programAwardId]=null!==(e=n.props.awardId)&&void 0!==e?e:re.default.Empty()):((a=r.terms[o])[Sl.order]=r.terms[o][Sl.order],a[_l.informationalContent]=r.terms[o][_l.informationalContent],a[_l.termId]=r.terms[o][_l.termId],a[_l.programAwardId]=null!==(t=n.props.awardId)&&void 0!==t?t:re.default.Empty()),i.push(a)}r.order=n.state.programAward.order,r[Zv.totalCredits]=n.state.programAward.totalCredits,r[Zv.awardTypeId]=n.state.programAward.awardTypeId,r.terms=i,r[Zv.id]=n.props.awardId,r[Zv.programModificationChangeRequestId]=n.state.programModification.id;var s=0,d=0;n.state.totalCredits.forEach((function(e){return s+=e})),n.state.totalTechCoreCredits.forEach((function(e){return d+=e}));var c=am({changeRequestId:n.state.changeRequest.id==re.default.Empty()?n.props.changeRequestId:n.state.changeRequest.id,programModificationProgramAward:r,totalCredits:s,totalTechCoreCredits:d});Dv.submitStep4(c).then((function(e){var t;(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.props.onSubmit&&n.props.onSubmit(null!==(t=n.state.changeRequest.id)&&void 0!==t?t:re.default.Empty())):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Save Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Save Failed")})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.handlePrequisiteOnClick=function(e){var t,r,i,o,a=n._formRef?n._formRef.current.getFieldsValue():null,s=n.state.programAward,d=a.terms,c=[];if(e)c.push(gl.create({order:0})),c.pushAll(d),null===(t=n._formRef.current)||void 0===t||t.resetFields([0,Zv.terms]);else if(1==s.prerequisite){var l=n.state.totalCredits,u=n.state.totalTechCoreCredits;u.delete(0),l.delete(0),n.setState({totalCredits:l,totalTechCoreCredits:u}),null===d||void 0===d||d.remove(d[0]),c.pushAll(d)}else c.pushAll(d);null===(r=s.terms)||void 0===r||r.removeAll(s.terms),null===(i=s.terms)||void 0===i||i.pushAll(c),s.prerequisite=e,null===(o=n._formRef.current)||void 0===o||o.setFieldsValue({terms:s.terms}),n.setState({programAward:s})},n.render=function(){var e,t;if(n.state.loading||void 0==n.state.loading||n.props.loading)return Object(o.jsx)(pt.a,{active:!0},void 0);var r=0;
1n.state.totalCredits.forEach((function(e){return r+=e}));var i=0;return n.state.totalTechCoreCredits.forEach((function(e){return i+=e})),Object(o.jsx)(y.b,pm({size:"small",direction:"vertical"},{children:Object(o.jsx)(ht.a,pm({ref:n._formRef,layout:"vertical",initialValues:n.state.programAward,onFinish:n.handleSubmit,requiredMark:!n.props.readonly},{children:Object(o.jsxs)(y.b,pm({direction:"vertical"},{children:[Object(o.jsx)(mt.a,pm({},n.getProgramModificationFormItems(0).get(Zv.prerequisite),_t.getValidation(Zv.prerequisite+n.state.programAward.order,n.state.fieldErrors,n.props.readonly||n.state.submitted),{children:Object(o.jsx)(Hd,{disabled:n.props.readonly,onChange:n.handlePrequisiteOnClick},void 0)}),void 0),n.renderProgramTerm(),Object(o.jsxs)("b",{children:["Award Total Credits: ",r]},void 0),(null===(t=null===(e=n.state.programModification.program)||void 0===e?void 0:e.currentDetail)||void 0===t?void 0:t.isTransferMajor)?null:Object(o.jsxs)("b",{children:["Award Total Tech Core Credits: ",i]},void 0),n.renderTermsErrors(),n.renderCreditLimitErrors(),n.renderTechCoreCreditsErrors(),n.renderActions()]}),void 0)}),void 0)}),void 0)},n.addTerm=function(e,t){t(gl.create({order:e&&0!=e.length&&void 0!=e[e.length-1]?e[e.length-1].order+1:1}))},n.removeTerm=function(e,t,r){var i=n.state.totalCredits,o=n.state.totalTechCoreCredits,a=r?e.name:e.name+1;i.delete(a),o.delete(a),n.setState({totalCredits:i,totalTechCoreCredits:o}),t(e.name)},n.renderCreditLimitErrors=function(){var e;if(n.state.fieldErrors)return null===(e=_t.getValidation("awardCredits"+n.state.programAward.order,n.state.fieldErrors,n.state.submitted||n.props.readonly))||void 0===e?void 0:e.messages.map((function(e){return n.renderErrors(e)}))},n.renderTechCoreCreditsErrors=function(){var e;if(n.state.fieldErrors)return null===(e=_t.getValidation("techCoreCredits"+n.state.programAward.order,n.state.fieldErrors,n.state.submitted||n.props.readonly))||void 0===e?void 0:e.messages.map((function(e){return n.renderErrors(e)}))},n.renderTermsErrors=function(){var e;if(n.state.fieldErrors)return null===(e=_t.getValidation("termData"+n.state.programAward.order,n.state.fieldErrors,n.state.submitted||n.props.readonly))||void 0===e?void 0:e.messages.map((function(e){return n.renderErrors(e)}))},n.renderErrors=function(e){return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:e||n.state.message},void 0)},n.state={addTerm:!1,changeRequest:$a.create(),programModification:zv.create(),programAward:Zv.create(),existingProgramTerms:[],programAwardTerms:[],allTermsLoaded:!1,validating:!1,termLoading:new Map,totalCredits:new Map,totalTechCoreCredits:new Map},n}return um(t,e),t.prototype.componentDidMount=function(){var e=this;if(this.props.changeRequestId&&this.props.changeRequestId!=re.default.Empty()){this.setState({loading:!0});var t=[];t.push(this.loadChangeRequest()),Promise.all(t).then((function(){e.setState({loading:!1}),e.resetForm()}))}},t.prototype.componentDidUpdate=function(e){var t,n=this;this.props.changeRequestId&&this.props.changeRequestId!=re.default.Empty()&&e.changeRequestId!=this.props.changeRequestId&&((t=[]).push(this.loadChangeRequest()),Promise.all(t).then((function(){n.setState({loading:!1}),n.resetForm()})));this.props.review&&!this.allTermsLoaded()&&!this.state.allTermsLoaded&&this.termsLoaded&&!this.state.validating&&this.state.termLoading.size>0&&this.state.programAward.id!=re.default.Empty()&&((t=[]).push(this.ValidateStep4()),Promise.all(t).then((function(){n.setState({loading:!1,allTermsLoaded:!0,validating:!1})})))},t.prototype.renderProgramTerm=function(){var e=this;return Object(o.jsx)(ht.a.List,pm({name:Zv.terms},{children:function(t,n){var r,i,a=n.add,s=n.remove,d=null===(r=e._formRef.current)||void 0===r?void 0:r.getFieldValue(nl.terms);return void 0!=d&&0!=d.length||(d=null!==(i=e.state.programAward.terms)&&void 0!==i?i:[]),Object(o.jsxs)(y.b,pm({direction:"vertical"},{children:[t.map((function(t,n){var r,i,a,c,l,u,p,f,h=(null===(r=e._formRef.current)||void 0===r?void 0:r.getFieldValue(Zv.prerequisite))?null===(i=e._formRef.current)||void 0===i?void 0:i.getFieldValue(Zv.prerequisite):e.state.programAward.prerequisite,v=h&&0==n?"Prerequisite":"Term "+(n+(h?0:1)),m=h&&0==n||e.props.readonly?null:Object(o.jsx)(rt.a,{onClick:function(){return e.removeTerm(t,s,h)},type:"link",icon:Object(o.jsx)(Yd.a,{},void 0)},void 0),g=(null!==d&&void 0!==d?d:[gl.create])[n],b={id:null===g||void 0===g?void 0:g.id,prerequisite:null===g||void 0===g?void 0:g.prerequisite,groups:null===g||void 0===g?void 0:g.groups,flatCourseGroupOptions:null===g||void 0===g?void 0:g.flatCourseGroupOptions,order:null===g||void 0===g?void 0:g.order},y=null!==(l=null===(c=null===(a=e.state.programModification.program)||void 0===a?void 0:a.currentDetail)||void 0===c?void 0:c.isTransferMajor)&&void 0!==l&&l;return Object(o.jsxs)(Qn.a,pm({type:"inner",size:"small",title:v,extra:m},{children:[Object(o.jsx)(mt.a,pm({},e.getProgramTermsFormItems(n).get(gl.termId),_t.getValidation(gl.termId+e.state.programAward.order,e.state.fieldErrors,e.state.submitted||e.props.readonly),{children:Object(o.jsx)(Cu,{readOnly:e.props.readonly},void 0)}),void 0),Object(o.jsx)(mt.a,pm({},e.getProgramTermsFormItems(n).get(gl.informationalContent),_t.getValidation(gl.informationalContent+e.state.programAward.order,e.state.fieldErrors,e.state.submitted||e.props.readonly),{children:Object(o.jsx)(Mr,{readonly:e.props.readonly},void 0)}),void 0),Object(o.jsx)(mt.a,pm({initialValue:b},e.getProgramModificationFormItems(n).get(Zv.terms),_t.getValidation(Zv.terms,e.state.fieldErrors,e.state.submitted),{children:Object(o.jsx)(Eu,{ref:e._programTermEditor,programAward:e.state.programAward,transferMajor:y,selectedInstitution:e.state.changeRequest.institutionId,loading:!!e.state.programAward.terms&&(null===(u=e.state.termLoading)||void 0===u?void 0:u.get(null!==(p=b.id)&&void 0!==p?p:re.default.Empty())),readonly:e.props.readonly,termIndex:n,fieldErrors:e.state.fieldErrors,submitted:e.state.submitted||e.props.readonly,onCreditsChanged:e.calculateTotalCredits,onTermLoaded:e.handleTermsLoaded,isEditing:!0,prerequisite:h,installTerm:null!==(f=e.state.programModification.install)&&void 0!==f?f:bl.create()},n)}),void 0)]}),t.key)})),e.props.readonly?null:Object(o.jsx)(rt.a,pm({onClick:function(){return e.addTerm(d,a)}},{children:"Add Term"}),void 0)]}),void 0)}}),void 0)},t.prototype.renderActions=function(){if(!this.props.readonly)return Object(o.jsxs)(y.b,pm({direction:"horizontal",wrap:!0},{children:[Object(o.jsx)(lm,{onClick:this.props.onPrevious},void 0),Object(o.jsx)(ss,{submitting:this.state.submitting||this.state.saving},void 0),Object(o.jsx)(Tr,{type:"default",htmlType:"button",onClick:this.handleSave,saving:this.state.submitting||this.state.saving,saved:this.state.saved},void 0),Object(o.jsx)(Ir,{disabled:!this.state.altered,resetting:this.state.resetting,onConfirm:this.resetForm},void 0)]}),void 0)},t}(a.Component),hm=function(e){return Object.assign({programModificationChangeRequest:null},e)},vm=function(e){return Object.assign({changeRequestId:"00000000-0000-0000-0000-000000000000"},e)},mm={className:"ProgramModificationAdvisoryBoardContactDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",programModificationChangeRequestId:"00000000-0000-0000-0000-000000000000",programModificationChangeRequest:null,firstName:"",lastName:"",genderId:null,gender:null,employer:"",position:"",disability:null,organizedLabor:null,ethnicGroupId:null,ethnicGroup:null},e)},id:"id",programModificationChangeRequestId:"programModificationChangeRequestId",programModificationChangeRequest:"programModificationChangeRequest",firstName:"firstName",lastName:"lastName",genderId:"genderId",gender:"gender",employer:"employer",position:"position",disability:"disability",organizedLabor:"organizedLabor",ethnicGroupId:"ethnicGroupId",ethnicGroup:"ethnicGroup"},gm=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),bm=function(){return bm=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},bm.apply(this,arguments)},ym=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n.cleanDates=function(e){return e.advisoryBoardApprovalDate=It()(e.advisoryBoardApprovalDate),e.curriculumApprovalProcessDateOfApproval=It()(e.curriculumApprovalProcessDateOfApproval),e},n.fetchData=function(){n.setState({loading:!0});var e=[];0==n.state.genders.length&&e.push(n.loadGenders()),0==n.state.racialEthnicGroups.length&&e.push(n.loadEthnicGroups()),n.props.changeRequestId&&n.props.changeRequestId==re.default.Empty()||e.push(n.loadChangeRequest()),Promise.all(e).then((function(){n.setState({loading:!1})}
1))},n.loadGenders=function(){return ce.getAll(Bu.className).then((function(e){e&&n.setState({genders:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadEthnicGroups=function(){return ce.getAll(Gu.className).then((function(e){e&&n.setState({racialEthnicGroups:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadChangeRequest=function(){var e=vm({changeRequestId:n.props.changeRequestId});return Dv.getStep5(e).then((function(e){var t,r,i;if(e){var o=null!==(r=null===(t=e.changeRequest)||void 0===t?void 0:t.programModificationChangeRequest)&&void 0!==r?r:zv.create();n.cleanApprovalDates(o),n.setState({changeRequest:null!==(i=e.changeRequest)&&void 0!==i?i:$a.create(),programModification:o,fieldErrors:n.props.changeRequestDetailsPage?null:e.fieldErrors},(function(){return n.resetForm()}))}})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.cleanApprovalDates=function(e){"1970-01-01T00:00:00.000Z"==e.curriculumApprovalProcessDateOfApproval||"0001-01-01T00:00:00+00:00"==e.curriculumApprovalProcessDateOfApproval?e.curriculumApprovalProcessDateOfApproval="":e.curriculumApprovalProcessDateOfApproval=It()(e.curriculumApprovalProcessDateOfApproval),"1970-01-01T00:00:00.000Z"==e.advisoryBoardApprovalDate||"0001-01-01T00:00:00+00:00"==e.advisoryBoardApprovalDate?e.advisoryBoardApprovalDate="":e.advisoryBoardApprovalDate=It()(e.advisoryBoardApprovalDate)},n.getAdvisoryBoardFormItems=function(){return(new Map).set(zv.advisoryBoardApprovalDate,{label:" Advisory Board Date Of Approval",name:zv.advisoryBoardApprovalDate,required:!0,rules:[Ot.required()]}).set(zv.curriculumApprovalProcessDateOfApproval,{label:"Curriculum Approval Process Date of Approval",name:zv.curriculumApprovalProcessDateOfApproval,required:!0,rules:[Ot.required()]})},n.getContactFormItems=function(e){return(new Map).set(mm.firstName,{name:[e,mm.firstName],label:"First Name"}).set(mm.lastName,{name:[e,mm.lastName],label:"Last Name"}).set(mm.employer,{name:[e,mm.employer],label:"Employer"}).set(mm.position,{name:[e,mm.position],label:"Postition"}).set(mm.genderId,{name:[e,mm.genderId],label:"Gender"}).set(mm.ethnicGroupId,{name:[e,mm.ethnicGroupId],label:"Ethnic Group"}).set(mm.disability,{name:[e,mm.disability],label:"Has the advisory board member self-identified as having a disability?"}).set(mm.organizedLabor,{name:[e,mm.organizedLabor],label:"Is this member a part of organized labor?"})},n.resetForm=function(){var e;n.setState({altered:!1}),null===(e=n._formRef.current)||void 0===e||e.resetFields()},n.handleChange=function(){n.setState({altered:!0})},n.handleSave=function(){var e,t;n.setState({saving:!0});var r=zv.create(null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldsValue());r.changeRequestId=null!==(t=n.state.changeRequest.id)&&void 0!==t?t:re.default.Empty();var i=hm({changeRequestId:n.state.changeRequest.id,programModificationChangeRequest:r});Dv.saveStep5(i).then((function(e){var t,r,i,o;(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create(),programModification:n.cleanDates(null!==(i=null===(r=e.changeRequest)||void 0===r?void 0:r.programModificationChangeRequest)&&void 0!==i?i:zv.create())}),n.resetForm(),n.props.onSave&&(e.changeRequest&&n.props.onSave(null!==(o=e.changeRequest.id)&&void 0!==o?o:re.default.Empty()),n.resetForm())):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Save Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Save Failed")})).finally((function(){n.setState({loading:!1,saving:!1})}))},n.handleSubmit=function(){var e,t;n.setState({submitting:!0});var r=zv.create(null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldsValue());r.changeRequestId=null!==(t=n.state.changeRequest.id)&&void 0!==t?t:re.default.Empty();var i=hm({programModificationChangeRequest:r});Dv.submitStep5(i).then((function(e){var t;(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.props.onSubmit&&n.props.onSubmit(null!==(t=n.state.changeRequest.i
1d)&&void 0!==t?t:re.default.Empty())):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Save Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Save Failed")})).finally((function(){n.setState({loading:!1,submitting:!1,submitted:!0})}))},n.state={changeRequest:$a.create(),changeRequests:[],genders:[],racialEthnicGroups:[],programModification:zv.create({advisoryBoardApprovalDate:"",curriculumApprovalProcessDateOfApproval:""})},n}return gm(t,e),t.prototype.componentDidMount=function(){this.fetchData()},t.prototype.componentDidUpdate=function(e){this.props.changeRequestId&&this.props.changeRequestId!=e.changeRequestId&&this.fetchData(),this.props.loading!=e.loading&&this.setState({loading:this.props.loading})},t.prototype.render=function(){var e=this;return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(y.b,bm({size:"small",direction:"vertical"},{children:[this.renderErrors(),Object(o.jsx)(ht.a,bm({ref:this._formRef,layout:"vertical",initialValues:this.state.programModification,onValuesChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!0},{children:Object(o.jsxs)(y.b,bm({direction:"vertical"},{children:[Object(o.jsx)(mt.a,bm({},this.getAdvisoryBoardFormItems().get(zv.curriculumApprovalProcessDateOfApproval),_t.getValidation(zv.curriculumApprovalProcessDateOfApproval,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ur.a,{format:"M/D/YYYY",disabled:this.props.readonly,disabledDate:$r.isFutureDate},void 0)}),void 0),Object(o.jsx)(mt.a,bm({},this.getAdvisoryBoardFormItems().get(zv.advisoryBoardApprovalDate),_t.getValidation(zv.advisoryBoardApprovalDate,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ur.a,{format:"M/D/YYYY",disabled:this.props.readonly,disabledDate:$r.isFutureDate},void 0)}),void 0),Object(o.jsx)(ot.a.Paragraph,bm({italic:!0},{children:"Please provide the advisor information for this program."}),void 0),Object(o.jsx)(ht.a.List,bm({name:zv.programModificationAdvisoryBoardContacts},{children:function(t,n){var r=n.add,i=n.remove;return Object(o.jsxs)(y.b,bm({direction:"vertical"},{children:[t.map((function(t,n){return e.renderAdvisors(n,i)})),e.renderAddAdditionalAdvisor(r)]}),void 0)}}),void 0),this.renderActions()]}),void 0)}),void 0)]}),void 0)},t.prototype.renderAdvisors=function(e,t){var n=this,r="Advisor "+(e+1),i=this.props.readonly?null:Object(o.jsx)(rt.a,{type:"link",icon:Object(o.jsx)(Yd.a,{},void 0),onClick:function(){return t(e)}},void 0);return Object(o.jsxs)(Qn.a,bm({type:"inner",title:r,extra:i},{children:[Object(o.jsxs)(b.a,bm({gutter:[16,16]},{children:[Object(o.jsx)(m.a,bm({},En.HALF,{children:Object(o.jsx)(mt.a,bm({},this.getContactFormItems(e).get(mm.firstName),_t.getValidation(mm.className.toLowerCase()+mm.firstName.toLowerCase()+e,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ut.a,{disabled:this.props.readonly},void 0)}),void 0)}),void 0),Object(o.jsx)(m.a,bm({},En.HALF,{children:Object(o.jsx)(mt.a,bm({},this.getContactFormItems(e).get(mm.lastName),_t.getValidation(mm.className.toLowerCase()+mm.lastName.toLowerCase()+e,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ut.a,{disabled:this.props.readonly},void 0)}),void 0)}),void 0)]}),void 0),Object(o.jsxs)(b.a,bm({gutter:[16,16]},{children:[Object(o.jsx)(m.a,bm({},En.HALF,{children:Object(o.jsx)(mt.a,bm({},this.getContactFormItems(e).get(mm.employer),_t.getValidation(mm.className.toLowerCase()+mm.employer.toLowerCase()+e,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ut.a,{disabled:this.props.readonly},void 0)}),void 0)}),void 0),Object(o.jsx)(m.a,bm({},En.HALF,{children:Object(o.jsx)(mt.a,bm({},this.getContactFormItems(e).get(mm.position),_t.getValidation(mm.className.toLowerCase()+mm.position.toLowerCase()+e,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(ut.a,{disabled:this.props.readonly},void 0)}),void 0)}),void 0)]}),void 0),Object(o.jsxs)(b.a,bm({gutter:[16,16]},{children:[Object(o.jsx)(m.a,bm({},En.HALF,{children:Object(o.jsx)(mt.a,bm({},this.getContactFormItems(e).get(mm.genderId),_t.getValidation(mm.className.toLowerCase()+mm.genderId.toLowerCase()+e,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(hd,bm({showArrow:!this.props.readonly,disabled:this.props.readonly,dropdownMatchSelectWidth:!1},{children:this.state.genders.map((function(e){return n.renderGender(e)}))}),void 0)}),void 0)}),void 0),Object(o.jsx)(m.a,bm({},En.HALF,{children:Object(o.jsx)(mt.a,bm({},this.getContactFormItems(e).get(mm.ethnicGroupId),_t.getValidation(mm.className.toLowerCase()+mm.ethnicGroupId.toLowerCase()+e,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(hd,bm({showArrow:!this.props.readonly,disabled:this.props.readonly,dropdownMatchSelectWidth:!1},{children:this.state.racialEthnicGroups.map((function(e){return n.renderEthnicGroup(e)}))}),void 0)}),void 0)}),void 0)]}),void 0),Object(o.jsx)(b.a,bm({gutter:[16,16]},{children:Object(o.jsx)(mt.a,bm({},this.getContactFormItems(e).get(mm.organizedLabor),_t.getValidation(mm.className.toLowerCase()+mm.organizedLabor.toLowerCase()+e,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(H
1d,{disabled:this.props.readonly},void 0)}),void 0)}),void 0),Object(o.jsx)(b.a,bm({gutter:[16,16]},{children:Object(o.jsx)(mt.a,bm({},this.getContactFormItems(e).get(mm.disability),_t.getValidation(mm.className.toLowerCase()+mm.disability.toLowerCase()+e,this.state.fieldErrors,this.state.submitted||this.props.readonly),{children:Object(o.jsx)(Hd,{disabled:this.props.readonly},void 0)}),void 0)}),void 0)]}),void 0)},t.prototype.renderActions=function(){if(!this.props.readonly)return Object(o.jsxs)(y.b,bm({direction:"horizontal",wrap:!0},{children:[Object(o.jsx)(rs,{onClick:this.props.onPrevious},void 0),Object(o.jsx)(ss,{htmlType:"submit",submitting:this.state.submitting},void 0),Object(o.jsx)(Tr,{onClick:this.handleSave,type:"default",htmlType:"button",saving:this.state.saving},void 0),Object(o.jsx)(Ir,{disabled:!this.state.altered,resetting:this.state.resetting,onConfirm:this.resetForm},void 0)]}),void 0)},t.prototype.renderAddAdditionalAdvisor=function(e){if(!this.props.readonly)return Object(o.jsx)(rt.a,bm({onClick:function(){return e()},icon:Object(o.jsx)(Xc.a,{},void 0)},{children:"Add Additional Advisor"}),void 0)},t.prototype.renderGender=function(e){var t,n;if(e.id)return Object(o.jsx)(pr.a.Option,bm({value:null!==(t=e.id)&&void 0!==t?t:re.default.Empty()},{children:e.name}),null!==(n=e.id)&&void 0!==n?n:re.default.Empty())},t.prototype.renderEthnicGroup=function(e){var t,n;if(e.id)return Object(o.jsx)(pr.a.Option,bm({value:null!==(t=e.id)&&void 0!==t?t:re.default.Empty()},{children:e.name}),null!==(n=e.id)&&void 0!==n?n:re.default.Empty())},t.prototype.renderErrors=function(){if(this.state.error)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:this.state.message},void 0)},t}(a.Component),Om=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),jm=function(){return jm=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},jm.apply(this,arguments)},Im=function(e){function t(t){var n=e.call(this,t)||this;return n.render=function(){return Object(o.jsxs)(y.b,jm({size:"large",direction:"vertical"},{children:[Object(o.jsx)(Qn.a,jm({title:"Program Plan",type:"inner"},{children:Object(o.jsx)(Xv,{loading:n.props.loading,changeRequestId:n.props.changeRequest.id,selectedInstitution:n.props.changeRequest.institutionId,readonly:!0,changeRequestDetailsPage:n.props.changeRequestDetailsPage},void 0)}),void 0),Object(o.jsx)(Qn.a,jm({title:"Award Details",type:"inner"},{children:n.renderAwards()}),void 0),n.props.changeRequest.changeRequestTypeId==Xa.PROGRAMMODIFICATION?Object(o.jsx)(Qn.a,jm({title:"Advisory Board and Curriculum Committee",type:"inner"},{children:Object(o.jsx)(ym,{loading:n.props.loading,changeRequestId:n.props.changeRequest.id,selectedInstitution:n.props.changeRequest.institutionId,readonly:!0,changeRequestDetailsPage:n.props.changeRequestDetailsPage},void 0)}),void 0):null,Object(o.jsx)(Qn.a,jm({title:"Additional Information",type:"inner"},{children:Object(o.jsx)(gs,{loading:n.props.loading,changeRequest:n.props.changeRequest,readonly:!0,fieldErrors:n.props.fieldErrors,submitted:!0},void 0)}),void 0)]}),void 0)},n.state={},n}return Om(t,e),t.prototype.renderAwards=function(){var e,t,n=this,r=0;if(this.props.changeRequest.id!=re.default.Empty())return null===(t=null===(e=this.props.changeRequest.programModificationChangeRequest)||void 0===e?void 0:e.programModificationAwards)||void 0===t?void 0:t.map((function(e){return n.renderAward(e,++r)}))},t.prototype.renderAward=function(e,t){var n,r;return Object(o.jsx)(y.b,jm({direction:"vertical"},{children:Object(o.jsxs)(Qn.a,jm({title:"Award "+t,type:"inner",size:"small"},{children:[Object(o.jsx)(nm,{loading:this.props.loading,changeRequestId:this.props.changeRequest.i
1d,selectedInstitution:this.props.changeRequest.institutionId,awardId:null!==(n=e.id)&&void 0!==n?n:re.default.Empty(),readonly:!0,changeRequestDetailsPage:this.props.changeRequestDetailsPage},void 0),Object(o.jsx)(fm,{onIsValid:this.props.onIsValid,review:!0,loading:this.props.loading,changeRequestId:this.props.changeRequest.id,awardId:null!==(r=e.id)&&void 0!==r?r:re.default.Empty(),selectedInstitution:this.props.changeRequest.institutionId,readonly:!0,changeRequestDetailsPage:this.props.changeRequestDetailsPage},void 0)]}),void 0)}),void 0)},t}(a.Component),Sm=function(e){return Object.assign({changeRequestApprovalId:"00000000-0000-0000-0000-000000000000",userId:"00000000-0000-0000-0000-000000000000"},e)},Em=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Rm=function(){return Rm=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Rm.apply(this,arguments)},_m=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._formItems=(new Map).set("user",{required:!0,name:"user"}),n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields(),n.setState({altered:!1})},n.handleSubmit=function(){var e;n.setState({submitting:!0});var t=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldsValue();if(void 0!=t.user&&null!=t.user){var r=Sm({changeRequestApprovalId:n.props.approvalId,userId:t.user.id});va.redirectApproval(r).then((function(e){(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Success!"),n.props.onSuccess&&n.props.onSuccess()):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Error Saving"))})).catch((function(e){n.setState({error:e}),S.b.error("Gender could not be saved.")})).finally((function(){n.setState({loading:!1,submitting:!1})}))}else S.b.error("Error Redirecting")},n.state={},n}return Em(t,e),t.prototype.render=function(){return Object(o.jsxs)(y.b,Rm({size:"small",direction:"vertical"},{children:[Object(o.jsx)(ot.a.Paragraph,{children:"Please search for and select a user that you would like to redirect this approval to."},void 0),Object(o.jsxs)(ht.a,Rm({ref:this._formRef,layout:"vertical",onFinish:this.handleSubmit,requiredMark:!0},{children:[Object(o.jsx)(ht.a.Item,Rm({},this._formItems.get("user"),_t.getValidation("user",this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(za,{},void 0)}),void 0),Object(o.jsx)($o,{},void 0)]}),void 0)]}),void 0)},t}(a.Component),Tm=n(247),Cm=(n(556),n(336)),xm=(n(1065),function(e){return Object.assign({changeRequestId:"00000000-0000-0000-0000-000000000000"},e)}),Am=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Pm=function(){return Pm=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Pm.apply(this,arguments)},Nm=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n.getFormItems=function(){return(new Map).set(Ca,{required:!0,name:Ca,rules:[Ot.required()]})},n.triggerUpdate=function(){n.fetchData()},n.fetchData=function(){n.state.loading||n.props.changeRequestId===re.default.Empty()||va.comments(xm({changeRequestId:n.props.changeRequestId})).then((function(e){var t;n.setState({comments:null!==(t=e.comments)&&void 0!==t?t:[]})}))}
1,n.confirmApprove=function(){f.a.confirm({title:"Approve Change Request?",type:"error",content:"Are you sure you wish to approve this change request?",okText:"Approve Change Request",cancelText:"Cancel",onOk:function(){return n.handleApprove()},okButtonProps:{icon:Object(o.jsx)(Sr.a,{},void 0)}})},n.confirmDeny=function(){f.a.confirm({title:"Reject Change Request?",content:"Are you sure you wish to reject this change request? It will be sent back to the submitting user.",okText:"Reject Change Request",cancelText:"Cancel",onOk:function(){return n.handleDeny()},okButtonProps:{danger:!0,icon:Object(o.jsx)(kr.a,{},void 0)}})},n.handleDeny=function(){var e,t,r;n.setState({submitting:!0});var i=Pa({comment:null!==(t=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldValue(Na))&&void 0!==t?t:"",ChangeRequestApprovalId:null!==(r=n.props.approvalId)&&void 0!==r?r:re.default.Empty()});va.deny(i).then((function(e){var t;(null===e||void 0===e?void 0:e.succeeded)?(null===(t=n._formRef.current)||void 0===t||t.resetFields(),n.props.onSubmit&&n.props.onSubmit(),n.fetchData()):xi.a.error({message:"Could Not Approve",description:null===e||void 0===e?void 0:e.errors.join("\n")})})).catch((function(e){n.setState({error:e}),S.b.error("Error")})).finally((function(){n.setState({submitting:!1})}))},n.handleApprove=function(){var e,t,r;n.setState({submitting:!0});var i=xa({comment:null!==(t=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldValue(Aa))&&void 0!==t?t:"",changeRequestApprovalId:null!==(r=n.props.approvalId)&&void 0!==r?r:re.default.Empty()});va.approve(i).then((function(e){var t;(null===e||void 0===e?void 0:e.succeeded)?(null===(t=n._formRef.current)||void 0===t||t.resetFields(),n.props.onSubmit&&n.props.onSubmit(),n.fetchData()):xi.a.error({message:"Could Not Approve",description:null===e||void 0===e?void 0:e.errors.join("\n")})})).catch((function(e){n.setState({error:e}),S.b.error("Error")})).finally((function(){n.setState({submitting:!1})}))},n.handleComment=function(){var e,t;n.setState({submitting:!0});var r=Ta({comment:null!==(t=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldValue(Ca))&&void 0!==t?t:"",changeRequestId:n.props.changeRequestId});va.addComment(r).then((function(e){var t;(null===e||void 0===e?void 0:e.succeeded)?(null===(t=n._formRef.current)||void 0===t||t.resetFields(),n.props.onSubmit&&n.props.onSubmit(),n.fetchData()):S.b.error("Error")})).catch((function(e){n.setState({error:e}),S.b.error("Error")})).finally((function(){n.setState({submitting:!1})}))},n.state={submitting:!1,comments:[]},n}return Am(t,e),t.prototype.componentDidMount=function(){this.fetchData()},t.prototype.componentDidUpdate=function(e){this.props.changeRequestId!=e.changeRequestId&&this.fetchData(),this.props.approvalId!=e.approvalId&&this.fetchData()},t.prototype.render=function(){var e,t=this;return Object(o.jsxs)(y.b,Pm({direction:"vertical"},{children:[Object(o.jsx)(ua.b,{itemLayout:"horizontal",dataSource:null!==(e=this.state.comments)&&void 0!==e?e:[],renderItem:function(e){var n,r,i,a;return Object(o.jsx)(Cm.a,{author:null!==(r=null===(n=e.user)||void 0===n?void 0:n.fullName)&&void 0!==r?r:"Unknown",avatar:Object(o.jsx)(Tm.a,{children:null!==(a=null===(i=t.props.currentUser)||void 0===i?void 0:i.initials)&&void 0!==a?a:"??"},void 0),content:e.comment,datetime:Object(o.jsx)("span",{children:$r.shortDateAndTime(e.createdOn)},void 0)},void 0)}},void 0),this.renderAddComment()]}),void 0)},t.prototype.renderAddComment=function(){var e,t;if(this.props.changeRequestStatusTypeId!=Ea.APPROVED&&!this.props.disabled){var n=this.getFormItems();return Object(o.jsx)(Cm.a,{avatar:Object(o.jsx)(Tm.a,{children:null!==(t=null===(e=this.props.currentUser)||void 0===e?void 0:e.initials)&&void 0!==t?t:"??"},void 0),content:Object(o.jsxs)(Ci.a,Pm({ref:this._formRef,layout:"vertical",onFinish:this.handleComment,requiredMark:!0},{children:[Object(o.jsx)(Ci.a.Item,Pm({},n.get(Ca),{children:Object(o.jsx)(ut.a.TextArea,{title:"Comment"},void 0)}),void 0),this.renderActions()]}),void 0)},void 0)}},t.prototype.renderActions=function(){var e;if(this.props.changeRequestStatusTypeId!=Ea.APPROVED&&this.props.changeRequestStatusTypeId!=Ea.CANCELLED&&this.props.changeRequestStatusTypeId){if(this.props.changeRequestStatusTypeId!=Ea.ATTENTIONREQUIRED&&this.props.approvalActiveOn&&!$r.isFutureDate(It()(this.props.approvalActiveOn))&&!$r.isFutureDate(It()(this.props.approvalActiveOn))&&this.props.approvalId&&this.props.approvalStatusTypeId==Sa.PENDING&&!this.props.redirect&&(this.props.approvalUserId==(null===(e=this.props.currentUser)||void 0===e?void 0:e.userId)||this.props.isOverride&&Je.isAuthorized([gn.OVERRIDE_APPROVAL_USER])))return Object(o.jsxs)(y.b,Pm({direction:"horizontal",wrap:!0},{children:[Object(o.jsxs)(rt.a,Pm({type:"primary",onClick:this.confirmApprove,loading:this.state.submitting},{children:[Object(o.jsx)(Sr.a,{},void 0),"Approve"]}),void 0),Object(o.jsxs)(rt.a,Pm({type:"primary",onClick:this.confirmDeny,danger:!0,loading:this.state.submitting},{children:[Object(o.jsx)(kr.a,{},void 0),"Reject"]}),void 0),Object(o.jsxs)(rt.a,Pm({htmlType:"submit",type:"default",disabled:this.state.submitting},{children:[Object(o.jsx)(Ko.a,{},void 0),"Add Comment"]}),void 0)]}),void 0);if(this.props.approvalStatusTypeId!=Ea.CANCELLED)return Object(o.jsxs)(rt.a,Pm({htmlType:"submit",type:"primary",disabled:this.state.submitting},{children:[Object(o.jsx)(Ko.a,{},void 0),"Add Comment"]}),void 0)}},t}(a.Component),wm=function(e){return Object.assign({changeRequestId:"00000000-0000-0000-0000-000000000000"},e)},Dm=function(e){return Object.assign({approvalId:"00000000-0000-0000-0000-000000000000"},e)},qm=function(e){return Object.assign({changeRequestId:"00000000-0000-0000-0000-000000000000",message:""},e)},Fm="message",Mm="message",Ym=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Um=function(){return Um=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Um.apply(this,arguments)},Lm=function(e){function t(t){var n=e.call(this,t)||this;return n._manualApproveFormRef=a.createRef(),n._manualRejectFormRef=a.createRef(),n._commentsRef=a.createRef(),n.getManualApproveFormItems=function(){return(new Map).set(Fm,{label:"Please provide a reason for manually approv
1ing this change request.",name:Fm,required:!0,rules:[Ot.required()]})},n.getManualRejectFormItems=function(){return(new Map).set(Mm,{label:"Please provide a reason for manually rejecting this change request.",name:Mm,required:!0,rules:[Ot.required()]})},n.loadRedirectApproval=function(e){var t=Dm({approvalId:e});va.getChangeRequestApproval(t).then((function(t){var r;t.changeRequest?n.setState({changeRequestId:null!==(r=t.changeRequest.id)&&void 0!==r?r:re.default.Empty(),approvalId:e,changeRequest:t.changeRequest,approvalStatusTypeId:t.approvalStatusTypeId,redirectNeeded:t.redirectNeeded,isRedirect:!0}):n.setState({approvalNotAvailable:!0})})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))},n.loadApproval=function(e){var t=Dm({approvalId:e});va.getChangeRequestApproval(t).then((function(t){var r,i,o;t.changeRequest?n.setState({changeRequestId:null!==(r=t.changeRequest.id)&&void 0!==r?r:re.default.Empty(),approvalId:e,changeRequest:t.changeRequest,changeRequestApproval:null!==(i=t.changeRequestApproval)&&void 0!==i?i:Ra.create(),approvalStatusTypeId:t.approvalStatusTypeId,approvalUserId:null!==(o=t.approvalUserId)&&void 0!==o?o:re.default.Empty()}):n.setState({approvalNotAvailable:!0})})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))},n.loadChangeRequestApprovalOnDetails=function(e){n.setState({loading:!0});var t=wm({changeRequestId:e});va.getChangeRequestApprovalOnDetailsHandler(t).then((function(e){var t,r,i;e.changeRequestApproval?n.setState({approvalId:null!==(t=e.changeRequestApproval.id)&&void 0!==t?t:re.default.Empty(),approvalStatusTypeId:e.changeRequestApproval.approvalStatusTypeId,changeRequestApproval:null!==(r=e.changeRequestApproval)&&void 0!==r?r:Ra.create(),approvalUserId:null!==(i=e.changeRequestApproval.userId)&&void 0!==i?i:re.default.Empty()}):n.setState({approvalId:re.default.Empty(),approvalStatusTypeId:0,changeRequestApproval:Ra.create(),approvalUserId:re.default.Empty()})}))},n.loadExisting=function(e){va.getChangeRequestDetails(e).then((function(t){t.changeRequest&&n.setState({changeRequestId:e,changeRequest:t.changeRequest})})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))},n.loadProgramDetails=function(e){ba.getProgramWithAllDetails(e).then((function(e){e.program&&n.setState({program:e.program})})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))},n.getChangeRequestStatus=function(){va.getBaseChangeRequestDetails(n.state.changeRequestId).then((function(e){if(e.changeRequest){var t=n.state.changeRequest;t.statusTypeId=e.changeRequest.statusTypeId,t.approvedOn=e.changeRequest.approvedOn,n.setState({changeRequest:t})}})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))},n.getBaseChangeRequest=function(e){va.getBaseChangeRequestDetails(e).then((function(t){var r,i;if(t.changeRequest){n.loadChangeRequestApprovalOnDetails(e);var o=t.changeRequest;n.loadProgramDetails(null!==(i=null===(r=o.programModificationChangeRequest)||void 0===r?void 0:r.programId)&&void 0!==i?i:re.default.Empty()),o.statusTypeId=t.changeRequest.statusTypeId,o.approvedOn=t.changeRequest.approvedOn,n.setState({changeRequest:o,changeRequestId:e})}})).catch((function(){n.setState({error:!0})}))},n.fetchComments=function(){n.getBaseChangeRequest(n.state.changeRequestId)},n.tabChanged=function(e){n.setState({activeTab:e})},n.NOIExport=function(){window.open(x.generateFull(x.NOTICE_OF_INTENT_REPORT,{},{changeRequestId:n.state.changeRequestId}),"_blank")},n.NOIICCPHSEExport=function(){var e,t;n.state.changeRequest.changeRequestTypeId==Xa.NEWPROGRAM&&(null===(e=n.state.changeRequest.newProgramChangeRequest)||void 0===e?void 0:e.noticeOfIntentChangeRequestId)?window.open(x.generateFull(x.NOTICE_OF_INTENT_ICCPHSE_REPORT,{},{changeRequestId:n.state.changeRequestId,noticeOfIntentId:null===(t=n.state.changeRequest.newProgramChangeRequest)||void 0===t?void 0:t.noticeOfIntentChangeRequestId}),"_blank"):window.open(x.generateFull(x.NOTICE_OF_INTENT_ICCPHSE_REPORT,{},{changeRequestId:n.state.changeRequestId}),"_blank")},n.ProgramExport=function(){window.open(x.generateFull(x.PROGRAM_REPORT,{},{changeRequestId:n.state.changeRequestId}),"_blank")},n.NewProgramProposalDownload=function(){window.open(x.generateFull(x.NEW_PROGRAM_PROPOSAL,{},{changeRequestId:n.state.changeRequestId}),"_blank")},n.DraftAS28Download=function(){var e;window.open(x.generateFull(x.DRAFT_AS28_REPORT,{changeRequestId:null!==(e=n.state.changeRequestId)&&void 0!==e?e:re.default.Empty()}),"_blank")},n.ProgramComparisonReport=function(){var e;window.open(x.generateFull(x.PROGRAM_COMPARISON_REPORT,{changeRequestId:null!==(e=n.state.changeRequestId)&&void 0!==e?e:re.default.Empty()}),"_blank")},n.ProgramSideBySideComparisonReport=function(){var e;window.open(x.generateFull(x.SIDE_BY_SIDE_REPORT,{changeRequestId:null!==(e=n.state.changeRequestId)&&void 0!==e?e:re.default.Empty()}),"_blank")},n.PreviousProgramReport=function(){var e=n.getDetailId();window.open(x.generateFull(x.PREVIOUS_PROGRAM_CURRICULUM_REPORT,{programDetailId:null!==e&&void 0!==e?e:re.default.Empty()}),"_blank")},n.LaborMarketInformationReport=function(){window.open(x.generateFull(x.LABOR_MARKET_INFO_REPORT,{},{changeRequestId:n.state.changeRequestId}),"_blank")},n.promptManualApprove=function(){n.setState({showManualApprove:!0})},n.closeManualApprove=function(){n.setState({showManualApprove:!1})},n.promptManualReject=function(){n.setState({showManualReject:!0})},n.closeManualReject=function(){n.setState({showManualReject:!1})},n.getNOIDownloadList=function(){return[{title:"Notice of Intent Form",action:function(){return n.NOIExport()}},{title:"Notice of Intent ICCPHSE Form",action:function(){return n.NOIICCPHSEExport()}},{title:"Labor Market Information Report",action:function(){return n.LaborMarketInformationReport()}}]},n.getProgramModDownloadList=function(){return[{title:"Preview Program Curriculum Report (AS-28)",action:function(){return n.ProgramComparisonReport()}},{title:"Existing Program Curriculum Report (AS-28)",action:function(){return n.PreviousProgramReport()}},{title:"Side By Side Comparison Report",description:"File contains a side by side view of the program modification and previous program.",action:function(){return n.ProgramSideBySideComparisonReport()}}]},n.getNewProgramDownloadList=function(){var e=[{title:"Program Summary",action:function(){return n.ProgramExport()}},{title:"New Program Proposal",action:function(){return n.NewProgramProposalDownload()}},{title:"Preview Program Curriculum Report (AS-28)",description:"File contains a draft version of the Program Curriculum Report (AS-28).",action:function(){return n.DraftAS28Download()}}];return n.state.changeRequest.changeRequestTypeId==Xa.NEWPROGRAM&&e.push({title:"Notice of Intent ICCPHSE Form",action:function(){return n.NOIICCPHSEExport()}}),e},n.handleManualApprove=function(){var e,t;n.setState({submitting:!0});var r=null!==(t=null===(e=n._manualApproveFormRef.current)||void 0===e?void 0:e.getFieldsValue())&&void 0!==t?t:{}
1,i=qm({changeRequestId:n.state.changeRequest.id,message:r.message});va.manualApproval(i).then((function(e){var t;(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Approved"),n.getChangeRequestStatus(),null===(t=n._commentsRef.current)||void 0===t||t.triggerUpdate(),n.closeManualApprove()):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Error Approving"))})).catch((function(){S.b.error("Error Approving"),n.setState({error:!0})})).finally((function(){n.setState({submitting:!1,submitted:!0})}))},n.handleManualReject=function(){var e,t;n.setState({submitting:!0});var r=null!==(t=null===(e=n._manualRejectFormRef.current)||void 0===e?void 0:e.getFieldsValue())&&void 0!==t?t:{},i=qm({changeRequestId:n.state.changeRequest.id,message:r.message});va.manualReject(i).then((function(e){var t;(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Rejected"),n.getChangeRequestStatus(),null===(t=n._commentsRef.current)||void 0===t||t.triggerUpdate(),n.closeManualReject()):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Error Rejecting"))})).catch((function(){S.b.error("Error Rejecting"),n.setState({error:!0})})).finally((function(){n.setState({submitting:!1,submitted:!0})}))},n.goBack=function(){T.goBack()},n.promptResendEmail=function(){f.a.confirm({title:"Resend Approval Emails?",content:"Are you sure you would like to resend the approval emails?",onOk:function(){return n.resendApprovalEmails()}})},n.resendApprovalEmails=function(){va.resendEmails(n.state.changeRequestId).then((function(){S.b.success("Emails Sent")})).catch((function(){S.b.error("Error Sending Emails")}))},n._formRef=a.createRef(),n.handleRedirect=function(){n.setState({redirectNeeded:!1})},n.state={changeRequest:$a.create(),approvalId:re.default.Empty(),changeRequestId:re.default.Empty(),changeRequestApproval:Ra.create(),activeTab:"details",loading:!0,redirectNeeded:!1,approvalUserId:re.default.Empty(),isRedirect:!1,showManualApprove:!1,showManualReject:!1,approvalNotAvailable:!1,program:$f.create()},n}return Ym(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id",re.default.Empty()),t=Hr.getPathPart(this.props.match,"approvalId",re.default.Empty());e!=re.default.Empty()?this.getBaseChangeRequest(e):x.isMatch(x.CHANGE_REQUEST_APPROVAL,this.props.location.pathname)&&t!=re.default.Empty()?this.loadApproval(t):x.isMatch(x.CHANGE_REQUEST_APPROVAL_REDIRECT,this.props.location.pathname)&&t!=re.default.Empty()&&this.loadRedirectApproval(t)},t.prototype.render=function(){var e,t,n,r,i=null!==(e=this.state.changeRequest.display)&&void 0!==e?e:"...";return this.state.approvalNotAvailable?Object(o.jsx)(O.Content,{children:Object(o.jsx)(wn.a,{status:"warning",title:"No Longer Available",extra:Object(o.jsx)(ot.a.Paragraph,{children:"This approval is no longer available."},void 0)},void 0)},void 0):Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(er,{title:i},void 0),Object(o.jsx)(rr,Um({title:i,subTitle:(null===(t=this.state.changeRequest)||void 0===t?void 0:t.isExpired)?Object(o.jsxs)("span",{children:[Object(o.jsx)(oa.a,{},void 0)," Expired"]},void 0):null,breadcrumbs:Xn.changeRequestDetails(null!==(r=null===(n=this.state.changeRequest)||void 0===n?void 0:n.display)&&void 0!==r?r:"",this.state.changeRequestId),extra:this.renderAdditionalActions(),onBack:this.goBack,footer:Object(o.jsxs)(pa.a,Um({onChange:this.tabChanged},{children:[Object(o.jsx)(pa.a.TabPane,{tab:"Details"},"details"),Object(o.jsx)(pa.a.TabPane,{tab:"Approval History"},"approvals"),Object(o.jsx)(pa.a.TabPane,{tab:"Downloads"},"downloads")]}),void 0)},{children:Object(o.jsx)(Fs,{loading:this.state.loading,changeRequest:this.state.changeRequest},void 0)}),void 0),this.renderManualApprove(),this.renderManualReject(),this.renderDetails(),this.renderApprovals(),this.renderDownloads()]},void 0)},t.prototype.renderManualApprove=function(){if(this.state.showManualApprove)return Object(o.jsxs)(f.a,Um({title:"Manual Approve?",width:750,closable:!0,visible:!0,footer:null,onCancel:this.closeManualApprove},{children:[Object(o.jsx)(ot.a.Paragraph,{children:"Manual approval should only be used when a change request is stuck or needs to skip over the approval process."},void 0),Object(o.jsx)(ot.a.Paragraph,{children:Object(o.jsx)("strong",{children:"Are you sure you want to manually approve this change request?"},void 0)},void 0),Object(o.jsx)(Ci.a,Um({ref:this._manualApproveFormRef,layout:"vertical",requiredMark:!0,onFinish:this.handleManualApprove},{children:Object(o.jsx)(Ci.a.Item,Um({},this.getManualApproveFormItems().get(Fm),_t.getValidation(Fm,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a.TextArea,{maxLength:5e3,disabled:this.state.submitting,showCount:!0,autoSize:{minRows:5}},void 0)}),void 0)}),void 0),Object(o.jsx)(y.b,Um({direction:"horizontal",wrap:!0},{children:Object(o.jsx)(rt.a,Um({type:"primary",onClick:this.handleManualApprove,htmlType:"submit",loading:this.state.submitting,icon:Object(o.jsx)(Sr.a,{},void 0)},{children:"Approve"}),void 0)}),void 0)]}),void 0)},t.prototype.renderManualReject=function(){if(this.state.showManualReject)return Object(o.jsxs)(f.a,Um({title:"Manual Reject?",width:750,closable:!0,visible:!0,footer:null,onCancel:this.closeManualReject},{children:[Object(o.jsx)(ot.a.Paragraph,{children:"Manual reject should only be used when a change request is stuck or needs to skip over the deny process."},void 0),Object(o.jsx)(ot.a.Paragraph,{children:Object(o.jsx)("strong",{children:"Are you sure you want to manually reject this change request?"},void 0)},void 0),Object(o.jsx)(Ci.a,Um({ref:this._manualRejectFormRef,layout:"vertical",requiredMark:!0,onFinish:this.handleManualReject},{children:Object(o.jsx)(Ci.a.Item,Um({},this.getManualRejectFormItems().get(Mm),_t.getValidation(Mm,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a.TextArea,{maxLength:5e3,disabled:this.state.submitting,showCount:!0,autoSize:{minRows:5}},void 0)}),void 0)}),void 0),Object(o.jsx)(y.b,Um({direction:"horizontal",wrap:!0},{children:Object(o.jsx)(rt.a,Um({type:"primary",danger:!0,onClick:this.handleManualReject,htmlType:"submit",loading:this.state.submitting,icon:Object(o.jsx)(kr.a,{},void 0)},{children:"Reject"}),void 0)}),void 0)]}),void 0)},t.prototype.renderAdditionalActions=function(){if(Je.isAuthorized([gn.OVERRIDE_APPROVAL_USER])){var e=Object(o.jsxs)(Gt.a,{children:[this.state.changeRequest.statusTypeId!=Ea.APPROVED?Object(o.jsx)(Gt.a.Item,Um({title:"Manual Approve",onClick:this.promptManualApprove},{children:"Manual Approve"}),void 0):null,this.state.changeRequest.statusTypeId!=Ea.APPROVED?Object(o.jsx)(Gt.a.Item,Um({title:"Manual Reject",onClick:this.promptManualReject},{children:"Manual Reject"}),void 0):null,this.state.changeRequest.statusTypeId==Ea.APPROVED?Object(o.jsx)(Gt.a.Item,Um({title:"Resend Emails",onClick:this.promptResendEmail},{children:"Resend Emails"}),void 0):null]},void 0);return Object(o.jsx)(la.a,Um({overlay:e},{children:Object(o.jsx)(rt.a,Um({size:"large",type:"link"},{children:Object(o.jsx)(aa.a,{},void 0)}),void 0)}),void 0)}},t.prototype.renderInstructions=function(){var e;if("details"===this.state.activeTab){if(this.state.isRedirect)return this.state.redirectNeeded?this.renderRedirect():this.renderRedirectComplete();if($r.isFutureDate(It()(this.state.changeRequestApproval.activeOn)))return this.renderDayToWaitApprovalInstru
1ctions();if(this.state.approvalId!=re.default.Empty()&&this.state.approvalUserId==(null===(e=this.props.currentUser)||void 0===e?void 0:e.userId))return this.renderApprovalInstructions()}},t.prototype.renderRedirect=function(){return Object(o.jsx)("div",{children:Object(o.jsx)(Qn.a,Um({title:Object(o.jsxs)("span",{children:[Object(o.jsx)(sa.a,{},void 0)," Redirect Required"]},void 0)},{children:Object(o.jsx)(_m,{onSuccess:this.handleRedirect,approvalId:this.state.approvalId},void 0)}),void 0)},void 0)},t.prototype.renderRedirectComplete=function(){return Object(o.jsxs)("div",{children:[Object(o.jsx)(ct.a,{type:"success",icon:!0,description:Object(o.jsx)(ot.a.Text,Um({strong:!0},{children:Object(o.jsxs)("span",{children:[Object(o.jsx)(da.a,{},void 0)," Approval has been redirected."]},void 0)}),void 0)},void 0),Object(o.jsx)("br",{},void 0)]},void 0)},t.prototype.renderDayToWaitApprovalInstructions=function(){return Object(o.jsxs)("div",{children:[Object(o.jsx)(ct.a,{type:"warning",description:Object(o.jsx)(ot.a.Text,Um({strong:!0},{children:Object(o.jsxs)("span",{children:[" ",Object(o.jsx)(sa.a,{},void 0)," This approval is not yet active. Please check back on ",$r.shortDate(It()(this.state.changeRequestApproval.activeOn)),"."]},void 0)}),void 0)},void 0),Object(o.jsx)("br",{},void 0)]},void 0)},t.prototype.renderApprovalInstructions=function(){var e={},t="warning";return this.state.approvalStatusTypeId==Sa.PENDING||this.state.approvalStatusTypeId==Sa.WAITING?e="Please review the following change request to either approve or deny.":this.state.approvalStatusTypeId==Sa.APPROVED||this.state.approvalStatusTypeId==Sa.SKIPPED?(t="success",e=Object(o.jsxs)("span",{children:[Object(o.jsx)(da.a,{},void 0)," You have approved this change request."]},void 0)):this.state.approvalStatusTypeId==Sa.DECLINED&&(t="error",e=Object(o.jsxs)("span",{children:[Object(o.jsx)(ca.a,{},void 0)," You have denied this change request."]},void 0)),Object(o.jsxs)("div",{children:[Object(o.jsx)(ct.a,{type:t,description:Object(o.jsx)(ot.a.Text,Um({strong:!0},{children:e}),void 0)},void 0),Object(o.jsx)("br",{},void 0)]},void 0)},t.prototype.renderApprovals=function(){var e,t,n,r;if("approvals"===this.state.activeTab)return Object(o.jsx)(Qn.a,Um({title:"Approval History"},{children:Object(o.jsx)(Ka,{disableActions:null===(t=null===(e=this.state.changeRequest)||void 0===e?void 0:e.isExpired)||void 0===t||t,approvalSubmitted:this.getChangeRequestStatus,changeRequestId:null!==(r=null===(n=this.state.changeRequest)||void 0===n?void 0:n.id)&&void 0!==r?r:re.default.Empty(),changeRequest:this.state.changeRequest},void 0)}),void 0)},t.prototype.renderDetails=function(){var e,t,n;if("details"===this.state.activeTab)return Object(o.jsxs)(y.b,Um({direction:"vertical"},{children:[this.renderInstructions(),Object(o.jsxs)(b.a,Um({gutter:[16,16]},{children:[Object(o.jsx)(m.a,Um({},En.TWO_THIRDS,{children:Object(o.jsx)(Qn.a,Um({title:"Details"},{children:this.renderRequestDetails()}),void 0)}),void 0),Object(o.jsx)(m.a,Um({},En.ONE_THIRD,{children:Object(o.jsx)(Qn.a,Um({title:"Comments"},{children:Object(o.jsx)(Nm,{ref:this._commentsRef,onSubmit:this.fetchComments,currentUser:this.props.currentUser,approvalUserId:this.state.approvalUserId,changeRequestId:null!==(t=null===(e=this.state.changeRequest)||void 0===e?void 0:e.id)&&void 0!==t?t:re.default.Empty(),changeRequestStatusTypeId:null!==(n=this.state.changeRequest.statusTypeId)&&void 0!==n?n:re.default.Empty(),approvalId:this.state.approvalId,approvalActiveOn:this.state.changeRequestApproval.activeOn,redirect:this.state.redirectNeeded,approvalStatusTypeId:this.state.approvalStatusTypeId},void 0)}),void 0)}),void 0)]}),void 0)]}),void 0)},t.prototype.renderRequestDetails=function(){switch(this.state.changeRequest.changeRequestTypeId){case Xa.ADMINISTRATIVECHANGE:return Object(o.jsx)(Ps,{loading:this.state.loading,changeRequest:this.state.changeRequest,changeRequestDetailsPage:!0},void 0);case Xa.NEWDISCIPLINE:return Object(o.jsx)(Ac,{loading:this.state.loading,changeRequest:this.state.changeRequest,changeRequestDetailsPage:!0},void 0);case Xa.NEWCOURSE:return Object(o.jsx)(gc,{loading:this.state.loading,changeRequest:this.state.changeRequest,changeRequestDetailsPage:!0},void 0);case Xa.COURSEDEACTIVATION:return Object(o.jsx)(Pd,{loading:this.state.loading,changeRequest:this.state.changeRequest,changeRequestDetailsPage:!0},void 0);case Xa.COURSEMODIFICATION:return Object(o.jsx)(Zd,{loading:this.state.loading,changeRequest:this.state.changeRequest,changeRequestDetailsPage:!0},void 0);case Xa.NOTICEOFINTENT:return Object(o.jsx)(Iv,{loading:this.state.loading,changeRequest:this.state.changeRequest,changeRequestDetailsPage:!0},void 0);case Xa.PROGRAMDEACTIVATION:return Object(o.jsx)(Lv,{loading:this.state.loading,changeRequest:this.state.changeRequest,changeRequestDetailsPage:!0},void 0);case Xa.PROGRAMMODIFICATION:case Xa.TRANSFERMAJORPROGRAMMODIFICATION:return Object(o.jsx)(Im,{loading:this.state.loading,changeRequest:this.state.changeRequest,changeRequestDetailsPage:!0},void 0);case Xa.NEWPROGRAM:case Xa.NEWTRANSFERMAJORPROGRAM:return Object(o.jsx)(fh,{loading:this.state.loading,changeRequest:this.state.changeRequest,changeRequestDetailsPage:!0},void 0)}},t.prototype.renderDownloads=function(){return Object(o.jsx)(Qn.a,Um({title:"Downloads",hidden:"downloads"!==this.state.activeTab},{children:this.renderRequestDownloads()}),void 0)},t.prototype.renderRequestDownloads=function(){switch(this.state.changeRequest.changeRequestTypeId){case Xa.ADMINISTRATIVECHANGE:case Xa.NEWDISCIPLINE:case Xa.NEWCOURSE:case Xa.COURSEDEACTIVATION:case Xa.COURSEMODIFICATION:return null;case Xa.NOTICEOFINTENT:return this.renderDownloadList(this.getNOIDownloadList());case Xa.PROGRAMDEACTIVATION:return null;case Xa.PROGRAMMODIFICATION:case Xa.TRANSFERMAJORPROGRAMMODIFICATION:return this.renderDownloadList(this.getProgramModDownloadList());case Xa.NEWPROGRAM:case Xa.NEWTRANSFERMAJORPROGRAM:return this.renderDownloadList(this.getNewProgramDownloadList())}},t.prototype.getDetailId=function(){var e,t,n;if(this.state.changeRequest.programModificationChangeRequest&&(this.state.changeRequest.changeRequestTypeId==Xa.PROGRAMMODIFICATION||this.state.changeRequest.changeRequestTypeId==Xa.TRANSFERMAJORPROGRAMMODIFICATION)){var r=this.state.changeRequest.programModificationChangeRequest;return null!==(n=null===(t=null===(e=this.state.program.programDetails)||void 0===e?void 0:e.find((function(e){var t,n,i,o,a,s,d,c,l,u,p,f,h,v;return(null!==(n=null===(t=e.install)||void 0===t?void 0:t.year)&&void 0!==n?n:0)<(null!==(o=null===(i=r.install)||void 0===i?void 0:i.year)&&void 0!==o?o:0)||(null!==(s=null===(a=e.install)||void 0===a?void 0:a.year)&&void 0!==s?s:0)==(null!==(c=null===(d=r.install)||void 0===d?void 0:d.year)&&void 0!==c?c:0)&&(null!==(p=null===(u=null===(l=e.install)||void 0===l?void 0:l.term)||void 0===u?void 0:u.startDate)&&void 0!==p?p:0)<(null!==(v=null===(h=null===(f=r.
1install)||void 0===f?void 0:f.term)||void 0===h?void 0:h.startDate)&&void 0!==v?v:0)})))||void 0===t?void 0:t.id)&&void 0!==n?n:re.default.Empty()}},t.prototype.renderDownloadList=function(e){return Object(o.jsx)(ua.b,{itemLayout:"horizontal",dataSource:e,renderItem:function(e){return Object(o.jsx)(ua.b.Item,{children:Object(o.jsx)(ua.b.Item.Meta,{avatar:Object(o.jsx)(rt.a,Um({type:"link",onClick:e.action},{children:Object(o.jsx)(pn.a,{},void 0)}),void 0),title:Object(o.jsx)(rt.a,Um({type:"link",onClick:e.action},{children:e.title}),void 0)},void 0)},void 0)}},void 0)},t}(a.Component);var km=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value}}))(Lm)),Gm=function(e){return Object.assign({key:""},e)},Vm=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Bm=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(e){var t=Gm({key:e});va.getChangeRequestDraft(t).then((function(e){e.changeRequest&&n.openChangeRequest(e.changeRequest)}
1)).catch((function(){n.setState({error:!0})}))},n.openChangeRequest=function(e){var t,n="";switch(e.changeRequestTypeId){case Xa.ADMINISTRATIVECHANGE:n=x.EXISTING_ADMINISTRATIVE_CHANGE_REQUEST_ENTRY_1;break;case Xa.NEWDISCIPLINE:n=x.EXISTING_NEW_DISCIPLINE_CHANGE_REQUEST_ENTRY_1;break;case Xa.NOTICEOFINTENT:n=x.EXISTING_NOTICE_OF_INTENT_CHANGE_REQUEST_ENTRY_1;break;case Xa.NEWCOURSE:n=x.EXISTING_NEW_COURSE_CHANGE_REQUEST_ENTRY_1;break;case Xa.COURSEDEACTIVATION:n=x.EXISTING_COURSE_DEACTIVATION_CHANGE_REQUEST_ENTRY_1;break;case Xa.COURSEMODIFICATION:n=x.EXISTING_COURSE_MODIFICATION_CHANGE_REQUEST_ENTRY_2;break;case Xa.PROGRAMDEACTIVATION:n=x.EXISTING_PROGRAM_DEACTIVATION_CHANGE_REQUEST_ENTRY_1;break;case Xa.PROGRAMMODIFICATION:case Xa.TRANSFERMAJORPROGRAMMODIFICATION:n=x.EXISTING_PROGRAM_MODIFICATION_CHANGE_REQUEST_ENTRY_1;break;case Xa.NEWPROGRAM:case Xa.NEWTRANSFERMAJORPROGRAM:n=x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_1}T.replace(x.generate(n,{id:null!==(t=e.id)&&void 0!==t?t:re.default.Empty()},{}))},n}return Vm(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id"),t=Hr.getPathPart(this.props.match,"key");null!=e&&void 0!=e&&""!=e&&this.fetchData(e),null!=t&&void 0!=t&&""!=t&&this.fetchData(t)},t.prototype.render=function(){return Object(o.jsx)(h.a,{className:"align-center",style:{height:"100%",width:"100%"}},void 0)},t}(a.Component),Wm=Object(u.i)(Bm),zm=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Hm=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(){Ii.ChangeRequestTypeOptions().then((function(e){n.setState({changeRequestTypes:null!==e&&void 0!==e?e:[]})})),Ii.Institutions().then((function(e){n.setState({institutions:null!==e&&void 0!==e?e:[]})})),Ii.ChangeRequestStatusTypes().then((function(e){n.setState({changeRequestStatusTypes:null!==e&&void 0!==e?e:[]})}))},n.getColumnDefinitions=function(){var e=[{title:"Number",dataIndex:$a.displayNumber,filterType:wr.Text,sorter:!0,width:125},{title:"Type",dataIndex:$a.changeRequestTypeId,render:function(e,t){var n;return null===(n=t.changeRequestType)||void 0===n?void 0:n.name},sorter:!0,filterType:wr.DropdownMulti,dropdownFilterOptions:n.state.changeRequestTypes,width:200}];return n.props.programId||n.props.courseId||e.push({title:"Description",dataIndex:$a.title,filterType:wr.Text,width:200}),null!=n.props.userId&&void 0!=n.props.userId&&n.props.userId!=re.default.Empty()||e.push({title:"Requesting User",dataIndex:$a.requestingUserId,render:function(e,t){var n;return null===(n=t.requestingUser)||void 0===n?void 0:n.fullName},filterType:wr.Text,sorter:!0,width:200}),null!=n.props.institution||n.props.programId||n.props.courseId||e.push({title:"Community College",dataIndex:$a.institutionId,render:function(e,t){var n;return null===(n=t.institution)||void 0===n?void 0:n.name},sorter:!0,filterType:wr.DropdownMulti,dropdownFilterOptions:n.state.institutions,width:200}),e.push({title:"Created",dataIndex:$a.createdOn,render:function(e,t){if(t.createdOn)return $r.shortDate(t.createdOn)},filterType:wr.DateRange,sorter:!0,width:175}),e.push({title:"Submitted",dataIndex:$a.requestedOn,render:function(e,t){if(t.requestedOn)return $r.shortDate(t.requestedOn)},filterType:wr.DateRange,sorter:!0,width:175}
1),e.push({title:"Approved",dataIndex:$a.approvedOn,render:function(e,t){if(t.approvedOn)return $r.shortDate(t.approvedOn)},filterType:wr.DateRange,sorter:!0,width:175}),e.push({title:"Status",dataIndex:$a.statusTypeId,render:function(e,t){var n;return null===(n=t.changeRequestStatusType)||void 0===n?void 0:n.name},sorter:!0,filterType:wr.DropdownMulti,dropdownFilterOptions:n.state.changeRequestStatusTypes,width:100}),e.push({title:"Expired",dataIndex:$a.isExpired,align:"center",render:function(e,t){return t.isExpired?Object(o.jsx)(oa.a,{},void 0):null},sorter:!1,filterType:wr.NONE,width:25}),e},n.openChangeRequest=function(e){if(e.id)switch(e.statusTypeId){case Ea.DRAFT:case Ea.ATTENTIONREQUIRED:n.openDraft(e);break;default:n.openDetails(e)}},n.openDraft=function(e){e.id&&(e.requestingUserId==n.props.userId||Je.isAuthorized([gn.OVERRIDE_CHANGE_REQUEST_USER])?T.push(x.generate(x.CHANGE_REQUEST_DRAFT_ID,{id:e.id},{})):n.openDetails(e))},n.openDetails=function(e){e.id&&T.push(x.generate(x.CHANGE_REQUEST_DETAILS,{id:e.id},{}))},n.state={addNewChangeRequest:!1,changeRequestTypes:[],institutions:[],changeRequestStatusTypes:[]},n}return zm(t,e),t.prototype.componentDidMount=function(){this.fetchData()},t.prototype.render=function(){var e=this,t=[];return t.push(oo.Reset()),Je.isAuthorized([gn.VIEW_CHANGE_REQUEST,gn.EDIT_CHANGE_REQUEST])&&t.push(oo.Export((function(t){var n,r,i;return e.setState({exporting:!0}),va.getChangeRequestsDataTableExport(t,null!==(r=null===(n=e.props.institution)||void 0===n?void 0:n.id)&&void 0!==r?r:re.default.Empty(),null!==(i=e.props.userId)&&void 0!==i?i:re.default.Empty()).then((function(t){e.setState({exporting:!1}),R.a.downloadBase64StringAsFile("ChangeRequest_"+$r.getDateStamp()+".xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",null!==t&&void 0!==t?t:void 0)}))}),this.state.exporting)),Object(o.jsx)(io,{ref:function(t){return e._dataTable=t},stateSaving:{enabled:!0,tableUniqueKey:"changeRequest_list"},serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},buttonBar:t,columns:this.getColumnDefinitions(),fetchData:{fetch:function(t){var n,r,i,o,a,s;return va.getChangeRequestTableData(t,null!==(i=null!==(r=null===(n=e.props.institution)||void 0===n?void 0:n.id)&&void 0!==r?r:e.props.instituionId)&&void 0!==i?i:re.default.Empty(),null!==(o=e.props.userId)&&void 0!==o?o:re.default.Empty(),null!==(a=e.props.programId)&&void 0!==a?a:re.default.Empty(),null!==(s=e.props.courseId)&&void 0!==s?s:re.default.Empty())}},onRowClick:this.openChangeRequest},void 0)},t}(a.Component),Qm="file",Km=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Xm=function(){return Xm=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Xm.apply(this,arguments)},Jm=function(e){function t(t){var n=e.call(this,t)||this;return n.state={},n}return Km(t,e),t.prototype.render=function(){var e,t=this.props.htmlType?this.props.htmlType:"submit",n=this.props.type?this.props.type:"primary";return Object(o.jsx)(rt.a,Xm({},this.props,{htmlType:t,type:n,icon:Object(o.jsx)(pn.a,{},void 0),loading:this.props.downloading||this.props.loading},{children:null!==(e=this.props.title)&&void 0!==e?e:"Download"}),void 0)},t}(a.Component),$m=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Zm=function(){return Zm=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Zm.apply(this,arguments)},eg=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n.getFormItems=function(){return(new Map).set(Qm,{name:Qm,label:"Please select a file"})},n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields()},n.handleSubmit=function(){var e,t;n.setState({submitting:!0});var r=null!==(t=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldsValue())&&void 0!==t?t:{};
1if(br.canSubmit(n._formRef,n.getFormItems())){var i=r.file.newFiles[0],o=Za.attachFileToModel("bulkCourseRequest",{institutionId:n.props.institutionId},Qm,i);va.bulkCourseRequest(o).then((function(e){n.resetForm(),n.setState({submitting:!1});var t=e.succeeded?"Bulk Course Change Request Summary.xlsx":"Bulk Course Change Request Error Report.xlsx";R.a.downloadBase64StringAsExcel(t,null!==e&&void 0!==e?e:void 0)}))}else S.b.error("Please fill out all required fields."),n.setState({loading:!1,submitting:!1})},n.state={},n}return $m(t,e),t.prototype.render=function(){return Object(o.jsxs)(y.b,Zm({direction:"vertical"},{children:[Object(o.jsx)(ot.a.Title,Zm({level:5},{children:"Bulk Course Change Requests"}),void 0),Object(o.jsx)(Ci.a,Zm({layout:"vertical",onFinish:this.handleSubmit,ref:this._formRef},{children:Object(o.jsxs)(y.b,Zm({direction:"vertical"},{children:[Object(o.jsx)(Jm,{type:"link",target:"_blank",href:x.generate(x.BULK_COURSE_TEMPLATE),title:"Download Template"},void 0),Object(o.jsx)(Ci.a.Item,Zm({},this.getFormItems().get(Qm),_t.getValidation(Qm,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(hs,{maxCount:1,style:{width:300}},void 0)}),void 0),this.renderErrors(),Object(o.jsxs)(y.b,Zm({direction:"horizontal"},{children:[Object(o.jsx)($o,{},void 0),Object(o.jsx)(Ir,{onClick:this.resetForm,onConfirm:this.resetForm},void 0)]}),void 0)]}),void 0)}),void 0)]}),void 0)},t.prototype.renderErrors=function(){if(this.state.error&&this.state.message)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:this.state.message},void 0)},t}(a.Component),tg=n(731),ng=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),rg=function(){return rg=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},rg.apply(this,arguments)},ig=function(e){function t(t){var n=e.call(this,t)||this;return n.loadChangeRequestType=function(){return ce.getAll(li.className).then((function(e){var t;e&&n.setState({changeRequestType:null!==(t=e.filter((function(e){return e.selectable})))&&void 0!==t?t:[]})})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))},n.handleSubmit=function(){switch(n.state.selected){case Xa.ADMINISTRATIVECHANGE:T.push(x.generate(x.ADMINISTRATIVE_CHANGE_REQUEST_ENTRY));break;case Xa.NEWDISCIPLINE:T.push(x.generate(x.NEW_DISCIPLINE_CHANGE_REQUEST_ENTRY));break;case Xa.NOTICEOFINTENT:T.push(x.generate(x.NEW_NOTICE_OF_INTENT_CHANGE_REQUEST_ENTRY));break;case Xa.NEWCOURSE:T.push(x.generate(x.NEW_COURSE_CHANGE_REQUEST_ENTRY));break;case Xa.COURSEDEACTIVATION:T.push(x.generate(x.COURSE_DEACTIVATION_CHANGE_REQUEST_ENTRY));break;case Xa.COURSEMODIFICATION:T.push(x.generate(x.COURSE_MODIFICATION_CHANGE_REQUEST_ENTRY));break;case Xa.NEWPROGRAM:T.push(x.generate(x.NEW_PROGRAM_CHANGE_REQUEST_ENTRY));break;case Xa.PROGRAMDEACTIVATION:T.push(x.generate(x.PROGRAM_DEACTIVATION_CHANGE_REQUEST_ENTRY));break;case Xa.PROGRAMMODIFICATION:T.push(x.generate(x.NEW_PROGRAM_MODIFICATION_CHANGE_REQUEST_ENTRY))}},n.handleChange=function(e){n.setState({selected:e})},n.state={changeRequestType:[],selected:null},n}return ng(t,e),t.prototype.componentDidMount=function(){this.loadChangeRequestType()},t.prototype.componentDidUpdate=function(){0==this.state.changeRequestType.length&&this.loadChangeRequestType()},t.prototype.render=function(){var e=this;return this.state.loading?Object(o.jsxs)(ut.a.Group,rg({compact:!0},{children:[Object(o.jsx)(pt.a.Input,{active:!0},void 0),";",Object(o.jsx)(pt.a.Button,{active:!0},void 0),";"]}),void 0):Object(o.jsx)(y.b,rg({direction:"vertical"},{children:Object(o.jsxs)(y.b,rg({direction:"vertical"},{children:[Object(o.jsx)(ot.a.Title,rg({level:5},{children:"Start New Change Requests"}),void 0),Object(o.jsx)(ot.a.Text,{children:"Please select a change request type."},void 0),Object(o.jsx)("label",rg({title:"New Change Request",htmlFor:"New Change Request"},{children:Object(o.jsx)(hd,rg({style:{width:"24%"},dropdownMatchSelectWidth:!1,onChange:this.handleChange,placeholder:"Select Type"},{children:this.state.changeRequestType.map((function(t){return e.renderChangeRequestType(t)}))}),void 0)}),void 0),Object(o.jsx)(rt.a,rg({htmlType:"submit",type:"primary",onClick:this.handleSubmit,icon:Object(o.jsx)(tg.a,{},void 0)},{children:"Start Change Request"}),void 0)]}),void 0)}),void 0)},t.prototype.renderChangeRequestType=function(e){return Object(o.jsx)(pr.a.Option,rg({value:e.id},{children:e.name}),e.id)},t.prototype.renderErrors=function(){if(this.state.error)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t}(a.Component),og=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ag=function(){return ag=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ag.apply(this,arguments)},sg=function(e){function t(t){return e.call(this,t)||this}return og(t,e),t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Change Requests",breadcrumbs:Xn.changeRequestList()},void 0),Object(o.jsx)(y.b,ag({direction:"vertical",size:"large"},{children:Object(o.jsx)(Qn.a,ag({title:"Change Requests"},{children:Object(o.jsxs)(y.b,ag({direction:"vertical",size:"large"},{children:[this.renderYourChangeRequests(),this.renderInstitutionChangeRequests(),this.renderAllChangeRequests()]}),void 0)}),void 0)}),void 0)]},void 0)},t.prototype.renderYourChangeRequests=function(){var e,t,n,r,i,a,s,d;if((null!==(t=null===(e=this.props.selectedInstitution)||void 0===e?void 0:e.id)&&void 0!==t?t:re.default.Empty())!=re.default.Empty()&&Je.isAuthorized([gn.CREATE_ADMINISTRATIVE_CHANGE_REQUEST,gn.CREATE_NEW_COURSE_CHANGE_REQUEST,gn.CREATE_COURSE_DEACTIVATION_CHANGE_REQUEST,gn.CREATE_MODIFY_COURSE_CHANGE_REQUEST,gn.CREATE_NEW_DISCIPLINE_CHANGE_REQUEST,gn.CREATE_NOTICE_OF_INTENT_REQUEST,gn.CREATE_PROGRAM_DEACTIVATION_REQUEST,gn.CREATE_PROGRAM_MODIFICATION_CHANGE_REQUEST]))return Object(o.jsxs)(y.b,ag({direction:"vertical"},{children:[Object(o.jsx)(ot.a.Title,ag({level:4},{children:"Submit Change Requests"}),void 0),Object(o.jsxs)(b.a,ag({gutter:[16,16]},{children:[Object(o.jsx)(m.a,ag({},En.HALF,{children:Object(o.jsx)(ig,{institutionId:null!==(r=null===(n=this.props.selectedInstitution)||void 0===n?void 0:n.id)&&void 0!==r?r:re.default.Empty()},void 0)}),void 0),Object(o.jsx)(m.a,ag({},En.HALF,{children:Object(o.jsx)(eg,{institutionId:null!==(a=null===(i=this.props.selectedInstitution)||void 0===i?void 0:i.id)&&void 0!==a?a:re.default.Empty()},void 0)}),void 0)]}),void 0),Object(o.jsx)(ot.a.Title,ag({level:4},{children:"Your Change Requests"}),void 0),Object(o.jsx)(Hm,{userId:null!==(d=null===(s=this.props.currentUser)||void 0===s?void 0:s.userId)&&void 0!==d?d:null,institution:this.props.selectedInstitution},void 0)]}),void 0)},t.prototype.renderInstitutionChangeRequests=function(){var e,t,n;if((null!==(t=null===(e=this.props.selectedInstitution)||void 0===e?void 0:e.id)&&void 0!==t?t:re.default.Empty())!=re.default.Empty()&&Je.isAuthorized([gn.CREATE_ADMINISTRATIVE_CHANGE_REQUEST,gn.CREATE_NEW_COURSE_CHANGE_REQUEST,gn.CREATE_COURSE_DEACTIVATION_CHANGE_REQUEST,gn.CREATE_MODIFY_COURSE_CHANGE_REQUEST,gn.CREATE_NEW_DISCIPLINE_CHANGE_REQUEST,gn.CREATE_NOTICE_OF_INTENT_REQUEST,gn.CREATE_PROGRAM_DEACTIVATION_REQUEST,gn.CREATE_PROGRAM_MODIFICATION_CHANGE_REQUEST,gn.VIEW_CHANGE_REQUEST]))return Object(o.jsxs)("div",{children:[Object(o.jsxs)(ot.a.Title,ag({level:4},{children:[null===(n=this.props.selectedInstitution)||void 0===n?void 0:n.name," Change Request"]}),void 0),Object(o.jsx)(Hm,{institution:this.props.selectedInstitution},void 0)]},void 0)},t.prototype.renderAllChangeRequests=function(){if(null==this.props.selectedInstitution&&Je.isAuthorized([gn.APPROVE_CHANGE_REQUEST,gn.VIEW_CHANGE_REQUEST]))return Object(o.jsx)(Hm,{},void 0)},t}(a.Component);var dg=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected}}))(sg)),cg=n(1524),lg=n(280),ug=(n(605),n(199)),pg=n.n(ug),fg=function(e){return Object.assign({changeRequestId:"00000000-0000-0000-0000-000000000000"},e)},hg=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),vg=function(){return vg=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},vg.apply(this,arguments)},mg=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.promptConfirmCancel=function(e){f.a.confirm({title:"Are you sure you want to cancel this change request?",okText:"Cancel Change Request",onOk:function(){return t.cancelChangeRequest(e)}})},t.cancelChangeRequest=function(e){t.setState({submitting:!0});var n=fg({changeRequestId:e});va.cancelChangeRequest(n).then((function(e){t.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,altered:!(null===e||void 0===e?void 0:e.succeeded)}),!0===(null===e||void 0===e?void 0:e.succeeded)?S.b.success("Change Request Cancelled."):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(e){t.setState({error:e}),S.b.error("Change Request could not be cancelled.")})).finally((function(){t.setState({loading:!1}),t.goToChangeRequest()}))},t.goToChangeRequest=function(){T.push(x.generate(x.CHANGE_REQUESTS))},t.render=function(){return Object(o.jsx)(rr,{title:t.props.pageTitle,breadcrumbs:t.props.breadcrumbs,extra:t.renderMoreActions()},void 0)},t}return hg(t,e),t.prototype.renderMoreActions=function(){var e=this,t=Object(o.jsx)(Gt.a,{children:Object(o.jsx)(Gt.a.Item,vg({title:"Cancel Change Request",onClick:function(){return e.promptConfirmCancel(e.props.changeRequestId)}},{children:"Cancel Change Request"}),this.props.changeRequestId)},void 0);return Object(o.jsx)(Ze,vg({validFeatureFlags:[gn.EDIT_CHANGE_REQUEST]},{children:Object(o.jsx)(la.a,vg({overlay:t},{children:Object(o.jsx)(rt.a,vg({size:"large",type:"link"},{children:Object(o.jsx)(aa.a,{},void 0)}),void 0)}),void 0)}),void 0)},t}(a.Component),gg=mg,bg=n(40),yg=(n(122),function(){return yg=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},yg.apply(this,arguments)});var Og=function(e){var t,n,r=pg()(),i=e.children?e.children[null!==(t=e.current)&&void 0!==t?t:0]:{},s=Object(o.jsx)(bg.a,yg({},e,{children:e.children}),void 0),d=a.useState(!1),c=d[0],l=d[1];return r.xl?Object(o.jsx)(bg.a,yg({},e,{children:e.children}),void 0):Object(o.jsxs)("div",{children:[Object(o.jsxs)(rt.a,yg({size:"large",type:"link",onClick:function(){l(!0)}},{children:[Object(o.jsx)(is.a,{},void 0),"Current Step: ",null===(n=null===i||void 0===i?void 0:i.props)||void 0===n?void 0:n.title]}),void 0),Object(o.jsx)(lg.a,yg({width:"100%",closeIcon:Object(o.jsx)(kr.a,{},void 0),title:"Steps",placement:"left",onClose:function(){l(!1)},visible:c},{children:s}),void 0)]},void 0)},jg=function(){return jg=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},jg.apply(this,arguments)};var Ig=function(e){var t=Object(o.jsx)("div",{children:e.title},void 0);return e.enabled&&e.route&&(t=Object(o.jsx)(at.a,jg({to:e.route},{children:t}),void 0)),t},Sg=function(){return Sg=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Sg.apply(this,arguments)};var Eg=function(e){return Object(o.jsxs)(Og,Sg({current:e.current,direction:"vertical"},{children:[Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:0!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Change Information",route:x.generate(x.EXISTING_ADMINISTRATIVE_CHANGE_REQUEST_ENTRY_1,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:1!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Additional Information",route:x.generate(x.EXISTING_ADMINISTRATIVE_CHANGE_REQUEST_ENTRY_2,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:2!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Review",route:x.generate(x.EXISTING_ADMINISTRATIVE_CHANGE_REQUEST_ENTRY_REVIEW,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{title:"Submitted"},void 0)},void 0)]}),void 0)},Rg=function(){return Rg=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Rg.apply(this,arguments)};var _g=function(e){return Object(o.jsxs)(Og,Rg({current:e.current,direction:"vertical"},{children:[Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:0!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Deactivation Information",route:x.generate(x.EXISTING_COURSE_DEACTIVATION_CHANGE_REQUEST_ENTRY_1,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:1!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Additional Information",route:x.generate(x.EXISTING_COURSE_DEACTIVATION_CHANGE_REQUEST_ENTRY_2,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:2!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Review",route:x.generate(x.EXISTING_COURSE_DEACTIVATION_CHANGE_REQUEST_ENTRY_REVIEW,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{title:"Submitted"},void 0)},void 0)]}),void 0)},Tg=function(){return Tg=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Tg.apply(this,arguments)};
1var Cg=function(e){return Object(o.jsxs)(Og,Tg({current:e.current,direction:"vertical"},{children:[Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:0!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Course Search",route:x.generate(x.EXISTING_COURSE_MODIFICATION_CHANGE_REQUEST_ENTRY_1,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:1!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Course Details",route:x.generate(x.EXISTING_COURSE_MODIFICATION_CHANGE_REQUEST_ENTRY_2,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:2!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Additional Information",route:x.generate(x.EXISTING_COURSE_MODIFICATION_CHANGE_REQUEST_ENTRY_3,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:3!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Review",route:x.generate(x.EXISTING_COURSE_MODIFICATION_CHANGE_REQUEST_ENTRY_REVIEW,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{title:"Submitted"},void 0)},void 0)]}),void 0)},xg=function(){return xg=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},xg.apply(this,arguments)};var Ag=function(e){return Object(o.jsxs)(Og,xg({current:e.current,direction:"vertical"},{children:[Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:0!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Course Details",route:x.generate(x.EXISTING_NEW_COURSE_CHANGE_REQUEST_ENTRY_1,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:1!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Additional Information",route:x.generate(x.EXISTING_NEW_COURSE_CHANGE_REQUEST_ENTRY_2,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:2!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Review",route:x.generate(x.EXISTING_NEW_COURSE_CHANGE_REQUEST_ENTRY_REVIEW,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{title:"Submitted"},void 0)},void 0)]}),void 0)},Pg=function(){return Pg=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Pg.apply(this,arguments)};var Ng=function(e){return Object(o.jsxs)(Og,Pg({current:e.current,direction:"vertical"},{children:[Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:0!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Discipline Details",route:x.generate(x.EXISTING_NEW_DISCIPLINE_CHANGE_REQUEST_ENTRY_1,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:1!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Additional Information",route:x.generate(x.EXISTING_NEW_DISCIPLINE_CHANGE_REQUEST_ENTRY_2,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:2!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Review",route:x.generate(x.EXISTING_NEW_DISCIPLINE_CHANGE_REQUEST_ENTRY_REVIEW,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{title:"Submitted"},void 0)},void 0)]}),void 0)},wg=function(){return wg=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},wg.apply(this,arguments)};var Dg=function(e){var t,n,r,i=e.changeRequest?null===(r=null===(n=null===(t=e.changeRequest)||void 0===t?void 0:t.newProgramChangeRequest)||void 0===n?void 0:n.newProgramProgramAwards)||void 0===r?void 0:r.map((function(t){var n,r,i,a=e.awardId==t.id,s=9!=e.current&&10!=e.current?-1:e.current-9;return Object(o.jsx)(bg.a.Step,{title:null!==(n=t.awardTitle)&&void 0!==n?n:"New Award",description:Object(o.jsxs)(bg.a,wg({current:s,direction:"vertical",size:"small",progressDot:!0},{children:[Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:(!a||9!=e.current)&&e.changeRequestId!=re.default.Empty(),title:t.awardTitle+" Award Details",route:x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_10,{id:e.changeRequestId,awardId:null!==(r=t.id)&&void 0!==r?r:re.default.Empty()})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:(!a||10!=e.current)&&e.changeRequestId!=re.default.Empty(),title:t.awardTitle+" Term Details",route:x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_11,{id:e.changeRequestId,awardId:null!==(i=t.id)&&void 0!==i?i:re.default.Empty()})},void 0)},void 0)]}),void 0)},t.id)})):[],a=Object(o.jsx)(bg.a,wg({direction:"vertical",size:"small",progressDot:!0},{children:i}),void 0),s=e.current;return 9==s?s-=1:s>=10&&(s-=2),Object(o.jsxs)(Og,wg({current:s,size:"small",direction:"vertical"},{children:[Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:0!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Program Information",route:x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_1,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:1!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Program Plan",route:x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_2,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:2!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Contact Information",route:x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_3,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:3!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Consultant Meetings",route:x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_4,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:4!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Occupational Information",route:x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_5,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:5!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Industry Information",route:x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_6,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:6!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Linking And Existing Entities",route:x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_7,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:7!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Program Details",route:x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_8,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{description:a,title:Object(o.jsx)(Ig,{enabled:8!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Awards",route:x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_9,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:11!=e.current&&e.changeRequestId!=re.default.Empty(),title:"ICCPHSE",route:x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_12,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:12!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Advisory Board",route:x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_13,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:13!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Sign Offs and Assurances",route:x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_14,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:14!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Additional Information",route:x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_15,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:15!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Review",route:x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_REVIEW,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:"Submitted"},void 0)]}),void 0)},qg=function(){return qg=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},qg.apply(this,arguments)};var Fg=function(e){var t,n,r,i,a=null!==(t=e.awardId)&&void 0!==t?t:re.default.Empty();if(a==re.default.Empty()){var s=null===(r=null===(n=e.changeRequest)||void 0===n?void 0:n.newProgramChangeRequest)||void 0===r?void 0:r.newProgramProgramAwards;s&&s.length>0&&(a=null!==(i=s[0].id)&&void 0!==i?i:re.default.Empty())}return Object(o.jsxs)(Og,qg({current:e.current,size:"small",direction:"vertical"},{children:[Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:0!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Program Information",route:x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_1,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:1!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Program Plan",route:x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_2,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:2!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Contact Information",route:x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_3,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:3!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Linking And Existing Entities",route:x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_7,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:4!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Program Details",route:x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_8,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:5!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Award Details",route:x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_10,{id:e.changeRequestId,awardId:null!==a&&void 0!==a?a:re.default.Empty()})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:6!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Term Details",route:x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_11,{id:e.changeRequestId,awardId:null!==a&&void 0!==a?a:re.default.Empty()})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:8!=e.current&&e.changeRequestId!=re.default.Empty(),title:"ICCPHSE",route:x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_12,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:12!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Sign Offs and Assurances",route:x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_14,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:13!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Additional Information",route:x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_15,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:14!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Review",route:x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_REVIEW,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:"Submitted"},void 0)]}),void 0)},Mg=function(){return Mg=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Mg.apply(this,arguments)};var Yg=function(e){return Object(o.jsxs)(Og,Mg({current:e.current,direction:"vertical"},{children:[Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:0!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Program Plan",route:x.generate(x.EXISTING_NOTICE_OF_INTENT_CHANGE_REQUEST_ENTRY_1,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:1!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Planned Awards",route:x.generate(x.EXISTING_NOTICE_OF_INTENT_CHANGE_REQUEST_ENTRY_2,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:2!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Contact Information",route:x.generate(x.EXISTING_NOTICE_OF_INTENT_CHANGE_REQUEST_ENTRY_3,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:3!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Consultant Meetings",route:x.generate(x.EXISTING_NOTICE_OF_INTENT_CHANGE_REQUEST_ENTRY_4,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:4!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Occupational Information",route:x.generate(x.EXISTING_NOTICE_OF_INTENT_CHANGE_REQUEST_ENTRY_5,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:5!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Industry Information",route:x.generate(x.EXISTING_NOTICE_OF_INTENT_CHANGE_REQUEST_ENTRY_6,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:6!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Linking And Existing Entities",route:x.generate(x.EXISTING_NOTICE_OF_INTENT_CHANGE_REQUEST_ENTRY_7,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:7!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Additional Information",route:x.generate(x.EXISTING_NOTICE_OF_INTENT_CHANGE_REQUEST_ENTRY_8,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:8!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Review",route:x.generate(x.EXISTING_NOTICE_OF_INTENT_CHANGE_REQUEST_ENTRY_REVIEW,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{title:"Submitted"},void 0)},void 0)]}),void 0)},Ug=function(){return Ug=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ug.apply(this,arguments)};var Lg=function(e){return Object(o.jsxs)(Og,Ug({current:e.current,direction:"vertical"},{children:[Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:0!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Deactivation Information",route:x.generate(x.EXISTING_PROGRAM_DEACTIVATION_CHANGE_REQUEST_ENTRY_1,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:1!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Additional Information",route:x.generate(x.EXISTING_PROGRAM_DEACTIVATION_CHANGE_REQUEST_ENTRY_2,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:2!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Review",route:x.generate(x.EXISTING_PROGRAM_DEACTIVATION_CHANGE_REQUEST_ENTRY_REVIEW,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{title:"Submitted"},void 0)},void 0)]}),void 0)},kg=function(){return kg=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},kg.apply(this,arguments)};var Gg=function(e){var t,n,r,i=e.changeRequest?null===(r=null===(n=null===(t=e.changeRequest)||void 0===t?void 0:t.programModificationChangeRequest)||void 0===n?void 0:n.programModificationAwards)||void 0===r?void 0:r.map((function(t){var n,r,i,a=e.awardId==t.id,s=2!=e.current&&3!=e.current?-1:e.current-2;return Object(o.jsx)(bg.a.Step,{title:null!==(n=t.title)&&void 0!==n?n:"New Award",description:Object(o.jsxs)(bg.a,kg({current:s,direction:"vertical",size:"small",progressDot:!0},{children
1:[Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:(!a||2!=e.current)&&e.changeRequestId!=re.default.Empty(),title:t.title+" Award Details",route:x.generate(x.EXISTING_PROGRAM_MODIFICATION_CHANGE_REQUEST_ENTRY_3,{id:e.changeRequestId,awardId:null!==(r=t.id)&&void 0!==r?r:re.default.Empty()})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:(!a||3!=e.current)&&e.changeRequestId!=re.default.Empty(),title:t.title+" Term Details",route:x.generate(x.EXISTING_PROGRAM_MODIFICATION_CHANGE_REQUEST_ENTRY_4,{id:e.changeRequestId,awardId:null!==(i=t.id)&&void 0!==i?i:re.default.Empty()})},void 0)},void 0)]}),void 0)},t.id)})):[],a=Object(o.jsx)(bg.a,kg({direction:"vertical",size:"small",progressDot:!0},{children:i}),void 0),s=e.current;return 2==s?s-=1:s>=3&&(s-=2),Object(o.jsxs)(Og,kg({current:s,direction:"vertical"},{children:[Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:0!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Program Details",route:x.generate(x.EXISTING_PROGRAM_MODIFICATION_CHANGE_REQUEST_ENTRY_1,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{description:a,title:Object(o.jsx)(Ig,{enabled:1!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Awards",route:x.generate(x.EXISTING_PROGRAM_MODIFICATION_CHANGE_REQUEST_ENTRY_2,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:4!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Advisory Board and Curriculum Committee",route:x.generate(x.EXISTING_PROGRAM_MODIFICATION_CHANGE_REQUEST_ENTRY_5,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:5!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Additional Information",route:x.generate(x.EXISTING_PROGRAM_MODIFICATION_CHANGE_REQUEST_ENTRY_6,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:6!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Review",route:x.generate(x.EXISTING_PROGRAM_MODIFICATION_CHANGE_REQUEST_ENTRY_REVIEW,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:"Submitted"},void 0)]}),void 0)},Vg=function(){return Vg=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Vg.apply(this,arguments)};var Bg=function(e){var t,n,r,i=e.changeRequest?null===(r=null===(n=null===(t=e.changeRequest)||void 0===t?void 0:t.programModificationChangeRequest)||void 0===n?void 0:n.programModificationAwards)||void 0===r?void 0:r.map((function(t){var n,r,i,a=e.awardId==t.id,s=2!=e.current&&3!=e.current?-1:e.current-2;return Object(o.jsx)(bg.a.Step,{title:null!==(n=t.title)&&void 0!==n?n:"New Award",description:Object(o.jsxs)(bg.a,Vg({current:s,direction:"vertical",size:"small",progressDot:!0},{children:[Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:(!a||2!=e.current)&&e.changeRequestId!=re.default.Empty(),title:t.title+" Award Details",route:x.generate(x.EXISTING_PROGRAM_MODIFICATION_CHANGE_REQUEST_ENTRY_3,{id:e.changeRequestId,awardId:null!==(r=t.id)&&void 0!==r?r:re.default.Empty()})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:(!a||3!=e.current)&&e.changeRequestId!=re.default.Empty(),title:t.title+" Term Details",route:x.generate(x.EXISTING_PROGRAM_MODIFICATION_CHANGE_REQUEST_ENTRY_4,{id:e.changeRequestId,awardId:null!==(i=t.id)&&void 0!==i?i:re.default.Empty()})},void 0)},void 0)]}),void 0)},t.id)})):[],a=Object(o.jsx)(bg.a,Vg({direction:"vertical",size:"small",progressDot:!0},{children:i}),void 0),s=e.current;return 2==s?s-=1:s>=3&&(s-=2),Object(o.jsxs)(Og,Vg({current:s,direction:"vertical"},{children:[Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:0!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Program Details",route:x.generate(x.EXISTING_PROGRAM_MODIFICATION_CHANGE_REQUEST_ENTRY_1,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{description:a,title:Object(o.jsx)(Ig,{enabled:1!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Awards",route:x.generate(x.EXISTING_PROGRAM_MODIFICATION_CHANGE_REQUEST_ENTRY_2,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:4!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Additional Information",route:x.generate(x.EXISTING_PROGRAM_MODIFICATION_CHANGE_REQUEST_ENTRY_6,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:5!=e.current&&e.changeRequestId!=re.default.Empty(),title:"Review",route:x.generate(x.EXISTING_PROGRAM_MODIFICATION_CHANGE_REQUEST_ENTRY_REVIEW,{id:e.changeRequestId})},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:"Submitted"},void 0)]}),void 0)},Wg=function(){return Wg=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Wg.apply(this,arguments)};var zg=function(e){var t,n,r,i,s,d,c,l,u,p,f,h,v,g,j,I,S,E,R,_,T,C,x,A,P,N,w,D,q,F,M,Y,U,L,k,G,V,B,W,z,H,Q,K,X,J,$,Z,ee,te,ne,ie,oe,ae,se,de,ce,le,ue,pe,fe,he,ve="";switch(null===(t=null===e||void 0===e?void 0:e.changeRequest)||void 0===t?void 0:t.changeRequestTypeId){case Xa.ADMINISTRATIVECHANGE:ve="Administrative Change Request";break;case Xa.COURSEDEACTIVATION:ve="Course Deactivation Request";break;case Xa.COURSEMODIFICATION:ve="Course Modification Request";break;case Xa.NEWCOURSE:ve="New Course Request";break;case Xa.NEWDISCIPLINE:ve="New Discipline Request";break;case Xa.NOTICEOFINTENT:ve="Notice of Intent";break;case Xa.PROGRAMDEACTIVATION:ve="Program Deactivation Request";break;case Xa.PROGRAMMODIFICATION:ve="Program Modification Request";break;case Xa.TRANSFERMAJORPROGRAMMODIFICATION:ve="Transfer Program Modification Request";break;case Xa.NEWPROGRAM:ve="New Program Request";break;case Xa.NEWTRANSFERMAJORPROGRAM:ve="New Transfer Program Request"}var me=null!==(r=null===(n=e.changeRequest)||void 0===n?void 0:n.display)&&void 0!==r?r:ve,ge=[];switch(null===(i=null===e||void 0===e?void 0:e.changeRequest)||void 0===i?void 0:i.changeRequestTypeId){case Xa.ADMINISTRATIVECHANGE:ge=Xn.administrativeChangeRequestEntry(me,null!==(d=null===(s=null===e||void 0===e?void 0:e.changeRequest)||void 0===s?void 0:s.id)&&void 0!==d?d:re.default.Empty());break;case Xa.COURSEDEACTIVATION:ge=Xn.courseDeactivationChangeRequestEntry(me,null!==(l=null===(c=null===e||void 0===e?void 0:e.changeRequest)||void 0===c?void 0:c.id)&&void 0!==l?l:re.default.Empty());break;case Xa.COURSEMODIFICATION:ge=Xn.courseModificationChangeRequestEntry(me,null!==(p=null===(u=null===e||void 0===e?void 0:e.changeRequest)||void 0===u?void 0:u.id)&&void 0!==p?p:re.default.Empty());break;case Xa.NEWCOURSE:ge=Xn.newCourseChangeRequestEntry(me,null!==(h=null===(f=null===e||void 0===e?void 0:e.changeRequest)||void 0===f?void 0:f.id)&&void 0!==h?h:re.default.Empty());break;case Xa.NEWDISCIPLINE:ge=Xn.newDisciplineChangeRequestEntry(me,null!==(g=null===(v=null===e||void 0===e?void 0:e.changeRequest)||void 0===v?void 0:v.id)&&void 0!==g?g:re.default.Empty());break;case Xa.NOTICEOFINTENT:ge=Xn.noticeOfIntentChangeRequestEntry(me,null!==(I=null===(j=null===e||void 0===e?void 0:e.changeRequest)||void 0===j?void 0:j.id)&&void 0!==I?I:re.default.Empty());break;case Xa.PROGRAMDEACTIVATION:ge=Xn.programDeactivationChangeRequestEntry(me,null!==(E=null===(S=null===e||void 0===e?void 0:e.changeRequest)||void 0===S?void 0:S.id)&&void 0!==E?E:re.default.Empty());break;case Xa.PROGRAMMODIFICATION:case Xa.TRANSFERMAJORPROGRAMMODIFICATION:ge=Xn.programModificationChangeRequestEntry(me,null!==(_=null===(R=null===e||void 0===e?void 0:e.changeRequest)||void 0===R?void 0:R.id)&&void 0!==_?_:re.default.Empty());break;case Xa.NEWPROGRAM:case Xa.NEWTRANSFERMAJORPROGRAM:ge=Xn.newProgramChangeRequestEntry(me,null!==(C=null===(T=null===e||void 0===e?void 0:e.changeRequest)||void 0===T?void 0:T.id)&&void 0!==C?C:re.default.Empty())}var be=null;switch(null===(x=null===e||void 0===e?void 0:e.changeRequest)||void 0===x?void 0:x.changeRequestTypeId){case Xa.ADMINISTRATIVECHANGE:be=Object(o.jsx)(Eg,{changeRequestId:null!==(P=null===(A=e.changeRequest)||void 0===A?void 0:A.id)&&void 0!==P?P:re.default.Empty(),current:e.stepNumber},void 0);break;case Xa.COURSEDEACTIVATION:be=Object(o.jsx)(_g,{changeRequestId:null!==(w=null===(N=e.changeRequest)||void 0===N?void 0:N.id)&&void 0!==w?w:re.default.Empty(),current:e.stepNumber},void 0);break;case Xa.COURSEMODIFICATION:be=Object(o.jsx)(Cg,{changeRequestId:null!==(q=null===(D=e.changeRequest)||void 0===D?void 0:D.id)&&void 0!==q?q:re.default.Empty(),current:e.stepNumber},void 0);break;case Xa.NEWCOURSE:be=Object(o.jsx)(Ag,{changeRequestId:null!==(M=null===(F=e.changeRequest)||void 0===F?void 0:F.id)&&void 0!==M?M:re.default.Empty(),current:e.stepNumber},void 0);break;case Xa.NEWDISCIPLINE:be=Object(o.jsx)(Ng,{changeRequestId:null!==(U=null===(Y=e.changeRequest)||void 0===Y?void 0:Y.id)&&void 0!==U?U:re.default.Empty(),current:e.stepNumber},void 0);break;case Xa.NOTICEOFINTENT:be=Object(o.jsx)(Yg,{changeRequestId:null!==(k=null===(L=e.changeRequest)||void 0===L?void 0:L.id)&&void 0!==k?k:re.default.Empty(),current:e.stepNumber},void 0);break;case Xa.PROGRAMDEACTIVATION:be=Object(o.jsx)(Lg,{changeRequestId:null!==(V=null===(G=e.changeRequest)||void 0===G?void 0:G.id)&&void 0!==V?V:re.default.Empty(),current:e.stepNumber},void 0);break;case Xa.PROGRAMMODIFICATION:be=Object(o.jsx)(Gg,{changeRequest:e.changeRequest,awardId:e.awardId,changeRequestId:null!==(W=null===(B=e.changeRequest)||void 0===B?void 0:B.id)&&void 0!==W?W:re.default.Empty(),current:e.stepNumber},void 0);break;case Xa.TRANSFERMAJORPROGRAMMODIFICATION:be=Object(o.jsx)(Bg,{changeRequest:e.changeRequest,awardId:e.awardId,changeRequestId:null!==(H=null===(z=e.changeRequest)||void 0===z?void 0:z.id)&&void 0!==H?H:re.default.Empty(),current:e.stepNumber},void 0);break;case Xa.NEWPROGRAM:be=Object(o.jsx)(Dg,{changeRequest:e.changeRequest,awardId:e.awardId,changeRequestId:null!==(K=null===(Q=e.changeRequest)||void 0===Q?void 0:Q.id)&&void 0!==K?K:re.default.Empty(),current:e.stepNumber},void 0);break;case Xa.NEWTRANSFERMAJORPROGRAM:be=Object(o.jsx)(Fg,{changeRequest:e.changeRequest,awardId:e.awardId,changeRequestId:null!==(J=null===(X=e.changeRequest)||void 0===X?void 0:X.id)&&void 0!==J?J:re.default.Empty(),current:e.stepNumber},void 0)}var ye=pg()(),Oe=a.useState(!1),je=Oe[0],Ie=Oe[1],Se=Object(o.jsx)("div",{},void 0);return Se=ye.xxl||ye.xl?Object(o.jsxs)(m.a,{children:[Object(o.jsx)(Qn.a,Wg({title:"Steps"},{children:be}),void 0),Object(o.jsx)("br",{},void 0),Object(o.jsx)(Qn.a,Wg({title:"Comments"},{children:Object(o.jsx)(Nm,{approvalActiveOn:null,disabled:null===(Z=null===($=e.changeRequest)||void 0===$?void 0:$.isExpired)||void 0===Z||Z,changeRequestId:null!==(te=null===(ee=e.changeRequest)||void 0===ee?void 0:ee.id)&&void 0!==te?te:re.default.Empty(),changeRequestStatusTypeId:null!==(ie=null===(ne=e.changeRequest)||void 0===ne?void 0:ne.statusTypeId)&&void 0!==ie?ie:0,currentUser:e.currentUser},void 0)}),void 0)]},void 0):Object(o.jsxs)(Qn.a,{children:[Object(o.jsxs)(y.b,Wg({direction:"horizontal",split:"|",align:"center"},{children:[Object(o.jsx)(rt.a,{style:{float:"right"},icon:Object(o.jsx)(cg.a,{},void 0),size:"large",type:"link",onClick:function(){Ie(!0)}},void 0),be]}),void 0),Object(o.jsx)(lg.a,Wg({width:"100%",closeIcon:Object(o.jsx)(kr.a,{},void 0),title:"Comments",placement:"left",onClose:function(){Ie(!1)},visible:je},{children:Object(o.jsx)(Nm,{approvalActiveOn:null,disabled:null===(ae=null===(oe=e.changeRequest)||void 0===oe?void 0:oe.isExpired)||void 0===ae||ae,changeRequestStatusTypeId:null!==(de=null===(se=e.changeRequest)||void 0===se?void 0:se.statusTypeId)&&void 0!==de?de:0,changeRequestId:null!==(le=null===(ce=e.changeRequest)||void 0===ce?void 0:ce.id)&&void 0!==le?le:re.default.Empty(),currentUser:e.currentUser},void 0)}),void 0)]},void 0),Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(gg,{breadcrumbs:ge,pageTitle:ve,changeRequestId:null!==(pe=null===(ue=e.changeRequest)||void 0===ue?void 0:ue.id)&&void 0!==pe?pe:re.default.Empty(),current:e.stepNumber,changeReqeustType:null!==(he=null===(fe=null===e||void 0===e?void 0:e.changeRequest)||void 0===fe?void 0:fe.changeRequestTypeId)&&void 0!==he?he:0},void 0),Object(o.jsxs)(b.a,Wg({gutter:[16,16]},{children:[Object(o.jsx)(m.a,Wg({},{xs:24,sm:24,md:24,lg:24,xl:6,xxl:6},{children:Se}),void 0),Object(o.jsx)(m.a,Wg({},{xs:24,sm:24,md:24,lg:24,xl:18,xxl:18},{children:Object(o.jsx)(b.a,Wg({gutter:[16,16]},{children:Object(o.jsx)(m.a,Wg({},{xs:24,sm:24,md:24,lg:24,xl:24,xxl:24},{children:e.children}),void 0)}),void 0)}),void 0)]}),void 0)]},void 0)},Hg=function(e){return Object.assign({changeRequestId:"00000000-0000-0000-0000-000000000000"},e)},Qg=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Kg=function(){return Kg=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Kg.apply(this,arguments)},Xg=function(e){function t(t){var n=e.call(this,t)||this;return n.goToPreviousStep=function(){n.props.onPrevious()},n.submit=function(){var e,t;
1if(n.props.notApproved)Rd.a.error({title:"NOI Not Approved",content:"This NOI has not yet been approved. You cannot submit this request until it has gone through the approval process.",closable:!0});else if(n.props.canSubmit||void 0==n.props.canSubmit){n.setState({submitting:!0});var r=Hg({changeRequestId:null!==(t=null===(e=n.props.changeRequest)||void 0===e?void 0:e.id)&&void 0!==t?t:re.default.Empty()});va.submitChangeRequest(r).then((function(e){e.succeeded?n.props.onSubmit():(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Submit Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Submit Failed")})).finally((function(){n.setState({loading:!1,submitting:!1})}))}else n.props.submitErrorMessage?S.b.error(n.props.submitErrorMessage):S.b.error("Unknown error")},n.render=function(){return Object(o.jsxs)(y.b,Kg({direction:"horizontal",wrap:!0},{children:[Object(o.jsx)(rs,{submitting:n.state.submitting,onClick:n.goToPreviousStep},void 0),Object(o.jsx)($o,{submitting:n.state.submitting,onClick:n.submit,disabled:void 0!=n.props.isValid&&!n.props.isValid},void 0)]}),void 0)},n.state={submitting:!1},n}return Qg(t,e),t}(a.Component),Jg=function(e){return Object.assign({changeRequestId:"00000000-0000-0000-0000-000000000000"},e)},$g=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Zg=function(){return Zg=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Zg.apply(this,arguments)},eb=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(e){n.setState({loading:!0});var t=[];e!==re.default.Empty()&&t.push(n.loadChangeRequest(e)),Promise.all(t).then((function(){n.setState({loading:!1})}))},n.loadChangeRequest=function(e){var t=Jg({changeRequestId:e});return va.getAdditionalDetails(t).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create(),fieldErrors:e.fieldErrors})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.goToPreviousStep=function(){T.push(x.generate(x.EXISTING_COURSE_MODIFICATION_CHANGE_REQUEST_ENTRY_2,{id:n.state.changeRequestId},{}))},n.goToNextStep=function(){T.push(x.generate(x.EXISTING_COURSE_MODIFICATION_CHANGE_REQUEST_ENTRY_SUBMITTED,{id:n.state.changeRequestId},{}))},n.state={changeRequestId:re.default.Empty(),changeRequest:$a.create()},n}return $g(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");e!==re.default.Empty()&&this.state.changeRequestId!=e&&(this.setState({changeRequestId:e}),this.fetchData(e))},t.prototype.render=function(){var e,t;return Object(o.jsx)(O.Content,{children:Object(o.jsx)(zg,Zg({changeRequest:null!==(e=this.state.changeRequest)&&void 0!==e?e:$a.create(),stepNumber:3,currentUser:null!==(t=this.props.currentUser)&&void 0!==t?t:{}},{children:Object(o.jsx)(Qn.a,Zg({title:"Review"},{children:Object(o.jsxs)(y.b,Zg({direction:"vertical"},{children:[Object(o.jsx)(Zd,{loading:this.state.loading,changeRequest:this.state.changeRequest,fieldErrors:this.state.fieldErrors},void 0),Object(o.jsx)(Xg,{changeRequest:this.state.changeRequest,onSubmit:this.goToNextStep,onPrevious:this.goToPreviousStep},void 0)]}),void 0)}),void 0)}),void 0)},void 0)},t}(a.Component);var tb=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected}}))(eb)),nb=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),rb=function(){return rb=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},rb.apply(this,arguments)},ib=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(e){n.setState({loading:!0});var t=[];e!==re.default.Empty()&&t.push(n.loadChangeRequest(e)),Promise.all(t).then((function(){n.setState({loading:!1})}
1))},n.loadChangeRequest=function(e){return va.getBaseChangeRequestDetails(e).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.handleSave=function(e){n.setState({isEditing:!1}),e!=n.state.changeRequestId?T.replace(x.generate(x.EXISTING_ADMINISTRATIVE_CHANGE_REQUEST_ENTRY_1,{id:e})):n.loadChangeRequest(e)},n.handleSubmitted=function(e){T.replace(x.generate(x.EXISTING_ADMINISTRATIVE_CHANGE_REQUEST_ENTRY_1,{id:e})),T.push(x.generate(x.EXISTING_ADMINISTRATIVE_CHANGE_REQUEST_ENTRY_2,{id:e}))},n.state={changeRequestId:re.default.Empty(),changeRequest:$a.create({changeRequestTypeId:Xa.ADMINISTRATIVECHANGE}),courseId:re.default.Empty()},n}return nb(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");"new"==e||e==Hr.DEFAULT_STRING?this.setState({isNew:!0}):e!==re.default.Empty()&&this.state.changeRequestId!=e&&(this.setState({changeRequestId:e}),this.fetchData(e))},t.prototype.render=function(){var e,t;return Object(o.jsx)(O.Content,{children:Object(o.jsx)(zg,rb({changeRequest:null!==(e=this.state.changeRequest)&&void 0!==e?e:$a.create(),stepNumber:0,currentUser:null!==(t=this.props.currentUser)&&void 0!==t?t:{}},{children:Object(o.jsx)(Qn.a,rb({title:"Change Information"},{children:Object(o.jsx)(Cs,{changeRequestId:this.state.changeRequest.id,selectedInstitution:this.props.selectedInstitution?this.props.selectedInstitution.id:this.state.changeRequest.institutionId,loading:this.state.loading,onSubmit:this.handleSubmitted,onSave:this.handleSave},void 0)}),void 0)}),void 0)},void 0)},t}(a.Component);var ob=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected}}))(ib)),ab=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),sb=function(){return sb=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},sb.apply(this,arguments)},db=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(e){n.setState({loading:!0});var t=[];e!==re.default.Empty()&&t.push(n.loadChangeRequest(e)),Promise.all(t).then((function(){n.setState({loading:!1})}))},n.loadChangeRequest=function(e){return va.getBaseChangeRequestDetails(e).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.goToPreviousStep=function(){T.push(x.generate(x.EXISTING_ADMINISTRATIVE_CHANGE_REQUEST_ENTRY_1,{id:n.state.changeRequestId},{}))},n.goToNextStep=function(){T.push(x.generate(x.EXISTING_ADMINISTRATIVE_CHANGE_REQUEST_ENTRY_REVIEW,{id:n.state.changeRequestId},{}))},n.state={changeRequestId:re.default.Empty(),changeRequest:$a.create()},n}return ab(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");e!==re.default.Empty()&&this.state.changeRequestId!=e&&(this.setState({changeRequestId:e}),this.fetchData(e))},t.prototype.render=function(){var e,t;return Object(o.jsx)(O.Content,{children:Object(o.jsx)(zg,sb({changeRequest:null!==(e=this.state.changeRequest)&&void 0!==e?e:$a.create(),stepNumber:1,currentUser:null!==(t=this.props.currentUser)&&void 0!==t?t:{}},{children:Object(o.jsx)(Qn.a,sb({title:"Additional Information"},{children:Object(o.jsx)(gs,{changeRequest:this.state.changeRequest,onPrevious:this.goToPreviousStep,onSubmit:this.goToNextStep,loading:this.state.loading},void 0)}),void 0)}),void 0)},void 0)},t}(a.Component);var cb=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value}}))(db)),lb=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ub=function(){return ub=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ub.apply(this,arguments)},pb=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(e){n.setState({loading:!0});var t=[];e!==re.default.Empty()&&t.push(n.loadChangeRequest(e)),Promise.all(t).then((function(){n.setState({loading:!1})}
1))},n.loadChangeRequest=function(e){return va.getBaseChangeRequestDetails(e).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.goToPreviousStep=function(){T.push(x.generate(x.EXISTING_ADMINISTRATIVE_CHANGE_REQUEST_ENTRY_2,{id:n.state.changeRequestId},{}))},n.goToNextStep=function(){T.push(x.generate(x.EXISTING_ADMINISTRATIVE_CHANGE_REQUEST_ENTRY_SUBMITTED,{id:n.state.changeRequestId},{}))},n.state={changeRequestId:re.default.Empty(),changeRequest:$a.create()},n}return lb(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");e!==re.default.Empty()&&this.state.changeRequestId!=e&&(this.setState({changeRequestId:e}),this.fetchData(e))},t.prototype.render=function(){var e,t;return Object(o.jsx)(O.Content,{children:Object(o.jsx)(zg,ub({changeRequest:null!==(e=this.state.changeRequest)&&void 0!==e?e:$a.create(),stepNumber:2,currentUser:null!==(t=this.props.currentUser)&&void 0!==t?t:{}},{children:Object(o.jsx)(Qn.a,ub({title:"Review"},{children:Object(o.jsxs)(y.b,ub({direction:"vertical"},{children:[Object(o.jsx)(Ps,{loading:this.state.loading,changeRequest:this.state.changeRequest,fieldErrors:this.state.fieldErrors},void 0),Object(o.jsx)(Xg,{changeRequest:this.state.changeRequest,onSubmit:this.goToNextStep,onPrevious:this.goToPreviousStep},void 0)]}),void 0)}),void 0)}),void 0)},void 0)},t}(a.Component);var fb=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected}}))(pb)),hb=n(1525),vb=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),mb=function(){return mb=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},mb.apply(this,arguments)},gb=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.backToListing=function(){T.push(x.generate(x.CHANGE_REQUESTS))},t.goToDashboard=function(){T.push(x.generate(x.HOME))},t.render=function(){return Object(o.jsx)(wn.a,{status:"success",title:"Submitted",subTitle:"Your request has successfully been submitted and is in review. You can check the status of your request from the Change Requests tab.",extra:[Object(o.jsx)(rt.a,mb({onClick:t.backToListing},{children:"Back to Listing"}),"buy"),Object(o.jsxs)(rt.a,mb({type:"primary",onClick:t.goToDashboard},{children:[Object(o.jsx)(hb.a,{},void 0)," Go to Dashboard"]}),"console")]},void 0)},t}return vb(t,e),t}(a.Component),bb=gb,yb=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ob=function(e){function t(t){var n=e.call(this,t)||this;return n.state={changeRequestId:re.default.Empty(),changeRequest:$a.create(),progress:0},n}return yb(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");e!==re.default.Empty()&&this.state.changeRequestId!=e&&this.setState({changeRequestId:e})},t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{breadcrumbs:Xn.changeRequestList()},void 0),Object(o.jsx)(Qn.a,{children:Object(o.jsx)(bb,{},void 0)},void 0)]},void 0)},t}(a.Component);var jb=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value}}))(Ob)),Ib=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Sb=function(){return Sb=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Sb.apply(this,arguments)},Eb=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(e){n.setState({loading:!0});var t=[];e!==re.default.Empty()&&t.push(n.loadChangeRequest(e)),Promise.all(t).then((function(){n.setState({loading:!1})}
1))},n.loadChangeRequest=function(e){return va.getBaseChangeRequestDetails(e).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.handleSave=function(e){n.setState({isEditing:!1}),e!=n.state.changeRequestId?T.replace(x.generate(x.EXISTING_COURSE_DEACTIVATION_CHANGE_REQUEST_ENTRY_1,{id:e})):n.loadChangeRequest(e)},n.handleSubmitted=function(e){T.replace(x.generate(x.EXISTING_COURSE_DEACTIVATION_CHANGE_REQUEST_ENTRY_1,{id:e})),T.push(x.generate(x.EXISTING_COURSE_DEACTIVATION_CHANGE_REQUEST_ENTRY_2,{id:e}))},n.state={changeRequestId:re.default.Empty(),changeRequest:$a.create({changeRequestTypeId:Xa.COURSEDEACTIVATION}),courseId:re.default.Empty()},n}return Ib(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");"new"==e||e==Hr.DEFAULT_STRING?this.setState({isNew:!0}):e!==re.default.Empty()&&this.state.changeRequestId!=e&&(this.setState({changeRequestId:e}),this.fetchData(e))},t.prototype.render=function(){var e,t,n,r;return Object(o.jsx)(O.Content,{children:Object(o.jsx)(zg,Sb({changeRequest:null!==(e=this.state.changeRequest)&&void 0!==e?e:$a.create(),stepNumber:0,currentUser:null!==(t=this.props.currentUser)&&void 0!==t?t:{}},{children:Object(o.jsx)(Qn.a,Sb({title:"Deactivation Information"},{children:Object(o.jsx)(Cd,{changeRequestId:this.state.changeRequest.id,institutionId:this.props.selectedInstitution?null!==(n=this.props.selectedInstitution.id)&&void 0!==n?n:re.default.Empty():null!==(r=this.state.changeRequest.institutionId)&&void 0!==r?r:re.default.Empty(),loading:this.state.loading,onSubmit:this.handleSubmitted,onSave:this.handleSave},void 0)}),void 0)}),void 0)},void 0)},t}(a.Component);var Rb=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected}}))(Eb)),_b=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Tb=function(){return Tb=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Tb.apply(this,arguments)},Cb=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(e){n.setState({loading:!0});var t=[];e!==re.default.Empty()&&t.push(n.loadChangeRequest(e)),Promise.all(t).then((function(){n.setState({loading:!1})}))},n.loadChangeRequest=function(e){return va.getBaseChangeRequestDetails(e).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.goToPreviousStep=function(){T.push(x.generate(x.EXISTING_COURSE_DEACTIVATION_CHANGE_REQUEST_ENTRY_1,{id:n.state.changeRequestId},{}))},n.goToNextStep=function(){T.push(x.generate(x.EXISTING_COURSE_DEACTIVATION_CHANGE_REQUEST_ENTRY_REVIEW,{id:n.state.changeRequestId},{}))},n.state={changeRequestId:re.default.Empty(),changeRequest:$a.create()},n}return _b(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");e!==re.default.Empty()&&this.state.changeRequestId!=e&&(this.setState({changeRequestId:e}),this.fetchData(e))},t.prototype.render=function(){var e,t;return Object(o.jsx)(O.Content,{children:Object(o.jsx)(zg,Tb({changeRequest:null!==(e=this.state.changeRequest)&&void 0!==e?e:$a.create(),stepNumber:1,currentUser:null!==(t=this.props.currentUser)&&void 0!==t?t:{}},{children:Object(o.jsx)(Qn.a,Tb({title:"Additional Information"},{children:Object(o.jsx)(gs,{changeRequest:this.state.changeRequest,onPrevious:this.goToPreviousStep,onSubmit:this.goToNextStep,loading:this.state.loading},void 0)}),void 0)}),void 0)},void 0)},t}(a.Component);var xb=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value}}))(Cb)),Ab=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Pb=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(e){n.setState({loading:!0});var t=[];e!==re.default.Empty()&&t.push(n.loadChangeRequest(e)),Promise.all(t).then((function(){n.setState({loading:!1})}
1))},n.loadChangeRequest=function(e){var t=Gs({changeRequestId:e});return Us.get(t).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.goToPreviousStep=function(){T.push(x.generate(x.EXISTING_COURSE_DEACTIVATION_CHANGE_REQUEST_ENTRY_2,{id:n.state.changeRequestId},{}))},n.submit=function(){T.push(x.generate(x.EXISTING_COURSE_DEACTIVATION_CHANGE_REQUEST_ENTRY_SUBMITTED,{id:n.state.changeRequestId},{}))},n.state={changeRequestId:re.default.Empty(),changeRequest:$a.create(),progress:0},n}return Ab(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");e!==re.default.Empty()&&this.state.changeRequestId!=e&&(this.setState({changeRequestId:e}),this.fetchData(e))},t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{breadcrumbs:Xn.changeRequestList()},void 0),Object(o.jsx)(Qn.a,{children:Object(o.jsx)(bb,{},void 0)},void 0)]},void 0)},t}(a.Component);var Nb=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value}}))(Pb)),wb=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Db=function(){return Db=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Db.apply(this,arguments)},qb=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(e){n.setState({loading:!0});var t=[];e!==re.default.Empty()&&t.push(n.loadChangeRequest(e)),Promise.all(t).then((function(){n.setState({loading:!1})}))},n.loadChangeRequest=function(e){return va.getBaseChangeRequestDetails(e).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.goToPreviousStep=function(){T.push(x.generate(x.EXISTING_COURSE_DEACTIVATION_CHANGE_REQUEST_ENTRY_2,{id:n.state.changeRequestId},{}))},n.goToNextStep=function(){T.push(x.generate(x.EXISTING_COURSE_DEACTIVATION_CHANGE_REQUEST_ENTRY_SUBMITTED,{id:n.state.changeRequestId},{}))},n.state={changeRequestId:re.default.Empty(),changeRequest:$a.create()},n}return wb(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");e!==re.default.Empty()&&this.state.changeRequestId!=e&&(this.setState({changeRequestId:e}),this.fetchData(e))},t.prototype.render=function(){var e,t;return Object(o.jsx)(O.Content,{children:Object(o.jsx)(zg,Db({changeRequest:null!==(e=this.state.changeRequest)&&void 0!==e?e:$a.create(),stepNumber:2,currentUser:null!==(t=this.props.currentUser)&&void 0!==t?t:{}},{children:Object(o.jsx)(Qn.a,Db({title:"Review"},{children:Object(o.jsxs)(y.b,Db({direction:"vertical"},{children:[Object(o.jsx)(Pd,{loading:this.state.loading,changeRequest:this.state.changeRequest,fieldErrors:this.state.fieldErrors},void 0),Object(o.jsx)(Xg,{changeRequest:this.state.changeRequest,onSubmit:this.goToNextStep,onPrevious:this.goToPreviousStep},void 0)]}),void 0)}),void 0)}),void 0)},void 0)},t}(a.Component);var Fb=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected}}))(qb)),Mb=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Yb=function(){return Yb=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Yb.apply(this,arguments)},Ub=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(e){n.setState({loading:!0});var t=[];e!==re.default.Empty()&&t.push(n.loadChangeRequest(e)),Promise.all(t).then((function(){n.setState({loading:!1})}
1))},n.loadChangeRequest=function(e){return va.getBaseChangeRequestDetails(e).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.handleSave=function(e){n.setState({isEditing:!1}),e!=n.state.changeRequestId?T.replace(x.generate(x.EXISTING_COURSE_MODIFICATION_CHANGE_REQUEST_ENTRY_1,{id:e})):n.loadChangeRequest(e)},n.handleSubmitted=function(e){T.replace(x.generate(x.EXISTING_COURSE_MODIFICATION_CHANGE_REQUEST_ENTRY_1,{id:e})),T.push(x.generate(x.EXISTING_COURSE_MODIFICATION_CHANGE_REQUEST_ENTRY_2,{id:e}))},n.state={changeRequestId:re.default.Empty(),changeRequest:$a.create({changeRequestTypeId:Xa.COURSEMODIFICATION}),courseId:re.default.Empty()},n}return Mb(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id"),t=Hr.getParameter("disciplineId",""),n=Hr.getParameter("catalogNumber","");"new"==e||e==Hr.DEFAULT_STRING?this.setState({isNew:!0,disciplineId:t,catalogNumber:n}):e!==re.default.Empty()&&this.state.changeRequestId!=e&&(this.setState({changeRequestId:e,disciplineId:t,catalogNumber:n}),this.fetchData(e))},t.prototype.render=function(){var e,t,n,r;return Object(o.jsx)(O.Content,{children:Object(o.jsx)(zg,Yb({changeRequest:null!==(e=this.state.changeRequest)&&void 0!==e?e:$a.create(),stepNumber:0,currentUser:null!==(t=this.props.currentUser)&&void 0!==t?t:{}},{children:Object(o.jsx)(Qn.a,Yb({title:"Course Selection"},{children:Object(o.jsx)(Md,{changeRequestId:this.state.changeRequest.id,institutionId:this.props.selectedInstitution?null!==(n=this.props.selectedInstitution.id)&&void 0!==n?n:re.default.Empty():null!==(r=this.state.changeRequest.institutionId)&&void 0!==r?r:re.default.Empty(),disciplineId:this.state.disciplineId,catalogNumber:this.state.catalogNumber,loading:this.state.loading,onSubmit:this.handleSubmitted,onSave:this.handleSave},void 0)}),void 0)}),void 0)},void 0)},t}(a.Component);var Lb=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected}}))(Ub)),kb=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Gb=function(){return Gb=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Gb.apply(this,arguments)},Vb=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(e){n.setState({loading:!0});var t=[];e!==re.default.Empty()&&t.push(n.loadChangeRequest(e)),Promise.all(t).then((function(){n.setState({loading:!1})}))},n.loadChangeRequest=function(e){return va.getBaseChangeRequestDetails(e).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.handleGoBack=function(){T.push(x.generate(x.EXISTING_COURSE_MODIFICATION_CHANGE_REQUEST_ENTRY_1,{id:n.state.changeRequestId},{}))},n.handleSubmitted=function(){T.push(x.generate(x.EXISTING_COURSE_MODIFICATION_CHANGE_REQUEST_ENTRY_3,{id:n.state.changeRequestId},{}))},n.state={changeRequestId:re.default.Empty(),changeRequest:$a.create()},n}return kb(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");e!==re.default.Empty()&&this.state.changeRequestId!=e&&(this.setState({changeRequestId:e}),this.fetchData(e))},t.prototype.render=function(){var e,t;return Object(o.jsx)(O.Content,{children:Object(o.jsx)(zg,Gb({changeRequest:null!==(e=this.state.changeRequest)&&void 0!==e?e:$a.create(),stepNumber:1,currentUser:null!==(t=this.props.currentUser)&&void 0!==t?t:{}},{children:Object(o.jsx)(Qn.a,Gb({title:"Course Details"},{children:Object(o.jsx)(Xd,{changeRequestId:this.state.changeRequest.i
1d,loading:this.state.loading,onSubmit:this.handleSubmitted,onPrevious:this.handleGoBack},void 0)}),void 0)}),void 0)},void 0)},t}(a.Component);var Bb=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value}}))(Vb)),Wb=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),zb=function(){return zb=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},zb.apply(this,arguments)},Hb=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(e){n.setState({loading:!0});var t=[];e!==re.default.Empty()&&t.push(n.loadChangeRequest(e)),Promise.all(t).then((function(){n.setState({loading:!1})}))},n.loadChangeRequest=function(e){return va.getBaseChangeRequestDetails(e).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.goToPreviousStep=function(){T.push(x.generate(x.EXISTING_COURSE_MODIFICATION_CHANGE_REQUEST_ENTRY_2,{id:n.state.changeRequestId},{}))},n.goToNextStep=function(){T.push(x.generate(x.EXISTING_COURSE_MODIFICATION_CHANGE_REQUEST_ENTRY_REVIEW,{id:n.state.changeRequestId},{}))},n.showComments=function(){var e,t;return null!==(t=(null===(e=n.state.changeRequest)||void 0===e?void 0:e.statusTypeId)==Ea.ATTENTIONREQUIRED)&&void 0!==t&&t},n.state={changeRequestId:re.default.Empty(),changeRequest:$a.create()},n}return Wb(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");e!==re.default.Empty()&&this.state.changeRequestId!=e&&(this.setState({changeRequestId:e}),this.fetchData(e))},t.prototype.render=function(){var e,t;return Object(o.jsx)(O.Content,{children:Object(o.jsx)(zg,zb({changeRequest:null!==(e=this.state.changeRequest)&&void 0!==e?e:$a.create(),stepNumber:2,currentUser:null!==(t=this.props.currentUser)&&void 0!==t?t:{}},{children:Object(o.jsx)(Qn.a,zb({title:"Additional Information"},{children:Object(o.jsx)(gs,{changeRequest:this.state.changeRequest,onPrevious:this.goToPreviousStep,onSubmit:this.goToNextStep,loading:this.state.loading},void 0)}),void 0)}),void 0)},void 0)},t}(a.Component);var Qb=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value}}))(Hb)),Kb=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Xb=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(e){n.setState({loading:!0});var t=[];e!==re.default.Empty()&&t.push(n.loadChangeRequest(e)),Promise.all(t).then((function(){n.setState({loading:!1})}))},n.loadChangeRequest=function(e){var t=Nd({changeRequestId:e});return Sd.get(t).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.goToPreviousStep=function(){T.push(x.generate(x.EXISTING_COURSE_MODIFICATION_CHANGE_REQUEST_ENTRY_2,{id:n.state.changeRequestId},{}))},n.submit=function(){T.push(x.generate(x.EXISTING_COURSE_MODIFICATION_CHANGE_REQUEST_ENTRY_SUBMITTED,{id:n.state.changeRequestId},{}))},n.state={changeRequestId:re.default.Empty(),changeRequest:$a.create(),progress:0},n}return Kb(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");e!==re.default.Empty()&&this.state.changeRequestId!=e&&(this.setState({changeRequestId:e}),this.fetchData(e))},t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{breadcrumbs:Xn.changeRequestList()},void 0),Object(o.jsx)(Qn.a,{children:Object(o.jsx)(bb,{},void 0)},void 0)]},void 0)},t}(a.Component);var Jb=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value}}))(Xb)),$b=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Zb=function(){return Zb=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Zb.apply(this,arguments)},ey=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(e){n.setState({loading:!0});var t=[];e!==re.default.Empty()&&t.push(n.loadChangeRequest(e)),Promise.all(t).then((function(){n.setState({loading:!1})}
1))},n.loadChangeRequest=function(e){return va.getBaseChangeRequestDetails(e).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.goToPreviousStep=function(){T.push(x.generate(x.EXISTING_NEW_COURSE_CHANGE_REQUEST_ENTRY_2,{id:n.state.changeRequestId},{}))},n.goToNextStep=function(){T.push(x.generate(x.EXISTING_NEW_COURSE_CHANGE_REQUEST_ENTRY_SUBMITTED,{id:n.state.changeRequestId},{}))},n.state={changeRequestId:re.default.Empty(),changeRequest:$a.create()},n}return $b(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");e!==re.default.Empty()&&this.state.changeRequestId!=e&&(this.setState({changeRequestId:e}),this.fetchData(e))},t.prototype.render=function(){var e,t;return Object(o.jsx)(O.Content,{children:Object(o.jsx)(zg,Zb({changeRequest:null!==(e=this.state.changeRequest)&&void 0!==e?e:$a.create(),stepNumber:2,currentUser:null!==(t=this.props.currentUser)&&void 0!==t?t:{}},{children:Object(o.jsx)(Qn.a,Zb({title:"Review"},{children:Object(o.jsxs)(y.b,Zb({direction:"vertical"},{children:[Object(o.jsx)(gc,{loading:this.state.loading,changeRequest:this.state.changeRequest,fieldErrors:this.state.fieldErrors},void 0),Object(o.jsx)(Xg,{changeRequest:this.state.changeRequest,onSubmit:this.goToNextStep,onPrevious:this.goToPreviousStep},void 0)]}),void 0)}),void 0)}),void 0)},void 0)},t}(a.Component);var ty=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value}}))(ey)),ny=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ry=function(){return ry=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ry.apply(this,arguments)},iy=function(e){function t(t){var n=e.call(this,t)||this;return n._newCourseChangeRequestEntryRef=a.createRef(),n.fetchData=function(e){n.setState({loading:!0});var t=[];e!==re.default.Empty()&&t.push(n.loadChangeRequest(e)),Promise.all(t).then((function(){n.setState({loading:!1})}))},n.loadChangeRequest=function(e){return va.getBaseChangeRequestDetails(e).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.newCourseSaved=function(e){T.replace(x.generate(x.EXISTING_NEW_COURSE_CHANGE_REQUEST_ENTRY_1,{id:e}))},n.newCourseSubmit=function(e){T.replace(x.generate(x.EXISTING_NEW_COURSE_CHANGE_REQUEST_ENTRY_1,{id:e})),T.push(x.generate(x.EXISTING_NEW_COURSE_CHANGE_REQUEST_ENTRY_2,{id:e}))},n.state={changeRequestId:re.default.Empty(),changeRequest:$a.create({changeRequestTypeId:Xa.NEWCOURSE})},n}return ny(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");"new"==e||e==Hr.DEFAULT_STRING?this.setState({isNew:!0}):e!==re.default.Empty()&&this.state.changeRequestId!=e&&(this.setState({changeRequestId:e}),this.fetchData(e))},t.prototype.render=function(){var e,t;return Object(o.jsx)(O.Content,{children:Object(o.jsx)(zg,ry({changeRequest:null!==(e=this.state.changeRequest)&&void 0!==e?e:$a.create(),stepNumber:0,currentUser:null!==(t=this.props.currentUser)&&void 0!==t?t:{}},{children:Object(o.jsx)(Qn.a,ry({title:"Course Details"},{children:Object(o.jsx)(hc,{ref:this._newCourseChangeRequestEntryRef,changeRequestId:this.state.changeRequest.id,selectedInstitution:this.props.selectedInstitution?this.props.selectedInstitution.id:this.state.changeRequest.institutionId,isNew:this.state.isNew,onSave:this.newCourseSaved,onSubmit:this.newCourseSubmit,loading:this.state.loading},void 0)}),void 0)}),void 0)},void 0)},t}(a.Component);var oy=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected}}))(iy)),ay=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),sy=function(){return sy=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},sy.apply(this,arguments)},dy=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(e){n.setState({loading:!0});var t=[];e!==re.default.Empty()&&t.push(n.loadChangeRequest(e)),Promise.all(t).then((function(){n.setState({loading:!1})}
1))},n.loadChangeRequest=function(e){return va.getBaseChangeRequestDetails(e).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.goToPreviousStep=function(){T.push(x.generate(x.EXISTING_NEW_COURSE_CHANGE_REQUEST_ENTRY_1,{id:n.state.changeRequestId},{}))},n.goToNextStep=function(){T.push(x.generate(x.EXISTING_NEW_COURSE_CHANGE_REQUEST_ENTRY_REVIEW,{id:n.state.changeRequestId},{}))},n.state={changeRequestId:re.default.Empty(),changeRequest:$a.create()},n}return ay(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");e!==re.default.Empty()&&this.state.changeRequestId!=e&&(this.setState({changeRequestId:e}),this.fetchData(e))},t.prototype.render=function(){var e,t;return Object(o.jsx)(O.Content,{children:Object(o.jsx)(zg,sy({changeRequest:null!==(e=this.state.changeRequest)&&void 0!==e?e:$a.create(),stepNumber:1,currentUser:null!==(t=this.props.currentUser)&&void 0!==t?t:{}},{children:Object(o.jsx)(Qn.a,sy({title:"Additional Information"},{children:Object(o.jsx)(gs,{changeRequest:this.state.changeRequest,onPrevious:this.goToPreviousStep,onSubmit:this.goToNextStep,loading:this.state.loading},void 0)}),void 0)}),void 0)},void 0)},t}(a.Component);var cy=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value}}))(dy)),ly=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),uy=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(e){n.setState({loading:!0});var t=[];e!==re.default.Empty()&&t.push(n.loadChangeRequest(e)),Promise.all(t).then((function(){n.setState({loading:!1})}))},n.loadChangeRequest=function(e){var t=oc({changeRequestId:e});return nc.get(t).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.goToPreviousStep=function(){T.push(x.generate(x.EXISTING_NEW_COURSE_CHANGE_REQUEST_ENTRY_2,{id:n.state.changeRequestId},{}))},n.submit=function(){T.push(x.generate(x.EXISTING_NEW_COURSE_CHANGE_REQUEST_ENTRY_SUBMITTED,{id:n.state.changeRequestId},{}))},n.state={changeRequestId:re.default.Empty(),changeRequest:$a.create(),progress:0},n}return ly(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");e!==re.default.Empty()&&this.state.changeRequestId!=e&&(this.setState({changeRequestId:e}),this.fetchData(e))},t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{breadcrumbs:Xn.changeRequestList()},void 0),Object(o.jsx)(Qn.a,{children:Object(o.jsx)(bb,{},void 0)},void 0)]},void 0)},t}(a.Component);var py=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value}}))(uy)),fy=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),hy=function(){return hy=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},hy.apply(this,arguments)},vy=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(e){n.setState({loading:!0});var t=[];e!==re.default.Empty()&&t.push(n.loadChangeRequest(e)),Promise.all(t).then((function(){n.setState({loading:!1})}))},n.loadChangeRequest=function(e){var t=Sc({changeRequestId:e});return Oc.get(t).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create(),fieldErrors:e.fieldErrors})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.goToPreviousStep=function(){T.push(x.generate(x.EXISTING_NEW_DISCIPLINE_CHANGE_REQUEST_ENTRY_2,{id:n.state.changeRequestId},{}))},n.goToNextStep=function(){T.push(x.generate(x.EXISTING_NEW_DISCIPLINE_CHANGE_REQUEST_ENTRY_SUBMITTED,{id:n.state.changeRequestId},{}))},n.showComments=function(){var e,t;return null!==(t=(null===(e=n.state.changeRequest)||void 0===e?void 0:e.statusTypeId)==Ea.ATTENTIONREQUIRED)&&void 0!==t&&t},n.state={changeRequestId:re.default.Empty(),changeRequest:$a.create()},n}return fy(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");e!==re.default.Empty()&&this.state.changeRequestId!=e&&(this.setState({changeRequestId:e}),this.fetchData(e))},t.prototype.render=function(){var e,t;return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsx)(zg,hy({changeRequest:null!==(e=this.state.changeRequest)&&void 0!==e?e:$a.create(),stepNumber:2,currentUser:null!==(t=this.props.currentUser)&&void 0!==t?t:{}},{children:Object(o.jsx)(Qn.a,hy({title:"Review"},{children:Object(o.jsxs)(y.b,hy({direction:"vertical"},{children:[Object(o.jsx)(Ac,{loading:this.state.loading,changeRequest:this.state.changeRequest,fieldErrors:this.state.fieldErrors},void 0),Object(o.jsx)(Xg,{changeRequest:this.state.changeRequest,onSubmit:this.goToNextStep,onPrevious:this.goToPreviousStep},void 0)]}),void 0)}),void 0)}),void 0)},t}(a.Component);var my=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected}}))(vy)),gy=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),by=function(){return by=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},by.apply(this,arguments)},yy=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(e){n.setState({loading:!0});var t=[];e!==re.default.Empty()&&t.push(n.loadChangeRequest(e)),Promise.all(t).then((function(){n.setState({loading:!1})}
1))},n.loadChangeRequest=function(e){return va.getBaseChangeRequestDetails(e).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.handleSave=function(e){T.replace(x.generate(x.EXISTING_NEW_DISCIPLINE_CHANGE_REQUEST_ENTRY_1,{id:e},{}))},n.goToNextStep=function(e){T.replace(x.generate(x.EXISTING_NEW_DISCIPLINE_CHANGE_REQUEST_ENTRY_1,{id:e},{})),T.push(x.generate(x.EXISTING_NEW_DISCIPLINE_CHANGE_REQUEST_ENTRY_2,{id:e},{}))},n.state={changeRequestId:re.default.Empty(),changeRequest:$a.create({changeRequestTypeId:Xa.NEWDISCIPLINE})},n}return gy(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");"new"==e||e==Hr.DEFAULT_STRING?this.setState({isNew:!0,changeRequestId:re.default.NewGuid()}):e!==re.default.Empty()&&this.state.changeRequestId!=e&&(this.setState({changeRequestId:e}),this.fetchData(e))},t.prototype.render=function(){var e,t,n,r;return Object(o.jsx)(O.Content,{children:Object(o.jsx)(zg,by({changeRequest:null!==(e=this.state.changeRequest)&&void 0!==e?e:$a.create(),stepNumber:0,currentUser:null!==(t=this.props.currentUser)&&void 0!==t?t:{}},{children:Object(o.jsx)(Qn.a,by({title:"Discipline Details"},{children:Object(o.jsx)(Tc,{changeRequestId:null!==(r=null===(n=this.state.changeRequest)||void 0===n?void 0:n.id)&&void 0!==r?r:re.default.Empty(),selectedInstitution:this.props.selectedInstitution?this.props.selectedInstitution.id:this.state.changeRequest.institutionId,isNew:this.state.isNew,onSubmit:this.goToNextStep,onSave:this.handleSave,loading:this.state.loading},void 0)}),void 0)}),void 0)},void 0)},t}(a.Component);var Oy=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected}}))(yy)),jy=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Iy=function(){return Iy=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Iy.apply(this,arguments)},Sy=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(e){n.setState({loading:!0});var t=[];e!==re.default.Empty()&&t.push(n.loadChangeRequest(e)),Promise.all(t).then((function(){n.setState({loading:!1})}))},n.loadChangeRequest=function(e){var t=Sc({changeRequestId:e});return Oc.get(t).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.goToPreviousStep=function(){T.push(x.generate(x.EXISTING_NEW_DISCIPLINE_CHANGE_REQUEST_ENTRY_1,{id:n.state.changeRequestId},{}))},n.goToNextStep=function(){T.push(x.generate(x.EXISTING_NEW_DISCIPLINE_CHANGE_REQUEST_ENTRY_REVIEW,{id:n.state.changeRequestId},{}))},n.state={changeRequestId:re.default.Empty(),changeRequest:$a.create()},n}return jy(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");e!==re.default.Empty()&&this.state.changeRequestId!=e&&(this.setState({changeRequestId:e}),this.fetchData(e))},t.prototype.render=function(){var e,t;return Object(o.jsx)(zg,Iy({changeRequest:null!==(e=this.state.changeRequest)&&void 0!==e?e:$a.create(),stepNumber:1,currentUser:null!==(t=this.props.currentUser)&&void 0!==t?t:{}},{children:Object(o.jsx)(Qn.a,Iy({title:"Additional Information"},{children:Object(o.jsx)(gs,{changeRequest:this.state.changeRequest,onPrevious:this.goToPreviousStep,onSubmit:this.goToNextStep,loading:this.state.loading},void 0)}),void 0)}),void 0)},t}(a.Component);var Ey=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value}}))(Sy)),Ry=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),_y=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(e){n.setState({loading:!0});var t=[];e!==re.default.Empty()&&t.push(n.loadChangeRequest(e)),Promise.all(t).then((function(){n.setState({loading:!1})}
1))},n.loadChangeRequest=function(e){var t=Sc({changeRequestId:e});return Oc.get(t).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.goToPreviousStep=function(){T.push(x.generate(x.EXISTING_NEW_DISCIPLINE_CHANGE_REQUEST_ENTRY_2,{id:n.state.changeRequestId},{}))},n.submit=function(){T.push(x.generate(x.EXISTING_NEW_DISCIPLINE_CHANGE_REQUEST_ENTRY_SUBMITTED,{id:n.state.changeRequestId},{}))},n.state={changeRequestId:re.default.Empty(),changeRequest:$a.create(),progress:0},n}return Ry(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");e!==re.default.Empty()&&this.state.changeRequestId!=e&&(this.setState({changeRequestId:e}),this.fetchData(e))},t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{breadcrumbs:Xn.changeRequestList()},void 0),Object(o.jsx)(Qn.a,{children:Object(o.jsx)(bb,{},void 0)},void 0)]},void 0)},t}(a.Component);var Ty=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value}}))(_y)),Cy=function(e){return Object.assign({changeRequestId:"00000000-0000-0000-0000-000000000000"},e)},xy=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ay=function(){return Ay=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ay.apply(this,arguments)},Py=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(e){n.setState({loading:!0});var t=[];e!==re.default.Empty()&&t.push(n.loadChangeRequest(e)),Promise.all(t).then((function(){n.setState({loading:!1})}))},n.loadChangeRequest=function(e){var t=Cy({changeRequestId:e});return lp.get(t).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create(),fieldErrors:e.fieldErrors})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.goToPreviousStep=function(){T.push(x.generate(x.EXISTING_NOTICE_OF_INTENT_CHANGE_REQUEST_ENTRY_8,{id:n.state.changeRequestId},{}))},n.goToNextStep=function(){T.push(x.generate(x.EXISTING_NOTICE_OF_INTENT_CHANGE_REQUEST_ENTRY_SUBMITTED,{id:n.state.changeRequestId}))},n.state={changeRequestId:re.default.Empty(),changeRequest:$a.create()},n}return xy(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");"new"==e?this.setState({isNew:!0}):e!==re.default.Empty()&&this.state.changeRequestId!=e&&(this.setState({changeRequestId:e}),this.fetchData(e))},t.prototype.render=function(){var e,t;return Object(o.jsx)(O.Content,{children:Object(o.jsx)(zg,Ay({changeRequest:null!==(e=this.state.changeRequest)&&void 0!==e?e:$a.create(),stepNumber:8,currentUser:null!==(t=this.props.currentUser)&&void 0!==t?t:{}},{children:Object(o.jsx)(Qn.a,Ay({title:"Review"},{children:Object(o.jsxs)(y.b,Ay({direction:"vertical"},{children:[Object(o.jsx)(Iv,{changeRequest:this.state.changeRequest,loading:this.state.loading,fieldErrors:this.state.fieldErrors},void 0),Object(o.jsx)(Xg,{changeRequest:this.state.changeRequest,onSubmit:this.goToNextStep,onPrevious:this.goToPreviousStep},void 0)]}),void 0)}),void 0)}),void 0)},void 0)},t}(a.Component);var Ny=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected}}))(Py)),wy=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Dy=function(){return Dy=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Dy.apply(this,arguments)},qy=function(e){function t(t){var n=e.call(this,t)||this;return n._newNoticeOfIntentChangeRequestEntryRef=a.createRef(),n.fetchData=function(e){n.setState({loading:!0});var t=[];e!==re.default.Empty()&&"new"!==e&&""!==e&&t.push(n.loadChangeRequest(e)),Promise.all(t).then((function(){n.setState({loading:!1})}
1))},n.loadChangeRequest=function(e){return va.getBaseChangeRequestDetails(e).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.noticeOfIntentSaved=function(e){T.replace(x.generate(x.EXISTING_NOTICE_OF_INTENT_CHANGE_REQUEST_ENTRY_1,{id:e}))},n.noticeOfIntentSubmit=function(e){T.replace(x.generate(x.EXISTING_NOTICE_OF_INTENT_CHANGE_REQUEST_ENTRY_1,{id:e})),T.push(x.generate(x.EXISTING_NOTICE_OF_INTENT_CHANGE_REQUEST_ENTRY_2,{id:e}))},n.state={changeRequestId:re.default.Empty(),changeRequest:$a.create({changeRequestTypeId:Xa.NOTICEOFINTENT})},n}return wy(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");"new"!=e&&e!=Hr.DEFAULT_STRING||this.setState({isNew:!0}),e!==re.default.Empty()&&this.state.changeRequestId!=e&&(this.setState({changeRequestId:e}),this.fetchData(e))},t.prototype.render=function(){var e,t;return Object(o.jsx)(O.Content,{children:Object(o.jsx)(zg,Dy({changeRequest:null!==(e=this.state.changeRequest)&&void 0!==e?e:$a.create(),stepNumber:0,currentUser:null!==(t=this.props.currentUser)&&void 0!==t?t:{}},{children:Object(o.jsx)(Qn.a,Dy({title:"Program Plan"},{children:Object(o.jsx)(Oh,{ref:this._newNoticeOfIntentChangeRequestEntryRef,changeRequestId:this.state.changeRequest.id,selectedInstitution:this.props.selectedInstitution?this.props.selectedInstitution.id:this.state.changeRequest.institutionId,onSave:this.noticeOfIntentSaved,onSubmit:this.noticeOfIntentSubmit,loading:this.state.loading},void 0)}),void 0)}),void 0)},void 0)},t}(a.Component);var Fy=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected}}))(qy)),My=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Yy=function(){return Yy=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Yy.apply(this,arguments)},Uy=function(e){function t(t){var n=e.call(this,t)||this;return n._newContactInformationNoticeOfIntentFormRef=a.createRef(),n.fetchData=function(e){n.setState({loading:!0});var t=[];e!==re.default.Empty()&&t.push(n.loadChangeRequest(e)),Promise.all(t).then((function(){n.setState({loading:!1})}))},n.loadChangeRequest=function(e){return va.getBaseChangeRequestDetails(e).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.goToPreviousStep=function(){T.push(x.generate(x.EXISTING_NOTICE_OF_INTENT_CHANGE_REQUEST_ENTRY_1,{id:n.state.changeRequestId},{}))},n.noticeOfIntentSubmit=function(){T.push(x.generate(x.EXISTING_NOTICE_OF_INTENT_CHANGE_REQUEST_ENTRY_3,{id:n.state.changeRequestId}))},n.state={changeRequestId:re.default.Empty(),changeRequest:$a.create()},n}return My(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");"new"==e?this.setState({isNew:!0}):e!==re.default.Empty()&&this.state.changeRequestId!=e&&(this.setState({changeRequestId:e}),this.fetchData(e))},t.prototype.render=function(){var e,t;return Object(o.jsx)(O.Content,{children:Object(o.jsx)(zg,Yy({changeRequest:null!==(e=this.state.changeRequest)&&void 0!==e?e:$a.create(),stepNumber:1,currentUser:null!==(t=this.props.currentUser)&&void 0!==t?t:{}},{children:Object(o.jsx)(Qn.a,Yy({title:"Planned Awards"},{children:Object(o.jsx)(xh,{ref:this._newContactInformationNoticeOfIntentFormRef,changeRequestId:this.state.changeRequest.id,institutionId:this.state.changeRequest.institutionId,isNew:this.state.isNew,onSubmit:this.noticeOfIntentSubmit,onPrevious:this.goToPreviousStep,loading:this.state.loading},void 0)}),void 0)}),void 0)},void 0)},t}(a.Component);var Ly=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value}}))(Uy)),ky=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Gy=function(){return Gy=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Gy.apply(this,arguments)},Vy=function(e){function t(t){var n=e.call(this,t)||this;return n._newContactInformationNoticeOfIntentFormRef=a.createRef(),n.fetchData=function(e){n.setState({loading:!0});var t=[];e!==re.default.Empty()&&t.push(n.loadChangeRequest(e)),Promise.all(t).then((function(){n.setState({loading:!1})}
1))},n.loadChangeRequest=function(e){return va.getBaseChangeRequestDetails(e).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.goToPreviousStep=function(){T.push(x.generate(x.EXISTING_NOTICE_OF_INTENT_CHANGE_REQUEST_ENTRY_2,{id:n.state.changeRequestId},{}))},n.goToNextStep=function(){T.push(x.generate(x.EXISTING_NOTICE_OF_INTENT_CHANGE_REQUEST_ENTRY_4,{id:n.state.changeRequestId}))},n.state={changeRequestId:re.default.Empty(),changeRequest:$a.create()},n}return ky(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");"new"==e?this.setState({isNew:!0}):e!==re.default.Empty()&&this.state.changeRequestId!=e&&(this.setState({changeRequestId:e}),this.fetchData(e))},t.prototype.render=function(){var e,t;return Object(o.jsx)(O.Content,{children:Object(o.jsx)(zg,Gy({changeRequest:null!==(e=this.state.changeRequest)&&void 0!==e?e:$a.create(),stepNumber:2,currentUser:null!==(t=this.props.currentUser)&&void 0!==t?t:{}},{children:Object(o.jsx)(Qn.a,Gy({title:"Contact Information"},{children:Object(o.jsx)(Yh,{ref:this._newContactInformationNoticeOfIntentFormRef,changeRequestId:this.state.changeRequest.id,institutionId:this.state.changeRequest.institutionId,isNew:this.state.isNew,onSubmit:this.goToNextStep,onPrevious:this.goToPreviousStep,loading:this.state.loading},void 0)}),void 0)}),void 0)},void 0)},t}(a.Component);var By=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected}}))(Vy)),Wy=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),zy=function(){return zy=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},zy.apply(this,arguments)},Hy=function(e){function t(t){var n=e.call(this,t)||this;return n._newContactInformationNoticeOfIntentFormRef=a.createRef(),n.fetchData=function(e){n.setState({loading:!0});var t=[];e!==re.default.Empty()&&t.push(n.loadChangeRequest(e)),Promise.all(t).then((function(){n.setState({loading:!1})}))},n.loadChangeRequest=function(e){return va.getBaseChangeRequestDetails(e).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.goToPreviousStep=function(){T.push(x.generate(x.EXISTING_NOTICE_OF_INTENT_CHANGE_REQUEST_ENTRY_3,{id:n.state.changeRequestId},{}))},n.goToNextStep=function(){T.push(x.generate(x.EXISTING_NOTICE_OF_INTENT_CHANGE_REQUEST_ENTRY_5,{id:n.state.changeRequestId}))},n.state={changeRequestId:re.default.Empty(),changeRequest:$a.create()},n}return Wy(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");"new"==e?this.setState({isNew:!0}):e!==re.default.Empty()&&this.state.changeRequestId!=e&&(this.setState({changeRequestId:e}),this.fetchData(e))},t.prototype.render=function(){var e,t;return Object(o.jsx)(O.Content,{children:Object(o.jsx)(zg,zy({changeRequest:null!==(e=this.state.changeRequest)&&void 0!==e?e:$a.create(),stepNumber:3,currentUser:null!==(t=this.props.currentUser)&&void 0!==t?t:{}},{children:Object(o.jsx)(Qn.a,zy({title:"Consultant Meetings"},{children:Object(o.jsx)(Wh,{ref:this._newContactInformationNoticeOfIntentFormRef,institutionId:this.state.changeRequest.institutionId,changeRequestId:this.state.changeRequest.id,isNew:this.state.isNew,onSubmit:this.goToNextStep,onPrevious:this.goToPreviousStep,loading:this.state.loading},void 0)}),void 0)}),void 0)},void 0)},t}(a.Component);var Qy=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected}}))(Hy)),Ky=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Xy=function(){return Xy=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Xy.apply(this,arguments)},Jy=function(e){function t(t){var n=e.call(this,t)||this;return n._newContactInformationNoticeOfIntentFormRef=a.createRef(),n.fetchData=function(e){n.setState({loading:!0});var t=[];e!==re.default.Empty()&&t.push(n.loadChangeRequest(e)),Promise.all(t).then((function(){n.setState({loading:!1})}
1))},n.loadChangeRequest=function(e){return va.getBaseChangeRequestDetails(e).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.goToPreviousStep=function(){T.push(x.generate(x.EXISTING_NOTICE_OF_INTENT_CHANGE_REQUEST_ENTRY_4,{id:n.state.changeRequestId},{}))},n.goToNextStep=function(){T.push(x.generate(x.EXISTING_NOTICE_OF_INTENT_CHANGE_REQUEST_ENTRY_6,{id:n.state.changeRequestId}))},n.state={changeRequestId:re.default.Empty(),changeRequest:$a.create()},n}return Ky(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");"new"==e?this.setState({isNew:!0}):e!==re.default.Empty()&&this.state.changeRequestId!=e&&(this.setState({changeRequestId:e}),this.fetchData(e))},t.prototype.render=function(){var e,t;return Object(o.jsx)(O.Content,{children:Object(o.jsx)(zg,Xy({changeRequest:null!==(e=this.state.changeRequest)&&void 0!==e?e:$a.create(),stepNumber:4,currentUser:null!==(t=this.props.currentUser)&&void 0!==t?t:{}},{children:Object(o.jsx)(Qn.a,Xy({title:"Occupational Information"},{children:Object(o.jsx)(iv,{ref:this._newContactInformationNoticeOfIntentFormRef,institutionId:this.state.changeRequest.institutionId,changeRequestId:this.state.changeRequest.id,isNew:this.state.isNew,onSubmit:this.goToNextStep,onPrevious:this.goToPreviousStep,loading:this.state.loading},void 0)}),void 0)}),void 0)},void 0)},t}(a.Component);var $y=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected}}))(Jy)),Zy=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),eO=function(){return eO=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},eO.apply(this,arguments)},tO=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n.fetchData=function(e){n.setState({loading:!0});var t=[];e!==re.default.Empty()&&t.push(n.loadChangeRequest(e)),Promise.all(t).then((function(){n.setState({loading:!1})}))},n.loadChangeRequest=function(e){return va.getBaseChangeRequestDetails(e).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.goToPreviousStep=function(){T.push(x.generate(x.EXISTING_NOTICE_OF_INTENT_CHANGE_REQUEST_ENTRY_5,{id:n.state.changeRequestId},{}))},n.goToNextStep=function(){T.push(x.generate(x.EXISTING_NOTICE_OF_INTENT_CHANGE_REQUEST_ENTRY_7,{id:n.state.changeRequestId}))},n.state={changeRequestId:re.default.Empty(),changeRequest:$a.create()},n}return Zy(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");"new"==e?this.setState({isNew:!0}):e!==re.default.Empty()&&this.state.changeRequestId!=e&&(this.setState({changeRequestId:e}),this.fetchData(e))},t.prototype.render=function(){var e,t;return Object(o.jsx)(O.Content,{children:Object(o.jsx)(zg,eO({changeRequest:null!==(e=this.state.changeRequest)&&void 0!==e?e:$a.create(),stepNumber:5,currentUser:null!==(t=this.props.currentUser)&&void 0!==t?t:{}},{children:Object(o.jsx)(Qn.a,eO({title:"Industry Information"},{children:Object(o.jsx)(uv,{ref:this._formRef,changeRequestId:this.state.changeRequest.id,institutionId:this.state.changeRequest.institutionId,isNew:this.state.isNew,onSubmit:this.goToNextStep,onPrevious:this.goToPreviousStep,loading:this.state.loading},void 0)}),void 0)}),void 0)},void 0)},t}(a.Component);var nO=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected}}))(tO)),rO=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),iO=function(){return iO=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},iO.apply(this,arguments)},oO=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n.fetchData=function(e){n.setState({loading:!0});var t=[];e!==re.default.Empty()&&t.push(n.loadChangeRequest(e)),Promise.all(t).then((function(){n.setState({loading:!1})}
1))},n.loadChangeRequest=function(e){return va.getBaseChangeRequestDetails(e).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.goToPreviousStep=function(){T.push(x.generate(x.EXISTING_NOTICE_OF_INTENT_CHANGE_REQUEST_ENTRY_6,{id:n.state.changeRequestId},{}))},n.goToNextStep=function(){T.push(x.generate(x.EXISTING_NOTICE_OF_INTENT_CHANGE_REQUEST_ENTRY_8,{id:n.state.changeRequestId}))},n.state={changeRequestId:re.default.Empty(),changeRequest:$a.create()},n}return rO(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");"new"==e?this.setState({isNew:!0}):e!==re.default.Empty()&&this.state.changeRequestId!=e&&(this.setState({changeRequestId:e}),this.fetchData(e))},t.prototype.render=function(){var e,t;return Object(o.jsx)(O.Content,{children:Object(o.jsx)(zg,iO({changeRequest:null!==(e=this.state.changeRequest)&&void 0!==e?e:$a.create(),stepNumber:6,currentUser:null!==(t=this.props.currentUser)&&void 0!==t?t:{}},{children:Object(o.jsx)(Qn.a,iO({title:"Linking And Existing Entities"},{children:Object(o.jsx)(yv,{ref:this._formRef,changeRequestId:this.state.changeRequest.id,isNew:this.state.isNew,onSubmit:this.goToNextStep,onPrevious:this.goToPreviousStep,loading:this.state.loading},void 0)}),void 0)}),void 0)},void 0)},t}(a.Component);var aO=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected}}))(oO)),sO=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),dO=function(){return dO=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},dO.apply(this,arguments)},cO=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n.fetchData=function(e){n.setState({loading:!0});var t=[];e!==re.default.Empty()&&t.push(n.loadChangeRequest(e)),Promise.all(t).then((function(){n.setState({loading:!1})}))},n.loadChangeRequest=function(e){return va.getBaseChangeRequestDetails(e).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.goToPreviousStep=function(){T.push(x.generate(x.EXISTING_NOTICE_OF_INTENT_CHANGE_REQUEST_ENTRY_7,{id:n.state.changeRequestId},{}))},n.goToNextStep=function(){T.push(x.generate(x.EXISTING_NOTICE_OF_INTENT_CHANGE_REQUEST_ENTRY_REVIEW,{id:n.state.changeRequestId}))},n.state={changeRequestId:re.default.Empty(),changeRequest:$a.create()},n}return sO(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");"new"==e?this.setState({isNew:!0}):e!==re.default.Empty()&&this.state.changeRequestId!=e&&(this.setState({changeRequestId:e}),this.fetchData(e))},t.prototype.render=function(){var e,t;return Object(o.jsx)(O.Content,{children:Object(o.jsx)(zg,dO({changeRequest:null!==(e=this.state.changeRequest)&&void 0!==e?e:$a.create(),stepNumber:7,currentUser:null!==(t=this.props.currentUser)&&void 0!==t?t:{}},{children:Object(o.jsx)(Qn.a,dO({title:"Additional Information"},{children:Object(o.jsx)(gs,{changeRequest:this.state.changeRequest,onPrevious:this.goToPreviousStep,onSubmit:this.goToNextStep,loading:this.state.loading},void 0)}),void 0)}),void 0)},void 0)},t}(a.Component);var lO=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected}}))(cO)),uO=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),pO=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(e){n.setState({loading:!0});var t=[];e!==re.default.Empty()&&t.push(n.loadChangeRequest(e)),Promise.all(t).then((function(){n.setState({loading:!1})}
1))},n.loadChangeRequest=function(e){var t=Cy({changeRequestId:e});return lp.get(t).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create(),fieldErrors:e.fieldErrors})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.goToPreviousStep=function(){T.push(x.generate(x.EXISTING_NOTICE_OF_INTENT_CHANGE_REQUEST_ENTRY_5,{id:n.state.changeRequestId},{}))},n.submit=function(){T.push(x.generate(x.EXISTING_NOTICE_OF_INTENT_CHANGE_REQUEST_ENTRY_SUBMITTED,{id:n.state.changeRequestId},{}))},n.state={changeRequestId:re.default.Empty(),changeRequest:$a.create(),progress:0},n}return uO(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");e!==re.default.Empty()&&this.state.changeRequestId!=e&&(this.setState({changeRequestId:e}),this.fetchData(e))},t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{breadcrumbs:Xn.changeRequestList()},void 0),Object(o.jsx)(Qn.a,{children:Object(o.jsx)(bb,{},void 0)},void 0)]},void 0)},t}(a.Component);var fO=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected}}))(pO)),hO=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),vO=function(){return vO=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},vO.apply(this,arguments)},mO=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(e){n.setState({loading:!0});var t=[];e!==re.default.Empty()&&t.push(n.loadChangeRequest(e)),Promise.all(t).then((function(){n.setState({loading:!1})}))},n.loadChangeRequest=function(e){return va.getBaseChangeRequestDetails(e).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.handleSave=function(e){n.setState({isEditing:!1}),e!=n.state.changeRequestId?T.replace(x.generate(x.EXISTING_PROGRAM_DEACTIVATION_CHANGE_REQUEST_ENTRY_1,{id:e})):n.loadChangeRequest(e)},n.handleSubmitted=function(e){T.replace(x.generate(x.EXISTING_PROGRAM_DEACTIVATION_CHANGE_REQUEST_ENTRY_1,{id:e})),T.push(x.generate(x.EXISTING_PROGRAM_DEACTIVATION_CHANGE_REQUEST_ENTRY_2,{id:e}))},n.state={changeRequestId:re.default.Empty(),changeRequest:$a.create({changeRequestTypeId:Xa.PROGRAMDEACTIVATION}),programId:re.default.Empty()},n}return hO(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");"new"==e||e==Hr.DEFAULT_STRING?this.setState({isNew:!0}):e!==re.default.Empty()&&this.state.changeRequestId!=e&&(this.setState({changeRequestId:e}),this.fetchData(e))},t.prototype.render=function(){var e,t;return Object(o.jsx)(O.Content,{children:Object(o.jsx)(zg,vO({changeRequest:null!==(e=this.state.changeRequest)&&void 0!==e?e:$a.create(),stepNumber:0,currentUser:null!==(t=this.props.currentUser)&&void 0!==t?t:{}},{children:Object(o.jsx)(Qn.a,vO({title:"Deactivation Information"},{children:Object(o.jsx)(Mv,{changeRequestId:this.state.changeRequest.id,institutionId:this.props.selectedInstitution?this.props.selectedInstitution.id:this.state.changeRequest.institutionId,loading:this.state.loading,onSubmit:this.handleSubmitted,onSave:this.handleSave},void 0)}),void 0)}),void 0)},void 0)},t}(a.Component);var gO=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected}}))(mO)),bO=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),yO=function(){return yO=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},yO.apply(this,arguments)},OO=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(e){n.setState({loading:!0});var t=[];e!==re.default.Empty()&&t.push(n.loadChangeRequest(e)),Promise.all(t).then((function(){n.setState({loading:!1})}
1))},n.loadChangeRequest=function(e){var t=xv({changeRequestId:e});return Rv.get(t).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.goToPreviousStep=function(){T.push(x.generate(x.EXISTING_PROGRAM_DEACTIVATION_CHANGE_REQUEST_ENTRY_1,{id:n.state.changeRequestId},{}))},n.goToNextStep=function(){T.push(x.generate(x.EXISTING_PROGRAM_DEACTIVATION_CHANGE_REQUEST_ENTRY_REVIEW,{id:n.state.changeRequestId},{}))},n.state={changeRequestId:re.default.Empty(),changeRequest:$a.create()},n}return bO(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");e!==re.default.Empty()&&this.state.changeRequestId!=e&&(this.setState({changeRequestId:e}),this.fetchData(e))},t.prototype.render=function(){var e,t;return Object(o.jsx)(O.Content,{children:Object(o.jsx)(zg,yO({changeRequest:null!==(e=this.state.changeRequest)&&void 0!==e?e:$a.create(),stepNumber:1,currentUser:null!==(t=this.props.currentUser)&&void 0!==t?t:{}},{children:Object(o.jsx)(Qn.a,yO({title:"Additional Information"},{children:Object(o.jsx)(gs,{changeRequest:this.state.changeRequest,onPrevious:this.goToPreviousStep,onSubmit:this.goToNextStep,loading:this.state.loading},void 0)}),void 0)}),void 0)},void 0)},t}(a.Component);var jO=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value}}))(OO)),IO=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),SO=function(){return SO=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},SO.apply(this,arguments)},EO=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(e){n.setState({loading:!0});var t=[];e!==re.default.Empty()&&t.push(n.loadChangeRequest(e)),Promise.all(t).then((function(){n.setState({loading:!1})}))},n.loadChangeRequest=function(e){var t=xv({changeRequestId:e});return Rv.get(t).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create(),fieldErrors:e.fieldErrors})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.goToPreviousStep=function(){T.push(x.generate(x.EXISTING_PROGRAM_DEACTIVATION_CHANGE_REQUEST_ENTRY_2,{id:n.state.changeRequestId},{}))},n.goToNextStep=function(){T.push(x.generate(x.EXISTING_PROGRAM_DEACTIVATION_CHANGE_REQUEST_ENTRY_SUBMITTED,{id:n.state.changeRequestId},{}))},n.state={changeRequestId:re.default.Empty(),changeRequest:$a.create()},n}return IO(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");e!==re.default.Empty()&&this.state.changeRequestId!=e&&(this.setState({changeRequestId:e}),this.fetchData(e))},t.prototype.render=function(){var e,t;return Object(o.jsx)(O.Content,{children:Object(o.jsx)(zg,SO({changeRequest:null!==(e=this.state.changeRequest)&&void 0!==e?e:$a.create(),stepNumber:2,currentUser:null!==(t=this.props.currentUser)&&void 0!==t?t:{}},{children:Object(o.jsx)(Qn.a,SO({title:"Review"},{children:Object(o.jsxs)(y.b,SO({direction:"vertical"},{children:[Object(o.jsx)(Lv,{loading:this.state.loading,changeRequest:this.state.changeRequest,fieldErrors:this.state.fieldErrors},void 0),Object(o.jsx)(Xg,{changeRequest:this.state.changeRequest,onSubmit:this.goToNextStep,onPrevious:this.goToPreviousStep},void 0)]}),void 0)}),void 0)}),void 0)},void 0)},t}(a.Component);var RO=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected}}))(EO)),_O=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),TO=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(e){n.setState({loading:!0});var t=[];e!==re.default.Empty()&&t.push(n.loadChangeRequest(e)),Promise.all(t).then((function(){n.setState({loading:!1})}
1))},n.loadChangeRequest=function(e){var t=xv({changeRequestId:e});return Rv.get(t).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.goToPreviousStep=function(){T.push(x.generate(x.EXISTING_PROGRAM_DEACTIVATION_CHANGE_REQUEST_ENTRY_2,{id:n.state.changeRequestId},{}))},n.submit=function(){T.push(x.generate(x.EXISTING_PROGRAM_DEACTIVATION_CHANGE_REQUEST_ENTRY_SUBMITTED,{id:n.state.changeRequestId},{}))},n.state={changeRequestId:re.default.Empty(),changeRequest:$a.create(),progress:0},n}return _O(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");e!==re.default.Empty()&&this.state.changeRequestId!=e&&(this.setState({changeRequestId:e}),this.fetchData(e))},t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{breadcrumbs:Xn.changeRequestList()},void 0),Object(o.jsx)(Qn.a,{children:Object(o.jsx)(bb,{},void 0)},void 0)]},void 0)},t}(a.Component);var CO=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value}}))(TO)),xO=function(e){return Object.assign({awardTypeId:0,awardType:null},e)},AO={className:"AwardTypeAPSGeneralEducationCreditsDTO",create:function(e){return Object.assign(Q.create(),{id:0,apsGeneralEducationId:0,apsGeneralEducation:null,awardTypeId:0,awardType:null,minimumCredits:0},e)},id:"id",apsGeneralEducationId:"apsGeneralEducationId",apsGeneralEducation:"apsGeneralEducation",awardTypeId:"awardTypeId",awardType:"awardType",minimumCredits:"minimumCredits"},PO={className:"AwardTypeGeneralEducationCreditsDTO",create:function(e){return Object.assign(Q.create(),{id:0,generalEducationId:0,generalEducation:null,awardTypeId:0,awardType:null,minimumCredits:0},e)},id:"id",generalEducationId:"generalEducationId",generalEducation:"generalEducation",awardTypeId:"awardTypeId",awardType:"awardType",minimumCredits:"minimumCredits"},NO=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),wO=function(){return wO=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},wO.apply(this,arguments)},DO=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._formItems=(new Map).set(si.name,{required:!0,name:si.name,label:"Name",rules:[Ot.required(),Ot.maxLength(150)]}).set(si.code,{required:!0,name:si.code,label:"Code",rules:[Ot.required(),Ot.maxLength(10)]}).set(si.order,{required:!0,name:si.order,label:"Order",rules:[Ot.required()]}).set(si.minCredits,{required:!0,name:si.minCredits,label:"Minimum Total Credits",rules:[Ot.required()]}).set(si.maxCredits,{required:!0,name:si.maxCredits,label:"Maximum Total Credits",rules:[Ot.required()]}).set(si.maxWeeks,{required:!0,name:si.maxWeeks,label:"Maximum Total Weeks",rules:[Ot.required()]}).set(si.averageCredits,{required:!0,name:si.averageCredits,label:"Maximum Average Term Credits",rules:[]}).set(si.generalEducationCredits,{required:!0,name:si.generalEducationCredits,label:"Minimum General Education Credits",rules:[]}).set(si.generalEducationCategories,{required:!0,name:si.generalEducationCategories,label:"Minimum General Education Categories",rules:[]}).set(si.techCorePercentage,{required:!0,name:si.techCorePercentage,label:"Minimum Tech Core Percentage",rules:[]}).set(si.nonTrasferMajorProgramTypeId,{name:si.nonTrasferMajorProgramTypeId,label:"Program Classification"}).set(si.transferMajorProgramTypeId,{name:si.transferMajorProgramTypeId,label:"Transfer Major Program Classification"}).set(si.transferMajor,{required:!0,name:si.transferMajor,label:"Available for Transfer Major Programs",rules:[]}).set(si.iowaVariationIds,{required:!0,name:si.iowaVariationIds,label:"Available Iowa Variations",rules:[]}).set(si.childAwardTypes,{name:si.childAwardTypes,label:"Valid Child Award Types"}).set(si.instructionalLevels,{required:!0,name:si.instructionalLevels,label:"Available Instructional Levels",rules:[]}).set(si.typeOfPrograms,{required:!0,name:si.typeOfPrograms,label:"Available Type of Programs",rules:[]}).set(si.specialEmphases,{required:!0,name:si.specialEmphases,label:"Available Special Emphases",rules:[]}).set(si.objectPurposes,{required:!0,name:si.objectPurposes,label:"Available Object Purposes",rules:[]}),n.getGenEdFormItems=function(e){return(new Map).set(PO.minimumCredits,{required:!0,name:[e,PO.minimumCredits],rules:[Ot.required()]})},n.getApsGenEdFormItems=function(e){return(new Map).set(PO.minimumCredits,{required:!0,name:[e,PO.minimumCredits],rules:[Ot.required()]})},n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields(),n.setState({altered:!1})}
1,n.loadProgramClassification=function(){return ce.getAll(yi.className).then((function(e){e&&n.setState({programClassifications:e})})).catch((function(){n.setState({error:!0})}))},n.loadIowaVariations=function(){return ce.getAll(pi.className).then((function(e){e&&n.setState({iowaVariations:e})})).catch((function(){n.setState({error:!0})}))},n.loadInstructionalLevels=function(){return ce.getAll(Vc.className).then((function(e){e&&n.setState({instructionalLevels:e})})).catch((function(){n.setState({error:!0})}))},n.loadTypeOfPrograms=function(){return ce.getAll(Kc.className).then((function(e){e&&n.setState({typeOfProgram:e})})).catch((function(){n.setState({error:!0})}))},n.loadSpecialEmphases=function(){return ce.getAll(Qc.className).then((function(e){e&&n.setState({specialEmphases:e})})).catch((function(){n.setState({error:!0})}))},n.loadObjectPurposes=function(){return ce.getAll(Hc.className).then((function(e){e&&n.setState({objectPurpose:e})})).catch((function(){n.setState({error:!0})}))},n.loadChildAwardTypes=function(){return ce.getAll(si.className).then((function(e){e&&n.setState({childAwardTypes:e})})).catch((function(){n.setState({error:!0})}))},n.loadExisting=function(){if(n.props.awardTypeId)return Uc.getAwardTypeDetails(n.props.awardTypeId).then((function(e){e.awardType&&n.setState({awardTypeId:e.awardType.id,awardType:e.awardType}),n.resetForm()})).catch((function(){n.setState({error:!0})}))},n.loadNew=function(){n.setState({awardType:si.create(),loading:!1})},n.handleChange=function(){n.setState({altered:!0})},n.handleSubmit=function(){n.setState({submitting:!0});var e=xO({awardTypeId:n.state.awardTypeId,awardType:si.create(n._formRef?n._formRef.current.getFieldsValue():null)});Uc.saveAwardTypeDetails(e).then((function(e){var t;n.setState({submitted:!0,awardType:null!==(t=null===e||void 0===e?void 0:e.awardType)&&void 0!==t?t:si.create()}),(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.props.onSave&&e.awardType&&(n.props.onSave(e.awardType.id),n.resetForm()),ce.invalidateCache(si.className)):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Award Type could not be saved. "+n.state.message))})).catch((function(e){n.setState({error:e}),S.b.error("Award Type could not be saved.")})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.getApsColumns=function(){return[{title:"Type",dataIndex:AO.apsGeneralEducation,render:function(e,t,r){var i,o,a;return null!==(a=null===(o=(null===(i=n._formRef.current)||void 0===i?void 0:i.getFieldValue(si.apsGeneralEducationCreditLimits)[r]).apsGeneralEducation)||void 0===o?void 0:o.name)&&void 0!==a?a:""}},{title:"Minimum Credits",dataIndex:AO.minimumCredits,render:function(e,t,r){return Object(o.jsx)(mt.a,wO({},n.getApsGenEdFormItems(r).get(AO.minimumCredits),{children:Object(o.jsx)(Ni.a,{min:0,disabled:!n.props.isEditing||n.state.loading||n.state.submitting},void 0)}),void 0)}}]},n.getGenEdColumns=function(){return[{title:"Type",dataIndex:PO.generalEducation,render:function(e,t,r){var i,o,a;return null!==(a=null===(o=(null===(i=n._formRef.current)||void 0===i?void 0:i.getFieldValue(si.generalEducationCreditLimits)[r]).generalEducation)||void 0===o?void 0:o.name)&&void 0!==a?a:""}},{title:"Minimum Credits",dataIndex:PO.minimumCredits,render:function(e,t,r){return Object(o.jsx)(mt.a,wO({},n.getGenEdFormItems(r).get(PO.minimumCredits),{children:Object(o.jsx)(Ni.a,{min:0,disabled:!n.props.isEditing||n.state.loading||n.state.submitting},void 0)}),void 0)}}]},n.renderTransferMajorProgramType=function(){var e,t=n._formRef?null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldsValue():null;if(t&&(null===t||void 0===t?void 0:t.transferMajor))return Object(o.jsx)(mt.a,wO({},n._formItems.get(si.transferMajorProgramTypeId),_t.getValidation(si.transferMajorProgramTypeId,n.state.fieldErrors,n.state.submitted),{children:Object(o.jsx)(hd,wO({disabled:!n.props.isEditing||n.state.loading||n.state.submitting,allowClear:!0},{children:n.state.programClassifications.map((function(e){return Object(o.jsx)(pr.a.Option,wO({value:e.id},{children:e.name}),e.id)}))}),void 0)}),void 0)},n.state={awardTypeId:0,awardType:si.create({iowaVariationIds:[],programClassificationId:null}),iowaVariations:[],instructionalLevels:[],typeOfProgram:[],specialEmphases:[],objectPurpose:[],programClassifications:[],childAwardTypes:[]},n}return NO(t,e),t.prototype.componentDidMount=function(){var e=this;this.setState({loading:!0});var t=[];t.push(this.loadAwardType()),t.push(this.loadInstructionalLevels()),t.push(this.loadTypeOfPrograms()),t.push(this.loadSpecialEmphases()),t.push(this.loadObjectPurposes()),t.push(this.loadProgramClassification()),t.push(this.loadChildAwardTypes()),Promise.all(t).then((function(){e.setState({loading:!1})}
1))},t.prototype.componentDidUpdate=function(e){var t=this;if(this.props.awardTypeId&&this.props.awardTypeId!=e.awardTypeId){this.setState({awardTypeId:this.props.awardTypeId,loading:!0});var n=[];n.push(this.loadAwardType()),n.push(this.loadInstructionalLevels()),n.push(this.loadTypeOfPrograms()),n.push(this.loadSpecialEmphases()),n.push(this.loadObjectPurposes()),n.push(this.loadProgramClassification()),n.push(this.loadChildAwardTypes()),Promise.all(n).then((function(){t.setState({loading:!1})}))}},t.prototype.loadAwardType=function(){var e=this;this.setState({loading:!0});var t=[];0==this.state.iowaVariations.length&&t.push(this.loadIowaVariations()),0==this.props.awardTypeId?this.loadNew():t.push(this.loadExisting()),Promise.all(t).then((function(){e.setState({loading:!1})}))},t.prototype.render=function(){var e=this;return this.state.loading||null==this.state.awardType?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(y.b,wO({size:"small",direction:"vertical"},{children:[this.renderErrors(),Object(o.jsx)(ht.a,wO({ref:this._formRef,layout:"vertical",initialValues:this.state.awardType,onValuesChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!0},{children:Object(o.jsxs)(y.b,wO({direction:"vertical"},{children:[Object(o.jsxs)(b.a,wO({gutter:[16,16]},{children:[Object(o.jsx)(m.a,wO({},En.ONE_QUARTER,{children:Object(o.jsx)(mt.a,wO({},this._formItems.get(si.code),_t.getValidation(si.code,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting,allowClear:!0},void 0)}),void 0)}),void 0),Object(o.jsx)(m.a,wO({},En.THREE_QUARTERS,{children:Object(o.jsx)(mt.a,wO({},this._formItems.get(si.name),_t.getValidation(si.name,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting,allowClear:!0},void 0)}),void 0)}),void 0)]}),void 0),Object(o.jsxs)(b.a,wO({gutter:[16,16]},{children:[Object(o.jsx)(m.a,wO({},En.ONE_QUARTER,{children:Object(o.jsx)(mt.a,wO({},this._formItems.get(si.order),_t.getValidation(si.order,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(Ni.a,{min:1,disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0)}),void 0),Object(o.jsx)(m.a,wO({},En.THREE_QUARTERS,{children:Object(o.jsx)(mt.a,wO({},this._formItems.get(si.transferMajor),_t.getValidation(si.transferMajor,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(Hd,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0)}),void 0)]}),void 0),Object(o.jsx)(mt.a,wO({},this._formItems.get(si.nonTrasferMajorProgramTypeId),_t.getValidation(si.nonTrasferMajorProgramTypeId,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(hd,wO({disabled:!this.props.isEditing||this.state.loading||this.state.submitting,allowClear:!0},{children:this.state.programClassifications.map((function(e){return Object(o.jsx)(pr.a.Option,wO({value:e.id},{children:e.name}),e.id)}))}),void 0)}),void 0),this.renderTransferMajorProgramType(),Object(o.jsx)(mt.a,wO({},this._formItems.get(si.iowaVariationIds),_t.getValidation(si.iowaVariationIds,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(hd,wO({mode:"multiple",disabled:!this.props.isEditing||this.state.loading||this.state.submitting,allowClear:!0},{children:this.state.iowaVariations.map((function(e){return Object(o.jsx)(pr.a.Option,wO({value:e.id},{children:e.display}),e.id)}))}),void 0)}),void 0),Object(o.jsx)(mt.a,wO({},this._formItems.get(si.childAwardTypes),_t.getValidation(si.childAwardTypes,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(hd,wO({mode:"multiple",disabled:!this.props.isEditing||this.state.loading||this.state.submitting,allowClear:!0},{children:this.state.childAwardTypes.map((function(e){return Object(o.jsx)(pr.a.Option,wO({value:e.id},{children:e.display}),e.id)}))}),void 0)}),void 0),Object(o.jsx)(mt.a,wO({},this._formItems.get(si.instructionalLevels),_t.getValidation(si.instructionalLevels,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(hd,wO({mode:"multiple",disabled:!this.props.isEditing||this.state.loading||this.state.submitting,allowClear:!0},{children:this.state.instructionalLevels.map((function(e){return Object(o.jsx)(pr.a.Option,wO({value:e.id},{children:e.display}),e.id)}))}),void 0)}),void 0),Object(o.jsx)(mt.a,wO({},this._formItems.get(si.typeOfPrograms),_t.getValidation(si.typeOfPrograms,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(hd,wO({mode:"multiple",disabled:!this.props.isEditing||this.state.loading||this.state.submitting,allowClear:!0},{children:this.state.typeOfProgram.map((function(e){return Object(o.jsx)(pr.a.Option,wO({value:e.id},{children:e.display}),e.id)}))}),void 0)}),void 0),Object(o.jsx)(mt.a,wO({},this._formItems.get(si.specialEmphases),_t.getValidation(si.specialEmphases,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(hd,wO({mode:"multiple",disabled:!this.props.isEditing||this.state.loading||this.state.submitting,allowClear:!0},{children:this.state.specialEmphases.map((function(e){return Object(o.jsx)(pr.a.Option,wO({value:e.id},{children:e.display}),e.id)}))}),void 0)}),void 0),Object(o.jsx)(mt.a,wO({},this._formItems.get(si.objectPurposes),_t.getValidation(si.objectPurposes,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(hd,wO({mode:"multiple",disabled:!this.props.isEditing||this.state.loading||this.state.submitting,allowClear:!0},{children:this.state.objectPurpose.map((function(e){return Object(o.jsx)(pr.a.Option,wO({value:e.id},{children:e.display}),e.id)}))}),void 0)}),void 0),Object(o.jsx)(ot.a.Title,wO({level:5},{children:"Compliance Configuration"}),void 0),Object(o.jsxs)(b.a,wO({gutter:[16,16]},{children:[Object(o.jsx)(m.a,wO({},En.ONE_THIRD,{children:Object(o.jsx)(mt.a,wO({},this._formItems.get(si.minCredits),_t.getValidation(si.minCredits,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(Ni.a,{min:0,disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0)}),void 0),Object(o.jsx)(m.a,wO({},En.ONE_THIRD,{children:Object(o.jsx)(mt.a,wO({},this._formItems.get(si.maxCredits),_t.getValidation(si.maxCredits,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(Ni.a,{min:0,disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0)}),void 0),Object(o.jsx)(m.a,wO({},En.ONE_THIRD,{children:Object(o.jsx)(mt.a,wO({},this._formItems.get(si.averageCredits),_t.getValidation(si.averageCredits,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(Ni.a,{min:0,disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0)}),void 0),Object(o.jsx)(m.a,wO({},En.ONE_THIRD,{children:Object(o.jsx)(mt.a,wO({},this._formItems.get(si.generalEducationCategories),_t.getValidation(si.averageCredits,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(Ni.a,{min:0,disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0)}),void 0),Object(o.jsx)(m.a,wO({},En.ONE_THIRD,{children:Object(o.jsx)(mt.a,wO({},this._formItems.get(si.generalEducationCredits),_t.getValidation(si.generalEducationCredits,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(Ni.a,{min:0,disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0)}),void 0),Object(o.jsx)(m.a,wO({},En.ONE_THIRD,{children:Object(o.jsx)(mt.a,wO({},this._formItems.get(si.techCorePercentage),_t.getValidation(si.techCorePercentage,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(Ni.a,{addonAfter:Object(o.jsx)(zh.a,{},void 0),min:0,disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0)}),void 0),Object(o.jsx)(m.a,wO({},En.ONE_THIRD,{children:Object(o.jsx)(mt.a,wO({},this._formItems.get(si.maxWeeks),_t.getValidation(si.order,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(Ni.a,{min:0,disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0)}),void 0)]}),void 0),Object(o.jsx)(ot.a.Title,wO({level:5},{children:"General Education Credit Requirements"}),void 0),Object(o.jsx)(ht.a.List,wO({name:si.generalEducationCreditLimits},{children:function(t){return Object(o.jsx)(y.b,wO({direction:"vertical"},{children:Object(o.jsx)(Pi.a,{pagination:!1,dataSource:t,columns:e.getGenEdColumns()},void 0)}),void 0)}}),void 0),Object(o.jsx)(ot.a.Title,wO({level:5},{children:"APS General Education Credit Requirements"}),void 0),Object(o.jsx)(ht.a.List,wO({name:si.apsGeneralEducationCreditLimits},{children:function(t){return Object(o.jsx)(y.b,wO({direction:"vertical"},{children:Object(o.jsx)(Pi.a,{pagination:!1,dataSource:t,columns:e.getApsColumns()},void 0)}),void 0)}}),void 0),this.renderSave()]}),void 0)}),void 0)]}),void 0)},t.prototype.renderSave=function(){if(this.props.isEditing)return Object(o.jsx)(Ze,wO({validFeatureFlags:[gn.EDIT_AWARD_TYPE]},{children:Object(o.jsxs)(y.b,wO({direction:"horizontal"},{children:[Object(o.jsx)(Tr,{saving:this.state.saving},void 0),Object(o.jsx)(Ir,{onConfirm:this.resetForm,disabled:!this.state.altered},void 0)]}),void 0)}),void 0)},t.prototype.renderErrors=function(){if(this.state.error&&this.state.submitted)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t}(a.Component),qO=function(e){return Object.assign({awardTypeId:null},e)},FO=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),MO=function(){return MO=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},MO.apply(this,arguments)},YO=function(e){function t(t){var n=e.call(this,t)||this;return n._detailsRef=a.createRef(),n.loadAwardType=function(e){n.setState({awardTypeId:e}),Uc.getAwardTypeDetails(e).then((function(e){e.awardType&&n.setState({awardType:e.awardType})})).catch((function(){n.setState({error:!0}),S.b.error("Award Type could not be loaded")})).finally((function(){n.setState({loading:!1})}
1))},n.toggleEdit=function(){var e;n.state.isEditing&&(null===(e=n._detailsRef.current)||void 0===e||e.resetForm()),n.setState({isEditing:!n.state.isEditing})},n.specialEmphasisDetailsSaved=function(e){n.setState({isEditing:!1}),e!=n.state.awardTypeId?T.replace(x.generate(x.AWARD_TYPE_DETAILS,{id:e})):n.loadAwardType(e)},n.deleteConfirmation=function(e){f.a.confirm({title:"Are you sure you want to delete this Award Type?",okText:"Delete",onOk:function(){return n.deleteAwardType(e)}})},n.deleteAwardType=function(e){n.setState({submitting:!0});var t=qO({awardTypeId:e});Uc.deleteAwardType(t).then((function(e){n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,altered:!(null===e||void 0===e?void 0:e.succeeded)}),!0===(null===e||void 0===e?void 0:e.succeeded)?S.b.success("Award Type was removed."):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(e){n.setState({error:e}),S.b.error("Award Type could not be removed.")})).finally((function(){n.setState({loading:!1}),n.goToAwardType()}))},n.goToAwardType=function(){T.goBack()},n.state={awardTypeId:0},n}return FO(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");if("new"==e)this.setState({isEditing:!0,isNew:!0,loading:!1});else{var t=Number.parseInt(e);this.loadAwardType(t)}},t.prototype.render=function(){var e,t,n=this.state.loading?"...":0==this.state.awardTypeId?"New Award Type":null!==(t=null===(e=this.state.awardType)||void 0===e?void 0:e.name)&&void 0!==t?t:"...";return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:n,onBack:this.goToAwardType,breadcrumbs:Xn.awardTypeDetails(n,this.state.awardTypeId),extra:this.renderMoreActions()},void 0),Object(o.jsx)(zr,{when:this.state.isEditing},void 0),this.renderDetailsCard()]},void 0)},t.prototype.renderDetailsCard=function(){var e=0==this.state.awardTypeId?null:Object(o.jsx)(Ze,MO({validFeatureFlags:[gn.EDIT_AWARD_TYPE]},{children:Object(o.jsx)(Br,{isEditing:this.state.isEditing,onClick:this.toggleEdit},void 0)}),void 0);return Object(o.jsx)(Qn.a,MO({title:"Details",extra:e},{children:Object(o.jsx)(DO,{ref:this._detailsRef,awardTypeId:this.state.awardTypeId,isEditing:this.state.isEditing,isNew:this.state.isNew,onSave:this.specialEmphasisDetailsSaved},void 0)}),void 0)},t.prototype.renderMoreActions=function(){var e=this,t=Object(o.jsx)(Gt.a,{children:Object(o.jsx)(Gt.a.Item,MO({title:"Delete Award Type",onClick:function(){return e.deleteConfirmation(e.state.awardTypeId)}},{children:"Delete Award Type"}),this.state.awardTypeId)},void 0);return Object(o.jsx)(Ze,MO({validFeatureFlags:[gn.EDIT_AWARD_TYPE]},{children:Object(o.jsx)(la.a,MO({overlay:t},{children:Object(o.jsx)(rt.a,MO({size:"large",type:"link"},{children:Object(o.jsx)(aa.a,{},void 0)}),void 0)}),void 0)}),void 0)},t}(a.Component),UO=Object(u.i)(YO),LO={className:"AwardTypeDataTableDTO",create:function(e){return Object.assign(Q.create(),{id:0,order:0,code:"",name:""},e)},id:"id",order:"order",code:"code",name:"name"},kO=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),GO=function(e){function t(t){var n=e.call(this,t)||this;return n.getColumnDefinitions=function(){return[{title:"Order",dataIndex:LO.order,sorter:!0,filterType:wr.Text,width:15},{title:"Code",dataIndex:LO.code,sorter:!0,filterType:wr.Text,width:50},{title:"Name",dataIndex:LO.name,sorter:!0,filterType:wr.Text}]},n.openAwardType=function(e){e.id&&T.push(x.generate(x.AWARD_TYPE_DETAILS,{id:e.id},{}))},n.addAwardType=function(){T.push(x.generate(x.NEW_AWARD_TYPE))},n.state={},n}return kO(t,e),t.prototype.render=function(){var e=this,t=[];return t.push(oo.Reset()),t.push(oo.Export((function(t){return e.setState({exporting:!0}),Uc.getAwardTypeDataTableExport(t).then((function(t){e.setState({exporting:!1}),R.a.downloadBase64StringAsFile("Award_Types_"+$r.getDateStamp()+".xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",null!==t&&void 0!==t?t:void 0)}))}),this.state.exporting)),Je.isAuthorized([gn.EDIT_AWARD_TYPE])&&t.pu
1sh(oo.Default("New Award Type",(function(){return e.addAwardType()}))),Object(o.jsx)(o.Fragment,{children:Object(o.jsx)(io,{ref:function(t){return e._dataTable=t},onRowClick:this.openAwardType,serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:t,columns:this.getColumnDefinitions(),fetchData:{fetch:function(e){return Uc.getAwardTypeTableData(e)}},stateSaving:{enabled:!0,tableUniqueKey:"award_type_list"}},void 0)},void 0)},t}(a.Component),VO=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),BO=function(e){function t(t){var n=e.call(this,t)||this;return n.goToConfig=function(){T.goBack()},n}return VO(t,e),t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Award Type",onBack:this.goToConfig,breadcrumbs:Xn.awardTypeList()},void 0),Object(o.jsx)(Qn.a,{children:Object(o.jsx)(GO,{},void 0)},void 0)]},void 0)},t}(a.Component),WO=Object(u.i)(BO),zO=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),HO=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return zO(t,e),t.prototype.getAPSGeneralEducationsDataTable=function(e){var t="api/apsGeneralEducation";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getAPSGeneralEducationDataTableExport=function(e){var t="api/apsGeneralEducation/export";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getAPSGeneralEducationDetails=function(e){var t="api/apsGeneralEducation/"+e;return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.saveAPSGeneralEducationDetails=function(e){var t="api/apsGeneralEducation/save";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.deleteAPSGeneralEducation=function(e){var t="api/apsGeneralEducation/deleteAPSGeneralEducation";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t}(U),QO=new HO,KO=function(e){return Object.assign({apsGeneralEducationId:0,apsGeneralEducation:null},e)},XO=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),JO=function(){return JO=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},JO.apply(this,arguments)},$O=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._formItems=(new Map).set(jl.code,{required:!0,name:jl.code,label:"Code",rules:[Ot.required(),Ot.maxLength(3)]}).set(jl.displayOrder,{required:!0,name:jl.displayOrder,label:"Display Order",rules:[Ot.required()]}).set(jl.name,{required:!0,name:jl.name,label:"Name",rules:[Ot.required(),Ot.maxLength(50)]}),n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields(),n.setState({altered:!1})},n.loadExisting=function(){n.props.apsGeneralEducationId&&QO.getAPSGeneralEducationDetails(n.props.apsGeneralEducationId).then((function(e){e&&e.apsGeneralEducation&&n.setState({apsGeneralEducationId:e.apsGeneralEducation.id,apsGeneralEducation:e.apsGeneralEducation,loading:!1}),n.resetForm()})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}
1))},n.loadNew=function(){n.setState({apsGeneralEducation:jl.create(),loading:!1})},n.handleChange=function(){n.setState({altered:!0})},n.handleSubmit=function(){n.setState({submitting:!0});var e=KO({apsGeneralEducationId:n.state.apsGeneralEducationId,apsGeneralEducation:jl.create(n._formRef?n._formRef.current.getFieldsValue():null)});QO.saveAPSGeneralEducationDetails(e).then((function(e){var t;n.setState({submitted:!0,apsGeneralEducation:null===e||void 0===e?void 0:e.apsGeneralEducation}),(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.props.onSave&&(null===(t=e.apsGeneralEducation)||void 0===t?void 0:t.id)&&(n.props.onSave(e.apsGeneralEducation.id),n.resetForm()),ce.invalidateCache(jl.className)):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("APS General Education could not be saved. "+n.state.message))})).catch((function(e){n.setState({error:e}),S.b.error("APS General Education could not be saved.")})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.state={apsGeneralEducationId:0,apsGeneralEducation:jl.create()},n}return XO(t,e),t.prototype.componentDidMount=function(){this.setState({loading:!0}),this.loadAPSGeneralEducation()},t.prototype.componentDidUpdate=function(e){this.props.apsGeneralEducationId&&this.props.apsGeneralEducationId!=e.apsGeneralEducationId&&(this.setState({apsGeneralEducationId:this.props.apsGeneralEducationId}),this.loadAPSGeneralEducation())},t.prototype.loadAPSGeneralEducation=function(){0==this.props.apsGeneralEducationId?this.loadNew():this.loadExisting()},t.prototype.render=function(){var e;return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(y.b,JO({size:"small",direction:"vertical"},{children:[this.renderErrors(),Object(o.jsxs)(ht.a,JO({ref:this._formRef,layout:"vertical",onValuesChange:this.handleChange,initialValues:null!==(e=this.state.apsGeneralEducation)&&void 0!==e?e:jl.create(),onFinish:this.handleSubmit,requiredMark:!0},{children:[Object(o.jsx)(mt.a,JO({},this._formItems.get(jl.code),_t.getValidation(jl.code,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,JO({},this._formItems.get(jl.name),_t.getValidation(jl.name,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,JO({},this._formItems.get(jl.displayOrder),_t.getValidation(jl.displayOrder,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(Ni.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting,min:1},void 0)}),void 0),this.renderSave()]}),void 0)]}),void 0)},t.prototype.renderSave=function(){if(this.props.isEditing)return Object(o.jsx)(Ze,JO({validFeatureFlags:[gn.EDIT_GENERAL_EDUCATION]},{children:Object(o.jsxs)(y.b,JO({direction:"horizontal"},{children:[Object(o.jsx)(Tr,{saving:this.state.saving},void 0),Object(o.jsx)(Ir,{onConfirm:this.resetForm,disabled:!this.state.altered},void 0)]}),void 0)}),void 0)},t.prototype.renderErrors=function(){if(this.state.error&&this.state.submitted)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t}(a.Component),ZO=function(e){return Object.assign({apsGeneralEducationId:null},e)},ej=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),tj=function(){return tj=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},tj.apply(this,arguments)},nj=function(e){function t(t){var n=e.call(this,t)||this;
1return n._apsGeneralEducationDetailsRef=a.createRef(),n.loadAPSGeneralEducation=function(e){n.setState({apsGeneralEducationId:e}),QO.getAPSGeneralEducationDetails(e).then((function(e){e.apsGeneralEducation&&n.setState({apsGeneralEducation:e.apsGeneralEducation})})).catch((function(){n.setState({error:!0}),S.b.error("APS General Education could not be loaded")})).finally((function(){n.setState({loading:!1})}))},n.deleteConfirmation=function(e){f.a.confirm({title:"Are you sure you want to delete this APS General Education?",okText:"Delete",onOk:function(){return n.deleteAPSGeneralEducation(e)}})},n.deleteAPSGeneralEducation=function(e){n.setState({submitting:!0});var t=ZO({apsGeneralEducationId:e});QO.deleteAPSGeneralEducation(t).then((function(e){n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,altered:!(null===e||void 0===e?void 0:e.succeeded)}),!0===(null===e||void 0===e?void 0:e.succeeded)?S.b.success("APS General Education was removed."):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(e){n.setState({error:e}),S.b.error("APS General Education could not be removed.")})).finally((function(){n.setState({loading:!1}),n.goToAPSGeneralEducation()}))},n.toggleEdit=function(){var e;n.state.isEditing&&(null===(e=n._apsGeneralEducationDetailsRef.current)||void 0===e||e.resetForm()),n.setState({isEditing:!n.state.isEditing})},n.apsGeneralEducationDetailsSaved=function(e){n.setState({isEditing:!1}),e!=n.state.apsGeneralEducationId?T.replace(x.generate(x.APS_GENERAL_EDUCATION_DETAILS,{id:e})):n.loadAPSGeneralEducation(e)},n.goToAPSGeneralEducation=function(){T.goBack()},n.state={apsGeneralEducationId:0},n}return ej(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");if("new"==e)this.setState({isEditing:!0,isNew:!0,loading:!1});else{var t=Number.parseInt(e);this.loadAPSGeneralEducation(t)}},t.prototype.render=function(){var e,t,n=this.state.loading?"...":0==this.state.apsGeneralEducationId?"New APS General Education":null!==(t=null===(e=this.state.apsGeneralEducation)||void 0===e?void 0:e.name)&&void 0!==t?t:"...";return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:n,onBack:this.goToAPSGeneralEducation,breadcrumbs:Xn.apsGeneralEducationDetails(n,this.state.apsGeneralEducationId),extra:this.renderMoreActions()},void 0),Object(o.jsx)(zr,{when:this.state.isEditing},void 0),this.renderDetailsCard()]},void 0)},t.prototype.renderDetailsCard=function(){var e=0==this.state.apsGeneralEducationId?null:Object(o.jsx)(Ze,tj({validFeatureFlags:[gn.EDIT_APS_GENERAL_EDUCATION]},{children:Object(o.jsx)(Br,{isEditing:this.state.isEditing,onClick:this.toggleEdit},void 0)}),void 0);return Object(o.jsx)(Qn.a,tj({title:"Details",extra:e},{children:Object(o.jsx)($O,{ref:this._apsGeneralEducationDetailsRef,apsGeneralEducationId:this.state.apsGeneralEducationId,isEditing:this.state.isEditing,isNew:this.state.isNew,onSave:this.apsGeneralEducationDetailsSaved},void 0)}),void 0)},t.prototype.renderMoreActions=function(){var e=this,t=Object(o.jsx)(Gt.a,{children:Object(o.jsx)(Gt.a.Item,tj({title:"Delete APS General Education",onClick:function(){return e.deleteConfirmation(e.state.apsGeneralEducationId)}},{children:"Delete APS General Education"}),this.state.apsGeneralEducationId)},void 0);return Object(o.jsx)(Ze,tj({validFeatureFlags:[gn.EDIT_APS_GENERAL_EDUCATION]},{children:Object(o.jsx)(la.a,tj({overlay:t},{children:Object(o.jsx)(rt.a,tj({size:"large",type:"link"},{children:Object(o.jsx)(aa.a,{},void 0)}),void 0)}),void 0)}),void 0)},t}(a.Component),rj=Object(u.i)(nj),ij=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),oj=function(e){function t(t){var n=e.call(this,t)||this;return n.getColumnDefinitions=function(){return[{title:"Display",dataIndex:jl.displayOrder,width:50,sorter:!0,filterType:wr.NONE},{title:"Code",dataIndex:jl.code,width:50,sorter:!0,filterType:wr.Text},{title:"Name",dataIndex:jl.name,sorter:!0,filterType:wr.Text}]},n.openAPSGeneralEducation=function(e){e.id&&T.push(x.generate(x.APS_GENERAL_EDUCATION_DETAILS,{id:e.id},{}))},n.addAPSGeneralEducation=function(){T.push(x.generate(x.NEW_APS_GENERAL_EDUCATION))},n.state={},n}return ij(t,e),t.prototype.render=function(){var e=this,t=[];return t.push(oo.Reset()),t.push(oo.Export((function(t){return e.setState({exporting:!0}),QO.getAPSGeneralEducationDataTableExport(t).then((function(t){e.setState({exporting:!1}),R.a.downloadBase64StringAsFile("APSGeneralEducation"+$r.getDateStamp()+".xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",null!==t&&void 0!==t?t:void 0)}))}),this.state.exporting)),Je.isAuthorized([gn.EDIT_APS_GENERAL_EDUCATION])&&t.pu
1sh(oo.Default("New APS General Education",(function(){return e.addAPSGeneralEducation()}))),Object(o.jsx)(o.Fragment,{children:Object(o.jsx)(io,{ref:function(t){return e._dataTable=t},onRowClick:this.openAPSGeneralEducation,serverSide:!0,tableProps:{rowKey:"id",scroll:{x:400}},globalSearch:!0,buttonBar:t,columns:this.getColumnDefinitions(),fetchData:{fetch:function(e){return QO.getAPSGeneralEducationsDataTable(e)}},stateSaving:{enabled:!0,tableUniqueKey:"apsAPSGeneralEducation_list"}},void 0)},void 0)},t}(a.Component),aj=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),sj=function(e){function t(t){var n=e.call(this,t)||this;return n.goToConfig=function(){T.goBack()},n}return aj(t,e),t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"APS General Education",onBack:this.goToConfig,breadcrumbs:Xn.apsGeneralEducationList()},void 0),Object(o.jsx)(Qn.a,{children:Object(o.jsx)(oj,{},void 0)},void 0)]},void 0)},t}(a.Component),dj=Object(u.i)(sj),cj=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),lj=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return cj(t,e),t.prototype.getCategoryTableData=function(e){var t="api/categories";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.exportCategoryList=function(e){var t="api/categories/export";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getCategoryDetails=function(e){var t="api/categories/"+encodeURIComponent(e);return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.saveCategoryDetails=function(e){var t="api/categories/save";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.deleteCategories=function(e){var t="api/categories/deleteCategories";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t}(U),uj=new lj,pj=function(e){return Object.assign({categoryId:null,category:null},e)},fj=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),hj=function(){return hj=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},hj.apply(this,arguments)},vj=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._formItems=(new Map).set(di.code,{required:!0,name:di.code,label:"Code",rules:[Ot.required()]}).set(di.name,{required:!0,name:di.name,label:"Name",rules:[Ot.required(),Ot.maxLength(100)]}).set(di.statusTypeId,{required:!0,name:di.statusTypeId,label:"Status",rules:[Ot.required()]}),n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields(),n.setState({altered:!1,submitted:!1})},n.loadStatusTypes=function(){return ce.getAll(gi.className).then((function(e){e&&n.setState({statusTypes:e})})).catch((function(){n.setState({error:!0})}))},n.loadExisting=function(){return uj.getCategoryDetails(n.props.categoryId).then((function(e){e.category&&(n.setState({category:e.category}),n.resetForm())})).catch((function(){n.setState({error:!0})}))},n.handleChange=function(){n.setState({altered:!0})},n.handleSubmit=function(){n.setState({submitting:!0});var e=pj({categoryId:n.props.categoryId,category:di.create(n._formRef?n._formRef.current.getFieldsValue():null)});uj.saveCategoryDetails(e).then((function(e){var t,r;n.setState({submitted:!0,category:null!==(t=e.category)&&void 0!==t?t:di.create()}),(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.props.onSave&&(null===(r=e.category)||void 0===r?void 0:r.id)&&
1(n.props.onSave(e.category.id),n.resetForm()),ce.invalidateCache(di.className),n.setState({altered:!1})):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Error Saving"))})).catch((function(e){n.setState({error:e}),S.b.error("Error Saving")})).finally((function(){n.setState({loading:!1,submitting:!1,submitted:!0})}))},n.state={category:di.create({statusTypeId:""}),statusTypes:[]},n}return fj(t,e),t.prototype.componentDidMount=function(){this.loadCategory()},t.prototype.componentDidUpdate=function(e){this.props.categoryId&&this.props.categoryId!=e.categoryId&&this.loadCategory()},t.prototype.loadCategory=function(){var e=this;this.setState({loading:!0});var t=[];0==this.state.statusTypes.length&&t.push(this.loadStatusTypes()),this.props.categoryId!=re.default.Empty()&&t.push(this.loadExisting()),Promise.all(t).then((function(){e.setState({loading:!1})}))},t.prototype.render=function(){var e=this;return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsx)(y.b,hj({size:"small",direction:"vertical"},{children:Object(o.jsxs)(ht.a,hj({ref:this._formRef,layout:"vertical",initialValues:this.state.category,onValuesChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!0},{children:[Object(o.jsx)(mt.a,hj({},this._formItems.get(di.name),_t.getValidation(di.name,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,hj({},this._formItems.get(di.code),_t.getValidation(di.code,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,hj({},this._formItems.get(di.statusTypeId),_t.getValidation(di.statusTypeId,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(pr.a,hj({disabled:!this.props.isEditing||this.state.loading||this.state.submitting},{children:this.state.statusTypes.map((function(t){return e.renderStatusTypeOption(t)}))}),void 0)}),void 0),this.renderSave()]}),void 0)}),void 0)},t.prototype.renderStatusTypeOption=function(e){if(e.id)return Object(o.jsx)(pr.a.Option,hj({value:e.id},{children:e.name}),e.id)},t.prototype.renderSave=function(){if(this.props.isEditing)return Object(o.jsx)(Ze,hj({validFeatureFlags:[gn.EDIT_CATEGORY]},{children:Object(o.jsxs)(y.b,hj({direction:"horizontal"},{children:[Object(o.jsx)(Tr,{disabled:!br.canSubmit(this._formRef,this._formItems),saving:this.state.submitting},void 0),Object(o.jsx)(Ir,{disabled:!br.hasChanged(this._formRef,this._formItems),onConfirm:this.resetForm},void 0)]}),void 0)}),void 0)},t.prototype.renderErrors=function(){if(this.state.error)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t}(a.Component),mj=function(e){return Object.assign({categoryId:"00000000-0000-0000-0000-000000000000"},e)},gj=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),bj=function(){return bj=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},bj.apply(this,arguments)},yj=function(e){function t(t){var n=e.call(this,t)||this;return n._categoryDetailsRef=a.createRef(),n.loadCategory=function(e){uj.getCategoryDetails(e).then((function(t){n.setState({categoryId:e,category:null===t||void 0===t?void 0:t.category})}))},n.toggleEdit=function(){var e;n.state.isEditing&&(null===(e=n._categoryDetailsRef.current)||void 0===e||e.resetForm()),n.setState({isEditing:!n.state.isEditing})},n.categoryDetailsSaved=function(e){n.setState({isEditing:!1}),e!=n.state.categoryId?T.replace(x.generate(x.CATEGORY_DETAILS,{id:e})):n.loadCategory(e)},n.deleteConfirmation=function(e){f.a.confirm({title:"Are you sure you want to delete this category?",okText:"Delete",onOk:function(){return n.deleteC
1ategory(e)}})},n.deleteCategory=function(e){n.setState({submitting:!0});var t=mj({categoryId:e});uj.deleteCategories(t).then((function(e){n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,altered:!(null===e||void 0===e?void 0:e.succeeded)}),!0===(null===e||void 0===e?void 0:e.succeeded)?S.b.success("Category was removed."):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(e){n.setState({error:e}),S.b.error("Category could not be removed.")})).finally((function(){n.setState({loading:!1}),n.goToListing()}))},n.goToListing=function(){T.goBack()},n.state={categoryId:re.default.Empty(),category:null},n}return gj(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");"new"==e?this.setState({isEditing:!0,isNew:!0}):this.loadCategory(e)},t.prototype.render=function(){var e,t,n=this.state.loading?"...":this.state.isNew?"New Category":null!==(t=null===(e=this.state.category)||void 0===e?void 0:e.name)&&void 0!==t?t:"...";return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:n,onBack:this.goToListing,breadcrumbs:Xn.categoryDetails(n,this.state.categoryId),extra:this.renderMoreActions()},void 0),Object(o.jsx)(zr,{when:this.state.isEditing},void 0),this.renderDetailsCard()]},void 0)},t.prototype.renderDetailsCard=function(){var e=this.state.categoryId==re.default.Empty()?null:Object(o.jsx)(Ze,bj({validFeatureFlags:[gn.EDIT_CATEGORY]},{children:Object(o.jsx)(Br,{onClick:this.toggleEdit,isEditing:this.state.isEditing},void 0)}),void 0);return Object(o.jsx)(Qn.a,bj({title:"Details",extra:e},{children:Object(o.jsx)(vj,{ref:this._categoryDetailsRef,categoryId:this.state.categoryId,isEditing:this.state.isEditing,isNew:this.state.isNew,onSave:this.categoryDetailsSaved},void 0)}),void 0)},t.prototype.renderMoreActions=function(){var e=this,t=Object(o.jsx)(Gt.a,{children:Object(o.jsx)(Gt.a.Item,bj({title:"Delete Category",onClick:function(){return e.deleteConfirmation(e.state.categoryId)}},{children:"Delete Category"}),this.state.categoryId)},void 0);return Object(o.jsx)(Ze,bj({validFeatureFlags:[gn.EDIT_CATEGORY]},{children:Object(o.jsx)(la.a,bj({overlay:t},{children:Object(o.jsx)(rt.a,bj({size:"large",type:"link"},{children:Object(o.jsx)(aa.a,{},void 0)}),void 0)}),void 0)}),void 0)},t}(a.Component),Oj=Object(u.i)(yj),jj=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ij=function(e){function t(t){var n=e.call(this,t)||this;return n.loadStatusTypes=function(){Ii.StatusTypes().then((function(e){return n.setState({statuses:e})}))},n.getColumnDefinitions=function(){return[{title:"Code",dataIndex:di.code,sorter:!0,width:50,filterType:wr.Text},{title:"Name",dataIndex:di.name,sorter:!0,filterType:wr.Text},{title:"Status",dataIndex:di.statusTypeId,sorter:!0,width:75,render:function(e,t){var n;return null===(n=t.statusType)||void 0===n?void 0:n.name},filterType:wr.DropdownMulti,dropdownFilterOptions:n.state.statuses}]},n.openCategory=function(e){e.id&&T.push(x.generate(x.CATEGORY_DETAILS,{id:e.id},{}))},n.addCategory=function(){T.push(x.generate(x.NEW_CATEGORY))},n.state={statuses:[]},n.loadStatusTypes(),n}return jj(t,e),t.prototype.componentDidMount=function(){this.loadStatusTypes()},t.prototype.render=function(){var e=this,t=[];return t.push(oo.Reset()),t.push(oo.Export((function(t){return e.setState({exporting:!0}),uj.exportCategoryList(t).then((function(t){e.setState({exporting:!1}),R.a.downloadBase64StringAsFile("Categories_"+$r.getDateStamp()+".xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",null!==t&&void 0!==t?t:void 0)}))}),this.state.exporting)),Je.isAuthorized([gn.EDIT_CATEGORY])&&t.push(oo.Default("New Category",(function(){return e.addCategory()}))),Object(o.jsx)(io,{ref:function(t){return e.dataTable=t},stateSaving:{enabled:!0,tableUniqueKey:"categories_list"},serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:t,columns:this.getColumnDefinitions(),fetchData:{fetch:function(e){return uj.getCategoryTableData(e)}},onRowClick:this.openCategory},void 0)},t}(a.Component),Sj=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ej=function(e){function t(t){var n=e.call(this,t)||this;return n.goToConfig=function(){T.goBack()},n}return Sj(t,e),t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Categories",onBack:this.goToConfig,breadcrumbs:Xn.categoryList()},void 0),Object(o.jsx)(Qn.a,{children:Object(o.jsx)(Ij,{},void 0)},void 0)]},void 0)},t}(a.Component),Rj=Object(u.i)(Ej),_j=function(e){return Object.assign({cipId:null,cip:null},e)},Tj={className:"CipNumberDetailDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",cipNumberId:"00000000-0000-0000-0000-000000000000",title:"",install:null,retire:null,twoDigit:"",fourDigit:"",sixDigit:"",definition:"",display:"",transferMajor:!1,nonTransferMajor:!1,friendlyDisplay:""},e)},id:"id",cipNumberId:"cipNumberId",title:"title",install:"install",retire:"retire",twoDigit:"twoDigit",fourDigit:"fourDigit",sixDigit:"sixDigit",definition:"definition",display:"display",transferMajor:"transferMajor",nonTransferMajor:"nonTransferMajor",friendlyDisplay:"friendlyDisplay"},Cj={className:"CipNumberDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",cipNumberDetails:[],currentDetail:null},e)},id:"id",cipNumberDetails:"cipNumberDetails",currentDetail:"currentDetail"},xj=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Aj=function(){return Aj=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Aj.apply(this,arguments)},Pj=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._formItems=(new Map).set(Tj.title,{required:!0,name:Tj.title,label:"Title",rules:[Ot.required()]}).set(Tj.display,{required:!0,name:Tj.display,label:"CIP Number",rules:[Ot.required(),Ot.cipNumberValidator()]}).set(Tj.install,{required:!0,name:Tj.install,label:"Installed Term",rules:[Ot.required()]}).set(Tj.install,{required:!0,name:Tj.install,label:"Installed Year",rules:[Ot.required()]}).set(Tj.definition,{required:!1,name:Tj.definition,label:"Definition",rules:[]}).set(Tj.transferMajor,{required:!0,name:Tj.transferMajor,label:"Allow Transfer Major",rules:[Ot.required()]}).set(Tj.nonTransferMajor,{required:!0,name:Tj.nonTransferMajor,label:"Allow Non-Transfer Major",rules:[Ot.required()]}),n.fetchData=function(){var e,t;n.setState({loading:!0});var r=[];(null===(e=n.props.cip)||void 0===e?void 0:e.cipNumberDetails)?n.setState({cipId:n.props.cipId,cip:n.props.cip,selectedCipDetail:null!==(t=n.props.cip.cipNumberDetails[n.props.cip.cipNumberDetails.length-1])&&void 0!==t?t:Tj.create()}
1):n.props.cipId!=re.default.Empty()?r.push(n.loadExisting()):n.setState({cip:Cj.create()}),Promise.all(r).then((function(){n.setState({loading:!1})}))},n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields(),n.setState({altered:!1})},n.loadExisting=function(){if(n.props.cipId)return Dp.getCipDetails(n.props.cipId).then((function(e){var t;(null===(t=e.cip)||void 0===t?void 0:t.id)&&n.setState({cipId:e.cip.id,cip:e.cip})})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))},n.handleChange=function(){n.setState({altered:!0})},n.handleSubmit=function(){n.setState({submitting:!0});var e=_j({cipId:n.state.cipId,cip:Cj.create(n._formRef?n._formRef.current.getFieldsValue():null)});Dp.saveCipDetails(e).then((function(e){var t;n.setState({submitted:!0,cip:null===e||void 0===e?void 0:e.cip}),(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.props.onSave&&(null===(t=e.cip)||void 0===t?void 0:t.id)&&(n.props.onSave(e.cip.id),n.resetForm()),ce.invalidateCache(Cj.className)):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("CIP could not be saved. "+n.state.message))})).catch((function(e){n.setState({error:e}),S.b.error("CIP could not be saved.")})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.state={cipId:re.default.Empty(),cip:Cj.create({installedTermId:"",installedYear:""}),cipDetails:[],selectedCipDetail:Tj.create({installTermId:""})},n}return xj(t,e),t.prototype.componentDidMount=function(){this.fetchData()},t.prototype.componentDidUpdate=function(e){var t,n,r,i;(this.props.cipId&&this.props.cipId.isNotEmpty()&&this.props.cipId!=e.cipId||(null===(n=null===(t=this.props.cip)||void 0===t?void 0:t.cipNumberDetails)||void 0===n?void 0:n.length)!=(null===(i=null===(r=e.cip)||void 0===r?void 0:r.cipNumberDetails)||void 0===i?void 0:i.length))&&this.fetchData()},t.prototype.render=function(){if(this.state.loading)return Object(o.jsx)(pt.a,{active:!0},void 0);var e=Aj(Aj({},this.state.cip),this.state.selectedCipDetail);return Object(o.jsxs)(y.b,Aj({size:"small",direction:"vertical"},{children:[this.renderErrors(),Object(o.jsxs)(ht.a,Aj({ref:this._formRef,layout:"vertical",initialValues:e,onValuesChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!0},{children:[Object(o.jsx)(mt.a,Aj({},this._formItems.get(Tj.display),_t.getValidation(Tj.display,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,Aj({},this._formItems.get(Tj.title),_t.getValidation(Tj.title,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,Aj({},this._formItems.get(Tj.install),{children:Object(o.jsx)(Od,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,Aj({},this._formItems.get(Tj.definition),_t.getValidation(Tj.definition,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a.TextArea,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting,maxLength:5e3,showCount:!0,autoSize:{minRows:5}},void 0)}),void 0),Object(o.jsx)(mt.a,Aj({},this._formItems.get(Tj.transferMajor),_t.getValidation(Tj.transferMajor,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(Hd,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,Aj({},this._formItems.get(Tj.nonTransferMajor),_t.getValidation(Tj.nonTransferMajor,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(Hd,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),this.renderSave()]}),void 0)]}),void 0)},t.prototype.renderSave=function(){if(this.props.isEditing)return Object(o.jsx)(Ze,Aj({validFeatureFlags:[gn.EDIT_CIP_NUMBER]},{children:Object(o.jsxs)(y.b,Aj({direction:"horizontal"},{children:[Object(o.jsx)(Tr,{saving:this.state.saving},void 0),Object(o.jsx)(Ir,{onConfirm:this.resetForm,disabled:!this.state.altered},void 0)]}),void 0)}),void 0)},t.prototype.renderErrors=function(){if(this.state.error&&this.state.submitted)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t}(a.Component),Nj=function(e){return Object.assign({cipNumberId:"00000000-0000-0000-0000-000000000000"},e)},wj=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Dj=function(){return Dj=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Dj.apply(this,arguments)},qj=function(e){function t(t){var n=e.call(this,t)||this;return n._cipDetailsRef=a.createRef(),n.loadCip=function(e){n.setState({cipId:e}),Dp.getCipDetails(e).then((function(t){var r,i,o,a,s;(null===(r=t.cip)||void 0===r?void 0:r.cipNumberDetails)&&n.setState({cipId:e,cip:t.cip,cipDetails:null!==(o=null===(i=t.cip)||void 0===i?void 0:i.cipNumberDetails)&&void 0!==o?o:[],selectedCipDetail:null!==(s=null===(a=t.cip)||void 0===a?void 0:a.currentDetail)&&void 0!==s?s:Tj.create()})})).catch((function(){n.setState({error:!0})}
1)).finally((function(){n.setState({loading:!1})}))},n.toggleEdit=function(){var e;n.state.isEditing&&(null===(e=n._cipDetailsRef.current)||void 0===e||e.resetForm()),n.setState({isEditing:!n.state.isEditing})},n.cipDetailsSaved=function(e){n.setState({isEditing:!1}),T.replace(x.generate(x.CIP_DETAILS,{id:e}))},n.deleteConfirmation=function(e){f.a.confirm({title:"Are you sure you want to delete this CIP Number?",okText:"Delete",onOk:function(){return n.deleteCip(e)}})},n.deleteCip=function(e){n.setState({submitting:!0});var t=Nj({cipNumberId:e});Dp.deleteCipNumber(t).then((function(e){n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,altered:!(null===e||void 0===e?void 0:e.succeeded)}),!0===(null===e||void 0===e?void 0:e.succeeded)?S.b.success("CIP Number was removed."):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(e){n.setState({error:e}),S.b.error("CIP Number could not be removed.")})).finally((function(){n.setState({loading:!1}),n.goToCips()}))},n.goToCips=function(){T.goBack()},n.state={cipId:re.default.Empty(),cip:Cj.create(),selectedCipDetail:Tj.create(),cipDetails:[]},n}return wj(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");"new"==e?this.setState({isEditing:!0,isNew:!0,loading:!1}):this.loadCip(e)},t.prototype.render=function(){var e,t,n,r,i=this.state.loading?"...":this.state.cipId==re.default.Empty()?"New CIP Number":null!==(t=null===(e=this.state.selectedCipDetail)||void 0===e?void 0:e.title)&&void 0!==t?t:"...",a=this.state.loading?"...":this.state.cipId==re.default.Empty()?"New":null!==(r=null===(n=this.state.selectedCipDetail)||void 0===n?void 0:n.display)&&void 0!==r?r:"...";return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:i,onBack:this.goToCips,breadcrumbs:Xn.cipNumberDetails(a,this.state.cipId),extra:this.renderMoreActions()},void 0),Object(o.jsx)(zr,{when:this.state.isEditing},void 0),this.renderDetailsCard()]},void 0)},t.prototype.renderDetailsCard=function(){var e=this.state.cipId==re.default.Empty()?null:Object(o.jsx)(Ze,Dj({validFeatureFlags:[gn.EDIT_CIP_NUMBER]},{children:Object(o.jsx)(Br,{isEditing:this.state.isEditing,onClick:this.toggleEdit},void 0)}),void 0);return Object(o.jsx)(Qn.a,Dj({title:"Details",extra:e},{children:Object(o.jsx)(Pj,{ref:this._cipDetailsRef,cipId:this.state.cipId,cip:this.state.cip,isEditing:this.state.isEditing,isNew:this.state.isNew,onSave:this.cipDetailsSaved},void 0)}),void 0)},t.prototype.renderMoreActions=function(){var e=this,t=Object(o.jsx)(Gt.a,{children:Object(o.jsx)(Gt.a.Item,Dj({title:"Delete CIP Number",onClick:function(){return e.deleteConfirmation(e.state.cipId)}},{children:"Delete CIP Number"}),this.state.cipId)},void 0);return Object(o.jsx)(Ze,Dj({validFeatureFlags:[gn.EDIT_CIP_NUMBER]},{children:Object(o.jsx)(la.a,Dj({overlay:t},{children:Object(o.jsx)(rt.a,Dj({size:"large",type:"link"},{children:Object(o.jsx)(aa.a,{},void 0)}),void 0)}),void 0)}),void 0)},t}(a.Component),Fj=Object(u.i)(qj),Mj=n(379),Yj=n.n(Mj),Uj=void 0;String.prototype.isNotEmpty=function(){return Uj!=re.default.Empty()&&!0},String.prototype.isEmpty=function(){return Uj==re.default.Empty()||!1};var Lj="selectedFile",kj="installedTermId",Gj="installedYear",Vj=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Bj=function(){return Bj=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Bj.apply(this,arguments)},Wj=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._cipNumberDataTableRef=a.createRef(),n._formItems=(new Map).set(Lj,{required:!0,name:Lj,label:"File",rules:[Ot.required()]}).set(Gj,{required:!0,name:Gj,label:"Installed Year",rules:[Ot.required()]}).set(kj,{required:!0,name:kj,label:"Installed Term",rules:[Ot.required()]}),n.submit=function(){n.handleSubmit()},n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields(),n.setState({altered:!1})},n.fetchData=function(){n.setState({loading:!0});var e=[];n.state.terms.length<=0&&e.push(n.loadTerms()),Promise.all(e).then((function(){n.setState({loading:!1})}
1))},n.loadTerms=function(){return ce.getAll(Rs.className).then((function(e){e&&n.setState({terms:null!==e&&void 0!==e?e:[],loading:!1})})).catch((function(){n.setState({error:!0,loading:!1})}))},n.handleSubmit=function(){var e,t,r;n.setState({submitting:!0});var i=null!==(t=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldsValue())&&void 0!==t?t:null;if(br.canSubmit(n._formRef,n._formItems)){var o=null===(r=n._formRef.current)||void 0===r?void 0:r.getFieldValue(Lj).fileList[0],a=Za.attachFileToModel("importCipNumbers",i,Lj,o);Dp.importCipNumbers(a).then((function(e){(null===e||void 0===e?void 0:e.succeeded)?S.b.success("Imported"):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Import failed. \n"+n.state.message))})).catch((function(e){n.setState({error:e}),S.b.error("Import Failed.")})).finally((function(){n.props.handler(),n.setState({loading:!1,submitting:!1})}))}else S.b.error("Please fill out all required fields."),n.setState({loading:!1,submitting:!1}),n.props.handler()},n.state={terms:[]},n}return Vj(t,e),t.prototype.componentDidMount=function(){this.fetchData()},t.prototype.render=function(){var e=this;return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(ht.a,Bj({ref:this._formRef,layout:"vertical"},{children:[this.renderErrors(),Object(o.jsx)(mt.a,Bj({},this._formItems.get(Lj),_t.getValidation(Lj,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(hs,{accept:".xlsx",maxCount:1},void 0)}),void 0),Object(o.jsx)(mt.a,Bj({},this._formItems.get(kj),_t.getValidation(kj,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(pr.a,Bj({disabled:this.state.loading||this.state.submitting},{children:this.state.terms.map((function(t){return e.renderTermOption(t)}))}),void 0)}),void 0),Object(o.jsx)(mt.a,Bj({},this._formItems.get(Gj),_t.getValidation(Gj,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(Ni.a,{disabled:this.state.loading||this.state.submitting},void 0)}),void 0)]}),void 0)},t.prototype.renderTermOption=function(e){if(e.id)return Object(o.jsx)(pr.a.Option,Bj({value:e.id},{children:e.name}),e.id)},t.prototype.renderSave=function(){if(this.props.isEditing)return Object(o.jsx)(Ze,Bj({validFeatureFlags:[gn.EDIT_CIP_NUMBER]},{children:Object(o.jsxs)(y.b,Bj({direction:"horizontal"},{children:[Object(o.jsx)(Tr,{disabled:!br.canSubmit(this._formRef,this._formItems),saving:this.state.submitting},void 0),Object(o.jsx)(Ir,{disabled:!br.hasChanged(this._formRef,this._formItems),onConfirm:this.resetForm},void 0)]}),void 0)}),void 0)},t.prototype.renderErrors=function(){if(this.state.error)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t}(a.Component),zj={className:"CipNumberDataTableDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",display:"",title:"",cipNumberId:"00000000-0000-0000-0000-000000000000",transferMajor:!1,nonTransferMajor:!1},e)},id:"id",display:"display",title:"title",cipNumberId:"cipNumberId",transferMajor:"transferMajor",nonTransferMajor:"nonTransferMajor"},Hj=function(){function e(){}return e.Address=function(e){return function(t,n){var r=e(n),i=r.line1&&r.city&&r.state&&r.zip;return Object(o.jsxs)(o.Fragment,{children:[r.name?r.name:"",r.name?Object(o.jsx)("br",{},void 0):"",i?r.line1:"",Object(o.jsx)("br",{},void 0),r.line2?r.line2:"",r.line2?Object(o.jsx)("br",{},void 0):"",i?r.city+", "+r.state+", "+r.zip:""]},void 0)}},e.ShortDate=function(e){if(e){var t=It.a.isMoment(e)?e:It()(e);return t.isValid()?Object(o.jsx)("span",{children:t.format("M/D/YYYY")},void 0):""}},e.ShortTime=function(e){if(e){var t=It.a.isMoment(e)?e:It()(e);return t.isValid()||(t=It()(e,"HH:mm:ss")).isValid()?Object(o.jsx)("span",{children:t.format("h:mm a")},void 0):""}},e.LongDate=function(e){if(e){var t=It.a.isMoment(e)?e:It()(e);return t.isValid()?Object(o.jsx)("span",{children:t.format("ddd, MMM D YYYY")},void 0):""}},e.DateAndTime=function(e){if(e){var t=It.a.isMoment(e)?e:It()(e);return t.isValid()?Object(o.jsx)("span",{children:t.format("M/D/YYYY h:mm a")},void 0):""}},e.Currency=function(e){if(e&&!isNaN(e))try{var t=parseFloat(e);return Object(o.jsxs)("span",{children:["$",t.toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g,"$1,")]},void 0)}catch(n){return}},e.Percentage=function(e){if(e&&!isNaN(e))try{var t=+parseFloat(e).toFixed(2);return Object(o.jsxs)("span",{children:[t.toString().replace(/(\d)(?=(\d{3})+\.)/g,"$1,"),"%"]},void 0)}catch(n){return}},e.Decimal=function(e,t){if((e||0===e)&&!isNaN(e))try{var n="number"===typeof e?e:parseFloat(e);return Object(o.jsx)("span",{children:n.toFixed(t)},void 0)}catch(r){return}},e.BooleanYesNo=function(e){return e?"Yes":"No"},e.BooleanYesEmpty=function(e){return e?"Yes":""},e.BooleanCheckbox=function(e){return Object(o.jsx)(Ti.a,{defaultChecked:e,disabled:!0},void 0)},e}(),Qj=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Kj=function(){return Kj=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Kj.apply(this,arguments)},Xj=function(e){function t(t){var n=e.call(this,t)||this;return n._cipNumberImportFormRef=a.createRef(),n.handler=function(){n.setState({importProcessing:!1})},n.loadTerms=function(){return ce.getAll(Rs.className).then((function(e){e&&n.setState({terms:null!==e&&void 0!==e?e:[],loading:!1})}
1)).catch((function(){n.setState({error:!0,loading:!1})}))},n.getColumnDefinitions=function(){return[{title:"CIP",dataIndex:zj.display,sorter:!0,filterType:wr.Text,width:135},{title:"Title",dataIndex:zj.title,sorter:!0,filterType:wr.Text},{title:"Transfer Major",dataIndex:zj.transferMajor,filterType:wr.BooleanRadio,columnType:Dr.Boolean,render:Hj.BooleanYesEmpty},{title:"Non-Transfer Major",dataIndex:zj.nonTransferMajor,filterType:wr.BooleanRadio,columnType:Dr.Boolean,render:Hj.BooleanYesEmpty}]},n.openCip=function(e){var t;e.id&&T.push(x.generate(x.CIP_DETAILS,{id:null!==(t=e.cipNumberId)&&void 0!==t?t:re.default.Empty()},{}))},n.addCip=function(){T.push(x.generate(x.NEW_CIP))},n.showModal=function(){n.setState({importCipNumbers:!0})},n.cancelImportCipNumbers=function(){n.setState({importCipNumbers:!1})},n.submitImportCipNumbers=function(){var e;n.setState({importProcessing:!0}),null===(e=n._cipNumberImportFormRef.current)||void 0===e||e.submit()},n.state={importCipNumbers:!1,importProcessing:!1,terms:[]},n}return Qj(t,e),t.prototype.componentDidMount=function(){this.setState({loading:!0}),this.loadTerms()},t.prototype.render=function(){var e=this,t=[];return t.push(oo.Reset()),t.push(oo.Export((function(t){return e.setState({exporting:!0}),Dp.getCipssDataTableExport(t).then((function(t){e.setState({exporting:!1}),R.a.downloadBase64StringAsFile("Cip_Number_"+$r.getDateStamp()+".xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",null!==t&&void 0!==t?t:void 0)}))}),this.state.exporting)),Je.isAuthorized([gn.EDIT_CIP_NUMBER])&&(t.push(oo.Default("New CIP Number",(function(){return e.addCip()}))),t.push(oo.Default("Import CIP Numbers",(function(){return e.showModal()})))),Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(io,{ref:function(t){return e._dataTable=t},onRowClick:this.openCip,serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:t,columns:this.getColumnDefinitions(),fetchData:{fetch:function(e){return Dp.getCipTableData(e)}},stateSaving:{enabled:!0,tableUniqueKey:"cip_list"}},void 0),this.renderImportModal()]},void 0)},t.prototype.renderImportModal=function(){return Object(o.jsx)(Yj.a,Kj({visible:this.state.importCipNumbers,title:"Import",okText:"Import",closable:!0,okButtonProps:{disabled:this.state.importProcessing,loading:this.state.importProcessing,shape:"round"},cancelButtonProps:{shape:"round"},onOk:this.submitImportCipNumbers,onCancel:this.cancelImportCipNumbers},{children:Object(o.jsx)(Wj,{handler:this.handler,ref:this._cipNumberImportFormRef},void 0)}),void 0)},t}(a.Component),Jj=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),$j=function(e){function t(t){var n=e.call(this,t)||this;return n.goToConfig=function(){T.goBack()},n}return Jj(t,e),t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"CIP Numbers",onBack:this.goToConfig,breadcrumbs:Xn.cipNumberList()},void 0),Object(o.jsx)(Qn.a,{children:Object(o.jsx)(Xj,{},void 0)},void 0)]},void 0)},t}(a.Component),Zj=Object(u.i)($j),eI=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),tI=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return eI(t,e),t.prototype.getProgramClassificationTableData=function(e){var t="api/programClassification";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getProgramClassificationDataTableExport=function(e){var t="api/programClassification/export";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)}
1,t.prototype.getProgramClassificationDetails=function(e){var t="api/programClassification/"+e;return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"get",t,!0,!1)},t.prototype.saveProgramClassificationDetails=function(e){var t="api/programClassification/save";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.deleteProgramClassification=function(e){var t="api/programClassification/deleteProgramClassification";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t}(U),nI=new tI,rI=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),iI=function(e){function t(t){var n=e.call(this,t)||this;return n.getColumnDefinitions=function(){return[{title:"Name",dataIndex:yi.name,sorter:!0,filterType:wr.Text,width:15}]},n.openProgramClassification=function(e){e.id&&T.push(x.generate(x.PROGRAM_CLASSIFICATION_DETAILS,{id:e.id},{}))},n.addProgramClassification=function(){T.push(x.generate(x.NEW_PROGRAM_CLASSIFICATION))},n.state={},n}return rI(t,e),t.prototype.render=function(){var e=this,t=[];return t.push(oo.Reset()),t.push(oo.Export((function(t){return e.setState({exporting:!0}),nI.getProgramClassificationDataTableExport(t).then((function(t){e.setState({exporting:!1}),R.a.downloadBase64StringAsFile("Program_Classification_"+$r.getDateStamp()+".xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",null!==t&&void 0!==t?t:void 0)}))}),this.state.exporting)),Je.isAuthorized([gn.EDIT_PROGRAM_CLASSIFICATION])&&t.push(oo.Default("New Program Classification",(function(){return e.addProgramClassification()}))),Object(o.jsx)(o.Fragment,{children:Object(o.jsx)(io,{ref:function(t){return e._dataTable=t},onRowClick:this.openProgramClassification,serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:t,columns:this.getColumnDefinitions(),fetchData:{fetch:function(e){return nI.getProgramClassificationTableData(e)}},stateSaving:{enabled:!0,tableUniqueKey:"program_classification_list"}},void 0)},void 0)},t}(a.Component),oI=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),aI=function(e){function t(t){var n=e.call(this,t)||this;return n.goToConfig=function(){T.push(x.generate(x.CONFIGURATIONS))},n}return oI(t,e),t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Program Classification",onBack:this.goToConfig,breadcrumbs:Xn.programClassificationList()},void 0),Object(o.jsx)(Qn.a,{children:Object(o.jsx)(iI,{},void 0)},void 0)]},void 0)},t}(a.Component),sI=Object(u.i)(aI),dI=function(e){return Object.assign({programClassificationId:0,programClassification:null},e)},cI=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),lI=function(){return lI=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},lI.apply(this,arguments)},uI=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._formItems=(new Map).set(yi.name,{required:!0,name:yi.name,label:"Name",rules:[Ot.required(),Ot.maxLength(150)]}),n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields(),n.setState({altered:!1})},n.loadExisting=function(){if(n.props.programClassificationId)return nI.getProgramClassificationDetail
1s(n.props.programClassificationId).then((function(e){e.programClassification&&n.setState({programClassificationId:e.programClassification.id,programClassification:e.programClassification}),n.resetForm()})).catch((function(){n.setState({error:!0})}))},n.loadNew=function(){n.setState({programClassification:yi.create(),loading:!1})},n.handleChange=function(){n.setState({altered:!0})},n.handleSubmit=function(){n.setState({submitting:!0});var e=dI({programClassificationId:n.state.programClassificationId,programClassification:yi.create(n._formRef?n._formRef.current.getFieldsValue():null)});nI.saveProgramClassificationDetails(e).then((function(e){var t;n.setState({submitted:!0,programClassification:null!==(t=null===e||void 0===e?void 0:e.programClassification)&&void 0!==t?t:yi.create()}),(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.props.onSave&&e.programClassification&&(n.props.onSave(e.programClassification.id),n.resetForm()),ce.invalidateCache(yi.className)):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Program Classification could not be saved. "+n.state.message))})).catch((function(e){n.setState({error:e}),S.b.error("Program Classification could not be saved.")})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.state={programClassificationId:0,programClassification:yi.create()},n}return cI(t,e),t.prototype.componentDidMount=function(){var e=this;this.setState({loading:!0});var t=[];t.push(this.loadProgramClassification()),Promise.all(t).then((function(){e.setState({loading:!1})}))},t.prototype.componentDidUpdate=function(e){var t=this;if(this.props.programClassificationId&&this.props.programClassificationId!=e.programClassificationId){this.setState({programClassificationId:this.props.programClassificationId,loading:!0});var n=[];n.push(this.loadProgramClassification()),Promise.all(n).then((function(){t.setState({loading:!1})}))}},t.prototype.loadProgramClassification=function(){var e=this;this.setState({loading:!0});var t=[];0==this.props.programClassificationId?this.loadNew():t.push(this.loadExisting()),Promise.all(t).then((function(){e.setState({loading:!1})}))},t.prototype.render=function(){return this.state.loading||null==this.state.programClassification?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(y.b,lI({size:"small",direction:"vertical"},{children:[this.renderErrors(),Object(o.jsx)(ht.a,lI({ref:this._formRef,layout:"vertical",initialValues:this.state.programClassification,onValuesChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!0},{children:Object(o.jsxs)(y.b,lI({direction:"vertical"},{children:[Object(o.jsx)(mt.a,lI({},this._formItems.get(yi.name),_t.getValidation(yi.name,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting,allowClear:!0},void 0)}),void 0),this.renderSave()]}),void 0)}),void 0)]}),void 0)},t.prototype.renderSave=function(){if(this.props.isEditing)return Object(o.jsx)(Ze,lI({validFeatureFlags:[gn.EDIT_PROGRAM_CLASSIFICATION]},{children:Object(o.jsxs)(y.b,lI({direction:"horizontal"},{children:[Object(o.jsx)(Tr,{saving:this.state.saving},void 0),Object(o.jsx)(Ir,{onConfirm:this.resetForm,disabled:!this.state.altered},void 0)]}),void 0)}),void 0)},t.prototype.renderErrors=function(){if(this.state.error&&this.state.submitted)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t}(a.Component),pI=function(e){return Object.assign({programClassificationId:null},e)},fI=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),hI=function(){return hI=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},hI.apply(this,arguments)},vI=function(e){function t(t){var n=e.call(this,t)||this;return n._detailsRef=a.createRef(),n.loadProgramClassification=function(e){n.setState({programClassificationId:e}
1),nI.getProgramClassificationDetails(e).then((function(e){e.programClassification&&n.setState({programClassification:e.programClassification})})).catch((function(){n.setState({error:!0}),S.b.error("Program Classification could not be loaded")})).finally((function(){n.setState({loading:!1})}))},n.toggleEdit=function(){var e;n.state.isEditing&&(null===(e=n._detailsRef.current)||void 0===e||e.resetForm()),n.setState({isEditing:!n.state.isEditing})},n.programClassificationDetailsSaved=function(e){n.setState({isEditing:!1}),e!=n.state.programClassificationId?T.replace(x.generate(x.PROGRAM_CLASSIFICATION_DETAILS,{id:e})):n.loadProgramClassification(e)},n.deleteConfirmation=function(e){f.a.confirm({title:"Are you sure you want to delete this Program Classification?",okText:"Delete",onOk:function(){return n.deleteProgramClassification(e)}})},n.deleteProgramClassification=function(e){n.setState({submitting:!0});var t=pI({programClassificationId:e});nI.deleteProgramClassification(t).then((function(e){n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,altered:!(null===e||void 0===e?void 0:e.succeeded)}),!0===(null===e||void 0===e?void 0:e.succeeded)?S.b.success("Program Classification was removed."):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(e){n.setState({error:e}),S.b.error("Program Classification could not be removed.")})).finally((function(){n.setState({loading:!1}),n.goProgramClassification()}))},n.goProgramClassification=function(){T.push(x.generate(x.PROGRAM_CLASSIFICATION))},n.state={programClassificationId:0},n}return fI(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");if("new"==e)this.setState({isEditing:!0,isNew:!0,loading:!1});else{var t=Number.parseInt(e);this.loadProgramClassification(t)}},t.prototype.render=function(){var e,t,n,r=this.state.loading?"...":0==this.state.programClassificationId?"New Program Classification":null!==(t=null===(e=this.state.programClassification)||void 0===e?void 0:e.name)&&void 0!==t?t:"...";return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:r,onBack:this.goProgramClassification,breadcrumbs:Xn.programClassificationDetails(r,null!==(n=this.state.programClassificationId)&&void 0!==n?n:0),extra:this.renderMoreActions()},void 0),Object(o.jsx)(zr,{when:this.state.isEditing},void 0),this.renderDetailsCard()]},void 0)},t.prototype.renderDetailsCard=function(){var e=0==this.state.programClassificationId?null:Object(o.jsx)(Ze,hI({validFeatureFlags:[gn.EDIT_PROGRAM_CLASSIFICATION]},{children:Object(o.jsx)(Br,{isEditing:this.state.isEditing,onClick:this.toggleEdit},void 0)}),void 0);return Object(o.jsx)(Qn.a,hI({title:"Details",extra:e},{children:Object(o.jsx)(uI,{ref:this._detailsRef,programClassificationId:this.state.programClassificationId,isEditing:this.state.isEditing,isNew:this.state.isNew,onSave:this.programClassificationDetailsSaved},void 0)}),void 0)},t.prototype.renderMoreActions=function(){var e=this,t=Object(o.jsx)(Gt.a,{children:Object(o.jsx)(Gt.a.Item,hI({title:"Delete Program Classification",onClick:function(){return e.deleteConfirmation(e.state.programClassificationId)}},{children:"Delete Program Classification"}),this.state.programClassificationId)},void 0);return Object(o.jsx)(Ze,hI({validFeatureFlags:[gn.EDIT_PROGRAM_CLASSIFICATION]},{children:Object(o.jsx)(la.a,hI({overlay:t},{children:Object(o.jsx)(rt.a,hI({size:"large",type:"link"},{children:Object(o.jsx)(aa.a,{},void 0)}),void 0)}),void 0)}),void 0)},t}(a.Component),mI=Object(u.i)(vI),gI=function(e){return Object.assign({noticeOfIntentChangeRequestWorkForceLinkId:"00000000-0000-0000-0000-000000000000"},e)},bI=function(){return bI=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},bI.apply(this,arguments)};var yI=function(){return Object(o.jsx)("svg",bI({height:"1em",width:"1em",viewBox:"0 0 24 24"},{children:Object(o.jsx)("path",{fill:"currentColor",d:"M14,3V5H17.59L7.76,14.83L9.17,16.24L19,6.41V10H21V3M19,19H5V5H12V3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V12H19V19Z"},void 0)}),void 0)},OI={className:"NoticeOfIntentChangeRequestWorkForceLinkDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",title:"",url:""},e)}
1,id:"id",title:"title",url:"url"},jI=function(e){return Object.assign({noticeOfIntentChangeRequestWorkForceLinkId:"00000000-0000-0000-0000-000000000000",url:"",title:""},e)},II="url",SI="title",EI=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),RI=function(){return RI=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},RI.apply(this,arguments)},_I=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._formItems=(new Map).set(SI,{required:!0,name:SI,label:"Title",rules:[Ot.required()]}).set(II,{required:!0,name:II,label:"URL (Must include http:// or https://)",rules:[Ot.required(),Ot.https()]}),n.submit=function(){n.handleSubmit()},n.reset=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields()},n.handleChange=function(){n.setState({altered:!0})},n.handleSubmit=function(){var e,t;if(n.setState({submitting:!0}),!br.canSubmit(n._formRef,n._formItems))return S.b.error("Please fill out all required fields."),void n.setState({loading:!1,submitting:!1});var r=jI({noticeOfIntentChangeRequestWorkForceLinkId:n.props.noticeOfIntentChangeRequestWorkForceLink.id,url:null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldValue(II),title:null===(t=n._formRef.current)||void 0===t?void 0:t.getFieldValue(SI)});Xh.saveNoticeOfIntentChangeRequestWorkForceLink(r).then((function(e){(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.props.onSuccess&&(ce.invalidateCache(fi.className),n.props.onSuccess(),n.reset())):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Link could not be saved. "+n.state.message))})).catch((function(e){n.setState({error:e}),S.b.error("Link could not be saved.")})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.state={noticeOfIntentChangeRequestWorkForceLink:OI.create()},n}return EI(t,e),t.prototype.componentDidMount=function(){var e=this;this.setState({noticeOfIntentChangeRequestWorkForceLink:this.props.noticeOfIntentChangeRequestWorkForceLink},(function(){return e.reset()}))},t.prototype.componentDidUpdate=function(e){var t=this;this.props.noticeOfIntentChangeRequestWorkForceLink&&this.props.noticeOfIntentChangeRequestWorkForceLink!=e.noticeOfIntentChangeRequestWorkForceLink&&this.setState({noticeOfIntentChangeRequestWorkForceLink:this.props.noticeOfIntentChangeRequestWorkForceLink},(function(){return t.reset()}))},t.prototype.render=function(){return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsx)(y.b,RI({size:"small",direction:"vertical"},{children:Object(o.jsxs)(ht.a,RI({ref:this._formRef,initialValues:this.state.noticeOfIntentChangeRequestWorkForceLink,layout:"vertical",onValuesChange:this.handleChange,requiredMark:!0},{children:[Object(o.jsx)(mt.a,RI({},this._formItems.get(SI),_t.getValidation(SI,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,RI({},this._formItems.get(II),_t.getValidation(II,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:this.state.loading||this.state.submitting},void 0)}),void 0)]}),void 0)}),void 0)},t.prototype.renderErrors=function(){if(this.state.error)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t}(a.Component),TI=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),CI=function(){return CI=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},CI.apply(this,arguments)},xI=function(e){function t(t){var n=e.call(this,t)||this;return n._addResourceLinkFormRef=a.createRef(),n.triggerRefresh=function(){var e;null===(e=n._dataTable)||void 0===e||e.refresh()},n.getColumnDefinitions=function(){return[{title:"Title",dataIndex:OI.title,sorter:!0,filterType:wr.Text},{title:"URL",dataIndex:OI.url,sorter:!0,filterType:wr.Text,render:function(e,t){var n,r;return Object(o.jsxs)(at.a,CI({to:{pathname:null!==(n=t.url)&&void 0!==n?n:""},target:"_blank",rel:"noopener noreferrer"},{children:[null!==(r=t.url)&&void 0!==r?r:""," ",Object(o.jsx)(yI,{},void 0)]}),void 0)}},{title:"",dataIndex:OI.id,width:"25px",render:function(e,t){return Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(rt.a,CI({type:"link",className:"ant-btn",onClick:function(){return n.addResource(t)}},{children:Object(o.jsx)(Ei.a,{},void 0)}),void 0),Object(o.jsx)(rt.a,CI({type:"link",className:"ant-btn",onClick:function(){var e;return n.promptConfirmRemove(null!==(e=t.id)&&void 0!==e?e:re.default.Empty())}},{children:Object(o.jsx)(Yd.a,{},void 0)}),void 0)]},void 0)},sorter:!1,filterType:wr.NONE}]},n.handleRemoveResource=function(e){n.setState({submitting:!0});var t=gI({noticeOfIntentChangeRequestWorkForceLinkId:null!==e&&void 0!==e?e:re.default.Empty()});Xh.removeNoticeOfIntentChangeRequestWorkForceLink(t).then((function(e){n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,altered:!(null===e||void 0===e?void 0:e.succeeded)}),!0===(null===e||void 0===e?void 0:e.succeeded)?S.b.success("Link was removed."):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(e){n.setState({error:e}),S.b.error("Link could not be removed.")})).finally((function(){n.setState({loading:!1}),n.triggerRefresh()}))},n.promptConfirmRemove=function(e){f.a.confirm({title:"Are you sure you want to remove this link?",okText:"Remove Link",onOk:function(){return n.handleRemoveResource(e)}})},n.addResource=function(e){n.setState({noticeOfIntentChangeRequestWorkForceLink:e},(function(){return n.openModal()}))},n.openModal=function(){n.setState({showModal:!0})},n.submitResourceChange=function(){var e;null===(e=n._addResourceLinkFormRef.current)||void 0===e||e.submit()},n.cancelResourceChange=function(){var e;n.setState({showModal:!1}),null===(e=n._addResourceLinkFormRef.current)||void 0===e||e.reset()},n.resourcesUpdated=function(){var e;n.setState({showModal:!1}),null===(e=n._dataTable)||void 0===e||e.refresh()},n.state={showModal:!1,noticeOfIntentChangeRequestWorkForceLink:OI.create()},n}return TI(t,e),t.prototype.render=function(){return Object(o.jsxs)("div",{children:[this.renderAddResourceModal(),this.renderDataTable()]},void 0)},t.prototype.renderAddResourceModal=function(){return Object(o.jsx)(f.a,CI({visible:this.state.showModal,title:"Link",okText:"Save",onOk:this.submitResourceChange,onCancel:this.cancelResourceChange},{children:Object(o.jsx)(_I,{ref:this._addResourceLinkFormRef,onSuccess:this.resourcesUpdated,noticeOfIntentChangeRequestWorkForceLink:this.state.noticeOfIntentChangeRequestWorkForceLink},void 0)}),void 0)},t.prototype.renderDataTable=function(){var e=this,t=[];return t.push(oo.Reset()),t.push(oo.Default("Add Link",(function(){return e.addResource(OI.create())}))),Object(o.jsx)(io,{ref:function(t){return e._dataTable=t},serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:t,columns:this.getColumnDefinitions(),fetchData:{fetch:function(e){return Xh.getNoticeOfIntentChangeRequestWorkForceLinkTableData(e)}},stateSaving:{enabled:!0,tableUniqueKey:"resource_link_list"}},void 0)},t}(a.Component),AI=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),PI=function(e){function t(t){var n=e.call(this,t)||this;return n.goToConfig=function(){T.push(x.generate(x.CONFIGURATIONS))},n}return AI(t,e),t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Workforce Informational Links",onBack:this.goToConfig,breadcrumbs:Xn.NoticeOfIntentChangeRequestWorkForceLinkList()},void 0),Object(o.jsx)(Qn.a,{children:Object(o.jsx)(xI,{},void 0)},void 0)]},void 0)},t}(a.Component),NI=Object(u.i)(PI),wI=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),DI=function(){return DI=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},DI.apply(this,arguments)},qI=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(e){n.setState({loading:!0});var t=[];e!==re.default.Empty()&&t.push(n.loadChangeRequest(e)),Promise.all(t).then((function(){n.setState({loading:!1})}
1))},n.loadChangeRequest=function(e){return va.getBaseChangeRequestDetails(e).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.newProgramSaved=function(e){n.setState({isEditing:!1}),e!=n.state.changeRequestId?T.replace(x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_1,{id:e})):n.loadChangeRequest(e)},n.goToNextStep=function(e){T.replace(x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_1,{id:e})),T.push(x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_2,{id:e}))},n.state={changeRequestId:re.default.Empty(),changeRequest:$a.create({changeRequestTypeId:Xa.NEWPROGRAM})},n}return wI(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");""==e||"new"==e?this.setState({isNew:!0}):e!==re.default.Empty()&&this.state.changeRequestId!=e&&(this.setState({changeRequestId:e}),this.fetchData(e))},t.prototype.render=function(){var e,t,n;return Object(o.jsx)(O.Content,{children:Object(o.jsx)(zg,DI({changeRequest:null!==(e=this.state.changeRequest)&&void 0!==e?e:$a.create(),stepNumber:0,currentUser:null!==(t=this.props.currentUser)&&void 0!==t?t:{}},{children:Object(o.jsx)(Qn.a,DI({title:"Program Information"},{children:Object(o.jsx)(Ap,{changeRequestId:this.state.changeRequest.id,selectedInstitution:this.props.selectedInstitution&&(null===(n=this.props.selectedInstitution)||void 0===n?void 0:n.id)!=re.default.Empty()?this.props.selectedInstitution.id:this.state.changeRequest.institutionId,onSave:this.newProgramSaved,onSubmit:this.goToNextStep},void 0)}),void 0)}),void 0)},void 0)},t}(a.Component);var FI=Object(u.i)(Object(l.b)((function(e){return{selectedInstitution:e.Institution.Selected,currentUser:e.UserSession.Value}}))(qI)),MI=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),YI=function(){return YI=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},YI.apply(this,arguments)},UI=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(e){n.setState({loading:!0});var t=[];e!==re.default.Empty()&&t.push(n.loadChangeRequest(e)),Promise.all(t).then((function(){n.setState({loading:!1})}))},n.loadChangeRequest=function(e){return va.getBaseChangeRequestDetails(e).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.goToNextStep=function(){T.push(x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_3,{id:n.state.changeRequestId}))},n.goToPreviousStep=function(){T.push(x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_1,{id:n.state.changeRequestId},{}))},n.state={changeRequestId:re.default.Empty(),changeRequest:$a.create()},n}return MI(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");"new"==e?this.setState({isNew:!0}):e!==re.default.Empty()&&this.state.changeRequestId!=e&&(this.setState({changeRequestId:e}),this.fetchData(e))},t.prototype.render=function(){var e,t;return Object(o.jsx)(O.Content,{children:Object(o.jsx)(zg,YI({changeRequest:null!==(e=this.state.changeRequest)&&void 0!==e?e:$a.create(),stepNumber:1,currentUser:null!==(t=this.props.currentUser)&&void 0!==t?t:{}},{children:Object(o.jsx)(Qn.a,YI({title:"Program Plan"},{children:Object(o.jsx)(Lp,{changeRequestId:this.state.changeRequest.id,selectedInstitution:this.props.selectedInstitution?this.props.selectedInstitution.id:this.state.changeRequest.institutionId,onSubmit:this.goToNextStep,onPrevious:this.goToPreviousStep},void 0)}),void 0)}),void 0)},void 0)},t}(a.Component);var LI=Object(u.i)(Object(l.b)((function(e){return{selectedInstitution:e.Institution.Selected,currentUser:e.UserSession.Value}}),(function(){return{}}))(UI)),kI=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),GI=function(){return GI=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},GI.apply(this,arguments)},VI=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(e){n.setState({loading:!0});var t=[];e!==re.default.Empty()&&t.push(n.loadChangeRequest(e)),Promise.all(t).then((function(){n.setState({loading:!1})}
1))},n.loadChangeRequest=function(e){return va.getBaseChangeRequestDetails(e).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.goToNextStep=function(){var e;(null===(e=n.state.changeRequest.newProgramChangeRequest)||void 0===e?void 0:e.isTransferMajorProgram)?T.push(x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_7,{id:n.state.changeRequestId})):T.push(x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_4,{id:n.state.changeRequestId}))},n.goToPreviousStep=function(){T.push(x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_2,{id:n.state.changeRequestId},{}))},n.state={changeRequestId:re.default.Empty(),changeRequest:$a.create()},n}return kI(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");"new"==e?this.setState({isNew:!0}):e!==re.default.Empty()&&this.state.changeRequestId!=e&&(this.setState({changeRequestId:e}),this.fetchData(e))},t.prototype.render=function(){var e,t;return Object(o.jsx)(O.Content,{children:Object(o.jsx)(zg,GI({changeRequest:null!==(e=this.state.changeRequest)&&void 0!==e?e:$a.create(),stepNumber:2,currentUser:null!==(t=this.props.currentUser)&&void 0!==t?t:{}},{children:Object(o.jsx)(Qn.a,GI({title:"Contact Information"},{children:Object(o.jsx)(ef,{changeRequestId:this.state.changeRequest.id,selectedInstitution:this.props.selectedInstitution?this.props.selectedInstitution.id:this.state.changeRequest.institutionId,onSubmit:this.goToNextStep,onPrevious:this.goToPreviousStep},void 0)}),void 0)}),void 0)},void 0)},t}(a.Component);var BI=Object(u.i)(Object(l.b)((function(e){return{selectedInstitution:e.Institution.Selected,currentUser:e.UserSession.Value}}),(function(){return{}}))(VI)),WI=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),zI=function(){return zI=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},zI.apply(this,arguments)},HI=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(e){n.setState({loading:!0});var t=[];e!==re.default.Empty()&&t.push(n.loadChangeRequest(e)),Promise.all(t).then((function(){n.setState({loading:!1})}))},n.loadChangeRequest=function(e){return va.getBaseChangeRequestDetails(e).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.goToNextStep=function(){var e;(null===(e=n.state.changeRequest.newProgramChangeRequest)||void 0===e?void 0:e.isTransferMajorProgram)?T.push(x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_7,{id:n.state.changeRequestId})):T.push(x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_5,{id:n.state.changeRequestId}))},n.goToPreviousStep=function(){T.push(x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_3,{id:n.state.changeRequestId},{}))},n.state={changeRequestId:re.default.Empty(),changeRequest:$a.create()},n}return WI(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");"new"==e?this.setState({isNew:!0}):e!==re.default.Empty()&&this.state.changeRequestId!=e&&(this.setState({changeRequestId:e}),this.fetchData(e))},t.prototype.render=function(){var e,t;return Object(o.jsx)(O.Content,{children:Object(o.jsx)(zg,zI({changeRequest:null!==(e=this.state.changeRequest)&&void 0!==e?e:$a.create(),stepNumber:3,currentUser:null!==(t=this.props.currentUser)&&void 0!==t?t:{}},{children:Object(o.jsx)(Qn.a,zI({title:"Consultant Meetings"},{children:Object(o.jsx)(hf,{changeRequestId:this.state.changeRequest.id,selectedInstitution:this.props.selectedInstitution?this.props.selectedInstitution.id:this.state.changeRequest.institutionId,onSubmit:this.goToNextStep,onPrevious:this.goToPreviousStep},void 0)}),void 0)}),void 0)},void 0)},t}(a.Component);var QI=Object(u.i)(Object(l.b)((function(e){return{selectedInstitution:e.Institution.Selected,currentUser:e.UserSession.Value}}),(function(){return{}}))(HI)),KI=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),XI=function(){return XI=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},XI.apply(this,arguments)},JI=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(e){n.setState({loading:!0});var t=[];e!==re.default.Empty()&&t.push(n.loadChangeRequest(e)),Promise.all(t).then((function(){n.setState({loading:!1})}
1))},n.loadChangeRequest=function(e){return va.getBaseChangeRequestDetails(e).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.goToNextStep=function(){T.push(x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_6,{id:n.state.changeRequestId}))},n.goToPreviousStep=function(){T.push(x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_4,{id:n.state.changeRequestId},{}))},n.state={changeRequestId:re.default.Empty(),changeRequest:$a.create()},n}return KI(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");"new"==e?this.setState({isNew:!0}):e!==re.default.Empty()&&this.state.changeRequestId!=e&&(this.setState({changeRequestId:e}),this.fetchData(e))},t.prototype.render=function(){var e,t;return Object(o.jsx)(O.Content,{children:Object(o.jsx)(zg,XI({changeRequest:null!==(e=this.state.changeRequest)&&void 0!==e?e:$a.create(),stepNumber:4,currentUser:null!==(t=this.props.currentUser)&&void 0!==t?t:{}},{children:Object(o.jsx)(Qn.a,XI({title:"Occupational Information"},{children:Object(o.jsx)(Nf,{changeRequestId:this.state.changeRequest.id,selectedInstitution:this.props.selectedInstitution?this.props.selectedInstitution.id:this.state.changeRequest.institutionId,onSubmit:this.goToNextStep,onPrevious:this.goToPreviousStep},void 0)}),void 0)}),void 0)},void 0)},t}(a.Component);var $I=Object(u.i)(Object(l.b)((function(e){return{selectedInstitution:e.Institution.Selected,currentUser:e.UserSession.Value}}),(function(){return{}}))(JI)),ZI=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),eS=function(){return eS=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},eS.apply(this,arguments)},tS=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(e){n.setState({loading:!0});var t=[];e!==re.default.Empty()&&t.push(n.loadChangeRequest(e)),Promise.all(t).then((function(){n.setState({loading:!1})}))},n.loadChangeRequest=function(e){return va.getBaseChangeRequestDetails(e).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.goToNextStep=function(){T.push(x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_7,{id:n.state.changeRequestId}))},n.goToPreviousStep=function(){T.push(x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_5,{id:n.state.changeRequestId},{}))},n.state={changeRequestId:re.default.Empty(),changeRequest:$a.create()},n}return ZI(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");"new"==e?this.setState({isNew:!0}):e!==re.default.Empty()&&this.state.changeRequestId!=e&&(this.setState({changeRequestId:e}),this.fetchData(e))},t.prototype.render=function(){var e,t;return Object(o.jsx)(O.Content,{children:Object(o.jsx)(zg,eS({changeRequest:null!==(e=this.state.changeRequest)&&void 0!==e?e:$a.create(),stepNumber:5,currentUser:null!==(t=this.props.currentUser)&&void 0!==t?t:{}},{children:Object(o.jsx)(Qn.a,eS({title:"Industry Information"},{children:Object(o.jsx)(Uf,{changeRequestId:this.state.changeRequest.id,selectedInstitution:this.props.selectedInstitution?this.props.selectedInstitution.id:this.state.changeRequest.institutionId,onSubmit:this.goToNextStep,onPrevious:this.goToPreviousStep},void 0)}),void 0)}),void 0)},void 0)},t}(a.Component);var nS=Object(u.i)(Object(l.b)((function(e){return{selectedInstitution:e.Institution.Selected,currentUser:e.UserSession.Value}}),(function(){return{}}))(tS)),rS=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),iS=function(){return iS=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},iS.apply(this,arguments)},oS=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(e){n.setState({loading:!0});var t=[];e!==re.default.Empty()&&t.push(n.loadChangeRequest(e)),Promise.all(t).then((function(){n.setState({loading:!1})}
1))},n.loadChangeRequest=function(e){return va.getBaseChangeRequestDetails(e).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.goToNextStep=function(){T.push(x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_8,{id:n.state.changeRequestId,awardId:n.state.awardId}))},n.goToPreviousStep=function(){var e;(null===(e=n.state.changeRequest.newProgramChangeRequest)||void 0===e?void 0:e.isTransferMajorProgram)?T.push(x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_3,{id:n.state.changeRequestId,awardId:n.state.awardId},{})):T.push(x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_6,{id:n.state.changeRequestId,awardId:n.state.awardId},{}))},n.state={isAwardNew:!1,changeRequestId:re.default.Empty(),awardId:re.default.Empty(),changeRequest:$a.create()},n}return rS(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id"),t=Hr.getPathPart(this.props.match,"awardId");"new"==e?this.setState({isNew:!0}):e!==re.default.Empty()&&this.state.changeRequestId!=e&&(this.setState({changeRequestId:e}),this.fetchData(e))," new"==t?this.setState({isAwardNew:!0}):t!==re.default.Empty()&&this.state.awardId!=t&&this.setState({awardId:t})},t.prototype.render=function(){var e,t,n,r;return Object(o.jsx)(O.Content,{children:Object(o.jsx)(zg,iS({changeRequest:null!==(e=this.state.changeRequest)&&void 0!==e?e:$a.create(),stepNumber:(null===(t=this.state.changeRequest.newProgramChangeRequest)||void 0===t?void 0:t.isTransferMajorProgram)?3:6,currentUser:null!==(n=this.props.currentUser)&&void 0!==n?n:{}},{children:Object(o.jsx)(Qn.a,iS({title:"Linking And Existing Entities"},{children:Object(o.jsx)(nh,{changeRequestId:this.state.changeRequest.id,selectedInstitution:null!==(r=this.state.changeRequest.institutionId)&&void 0!==r?r:re.default.Empty(),loading:this.state.loading,onSubmit:this.goToNextStep,onPrevious:this.goToPreviousStep},void 0)}),void 0)}),void 0)},void 0)},t}(a.Component);var aS=Object(u.i)(Object(l.b)((function(e){return{selectedInstitution:e.Institution.Selected,currentUser:e.UserSession.Value}}),(function(){return{}}))(oS)),sS=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),dS=function(){return dS=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},dS.apply(this,arguments)},cS=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(e){n.setState({loading:!0});var t=[];e!==re.default.Empty()&&t.push(n.loadChangeRequest(e)),Promise.all(t).then((function(){n.setState({loading:!1})}))},n.loadChangeRequest=function(e){return va.getBaseChangeRequestDetails(e).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.goToNextStep=function(e){var t;(null===(t=n.state.changeRequest.newProgramChangeRequest)||void 0===t?void 0:t.isTransferMajorProgram)?T.push(x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_10,{id:n.state.changeRequestId,awardId:null!==e&&void 0!==e?e:re.default.Empty()})):T.push(x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_9,{id:n.state.changeRequestId}))},n.goToPreviousStep=function(){T.push(x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_7,{id:n.state.changeRequestId},{}))},n.state={changeRequestId:re.default.Empty(),changeRequest:$a.create()},n}return sS(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");"new"==e?this.setState({isNew:!0}):e!==re.default.Empty()&&this.state.changeRequestId!=e&&(this.setState({changeRequestId:e}),this.fetchData(e))},t.prototype.render=function(){var e,t;return Object(o.jsx)(O.Content,{children:Object(o.jsx)(zg,dS({changeRequest:null!==(e=this.state.changeRequest)&&void 0!==e?e:$a.create(),stepNumber:this.state.changeRequest.changeRequestTypeId===Xa.NEWTRANSFERMAJORPROGRAM?4:7,currentUser:null!==(t=this.props.currentUser)&&void 0!==t?t:{}},{children:Object(o.jsx)(Qn.a,dS({title:"Program Details"},{children:Object(o.jsx)(ch,{changeRequestId:this.state.changeRequest.i
1d,selectedInstitution:this.state.changeRequestId,loading:this.state.loading,onSubmit:this.goToNextStep,onPrevious:this.goToPreviousStep},void 0)}),void 0)}),void 0)},void 0)},t}(a.Component);var lS=Object(u.i)(Object(l.b)((function(e){return{selectedInstitution:e.Institution.Selected,currentUser:e.UserSession.Value}}),(function(){return{}}))(cS)),uS=function(e){return Object.assign({newProgramChangeRequest:null,awardId:"00000000-0000-0000-0000-000000000000"},e)},pS=function(e){return Object.assign({changeRequestId:"00000000-0000-0000-0000-000000000000"},e)},fS=function(e){return Object.assign({newProgramChangeRequest:null},e)},hS=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),vS=function(){return vS=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},vS.apply(this,arguments)},mS=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n.loadAwardTypes=function(e){var t=Gc({id:e});return Uc.getChildAwardTypes(t).then((function(e){e&&n.setState({hasChildAwardTypes:null!=e.childAwardTypes&&e.childAwardTypes.length>0})})).catch((function(){n.setState({error:!0})}))},n.loadChangeRequest=function(){var e=pS({changeRequestId:n.props.changeRequestId});return Fc.getStep9(e).then((function(e){var t,r,i,o,a;e&&((null===(t=e.changeRequest)||void 0===t?void 0:t.newProgramChangeRequest)&&n.loadAwardTypes(null===(r=e.changeRequest)||void 0===r?void 0:r.newProgramChangeRequest.primrayAwardTypeId),n.setState({changeRequest:null!==(i=e.changeRequest)&&void 0!==i?i:$a.create(),newProgramChangeRequest:null!==(a=null===(o=e.changeRequest)||void 0===o?void 0:o.newProgramChangeRequest)&&void 0!==a?a:Wc.create(),fieldErrors:n.props.changeRequestDetailsPage?null:e.fieldErrors},(function(){return n.resetForm()})))})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.resetForm=function(){var e;n.setState({altered:!1}),null===(e=n._formRef.current)||void 0===e||e.resetFields()},n.openAward=function(e){var t;T.push(x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_10,{id:null!==(t=n.state.changeRequest.id)&&void 0!==t?t:re.default.Empty(),awardId:"new"==e?re.default.Empty():e},{}))},n.removeAwardModal=function(e){f.a.confirm({title:"Are you sure you want to remove this award?",okText:"Remove",onOk:function(){return n.removeNewProgramAward(e)},width:500})},n.removeNewProgramAward=function(e){var t,r=null!==(t=n.state.changeRequest.newProgramChangeRequest)&&void 0!==t?t:Wc.create();r.changeRequestId=n.state.changeRequest.id;var i=uS({newProgramChangeRequest:r,awardId:e});return Fc.removeAwardFromNewProgramProgram(i).then((function(e){var t;e&&(n.setState({newProgramChangeRequest:null!==(t=e.newProgramChangeRequest)&&void 0!==t?t:Wc.create()}),S.b.success("Award Removed"))})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.render=function(){var e;if(n.state.loading)return Object(o.jsx)(pt.a,{active:!0},void 0);var t=n.state.fieldErrors?null===(e=n.state.fieldErrors[Wc.newProgramProgramAwards])||void 0===e?void 0:e.map((function(e){return e.message})):"";return Object(o.jsxs)(y.b,vS({direction:"vertical"},{children:[n.renderPlannedAwards(),Object(o.jsx)(ud,{errorMessage:!!n.state.fieldErrors,text:t},void 0),n.renderActions()]}),void 0)},n.handleSubmit=function(){var e;n.setState({submitting:!0});var t=fS({newProgramChangeRequest:null!==(e=n.state.newProgramChangeRequest)&&void 0!==e?e:null});Fc.submitStep9(t).then((function(e){n.setState({submitted:!0}),(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.props.onSubmit&&n.props.onSubmit()):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Save Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Save Failed")})).finally((function(){n.setState({loading:!1,submitting:!1})}
1))},n.getColumnDefinitionsForContactInformation=function(){return[{title:"Title",dataIndex:zc.awardTitle,render:function(e,t){return Object(o.jsxs)(rt.a,vS({type:"link",onClick:function(){var e;return n.openAward(null!==(e=t.id)&&void 0!==e?e:re.default.Empty())}},{children:[e," "]}),void 0)}},{title:"Award Type",dataIndex:zc.awardTypeId,render:function(e,t){var n,r;return(null===(n=t.awardType)||void 0===n?void 0:n.code)+" - "+(null===(r=t.awardType)||void 0===r?void 0:r.name)}},{title:"Actions",dataIndex:zc.id,width:"15px",render:function(e,t,r){var i,a,s,d;return(null!==(s=null===(a=null===(i=n.state.newProgramChangeRequest)||void 0===i?void 0:i.newProgramProgramAwards)||void 0===a?void 0:a.length)&&void 0!==s?s:0)>1&&!(null===(d=n.state.newProgramChangeRequest)||void 0===d?void 0:d.isTransferMajorProgram)?Object(o.jsx)(rt.a,vS({type:"link",onClick:function(){var e;return n.removeAwardModal(null!==(e=t.id)&&void 0!==e?e:re.default.Empty())}},{children:Object(o.jsx)(Yd.a,{},void 0)}),void 0):null}}]},n.state={changeRequest:$a.create(),changeRequests:[],newProgramChangeRequest:Wc.create(),hasChildAwardTypes:!1},n}return hS(t,e),t.prototype.componentDidMount=function(){this.props.changeRequestId&&this.props.changeRequestId!=re.default.Empty()&&this.loadChangeRequest()},t.prototype.componentDidUpdate=function(e){this.props.changeRequestId&&this.props.changeRequestId!=e.changeRequestId&&this.props.changeRequestId&&this.props.changeRequestId!=re.default.Empty()&&this.loadChangeRequest(),this.props.loading!=e.loading&&this.setState({loading:this.props.loading})},t.prototype.renderActions=function(){return Object(o.jsxs)(y.b,vS({direction:"horizontal",wrap:!0},{children:[Object(o.jsx)(rs,{onClick:this.props.onPrevious},void 0),Object(o.jsx)(ss,{onClick:this.handleSubmit,submitting:this.state.submitting},void 0)]}),void 0)},t.prototype.renderPlannedAwards=function(){var e,t=this;return Object(o.jsxs)(y.b,vS({direction:"vertical"},{children:[Object(o.jsx)(Pi.a,{size:"small",dataSource:null!==(e=this.state.newProgramChangeRequest.newProgramProgramAwards)&&void 0!==e?e:[],pagination:!1,columns:this.getColumnDefinitionsForContactInformation()},void 0),this.state.newProgramChangeRequest.isTransferMajorProgram||!this.state.hasChildAwardTypes?null:Object(o.jsx)(rt.a,vS({onClick:function(){return t.openAward("new")},icon:Object(o.jsx)(Xc.a,{},void 0)},{children:"Add Award"}),void 0),Object(o.jsx)(ot.a.Text,vS({strong:!0},{children:"Please review each award before continuing. Click on the title of the award to review."}),void 0)]}),void 0)},t.prototype.renderErrors=function(){if(this.state.error)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:this.state.message},void 0)},t}(a.Component),gS=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),bS=function(){return bS=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},bS.apply(this,arguments)},yS=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(e){n.setState({loading:!0});var t=[];e!==re.default.Empty()&&t.push(n.loadChangeRequest(e)),Promise.all(t).then((function(){n.setState({loading:!1})}))},n.loadChangeRequest=function(e){return va.getBaseChangeRequestDetails(e).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.goToNextStep=function(){T.push(x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_12,{id:n.state.changeRequestId}))},n.goToPreviousStep=function(){T.push(x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_8,{id:n.state.changeRequestId},{}))},n.state={changeRequestId:re.default.Empty(),changeRequest:$a.create()},n}return gS(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");"new"==e?this.setState({isNew:!0}):e!==re.default.Empty()&&this.state.changeRequestId!=e&&(this.setState({changeRequestId:e}),this.fetchData(e))},t.prototype.render=function(){var e,t;return Object(o.jsx)(O.Content,{children:Object(o.jsx)(zg,bS({changeRequest:null!==(e=this.state.changeRequest)&&void 0!==e?e:$a.create(),stepNumber:this.state.changeRequest.changeRequestTypeId===Xa.NEWTRANSFERMAJORPROGRAM?5:8,currentUser:null!==(t=this.props.currentUser)&&void 0!==t?t:{}},{children:Object(o.jsx)(Qn.a,bS({title:"Award Details"},{children:Object(o.jsx)(mS,{changeRequestId:this.state.changeRequest.i
1d,selectedInstitution:this.state.changeRequestId,loading:this.state.loading,onSubmit:this.goToNextStep,onPrevious:this.goToPreviousStep},void 0)}),void 0)}),void 0)},void 0)},t}(a.Component);var OS=Object(u.i)(Object(l.b)((function(e){return{selectedInstitution:e.Institution.Selected,currentUser:e.UserSession.Value}}))(yS)),jS=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),IS=function(){return IS=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},IS.apply(this,arguments)},SS=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(e){n.setState({loading:!0});var t=[];e!==re.default.Empty()&&t.push(n.loadChangeRequest(e)),Promise.all(t).then((function(){n.setState({loading:!1})}))},n.loadChangeRequest=function(e){return va.getBaseChangeRequestDetails(e).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.goToNextStep=function(e){T.push(x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_11,{id:n.state.changeRequestId,awardId:e}))},n.goToPreviousStep=function(){var e;(null===(e=n.state.changeRequest.newProgramChangeRequest)||void 0===e?void 0:e.isTransferMajorProgram)?T.push(x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_8,{id:n.state.changeRequestId},{})):T.push(x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_9,{id:n.state.changeRequestId,awardId:n.state.awardId},{}))},n.state={isAwardNew:!1,changeRequestId:re.default.Empty(),awardId:re.default.Empty(),changeRequest:$a.create()},n}return jS(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id"),t=Hr.getPathPart(this.props.match,"awardId");"new"==e?this.setState({isNew:!0}):e!==re.default.Empty()&&this.state.changeRequestId!=e&&(this.setState({changeRequestId:e}),this.fetchData(e))," new"==t?this.setState({isAwardNew:!0}):t!==re.default.Empty()&&this.state.awardId!=t&&this.setState({awardId:t})},t.prototype.render=function(){var e,t;return Object(o.jsx)(O.Content,{children:Object(o.jsx)(zg,IS({changeRequest:null!==(e=this.state.changeRequest)&&void 0!==e?e:$a.create(),awardId:this.state.awardId,stepNumber:this.state.changeRequest.changeRequestTypeId===Xa.NEWTRANSFERMAJORPROGRAM?5:9,currentUser:null!==(t=this.props.currentUser)&&void 0!==t?t:{}},{children:Object(o.jsx)(Qn.a,IS({title:"Award Details"},{children:Object(o.jsx)(cl,{awardId:this.state.awardId,changeRequestId:this.state.changeRequestId,selectedInstitution:this.state.changeRequestId,loading:this.state.loading,onSubmit:this.goToNextStep,onPrevious:this.goToPreviousStep},void 0)}),void 0)}),void 0)},void 0)},t}(a.Component);var ES=Object(u.i)(Object(l.b)((function(e){return{selectedInstitution:e.Institution.Selected,currentUser:e.UserSession.Value}}))(SS)),RS=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),_S=function(){return _S=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},_S.apply(this,arguments)},TS=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(e){n.setState({loading:!0});var t=[];e!==re.default.Empty()&&t.push(n.loadChangeRequest(e)),Promise.all(t).then((function(){n.setState({loading:!1})}))},n.loadChangeRequest=function(e){return va.getBaseChangeRequestDetails(e).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.goToNextStep=function(){var e;(null===(e=n.state.changeRequest.newProgramChangeRequest)||void 0===e?void 0:e.isTransferMajorProgram)?T.push(x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_12,{id:n.state.changeRequestId})):T.push(x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_9,{id:n.state.changeRequestId,awardId:n.state.awardId}))},n.goToPreviousStep=function(){T.push(x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_10,{id:n.state.changeRequestId,awardId:n.state.awardId},{}))},n.state={isAwardNew:!1,changeRequestId:re.default.Empty(),awardId:re.default.Empty(),changeRequest:$a.create()},n}return RS(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id"),t=Hr.getPathPart(this.props.match,"awardId");"new"==e?this.setState({isNew:!0}):e!==re.default.Empty()&&this.state.changeRequestId!=e&&(this.setState({changeRequestId:e}),this.fetchData(e))," new"==t?this.setState({isAwardNew:!0}):t!==re.default.Empty()&&this.state.awardId!=t&&this.setState({awardId:t})},t.prototype.render=function(){var e,t,n;return Object(o.jsx)(O.Content,{children:Object(o.jsx)(zg,_S({changeRequest:null!==(e=this.state.changeRequest)&&void 0!==e?e:$a.create(),awardId:this.state.awardId,stepNumber:this.state.changeRequest.changeRequestTypeId===Xa.NEWTRANSFERMAJORPROGRAM?6:10,currentUser:null!==(t=this.props.currentUser)&&void 0!==t?t:{}},{children:Object(o.jsx)(Qn.a,_S({title:"Term Details"},{children:Object(o.jsx)(Nu,{awardId:this.state.awardId,changeRequestId:this.state.changeRequest.i
1d,selectedInstitution:null!==(n=this.state.changeRequest.institutionId)&&void 0!==n?n:re.default.Empty(),loading:this.state.loading,onSubmit:this.goToNextStep,onPrevious:this.goToPreviousStep},void 0)}),void 0)}),void 0)},void 0)},t}(a.Component);var CS=Object(u.i)(Object(l.b)((function(e){return{selectedInstitution:e.Institution.Selected,currentUser:e.UserSession.Value}}))(TS)),xS=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),AS=function(){return AS=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},AS.apply(this,arguments)},PS=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(e){n.setState({loading:!0});var t=[];e!==re.default.Empty()&&t.push(n.loadChangeRequest(e)),Promise.all(t).then((function(){n.setState({loading:!1})}))},n.loadChangeRequest=function(e){return va.getBaseChangeRequestDetails(e).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.goToNextStep=function(){var e;(null===(e=n.state.changeRequest.newProgramChangeRequest)||void 0===e?void 0:e.isTransferMajorProgram)?T.push(x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_14,{id:n.state.changeRequestId,awardId:n.state.awardId})):T.push(x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_13,{id:n.state.changeRequestId,awardId:n.state.awardId}))},n.goToPreviousStep=function(){var e,t,r,i;if(null===(e=n.state.changeRequest.newProgramChangeRequest)||void 0===e?void 0:e.isTransferMajorProgram){var o=re.default.Empty();if(o==re.default.Empty()){var a=null===(r=null===(t=n.state.changeRequest)||void 0===t?void 0:t.newProgramChangeRequest)||void 0===r?void 0:r.newProgramProgramAwards;a&&a.length>0&&(o=null!==(i=a[0].id)&&void 0!==i?i:re.default.Empty())}T.push(x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_11,{id:n.state.changeRequestId,awardId:null!==o&&void 0!==o?o:re.default.Empty}))}else T.push(x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_9,{id:n.state.changeRequestId},{}))},n.state={isAwardNew:!1,changeRequestId:re.default.Empty(),awardId:re.default.Empty(),changeRequest:$a.create()},n}return xS(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id"),t=Hr.getPathPart(this.props.match,"awardId");"new"==e?this.setState({isNew:!0}):e!==re.default.Empty()&&this.state.changeRequestId!=e&&(this.setState({changeRequestId:e}),this.fetchData(e))," new"==t?this.setState({isAwardNew:!0}):t!==re.default.Empty()&&this.state.awardId!=t&&this.setState({awardId:t})},t.prototype.render=function(){var e,t;return Object(o.jsx)(O.Content,{children:Object(o.jsx)(zg,AS({changeRequest:null!==(e=this.state.changeRequest)&&void 0!==e?e:$a.create(),stepNumber:this.state.changeRequest.changeRequestTypeId===Xa.NEWTRANSFERMAJORPROGRAM?7:11,currentUser:null!==(t=this.props.currentUser)&&void 0!==t?t:{}},{children:Object(o.jsx)(Qn.a,AS({title:"ICCPHSE"},{children:Object(o.jsx)(Yu,{changeRequestId:this.state.changeRequest.id,loading:this.state.loading,onSubmit:this.goToNextStep,onPrevious:this.goToPreviousStep},void 0)}),void 0)}),void 0)},void 0)},t}(a.Component);var NS=Object(u.i)(Object(l.b)((function(e){return{selectedInstitution:e.Institution.Selected,currentUser:e.UserSession.Value}}))(PS)),wS=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),DS=function(){return DS=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},DS.apply(this,arguments)},qS=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(e){n.setState({loading:!0});var t=[];e!==re.default.Empty()&&t.push(n.loadChangeRequest(e)),Promise.all(t).then((function(){n.setState({loading:!1})}
1))},n.loadChangeRequest=function(e){return va.getBaseChangeRequestDetails(e).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.goToNextStep=function(){T.push(x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_14,{id:n.state.changeRequestId,awardId:n.state.awardId}))},n.goToPreviousStep=function(){T.push(x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_12,{id:n.state.changeRequestId,awardId:n.state.awardId},{}))},n.state={isAwardNew:!1,changeRequestId:re.default.Empty(),awardId:re.default.Empty(),changeRequest:$a.create()},n}return wS(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id"),t=Hr.getPathPart(this.props.match,"awardId");"new"==e?this.setState({isNew:!0}):e!==re.default.Empty()&&this.state.changeRequestId!=e&&(this.setState({changeRequestId:e}),this.fetchData(e))," new"==t?this.setState({isAwardNew:!0}):t!==re.default.Empty()&&this.state.awardId!=t&&this.setState({awardId:t})},t.prototype.render=function(){var e,t,n;return Object(o.jsx)(O.Content,{children:Object(o.jsx)(zg,DS({changeRequest:null!==(e=this.state.changeRequest)&&void 0!==e?e:$a.create(),stepNumber:12,currentUser:null!==(t=this.props.currentUser)&&void 0!==t?t:{}},{children:Object(o.jsx)(Qn.a,DS({title:"Advisory Board"},{children:Object(o.jsx)(Xu,{awardId:this.state.awardId,changeRequestId:this.state.changeRequest.id,selectedInstitution:null!==(n=this.state.changeRequest.institutionId)&&void 0!==n?n:re.default.Empty(),loading:this.state.loading,onSubmit:this.goToNextStep,onPrevious:this.goToPreviousStep},void 0)}),void 0)}),void 0)},void 0)},t}(a.Component);var FS=Object(u.i)(Object(l.b)((function(e){return{selectedInstitution:e.Institution.Selected,currentUser:e.UserSession.Value}}))(qS)),MS=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),YS=function(){return YS=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},YS.apply(this,arguments)},US=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(e){n.setState({loading:!0});var t=[];e!==re.default.Empty()&&t.push(n.loadChangeRequest(e)),Promise.all(t).then((function(){n.setState({loading:!1})}))},n.loadChangeRequest=function(e){return va.getBaseChangeRequestDetails(e).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.goToNextStep=function(){T.push(x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_15,{id:n.state.changeRequestId,awardId:n.state.awardId}))},n.goToPreviousStep=function(){var e;(null===(e=n.state.changeRequest.newProgramChangeRequest)||void 0===e?void 0:e.isTransferMajorProgram)?T.push(x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_12,{id:n.state.changeRequestId,awardId:n.state.awardId},{})):T.push(x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_13,{id:n.state.changeRequestId,awardId:n.state.awardId},{}))},n.state={isAwardNew:!1,changeRequestId:re.default.Empty(),awardId:re.default.Empty(),changeRequest:$a.create()},n}return MS(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id"),t=Hr.getPathPart(this.props.match,"awardId");"new"==e?this.setState({isNew:!0}):e!==re.default.Empty()&&this.state.changeRequestId!=e&&(this.setState({changeRequestId:e}),this.fetchData(e))," new"==t?this.setState({isAwardNew:!0}):t!==re.default.Empty()&&this.state.awardId!=t&&this.setState({awardId:t})},t.prototype.render=function(){var e,t,n;return Object(o.jsx)(O.Content,{children:Object(o.jsx)(zg,YS({changeRequest:null!==(e=this.state.changeRequest)&&void 0!==e?e:$a.create(),stepNumber:this.state.changeRequest.changeRequestTypeId===Xa.NEWTRANSFERMAJORPROGRAM?8:13,currentUser:null!==(t=this.props.currentUser)&&void 0!==t?t:{}},{children:Object(o.jsx)(Qn.a,YS({title:"Sign Off On Assurances"},{children:Object(o.jsx)(op,{changeRequestId:this.state.changeRequest.i
1d,selectedInstitution:null!==(n=this.state.changeRequest.institutionId)&&void 0!==n?n:re.default.Empty(),loading:this.state.loading,onSubmit:this.goToNextStep,onPrevious:this.goToPreviousStep},void 0)}),void 0)}),void 0)},void 0)},t}(a.Component);var LS=Object(u.i)(Object(l.b)((function(e){return{selectedInstitution:e.Institution.Selected,currentUser:e.UserSession.Value}}))(US)),kS=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),GS=function(){return GS=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},GS.apply(this,arguments)},VS=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(e){n.setState({loading:!0});var t=[];e!==re.default.Empty()&&t.push(n.loadChangeRequest(e)),Promise.all(t).then((function(){n.setState({loading:!1})}))},n.loadChangeRequest=function(e){return va.getBaseChangeRequestDetails(e).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.goToNextStep=function(){T.push(x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_REVIEW,{id:n.state.changeRequestId}))},n.goToPreviousStep=function(){T.push(x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_14,{id:n.state.changeRequestId},{}))},n.state={changeRequestId:re.default.Empty(),changeRequest:$a.create()},n}return kS(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");"new"==e?this.setState({isNew:!0}):e!==re.default.Empty()&&this.state.changeRequestId!=e&&(this.setState({changeRequestId:e}),this.fetchData(e))},t.prototype.render=function(){var e,t;return Object(o.jsx)(O.Content,{children:Object(o.jsx)(zg,GS({changeRequest:null!==(e=this.state.changeRequest)&&void 0!==e?e:$a.create(),stepNumber:this.state.changeRequest.changeRequestTypeId===Xa.NEWTRANSFERMAJORPROGRAM?9:14,currentUser:null!==(t=this.props.currentUser)&&void 0!==t?t:{}},{children:Object(o.jsx)(Qn.a,GS({title:"Additional Information"},{children:Object(o.jsx)(gs,{changeRequest:this.state.changeRequest,onPrevious:this.goToPreviousStep,onSubmit:this.goToNextStep,loading:this.state.loading},void 0)}),void 0)}),void 0)},void 0)},t}(a.Component);var BS=Object(u.i)(Object(l.b)((function(e){return{selectedInstitution:e.Institution.Selected,currentUser:e.UserSession.Value}}))(VS)),WS=function(e){return Object.assign({changeRequestId:"00000000-0000-0000-0000-000000000000"},e)},zS=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),HS=function(){return HS=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},HS.apply(this,arguments)},QS=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(e){n.setState({loading:!0});var t=[];e!==re.default.Empty()&&t.push(n.loadChangeRequest(e)),e!==re.default.Empty()&&t.push(n.checkNOIApproval(null!==e&&void 0!==e?e:re.default.Empty())),Promise.all(t).then((function(){n.setState({loading:!1})}))},n.checkNOIApproval=function(e){var t=WS({changeRequestId:e});return Fc.checkNOIApproval(t).then((function(e){e&&(e.isApproved||n.setState({noiNotApproved:!e.isApproved}))})).catch((function(){n.setState({error:!0,message:"Could not confirm NOI approval status."})}))},n.loadChangeRequest=function(e){return va.getBaseChangeRequestDetails(e).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.goToNextStep=function(){T.push(x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_SUBMITTED,{id:n.state.changeRequestId}))},n.goToPreviousStep=function(){T.push(x.generate(x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_15,{id:n.state.changeRequestId}))},n.onIsValidHandler=function(e){n.setState({isValid:e})},n.state={changeRequestId:re.default.Empty(),changeRequest:$a.create(),canSubmit:!0,submitErrorMessage:null,noiNotApproved:!1,isValid:!1},n}return zS(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");"new"==e?this.setState({isNew:!0}):e!==re.default.Empty()&&this.state.changeRequestId!=e&&(this.setState({changeRequestId:e}),this.fetchData(e))},t.prototype.render=function(){var e,t;return Object(o.jsx)(O.Content,{children:Object(o.jsx)(zg,HS({changeRequest:null!==(e=this.state.changeRequest)&&void 0!==e?e:$a.create(),stepNumber:this.state.changeRequest.changeRequestTypeId===Xa.NEWTRANSFERMAJORPROGRAM?10:15,currentUser:null!==(t=this.props.currentUser)&&void 0!==t?t:{}},{children:Object(o.jsx)(Qn.a,HS({title:"Review"},{children:Object(o.jsxs)(y.b,HS({direction:"vertical"},{children:[Object(o.jsx)(fh,{fieldErrors:this.state.fieldErrors,changeRequest:this.state.changeRequest,loading:this.state.loading,onIsValid:this.onIsValidHandler},void 0),Object(o.jsx)(Xg,{isValid:this.state.isValid,changeRequest:this.state.changeRequest,onSubmit:this.goToNextStep,onPrevious:this.goToPreviousStep,notAp
1proved:this.state.changeRequest.changeRequestTypeId!==Xa.NEWTRANSFERMAJORPROGRAM&&this.state.noiNotApproved,canSubmit:this.state.canSubmit,submitErrorMessage:this.state.submitErrorMessage},void 0)]}),void 0)}),void 0)}),void 0)},void 0)},t}(a.Component);var KS=Object(u.i)(Object(l.b)((function(e){return{selectedInstitution:e.Institution.Selected,currentUser:e.UserSession.Value}}))(QS)),XS=function(e){return Object.assign({changeRequestId:"00000000-0000-0000-0000-000000000000"},e)},JS=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),$S=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(e){n.setState({loading:!0});var t=[];e!==re.default.Empty()&&t.push(n.loadChangeRequest(e)),Promise.all(t).then((function(){n.setState({loading:!1})}))},n.loadChangeRequest=function(e){var t=XS({changeRequestId:e});return Fc.get(t).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.goToPreviousStep=function(){T.push(x.generate(x.EXISTING_PROGRAM_MODIFICATION_CHANGE_REQUEST_ENTRY_REVIEW,{id:n.state.changeRequestId}))},n.state={changeRequestId:re.default.Empty(),changeRequest:$a.create()},n}return JS(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");"new"==e?this.setState({isNew:!0}):e!==re.default.Empty()&&this.state.changeRequestId!=e&&(this.setState({changeRequestId:e}),this.fetchData(e))},t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{breadcrumbs:Xn.changeRequestList()},void 0),Object(o.jsx)(Qn.a,{children:Object(o.jsx)(bb,{},void 0)},void 0)]},void 0)},t}(a.Component);var ZS=Object(u.i)(Object(l.b)((function(e){return{selectedInstitution:e.Institution.Selected}}),(function(){return{}}))($S)),eE=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),tE=function(){return tE=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},tE.apply(this,arguments)},nE=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(e){n.setState({loading:!0});var t=[];e!==re.default.Empty()?t.push(n.loadChangeRequest(e)):n.setState({loading:!1}),Promise.all(t).then((function(){n.setState({loading:!1})}))},n.loadChangeRequest=function(e){return va.getBaseChangeRequestDetails(e).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.programModificationSave=function(e){n.setState({isEditing:!1}),e!=n.state.changeRequestId?T.replace(x.generate(x.EXISTING_PROGRAM_MODIFICATION_CHANGE_REQUEST_ENTRY_1,{id:e})):n.loadChangeRequest(e)},n.goToNextStep=function(e){T.replace(x.generate(x.EXISTING_PROGRAM_MODIFICATION_CHANGE_REQUEST_ENTRY_1,{id:e})),T.push(x.generate(x.EXISTING_PROGRAM_MODIFICATION_CHANGE_REQUEST_ENTRY_2,{id:e}))},n.state={changeRequestId:re.default.Empty(),changeRequest:$a.create({changeRequestTypeId:Xa.PROGRAMMODIFICATION})},n}return eE(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");""==e||"new "==e?this.setState({isNew:!0,loading:!1}):e!==re.default.Empty()&&this.state.changeRequestId!=e&&(this.setState({changeRequestId:e}),this.fetchData(e))},t.prototype.render=function(){var e,t;return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsx)(O.Content,{children:Object(o.jsx)(zg,tE({changeRequest:null!==(e=this.state.changeRequest)&&void 0!==e?e:$a.create(),stepNumber:0,currentUser:null!==(t=this.props.currentUser)&&void 0!==t?t:{}},{children:Object(o.jsx)(Qn.a,tE({title:"Program Details"},{children:Object(o.jsx)(Xv,{changeRequestId:this.state.changeRequest.i
1d,selectedInstitution:this.props.selectedInstitution?this.props.selectedInstitution.id:this.state.changeRequest.institutionId,onSave:this.programModificationSave,onSubmit:this.goToNextStep,loading:this.state.loading},void 0)}),void 0)}),void 0)},void 0)},t}(a.Component);var rE=Object(u.i)(Object(l.b)((function(e){return{selectedInstitution:e.Institution.Selected,currentUser:e.UserSession.Value}}),(function(){return{}}))(nE)),iE=function(e){return Object.assign({programModificationChangeRequest:null,awardId:"00000000-0000-0000-0000-000000000000"},e)},oE=function(e){return Object.assign({changeRequestId:"00000000-0000-0000-0000-000000000000"},e)},aE=function(e){return Object.assign({programModificationChangeRequest:null},e)},sE=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),dE=function(){return dE=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},dE.apply(this,arguments)},cE=function(e){function t(t){var n=e.call(this,t)||this;return n.loadChangeRequest=function(){var e=oE({changeRequestId:n.props.changeRequestId});return Dv.getStep2(e).then((function(e){var t,r,i,o;if(e){var a=null!==(r=null===(t=e.changeRequest)||void 0===t?void 0:t.programModificationChangeRequest)&&void 0!==r?r:zv.create();n.setState({changeRequest:null!==(i=e.changeRequest)&&void 0!==i?i:$a.create(),programModification:a}),n.hasChildAwardTypes(null!=a&&null!=a.programModificationAwards&&a.programModificationAwards.length>0&&null!==(o=a.programModificationAwards[0].awardTypeId)&&void 0!==o?o:null)}})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.openAward=function(e){var t;T.push(x.generate(x.EXISTING_PROGRAM_MODIFICATION_CHANGE_REQUEST_ENTRY_3,{id:null!==(t=n.state.changeRequest.id)&&void 0!==t?t:re.default.Empty(),awardId:"new"==e?re.default.Empty():e},{}))},n.removeAwardModal=function(e){f.a.confirm({title:"Are you sure you want to remove this award?",okText:"Remove",onOk:function(){return n.removeAward(e)},width:500})},n.removeAward=function(e){var t=n.state.programModification;t.changeRequestId=n.state.changeRequest.id;var r=iE({programModificationChangeRequest:t,awardId:e});return Dv.removeAwardFromProgramModificationProgramHandler(r).then((function(e){var t;e&&(n.setState({programModification:null!==(t=e.programModificationChangeRequest)&&void 0!==t?t:zv.create()}),S.b.success("Award Removed"))})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.hasChildAwardTypes=function(e){var t=Gc({id:e});return Uc.getChildAwardTypes(t).then((function(e){e&&n.setState({hasChildAwardTypes:null!=e.childAwardTypes&&e.childAwardTypes.length>0})})).catch((function(){n.setState({error:!0})}))},n.render=function(){var e;if(n.state.loading)return Object(o.jsx)(pt.a,{active:!0},void 0);var t=n.state.fieldErrors?null===(e=n.state.fieldErrors[zv.programModificationAwards])||void 0===e?void 0:e.map((function(e){return e.message})):"";return Object(o.jsxs)(y.b,dE({direction:"vertical"},{children:[n.renderPlannedAwards(),Object(o.jsx)(ud,{errorMessage:!!n.state.fieldErrors,text:t},void 0),n.renderActions()]}),void 0)},n.handleSubmit=function(){var e;n.setState({submitting:!0});var t=aE({programModificationChangeRequest:null!==(e=n.state.programModification)&&void 0!==e?e:null});Dv.submitStep2(t).then((function(e){n.setState({submitted:!0}),(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.props.onSubmit&&n.props.onSubmit()):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Save Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Save Failed")})).finally((function(){n.setState({loading:!1,submitting:!1})}
1))},n.getColumnDefinitionsForContactInformation=function(){return[{title:"Title",dataIndex:Zv.title,render:function(e,t){return Object(o.jsxs)(rt.a,dE({type:"link",onClick:function(){var e;return n.openAward(null!==(e=t.id)&&void 0!==e?e:re.default.Empty())}},{children:[e," "]}),void 0)}},{title:"Award Type",dataIndex:Zv.awardTypeId,render:function(e,t){var n,r;return(null===(n=t.awardType)||void 0===n?void 0:n.code)+" - "+(null===(r=t.awardType)||void 0===r?void 0:r.name)}},{title:"Actions",dataIndex:Zv.id,width:"15px",render:function(e,t,r){var i,a;return(null!==(a=null===(i=n.state.programModification.programModificationAwards)||void 0===i?void 0:i.length)&&void 0!==a?a:0)>0?Object(o.jsx)(rt.a,dE({type:"link",onClick:function(){var e;return n.removeAwardModal(null!==(e=t.id)&&void 0!==e?e:re.default.Empty())}},{children:Object(o.jsx)(Yd.a,{},void 0)}),void 0):null}}]},n.state={changeRequest:$a.create(),programModification:zv.create(),hasChildAwardTypes:!1},n}return sE(t,e),t.prototype.componentDidMount=function(){this.props.changeRequestId&&this.props.changeRequestId!=re.default.Empty()&&this.loadChangeRequest()},t.prototype.componentDidUpdate=function(e){this.props.changeRequestId&&this.props.changeRequestId!=re.default.Empty()&&e.changeRequestId!=this.props.changeRequestId&&this.loadChangeRequest(),this.props.loading!=e.loading&&this.setState({loading:this.props.loading})},t.prototype.renderActions=function(){return Object(o.jsxs)(y.b,dE({direction:"horizontal",wrap:!0},{children:[Object(o.jsx)(lm,{onClick:this.props.onPrevious},void 0),Object(o.jsx)(ss,{onClick:this.handleSubmit,submitting:this.state.submitting},void 0)]}),void 0)},t.prototype.renderPlannedAwards=function(){var e,t=this;return Object(o.jsxs)(y.b,dE({direction:"vertical"},{children:[Object(o.jsx)(Pi.a,{size:"small",dataSource:null!==(e=this.state.programModification.programModificationAwards)&&void 0!==e?e:[],pagination:!1,columns:this.getColumnDefinitionsForContactInformation()},void 0),this.state.hasChildAwardTypes?Object(o.jsx)(rt.a,dE({onClick:function(){return t.openAward("new")},icon:Object(o.jsx)(Xc.a,{},void 0)},{children:"Add Award"}),void 0):"",Object(o.jsx)(ot.a.Text,dE({strong:!0},{children:"Please review each award before continuing. Click on the title of the award to review."}),void 0)]}),void 0)},t}(a.Component),lE=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),uE=function(){return uE=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},uE.apply(this,arguments)},pE=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(e){n.setState({loading:!0});var t=[];e!==re.default.Empty()&&t.push(n.loadChangeRequest(e)),Promise.all(t).then((function(){n.setState({loading:!1})}))},n.loadChangeRequest=function(e){return va.getBaseChangeRequestDetails(e).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.goToPreviousStep=function(){T.push(x.generate(x.EXISTING_PROGRAM_MODIFICATION_CHANGE_REQUEST_ENTRY_1,{id:n.state.changeRequestId},{}))},n.goToNextStep=function(){n.state.changeRequest.changeRequestTypeId==Xa.TRANSFERMAJORPROGRAMMODIFICATION?T.push(x.generate(x.EXISTING_PROGRAM_MODIFICATION_CHANGE_REQUEST_ENTRY_6,{id:n.state.changeRequestId})):T.push(x.generate(x.EXISTING_PROGRAM_MODIFICATION_CHANGE_REQUEST_ENTRY_5,{id:n.state.changeRequestId}))},n.state={changeRequestId:re.default.Empty(),changeRequest:$a.create()},n}return lE(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");"new"==e?this.setState({isNew:!0}):e!==re.default.Empty()&&this.state.changeRequestId!=e&&(this.setState({changeRequestId:e}),this.fetchData(e))},t.prototype.render=function(){var e,t,n,r;return Object(o.jsx)(O.Content,{children:Object(o.jsx)(zg,uE({changeRequest:null!==(e=this.state.changeRequest)&&void 0!==e?e:$a.create(),stepNumber:1,currentUser:null!==(t=this.props.currentUser)&&void 0!==t?t:{}},{children:Object(o.jsx)(Qn.a,uE({title:"Award Details"},{children:Object(o.jsx)(cE,{changeRequestId:this.state.changeRequest.i
1d,selectedInstitution:null!==(r=null===(n=this.props.selectedInstitution)||void 0===n?void 0:n.id)&&void 0!==r?r:re.default.Empty(),loading:this.state.loading,onPrevious:this.goToPreviousStep,onSubmit:this.goToNextStep},void 0)}),void 0)}),void 0)},void 0)},t}(a.Component);var fE=Object(u.i)(Object(l.b)((function(e){return{selectedInstitution:e.Institution.Selected,currentUser:e.UserSession.Value}}),(function(){return{}}))(pE)),hE=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),vE=function(){return vE=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},vE.apply(this,arguments)},mE=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(e){n.setState({loading:!0});var t=[];e!==re.default.Empty()&&t.push(n.loadChangeRequest(e)),Promise.all(t).then((function(){n.setState({loading:!1})}))},n.loadChangeRequest=function(e){return va.getBaseChangeRequestDetails(e).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.programModificationSave=function(e){n.setState({isEditing:!1}),e!=n.state.awardId&&T.replace(x.generate(x.EXISTING_PROGRAM_MODIFICATION_CHANGE_REQUEST_ENTRY_4,{id:n.state.changeRequestId,awardId:e}))},n.goToPreviousStep=function(){T.push(x.generate(x.EXISTING_PROGRAM_MODIFICATION_CHANGE_REQUEST_ENTRY_2,{id:n.state.changeRequestId},{}))},n.goToNextStep=function(e){T.push(x.generate(x.EXISTING_PROGRAM_MODIFICATION_CHANGE_REQUEST_ENTRY_4,{id:n.state.changeRequestId,awardId:e}))},n.state={isAwardNew:!1,changeRequestId:re.default.Empty(),awardId:re.default.Empty(),changeRequest:$a.create()},n}return hE(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id"),t=Hr.getPathPart(this.props.match,"awardId");"new"==e?this.setState({isNew:!0}):e!==re.default.Empty()&&this.state.changeRequestId!=e&&(this.setState({changeRequestId:e}),this.fetchData(e))," new"==t?this.setState({isAwardNew:!0}):t!==re.default.Empty()&&this.state.awardId!=t&&this.setState({awardId:t})},t.prototype.render=function(){var e,t;return Object(o.jsx)(O.Content,{children:Object(o.jsx)(zg,vE({changeRequest:null!==(e=this.state.changeRequest)&&void 0!==e?e:$a.create(),awardId:this.state.awardId,stepNumber:2,currentUser:null!==(t=this.props.currentUser)&&void 0!==t?t:{}},{children:Object(o.jsx)(Qn.a,vE({title:"Award Details"},{children:Object(o.jsx)(nm,{changeRequestId:this.state.changeRequest.id,awardId:this.state.awardId,selectedInstitution:this.props.selectedInstitution?this.props.selectedInstitution.id:this.state.changeRequest.institutionId,loading:this.state.loading,onSave:this.programModificationSave,onPrevious:this.goToPreviousStep,onSubmit:this.goToNextStep},void 0)}),void 0)}),void 0)},void 0)},t}(a.Component);var gE=Object(u.i)(Object(l.b)((function(e){return{selectedInstitution:e.Institution.Selected,currentUser:e.UserSession.Value}}),(function(){return{}}))(mE)),bE=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),yE=function(){return yE=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},yE.apply(this,arguments)},OE=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(e){n.setState({loading:!0});var t=[];e!==re.default.Empty()&&t.push(n.loadChangeRequest(e)),Promise.all(t).then((function(){n.setState({loading:!1})}
1))},n.loadChangeRequest=function(e){return va.getBaseChangeRequestDetails(e).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.programModificationSave=function(){n.setState({isEditing:!1}),n.loadChangeRequest(n.state.changeRequestId)},n.goToPreviousStep=function(){T.push(x.generate(x.EXISTING_PROGRAM_MODIFICATION_CHANGE_REQUEST_ENTRY_3,{id:n.state.changeRequestId,awardId:n.state.awardId},{}))},n.goToNextStep=function(e){T.push(x.generate(x.EXISTING_PROGRAM_MODIFICATION_CHANGE_REQUEST_ENTRY_2,{id:e}))},n.state={isAwardNew:!1,changeRequestId:re.default.Empty(),awardId:re.default.Empty(),changeRequest:$a.create()},n}return bE(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id"),t=Hr.getPathPart(this.props.match,"awardId");"new"==e?this.setState({isNew:!0}):e!==re.default.Empty()&&this.state.changeRequestId!=e&&(this.setState({changeRequestId:e}),this.fetchData(e))," new"==t?this.setState({isAwardNew:!0}):t!==re.default.Empty()&&this.state.awardId!=t&&this.setState({awardId:t})},t.prototype.render=function(){var e,t;return this.state.loading||void 0==this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsx)(O.Content,{children:Object(o.jsx)(zg,yE({changeRequest:null!==(e=this.state.changeRequest)&&void 0!==e?e:$a.create(),awardId:this.state.awardId,stepNumber:3,currentUser:null!==(t=this.props.currentUser)&&void 0!==t?t:{}},{children:Object(o.jsx)(Qn.a,yE({title:"Term Details"},{children:Object(o.jsx)(fm,{changeRequestId:this.state.changeRequest.id,awardId:this.state.awardId,selectedInstitution:this.props.selectedInstitution?this.props.selectedInstitution.id:this.state.changeRequest.institutionId,loading:this.state.loading,onPrevious:this.goToPreviousStep,onSubmit:this.goToNextStep,onSave:this.programModificationSave},void 0)}),void 0)}),void 0)},void 0)},t}(a.Component);var jE=Object(u.i)(Object(l.b)((function(e){return{selectedInstitution:e.Institution.Selected,currentUser:e.UserSession.Value}}),(function(){return{}}))(OE)),IE=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),SE=function(){return SE=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},SE.apply(this,arguments)},EE=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(e){n.setState({loading:!0});var t=[];e!==re.default.Empty()&&t.push(n.loadChangeRequest(e)),Promise.all(t).then((function(){n.setState({loading:!1})}))},n.loadChangeRequest=function(e){return va.getBaseChangeRequestDetails(e).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.programModificationSave=function(){n.setState({isEditing:!1}),n.loadChangeRequest(n.state.changeRequestId)},n.goToNextStep=function(e){T.push(x.generate(x.EXISTING_PROGRAM_MODIFICATION_CHANGE_REQUEST_ENTRY_6,{id:e}))},n.goToPreviousStep=function(){T.push(x.generate(x.EXISTING_PROGRAM_MODIFICATION_CHANGE_REQUEST_ENTRY_2,{id:n.state.changeRequestId}))},n.state={changeRequestId:re.default.Empty(),changeRequest:$a.create()},n}return IE(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");"new"==e?this.setState({isNew:!0}):e!==re.default.Empty()&&this.state.changeRequestId!=e&&(this.setState({changeRequestId:e}),this.fetchData(e))},t.prototype.render=function(){var e,t,n,r;return Object(o.jsx)(O.Content,{children:Object(o.jsx)(zg,SE({changeRequest:null!==(e=this.state.changeRequest)&&void 0!==e?e:$a.create(),stepNumber:4,currentUser:null!==(t=this.props.currentUser)&&void 0!==t?t:{}},{children:Object(o.jsx)(Qn.a,SE({title:"Advisory Board and Curriculum Committee"},{children:Object(o.jsx)(ym,{changeRequestId:this.state.changeRequest.i
1d,selectedInstitution:null!==(r=null===(n=this.props.selectedInstitution)||void 0===n?void 0:n.id)&&void 0!==r?r:re.default.Empty(),loading:this.state.loading,onPrevious:this.goToPreviousStep,onSubmit:this.goToNextStep,onSave:this.programModificationSave},void 0)}),void 0)}),void 0)},void 0)},t}(a.Component);var RE=Object(u.i)(Object(l.b)((function(e){return{selectedInstitution:e.Institution.Selected,currentUser:e.UserSession.Value}}),(function(){return{}}))(EE)),_E=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),TE=function(){return TE=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},TE.apply(this,arguments)},CE=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(e){n.setState({loading:!0});var t=[];e!==re.default.Empty()&&t.push(n.loadChangeRequest(e)),Promise.all(t).then((function(){n.setState({loading:!1})}))},n.loadChangeRequest=function(e){return va.getBaseChangeRequestDetails(e).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.goToNextStep=function(){T.push(x.generate(x.EXISTING_PROGRAM_MODIFICATION_CHANGE_REQUEST_ENTRY_REVIEW,{id:n.state.changeRequestId}))},n.goToPreviousStep=function(){n.state.changeRequest.changeRequestTypeId==Xa.TRANSFERMAJORPROGRAMMODIFICATION?T.push(x.generate(x.EXISTING_PROGRAM_MODIFICATION_CHANGE_REQUEST_ENTRY_2,{id:n.state.changeRequestId})):T.push(x.generate(x.EXISTING_PROGRAM_MODIFICATION_CHANGE_REQUEST_ENTRY_5,{id:n.state.changeRequestId}))},n.state={changeRequestId:re.default.Empty(),changeRequest:$a.create()},n}return _E(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");"new"==e?this.setState({isNew:!0}):e!==re.default.Empty()&&this.state.changeRequestId!=e&&(this.setState({changeRequestId:e}),this.fetchData(e))},t.prototype.render=function(){var e,t;return Object(o.jsx)(O.Content,{children:Object(o.jsx)(zg,TE({changeRequest:null!==(e=this.state.changeRequest)&&void 0!==e?e:$a.create(),stepNumber:this.state.changeRequest.changeRequestTypeId===Xa.TRANSFERMAJORPROGRAMMODIFICATION?4:5,currentUser:null!==(t=this.props.currentUser)&&void 0!==t?t:{}},{children:Object(o.jsx)(Qn.a,TE({title:"Additional Information"},{children:Object(o.jsx)(gs,{changeRequest:this.state.changeRequest,onSubmit:this.goToNextStep,loading:this.state.loading,onPrevious:this.goToPreviousStep},void 0)}),void 0)}),void 0)},void 0)},t}(a.Component);var xE=Object(u.i)(Object(l.b)((function(e){return{selectedInstitution:e.Institution.Selected,currentUser:e.UserSession.Value}}),(function(){return{}}))(CE)),AE=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),PE=function(){return PE=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},PE.apply(this,arguments)},NE=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(e){n.setState({loading:!0});var t=[];e!==re.default.Empty()&&t.push(n.loadChangeRequest(e)),Promise.all(t).then((function(){n.setState({loading:!1})}))},n.loadChangeRequest=function(e){var t=Jg({changeRequestId:e});return va.getAdditionalDetails(t).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create(),fieldErrors:e.fieldErrors})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.goToNextStep=function(){T.push(x.generate(x.EXISTING_PROGRAM_MODIFICATION_CHANGE_REQUEST_ENTRY_SUBMITTED,{id:n.state.changeRequestId}))},n.goToPreviousStep=function(){T.push(x.generate(x.EXISTING_PROGRAM_MODIFICATION_CHANGE_REQUEST_ENTRY_6,{id:n.state.changeRequestId}))},n.onIsValidHandler=function(e){n.setState({isValid:e})},n.state={changeRequestId:re.default.Empty(),changeRequest:$a.create(),isValid:!1},n}return AE(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");"new"==e?this.setState({isNew:!0}):e!==re.default.Empty()&&this.state.changeRequestId!=e&&(this.setState({changeRequestId:e}),this.fetchData(e))},t.prototype.render=function(){var e,t;return Object(o.jsx)(O.Content,{children:Object(o.jsx)(zg,PE({changeRequest:null!==(e=this.state.changeRequest)&&void 0!==e?e:$a.create(),stepNumber:this.state.changeRequest.changeRequestTypeId===Xa.TRANSFERMAJORPROGRAMMODIFICATION?5:6,currentUser:null!==(t=this.props.currentUser)&&void 0!==t?t:{}},{children:Object(o.jsx)(Qn.a,PE({title:"Review"},{children:Object(o.jsxs)(y.b,PE({direction:"vertical"},{children:[Object(o.jsx)(Im,{changeRequest:this.state.changeRequest,loading:this.state.loading,fieldErrors:this.state.fieldErrors,onIsValid:this.onIsValidHandler},void 0),Object(o.jsx)(Xg,{isValid:this.state.isValid,changeRequest:this.state.changeRequest,onSubmit:this.goToNextStep,onPrevious:this.goToPreviousStep},void 0)]}),void 0)}),void 0)}),void 0)},void 0)},t}(a.Component);var wE=Object(u.i)(Object(l.b)((function(e){return{selectedInstitution:e.Institution.Selected,currentUser:e.UserSession.Value}}),(function(){return{}}))(NE)),DE=function(e){return Object.assign({changeRequestId:"00000000-0000-0000-0000-000000000000"},e)},qE=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),FE=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(e){n.setState({loading:!0});var t=[];e!==re.default.Empty()&&t.push(n.loadChangeRequest(e)),Promise.all(t).then((function(){n.setState({loading:!1})}
1))},n.loadChangeRequest=function(e){var t=DE({changeRequestId:e});return Dv.get(t).then((function(e){var t;e&&n.setState({changeRequest:null!==(t=e.changeRequest)&&void 0!==t?t:$a.create()})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.goToPreviousStep=function(){T.push(x.generate(x.EXISTING_PROGRAM_MODIFICATION_CHANGE_REQUEST_ENTRY_REVIEW,{id:n.state.changeRequestId},{}))},n.submit=function(){T.push(x.generate(x.EXISTING_PROGRAM_MODIFICATION_CHANGE_REQUEST_ENTRY_SUBMITTED,{id:n.state.changeRequestId},{}))},n.state={changeRequestId:re.default.Empty(),changeRequest:$a.create(),progress:0},n}return qE(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");e!==re.default.Empty()&&this.state.changeRequestId!=e&&(this.setState({changeRequestId:e}),this.fetchData(e))},t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{breadcrumbs:Xn.changeRequestList()},void 0),Object(o.jsx)(Qn.a,{children:Object(o.jsx)(bb,{},void 0)},void 0)]},void 0)},t}(a.Component);var ME=Object(u.i)(Object(l.b)((function(e){return{selectedInstitution:e.Institution.Selected}}))(FE)),YE=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),UE=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return YE(t,e),t.prototype.getChangeRequestTableData=function(e){var t="api/changeRequestsApprovalWorkFlow/list";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getChangeRequestApprovalWorkflowDetailsHandler=function(e){var t="api/changeRequestsApprovalWorkFlow/"+e;return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.getChangeRequestApprovalFlowDataTableExport=function(e){var t="api/changeRequestsApprovalWorkFlow/export";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.saveChangeRequestApprovalWorkflowDetailsHandler=function(e){var t="api/changeRequestsApprovalWorkFlow/save";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.exportChangeRequestApprovalWorkFlows=function(){var e="api/changeRequestsApprovalWorkFlow/changeRequestApprovalWorkFlowReport";return e=e.replace(/null|undefined/gi,""),this.SendRequest(null,"get",e,!0,!1)},t}(U),LE=new UE,kE=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),GE=function(e){function t(t){var n=e.call(this,t)||this;return n.getColumnDefinitions=function(){return[{title:"Title",dataIndex:li.name,sorter:!0,filterType:wr.Text},{title:"Days Valid",dataIndex:li.daysValid,sorter:!0,filterType:wr.Text},{title:"Cutoff Window",dataIndex:li.cutoffWindow,sorter:!0,filterType:wr.Text}]},n.openWorkflow=function(e){e.id&&T.push(x.generate(x.CHANGE_REQUEST_TYPE_DETAILS,{id:e.id},{}))},n.changeRequestApprovalWorkFlowExport=function(){window.open(x.generateFull(x.CHANGE_REQUEST_APPROVAL_FLOW_REPORT,{},{}),"_blank")},n.state={},n}return kE(t,e),t.prototype.render=function(){var e=this,t=[];return t.push(oo.Reset()),t.push(oo.Default("Export",this.changeRequestApprovalWorkFlowExport)),Object(o.jsx)(o.Fragment,{children:Object(o.jsx)(io,{ref:function(t){return e._dataTable=t},onRowClick:this.openWorkflow,serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:t,columns:this.getColumnDefinitions(),fetchData:{fetch:function(e){return LE.getChangeRequestTableData(e)}},stateSaving:{enabled:!0,tableUniqueKey:"ChangeRequestTypeApprovalFlow_list"}},void 0)},void 0)},t}(a.Component),VE=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),BE=function(e){function t(t){var n=e.call(this,t)||this;return n.goToConfig=function(){T.goBack()},n}return VE(t,e),t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Change Request Approval Flows",onBack:this.goToConfig,breadcrumbs:Xn.changeRequestTypes()},void 0),Object(o.jsx)(Qn.a,{children:Object(o.jsx)(GE,{},void 0)},void 0)]},void 0)},t}(a.Component),WE=Object(u.i)(BE),zE=function(e){return Object.assign({changeRequestTypeApprovalFlow:null},e)},HE={className:"ChangeRequestTypeApprovalFlowDTO",create:function(e){return Object.assign(Q.create(),{changeRequestTypeId:0,changeRequestType:null,name:"",changeRequestTypeApprovalFlowSteps:[]},e)},changeRequestTypeId:"changeRequestTypeId",changeRequestType:"changeRequestType",name:"name",changeRequestTypeApprovalFlowSteps:"changeRequestTypeApprovalFlowSteps"},QE={className:"ChangeRequestTypeApprovalFlowStepApprovalRoleDTO",create:function(e){return Object.assign(Q.create(),{changeRequestTypeId:0,stepNumber:0,roleId:"00000000-0000-0000-0000-000000000000",role:null,required:!1,requiredAll:!1,matchCipNumber:!1,daysToReview:null,changeRequestTypeApprovalFlowStep:null},e)},changeRequestTypeId:"changeRequestTypeId",stepNumber:"stepNumber",roleId:"roleId",role:"role",required:"required",requiredAll:"requiredAll",matchCipNumber:"matchCipNumber",daysToReview:"daysToReview",changeRequestTypeApprovalFlowStep:"changeRequestTypeApprovalFlowStep"},KE={className:"ChangeRequestTypeApprovalFlowStepDTO",create:function(e){return Object.assign(Q.create(),{changeRequestTypeId:0,stepNumber:0,changeRequestApprovalFlow:null,requireAll:!1,
1changeRequestTypeApprovalFlowStepApprovalRoles:[]},e)},changeRequestTypeId:"changeRequestTypeId",stepNumber:"stepNumber",changeRequestApprovalFlow:"changeRequestApprovalFlow",requireAll:"requireAll",changeRequestTypeApprovalFlowStepApprovalRoles:"changeRequestTypeApprovalFlowStepApprovalRoles"},XE=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),JE=function(){return JE=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},JE.apply(this,arguments)},$E=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n.getWorkflowFormItems=function(e){return(new Map).set(KE.stepNumber,{required:!0,label:"Step",name:[e,KE.stepNumber],rules:[Ot.required()]}).set(KE.requireAll,{required:!0,label:"Require All Users",name:[e,KE.requireAll],rules:[Ot.required()]}).set(QE.roleId,{required:!0,name:[e,QE.roleId],rules:[Ot.required()]}).set(QE.requiredAll,{required:!0,name:[e,QE.requiredAll],rules:[Ot.required()]}).set(QE.required,{required:!0,name:[e,QE.required],rules:[Ot.required()]}).set(QE.matchCipNumber,{required:!0,name:[e,QE.matchCipNumber],rules:[Ot.required()]}).set(QE.daysToReview,{name:[e,QE.daysToReview]})},n.getColumnDefinitionsForWorkflow=function(e,t){return[{title:"Role",dataIndex:QE.roleId,render:function(e,r,i){return Object(o.jsx)(mt.a,JE({},n.getWorkflowFormItems(i).get(QE.roleId),_t.getValidation(QE.roleId+t+i,n.state.fieldErrors,n.state.submitted),{children:Object(o.jsx)(pr.a,JE({allowClear:!0,dropdownMatchSelectWidth:!1,disabled:!n.props.isEditing||n.state.loading||n.state.submitting},{children:n.state.roles.map((function(e){return n.renderRoleOption(e)}))}),void 0)}),void 0)}},{title:"Required",dataIndex:QE.required,render:function(e,r,i){return Object(o.jsx)(mt.a,JE({},n.getWorkflowFormItems(i).get(QE.required),_t.getValidation(QE.required+t+i,n.state.fieldErrors,n.state.submitted),{children:Object(o.jsx)(Hd,{disabled:!n.props.isEditing||n.state.loading||n.state.submitting},void 0)}),void 0)}},{title:"Require All Users",dataIndex:QE.requiredAll,render:function(e,r,i){return Object(o.jsx)(mt.a,JE({},n.getWorkflowFormItems(i).get(QE.requiredAll),_t.getValidation(QE.requiredAll+t+i,n.state.fieldErrors,n.state.submitted),{children:Object(o.jsx)(Hd,{disabled:!n.props.isEditing||n.state.loading||n.state.submitting},void 0)}),void 0)}},{title:"Match CIP Number",dataIndex:QE.matchCipNumber,render:function(e,r,i){return Object(o.jsx)(mt.a,JE({},n.getWorkflowFormItems(i).get(QE.matchCipNumber),_t.getValidation(QE.matchCipNumber+t+i,n.state.fieldErrors,n.state.submitted),{children:Object(o.jsx)(Hd,{disabled:!n.props.isEditing||n.state.loading||n.state.submitting},void 0)}),void 0)}},{title:"Days To Review",dataIndex:QE.daysToReview,render:function(e,r,i){return Object(o.jsx)(mt.a,JE({},n.getWorkflowFormItems(i).get(QE.daysToReview),_t.getValidation(QE.daysToReview+t+i,n.state.fieldErrors,n.state.submitted),{children:Object(o.jsx)(Ni.a,{min:1,disabled:!n.props.isEditing||n.state.loading||n.state.submitting},void 0)}),void 0)}},{dataIndex:QE.changeRequestTypeId,render:function(r,i,a){var s,d,c;if(n.props.isEditing&&!n.state.loading)return(null===(c=null===(d=null===(s=n._formRef.current)||void 0===s?void 0:s.getFieldValue(HE.changeRequestTypeApprovalFlowSteps)[t])||void 0===d?void 0:d.changeRequestTypeApprovalFlowStepApprovalRoles)||void 0===c?void 0:c.length)<=1?null:Object(o.jsx)(rt.a,{type:"link",icon:Object(o.jsx)(Yd.a,{},void 0),onClick:function(){return e(a)},disabled:!n.props.isEditing||n.state.loading||n.state.submitting},void 0)}}]},n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields(),n.setState({altered:!1})},n.fetchData=function(){n.setState({loading:!0});var e=[];0==n.state.roles.length&&e.push(n.loadRoles()),0!=n.props.changeRequestTypeApprovalFlowId&&e.push(n.loadExisting(
1)),Promise.all(e).then((function(){n.setState({loading:!1})}))},n.loadRoles=function(){return ce.getAll(mr.className).then((function(e){e&&n.setState({roles:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadExisting=function(){return LE.getChangeRequestApprovalWorkflowDetailsHandler(n.props.changeRequestTypeApprovalFlowId).then((function(e){e.changeRequestApprovalWorkflow&&n.setState({workflow:e.changeRequestApprovalWorkflow})})).catch((function(){n.setState({error:!0})}))},n.handleChange=function(){n.setState({altered:!0})},n.handleSubmit=function(){n.setState({submitting:!0});var e=HE.create(n._formRef?n._formRef.current.getFieldsValue():null);e.changeRequestTypeId=n.props.changeRequestTypeApprovalFlowId;var t=zE({changeRequestTypeApprovalFlow:e});LE.saveChangeRequestApprovalWorkflowDetailsHandler(t).then((function(e){var t,r,i,o,a;n.setState({submitted:!0}),(null===e||void 0===e?void 0:e.succeeded)?(n.setState({workflow:null!==(t=e.changeRequestTypeApprovalFlow)&&void 0!==t?t:HE.create(),submitted:!1,error:!e.succeeded}),null===(i=null===(r=n._formRef)||void 0===r?void 0:r.current)||void 0===i||i.setFieldsValue(e.changeRequestTypeApprovalFlow),S.b.success("Saved"),n.props.onSave&&(n.resetForm(),n.props.onSave(null!==(a=null===(o=e.changeRequestTypeApprovalFlow)||void 0===o?void 0:o.changeRequestTypeId)&&void 0!==a?a:0))):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Error Saving"))})).catch((function(e){n.setState({error:e}),S.b.error("Error Saving")})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.state={workflow:HE.create(),roles:[]},n}return XE(t,e),t.prototype.componentDidMount=function(){this.fetchData(),this.resetForm()},t.prototype.componentDidUpdate=function(e){this.props.changeRequestTypeApprovalFlowId&&this.props.changeRequestTypeApprovalFlowId!=e.changeRequestTypeApprovalFlowId&&(this.fetchData(),this.resetForm())},t.prototype.handleRemoveStep=function(e,t){var n;t(e);var r=this._formRef?this._formRef.current:null,i=this._formRef?null===(n=this._formRef.current)||void 0===n?void 0:n.getFieldValue(HE.changeRequestTypeApprovalFlowSteps):null;if(i){for(var o=e;o<i.length;o++)i[o].stepNumber-=1;null===r||void 0===r||r.setFieldsValue({changeRequestTypeApprovalFlowSteps:i})}},t.prototype.render=function(){var e=this;return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(y.b,JE({size:"small",direction:"vertical"},{children:[Object(o.jsx)(zr,{when:this.state.altered},void 0),this.renderErrors(),Object(o.jsx)(ht.a,JE({ref:this._formRef,layout:"vertical",initialValues:this.state.workflow,onValuesChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!0},{children:Object(o.jsxs)(y.b,JE({size:"small",direction:"vertical"},{children:[Object(o.jsx)(ht.a.List,JE({name:HE.changeRequestTypeApprovalFlowSteps},{children:function(t,n){var r=n.add,i=n.remove;return Object(o.jsxs)(y.b,JE({direction:"vertical"},{children:[t.map((function(t,n){if(t)return e.renderStep(t,n,i)})),e.renderAdditionalStep(r)]}),void 0)}}),void 0),this.renderSave()]}),void 0)}),void 0)]}),void 0)},t.prototype.renderRoleOption=function(e){if(e.id)return Object(o.jsx)(pr.a.Option,JE({value:e.id},{children:e.name}),e.id)},t.prototype.renderStep=function(e,t,n){var r,i,a=this,s="Step "+(t+1),d=this.props.isEditing?Object(o.jsx)(rt.a,{type:"link",icon:Object(o.jsx)(Yd.a,{},void 0),onClick:function(){return a.handleRemoveStep(t,n)},disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0):null,c=this._formRef?null===(r=this._formRef.current)||void 0===r?void 0:r.getFieldValue(HE.changeRequestTypeApprovalFlowSteps):null,l=c?c.length:null===(i=this.state.workflow.changeRequestTypeApprovalFlowSteps)||void 0===i?void 0:i.length;return Object(o.jsxs)(Qn.a,JE({type:"inner",title:s,extra:d},{children:[Object(o.jsxs)(b.a,JE({gutter:[16,16]},{children:[Object(o.jsx)(m.a,JE({},En.ONE_QUARTER,{children:Object(o.jsx)(mt.a,JE({},this.getWorkflowFormItems(t).get(KE.stepNumber),_t.getValidation(KE.stepNumber+t,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(Ni.a,{min:1,max:l,disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0)}),void 0),Object(o.jsx)(m.a,JE({},En.ONE_QUARTER,{children:Object(o.jsx)(mt.a,JE({},this.getWorkflowFormItems(t).get(KE.requireAll),_t.getValidation(KE.requireAll+t,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(H
1d,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0)}),void 0)]}),void 0),Object(o.jsx)(ht.a.List,JE({name:[t,KE.changeRequestTypeApprovalFlowStepApprovalRoles]},{children:function(e,n){var r=n.add,i=n.remove;return Object(o.jsxs)(y.b,JE({direction:"vertical"},{children:[a.renderRoles(e,t,i),a.renderAdditionalRole(r)]}),void 0)}}),void 0)]}),void 0)},t.prototype.renderRoles=function(e,t,n){return Object(o.jsx)(Pi.a,{columns:this.getColumnDefinitionsForWorkflow(n,t),dataSource:e,pagination:!1},void 0)},t.prototype.renderSave=function(){if(this.props.isEditing)return Object(o.jsx)(Ze,JE({validFeatureFlags:[gn.EDIT_COURSE]},{children:Object(o.jsxs)(y.b,JE({direction:"horizontal"},{children:[Object(o.jsx)(Tr,{disabled:!this.state.altered,saving:this.state.submitting},void 0),Object(o.jsx)(Ir,{disabled:!this.state.altered||this.state.submitting,onConfirm:this.resetForm},void 0)]}),void 0)}),void 0)},t.prototype.renderAdditionalStep=function(e){var t;if(this.props.isEditing&&!this.state.loading){var n=this._formRef?null===(t=this._formRef.current)||void 0===t?void 0:t.getFieldValue(HE.changeRequestTypeApprovalFlowSteps):null,r=1;return n&&n.length>0&&(r=Number.parseInt(n[n.length-1].stepNumber)+1),Object(o.jsx)(rt.a,JE({onClick:function(){return e(KE.create({stepNumber:r,requireAll:null,changeRequestTypeApprovalFlowStepApprovalRoles:[QE.create({roleId:null,required:null,requiredAll:null,matchCipNumber:null,daysToReview:null})]}))},icon:Object(o.jsx)(Xc.a,{},void 0)},{children:"Add Additional Approval Step"}),void 0)}},t.prototype.renderAdditionalRole=function(e){if(this.props.isEditing&&!this.state.loading)return Object(o.jsx)(rt.a,JE({onClick:function(){return e(QE.create({roleId:null,required:null,requiredAll:null,matchCipNumber:null,daysToReview:null}))},icon:Object(o.jsx)(Xc.a,{},void 0)},{children:"Add Additional Approval Role"}),void 0)},t.prototype.renderErrors=function(){if(this.state.error)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t}(a.Component),ZE=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),eR=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ZE(t,e),t.prototype.getDetails=function(e){var t="api/changeRequestType/"+e;return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"get",t,!0,!1)},t.prototype.save=function(e){var t="api/changeRequestType/save";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t}(U),tR=new eR,nR=function(e){return Object.assign({changeRequestTypeId:0,changeRequestType:null},e)},rR=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),iR=function(){return iR=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},iR.apply(this,arguments)},oR=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n.getFormItems=function(){return(new Map).set(li.name,{label:"Name",name:li.name}).set(li.code,{label:"Code",name:li.code}).set(li.daysValid,{label:"Days Valid",name:li.daysValid}).set(li.cutoffWindow,{required:!0,label:"Cutoff Window",extra:"Minimum number of days before the start a term that a submission may be submitted.",name:li.cutoffWindow,rules:[Ot.required()]})},n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields(),n.setState({altered:!1})},n.fetchData=function(){n.setState({loading:!0}),tR.getDetails(n.props.changeRequestTypeId).then((function(e){var t;n.setState({changeRequestType:null!==(t=e.changeRequestType)&&void 0!==t?t:li.create()}),n.resetForm()})).catch((function(){n.setState({error:!0})}
1)).finally((function(){n.setState({loading:!1})}))},n.handleChange=function(){n.setState({altered:!0})},n.handleSubmit=function(){n.setState({submitting:!0});var e=li.create(n._formRef?n._formRef.current.getFieldsValue():null),t=nR({changeRequestType:e,changeRequestTypeId:n.props.changeRequestTypeId});tR.save(t).then((function(e){var t,r,i;n.setState({submitted:!0}),(null===e||void 0===e?void 0:e.succeeded)?(n.setState({changeRequestType:null!==(t=e.changeRequestType)&&void 0!==t?t:li.create(),submitted:!1,error:!1}),null===(i=null===(r=n._formRef)||void 0===r?void 0:r.current)||void 0===i||i.setFieldsValue(e.changeRequestType),ce.invalidateCache(li.className),n.props.onSave&&(n.resetForm(),n.props.onSave()),S.b.success("Saved")):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Error Saving"))})).catch((function(e){n.setState({error:e}),S.b.error("Error Saving")})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.state={changeRequestType:li.create()},n}return rR(t,e),t.prototype.componentDidMount=function(){this.fetchData()},t.prototype.componentDidUpdate=function(e){this.props.changeRequestTypeId!=e.changeRequestTypeId&&this.fetchData()},t.prototype.render=function(){return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(y.b,iR({size:"small",direction:"vertical"},{children:[this.renderErrors(),Object(o.jsxs)(Ci.a,iR({ref:this._formRef,layout:"vertical",initialValues:this.state.changeRequestType,onValuesChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!0},{children:[Object(o.jsx)(Ci.a.Item,iR({},this.getFormItems().get(li.name),{children:Object(o.jsx)(ud,{},void 0)}),void 0),Object(o.jsx)(Ci.a.Item,iR({},this.getFormItems().get(li.code),{children:Object(o.jsx)(ud,{},void 0)}),void 0),Object(o.jsx)(Ci.a.Item,iR({},this.getFormItems().get(li.daysValid),{children:Object(o.jsx)(Ni.a,{min:1,disabled:!this.props.isEditing},void 0)}),void 0),Object(o.jsx)(Ci.a.Item,iR({},this.getFormItems().get(li.cutoffWindow),{children:Object(o.jsx)(Ni.a,{min:0,disabled:!this.props.isEditing},void 0)}),void 0),this.renderSave()]}),void 0)]}),void 0)},t.prototype.renderSave=function(){if(this.props.isEditing)return Object(o.jsx)(Ze,iR({validFeatureFlags:[gn.EDIT_WORKFLOW]},{children:Object(o.jsxs)(y.b,iR({direction:"horizontal"},{children:[Object(o.jsx)(Tr,{saving:this.state.saving},void 0),Object(o.jsx)(Ir,{onConfirm:this.resetForm,disabled:!this.state.altered},void 0)]}),void 0)}),void 0)},t.prototype.renderErrors=function(){if(this.state.error&&this.state.submitted)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t}(a.Component),aR=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),sR=function(){return sR=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},sR.apply(this,arguments)},dR=function(e){function t(t){var n=e.call(this,t)||this;n._changeRequestApprovalWorkflowDetailsRef=a.createRef(),n._changeRequestTypeDetailsRef=a.createRef(),n.loadChangeRequestApprovalWorkflow=function(e){LE.getChangeRequestApprovalWorkflowDetailsHandler(e).then((function(e){e.changeRequestApprovalWorkflow&&n.setState({changeRequestApprovalWorkflow:e.changeRequestApprovalWorkflow,changeRequestTypeId:e.changeRequestApprovalWorkflow.changeRequestTypeId})})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))},n.toggleEdit=function(e){var t,r,i=n.state.editings;(null===i||void 0===i?void 0:i.get(e))&&"approval_flow"==e?null===(t=n._changeRequestApprovalWorkflowDetailsRef.current)||void 0===t||t.resetForm():(null===i||void 0===i?void 0:i.get(e))&&"details"==e&&(null===(r=n._changeRequestTypeDetailsRef.current)||void 0===r||r.resetForm()),null===i||void 0===i||i.set(e,!i.get(e)),n.setState({editings:i})},n.changeRequestApprovalWorkflowSave=function(e){var t=n.state.editings;null===t||void 0===t||t.set("approval_flow",!t.get("approval_flow")),n.setState({editings:t}),n.loadChangeRequestApprovalWorkflow(e)},n.changeRequestDetailsSave=function(){var e=n.state.editings;null===e||void 0===e||e.set("details",!e.get("details")),n.setState({editings:e})},n.goToChangeRequestApprovalWorkflow=function(){T.goBack()},n.changeTab=function(e){n.setState({activeTab:e}),T.replace(x.generate("",{},{activeTab:e}),{activeTab:e})};var r=new Map;return r.set("details",!1),r.set("approval_flow",!1),n.state={activeTab:"details",editings:r,changeRequestTypeId:0,changeRequestApprovalWorkflow:HE.create()},n}return aR(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id"),t=Hr.getParameter("activeTab","details");this.setState({activeTab:t}),"new"==e?this.setState({isEditing:!0,isNew:!0,loading:!1}):this.loadChangeRequestApprovalWorkflow(Number.parseInt(e))},t.prototype.render=function(){var e,t,n,r,i=this.state.loading?"...":0==this.state.changeRequestTypeId?"New Change Request Approval Workflow":null!==(t=null===(e=this.state.changeRequestApprovalWorkflow.
1changeRequestType)||void 0===e?void 0:e.name)&&void 0!==t?t:"...",a=this.state.loading?"...":0==this.state.changeRequestTypeId?"New":null!==(r=null===(n=this.state.changeRequestApprovalWorkflow.changeRequestType)||void 0===n?void 0:n.name)&&void 0!==r?r:"...";return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:i,onBack:this.goToChangeRequestApprovalWorkflow,breadcrumbs:Xn.changeRequestTypeDetails(a,this.state.changeRequestTypeId),footer:Object(o.jsxs)(pa.a,sR({activeKey:this.state.activeTab,onChange:this.changeTab},{children:[Object(o.jsx)(pa.a.TabPane,{tab:"Details"},"details"),Object(o.jsx)(pa.a.TabPane,{tab:"Approval Flow"},"approval_flow")]}),"content")},void 0),Object(o.jsx)(zr,{when:this.state.isEditing},void 0),this.renderDetailsCard(),this.renderApprovalFlowCard()]},void 0)},t.prototype.renderApprovalFlowCard=function(){var e,t,n=this;if("approval_flow"===this.state.activeTab){var r=0==this.state.changeRequestTypeId?null:Object(o.jsx)(Ze,sR({validFeatureFlags:[gn.EDIT_WORKFLOW]},{children:Object(o.jsx)(Br,{isEditing:null===(e=this.state.editings)||void 0===e?void 0:e.get("approval_flow"),onClick:function(){return n.toggleEdit("approval_flow")}},void 0)}),void 0);
1return Object(o.jsx)(Qn.a,sR({title:"Approval Flow",extra:r},{children:Object(o.jsx)($E,{ref:this._changeRequestApprovalWorkflowDetailsRef,changeRequestTypeApprovalFlowId:this.state.changeRequestTypeId,isEditing:null===(t=this.state.editings)||void 0===t?void 0:t.get("approval_flow"),onSave:this.changeRequestApprovalWorkflowSave},void 0)}),void 0)}},t.prototype.renderDetailsCard=function(){var e,t,n=this;if("details"===this.state.activeTab){var r=0==this.state.changeRequestTypeId?null:Object(o.jsx)(Ze,sR({validFeatureFlags:[gn.EDIT_WORKFLOW]},{children:Object(o.jsx)(Br,{isEditing:null===(e=this.state.editings)||void 0===e?void 0:e.get("details"),onClick:function(){return n.toggleEdit("details")}},void 0)}),void 0);return Object(o.jsx)(Qn.a,sR({title:"Details",extra:r},{children:Object(o.jsx)(oR,{ref:this._changeRequestTypeDetailsRef,onSave:this.changeRequestDetailsSave,changeRequestTypeId:this.state.changeRequestTypeId,isEditing:null===(t=this.state.editings)||void 0===t?void 0:t.get("details")},void 0)}),void 0)}},t}(a.Component),cR=Object(u.i)(dR),lR={className:"LoginDTO",create:function(e){return Object.assign({},e)}},uR=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),pR=function(){return pR=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},pR.apply(this,arguments)},fR=function(e){function t(t){var n=e.call(this,t)||this;return n.componentDidMount=function(){var e=Hr.getParameter("activeTab","system");n.setState({activeTab:e})},n.changeTab=function(e){n.setState({activeTab:e}),T.replace(x.generate("",{},{activeTab:e}),{activeTab:e})},n.state={model:lR.create(),activeTab:"system"},n}return uR(t,e),t.prototype.render=function(){return Object(o.jsxs)(Qn.a,{children:[Object(o.jsx)(rr,{title:"Configuration",breadcrumbs:Xn.configuration(),footer:Object(o.jsxs)(pa.a,pR({activeKey:this.state.activeTab,onChange:this.changeTab},{children:[Object(o.jsx)(pa.a.TabPane,{tab:"System"},"system"),Object(o.jsx)(pa.a.TabPane,{tab:"Secondary"},"secondary"),Object(o.jsx)(pa.a.TabPane,{tab:"Post-Secondary"},"postSecondary")]}),void 0)},void 0),this.renderSystemSection(),this.renderSecondary(),this.renderPostSecondary(),Object(o.jsx)(y.b,{size:"small",direction:"vertical"},void 0)]},void 0)},t.prototype.renderSecondary=function(){if("secondary"==this.state.activeTab)return Object(o.jsxs)(Kn.b,pR({title:"Secondary"},{children:[Object(o.jsx)(Ze,pR({validFeatureFlags:[gn.EDIT_REGIONAL_PLANNING_PARTNER]},{children:Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(at.a,pR({to:x.generate(x.REGIONAL_PLANNING_PARTNERS,{},{configuration:!0})},{children:"Region"}),void 0)},void 0)}),void 0),Object(o.jsx)(Ze,pR({validFeatureFlags:[gn.CONFIG_ACADEMIC_YEAR]},{children:Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(at.a,pR({to:x.generate(x.SECONDARY_CIP_NUMBERS_CONFIGURATION)},{children:"CIP Number"}),void 0)},void 0)}),void 0),Object(o.jsx)(Ze,pR({validFeatureFlags:[gn.CONFIG_ACADEMIC_YEAR]},{children:Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(at.a,pR({to:x.generate(x.SCENARIO_CONFIGURATION)},{children:"Scenario"}),void 0)},void 0)}),void 0),Object(o.jsx)(Ze,pR({validFeatureFlags:[gn.CONFIG_ACADEMIC_YEAR]},{children:Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(at.a,pR({to:x.generate(x.FEDERAL_CLUSTERS_CONFIGURATION)},{children:"Federal Cluster"}),void 0)},void 0)}),void 0),Object(o.jsx)(Ze,pR({validFeatureFlags:[gn.CONFIG_ACADEMIC_YEAR]},{children:Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(at.a,pR({to:x.generate(x.SERVICE_AREA_CONFIGURATION)},{children:"Service Area"}),void 0)},void 0)}),void 0),Object(o.jsx)(Ze,pR({validFeatureFlags:[gn.CONFIG_ACADEMIC_YEAR]},{children:Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(at.a,pR({to:x.generate(x.AREA_EDUCATION_AGENCIES_CONFIGURATION)},{children:"Area Education Agency"}),void 0)},void 0)}),void 0)]}),void 0)},t.prototype.renderSystemSection=function(){if("system"==this.state.activeTab)return Object(o.jsxs)(Kn.b,pR({title:"System"},{children:[Object(o.jsx)(Ze,pR({validFeatureFlags:[gn.VIEW_GENDER,gn.EDIT_GENDER]},{children:Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(at.a,pR({to:x.generate(x.GENDER)},{children:"Genders"}),void 0)},void 0)}),void 0),Object(o.jsx)(Ze,pR({validFeatureFlags:[gn.VIEW_ROLE,gn.EDIT_ROLE]},{children:Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(at.a,pR({to:x.generate(x.ROLES)},{children:"Roles"}),void 0)},void 0)}),void 0),Object(o.jsx)(Ze,pR({validFeatureFlags:[gn.VIEW_RACIAL_EHTNIC_GROUPS,gn.EDIT_RACIAL_EHTNIC_GROUPS]},{children:Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(at.a,pR({to:x.generate(x.RACIAL_ETHNIC_GROUPS)},{children:"Racial/Ethnic Groups"}),void 0)},void 0)}),void 0),Object(o.jsx)(Ze,pR({validFeatureFlags:[gn.VIEW_THIRD_PARTY_CREDENTIAL_TYPE,gn.EDIT_THIRD_PARTY_CREDENTIAL_TYPE]},{children:Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(at.a,pR({to:x.generate(x.THIRD_PARTY_CREDENTIAL_TYPES)},{children:"Third Party Credential Type"}),void 0)},void 0)}),void 0)]}),void 0)},t.prototype.renderPostSecondary=function(){if("postSecondary"==this.state.activeTab)return Object(o.jsxs)(o.Fragment,{children:[Object(o.jsxs)(Kn.b,pR({title:"Post-Secondary"},{children:[Object(o.jsx)(Ze,pR({validFeatureFlags:[gn.VIEW_CIP_NUMBER,gn.EDIT_CIP_NUMBER]},{children:Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(at.a,pR({to:x.generate(x.CIPS)},{children:"CIP Numbers"}),void 0)},void 0)}),void 0),Object(o.jsx)(Ze,pR({validFeatureFlags:[gn.VIEW_DISCIPLINE,gn.EDIT_DISCIPLINE]},{children:Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(at.a,pR({to:x.generate(x.DISCIPLINES)},{children:"Disciplines"}),void 0)},void 0)}),void 0),Object(o.jsx)(Ze,pR({validFeatureFlags:[gn.EDIT_WORKFLOW]},{children:Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(at.a,pR({to:x.generate(x.CHANGE_REQUEST_TYPE)},{children:"Change Request Types"}),void 0)},void 0)}),void 0),Object(o.jsx)(Ze,pR({validFeatureFlags:[gn.VIEW_EXTERNAL_INSTITUTIONS,gn.EDIT_EXTERNAL_INSTITUTIONS]},{children:Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(at.a,pR({to:x.generate(x.EXTERNAL_INSTITUTIONS)}
1,{children:"External Institutions"}),void 0)},void 0)}),void 0)]}),void 0),Object(o.jsx)(Kn.b,pR({title:"Links"},{children:Object(o.jsx)(Ze,pR({validFeatureFlags:[gn.VIEW_CIP_NUMBER,gn.EDIT_CIP_NUMBER]},{children:Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(at.a,pR({to:x.generate(x.NOTICE_OF_INTENT_CHANGE_REQUEST_WORKFORCE_LINK)},{children:"Workforce Informational Links"}),void 0)},void 0)}),void 0)}),void 0),this.renderItsoSection(),this.renderLookupsSection(),this.renderTransferMajorsSection()]},void 0)},t.prototype.renderItsoSection=function(){return Object(o.jsxs)(Kn.b,pR({title:"ITSO"},{children:[Object(o.jsx)(Ze,pR({validFeatureFlags:[gn.VIEW_INSTRUCTIONAL_LEVEL,gn.EDIT_INSTRUCTIONAL_LEVEL]},{children:Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(at.a,pR({to:x.generate(x.INSTRUCTIONAL_LEVEL)},{children:"Instructional Levels"}),void 0)},void 0)}),void 0),Object(o.jsx)(Ze,pR({validFeatureFlags:[gn.VIEW_TYPE_OF_PROGRAM,gn.EDIT_TYPE_OF_PROGRAM]},{children:Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(at.a,pR({to:x.generate(x.TYPE_OF_PROGRAM)},{children:"Types Of Programs"}),void 0)},void 0)}),void 0),Object(o.jsx)(Ze,pR({validFeatureFlags:[gn.VIEW_SPECIAL_EMPHASIS,gn.EDIT_SPECIAL_EMPHASIS]},{children:Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(at.a,pR({to:x.generate(x.SPECIAL_EMPHASIS)},{children:"Special Emphases"}),void 0)},void 0)}),void 0),Object(o.jsx)(Ze,pR({validFeatureFlags:[gn.VIEW_OBJECT_PURPOSE,gn.EDIT_OBJECT_PURPOSE]},{children:Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(at.a,pR({to:x.generate(x.OBJECT_PURPOSE)},{children:"Object Purposes"}),void 0)},void 0)}),void 0)]}),void 0)},t.prototype.renderLookupsSection=function(){return Object(o.jsxs)(Kn.b,pR({title:"Lookups"},{children:[Object(o.jsx)(Ze,pR({validFeatureFlags:[gn.VIEW_APS_GENERAL_EDUCATION,gn.EDIT_APS_GENERAL_EDUCATION]},{children:Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(at.a,pR({to:x.generate(x.APS_GENERAL_EDUCATION)},{children:"APS General Education Categories"}),void 0)},void 0)}),void 0),Object(o.jsx)(Ze,pR({validFeatureFlags:[gn.VIEW_AWARD_TYPE,gn.EDIT_AWARD_TYPE]},{children:Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(at.a,pR({to:x.generate(x.AWARD_TYPE)},{children:"Award Types"}),void 0)},void 0)}),void 0),Object(o.jsx)(Ze,pR({validFeatureFlags:[gn.VIEW_CATEGORY,gn.EDIT_CATEGORY]},{children:Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(at.a,pR({to:x.generate(x.CATEGORIES)},{children:"Categories"}),void 0)},void 0)}),void 0),Object(o.jsx)(Ze,pR({validFeatureFlags:[gn.VIEW_CONTACT_TYPE,gn.EDIT_CONTACT_TYPE]},{children:Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(at.a,pR({to:x.generate(x.CONTACT_TYPE)},{children:"Contact Types"}),void 0)},void 0)}),void 0),Object(o.jsx)(Ze,pR({validFeatureFlags:[gn.VIEW_CREDIT_TYPE,gn.EDIT_CREDIT_TYPE]},{children:Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(at.a,pR({to:x.generate(x.CREDIT_TYPES)},{children:"Credit Types"}),void 0)},void 0)}),void 0),Object(o.jsx)(Ze,pR({validFeatureFlags:[gn.VIEW_GENERAL_EDUCATION,gn.EDIT_GENERAL_EDUCATION]},{children:Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(at.a,pR({to:x.generate(x.GENERAL_EDUCATION)},{children:"General Education Categories"}),void 0)},void 0)}),void 0),Object(o.jsx)(Ze,pR({validFeatureFlags:[gn.VIEW_IOWA_VARIATION,gn.EDIT_IOWA_VARIATION]},{children:Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(at.a,pR({to:x.generate(x.IOWA_VARIATION)},{children:"Iowa Variations"}),void 0)},void 0)}),void 0),Object(o.jsx)(Ze,pR({validFeatureFlags:[gn.VIEW_TERM,gn.EDIT_TERM]},{children:Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(at.a,pR({to:x.generate(x.TERMS)},{children:"Terms"}),void 0)},void 0)}),void 0),Object(o.jsx)(Ze,pR({validFeatureFlags:[gn.VIEW_WORK_BASED_LEARNING,gn.EDIT_WORK_BASED_LEARNING]},{children:Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(at.a,pR({to:x.generate(x.WORK_BASED_LEARNING_TYPE)},{children:"Work Based Learning Types"}),void 0)},void 0)}),void 0),Object(o.jsx)(Ze,pR({validFeatureFlags:[gn.VIEW_PROGRAM_CLASSIFICATION,gn.EDIT_PROGRAM_CLASSIFICATION]},{children:Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(at.a,pR({to:x.generate(x.PROGRAM_CLASSIFICATION)},{children:"Program Classifications"}),void 0)},void 0)}),void 0)]}),void 0)},t.prototype.renderTransferMajorsSection=function(){return Object(o.jsxs)(Kn.b,pR({title:"Transfer Major Content"},{children:[Object(o.jsx)(Ze,pR({validFeatureFlags:[gn.VIEW_TRANSFER_MAJOR_COURSE_BLOCKS,gn.EDIT_TRANSFER_MAJOR_COURSE_BLOCKS]},{children:Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(at.a,pR({to:x.generate(x.TRANSFER_MAJOR_COURSE_BLOCK)},{children:"Course Blocks"}),void 0)},void 0)}),void 0),Object(o.jsx)(Ze,pR({validFeatureFlags:[gn.VIEW_TRANSFER_MAJOR_LACTS_CATEGORY,gn.EDIT_TRANSFER_MAJOR_LACTS_CATEGORY]},{children:Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(at.a,pR({to:x.generate(x.TRANSFER_MAJOR_LACTS_CATEGORY)},{children:"LACTS Categories"}),void 0)},void 0)}),void 0),Object(o.jsx)(Ze,pR({validFeatureFlags:[gn.VIEW_TRANSFER_MAJOR_DISCIPLINE_FRAMEWORKS,gn.EDIT_TRANSFER_MAJOR_DISCIPLINE_FRAMEWORKS]},{children:Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(at.a,pR({to:x.generate(x.TRANSFER_MAJOR_DISCIPLINE_FRAMEWORK_ELEMENT)},{children:"Discipline Framework Elements"}),void 0)},void 0)}),void 0),Object(o.jsx)(Ze,pR({validFeatureFlags:[gn.VIEW_TRANSFER_MAJOR_GENERAL_EDUCATION_TYPE,gn.EDIT_TRANSFER_MAJOR_GENERAL_EDUCATION_TYPE]},{children:Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(at.a,pR({to:x.generate(x.TRANSFER_MAJOR_GENERAL_EDUCATION_TYPE)},{children:"General Education Categories"}),void 0)},void 0)}),void 0)]}),void 0)},t}(a.Component),hR=Object(u.i)(fR),vR=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),mR=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return vR(t,e),t.prototype.getCreditTypeTableData=function(e){var t="api/creditTypes";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)}
1,t.prototype.exportCreditTypeList=function(e){var t="api/creditTypes/export";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getCreditTypeDetails=function(e){var t="api/creditTypes/"+encodeURIComponent(e);return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.saveCreditTypeDetails=function(e){var t="api/creditTypes/save";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.deleteCreditType=function(e){var t="api/creditTypes/deleteCreditType";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t}(U),gR=new mR,bR=function(e){return Object.assign({creditTypeId:null,creditType:null},e)},yR=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),OR=function(){return OR=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},OR.apply(this,arguments)},jR=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._formItems=(new Map).set(Vd.name,{required:!0,name:Vd.name,label:"Name",rules:[Ot.required(),Ot.maxLength(150)]}).set(Vd.displayOrder,{required:!0,name:Vd.displayOrder,label:"Display Order",rules:[Ot.required()]}),n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields(),n.setState({altered:!1})},n.loadExisting=function(){n.props.creditTypeId&&(n.setState({loading:!0}),gR.getCreditTypeDetails(n.props.creditTypeId).then((function(e){var t;e&&n.setState({creditType:null!==(t=e.creditType)&&void 0!==t?t:Vd.create()}),n.resetForm()})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})})))},n.loadNew=function(){n.setState({loading:!1})},n.handleChange=function(){n.setState({altered:!0})},n.handleSubmit=function(){n.setState({submitting:!0});var e=bR({creditTypeId:n.props.creditTypeId,creditType:Vd.create(n._formRef?n._formRef.current.getFieldsValue():null)});gR.saveCreditTypeDetails(e).then((function(e){var t,r;n.setState({submitted:!0}),(null===e||void 0===e?void 0:e.succeeded)?(n.setState({creditType:null!==(t=e.creditType)&&void 0!==t?t:Vd.create()}),S.b.success("Saved"),n.props.onSave&&(null===(r=e.creditType)||void 0===r?void 0:r.id)&&
1(n.props.onSave(e.creditType.id),n.resetForm()),ce.invalidateCache(Vd.className)):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error(null===e||void 0===e?void 0:e.errors.join("\n")))})).catch((function(e){n.setState({error:e}),S.b.error("Credit Type could not be saved")})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.state={creditType:Vd.create({displayOrder:""})},n}return yR(t,e),t.prototype.componentDidMount=function(){this.loadCreditType()},t.prototype.componentDidUpdate=function(e){this.props.creditTypeId&&this.props.creditTypeId!=e.creditTypeId&&this.loadCreditType()},t.prototype.loadCreditType=function(){this.state.loading||(this.props.creditTypeId==re.default.Empty()?this.loadNew():this.loadExisting())},t.prototype.render=function(){return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(y.b,OR({size:"small",direction:"vertical"},{children:[Object(o.jsx)(zr,{when:this.state.altered},void 0),this.renderErrors(),Object(o.jsxs)(ht.a,OR({ref:this._formRef,layout:"vertical",initialValues:this.state.creditType,onValuesChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!0},{children:[Object(o.jsx)(mt.a,OR({},this._formItems.get(Vd.name),_t.getValidation(Vd.name,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,OR({},this._formItems.get(Vd.displayOrder),_t.getValidation(Vd.displayOrder,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(Ni.a,{min:0,disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),this.renderSave()]}),void 0)]}),void 0)},t.prototype.renderSave=function(){if(this.props.isEditing)return Object(o.jsx)(Ze,OR({validFeatureFlags:[gn.EDIT_CREDIT_TYPE]},{children:Object(o.jsxs)(y.b,OR({direction:"horizontal"},{children:[Object(o.jsx)(Tr,{disabled:!br.canSubmit(this._formRef,this._formItems),saving:this.state.submitting},void 0),Object(o.jsx)(Ir,{disabled:!br.hasChanged(this._formRef,this._formItems),onConfirm:this.resetForm},void 0)]}),void 0)}),void 0)},t.prototype.renderErrors=function(){if(this.state.error)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t}(a.Component),IR=function(e){return Object.assign({creditTypeId:"00000000-0000-0000-0000-000000000000"},e)},SR=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ER=function(){return ER=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ER.apply(this,arguments)},RR=function(e){function t(t){var n=e.call(this,t)||this;return n._creditTypeDetailsRef=a.createRef(),n.loadCreditType=function(e){n.setState({creditTypeId:e}),gR.getCreditTypeDetails(e).then((function(e){e.creditType&&n.setState({creditType:e.creditType})})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))},n.toggleEdit=function(){var e;n.state.isEditing&&(null===(e=n._creditTypeDetailsRef.current)||void 0===e||e.resetForm()),n.setState({isEditing:!n.state.isEditing})},n.creditTypeDetailsSaved=function(e){n.setState({isEditing:!1}),e!=n.state.creditTypeId?T.replace(x.generate(x.CREDIT_TYPE_DETAILS,{id:e})):n.loadCreditType(e)},n.deleteConfirmation=function(e){f.a.confirm({title:"Are you sure you want to delete this Credit Type?",okText:"Delete",onOk:function(){return n.deleteCreditType(e)}})},n.deleteCreditType=function(e){n.setState({submitting:!0});var t=IR({creditTypeId:e});gR.deleteCreditType(t).then((function(e){n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,altered:!(null===e||void 0===e?void 0:e.succeeded)}),!0===(null===e||void 0===e?void 0:e.succeeded)?S.b.success("Credit Type was removed."):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(e){n.setState({error:e}),S.b.error("Credit Type could not be removed.")})).finally((function(){n.setState({loading:!1}),n.goToListing()}))},n.goToListing=function(){T.goBack()},n.state={creditTypeId:re.default.Empty()},n}return SR(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");"new"==e?this.setState({isEditing:!0,isNew:!0,loading:!1}):this.loadCreditType(e)},t.prototype.render=function(){var e,t,n=this.state.loading?"...":this.state.isNew?"New Credit Type":null!==(t=null===(e=this.state.creditType)||void 0===e?void 0:e.name)&&void 0!==t?t:"...";return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:n,onBack:this.goToListing,breadcrumbs:Xn.creditTypeDetails(n,this.state.creditTypeId),extra:this.renderMoreActions()},void 0),Object(o.jsx)(zr,{when:this.state.isEditing},void 0),this.renderDetailsCard()]},void 0)},t.prototype.renderDetailsCard=function(){var e=this.state.creditTypeId==re.default.Empty()?null:Object(o.jsx)(Ze,ER({validFeatureFlags:[gn.EDIT_CREDIT_TYPE]},{children:Object(o.jsx)(Br,{isEditing:this.state.isEditing,onClick:this.toggleEdit},void 0)}),void 0);return Object(o.jsx)(Qn.a,ER({title:"Details",extra:e},{children:Object(o.jsx)(jR,{ref:this._creditTypeDetailsRef,creditTypeId:this.state.creditTypeId,isEditing:this.state.isEditing,isNew:this.state.isNew,onSave:this.creditTypeDetailsSaved},void 0)}),void 0)},t.prototype.renderMoreActions=function(){var e=this,t=Object(o.jsx)(Gt.a,{children:Object(o.jsx)(Gt.a.Item,ER({title:"Delete Credit Type",onClick:function(){return e.deleteConfirmation(e.state.creditTypeId)}},{children:"Delete Credit Type"}),this.state.creditTypeId)},void 0);return Object(o.jsx)(Ze,ER({validFeatureFlags:[gn.EDIT_CREDIT_TYPE]},{children:Object(o.jsx)(la.a,ER({overlay:t},{children:Object(o.jsx)(rt.a,ER({size:"large",type:"link"},{children:Object(o.jsx)(aa.a,{},void 0)}),void 0)}),void 0)}),void 0)},t}(a.Component),_R=Object(u.i)(RR),TR=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),CR=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return TR(t,e),t.prototype.getContactTableData=function(e,t){var n="api/contacts",r=n.indexOf("?")>0?"&":"?";return null!=t&&(n+=r+"institutionId="+encodeURIComponent(t),r="&"),n=n.replace(/null|undefined/gi,""),this.SendRequest(e,"post",n,!0,!1)},t.prototype.removeContact=function(e){var t="api/contacts/removeC
1ontact";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getContactByInstitionId=function(e){var t="api/contacts/getContactByInstitutionId";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.saveContactDetails=function(e){var t="api/contacts/save";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!1,!1)},t}(U),xR=new CR,AR=function(e){return Object.assign({contactId:"00000000-0000-0000-0000-000000000000"},e)},PR={className:"ContactDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",institutionId:null,institution:null,contactTypeId:null,contactType:null,firstName:"",lastName:"",email:"",phone:"",title:"",signatureAzureBlobFileId:null,signatureAzureBlobFile:null},e)},id:"id",institutionId:"institutionId",institution:"institution",contactTypeId:"contactTypeId",contactType:"contactType",firstName:"firstName",lastName:"lastName",email:"email",phone:"phone",title:"title",signatureAzureBlobFileId:"signatureAzureBlobFileId",signatureAzureBlobFile:"signatureAzureBlobFile"},NR=function(e){return Object.assign({contact:null,additionalFile:null},e)},wR="additionalFile",DR=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),qR=function(){return qR=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},qR.apply(this,arguments)},FR=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._formItems=(new Map).set(PR.firstName,{required:!0,name:PR.firstName,label:"First Name",rules:[Ot.required()]}).set(PR.lastName,{required:!0,name:PR.lastName,label:"Last Name",rules:[Ot.required()]}).set(PR.title,{name:PR.title,label:"Title"}).set(PR.email,{name:PR.email,label:"Email"}).set(PR.phone,{name:PR.phone,label:"Phone",rules:[Ot.phoneNumberValidator()]}).set(PR.contactTypeId,{required:!0,name:PR.contactTypeId,label:"Contact Type",rules:[Ot.required()]}).set(PR.institutionId,{name:PR.institutionId,label:"Community College"}).set(PR.signatureAzureBlobFile,{name:PR.signatureAzureBlobFile,label:"File"}),n.fetchData=function(){var e=[];0==n.state.contactType.length&&e.push(n.loadContactTypes()),0==n.state.institutions.length&&e.push(n.loadInstitutions()),Promise.all(e).then((function(){n.setState({loading:!1})}))},n.loadContactTypes=function(){return ce.getAll(ui.className).then((function(e){e&&n.setState({contactType:e})})).finally((function(){n.setState({loading:!1})}))},n.loadInstitutions=function(){return ce.getAll(ne.className).then((function(e){e&&n.setState({institutions:e})})).finally((function(){n.setState({loading:!1})}))},n.submit=function(){n.handleSubmit()},n.reset=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields()},n.handleChange=function(){n.setState({altered:!0})},n.handleSubmit=function(){var e,t,r;if(n.setState({submitting:!0}),!br.canSubmit(n._formRef,n._formItems))return S.b.error("Please fill out all required fields."),void n.setState({loading:!1,submitting:!1});var i=PR.create(null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldsValue());i.id=null!==(t=n.props.contact.id)&&void 0!==t?t:re.default.Empty(),n.props.institutionId&&n.props.institutionId!=re.default.Empty()&&(i.institutionId=n.props.institutionId);var o=NR({contact:i}),a=n._formRef?n._formRef.current.getFieldsValue():NR(),s=Za.attachFilesToModel("saveContactDetail",o,wR,null===(r=a.signatureAzureBlobFile)||void 0===r?void 0:r.newFiles);xR.saveContactDetails(s).then((function(e){(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.props.onSuccess&&(n.props.onSuccess(),n.reset()),n.setState({error:!1,submitted:!1,fieldErrors:{}})):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Contact could not be saved. "+n.state.message))})).catch((function(e){n.setState({error:e}),S.b.error("Contact could not be saved.")})).finally((function(){n.setState({loading:!1,submitting:!1,submitted:!0})}))},n.state={contact:PR.create({institutionId:null}),contactType:[],institutions:[]},n}return DR(t,e),t.prototype.componentDidMount=function(){var e=this;this.fetchData();var t=this.props.contact;t.id==re.default.Empty()&&(t.institutionId=null),this.setState({contact:t},(function(){return e.reset()}))},t.prototype.componentDidUpdate=function(e){var t=this;if(this.props.contact&&this.props.contact!=e.contact){this.fetchData();var n=this.props.contact;this.setState({contact:n},(function(){return t.reset()}))}},t.prototype.render=function(){var e,t,n=this,r=[];return r.push({uid:this.props.contact.signatureAzureBlobFileId,url:x.generateDownload(null!==(e=this.props.contact.signatureAzureBlobFileId)&&void 0!==e?e:re.default.Empty()),name:null===(t=this.props.contact.signatureAzureBlobFile)||void 0===t?void 0:t.fileName}),this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(y.b,qR({size:"small",direction:"vertical"},{children:[this.renderErrors(),Object(o.jsxs)(ht.a,qR({ref:this._formRef,layout:"vertical",onValuesChange:this.handleChange,initialValues:this.state.contact,requiredMark:!0},{children:[Object(o.jsx)(mt.a,qR({},this._formItems.get(PR.firstName),_t.getValidation(PR.firstName,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,qR({},this._formItems.get(PR.lastName),_t.getValidation(PR.lastName,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,qR({},this._formItems.get(PR.title),_t.getValidation(PR.title,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,qR({},this._formItems.get(PR.contactTypeId),_t.getValidation(PR.contactTypeId,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsxs)(pr.a,qR({disabled:this.state.loading||this.state.submitting},{children:[this.state.contactType.map((function(e){return n.renderContactType(e)}))," "]}),void 0)}),void 0),this.props.institutionId&&this.props.institutionId!=re.default.Empty()?null:Object(o.jsx)(mt.a,qR({},this._formItems.get(PR.institutionId),_t.getValidation(PR.institutionId,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsxs)(pr.a,qR({disabled:this.state.loading||this.state.submitting,allowClear:!0},{children:[this.state.institutions.map((function(e){return n.renderInstitution(e)}))," "]}),void 0)}),void 0),Object(o.jsx)(mt.a,qR({},this._formItems.get(PR.email),_t.getValidation(PR.email,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,qR({},this._formItems.get(PR.phone),_t.getValidation(PR.phone,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{placeholder:"###-###
1-#####",disabled:this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,qR({},this._formItems.get(PR.signatureAzureBlobFile),_t.getValidation(PR.signatureAzureBlobFile,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(hs,{cropImage:!0,existingList:r,maxCount:1},void 0)}),void 0)]}),void 0)]}),void 0)},t.prototype.renderContactType=function(e){if(e.id)return Object(o.jsx)(pr.a.Option,qR({value:e.id},{children:e.name}),e.id)},t.prototype.renderInstitution=function(e){if(e.id)return Object(o.jsx)(pr.a.Option,qR({value:e.id},{children:e.name}),e.id)},t.prototype.renderErrors=function(){if(this.state.error)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t}(a.Component),MR=function(){return MR=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},MR.apply(this,arguments)};var YR=function(e){var t=e.text?e.text:e.children,n=e.azureBlobFileId?x.generateDownload(e.azureBlobFileId):e.link;return Object(o.jsx)("a",MR({href:n,target:"_blank",rel:"noopener noreferrer"},{children:Object(o.jsx)(Jm,{type:"link",title:t},void 0)}),void 0)},UR=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),LR=function(){return LR=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},LR.apply(this,arguments)},kR=function(e){function t(t){var n=e.call(this,t)||this;return n._addContactFormRef=a.createRef(),n.fetchData=function(){Ii.ContactTypes().then((function(e){n.setState({contactTypes:e})})),Ii.Institutions().then((function(e){n.setState({institutions:e})}))},n.triggerRefresh=function(){var e;null===(e=n._dataTable)||void 0===e||e.refresh()},n.getColumnDefinitions=function(){var e=[{title:"First Name",dataIndex:PR.firstName,sorter:!0,width:200,filterType:wr.Text,ellipsis:!0},{title:"Last Name",dataIndex:PR.lastName,sorter:!0,width:200,filterType:wr.Text,ellipsis:!0},{title:"Title",dataIndex:PR.title,sorter:!0,width:200,filterType:wr.Text,ellipsis:!0},{title:"Email",dataIndex:PR.email,sorter:!0,width:200,filterType:wr.Text,ellipsis:!0},{title:"Phone",dataIndex:PR.phone,sorter:!0,width:100,filterType:wr.Text,ellipsis:!0}];return n.props.institutionId&&n.props.institutionId==re.default.Empty()&&e.push({title:"Community College",dataIndex:PR.institutionId,render:function(e,t){var n;return null===(n=t.institution)||void 0===n?void 0:n.name},sorter:!0,width:100,filterType:wr.DropdownMulti,dropdownFilterOptions:n.state.institutions,ellipsis:!0}),e.push({title:"Contact Type",dataIndex:PR.contactTypeId,render:function(e,t){var r;return null===(r=n.state.contactTypes.find((function(e){return e.value==t.contactTypeId})))||void 0===r?void 0:r.text},sorter:!0,width:125,filterType:wr.DropdownMulti,dropdownFilterOptions:n.state.contactTypes,ellipsis:!0},{title:"Signature",dataIndex:PR.signatureAzureBlobFileId,sorter:!0,width:100,filterType:wr.Text,ellipsis:!0,render:function(e,t){var n,r;return t.signatureAzureBlobFileId?Object(o.jsx)(YR,{azureBlobFileId:null!==(n=t.signatureAzureBlobFileId)&&void 0!==n?n:re.default.Empty(),text:null===(r=t.signatureAzureBlobFile)||void 0===r?void 0:r.fileName},t.signatureAzureBlobFileId):null}},{title:"",dataIndex:PR.id,width:50,render:function(e,t){return 0==t.contactTypeId&&(t.contactTypeId=null),Je.isAuthorized([gn.EDIT_CONTACT])?Object(o.jsxs)(ut.a.Group,LR({compact:!0},{children:[Object(o.jsx)(rt.a,LR({type:"link",onClick:function(){return n.addContact(t)},size:"small"},{children:Object(o.jsx)(Ei.a,{},void 0)}),void 0),Object(o.jsx)(rt.a,LR({type:"link",size:"small",onClick:function(){var e;return n.promptConfirmRemove(null!==(e=t.id)&&void 0!==e?e:re.default.Empty())}},{children:Object(o.jsx)(Yd.a,{},void 0)}),void 0)]}),void 0):null},sorter:!1,filterType:wr.NONE}),e},n.addContact=function(e){n.setState({contact:e},(function(){return n.openModal()}))},n.openModal=function(){n.setState({showModal:!0})},n.submitContactChange=function(){var e;null===(e=n._addContactFormRef.current)||void 0===e||e.submit()},n.cancelContactChange=function(){var e;n.setState({showModal:!1}),null===(e=n._addContactFormRef.current)||void 0===e||e.reset()},n.contactAdded=function(){var e;n.setState({showModal:!1}),null===(e=n._dataTable)||void 0===e||e.refresh()},n.promptConfirmRemove=function(e){f.a.confirm({title:"Are you sure you want to remove this contact?",okText:"Remove Contact",onOk:function(){return n.handlerRemoveContact(e)}})},n.handlerRemoveContact=function(e){n.setState({submitting:!0});var t=AR({contactId:null!==e&&void 0!==e?e:re.default.Empty()});xR.removeContact(t).then((function(e){n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,altered:!(null===e||void 0===e?void 0:e.succeeded)}),!0===(null===e||void 0===e?void 0:e.succeeded)?S.b.success("Contact was removed."):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(e){n.setState({error:e}),S.b.error("Contact could not be removed.")})).finally((function(){n.setState({loading:!1}),n.triggerRefresh()}))},n.state={contactTypes:[],contact:PR.create({contactTypeId:""}),contacts:[],institutions:[],showModal:!1},n}return UR(t,e),t.prototype.componentDidMount=function(){this.fetchData()},t.prototype.renderAddContactModal=function(){var e;return Object(o.jsx)(f.a,LR({visible:this.state.showModal,title:"Contact",okText:"Save",onOk:this.submitContactChange,onCancel:this.cancelContactChange},{children:Object(o.jsx)(FR,{ref:this._addContactFormRef,onSuccess:this.contactAdded,contact:this.state.contact,institutionId:null!==(e=this.props.institutionId)&&void 0!==e?e:re.default.Empty()},void 0)}),void 0)},t.prototype.render=function(){return Object(o.jsxs)("div",{children:[this.renderAddContactModal(),this.renderDataTable()]},void 0)},t.prototype.renderDataTable=function(){var e=this,t=[];return t.push(oo.Reset()),Je.isAuthorized([gn.EDIT_CONTACT])&&t.push(oo.Default("New Contact",(function(){return e.addContact(PR.create())}))),Object(o.jsx)(io,{ref:function(t){return e._dataTable=t},data:this.state.contacts,serverSide:!0,tableProps:{rowKey:"id",scroll:{x:1750}},globalSearch:!0,buttonBar:t,columns:this.getColumnDefinitions(),fetchData:{fetch:function(t){return xR.getContactTableData(t,e.props.institutionId)}},stateSaving:{enabled:!0,tableUniqueKey:"contact_list"}},void 0)},t}(a.Component),GR=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),VR=function(){return VR=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},VR.apply(this,arguments)},BR=function(e){function t(t){var n=e.call(this,t)||this;return n.state={},n}return GR(t,e),t.prototype.render=function(){var e,t;return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Contacts",breadcrumbs:Xn.contactList(
1)},void 0),Object(o.jsx)(y.b,VR({direction:"vertical",size:"large"},{children:Object(o.jsx)(Qn.a,{children:Object(o.jsx)(kR,{institutionId:null!==(t=null===(e=this.props.institution)||void 0===e?void 0:e.id)&&void 0!==t?t:re.default.Empty()},void 0)},void 0)}),void 0)]},void 0)},t}(a.Component);var WR=Object(u.i)(Object(l.b)((function(e){return{institution:e.Institution.Selected}}))(BR)),zR=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),HR=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return zR(t,e),t.prototype.getContactTypeTableData=function(e){var t="api/contactTypes";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getContactTypeDetails=function(e){var t="api/contactTypes/"+e;return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.getContactTypeDataTableExport=function(e){var t="api/contactTypes/export";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.saveContactTypeDetails=function(e){var t="api/contactTypes/save";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.deleteContactType=function(e){var t="api/contactTypes/deleteContactType";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t}(U),QR=new HR,KR=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),XR=function(e){function t(t){var n=e.call(this,t)||this;return n.getColumnDefinitions=function(){return[{title:"Order",dataIndex:ui.displayOrder,sorter:!0,filterType:wr.Text,width:75},{title:"Name",dataIndex:ui.name,sorter:!0,filterType:wr.Text}]},n.openContactType=function(e){e.id&&T.push(x.generate(x.CONTACT_TYPE_DETAILS,{id:e.id},{}))},n.addContactType=function(){T.push(x.generate(x.NEW_CONTACT_TYPE))},n.state={},n}return KR(t,e),t.prototype.render=function(){var e=this,t=[];return t.push(oo.Reset()),t.push(oo.Export((function(t){return e.setState({exporting:!0}),QR.getContactTypeDataTableExport(t).then((function(t){e.setState({exporting:!1}),R.a.downloadBase64StringAsFile("Contact_Type_"+$r.getDateStamp()+".xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",null!==t&&void 0!==t?t:void 0)}))}),this.state.exporting)),Je.isAuthorized([gn.EDIT_CONTACT_TYPE])&&t.push(oo.Default("New Contact Type",(function(){return e.addContactType()}))),Object(o.jsx)(io,{ref:function(t){return e._dataTable=t},onRowClick:this.openContactType,serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:t,columns:this.getColumnDefinitions(),fetchData:{fetch:function(e){return QR.getContactTypeTableData(e)}},stateSaving:{enabled:!0,tableUniqueKey:"contact_types_list"}},void 0)},t}(a.Component),JR=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),$R=function(e){function t(t){var n=e.call(this,t)||this;return n.goToConfig=function(){T.goBack()},n}return JR(t,e),t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Contact Types",onBack:this.goToConfig,breadcrumbs:Xn.contactTypeList()},void 0),Object(o.jsx)(Qn.a,{children:Object(o.jsx)(XR,{},void 0)},void 0)]},void 0)},t}(a.Component),ZR=Object(u.i)($R),e_=function(e){return Object.assign({contactTypeId:null,contactType:null},e)},t_=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),n_=function(){return n_=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},n_.apply(this,arguments)},r_=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._formItems=(new Map).set(ui.name,{required:!0,name:ui.name,label:"Name",rules:[Ot.required(),Ot.maxLength(150)]}).set(ui.displayOrder,{required:!0,name:ui.displayOrder,label:"Display Order",rules:[Ot.required()]}),n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields(),n.setState({altered:!1})},n.loadExisting=function(){n.props.contactTypeId&&(n.setState({loading:!0}),QR.getContactTypeDetails(n.props.contactTypeId).then((function(e){var t;e&&n.setState({contactType:null!==(t=e.contactType)&&void 0!==t?t:ui.create()}),n.resetForm()})).catch((function(){n.setState({error:!0})}
1)).finally((function(){n.setState({loading:!1})})))},n.loadNew=function(){n.setState({loading:!1})},n.handleChange=function(){n.setState({altered:!0})},n.handleSubmit=function(){n.setState({submitting:!0});var e=e_({contactTypeId:n.props.contactTypeId,contactType:ui.create(n._formRef?n._formRef.current.getFieldsValue():null)});QR.saveContactTypeDetails(e).then((function(e){var t,r;n.setState({submitted:!0}),(null===e||void 0===e?void 0:e.succeeded)?(n.setState({contactType:null!==(t=e.contactType)&&void 0!==t?t:ui.create()}),S.b.success("Saved"),n.props.onSave&&(null===(r=e.contactType)||void 0===r?void 0:r.id)&&(n.props.onSave(e.contactType.id),n.resetForm()),ce.invalidateCache(ui.className)):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error(null===e||void 0===e?void 0:e.errors.join("\n")))})).catch((function(e){n.setState({error:e}),S.b.error("Contact Type could not be saved")})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.state={contactType:ui.create({displayOrder:""})},n}return t_(t,e),t.prototype.componentDidMount=function(){this.loadContactType()},t.prototype.componentDidUpdate=function(e){this.props.contactTypeId&&this.props.contactTypeId!=e.contactTypeId&&this.loadContactType()},t.prototype.loadContactType=function(){this.state.loading||(0==this.props.contactTypeId?this.loadNew():this.loadExisting())},t.prototype.render=function(){return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(y.b,n_({size:"small",direction:"vertical"},{children:[Object(o.jsx)(zr,{when:this.state.altered},void 0),this.renderErrors(),Object(o.jsxs)(ht.a,n_({ref:this._formRef,layout:"vertical",initialValues:this.state.contactType,onValuesChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!0},{children:[Object(o.jsx)(mt.a,n_({},this._formItems.get(ui.name),_t.getValidation(ui.name,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,n_({},this._formItems.get(ui.displayOrder),_t.getValidation(ui.displayOrder,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(Ni.a,{min:0,disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),this.renderSave()]}),void 0)]}),void 0)},t.prototype.renderSave=function(){if(this.props.isEditing)return Object(o.jsx)(Ze,n_({validFeatureFlags:[gn.EDIT_CREDIT_TYPE]},{children:Object(o.jsxs)(y.b,n_({direction:"horizontal"},{children:[Object(o.jsx)(Tr,{disabled:!br.canSubmit(this._formRef,this._formItems),saving:this.state.submitting},void 0),Object(o.jsx)(Ir,{disabled:!br.hasChanged(this._formRef,this._formItems),onConfirm:this.resetForm},void 0)]}),void 0)}),void 0)},t.prototype.renderErrors=function(){if(this.state.error)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t}(a.Component),i_=function(e){return Object.assign({contactTypeId:0},e)},o_=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),a_=function(){return a_=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},a_.apply(this,arguments)},s_=function(e){function t(t){var n=e.call(this,t)||this;return n._contactTypeDetailsRef=a.createRef(),n.loadContactType=function(e){n.setState({contactTypeId:e}),QR.getContactTypeDetails(e).then((function(e){e.contactType&&n.setState({contactType:e.contactType})})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}
1))},n.toggleEdit=function(){var e;n.state.isEditing&&(null===(e=n._contactTypeDetailsRef.current)||void 0===e||e.resetForm()),n.setState({isEditing:!n.state.isEditing})},n.contactTypeDetailsSaved=function(e){n.setState({isEditing:!1}),e!=n.state.contactTypeId?T.replace(x.generate(x.CONTACT_TYPE_DETAILS,{id:e})):n.loadContactType(e)},n.deleteConfirmation=function(e){f.a.confirm({title:"Are you sure you want to delete this contact type?",okText:"Delete",onOk:function(){return n.deleteContactType(e)}})},n.deleteContactType=function(e){n.setState({submitting:!0});var t=i_({contactTypeId:e});QR.deleteContactType(t).then((function(e){n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,altered:!(null===e||void 0===e?void 0:e.succeeded)}),!0===(null===e||void 0===e?void 0:e.succeeded)?S.b.success("Contact Type was removed."):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(e){n.setState({error:e}),S.b.error("Contact Type could not be removed.")})).finally((function(){n.setState({loading:!1}),n.goToListing()}))},n.goToListing=function(){T.goBack()},n.state={contactTypeId:0},n}return o_(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");"new"==e?this.setState({isEditing:!0,isNew:!0,loading:!1}):this.loadContactType(Number.parseInt(e))},t.prototype.render=function(){var e,t,n=this.state.loading?"...":this.state.isNew?"New Contact Type":null!==(t=null===(e=this.state.contactType)||void 0===e?void 0:e.name)&&void 0!==t?t:"...";return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:n,onBack:this.goToListing,breadcrumbs:Xn.contactTypeDetails(n,this.state.contactTypeId),extra:this.renderMoreActions()},void 0),Object(o.jsx)(zr,{when:this.state.isEditing},void 0),this.renderDetailsCard()]},void 0)},t.prototype.renderDetailsCard=function(){var e=0==this.state.contactTypeId?null:Object(o.jsx)(Ze,a_({validFeatureFlags:[gn.EDIT_CONTACT_TYPE]},{children:Object(o.jsx)(Br,{isEditing:this.state.isEditing,onClick:this.toggleEdit},void 0)}),void 0);return Object(o.jsx)(Qn.a,a_({title:"Details",extra:e},{children:Object(o.jsx)(r_,{ref:this._contactTypeDetailsRef,contactTypeId:this.state.contactTypeId,isEditing:this.state.isEditing,isNew:this.state.isNew,onSave:this.contactTypeDetailsSaved},void 0)}),void 0)},t.prototype.renderMoreActions=function(){var e=this,t=Object(o.jsx)(Gt.a,{children:Object(o.jsx)(Gt.a.Item,a_({title:"Delete Contact Type",onClick:function(){return e.deleteConfirmation(e.state.contactTypeId)}},{children:"Delete Contact Type"}),this.state.contactTypeId)},void 0);return Object(o.jsx)(Ze,a_({validFeatureFlags:[gn.EDIT_CREDIT_TYPE]},{children:Object(o.jsx)(la.a,a_({overlay:t},{children:Object(o.jsx)(rt.a,a_({size:"large",type:"link"},{children:Object(o.jsx)(aa.a,{},void 0)}),void 0)}),void 0)}),void 0)},t}(a.Component),d_=Object(u.i)(s_),c_=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),l_=function(e){function t(t){var n=e.call(this,t)||this;return n.getColumnDefinitions=function(){return[{title:"Order",dataIndex:Vd.displayOrder,sorter:!0,filterType:wr.Text,width:75},{title:"Name",dataIndex:Vd.name,sorter:!0,filterType:wr.Text}]},n.openCreditType=function(e){e.id&&T.push(x.generate(x.CREDIT_TYPE_DETAILS,{id:e.id},{}))},n.addCreditType=function(){T.push(x.generate(x.NEW_CREDIT_TYPE))},n.state={},n}return c_(t,e),t.prototype.render=function(){var e=this,t=[];return t.push(oo.Reset()),t.push(oo.Export((function(t){return e.setState({exporting:!0}),gR.exportCreditTypeList(t).then((function(t){e.setState({exporting:!1}),R.a.downloadBase64StringAsFile("CreditType_"+$r.getDateStamp()+".xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",null!==t&&void 0!==t?t:void 0)}))}),this.state.exporting)),Je.isAuthorized([gn.EDIT_CREDIT_TYPE])&&t.pu
1sh(oo.Default("New Credit Type",(function(){return e.addCreditType()}))),Object(o.jsx)(io,{ref:function(t){return e._dataTable=t},onRowClick:this.openCreditType,serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:t,columns:this.getColumnDefinitions(),fetchData:{fetch:function(e){return gR.getCreditTypeTableData(e)}},stateSaving:{enabled:!0,tableUniqueKey:"credit_types_list"}},void 0)},t}(a.Component),u_=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),p_=function(e){function t(t){var n=e.call(this,t)||this;return n.goToConfig=function(){T.goBack()},n}return u_(t,e),t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Credit Types",onBack:this.goToConfig,breadcrumbs:Xn.creditTypeList()},void 0),Object(o.jsx)(Qn.a,{children:Object(o.jsx)(l_,{},void 0)},void 0)]},void 0)},t}(a.Component),f_=Object(u.i)(p_),h_=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),v_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return h_(t,e),t.prototype.getDisciplineTableData=function(e){var t="api/disciplines";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.exportDisciplineList=function(e){var t="api/disciplines/export";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getDisciplineDetails=function(e){var t="api/disciplines/"+encodeURIComponent(e);return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.saveDisciplineDetails=function(e){var t="api/disciplines/save";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getDisciplines=function(){var e="api/disciplines/getDisciplines";return e=e.replace(/null|undefined/gi,""),this.SendRequest(null,"post",e,!0,!1)},t}(U),m_=new v_,g_=function(e){return Object.assign({disciplineId:null,discipline:null},e)},b_=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),y_=function(){return y_=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},y_.apply(this,arguments)},O_=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._formItems=(new Map).set(nd.code,{required:!0,name:nd.code,label:"Code",rules:[Ot.required(),Ot.maxLength(3),Ot.onlyAlphaCharacters()]}).set(nd.name,{required:!0,name:nd.name,label:"Name",rules:[Ot.required(),Ot.maxLength(150)]}).set(nd.statusTypeId,{required:!0,name:nd.statusTypeId,label:"Status",rules:[Ot.required()]}),n.resetForm=function(){var e;n.setState({altered:!1}),null===(e=n._formRef.current)||void 0===e||e.resetFields()},n.loadStatusTypes=function(){return ce.getAll(gi.className).then((function(e){e&&n.setState({statusTypes:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadExisting=function(){return m_.getDisciplineDetails(n.props.disciplineId).then((function(e){var t;e&&(n.setState({discipline:null!==(t=e.discipline)&&void 0!==t?t:nd.create()}),n.resetForm())})).catch((function(){n.setState({error:!0})}))},n.handleChange=function(){n.setState({altered:!0})},n.handleSubmit=function(){n.setState({submitting:!0});var e=g_({disciplineId:n.props.disciplineId,discipline:nd.create(n._formRef?n._formRef.current.getFieldsValue():null)});m_.saveDisciplineDetails(e).then((function(e){var t,r,i;n.setState({discipline:null!==(t=null===e||void 0===e?void 0:e.discipline)&&void 0!==t?t:nd.create(),submitted:!0}),(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.props.onSave&&(null===(r=e.discipline)||void 0===r?void 0:r.id)&&
1(n.props.onSave(e.discipline.id),null===(i=n._formRef.current)||void 0===i||i.resetFields()),ce.invalidateCache(nd.className)):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),xi.a.error({message:"Uh oh!",description:null===e||void 0===e?void 0:e.errors.join("\n")}))})).catch((function(e){n.setState({error:e}),xi.a.error({message:"Uh oh!",description:"Discipline could not be saved."})})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.state={discipline:nd.create({statusTypeId:""}),statusTypes:[]},n}return b_(t,e),t.prototype.componentDidMount=function(){this.setState({loading:!0}),this.loadDiscipline()},t.prototype.componentDidUpdate=function(e){this.props.disciplineId&&this.props.disciplineId!=e.disciplineId&&this.loadDiscipline()},t.prototype.loadDiscipline=function(){var e=this,t=[];0==this.state.statusTypes.length&&t.push(this.loadStatusTypes()),this.props.disciplineId!=re.default.Empty()&&t.push(this.loadExisting()),Promise.all(t).then((function(){e.setState({loading:!1})}))},t.prototype.render=function(){return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(y.b,y_({direction:"vertical"},{children:[this.renderErrors(),Object(o.jsxs)(ht.a,y_({ref:this._formRef,layout:"vertical",initialValues:this.state.discipline,onValuesChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!0},{children:[Object(o.jsx)(mt.a,y_({},this._formItems.get(nd.code),_t.getValidation(nd.code,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,y_({},this._formItems.get(nd.name),_t.getValidation(nd.name,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,y_({},this._formItems.get(nd.statusTypeId),_t.getValidation(nd.statusTypeId,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(pr.a,y_({disabled:!this.props.isEditing||this.state.loading||this.state.submitting},{children:this.state.statusTypes.map((function(e){return Object(o.jsx)(pr.a.Option,y_({value:e.id},{children:e.name}),e.id)}))}),void 0)}),void 0),this.renderSave()]}),void 0)]}),void 0)},t.prototype.renderSave=function(){if(this.props.isEditing)return Object(o.jsx)(Ze,y_({validFeatureFlags:[gn.EDIT_DISCIPLINE]},{children:Object(o.jsxs)(y.b,y_({direction:"horizontal"},{children:[Object(o.jsx)(Tr,{disabled:!br.canSubmit(this._formRef,this._formItems),saving:this.state.submitting},void 0),Object(o.jsx)(Ir,{disabled:!br.hasChanged(this._formRef,this._formItems),onConfirm:this.resetForm},void 0)]}),void 0)}),void 0)},t.prototype.renderErrors=function(){if(this.state.error)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t}(a.Component),j_=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),I_=function(){return I_=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},I_.apply(this,arguments)},S_=function(e){function t(t){var n=e.call(this,t)||this;return n._termDetailsRef=a.createRef(),n.loadDiscipline=function(e){n.setState({disciplineId:e}),m_.getDisciplineDetails(e).then((function(e){e.discipline&&n.setState({discipline:e.discipline})})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))},n.toggleEdit=function(){var e;n.state.isEditing&&(null===(e=n._termDetailsRef.current)||void 0===e||e.resetForm()),n.setState({isEditing:!n.state.isEditing})},n.disciplineDetailsSaved=function(e){n.setState({isEditing:!1}),e!=n.state.disciplineId?T.replace(x.generate(x.DISCIPLINE_DETAILS,{id:e})):n.loadDiscipline(e)},n.goToDisciplines=function(){T.goBack()},n.state={disciplineId:re.default.Empty()},n}return j_(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");"new"==e?this.setState({isEditing:!0,isNew:!0,loading:!1}):this.loadDiscipline(e)},t.prototype.render=function(){var e,t,n=this.state.loading?"...":this.state.disciplineId==re.default.Empty()?"New Discipline":null!==(t=null===(e=this.state.discipline)||void 0===e?void 0:e.name)&&void 0!==t?t:"...";return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:n,onBack:this.goToDisciplines,breadcrumbs:Xn.disciplineDetails(n,this.state.disciplineId)},void 0),Object(o.jsx)(zr,{when:this.state.isEditing},void 0),this.renderDetailsCard()]},void 0)},t.prototype.renderDetailsCard=function(){var e=this.state.disciplineId==re.default.Empty()?null:Object(o.jsx)(Ze,I_({validFeatureFlags:[gn.EDIT_DISCIPLINE]},{children:Object(o.jsx)(Br,{isEditing:this.state.isEditing,onClick:this.toggleEdit},void 0)}),void 0);return Object(o.jsx)(Qn.a,I_({title:"Details",extra:e},{children:Object(o.jsx)(O_,{disciplineId:this.state.disciplineId,isEditing:this.state.isEditing,isNew:this.state.isNew,onSave:this.disciplineDetailsSaved},void 0)}),void 0)},t}(a.Component),E_=Object(u.i)(S_),R_=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),__=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(){Ii.StatusTypes().then((function(e){return n.setState({statusTypes:e})}))},n.getColumnDefinitions=function(){return[{title:"Code",dataIndex:nd.code,sorter:!0,filterType:wr.Text,width:50},{title:"Name",dataIndex:nd.name,sorter:!0,filterType:wr.Text},{title:"Status",dataIndex:nd.statusTypeId,render:function(e,t){var n;return null===(n=t.statusType)||void 0===n?void 0:n.name},sorter:!0,filterType:wr.DropdownMulti,width:75,dropdownFilterOptions:n.state.statusTypes}]},n.openDiscipline=function(e){e.id&&T.push(x.generate(x.DISCIPLINE_DETAILS,{id:e.id},{}))},n.addDiscipline=function(){T.push(x.generate(x.NEW_DISCIPLINE))},n.state={statusTypes:[]},n}return R_(t,e),t.prototype.componentDidMount=function(){this.fetchData()},t.prototype.render=function(){var e=this,t=[];return t.push(oo.Reset()),t.push(oo.Export((function(t){return e.setState({exporting:!0}),m_.exportDisciplineList(t).then((function(t){e.setState({exporting:!1}),R.a.downloadBase64StringAsFile("Discipline_"+$r.getDateStamp()+".xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",null!==t&&void 0!==t?t:void 0)}))}),this.state.exporting)),Je.isAuthorized([gn.EDIT_DISCIPLINE])&&t.pu
1sh(oo.Default("New Discipline",(function(){return e.addDiscipline()}))),Object(o.jsx)(io,{ref:function(t){return e._dataTable=t},onRowClick:this.openDiscipline,serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:t,columns:this.getColumnDefinitions(),fetchData:{fetch:function(e){return m_.getDisciplineTableData(e)}},stateSaving:{enabled:!0,tableUniqueKey:"disciplines_list"}},void 0)},t}(a.Component),T_=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),C_=function(e){function t(t){var n=e.call(this,t)||this;return n.goToConfig=function(){T.goBack()},n.state={disciplineTableData:[],loading:!1,exporting:!1,statuses:[]},n}return T_(t,e),t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Disciplines",onBack:this.goToConfig,breadcrumbs:Xn.disciplineList()},void 0),Object(o.jsx)(Qn.a,{children:Object(o.jsx)(__,{},void 0)},void 0)]},void 0)},t}(a.Component),x_=Object(u.i)(C_),A_=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),P_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return A_(t,e),t.prototype.getDocumentArchiveTableData=function(e){var t="api/documentArchive/getDocumentArchiveTableData";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t}(U),N_=new P_,w_=function(){function e(){}return e.RUNNING=1,e.COMPLETE=2,e.ERROR=3,e}(),D_={className:"DocumentArchiveDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",generatingUserId:"00000000-0000-0000-0000-000000000000",user:null,queued:new Date(0).toISOString(),documentTypeId:0,documentType:null,parameters:"",documentStatusId:0,documentStatus:null,message:"",azureBlobId:null,azureBlobFile:null,completed:null},e)},id:"id",generatingUserId:"generatingUserId",user:"user",queued:"queued",documentTypeId:"documentTypeId",documentType:"documentType",parameters:"parameters",documentStatusId:"documentStatusId",documentStatus:"documentStatus",message:"message",azureBlobId:"azureBlobId",azureBlobFile:"azureBlobFile",completed:"completed"},q_=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),F_=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(){Ii.DocumentTypes().then((function(e){n.setState({documentTypes:e})})),Ii.DocumentStatuses().then((function(e){n.setState({documentStatuses:e})}))},n.getColumnDefinitions=function(){return[{title:"User",dataIndex:D_.generatingUserId,sorter:!0,filterType:wr.Text,render:function(e,t){var n,r;return null!==(r=null===(n=t.user)||void 0===n?void 0:n.fullName)&&void 0!==r?r:""}},{title:"Document Type",dataIndex:D_.documentTypeId,sorter:!0,filterType:wr.DropdownMulti,dropdownFilterOptions:n.state.documentTypes,render:function(e,t){var n,r;return null!==(r=null===(n=t.documentType)||void 0===n?void 0:n.name)&&void 0!==r?r:""}},{title:"Status",dataIndex:D_.documentStatusId,sorter:!0,filterType:wr.DropdownMulti,dropdownFilterOptions:n.state.documentStatuses,render:function(e,t){var n,r;return null!==(r=null===(n=t.documentStatus)||void 0===n?void 0:n.name)&&void 0!==r?r:""}},{title:"Queued",dataIndex:D_.queued,sorter:!0,filterType:wr.DateRange,render:function(e,t){if(t.queued)return $r.shortDateAndTime(t.queued)}},{title:"Completed",dataIndex:D_.completed,sorter:!0,filterType:wr.DateRange,render:function(e,t){if(t.completed)return $r.shortDateAndTime(t.completed)}},{title:"File",dataIndex:D_.azureBlobId,sorter:!0,render:function(e,t){var n,r,i,a;return t.documentStatusId==w_.COMPLETE?Object(o.jsx)(YR,{azureBlobFileId:null!==(n=t.azureBlobId)&&void 0!==n?n:re.default.Empty(),text:null!==(i=null===(r=null===t||void 0===t?void 0:t.azureBlobFile)||void 0===r?void 0:r.fileName)&&void 0!==i?i:"Unknown"},t.azureBlobId):t.documentStatusId==w_.RUNNING?null===(a=t.azureBlobFile)||void 0===a?void 0:a.fileName:void 0},filterType:wr.Text},{title:"Message",dataIndex:D_.message,sorter:!0,filterType:wr.Text},{title:"Id",dataIndex:D_.id,sorter:!0,filterType:wr.Text}]},n.state={documentTypes:[],documentStatuses:[]},n}return q_(t,e),t.prototype.componentDidMount=function(){this.fetchData()},t.prototype.render=function(){var e=this,t=[];return t.push(oo.Reset()),Object(o.jsx)(o.Fragment,{children:Object(o.jsx)(io,{ref:function(t){return e._dataTable=t},serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:t,columns:this.getColumnDefinitions(),fetchData:{fetch:function(e){return N_.getDocumentArchiveTableData(e)}},stateSaving:{enabled:!0,tableUniqueKey:"thirdPartyCredentialType_list"}},void 0)},void 0)},t}(a.Component),M_=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Y_=function(){return Y_=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}
1,Y_.apply(this,arguments)},U_=function(e){function t(t){var n=e.call(this,t)||this;return n.onBack=function(){T.push(x.generate(x.ACADEMIC_YEARS,{},{}))},n}return M_(t,e),t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Document Archive",breadcrumbs:Xn.documentArchive(),onBack:this.onBack},void 0),Object(o.jsx)(y.b,Y_({direction:"vertical",size:"large"},{children:Object(o.jsx)(Qn.a,Y_({title:"Document Archive"},{children:Object(o.jsx)(y.b,Y_({direction:"vertical",size:"large"},{children:Object(o.jsx)(F_,{},void 0)}),void 0)}),void 0)}),void 0)]},void 0)},t}(a.Component);var L_=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected}}))(U_)),k_=function(e){return Object.assign({institutionIds:[],termId:"00000000-0000-0000-0000-000000000000",year:0},e)},G_="institutionIds",V_="termId",B_=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),W_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return B_(t,e),t.prototype.exportEPR=function(e){var t="api/downloads/exportEPR";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.exportNOI=function(e){var t="api/downloads/noiReport",n=t.indexOf("?")>0?"&":"?";return null!=e&&(t+=n+"changeRequestId="+encodeURIComponent(e),n="&"),t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"get",t,!0,!1)},t.prototype.exportNOIICCPHSE=function(e,t){var n="api/downloads/noiICCPHSEReport",r=n.indexOf("?")>0?"&":"?";return null!=e&&(n+=r+"changeRequestId="+encodeURIComponent(e),r="&"),null!=t&&(n+=r+"noticeOfIntentId="+encodeURIComponent(t),r="&"),n=n.replace(/null|undefined/gi,""),this.SendRequest(null,"get",n,!0,!1)},t.prototype.exportProgram=function(e){var t="api/downloads/programReport",n=t.indexOf("?")>0?"&":"?";return null!=e&&(t+=n+"changeRequestId="+encodeURIComponent(e),n="&"),t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"get",t,!0,!1)},t.prototype.newProgramProposal=function(e){var t="api/downloads/newProgramProposal",n=t.indexOf("?")>0?"&":"?";return null!=e&&(t+=n+"changeRequestId="+encodeURIComponent(e),n="&"),t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"get",t,!0,!1)},t.prototype.laborMarketInformationReport=function(e){var t="api/downloads/laborMarketInformationReport",n=t.indexOf("?")>0?"&":"?";return null!=e&&(t+=n+"changeRequestId="+encodeURIComponent(e),n="&"),t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"get",t,!0,!1)},t.prototype.exportProgramMasterReport=function(e,t,n){var r="api/downloads/programMasterReport",i=r.indexOf("?")>0?"&":"?";return null!=e&&(r+=i+"termId="+encodeURIComponent(e),i="&"),null!=t&&(r+=i+"year="+t,i="&"),null!=n&&(r+=i+"institutionId="+encodeURIComponent(n),i="&"),r=r.replace(/null|undefined/gi,""),this.SendRequest(null,"get",r,!0,!1)},t}(U),z_=new W_,H_=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Q_=function(){return Q_=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Q_.apply(this,arguments)},K_=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n.getFormItems=function(){return(new Map).set(G_,{name:G_,label:"Please select the institutions you want in the EPR. If none are selected then all institutions will be included."}).set(V_,{name:V_,label:"Term",required:!0,rules:[Ot.required(),function(){return{validator:_t.termAndYearValidator()}}]})},n.resetForm=function(){var e;n.setState({altered:!1}),null===(e=n._formRef.current)||void 0===e||e.resetFields()},n.fetchData=function(){var e=[];n.state.institutions&&0!=n.state.institutions.length||e.push(n.loadInstitutions()),Promise.all(e).then((function(){n.setState({loading:!1})}
1))},n.loadInstitutions=function(){return ce.getAll(ne.className).then((function(e){e&&n.setState({institutions:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.reset=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields()},n.getValue=function(){var e,t,r=n._formRef?n._formRef.current.getFieldsValue():null;return{institutionIds:null!==(e=null===r||void 0===r?void 0:r.institutionIds)&&void 0!==e?e:[],termYear:null!==(t=null===r||void 0===r?void 0:r.term)&&void 0!==t?t:Rs.create()}},n.handleSubmit=function(){var e,t=n._formRef?n._formRef.current.getFieldsValue():null;Rd.a.info({title:"File Requested",content:"The file you have requested has been queued. You will receive an email once the file has been generated."});var r=k_({institutionIds:null!==(e=t.institutionIds)&&void 0!==e?e:[],termId:t.termId.termId,year:t.termId.year});z_.exportEPR(r),n.props.onComplete&&n.props.onComplete()},n.state={institutions:[],institutionId:re.default.Empty()},n}return H_(t,e),t.prototype.componentDidMount=function(){var e;this.setState({loading:!0,institutionId:null!==(e=this.props.institutionId)&&void 0!==e?e:re.default.Empty()}),this.fetchData()},t.prototype.componentDidUpdate=function(e){var t,n=this;e.institutionId!=this.props.institutionId&&(this.setState({institutionId:null!==(t=this.props.institutionId)&&void 0!==t?t:re.default.Empty()},(function(){return n.resetForm()})),this.fetchData())},t.prototype.render=function(){return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsx)(y.b,Q_({direction:"vertical"},{children:Object(o.jsx)(ht.a,Q_({ref:this._formRef,onFinish:this.handleSubmit,layout:"vertical"},{children:Object(o.jsxs)(y.b,Q_({direction:"vertical",size:"small"},{children:[Object(o.jsx)(ht.a.Item,Q_({initialValue:this.state.institutionId==re.default.Empty()?void 0:[this.state.institutionId]},this.getFormItems().get(G_),{children:Object(o.jsx)(hd,Q_({mode:"multiple",allowClear:!0,showSearch:!0,optionFilterProp:"children",disabled:this.props.institutionId!=re.default.Empty()},{children:this.renderInstitutionOptions()}),void 0)}),void 0),Object(o.jsx)(ht.a.Item,Q_({},this.getFormItems().get(V_),_t.getValidation(V_,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(Od,{},void 0)}),void 0),Object(o.jsx)(ot.a.Text,Q_({italic:!0},{children:"This process may take a while to complete."}),void 0),Object(o.jsxs)(y.b,Q_({direction:"horizontal"},{children:[this.props.isModal?null:Object(o.jsx)(rt.a,Q_({type:"primary",htmlType:"submit"},{children:"Download EPR"}),void 0),Object(o.jsx)(Ir,{onConfirm:this.resetForm},void 0)]}),void 0)]}),void 0)}),void 0)}),void 0)},t.prototype.renderInstitutionOptions=function(){var e=this;return this.state.institutions.map((function(t){return e.renderInstitutionOption(t)}))},t.prototype.renderInstitutionOption=function(e){if(e.id)return Object(o.jsx)(pr.a.Option,Q_({value:e.id},{children:e.name}),e.id)},t}(a.Component),X_="term",J_="institutionId",$_=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{d(r.next(e))}catch(t){o(t)}}function s(e){try{d(r.throw(e))}catch(t){o(t)}}function d(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}d((r=r.apply(e,t||[])).next())}))},Z_=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},eT=function(){function e(){}return e.getCurrent=function(){return $_(this,void 0,Promise,(function(){var e;return Z_(this,(function(t){switch(t.label){case 0:return e={},[4,this.getCurrentTerm()];case 1:return[2,(e.termId=t.sent().id,e.year=this.getCurrentYear(),e)]}}))}))},e.getCurrentYear=function(){return It()().year()},e.getCurrentTerm=function(){return $_(this,void 0,Promise,(function(){var e,t,n,r=this;return Z_(this,(function(i){switch(i.label){case 0:return[4,ce.getAll(Rs.className)];case 1:return e=i.sent(),t=365==It()().dayOfYear()?270:1,n=It()().add(t,"day").dayOfYear(),[2,e.filter((function(e){return It()(r.getCurrentYear()+e.startDate.toString().substring(4)).add(1,"day").dayOfYear()<=n})).sort((function(e,t){return It()(t.startDate).add(1,"day").dayOfYear()-It()(e.startDate).add(1,"day").dayOfYear()}))[0]]}}))}))},e.getYearOptions=function(){for(var e=It()().year()+5,t=[];e>=2e3;)t.push(e--);return t},e.getTermOptions=function(){return $_(this,void 0,Promise,(function(){return Z_(this,(function(e){switch(e.label){case 0:return[4,ce.getAll(Rs.className).then((function(e){return null!==e&&void 0!==e?e:[]}))];case 1:return[2,e.sent()]}}))}))},e}(),tT=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),nT=function(){return nT=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},nT.apply(this,arguments)},rT=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._formItems=(new Map).set(X_,{name:X_,label:"Term",required:!0,rules:[Ot.required()]}).set(J_,{name:J_,label:"Community College",required:!0,rules:[Ot.required()]}),n.fetchData=function(){n.setState({loading:!0});var e=[];null==n.state.currentYearTerm&&e.push(n.loadCurrentYearTerm()),n.state.awardTypes&&0!=n.state.awardTypes.length||e.push(n.loadAwardTypes()),n.state.institutions&&0!=n.state.institutions.length||e.push(n.loadInstitutions()),Promise.all(e).then((function(){n.setState({loading:!1})}
1))},n.loadCurrentYearTerm=function(){return eT.getCurrent().then((function(e){var t;e&&(n.setState({currentYearTerm:e}),null===(t=n._formRef.current)||void 0===t||t.setFieldsValue({term:{termId:e.termId,year:e.year}}))})).catch((function(){n.setState({error:!0})}))},n.loadAwardTypes=function(){return ce.getAll(si.className).then((function(e){e&&n.setState({awardTypes:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadInstitutions=function(){return ce.getAll(ne.className).then((function(e){e&&n.setState({institutions:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields(),n.setState({altered:!1})},n.handleSubmit=function(){var e,t,r,i=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldValue(X_).termId,o=null===(t=n._formRef.current)||void 0===t?void 0:t.getFieldValue(X_).year,a=n.props.institutionId?n.props.institutionId:null===(r=n._formRef.current)||void 0===r?void 0:r.getFieldValue(J_);window.open(x.generateFull(x.COMPLIANCE_REPORT,{},{termId:i,year:o,institutionId:a}),"_blank")},n.state={awardTypes:[],institutions:[],currentYearTerm:null},n}return tT(t,e),t.prototype.componentDidMount=function(){this.fetchData()},t.prototype.render=function(){return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsx)(y.b,nT({size:"small",direction:"vertical"},{children:Object(o.jsxs)(ht.a,nT({ref:this._formRef,layout:"vertical",onFinish:this.handleSubmit,requiredMark:!0},{children:[Object(o.jsx)(mt.a,nT({},this._formItems.get("term"),_t.getValidation("term",this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(Od,{},void 0)}),void 0),this.props.institutionId?null:Object(o.jsx)(mt.a,nT({},this._formItems.get(J_),_t.getValidation(J_,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(hd,{disabled:this.state.loading||this.state.submitting,showArrow:!0,options:this.state.institutions.map((function(e){var t;return{value:null!==(t=e.id)&&void 0!==t?t:re.default.Empty(),label:e.name}}))},void 0)}),void 0),Object(o.jsxs)(y.b,nT({direction:"horizontal"},{children:[Object(o.jsx)(Jm,{downloading:this.state.submitting},void 0),Object(o.jsx)(Ir,{onConfirm:this.resetForm},void 0)]}),void 0)]}),void 0)}),void 0)},t}(a.Component),iT=function(e){return Object.assign({term:null,institutionId:null},e)},oT="term",aT="institutionId",sT=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),dT=function(){return dT=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},dT.apply(this,arguments)},cT=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._formItems=(new Map).set(oT,{name:oT,label:"Please Select a Term.",required:!0,rules:[Ot.required()]}).set(aT,{name:aT,label:"Please select the institutions you want. If none are selected then all institutions will be displayed "}),n.fetchData=function(){n.setState({loading:!0});var e=[];null==n.state.currentYearTerm&&e.push(n.loadCurrentYearTerm()),n.state.modesOfDelivery&&0!=n.state.modesOfDelivery.length||e.push(n.loadModesOfDelivery()),n.state.cipNumbers&&0!=n.state.cipNumbers.length||e.push(n.loadCipNumbers()),n.state.institutions&&0!=n.state.institutions.length||e.push(n.loadInstitutions()),Promise.all(e).then((function(){n.setState({loading:!1})}))},n.loadCipNumbers=function(){return Dp.getCipNumbers().then((function(e){var t;e&&n.setState({cipNumbers:null!==(t=e.cipNumbers)&&void 0!==t?t:[]})})).catch((function(){n.setState({error:!0})}))},n.loadCurrentYearTerm=function(){return eT.getCurrent().then((function(e){var t;e&&(n.setState({currentYearTerm:e}),null===(t=n._formRef.current)||void 0===t||t.setFieldsValue({term:{termId:e.termId,year:e.year}}))})).catch((function(){n.setState({error:!0})}
1))},n.loadModesOfDelivery=function(){return ce.getAll(Bc.className).then((function(e){e&&n.setState({modesOfDelivery:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadInstitutions=function(){return ce.getAll(ne.className).then((function(e){e&&n.setState({institutions:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.resetForm=function(){var e;n.setState({altered:!1}),null===(e=n._formRef.current)||void 0===e||e.resetFields()},n.handleSubmit=function(){var e,t,r,i,o,a=iT(null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldsValue()),s=null===(t=n._formRef.current)||void 0===t?void 0:t.getFieldValue(oT).termId,d=null===(r=n._formRef.current)||void 0===r?void 0:r.getFieldValue(oT).year;Rd.a.info({title:"File Requested",content:"The file you have requested has been queued. You will receive an email once the file has been generated."}),z_.exportProgramMasterReport(s,d,null!==(o=null!==(i=a.institutionId)&&void 0!==i?i:n.state.institutionId)&&void 0!==o?o:re.default.Empty())},n.state={modesOfDelivery:[],cipNumbers:[],institutions:[],currentYearTerm:null,institutionId:re.default.Empty()},n}return sT(t,e),t.prototype.componentDidMount=function(){var e;this.setState({institutionId:null!==(e=this.props.institutionId)&&void 0!==e?e:re.default.Empty()}),this.fetchData()},t.prototype.componentDidUpdate=function(e){var t,n=this;e.institutionId!=this.props.institutionId&&(this.setState({institutionId:null!==(t=this.props.institutionId)&&void 0!==t?t:re.default.Empty()},(function(){return n.resetForm()})),this.fetchData())},t.prototype.render=function(){var e=this;return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsx)(y.b,dT({size:"small",direction:"vertical"},{children:Object(o.jsxs)(ht.a,dT({ref:this._formRef,layout:"vertical",onFinish:this.handleSubmit,requiredMark:!0},{children:[Object(o.jsx)(mt.a,dT({},this._formItems.get(oT),_t.getValidation(oT,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(Od,{},void 0)}),void 0),this.state.institutionId==re.default.Empty()?Object(o.jsx)(mt.a,dT({},this._formItems.get(aT),_t.getValidation(aT,this.state.fieldErrors,this.state.submitted),{initialValue:this.state.institutionId==re.default.Empty()?void 0:this.state.institutionId},{children:Object(o.jsxs)(hd,dT({disabled:this.state.institutionId!=re.default.Empty()},{children:[" ",this.state.institutions.map((function(t){return e.renderInstituion(t)}))]}),void 0)}),void 0):null,Object(o.jsxs)(y.b,dT({direction:"horizontal"},{children:[Object(o.jsx)(Jm,{downloading:this.state.submitting},void 0),Object(o.jsx)(Ir,{onConfirm:this.resetForm},void 0)]}),void 0)]}),void 0)}),void 0)},t.prototype.renderInstituion=function(e){var t,n,r;if(e.id)return Object(o.jsx)(pr.a.Option,dT({title:null!==(t=e.name)&&void 0!==t?t:"",value:null!==(n=e.id)&&void 0!==n?n:re.default.Empty()},{children:e.name}),null!==(r=e.id)&&void 0!==r?r:re.default.Empty())},t.prototype.renderModesOfDelivery=function(e){var t,n,r;if(e.id)return Object(o.jsx)(pr.a.Option,dT({title:null!==(t=e.name)&&void 0!==t?t:"",value:null!==(n=e.id)&&void 0!==n?n:re.default.Empty()},{children:e.name}),null!==(r=e.id)&&void 0!==r?r:re.default.Empty())},t.prototype.renderCipNumbers=function(e){var t,n,r;if(e.id)return Object(o.jsx)(pr.a.Option,dT({title:null!==(t=null===e||void 0===e?void 0:e.friendlyDisplay)&&void 0!==t?t:"",value:null!==(n=e.cipNumberId)&&void 0!==n?n:re.default.Empty()},{children:null===e||void 0===e?void 0:e.friendlyDisplay}),null!==(r=e.cipNumberId)&&void 0!==r?r:re.default.Empty())},t}(a.Component),lT=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),uT=function(){return uT=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},uT.apply(this,arguments)},pT=function(e){function t(t){var n=e.call(this,t)||this;return n.goHome=function(){T.push(x.generate(x.POST_SECONDARY_HOME))},n.state={institutionId:re.default.Empty()},n}return lT(t,e),t.prototype.render=function(){var e,t,n,r,i,a;return Object(o.jsxs)(y.b,uT({direction:"vertical"},{children:[Object(o.jsx)(rr,{title:"Downloads",onBack:this.goHome,breadcrumbs:Xn.downLoads()},void 0),Object(o.jsx)(Qn.a,uT({title:"Compliance Report"},{children:Object(o.jsx)(rT,{institutionId:null!==(t=null===(e=this.props.institution)||void 0===e?void 0:e.id)&&void 0!==t?t:void 0},void 0)}),void 0),Object(o.jsx)(Qn.a,uT({title:"Program Master Report"},{children:Object(o.jsx)(cT,{institutionId:null!==(r=null===(n=this.props.institution)||void 0===n?void 0:n.id)&&void 0!==r?r:void 0},void 0)}),void 0),Object(o.jsx)(Qn.a,uT({title:"EPR Download"},{children:Object(o.jsx)(K_,{institutionId:null!==(a=null===(i=this.props.institution)||void 0===i?void 0:i.id)&&void 0!==a?a:re.default.Empty()},void 0)}),void 0)]}),void 0)},t}(a.Component);var fT=Object(u.i)(Object(l.b)((function(e){return{institution:e.Institution.Selected}}))(pT)),hT=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),vT=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return hT(t,e),t.prototype.getExternalInstitutionsDataTable=function(e){var t="api/externalInstitution";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getExternalInstitutionDataTableExport=function(e){var t="api/externalInstitution/export";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)}
1,t.prototype.getExternalInstitutionDetails=function(e){var t="api/externalInstitution/"+e;return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.saveExternalInstitutionDetails=function(e){var t="api/externalInstitution/save";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.deleteExternalInstitution=function(e){var t="api/externalInstitution/deleteExternalInstitution";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t}(U),mT=new vT,gT=function(e){return Object.assign({externalInstitutionId:0,externalInstitution:null},e)},bT=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),yT=function(){return yT=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},yT.apply(this,arguments)},OT=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._formItems=(new Map).set(mp.name,{required:!0,name:mp.name,label:"Name",rules:[Ot.required(),Ot.maxLength(50)]}).set(mp.abbreviation,{required:!0,name:mp.abbreviation,label:"Abbreviation",rules:[Ot.required(),Ot.maxLength(10)]}),n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields(),n.setState({altered:!1})},n.loadExisting=function(){n.props.externalInstitutionId&&mT.getExternalInstitutionDetails(n.props.externalInstitutionId).then((function(e){e&&e.externalInstitution&&n.setState({externalInstitutionId:e.externalInstitution.id,externalInstitution:e.externalInstitution,loading:!1}),n.resetForm()})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))},n.loadNew=function(){n.setState({externalInstitution:mp.create(),loading:!1})},n.handleChange=function(){n.setState({altered:!0})},n.handleSubmit=function(){n.setState({submitting:!0});var e=gT({externalInstitutionId:n.state.externalInstitutionId,externalInstitution:mp.create(n._formRef?n._formRef.current.getFieldsValue():null)});mT.saveExternalInstitutionDetails(e).then((function(e){var t;n.setState({submitted:!0,externalInstitution:null===e||void 0===e?void 0:e.externalInstitution}),(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.props.onSave&&(null===(t=e.externalInstitution)||void 0===t?void 0:t.id)&&(n.props.onSave(e.externalInstitution.id),n.resetForm()),ce.invalidateCache(mp.className)):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("External Institution could not be saved. "+n.state.message))})).catch((function(e){n.setState({error:e}),S.b.error("External Institution could not be saved.")})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.state={externalInstitutionId:0,externalInstitution:mp.create()},n}return bT(t,e),t.prototype.componentDidMount=function(){this.setState({loading:!0}),this.loadExternalInstitution()},t.prototype.componentDidUpdate=function(e){this.props.externalInstitutionId&&this.props.externalInstitutionId!=e.externalInstitutionId&&(this.setState({externalInstitutionId:this.props.externalInstitutionId}),this.loadExternalInstitution())},t.prototype.loadExternalInstitution=function(){0==this.props.externalInstitutionId?this.loadNew():this.loadExisting()},t.prototype.render=function(){var e,t;return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(y.b,yT({size:"small",direction:"vertical"},{children:[this.renderErrors(),Object(o.jsxs)(ht.a,yT({ref:this._formRef,layout:"vertical",onValuesChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!0},{children:[Object(o.jsx)(mt.a,yT({},this._formItems.get(mp.abbreviation),{initialValue:null===(e=this.state.externalInstitution)||void 0===e?void 0:e.abbreviation},_t.getValidation(mp.abbreviation,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,yT({},this._formItems.get(mp.name),{initialValue:null===(t=this.state.externalInstitution)||void 0===t?void 0:t.name},_t.getValidation(mp.name,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),this.renderSave()]}),void 0)]}),void 0)},t.prototype.renderSave=function(){if(this.props.isEditing)return Object(o.jsx)(Ze,yT({validFeatureFlags:[gn.EDIT_EXTERNAL_INSTITUTIONS]},{children:Object(o.jsxs)(y.b,yT({direction:"horizontal"},{children:[Object(o.jsx)(Tr,{saving:this.state.saving},void 0),Object(o.jsx)(Ir,{onConfirm:this.resetForm,disabled:!this.state.altered},void 0)]}),void 0)}),void 0)},t.prototype.renderErrors=function(){if(this.state.error&&this.state.submitted)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t}(a.Component),jT=function(e){return Object.assign({externalInstitutionId:null},e)},IT=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ST=function(){return ST=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ST.apply(this,arguments)},ET=function(e){function t(t){var n=e.call(this,t)||this;
1return n._externalInstitutionDetailsRef=a.createRef(),n.loadExternalInstitution=function(e){n.setState({externalInstitutionId:e}),mT.getExternalInstitutionDetails(e).then((function(e){e.externalInstitution&&n.setState({externalInstitution:e.externalInstitution})})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))},n.deleteConfirmation=function(e){f.a.confirm({title:"Are you sure you want to delete this External Institution?",okText:"Delete",onOk:function(){return n.deleteExternalInstitution(e)}})},n.deleteExternalInstitution=function(e){n.setState({submitting:!0});var t=jT({externalInstitutionId:e});mT.deleteExternalInstitution(t).then((function(e){n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,altered:!(null===e||void 0===e?void 0:e.succeeded)}),!0===(null===e||void 0===e?void 0:e.succeeded)?S.b.success("External Institution was removed."):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(e){n.setState({error:e}),S.b.error("External Institution could not be removed.")})).finally((function(){n.setState({loading:!1}),n.goToExternalInstitution()}))},n.toggleEdit=function(){var e;n.state.isEditing&&(null===(e=n._externalInstitutionDetailsRef.current)||void 0===e||e.resetForm()),n.setState({isEditing:!n.state.isEditing})},n.externalInstitutionDetailsSaved=function(e){n.setState({isEditing:!1}),e!=n.state.externalInstitutionId?T.replace(x.generate(x.EXTERNAL_INSTITUTIONS_DETAILS,{id:e})):n.loadExternalInstitution(e)},n.goToExternalInstitution=function(){T.goBack()},n.state={externalInstitutionId:0},n}return IT(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");if("new"==e)this.setState({isEditing:!0,isNew:!0,loading:!1});else{var t=Number.parseInt(e);this.loadExternalInstitution(t)}},t.prototype.render=function(){var e,t,n=this.state.loading?"...":0==this.state.externalInstitutionId?"New External Institution":null!==(t=null===(e=this.state.externalInstitution)||void 0===e?void 0:e.name)&&void 0!==t?t:"...";return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:n,onBack:this.goToExternalInstitution,breadcrumbs:Xn.externalIntitutionDetails(n,this.state.externalInstitutionId),extra:this.renderMoreActions()},void 0),Object(o.jsx)(zr,{when:this.state.isEditing},void 0),this.renderDetailsCard()]},void 0)},t.prototype.renderDetailsCard=function(){var e=0==this.state.externalInstitutionId?null:Object(o.jsx)(Ze,ST({validFeatureFlags:[gn.EDIT_EXTERNAL_INSTITUTIONS]},{children:Object(o.jsx)(Br,{isEditing:this.state.isEditing,onClick:this.toggleEdit},void 0)}),void 0);return Object(o.jsx)(Qn.a,ST({title:"Details",extra:e},{children:Object(o.jsx)(OT,{ref:this._externalInstitutionDetailsRef,externalInstitutionId:this.state.externalInstitutionId,isEditing:this.state.isEditing,isNew:this.state.isNew,onSave:this.externalInstitutionDetailsSaved},void 0)}),void 0)},t.prototype.renderMoreActions=function(){var e=this,t=Object(o.jsx)(Gt.a,{children:Object(o.jsx)(Gt.a.Item,ST({title:"Delete External Institution",onClick:function(){return e.deleteConfirmation(e.state.externalInstitutionId)}},{children:"Delete External Institution"}),this.state.externalInstitutionId)},void 0);return Object(o.jsx)(Ze,ST({validFeatureFlags:[gn.EDIT_EXTERNAL_INSTITUTIONS]},{children:Object(o.jsx)(la.a,ST({overlay:t},{children:Object(o.jsx)(rt.a,ST({size:"large",type:"link"},{children:Object(o.jsx)(aa.a,{},void 0)}),void 0)}),void 0)}),void 0)},t}(a.Component),RT=Object(u.i)(ET),_T=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),TT=function(e){function t(t){var n=e.call(this,t)||this;return n.getColumnDefinitions=function(){return[{title:"Abbreviation",dataIndex:mp.abbreviation,sorter:!0,filterType:wr.Text,width:85},{title:"Name",dataIndex:mp.name,sorter:!0,filterType:wr.Text}]},n.openExternalInstitution=function(e){e.id&&T.push(x.generate(x.EXTERNAL_INSTITUTIONS_DETAILS,{id:e.id},{}))},n.addExternalInstitution=function(){T.push(x.generate(x.NEW_EXTERNAL_INSTITUTIONS))},n.state={},n}return _T(t,e),t.prototype.render=function(){var e=this,t=[];return t.push(oo.Reset()),t.push(oo.Export((function(t){return e.setState({exporting:!0}),mT.getExternalInstitutionDataTableExport(t).then((function(t){e.setState({exporting:!1}),R.a.downloadBase64StringAsFile("External_Institution_"+$r.getDateStamp()+".xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",null!==t&&void 0!==t?t:void 0)}))}),this.state.exporting)),Je.isAuthorized([gn.EDIT_EXTERNAL_INSTITUTIONS])&&t.pu
1sh(oo.Default("New External Institution",(function(){return e.addExternalInstitution()}))),Object(o.jsx)(o.Fragment,{children:Object(o.jsx)(io,{ref:function(t){return e._dataTable=t},onRowClick:this.openExternalInstitution,serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:t,columns:this.getColumnDefinitions(),fetchData:{fetch:function(e){return mT.getExternalInstitutionsDataTable(e)}},stateSaving:{enabled:!0,tableUniqueKey:"external_Institution_list"}},void 0)},void 0)},t}(a.Component),CT=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),xT=function(e){function t(t){var n=e.call(this,t)||this;return n.goToConfig=function(){T.goBack()},n}return CT(t,e),t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"External Institution",onBack:this.goToConfig,breadcrumbs:Xn.externalInstitutionList()},void 0),Object(o.jsx)(Qn.a,{children:Object(o.jsx)(TT,{},void 0)},void 0)]},void 0)},t}(a.Component),AT=Object(u.i)(xT),PT=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),NT=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return PT(t,e),t.prototype.getGendersDataTable=function(e){var t="api/gender";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getGenderDataTableExport=function(e){var t="api/gender/export";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getGenderDetails=function(e){var t="api/gender/"+e;return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.saveGenderDetails=function(e){var t="api/gender/save";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.deleteGender=function(e){var t="api/gender/deleteGender";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t}(U),wT=new NT,DT=function(e){return Object.assign({genderId:0,gender:null},e)},qT=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),FT=function(){return FT=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},FT.apply(this,arguments)},MT=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._formItems=(new Map).set(Bu.name,{required:!0,name:Bu.name,label:"Name",rules:[Ot.required(),Ot.maxLength(50)]}).set(Bu.abbreviation,{required:!0,name:Bu.abbreviation,label:"Abbreviation",rules:[Ot.required(),Ot.maxLength(10)]}),n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields(),n.setState({altered:!1})},n.loadExisting=function(){n.props.genderId&&wT.getGenderDetails(n.props.genderId).then((function(e){e&&e.gender&&n.setState({genderId:e.gender.id,gender:e.gender,loading:!1}),n.resetForm()})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))},n.loadNew=function(){n.setState({gender:Bu.create(),loading:!1})},n.handleChange=function(){n.setState({altered:!0})},n.handleSubmit=function(){n.setState({submitting:!0});var e=DT({genderId:n.state.genderId,gender:Bu.create(n._formRef?n._formRef.current.getFieldsValue():null)});wT.saveGenderDetails(e).then((function(e){var t;n.setState({submitted:!0,gender:null===e||void 0===e?void 0:e.gender}),(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.props.onSave&&(null===(t=e.gender)||void 0===t?void 0:t.id)&&(n.props.onSave(e.gender.id),n.resetForm()),ce.invalidateCache(Bu.className)):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Gender could not be saved. "+n.state.message))})).catch((function(e){n.setState({error:e}),S.b.error("Gender could not be saved.")})).finally((function(){n.setState({loading:!1,submitting:!1})}
1))},n.state={genderId:0,gender:Bu.create()},n}return qT(t,e),t.prototype.componentDidMount=function(){this.setState({loading:!0}),this.loadGender()},t.prototype.componentDidUpdate=function(e){this.props.genderId&&this.props.genderId!=e.genderId&&(this.setState({genderId:this.props.genderId}),this.loadGender())},t.prototype.loadGender=function(){0==this.props.genderId?this.loadNew():this.loadExisting()},t.prototype.render=function(){var e,t;return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(y.b,FT({size:"small",direction:"vertical"},{children:[this.renderErrors(),Object(o.jsxs)(ht.a,FT({ref:this._formRef,layout:"vertical",onValuesChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!0},{children:[Object(o.jsx)(mt.a,FT({},this._formItems.get(Bu.abbreviation),{initialValue:null===(e=this.state.gender)||void 0===e?void 0:e.abbreviation},_t.getValidation(Bu.abbreviation,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,FT({},this._formItems.get(Bu.name),{initialValue:null===(t=this.state.gender)||void 0===t?void 0:t.name},_t.getValidation(Bu.name,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),this.renderSave()]}),void 0)]}),void 0)},t.prototype.renderSave=function(){if(this.props.isEditing)return Object(o.jsx)(Ze,FT({validFeatureFlags:[gn.EDIT_GENDER]},{children:Object(o.jsxs)(y.b,FT({direction:"horizontal"},{children:[Object(o.jsx)(Tr,{saving:this.state.saving},void 0),Object(o.jsx)(Ir,{onConfirm:this.resetForm,disabled:!this.state.altered},void 0)]}),void 0)}),void 0)},t.prototype.renderErrors=function(){if(this.state.error&&this.state.submitted)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t}(a.Component),YT=function(e){return Object.assign({genderId:null},e)},UT=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),LT=function(){return LT=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},LT.apply(this,arguments)},kT=function(e){function t(t){var n=e.call(this,t)||this;return n._genderDetailsRef=a.createRef(),n.loadGender=function(e){n.setState({genderId:e}),wT.getGenderDetails(e).then((function(e){e.gender&&n.setState({gender:e.gender})})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))},n.deleteConfirmation=function(e){f.a.confirm({title:"Are you sure you want to delete this Gender?",okText:"Delete",onOk:function(){return n.deleteGender(e)}})},n.deleteGender=function(e){n.setState({submitting:!0});var t=YT({genderId:e});wT.deleteGender(t).then((function(e){n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,altered:!(null===e||void 0===e?void 0:e.succeeded)}),!0===(null===e||void 0===e?void 0:e.succeeded)?S.b.success("Gender was removed."):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(e){n.setState({error:e}),S.b.error("Gender could not be removed.")})).finally((function(){n.setState({loading:!1}),n.goToGender()}))},n.toggleEdit=function(){var e;n.state.isEditing&&(null===(e=n._genderDetailsRef.current)||void 0===e||e.resetForm()),n.setState({isEditing:!n.state.isEditing})},n.genderDetailsSaved=function(e){n.setState({isEditing:!1}),e!=n.state.genderId?T.replace(x.generate(x.GENDER_DETAILS,{id:e})):n.loadGender(e)},n.goToGender=function(){T.goBack()},n.state={genderId:0},n}return UT(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");if("new"==e)this.setState({isEditing:!0,isNew:!0,loading:!1});else{var t=Number.parseInt(e);this.loadGender(t)}},t.prototype.render=function(){var e,t,n=this.state.loading?"...":0==this.state.genderId?"New Gender":null!==(t=null===(e=this.state.gender)||void 0===e?void 0:e.name)&&void 0!==t?t:"...";return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:n,onBack:this.goToGender,breadcrumbs:Xn.genderDetails(n,this.state.genderId),extra:this.renderMoreActions()},void 0),Object(o.jsx)(zr,{when:this.state.isEditing},void 0),this.renderDetailsCard()]},void 0)},t.prototype.renderDetailsCard=function(){var e=0==this.state.genderId?null:Object(o.jsx)(Ze,LT({validFeatureFlags:[gn.EDIT_GENDER]},{children:Object(o.jsx)(Br,{isEditing:this.state.isEditing,onClick:this.toggleEdit},void 0)}),void 0);return Object(o.jsx)(Qn.a,LT({title:"Details",extra:e},{children:Object(o.jsx)(MT,{ref:this._genderDetailsRef,genderId:this.state.genderId,isEditing:this.state.isEditing,isNew:this.state.isNew,onSave:this.genderDetailsSaved},void 0)}),void 0)},t.prototype.renderMoreActions=function(){var e=this,t=Object(o.jsx)(Gt.a,{children:Object(o.jsx)(Gt.a.Item,LT({title:"Delete Gender",onClick:function(){return e.deleteConfirmation(e.state.genderId)}},{children:"Delete Gender"}),this.state.genderId)},void 0);return Object(o.jsx)(Ze,LT({validFeatureFlags:[gn.EDIT_GENDER]},{children:Object(o.jsx)(la.a,LT({overlay:t},{children:Object(o.jsx)(rt.a,LT({size:"large",type:"link"},{children:Object(o.jsx)(aa.a,{},void 0)}),void 0)}),void 0)}),void 0)},t}(a.Component),GT=Object(u.i)(kT),VT={className:"GenderDataTableDTO",create:function(e){return Object.assign(Q.create(),{id:0,abbreviation:"",name:""},e)},id:"id",abbreviation:"abbreviation",name:"name"},BT=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),WT=function(e){function t(t){var n=e.call(this,t)||this;return n.getColumnDefinitions=function(){return[{title:"Abbreviation",dataIndex:VT.abbreviation,sorter:!0,filterType:wr.Text,width:85},{title:"Name",dataIndex:VT.name,sorter:!0,filterType:wr.Text}]},n.openGender=function(e){e.id&&T.push(x.generate(x.GENDER_DETAILS,{id:e.id},{}))},n.addGender=function(){T.push(x.generate(x.NEW_GENDER))},n.state={},n}return BT(t,e),t.prototype.render=function(){var e=this,t=[];return t.push(oo.Reset()),t.push(oo.Export((function(t){return e.setState({exporting:!0}),wT.getGenderDataTableExport(t).then((function(t){e.setState({exporting:!1}),R.a.downloadBase64StringAsFile("Gender_"+$r.getDateStamp()+".xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",null!==t&&void 0!==t?t:void 0)}))}),this.state.exporting)),Je.isAuthorized([gn.EDIT_GENDER])&&t.pu
1sh(oo.Default("New Gender",(function(){return e.addGender()}))),Object(o.jsx)(o.Fragment,{children:Object(o.jsx)(io,{ref:function(t){return e._dataTable=t},onRowClick:this.openGender,serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:t,columns:this.getColumnDefinitions(),fetchData:{fetch:function(e){return wT.getGendersDataTable(e)}},stateSaving:{enabled:!0,tableUniqueKey:"gender_list"}},void 0)},void 0)},t}(a.Component),zT=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),HT=function(e){function t(t){var n=e.call(this,t)||this;return n.goToConfig=function(){T.goBack()},n}return zT(t,e),t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Genders",onBack:this.goToConfig,breadcrumbs:Xn.genderList()},void 0),Object(o.jsx)(Qn.a,{children:Object(o.jsx)(WT,{},void 0)},void 0)]},void 0)},t}(a.Component),QT=Object(u.i)(HT),KT=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),XT=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return KT(t,e),t.prototype.getGeneralEducationsDataTable=function(e){var t="api/generalEducation";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getGeneralEducationDetails=function(e){var t="api/generalEducation/"+e;return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.getGeneralEducationDataTableExport=function(e){var t="api/generalEducation/export";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.saveGeneralEducationDetails=function(e){var t="api/generalEducation/save";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.deleteGeneralEducation=function(e){var t="api/generalEducation/deleteGeneralEducation";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getAvailableParents=function(e){var t="api/generalEducation/getAvailableParents";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t}(U),JT=new XT,$T=function(e){return Object.assign({generalEducationId:0},e)},ZT=function(e){return Object.assign({generalEducationId:0,generalEducation:null},e)},eC=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),tC=function(){return tC=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},tC.apply(this,arguments)},nC=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._formItems=(new Map).set(El.code,{required:!0,name:El.code,label:"Code",rules:[Ot.required(),Ot.maxLength(3)]}).set(El.displayOrder,{required:!0,name:El.displayOrder,label:"Display Order",rules:[Ot.required()]}).set(El.name,{required:!0,name:El.name,label:"Name",rules:[Ot.required(),Ot.maxLength(50)]}).set(El.embeddedCredits,{name:El.embeddedCredits,label:"Has Embedded Credits"}).set(El.parentGeneralEducationId,{name:El.parentGeneralEducationId,label:"Parent General Education"}),n.fetchData=function(){n.setState({loading:!0});var e=$T({generalEducationId:n.props.generalEducationId});JT.getAvailableParents(e).then((function(e){var t;n.setState({availableParents:null!==(t=e.generalEducations)&&void 0!==t?t:[]})})).finally((function(){n.setState({loading:!1})}
1))},n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields(),n.setState({altered:!1})},n.loadExisting=function(){n.props.generalEducationId&&JT.getGeneralEducationDetails(n.props.generalEducationId).then((function(e){e&&e.generalEducation&&n.setState({generalEducationId:e.generalEducation.id,generalEducation:e.generalEducation,loading:!1}),n.resetForm()})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))},n.loadNew=function(){n.setState({generalEducation:El.create(),loading:!1})},n.handleChange=function(){n.setState({altered:!0})},n.handleSubmit=function(){n.setState({submitting:!0});var e=ZT({generalEducationId:n.state.generalEducationId,generalEducation:El.create(n._formRef?n._formRef.current.getFieldsValue():null)});JT.saveGeneralEducationDetails(e).then((function(e){var t;n.setState({submitted:!0,generalEducation:null===e||void 0===e?void 0:e.generalEducation}),(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.props.onSave&&(null===(t=e.generalEducation)||void 0===t?void 0:t.id)&&(n.props.onSave(e.generalEducation.id),n.resetForm()),ce.invalidateCache(El.className)):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("General Education could not be saved. "+n.state.message))})).catch((function(e){n.setState({error:e}),S.b.error("General Education could not be saved.")})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.state={generalEducationId:0,generalEducation:El.create(),availableParents:[]},n}return eC(t,e),t.prototype.componentDidMount=function(){this.setState({loading:!0}),this.loadGeneralEducation(),this.fetchData()},t.prototype.componentDidUpdate=function(e){this.props.generalEducationId&&this.props.generalEducationId!=e.generalEducationId&&(this.setState({generalEducationId:this.props.generalEducationId}),this.loadGeneralEducation(),this.fetchData())},t.prototype.loadGeneralEducation=function(){0==this.props.generalEducationId?this.loadNew():this.loadExisting()},t.prototype.render=function(){var e;return this.state.loading||this.props.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(y.b,tC({size:"small",direction:"vertical"},{children:[this.renderErrors(),Object(o.jsxs)(ht.a,tC({ref:this._formRef,layout:"vertical",initialValues:null!==(e=this.state.generalEducation)&&void 0!==e?e:El.create(),onValuesChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!0},{children:[Object(o.jsx)(mt.a,tC({},this._formItems.get(El.code),_t.getValidation(El.code,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,tC({},this._formItems.get(El.name),_t.getValidation(El.name,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,tC({},this._formItems.get(El.displayOrder),_t.getValidation(El.displayOrder,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(Ni.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting,min:1},void 0)}),void 0),Object(o.jsx)(mt.a,tC({},this._formItems.get(El.embeddedCredits),_t.getValidation(El.embeddedCredits,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(Hd,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,tC({},this._formItems.get(El.parentGeneralEducationId),_t.getValidation(El.parentGeneralEducationId,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(pr.a,tC({disabled:!this.props.isEditing||this.state.loading||this.state.submitting,allowClear:!0},{children:this.renderParentOptions()}),void 0)}),void 0),this.renderSave()]}),void 0)]}),void 0)},t.prototype.renderParentOptions=function(){return this.state.availableParents.map((function(e){return Object(o.jsx)(pr.a.Option,tC({value:e.id},{children:e.name}),e.id)}))},t.prototype.renderSave=function(){if(this.props.isEditing)return Object(o.jsx)(Ze,tC({validFeatureFlags:[gn.EDIT_GENERAL_EDUCATION]},{children:Object(o.jsxs)(y.b,tC({direction:"horizontal"},{children:[Object(o.jsx)(Tr,{saving:this.state.saving},void 0),Object(o.jsx)(Ir,{onConfirm:this.resetForm,disabled:!this.state.altered},void 0)]}),void 0)}),void 0)},t.prototype.renderErrors=function(){if(this.state.error&&this.state.submitted)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t}(a.Component),rC=function(e){return Object.assign({generalEducationId:null},e)},iC=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),oC=function(){return oC=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},oC.apply(this,arguments)},aC=function(e){function t(t){var n=e.call(this,t)||this;
1return n._GeneralEducationDetailsRef=a.createRef(),n.loadGeneralEducation=function(e){n.setState({generalEducationId:e}),JT.getGeneralEducationDetails(e).then((function(e){e.generalEducation&&n.setState({generalEducation:e.generalEducation})})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))},n.deleteConfirmation=function(e){f.a.confirm({title:"Are you sure you want to delete this General Education?",okText:"Delete",onOk:function(){return n.deleteGeneralEducation(e)}})},n.deleteGeneralEducation=function(e){n.setState({submitting:!0});var t=rC({generalEducationId:e});JT.deleteGeneralEducation(t).then((function(e){n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,altered:!(null===e||void 0===e?void 0:e.succeeded)}),!0===(null===e||void 0===e?void 0:e.succeeded)?S.b.success("Removed."):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(e){n.setState({error:e}),S.b.error("Removed.")})).finally((function(){n.setState({loading:!1}),n.goToGeneralEducation()}))},n.toggleEdit=function(){var e;n.state.isEditing&&(null===(e=n._GeneralEducationDetailsRef.current)||void 0===e||e.resetForm()),n.setState({isEditing:!n.state.isEditing})},n.GeneralEducationDetailsSaved=function(e){n.setState({isEditing:!1}),e!=n.state.generalEducationId?T.replace(x.generate(x.GENERAL_EDUCATION_DETAILS,{id:e})):n.loadGeneralEducation(e)},n.goToGeneralEducation=function(){T.goBack()},n.state={generalEducationId:0},n}return iC(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");if("new"==e)this.setState({isEditing:!0,isNew:!0,loading:!1});else{var t=Number.parseInt(e);this.loadGeneralEducation(t)}},t.prototype.render=function(){var e,t,n=this.state.loading?"...":0==this.state.generalEducationId?"New General Education":null!==(t=null===(e=this.state.generalEducation)||void 0===e?void 0:e.name)&&void 0!==t?t:"...";return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:n,onBack:this.goToGeneralEducation,breadcrumbs:Xn.generalEducationDetails(n,this.state.generalEducationId),extra:this.renderMoreActions()},void 0),Object(o.jsx)(zr,{when:this.state.isEditing},void 0),this.renderDetailsCard()]},void 0)},t.prototype.renderDetailsCard=function(){var e=0==this.state.generalEducationId?null:Object(o.jsx)(Ze,oC({validFeatureFlags:[gn.EDIT_GENERAL_EDUCATION]},{children:Object(o.jsx)(Br,{isEditing:this.state.isEditing,onClick:this.toggleEdit},void 0)}),void 0);return Object(o.jsx)(Qn.a,oC({title:"Details",extra:e},{children:Object(o.jsx)(nC,{ref:this._GeneralEducationDetailsRef,generalEducationId:this.state.generalEducationId,isEditing:this.state.isEditing,loading:this.state.loading,isNew:this.state.isNew,onSave:this.GeneralEducationDetailsSaved},void 0)}),void 0)},t.prototype.renderMoreActions=function(){var e=this,t=Object(o.jsx)(Gt.a,{children:Object(o.jsx)(Gt.a.Item,oC({title:"Delete General Education",onClick:function(){return e.deleteConfirmation(e.state.generalEducationId)}},{children:"Delete General Education"}),this.state.generalEducationId)},void 0);return Object(o.jsx)(Ze,oC({validFeatureFlags:[gn.EDIT_GENERAL_EDUCATION]},{children:Object(o.jsx)(la.a,oC({overlay:t},{children:Object(o.jsx)(rt.a,oC({size:"large",type:"link"},{children:Object(o.jsx)(aa.a,{},void 0)}),void 0)}),void 0)}),void 0)},t}(a.Component),sC=Object(u.i)(aC),dC=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),cC=function(e){function t(t){var n=e.call(this,t)||this;return n.getColumnDefinitions=function(){return[{title:"Display",dataIndex:El.displayOrder,width:50,sorter:!0,filterType:wr.NONE},{title:"Code",dataIndex:El.code,width:50,sorter:!0,filterType:wr.Text},{title:"Name",dataIndex:El.name,sorter:!0,filterType:wr.Text},{title:"Embedded Credits",dataIndex:El.embeddedCredits,filterType:wr.BooleanRadio,columnType:Dr.Boolean,render:Hj.BooleanYesEmpty,sorter:!0,width:135},{title:"Parent",dataIndex:El.parentGeneralEducationId,filterType:wr.Text,sorter:!0,render:function(e,t){var n;return null===(n=t.parent)||void 0===n?void 0:n.name}}]},n.openGeneralEducation=function(e){e.id&&T.push(x.generate(x.GENERAL_EDUCATION_DETAILS,{id:e.id},{}))},n.addGeneralEducation=function(){T.push(x.generate(x.NEW_GENERAL_EDUCATION))},n.state={},n}return dC(t,e),t.prototype.render=function(){var e=this,t=[];return t.push(oo.Reset()),t.push(oo.Export((function(t){return e.setState({exporting:!0}),JT.getGeneralEducationDataTableExport(t).then((function(t){e.setState({exporting:!1}),R.a.downloadBase64StringAsFile("GeneralEducation_"+$r.getDateStamp()+".xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",null!==t&&void 0!==t?t:void 0)}))}),this.state.exporting)),Je.isAuthorized([gn.EDIT_GENERAL_EDUCATION])&&t.pu
1sh(oo.Default("New General Education",(function(){return e.addGeneralEducation()}))),Object(o.jsx)(o.Fragment,{children:Object(o.jsx)(io,{ref:function(t){return e._dataTable=t},onRowClick:this.openGeneralEducation,serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:t,columns:this.getColumnDefinitions(),fetchData:{fetch:function(e){return JT.getGeneralEducationsDataTable(e)}},stateSaving:{enabled:!0,tableUniqueKey:"generalEducation_list"}},void 0)},void 0)},t}(a.Component),lC=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),uC=function(e){function t(t){var n=e.call(this,t)||this;return n.goToConfig=function(){T.goBack()},n}return lC(t,e),t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"General Education",onBack:this.goToConfig,breadcrumbs:Xn.generalEducationList()},void 0),Object(o.jsx)(Qn.a,{children:Object(o.jsx)(cC,{},void 0)},void 0)]},void 0)},t}(a.Component),pC=Object(u.i)(uC),fC=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),hC=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return fC(t,e),t.prototype.getInstructionalLevelTableData=function(e){var t="api/instructionalLevel";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getInstructionalLevelDataTableExport=function(e){var t="api/instructionalLevel/export";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getInstructionalLevelDetails=function(e){var t="api/instructionalLevel/"+e;return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.saveInstructionalLevelDetails=function(e){var t="api/instructionalLevel/save";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getInstructionalLevels=function(){var e="api/instructionalLevel/getInstructionalLevels";return e=e.replace(/null|undefined/gi,""),this.SendRequest(null,"post",e,!0,!1)},t.prototype.deleteInstructionalLevel=function(e){var t="api/instructionalLevel/deleteInstructionalLevel";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t}(U),vC=new hC,mC=function(e){return Object.assign({instructionalLevelId:0,instructionalLevel:null},e)},gC=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),bC=function(){return bC=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},bC.apply(this,arguments)},yC=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._formItems=(new Map).set(Vc.name,{required:!0,name:Vc.name,label:"Name",rules:[Ot.required(),Ot.maxLength(150)]}).set(Vc.code,{required:!0,name:Vc.code,label:"Code",rules:[Ot.required(),Ot.maxLength(10)]}),n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields(),n.setState({altered:!1})},n.loadExisting=function(){n.props.instructionalLevelId&&vC.getInstructionalLevelDetails(n.props.instructionalLevelId).then((function(e){var t;e&&(null===(t=e.instructionalLevel)||void 0===t?void 0:t.id)&&n.setState({instructionalLevelId:e.instructionalLevel.id,instructionalLevel:e.instructionalLevel,loading:!1}),n.resetForm()})).catch((function(){n.setState({error:!0})}
1)).finally((function(){n.setState({loading:!1})}))},n.loadNew=function(){n.setState({instructionalLevel:Vc.create(),loading:!1})},n.handleChange=function(){n.setState({altered:!0})},n.handleSubmit=function(){n.setState({submitting:!0});var e=mC({instructionalLevelId:n.state.instructionalLevelId,instructionalLevel:Vc.create(n._formRef?n._formRef.current.getFieldsValue():null)});vC.saveInstructionalLevelDetails(e).then((function(e){var t;n.setState({submitted:!0,instructionalLevel:null===e||void 0===e?void 0:e.instructionalLevel}),(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.props.onSave&&(null===(t=e.instructionalLevel)||void 0===t?void 0:t.id)&&(n.props.onSave(e.instructionalLevel.id),n.resetForm()),ce.invalidateCache(Vc.className)):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Instructional Level could not be saved. "+n.state.message))})).catch((function(e){n.setState({error:e}),S.b.error("Instructional Level could not be saved.")})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.state={instructionalLevelId:0,instructionalLevel:Vc.create()},n}return gC(t,e),t.prototype.componentDidMount=function(){this.setState({loading:!0}),this.loadInstructionalLevel()},t.prototype.componentDidUpdate=function(e){this.props.instructionalLevelId&&this.props.instructionalLevelId!=e.instructionalLevelId&&(this.setState({instructionalLevelId:this.props.instructionalLevelId}),this.loadInstructionalLevel())},t.prototype.loadInstructionalLevel=function(){0==this.props.instructionalLevelId?this.loadNew():this.loadExisting()},t.prototype.render=function(){var e,t;return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(y.b,bC({size:"small",direction:"vertical"},{children:[this.renderErrors(),Object(o.jsxs)(ht.a,bC({ref:this._formRef,layout:"vertical",onValuesChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!0},{children:[Object(o.jsx)(mt.a,bC({},this._formItems.get(Vc.code),{initialValue:null===(e=this.state.instructionalLevel)||void 0===e?void 0:e.code},_t.getValidation(Vc.code,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,bC({},this._formItems.get(Vc.name),{initialValue:null===(t=this.state.instructionalLevel)||void 0===t?void 0:t.name},_t.getValidation(Vc.name,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),this.renderSave()]}),void 0)]}),void 0)},t.prototype.renderSave=function(){if(this.props.isEditing)return Object(o.jsx)(Ze,bC({validFeatureFlags:[gn.EDIT_INSTRUCTIONAL_LEVEL]},{children:Object(o.jsxs)(y.b,bC({direction:"horizontal"},{children:[Object(o.jsx)(Tr,{saving:this.state.saving},void 0),Object(o.jsx)(Ir,{onConfirm:this.resetForm,disabled:!this.state.altered},void 0)]}),void 0)}),void 0)},t.prototype.renderErrors=function(){if(this.state.error&&this.state.submitted)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t}(a.Component),OC=function(e){return Object.assign({instructionalLevelId:null},e)},jC=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),IC=function(){return IC=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},IC.apply(this,arguments)},SC=function(e){function t(t){var n=e.call(this,t)||this;return n._detailsRef=a.createRef(),n.loadInstructionalLevel=function(e){n.setState({instructionalLevelId:e}),vC.getInstructionalLevelDetails(e).then((function(e){e.instructionalLevel&&n.setState({instructionalLevel:e.instructionalLevel})})).catch((function(){n.setState({error:!0})}
1)).finally((function(){n.setState({loading:!1})}))},n.toggleEdit=function(){var e;n.state.isEditing&&(null===(e=n._detailsRef.current)||void 0===e||e.resetForm()),n.setState({isEditing:!n.state.isEditing})},n.specialEmphasisDetailsSaved=function(e){n.setState({isEditing:!1}),e!=n.state.instructionalLevelId?T.replace(x.generate(x.INSTRUCTIONAL_LEVEL_DETAILS,{id:e})):n.loadInstructionalLevel(e)},n.deleteConfirmation=function(e){f.a.confirm({title:"Are you sure you want to delete this Instructional Level?",okText:"Delete",onOk:function(){return n.deleteInstructionalLevel(e)}})},n.deleteInstructionalLevel=function(e){n.setState({submitting:!0});var t=OC({instructionalLevelId:e});vC.deleteInstructionalLevel(t).then((function(e){n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,altered:!(null===e||void 0===e?void 0:e.succeeded)}),!0===(null===e||void 0===e?void 0:e.succeeded)?S.b.success("Instructional level was removed."):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(e){n.setState({error:e}),S.b.error("Instructional level could not be removed.")})).finally((function(){n.setState({loading:!1}),n.goToInstructionalLevel()}))},n.goToInstructionalLevel=function(){T.goBack()},n.state={instructionalLevelId:0},n}return jC(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");if("new"==e)this.setState({isEditing:!0,isNew:!0,loading:!1});else{var t=Number.parseInt(e);this.loadInstructionalLevel(t)}},t.prototype.render=function(){var e,t,n=this.state.loading?"...":0==this.state.instructionalLevelId?"New Instructional Level":null!==(t=null===(e=this.state.instructionalLevel)||void 0===e?void 0:e.name)&&void 0!==t?t:"...";return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:n,onBack:this.goToInstructionalLevel,breadcrumbs:Xn.instructionalLevelDetails(n,this.state.instructionalLevelId),extra:this.renderMoreActions()},void 0),Object(o.jsx)(zr,{when:this.state.isEditing},void 0),this.renderDetailsCard()]},void 0)},t.prototype.renderDetailsCard=function(){var e=0==this.state.instructionalLevelId?null:Object(o.jsx)(Ze,IC({validFeatureFlags:[gn.EDIT_INSTRUCTIONAL_LEVEL]},{children:Object(o.jsx)(Br,{isEditing:this.state.isEditing,onClick:this.toggleEdit},void 0)}),void 0);return Object(o.jsx)(Qn.a,IC({title:"Details",extra:e},{children:Object(o.jsx)(yC,{ref:this._detailsRef,instructionalLevelId:this.state.instructionalLevelId,isEditing:this.state.isEditing,isNew:this.state.isNew,onSave:this.specialEmphasisDetailsSaved},void 0)}),void 0)},t.prototype.renderMoreActions=function(){var e=this,t=Object(o.jsx)(Gt.a,{children:Object(o.jsx)(Gt.a.Item,IC({title:"Delete Instructional Level",onClick:function(){return e.deleteConfirmation(e.state.instructionalLevelId)}},{children:"Delete Instructional Level"}),this.state.instructionalLevelId)},void 0);return Object(o.jsx)(Ze,IC({validFeatureFlags:[gn.EDIT_INSTRUCTIONAL_LEVEL]},{children:Object(o.jsx)(la.a,IC({overlay:t},{children:Object(o.jsx)(rt.a,IC({size:"large",type:"link"},{children:Object(o.jsx)(aa.a,{},void 0)}),void 0)}),void 0)}),void 0)},t}(a.Component),EC=Object(u.i)(SC),RC={className:"InstructionalLevelDataTableDTO",create:function(e){return Object.assign(Q.create(),{id:0,code:"",name:""},e)},id:"id",code:"code",name:"name"},_C=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),TC=function(e){function t(t){var n=e.call(this,t)||this;return n.getColumnDefinitions=function(){return[{title:"Code",dataIndex:RC.code,sorter:!0,filterType:wr.Text,width:125},{title:"Name",dataIndex:RC.name,sorter:!0,filterType:wr.Text}]},n.openInstructionalLevel=function(e){e.id&&T.push(x.generate(x.INSTRUCTIONAL_LEVEL_DETAILS,{id:e.id},{}))},n.addInstructionalLevel=function(){T.push(x.generate(x.NEW_INSTRUCTIONAL_LEVEL))},n.state={},n}return _C(t,e),t.prototype.render=function(){var e=this,t=[];return t.push(oo.Reset()),t.push(oo.Export((function(t){return e.setState({exporting:!0}),vC.getInstructionalLevelDataTableExport(t).then((function(t){e.setState({exporting:!1}),R.a.downloadBase64StringAsFile("Instructional_Level_"+$r.getDateStamp()+".xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",null!==t&&void 0!==t?t:void 0)}))}),this.state.exporting)),Je.isAuthorized([gn.EDIT_INSTRUCTIONAL_LEVEL])&&t.pu
1sh(oo.Default("New Instructional Level",(function(){return e.addInstructionalLevel()}))),Object(o.jsx)(o.Fragment,{children:Object(o.jsx)(io,{ref:function(t){return e._dataTable=t},onRowClick:this.openInstructionalLevel,serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:t,columns:this.getColumnDefinitions(),fetchData:{fetch:function(e){return vC.getInstructionalLevelTableData(e)}},stateSaving:{enabled:!0,tableUniqueKey:"instructional_level_list"}},void 0)},void 0)},t}(a.Component),CC=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),xC=function(e){function t(t){var n=e.call(this,t)||this;return n.goToConfig=function(){T.goBack()},n}return CC(t,e),t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Instructional Level",onBack:this.goToConfig,breadcrumbs:Xn.instructionalLevelList()},void 0),Object(o.jsx)(Qn.a,{children:Object(o.jsx)(TC,{},void 0)},void 0)]},void 0)},t}(a.Component),AC=Object(u.i)(xC),PC=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),NC=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return PC(t,e),t.prototype.getIowaVariationTableData=function(e){var t="api/iowaVariation";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getIowaVariationDataTableExport=function(e){var t="api/iowaVariation/export";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getIowaVariationDetails=function(e){var t="api/iowaVariation/"+e;return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.saveIowaVariationDetails=function(e){var t="api/iowaVariation/save";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getIowaVariations=function(){var e="api/iowaVariation/getIowaVariations";return e=e.replace(/null|undefined/gi,""),this.SendRequest(null,"post",e,!0,!1)},t.prototype.deleteIowaVariation=function(e){var t="api/iowaVariation/deleteIowaVariation";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t}(U),wC=new NC,DC=function(e){return Object.assign({iowaVariationId:0,iowaVariation:null},e)},qC=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),FC=function(){return FC=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},FC.apply(this,arguments)},MC=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._formItems=(new Map).set(pi.name,{required:!0,name:pi.name,label:"Name",rules:[Ot.required(),Ot.maxLength(150)]}).set(pi.code,{required:!0,name:pi.code,label:"Code",rules:[Ot.required(),Ot.maxLength(10)]}).set(pi.order,{required:!0,name:pi.order,label:"Order",rules:[Ot.required()]}).set(pi.specialUse,{required:!0,name:pi.specialUse,label:"For Special Use",rules:[Ot.required()]}),n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields(),n.setState({altered:!1})},n.loadExisting=function(){n.props.iowaVariationId&&wC.getIowaVariationDetails(n.props.iowaVariationId).then((function(e){var t,r;e&&(null===(t=e.iowaVariation)||void 0===t?void 0:t.id)&&n.setState({iowaVariationId:e.iowaVariation.id,iowaVariation:null!==(r=e.iowaVariation)&&void 0!==r?r:pi.create}),n.resetForm()})).catch((function(){n.setState({error:!0})}
1)).finally((function(){n.setState({loading:!1})}))},n.loadNew=function(){n.setState({iowaVariation:pi.create(),loading:!1})},n.handleChange=function(){n.setState({altered:!0})},n.handleSubmit=function(){n.setState({submitting:!0});var e=DC({iowaVariationId:n.state.iowaVariationId,iowaVariation:pi.create(n._formRef?n._formRef.current.getFieldsValue():null)});wC.saveIowaVariationDetails(e).then((function(e){var t,r;n.setState({submitted:!0,iowaVariation:null!==(t=null===e||void 0===e?void 0:e.iowaVariation)&&void 0!==t?t:pi.create()}),(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.props.onSave&&(null===(r=e.iowaVariation)||void 0===r?void 0:r.id)&&(n.props.onSave(e.iowaVariation.id),n.resetForm()),ce.invalidateCache(pi.className)):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Iowa Variation could not be saved. "+n.state.message))})).catch((function(e){n.setState({error:e}),S.b.error("Iowa Variation could not be saved.")})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.state={iowaVariationId:0,iowaVariation:pi.create()},n}return qC(t,e),t.prototype.componentDidMount=function(){this.setState({loading:!0}),this.loadIowaVariation()},t.prototype.componentDidUpdate=function(e){this.props.iowaVariationId&&this.props.iowaVariationId!=e.iowaVariationId&&(this.setState({iowaVariationId:this.props.iowaVariationId}),this.loadIowaVariation())},t.prototype.loadIowaVariation=function(){0==this.props.iowaVariationId?this.loadNew():this.loadExisting()},t.prototype.render=function(){return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(y.b,FC({size:"small",direction:"vertical"},{children:[this.renderErrors(),Object(o.jsxs)(ht.a,FC({ref:this._formRef,layout:"vertical",initialValues:this.state.iowaVariation,onValuesChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!0},{children:[Object(o.jsx)(mt.a,FC({},this._formItems.get(pi.code),_t.getValidation(pi.code,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,FC({},this._formItems.get(pi.name),_t.getValidation(pi.name,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,FC({},this._formItems.get(pi.specialUse),_t.getValidation(pi.specialUse,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(Hd,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,FC({},this._formItems.get(pi.order),_t.getValidation(pi.order,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(Ni.a,{min:1,disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),this.renderSave()]}),void 0)]}),void 0)},t.prototype.renderSave=function(){if(this.props.isEditing)return Object(o.jsx)(Ze,FC({validFeatureFlags:[gn.EDIT_IOWA_VARIATION]},{children:Object(o.jsxs)(y.b,FC({direction:"horizontal"},{children:[Object(o.jsx)(Tr,{saving:this.state.saving},void 0),Object(o.jsx)(Ir,{onConfirm:this.resetForm,disabled:!this.state.altered},void 0)]}),void 0)}),void 0)},t.prototype.renderErrors=function(){if(this.state.error&&this.state.submitted)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t}(a.Component),YC=function(e){return Object.assign({iowaVariationId:null},e)},UC=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),LC=function(){return LC=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},LC.apply(this,arguments)},kC=function(e){function t(t){var n=e.call(this,t)||this;return n._detailsRef=a.createRef(),n.loadIowaVariation=function(e){n.setState({iowaVariationId:e}
1),wC.getIowaVariationDetails(e).then((function(e){e.iowaVariation&&n.setState({iowaVariation:e.iowaVariation})})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))},n.toggleEdit=function(){var e;n.state.isEditing&&(null===(e=n._detailsRef.current)||void 0===e||e.resetForm()),n.setState({isEditing:!n.state.isEditing})},n.specialEmphasisDetailsSaved=function(e){n.setState({isEditing:!1}),e!=n.state.iowaVariationId?T.replace(x.generate(x.IOWA_VARIATION_DETAILS,{id:e})):n.loadIowaVariation(e)},n.deleteConfirmation=function(e){f.a.confirm({title:"Are you sure you want to delete this Iowa Variation?",okText:"Delete",onOk:function(){return n.deleteIowaVariation(e)}})},n.deleteIowaVariation=function(e){n.setState({submitting:!0});var t=YC({iowaVariationId:e});wC.deleteIowaVariation(t).then((function(e){n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,altered:!(null===e||void 0===e?void 0:e.succeeded)}),!0===(null===e||void 0===e?void 0:e.succeeded)?S.b.success("Iowa Variation was removed."):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(e){n.setState({error:e}),S.b.error("Iowa Variation could not be removed.")})).finally((function(){n.setState({loading:!1}),n.goToIowaVariation()}))},n.goToIowaVariation=function(){T.goBack()},n.state={iowaVariationId:0},n}return UC(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");if("new"==e)this.setState({isEditing:!0,isNew:!0,loading:!1});else{var t=Number.parseInt(e);this.loadIowaVariation(t)}},t.prototype.render=function(){var e,t,n=this.state.loading?"...":0==this.state.iowaVariationId?"New Iowa Variation":null!==(t=null===(e=this.state.iowaVariation)||void 0===e?void 0:e.name)&&void 0!==t?t:"...";return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:n,onBack:this.goToIowaVariation,breadcrumbs:Xn.iowaVariationDetails(n,this.state.iowaVariationId),extra:this.renderMoreActions()},void 0),Object(o.jsx)(zr,{when:this.state.isEditing},void 0),this.renderDetailsCard()]},void 0)},t.prototype.renderDetailsCard=function(){var e=0==this.state.iowaVariationId?null:Object(o.jsx)(Ze,LC({validFeatureFlags:[gn.EDIT_IOWA_VARIATION]},{children:Object(o.jsx)(Br,{isEditing:this.state.isEditing,onClick:this.toggleEdit},void 0)}),void 0);return Object(o.jsx)(Qn.a,LC({title:"Details",extra:e},{children:Object(o.jsx)(MC,{ref:this._detailsRef,iowaVariationId:this.state.iowaVariationId,isEditing:this.state.isEditing,isNew:this.state.isNew,onSave:this.specialEmphasisDetailsSaved},void 0)}),void 0)},t.prototype.renderMoreActions=function(){var e=this,t=Object(o.jsx)(Gt.a,{children:Object(o.jsx)(Gt.a.Item,LC({title:"Delete Iowa Variation",onClick:function(){return e.deleteConfirmation(e.state.iowaVariationId)}},{children:"Delete Iowa Variation"}),this.state.iowaVariationId)},void 0);return Object(o.jsx)(Ze,LC({validFeatureFlags:[gn.EDIT_IOWA_VARIATION]},{children:Object(o.jsx)(la.a,LC({overlay:t},{children:Object(o.jsx)(rt.a,LC({size:"large",type:"link"},{children:Object(o.jsx)(aa.a,{},void 0)}),void 0)}),void 0)}),void 0)},t}(a.Component),GC=Object(u.i)(kC),VC={className:"IowaVariationDataTableDTO",create:function(e){return Object.assign(Q.create(),{id:0,order:0,code:"",name:"",specialUse:!1},e)},id:"id",order:"order",code:"code",name:"name",specialUse:"specialUse"},BC=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),WC=function(e){function t(t){var n=e.call(this,t)||this;return n.getColumnDefinitions=function(){return[{title:"Order",dataIndex:VC.order,sorter:!0,filterType:wr.Text,width:15},{title:"Code",dataIndex:VC.code,sorter:!0,filterType:wr.Text,width:15},{title:"Name",dataIndex:VC.name,sorter:!0,filterType:wr.Text},{title:"Special Use",dataIndex:VC.specialUse,sorter:!0,filterType:wr.BooleanRadio,columnType:Dr.Boolean,render:Hj.BooleanYesEmpty,width:35}]},n.openIowaVariation=function(e){e.id&&T.push(x.generate(x.IOWA_VARIATION_DETAILS,{id:e.id},{}))}
1,n.addIowaVariation=function(){T.push(x.generate(x.NEW_IOWA_VARIATION))},n.state={},n}return BC(t,e),t.prototype.render=function(){var e=this,t=[];return t.push(oo.Reset()),t.push(oo.Export((function(t){return e.setState({exporting:!0}),wC.getIowaVariationDataTableExport(t).then((function(t){e.setState({exporting:!1}),R.a.downloadBase64StringAsFile("Iowa_Variation_"+$r.getDateStamp()+".xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",null!==t&&void 0!==t?t:void 0)}))}),this.state.exporting)),Je.isAuthorized([gn.EDIT_IOWA_VARIATION])&&t.push(oo.Default("New Iowa Variation",(function(){return e.addIowaVariation()}))),Object(o.jsx)(io,{ref:function(t){return e._dataTable=t},onRowClick:this.openIowaVariation,serverSide:!0,tableProps:{rowKey:"id",scroll:{x:600}},globalSearch:!0,buttonBar:t,columns:this.getColumnDefinitions(),fetchData:{fetch:function(e){return wC.getIowaVariationTableData(e)}},stateSaving:{enabled:!0,tableUniqueKey:"iowa_varaiation_list"}},void 0)},t}(a.Component),zC=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),HC=function(e){function t(t){var n=e.call(this,t)||this;return n.goToConfig=function(){T.goBack()},n}return zC(t,e),t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Iowa Variations",onBack:this.goToConfig,breadcrumbs:Xn.iowaVariationList()},void 0),Object(o.jsx)(Qn.a,{children:Object(o.jsx)(WC,{},void 0)},void 0)]},void 0)},t}(a.Component),QC=Object(u.i)(HC),KC=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),XC=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return KC(t,e),t.prototype.getObjectPurposeTableData=function(e){var t="api/objectPurposes";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getObjectPurposeDataTableExport=function(e){var t="api/objectPurposes/export";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getObjectPurposeDetails=function(e){var t="api/objectPurposes/"+e;return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.saveObjectPurposeDetails=function(e){var t="api/objectPurposes/save";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getObjectPurposes=function(){var e="api/objectPurposes/getObjectPurposes";return e=e.replace(/null|undefined/gi,""),this.SendRequest(null,"post",e,!0,!1)},t.prototype.deleteObjectPurpose=function(e){var t="api/objectPurposes/deleteObjectPurpose";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t}(U),JC=new XC,$C=function(e){return Object.assign({objectPurposeId:0,objectPurpose:null},e)},ZC=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ex=function(){return ex=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ex.apply(this,arguments)},tx=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._formItems=(new Map).set(Hc.name,{required:!0,name:Hc.name,label:"Name",rules:[Ot.required(),Ot.maxLength(150)]}).set(Hc.code,{required:!0,name:Hc.code,label:"Code",rules:[Ot.required(),Ot.maxLength(10)]}),n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields(),n.setState({altered:!1})},n.loadExisting=function(){n.props.objectPurposeId&&JC.getObjectPurposeDetails(n.props.objectPurposeId).then((function(e){e&&e.objectPurpose&&n.setState({objectPurposeId:e.objectPurpose.id,objectPurpose:e.objectPurpose,loading:!1}),n.resetForm()})).catch((function(){n.setState({error:!0})}
1)).finally((function(){n.setState({loading:!1})}))},n.loadNew=function(){n.setState({objectPurpose:Hc.create(),loading:!1})},n.handleChange=function(){n.setState({altered:!0})},n.handleSubmit=function(){n.setState({submitting:!0});var e=$C({objectPurposeId:n.state.objectPurposeId,objectPurpose:Hc.create(n._formRef?n._formRef.current.getFieldsValue():null)});JC.saveObjectPurposeDetails(e).then((function(e){n.setState({submitted:!0,objectPurpose:null===e||void 0===e?void 0:e.objectPurpose}),(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.props.onSave&&e.objectPurpose&&(n.props.onSave(e.objectPurpose.id),n.resetForm()),ce.invalidateCache(Hc.className)):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Object Purpose could not be saved. "+n.state.message))})).catch((function(e){n.setState({error:e}),S.b.error("Object Purpose could not be saved.")})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.state={objectPurposeId:0,objectPurpose:Hc.create()},n}return ZC(t,e),t.prototype.componentDidMount=function(){this.setState({loading:!0}),this.loadObjectPurpose()},t.prototype.componentDidUpdate=function(e){this.props.objectPurposeId&&this.props.objectPurposeId!=e.objectPurposeId&&(this.setState({objectPurposeId:this.props.objectPurposeId}),this.loadObjectPurpose())},t.prototype.loadObjectPurpose=function(){0==this.props.objectPurposeId?this.loadNew():this.loadExisting()},t.prototype.render=function(){var e,t;return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(y.b,ex({size:"small",direction:"vertical"},{children:[this.renderErrors(),Object(o.jsxs)(ht.a,ex({ref:this._formRef,layout:"vertical",onValuesChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!0},{children:[Object(o.jsx)(mt.a,ex({},this._formItems.get(Hc.code),{initialValue:null===(e=this.state.objectPurpose)||void 0===e?void 0:e.code},_t.getValidation(Hc.code,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,ex({},this._formItems.get(Hc.name),{initialValue:null===(t=this.state.objectPurpose)||void 0===t?void 0:t.name},_t.getValidation(Hc.name,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),this.renderSave()]}),void 0)]}),void 0)},t.prototype.renderSave=function(){if(this.props.isEditing)return Object(o.jsx)(Ze,ex({validFeatureFlags:[gn.EDIT_OBJECT_PURPOSE]},{children:Object(o.jsxs)(y.b,ex({direction:"horizontal"},{children:[Object(o.jsx)(Tr,{saving:this.state.saving},void 0),Object(o.jsx)(Ir,{onConfirm:this.resetForm,disabled:!this.state.altered},void 0)]}),void 0)}),void 0)},t.prototype.renderErrors=function(){if(this.state.error&&this.state.submitted)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t}(a.Component),nx=function(e){return Object.assign({objectPurposeId:null},e)},rx=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ix=function(){return ix=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ix.apply(this,arguments)},ox=function(e){function t(t){var n=e.call(this,t)||this;return n._objectPurposeDetailsRef=a.createRef(),n.loadObjectPurpose=function(e){n.setState({objectPurposeId:e}),JC.getObjectPurposeDetails(e).then((function(e){e.objectPurpose&&n.setState({objectPurpose:e.objectPurpose})})).catch((function(){n.setState({error:!0})}
1)).finally((function(){n.setState({loading:!1})}))},n.toggleEdit=function(){var e;n.state.isEditing&&(null===(e=n._objectPurposeDetailsRef.current)||void 0===e||e.resetForm()),n.setState({isEditing:!n.state.isEditing})},n.objectPurposeDetailsSaved=function(e){n.setState({isEditing:!1}),e!=n.state.objectPurposeId?T.replace(x.generate(x.OBJECT_PURPOSE_DETAILS,{id:e})):n.loadObjectPurpose(e)},n.deleteConfirmation=function(e){f.a.confirm({title:"Are you sure you want to delete this Object Purpose?",okText:"Delete",onOk:function(){return n.deleteObjectPurpose(e)}})},n.deleteObjectPurpose=function(e){n.setState({submitting:!0});var t=nx({objectPurposeId:e});JC.deleteObjectPurpose(t).then((function(e){n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,altered:!(null===e||void 0===e?void 0:e.succeeded)}),!0===(null===e||void 0===e?void 0:e.succeeded)?S.b.success("Object Purpose was removed."):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(e){n.setState({error:e}),S.b.error("Object Purpose could not be removed.")})).finally((function(){n.setState({loading:!1}),n.goToObjectPurposes()}))},n.goToObjectPurposes=function(){T.goBack()},n.state={objectPurposeId:0},n}return rx(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");if("new"==e)this.setState({isEditing:!0,isNew:!0,loading:!1});else{var t=Number.parseInt(e);this.loadObjectPurpose(t)}},t.prototype.render=function(){var e,t,n=this.state.loading?"...":0==this.state.objectPurposeId?"New Object Purpose":null!==(t=null===(e=this.state.objectPurpose)||void 0===e?void 0:e.name)&&void 0!==t?t:"...";return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:n,onBack:this.goToObjectPurposes,breadcrumbs:Xn.objectPurposeDetails(n,this.state.objectPurposeId),extra:this.renderMoreActions()},void 0),Object(o.jsx)(zr,{when:this.state.isEditing},void 0),this.renderDetailsCard()]},void 0)},t.prototype.renderDetailsCard=function(){var e=0==this.state.objectPurposeId?null:Object(o.jsx)(Ze,ix({validFeatureFlags:[gn.EDIT_OBJECT_PURPOSE]},{children:Object(o.jsx)(Br,{isEditing:this.state.isEditing,onClick:this.toggleEdit},void 0)}),void 0);return Object(o.jsx)(Qn.a,ix({title:"Details",extra:e},{children:Object(o.jsx)(tx,{ref:this._objectPurposeDetailsRef,objectPurposeId:this.state.objectPurposeId,isEditing:this.state.isEditing,isNew:this.state.isNew,onSave:this.objectPurposeDetailsSaved},void 0)}),void 0)},t.prototype.renderMoreActions=function(){var e=this,t=Object(o.jsx)(Gt.a,{children:Object(o.jsx)(Gt.a.Item,ix({title:"Delete Object Purpose",onClick:function(){return e.deleteConfirmation(e.state.objectPurposeId)}},{children:"Delete Object Purpose"}),this.state.objectPurposeId)},void 0);return Object(o.jsx)(Ze,ix({validFeatureFlags:[gn.EDIT_OBJECT_PURPOSE]},{children:Object(o.jsx)(la.a,ix({overlay:t},{children:Object(o.jsx)(rt.a,ix({size:"large",type:"link"},{children:Object(o.jsx)(aa.a,{},void 0)}),void 0)}),void 0)}),void 0)},t}(a.Component),ax=Object(u.i)(ox),sx={className:"ObjectPurposeDataTableDTO",create:function(e){return Object.assign(Q.create(),{id:0,code:"",name:""},e)},id:"id",code:"code",name:"name"},dx=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),cx=function(e){function t(t){var n=e.call(this,t)||this;return n.getColumnDefinitions=function(){return[{title:"Code",dataIndex:sx.code,sorter:!0,filterType:wr.Text,width:125},{title:"Name",dataIndex:sx.name,sorter:!0,filterType:wr.Text}]},n.openObjectPurpose=function(e){e.id&&T.push(x.generate(x.OBJECT_PURPOSE_DETAILS,{id:e.id},{}))},n.addObjectPurpose=function(){T.push(x.generate(x.NEW_OBJECT_PURPOSE))},n.state={},n}return dx(t,e),t.prototype.render=function(){var e=this,t=[];return t.push(oo.Reset()),t.push(oo.Export((function(t){return e.setState({exporting:!0}),JC.getObjectPurposeDataTableExport(t).then((function(t){e.setState({exporting:!1}),R.a.downloadBase64StringAsFile("Object_Purpose_"+$r.getDateStamp()+".xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",null!==t&&void 0!==t?t:void 0)}))}),this.state.exporting)),Je.isAuthorized([gn.EDIT_OBJECT_PURPOSE])&&t.pu
1sh(oo.Default("New Object Purpose",(function(){return e.addObjectPurpose()}))),Object(o.jsx)(o.Fragment,{children:Object(o.jsx)(io,{ref:function(t){return e._dataTable=t},onRowClick:this.openObjectPurpose,serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:t,columns:this.getColumnDefinitions(),fetchData:{fetch:function(e){return JC.getObjectPurposeTableData(e)}},stateSaving:{enabled:!0,tableUniqueKey:"object_purpose_list"}},void 0)},void 0)},t}(a.Component),lx=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ux=function(e){function t(t){var n=e.call(this,t)||this;return n.goToConfig=function(){T.goBack()},n}return lx(t,e),t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Object Purpose",onBack:this.goToConfig,breadcrumbs:Xn.objectPurposeList()},void 0),Object(o.jsx)(Qn.a,{children:Object(o.jsx)(cx,{},void 0)},void 0)]},void 0)},t}(a.Component),px=Object(u.i)(ux),fx=n(304),hx=function(e){return Object.assign({member:null},e)},vx={className:"ProgramAdvisoryBoardDataTableDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",programId:"00000000-0000-0000-0000-000000000000",firstName:"",lastName:"",genderId:null,employer:"",position:"",disability:!1,organizedLabor:!1,ethnicGroupId:0,joinedTermId:"00000000-0000-0000-0000-000000000000",joinedYear:0,retireTermId:null,retireYear:null,name:"",joinTerm:null,retireTerm:null},e)},id:"id",programId:"programId",firstName:"firstName",lastName:"lastName",genderId:"genderId",employer:"employer",position:"position",disability:"disability",organizedLabor:"organizedLabor",ethnicGroupId:"ethnicGroupId",joinedTermId:"joinedTermId",joinedYear:"joinedYear",retireTermId:"retireTermId",retireYear:"retireYear",name:"name",joinTerm:"joinTerm",retireTerm:"retireTerm"},mx=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),gx=function(){return gx=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},gx.apply(this,arguments)},bx=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n.getColumnDefinitions=function(){var e=[{title:"Name",dataIndex:vx.name},{title:"Employer",dataIndex:vx.employer},{title:"Position",dataIndex:vx.position},{title:"Joined",dataIndex:vx.joinTerm,render:function(e,t){var n;return null===(n=t.joinTerm)||void 0===n?void 0:n.display}}];return e.push({title:"Edit",dataIndex:vx.id,render:function(e,t){var r=Je.isAuthorized([gn.EDIT_PROGRAM]);return Object(o.jsx)(rt.a,{size:"small",onClick:function(){return n.openEditModal(t)},type:"link",icon:r?Object(o.jsx)(Ei.a,{},void 0):Object(o.jsx)(fx.a,{},void 0)},void 0)}}),e},n.openEditModal=function(e){n.setState({member:e})},n.closeEditModal=function(e){var t;n.setState({member:null}),e&&(null===(t=n._dataTable)||void 0===t||t.refresh())},n.saveMember=function(){var e,t;n.setState({submitting:!0});var r=hx({member:gx({id:null===(e=n.state.member)||void 0===e?void 0:e.id},null===(t=n._formRef.current)||void 0===t?void 0:t.getFieldsValue())});ba.saveAdvisoryBoard(r).then((function(e){e.succeeded?(S.b.success("Member Saved"),n.closeEditModal(!0)):(S.b.error("Error Saving"),n.setState({fieldErrors:e.fieldErrors}))})).catch((function(){S.b.error("Error Saving")})).finally((function(){n.setState({submitting:!1})}))},n.state={member:null,terms:[],genders:[],racialEthnicGroups:[]},n}return mx(t,e),t.prototype.renderGender=function(e){var t,n;if(e.id)return Object(o.jsx)(pr.a.Option,gx({value:null!==(t=e.id)&&void 0!==t?t:re.default.Empty()},{children:e.name}),null!==(n=e.id)&&void 0!==n?n:re.default.Empty())},t.prototype.renderEthnicGroup=function(e){var t,n;if(e.id)return Object(o.jsx)(pr.a.Option,gx({value:null!==(t=e.id)&&void 0!==t?t:re.default.Empty()},{children:e.name}),null!==(n=e.id)&&void 0!==n?n:re.default.Empty())},t.prototype.getEditFormItems=function(){return(new Map).set(vx.firstName,{name:vx.firstName,label:"First Name",required:!0,rules:[Ot.required()]}).set(vx.lastName,{name:vx.lastName,label:"Last Name",required:!0,rules:[Ot.required()]}).set(vx.employer,{name:vx.employer,label:"Employer",required:!0,rules:[Ot.required()]}).set(vx.position,{name:vx.position,label:"Postition",required:!0,rules:[Ot.required()]}).set(vx.genderId,{name:vx.genderId,label:"Gender",required:!0,rules:[Ot.required()]}).set(vx.ethnicGroupId,{name:vx.ethnicGroupId,label:"Ethnic Group",required:!0,rules:[Ot.required()]}).set(vx.disability,{name:vx.disability,label:"Has the advisory board member self-identified as having a disability?",required:!0,rules:[Ot.required()]}).set(vx.organizedLabor,{name:vx.organizedLabor,label:"Is this member a part of organized labor?",required:!0,rules:[Ot.required()]}).set(vx.joinedTermId,{name:vx.joinedTermId,label:"Joined"})},t.prototype.renderAdvisorModal=function(){var e,t,n=this;if(this.state.member){var r=Je.isAuthorized([gn.EDIT_PROGRAM]);return Object(o.jsx)(f.a,gx({width:750,title:"Advisory Board Member",visible:null!=this.state.member,footer:r?Object(o.jsx)(Tr,{saving:this.state.submitting,onClick:this.saveMember},void 0):null,onCancel:function(){return n.closeEditModal(!1)}},{children:Object(o.jsxs)(Ci.a,gx({layout:"vertical",initialValues:this.state.member,requiredMark:r,ref:this._formRef,onFinish:this.saveMember},{children:[Object(o.jsxs)(b.a,gx({gutter:[16,16]},{children:[Object(o.jsx)(m.a,gx({},En.HALF,{children:Object(o.jsx)(Ci.a.Item,gx({},this.getEditFormItems().get(vx.firstName),_t.getValidation(vx.firstName.toLowerCase(),this.state.fieldErrors,this.state.submitted),{children:r?Object(o.jsx)(ut.a,{},void 0):Object(o.jsx)(ud,{},void 0)}),void 0)}),void 0),Object(o.jsx)(m.a,gx({},En.HALF,{children:Object(o.jsx)(Ci.a.Item,gx({},this.getEditFormItems().get(vx.lastName),_t.getValidation(vx.lastName.toLowerCase(),this.state.fieldErrors,this.state.submitted),{children:r?Object(o.jsx)(ut.a,{},void 0):Object(o.jsx)(ud,{},void 0)}),void 0)}),void 0)]}),void 0),Object(o.jsxs)(b.a,gx({gutter:[16,16]},{children:[Object(o.jsx)(m.a,gx({},En.HALF,{children:Object(o.jsx)(Ci.a.Item,gx({},this.getEditFormItems().get(vx.employer),_t.getValidation(vx.employer.toLowerCase(),this.state.fieldErrors,this.state.submitted),{children:r?Object(o.jsx)(ut.a,{},void 0):Object(o.jsx)(ud,{},void 0)}),void 0)}),void 0),Object(o.jsx)(m.a,gx({},En.HALF,{children:Object(o.jsx)(Ci.a.Item,gx({},this.getEditFormItems().get(vx.position),_t.getValidation(vx.position.toLowerCase(),this.state.fieldErrors,this.state.submitted),{children:r?Object(o.jsx)(ut.a,{},void 0):Object(o.jsx)(ud,{},void 0)}),void 0)}),void 0)]}),void 0),Object(o.jsxs)(b.a,gx({gutter:[16,16]},{children:[Object(o.jsx)(m.a,gx({},En.HALF,{children:Object(o.jsx)(Ci.a.Item,gx({},this.getEditFormItems().get(vx.genderId),_t.getValidation(vx.genderId.toLowerCase(),this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(pr.a,gx({showArrow:!0,dropdownMatchSelectWidth:!1},{children:this.state.genders.map((function(e){return n.renderGender(e)}))}),void 0)}),void 0)}),void 0),Object(o.jsx)(m.a,gx({},En.HALF,{children:Object(o.jsx)(Ci.a.Item,gx({},this.getEditFormItems().get(vx.ethnicGroupId),_t.getValidation(vx.ethnicGroupId.toLowerCase(),this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(pr.a,gx({showArrow:!0,dropdownMatchSelectWidth:!1},{children:this.state.racialEthnicGroups.map((function(e){return n.renderEthnicGroup(e)}))}),void 0)}),void 0)}),void 0)]}),void 0),Object(o.jsx)(b.a,gx({gutter:[16,16]},{children:Object(o.jsx)(m.a,gx({},En.FULL,{children:Object(o.jsx)(Ci.a.Item,gx({},this.getEditFormItems().get(vx.organizedLabor),_t.getValidation(vx.organizedLabor.toLowerCase(),this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(H
1d,{readonly:!r},void 0)}),void 0)}),void 0)}),void 0),Object(o.jsx)(b.a,gx({gutter:[16,16]},{children:Object(o.jsx)(m.a,gx({},En.FULL,{children:Object(o.jsx)(Ci.a.Item,gx({},this.getEditFormItems().get(vx.disability),_t.getValidation(vx.disability.toLowerCase(),this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(Hd,{readonly:!r},void 0)}),void 0)}),void 0)}),void 0),Object(o.jsx)(b.a,gx({gutter:[16,16]},{children:Object(o.jsx)(m.a,gx({},En.FULL,{children:Object(o.jsx)(Ci.a.Item,gx({initialValue:null===(e=this.state.member.joinTerm)||void 0===e?void 0:e.display},this.getEditFormItems().get(vx.joinedTermId),{children:Object(o.jsx)(ud,{text:null===(t=this.state.member.joinTerm)||void 0===t?void 0:t.display},void 0)}),void 0)}),void 0)}),void 0)]}),void 0)}),void 0)}},t.prototype.render=function(){var e=this;return Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(io,{ref:function(t){return e._dataTable=t},serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!1,columns:this.getColumnDefinitions(),fetchData:{fetch:function(t){return ba.getAdvisoryBoard(t,e.props.programDetailId)}}},void 0),this.renderAdvisorModal()]},void 0)},t}(a.Component),yx=n(135),Ox=function(e){return Object.assign({program:null},e)},jx={className:"FlatProgramTermCourseGroupOptionDTO",create:function(e){return Object.assign(Q.create(),{id:null,programTermCourseGroupId:null,courseId:null,course:null,institutionCourseId:null,institutionCourse:null,courseBlockId:null,courseBlock:null,groupOptionTypeId:null,groupOptionType:null,workBasedLearningTypeId:null,workBasedLearningType:null,order:0,generalEducationId:null,generalEducation:null,apsGeneralEducationId:null,apsGeneralEducation:null,transferMajorCourseBlockId:null,transferMajorCourseBlock:null,transferMajorLactsCategoryId:null,transferMajorLactsCategory:null,transferMajorGeneralEducationTypeId:null,transferMajorGeneralEducationType:null,transferMajorDisciplineFrameworkElementId:null,transferMajorDisciplineFrameworkElement:null,credits:null,footnote:"",techCore:null,embeddedCredits:null,groupIndex:0,isVariableCredits:null,title:""},e)},id:"id",programTermCourseGroupId:"programTermCourseGroupId",courseId:"courseId",course:"course",institutionCourseId:"institutionCourseId",institutionCourse:"institutionCourse",courseBlockId:"courseBlockId",courseBlock:"courseBlock",groupOptionTypeId:"groupOptionTypeId",groupOptionType:"groupOptionType",workBasedLearningTypeId:"workBasedLearningTypeId",workBasedLearningType:"workBasedLearningType",order:"order",generalEducationId:"generalEducationId",generalEducation:"generalEducation",apsGeneralEducationId:"apsGeneralEducationId",apsGeneralEducation:"apsGeneralEducation",transferMajorCourseBlockId:"transferMajorCourseBlockId",transferMajorCourseBlock:"transferMajorCourseBlock",transferMajorLactsCategoryId:"transferMajorLactsCategoryId",transferMajorLactsCategory:"transferMajorLactsCategory",transferMajorGeneralEducationTypeId:"transferMajorGeneralEducationTypeId",transferMajorGeneralEducationType:"transferMajorGeneralEducationType",transferMajorDisciplineFrameworkElementId:"transferMajorDisciplineFrameworkElementId",transferMajorDisciplineFrameworkElement:"transferMajorDisciplineFrameworkElement",credits:"credits",footnote:"footnote",techCore:"techCore",embeddedCredits:"embeddedCredits",groupIndex:"groupIndex",isVariableCredits:"isVariableCredits",title:"title"},Ix=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Sx=function(){return Sx=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Sx.apply(this,arguments)},Ex=function(e){function t(t){var n=e.call(this,t)||this;return n._programTermEditor=a.createRef(),n._formRef=a.createRef(),n.getProgramAwardFormItems=function(e){return(new Map).set(nl.title,{required:!0,name:nl.title,rules:[Ot.required()]}).set(nl.awardTypeId,{required:!0,name:nl.awardTypeId,rules:[Ot.required()]}).set(nl.totalWeeks,{required:!0,name:nl.totalWeeks,rules:[Ot.required()]}).set(nl.description,{required:!(n.props.readonly||!n.props.isEditing),label:n.props.readonly||!n.props.isEditing?"":"Description",name:nl.description,rules:n.props.readonly||!n.props.isEditing?[]:[Ot.required()]}).set(nl.totalCredits,{required:!0,name:nl.totalCredits,rules:[Ot.required()]}).set(nl.instructionalLevelId,{required:!0,name:nl.instructionalLevelId,rules:[Ot.required()]}).set(nl.typeOfProgramId,{required:!0,name:nl.typeOfProgramId,rules:[Ot.required()]}).set(nl.specialEmphasisId,{required:!0,name:nl.specialEmphasisId,rules:[Ot.required()]}).set(nl.objectPurposeId,{required:!0,name:nl.objectPurposeId,rules:[Ot.required()]}).set(nl.terms,{name:[e,nl.terms]})},n.getProgramTermsFormItems=function(e){return(new Map).set(gl.informationalContent,{label:n.props.readonly||!n.props.isEditing?null:"Additional Information",name:[e,gl.informationalContent]}
1).set(gl.termId,{label:"Term",name:[e,gl.termId]})},n.allTermsLoaded=function(){var e=n.state.termLoading.size>0;return n.state.termLoading.forEach((function(t){t.valueOf()&&e&&(e=!1)})),e},n.fetchData=function(){var e,t;n.setState({loading:!0,programDetail:null!==(e=n.props.programDetail)&&void 0!==e?e:Wv.create()});var r=[];n.state.instructionalLevels&&0!=n.state.instructionalLevels.length||r.push(n.loadInstructionalLevel()),n.state.typeOfPrograms&&0!=n.state.typeOfPrograms.length||r.push(n.loadTypeOfProgram()),n.state.specialEmphasis&&0!=n.state.specialEmphasis.length||r.push(n.loadSpecialEmphasis()),n.state.objectPurposes&&0!=n.state.objectPurposes.length||r.push(n.loadObjectPurpose()),n.state.awardTypes&&0!=n.state.awardTypes.length||r.push(n.loadAwardType()),n.props.programAwardId&&n.props.programAwardId!=re.default.Empty()&&r.push(n.loadProgramAward(null!==(t=n.props.programAwardId)&&void 0!==t?t:re.default.Empty())),Promise.all(r).then((function(){n.setState({loading:!1})}))},n.onTermLoaded=function(e){var t=n.state.termLoading;t.set(e,!1),n.setState({termLoading:t})},n.loadAwardType=function(){return ce.getAll(si.className).then((function(e){e&&n.setState({awardTypes:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadTypeOfProgram=function(){return ce.getAll(Kc.className).then((function(e){e&&n.setState({typeOfPrograms:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadInstructionalLevel=function(){return ce.getAll(Vc.className).then((function(e){e&&n.setState({instructionalLevels:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadSpecialEmphasis=function(){return ce.getAll(Qc.className).then((function(e){e&&n.setState({specialEmphasis:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadObjectPurpose=function(){return ce.getAll(Hc.className).then((function(e){e&&n.setState({objectPurposes:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadProgramAward=function(e){n.setState({loading:!0});var t=[];ba.getProgramAward(e).then((function(e){var r,i,o,a;if(e.programAward){var s=n.state.programDetail.id==re.default.Empty()?n.props.programDetail:n.state.programDetail,d=e.programAward,c=null!==(i=null===(r=null===s||void 0===s?void 0:s.awards)||void 0===r?void 0:r.find((function(e){return e.id==d.id})))&&void 0!==i?i:nl.create();c[nl.awardType]=d.awardType,c[nl.description]=d.description,c[nl.instructionalLevel]=d.instructionalLevel,c[nl.typeOfProgram]=d.typeOfProgram,c[nl.specialEmphasis]=d.specialEmphasis,c[nl.objectPurpose]=d.objectPurpose,c[nl.awardTypeId]=d.awardTypeId,c[nl.instructionalLevelId]=d.instructionalLevelId,c[nl.typeOfProgramId]=d.typeOfProgramId,c[nl.specialEmphasisId]=d.specialEmphasisId,c[nl.objectPurposeId]=d.objectPurposeId,c[nl.totalWeeks]=d.totalWeeks,c[nl.totalCredits]=d.totalCredits,c[nl.terms]=d.terms,c[nl.thirdPartyCredentials]=d.thirdPartyCredentials,t=null!==(a=null===(o=c.terms)||void 0===o?void 0:o.map((function(e){return e.id})))&&void 0!==a?a:[],n.setState({programAward:c,programDetail:null!==s&&void 0!==s?s:Wv.create()},(function(){return n.resetForm()}))}})).catch().finally((function(){t.forEach((function(e){return n.loadTerm(null!==e&&void 0!==e?e:re.default.Empty())}))}))},n.loadTerm=function(e){var t=n.state.termLoading;return t.set(e,!0),n.setState({termLoading:t}),ba.getProgramAwardTerm(e).then((function(e){var t,r,i;if(e){var o=n.state.programAward;o.terms&&(o.terms[null!==(r=null===(t=o.terms)||void 0===t?void 0:t.findIndex((function(t){var n;return t.order==(null===(n=e.term)||void 0===n?void 0:n.order)})))&&void 0!==r?r:0]=null!==(i=e.term)&&void 0!==i?i:gl.create()),n.setState({programAward:o},(function(){return n.resetForm()}))}})).catch((function(){n.setState({error:!0,message:"Could not load change request."})}))},n.onAwardChange=function(e){n.props.onChange&&n.props.onChange(e)},n.handleChange=function(){var e=n.setProgramAward();n.onAwardChange(e),n.setState({altered:!0,programAward:null!==e&&void 0!==e?e:nl.create()})},n.setProgramAward=function(){var e,t=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldsValue(),r=n.state.programAward;return r&&(r.title=t.title,r.totalCredits=t.totalCredits,r.awardTypeId=t.awardTypeId,r.description=t.description,r.instructionalLevelId=t.instructionalLevelId,r.typeOfProgramId=t.typeOfProgramId,r.specialEmphasisId=t.specialEmphasisId,r.objectPurposeId=t.objectPurposeId,r.totalWeeks=t.totalWeeks,r.thirdPartyCredentials=t.thirdPartyCredentials),r},n.resetForm=function(){var e,t;null===(e=n._formRef.current)||void 0===e||e.resetFields(),null===(t=n._programTermEditor.current)||void 0===t||t.resetForm(),n.setState({altered:!1})},n.handleTypeOfProgramChange=function(e,t){var r,i=n.state.programDetail;if(i.awards){var o=n.state.typeOfPrograms.find((function(t){var n;return null!==(n=t.id==(null===e||void 0===e?void 0:e.valueOf()))&&void 0!==n?n:0}));i.awards[t].typeOfProgramId=null!==(r=null===o||void 0===o?void 0:o.id)&&void 0!==r?r:0,i.awards[t].typeOfProgram=null!==o&&void 0!==o?o:Kc.create(),n.setState({programDetail:i})}},n.calculateTotalCredits=function(e,t,r,i){var o=n.state.totalCredits,a=n.state.totalTechCoreCredits,s=o.get(null!==i&&void 0!==i?i:re.default.Empty());s=s||(new Map).set(e,t),o.set(null!==i&&void 0!==i?i:re.default.Empty(),null===s||void 0===s?void 0:s.set(e,t));var d=a.get(null!==i&&void 0!==i?i:re.default.Empty());d=d||(new Map).set(e,r),a.set(null!==i&&void 0!==i?i:re.default.Empty(),null===d||void 0===d?void 0:d.set(e,r)),n.setState({totalCredits:o,totalTechCoreCredits:a})},n.onOptionChange=function(e){var t,r=n.state.programAward;r.terms&&((null!==(t=r.terms.find((function(t){return t.id==e.id})))&&void 0!==t?t:gl.create()).flatCourseGroupOptions=e.flatCourseGroupOptions),n.onA
1wardChange(r),n.setState({programAward:r})},n.state={awardTypes:[],instructionalLevels:[],objectPurposes:[],specialEmphasis:[],typeOfPrograms:[],program:$f.create(),programDetail:Wv.create(),termLoading:new Map,programDetails:[],allTermsLoaded:!1,programAward:nl.create(),totalCredits:new Map,totalTechCoreCredits:new Map},n}return Ix(t,e),t.prototype.componentDidMount=function(){var e;(null===(e=this.props.program)||void 0===e?void 0:e.id)!=re.default.Empty()&&(this.fetchData(),this.setState({fieldErrors:this.props.fieldErrors}))},t.prototype.componentDidUpdate=function(e){this.props.program&&e.program!=this.props.program&&this.fetchData(),this.props.fieldErrors&&e.fieldErrors!=this.props.fieldErrors&&this.setState({fieldErrors:this.props.fieldErrors}),this.props.loading!=e.loading&&this.setState({loading:this.props.loading}),this.allTermsLoaded()&&!this.state.allTermsLoaded&&(this.setState({allTermsLoaded:!0}),this.setState({loading:!1}))},t.prototype.render=function(){var e;return this.state.loading||this.props.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsx)(Ci.a,Sx({ref:this._formRef,layout:"vertical",initialValues:this.state.programAward,onValuesChange:this.handleChange,requiredMark:!0},{children:Object(o.jsxs)(y.b,Sx({direction:"vertical",size:"large"},{children:[Object(o.jsx)(ot.a.Title,Sx({level:5},{children:"Awards"}),void 0),this.renderAward(null!==(e=this.props.awardIndex)&&void 0!==e?e:0)]}),void 0)}),void 0)},t.prototype.renderAward=function(e){var t,n,r,i,a,s,d,c,l,u,p,f,h=this,v=null!==(t=this.state.programAward)&&void 0!==t?t:nl.create(),m=0;null===(r=this.state.totalCredits.get(null!==(n=null===v||void 0===v?void 0:v.id)&&void 0!==n?n:re.default.Empty()))||void 0===r||r.forEach((function(e){return m+=e}));var g=0;return null===(a=this.state.totalTechCoreCredits.get(null!==(i=null===v||void 0===v?void 0:v.id)&&void 0!==i?i:re.default.Empty()))||void 0===a||a.forEach((function(e){return g+=e})),Object(o.jsxs)(y.b,Sx({direction:"vertical"},{children:[Object(o.jsx)(mt.a,Sx({},this.getProgramAwardFormItems(e).get(nl.description),_t.getValidation(nl.description+e,this.state.fieldErrors,this.props.submitted),{children:Object(o.jsx)(Mr,{readonly:this.props.readonly||!this.props.isEditing||this.props.disabled||this.state.submitting},void 0)}),void 0),Object(o.jsxs)(Kn.b,Sx({size:"small",bordered:!0,layout:"vertical",column:{xs:1,sm:1,md:1,lg:2,xl:4,xxl:4}},{children:[Object(o.jsx)(Kn.b.Item,Sx({label:"Title"},{children:this.props.readonly||!this.props.isEditing?null===v||void 0===v?void 0:v.title:Object(o.jsx)(mt.a,Sx({className:"description-container"},this.getProgramAwardFormItems(e).get(nl.title),_t.getValidation(nl.title+e,this.state.fieldErrors,this.props.submitted),{children:Object(o.jsx)(ut.a,{allowClear:!0,disabled:this.props.readonly||!this.props.isEditing||this.props.disabled||this.state.submitting},void 0)}),void 0)}),void 0),Object(o.jsx)(Kn.b.Item,Sx({label:"Award Type"},{children:this.props.readonly||!this.props.isEditing?null===(s=null===v||void 0===v?void 0:v.awardType)||void 0===s?void 0:s.display:Object(o.jsx)(mt.a,Sx({className:"description-container"},this.getProgramAwardFormItems(e).get(nl.awardTypeId),_t.getValidation(nl.awardTypeId+e,this.state.fieldErrors,this.props.submitted),{children:Object(o.jsx)(pr.a,Sx({showArrow:!this.props.readonly&&this.props.isEditing,allowClear:!0,disabled:this.props.readonly||!this.props.isEditing||this.props.disabled||this.state.submitting},{children:this.state.awardTypes.map((function(e){return h.renderAwardType(e)}))}),void 0)}),void 0)}),void 0),Object(o.jsx)(Kn.b.Item,Sx({contentStyle:{paddingTop:"100px"},label:"Total Weeks"},{children:this.props.readonly||!this.props.isEditing?null===v||void 0===v?void 0:v.totalWeeks:Object(o.jsx)(mt.a,Sx({className:"description-container"},this.getProgramAwardFormItems(e).get(nl.totalWeeks),_t.getValidation(nl.totalWeeks+e,this.state.fieldErrors,this.props.submitted),{children:Object(o.jsx)(Ni.a,{min:0,disabled:this.props.readonly||!this.props.isEditing||this.props.disabled||this.state.submitting},void 0)}),void 0)}),void 0),Object(o.jsx)(Kn.b.Item,Sx({label:"Total Credits"},{children:this.props.readonly||!this.props.isEditing?null===v||void 0===v?void 0:v.totalCredits:Object(o.jsx)(mt.a,Sx({className:"description-container"},this.getProgramAwardFormItems(e).get(nl.totalCredits),_t.getValidation(nl.totalCredits+e,this.state.fieldErrors,this.props.submitted),{children:Object(o.jsx)(Ni.a,{min:0,disabled:this.props.readonly||!this.props.isEditing||this.props.disabled||this.state.submitting},void 0)}),void 0)}),void 0),Object(o.jsx)(Kn.b.Item,Sx({label:"Instructional Level"},{children:this.props.readonly||!this.props.isEditing?null===(d=null===v||void 0===v?void 0:v.instructionalLevel)||void 0===d?void 0:d.display:Object(o.jsx)(mt.a,Sx({className:"description-container"},this.getProgramAwardFormItems(e).get(nl.instructionalLevelId),_t.getValidation(nl.instructionalLevelId+e,this.state.fieldErrors,this.props.submitted),{children:Object(o.jsx)(pr.a,Sx({showArrow:!this.props.readonly&&this.props.isEditing,allowClear:!0,disabled:this.props.readonly||!this.props.isEditing||this.props.disabled||this.state.submitting},{children:this.state.instructionalLevels.map((function(e){return h.renderInstructionalLevel(e)}
1))}),void 0)}),void 0)}),void 0),Object(o.jsx)(Kn.b.Item,Sx({label:"Type of Program"},{children:this.props.readonly||!this.props.isEditing?null===(c=null===v||void 0===v?void 0:v.typeOfProgram)||void 0===c?void 0:c.display:Object(o.jsx)(mt.a,Sx({className:"description-container"},this.getProgramAwardFormItems(e).get(nl.typeOfProgramId),_t.getValidation(nl.typeOfProgramId+e,this.state.fieldErrors,this.props.submitted),{children:Object(o.jsx)(pr.a,Sx({showArrow:!this.props.readonly&&this.props.isEditing,allowClear:!0,disabled:this.props.readonly||!this.props.isEditing||this.props.disabled||this.state.submitting,onChange:function(t){return h.handleTypeOfProgramChange(t,e)}},{children:this.state.typeOfPrograms.map((function(e){return h.renderTypesOfProgram(e)}))}),void 0)}),void 0)}),void 0),Object(o.jsx)(Kn.b.Item,Sx({label:"Special Emphasis"},{children:this.props.readonly||!this.props.isEditing?null===(l=null===v||void 0===v?void 0:v.specialEmphasis)||void 0===l?void 0:l.display:Object(o.jsx)(mt.a,Sx({className:"description-container"},this.getProgramAwardFormItems(e).get(nl.specialEmphasisId),_t.getValidation(nl.specialEmphasisId+e,this.state.fieldErrors,this.props.submitted),{children:Object(o.jsx)(pr.a,Sx({showArrow:!this.props.readonly&&this.props.isEditing,allowClear:!0,disabled:this.props.readonly||!this.props.isEditing||this.props.disabled||this.state.submitting},{children:this.state.specialEmphasis.map((function(e){return h.renderSpecialEmphasis(e)}))}),void 0)}),void 0)}),void 0),Object(o.jsx)(Kn.b.Item,Sx({label:"Object Purpose"},{children:this.props.readonly||!this.props.isEditing?null===(u=null===v||void 0===v?void 0:v.objectPurpose)||void 0===u?void 0:u.display:Object(o.jsx)(mt.a,Sx({className:"description-container"},this.getProgramAwardFormItems(e).get(nl.objectPurposeId),_t.getValidation(nl.objectPurposeId+e,this.state.fieldErrors,this.props.submitted),{children:Object(o.jsx)(pr.a,Sx({showArrow:!this.props.readonly&&this.props.isEditing,allowClear:!0,disabled:this.props.readonly||!this.props.isEditing||this.props.disabled||this.state.submitting},{children:this.state.objectPurposes.map((function(e){return h.renderObjectPurpose(e)}))}),void 0)}),void 0)}),void 0)]}),void 0),Object(o.jsx)(al,{thirdPartyCredentials:null!==(p=v.thirdPartyCredentials)&&void 0!==p?p:[],readonly:!this.props.isEditing||this.state.loading||this.state.submitting,submitted:this.props.submitted,fieldErrors:this.state.fieldErrors,awardIndex:e},void 0),this.renderTerm(v),Object(o.jsxs)("b",{children:["Award Total Credits: ",m]},void 0),(null===(f=this.props.programDetail)||void 0===f?void 0:f.isTransferMajor)?null:Object(o.jsxs)("b",{children:["Award Total Tech Core Credits: ",g]},void 0)]}),void 0)},t.prototype.renderTerm=function(e){var t,n,r=this,i=0;return null===(n=this.state.totalCredits.get(null!==(t=null===e||void 0===e?void 0:e.id)&&void 0!==t?t:re.default.Empty()))||void 0===n||n.forEach((function(e){return i+=e})),Object(o.jsx)(Ci.a.List,Sx({name:nl.terms},{children:function(t){var n,i,a,s=null===(n=r._formRef.current)||void 0===n?void 0:n.getFieldValue(nl.terms);return void 0!=s&&0!=s.length||(s=null!==(a=null===(i=r.state.programAward)||void 0===i?void 0:i.terms)&&void 0!==a?a:[]),Object(o.jsx)(y.b,Sx({direction:"vertical"},{children:t.map((function(t,n){var i,a,d,c,l,u,p=(null===(i=r._formRef.current)||void 0===i?void 0:i.getFieldValue(nl.prerequisite))?null===(a=r._formRef.current)||void 0===a?void 0:a.getFieldValue(nl.prerequisite):e.prerequisite,f=p&&0==n?"Prerequisite":"Term "+(n+(p?0:1)),h=(null!==s&&void 0!==s?s:[gl.create])[n],v={id:null===h||void 0===h?void 0:h.id,prerequisite:null===h||void 0===h?void 0:h.prerequisite,groups:null===h||void 0===h?void 0:h.groups,flatCourseGroupOptions:null===h||void 0===h?void 0:h.flatCourseGroupOptions,order:null===h||void 0===h?void 0:h.order},m=null!==(c=null===(d=r.state.programDetail)||void 0===d?void 0:d.isTransferMajor)&&void 0!==c&&c;return Object(o.jsxs)(Qn.a,Sx({type:"inner",size:"small",title:f},{children:[Object(o.jsx)(mt.a,Sx({},r.getProgramTermsFormItems(n).get(gl.termId),_t.getValidation(gl.termId+r.state.programAward.order,r.state.fieldErrors,r.state.submitted||r.props.readonly),{children:Object(o.jsx)(Cu,{readOnly:r.props.readonly||!r.props.isEditing},void 0)}),void 0),Object(o.jsx)(mt.a,Sx({},r.getProgramTermsFormItems(n).get(gl.informationalContent),_t.getValidation(gl.informationalContent+r.state.programAward.order,r.state.fieldErrors,r.state.submitted||r.props.readonly),{children:Object(o.jsx)(Mr,{readonly:r.props.readonly||!r.props.isEditing},void 0)}),void 0),Object(o.jsx)(Eu,{ref:r._programTermEditor,value:v,isEditing:r.props.isEditing,programDisplay:!0,programAward:r.state.programAward,transferMajor:m,selectedInstitution:r.state.program.institutionId,loading:null===(l=r.state.termLoading)||void 0===l?void 0:l.get(null!==(u=v.id)&&void 0!==u?u:re.default.Empty()),readonly:r.props.readonly,termIndex:n,fieldErrors:r.state.fieldErrors,submitted:r.props.submitted,onCreditsChanged:r.calculateTotalCredits,onTermLoaded:r.onTermLoaded,onOptionChange:r.onOptionChange},n)]}),t.key)}))}),void 0)}}),void 0)},t.prototype.renderAwardType=function(e){if(e.id)return Object(o.jsxs)(pr.a.Option,Sx({value:e.id},{children:[e.code," - ",e.name]}),e.id)},t.prototype.renderTypesOfProgram=function(e){if(e.id)return Object(o.jsxs)(pr.a.Option,Sx({value:e.id},{children:[e.code," - ",e.name]}),e.id)},t.prototype.renderObjectPurpose=function(e){if(e.id)return Object(o.jsxs)(pr.a.Option,Sx({value:e.id},{children:[e.code," - ",e.name]}),e.id)},t.prototype.renderSpecialEmphasis=function(e){if(e.id)return Object(o.jsxs)(pr.a.Option,Sx({value:e.id},{children:[e.code," - ",e.name]}),e.id)},t.prototype.renderInstructionalLevel=function(e){if(e.id)return Object(o.jsxs)(pr.a.Option,Sx({value:e.id},{children:[e.code," - ",e.name]}),e.id)},t.prototype.renderInstitutionLocations=function(e){var t,n;if(e.id)return Object(o.jsxs)(pr.a.Option,Sx({value:null!==(t=e.id)&&void 0!==t?t:re.default.Empty()},{children:[e.name," - ",e.street1," "]}),null!==(n=e.id)&&void 0!==n?n:re.default.Empty())},t}(a.Component),Rx=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),_x=function(){return _x=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},_x.apply(this,arguments)},Tx=function(e){function t(t){var n=e.call(this,t)||this;return n._programTermEditor=a.createRef(),n._formRef=a.createRef(),n._programAwardDisplayRef=a.createRef(),n.getProgramAwardFormItems=function(e){return(new Map).set(Wv.title,{required:!0,name:Wv.title,rules:[Ot.required()]}).set(Wv.cipNumberId,{required:!0,name:Wv.cipNumberId,rules:[Ot.required()]}).set(Wv.iowaVariationId,{required:!0,name:Wv.iowaVariationId,rules:[Ot.required()]}).set(Wv.approvedByAdvisoryBoard,{name:Wv.approvedByAdvisoryBoard}).set(Wv.approvedByDOE,{name:Wv.approvedByDOE}).set(Wv.curriculumApprovalProcessDateOfApproval,{name:Wv.curriculumApprovalProcessDateOfApproval}).set(Wv.awards,{name:e}).set(Wv.install,{required:!0,name:Wv.install,rules:[Ot.required(),function(e){var t=e.getFieldValue;return{validator:_t.termInputYearValidator(n.state.terms,t(Wv.retire),Wv.install)}},function(){return{validator:_t.termAndYearValidator()}}]}).set(Wv.retire,{name:Wv.retire,rules:[function(e){var t=e.getFieldValue;return{validator:_t.termInputYearValidator(n.state.terms,t(Wv.install),Wv.retire)}},function(){return{validator:_t.termAndYearValidatorNullable()}}]})},n.fetchData=function(){n.setState({loading:!0});var e=[];n.state.cipNumberDetails&&0!=n.state.cipNumberDetails.length||e.push(n.loadCipNumberDetails()),0==n.state.terms.length&&e.push(n.loadTerms()),n.state.iowaVariations&&0!=n.state.iowaVariations.length||e.push(n.loadIowaVariation()),n.props.selectedDetailId&&-1==n.state.programDetails.findIndex((function(e){return e.id==n.props.selectedDetailId}))&&e.push(n.loadProgram()),n.setState({program:n.props.program},(function(){return n.resetForm()})),Promise.all(e).then((function(){n.setState({loading:!1})}
1))},n.loadTerms=function(){return ce.getAll(Rs.className).then((function(e){e&&n.setState({terms:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadCipNumberDetails=function(){return Dp.getActiveCipDetails().then((function(e){var t;e&&n.setState({cipNumberDetails:null!==(t=e.cipNumberDetails)&&void 0!==t?t:[]})})).catch((function(){n.setState({error:!0})}))},n.loadIowaVariation=function(){return ce.getAll(pi.className).then((function(e){e&&n.setState({iowaVariations:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadProgram=function(){var e;n.setState({loading:!0}),ba.getProgramDetail(null!==(e=n.props.selectedDetailId)&&void 0!==e?e:re.default.Empty()).then((function(e){if(e.programDetail){var t=n.state.programDetails;t.push(n.cleanDates(e.programDetail)),n.setState({programDetails:t},(function(){return n.resetForm()}))}})).catch()},n.cleanDates=function(e){return e.approvedByAdvisoryBoard=It()(e.approvedByAdvisoryBoard),e.approvedByDOE=It()(e.approvedByDOE),e.curriculumApprovalProcessDateOfApproval=It()(e.curriculumApprovalProcessDateOfApproval),e},n.handleChange=function(){0==n.state.altered&&n.setState({altered:!0})},n.resetForm=function(){var e,t;null===(e=n._formRef.current)||void 0===e||e.resetFields(),null===(t=n._programAwardDisplayRef.current)||void 0===t||t.resetForm(),n.setState({altered:!1})},n.handleSubmit=function(){var e,t;n.setState({submitting:!0});var r=n._formRef?n._formRef.current.getFieldsValue():null,i=$f.create(r),o=Wv.create(_x({},r));o.id=null!==(e=n.props.selectedDetailId)&&void 0!==e?e:re.default.Empty(),o.awards&&o.awards.forEach((function(e){var t=[];if(e.terms)for(var n=0;n<e.terms.length;n++){var r=e.terms[n];e.terms[n][nl.terms]?((r=e.terms[n][nl.terms])[gl.informationalContent]=e.terms[n][gl.informationalContent],r[gl.termId]=e.terms[n][gl.termId],r[jx.order]=e.terms[n][jx.order]):((r=e.terms[n])[gl.informationalContent]=e.terms[n][gl.informationalContent],r[gl.termId]=e.terms[n][gl.termId],r[jx.order]=e.terms[n][jx.order]),t.push(r)}e.terms=t}));var a=[o];i.id=null!==(t=n.state.program.id)&&void 0!==t?t:re.default.Empty(),i.programDetails.pushAll(a);var s=Ox({program:i});ba.saveProgramDetails(s).then((function(e){var t;n.setState({submitted:!0}),(null===e||void 0===e?void 0:e.succeeded)?(n.setState({}),S.b.success("Saved"),n.props.onSave&&(null===(t=e.program)||void 0===t?void 0:t.id)&&(n.resetForm(),n.props.onSave(e.program.id))):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Save Failed"))})).catch((function(e){n.setState({error:e}),S.b.error("Error Saving")})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.onTabChange=function(e){n.setState({activeTab:e})},n.renderCreditLimitErrors=function(e){var t;if(n.state.fieldErrors&&n.state.activeTab==e.toString())return Object(o.jsx)(o.Fragment,{children:null===(t=_t.getValidation("awardCredits"+n.state.activeTab,n.state.fieldErrors,n.state.submitted||n.props.readonly))||void 0===t?void 0:t.messages.map((function(e){return n.renderErrors(e)}))},void 0)},n.renderErrors=function(e){return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:e||n.state.message},void 0)},n.state={activeTab:"0",cipNumberDetails:[],iowaVariations:[],program:$f.create(),programDetail:Wv.create(),programDetails:[],totalCredits:new Map,totalTechCoreCredits:new Map,terms:[]},n}return Rx(t,e),t.prototype.componentDidMount=function(){var e;(null===(e=this.props.program)||void 0===e?void 0:e.id)!=re.default.Empty()&&this.fetchData()},t.prototype.componentDidUpdate=function(e){var t=this;this.props.program&&e.program!=this.props.program&&this.fetchData(),this.props.loading!=e.loading&&this.setState({loading:this.props.loading}),this.props.selectedDetailId!=e.selectedDetailId&&(-1==this.state.programDetails.findIndex((function(e){return e.id==t.props.selectedDetailId}))?this.fetchData():this.resetForm())}
1,t.prototype.render=function(){var e,t,n,r,i,a,s,d,c=this;if(this.state.loading)return Object(o.jsx)(pt.a,{active:!0},void 0);var l=this.state.programDetails.find((function(e){return e.id==c.props.selectedDetailId}));return Object(o.jsx)(Ci.a,_x({ref:this._formRef,layout:"vertical",initialValues:l,onValuesChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!0},{children:Object(o.jsxs)(y.b,_x({direction:"vertical",size:"large"},{children:[Object(o.jsxs)(Kn.b,_x({size:"small",bordered:!0,layout:"vertical",column:{xs:1,sm:1,md:1,lg:2,xl:4,xxl:4}},{children:[Object(o.jsx)(Kn.b.Item,_x({label:"Program Title"},{children:this.props.readonly||!this.props.isEditing?null===l||void 0===l?void 0:l.title:Object(o.jsx)(mt.a,_x({className:"description-container"},this.getProgramAwardFormItems(0).get(null===Wv||void 0===Wv?void 0:Wv.title),_t.getValidation(Wv.title,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:this.props.readonly||!this.props.isEditing||this.props.disabled||this.state.submitting},void 0)}),void 0)}),void 0),Object(o.jsx)(Kn.b.Item,_x({label:"CIP Number"},{children:this.props.readonly||!this.props.isEditing?null===(t=null===(e=null===l||void 0===l?void 0:l.cipNumber)||void 0===e?void 0:e.currentDetail)||void 0===t?void 0:t.friendlyDisplay:Object(o.jsx)(mt.a,_x({className:"description-container"},this.getProgramAwardFormItems(0).get(null===Wv||void 0===Wv?void 0:Wv.cipNumberId),_t.getValidation(Wv.cipNumberId,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(pr.a,_x({allowClear:!0,showSearch:!0,showArrow:!this.props.readonly&&this.props.isEditing,optionFilterProp:"children",disabled:this.props.readonly||!this.props.isEditing||this.props.disabled||this.state.submitting},{children:this.renderCIPOptions()}),void 0)}),void 0)}),void 0),Object(o.jsx)(Kn.b.Item,_x({label:"Iowa Variation"},{children:this.props.readonly||!this.props.isEditing?null===(n=null===l||void 0===l?void 0:l.iowaVariation)||void 0===n?void 0:n.display:Object(o.jsx)(mt.a,_x({className:"description-container"},this.getProgramAwardFormItems(0).get(Wv.iowaVariationId),_t.getValidation(Wv.iowaVariationId,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(pr.a,_x({showArrow:!this.props.readonly&&this.props.isEditing,allowClear:!0,disabled:this.props.readonly||!this.props.isEditing||this.props.disabled||this.state.submitting},{children:this.state.iowaVariations.map((function(e){return c.renderIowaVariation(e)}))}),void 0)}),void 0)}),void 0),Object(o.jsxs)(Kn.b.Item,_x({label:"First Available"},{children:[" ",Je.isAuthorized([gn.SYSTEM_ADMIN])?this.props.readonly||!this.props.isEditing?null===(i=null===l||void 0===l?void 0:l.install)||void 0===i?void 0:i.display:Object(o.jsx)(mt.a,_x({className:"description-container"},this.getProgramAwardFormItems(0).get(Wv.install),{children:Object(o.jsx)(Od,{anyYear:!0},void 0)}),void 0):null===(r=null===l||void 0===l?void 0:l.install)||void 0===r?void 0:r.display," "]}),void 0),Object(o.jsx)(Kn.b.Item,_x({label:"Last Available"},{children:Je.isAuthorized([gn.SYSTEM_ADMIN])?this.props.readonly||!this.props.isEditing?null===(s=null===l||void 0===l?void 0:l.retire)||void 0===s?void 0:s.display:Object(o.jsx)(mt.a,_x({className:"description-container"},this.getProgramAwardFormItems(0).get(Wv.retire),{children:Object(o.jsx)(Od,{anyYear:!0},void 0)}),void 0):null===(a=null===l||void 0===l?void 0:l.retire)||void 0===a?void 0:a.display}),void 0),Object(o.jsx)(Kn.b.Item,_x({label:"Submitted By"},{children:null===(d=null===l||void 0===l?void 0:l.submittingUser)||void 0===d?void 0:d.fullName}),void 0),Object(o.jsx)(Kn.b.Item,_x({label:"Submitted"},{children:$r.shortDate(null===l||void 0===l?void 0:l.submittedOn)}),void 0),Object(o.jsx)(Kn.b.Item,_x({label:"Approved By Advisory Board"},{children:this.props.readonly||!this.props.isEditing?$r.shortDate(null===l||void 0===l?void 0:l.approvedByAdvisoryBoard):Object(o.jsx)(mt.a,_x({className:"description-container"},this.getProgramAwardFormItems(0).get(Wv.approvedByAdvisoryBoard),{children:Object(o.jsx)(ur.a,{format:"M/D
1/YYYY",disabled:this.props.readonly},void 0)}),void 0)}),void 0),Object(o.jsx)(Kn.b.Item,_x({label:"Approved By DOE"},{children:this.props.readonly||!this.props.isEditing?$r.shortDate(null===l||void 0===l?void 0:l.approvedByDOE):Object(o.jsx)(mt.a,_x({className:"description-container"},this.getProgramAwardFormItems(0).get(Wv.approvedByDOE),{children:Object(o.jsx)(ur.a,{format:"M/D/YYYY",disabled:this.props.readonly},void 0)}),void 0)}),void 0),Object(o.jsx)(Kn.b.Item,_x({label:"Curriculum Approval Process Date of Approval"},{children:this.props.readonly||!this.props.isEditing?$r.shortDate(null===l||void 0===l?void 0:l.curriculumApprovalProcessDateOfApproval):Object(o.jsx)(mt.a,_x({className:"description-container"},this.getProgramAwardFormItems(0).get(Wv.curriculumApprovalProcessDateOfApproval),{children:Object(o.jsx)(ur.a,{format:"M/D/YYYY",disabled:this.props.readonly},void 0)}),void 0)}),void 0)]}),void 0),this.renderAwards(),this.renderSave()]}),void 0)}),void 0)},t.prototype.renderAwards=function(){var e=this;return Object(o.jsx)(Ci.a.List,_x({name:Wv.awards},{children:function(t){return Object(o.jsx)(pa.a,_x({onChange:e.onTabChange},{children:t.map((function(t,n){return e.renderAward(t,n)}))}),void 0)}}),void 0)},t.prototype.renderAward=function(e,t){var n,r,i,a,s,d,c=this,l=nl.create(),u=this.state.programDetails.find((function(e){return e.id==c.props.selectedDetailId}));(null===u||void 0===u?void 0:u.awards)&&(l=null===u||void 0===u?void 0:u.awards[e.key]);var p=0;null===(r=this.state.totalCredits.get(null!==(n=null===l||void 0===l?void 0:l.id)&&void 0!==n?n:re.default.Empty()))||void 0===r||r.forEach((function(e){return p+=e}));var f=0;null===(a=this.state.totalTechCoreCredits.get(null!==(i=null===l||void 0===l?void 0:l.id)&&void 0!==i?i:re.default.Empty()))||void 0===a||a.forEach((function(e){return f+=e}));var h=!!this.state.fieldErrors&&(null!==(s=this.state.fieldErrors[Wv.awards+t])&&void 0!==s&&s)?Object(o.jsxs)("span",{children:[Object(o.jsx)(yx.a,{color:"red"},void 0)," ",null===l||void 0===l?void 0:l.title]},void 0):null===l||void 0===l?void 0:l.title;return Object(o.jsxs)(pa.a.TabPane,_x({tab:h},{children:[Object(o.jsx)(mt.a,_x({},this.getProgramAwardFormItems(t).get(Wv.awards),_t.getValidation(nl.terms,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(Ex,{ref:this._programAwardDisplayRef,program:this.state.program,programAwardId:null!==(d=null===l||void 0===l?void 0:l.id)&&void 0!==d?d:re.default.Empty(),award:e,awardIndex:t,programDetail:this.state.programDetails.find((function(e){return e.id==c.props.selectedDetailId})),selectedDetailId:this.props.selectedDetailId,loading:this.state.loading,fieldErrors:this.state.fieldErrors,submitted:this.state.submitted,isEditing:this.props.isEditing,readonly:this.props.readonly,disabled:this.state.submitting},t)}),void 0),this.renderCreditLimitErrors(t)]}),t)},t.prototype.renderCIPOptions=function(){var e=this;return this.state.cipNumberDetails.map((function(t){return e.renderCIPOption(t)}))},t.prototype.renderCIPOption=function(e){var t,n;if(e.id)return Object(o.jsx)(pr.a.Option,_x({value:null!==(t=e.cipNumberId)&&void 0!==t?t:re.default.Empty()},{children:e.friendlyDisplay}),null!==(n=e.cipNumberId)&&void 0!==n?n:re.default.Empty())},t.prototype.renderIowaVariation=function(e){if(e.id)return Object(o.jsx)(pr.a.Option,_x({value:e.id},{children:e.display}),e.id)},t.prototype.renderSave=function(){if(this.props.isEditing)return Object(o.jsx)(Ze,_x({validFeatureFlags:[gn.EDIT_PROGRAM]},{children:Object(o.jsxs)(y.b,_x({direction:"horizontal"},{children:[Object(o.jsx)(Tr,{saving:this.state.submitting},void 0),Object(o.jsx)(Ir,{onConfirm:this.resetForm,disabled:this.state.altered},void 0)]}),void 0)}),void 0)},t}(a.Component),Cx=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),xx=function(){return xx=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},xx.apply(this,arguments)},Ax=function(e){function t(t){var n=e.call(this,t)||this;return n._programDisplayRef=a.createRef(),n.loadProgram=function(e){return n.setState({loading:!0}),ba.getProgramHeader(e).then((function(e){var t,r,i,o,a;if(e.program){var s=re.default.Empty();if(null!==(i=null===(r=null===(t=e.program)||void 0===t?void 0:t.programDetails)||void 0===r?void 0:r.length)&&void 0!==i&&i){var d=null!=e.program.programDetails?e.program.programDetails[0]:Wv.create();d.id&&(s=d.id)}n.setState({program:null!==(o=e.program)&&void 0!==o?o:$f.create(),programId:null!==(a=e.program.id)&&void 0!==a?a:re.default.Empty(),selectedDetailId:s})}})).catch().finally((function(){n.setState({loading:!1})}
1))},n.loadProgramClassification=function(){return ce.getAll(yi.className).then((function(e){n.setState({programClassifications:e})}))},n.goBack=function(){T.goBack()},n.programDetailsSaved=function(e){n.setState({isEditing:!1}),n.loadProgram(e)},n.programAdvisorsSaved=function(e){n.setState({isEditing:!1,activeTab:"advisors"}),n.loadProgram(e)},n.handleVersionSelect=function(e){n.setState({selectedDetailId:e.key})},n.programCurriculumReport=function(){var e,t,r,i,o=null!==(r=null===(t=null===(e=n.state.program)||void 0===e?void 0:e.programDetails)||void 0===t?void 0:t.filter((function(e){return e.id==n.state.selectedDetailId}))[0])&&void 0!==r?r:Wv.create();window.open(x.generateFull(x.PROGRAM_DETAILED_COURSE_LISTING,{programDetailId:null!==(i=o.id)&&void 0!==i?i:re.default.Empty()}),"_blank")},n.getDownloadList=function(){return[{title:"Program Curriculum Report (AS-28)",description:"File contains the curriculum for the selected program detail.",action:function(){return n.programCurriculumReport()}}]},n.changeTab=function(e){n.setState({activeTab:e}),T.replace(x.generate("",{},{activeTab:e}),{activeTab:e})},n.toggleEdit=function(){var e;n.state.isEditing&&(null===(e=n._programDisplayRef.current)||void 0===e||e.resetForm()),n.setState({isEditing:!n.state.isEditing})},n.state={activeTab:"program_details",programId:re.default.Empty(),program:$f.create(),selectedDetailId:re.default.Empty(),programClassifications:[]},n}return Cx(t,e),t.prototype.componentDidMount=function(){var e=this,t=Hr.getPathPart(this.props.match,"id"),n=[];n.push(this.loadProgram(t)),n.push(this.loadProgramClassification()),Promise.all(n).then((function(){e.setState({loading:!1})}));var r=Hr.getParameter("activeTab","program_details");this.setState({activeTab:r})},t.prototype.render=function(){var e,t,n,r,i,a,s,d,c,l,u=this;if(this.state.loading)return Object(o.jsx)(pt.a,{active:!0},void 0);var p=null!==(n=null===(t=null===(e=this.state.program)||void 0===e?void 0:e.programDetails)||void 0===t?void 0:t.filter((function(e){return e.id==u.state.selectedDetailId}))[0])&&void 0!==n?n:Wv.create(),f=p?p.versionDisplay:"Versions",h=Object(o.jsx)(Gt.a,xx({onSelect:this.handleVersionSelect,selectable:!0,selectedKeys:[this.state.selectedDetailId]},{children:null===(r=this.state.program.programDetails)||void 0===r?void 0:r.map((function(e){return Object(o.jsx)(Gt.a.Item,{children:e.versionDisplay},e.id)}))}),void 0),v=Object(o.jsx)(y.b,xx({direction:"vertical"}
1,{children:Object(o.jsx)(la.a,xx({overlay:h},{children:Object(o.jsx)(rt.a,xx({icon:Object(o.jsx)(kt.a,{},void 0)},{children:f}),void 0)}),void 0)}),void 0),m=p.isTransferMajor?null===(i=this.state.programClassifications.find((function(e){var t,n;return e.id==(null===(n=(null!==(t=p.awards)&&void 0!==t?t:[])[0].awardType)||void 0===n?void 0:n.transferMajorProgramTypeId)})))||void 0===i?void 0:i.name:null===(a=this.state.programClassifications.find((function(e){var t,n;return e.id==(null===(n=(null!==(t=p.awards)&&void 0!==t?t:[])[0].awardType)||void 0===n?void 0:n.nonTrasferMajorProgramTypeId)})))||void 0===a?void 0:a.name;return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:null!==(s=null===p||void 0===p?void 0:p.title)&&void 0!==s?s:"Program",breadcrumbs:Xn.programList(),subTitle:null!==(l=(null===(c=null===(d=this.state.program)||void 0===d?void 0:d.institution)||void 0===c?void 0:c.name)+" - "+m)&&void 0!==l?l:"Unknown",extra:v,onBack:this.goBack,footer:Object(o.jsxs)(pa.a,xx({activeKey:this.state.activeTab,onChange:this.changeTab},{children:[Object(o.jsx)(pa.a.TabPane,{tab:"Details"},"program_details"),Object(o.jsx)(pa.a.TabPane,{tab:"Advisory Board"},"advisors"),Object(o.jsx)(pa.a.TabPane,{tab:"Downloads"},"downloads"),Je.isAuthorized([gn.VIEW_CHANGE_REQUEST])?Object(o.jsx)(pa.a.TabPane,{tab:"Change Requests"},"program_change_request"):null]}),void 0)},void 0),Object(o.jsx)(zr,{when:this.state.isEditing},void 0),this.renderProgramDetails(p),this.renderChangeRequestDataTable(),this.renderDownloads(),this.renderProgramAdvisoryBoards()]},void 0)},t.prototype.renderProgramDetails=function(e){var t=this.state.programId==re.default.Empty()?null:Object(o.jsx)(Ze,xx({validFeatureFlags:[gn.EDIT_PROGRAM]},{children:Object(o.jsx)(Br,{isEditing:this.state.isEditing,onClick:this.toggleEdit},void 0)}),void 0),n=!1;return Je.isAuthorized([gn.EDIT_PROGRAM])||(n=!0),Object(o.jsx)(Qn.a,xx({title:"Program Details",extra:t,hidden:"program_details"!==this.state.activeTab},{children:Object(o.jsx)(Tx,{ref:this._programDisplayRef,program:this.state.program,programDetail:e,selectedDetailId:this.state.selectedDetailId,isEditing:this.state.isEditing,readonly:n,disabled:this.state.submitting,onSave:this.programDetailsSaved},void 0)}),void 0)},t.prototype.renderChangeRequestDataTable=function(){var e,t,n;if(this.props.currentUser)return Object(o.jsx)(Qn.a,xx({title:"Change Request",hidden:"program_change_request"!==this.state.activeTab},{children:Object(o.jsx)(Hm,{userId:null!==(t=null===(e=this.props.currentUser)||void 0===e?void 0:e.userId)&&void 0!==t?t:null,institution:this.props.selectedInstitution,programId:null!==(n=this.state.program.id)&&void 0!==n?n:re.default.Empty()},void 0)}),void 0)},t.prototype.renderDownloads=function(){return Object(o.jsx)(Qn.a,xx({title:"Downloads",hidden:"downloads"!==this.state.activeTab},{children:Object(o.jsx)(ua.b,{itemLayout:"horizontal",dataSource:this.getDownloadList(),renderItem:function(e){return Object(o.jsx)(ua.b.Item,{children:Object(o.jsx)(ua.b.Item.Meta,{avatar:Object(o.jsx)(rt.a,xx({type:"link",onClick:e.action},{children:Object(o.jsx)(pn.a,{},void 0)}),void 0),title:Object(o.jsx)(rt.a,xx({type:"link",onClick:e.action},{children:e.title}),void 0),description:e.description},void 0)},void 0)}},void 0)}),void 0)},t.prototype.renderProgramAdvisoryBoards=function(){return Object(o.jsx)(Qn.a,xx({title:"Advisory Board",hidden:"advisors"!==this.state.activeTab},{children:Object(o.jsx)(bx,{programDetailId:this.state.selectedDetailId},void 0)}),void 0)},t}(a.Component);var Px=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected}}))(Ax)),Nx={className:"ProgramDataTableDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",programId:"00000000-0000-0000-0000-000000000000",cipNumberId:"00000000-0000-0000-0000-000000000000",cipNumber:null,iowaVariationId:0,iowaVariation:null,title:"",institutionId:"00000000-0000-0000-0000-000000000000",isTransferMajor:!1,institution:null,install:null,retire:null,awardTypeIds:[],awards:[],status:null,programClassification:null},e)},id:"id",programId:"programId",cipNumberId:"cipNumberId",cipNumber:"cipNumber",iowaVariationId:"iowaVariationId",iowaVariation:"iowaVariation",title:"title",institutionId:"institutionId",isTransferMajor:"isTransferMajor",institution:"institution",install:"install",retire:"retire",awardTypeIds:"awardTypeIds",awards:"awards",status:"status",programClassification:"programClassification"},wx=function(){function e(){}return e.isActive=function(e,t){var n,r,i,o;if(t&&(null===t||void 0===t?void 0:t.termId)!=re.default.Empty()){var a=It()(null===(n=t.term)||void 0===n?void 0:n.startDate);if((null!==(r=null===t||void 0===t?void 0:t.year)&&void 0!==r?r:0)<$r.getCurrentYear()||(null!==(i=null===e||void 0===e?void 0:e.year)&&void 0!==i?i:0)>(null!==(o=null===t||void 0===t?void 0:t.year)&&void 0!==o?o:0))return"Inactive";var s=Number.parseInt(a.format("M")),d=Number.parseInt(a.format("D"));if((null===t||void 0===t?void 0:t.year)==$r.getCurrentYear()&&(s<$r.getCurrentMonth()||s==$r.getCurrentMonth()&&d<$r.getCurrentDay()))return"Inactive"}return"Active"},e.isActiveFromYearTerm=function(e,t,n,r){var i,o,a,s,d,c,l,u,p,f,h,v;if(n){var m=r.find((function(e){return e.id==n.termId}));if(t&&(null===t||void 0===t?void 0:t.termId)!=re.default.Empty()){var g=It()(null===(i=t.term)||void 0===i?void 0:i.startDate);if(t.year&&((null===t||void 0===t?void 0:t.year)<(null!==(o=n.year)&&void 0!==o?o:0)||(null!==(a=null===e||void 0===e?void 0:e.year)&&void 0!==a?a:0)>(null!==(s=null===t||void 0===t?void 0:t.year)&&void 0!==s?s:0)))return"Inactive";var b=Number.parseInt(g.format("M")),y=Number.parseInt(g.format("D")),O=It()(null===m||void 0===m?void 0:m.startDate),j=O.month()+2>12?O.month()+2-12:O.month()+1,I=Number.parseInt(O.format("D"));if((null===t||void 0===t?void 0:t.year)==(null!==(d=n.year)&&void 0!==d?d:0)&&(b<j||b==j&&y<=I))return"Inactive"}return(null!==(c=null===e||void 0===e?void 0:e.year)&&void 0!==c?c:0)<(null!==(l=n.year)&&void 0!==l?l:0)||(null!==(u=null===e||void 0===e?void 0:e.year)&&void 0!==u?u:0)==(null!==(p=n.year)&&void 0!==p?p:0)&&(null!==(h=null===(f=null===e||void 0===e?void 0:e.term)||void 0===f?void 0:f.startDate)&&void 0!==h?h:0)<=(null!==(v=null===m||void 0===m?void 0:m.startDate)&&void 0!==v?v:0)?"Active":"Pending"}return""},e}(),Dx=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),qx=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(){var e=[];n.setState({loading:!0}),Ii.Institutions().then((function(e){return n.setState({institutions:e})})),Ii.AwardTypes(!0).then((function(e){return n.setState({awardTypes:e})})),Ii.IowaVariations().then((function(e){return n.setState({iowaVariations:e})})),Ii.StatusTypes().then((function(e){return n.setState({statuses:e})})),Ii.ProgramClassificationTypes().then((function(e){return n.setState({programClassifications:e})})),e.push(n.loadTerms()),Promise.all(e).then((function(){n.setState({loading:!1})}
1))},n.loadTerms=function(){return ce.getAll(Rs.className).then((function(e){e&&n.setState({terms:null!==e&&void 0!==e?e:[]})}))},n.getColumnDefinitions=function(){var e=[{title:"Title",dataIndex:Nx.title,render:function(e,t){return t.title},sorter:!0,filterType:wr.Text,width:225},{title:"Awards",dataIndex:Nx.awardTypeIds,render:function(e,t){return n.state.awardTypes.filter((function(e){return t.awardTypeIds.some((function(t){return t==e.value}))})).map((function(e){return e.text})).join(", ")},filterType:wr.DropdownMulti,dropdownFilterOptions:n.state.awardTypes,width:225},{title:"Program Type",dataIndex:Nx.programClassification,render:function(e,t){var n;return null===(n=t.programClassification)||void 0===n?void 0:n.name},sorter:!0,filterType:wr.DropdownMulti,dropdownFilterOptions:n.state.programClassifications,width:225},{title:"CIP Number ",dataIndex:Nx.cipNumberId,render:function(e,t){var n,r,i;if((null===(n=t.cipNumber)||void 0===n?void 0:n.cipNumberDetails)&&(null===(i=null===(r=t.cipNumber)||void 0===r?void 0:r.cipNumberDetails)||void 0===i?void 0:i.length)>0)return t.cipNumber.cipNumberDetails[0].friendlyDisplay},sorter:!0,filterType:wr.Text,width:225},{title:"Transfer",dataIndex:Nx.isTransferMajor,render:function(e,t){return t.isTransferMajor?"Yes":""},sorter:!0,filterType:wr.DropdownSingle,dropdownFilterOptions:[{value:"transfer",text:"Yes"},{value:"cte",text:"No"}],width:100},{title:"Iowa Variation",dataIndex:Nx.iowaVariationId,render:function(e,t){var n;return null===(n=t.iowaVariation)||void 0===n?void 0:n.display},sorter:!0,filterType:wr.DropdownMulti,dropdownFilterOptions:n.state.iowaVariations,width:225}];return n.props.institution||e.push({title:"Community College",dataIndex:Nx.institutionId,render:function(e,t){var n,r;return null!==(r=null===(n=t.institution)||void 0===n?void 0:n.name)&&void 0!==r?r:""},width:275,filterType:wr.DropdownMulti,sorter:!0,dropdownFilterOptions:n.state.institutions}),e.push({title:"Status",dataIndex:Nx.status,render:function(e,t){return wx.isActiveFromYearTerm(null===t||void 0===t?void 0:t.install,null===t||void 0===t?void 0:t.retire,n.props.termYear,n.state.terms)},width:175,filterType:wr.DropdownMulti,dropdownFilterOptions:n.state.statuses}),e},n.openProgram=function(e){var t;e.id&&T.push(x.generate(x.PROGRAM_DETAILS,{id:null!==(t=e.programId)&&void 0!==t?t:re.default.Empty()},{}))},n.state={statuses:[],institutions:[],awardTypes:[],cipNumbers:[],iowaVariations:[],programClassifications:[],terms:[]},n}return Dx(t,e),t.prototype.componentDidMount=function(){this.fetchData()},t.prototype.render=function(){return void 0==this.state.loading||this.state.loading?Object(o.jsx)(pt.a,{},void 0):Object(o.jsx)("div",{children:this.renderDataTable()},void 0)},t.prototype.renderDataTable=function(){var e=this,t=[];return t.push(oo.Reset()),Object(o.jsx)(io,{ref:function(t){return e._dataTable=t},onRowClick:this.openProgram,serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:t,columns:this.getColumnDefinitions(),fetchData:{fetch:function(t){var n,r,i,o,a,s;return ba.getProgramTableData(t,null!==(r=null===(n=e.props.institution)||void 0===n?void 0:n.id)&&void 0!==r?r:re.default.Empty(),null!==(o=null===(i=e.props.termYear)||void 0===i?void 0:i.termId)&&void 0!==o?o:re.default.Empty(),null!==(s=null===(a=e.props.termYear)||void 0===a?void 0:a.year)&&void 0!==s?s:0)}},stateSaving:{enabled:!0,tableUniqueKey:"programs_list"}},void 0)},t}(a.Component),Fx=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Mx=function(){return Mx=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Mx.apply(this,arguments)},Yx=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(){n.setState({loading:!0});var e=[];null==n.state.selectedTermYear&&e.push(eT.getCurrent().then((function(e){var t,r;return n.setState({selectedTermYear:{termId:null!==(t=e.termId)&&void 0!==t?t:re.default.Empty(),year:null!==(r=e.year)&&void 0!==r?r:2021}})}))),Promise.all(e).then((function(){n.setState({loading:!1})}
1))},n.handleTermYearChange=function(e){n.setState({selectedTermYear:e})},n.changeTab=function(e){n.setState({activeTab:e}),T.replace(x.generate("",{},{activeTab:e}),{activeTab:e})},n.state={selectedTermYear:void 0,loading:!1,activeTab:"institution_code"},n}return Fx(t,e),t.prototype.componentDidMount=function(){var e=Hr.getParameter("activeTab","institution_code");this.setState({activeTab:e}),this.fetchData()},t.prototype.render=function(){var e,t,n,r=null===(e=this.props.institution)||void 0===e?void 0:e.abbreviation,i=Object(o.jsxs)(pa.a,Mx({activeKey:this.state.activeTab,onChange:this.changeTab,hidden:null==this.props.institution},{children:[Object(o.jsx)(pa.a.TabPane,{tab:r+" Programs"},"institution_code"),Object(o.jsx)(pa.a.TabPane,{tab:"All Programs"},"all")]}),void 0),a="all"==this.state.activeTab?null:this.props.institution,s={termId:null===(t=this.state.selectedTermYear)||void 0===t?void 0:t.termId,year:null===(n=this.state.selectedTermYear)||void 0===n?void 0:n.year};return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Programs",breadcrumbs:Xn.programList(),extra:Object(o.jsx)(Od,{value:this.state.selectedTermYear,onChange:this.handleTermYearChange},void 0),footer:i},void 0),Object(o.jsx)(y.b,Mx({direction:"vertical",size:"large"},{children:Object(o.jsx)(Qn.a,Mx({title:"Programs"},{children:Object(o.jsx)(qx,{institution:a,termYear:s},void 0)}),void 0)}),void 0)]},void 0)},t}(a.Component);var Ux=Object(u.i)(Object(l.b)((function(e){return{institution:e.Institution.Selected}}))(Yx)),Lx=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),kx=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Lx(t,e),t.prototype.getRolesTableData=function(e){var t="api/roles";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.exportRolesList=function(e){var t="api/roles/export";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getUserRoles=function(){var e="api/roles/getUserRoles";return e=e.replace(/null|undefined/gi,""),this.SendRequest(null,"post",e,!0,!1)},t.prototype.saveUserRoles=function(e){var t="api/roles/saveUserRoles";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.saveRole=function(e){var t="api/roles/saveRole";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getRoleDetails=function(e){var t="api/roles/"+encodeURIComponent(e);return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.getFeatureFlagsForRole=function(e){var t="api/roles/"+encodeURIComponent(e)+"/featureFlags";return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.saveFeatureFlagsForRole=function(e){var t="api/roles/saveFeatureFlagsForRole";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getUserRolesForUser=function(e){var t="api/roles/userRoles/"+encodeURIComponent(e);return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.saveInstitutionUserRoles=function(e){var t="api/roles/saveInstitutionUserRoles";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.deleteRole=function(e){var t="api/roles/deleteRole";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t}(U),Gx=new kx,Vx=Gx,Bx=function(e){return Object.assign({roleId:null,role:null},e)},Wx={className:"AARoleTypeDTO",create:function(e){return Object.assign(Q.create(),{id:0,name:"",displayOrder:0},e)},id:"id",name:"name",displayOrder:"displayOrder"},zx=Wx,Hx=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Qx=function(){return Qx=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Qx.apply(this,arguments)},Kx=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n.resetForm=function(){var e;n.setState({altered:!1}),null===(e=n._formRef.current)||void 0===e||e.resetFields()},n.loadRole=function(){n.setState({loading:!0});var e=[];0==n.state.roleTypes.length&&e.push(n.loadRoleTypes()),0==n.state.aaRoleTypes.length&&e.push(n.loadAARoleTypes()),n.props.roleId==re.default.Empty()?n.loadNew():e.push(n.loadExisting(
1)),Promise.all(e).finally((function(){n.setState({loading:!1})}))},n.loadNew=function(){n.setState({isEditing:!0})},n.loadExisting=function(){return Vx.getRoleDetails(n.props.roleId).then((function(e){e.role&&n.setState({role:e.role})})).catch((function(){n.setState({error:!0})}))},n.loadRoleTypes=function(){return ce.getAll(hi.className).then((function(e){n.setState({roleTypes:e})})).catch((function(){n.setState({error:!0})}))},n.loadAARoleTypes=function(){return ce.getAll(zx.className).then((function(e){n.setState({aaRoleTypes:e})})).catch((function(){n.setState({error:!0})}))},n.handleChange=function(){n.setState({altered:!0})},n.promptConfirmRoleTypeChange=function(e){var t;n.props.roleId!=re.default.Empty()&&e!=(null===(t=n.state.role)||void 0===t?void 0:t.roleTypeId)&&f.a.confirm({title:"Are you sure you want to change the role type? This may cause changes to the actions users can take in the application.",okText:"Change Role Type",okType:"danger",onCancel:function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields(["roleTypeId"])}})},n.promptConfirmAARoleTypeChange=function(e){var t;n.props.roleId!=re.default.Empty()&&e!=(null===(t=n.state.role)||void 0===t?void 0:t.roleTypeId)&&f.a.confirm({title:"An AA role can only be assigned to one STICS Role, assigning this aa role may remove it from another role.",okText:"Assign AA Role Type",okType:"danger",onCancel:function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields(["aaroleTypeId"])}})},n.handleSubmit=function(){n.setState({submitting:!0});var e=Bx({roleId:n.props.roleId,role:mr.create(n._formRef?n._formRef.current.getFieldsValue():null)});Vx.saveRole(e).then((function(e){e.succeeded?(n.setState({submitted:!0,altered:!1}),S.b.success("Saved"),n.props.onSave&&e.roleId&&n.props.onSave(e.roleId),ce.invalidateCache(mr.className)):(n.setState({submitted:!0,altered:!1}),n.setState({fieldErrors:e.fieldErrors}),xi.a.error({message:"Error!",description:"Role could not be saved"}))})).catch((function(e){n.setState({error:e}),xi.a.error({message:"Error!",description:"Role could not be saved"})})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n._formItems=(new Map).set(mr.name,{required:!0,name:mr.name,label:"Name",rules:[Ot.required()]}).set(mr.roleTypeId,{required:!0,name:mr.roleTypeId,label:"Role Type",rules:[Ot.required()]}).set(mr.aaRoleTypeId,{required:!1,name:mr.aaRoleTypeId,label:"AA Role Type"}),n.state={role:mr.create({roleTypeId:"",aaRoleTypeId:null}),roleTypes:[],aaRoleTypes:[]},n}return Hx(t,e),t.prototype.componentDidMount=function(){this.loadRole()},t.prototype.componentDidUpdate=function(e){this.props.roleId!=e.roleId&&this.loadRole()},t.prototype.render=function(){var e=this;return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(y.b,Qx({size:"small",direction:"vertical"},{children:[this.renderErrors(),Object(o.jsxs)(ht.a,Qx({ref:this._formRef,layout:"vertical",onValuesChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!0,initialValues:this.state.role},{children:[Object(o.jsx)(mt.a,Qx({},_t.getValidation(mr.name,this.state.fieldErrors,this.state.submitted),this._formItems.get(mr.name),{children:Object(o.jsx)(ut.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),mr.name),Object(o.jsx)(mt.a,Qx({},_t.getValidation(mr.roleTypeId,this.state.fieldErrors,this.state.submitted),this._formItems.get(mr.roleTypeId),{children:Object(o.jsx)(pr.a,Qx({onChange:function(t){return e.promptConfirmRoleTypeChange(t)},disabled:!this.props.isEditing||this.state.loading||this.state.submitting},{children:this.state.roleTypes.map((function(e){return Object(o.jsx)(pr.a.Option,Qx({value:e.id},{children:e.name}),e.id)}))}),void 0)}),mr.roleTypeId),Object(o.jsx)(mt.a,Qx({},_t.getValidation(mr.aaRoleTypeId,this.state.fieldErrors,this.state.submitted),this._formItems.get(mr.aaRoleTypeId),{children:Object(o.jsx)(pr.a,Qx({onChange:function(t){return e.promptConfirmAARoleTypeChange(t)},disabled:!this.props.isEditing||this.state.loading||this.state.submitting},{children:this.state.aaRoleTypes.map((function(e){return Object(o.jsx)(pr.a.Option,Qx({value:e.id},{children:e.name}),e.id)}))}),void 0)}),mr.aaRoleTypeId),this.renderSave()]}),void 0)]}),void 0)}
1,t.prototype.renderSave=function(){if(this.props.isEditing&&Je.isAuthorized([gn.EDIT_ROLE]))return Object(o.jsxs)(y.b,Qx({direction:"horizontal",wrap:!0},{children:[Object(o.jsx)(Tr,{disabled:this.state.loading,saving:this.state.submitting,saved:this.state.saved},void 0),Object(o.jsx)(Ir,{disabled:!br.hasChanged(this._formRef,this._formItems),resetting:this.state.resetting,onConfirm:this.resetForm},void 0)]}),void 0)},t.prototype.renderErrors=function(){if(this.state.error)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t}(a.Component),Xx=Kx,Jx=n(248),$x=(n(606),function(e){return Object.assign({roleId:"00000000-0000-0000-0000-000000000000",selectedFeatureFlagIds:[]},e)}),Zx=function(){function e(){}return e.GLOBAL="GLOBAL",e.SECONDARY="SECONDARY",e.POST_SECONDARY="POST_SECONDARY",e}(),eA=Zx,tA=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),nA=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return tA(t,e),t.prototype.getFeatureFlags=function(e){var t="api/roles/getFeatureFlags";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t}(U),rA=new nA,iA=rA,oA=function(e){return Object.assign({featureFlagArea:""},e)},aA=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),sA=function(){return sA=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},sA.apply(this,arguments)},dA=function(e){function t(t){var n=e.call(this,t)||this;return n.loadFeatureFlags=function(){n.setState({loading:!0});var e=oA({featureFlagArea:n.props.activeFeatureFlags});return iA.getFeatureFlags(e).then((function(e){e.featureFlagGroups&&n.setState({featureFlagsGroups:e.featureFlagGroups})})).catch((function(e){n.setState({error:!0,message:e})})).finally((function(){n.setState({loading:!1})}))},n.handleFeatureFlagChange=function(e,t){var r,i,o=e.toString().split(","),a=n.state.selectedIds,s=null!==(i=null===(r=t.featureFlags)||void 0===r?void 0:r.map((function(e){return e.id})))&&void 0!==i?i:[];a.removeAll(s),a.pushAll(o),a.distinct(),n.setState({selectedIds:a}),n.props.onChange&&n.props.onChange(a)},n.state={featureFlagsGroups:[],selectedIds:[]},n}return aA(t,e),t.prototype.componentDidMount=function(){this.props.options?this.setState({featureFlagsGroups:this.props.options}):this.loadFeatureFlags(),this.setState({selectedIds:this.props.selectedIds})},t.prototype.componentDidUpdate=function(e){this.props.options&&this.props.options!=e.options&&this.setState({featureFlagsGroups:this.props.options}),this.props.selectedIds!=e.selectedIds&&this.setState({selectedIds:this.props.selectedIds})},t.prototype.handleGroupChange=function(e,t){var n,r,i=this,o=this.state.selectedIds,a=null!==(r=null===(n=t.featureFlags)||void 0===n?void 0:n.map((function(e){return e.id})))&&void 0!==r?r:[];a.forEach((function(e){i.props.disabledIds&&e&&i.props.disabledIds.includes(e)&&a.remove(e)})),o.removeAll(a),e.target.checked&&o.pushAll(a),o.distinct(),this.setState({selectedIds:o}),this.props.onChange&&this.props.onChange(o)},t.prototype.render=function(){var e=this;return Object(o.jsx)(y.b,sA({direction:"vertical",size:"large"},{children:this.state.featureFlagsGroups.map((function(t){return e.renderFeatureFlagGroup(t)}))}),void 0)},t.prototype.renderFeatureFlagGroup=function(e){var t,n=this,r=[],i=[],a=0,s=0;if(this.state.featureFlagsGroups&&(null===(t=e.featureFlags)||void 0===t||t.forEach((function(e){var t;if(e.id){var o=n.state.selectedIds.includes(e.id),d=null===(t=n.props.disabledIds)||void 0===t?void 0:t.includes(e.id);r.push({value:e.id,label:e.name,disabled:d}),o&&i.push(e.id),a+=o?1:0,s+=d&&o?1:0}}))),null===e||void 0===e?void 0:e.featureFlags){var d=a==e.featureFlags.length,c=a>0&&!d,l=s==e.featureFlags.length;return Object(o.jsxs)(y.b,sA({direction:"vertical",size:"small"},{children:[Object(o.jsx)(Ti.a,sA({checked:d,indeterminate:c,onChange:function(t){return n.handleGroupChange(t,e)},disabled:l||!this.props.isEditing||this.state.loading||this.state.submitting},{children:Object(o.jsx)(ot.a.Text,sA({strong:!0},{children:e.name}),void 0)}),e.name),Object(o.jsx)(Ti.a.Group,sA({value:i,style:{marginLeft:"30px",marginTop:"5px"},onChange:function(t){return n.handleFeatureFlagChange(t,e)},disabled:l||!this.props.isEditing||this.state.loading||this.state.submitting},{children:Object(o.jsx)(Kn.b,sA({column:4},{children:r.map((function(e){return Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(Ti.a,sA({value:e.value},{children:e.label}),void 0)},e.value.toString())}))}),void 0)}),void 0)]}),void 0)}},t}(a.Component),cA=dA,lA=n(419),uA=n.n(lA),pA=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),fA=function(){return fA=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},fA.apply(this,arguments)},hA=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n.loadRoleFeatureFlags=function(){return n.setState({loading:!0}),Vx.getFeatureFlagsForRole(n.props.roleId).then((function(e){n.setState({selectedIds:e.roleFeatureFlagIds,previousSelectedIds:JSON.parse(JSON.stringify(e.roleFeatureFlagIds))})})).catch((function(e){n.setState({error:!0,message:e})})).finally((function(){n.setState({loading:!1})}
1))},n.handleSubmit=function(){n.setState({submitting:!0});var e=$x({roleId:n.props.roleId,selectedFeatureFlagIds:n.state.selectedIds});Vx.saveFeatureFlagsForRole(e).then((function(e){e&&(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,altered:!(null===e||void 0===e?void 0:e.succeeded)}),e.succeeded?(n.setState({previousSelectedIds:JSON.parse(JSON.stringify(n.state.selectedIds))}),xi.a.success({message:"Success!",description:"User roles have been saved."}),n.props.onSave&&n.props.onSave(),ce.invalidateCache(mr.className)):xi.a.error({message:"Uh Oh!",description:null===e||void 0===e?void 0:e.errors.join("\n")}))})).catch((function(e){n.setState({error:e}),xi.a.error({message:"Uh oh!",description:"Roles could not be saved."})})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.onChange=function(e){n.setState({selectedIds:e})},n.handleChange=function(){n.setState({altered:!0})},n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields(),n.setState({altered:!1,selectedIds:JSON.parse(JSON.stringify(n.state.previousSelectedIds))})},n.state={previousSelectedIds:[],selectedIds:[],roles:[]},n}return pA(t,e),t.prototype.componentDidMount=function(){this.loadRoleFeatureFlags()},t.prototype.componentDidUpdate=function(e){this.props.roleId!=e.roleId&&this.loadRoleFeatureFlags()},t.prototype.render=function(){return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsx)(Ci.a,fA({ref:this._formRef,layout:"vertical",onChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!0},{children:Object(o.jsxs)(y.b,fA({direction:"vertical"},{children:[this.renderFeatureFlag(),this.renderAction()]}),void 0)}),void 0)},t.prototype.renderAction=function(){if(this.props.isEditing&&Je.
1isAuthorized([gn.EDIT_ROLE]))return Object(o.jsxs)(y.b,fA({direction:"horizontal",wrap:!0},{children:[Object(o.jsx)(Tr,{disabled:this.state.loading,saving:this.state.submitting,saved:this.state.saved},void 0),Object(o.jsx)(Ir,{disabled:!this.state.altered,resetting:this.state.resetting,onConfirm:this.resetForm},void 0)]}),void 0)},t.prototype.renderFeatureFlag=function(){if(Je.isAuthorized([gn.VIEW_ROLE,gn.EDIT_ROLE])){var e=this.state.selectedIds;return e.distinct(),Object(o.jsx)(y.b,fA({direction:"vertical",size:"large"},{children:Object(o.jsxs)(Jx.a,{children:[Object(o.jsx)(uA.a,fA({header:"Global"},{children:Object(o.jsx)(cA,{activeFeatureFlags:eA.GLOBAL,isEditing:this.props.isEditing,selectedIds:e,onChange:this.onChange},void 0)}),"1"),Object(o.jsx)(uA.a,fA({header:"Secondary"},{children:Object(o.jsx)(cA,{activeFeatureFlags:eA.SECONDARY,isEditing:this.props.isEditing,selectedIds:e,onChange:this.onChange},void 0)}),"2"),Object(o.jsx)(uA.a,fA({header:"Post-Secondary"},{children:Object(o.jsx)(cA,{activeFeatureFlags:eA.POST_SECONDARY,isEditing:this.props.isEditing,selectedIds:e,onChange:this.onChange},void 0)}),"3")]},void 0)}),void 0)}},t}(a.Component),vA=hA,mA=function(e){return Object.assign({roleId:null},e)},gA=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),bA=function(){return bA=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},bA.apply(this,arguments)},yA=function(e){function t(n){var r=e.call(this,n)||this;return r._roleDetailsRef=a.createRef(),r._roleActionsRef=a.createRef(),r.loadRole=function(e){r.setState({loading:!0,roleId:e}),Vx.getRoleDetails(e).then((function(e){r.setState({roleDetails:e.role})})).catch((function(){r.setState({error:!0})})).finally((function(){r.setState({loading:!1})}))},r.loadNew=function(){if(r.state.editings){var e=r.state.editings;e.set(t.ROLE_DETAILS,!0),r.setState({isEditing:!0,loading:!1,editings:e})}},r.isEditingCheck=function(){return!!r.state.editings&&Array.from(r.state.editings.values()).includes(!0)},r.toggleEditing=function(e,n){var i,o,a;if(r.state.editings){var s=r.state.editings;if(void 0==n&&(n=null===(i=!s.get(e))||void 0===i||i),s.set(e,n),!s.get(e))switch(e){case t.ROLE_DETAILS:null===(o=r._roleDetailsRef.current)||void 0===o||o.resetForm();break;case t.ALLOWED_ACTIONS:null===(a=r._roleActionsRef.current)||void 0===a||a.resetForm()}r.setState({editings:s})}},r.roleDetailsSaved=function(e){r.toggleEditing(t.ROLE_DETAILS,!1),e!=r.state.roleId?T.replace(x.generate(x.ROLE_DETAILS,{id:e})):r.loadRole(e)},r.roleActionsSaved=function(){r.toggleEditing(t.ALLOWED_ACTIONS,!1)},r.deleteConfirmation=function(e){f.a.confirm({title:"Are you sure you want to delete this Role?",okText:"Delete",onOk:function(){return r.deleteRole(e)}})},r.cancelDelete=function(){r.setState({isDeleted:!1})},r.deleteRole=function(e){r.setState({submitting:!0});var t=mA({roleId:e});Vx.deleteRole(t).then((function(e){r.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,altered:!(null===e||void 0===e?void 0:e.succeeded)}),!0===(null===e||void 0===e?void 0:e.succeeded)?(e.isDeleted?(S.b.success("Role was removed."),r.goToRoles()):Rd.a.error({title:"Not Deleted",content:"Unable to delete this role due to it being used in an active change request approval flow. Please remove it from all approval flows before deleting"}),r.setState({isDeleted:!e.isDeleted})):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(e){r.setState({error:e}),S.b.error("Role could not be removed.")})).finally((function(){r.setState({loading:!1})}))},r.goToRoles=function(){T.goBack()},r.changeTab=function(e){r.setState({activeTab:e}),T.replace(x.generate("",{},{activeTab:e}),{activeTab:e})},r.state={activeTab:"details",isDeleted:!1,roleId:re.default.Empty(),roleDetails:null,editings:new Map},r}return gA(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id"),t=Hr.getParameter("activeTab","details");this.setState({activeTab:t}),"new"==e?this.loadNew():this.loadRole(e)},t.prototype.renderCancelRoleRemovalModal=function(){return Object(o.jsx)(f.a,bA({visible:this.state.isDeleted,title:"Role Removed Canceled",okText:"Ok",onCancel:this.cancelDelete,onOk:this.cancelDelete},{children:Object(o.jsx)(ot.a.Text,{children:"This Role cannot be deleted because this role is attached to an approval flow."},void 0)}),void 0)},t.prototype.render=function(){var e,t;if(this.state.loading)return Object(o.jsx)(pt.a,{active:!0},void 0);var n=this.state.loading?"...":this.state.roleId==re.default.Empty()?"New Role":null!==(t=null===(e=this.state.roleDetails)||void 0===e?void 0:e.name)&&void 0!==t?t:"...";return Object(o.jsxs)("div",{children:[Object(o.jsx)(rr,{title:n,onBack:this.goToRoles,breadcrumbs:Xn.roleDetails(n,this.state.roleId),extra:this.renderMoreActions(),footer:Object(o.jsxs)(pa.a,bA({activeKey:this.state.activeTab,onChange:this.changeTab},{children:[Object(o.jsx)(pa.a.TabPane,{tab:"Details"},"details"),Object(o.jsx)(pa.a.TabPane,{tab:"Actions"},"actions")]}),void 0)},void 0),Object(o.jsx)(zr,{when:this.isEditingCheck},void 0),this.renderDetailsCard(),this.renderActionsCard()]},void 0)},t.prototype.renderDetailsCard=function(){var e=this;if(this.state.editings){var n=this.state.roleId==re.default.Empty()?null:Object(o.jsx)(Ze,bA({validFeatureFlags:[gn.EDIT_ROLE]},{children:Object(o.jsx)(Br,{onClick:function(){return e.toggleEditing(t.ROLE_DETAILS)},isEditing:this.state.editings.get(t.ROLE_DETAILS)},void 0)}),void 0);return Object(o.jsx)(Qn.a,bA({title:"Details",extra:n,hidden:"details"!=this.state.activeTab},{children:Object(o.jsx)(Xx,{ref:this._roleDetailsRef,roleId:this.state.roleId,isEditing:this.state.editings.get(t.ROLE_DETAILS),onSave:this.roleDetailsSaved},void 0)}),void 0)}},t.prototype.renderActionsCard=function(){var e=this;if(this.state.editings&&this.state.roleId!=re.default.Empty()){var n=this.state.roleId==re.default.Empty()?null:Object(o.jsx)(Ze,bA({validFeatureFlags:[gn.EDIT_ROLE]},{children:Object(o.jsx)(Br,{onClick:function(){return e.toggleEditing(t.ALLOWED_ACTIONS)},isEditing:this.state.editings.get(t.ALLOWED_ACTIONS)},void 0)}),void 0);return Object(o.jsx)(Qn.a,bA({title:"Actions",extra:n,hidden:"actions"!=this.state.activeTab},{children:Object(o.jsx)(vA,{ref:this._roleActionsRef,roleId:this.state.roleId,isEditing:this.state.editings.get(t.ALLOWED_ACTIONS),onSave:this.roleActionsSaved},void 0)}),void 0)}},t.prototype.renderMoreActions=function(){var e=this,t=Object(o.jsx)(Gt.a,{children:Object(o.jsx)(Gt.a.Item,bA({title:"Delete Role",onClick:function(){return e.deleteConfirmation(e.state.roleId)}},{children:"Delete Role"}),this.state.roleId)},void 0);return Object(o.jsx)(Ze,bA({validFeatureFlags:[gn.EDIT_ROLE]},{children:Object(o.jsx)(la.a,bA({overlay:t},{children:Object(o.jsx)(rt.a,{size:"large",type:"link",icon:Object(o.jsx)(aa.a,{},void 0)},void 0)}),void 0)}),void 0)},t.ROLE_DETAILS="ROLE_DETAILS",t.ALLOWED_ACTIONS="ALLOWED_ACTIONS",t}(a.Component),OA=Object(u.i)(yA),jA=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),IA=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(){Ii.RoleTypes().then((function(e){return n.setState({roleTypes:e})}))},n.getColumnDefinitions=function(){return[{title:"Name",dataIndex:mr.name,sorter:!0,filterType:wr.Text},{title:"Role Type",dataIndex:mr.roleTypeId,sorter:!0,render:function(e,t){var n;return null===(n=t.roleType)||void 0===n?void 0:n.name},filterType:wr.DropdownMulti,width:175,dropdownFilterOptions:n.state.roleTypes}]},n.openRole=function(e){e.id&&T.push(x.generate(x.ROLE_DETAILS,{id:e.id},{}))},n.addRole=function(){T.push(x.generate(x.NEW_ROLE))},n.state={roleTypes:[]},n}return jA(t,e),t.prototype.componentDidMount=function(){this.fetchData()},t.prototype.render=function(){var e=this,t=[];return t.push(oo.Reset()),t.push(oo.Export((function(t){return e.setState({exporting:!0}),Vx.exportRolesList(t).then((function(t){e.setState({exporting:!1}),R.a.downloadBase64StringAsFile("Roles_"+$r.getDateStamp()+".xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",null!==t&&void 0!==t?t:void 0)}))}
1),this.state.exporting)),Je.isAuthorized([gn.EDIT_ROLE])&&t.push(oo.Default("New Role",(function(){return e.addRole()}))),Object(o.jsx)(io,{ref:function(t){return e._dataTable=t},onRowClick:this.openRole,serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:t,columns:this.getColumnDefinitions(),fetchData:{fetch:function(e){return Vx.getRolesTableData(e)}},stateSaving:{enabled:!0,tableUniqueKey:"role_list"}},void 0)},t}(a.Component),SA=IA,EA=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),RA=function(e){function t(t){var n=e.call(this,t)||this;return n.goToConfig=function(){T.goBack()},n}return EA(t,e),t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Roles",onBack:this.goToConfig,breadcrumbs:Xn.roleList()},void 0),Object(o.jsx)(Qn.a,{children:Object(o.jsx)(SA,{},void 0)},void 0)]},void 0)},t}(a.Component),_A=Object(u.i)(RA),TA=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),CA=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return TA(t,e),t.prototype.getRacialEthnicGroupTableData=function(e){var t="api/racialEthnicGroups";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getRacialEthnicGroupDataTableExport=function(e){var t="api/racialEthnicGroups/export";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getRacialEthnicGroupDetails=function(e){var t="api/racialEthnicGroups/"+e;return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.saveRacialEthnicGroupDetails=function(e){var t="api/racialEthnicGroups/save";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.deleteRacialEthnicGroup=function(e){var t="api/racialEthnicGroups/deleteRacialEthnicGroup";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t}(U),xA=new CA,AA=xA,PA=function(e){return Object.assign({racialEthnicGroupId:0,racialEthnicGroup:null},e)},NA=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),wA=function(){return wA=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},wA.apply(this,arguments)},DA=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._formItems=(new Map).set(Gu.name,{required:!0,name:Gu.name,label:"Name",rules:[Ot.required(),Ot.maxLength(150)]}),n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields(),n.setState({altered:!1})},n.loadExisting=function(){n.props.racialEthnicGroupId&&AA.getRacialEthnicGroupDetails(n.props.racialEthnicGroupId).then((function(e){e&&e.racialEthnicGroup&&n.setState({racialEthnicGroupId:e.racialEthnicGroup.id,racialEthnicGroup:e.racialEthnicGroup,loading:!1}),n.resetForm()})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))},n.loadNew=function(){n.setState({racialEthnicGroup:Gu.create(),loading:!1})},n.handleChange=function(){n.setState({altered:!0})},n.handleSubmit=function(){n.setState({submitting:!0});var e=PA({racialEthnicGroupId:n.state.racialEthnicGroupId,racialEthnicGroup:Gu.create(n._formRef?n._formRef.current.getFieldsValue():null)});
1AA.saveRacialEthnicGroupDetails(e).then((function(e){n.setState({submitted:!0,racialEthnicGroup:null===e||void 0===e?void 0:e.racialEthnicGroup}),(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.props.onSave&&e.racialEthnicGroup&&(n.props.onSave(e.racialEthnicGroup.id),n.resetForm()),ce.invalidateCache(Gu.className)):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Special Emphasis could not be saved. "+n.state.message))})).catch((function(e){n.setState({error:e}),S.b.error("Special Emphasis could not be saved.")})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.state={racialEthnicGroupId:0,racialEthnicGroup:Gu.create()},n}return NA(t,e),t.prototype.componentDidMount=function(){this.setState({loading:!0}),this.loadRacialEthnicGroup()},t.prototype.componentDidUpdate=function(e){this.props.racialEthnicGroupId&&this.props.racialEthnicGroupId!=e.racialEthnicGroupId&&(this.setState({racialEthnicGroupId:this.props.racialEthnicGroupId}),this.loadRacialEthnicGroup())},t.prototype.loadRacialEthnicGroup=function(){0==this.props.racialEthnicGroupId?this.loadNew():this.loadExisting()},t.prototype.render=function(){var e;return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(y.b,wA({size:"small",direction:"vertical"},{children:[this.renderErrors(),Object(o.jsxs)(ht.a,wA({ref:this._formRef,layout:"vertical",onValuesChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!0},{children:[Object(o.jsx)(mt.a,wA({},this._formItems.get(Gu.name),{initialValue:null===(e=this.state.racialEthnicGroup)||void 0===e?void 0:e.name},_t.getValidation(Gu.name,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),this.renderSave()]}),void 0)]}),void 0)},t.prototype.renderSave=function(){if(this.props.isEditing)return Object(o.jsx)(Ze,wA({validFeatureFlags:[gn.EDIT_SPECIAL_EMPHASIS]},{children:Object(o.jsxs)(y.b,wA({direction:"horizontal"},{children:[Object(o.jsx)(Tr,{saving:this.state.saving},void 0),Object(o.jsx)(Ir,{onConfirm:this.resetForm,disabled:!this.state.altered},void 0)]}),void 0)}),void 0)},t.prototype.renderErrors=function(){if(this.state.error&&this.state.submitted)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t}(a.Component),qA=DA,FA=function(e){return Object.assign({racialEthnicGroupId:0},e)},MA=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),YA=function(){return YA=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},YA.apply(this,arguments)},UA=function(e){function t(t){var n=e.call(this,t)||this;return n._detailsRef=a.createRef(),n.loadRacialEthnicGroup=function(e){n.setState({racialEthnicGroupId:e}),AA.getRacialEthnicGroupDetails(e).then((function(e){e.racialEthnicGroup&&n.setState({racialEthnicGroup:e.racialEthnicGroup})})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))},n.toggleEdit=function(){var e;n.state.isEditing&&(null===(e=n._detailsRef.current)||void 0===e||e.resetForm()),n.setState({isEditing:!n.state.isEditing})},n.specialEmphasisDetailsSaved=function(e){n.setState({isEditing:!1}),e!=n.state.racialEthnicGroupId?T.replace(x.generate(x.RACIAL_ETHNIC_GROUP_DETAILS,{id:e})):n.loadRacialEthnicGroup(e)},n.deleteConfirmation=function(e){f.a.confirm({title:"Are you sure you want to delete this Special Emphasis?",okText:"Delete",onOk:function(){return n.deleteRacialEthnicGroup(e)}})},n.deleteRacialEthnicGroup=function(e){n.setState({submitting:!0});var t=FA({racialEthnicGroupId:e});AA.deleteRacialEthnicGroup(t).then((function(e){n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,altered:!(null===e||void 0===e?void 0:e.succeeded)}),!0===(null===e||void 0===e?void 0:e.succeeded)?S.b.success("Item has been removed."):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(e){n.setState({error:e}),S.b.error("Special emphasis could not be removed.")})).finally((function(){n.setState({loading:!1}),n.goToRacialEthnicGroups()}))},n.goToRacialEthnicGroups=function(){T.goBack()},n.state={racialEthnicGroupId:0},n}return MA(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");if("new"==e)this.setState({isEditing:!0,isNew:!0,loading:!1});else{var t=Number.parseInt(e);this.loadRacialEthnicGroup(t)}},t.prototype.render=function(){var e,t,n=this.state.loading?"...":0==this.state.racialEthnicGroupId?"New Racial/Ethnic Group":null!==(t=null===(e=this.state.racialEthnicGroup)||void 0===e?void 0:e.name)&&void 0!==t?t:"...";return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:n,onBack:this.goToRacialEthnicGroups,breadcrumbs:Xn.racialEthnicGroupDetail
1s(n,this.state.racialEthnicGroupId),extra:this.renderMoreActions()},void 0),Object(o.jsx)(zr,{when:this.state.isEditing},void 0),this.renderDetailsCard()]},void 0)},t.prototype.renderDetailsCard=function(){var e=0==this.state.racialEthnicGroupId?null:Object(o.jsx)(Ze,YA({validFeatureFlags:[gn.EDIT_RACIAL_EHTNIC_GROUPS]},{children:Object(o.jsx)(Br,{isEditing:this.state.isEditing,onClick:this.toggleEdit},void 0)}),void 0);return Object(o.jsx)(Qn.a,YA({title:"Details",extra:e},{children:Object(o.jsx)(qA,{ref:this._detailsRef,racialEthnicGroupId:this.state.racialEthnicGroupId,isEditing:this.state.isEditing,isNew:this.state.isNew,onSave:this.specialEmphasisDetailsSaved},void 0)}),void 0)},t.prototype.renderMoreActions=function(){var e=this,t=Object(o.jsx)(Gt.a,{children:Object(o.jsx)(Gt.a.Item,YA({title:"Delete Racial/Ethnic Group",onClick:function(){return e.deleteConfirmation(e.state.racialEthnicGroupId)}},{children:"Delete Racial/Ethnic Group"}),this.state.racialEthnicGroupId)},void 0);return Object(o.jsx)(Ze,YA({validFeatureFlags:[gn.EDIT_RACIAL_EHTNIC_GROUPS]},{children:Object(o.jsx)(la.a,YA({overlay:t},{children:Object(o.jsx)(rt.a,YA({size:"large",type:"link"},{children:Object(o.jsx)(aa.a,{},void 0)}),void 0)}),void 0)}),void 0)},t}(a.Component),LA=Object(u.i)(UA),kA={className:"RacialEthnicGroupDataTableDTO",create:function(e){return Object.assign(Q.create(),{id:0,name:"",abbreviation:""},e)},id:"id",name:"name",abbreviation:"abbreviation"},GA=kA,VA=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),BA=function(e){function t(t){var n=e.call(this,t)||this;return n.getColumnDefinitions=function(){return[{title:"Name",dataIndex:GA.name,sorter:!0}]},n.openRacialEthnicGroup=function(e){e.id&&T.push(x.generate(x.RACIAL_ETHNIC_GROUP_DETAILS,{id:e.id},{}))},n.addRacialEthnicGroup=function(){T.push(x.generate(x.NEW_RACIAL_ETHNIC_GROUP))},n.state={},n}return VA(t,e),t.prototype.render=function(){var e=this,t=[];return t.push(oo.Reset()),t.push(oo.Export((function(t){return e.setState({exporting:!0}),AA.getRacialEthnicGroupDataTableExport(t).then((function(t){e.setState({exporting:!1}),R.a.downloadBase64StringAsFile("Racial_Ethinic_Group_"+$r.getDateStamp()+".xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",null!==t&&void 0!==t?t:void 0)}))}),this.state.exporting)),Je.isAuthorized([gn.EDIT_RACIAL_EHTNIC_GROUPS])&&t.push(oo.Default("New Racial Ethnic Group",(function(){return e.addRacialEthnicGroup()}))),Object(o.jsx)(io,{ref:function(t){return e._dataTable=t},onRowClick:this.openRacialEthnicGroup,serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:t,columns:this.getColumnDefinitions(),fetchData:{fetch:function(e){return AA.getRacialEthnicGroupTableData(e)}},stateSaving:{enabled:!0,tableUniqueKey:"racial_ethnic_group_list"}},void 0)},t}(a.Component),WA=BA,zA=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),HA=function(e){function t(t){var n=e.call(this,t)||this;return n.goToConfig=function(){T.goBack()},n}return zA(t,e),t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Racial/Ethnic Groups",onBack:this.goToConfig,breadcrumbs:Xn.racialEthnicGroupList()},void 0),Object(o.jsx)(Qn.a,{children:Object(o.jsx)(WA,{},void 0)},void 0)]},void 0)},t}(a.Component),QA=Object(u.i)(HA),KA=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),XA=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return KA(t,e),t.prototype.getSpecialEmphasisTableData=function(e){var t="api/specialEmphases";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getSpecialEmphasisDataTableExport=function(e){var t="api/specialEmphases/export";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getSpecialEmphasisDetails=function(e){var t="api/specialEmphases/"+e;return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.saveSpecialEmphasisDetails=function(e){var t="api/specialEmphases/save";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getSpecialEmphases=function(){var e="api/specialEmphases/getSpecialEmphases";return e=e.replace(/null|undefined/gi,""),this.SendRequest(null,"post",e,!0,!1)},t.prototype.deleteSpecialEmphasis=function(e){var t="api/specialEmphases/deleteSpecialEmphasis";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t}(U),JA=new XA,$A=JA,ZA=function(e){return Object.assign({specialEmphasisId:0,specialEmphasis:null},e)},eP=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),tP=function(){return tP=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},tP.apply(this,arguments)},nP=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._formItems=(new Map).set(Qc.name,{required:!0,name:Qc.name,label:"Name",rules:[Ot.required(),Ot.maxLength(150)]}).set(Qc.code,{required:!0,name:Qc.code,label:"Code",rules:[Ot.required(),Ot.maxLength(10)]}),n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields(),n.setState({altered:!1})},n.loadExisting=function(){n.props.specialEmphasisId&&$A.getSpecialEmphasisDetails(n.props.specialEmphasisId).then((function(e){e&&e.specialEmphasis&&n.setState({specialEmphasisId:e.specialEmphasis.id,specialEmphasis:e.specialEmphasis,loading:!1}),n.resetForm()})).catch((function(){n.setState({error:!0})}
1)).finally((function(){n.setState({loading:!1})}))},n.loadNew=function(){n.setState({specialEmphasis:Qc.create(),loading:!1})},n.handleChange=function(){n.setState({altered:!0})},n.handleSubmit=function(){n.setState({submitting:!0});var e=ZA({specialEmphasisId:n.state.specialEmphasisId,specialEmphasis:Qc.create(n._formRef?n._formRef.current.getFieldsValue():null)});$A.saveSpecialEmphasisDetails(e).then((function(e){n.setState({submitted:!0,specialEmphasis:null===e||void 0===e?void 0:e.specialEmphasis}),(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.props.onSave&&e.specialEmphasis&&(n.props.onSave(e.specialEmphasis.id),n.resetForm()),ce.invalidateCache(Qc.className)):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Special Emphasis could not be saved. "+n.state.message))})).catch((function(e){n.setState({error:e}),S.b.error("Special Emphasis could not be saved.")})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.state={specialEmphasisId:0,specialEmphasis:Qc.create()},n}return eP(t,e),t.prototype.componentDidMount=function(){this.setState({loading:!0}),this.loadSpecialEmphasis()},t.prototype.componentDidUpdate=function(e){this.props.specialEmphasisId&&this.props.specialEmphasisId!=e.specialEmphasisId&&(this.setState({specialEmphasisId:this.props.specialEmphasisId}),this.loadSpecialEmphasis())},t.prototype.loadSpecialEmphasis=function(){0==this.props.specialEmphasisId?this.loadNew():this.loadExisting()},t.prototype.render=function(){var e,t;return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(y.b,tP({size:"small",direction:"vertical"},{children:[this.renderErrors(),Object(o.jsxs)(ht.a,tP({ref:this._formRef,layout:"vertical",onValuesChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!0},{children:[Object(o.jsx)(mt.a,tP({},this._formItems.get(Qc.code),{initialValue:null===(e=this.state.specialEmphasis)||void 0===e?void 0:e.code},_t.getValidation(Qc.code,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,tP({},this._formItems.get(Qc.name),{initialValue:null===(t=this.state.specialEmphasis)||void 0===t?void 0:t.name},_t.getValidation(Qc.name,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),this.renderSave()]}),void 0)]}),void 0)},t.prototype.renderSave=function(){if(this.props.isEditing)return Object(o.jsx)(Ze,tP({validFeatureFlags:[gn.EDIT_SPECIAL_EMPHASIS]},{children:Object(o.jsxs)(y.b,tP({direction:"horizontal"},{children:[Object(o.jsx)(Tr,{saving:this.state.saving},void 0),Object(o.jsx)(Ir,{onConfirm:this.resetForm,disabled:!this.state.altered},void 0)]}),void 0)}),void 0)},t.prototype.renderErrors=function(){if(this.state.error&&this.state.submitted)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t}(a.Component),rP=nP,iP=function(e){return Object.assign({specialEmphasisId:null},e)},oP=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),aP=function(){return aP=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},aP.apply(this,arguments)},sP=function(e){function t(t){var n=e.call(this,t)||this;return n._detailsRef=a.createRef(),n.loadSpecialEmphasis=function(e){n.setState({specialEmphasisId:e}),$A.getSpecialEmphasisDetails(e).then((function(e){e.specialEmphasis&&n.setState({specialEmphasis:e.specialEmphasis})})).catch((function(){n.setState({error:!0})}
1)).finally((function(){n.setState({loading:!1})}))},n.toggleEdit=function(){var e;n.state.isEditing&&(null===(e=n._detailsRef.current)||void 0===e||e.resetForm()),n.setState({isEditing:!n.state.isEditing})},n.specialEmphasisDetailsSaved=function(e){n.setState({isEditing:!1}),e!=n.state.specialEmphasisId?T.replace(x.generate(x.SPECIAL_EMPHASIS_DETAILS,{id:e})):n.loadSpecialEmphasis(e)},n.deleteConfirmation=function(e){f.a.confirm({title:"Are you sure you want to delete this Special Emphasis?",okText:"Delete",onOk:function(){return n.deleteSpecialEmphasis(e)}})},n.deleteSpecialEmphasis=function(e){n.setState({submitting:!0});var t=iP({specialEmphasisId:e});$A.deleteSpecialEmphasis(t).then((function(e){n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,altered:!(null===e||void 0===e?void 0:e.succeeded)}),!0===(null===e||void 0===e?void 0:e.succeeded)?S.b.success("Special emphasis was removed."):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(e){n.setState({error:e}),S.b.error("Special emphasis could not be removed.")})).finally((function(){n.setState({loading:!1}),n.goToSpecialEmphases()}))},n.goToSpecialEmphases=function(){T.goBack()},n.state={specialEmphasisId:0},n}return oP(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");if("new"==e)this.setState({isEditing:!0,isNew:!0,loading:!1});else{var t=Number.parseInt(e);this.loadSpecialEmphasis(t)}},t.prototype.render=function(){var e,t,n=this.state.loading?"...":0==this.state.specialEmphasisId?"New Special Emphasis":null!==(t=null===(e=this.state.specialEmphasis)||void 0===e?void 0:e.name)&&void 0!==t?t:"...";return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:n,onBack:this.goToSpecialEmphases,breadcrumbs:Xn.specialEmphasisDetails(n,this.state.specialEmphasisId),extra:this.renderMoreActions()},void 0),Object(o.jsx)(zr,{when:this.state.isEditing},void 0),this.renderDetailsCard()]},void 0)},t.prototype.renderDetailsCard=function(){var e=0==this.state.specialEmphasisId?null:Object(o.jsx)(Ze,aP({validFeatureFlags:[gn.EDIT_SPECIAL_EMPHASIS]},{children:Object(o.jsx)(Br,{isEditing:this.state.isEditing,onClick:this.toggleEdit},void 0)}),void 0);return Object(o.jsx)(Qn.a,aP({title:"Details",extra:e},{children:Object(o.jsx)(rP,{ref:this._detailsRef,specialEmphasisId:this.state.specialEmphasisId,isEditing:this.state.isEditing,isNew:this.state.isNew,onSave:this.specialEmphasisDetailsSaved},void 0)}),void 0)},t.prototype.renderMoreActions=function(){var e=this,t=Object(o.jsx)(Gt.a,{children:Object(o.jsx)(Gt.a.Item,aP({title:"Delete Special Emphasis",onClick:function(){return e.deleteConfirmation(e.state.specialEmphasisId)}},{children:"Delete Special Emphasis"}),this.state.specialEmphasisId)},void 0);return Object(o.jsx)(Ze,aP({validFeatureFlags:[gn.EDIT_SPECIAL_EMPHASIS]},{children:Object(o.jsx)(la.a,aP({overlay:t},{children:Object(o.jsx)(rt.a,aP({size:"large",type:"link"},{children:Object(o.jsx)(aa.a,{},void 0)}),void 0)}),void 0)}),void 0)},t}(a.Component),dP=Object(u.i)(sP),cP={className:"SpecialEmphasisDataTableDTO",create:function(e){return Object.assign(Q.create(),{id:0,code:"",name:""},e)},id:"id",code:"code",name:"name"},lP=cP,uP=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),pP=function(e){function t(t){var n=e.call(this,t)||this;return n.getColumnDefinitions=function(){return[{title:"Code",dataIndex:lP.code,sorter:!0,filterType:wr.Text,width:125},{title:"Name",dataIndex:lP.name,sorter:!0,filterType:wr.Text}]},n.openSpecialEmphasis=function(e){e.id&&T.push(x.generate(x.SPECIAL_EMPHASIS_DETAILS,{id:e.id},{}))},n.addSpecialEmphasis=function(){T.push(x.generate(x.NEW_SPECIAL_EMPHASIS))},n.state={},n}return uP(t,e),t.prototype.render=function(){var e=this,t=[];return t.push(oo.Reset()),t.push(oo.Export((function(t){return e.setState({exporting:!0}),$A.getSpecialEmphasisDataTableExport(t).then((function(t){e.setState({exporting:!1}),R.a.downloadBase64StringAsFile("Cip_Number_"+$r.getDateStamp()+".xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",null!==t&&void 0!==t?t:void 0)}))}),this.state.exporting)),Je.isAuthorized([gn.EDIT_SPECIAL_EMPHASIS])&&t.pu
1sh(oo.Default("New Special Emphasis",(function(){return e.addSpecialEmphasis()}))),Object(o.jsx)(o.Fragment,{children:Object(o.jsx)(io,{ref:function(t){return e._dataTable=t},onRowClick:this.openSpecialEmphasis,serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:t,columns:this.getColumnDefinitions(),fetchData:{fetch:function(e){return $A.getSpecialEmphasisTableData(e)}},stateSaving:{enabled:!0,tableUniqueKey:"special_emphases_list"}},void 0)},void 0)},t}(a.Component),fP=pP,hP=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),vP=function(e){function t(t){var n=e.call(this,t)||this;return n.goToConfig=function(){T.goBack()},n}return hP(t,e),t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Special Emphases",onBack:this.goToConfig,breadcrumbs:Xn.specialEmphasisList()},void 0),Object(o.jsx)(Qn.a,{children:Object(o.jsx)(fP,{},void 0)},void 0)]},void 0)},t}(a.Component),mP=Object(u.i)(vP),gP=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),bP=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return gP(t,e),t.prototype.getTermTableData=function(e){var t="api/terms";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getTermsDataTableExport=function(e){var t="api/terms/export";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getTermDetails=function(e){var t="api/terms/"+encodeURIComponent(e);return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.saveTermDetails=function(e){var t="api/terms/save";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getTerms=function(){var e="api/terms/getTerms";return e=e.replace(/null|undefined/gi,""),this.SendRequest(null,"post",e,!0,!1)},t.prototype.getTermsForAPI=function(){var e="api/terms/get";return e=e.replace(/null|undefined/gi,""),this.SendRequest(null,"post",e,!0,!1)},t.prototype.deleteTerm=function(e){var t="api/terms/deleteTerm";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t}(U),yP=new bP,OP=yP,jP=function(e){return Object.assign({termId:null,term:null},e)},IP=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),SP=function(){return SP=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},SP.apply(this,arguments)},EP=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._formItems=(new Map).set(Rs.name,{required:!0,name:Rs.name,label:"Name",rules:[Ot.required()]}).set(Rs.startDate,{required:!0,name:Rs.startDate,label:"Start Date",rules:[Ot.required()]}),n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields(),n.setState({altered:!1})},n.cleanResultDates=function(e){return null!=e&&(e.startDate=It()(e.startDate)),e},n.loadExisting=function(){n.props.termId&&OP.getTermDetails(n.props.termId).then((function(e){var t,r,i;e&&e.term&&(e.term=n.cleanResultDates(e.term),n.setState({termId:null!==(r=null===(t=e.term)||void 0===t?void 0:t.id)&&void 0!==r?r:re.default.Empty(),term:null!==(i=e.term)&&void 0!==i?i:Rs.create()})),n.resetForm()})).catch((function(){n.setState({error:!0})}
1)).finally((function(){n.setState({loading:!1})}))},n.loadNew=function(){n.setState({loading:!1})},n.handleChange=function(){n.setState({altered:!0})},n.handleSubmit=function(){n.setState({submitting:!0});var e=jP({termId:n.state.termId,term:Rs.create(n._formRef?n._formRef.current.getFieldsValue():null)});OP.saveTermDetails(e).then((function(e){var t,r;n.setState({submitted:!0}),(null===e||void 0===e?void 0:e.succeeded)&&e.term?(e.term=n.cleanResultDates(e.term),n.setState({termId:null!==(t=e.term.id)&&void 0!==t?t:re.default.Empty(),term:null!==(r=e.term)&&void 0!==r?r:Rs.create()}),S.b.success("Saved"),n.props.onSave&&e.term.id&&(n.props.onSave(e.term.id),n.resetForm()),ce.invalidateCache(Rs.className)):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Error Saving"))})).catch((function(e){n.setState({error:e}),S.b.error("Error Saving")})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.state={termId:re.default.Empty(),term:Rs.create({startDate:""})},n}return IP(t,e),t.prototype.componentDidMount=function(){this.setState({loading:!0}),this.loadTerm()},t.prototype.componentDidUpdate=function(e){this.props.termId&&this.props.termId!=e.termId&&(this.setState({termId:this.props.termId}),this.loadTerm())},t.prototype.loadTerm=function(){this.state.loading||(this.props.termId==re.default.Empty()?this.loadNew():this.loadExisting())},t.prototype.render=function(){return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(y.b,SP({size:"small",direction:"vertical"},{children:[this.renderErrors(),Object(o.jsxs)(ht.a,SP({ref:this._formRef,layout:"vertical",initialValues:this.state.term,onValuesChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!0},{children:[Object(o.jsx)(mt.a,SP({},this._formItems.get(Rs.name),_t.getValidation(Rs.name,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,SP({},this._formItems.get(Rs.startDate),_t.getValidation(Rs.startDate,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ur.a,{format:"M/D/YYYY",disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),this.renderSave()]}),void 0)]}),void 0)},t.prototype.renderSave=function(){if(this.props.isEditing)return Object(o.jsx)(Ze,SP({validFeatureFlags:[gn.EDIT_TERM]},{children:Object(o.jsxs)(y.b,SP({direction:"horizontal"},{children:[Object(o.jsx)(Tr,{saving:this.state.saving},void 0),Object(o.jsx)(Ir,{onConfirm:this.resetForm,disabled:!this.state.altered},void 0)]}),void 0)}),void 0)},t.prototype.renderErrors=function(){if(this.state.error&&this.state.submitted)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t}(a.Component),RP=EP,_P=function(e){return Object.assign({termId:"00000000-0000-0000-0000-000000000000"},e)},TP=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),CP=function(){return CP=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},CP.apply(this,arguments)},xP=function(e){function t(t){var n=e.call(this,t)||this;return n._termDetailsRef=a.createRef(),n.loadTerm=function(e){n.setState({termId:e}),OP.getTermDetails(e).then((function(e){e.term&&n.setState({term:e.term})})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))},n.toggleEdit=function(){var e;n.state.isEditing&&(null===(e=n._termDetailsRef.current)||void 0===e||e.resetForm()),n.setState({isEditing:!n.state.isEditing})},n.termDetailsSaved=function(e){n.setState({isEditing:!1}),e!=n.state.termId?T.replace(x.generate(x.TERM_DETAILS,{id:e})):n.loadTerm(e)},n.deleteConfirmation=function(e){f.a.confirm({title:"Are you sure you want to delete this Term?",okText:"Delete",onOk:function(){return n.deleteTerm(e)}})},n.deleteTerm=function(e){n.setState({submitting:!0});var t=_P({termId:e});OP.deleteTerm(t).then((function(e){n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,altered:!(null===e||void 0===e?void 0:e.succeeded)}),!0===(null===e||void 0===e?void 0:e.succeeded)?S.b.success("Term was removed."):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(e){n.setState({error:e}),S.b.error("Term could not be removed.")})).finally((function(){n.setState({loading:!1}),n.goToTerms()}))},n.goToTerms=function(){T.goBack()},n.state={termId:re.default.Empty()},n}return TP(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");"new"==e?this.setState({isEditing:!0,isNew:!0,loading:!1}):this.loadTerm(e)},t.prototype.render=function(){var e,t,n=this.state.loading?"...":this.state.termId==re.default.Empty()?"New Term":null!==(t=null===(e=this.state.term)||void 0===e?void 0:e.name)&&void 0!==t?t:"...";return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:n,onBack:this.goToTerms,breadcrumbs:Xn.termDetails(n,this.state.termId),extra:this.renderMoreActions()},void 0),Object(o.jsx)(zr,{when:this.state.isEditing},void 0),this.renderDetailsCard()]},void 0)},t.prototype.renderDetailsCard=function(){var e=this.state.termId==re.default.Empty()?null:Object(o.jsx)(Ze,CP({validFeatureFlags:[gn.EDIT_TERM]},{children:Object(o.jsx)(Br,{isEditing:this.state.isEditing,onClick:this.toggleEdit},void 0)}),void 0);return Object(o.jsx)(Qn.a,CP({title:"Details",extra:e},{children:Object(o.jsx)(RP,{ref:this._termDetailsRef,termId:this.state.termId,isEditing:this.state.isEditing,isNew:this.state.isNew,onSave:this.termDetailsSaved},void 0)}),void 0)},t.prototype.renderMoreActions=function(){var e=this,t=Object(o.jsx)(Gt.a,{children:Object(o.jsx)(Gt.a.Item,CP({title:"Delete Term",onClick:function(){return e.deleteConfirmation(e.state.termId)}},{children:"Delete Term"}),this.state.termId)},void 0);return Object(o.jsx)(Ze,CP({validFeatureFlags:[gn.EDIT_TERM]},{children:Object(o.jsx)(la.a,CP({overlay:t},{children:Object(o.jsx)(rt.a,CP({size:"large",type:"link"},{children:Object(o.jsx)(aa.a,{},void 0)}),void 0)}),void 0)}),void 0)},t}(a.Component),AP=Object(u.i)(xP),PP=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),NP=function(e){function t(t){var n=e.call(this,t)||this;return n.getColumnDefinitions=function(){return[{title:"Name",dataIndex:Rs.name,sorter:!0}
1,{title:"Start Date",dataIndex:Rs.startDate,sorter:!0,width:175,render:function(e){return $r.longMonthAndDay(e)}}]},n.openTerm=function(e){e.id&&T.push(x.generate(x.TERM_DETAILS,{id:e.id},{}))},n.addTerm=function(){T.push(x.generate(x.NEW_TERM))},n.state={},n}return PP(t,e),t.prototype.render=function(){var e=this,t=[];return t.push(oo.Reset()),t.push(oo.Export((function(t){return e.setState({exporting:!0}),OP.getTermsDataTableExport(t).then((function(t){e.setState({exporting:!1}),R.a.downloadBase64StringAsFile("Terms_"+$r.getDateStamp()+".xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",null!==t&&void 0!==t?t:void 0)}))}),this.state.exporting)),Je.isAuthorized([gn.EDIT_TERM])&&t.push(oo.Default("New Term",(function(){return e.addTerm()}))),Object(o.jsx)(io,{ref:function(t){return e._dataTable=t},onRowClick:this.openTerm,serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:t,columns:this.getColumnDefinitions(),fetchData:{fetch:function(e){return OP.getTermTableData(e)}},stateSaving:{enabled:!0,tableUniqueKey:"term_list"}},void 0)},t}(a.Component),wP=NP,DP=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),qP=function(e){function t(t){var n=e.call(this,t)||this;return n.goToConfig=function(){T.goBack()},n}return DP(t,e),t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Terms",onBack:this.goToConfig,breadcrumbs:Xn.termList()},void 0),Object(o.jsx)(Qn.a,{children:Object(o.jsx)(wP,{},void 0)},void 0)]},void 0)},t}(a.Component),FP=Object(u.i)(qP),MP=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),YP=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return MP(t,e),t.prototype.getTypeOfProgramTableData=function(e){var t="api/typeOfProgram";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getTypeOfProgramDataTableExport=function(e){var t="api/typeOfProgram/export";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getTypeOfProgramDetails=function(e){var t="api/typeOfProgram/"+e;return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.saveTypeOfProgramDetails=function(e){var t="api/typeOfProgram/save";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getTypeOfPrograms=function(){var e="api/typeOfProgram/getTypeOfPrograms";return e=e.replace(/null|undefined/gi,""),this.SendRequest(null,"post",e,!0,!1)},t.prototype.deleteTypeOfProgram=function(e){var t="api/typeOfProgram/deleteTypeOfProgram";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t}(U),UP=new YP,LP=function(e){return Object.assign({typeOfProgramId:0,typeOfProgram:null},e)},kP=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),GP=function(){return GP=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},GP.apply(this,arguments)},VP=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._formItems=(new Map).set(Kc.name,{required:!0,name:Kc.name,label:"Name",rules:[Ot.required(),Ot.maxLength(150)]}).set(Kc.code,{required:!0,name:Kc.code,label:"Code",rules:[Ot.required(),Ot.maxLength(10)]}).set(Kc.apsGeneralEducation,{name:Kc.apsGeneralEducation,label:"APS General Education"}),n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields(),n.setState({altered:!1})},n.loadExisting=function(){n.props.typeOfProgramId&&UP.getTypeOfProgramDetails(n.props.typeOfProgramId).then((function(e){e.typeOfProgram&&n.setState({typeOfProgramId:e.typeOfProgram.id,typeOfProgram:e.typeOfProgram,loading:!1}),n.resetForm()})).catch((function(){n.setState({error:!0})}
1)).finally((function(){n.setState({loading:!1})}))},n.loadNew=function(){n.setState({typeOfProgram:Kc.create(),loading:!1})},n.handleChange=function(){n.setState({altered:!0})},n.handleSubmit=function(){n.setState({submitting:!0});var e=LP({typeOfProgramId:n.state.typeOfProgramId,typeOfProgram:Kc.create(n._formRef?n._formRef.current.getFieldsValue():null)});UP.saveTypeOfProgramDetails(e).then((function(e){n.setState({submitted:!0,typeOfProgram:null===e||void 0===e?void 0:e.typeOfProgram}),(null===e||void 0===e?void 0:e.succeeded)&&e.typeOfProgram?(S.b.success("Saved"),n.props.onSave&&(n.props.onSave(e.typeOfProgram.id),n.resetForm()),ce.invalidateCache(Kc.className)):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Type Of Program could not be saved. "+n.state.message))})).catch((function(e){n.setState({error:e}),S.b.error("Type Of Program could not be saved.")})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.state={typeOfProgramId:0,typeOfProgram:Kc.create()},n}return kP(t,e),t.prototype.componentDidMount=function(){this.setState({loading:!0}),this.loadTypeOfProgram()},t.prototype.componentDidUpdate=function(e){this.props.typeOfProgramId&&this.props.typeOfProgramId!=e.typeOfProgramId&&(this.setState({typeOfProgramId:this.props.typeOfProgramId}),this.loadTypeOfProgram())},t.prototype.loadTypeOfProgram=function(){0==this.props.typeOfProgramId?this.loadNew():this.loadExisting()},t.prototype.render=function(){var e,t,n;return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(y.b,GP({size:"small",direction:"vertical"},{children:[this.renderErrors(),Object(o.jsxs)(ht.a,GP({ref:this._formRef,layout:"vertical",onValuesChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!0},{children:[Object(o.jsx)(mt.a,GP({},this._formItems.get(Kc.code),{initialValue:null===(e=this.state.typeOfProgram)||void 0===e?void 0:e.code},_t.getValidation(Kc.code,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,GP({},this._formItems.get(Kc.name),{initialValue:null===(t=this.state.typeOfProgram)||void 0===t?void 0:t.name},_t.getValidation(Kc.name,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,GP({},this._formItems.get(Kc.apsGeneralEducation),{initialValue:null===(n=this.state.typeOfProgram)||void 0===n?void 0:n.apsGeneralEducation},_t.getValidation(Kc.apsGeneralEducation,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(Hd,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),this.renderSave()]}),void 0)]}),void 0)},t.prototype.renderSave=function(){if(this.props.isEditing)return Object(o.jsx)(Ze,GP({validFeatureFlags:[gn.EDIT_TYPE_OF_PROGRAM]},{children:Object(o.jsxs)(y.b,GP({direction:"horizontal"},{children:[Object(o.jsx)(Tr,{saving:this.state.saving},void 0),Object(o.jsx)(Ir,{onConfirm:this.resetForm,disabled:!this.state.altered},void 0)]}),void 0)}),void 0)},t.prototype.renderErrors=function(){if(this.state.error&&this.state.submitted)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t}(a.Component),BP=function(e){return Object.assign({typeOfProgramId:null},e)},WP=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),zP=function(){return zP=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},zP.apply(this,arguments)},HP=function(e){function t(t){var n=e.call(this,t)||this;return n._detailsRef=a.createRef(),n.loadTypeOfProgram=function(e){n.setState({typeOfProgramId:e}),UP.getTypeOfProgramDetails(e).then((function(e){e.typeOfProgram&&n.setState({typeOfProgram:e.typeOfProgram})})).catch((function(){n.setState({error:!0})}
1)).finally((function(){n.setState({loading:!1})}))},n.toggleEdit=function(){var e;n.state.isEditing&&(null===(e=n._detailsRef.current)||void 0===e||e.resetForm()),n.setState({isEditing:!n.state.isEditing})},n.specialEmphasisDetailsSaved=function(e){n.setState({isEditing:!1}),e!=n.state.typeOfProgramId?T.replace(x.generate(x.TYPE_OF_PROGRAM_DETAILS,{id:e})):n.loadTypeOfProgram(e)},n.deleteConfirmation=function(e){f.a.confirm({title:"Are you sure you want to delete this Type Of Program?",okText:"Delete",onOk:function(){return n.deleteTypeOfProgram(e)}})},n.deleteTypeOfProgram=function(e){n.setState({submitting:!0});var t=BP({typeOfProgramId:e});UP.deleteTypeOfProgram(t).then((function(e){n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,altered:!(null===e||void 0===e?void 0:e.succeeded)}),!0===(null===e||void 0===e?void 0:e.succeeded)?S.b.success("Type of program was removed."):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(e){n.setState({error:e}),S.b.error("Type of program could not be removed.")})).finally((function(){n.setState({loading:!1}),n.goToTypeOfPrograms()}))},n.goToTypeOfPrograms=function(){T.goBack()},n.state={typeOfProgramId:0},n}return WP(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");if("new"==e)this.setState({isEditing:!0,isNew:!0,loading:!1});else{var t=Number.parseInt(e);this.loadTypeOfProgram(t)}},t.prototype.render=function(){var e,t,n=this.state.loading?"...":0==this.state.typeOfProgramId?"New Type Of Program":null!==(t=null===(e=this.state.typeOfProgram)||void 0===e?void 0:e.name)&&void 0!==t?t:"...";return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:n,onBack:this.goToTypeOfPrograms,breadcrumbs:Xn.typeOfProgramDetails(n,this.state.typeOfProgramId),extra:this.renderMoreActions()},void 0),Object(o.jsx)(zr,{when:this.state.isEditing},void 0),this.renderDetailsCard()]},void 0)},t.prototype.renderDetailsCard=function(){var e=0==this.state.typeOfProgramId?null:Object(o.jsx)(Ze,zP({validFeatureFlags:[gn.EDIT_TYPE_OF_PROGRAM]},{children:Object(o.jsx)(Br,{isEditing:this.state.isEditing,onClick:this.toggleEdit},void 0)}),void 0);return Object(o.jsx)(Qn.a,zP({title:"Details",extra:e},{children:Object(o.jsx)(VP,{ref:this._detailsRef,typeOfProgramId:this.state.typeOfProgramId,isEditing:this.state.isEditing,isNew:this.state.isNew,onSave:this.specialEmphasisDetailsSaved},void 0)}),void 0)},t.prototype.renderMoreActions=function(){var e=this,t=Object(o.jsx)(Gt.a,{children:Object(o.jsx)(Gt.a.Item,zP({title:"Delete Type Of Progream",onClick:function(){return e.deleteConfirmation(e.state.typeOfProgramId)}},{children:"Delete Type Of Progream"}),this.state.typeOfProgramId)},void 0);return Object(o.jsx)(Ze,zP({validFeatureFlags:[gn.EDIT_TYPE_OF_PROGRAM]},{children:Object(o.jsx)(la.a,zP({overlay:t},{children:Object(o.jsx)(rt.a,zP({size:"large",type:"link"},{children:Object(o.jsx)(aa.a,{},void 0)}),void 0)}),void 0)}),void 0)},t}(a.Component),QP=Object(u.i)(HP),KP=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),XP=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return KP(t,e),t.prototype.getTransferMajorCourseBlocksDataTable=function(e){var t="api/transferMajorCourseBlock";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getTransferMajorCourseBlockDataTableExport=function(e){var t="api/transferMajorCourseBlock/export";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getTransferMajorCourseBlockDetails=function(e){var t="api/transferMajorCourseBlock/"+e;return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)}
1,t.prototype.saveTransferMajorCourseBlockDetails=function(e){var t="api/transferMajorCourseBlock/save";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.deleteTransferMajorCourseBlock=function(e){var t="api/transferMajorCourseBlock/deleteTransferMajorCourseBlock";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t}(U),JP=new XP,$P=function(e){return Object.assign({transferMajorCourseBlockId:0,transferMajorCourseBlock:null},e)},ZP=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),eN=function(){return eN=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},eN.apply(this,arguments)},tN=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._formItems=(new Map).set(Cl.name,{required:!0,name:Cl.name,label:"Name",rules:[Ot.required(),Ot.maxLength(50)]}),n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields(),n.setState({altered:!1})},n.loadExisting=function(){n.props.transferMajorCourseBlockId&&JP.getTransferMajorCourseBlockDetails(n.props.transferMajorCourseBlockId).then((function(e){e&&e.transferMajorCourseBlock&&n.setState({transferMajorCourseBlockId:e.transferMajorCourseBlock.id,transferMajorCourseBlock:e.transferMajorCourseBlock,loading:!1}),n.resetForm()})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))},n.loadNew=function(){n.setState({transferMajorCourseBlock:Cl.create(),loading:!1})},n.handleChange=function(){n.setState({altered:!0})},n.handleSubmit=function(){n.setState({submitting:!0});var e=$P({transferMajorCourseBlockId:n.state.transferMajorCourseBlockId,transferMajorCourseBlock:Cl.create(n._formRef?n._formRef.current.getFieldsValue():null)});JP.saveTransferMajorCourseBlockDetails(e).then((function(e){var t;n.setState({submitted:!0,transferMajorCourseBlock:null===e||void 0===e?void 0:e.transferMajorCourseBlock}),(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.props.onSave&&(null===(t=e.transferMajorCourseBlock)||void 0===t?void 0:t.id)&&(n.props.onSave(e.transferMajorCourseBlock.id),n.resetForm()),ce.invalidateCache(Cl.className)):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Transfer Major Course Block could not be saved. "+n.state.message))})).catch((function(e){n.setState({error:e}),S.b.error("Transfer Major Course Block could not be saved.")})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.state={transferMajorCourseBlockId:0,transferMajorCourseBlock:Cl.create()},n}return ZP(t,e),t.prototype.componentDidMount=function(){this.setState({loading:!0}),this.loadTransferMajorCourseBlock()},t.prototype.componentDidUpdate=function(e){this.props.transferMajorCourseBlockId&&this.props.transferMajorCourseBlockId!=e.transferMajorCourseBlockId&&(this.setState({transferMajorCourseBlockId:this.props.transferMajorCourseBlockId}),this.loadTransferMajorCourseBlock())},t.prototype.loadTransferMajorCourseBlock=function(){0==this.props.transferMajorCourseBlockId?this.loadNew():this.loadExisting()},t.prototype.render=function(){var e;return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(y.b,eN({size:"small",direction:"vertical"},{children:[this.renderErrors(),Object(o.jsxs)(ht.a,eN({ref:this._formRef,layout:"vertical",onValuesChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!0},{children:[Object(o.jsx)(mt.a,eN({},this._formItems.get(Cl.name),{initialValue:null===(e=this.state.transferMajorCourseBlock)||void 0===e?void 0:e.name},_t.getValidation(Cl.name,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),this.renderSave()]}),void 0)]}),void 0)},t.prototype.renderSave=function(){if(this.props.isEditing)return Object(o.jsx)(Ze,eN({validFeatureFlags:[gn.EDIT_TRANSFER_MAJOR_COURSE_BLOCKS]},{children:Object(o.jsxs)(y.b,eN({direction:"horizontal"},{children:[Object(o.jsx)(Tr,{saving:this.state.saving},void 0),Object(o.jsx)(Ir,{onConfirm:this.resetForm,disabled:!this.state.altered},void 0)]}),void 0)}),void 0)},t.prototype.renderErrors=function(){if(this.state.error&&this.state.submitted)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t}(a.Component),nN=function(e){return Object.assign({transferMajorCourseBlockId:null},e)},rN=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),iN=function(){return iN=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},iN.apply(this,arguments)},oN=function(e){function t(t){var n=e.call(this,t)||this;
1return n._TransferMajorCourseBlockDetailsRef=a.createRef(),n.loadTransferMajorCourseBlock=function(e){n.setState({transferMajorCourseBlockId:e}),JP.getTransferMajorCourseBlockDetails(e).then((function(e){e.transferMajorCourseBlock&&n.setState({transferMajorCourseBlock:e.transferMajorCourseBlock})})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))},n.deleteConfirmation=function(e){f.a.confirm({title:"Are you sure you want to delete this Transfer Major Course Block?",okText:"Delete",onOk:function(){return n.deleteTransferMajorCourseBlock(e)}})},n.deleteTransferMajorCourseBlock=function(e){n.setState({submitting:!0});var t=nN({transferMajorCourseBlockId:e});JP.deleteTransferMajorCourseBlock(t).then((function(e){n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,altered:!(null===e||void 0===e?void 0:e.succeeded)}),!0===(null===e||void 0===e?void 0:e.succeeded)?S.b.success("Removed."):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(e){n.setState({error:e}),S.b.error("Removed.")})).finally((function(){n.setState({loading:!1}),n.goToTransferMajorCourseBlock()}))},n.toggleEdit=function(){var e;n.state.isEditing&&(null===(e=n._TransferMajorCourseBlockDetailsRef.current)||void 0===e||e.resetForm()),n.setState({isEditing:!n.state.isEditing})},n.TransferMajorCourseBlockDetailsSaved=function(e){n.setState({isEditing:!1}),e!=n.state.transferMajorCourseBlockId?T.replace(x.generate(x.TRANSFER_MAJOR_COURSE_BLOCK_DETAILS,{id:e})):n.loadTransferMajorCourseBlock(e)},n.goToTransferMajorCourseBlock=function(){T.goBack()},n.state={transferMajorCourseBlockId:0},n}return rN(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");if("new"==e)this.setState({isEditing:!0,isNew:!0,loading:!1});else{var t=Number.parseInt(e);this.loadTransferMajorCourseBlock(t)}},t.prototype.render=function(){var e,t,n=this.state.loading?"...":0==this.state.transferMajorCourseBlockId?"New Transfer Major Course Block":null!==(t=null===(e=this.state.transferMajorCourseBlock)||void 0===e?void 0:e.name)&&void 0!==t?t:"...";return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:n,onBack:this.goToTransferMajorCourseBlock,breadcrumbs:Xn.transferMajorCourseBlockDetails(n,this.state.transferMajorCourseBlockId),extra:this.renderMoreActions()},void 0),Object(o.jsx)(zr,{when:this.state.isEditing},void 0),this.renderDetailsCard()]},void 0)},t.prototype.renderDetailsCard=function(){var e=0==this.state.transferMajorCourseBlockId?null:Object(o.jsx)(Ze,iN({validFeatureFlags:[gn.EDIT_TRANSFER_MAJOR_COURSE_BLOCKS]},{children:Object(o.jsx)(Br,{isEditing:this.state.isEditing,onClick:this.toggleEdit},void 0)}),void 0);return Object(o.jsx)(Qn.a,iN({title:"Details",extra:e},{children:Object(o.jsx)(tN,{ref:this._TransferMajorCourseBlockDetailsRef,transferMajorCourseBlockId:this.state.transferMajorCourseBlockId,isEditing:this.state.isEditing,isNew:this.state.isNew,onSave:this.TransferMajorCourseBlockDetailsSaved},void 0)}),void 0)},t.prototype.renderMoreActions=function(){var e=this,t=Object(o.jsx)(Gt.a,{children:Object(o.jsx)(Gt.a.Item,iN({title:"Delete Transfer Major Course Block",onClick:function(){return e.deleteConfirmation(e.state.transferMajorCourseBlockId)}},{children:"Delete Transfer Major Course Block"}),this.state.transferMajorCourseBlockId)},void 0);return Object(o.jsx)(Ze,iN({validFeatureFlags:[gn.EDIT_TRANSFER_MAJOR_COURSE_BLOCKS]},{children:Object(o.jsx)(la.a,iN({overlay:t},{children:Object(o.jsx)(rt.a,iN({size:"large",type:"link"},{children:Object(o.jsx)(aa.a,{},void 0)}),void 0)}),void 0)}),void 0)},t}(a.Component),aN=Object(u.i)(oN),sN=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),dN=function(e){function t(t){var n=e.call(this,t)||this;return n.getColumnDefinitions=function(){return[{title:"Name",dataIndex:Cl.name,sorter:!0,filterType:wr.Text}]},n.openTransferMajorCourseBlock=function(e){e.id&&T.push(x.generate(x.TRANSFER_MAJOR_COURSE_BLOCK_DETAILS,{id:e.id},{}))},n.addTransferMajorCourseBlock=function(){T.push(x.generate(x.NEW_TRANSFER_MAJOR_COURSE_BLOCK))},n.state={},n}return sN(t,e),t.prototype.render=function(){var e=this,t=[];return t.push(oo.Reset()),t.push(oo.Export((function(t){return e.setState({exporting:!0}),JP.getTransferMajorCourseBlockDataTableExport(t).then((function(t){e.setState({exporting:!1}),R.a.downloadBase64StringAsFile("Transfer_Major_Course_Block_"+$r.getDateStamp()+".xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",null!==t&&void 0!==t?t:void 0)}))}),this.state.exporting)),Je.isAuthorized([gn.EDIT_TRANSFER_MAJOR_COURSE_BLOCKS])&&t.pu
1sh(oo.Default("New Transfer Major Course Block",(function(){return e.addTransferMajorCourseBlock()}))),Object(o.jsx)(o.Fragment,{children:Object(o.jsx)(io,{ref:function(t){return e._dataTable=t},onRowClick:this.openTransferMajorCourseBlock,serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:t,columns:this.getColumnDefinitions(),fetchData:{fetch:function(e){return JP.getTransferMajorCourseBlocksDataTable(e)}},stateSaving:{enabled:!0,tableUniqueKey:"transferMajorCourseBlock_list"}},void 0)},void 0)},t}(a.Component),cN=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),lN=function(e){function t(t){var n=e.call(this,t)||this;return n.goToConfig=function(){T.goBack()},n}return cN(t,e),t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Transfer Major Course Blocks",onBack:this.goToConfig,breadcrumbs:Xn.transferMajorCourseBlockList()},void 0),Object(o.jsx)(Qn.a,{children:Object(o.jsx)(dN,{},void 0)},void 0)]},void 0)},t}(a.Component),uN=Object(u.i)(lN),pN=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),fN=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return pN(t,e),t.prototype.getTransferMajorLactsCategorysDataTable=function(e){var t="api/transferMajorLactsCategory";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getTransferMajorLactsCategoryDetails=function(e){var t="api/transferMajorLactsCategory/"+e;return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.getTransferMajorLactsCategoryDataTableExport=function(e){var t="api/transferMajorLactsCategory/export";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.saveTransferMajorLactsCategoryDetails=function(e){var t="api/transferMajorLactsCategory/save";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.deleteTransferMajorLactsCategory=function(e){var t="api/transferMajorLactsCategory/deleteTransferMajorLactsCategory";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t}(U),hN=new fN,vN=function(e){return Object.assign({transferMajorLactsCategoryId:0,transferMajorLactsCategory:null},e)},mN=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),gN=function(){return gN=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},gN.apply(this,arguments)},bN=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._formItems=(new Map).set(Pl.name,{required:!0,name:Pl.name,label:"Name",rules:[Ot.required(),Ot.maxLength(50)]}),n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields(),n.setState({altered:!1})},n.loadExisting=function(){n.props.transferMajorLactsCategoryId&&hN.getTransferMajorLactsCategoryDetails(n.props.transferMajorLactsCategoryId).then((function(e){e&&e.transferMajorLactsCategory&&n.setState({transferMajorLactsCategoryId:e.transferMajorLactsCategory.id,transferMajorLactsCategory:e.transferMajorLactsCategory,loading:!1}),n.resetForm()})).catch((function(){n.setState({error:!0})}
1)).finally((function(){n.setState({loading:!1})}))},n.loadNew=function(){n.setState({transferMajorLactsCategory:Pl.create(),loading:!1})},n.handleChange=function(){n.setState({altered:!0})},n.handleSubmit=function(){n.setState({submitting:!0});var e=vN({transferMajorLactsCategoryId:n.state.transferMajorLactsCategoryId,transferMajorLactsCategory:Pl.create(n._formRef?n._formRef.current.getFieldsValue():null)});hN.saveTransferMajorLactsCategoryDetails(e).then((function(e){var t;n.setState({submitted:!0,transferMajorLactsCategory:null===e||void 0===e?void 0:e.transferMajorLactsCategory}),(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.props.onSave&&(null===(t=e.transferMajorLactsCategory)||void 0===t?void 0:t.id)&&(n.props.onSave(e.transferMajorLactsCategory.id),n.resetForm()),ce.invalidateCache(Pl.className)):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Transfer Major Lacts Category could not be saved. "+n.state.message))})).catch((function(e){n.setState({error:e}),S.b.error("Transfer Major Lacts Category could not be saved.")})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.state={transferMajorLactsCategoryId:0,transferMajorLactsCategory:Pl.create()},n}return mN(t,e),t.prototype.componentDidMount=function(){this.setState({loading:!0}),this.loadTransferMajorLactsCategory()},t.prototype.componentDidUpdate=function(e){this.props.transferMajorLactsCategoryId&&this.props.transferMajorLactsCategoryId!=e.transferMajorLactsCategoryId&&(this.setState({transferMajorLactsCategoryId:this.props.transferMajorLactsCategoryId}),this.loadTransferMajorLactsCategory())},t.prototype.loadTransferMajorLactsCategory=function(){0==this.props.transferMajorLactsCategoryId?this.loadNew():this.loadExisting()},t.prototype.render=function(){var e;return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(y.b,gN({size:"small",direction:"vertical"},{children:[this.renderErrors(),Object(o.jsxs)(ht.a,gN({ref:this._formRef,layout:"vertical",onValuesChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!0},{children:[Object(o.jsx)(mt.a,gN({},this._formItems.get(Pl.name),{initialValue:null===(e=this.state.transferMajorLactsCategory)||void 0===e?void 0:e.name},_t.getValidation(Pl.name,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),this.renderSave()]}),void 0)]}),void 0)},t.prototype.renderSave=function(){if(this.props.isEditing)return Object(o.jsx)(Ze,gN({validFeatureFlags:[gn.EDIT_TRANSFER_MAJOR_LACTS_CATEGORY]},{children:Object(o.jsxs)(y.b,gN({direction:"horizontal"},{children:[Object(o.jsx)(Tr,{saving:this.state.saving},void 0),Object(o.jsx)(Ir,{onConfirm:this.resetForm,disabled:!this.state.altered},void 0)]}),void 0)}),void 0)},t.prototype.renderErrors=function(){if(this.state.error&&this.state.submitted)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t}(a.Component),yN=function(e){return Object.assign({transferMajorLactsCategoryId:null},e)},ON=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),jN=function(){return jN=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},jN.apply(this,arguments)},IN=function(e){function t(t){var n=e.call(this,t)||this;return n._TransferMajorLactsCategoryDetailsRef=a.createRef(),n.loadTransferMajorLactsCategory=function(e){n.setState({transferMajorLactsCategoryId:e}),hN.getTransferMajorLactsCategoryDetails(e).then((function(e){e.transferMajorLactsCategory&&n.setState({transferMajorLactsCategory:e.transferMajorLactsCategory})})).catch((function(){n.setState({error:!0})}
1)).finally((function(){n.setState({loading:!1})}))},n.deleteConfirmation=function(e){f.a.confirm({title:"Are you sure you want to delete this Transfer Major LACTS Category?",okText:"Delete",onOk:function(){return n.deleteTransferMajorLactsCategory(e)}})},n.deleteTransferMajorLactsCategory=function(e){n.setState({submitting:!0});var t=yN({transferMajorLactsCategoryId:e});hN.deleteTransferMajorLactsCategory(t).then((function(e){n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,altered:!(null===e||void 0===e?void 0:e.succeeded)}),!0===(null===e||void 0===e?void 0:e.succeeded)?S.b.success("Transfer Major Lacts Category was removed."):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(e){n.setState({error:e}),S.b.error("Transfer Major Lacts Category could not be removed.")})).finally((function(){n.setState({loading:!1}),n.goToTransferMajorLactsCategory()}))},n.toggleEdit=function(){var e;n.state.isEditing&&(null===(e=n._TransferMajorLactsCategoryDetailsRef.current)||void 0===e||e.resetForm()),n.setState({isEditing:!n.state.isEditing})},n.TransferMajorLactsCategoryDetailsSaved=function(e){n.setState({isEditing:!1}),e!=n.state.transferMajorLactsCategoryId?T.replace(x.generate(x.TRANSFER_MAJOR_LACTS_CATEGORY_DETAILS,{id:e})):n.loadTransferMajorLactsCategory(e)},n.goToTransferMajorLactsCategory=function(){T.goBack()},n.state={transferMajorLactsCategoryId:0},n}return ON(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");if("new"==e)this.setState({isEditing:!0,isNew:!0,loading:!1});else{var t=Number.parseInt(e);this.loadTransferMajorLactsCategory(t)}},t.prototype.render=function(){var e,t,n=this.state.loading?"...":0==this.state.transferMajorLactsCategoryId?"New Transfer Major Lacts Category":null!==(t=null===(e=this.state.transferMajorLactsCategory)||void 0===e?void 0:e.name)&&void 0!==t?t:"...";return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:n,onBack:this.goToTransferMajorLactsCategory,breadcrumbs:Xn.transferMajorLactsCategoryDetails(n,this.state.transferMajorLactsCategoryId),extra:this.renderMoreActions()},void 0),Object(o.jsx)(zr,{when:this.state.isEditing},void 0),this.renderDetailsCard()]},void 0)},t.prototype.renderDetailsCard=function(){var e=0==this.state.transferMajorLactsCategoryId?null:Object(o.jsx)(Ze,jN({validFeatureFlags:[gn.EDIT_TRANSFER_MAJOR_LACTS_CATEGORY]},{children:Object(o.jsx)(Br,{isEditing:this.state.isEditing,onClick:this.toggleEdit},void 0)}),void 0);return Object(o.jsx)(Qn.a,jN({title:"Details",extra:e},{children:Object(o.jsx)(bN,{ref:this._TransferMajorLactsCategoryDetailsRef,transferMajorLactsCategoryId:this.state.transferMajorLactsCategoryId,isEditing:this.state.isEditing,isNew:this.state.isNew,onSave:this.TransferMajorLactsCategoryDetailsSaved},void 0)}),void 0)},t.prototype.renderMoreActions=function(){var e=this,t=Object(o.jsx)(Gt.a,{children:Object(o.jsx)(Gt.a.Item,jN({title:"Delete Transfer Major Lacts Category",onClick:function(){return e.deleteConfirmation(e.state.transferMajorLactsCategoryId)}},{children:"Delete Transfer Major Lacts Category"}),this.state.transferMajorLactsCategoryId)},void 0);return Object(o.jsx)(Ze,jN({validFeatureFlags:[gn.EDIT_TRANSFER_MAJOR_LACTS_CATEGORY]},{children:Object(o.jsx)(la.a,jN({overlay:t},{children:Object(o.jsx)(rt.a,jN({size:"large",type:"link"},{children:Object(o.jsx)(aa.a,{},void 0)}),void 0)}),void 0)}),void 0)},t}(a.Component),SN=Object(u.i)(IN),EN=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),RN=function(e){function t(t){var n=e.call(this,t)||this;return n.getColumnDefinitions=function(){return[{title:"Name",dataIndex:Pl.name,sorter:!0,filterType:wr.Text}]},n.openTransferMajorLactsCategory=function(e){e.id&&T.push(x.generate(x.TRANSFER_MAJOR_LACTS_CATEGORY_DETAILS,{id:e.id},{}))},n.addTransferMajorLactsCategory=function(){T.push(x.generate(x.NEW_TRANSFER_MAJOR_LACTS_CATEGORY))},n.state={},n}return EN(t,e),t.prototype.render=function(){var e=this,t=[];return t.push(oo.Reset()),t.push(oo.Export((function(t){return e.setState({exporting:!0}),hN.getTransferMajorLactsCategoryDataTableExport(t).then((function(t){e.setState({exporting:!1}),R.a.downloadBase64StringAsFile("Transfer_Major_Lacts_Category_"+$r.getDateStamp()+".xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",null!==t&&void 0!==t?t:void 0)}))}),this.state.exporting)),Je.isAuthorized([gn.EDIT_TRANSFER_MAJOR_LACTS_CATEGORY])&&t.push(oo.Default("New Transfer Major Lacts Category",(function(){return e.addTransferMajorLactsCategory()}))),Object(o.jsx)(o.Fragment,{children:Object(o.jsx)(io,{ref:function(t){return e._dataTable=t},onRowClick:this.openTransferMajorLactsCategory,serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:t,columns:this.getColumnDefinitions(),fetchData:{fetch:function(e){return hN.getTransferMajorLactsCategorysDataTable(e)}},stateSaving:{enabled:!0,tableUniqueKey:"transferMajorLactsCategory_list"}},void 0)},void 0)},t}(a.Component),_N=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),TN=function(e){function t(t){var n=e.call(this,t)||this;return n.goToConfig=function(){T.goBack()},n}return _N(t,e),t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Transfer Major Lacts Categories",onBack:this.goToConfig,breadcrumbs:Xn.transferMajorLactsCategoryList()},void 0),Object(o.jsx)(Qn.a,{children:Object(o.jsx)(RN,{},void 0)},void 0)]},void 0)},t}(a.Component),CN=Object(u.i)(TN),xN=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),AN=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return xN(t,e),t.prototype.getTransferMajorDisciplineFrameworkElementsDataTable=function(e){var t="api/transferMajorDisciplineFrameworkElement";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getTransferMajorDisciplineFrameworkElementDetails=function(e){var t="api/transferMajorDisciplineFrameworkElement/"+e;return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.getTransferMajorDisciplineFrameworkElementDataTableExport=function(e){var t="api/transferMajorDisciplineFrameworkElement/export";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.saveTransferMajorDisciplineFrameworkElementDetails=function(e){var t="api/transferMajorDisciplineFrameworkElement/save";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.deleteTransferMajorDisciplineFrameworkElement=function(e){var t="api/transferMajorDisciplineFrameworkElement/deleteTransferMajorDisciplineFrameworkElement";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t}(U),PN=new AN,NN=function(e){return Object.assign({transferMajorDisciplineFrameworkElementId:0,transferMajorDisciplineFrameworkElement:null},e)},wN=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),DN=function(){return DN=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},DN.apply(this,arguments)},qN=function(e){function t(t){var n=e.call(this,t)||this;
1return n._formRef=a.createRef(),n._formItems=(new Map).set(xl.name,{required:!0,name:xl.name,label:"Name",rules:[Ot.required()]}),n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields(),n.setState({altered:!1})},n.loadExisting=function(){n.props.transferMajorDisciplineFrameworkElementId&&PN.getTransferMajorDisciplineFrameworkElementDetails(n.props.transferMajorDisciplineFrameworkElementId).then((function(e){e&&e.transferMajorDisciplineFrameworkElement&&n.setState({transferMajorDisciplineFrameworkElementId:e.transferMajorDisciplineFrameworkElement.id,transferMajorDisciplineFrameworkElement:e.transferMajorDisciplineFrameworkElement,loading:!1}),n.resetForm()})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))},n.loadNew=function(){n.setState({transferMajorDisciplineFrameworkElement:xl.create(),loading:!1})},n.handleChange=function(){n.setState({altered:!0})},n.handleSubmit=function(){n.setState({submitting:!0});var e=NN({transferMajorDisciplineFrameworkElementId:n.state.transferMajorDisciplineFrameworkElementId,transferMajorDisciplineFrameworkElement:xl.create(n._formRef?n._formRef.current.getFieldsValue():null)});PN.saveTransferMajorDisciplineFrameworkElementDetails(e).then((function(e){var t;n.setState({submitted:!0,transferMajorDisciplineFrameworkElement:null===e||void 0===e?void 0:e.transferMajorDisciplineFrameworkElement}),(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.props.onSave&&(null===(t=e.transferMajorDisciplineFrameworkElement)||void 0===t?void 0:t.id)&&(n.props.onSave(e.transferMajorDisciplineFrameworkElement.id),n.resetForm()),ce.invalidateCache(xl.className)):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Discipline Framewrork Element could not be saved. "+n.state.message))})).catch((function(e){n.setState({error:e}),S.b.error("Discipline Framewrork Element could not be saved.")})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.state={transferMajorDisciplineFrameworkElementId:0,transferMajorDisciplineFrameworkElement:xl.create()},n}return wN(t,e),t.prototype.componentDidMount=function(){this.setState({loading:!0}),this.loadTransferMajorDisciplineFrameworkElement()},t.prototype.componentDidUpdate=function(e){this.props.transferMajorDisciplineFrameworkElementId&&this.props.transferMajorDisciplineFrameworkElementId!=e.transferMajorDisciplineFrameworkElementId&&(this.setState({transferMajorDisciplineFrameworkElementId:this.props.transferMajorDisciplineFrameworkElementId}),this.loadTransferMajorDisciplineFrameworkElement())},t.prototype.loadTransferMajorDisciplineFrameworkElement=function(){0==this.props.transferMajorDisciplineFrameworkElementId?this.loadNew():this.loadExisting()},t.prototype.render=function(){var e;return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(y.b,DN({size:"small",direction:"vertical"},{children:[this.renderErrors(),Object(o.jsxs)(ht.a,DN({ref:this._formRef,layout:"vertical",onValuesChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!0},{children:[Object(o.jsx)(mt.a,DN({},this._formItems.get(xl.name),{initialValue:null===(e=this.state.transferMajorDisciplineFrameworkElement)||void 0===e?void 0:e.name},_t.getValidation(xl.name,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),this.renderSave()]}),void 0)]}),void 0)},t.prototype.renderSave=function(){if(this.props.isEditing)return Object(o.jsx)(Ze,DN({validFeatureFlags:[gn.EDIT_TRANSFER_MAJOR_DISCIPLINE_FRAMEWORKS]},{children:Object(o.jsxs)(y.b,DN({direction:"horizontal"},{children:[Object(o.jsx)(Tr,{saving:this.state.saving},void 0),Object(o.jsx)(Ir,{onConfirm:this.resetForm,disabled:!this.state.altered},void 0)]}),void 0)}),void 0)},t.prototype.renderErrors=function(){if(this.state.error&&this.state.submitted)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t}(a.Component),FN=function(e){return Object.assign({transferMajorDisciplineFrameworkElementId:null},e)},MN=function(e){return Object.assign({courseId:"00000000-0000-0000-0000-000000000000",transferMajorDisciplineFrameworkId:0},e)},YN=function(e){return Object.assign({transferMajorDisciplineFrameworkElementCourseId:null},e)},UN=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),LN=function(){return LN=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},LN.apply(this,arguments)},kN=function(e){function t(t){var n=e.call(this,t)||this;return n._courseSearchRef=a.createRef(),n.getColumnDefinitions=function(){return[{title:"Discipline",dataIndex:Il.disciplineId,sorter:!0,filterType:wr.Text,render:function(e,t){return t.discipline}},{title:"Catalog Number",dataIndex:Il.catalogNumber,sorter:!0,filterType:wr.Text,render:function(e,t){return t.catalogNumber}},{title:"Title",dataIndex:Zs.title,sorter:!0,filterType:wr.Text,render:function(e,t){return t.title}},{title:"Actions",align:"center",dataIndex:Ll.className,sorter:!1,render:function(e,t){if(Je.isAuthorized([gn.EDIT_TRANSFER_MAJOR_DISCIPLINE_FRAMEWORKS]))return Object(o.jsx)(o.Fragment,{children:Object(o.jsx)(rt.a,LN({type:"link",onClick:function(){var e;return n.promptConfirmRemove(null!==(e=t.id)&&void 0!==e?e:re.default.Empty())}},{children:Object(o.jsx)(Yd.a,{},void 0)}),void 0)},void 0)},width:50}]},n.submitAddCourse=function(){var e,t=null===(e=n._courseSearchRef.current)||void 0===e?void 0:e.getValue();n.setState({submitting:!0});var r=MN({courseId:null===t||void 0===t?void 0:t.courseId,transferMajorDisciplineFrameworkId:n.props.transferMajorDisciplineFrameworkElementId});Ml.addTransferMajorDisciplineFrameworkElementCourse(r).then((function(e){var t,r;n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,altered:!(null===e||void 0===e?void 0:e.succeeded)}),null===(t=n._dataTable)||void 0===t||t.refresh(),null===(r=n._courseSearchRef.current)||void 0===r||r.reset(),!0===(null===e||void 0===e?void 0:e.succeeded)?(n.setState({showAddCourseModal:!1}),S.b.success("Course has been added")):S.b.error("Course is a duplicate")})).catch((function(e){n.setState({error:e}),S.b.error("Course could not be added")})).finally((function(){n.setState({loading:!1})}
1))},n.promptConfirmRemove=function(e){null!=e&&f.a.confirm({title:"Are you sure you want to delete this Course?",okText:"Delete",onOk:function(){return n.deleteTransferMajorDisciplineFrameworkElementCourseId(e)},okButtonProps:{type:"primary",danger:!0}})},n.addCourse=function(){n.setState({showAddCourseModal:!0})},n.cancelAddCourse=function(){var e;n.setState({showAddCourseModal:!1}),null===(e=n._dataTable)||void 0===e||e.refresh()},n.deleteTransferMajorDisciplineFrameworkElementCourseId=function(e){var t=YN({transferMajorDisciplineFrameworkElementCourseId:e});Ml.deleteTransferMajorDisciplineFrameworkElementCourse(t).then((function(e){var t;!0===(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Transfer Major Discipline Framework Element Course was removed."),null===(t=n._dataTable)||void 0===t||t.refresh()):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(){S.b.error("Transfer Major Discipline Framework Element Course could not be removed.")}))},n.state={showAddCourseModal:!1},n}return UN(t,e),t.prototype.render=function(){var e=this,t=[];return t.push(oo.Reset()),t.push(oo.Export((function(t){return e.setState({exporting:!0}),Ml.getTransferMajorDisciplineFrameworkElementCourseDataTableExport(t).then((function(t){e.setState({exporting:!1}),R.a.downloadBase64StringAsFile("Transfer_Major_Discipline_Element_Course_"+$r.getDateStamp()+".xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",null!==t&&void 0!==t?t:void 0)}))}),this.state.exporting)),Je.isAuthorized([gn.EDIT_TRANSFER_MAJOR_DISCIPLINE_FRAMEWORKS])&&t.push(oo.Default("Add Course",(function(){return e.addCourse()}))),Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(io,{ref:function(t){return e._dataTable=t},serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:t,columns:this.getColumnDefinitions(),fetchData:{fetch:function(t){var n;return Ml.getTransferMajorDisciplineFrameworkElementCoursesDataTable(t,null!==(n=e.props.transferMajorDisciplineFrameworkElementId)&&void 0!==n?n:0)}},stateSaving:{enabled:!0,tableUniqueKey:"transferMajorDisciplineFrameworkElementCourse_list"}},void 0),this.renderAddCourseModal()]},void 0)},t.prototype.renderAddCourseModal=function(){return Object(o.jsx)(f.a,LN({visible:this.state.showAddCourseModal,title:"Add Course",okText:"Add",width:1e3,onOk:this.submitAddCourse,onCancel:this.cancelAddCourse},{children:Object(o.jsx)(gd,{ref:this._courseSearchRef,value:{courseId:null,course:null}},void 0)}),void 0)},t}(a.Component),GN=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),VN=function(){return VN=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},VN.apply(this,arguments)},BN=function(e){function t(t){var n=e.call(this,t)||this;return n._TransferMajorDisciplineFrameworkElementDetailsRef=a.createRef(),n.loadTransferMajorDisciplineFrameworkElement=function(e){n.setState({transferMajorDisciplineFrameworkElementId:e}),PN.getTransferMajorDisciplineFrameworkElementDetails(e).then((function(e){e.transferMajorDisciplineFrameworkElement&&n.setState({transferMajorDisciplineFrameworkElement:e.transferMajorDisciplineFrameworkElement})})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))},n.deleteConfirmation=function(e){f.a.confirm({title:"Are you sure you want to delete this Discipline Framework Element?",okText:"Delete",onOk:function(){return n.deleteTransferMajorDisciplineFrameworkElement(e)}})},n.deleteTransferMajorDisciplineFrameworkElement=function(e){n.setState({submitting:!0});var t=FN({transferMajorDisciplineFrameworkElementId:e});PN.deleteTransferMajorDisciplineFrameworkElement(t).then((function(e){n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,altered:!(null===e||void 0===e?void 0:e.succeeded)}),!0===(null===e||void 0===e?void 0:e.succeeded)?S.b.success("Discipline Framework Element was removed."):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(e){n.setState({error:e}),S.b.error("Discipline Framework Element could not be removed.")})).finally((function(){n.setState({loading:!1}),n.goToTransferMajorDisciplineFrameworkElement()}))},n.toggleEdit=function(){var e;n.state.isEditing&&(null===(e=n._TransferMajorDisciplineFrameworkElementDetailsRef.current)||void 0===e||e.resetForm()),n.setState({isEditing:!n.state.isEditing})},n.TransferMajorDisciplineFrameworkElementDetailsSaved=function(e){n.setState({isEditing:!1}),e!=n.state.transferMajorDisciplineFrameworkElementId?T.replace(x.generate(x.TRANSFER_MAJOR_DISCIPLINE_FRAMEWORK_ELEMENT_DETAILS,{id:e})):n.loadTransferMajorDisciplineFrameworkElement(e)},n.goToTransferMajorDisciplineFrameworkElement=function(){T.goBack()},n.changeTab=function(e){n.setState({activeTab:e}),T.push(x.generate(x.TRANSFER_MAJOR_DISCIPLINE_FRAMEWORK_ELEMENT_DETAILS,{id:n.state.transferMajorDisciplineFrameworkElementId},{activeTab:e}))},n.state={transferMajorDisciplineFrameworkElementId:0,activeTab:"details"},n}return GN(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id"),t=Hr.getParameter("activeTab","details");if(this.setState({activeTab:t}),"new"==e)this.setState({isEditing:!0,isNew:!0,loading:!1});else{var n=Number.parseInt(e);this.loadTransferMajorDisciplineFrameworkElement(n)}},t.prototype.render=function(){var e,t,n=this.state.loading?"...":0==this.state.transferMajorDisciplineFrameworkElementId?"New Discipline Framework Element":null!==(t=null===(e=this.state.transferMajorDisciplineFrameworkElement)||void 0===e?void 0:e.name)&&void 0!==t?t:"...";return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:n,onBack:this.goToTransferMajorDisciplineFrameworkElement,breadcrumbs:Xn.transferMajorDisciplineFrameworkElementDetails(n,this.state.transferMajorDisciplineFrameworkElementId),extra:this.renderMoreActions(),footer:Object(o.jsxs)(pa.a,VN({activeKey:this.state.activeTab,onChange:this.changeTab},{children:[Object(o.jsx)(pa.a.TabPane,{tab:"Details"},"details"),Object(o.jsx)(pa.a.TabPane,{tab:"Courses"},"courses")]}),void 0)},void 0),Object(o.jsx)(zr,{when:this.state.isEditing},void 0),this.renderDetailsCard(),this.renderCoursesCard()]},void 0)},t.prototype.renderDetailsCard=function(){if("details"==this.state.activeTab){var e=0==this.state.transferMajorDisciplineFrameworkElementId?null:Object(o.jsx)(Ze,VN({validFeatureFlags:[gn.EDIT_TRANSFER_MAJOR_DISCIPLINE_FRAMEWORKS]},{children:Object(o.jsx)(Br,{isEditing:this.state.isEditing,onClick:this.toggleEdit},void 0)}),void 0);return Object(o.jsx)(Qn.a,VN({title:"Details",extra:e},{children:Object(o.jsx)(qN,{ref:this._TransferMajorDisciplineFrameworkElementDetailsRef,transferMajorDisciplineFrameworkElementId:this.state.transferMajorDisciplineFrameworkElementId,isEditing:this.state.isEditing,isNew:this.state.isNew,onSave:this.TransferMajorDisciplineFrameworkElementDetailsSaved},void 0)}),void 0)}},t.prototype.renderCoursesCard=function(){if("courses"==this.state.activeTab)return Object(o.jsx)(Qn.a,VN({title:"Courses"},{children:Object(o.jsx)(kN,{transferMajorDisciplineFrameworkElementId:this.state.transferMajorDisciplineFrameworkElementId},void 0)}),void 0)},t.prototype.renderMoreActions=function(){var e=this,t=Object(o.jsx)(Gt.a,{children:Object(o.jsx)(Gt.a.Item,VN({title:"Delete Discipline Framework Element",onClick:function(){return e.deleteConfirmation(e.state.transferMajorDisciplineFrameworkElementId)}},{children:"Delete Discipline Framework Element"}),this.state.transferMajorDisciplineFrameworkElementId)},void 0);return Object(o.jsx)(Ze,VN({validFeatureFlags:[gn.EDIT_TRANSFER_MAJOR_DISCIPLINE_FRAMEWORKS]},{children:Object(o.jsx)(la.a,VN({overlay:t}
1,{children:Object(o.jsx)(rt.a,VN({size:"large",type:"link"},{children:Object(o.jsx)(aa.a,{},void 0)}),void 0)}),void 0)}),void 0)},t}(a.Component),WN=Object(u.i)(BN),zN=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),HN=function(e){function t(t){var n=e.call(this,t)||this;return n.getColumnDefinitions=function(){return[{title:"Name",dataIndex:xl.name,sorter:!0,filterType:wr.Text}]},n.openTransferMajorDisciplineFrameworkElement=function(e){e.id&&T.push(x.generate(x.TRANSFER_MAJOR_DISCIPLINE_FRAMEWORK_ELEMENT_DETAILS,{id:e.id},{}))},n.addTransferMajorDisciplineFrameworkElement=function(){T.push(x.generate(x.NEW_TRANSFER_MAJOR_DISCIPLINE_FRAMEWORK_ELEMENT))},n.state={},n}return zN(t,e),t.prototype.render=function(){var e=this,t=[];return t.push(oo.Reset()),t.push(oo.Export((function(t){return e.setState({exporting:!0}),PN.getTransferMajorDisciplineFrameworkElementDataTableExport(t).then((function(t){e.setState({exporting:!1}),R.a.downloadBase64StringAsFile("Transfer_Major_Discipline_Element_"+$r.getDateStamp()+".xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",null!==t&&void 0!==t?t:void 0)}))}),this.state.exporting)),Je.isAuthorized([gn.EDIT_TRANSFER_MAJOR_DISCIPLINE_FRAMEWORKS])&&t.push(oo.Default("New Discipline Framework Element",(function(){return e.addTransferMajorDisciplineFrameworkElement()}))),Object(o.jsx)(o.Fragment,{children:Object(o.jsx)(io,{ref:function(t){return e._dataTable=t},onRowClick:this.openTransferMajorDisciplineFrameworkElement,serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:t,columns:this.getColumnDefinitions(),fetchData:{fetch:function(e){return PN.getTransferMajorDisciplineFrameworkElementsDataTable(e)}},stateSaving:{enabled:!0,tableUniqueKey:"transferMajorDisciplineFrameworkElement_list"}},void 0)},void 0)},t}(a.Component),QN=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),KN=function(e){function t(t){var n=e.call(this,t)||this;return n.goToConfig=function(){T.goBack()},n}return QN(t,e),t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Discipline Framework Element",onBack:this.goToConfig,breadcrumbs:Xn.transferMajorDisciplineFrameworkElementList()},void 0),Object(o.jsx)(Qn.a,{children:Object(o.jsx)(HN,{},void 0)},void 0)]},void 0)},t}(a.Component),XN=Object(u.i)(KN),JN=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),$N=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return JN(t,e),t.prototype.getTransferMajorGeneralEducationTypesDataTable=function(e){var t="api/TransferMajorGeneralEducationType";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getTransferMajorGeneralEducationTypeDetails=function(e){var t="api/TransferMajorGeneralEducationType/"+e;return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.getTransferMajorGeneralEducationTypeDataTableExport=function(e){var t="api/TransferMajorGeneralEducationType/export";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.saveTransferMajorGeneralEducationTypeDetails=function(e){var t="api/TransferMajorGeneralEducationType/save";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.deleteTransferMajorGeneralEducationType=function(e){var t="api/TransferMajorGeneralEducationType/deleteTransferMajorGeneralEducationType";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t}(U),ZN=new $N,ew=function(e){return Object.assign({transferMajorGeneralEducationTypeId:0,transferMajorGeneralEducationType:null},e)},tw=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),nw=function(){return nw=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},nw.apply(this,arguments)},rw=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._formItems=(new Map).set(Al.name,{required:!0,name:Al.name,label:"Name",rules:[Ot.required(),Ot.maxLength(50)]}),n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields(),n.setState({altered:!1})},n.loadExisting=function(){n.props.transferMajorGeneralEducationTypeId&&ZN.getTransferMajorGeneralEducationTypeDetails(n.props.transferMajorGeneralEducationTypeId).then((function(e){e&&e.transferMajorGeneralEducationType&&n.setState({transferMajorGeneralEducationTypeId:e.transferMajorGeneralEducationType.id,transferMajorGeneralEducationType:e.transferMajorGeneralEducationType,loading:!1}),n.resetForm()})).catch((function(){n.setState({error:!0})}
1)).finally((function(){n.setState({loading:!1})}))},n.loadNew=function(){n.setState({transferMajorGeneralEducationType:Al.create(),loading:!1})},n.handleChange=function(){n.setState({altered:!0})},n.handleSubmit=function(){n.setState({submitting:!0});var e=ew({transferMajorGeneralEducationTypeId:n.state.transferMajorGeneralEducationTypeId,transferMajorGeneralEducationType:Al.create(n._formRef?n._formRef.current.getFieldsValue():null)});ZN.saveTransferMajorGeneralEducationTypeDetails(e).then((function(e){var t;n.setState({submitted:!0,transferMajorGeneralEducationType:null===e||void 0===e?void 0:e.transferMajorGeneralEducationType}),(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.props.onSave&&(null===(t=e.transferMajorGeneralEducationType)||void 0===t?void 0:t.id)&&(n.props.onSave(e.transferMajorGeneralEducationType.id),n.resetForm()),ce.invalidateCache(Al.className)):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("General Education Type could not be saved. "+n.state.message))})).catch((function(e){n.setState({error:e}),S.b.error("General Education Type could not be saved.")})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.state={transferMajorGeneralEducationTypeId:0,transferMajorGeneralEducationType:Al.create()},n}return tw(t,e),t.prototype.componentDidMount=function(){this.setState({loading:!0}),this.loadTransferMajorGeneralEducationType()},t.prototype.componentDidUpdate=function(e){this.props.transferMajorGeneralEducationTypeId&&this.props.transferMajorGeneralEducationTypeId!=e.transferMajorGeneralEducationTypeId&&(this.setState({transferMajorGeneralEducationTypeId:this.props.transferMajorGeneralEducationTypeId}),this.loadTransferMajorGeneralEducationType())},t.prototype.loadTransferMajorGeneralEducationType=function(){0==this.props.transferMajorGeneralEducationTypeId?this.loadNew():this.loadExisting()},t.prototype.render=function(){var e;return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(y.b,nw({size:"small",direction:"vertical"},{children:[this.renderErrors(),Object(o.jsxs)(ht.a,nw({ref:this._formRef,layout:"vertical",onValuesChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!0},{children:[Object(o.jsx)(mt.a,nw({},this._formItems.get(Al.name),{initialValue:null===(e=this.state.transferMajorGeneralEducationType)||void 0===e?void 0:e.name},_t.getValidation(Al.name,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),this.renderSave()]}),void 0)]}),void 0)},t.prototype.renderSave=function(){if(this.props.isEditing)return Object(o.jsx)(Ze,nw({validFeatureFlags:[gn.EDIT_TRANSFER_MAJOR_GENERAL_EDUCATION_TYPE]},{children:Object(o.jsxs)(y.b,nw({direction:"horizontal"},{children:[Object(o.jsx)(Tr,{saving:this.state.saving},void 0),Object(o.jsx)(Ir,{onConfirm:this.resetForm,disabled:!this.state.altered},void 0)]}),void 0)}),void 0)},t.prototype.renderErrors=function(){if(this.state.error&&this.state.submitted)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t}(a.Component),iw=function(e){return Object.assign({transferMajorGeneralEducationTypeId:null},e)},ow=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),aw=function(){return aw=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},aw.apply(this,arguments)},sw=function(e){function t(t){var n=e.call(this,t)||this;return n._TransferMajorGeneralEducationTypeDetailsRef=a.createRef(),n.loadTransferMajorGeneralEducationType=function(e){n.setState({transferMajorGeneralEducationTypeId:e}),ZN.getTransferMajorGeneralEducationTypeDetails(e).then((function(e){e.transferMajorGeneralEducationType&&n.setState({transferMajorGeneralEducationType:e.transferMajorGeneralEducationType})})).catch((function(){n.setState({error:!0})}
1)).finally((function(){n.setState({loading:!1})}))},n.deleteConfirmation=function(e){f.a.confirm({title:"Are you sure you want to delete this General Education Type?",okText:"Delete",onOk:function(){return n.deleteTransferMajorGeneralEducationType(e)}})},n.deleteTransferMajorGeneralEducationType=function(e){n.setState({submitting:!0});var t=iw({transferMajorGeneralEducationTypeId:e});ZN.deleteTransferMajorGeneralEducationType(t).then((function(e){n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,altered:!(null===e||void 0===e?void 0:e.succeeded)}),!0===(null===e||void 0===e?void 0:e.succeeded)?S.b.success("General Education Type was removed."):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(e){n.setState({error:e}),S.b.error("General Education Type could not be removed.")})).finally((function(){n.setState({loading:!1}),n.goToTransferMajorGeneralEducationType()}))},n.toggleEdit=function(){var e;n.state.isEditing&&(null===(e=n._TransferMajorGeneralEducationTypeDetailsRef.current)||void 0===e||e.resetForm()),n.setState({isEditing:!n.state.isEditing})},n.TransferMajorGeneralEducationTypeDetailsSaved=function(e){n.setState({isEditing:!1}),e!=n.state.transferMajorGeneralEducationTypeId?T.replace(x.generate(x.TRANSFER_MAJOR_GENERAL_EDUCATION_TYPE_DETAILS,{id:e})):n.loadTransferMajorGeneralEducationType(e)},n.goToTransferMajorGeneralEducationType=function(){T.goBack()},n.state={transferMajorGeneralEducationTypeId:0},n}return ow(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");if("new"==e)this.setState({isEditing:!0,isNew:!0,loading:!1});else{var t=Number.parseInt(e);this.loadTransferMajorGeneralEducationType(t)}},t.prototype.render=function(){var e,t,n=this.state.loading?"...":0==this.state.transferMajorGeneralEducationTypeId?"New General Education Type":null!==(t=null===(e=this.state.transferMajorGeneralEducationType)||void 0===e?void 0:e.name)&&void 0!==t?t:"...";return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:n,onBack:this.goToTransferMajorGeneralEducationType,breadcrumbs:Xn.transferMajorGeneralEducationTypeDetails(n,this.state.transferMajorGeneralEducationTypeId),extra:this.renderMoreActions()},void 0),Object(o.jsx)(zr,{when:this.state.isEditing},void 0),this.renderDetailsCard()]},void 0)},t.prototype.renderDetailsCard=function(){var e=0==this.state.transferMajorGeneralEducationTypeId?null:Object(o.jsx)(Ze,aw({validFeatureFlags:[gn.EDIT_TRANSFER_MAJOR_GENERAL_EDUCATION_TYPE]},{children:Object(o.jsx)(Br,{isEditing:this.state.isEditing,onClick:this.toggleEdit},void 0)}),void 0);return Object(o.jsx)(Qn.a,aw({title:"Details",extra:e},{children:Object(o.jsx)(rw,{ref:this._TransferMajorGeneralEducationTypeDetailsRef,transferMajorGeneralEducationTypeId:this.state.transferMajorGeneralEducationTypeId,isEditing:this.state.isEditing,isNew:this.state.isNew,onSave:this.TransferMajorGeneralEducationTypeDetailsSaved},void 0)}),void 0)},t.prototype.renderMoreActions=function(){var e=this,t=Object(o.jsx)(Gt.a,{children:Object(o.jsx)(Gt.a.Item,aw({title:"Delete General Education Type",onClick:function(){return e.deleteConfirmation(e.state.transferMajorGeneralEducationTypeId)}},{children:"Delete General Education Type"}),this.state.transferMajorGeneralEducationTypeId)},void 0);return Object(o.jsx)(Ze,aw({validFeatureFlags:[gn.EDIT_TRANSFER_MAJOR_GENERAL_EDUCATION_TYPE]},{children:Object(o.jsx)(la.a,aw({overlay:t},{children:Object(o.jsx)(rt.a,aw({size:"large",type:"link"},{children:Object(o.jsx)(aa.a,{},void 0)}),void 0)}),void 0)}),void 0)},t}(a.Component),dw=Object(u.i)(sw),cw=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),lw=function(e){function t(t){var n=e.call(this,t)||this;return n.getColumnDefinitions=function(){return[{title:"Name",dataIndex:Al.name,sorter:!0,filterType:wr.Text}]},n.openTransferMajorGeneralEducationType=function(e){e.id&&T.push(x.generate(x.TRANSFER_MAJOR_GENERAL_EDUCATION_TYPE_DETAILS,{id:e.id},{}))},n.addTransferMajorGeneralEducationType=function(){T.push(x.generate(x.NEW_TRANSFER_MAJOR_GENERAL_EDUCATION_TYPE))},n.state={},n}return cw(t,e),t.prototype.render=function(){var e=this,t=[];return t.push(oo.Reset()),t.push(oo.Export((function(t){return e.setState({exporting:!0}),ZN.getTransferMajorGeneralEducationTypeDataTableExport(t).then((function(t){e.setState({exporting:!1}),R.a.downloadBase64StringAsFile("Transfer_Major_General_Education_"+$r.getDateStamp()+".xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",null!==t&&void 0!==t?t:void 0)}))}),this.state.exporting)),Je.isAuthorized([gn.EDIT_TRANSFER_MAJOR_GENERAL_EDUCATION_TYPE])&&t.pu
1sh(oo.Default("New General Education Type",(function(){return e.addTransferMajorGeneralEducationType()}))),Object(o.jsx)(o.Fragment,{children:Object(o.jsx)(io,{ref:function(t){return e._dataTable=t},onRowClick:this.openTransferMajorGeneralEducationType,serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:t,columns:this.getColumnDefinitions(),fetchData:{fetch:function(e){return ZN.getTransferMajorGeneralEducationTypesDataTable(e)}},stateSaving:{enabled:!0,tableUniqueKey:"transferMajorGeneralEducationType_list"}},void 0)},void 0)},t}(a.Component),uw=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),pw=function(e){function t(t){var n=e.call(this,t)||this;return n.goToConfig=function(){T.goBack()},n}return uw(t,e),t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"General Education Type",onBack:this.goToConfig,breadcrumbs:Xn.transferMajorGeneralEducationTypeList()},void 0),Object(o.jsx)(Qn.a,{children:Object(o.jsx)(lw,{},void 0)},void 0)]},void 0)},t}(a.Component),fw=Object(u.i)(pw),hw={className:"TypeOfProgramDataTableDTO",create:function(e){return Object.assign(Q.create(),{id:0,code:"",name:"",apsGeneralEducation:!1},e)},id:"id",code:"code",name:"name",apsGeneralEducation:"apsGeneralEducation"},vw=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),mw=function(e){function t(t){var n=e.call(this,t)||this;return n.getColumnDefinitions=function(){return[{title:"Code",dataIndex:hw.code,sorter:!0,filterType:wr.Text,width:125},{title:"Name",dataIndex:hw.name,sorter:!0,filterType:wr.Text},{title:"APS General Education",dataIndex:hw.apsGeneralEducation,filterType:wr.BooleanRadio,columnType:Dr.Boolean,render:Hj.BooleanYesEmpty,sorter:!1,width:175}]},n.openTypeOfProgram=function(e){e.id&&T.push(x.generate(x.TYPE_OF_PROGRAM_DETAILS,{id:e.id},{}))},n.addTypeOfProgram=function(){T.push(x.generate(x.NEW_TYPE_OF_PROGRAM))},n.state={},n}return vw(t,e),t.prototype.render=function(){var e=this,t=[];return t.push(oo.Reset()),t.push(oo.Export((function(t){return e.setState({exporting:!0}),UP.getTypeOfProgramDataTableExport(t).then((function(t){e.setState({exporting:!1}),R.a.downloadBase64StringAsFile("Type_Of_Program_"+$r.getDateStamp()+".xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",null!==t&&void 0!==t?t:void 0)}))}),this.state.exporting)),Je.isAuthorized([gn.EDIT_TYPE_OF_PROGRAM])&&t.push(oo.Default("New Type Of Program",(function(){return e.addTypeOfProgram()}))),Object(o.jsx)(o.Fragment,{children:Object(o.jsx)(io,{ref:function(t){return e._dataTable=t},onRowClick:this.openTypeOfProgram,serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:t,columns:this.getColumnDefinitions(),fetchData:{fetch:function(e){return UP.getTypeOfProgramTableData(e)}},stateSaving:{enabled:!0,tableUniqueKey:"type_of_program_list"}},void 0)},void 0)},t}(a.Component),gw=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),bw=function(e){function t(t){var n=e.call(this,t)||this;return n.goToConfig=function(){T.goBack()},n}return gw(t,e),t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Type Of Program",onBack:this.goToConfig,breadcrumbs:Xn.typeOfProgramList()},void 0),Object(o.jsx)(Qn.a,{children:Object(o.jsx)(mw,{},void 0)},void 0)]},void 0)},t}(a.Component),yw=Object(u.i)(bw),Ow=function(e){return Object.assign({thirdPartyCredentialTypeId:0,thirdPartyCredentialType:null},e)},jw={className:"ThirdPartyCredentialTypeDTO",create:function(e){return Object.assign(Q.create(),{id:0,name:"",displayOrder:0,enabledForSecondaryProgram:!1,enabledForPostSecondaryProgram:!1},e)},id:"id",name:"name",displayOrder:"displayOrder",enabledForSecondaryProgram:"enabledForSecondaryProgram",enabledForPostSecondaryProgram:"enabledForPostSecondaryProgram"},Iw=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Sw=function(){return Sw=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Sw.apply(this,arguments)},Ew=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._formItems=(new Map).set(jw.name,{required:!0,name:jw.name,label:"Name",rules:[Ot.required(),Ot.maxLength(50)]}).set(jw.enabledForPostSecondaryProgram,{name:jw.enabledForPostSecondaryProgram,label:"Enable for Post Secondary Program",rules:[]}).set(jw.enabledForSecondaryProgram,{name:jw.enabledForSecondaryProgram,label:"Enable for Secondary Program",rules:[]}),n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields(),n.setState({altered:!1})},n.loadExisting=function(){n.props.thirdPartyCredentialTypeId&&Zc.getThirdPartyCredentialTypeDetails(n.props.thirdPartyCredentialTypeId).then((function(e){e&&e.thirdPartyCredentialType&&n.setState({thirdPartyCredentialTypeId:e.thirdPartyCredentialType.id,thirdPartyCredentialType:e.thirdPartyCredentialType,loading:!1}),n.resetForm()})).catch((function(){n.setState({error:!0})}
1)).finally((function(){n.setState({loading:!1})}))},n.loadNew=function(){n.setState({thirdPartyCredentialType:jw.create(),loading:!1})},n.handleChange=function(){n.setState({altered:!0})},n.handleSubmit=function(){n.setState({submitting:!0});var e=Ow({thirdPartyCredentialTypeId:n.state.thirdPartyCredentialTypeId,thirdPartyCredentialType:jw.create(n._formRef?n._formRef.current.getFieldsValue():null)});Zc.saveThirdPartyCredentialTypeDetails(e).then((function(e){var t;n.setState({submitted:!0,thirdPartyCredentialType:null===e||void 0===e?void 0:e.thirdPartyCredentialType}),(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.props.onSave&&(null===(t=e.thirdPartyCredentialType)||void 0===t?void 0:t.id)&&(n.props.onSave(e.thirdPartyCredentialType.id),n.resetForm()),ce.invalidateCache(jw.className)):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("ThirdPartyCredentialType could not be saved. "+n.state.message))})).catch((function(e){n.setState({error:e}),S.b.error("ThirdPartyCredentialType could not be saved.")})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.state={thirdPartyCredentialTypeId:0,thirdPartyCredentialType:jw.create()},n}return Iw(t,e),t.prototype.componentDidMount=function(){this.setState({loading:!0}),this.loadThirdPartyCredentialType()},t.prototype.componentDidUpdate=function(e){this.props.thirdPartyCredentialTypeId&&this.props.thirdPartyCredentialTypeId!=e.thirdPartyCredentialTypeId&&(this.setState({thirdPartyCredentialTypeId:this.props.thirdPartyCredentialTypeId}),this.loadThirdPartyCredentialType())},t.prototype.loadThirdPartyCredentialType=function(){0==this.props.thirdPartyCredentialTypeId?this.loadNew():this.loadExisting()},t.prototype.render=function(){var e;return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(y.b,Sw({size:"small",direction:"vertical"},{children:[this.renderErrors(),Object(o.jsxs)(ht.a,Sw({ref:this._formRef,layout:"vertical",initialValues:null!==(e=this.state.thirdPartyCredentialType)&&void 0!==e?e:jw.create(),onValuesChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!0},{children:[Object(o.jsx)(mt.a,Sw({},this._formItems.get(jw.name),_t.getValidation(jw.name,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,Sw({valuePropName:"checked"},this._formItems.get(jw.enabledForPostSecondaryProgram),_t.getValidation(jw.enabledForPostSecondaryProgram,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(Ti.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,Sw({valuePropName:"checked"},this._formItems.get(jw.enabledForSecondaryProgram),_t.getValidation(jw.enabledForSecondaryProgram,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(Ti.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),this.renderSave()]}),void 0)]}),void 0)},t.prototype.renderSave=function(){if(this.props.isEditing)return Object(o.jsx)(Ze,Sw({validFeatureFlags:[gn.EDIT_THIRD_PARTY_CREDENTIAL_TYPE]},{children:Object(o.jsxs)(y.b,Sw({direction:"horizontal"},{children:[Object(o.jsx)(Tr,{saving:this.state.saving},void 0),Object(o.jsx)(Ir,{onConfirm:this.resetForm,disabled:!this.state.altered},void 0)]}),void 0)}),void 0)},t.prototype.renderErrors=function(){if(this.state.error&&this.state.submitted)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t}(a.Component),Rw=function(e){return Object.assign({thirdPartyCredentialTypeId:null},e)},_w=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Tw=function(){return Tw=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Tw.apply(this,arguments)},Cw=function(e){function t(t){var n=e.call(this,t)||this;return n._thirdPartyCredentialTypeDetailsRef=a.createRef(),n.loadThirdPartyCredentialType=function(e){n.setState({thirdPartyCredentialTypeId:e}),Zc.getThirdPartyCredentialTypeDetails(e).then((function(e){e.thirdPartyCredentialType&&n.setState({thirdPartyCredentialType:e.thirdPartyCredentialType})})).catch((function(){n.setState({error:!0})}
1)).finally((function(){n.setState({loading:!1})}))},n.deleteConfirmation=function(e){f.a.confirm({title:"Are you sure you want to delete this ThirdPartyCredentialType?",okText:"Delete",onOk:function(){return n.deleteThirdPartyCredentialType(e)}})},n.deleteThirdPartyCredentialType=function(e){n.setState({submitting:!0});var t=Rw({thirdPartyCredentialTypeId:e});Zc.deleteThirdPartyCredentialType(t).then((function(e){n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,altered:!(null===e||void 0===e?void 0:e.succeeded)}),!0===(null===e||void 0===e?void 0:e.succeeded)?S.b.success("ThirdPartyCredentialType was removed."):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(e){n.setState({error:e}),S.b.error("ThirdPartyCredentialType could not be removed.")})).finally((function(){n.setState({loading:!1}),n.goToThirdPartyCredentialType()}))},n.toggleEdit=function(){var e;n.state.isEditing&&(null===(e=n._thirdPartyCredentialTypeDetailsRef.current)||void 0===e||e.resetForm()),n.setState({isEditing:!n.state.isEditing})},n.thirdPartyCredentialTypeDetailsSaved=function(e){n.setState({isEditing:!1}),e!=n.state.thirdPartyCredentialTypeId?T.replace(x.generate(x.THIRD_PARTY_CREDENTIAL_TYPE_DETAILS,{id:e})):n.loadThirdPartyCredentialType(e)},n.goToThirdPartyCredentialType=function(){T.goBack()},n.state={thirdPartyCredentialTypeId:0},n}return _w(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");if("new"==e)this.setState({isEditing:!0,isNew:!0,loading:!1});else{var t=Number.parseInt(e);this.loadThirdPartyCredentialType(t)}},t.prototype.render=function(){var e,t,n=this.state.loading?"...":0==this.state.thirdPartyCredentialTypeId?"New Third Party Credential Type":null!==(t=null===(e=this.state.thirdPartyCredentialType)||void 0===e?void 0:e.name)&&void 0!==t?t:"...";return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:n,onBack:this.goToThirdPartyCredentialType,breadcrumbs:Xn.thirdPartyCredentialTypeDetails(n,this.state.thirdPartyCredentialTypeId),extra:this.renderMoreActions()},void 0),Object(o.jsx)(zr,{when:this.state.isEditing},void 0),this.renderDetailsCard()]},void 0)},t.prototype.renderDetailsCard=function(){var e=0==this.state.thirdPartyCredentialTypeId?null:Object(o.jsx)(Ze,Tw({validFeatureFlags:[gn.EDIT_GENDER]},{children:Object(o.jsx)(Br,{isEditing:this.state.isEditing,onClick:this.toggleEdit},void 0)}),void 0);return Object(o.jsx)(Qn.a,Tw({title:"Details",extra:e},{children:Object(o.jsx)(Ew,{ref:this._thirdPartyCredentialTypeDetailsRef,thirdPartyCredentialTypeId:this.state.thirdPartyCredentialTypeId,isEditing:this.state.isEditing,isNew:this.state.isNew,onSave:this.thirdPartyCredentialTypeDetailsSaved},void 0)}),void 0)},t.prototype.renderMoreActions=function(){var e=this,t=Object(o.jsx)(Gt.a,{children:Object(o.jsx)(Gt.a.Item,Tw({title:"Delete Third Party Credential Type",onClick:function(){return e.deleteConfirmation(e.state.thirdPartyCredentialTypeId)}},{children:"Delete Third Party Credential Type"}),this.state.thirdPartyCredentialTypeId)},void 0);return Object(o.jsx)(Ze,Tw({validFeatureFlags:[gn.EDIT_GENDER]},{children:Object(o.jsx)(la.a,Tw({overlay:t},{children:Object(o.jsx)(rt.a,Tw({size:"large",type:"link"},{children:Object(o.jsx)(aa.a,{},void 0)}),void 0)}),void 0)}),void 0)},t}(a.Component),xw=Object(u.i)(Cw),Aw=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Pw=function(e){function t(t){var n=e.call(this,t)||this;return n.getColumnDefinitions=function(){return[{title:"Name",dataIndex:jw.name,sorter:!0,filterType:wr.Text},{title:"Enabled For Post Secondary Program",dataIndex:jw.enabledForPostSecondaryProgram,render:function(e,t){return t.enabledForPostSecondaryProgram?"Yes":""},sorter:!0,filterType:wr.DropdownSingle,dropdownFilterOptions:[{value:"enabled",text:"Yes"},{value:"diabled",text:"No"}]},{title:"Enabled For Secondary Program",dataIndex:jw.enabledForSecondaryProgram,render:function(e,t){return t.enabledForSecondaryProgram?"Yes":""},sorter:!0,filterType:wr.DropdownSingle,dropdownFilterOptions:[{value:"enabled",text:"Yes"},{value:"disabled",text:"No"}]}]},n.openThirdPartyCredentialType=function(e){e.id&&T.push(x.generate(x.THIRD_PARTY_CREDENTIAL_TYPE_DETAILS,{id:e.id},{}))},n.addThirdPartyCredentialType=function(){T.push(x.generate(x.NEW_THIRD_PARTY_CREDENTIAL_TYPE))},n.state={},n}return Aw(t,e),t.prototype.render=function(){var e=this,t=[];return t.push(oo.Reset()),t.push(oo.Export((function(t){return e.setState({exporting:!0}),Zc.getThirdPartyCredentialTypeDataTableExport(t).then((function(t){e.setState({exporting:!1}),R.a.downloadBase64StringAsFile("ThirdPartyCredentialType_"+$r.getDateStamp()+".xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",null!==t&&void 0!==t?t:void 0)}))}),this.state.exporting)),Je.isAuthorized([gn.EDIT_THIRD_PARTY_CREDENTIAL_TYPE])&&t.pu
1sh(oo.Default("New Third Party Credential Type",(function(){return e.addThirdPartyCredentialType()}))),Object(o.jsx)(o.Fragment,{children:Object(o.jsx)(io,{ref:function(t){return e._dataTable=t},onRowClick:this.openThirdPartyCredentialType,serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:t,columns:this.getColumnDefinitions(),fetchData:{fetch:function(e){return Zc.getThirdPartyCredentialTypeTableData(e)}},stateSaving:{enabled:!0,tableUniqueKey:"thirdPartyCredentialType_list"}},void 0)},void 0)},t}(a.Component),Nw=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ww=function(e){function t(t){var n=e.call(this,t)||this;return n.goToConfig=function(){T.goBack()},n}return Nw(t,e),t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Third Party Credential Type",onBack:this.goToConfig,breadcrumbs:Xn.thirdPartyCredentialTypeList()},void 0),Object(o.jsx)(Qn.a,{children:Object(o.jsx)(Pw,{},void 0)},void 0)]},void 0)},t}(a.Component),Dw=Object(u.i)(ww),qw={className:"CourseCourseBlocksDataTableDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",courseBlockId:"00000000-0000-0000-0000-000000000000",code:"",title:"",courseCount:0},e)},id:"id",courseBlockId:"courseBlockId",code:"code",title:"title",courseCount:"courseCount"},Fw=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Mw=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(){n.setState({loading:!0});var e=[];n.state.institutions&&0!=n.state.institutions.length||e.push(n.loadInstitutions()),Promise.all(e).then((function(){n.setState({loading:!1})}))},n.loadInstitutions=function(){return ce.getAll(ne.className).then((function(e){e&&n.setState({institutions:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.getColumnDefinitions=function(){return[{title:"Code",dataIndex:qw.code,width:125,sorter:!0,filterType:wr.Text},{title:"Title",dataIndex:qw.title,sorter:!0,filterType:wr.Text},{title:"Course Count",dataIndex:qw.courseCount,sorter:!0,width:125}]},n.openInstitutionCoureBlock=function(e){e.id&&T.push(x.generate(x.INSTITUITION_COURSE_BLOCK_DETAILS,{id:e.id},{}))},n.state={institutions:[]},n}return Fw(t,e),t.prototype.componentDidMount=function(){this.fetchData()},t.prototype.render=function(){var e=this;if(this.state.loading)return Object(o.jsx)(pt.a,{active:!0},void 0);var t=[];return t.push(oo.Reset()),Object(o.jsx)(io,{ref:function(t){return e._dataTable=t},onRowClick:this.openInstitutionCoureBlock,serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:t,columns:this.getColumnDefinitions(),fetchData:{fetch:function(t){var n;return Qs.getCourseCourseBlocksTableData(t,null!==(n=e.props.courseId)&&void 0!==n?n:re.default.Empty())}},stateSaving:{enabled:!0,tableUniqueKey:"course_course_block_list"}},void 0)},t}(a.Component),Yw={className:"CourseProgramDataTableDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",programId:"00000000-0000-0000-0000-000000000000",title:"",awardTypeIds:[],awards:[],cipNumberId:"00000000-0000-0000-0000-000000000000",cipNumber:null,iowaVariationId:0,iowaVariation:null},e)},id:"id",programId:"programId",title:"title",awardTypeIds:"awardTypeIds",awards:"awards",cipNumberId:"cipNumberId",cipNumber:"cipNumber",iowaVariationId:"iowaVariationId",iowaVariation:"iowaVariation"},Uw=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Lw=function(){return Lw=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Lw.apply(this,arguments)},kw=function(e){function t(t){var n=e.call(this,t)||this;return n._courseSearchRef=a.createRef(),n.fetchData=function(){Ii.AwardTypes().then((function(e){return n.setState({awardTypes:e})})),Ii.IowaVariations().then((function(e){return n.setState({iowaVariations:e})})),Promise.all([]).then((function(){n.setState({loading:!1})}
1))},n.openProgram=function(e){e.programId&&T.push(x.generate(x.PROGRAM_DETAILS,{id:e.programId},{}),"_blank")},n.triggerRefresh=function(){var e;null===(e=n._dataTable)||void 0===e||e.refresh()},n.getColumnDefinitions=function(){return[{title:"Title",dataIndex:Yw.title,sorter:!0,filterType:wr.Text},{title:"Awards",dataIndex:Yw.awardTypeIds,render:function(e,t){return n.state.awardTypes.filter((function(e){return t.awardTypeIds.some((function(t){return t==e.value}))})).map((function(e){return e.text})).join(", ")},filterType:wr.DropdownMulti,dropdownFilterOptions:n.state.awardTypes,width:225},{title:"CIP Number ",dataIndex:Yw.cipNumberId,render:function(e,t){var n,r,i;if((null===(n=t.cipNumber)||void 0===n?void 0:n.cipNumberDetails)&&(null===(i=null===(r=t.cipNumber)||void 0===r?void 0:r.cipNumberDetails)||void 0===i?void 0:i.length)>0)return t.cipNumber.cipNumberDetails[0].display},sorter:!0,filterType:wr.Text,width:225},{title:"Iowa Variation",dataIndex:Yw.iowaVariationId,render:function(e,t){var n;return null===(n=t.iowaVariation)||void 0===n?void 0:n.display},sorter:!0,filterType:wr.DropdownMulti,dropdownFilterOptions:n.state.iowaVariations,width:225}]},n.state={showAddCourseModal:!1,awardTypes:[],iowaVariations:[]},n}return Uw(t,e),t.prototype.componentDidMount=function(){this.fetchData()},t.prototype.componentDidUpdate=function(e){e.courseId!=this.props.courseId&&this.triggerRefresh()},t.prototype.render=function(){var e=this,t=[];return t.push(oo.Reset()),Object(o.jsx)(y.b,Lw({direction:"vertical"},{children:Object(o.jsx)(io,{ref:function(t){return e._dataTable=t},onRowClick:this.openProgram,serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:t,columns:this.getColumnDefinitions(),fetchData:{fetch:function(t){return Qs.getCourseProgramsTableData(t,e.props.courseId)}},stateSaving:{enabled:!0,tableUniqueKey:"course_programs_list"}},void 0)}),void 0)},t}(a.Component),Gw=function(e){return Object.assign({courseDetail:null,formCourseDetail:null,formInstitutionCourseDetail:null,originalInstitutionCourseDetail:null,institutionId:"00000000-0000-0000-0000-000000000000",courseId:"00000000-0000-0000-0000-000000000000",futureTerm:null},e)},Vw={className:"InstitutionCourseDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",courseId:"00000000-0000-0000-0000-000000000000",course:null,install:null,retire:null,institutionId:"00000000-0000-0000-0000-000000000000",institution:null,institutionCourseDetails:[],deletedOn:null,installDisplay:"",currentDetail:null,status:null},e)},id:"id",courseId:"courseId",course:"course",install:"install",retire:"retire",institutionId:"institutionId",institution:"institution",institutionCourseDetails:"institutionCourseDetails",deletedOn:"deletedOn",installDisplay:"installDisplay",currentDetail:"currentDetail",status:"status"},Bw=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ww=function(){return Ww=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ww.apply(this,arguments)},zw=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n.FUTURE_TERM="futureTerm",n.VERSION_SELECTOR="versionSelector",n.getFormItems=function(){return(new Map).set(n.FUTURE_TERM,{label:"Please specify the term to apply these changes.",required:!0,rules:[function(){return{validator:_t.termInputYearValidator(n.props.terms,n.props.installTerm,"retire")}},function(){return{validator:_t.termAndYearValidator()}}],name:n.FUTURE_TERM}).set(n.VERSION_SELECTOR,{required:!0,rules:[Ot.required()],name:n.VERSION_SELECTOR})},n.saveVersion=function(){var e,t=[];t.push(null===(e=n._formRef.current)||void 0===e?void 0:e.validateFields()),Promise.all(t).finally((function(){var e,t,r=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldsError(),i=!0;if(null===r||void 0===r||r.forEach((function(e){e.errors.length>0&&i&&(i=!1)})),n.props.submit&&i){var o=null===(t=n._formRef.current)||void 0===t?void 0:t.getFieldValue([n.FUTURE_TERM]);n.state.showTerms?n.props.submit(bl.create(o)):n.props.submit()}}))},n.cancelModal=function(){n.props.onCancel&&(n.props.onCancel(),n.resetFields(),n.setState({showTerms:!1}))},n.resetFields=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields()},n.handleChange=function(e){n.setState({showTerms:null!==e&&void 0!==e&&e})},n.state={submitting:!1,showTerms:!1},n}return Bw(t,e),t.prototype.componentDidMount=function(){this.resetFields()},t.prototype.render=function(){var e,t,n=null===(e=this._formRef.current)||void 0===e?void 0:e.getFieldValue(this.VERSION_SELECTOR);return Object(o.jsx)(f.a,Ww({visible:null!==(t=this.props.showModal)&&void 0!==t&&t,title:"Update Current Version?",onCancel:this.cancelModal,okText:"Submit",cancelText:"",onOk:this.saveVersion},{children:Object(o.jsxs)(y.b,Ww({direction:"vertical"},{children:[Object(o.jsx)(ot.a.Text,Ww({strong:!0},{children:" Would you like to apply these changes to the current version of this course or apply them in a specific term? Applying directly to this version will affect all terms since this version has been active."}),void 0),Object(o.jsx)(Ci.a,Ww({ref:this._formRef,layout:"vertical",requiredMark:!0},{children:Object(o.jsxs)(y.b,Ww({direction:"vertical"},{children:[Object(o.jsx)(mt.a,Ww({},this.getFormItems().get(this.VERSION_SELECTOR),_t.getValidation(this.VERSION_SELECTOR,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(H
1d,{yesText:"Specify Term",noText:"Update Currently Selected",disabled:this.state.loading||this.state.saving||this.state.submitting,onChange:this.handleChange},void 0)}),void 0),n?Object(o.jsx)(Ci.a.Item,Ww({},this.getFormItems().get(this.FUTURE_TERM),_t.getValidation(this.FUTURE_TERM,this.props.fieldErrors,!0),{children:Object(o.jsx)(Od,{},void 0)}),void 0):null]}),void 0)}),void 0)]}),void 0)}),void 0)},t}(a.Component),Hw=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Qw=function(){return Qw=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Qw.apply(this,arguments)},Kw=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._courseRequisiteFormRef=a.createRef(),n._courseSearch=a.createRef(),n.getProgramAwardFormItems=function(e){return(new Map).set(Zs.title,{required:!0,name:Zs.title,rules:[Ot.required(),Ot.maxLength(150)]}).set(Il.catalogNumber,{required:!0,name:Il.catalogNumber,rules:[Ot.required(),Ot.onlyNumericCharacters(),Ot.maxLength(3)]}).set(Il.disciplineId,{required:!0,name:Il.disciplineId,rules:[Ot.required()]}).set(Ul.categoryId,{required:!0,name:Ul.categoryId,rules:[Ot.required()]}).set(Ul.totalMinCredits,{required:!0,name:[e,Ul.totalMinCredits],rules:[Ot.required()]}).set(Ul.totalMaxCredits,{required:!0,name:[e,Ul.totalMaxCredits],rules:[Ot.required()]}).set(Ul.variableHours,{required:!0,name:Ul.variableHours,rules:[Ot.required()]}).set(Zs.title,{required:!0,name:Zs.title,rules:[Ot.required()]}).set(Ul.description,{required:!0,name:Ul.description,label:"Description",rules:[Ot.required()]}).set(Ul.objectives,{required:!0,name:Ul.objectives,rules:[Ot.maxLength(5e3),Ot.required()]}).set(Il.install,{required:!0,name:Il.install,rules:[Ot.required(),function(e){var t=e.getFieldValue;return{validator:_t.termInputYearValidator(n.state.terms,t(Zs.retire),Zs.install)}},function(){return{validator:_t.termAndYearValidator()}}]}).set(Zs.retire,{name:Zs.retire,rules:[function(e){var t=e.getFieldValue;return{validator:_t.termInputYearValidator(n.state.terms,t(Zs.install),Zs.retire)}},function(){return{validator:_t.termAndYearValidatorNullable()}}]}).set(ed.courseRequisiteTypeId,{required:!0,name:ed.courseRequisiteTypeId,label:"Course Requisite Type",requiredMark:!0,rules:[Ot.required()]})},n.getCourseRequisiteColumns=function(){var e=[{title:"Course Name",sorter:!1,dataIndex:ed.requisiteCourseId,render:function(e,t,r){var i,o,a=null===(i=n._formRef.current)||void 0===i?void 0:i.getFieldValue(Ul.courseRequisites)[r];return null!==(o=null===a||void 0===a?void 0:a.requisiteCourseDisplay)&&void 0!==o?o:""}},{title:"Course Requisite Type",dataIndex:ed.courseRequisiteTypeId,render:function(e,t,r){var i,o,a=null===(i=n._formRef.current)||void 0===i?void 0:i.getFieldValue(Ul.courseRequisites)[r];return null===(o=n.state.courseRequisiteTypes.find((function(e){return e.id==(null===a||void 0===a?void 0:a.courseRequisiteTypeId)})))||void 0===o?void 0:o.name}}];return n.props.isEditing&&e.pushAll([{title:"Actions",dataIndex:"actions",render:function(e,t,r){var i,a=null===(i=n._formRef.current)||void 0===i?void 0:i.getFieldValue(Ul.courseRequisites)[r];return Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(rt.a,Qw({type:"link",onClick:function(){return n.editCourseRequisite(a)}},{children:Object(o.jsx)(Gr.a,{},void 0)}),void 0),Object(o.jsx)(rt.a,Qw({type:"link",onClick:function(){return n.removeCourseRequisite(a)}},{children:Object(o.jsx)(Yd.a,{},void 0)}),void 0)]},void 0)}}]),e},n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields(),n.setState({altered:!1})},n.fetchData=function(){var e,t;n.setState({loading:!0});var r=[];0==n.state.statusTypes.length&&r.push(n.loadStatusTypes()),0==n.state.disciplines.length&&r.push(n.loadDisciplines()),0==n.state.terms.length&&r.push(n.loadTerms()),0==n.state.categories.length&&r.push(n.loadCategories()),0==n.state.creditTypes.length&&r.push(n.loadCreditTypes()),n.state.courseRequisiteTypes&&0!=n.state.courseRequisiteTypes.length||r.push(n.loadCourseRequisiteType()),(null===(e=n.props.course)||void 0===e?void 0:e.courseDetails)?n.setState({course:n.props.course,selectedCourseDetail
1:null!==(t=n.props.course.currentDetail)&&void 0!==t?t:Zs.create()}):n.props.courseId!=re.default.Empty()&&r.push(n.loadExisting()),Promise.all(r).then((function(){n.setState({loading:!1})}))},n.loadDisciplines=function(){return ce.getAll(nd.className).then((function(e){e&&n.setState({disciplines:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadCategories=function(){return ce.getAll(di.className).then((function(e){e&&n.setState({categories:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadStatusTypes=function(){return ce.getAll(gi.className).then((function(e){e&&n.setState({statusTypes:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadTerms=function(){return ce.getAll(Rs.className).then((function(e){e&&n.setState({terms:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadCreditTypes=function(){return ce.getAll(Vd.className).then((function(e){e&&n.setState({creditTypes:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadExisting=function(){return Qs.getCourseDetails(n.props.courseId).then((function(e){var t,r,i,o,a,s,d;(null===(t=e.course)||void 0===t?void 0:t.courseDetails)&&n.setState({course:null!==(r=e.course)&&void 0!==r?r:Il.create(),courseDetails:null!==(o=null===(i=e.course)||void 0===i?void 0:i.courseDetails)&&void 0!==o?o:[],selectedCourseDetail:null!==(d=null===(a=e.course)||void 0===a?void 0:a.courseDetails[(null===(s=e.course)||void 0===s?void 0:s.courseDetails.length)-1])&&void 0!==d?d:Zs.create()})})).catch((function(){n.setState({error:!0})}))},n.loadCourseRequisiteType=function(){return ce.getAll(td.className).then((function(e){e&&(e=e.sort((function(e,t){var n,r;return(null!==(n=e.displayOrder)&&void 0!==n?n:"")>(null!==(r=null===t||void 0===t?void 0:t.displayOrder)&&void 0!==r?r:"")?1:-1})),n.setState({courseRequisiteTypes:null!==e&&void 0!==e?e:[]}))})).catch((function(){n.setState({error:!0})}))},n.handleChange=function(){n.setState({altered:!0})},n.openModal=function(){n.setState({showModal:!0})},n.cancelChange=function(){n.setState({showModal:!1})},n.handleSubmit=function(e){var t,r,i;n.setState({submitting:!0});var o=n._formRef?n._formRef.current.getFieldsValue():null,a=1,s=o.institutionCourseCredits.map((function(e){var t;return e.creditTypeId=null===(t=n.state.creditTypes.find((function(e){return e.displayOrder==a})))||void 0===t?void 0:t.id,e.minimum=e.totalMinCredits,e.maximum=e.totalMaxCredits,a++,e})),d=Ul.create(o);d.institutionCourseCredits=s,d.id=null!==(t=n.state.selectedInstitutionCourseDetail.id)&&void 0!==t?t:re.default.Empty();var c=Zs.create(o);c.id=null!==(i=null===(r=n.props.selectedCourseDetail)||void 0===r?void 0:r.id)&&void 0!==i?i:re.default.Empty();var l=Gw({courseId:n.props.selectedInstitutionCourse.courseId,formInstitutionCourseDetail:d,originalInstitutionCourseDetail:n.state.selectedInstitutionCourseDetail,institutionId:n.props.selectedInstitutionCourse.institutionId==re.default.Empty()?n.props.institutionId:n.props.selectedInstitutionCourse.institutionId,formCourseDetail:c,courseDetail:n.state.selectedCourseDetail,futureTerm:e,course:n.state.course});du.saveInstitutionCourseDetails(l).then((function(e){var t,r,i,o,a;n.setState({submitted:!0}),(null===e||void 0===e?void 0:e.succeeded)?(n.setState({selectedInstitutionCourseDetail:null!==(i=null===(r=null===(t=e.institutionCourse)||void 0===t?void 0:t.institutionCourseDetails)||void 0===r?void 0:r.find((function(e){return e.id==n.state.selectedDetailId})))&&void 0!==i?i:Ul.create(),futureTerm:bl.create(),fieldErrors:{},error:!1}),S.b.success("Saved"),n.props.onSave&&e.institutionCourse&&(n.resetForm(),n.props.onSave(null!==(o=e.institutionCourseDetailId)&&void 0!==o?o:re.default.Empty(),null!==(a=e.institutionCourse.id)&&void 0!==a?a:re.default.Empty()))):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Error Saving"))})).catch((function(e){n.setState({error:e}),S.b.error("Error Saving")})).finally((function(){n.setState({loading:!1,submitting:!1,showModal:!1})}))},n.handleAddCourseRequisite=function(){var e,t,r,i,o,a,s=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldsValue(),d=null===(t=n._courseSearch.current)||void 0===t?void 0:t.getValue();null===(i=null===(r=n._courseSearch.current)||void 0===r?void 0:r.getForm().current)||void 0===i||i.validateFields();var c=s.courseRequisites,l=[];return l.push(null===(a=null===(o=n._courseSearch.current)||void 0===o?void 0:o.getForm().current)||void 0===a?void 0:a.validateFields()),Promise.all(l).then((function(){var e;c||(c=[]),c.push({requisiteCourse:null===d||void 0===d?void 0:d.course,requisiteCourseId:null===d||void 0===d?void 0:d.courseId,courseRequisiteTypeId:null===d||void 0===d?void 0:d.courseRequisiteTypeId}),n.handleChange(),null===(e=n._formRef.current)||void 0===e||e.setFieldsValue({courseRequisites:c})}))},n.handleRemoveCourseRequisite=function(e){var t,r,i=null===(t=n._formRef.current)||void 0===t?void 0:t.getFieldValue(Ul.courseRequisites),o=i.find((function(t){return t.requisiteCourseId==e.requisiteCourseId}));i.remove(o),null===(r=n._formRef.current)||void 0===r||r.setFieldsValue({courseRequisites:i}),n.handleChange()},n.handleEditCourseRequisite=function(e){var t,r,i,o=null===(t=n._formRef.current)||void 0===t?void 0:t.getFieldValue(Ul.courseRequisites),a=null===(r=n._courseRequisiteFormRef.current)||void 0===r?void 0:r.getFieldValue(ed.courseRequisiteTypeId);o.find((function(t){return t.requisiteCourseId==e.requisiteCourseId})).courseRequisiteTypeId=a,null===(i=n._formRef.current)||void 0===i||i.setFieldsValue({courseRequisites:o}),n.handleChange()},n.addCourseRequisite=function(){var e;f.a.confirm({title:"Select Course",content:Object(o.jsx)(gd,{isCourseRequisite:!0,ref:n._c
1ourseSearch,institutionId:null!==(e=n.props.institutionId)&&void 0!==e?e:re.default.Empty()},void 0),onOk:function(){return n.handleAddCourseRequisite()},width:1e3})},n.removeCourseRequisite=function(e){f.a.confirm({title:"Remove Course Requisite",onOk:function(){return n.handleRemoveCourseRequisite(e)},okType:"danger",okText:"Remove",width:300})},n.state={courseId:re.default.Empty(),course:Il.create({installTermId:"",retireTermId:"",disciplineId:""}),selectedCourseDetail:Zs.create({installTermId:"",retireTermId:""}),courseDetails:[],statusTypes:[],disciplines:[],terms:[],selectedInstitutionCourseDetail:Ul.create(),selectedDetailId:re.default.Empty(),categories:[],creditTypes:[],showModal:!1,futureTerm:bl.create(),courseRequisiteTypes:[]},n}return Hw(t,e),t.prototype.componentDidMount=function(){var e,t=this;this.fetchData(),this.setState({selectedInstitutionCourseDetail:null!==(e=this.props.selectedInstitutionCourseDetail)&&void 0!==e?e:Ul.create()},(function(){return t.resetForm()}))},t.prototype.componentDidUpdate=function(e){var t,n,r,i,o=this;(this.props.courseId&&this.props.courseId.isNotEmpty()&&this.props.courseId!=e.courseId||(null===(t=this.props.course)||void 0===t?void 0:t.disciplineId)!=(null===(n=e.course)||void 0===n?void 0:n.disciplineId))&&this.fetchData(),this.props.selectedInstitutionCourseDetail!=e.selectedInstitutionCourseDetail&&this.setState({selectedInstitutionCourseDetail:null!==(r=this.props.selectedInstitutionCourseDetail)&&void 0!==r?r:Ul.create()},(function(){return o.resetForm()})),this.props.selectedCourseDetail!=e.selectedCourseDetail&&this.setState({selectedCourseDetail:null!==(i=this.props.selectedCourseDetail)&&void 0!==i?i:Zs.create()})},t.prototype.editCourseRequisite=function(e){var t=this;f.a.confirm({title:"Edit Course Requisite",onOk:function(){return t.handleEditCourseRequisite(e)},content:Object(o.jsx)(ht.a,Qw({ref:this._courseRequisiteFormRef,layout:"vertical",initialValues:e,onFinish:function(){return t.handleEditCourseRequisite(e)},requiredMark:!0},{children:Object(o.jsx)(mt.a,Qw({},this.getProgramAwardFormItems(0).get(ed.courseRequisiteTypeId),{children:Object(o.jsx)(hd,Qw({dropdownMatchSelectWidth:!1,allowClear:!0,showSearch:!0,optionFilterProp:"children"},{children:this.renderCourseRequisiteTypes()}),void 0)}),void 0)}),void 0),okText:"Edit",okType:"primary",width:500})},t.prototype.render=function(){var e,t,n,r,i,a,s,d,c,l,u,p,f,h,v,m,g,b,O,j,I=this;if(this.state.loading)return Object(o.jsx)(pt.a,{active:!0},void 0);var S=Qw(Qw(Qw({},this.state.course),this.props.selectedInstitutionCourseDetail),this.state.selectedCourseDetail);S.install=null===(e=this.state.selectedInstitutionCourseDetail)||void 0===e?void 0:e.install;var E=this.state.isEditing?"Please provide credits for at least one credit type in the table below.":"Prerequisites/Co-Requisites";return Object(o.jsxs)(y.b,Qw({size:"small",direction:"vertical"},{children:[Object(o.jsx)(zr,{when:this.state.altered},void 0),this.renderErrors(),Object(o.jsxs)(ht.a,Qw({ref:this._formRef,layout:"vertical",initialValues:S,onValuesChange:this.handleChange,onFinish:this.props.isNew?function(){return I.handleSubmit(bl.create())}:this.openModal,requiredMark:!this.props.readonly},{children:[Object(o.jsxs)(y.b,Qw({direction:"vertical"},{children:[Object(o.jsx)(ot.a.Paragraph,{children:this.props.readonly||!this.props.isEditing?null===(t=this.props.selectedInstitutionCourseDetail)||void 0===t?void 0:t.description:Object(o.jsx)(mt.a,Qw({},this.getProgramAwardFormItems(0).get(Ul.description),{children:Object(o.jsx)(ut.a.TextArea,{maxLength:5e3,disabled:this.props.readonly||!this.props.isEditing,showCount:!0,autoSize:{minRows:5}},void 0)}),void 0)},void 0),Object(o.jsx)(Kn.b,Qw({size:"small",bordered:!0,layout:"vertical",column:{xs:1,sm:1,md:1,lg:2,xl:4,xxl:4}},{children:Object(o.jsxs)(Kn.b.Item,Qw({label:"Learning Objectives/Outcomes"},{children:[" ",this.props.readonly||!this.props.isEditing?ei.newLineCharacterLimit(null!==(r=null===(n=this.props.selectedInstitutionCourseDetail)||void 0===n?void 0:n.objectives)&&void 0!==r?r:"",117):Object(o.jsx)(mt.a,Qw({}
1,this.getProgramAwardFormItems(0).get(Ul.objectives),{children:Object(o.jsx)(ut.a.TextArea,{maxLength:5e3,disabled:this.props.readonly||!this.props.isEditing,showCount:!0,autoSize:{minRows:5}},void 0)}),void 0)," "]}),void 0)}),void 0),Object(o.jsxs)(Kn.b,Qw({size:"small",bordered:!0,layout:"vertical",column:{xs:1,sm:1,md:1,lg:2,xl:4,xxl:4}},{children:[Object(o.jsx)(Kn.b.Item,Qw({label:"Discipline"},{children:null!==(s=null===(a=null===(i=this.state.selectedCourseDetail)||void 0===i?void 0:i.discipline)||void 0===a?void 0:a.display)&&void 0!==s?s:null===(d=this.state.disciplines.find((function(e){return e.id==I.state.course.disciplineId})))||void 0===d?void 0:d.display}),void 0),Object(o.jsx)(Kn.b.Item,Qw({label:"Catalog Number"},{children:null!==(l=null===(c=this.state.selectedCourseDetail)||void 0===c?void 0:c.catalogNumber)&&void 0!==l?l:this.state.course.catalogNumber}),void 0),Object(o.jsx)(Kn.b.Item,Qw({label:"Title"},{children:this.props.readonly||!this.props.isEditing?this.state.selectedCourseDetail.title:Object(o.jsx)(mt.a,Qw({className:"description-container"},this.getProgramAwardFormItems(0).get(Zs.title),{children:Object(o.jsx)(ut.a,{readOnly:this.props.readonly,disabled:!this.props.isEditing&&!this.props.readonly||this.state.loading||this.state.submitting},void 0)}),void 0)}),void 0),Object(o.jsx)(Kn.b.Item,Qw({label:"Variable hours"},{children:Object(o.jsx)(mt.a,Qw({className:"description-container"},this.getProgramAwardFormItems(0).get(Ul.variableHours),{children:Object(o.jsx)(Hd,{readonly:!this.props.isEditing||this.props.readonly||this.state.loading||this.state.submitting,disabled:!this.props.isEditing||this.props.readonly||this.state.loading||this.state.submitting},void 0)}),void 0)}),void 0),Object(o.jsx)(Kn.b.Item,Qw({label:"Category"},{children:this.props.readonly||!this.props.isEditing?null===(p=null===(u=this.state.selectedInstitutionCourseDetail)||void 0===u?void 0:u.category)||void 0===p?void 0:p.display:Object(o.jsx)(mt.a,Qw({className:"description-container"},this.getProgramAwardFormItems(0).get(Ul.categoryId),_t.getValidation(Ul.categoryId,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(pr.a,Qw({disabled:!this.props.isEditing||this.state.loading||this.state.submitting},{children:this.state.categories.map((function(e){return I.renderCategoryOption(e)}))}),void 0)}),void 0)}),void 0),Object(o.jsxs)(Kn.b.Item,Qw({label:"First Available"},{children:[" ",Je.isAuthorized([gn.SYSTEM_ADMIN])?this.props.readonly||!this.props.isEditing?null===(m=null===(v=this.state.selectedInstitutionCourseDetail)||void 0===v?void 0:v.install)||void 0===m?void 0:m.display:Object(o.jsx)(mt.a,Qw({className:"description-container"},this.getProgramAwardFormItems(0).get(Ul.install),{children:Object(o.jsx)(Od,{anyYear:!0},void 0)}),void 0):null===(h=null===(f=this.state.selectedInstitutionCourseDetail)||void 0===f?void 0:f.install)||void 0===h?void 0:h.display," "]}),void 0),Object(o.jsx)(Kn.b.Item,Qw({label:"Last Available"},{children:Je.isAuthorized([gn.SYSTEM_ADMIN])?this.props.readonly||!this.props.isEditing?null===(j=null===(O=this.state.selectedInstitutionCourseDetail)||void 0===O?void 0:O.retire)||void 0===j?void 0:j.display:Object(o.jsx)(mt.a,Qw({className:"description-container"},this.getProgramAwardFormItems(0).get(Ul.retire),{children:Object(o.jsx)(Od,{anyYear:!0},void 0)}),void 0):null===(b=null===(g=this.state.selectedInstitutionCourseDetail)||void 0===g?void 0:g.retire)||void 0===b?void 0:b.display}),void 0)]}),void 0),this.renderInstitutionCourseCredits(),Object(o.jsx)(mt.a,Qw({},this.getProgramAwardFormItems(0).get(Ul.variableHours),{children:this.renderGetFutureTermModal()}),void 0),Object(o.jsx)(ot.a.Paragraph,Qw({italic:!0},{children:E}),void 0),Object(o.jsxs)(y.b,Qw({direction:"vertical"},{children:[!this.props.isEditing||this.state.loading||this.state.submitting?null:Object(o.jsx)(rt.a,Qw({onClick:this.addCourseRequisite},{children:"Add Course Requisite"}),void 0),Object(o.jsx)(ht.a.List,Qw({name:Ul.courseRequisites},{children:function(e){return Object(o.jsx)(Pi.a,{dataSource:e,columns:I.getCourseRequisiteColumns(),pagination:!1},void 0)}}),void 0)]}),void 0)]}),void 0),this.renderSave()]}),void 0)]}),void 0)},t.prototype.renderInstitutionCourseCredits=function(){var e,t=this,n=null===(e=this._formRef)||void 0===e?void 0:e.current,r=this.state.selectedInstitutionCourseDetail.variableHours;return n&&(r=n.getFieldValue([Ul.variableHours])),Object(o.jsx)(ht.a.List,Qw({name:Ul.institutionCourseCredits},{children:function(){return Object(o.jsxs)(Pi.a,Qw({bordered:!1,dataSource:t.state.creditTypes,summary:function(){var e,n,r,i,a,s;if(t._formRef){var d=null===(n=null===(e=t._formRef)||void 0===e?void 0:e.current)||void 0===n?void 0:n.getFieldValue(Ul.variableHours),c=null===(i=null===(r=t._formRef)||void 0===r?void 0:r.current)||void 0===i?void 0:i.getFieldValue(Ul.institutionCourseCredits),l=c&&(null===c||void 0===c?void 0:c.length)>0&&null!==(a=null===c||void 0===c?void 0:c.map((function(e){var t;return e.totalMinCredits||0==e.totalMinCredits?e.totalMinCredits:null!==(t=e.minimum)&&void 0!==t?t:0})).reduce((function(e,t){return e+t})))&&void 0!==a?a:0,u=c&&(null===c||void 0===c?void 0:c.length)>0&&null!==(s=null===c||void 0===c?void 0:c.map((function(e){var t;return e.totalMaxCredits||0==e.totalMaxCredits?e.totalMaxCredits:null!==(t=e.maximum)&&void 0!==t?t:0})).reduce((function(e,t){return e+t})))&&void 0!==s?s:0,p=l,f=u;return Object(o.jsxs)(Pi.a.Summary.Row,{children:[Object(o.jsx)(Pi.a.Summary.Cell,{index:0},void 0),Object(o.jsx)(Pi.a.Summary.Cell,Qw({index:1},{children:Object(o.jsx)(ot.a.Text,Qw({strong:!0,type:"danger"},{children:p}),void 0)}),void 0),d?Object(o.jsx)(Pi.a.Summary.Cell,Qw({index:1},{children:Object(o.jsx)(ot.a.Text,Qw({strong:!0,type:"danger"},{children:f}),void 0)}),void 0):null]},void 0)}},pagination:!1},{children:[Object(o.jsx)(Pi.a.Column,{title:"Credit Type",render:function(e,n,r){var i;return null===(i=t.state.creditTypes.find((function(e){return e.displayOrder==r+1})))||void 0===i?void 0:i.name}},void 0),Object(o.jsx)(Pi.a.Column,{title:t.state.selectedCourseDetail.variableCredits?"Min Credits":"Credits",render:function(e,n,r){var i,a,s=null===(a=null===(i=t.state.selectedInstitutionCourseDetail.institutionCourseCredits)||void 0===i?void 0:i.find((function(e){var n;return e.creditTypeId==(null===(n=t.state.creditTypes.find((function(e){return e.displayOrder==r+1})))||void 0===n?void 0:n.id)})))||void 0===a?void 0:a.minimum;return t.props.readonly||!t.props.isEditing?s:Object(o.jsx)(mt.a,Qw({initialValue:s},t.getProgramAwardFormItems(r).get(Ul.totalMinCredits),_t.getValidation(Ul.totalMinCredits+r,t.state.fieldErrors,t.state.submitted),{children:Object(o.jsx)(Ni.a,{disabled:!t.props.isEditing||t.state.loading||t.state.submitting},void 0)}),void 0)}},void 0),r?Object(o.jsx)(Pi.a.Column,{title:"Max Credits",render:function(e,n,r){var i,a,s,d,
1c=null===(a=null===(i=t.state.selectedInstitutionCourseDetail.institutionCourseCredits)||void 0===i?void 0:i.find((function(e){var n;return e.creditTypeId==(null===(n=t.state.creditTypes.find((function(e){return e.displayOrder==r+1})))||void 0===n?void 0:n.id)})))||void 0===a?void 0:a.maximum;return t.props.readonly||!t.props.isEditing?null===(d=null===(s=t.state.selectedInstitutionCourseDetail.institutionCourseCredits)||void 0===s?void 0:s.find((function(e){var n;return e.creditTypeId==(null===(n=t.state.creditTypes.find((function(e){return e.displayOrder==r+1})))||void 0===n?void 0:n.id)})))||void 0===d?void 0:d.maximum:Object(o.jsx)(mt.a,Qw({initialValue:c},t.getProgramAwardFormItems(r).get(Ul.totalMaxCredits),_t.getValidation(Ul.totalMaxCredits,t.state.fieldErrors,t.state.submitted),{children:Object(o.jsx)(Ni.a,{disabled:!t.props.isEditing||t.state.loading||t.state.submitting},void 0)}),void 0)}},void 0):null]}),void 0)}}),void 0)},t.prototype.renderDisciplineOption=function(e){if(e.id)return Object(o.jsx)(pr.a.Option,Qw({value:e.id},{children:e.display}),e.id)},t.prototype.renderCategoryOption=function(e){if(e.id)return Object(o.jsx)(pr.a.Option,Qw({value:e.id},{children:e.display}),e.id)},t.prototype.renderGetFutureTermModal=function(){var e;return Object(o.jsx)(zw,{fieldErrors:this.state.fieldErrors,terms:this.state.terms,submit:this.handleSubmit,showModal:this.state.showModal,onCancel:this.cancelChange,installTerm:bl.create(null===(e=this._formRef.current)||void 0===e?void 0:e.getFieldValue(Vw.install))},void 0)},t.prototype.renderRetire=function(){var e;if((null===(e=this.state.selectedCourseDetail.retire)||void 0===e?void 0:e.termId)!=re.default.Empty()||!this.props.readonly)return Object(o.jsx)(mt.a,Qw({},this.getProgramAwardFormItems(0).get(Zs.retire),{children:Object(o.jsx)(Od,{readOnly:this.props.readonly,disabled:!this.props.isEditing&&!this.props.readonly||this.state.loading||this.state.submitting},void 0)}),void 0)},t.prototype.renderSave=function(){if(this.props.isEditing)return Object(o.jsx)(Ze,Qw({validFeatureFlags:[gn.EDIT_COURSE]},{children:Object(o.jsxs)(y.b,Qw({direction:"horizontal"},{children:[Object(o.jsx)(Tr,{disabled:!this.state.altered,saving:this.state.submitting},void 0),Object(o.jsx)(Ir,{disabled:!this.state.altered,onConfirm:this.resetForm},void 0)]}),void 0)}),void 0)},t.prototype.renderErrors=function(){if(this.state.error)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t.prototype.renderCourseRequisiteType=function(e){if(e.id)return Object(o.jsx)(pr.a.Option,Qw({value:e.id},{children:e.name}),e.id)},t.prototype.renderCourseRequisiteTypes=function(){var e=this;return this.state.courseRequisiteTypes.map((function(t){return e.renderCourseRequisiteType(t)}))},t}(a.Component),Xw=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Jw=function(){return Jw=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Jw.apply(this,arguments)},$w=function(e){function t(t){var n=e.call(this,t)||this;return n._courseDetailsRef=a.createRef(),n.loadInstitutionCourse=function(e,t){return n.setState({loading:!0}),du.getInstitutionCourseDetail(e).then((function(e){var r,i,o,a,s,d,c,l,u,p;if(null===(i=null===(r=e.institutionCourse)||void 0===r?void 0:r.course)||void 0===i?void 0:i.courseDetails){var f=n.state.selectedInstitutionCourseDetailId!=re.default.Empty()&&t&&t!=re.default.Empty()?null===(o=e.institutionCourse.institutionCourseDetails)||void 0===o?void 0:o.find((function(e){return e.id==t})):e.institutionCourse.currentDetail,h=e.institutionCourse.course.courseDetails.find((function(e){var t,n,r,i;return(null===(t=e.install)||void 0===t?void 0:t.termId)==(null===(n=null===f||void 0===f?void 0:f.install)||void 0===n?void 0:n.termId)&&(null===(r=e.install)||void 0===r?void 0:r.year)==(null===(i=null===f||void 0===f?void 0:f.install)||void 0===i?void 0:i.year)}));h||(h=e.institutionCourse.course.courseDetails.find((function(e){var t,n,r,i,o,a,s,d,c,l,u,p;return(null!==(n=null===(t=e.install)||void 0===t?void 0:t.year)&&void 0!==n?n:0)<(null!==(i=null===(r=null===f||void 0===f?void 0:f.install)||void 0===r?void 0:r.year)&&void 0!==i?i:0)||(null===(o=e.install)||void 0===o?void 0:o.year)==(null===(a=null===f||void 0===f?void 0:f.install)||void 0===a?void 0:a.year)&&(null!==(c=null===(d=null===(s=e.install)||void 0===s?void 0:s.term)||void 0===d?void 0:d.startDate)&&void 0!==c?c:0)<(null!==(p=null===(u=null===(l=null===f||void 0===f?void 0:f.install)||void 0===l?void 0:l.term)||void 0===u?void 0:u.startDate)&&void 0!==p?p:0)}))),n.setState({selectedInstitutionCourseDetailId:null!==(a=null===f||void 0===f?void 0:f.id)&&void 0!==a?a:re.default.Empty(),selectedInstitutionCourseDetail
1:null!==(s=e.institutionCourse.currentDetail)&&void 0!==s?s:Ul.create(),institutionCourse:null!==(d=e.institutionCourse)&&void 0!==d?d:Vw.create(),selectedCourseDetail:null!==h&&void 0!==h?h:null!==(c=e.institutionCourse.course.currentDetail)&&void 0!==c?c:Zs.create(),institutionId:null!==(l=e.institutionCourse.institutionId)&&void 0!==l?l:re.default.Empty(),course:null!==(u=e.institutionCourse.course)&&void 0!==u?u:Il.create(),courseId:null!==(p=e.institutionCourse.courseId)&&void 0!==p?p:re.default.Empty()})}})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))},n.toggleEdit=function(){var e;n.state.isEditing&&(null===(e=n._courseDetailsRef.current)||void 0===e||e.resetForm()),n.setState({isEditing:!n.state.isEditing})},n.handleVersionSelect=function(e){n.setState({selectedInstitutionCourseDetailId:e.key})},n.courseDetailsSaved=function(e,t){n.setState({isEditing:!1}),t!=n.state.institutionCourse.id?T.replace(x.generate(x.COURSE_DETAILS,{institutionCourseId:t})):n.loadInstitutionCourse(t,e)},n.goToCourses=function(){n.state.fromSecondaryCourses!=re.default.Empty()&&""!=n.state.fromSecondaryCourses?T.push(x.generate(x.SECONDARY_COURSE_DETAILS,{id:n.state.fromSecondaryCourses},{academicYear:n.state.academicYear})):T.goBack()},n.changeTab=function(e){n.setState({activeTab:e}),T.replace(x.generate("",{},{activeTab:e}),{activeTab:e})},n.getDownloadList=function(){return[{title:"Course Syllabus Report",description:"File contains the course syllabus report.",action:function(){return n.courseSyllabusReport()}}]},n.courseSyllabusReport=function(){var e;window.open(x.generateFull(x.COURSE_SYLLABUS,{institutionCourseDetailId:null!==(e=n.state.selectedInstitutionCourseDetailId)&&void 0!==e?e:re.default.Empty()}),"_blank")},n.state={activeTab:"course_details",courseId:re.default.Empty(),course:Il.create(),selectedCourseDetail:Zs.create(),courseDetails:[],selectedInstitutionCourseDetail:Ul.create(),selectedInstitutionCourseDetailId:re.default.Empty(),institutionId:re.default.Empty(),institutionCourse:Vw.create(),showModal:!1,fromSecondaryCourses:re.default.Empty(),academicYear:0},n}return Xw(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"institutionCourseId"),t=Hr.getParameter("fromSecondaryCourses"),n=Hr.getParameter("academicYear"),r=Hr.getParameter("activeTab","course_details");this.setState({activeTab:r}),this.setState({fromSecondaryCourses:t,academicYear:Number.parseInt(n)}),this.loadInstitutionCourse(e)},t.prototype.render=function(){var e,t,n,r,i,a,s,d,c,l,u=this,p=this.state.loading?"...":null!==(t=null===(e=this.state.institutionCourse.institution)||void 0===e?void 0:e.name)&&void 0!==t?t:"...",f=this.state.loading?"...":this.state.isNew?"New Course":null!==(n=this.state.selectedCourseDetail.title)&&void 0!==n?n:"...",h=this.state.loading?"...":this.state.isNew?"New Course":null!==(r=this.state.course.display)&&void 0!==r?r:"...",v=null!==(s=null===(a=null===(i=this.state.institutionCourse)||void 0===i?void 0:i.institutionCourseDetails)||void 0===a?void 0:a.filter((function(e){return e.id==u.state.selectedInstitutionCourseDetailId}))[0])&&void 0!==s?s:Ul.create(),m=Object(o.jsx)(Gt.a,Jw({onSelect:this.handleVersionSelect,selectable:!0,selectedKeys:[this.state.selectedInstitutionCourseDetailId]},{children:null===(d=this.state.institutionCourse.institutionCourseDetails)||void 0===d?void 0:d.map((function(e){return Object(o.jsx)(Gt.a.Item,{children:e.versionDisplay},e.id)}))}),void 0),g=Object(o.jsx)(y.b,Jw({direction:"vertical"},{children:Object(o.jsx)(la.a,Jw({overlay:m},{children:Object(o.jsx)(rt.a,Jw({icon:Object(o.jsx)(kt.a,{},void 0)},{children:v?v.versionDisplay:"Versions"}),void 0)}),void 0)}),void 0);return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:f,onBack:this.goToCourses,breadcrumbs:this.state.fromSecondaryCourses!=re.default.Empty()&&""!=this.state.fromSecondaryCourses?Xn.courseDetailFromSecondaryCourses(h,this.state.courseId,this.state.institutionId,null!==(c=this.state.institutionCourse.id)&&void 0!==c?c:re.default.Empty(),"Course",this.state.fromSecondaryCourses,this.state.academicYear):Xn.courseDetails(h,this.state.courseId,this.state.institutionId,null!==(l=this.state.institutionCourse.id)&&void 0!==l?l:re.default.Empty()),subTitle:p,extra:g,footer
1:Object(o.jsxs)(pa.a,Jw({activeKey:this.state.activeTab,onChange:this.changeTab},{children:[Object(o.jsx)(pa.a.TabPane,{tab:"Details"},"course_details"),Object(o.jsx)(pa.a.TabPane,{tab:"Programs"},"programs"),Object(o.jsx)(pa.a.TabPane,{tab:"Course Blocks"},"course_blocks"),Object(o.jsx)(pa.a.TabPane,{tab:"Downloads"},"downloads"),Je.isAuthorized([gn.VIEW_CHANGE_REQUEST])?Object(o.jsx)(pa.a.TabPane,{tab:"Change Requests"},"course_change_request"):null]}),void 0)},void 0),Object(o.jsx)(zr,{when:this.state.isEditing},void 0),this.renderDetailsCard(v),this.renderCoursePrograms(),this.renderCourseCourseBlocks(),this.renderChangeRequest(),this.renderDownloads()]},void 0)},t.prototype.renderDetailsCard=function(e){var t,n,r,i,a,s,d,c,l;if("course_details"===this.state.activeTab){var u=this.state.selectedInstitutionCourseDetailId==re.default.Empty()?null:Object(o.jsx)(Ze,Jw({validFeatureFlags:[gn.EDIT_COURSE]},{children:Object(o.jsx)(Br,{onClick:this.toggleEdit,isEditing:this.state.isEditing},void 0)}),void 0),p=null===(r=null===(n=null===(t=this.state.institutionCourse)||void 0===t?void 0:t.course)||void 0===n?void 0:n.courseDetails)||void 0===r?void 0:r.find((function(t){var n,r,i,o;return(null===(n=t.install)||void 0===n?void 0:n.termId)==(null===(r=null===e||void 0===e?void 0:e.install)||void 0===r?void 0:r.termId)&&(null===(i=t.install)||void 0===i?void 0:i.year)==(null===(o=null===e||void 0===e?void 0:e.install)||void 0===o?void 0:o.year)}));p||(p=null===(s=null===(a=null===(i=this.state.institutionCourse)||void 0===i?void 0:i.course)||void 0===a?void 0:a.courseDetails)||void 0===s?void 0:s.find((function(t){var n,r,i,o,a,s,d,c,l,u,p,f;return(null!==(r=null===(n=t.install)||void 0===n?void 0:n.year)&&void 0!==r?r:0)<(null!==(o=null===(i=null===e||void 0===e?void 0:e.install)||void 0===i?void 0:i.year)&&void 0!==o?o:0)||(null===(a=t.install)||void 0===a?void 0:a.year)==(null===(s=null===e||void 0===e?void 0:e.install)||void 0===s?void 0:s.year)&&(null!==(l=null===(c=null===(d=t.install)||void 0===d?void 0:d.term)||void 0===c?void 0:c.startDate)&&void 0!==l?l:0)<(null!==(f=null===(p=null===(u=null===e||void 0===e?void 0:e.install)||void 0===u?void 0:u.term)||void 0===p?void 0:p.startDate)&&void 0!==f?f:0)})));var f=!1;return Je.isAuthorized([gn.EDIT_COURSE])||(f=!0),Object(o.jsx)(Qn.a,Jw({title:"Details",extra:u},{children:Object(o.jsx)(Kw,{ref:this._courseDetailsRef,course:this.state.course,courseId:this.state.courseId,isEditing:this.state.isEditing,isNew:this.state.isNew,onSave:this.courseDetailsSaved,selectedCourseDetail:null!==p&&void 0!==p?p:null!==(l=null===(c=null===(d=this.state.institutionCourse)||void 0===d?void 0:d.course)||void 0===c?void 0:c.currentDetail)&&void 0!==l?l:Zs.create(),selectedInstitutionCourseDetail:e,selectedInstitutionCourse:this.state.institutionCourse,institutionId:this.state.institutionId,readonly:f},void 0)}),void 0)}},t.prototype.renderDownloads=function(){return Object(o.jsx)(Qn.a,Jw({title:"Downloads",hidden:"downloads"!==this.state.activeTab},{children:Object(o.jsx)(ua.b,{itemLayout:"horizontal",dataSource:this.getDownloadList(),renderItem:function(e){return Object(o.jsx)(ua.b.Item,{children:Object(o.jsx)(ua.b.Item.Meta,{avatar:Object(o.jsx)(rt.a,Jw({type:"link",onClick:e.action},{children:Object(o.jsx)(pn.a,{},void 0)}),void 0),title:Object(o.jsx)(rt.a,Jw({type:"link",onClick:e.action},{children:e.title}),void 0),description:e.description},void 0)},void 0)}},void 0)}),void 0)},t.prototype.renderChangeRequest=function(){if("course_change_request"===this.state.activeTab&&this.state.courseId!=re.default.Empty())return Object(o.jsx)(Qn.a,Jw({title:"Change Request"},{children:Object(o.jsx)(Hm,{instituionId:this.state.institutionId,courseId:this.state.courseId},void 0)}),void 0)},t.prototype.renderCoursePrograms=function(){if("programs"===this.state.activeTab&&this.state.courseId!=re.default.Empty())return Object(o.jsx)(Qn.a,Jw({title:"Programs"},{children:Object(o.jsx)(kw,{courseId:this.state.courseId},void 0)}),void 0)},t.prototype.renderCourseCourseBlocks=function(){if("course_blocks"===this.state.activeTab&&this.state.courseId!=re.default.Empty())return Object(o.jsx)(Qn.a,Jw({title:"Course Blocks"},{children:Object(o.jsx)(Mw,{courseId:this.state.courseId},void 0)}),void 0)},t}(a.Component);var Zw=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected}}
1))($w)),eD={className:"InstitutionCourseBlockDataTableDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",code:"",title:"",institutionId:"00000000-0000-0000-0000-000000000000",institution:null,courseCount:0},e)},id:"id",code:"code",title:"title",institutionId:"institutionId",institution:"institution",courseCount:"courseCount"},tD=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),nD=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(){n.setState({loading:!0});var e=[];n.state.institutions&&0!=n.state.institutions.length||e.push(n.loadInstitutions()),Promise.all(e).then((function(){n.setState({loading:!1})}))},n.loadInstitutions=function(){return ce.getAll(ne.className).then((function(e){e&&n.setState({institutions:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.getColumnDefinitions=function(){var e,t=[{title:"Code",dataIndex:eD.code,width:125,sorter:!0,filterType:wr.Text},{title:"Title",dataIndex:eD.title,sorter:!0,filterType:wr.Text}];return n.props.selectedInstitution||t.push({title:"Community College",dataIndex:eD.institutionId,key:eD.institutionId,render:function(e,t){var n,r;return null!==(r=null===(n=t.institution)||void 0===n?void 0:n.name)&&void 0!==r?r:""},ellipsis:{showTitle:!0},width:275,sorter:!0,filterType:wr.DropdownMulti,dropdownFilterOptions:null===(e=n.state.institutions)||void 0===e?void 0:e.map((function(e){var t,n;return{text:null!==(t=e.name)&&void 0!==t?t:"",value:null!==(n=e.id)&&void 0!==n?n:""}}))}),t.push({title:"Course Count",dataIndex:eD.courseCount,sorter:!0,width:125}),t},n.openInstitutionCoureBlock=function(e){e.id&&T.push(x.generate(x.INSTITUITION_COURSE_BLOCK_DETAILS,{id:e.id},{}))},n.addInstitutionCourseBlok=function(){T.push(x.generate(x.NEW_INSTITUITION_COURSE_BLOCK))},n.state={institutions:[]},n}return tD(t,e),t.prototype.componentDidMount=function(){this.fetchData()},t.prototype.render=function(){var e=this;if(this.state.loading)return Object(o.jsx)(pt.a,{active:!0},void 0);var t=[];return t.push(oo.Reset()),Je.isAuthorized([gn.EDIT_INSTITUTION_COURSE_BLOCK])&&t.push(oo.Default("New Course Block",(function(){return e.addInstitutionCourseBlok()}))),Object(o.jsx)(io,{ref:function(t){return e._dataTable=t},onRowClick:this.openInstitutionCoureBlock,serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:t,columns:this.getColumnDefinitions(),fetchData:{fetch:function(t){var n,r;return Jl.getInstitutionCourseBlockTableData(t,null!==(r=null===(n=e.props.selectedInstitution)||void 0===n?void 0:n.id)&&void 0!==r?r:re.default.Empty())}},stateSaving:{enabled:!0,tableUniqueKey:"institution_course_block_list"}},void 0)},t}(a.Component),rD={className:"InstitutionCourseDataTableDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",course:null,courseId:"00000000-0000-0000-0000-000000000000",institutionId:"00000000-0000-0000-0000-000000000000",courseDetails:null,collegeCode:"",institutionName:"",collegeNumber:0,discipline:null,catalogNumber:"",title:"",institution:null,institutionCourseDetails:[],creditsMin:0,creditsMax:0,variableHours:"",category:"",description:"",status:null,institutionCourseId:"00000000-0000-0000-0000-000000000000",install:null,retire:null},e)},id:"id",course:"course",courseId:"courseId",institutionId:"institutionId",courseDetails:"courseDetails",collegeCode:"collegeCode",institutionName:"institutionName",collegeNumber:"collegeNumber",discipline:"discipline",catalogNumber:"catalogNumber",title:"title",institution:"institution",institutionCourseDetails:"institutionCourseDetails",creditsMin:"creditsMin",creditsMax:"creditsMax",variableHours:"variableHours",category:"category",description:"description",status:"status",institutionCourseId:"institutionCourseId",install:"install",retire:"retire"},iD=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),oD=function(e){function t(t){var n=e.call(this,t)||this;return n.loadTerms=function(){return ce.getAll(Rs.className).then((function(e){e&&n.setState({terms:null!==e&&void 0!==e?e:[]})}))},n.triggerRefresh=function(){var e;null===(e=n._dataTable)||void 0===e||e.refresh()},n.getColumnDefinitions=function(){var e=[{title:"Title",dataIndex:rD.title,render:function(e,t){return t.title},width:500,sorter:!0,filterType:wr.Text},{title:"Discipline",dataIndex:rD.discipline,render:function(e,t){var n;return null===(n=t.discipline)||void 0===n?void 0:n.display},sorter:!0,width:400,filterType:wr.Text},{title:"Catalog Number",dataIndex:rD.catalogNumber,render:function(e,t){return t.catalogNumber},sorter:!0,width:125,filterType:wr.Text}];return n.props.institutionId&&n.props.institutionId!=re.default.Empty()&&n.props.useSelectedInstitution||e.pushAll([{title:"Community College",dataIndex:rD.institutionId,render:function(e,t){return t.institutionName},sorter:!0,width:125,filterType:wr.DropdownMulti,dropdownFilterOptions:n.state.institutions}]),e.pushAll([{title:"Category",dataIndex:rD.category,sorter:!0,width:125,filterType:wr.DropdownMulti,dropdownFilterOptions:n.state.categories},{title:"Status",dataIndex:rD.status,render:function(e,t){var n;return null===(n=t.status)||void 0===n?void 0:n.name},width:100,filterType:wr.DropdownMulti,dropdownFilterOptions:n.state.statuses}]),e},n.openInstitutionCourse=function(e){var t;e.id&&T.push(x.generate(x.COURSE_DETAILS,{institutionCourseId:null!==(t=e.id)&&void 0!==t?t:re.default.Empty()},{}))},n.state={addCourse:!1,categories:[],statuses:[],terms:[],institutions:[]},n}return iD(t,e),t.prototype.componentDidMount=function(){var e=this;Ii.StatusTypes().then((function(t){e.setState({statuses:t})})),Ii.Institutions().then((function(t){e.setState({institutions:t})})),this.loadTerms(),Ii.Categories().then((function(t){e.setState({categories:t})})),this.setState({loading:!1})},t.prototype.render=function(){return void 0==this.state.loading||this.state.loading?Object(o.jsx)(pt.a,{},void 0):Object(o.jsx)(o.Fragment,{children:this.renderDataTable()},void 0)},t.prototype.renderDataTable=function(){var e=this,t=[];return t.push(oo.Reset()),Object(o.jsx)(io,{ref:function(t){return e._dataTable=t},onRowClick:this.openInstitutionCourse,serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:t,columns:this.getColumnDefinitions(),fetchData:{fetch:function(t){var n,r,i,o;return du.getInstitutionCourseTableData(t,e.props.useSelectedInstitution?e.props.institutionId:re.default.Empty(),null!==(r=null===(n=e.props.termYear)||void 0===n?void 0:n.termId)&&void 0!==r?r:re.default.Empty(),null!==(o=null===(i=e.props.termYear)||void 0===i?void 0:i.year)&&void 0!==o?o:0)}},stateSaving:{enabled:!0,tableUniqueKey:"institution_list"}},void 0)},t}(a.Component),aD="institutionId",sD=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),dD=function(){return dD=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},dD.apply(this,arguments)},cD=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._formItems=(new Map).set(aD,{name:aD,label:"Community College",required:!0,rules:[Ot.required()]}),n.fetchData=function(){n.setState({loading:!0});var e=[];n.state.institutions&&0!=n.state.institutions.length||e.push(n.loadInstitutions()),Promise.all(e).then((function(){n.setState({loading:!1})}
1))},n.loadInstitutions=function(){return ce.getAll(ne.className).then((function(e){e&&n.setState({institutions:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields(),n.setState({altered:!1})},n.handleSubmit=function(){var e,t=n.props.institutionId?n.props.institutionId:null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldValue(aD);window.open(x.generateFull(x.COURSE_ATTACHED_REPORT,{},{institutionId:t}),"_blank")},n.state={institutions:[]},n}return sD(t,e),t.prototype.componentDidMount=function(){this.fetchData()},t.prototype.render=function(){return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsx)(y.b,dD({size:"small",direction:"vertical"},{children:Object(o.jsxs)(ht.a,dD({ref:this._formRef,layout:"vertical",onFinish:this.handleSubmit,requiredMark:!0},{children:[this.props.institutionId?null:Object(o.jsx)(mt.a,dD({},this._formItems.get(aD),_t.getValidation(aD,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(pr.a,{disabled:this.state.loading||this.state.submitting,showArrow:!0,options:this.state.institutions.map((function(e){var t;return{value:null!==(t=e.id)&&void 0!==t?t:re.default.Empty(),label:e.name}}))},void 0)}),void 0),Object(o.jsxs)(y.b,dD({direction:"horizontal"},{children:[Object(o.jsx)(Jm,{downloading:this.state.submitting},void 0),Object(o.jsx)(Ir,{onConfirm:this.resetForm},void 0)]}),void 0)]}),void 0)}),void 0)},t}(a.Component),lD=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),uD=function(){return uD=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},uD.apply(this,arguments)},pD=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(){n.setState({loading:!0});var e=[];null==n.state.selectedTermYear&&e.push(eT.getCurrent().then((function(e){var t,r;return n.setState({selectedTermYear:{termId:null!==(t=e.termId)&&void 0!==t?t:re.default.Empty(),year:null!==(r=e.year)&&void 0!==r?r:2021}})}))),Promise.all(e).then((function(){n.setState({loading:!1})}))},n.tabChanged=function(e){n.setState({activeTab:e}),T.replace(x.generate("",{},{activeTab:e}),{activeTab:e})},n.courseSubTabChanged=function(e){n.setState({activeSubCourseTab:e}),T.replace(x.generate("",{},{activeTab:n.state.activeTab,activeSubCourseTab:e}),{activeTab:n.state.activeTab,activeSubCourseTab:e})},n.handleTermYearChange=function(e){n.setState({selectedTermYear:{termId:e.termId,year:e.year}})},n.getExcelDownloadList=function(){return[{title:"Institution Course Blocks Report",description:"File contains Course Title, Discipline, and Catalog Numbers for all Course Blocks.",action:function(){return n.CourseBlockExport()}},{title:"Common Course Numbering Report",description:"File contains a large set of data for all courses in the term/year selected at the top of the screen.",action:function(){return n.downloadCCN()}}]},n.CourseBlockExport=function(){var e,t;window.open(x.generateFull(x.INSTITUTION_COURSE_BLOCK_REPORT,{},{institutionId:null!==(t=null===(e=n.props.institution)||void 0===e?void 0:e.id)&&void 0!==t?t:re.default.Empty()}),"_blank")},n.downloadCCN=function(){var e,t,r=null===(e=n.state.selectedTermYear)||void 0===e?void 0:e.termId,i=null===(t=n.state.selectedTermYear)||void 0===t?void 0:t.year;window.open(x.generateFull(x.COMMON_COURSE_NUMBERING_REPORT,{},{termId:r,year:i}),"_blank")},n.state={courseTableData:[],loading:!1,exporting:!1,statuses:[],activeTab:"courses",activeSubCourseTab:"institution_courses",selectedTermYear:void 0},n}return lD(t,e),t.prototype.componentDidMount=function(){var e=Hr.getParameter("activeTab","courses"),t=Hr.getParameter("activeSubCourseTab","institution_courses");this.setState({activeTab:e,activeSubCourseTab:t}),this.fetchData()},t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Courses",breadcrumbs:Xn.courseList(),footer:Object(o.jsxs)(pa.a,uD({activeKey:this.state.activeTab,onChange:this.tabChanged},{children:[Object(o.jsx)(pa.a.TabPane,{tab:"Courses"},"courses"),Object(o.jsx)(pa.a.TabPane,{tab:"Course Blocks"},"course_blocks"),Object(o.jsx)(pa.a.TabPane,{tab:"Downloads"},"downloads")]}),void 0),extra:Object(o.jsx)(Od,{value:this.state.selectedTermYear,onChange:this.handleTermYearChange},void 0)},void 0),this.renderCourse(),this.renderInstitutionCourseBlockDataTable(),this.renderDownloads()]},void 0)}
1,t.prototype.renderCourse=function(){var e,t,n,r,i,a,s,d,c;if("courses"===this.state.activeTab)return this.props.institution&&(null===(e=this.props.institution)||void 0===e?void 0:e.id)!=re.default.Empty()?Object(o.jsxs)(Qn.a,{children:[Object(o.jsxs)(pa.a,uD({activeKey:this.state.activeSubCourseTab,onChange:this.courseSubTabChanged},{children:[Object(o.jsx)(pa.a.TabPane,{tab:(null!==(n=null===(t=this.props.institution)||void 0===t?void 0:t.abbreviation)&&void 0!==n?n:"Community College")+" Course"},"institution_courses"),Object(o.jsx)(pa.a.TabPane,{tab:"All Courses"},"all_courses")]}),void 0),this.renderAllCoursesDataTable(),this.renderInstitutionCourseDataTable()]},void 0):Object(o.jsx)(Qn.a,{children:Object(o.jsx)(oD,{institutionId:null!==(i=null===(r=this.props.institution)||void 0===r?void 0:r.id)&&void 0!==i?i:re.default.Empty(),termYear:{termId:null!==(s=null===(a=this.state.selectedTermYear)||void 0===a?void 0:a.termId)&&void 0!==s?s:re.default.Empty(),year:null!==(c=null===(d=this.state.selectedTermYear)||void 0===d?void 0:d.year)&&void 0!==c?c:0}},void 0)},void 0)},t.prototype.renderAllCoursesDataTable=function(){var e,t,n,r,i,a;if("all_courses"===this.state.activeSubCourseTab)return Object(o.jsx)(Qn.a,{children:Object(o.jsx)(oD,{institutionId:null!==(t=null===(e=this.props.institution)||void 0===e?void 0:e.id)&&void 0!==t?t:re.default.Empty(),termYear:{termId:null!==(r=null===(n=this.state.selectedTermYear)||void 0===n?void 0:n.termId)&&void 0!==r?r:re.default.Empty(),year:null!==(a=null===(i=this.state.selectedTermYear)||void 0===i?void 0:i.year)&&void 0!==a?a:0}},void 0)},void 0)},t.prototype.renderInstitutionCourseDataTable=function(){var e,t,n,r,i,a;if("institution_courses"===this.state.activeSubCourseTab)return Object(o.jsx)(Qn.a,{children:Object(o.jsx)(oD,{institutionId:null!==(t=null===(e=this.props.institution)||void 0===e?void 0:e.id)&&void 0!==t?t:re.default.Empty(),useSelectedInstitution:!0,termYear:{termId:null!==(r=null===(n=this.state.selectedTermYear)||void 0===n?void 0:n.termId)&&void 0!==r?r:re.default.Empty(),year:null!==(a=null===(i=this.state.selectedTermYear)||void 0===i?void 0:i.year)&&void 0!==a?a:0}},void 0)},void 0)},t.prototype.renderInstitutionCourseBlockDataTable=function(){if("course_blocks"===this.state.activeTab)return Object(o.jsx)(Qn.a,uD({title:"Course Blocks"},{children:Object(o.jsx)(nD,{selectedInstitution:this.props.institution},void 0)}),void 0)},t.prototype.renderDownloads=function(){var e,t;if("downloads"===this.state.activeTab)return Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(Qn.a,uD({title:"Courses Attached"},{children:Object(o.jsx)(cD,{institutionId:null!==(t=null===(e=this.props.institution)||void 0===e?void 0:e.id)&&void 0!==t?t:void 0},void 0)}),void 0),Object(o.jsx)(Qn.a,uD({title:"Excel Downloads"},{children:Object(o.jsx)(ua.b,{itemLayout:"horizontal",dataSource:this.getExcelDownloadList(),renderItem:function(e){return Object(o.jsx)(ua.b.Item,{children:Object(o.jsx)(ua.b.Item.Meta,{avatar:Object(o.jsx)(pn.a,{},void 0),title:Object(o.jsx)(rt.a,uD({type:"link",onClick:e.action},{children:e.title}),void 0),description:e.description},void 0)},void 0)}},void 0)}),void 0)]},void 0)},t}(a.Component);var fD=Object(u.i)(Object(l.b)((function(e){return{institution:e.Institution.Selected}}))(pD)),hD="cipNumberId",vD="firstName",mD="lastName",gD="email",bD={className:"ConsultantDTO",create:function(e){return Object.assign(Q.create(),{id:null,firstName:"",lastName:"",fullName:"",email:"",cipNumbers:[]},e)},id:"id",firstName:"firstName",lastName:"lastName",fullName:"fullName",email:"email",cipNumbers:"cipNumbers"},yD=function(e){return Object.assign({searchString:""},e)};var OD=function(e){var t=a.useState([]),n=t[0],r=t[1],i=a.useState([]),s=i[0],d=i[1],c=a.useState(e.value),l=c[0],u=c[1],p=a.useState(!1),f=p[0],h=p[1],v=a.createRef();return null!=e.value&&void 0!=e.value&&null==l&&(h(!0),Dp.getCipDetails(e.value).then((function(t){var i,o,a,s,d,c=n;0===c.filter((function(t){return t.value==e.value})).length&&c.push({value:null===(i=t.cip)||void 0===i?void 0:i.id,display:null===(a=null===(o=t.cip)||void 0===o?void 0:o.currentDetail)||void 0===a?void 0:a.friendlyDisplay}),u(null!==(d=null===(s=t.cip)||void 0===s?void 0:s.currentDetail)&&void 0!==d?d:null),r(c),h(!1)}))),Object(o.jsx)(Wa,{ref:v,disabled:e.disabled,value:l,options:n,onSearch:function(e){if(e.length>2){var t=yD({searchString:e});h(!0),Dp.searchForCip(t).then((function(e){var t,n,i=null===(t=e.cips)||void 0===t?void 0:t.map((function(e){return{value:e.cipNumberId,display:e.friendlyDisplay}}));d(null!==(n=e.cips)&&void 0!==n?n:[]),r(i),h(!1)}))}},onChange:function(t){var n;if(re.default.IsGuid(t)){var r=null!==(n=s.find((function(e){return e.cipNumberId==t})))&&void 0!==n?n:null;u(r),e.onChange&&e.onChange(t)}
1else null!=t&&void 0!=t||e.onChange&&e.onChange(null)},allowClear:!0,onClear:function(){var e;null===(e=v.current)||void 0===e||e.clear(),u(null)},searching:f},void 0)},jD=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ID=function(){return ID=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ID.apply(this,arguments)},SD=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n.getFormItems=function(){return(new Map).set(vD,{name:vD,label:"First Name"}).set(mD,{name:mD,label:"Last Name"}).set(gD,{name:gD,label:"Email"}).set(hD,{name:hD,label:"CIP Number"})},n.getColumnDefinitions=function(){return[{title:"First Name",dataIndex:bD.firstName,sorter:!0,filterType:wr.NONE},{title:"Last Name",dataIndex:bD.lastName,sorter:!0,filterType:wr.NONE},{title:"Email",dataIndex:bD.email,sorter:!0,filterType:wr.NONE}]},n.loadCipNumberDetails=function(){return Dp.getActiveCipDetails().then((function(e){var t;e&&n.setState({cipNumberDetails:null!==(t=e.cipNumberDetails)&&void 0!==t?t:[]})})).catch((function(){n.setState({error:!0})}))},n.handleReset=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields(),n.handleChange()},n.handleChange=function(){var e,t,r,i;n.setState({searchValues:{cipNumberId:null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldValue(hD),firstName:null===(t=n._formRef.current)||void 0===t?void 0:t.getFieldValue(vD),lastName:null===(r=n._formRef.current)||void 0===r?void 0:r.getFieldValue(mD),email:null===(i=n._formRef.current)||void 0===i?void 0:i.getFieldValue(gD)}},(function(){var e;return null===(e=n._dataTable)||void 0===e?void 0:e.refresh()}))},n.handleExport=function(){var e,t,r,i,o={cipNumberId:null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldValue(hD),firstName:null===(t=n._formRef.current)||void 0===t?void 0:t.getFieldValue(vD),lastName:null===(r=n._formRef.current)||void 0===r?void 0:r.getFieldValue(mD),email:null===(i=n._formRef.current)||void 0===i?void 0:i.getFieldValue(gD)};window.open(x.generateFull(x.USER_CIP_NUMBER_ASSIGNMENT,{},{cipNumberId:o.cipNumberId,firstName:o.firstName,lastName:o.lastName,email:o.email}),"_blank")},n.openModal=function(e){void 0!=e?n.setState({showModal:!0,selectedConsultant:e}):n.setState({showModal:!1,selectedConsultant:void 0})},n.cancelModal=function(){n.setState({showModal:!1})},n.handleCipNumberOnClick=function(){n.setState({isCipNumberSelectOpen:!n.state.isCipNumberSelectOpen})},n.handleCipNumberOnBlur=function(){n.setState({isCipNumberSelectOpen:!1})},n.state={consultants:[],cipNumberDetails:[],showModal:!1,searchValues:{cipNumberId:re.default.Empty(),firstName:"",lastName:"",email:""},isCipNumberSelectOpen:!1},n}return jD(t,e),t.prototype.componentDidMount=function(){var e=this;this.setState({loading:!0});var t=[];this.state.cipNumberDetails&&0!=this.state.cipNumberDetails.length||t.push(this.loadCipNumberDetails()),Promise.all(t).then((function(){e.setState({loading:!1})}))},t.prototype.render=function(){var e=this;if(this.state.loading)return Object(o.jsx)(pt.a,{active:!0},void 0);var t=this.getFormItems(),n=[];return n.push(oo.Default("Export",this.handleExport)),Object(o.jsxs)(y.b,ID({direction:"vertical"},{children:[this.renderConsultantInfoModal(),Object(o.jsx)(ot.a.Paragraph,ID({italic:!0},{children:"Search for a consultant using the fields below to populate the table below."}),void 0),Object(o.jsx)(ht.a,ID({ref:this._formRef,layout:"vertical",onChange:this.handleChange,onFinish:this.handleChange},{children:Object(o.jsxs)(y.b,ID({direction:"vertical",size:"small"},{children:[Object(o.jsxs)(b.a,ID({gutter:[16,16]},{children:[Object(o.jsx)(m.a,ID({},En.HALF,{children:Object(o.jsx)(ht.a.Item,ID({},t.get(vD),{children:Object(o.jsx)(ut.a,{allowClear:!0,onChange:this.handleChange},void 0)}),void 0)}),void 0),Object(o.jsx)(m.a,ID({},En.HALF,{children:Object(o.jsx)(ht.a.Item,ID({},t.get(mD),{children:Object(o.jsx)(ut.a,{allowClear:!0,onChange:this.handleChange},void 0)}),void 0)}),void 0)]}),void 0),Object(o.jsxs)(b.a,ID({gutter:[16,16]},{children:[Object(o.jsx)(m.a,ID({},En.HALF,{children:Object(o.jsx)(ht.a.Item,ID({},t.get(gD),{children:Object(o.jsx)(ut.a,{allowClear:!0,onChange:this.handleChange},void 0)}),void 0)}),void 0),Object(o.jsx)(m.a,ID({},En.HALF,{children:Object(o.jsx)(ht.a.Item,ID({},t.get(hD),{children:Object(o.jsx)(OD,{onChange:this.handleChange},void 0)}),void 0)}),void 0)]}),void 0),Object(o.jsxs)(y.b,ID({direction:"horizontal",wrap:!0},{children:[Object(o.jsx)(dd,{onClick:this.handleChange},void 0),Object(o.jsx)(Ir,{onConfirm:this.handleReset},void 0)]}),void 0)]}),void 0)}),void 0),Object(o.jsx)(io,{ref:function(t){return e._dataTable=t},buttonBar:n,onRowClick:this.openModal,serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!1,columns:this.getColumnDefinitions(),fetchData:{fetch:function(t){return Ua.searchForConsultants(t,e.state.searchValues.cipNumberId,e.state.searchValues.firstName,e.state.searchValues.lastName,e.state.searchValues.email)}},stateSaving:{enabled:!0,tableUniqueKey:"consultants_list"}},void 0)]}),void 0)},t.prototype.renderCIPOptions=function(){var e=this;return this.state.cipNumberDetails.map((function(t){return e.renderCIPOption(t)}))},t.prototype.renderCIPOption=function(e){var t,n;if(e.id)return Object(o.jsx)(pr.a.Option,ID({value:null!==(t=e.cipNumberId)&&void 0!==t?t:re.default.Empty()},{children:e.friendlyDisplay}),null!==(n=e.cipNumberId)&&void 0!==n?n:re.default.Empty())},t.prototype.renderConsultantInfoModal=function(){var e,t,n,r,i;return Object(o.jsx)(f.a,ID({visible:this.state.showModal,width:1e3,t
1itle:null===(e=this.state.selectedConsultant)||void 0===e?void 0:e.fullName,okButtonProps:{hidden:!0},footer:null,onCancel:this.cancelModal},{children:Object(o.jsx)(y.b,ID({direction:"vertical"},{children:Object(o.jsxs)(Kn.b,ID({bordered:!0,layout:"vertical",size:"small",column:2},{children:[Object(o.jsx)(Kn.b.Item,ID({label:"Name"},{children:null===(t=this.state.selectedConsultant)||void 0===t?void 0:t.fullName}),void 0),Object(o.jsx)(Kn.b.Item,ID({label:"Email"},{children:null===(n=this.state.selectedConsultant)||void 0===n?void 0:n.email}),void 0),Object(o.jsx)(Kn.b.Item,ID({label:"Assigned CIP Numbers",span:2},{children:Object(o.jsxs)(Pi.a,ID({dataSource:null!==(i=null===(r=this.state.selectedConsultant)||void 0===r?void 0:r.cipNumbers)&&void 0!==i?i:[],pagination:!1,scroll:{x:500,y:500},rowKey:Tj.id},{children:[Object(o.jsx)(Pi.a.Column,{title:"CIP Number",width:100,dataIndex:Tj.display},void 0),Object(o.jsx)(Pi.a.Column,{title:"Title",dataIndex:Tj.title},void 0)]}),void 0)}),void 0)]}),void 0)}),void 0)}),void 0)},t}(a.Component),ED=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),RD=function(e){function t(t){var n=e.call(this,t)||this;return n.goToPublicLandingPage=function(){T.push(x.generate(x.POST_SECONDARY_HOME))},n.state={loading:!1,exporting:!1,statuses:[]},n}return ED(t,e),t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Consultants",onBack:this.goToPublicLandingPage,breadcrumbs:Xn.publicConsultantSearch()},void 0),Object(o.jsx)(Qn.a,{children:Object(o.jsx)(SD,{},void 0)},void 0)]},void 0)},t}(a.Component),_D=Object(u.i)(RD),TD=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),CD=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return TD(t,e),t.prototype.getResourceLinkTableData=function(e){var t="api/resources/getResourceLinkTableData";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getResourceFileTableData=function(e){var t="api/resources/getResourceFileTableData";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.saveResourceLink=function(e){var t="api/resources/saveResourceLink";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.saveResourceFile=function(e){var t="api/resources/saveResourceFile";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!1,!1)},t.prototype.searchForResourceCategory=function(e){var t="api/resources/searchForResourceCategory",n=t.indexOf("?")>0?"&":"?";return null!=e&&(t+=n+"searchText="+encodeURIComponent(e),n="&"),t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.removeResourceLink=function(e){var t="api/resources/removeResourceLink";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.removeResourceFile=function(e){var t="api/resources/removeResourceFile";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getResources=function(e){var t="api/resources/getResources";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t}(U),xD=new CD,AD=function(e){return Object.assign({resourceFileId:"00000000-0000-0000-0000-000000000000"},e)},PD={className:"ResourceFileDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",title:"",azureBlobFileId:null,azureBlobFile:null,resourceCategory:null,categoryTitle:"",description:""},e)}
1,id:"id",title:"title",azureBlobFileId:"azureBlobFileId",azureBlobFile:"azureBlobFile",resourceCategory:"resourceCategory",categoryTitle:"categoryTitle",description:"description"},ND="additionalFiles",wD="title",DD="category",qD="description",FD=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),MD=function(){return MD=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},MD.apply(this,arguments)},YD=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._formItems=(new Map).set(wD,{required:!0,name:wD,label:"Title",rules:[Ot.required()]}).set(PD.azureBlobFile,{required:!0,name:PD.azureBlobFile,label:"File"}).set(DD,{name:DD,label:"Category"}).set(qD,{name:qD,label:"Description"}),n.submit=function(){n.handleSubmit()},n.reset=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields()},n.handleChange=function(){n.setState({altered:!0})},n.searchForResourceCategory=function(e){xD.searchForResourceCategory(e).then((function(e){e.categories&&n.setState({categories:e.categories})})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))},n.handleSearch=function(e){e.length>=2?n.searchForResourceCategory(e):n.setState({categories:[]})},n.handleSubmit=function(){var e,t;if(n.setState({submitting:!0}),!br.canSubmit(n._formRef,n._formItems))return S.b.error("Please fill out all required fields."),void n.setState({loading:!1,submitting:!1});var r=n._formRef?n._formRef.current.getFieldsValue():null;r.resourceFileId=n.props.resourceFile.id,r.removedFiles=null===(e=r.azureBlobFile)||void 0===e?void 0:e.removedFiles;var i=Za.attachFilesToModel("saveResourceFileDetail",r,ND,null===(t=r.azureBlobFile)||void 0===t?void 0:t.newFiles);xD.saveResourceFile(i).then((function(e){(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.props.onSuccess&&(ce.invalidateCache(fi.className),n.props.onSuccess(),n.reset())):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Resource could not be saved. "+n.state.message))})).catch((function(e){n.setState({error:e}),S.b.error("Resource could not be saved.")})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.state={categories:[],additionalResources:{},resourceFile:PD.create()},n}return FD(t,e),t.prototype.componentDidMount=function(){var e=this;this.setState({resourceFile:this.props.resourceFile},(function(){return e.reset()}))},t.prototype.componentDidUpdate=function(e){var t=this;this.props.resourceFile&&this.props.resourceFile!=e.resourceFile&&this.setState({resourceFile:this.props.resourceFile},(function(){return t.reset()}))},t.prototype.render=function(){var e,t;if(this.state.loading)return Object(o.jsx)(pt.a,{active:!0},void 0);var n=this.state.categories.map((function(e){return{value:e,key:e}})),r=[];return r.push({uid:this.state.resourceFile.azureBlobFileId,url:x.generateDownload(null!==(e=this.state.resourceFile.azureBlobFileId)&&void 0!==e?e:re.default.Empty()),name:null===(t=this.state.resourceFile.azureBlobFile)||void 0===t?void 0:t.fileName}),Object(o.jsx)(y.b,MD({size:"small",direction:"vertical"},{children:Object(o.jsxs)(ht.a,MD({ref:this._formRef,initialValues:this.state.resourceFile,layout:"vertical",onValuesChange:this.handleChange,requiredMark:!0},{children:[Object(o.jsx)(mt.a,MD({},this._formItems.get(wD),_t.getValidation(wD,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,MD({},this._formItems.get(PD.azureBlobFile),_t.getValidation(PD.azureBlobFile,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(hs,{existingList:r,maxCount:1},void 0)}),void 0),Object(o.jsx)(mt.a,MD({},this._formItems.get(DD),{initialValue:this.state.resourceFile.categoryTitle},_t.getValidation(DD,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(Ga.a,MD({options:n,onSearch:this.handleSearch},{children:Object(o.jsx)(ut.a,{placeholder:"Category"},void 0)}),void 0)}),void 0),Object(o.jsx)(mt.a,MD({},this._formItems.get(qD),_t.getValidation(qD,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a.TextArea,{maxLength:5e3,showCount:!0,autoSize:{minRows:5}},void 0)}),void 0)]}),void 0)}),void 0)},t.prototype.renderErrors=function(){if(this.state.error)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t}(a.Component),UD=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),LD=function(){return LD=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},LD.apply(this,arguments)},kD=function(e){function t(t){var n=e.call(this,t)||this;return n._addResourceFileFormRef=a.createRef(),n.fetchData=function(){Ii.ResourceCategories().then((function(e){return n.setState({resourceCategories:e})}))},n.triggerRefresh=function(){var e;null===(e=n._dataTable)||void 0===e||e.refresh()},n.getColumnDefinitions=function(){return[{title:"Title",dataIndex:PD.title,sorter:!0,filterType:wr.Text},{title:"File",dataIndex:PD.azureBlobFileId,sorter:!0,render:function(e,t){var n,r,i;return Object(o.jsx)(YR,{azureBlobFileId:null!==(n=t.azureBlobFileId)&&void 0!==n?n:re.default.Empty(),text:null!==(i=null===(r=null===t||void 0===t?void 0:t.azureBlobFile)||void 0===r?void 0:r.fileName)&&void 0!==i?i:"Unknown"},t.azureBlobFileId)},filterType:wr.Text},{title:"Category",dataIndex:PD.categoryTitle,sorter:!0,filterType:wr.DropdownMulti,dropdownFilterOptions:n.state.resourceCategories},{title:"",dataIndex:PD.id,width:"25px",render:function(e,t){return Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(rt.a,LD({type:"link",className:"ant-btn",onClick:function(){return n.addResource(t)}},{children:Object(o.jsx)(Ei.a,{},void 0)}),void 0),Object(o.jsx)(rt.a,LD({type:"link",className:"ant-btn",onClick:function(){var e;return n.promptConfirmRemove(null!==(e=t.id)&&void 0!==e?e:re.default.Empty())}},{children:Object(o.jsx)(Yd.a,{},void 0)}),void 0)]},void 0)},sorter:!1,filterType:wr.NONE}]},n.handleRemoveResource=function(e){n.setState({submitting:!0});var t=AD({resourceFileId:null!==e&&void 0!==e?e:re.default.Empty()});xD.removeResourceFile(t).then((function(e){n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,altered:!(null===e||void 0===e?void 0:e.succeeded)}),!0===(null===e||void 0===e?void 0:e.succeeded)?S.b.success("Resource was removed."):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(e){n.setState({error:e}),S.b.error("Resource could not be removed.")})).finally((function(){n.setState({loading:!1}),n.triggerRefresh()}))},n.promptConfirmRemove=function(e){f.a.confirm({title:"Are you sure you want to remove this resource?",okText:"Remove Resource",onOk:function(){return n.handleRemoveResource(e)}})},n.addResource=function(e){n.setState({resourceFile:e},(function(){return n.openModal()}))},n.openModal=function(){n.setState({showModal:!0})},n.submitResourceChange=function(){var e;null===(e=n._addResourceFileFormRef.current)||void 0===e||e.submit()},n.cancelResourceChange=function(){n.setState({showModal:!1,resourceFile:PD.create()},(function(){var e;return null===(e=n._addResourceFileFormRef.current)||void 0===e?void 0:e.reset()}))},n.resourceAdded=function(){var e;n.setState({showModal:!1}),null===(e=n._dataTable)||void 0===e||e.refresh()},n.state={showModal:!1,resourceFile:PD.create(),resourceCategories:[]},n}return UD(t,e),t.prototype.componentDidMount=function(){this.fetchData()},t.prototype.render=function(){return Object(o.jsxs)(o.Fragment,{children:[this.renderAddResourceModal(),this.renderDataTable()]},void 0)},t.prototype.renderAddResourceModal=function(){return Object(o.jsx)(f.a,LD({visible:this.state.showModal,title:"Resource File",okText:"Save",onOk:this.submitResourceChange,onCancel:this.cancelResourceChange},{children:Object(o.jsx)(YD,{ref:this._addResourceFileFormRef,onSuccess:this.resourceAdded,resourceFile:this.state.resourceFile},void 0)}),void 0)},t.prototype.renderDataTable=function(){var e=this,t=[];return t.push(oo.Reset()),t.push(oo.Default("Add Resource",(function(){return e.addResource(PD.create())}))),Object(o.jsx)(io,{ref:function(t){return e._dataTable=t},serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:t,columns:this.getColumnDefinitions(),fetchData:{fetch:function(e){return xD.getResourceFileTableData(e)}},stateSaving:{enabled:!0,tableUniqueKey:"resource_link_list"}},void 0)},t}(a.Component),GD=function(e){return Object.assign({resourceLinkId:"00000000-0000-0000-0000-000000000000"},e)},VD={className:"ResourceLinkDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",title:"",url:"",resourceCategory:null,categoryTitle:"",description:""},e)}
1,id:"id",title:"title",url:"url",resourceCategory:"resourceCategory",categoryTitle:"categoryTitle",description:"description"},BD=function(e){return Object.assign({resourceLinkId:"00000000-0000-0000-0000-000000000000",url:"",title:"",category:"",description:""},e)},WD="url",zD="title",HD="category",QD="description",KD=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),XD=function(){return XD=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},XD.apply(this,arguments)},JD=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._formItems=(new Map).set(zD,{required:!0,name:zD,label:"Title",rules:[Ot.required()]}).set(WD,{required:!0,name:WD,label:"URL (Must include http:// or https://)",rules:[Ot.required(),Ot.https()]}).set(HD,{name:HD,label:"Category"}).set(QD,{name:QD,label:"Description"}),n.submit=function(){n.handleSubmit()},n.reset=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields()},n.handleChange=function(){n.setState({altered:!0})},n.searchForResourceCategory=function(e){xD.searchForResourceCategory(e).then((function(e){e.categories&&n.setState({categories:e.categories})})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))},n.handleSearch=function(e){e.length>=2?n.searchForResourceCategory(e):n.setState({categories:[]})},n.handleSubmit=function(){var e,t,r,i;if(n.setState({submitting:!0}),!br.canSubmit(n._formRef,n._formItems))return S.b.error("Please fill out all required fields."),void n.setState({loading:!1,submitting:!1});var o=BD({resourceLinkId:n.props.resourceLink.id,url:null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldValue(WD),title:null===(t=n._formRef.current)||void 0===t?void 0:t.getFieldValue(zD),c
1ategory:null===(r=n._formRef.current)||void 0===r?void 0:r.getFieldValue(HD),description:null===(i=n._formRef.current)||void 0===i?void 0:i.getFieldValue(QD)});xD.saveResourceLink(o).then((function(e){(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.props.onSuccess&&(ce.invalidateCache(fi.className),n.props.onSuccess(),n.reset())):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Resource could not be saved. "+n.state.message))})).catch((function(e){n.setState({error:e}),S.b.error("Resource could not be saved.")})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.state={categories:[],resourceLink:VD.create()},n}return KD(t,e),t.prototype.componentDidMount=function(){var e=this;this.setState({resourceLink:this.props.resourceLink},(function(){return e.reset()}))},t.prototype.componentDidUpdate=function(e){var t=this;this.props.resourceLink&&this.props.resourceLink!=e.resourceLink&&this.setState({resourceLink:this.props.resourceLink},(function(){return t.reset()}))},t.prototype.render=function(){if(this.state.loading)return Object(o.jsx)(pt.a,{active:!0},void 0);var e=this.state.categories.map((function(e){return{value:e,key:e}}));return Object(o.jsx)(y.b,XD({size:"small",direction:"vertical"},{children:Object(o.jsxs)(ht.a,XD({ref:this._formRef,initialValues:this.state.resourceLink,layout:"vertical",onValuesChange:this.handleChange,requiredMark:!0},{children:[Object(o.jsx)(mt.a,XD({},this._formItems.get(zD),_t.getValidation(zD,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,XD({},this._formItems.get(WD),_t.getValidation(WD,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,XD({},this._formItems.get(HD),{initialValue:this.state.resourceLink.categoryTitle},_t.getValidation(HD,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(Ga.a,XD({options:e,onSearch:this.handleSearch},{children:Object(o.jsx)(ut.a,{placeholder:"Category"},void 0)}),void 0)}),void 0),Object(o.jsx)(mt.a,XD({},this._formItems.get(QD),_t.getValidation(QD,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a.TextArea,{maxLength:5e3,showCount:!0,autoSize:{minRows:5}},void 0)}),void 0)]}),void 0)}),void 0)},t.prototype.renderErrors=function(){if(this.state.error)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t}(a.Component),$D=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ZD=function(){return ZD=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ZD.apply(this,arguments)},eq=function(e){function t(t){var n=e.call(this,t)||this;return n._addResourceLinkFormRef=a.createRef(),n.fetchData=function(){Ii.ResourceCategories().then((function(e){return n.setState({resourceCategories:e})}))},n.triggerRefresh=function(){var e;null===(e=n._dataTable)||void 0===e||e.refresh()},n.getColumnDefinitions=function(){return[{title:"Title",dataIndex:VD.title,sorter:!0,filterType:wr.Text},{title:"URL",dataIndex:VD.url,sorter:!0,filterType:wr.Text,render:function(e,t){var n,r;return Object(o.jsxs)(at.a,ZD({to:{pathname:null!==(n=t.url)&&void 0!==n?n:""},target:"_blank",rel:"noopener noreferrer"},{children:[null!==(r=t.url)&&void 0!==r?r:""," ",Object(o.jsx)(yI,{},void 0)]}),void 0)}},{title:"Category",dataIndex:VD.categoryTitle,sorter:!0,filterType:wr.DropdownMulti,dropdownFilterOptions:n.state.resourceCategories},{title:"",dataIndex:VD.id,width:"25px",render:function(e,t){return Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(rt.a,ZD({type:"link",className:"ant-btn",onClick:function(){return n.addResource(t)}},{children:Object(o.jsx)(Ei.a,{},void 0)}),void 0),Object(o.jsx)(rt.a,ZD({type:"link",className:"ant-btn",onClick:function(){var e;return n.promptConfirmRemove(null!==(e=t.id)&&void 0!==e?e:re.default.Empty())}},{children:Object(o.jsx)(Yd.a,{},void 0)}),void 0)]},void 0)},sorter:!1,filterType:wr.NONE}]},n.handleRemoveResource=function(e){n.setState({submitting:!0});var t=GD({resourceLinkId:null!==e&&void 0!==e?e:re.default.Empty()});xD.removeResourceLink(t).then((function(e){n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,altered:!(null===e||void 0===e?void 0:e.succeeded)}),!0===(null===e||void 0===e?void 0:e.succeeded)?S.b.success("Resource was removed."):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(e){n.setState({error:e}),S.b.error("Resource could not be removed.")})).finally((function(){n.setState({loading:!1}),n.triggerRefresh()}))},n.promptConfirmRemove=function(e){f.a.confirm({title:"Are you sure you want to remove this resource?",okText:"Remove Resource",onOk:function(){return n.handleRemoveResource(e)}})},n.addResource=function(e){n.setState({resourceLink:e},(function(){return n.openModal()}))},n.openModal=function(){n.setState({showModal:!0})},n.submitResourceChange=function(){var e;null===(e=n._addResourceLinkFormRef.current)||void 0===e||e.submit()},n.cancelResourceChange=function(){var e;n.setState({showModal:!1}),null===(e=n._addResourceLinkFormRef.current)||void 0===e||e.reset()},n.resourcesUpdated=function(){var e;n.setState({showModal:!1}),null===(e=n._dataTable)||void 0===e||e.refresh()},n.state={showModal:!1,resourceLink:VD.create(),resourceCategories:[]},n}return $D(t,e),t.prototype.componentDidMount=function(){this.fetchData()},t.prototype.render=function(){return Object(o.jsxs)("div",{children:[this.renderAddResourceModal(),this.renderDataTable()]},void 0)},t.prototype.renderAddResourceModal=function(){return Object(o.jsx)(f.a,ZD({visible:this.state.showModal,title:"Resource Link",okText:"Save",onOk:this.submitResourceChange,onCancel:this.cancelResourceChange},{children:Object(o.jsx)(JD,{ref:this._addResourceLinkFormRef,onSuccess:this.resourcesUpdated,resourceLink:this.state.resourceLink},void 0)}),void 0)},t.prototype.renderDataTable=function(){var e=this,t=[];return t.push(oo.Reset()),t.push(oo.Default("Add Resource",(function(){return e.addResource(VD.create())}))),Object(o.jsx)(io,{ref:function(t){return e._dataTable=t},serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:t,columns:this.getColumnDefinitions(),fetchData:{fetch:function(e){return xD.getResourceLinkTableData(e)}},stateSaving:{enabled:!0,tableUniqueKey:"resource_link_list"}},void 0)},t}(a.Component),tq=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),nq=function(){return nq=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},nq.apply(this,arguments)},rq=function(e){function t(t){var n=e.call(this,t)||this;return n.goHome=function(){T.push(x.generate(x.POST_SECONDARY_HOME))},n.tabChanged=function(e){n.setState({activeTab:e})},n.state={activeTab:"links"},n}return tq(t,e),t.prototype.render=function(){return Object(o.jsxs)(y.b,nq({direction:"vertical"},{children:[Object(o.jsx)(rr,{title:"Resources",onBack:this.goHome,breadcrumbs:Xn.adminResources(),footer:Object(o.jsxs)(pa.a,nq({onChange:this.tabChanged},{children:[Object(o.jsx)(pa.a.TabPane,{tab:"Links"},"links"),Object(o.jsx)(pa.a.TabPane,{tab:"Files"},"files")]}),void 0)},void 0),this.renderLinks(),this.renderFiles()]}),void 0)},t.prototype.renderLinks=function(){if("links"===this.state.activeTab)return Object(o.jsx)(Qn.a,nq({title:"Links"},{children:Object(o.jsx)(eq,{},void 0)}),void 0)},t.prototype.renderFiles=function(){if("files"===this.state.activeTab)return Object(o.jsx)(Qn.a,nq({title:"Files"},{children:Object(o.jsx)(kD,{},void 0)}),void 0)},t}(a.Component),iq=Object(u.i)(rq),oq=function(){return oq=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},oq.apply(this,arguments)};var aq=function(e){var t,n,r,i;if(null!=e.resources){for(var a=new Map,s=0;s<e.resources.length;s++){var d=e.resources[s],c=(null===(t=d.resourceCategory)||void 0===t?void 0:t.name)&&""!=(null===(n=d.resourceCategory)||void 0===n?void 0:n.name)&&null!==(i=null===(r=d.resourceCategory)||void 0===r?void 0:r.name)&&void 0!==i?i:"Other",l=a.get(c);
1null!=l&&void 0!=l||(l=[]),l.push({title:d.title,description:d.description,azureBlobFileId:d.azureBlobFileId,url:d.url}),a.set(c,l)}return Object(o.jsx)(o.Fragment,{children:Array.from(a.keys()).map((function(e){return Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(ot.a.Title,oq({level:5},{children:e}),void 0),Object(o.jsx)(ua.b,{itemLayout:"horizontal",dataSource:a.get(e),renderItem:function(e){var t,n;return Object(o.jsx)(ua.b.Item,{children:Object(o.jsx)(ua.b.Item.Meta,{avatar:e.azureBlobFileId?Object(o.jsx)(pn.a,{},void 0):Object(o.jsx)(yI,{},void 0),title:Object(o.jsx)(at.a,oq({target:"_blank",rel:"noopener noreferrer",to:{pathname:e.azureBlobFileId?x.generateDownload(null!==(t=e.azureBlobFileId)&&void 0!==t?t:re.default.Empty()):null!==(n=e.url)&&void 0!==n?n:""}},{children:e.title}),void 0),description:e.description},void 0)},void 0)}},void 0)]},void 0)}))},void 0)}return Object(o.jsx)(pt.a,{active:!0},void 0)},sq=function(e){return Object.assign({},e)},dq=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),cq=function(e){function t(t){var n=e.call(this,t)||this;return n.fetchData=function(){return xD.getResources(sq()).then((function(e){var t;e.resources&&n.setState({resources:null!==(t=e.resources)&&void 0!==t?t:[]})}))},n.goHome=function(){T.push(x.generate(x.HOME))},n.state={resources:[]},n}return dq(t,e),t.prototype.componentDidMount=function(){this.fetchData()},t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Resources",onBack:this.goHome,breadcrumbs:Xn.publicResources()},void 0),Object(o.jsx)(Qn.a,{children:Object(o.jsx)(aq,{resources:this.state.resources},void 0)},void 0)]},void 0)},t}(a.Component),lq=Object(u.i)(cq),uq=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),pq=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return uq(t,e),t.prototype.getWorkQueue=function(e){var t="api/workItems/workQueue";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getWorkItemsForUser=function(e,t){var n="api/workItems/user/"+encodeURIComponent(e);return n=n.replace(/null|undefined/gi,""),this.SendRequest(t,"post",n,!0,!1)},t.prototype.getWorkItemsForInstitution=function(e,t){var n="api/workItems/institution/"+encodeURIComponent(e);return n=n.replace(/null|undefined/gi,""),this.SendRequest(t,"post",n,!0,!1)},t.prototype.getWorkItems=function(e){var t="api/workItems/all";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t}(U),fq=new pq,hq={className:"WorkQueueItemDTO",create:function(e){return Object.assign(Q.create(),{workItemId:"00000000-0000-0000-0000-000000000000",userId:"00000000-0000-0000-0000-000000000000",user:null,institutionId:null,institution:null,workItemTypeId:0,workItemType:null,workItemStatusTypeId:0,workItemStatusType:null,key:"",description:"",createdOn:new Date(0).toISOString(),activeOn:new Date(0).toISOString(),expiresOn:null,completedOn:null},e)},workItemId:"workItemId",userId:"userId",user:"user",institutionId:"institutionId",institution:"institution",workItemTypeId:"workItemTypeId",workItemType:"workItemType",workItemStatusTypeId:"workItemStatusTypeId",workItemStatusType:"workItemStatusType",key:"key",description:"description",createdOn:"createdOn",activeOn:"activeOn",expiresOn:"expiresOn",completedOn:"completedOn"},vq=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),mq=function(e){function t(t){var n=e.call(this,t)||this;return n.getColumnDefinitions=function(){return[{title:"Type",dataIndex:hq.workItemTypeId,sorter:!1,filterType:wr.NONE,render:function(e,t){var n;return null===(n=t.workItemType)||void 0===n?void 0:n.name},width:"200px"}
1,{title:"Details",dataIndex:hq.key,sorter:!1,filterType:wr.NONE,render:function(e,t){return t.description}},{title:"Created",dataIndex:hq.createdOn,filterType:wr.NONE,render:function(e,t){return $r.shortDate(t.createdOn)}},{title:"Status",dataIndex:hq.workItemStatusTypeId,filterType:wr.NONE,render:function(e,t){var n;return e===ri.ACTIVE&&$r.isBeforeRange(t.activeOn)?"Upcoming":null===(n=t.workItemStatusType)||void 0===n?void 0:n.name}}]},n.openWorkQueue=function(e){if(e.key){var t=e.key.split("_")[1];switch(e.workItemTypeId){case ii.CHANGEREQUESTDRAFT:T.push(x.generate(x.CHANGE_REQUEST_DRAFT,{key:t},{}));break;case ii.REVIEWCHANGEREQUEST:T.push(x.generate(x.CHANGE_REQUEST_APPROVAL,{approvalId:null!==t&&void 0!==t?t:re.default.Empty()},{}));break;case ii.APPROVALREDIRECT:T.push(x.generate(x.CHANGE_REQUEST_APPROVAL_REDIRECT,{approvalId:t},{}));break;case ii.RESPONSETOSELFSTUDY:case ii.REVISESELFSTUDY:case ii.SUBMITSELFSTUDY:T.push(x.generate(x.SELF_STUDIES_DISPLAY,{id:e.key.split("_")[2]},{}));break;case ii.ASSIGNDECONSULTANT:case ii.ASSIGNDISTRICTUSER:case ii.ASSIGNRPPCONSULTANT:T.push(x.generate(x.SELF_STUDIES_DISPLAY,{id:t},{}))}}},n}return vq(t,e),t.prototype.render=function(){var e=this;return Object(o.jsx)(io,{ref:function(t){return e._dataTable=t},onRowClick:this.openWorkQueue,serverSide:!0,tableProps:{rowKey:"id",locale:{emptyText:Object(o.jsx)(po.a,{image:po.a.PRESENTED_IMAGE_SIMPLE,description:"You are all caught up!"},void 0)},scroll:{x:400}},globalSearch:!1,columns:this.getColumnDefinitions(),fetchData:{fetch:function(e){return fq.getWorkQueue(e)}},stateSaving:{enabled:!0,tableUniqueKey:"work_queue_list"}},void 0)},t}(a.Component),gq=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),bq=function(){return bq=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},bq.apply(this,arguments)},yq=function(e){function t(t){var n=e.call(this,t)||this;return n.goToPastAnnouncements=function(){T.push(x.generate(x.PAST_ANNOUNCEMENTS))},n.goToWorkItems=function(){T.push(x.generate(x.WORK_ITEMS))},n}return gq(t,e),t.prototype.render=function(){var e="Good "+$r.getTimeOfDayDisplay();return this.props.userInfo&&(e+=", "+this.props.userInfo.firstName),e+="!",Object(o.jsxs)(p.a,{children:[Object(o.jsx)(rr,{title:e,pageTitle:"Home",breadcrumbs:Xn.dashboard()},void 0),Object(o.jsxs)(b.a,bq({gutter:[16,16]},{children:[Object(o.jsx)(m.a,bq({},En.HALF,{children:Object(o.jsx)(Qn.a,bq({title:"Work Queue"},{children:Object(o.jsxs)(y.b,bq({direction:"vertical"},{children:[Object(o.jsx)(mq,{active:!0},void 0),Object(o.jsx)(rt.a,bq({className:"align-center",shape:"round",icon:Object(o.jsx)(is.a,{},void 0),size:"small",onClick:this.goToWorkItems},{children:"View All"}),void 0)]}),void 0)}),void 0)}),void 0),Object(o.jsx)(m.a,bq({},En.HALF,{children:Object(o.jsx)(Qn.a,bq({title:"Announcements"},{children:Object(o.jsx)(jo,{includeShown:!1,fetchAmount:4,actionButtonIcon:Object(o.jsx)(is.a,{},void 0),actionButtonText:"View All",actionButtonAction:this.goToPastAnnouncements,actionAvailable:!0},void 0)}),void 0)}),void 0)]}),void 0)]},void 0)},t}(a.Component);var Oq=Object(u.i)(Object(l.b)((function(e){return{userInfo:e.UserSession.Value}}))(yq)),jq=function(e){return Object.assign({courseId:"00000000-0000-0000-0000-000000000000",institutionCourseBlockDetailId:"00000000-0000-0000-0000-000000000000"},e)},Iq=function(e){return Object.assign({courseId:"00000000-0000-0000-0000-000000000000",institutionCourseBlockDetailId:"00000000-0000-0000-0000-000000000000"},e)},Sq={className:"InstitutionCourseBlockCourseDataTableDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",disciplineId:"00000000-0000-0000-0000-000000000000",discipline:null,catalogNumber:"",title:""},e)},id:"id",disciplineId:"disciplineId",discipline:"discipline",catalogNumber:"catalogNumber",title:"title"},Eq=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Rq=function(){return Rq=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Rq.apply(this,arguments)},_q=function(e){function t(t){var n=e.call(this,t)||this;return n._courseSearchRef=a.createRef(),n.triggerRefresh=function(){var e;null===(e=n._dataTable)||void 0===e||e.refresh()},n.getColumnDefinitions=function(){return[{title:"Disipline",dataIndex:Sq.discipline,sorter:!0,filterType:wr.Text,render:function(e,t){var n,r;return Object(o.jsx)(Ws.a,Rq({title:null===(n=t.discipline)||void 0===n?void 0:n.name,placement:"right"},{children:Object(o.jsx)("span",{children:null===(r=t.discipline)||void 0===r?void 0:r.code},void 0)}),void 0)}},{title:"Catalog Number",dataIndex:Sq.catalogNumber,sorter:!0,filterType:wr.Text},{title:"Title",dataIndex:Sq.title,sorter:!0,filterType:wr.Text},{title:"",dataIndex:Sq.id,width:"25px",render:function(e,t){if(Je.isAuthorized([gn.EDIT_INSTITUTION_COURSE_BLOCK]))return Object(o.jsx)(o.Fragment,{children:Object(o.jsx)(rt.a,Rq({type:"link",className:"ant-btn",onClick:function(){return n.promptConfirmRemove(t.id)}},{children:Object(o.jsx)(Yd.a,{},void 0)}),void 0)},void 0)},sorter:!1,filterType:wr.NONE}]},n.addCourse=function(){n.setState({showAddCourseModal:!0})},n.submitAddCourse=function(){var e,t=null===(e=n._courseSearchRef.current)||void 0===e?void 0:e.getValue();n.setState({submitting:!0});var r=jq({courseId:null===t||void 0===t?void 0:t.courseId,institutionCourseBlockDetailId:n.props.institutionCourseBlockDetailId});Jl.addCourseToInstitutionCourseBlockDetail(r).then((function(e){var t;n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,altered:!(null===e||void 0===e?void 0:e.succeeded)}),n.triggerRefresh(),null===(t=n._courseSearchRef.current)||void 0===t||t.reset(),!0===(null===e||void 0===e?void 0:e.succeeded)?(n.setState({showAddCourseModal:!1}),S.b.success("Course has been added")):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(e){n.setState({error:e}),S.b.error("Course could not be added")})).finally((function(){n.setState({loading:!1})}
1))},n.cancelAddCourse=function(){n.setState({showAddCourseModal:!1}),n.triggerRefresh()},n.courseAdded=function(){var e;null===(e=n._dataTable)||void 0===e||e.refresh()},n.handleRemoveCourse=function(e){n.setState({submitting:!0});var t=Iq({courseId:e,institutionCourseBlockDetailId:n.props.institutionCourseBlockDetailId});Jl.removeCourseFromInstitutionCourseBlockDetail(t).then((function(e){n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,altered:!(null===e||void 0===e?void 0:e.succeeded)}),!0===(null===e||void 0===e?void 0:e.succeeded)?S.b.success("Course was removed."):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(e){n.setState({error:e}),S.b.error("Course could not be removed.")})).finally((function(){n.setState({loading:!1}),n.triggerRefresh()}))},n.promptConfirmRemove=function(e){f.a.confirm({title:"Are you sure you want to remove this course?",okText:"Remove Course",onOk:function(){return n.handleRemoveCourse(e)}})},n.state={showAddCourseModal:!1},n}return Eq(t,e),t.prototype.componentDidUpdate=function(e){e.institutionCourseBlockDetailId!=this.props.institutionCourseBlockDetailId&&this.triggerRefresh()},t.prototype.render=function(){return Object(o.jsxs)(o.Fragment,{children:[this.renderDataTable(),this.renderAddCourseModal()]},void 0)},t.prototype.renderDataTable=function(){var e=this,t=[];return t.push(oo.Reset()),this.props.institutionCourseBlockDetailId!=re.default.Empty()&&Je.isAuthorized([gn.EDIT_INSTITUTION_COURSE_BLOCK])&&t.push(oo.Default("Add Course",(function(){return e.addCourse()}))),Object(o.jsx)(y.b,Rq({direction:"vertical"},{children:Object(o.jsx)(io,{ref:function(t){return e._dataTable=t},serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:t,columns:this.getColumnDefinitions(),fetchData:{fetch:function(t){return Jl.getCoursesForInstitutionCourseBlockDetailTableData(t,e.props.institutionCourseBlockDetailId)}},stateSaving:{enabled:!0,tableUniqueKey:"course_icb_list"}},void 0)}),void 0)},t.prototype.renderAddCourseModal=function(){var e;return Object(o.jsx)(f.a,Rq({visible:this.state.showAddCourseModal,title:"Add Course",okText:"Add",onOk:this.submitAddCourse,onCancel:this.cancelAddCourse},{children:Object(o.jsx)(gd,{ref:this._courseSearchRef,institutionId:null!==(e=this.props.institutionId)&&void 0!==e?e:re.default.Empty()},void 0)}),void 0)},t}(a.Component),Tq={className:"InstitutionCourseBlockProgramDataTableDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",programId:"00000000-0000-0000-0000-000000000000",title:"",awardTypeIds:[],awards:[],cipNumberId:"00000000-0000-0000-0000-000000000000",cipNumber:null,iowaVariationId:0,iowaVariation:null},e)},id:"id",programId:"programId",title:"title",awardTypeIds:"awardTypeIds",awards:"awards",cipNumberId:"cipNumberId",cipNumber:"cipNumber",iowaVariationId:"iowaVariationId",iowaVariation:"iowaVariation"},Cq=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),xq=function(){return xq=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},xq.apply(this,arguments)},Aq=function(e){function t(t){var n=e.call(this,t)||this;return n._courseSearchRef=a.createRef(),n.fetchData=function(){Ii.AwardTypes().then((function(e){return n.setState({awardTypes:e})})),Ii.IowaVariations().then((function(e){return n.setState({iowaVariations:e})})),Promise.all([]).then((function(){n.setState({loading:!1})}))},n.triggerRefresh=function(){var e;null===(e=n._dataTable)||void 0===e||e.refresh()},n.openProgram=function(e){e.programId&&T.push(x.generate(x.PROGRAM_DETAILS,{id:e.programId},{}),"_blank")},n.getColumnDefinitions=function(){return[{title:"Title",dataIndex:Tq.title,sorter:!0,filterType:wr.Text},{title:"Awards",dataIndex:Tq.awardTypeIds,render:function(e,t){return n.state.awardTypes.filter((function(e){return t.awardTypeIds.some((function(t){return t==e.value}))})).map((function(e){return e.text})).join(", ")},filterType:wr.DropdownMulti,dropdownFilterOptions:n.state.awardTypes,width:225},{title:"CIP Number ",dataIndex:Tq.cipNumberId,render:function(e,t){var n,r,i;if((null===(n=t.cipNumber)||void 0===n?void 0:n.cipNumberDetails)&&
1(null===(i=null===(r=t.cipNumber)||void 0===r?void 0:r.cipNumberDetails)||void 0===i?void 0:i.length)>0)return t.cipNumber.cipNumberDetails[0].display+" - "+t.cipNumber.cipNumberDetails[0].title},sorter:!0,filterType:wr.Text,width:225},{title:"Iowa Variation",dataIndex:Tq.iowaVariationId,render:function(e,t){var n;return null===(n=t.iowaVariation)||void 0===n?void 0:n.display},sorter:!0,filterType:wr.DropdownMulti,dropdownFilterOptions:n.state.iowaVariations,width:225}]},n.state={showAddCourseModal:!1,awardTypes:[],iowaVariations:[]},n}return Cq(t,e),t.prototype.componentDidMount=function(){this.fetchData()},t.prototype.componentDidUpdate=function(e){e.institutionCourseBlocklId!=this.props.institutionCourseBlocklId&&this.triggerRefresh()},t.prototype.render=function(){var e=this,t=[];return t.push(oo.Reset()),Object(o.jsx)(y.b,xq({direction:"vertical"},{children:Object(o.jsx)(io,{ref:function(t){return e._dataTable=t},onRowClick:this.openProgram,serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:t,columns:this.getColumnDefinitions(),fetchData:{fetch:function(t){return Jl.getProgramsForInstitutionCourseBlockDetailTableData(t,e.props.institutionCourseBlocklId)}},stateSaving:{enabled:!0,tableUniqueKey:"course_icb_list"}},void 0)}),void 0)},t}(a.Component),Pq=function(e){return Object.assign({institutionCourseBlockDetail:null},e)},Nq={className:"InstitutionCourseBlockDetailDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",institutionCourseBlockId:"00000000-0000-0000-0000-000000000000",institutionId:"00000000-0000-0000-0000-000000000000",institutionCourseBlock:null,title:"",code:"",installTermId:"00000000-0000-0000-0000-000000000000",install:null,installYear:0,retireTermId:null,retire:null,retireYear:null,institutionCourseBlockDetailCourses:[],versionDisplay:""},e)},id:"id",institutionCourseBlockId:"institutionCourseBlockId",institutionId:"institutionId",institutionCourseBlock:"institutionCourseBlock",title:"title",code:"code",installTermId:"installTermId",install:"install",installYear:"installYear",retireTermId:"retireTermId",retire:"retire",retireYear:"retireYear",institutionCourseBlockDetailCourses:"institutionCourseBlockDetailCourses",versionDisplay:"versionDisplay"},wq=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Dq=function(){return Dq=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Dq.apply(this,arguments)},qq=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields(),n.setState({altered:!1})},n.loadInstitutions=function(){return ce.getAll(ne.className).then((function(e){e&&n.setState({institutions:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.handleSubmit=function(){var e,t,r,i,o,a,s;n.setState({submitting:!0});var d=Nq.create(null!==(t=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldsValue())&&void 0!==t?t:Nq.create());d.id=null!==(i=null===(r=n.props.institutionCourseBlockDetail)||void 0===r?void 0:r.id)&&void 0!==i?i:re.default.Empty(),d.institutionId=n.props.selectedInstitution?null!==(a=null===(o=n.props.selectedInstitution)||void 0===o?void 0:o.id)&&void 0!==a?a:re.default.Empty():d.institutionId,d.institutionCourseBlockId=null!==(s=n.props.institutionCourseBlockDetail.institutionCourseBlockId)&&void 0!==s?s:re.default.Empty();var c=Pq({institutionCourseBlockDetail:d});Jl.saveInstitutionCourseBlock(c).then((function(e){var t,r;n.setState({submitted:!0}),(null===e||void 0===e?void 0:e.succeeded)?(n.setState({altered:!e.succeeded}),S.b.success("Saved"),n.props.onSave&&(null===(t=e.institutionCourseBlock)||void 0===t?void 0:t.id)&&(n.props.onSave(e.institutionCourseBlock.id),null===(r=n._formRef.current)||void 0===r||r.resetFields())):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Institution Course Block could not be saved."))})).catch((function(e){n.setState({error:e}),S.b.error("Institution Course Block could not be saved.")})).finally((function(){n.setState({loading:!1,submitting:!1})}
1))},n.handleChange=function(){n.setState({altered:!0})},n._formItems=(new Map).set(Nq.title,{required:!0,name:Nq.title,label:"Title",rules:[Ot.required(),Ot.maxLength(150)]}).set(Nq.code,{required:!0,name:Nq.code,label:"Code",rules:[Ot.required(),Ot.maxLength(3),Ot.onlyAlphanumericCharacters()]}).set(Nq.install,{required:!0,name:Nq.install,label:"Install Term",rules:[Ot.required()]}).set(Nq.retire,{name:Nq.retire,label:"Retire Term"}).set(eu.institutionId,{required:!0,name:eu.institutionId,label:"Community College",rules:[Ot.required()]}),n.state={institutions:[],institutionCourseBlockDetail:Nq.create()},n}return wq(t,e),t.prototype.componentDidMount=function(){var e=this;this.fetchData(),this.setState({institutionCourseBlockDetail:this.props.institutionCourseBlockDetail},(function(){return e.resetForm()}))},t.prototype.componentDidUpdate=function(e){var t=this;this.props.institutionCourseBlockDetail!=e.institutionCourseBlockDetail&&this.setState({institutionCourseBlockDetail:this.props.institutionCourseBlockDetail},(function(){return t.resetForm()}))},t.prototype.fetchData=function(){var e=this;this.setState({loading:!0});var t=[];0==this.state.institutions.length&&t.push(this.loadInstitutions()),Promise.all(t).then((function(){e.setState({loading:!1})}))},t.prototype.render=function(){return this.state.loading||null==this.props.institutionCourseBlockDetail||void 0==this.props.institutionCourseBlockDetail?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(y.b,Dq({size:"small",direction:"vertical"},{children:[this.renderErrors(),Object(o.jsxs)(ht.a,Dq({ref:this._formRef,layout:"vertical",onChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!0,initialValues:this.props.institutionCourseBlockDetail},{children:[this.renderInstitutionSelect(),Object(o.jsx)(mt.a,Dq({},_t.getValidation(Nq.code,this.state.fieldErrors,this.state.submitted),this._formItems.get(Nq.code),{children:Object(o.jsx)(ut.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,Dq({},_t.getValidation(Nq.title,this.state.fieldErrors,this.state.submitted),this._formItems.get(Nq.title),{children:Object(o.jsx)(ut.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,Dq({},this._formItems.get(Nq.install),_t.getValidation(Nq.install,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(Od,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,Dq({},this._formItems.get(Nq.retire),_t.getValidation(Nq.retire,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(Od,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),this.renderActions()]}),void 0)]}),void 0)},t.prototype.renderInstitutionSelect=function(){var e=this;if(!this.props.selectedInstitution||this.props.selectedInstitution.id==re.default.Empty())return Object(o.jsx)(mt.a,Dq({},this._formItems.get(eu.institutionId),_t.getValidation(eu.institutionId,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(pr.a,Dq({disabled:!this.props.isEditing||this.state.loading||this.state.submitting,showSearch:!0,placeholder:"Add Institution",optionFilterProp:"children"},{children:this.state.institutions.map((function(t){return e.renderInstitutionOption(t)}))}),void 0)}),void 0)},t.prototype.renderInstitutionOption=function(e){if(e.id)return Object(o.jsx)(pr.a.Option,Dq({value:e.id},{children:e.name}),e.id)},t.prototype.renderActions=function(){if(this.props.isEditing&&Je.
1isAuthorized([gn.EDIT_INSTITUTION_COURSE_BLOCK]))return Object(o.jsxs)(y.b,Dq({direction:"horizontal",wrap:!0},{children:[Object(o.jsx)(Tr,{disabled:this.state.loading,saving:this.state.submitting,saved:this.state.saved},void 0),Object(o.jsx)(Ir,{disabled:!this.state.altered,resetting:this.state.resetting,onConfirm:this.resetForm},void 0)]}),void 0)},t.prototype.renderErrors=function(){if(this.state.error)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t}(a.Component),Fq=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Mq=function(){return Mq=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Mq.apply(this,arguments)},Yq=function(e){function t(t){var n=e.call(this,t)||this;return n._institutionCourseBlockDetailsFormRef=a.createRef(),n.loadInstitutionCourseBlock=function(e){n.setState({loading:!0,institutionCourseBlockId:e}),Jl.getInstitutionCourseBlockDetails(e).then((function(e){var t,r,i,o,a,s,d;if(e.institutionCourseBlock){var c=re.default.Empty();if(null!==(i=null===(r=null===(t=e.institutionCourseBlock)||void 0===t?void 0:t.institutionCourseBlockDetails)||void 0===r?void 0:r.length)&&void 0!==i&&i){var l=null!=(null===(o=e.institutionCourseBlock)||void 0===o?void 0:o.institutionCourseBlockDetails)&&null!==(s=null===(a=e.institutionCourseBlock)||void 0===a?void 0:a.currentDetail)&&void 0!==s?s:Nq.create();l.id&&(c=l.id)}n.setState({institutionCourseBlock:null!==(d=e.institutionCourseBlock)&&void 0!==d?d:eu.create(),selectedDetailId:c})}})).finally((function(){n.setState({loading:!1})}))},n.toggleIsEditing=function(){n.setState({isEditing:!n.state.isEditing})},n.handleVersionSelect=function(e){n.setState({selectedDetailId:e.key})},n.isEditingCheck=function(){return!!n.state.editings&&Array.from(n.state.editings.values()).includes(!0)},n.institutionCourseBlockDetailsSaved=function(e){n.setState({isEditing:!1}),e!=n.state.institutionCourseBlockId?T.replace(x.generate(x.INSTITUITION_COURSE_BLOCK_DETAILS,{id:e})):n.loadInstitutionCourseBlock(e)},n.goBack=function(){T.goBack()},n.tabChanged=function(e){n.setState({activeTab:e}),T.replace(x.generate("",{},{activeTab:e}),{activeTab:e})},n.state={institutionCourseBlockId:re.default.Empty(),institutionCourseBlock:eu.create(),isEditing:!1,activeTab:"details",selectedDetailId:re.default.Empty()},n}return Fq(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id"),t=Hr.getParameter("activeTab","details");this.setState({activeTab:t}),"new"==e?this.setState({isEditing:!0}):this.loadInstitutionCourseBlock(e)},t.prototype.render=function(){var e,t,n,r,i,a,s,d,c,l,u=this,p=this.state.loading?"...":this.state.institutionCourseBlockId==re.default.Empty()?"New Institution Course Block":null!==(t=null===(e=this.state.institutionCourseBlock.currentDetail)||void 0===e?void 0:e.title)&&void 0!==t?t:"...",f=Object(o.jsx)(Gt.a,Mq({onSelect:this.handleVersionSelect,selectable:!0,selectedKeys:[this.state.selectedDetailId]},{children:null===(n=this.state.institutionCourseBlock.institutionCourseBlockDetails)||void 0===n?void 0:n.map((function(e){return Object(o.jsx)(Gt.a.Item,{children:e.versionDisplay},e.id)}))}),void 0),h=null!==(a=null===(i=null===(r=this.state.institutionCourseBlock)||void 0===r?void 0:r.institutionCourseBlockDetails)||void 0===i?void 0:i.filter((function(e){return e.id==u.state.selectedDetailId}))[0])&&void 0!==a?a:Nq.create(),v=h?h.versionDisplay:"Versions",m=Object(o.jsx)(la.a,Mq({overlay:f},{children:Object(o.jsx)(rt.a,Mq({icon:Object(o.jsx)(kt.a,{},void 0)},{children:v}),void 0)}),void 0);return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:p,onBack:this.goBack,breadcrumbs:Xn.institutionCourseBlockDetail
1s(p,this.state.institutionCourseBlockId),extra:m,footer:Object(o.jsxs)(pa.a,Mq({activeKey:this.state.activeTab,onChange:this.tabChanged},{children:[Object(o.jsx)(pa.a.TabPane,{tab:"Details"},"details"),(null!==(d=null===(s=this.state)||void 0===s?void 0:s.selectedDetailId)&&void 0!==d?d:re.default.Empty()!=re.default.Empty())?Object(o.jsx)(pa.a.TabPane,{tab:"Courses"},"courses"):null,(null!==(l=null===(c=this.state)||void 0===c?void 0:c.selectedDetailId)&&void 0!==l?l:re.default.Empty()!=re.default.Empty())?Object(o.jsx)(pa.a.TabPane,{tab:"Programs"},"programs"):null]}),void 0)},void 0),Object(o.jsx)(zr,{when:this.isEditingCheck},void 0),this.renderDetailsCard(h),this.renderInstitutionCourseBlockCoursesTable(),this.renderInstitutionCourseBlockProgramsTable()]},void 0)},t.prototype.renderDetailsCard=function(e){var t=this.state.institutionCourseBlockId==re.default.Empty()&&null!=e.retireTermId?null:Object(o.jsx)(Ze,Mq({validFeatureFlags:[gn.EDIT_INSTITUTION_COURSE_BLOCK]},{children:Object(o.jsx)(Br,{onClick:this.toggleIsEditing,isEditing:this.state.isEditing},void 0)}),void 0);return Object(o.jsx)(Qn.a,Mq({title:"Details",extra:t,hidden:"details"!==this.state.activeTab},{children:Object(o.jsx)(qq,{ref:this._institutionCourseBlockDetailsFormRef,institutionCourseBlockDetail:e,isEditing:this.state.isEditing,selectedInstitution:this.props.selectedInstitution,onSave:this.institutionCourseBlockDetailsSaved},this.state.selectedDetailId)}),void 0)},t.prototype.renderInstitutionCourseBlockCoursesTable=function(){var e,t;if(this.state.institutionCourseBlockId!=re.default.Empty())return Object(o.jsx)(Qn.a,Mq({title:"Courses",hidden:"courses"!==this.state.activeTab},{children:Object(o.jsx)(_q,{institutionId:null!==(t=null===(e=this.state.institutionCourseBlock)||void 0===e?void 0:e.institutionId)&&void 0!==t?t:re.default.Empty(),institutionCourseBlockDetailId:this.state.selectedDetailId},void 0)}),void 0)},t.prototype.renderInstitutionCourseBlockProgramsTable=function(){var e,t;if(this.state.institutionCourseBlockId!=re.default.Empty())return Object(o.jsx)(Qn.a,Mq({title:"Programs",hidden:"programs"!==this.state.activeTab},{children:Object(o.jsx)(Aq,{institutionId:null!==(t=null===(e=this.state.institutionCourseBlock)||void 0===e?void 0:e.institutionId)&&void 0!==t?t:re.default.Empty(),institutionCourseBlocklId:this.state.institutionCourseBlockId},void 0)}),void 0)},t.ICB_DETAILS="ICB_DETAILS",t}(a.Component);var Uq=Object(u.i)(Object(l.b)((function(e){return{selectedInstitution:e.Institution.Selected}}))(Yq)),Lq={className:"InstitutionCourseCreditDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",institutionCourseId:"00000000-0000-0000-0000-000000000000",creditTypeId:"00000000-0000-0000-0000-000000000000",minimum:null,maximum:null,creditType:null,institutionCourseDetail:null},e)},id:"id",institutionCourseId:"institutionCourseId",creditTypeId:"creditTypeId",minimum:"minimum",maximum:"maximum",creditType:"creditType",institutionCourseDetail:"institutionCourseDetail"},kq=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Gq=function(){return Gq=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Gq.apply(this,arguments)},Vq=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n.getFormItems=function(){return(new Map).set(Ul.description,{name:Ul.description,label:"Description",required:!0,rules:[Ot.required(),Ot.maxLength(5e3)]}).set(Ul.categoryId,{required:!0,name:Ul.categoryId,label:"Category",rules:[Ot.required()]}).set(Vw.install,{name:Vw.install,label:"Install Term",required:!0,rules:[Ot.required()]}).set(Vw.retire,{name:Vw.retire,label:"Retire Term"}).set(Ul.variableHours,{name:Ul.variableHours,label:"Variable Hours"})},n.getCreditFormItems=function(e){return(new Map).set(Lq.minimum,{name:[e,Lq.minimum]}).set(Lq.maximum,{name:[e,Lq.maximum]})},n.loadExisting=function(e,t){return du.getInstitutionCourseDetailByCourseIdandInstitutionId(e,t).then((function(e){if(e.institutionCourseDetails&&e.courseDetails){var t=e.institutionCourseDetails[e.institutionCourseDetails.length-1];
1n.setState({institutionCourseDetail:null!==t&&void 0!==t?t:Ul.create()}),n.setState({institutionCourseDetail:t}),n.checkCredits(),n.resetForm()}})).catch((function(){n.setState({error:!0})}))},n.loadCategories=function(){return ce.getAll(di.className).then((function(e){e&&n.setState({categories:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadCreditTypes=function(){return n.setState({loading:!0}),ce.getAll(Vd.className).then((function(e){e&&n.setState({creditTypes:null!==e&&void 0!==e?e:[]}),n.checkCredits()})).catch((function(){n.setState({error:!0})}))},n.checkCredits=function(){var e;if(0==(null===(e=n.state.institutionCourseDetail.institutionCourseCredits)||void 0===e?void 0:e.length)){var t=n.state.institutionCourseDetail,r=n.state.creditTypes.sort((function(e,t){return e.displayOrder-t.displayOrder}));t.institutionCourseCredits=r.map((function(e){return Lq.create({creditTypeId:e.id,creditType:e})}))}},n.handleChange=function(){n.setState({altered:!0})},n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields()},n.handleSave=function(){var e,t;n.setState({submitting:!0});var r=Ul.create(null!==(t=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldsValue())&&void 0!==t?t:null),i=Gw({institutionCourseDetail:r,courseId:n.props.courseId,institutionId:n.props.institutionId});du.saveInstitutionCourseDetails(i).then((function(e){(null===e||void 0===e?void 0:e.succeeded)?S.b.success("Saved"):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Error Saving"))})).catch((function(e){n.setState({error:e}),S.b.error("Error Saving")})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.getCreditColumns=function(){var e,t,r=null!==(t=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldValue(Ul.variableHours))&&void 0!==t?t:n.state.institutionCourseDetail.variableHours,i=[{title:"",dataIndex:Lq.creditTypeId,render:function(e,t,r){var i,a=null===(i=n._formRef.current)||void 0===i?void 0:i.getFieldValue(Ul.institutionCourseCredits)[r].creditTypeId;if(a){var s=n.state.creditTypes.filter((function(e){return e.id==a}))[0];if(s)return Object(o.jsx)(ud,{text:s.name},void 0)}}},{title:r?"Min Credits":"Credits",dataIndex:Lq.minimum,render:function(e,t,r){return Object(o.jsx)(mt.a,Gq({},n.getCreditFormItems(r).get(Lq.minimum),_t.getValidation(Lq.minimum+r,n.state.fieldErrors,n.state.submitted),{children:Object(o.jsx)(Ni.a,{disabled:!n.props.isEditing||n.state.loading||n.state.submitting},void 0)}),void 0)}}];return r&&i.push({title:"Max Credits",dataIndex:Lq.maximum,render:function(e,t,r){return Object(o.jsx)(mt.a,Gq({},n.getCreditFormItems(r).get(Lq.maximum),_t.getValidation(Lq.maximum+r,n.state.fieldErrors,n.state.submitted),{children:Object(o.jsx)(Ni.a,{disabled:!n.props.isEditing||n.state.loading||n.state.submitting},void 0)}),void 0)}}),i},n.state={institutionCourseDetail:Ul.create({installTermId:"",retireTermId:""}),creditTypes:[],categories:[]},n}return kq(t,e),t.prototype.componentDidMount=function(){this.fetchData()},t.prototype.componentDidUpdate=function(e){this.props.institutionId!=re.default.Empty()&&this.props.courseId!=re.default.Empty()&&(this.props.institutionId!=e.institutionId||this.props.courseId!=e.courseId&&!this.props.isNew)&&this.loadExisting(this.props.courseId,this.props.institutionId)},t.prototype.fetchData=function(){var e=this;this.setState({loading:!0});var t=[];this.props.institutionId==re.default.Empty()||this.props.courseId==re.default.Empty()||this.props.isNew||t.push(this.loadExisting(this.props.courseId,this.props.institutionId)),0==this.state.categories.length&&t.push(this.loadCategories()),0==this.state.creditTypes.length&&t.push(this.loadCreditTypes()),Promise.all(t).then((function(){e.setState({loading:!1}),e.resetForm()}))},t.prototype.render=function(){var e=this;if(this.state.loading)return Object(o.jsx)(pt.a,{active:!0},void 0);var t=this.getFormItems();return Object(o.jsx)(ht.a,Gq({ref:this._formRef,layout:"vertical",requiredMark:!0,initialValues:this.state.institutionCourseDetail,onValuesChange:this.handleChange,onFinish:this.handleSave},{children:Object(o.jsxs)(y.b,Gq({direction:"vertical"},{children:[Object(o.jsx)(mt.a,Gq({},t.get(Ul.description),_t.getValidation(Ul.description,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a.TextArea,{maxLength:5e3,showCount:!0,disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,Gq({},t.get(Ul.categoryId),_t.getValidation(Ul.categoryId,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(pr.a,Gq({disabled:!this.props.isEditing||this.state.loading||this.state.submitting},{children:this.state.categories.map((function(t){return e.renderCategories(t)}))}),void 0)}),void 0),Object(o.jsx)(mt.a,Gq({},t.get(Ul.variableHours),_t.getValidation(Ul.variableHours,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(H
1d,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(ht.a.List,Gq({name:Ul.institutionCourseCredits},{children:function(t){return Object(o.jsx)(Pi.a,{dataSource:t,columns:e.getCreditColumns(),pagination:!1},void 0)}}),void 0),Object(o.jsx)(mt.a,Gq({},t.get(Vw.install),{rules:[]},{children:Object(o.jsx)(Od,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,Gq({},t.get(Vw.retire),{rules:[]},{children:Object(o.jsx)(Od,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),this.renderActions()]}),void 0)}),void 0)},t.prototype.renderCategories=function(e){if(e.id)return Object(o.jsx)(pr.a.Option,Gq({value:e.id},{children:e.name}),e.id)},t.prototype.renderActions=function(){var e=this.getFormItems();if(this.props.isEditing)return Object(o.jsx)(Ze,Gq({validFeatureFlags:[gn.EDIT_COURSE]},{children:Object(o.jsxs)(y.b,Gq({direction:"horizontal"},{children:[Object(o.jsx)(Tr,{disabled:!br.canSubmit(this._formRef,e),saving:this.state.submitting},void 0),Object(o.jsx)(Ir,{disabled:!br.hasChanged(this._formRef,e),onConfirm:this.resetForm},void 0)]}),void 0)}),void 0)},t}(a.Component),Bq=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Wq=function(){return Wq=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Wq.apply(this,arguments)},zq=function(e){function t(n){var r=e.call(this,n)||this;return r._institutionCourseDetailsRef=a.createRef(),r._courseDetailsRef=a.createRef(),r.loadInstitutions=function(e){return ce.getAll(ne.className).then((function(t){var n;t&&r.setState({institution:null!==(n=t.find((function(t){return t.id==e})))&&void 0!==n?n:ne.create()})})).catch((function(){r.setState({error:!0})}))},r.loadCourseDetails=function(e){return Qs.getCourseDetails(e).then((function(e){var t,n,i,o,a;(null===(t=e.course)||void 0===t?void 0:t.courseDetails)&&r.setState({course:null!==(n=e.course)&&void 0!==n?n:Il.create(),selectedCourseDetails:null!==(a=null===(i=e.course)||void 0===i?void 0:i.courseDetails[(null===(o=e.course)||void 0===o?void 0:o.courseDetails.length)-1])&&void 0!==a?a:Zs.create()})})).catch((function(){r.setState({error:!0})}))},r.loadInstitutionCourse=function(e,t){return du.getInstitutionCourseDetailByCourseIdandInstitutionId(e,t).then((function(e){var n,i,o,a,s;e.courseDetails&&r.setState({course:null!==(i=null===(n=e.institutionCourse)||void 0===n?void 0:n.course)&&void 0!==i?i:Il.create(),institutionId:t,institutionCourse:null!==(o=e.institutionCourse)&&void 0!==o?o:Vw.create(),institutionCourseDetails:null!==(a=e.institutionCourseDetails)&&void 0!==a?a:[],selectedCourseDetails:null!==(s=e.courseDetails[e.courseDetails.length-1])&&void 0!==s?s:Zs.create()})})).catch((function(){r.setState({error:!0})}))},r.courseDetailsSaved=function(e){r.toggleIsEditing(t.COURSE_DETAILS,!1),r.loadCourseDetails(null!==e&&void 0!==e?e:re.default.Empty()),r.goToInstitutionCourse(null!==e&&void 0!==e?e:re.default.Empty(),r.state.institutionId,"new")},r.toggleIsEditing=function(e,n){var i,o,a;if(r.state.editings){var s=r.state.editings;if(void 0!==n?s.set(e,n):s.set(e,null===(i=!s.get(e))||void 0===i||i),!s.get(e))switch(e){case t.COURSE_DETAILS:null===(o=r._courseDetailsRef.current)||void 0===o||o.resetForm();break;case t.INSTITUTION_COURSE_DETAILS:null===(a=r._institutionCourseDetailsRef.current)||void 0===a||a.resetForm()}r.setState({editings:s})}},r.instituitionCourseDetailsSaved=function(e){var n;r.toggleIsEditing(t.INSTITUTION_COURSE_DETAILS,!1),r.loadInstitutionCourse(r.state.courseId,r.state.institutionId),r.state.isNew&&(r.setState({isNew:!1}),r.goToInstitutionCourse(null!==(n=r.state.courseId)&&void 0!==n?n:re.default.Empty(),r.state.institutionId,e))},r.goToCourses=function(){T.push(x.COURSES)},r.goToInstitutionCourse=function(e,t,n){"courses"==r.state.originatingPage?T.push(x.generate(x.COURSE_INSTITUTION_DETAILS,{courseId:e,institutionId:t,institutionCourseId:n})):T.push(x.generate(x.INSTITUTION_COURSE_DETAILS,{courseId:e,institutionId:t,institutionCourseId:n}))},r.goToInstitution=function(){T.push(x.generate(x.INSTITUTION_DETAILS,{id:r.state.institutionId}))},r.goToCourse=function(){T.push(x.generate(x.COURSE_DETAILS,{id:r.state.courseId}))},r.changeTab=function(e){r.setState({activeTab:e})},r.state={activeTab:"course_details",course:Il.create(),courseId:re.default.Empty(),editings:new Map,institution:ne.create(),institutionId:re.default.Empty(),institutionCourseDetails:[],selectedCourseDetails:Zs.create(),originatingPage:""},r}return Bq(t,e),t.prototype.componentDidMount=function(){var e=this,n=Hr.getPathPart(this.props.match,"institutionId"),r=Hr.getPathPart(this.props.match,"courseId"),i=Hr.getPathPart(this.props.match,"institutionCourseId"),o=this.props.match.path.split("/")[1];this.setState({originatingPage:o,institutionId:n,loading:!0});var a=[];if("new"==i&&"new"==r){var s=Hr.getParameter("disciplineId"),d=Hr.getParameter("catalogNumber"),c=Il.create({id:re.default.Empty(),disciplineId:s,catalogNumber:d});this.toggleIsEditing(t.COURSE_DETAILS,!0),this.setState({course:c,isEditing:!0,isNew:!0})}else"new"==i?(this.toggleIsEditing(t.INSTITUTION_COURSE_DETAILS,!0),this.setState({isNew:!0,courseId:r}),a.push(this.loadCourseDetails(r))):(this.setState({courseId:r}),a.push(this.loadInstitutionCourse(r,n)));a.push(this.loadInstitutions(n)),Promise.all(a).finally((function(){e.setState({loading:!1})}
1))},t.prototype.render=function(){var e,t,n,r,i,a,s,d,c,l,u,p=this.state.loading?"...":null!==(e=this.state.selectedCourseDetails.title)&&void 0!==e?e:"...",f=this.state.loading?"...":null!==(n=null===(t=this.state.course)||void 0===t?void 0:t.display)&&void 0!==n?n:"...",h=this.state.loading?"...":null!==(i=null===(r=this.state.institution)||void 0===r?void 0:r.name)&&void 0!==i?i:"...",v=this.state.loading?"...":null!==(s=null===(a=this.state.institution)||void 0===a?void 0:a.abbreviation)&&void 0!==s?s:"...",m="courses"==this.state.originatingPage?this.goToCourse:this.goToInstitution,g="courses"==this.state.originatingPage?Xn.courseInstitutionDetials(f,this.state.courseId,v,this.state.institutionId,null!==(c=null===(d=this.state.institutionCourse)||void 0===d?void 0:d.id)&&void 0!==c?c:re.default.Empty()):Xn.institutionCourseDetails(v,this.state.institutionId,f,this.state.courseId,null!==(u=null===(l=this.state.institutionCourse)||void 0===l?void 0:l.id)&&void 0!==u?u:re.default.Empty());return null!=this.props.selectedInstitution&&void 0!=this.props.selectedInstitution&&(g=Xn.singleInstitutionCourseDetails(f,this.state.courseId,this.state.institutionId),m=this.goToCourses),Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:p,breadcrumbs:g,extra:this.renderMoreActions(),onBack:m,subTitle:h,footer:Object(o.jsxs)(pa.a,Wq({onChange:this.changeTab},{children:[Object(o.jsx)(pa.a.TabPane,{tab:"Details"},"course_details"),Object(o.jsx)(pa.a.TabPane,{tab:"Change Requests"},"course_change_request")]}),void 0)},void 0),Object(o.jsx)(zr,{when:this.state.isEditing},void 0),Object(o.jsxs)(y.b,Wq({direction:"vertical",size:"large"},{children:[this.renderCourseDetailsCard(),this.renderDetailsCard(),this.renderChangeRequests()]}),void 0)]},void 0)},t.prototype.renderDetailsCard=function(){var e,n,r=this;if(this.state.selectedCourseDetails.id!=re.default.Empty()&&"course_details"===this.state.activeTab){var i=Object(o.jsx)(Ze,Wq({validFeatureFlags:[gn.EDIT_COURSE]},{children:Object(o.jsx)(Br,{onClick:function(){return r.toggleIsEditing(t.INSTITUTION_COURSE_DETAILS)},isEditing:null===(e=this.state.editings)||void 0===e?void 0:e.get(t.INSTITUTION_COURSE_DETAILS)},void 0)}),void 0);return Object(o.jsx)(Qn.a,Wq({title:"Community College Details",extra:i},{children:Object(o.jsx)(Vq,{ref:this._institutionCourseDetailsRef,institutionId:this.state.institutionId,courseId:this.state.courseId,isEditing:null===(n=this.state.editings)||void 0===n?void 0:n.get(t.INSTITUTION_COURSE_DETAILS),isNew:this.state.isNew,onSave:this.instituitionCourseDetailsSaved},void 0)}),void 0)}},t.prototype.renderCourseDetailsCard=function(){var e,n=this;if("course_details"===this.state.activeTab){var r=this.state.selectedCourseDetails.id==re.default.Empty()?Object(o.jsx)(Ze,Wq({validFeatureFlags:[gn.EDIT_COURSE]},{children:Object(o.jsx)(Br,{onClick:function(){return n.toggleIsEditing(t.COURSE_DETAILS)},isEditing:null===(e=this.state.editings)||void 0===e?void 0:e.get(t.COURSE_DETAILS)},void 0)}),void 0):null;if(this.state.selectedCourseDetails.id!=re.default.Empty())return Object(o.jsx)(Qn.a,{title:"Course Details",extra:r},void 0)}},t.prototype.renderChangeRequests=function(){var e,t,n;if("course_change_request"===this.state.activeTab)return Object(o.jsx)(Qn.a,Wq({title:"Change Request"},{children:Object(o.jsx)(Hm,{userId:null!==(t=null===(e=this.props.currentUser)||void 0===e?void 0:e.userId)&&void 0!==t?t:null,institution:this.props.selectedInstitution,courseId:null!==(n=this.state.courseId)&&void 0!==n?n:re.default.Empty()},void 0)}),void 0)},t.prototype.renderMoreActions=function(){if(this.state.institutionCourseDetails){var e=Object(o.jsx)(Gt.a,{children:this.state.institutionCourseDetails.map((function(e){var t,n=(null===(t=e.retire)||void 0===t?void 0:t.termId)==re.default.Empty()?e.installDisplay:e.installDisplay+" | "+e.retireDisplay;return Object(o.jsx)(Gt.a.Item,{children:n},e.id)}))},void 0);return Object(o.jsx)(la.a,Wq({overlay:e},{children:Object(o.jsx)(rt.a,Wq({size:"large",type:"link"},{children:Object(o.jsx)(aa.a,{},void 0)}),void 0)}),void 0)}},t.COURSE_DETAILS="COURSE_DETAILS",t.INSTITUTION_COURSE_DETAILS="INSTITUTION_COURSE_DETAILS",t}(a.Component);var Hq=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected}}))(zq)),Qq=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Kq=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Qq(t,e),t.prototype.getInstitutionTableData=function(e){var t="api/institutions";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getInstitutionsForAPI=function(){var e="api/institutions/get";return e=e.replace(/null|undefined/gi,""),this.SendRequest(null,"post",e,!0,!1)},t.prototype.getInstitutionsDataTableExport=function(e){var t="api/institutions/export";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)}
1,t.prototype.getInstitutionDetails=function(e){var t="api/institutions/"+encodeURIComponent(e);return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.saveInstitutionDetails=function(e){var t="api/institutions/save";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.checkInstitutionNameExists=function(e){var t="api/institutions/checkNameExists";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.deleteInstitution=function(e){var t="api/institutions/deleteInstitution";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getInstituionCreditTypeMinutesTableData=function(e){var t="api/institutions/getInstitutionCreditTypeMinutes",n=t.indexOf("?")>0?"&":"?";return null!=e&&(t+=n+"institutionId="+encodeURIComponent(e),n="&"),t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.saveInstitutionCreditTypeMinute=function(e){var t="api/institutions/saveInstitutionCreditTypeMinute";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t}(U),Xq=new Kq,Jq=n(1526),$q=function(e){return Object.assign({institutionLocationId:null},e)},Zq={className:"InstitutionLocationDataTableDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",institutionId:"00000000-0000-0000-0000-000000000000",primary:!1,name:"",address:"",phone:"",fax:""},e)},id:"id",institutionId:"institutionId",primary:"primary",name:"name",address:"address",phone:"phone",fax:"fax"},eF=n(283),tF=(n(607),function(e){return Object.assign({institutionId:"00000000-0000-0000-0000-000000000000",institutionLocationId:null,institutionLocation:null},e)}),nF={className:"InstitutionLocationDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",instituionId:"00000000-0000-0000-0000-000000000000",isPrimary:!1,name:"",street1:"",street2:"",city:"",state:"",zip:"",phone:"",fax:""},e)},id:"id",instituionId:"instituionId",isPrimary:"isPrimary",name:"name",street1:"street1",street2:"street2",city:"city",state:"state",zip:"zip",phone:"phone",fax:"fax"},rF=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),iF=function(){return iF=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},iF.apply(this,arguments)},oF=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._formItems=(new Map).set(nF.isPrimary,{name:nF.isPrimary,label:"Primary Location"}).set(nF.name,{required:!0,name:nF.name,label:"Name",rules:[Ot.maxLength(150),Ot.required()]}).set(nF.street1,{required:!0,name:nF.street1,label:"Address Line 1",rules:[Ot.maxLength(150),Ot.required()]}).set(nF.street2,{name:nF.street2,label:"Address Line 2"}).set(nF.city,{required:!0,name:nF.city,label:"City",rules:[Ot.required()]}).set(nF.state,{required:!0,name:nF.state,label:"State",rules:[Ot.maxLength(2),Ot.required()]}).set(nF.zip,{required:!0,name:nF.zip,label:"Zip Code",rules:[Ot.required()]}).set(nF.phone,{name:nF.phone,label:"Phone Number",rules:[Ot.maxLength(12),Ot.phoneNumberValidator()]}).set(nF.fax,{name:nF.fax,label:"Fax Number",rules:[Ot.maxLength(12),Ot.phoneNumberValidator()]}),n.loadExisting=function(){return wc.getInstitutionLocationDetails(n.props.institutionLocationId).then((function(e){var t;(null===(t=e.institutionLocation)||void 0===t?void 0:t.id)&&n.setState({institutionLocationId:e.institutionLocation.id,institutionLocation:e.institutionLocation}),n.reset()})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))},n.loadNew=function(){n.setState({institutionLocation:nF.create()},(function(){return n.reset()})),n.setState({loading:!1})},n.submit=function(){n.handleSubmit()},n.reset=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields()},n.handleChange=function(){n.setState({altered:!0})},n.handleSubmit=function(){if(n.setState({submitting:!0}),!br.canSubmit(n._formRef,n._formItems))return S.b.error("Please fill out all required fields."),void n.setState({loading:!1,submitting:!1});var e=tF({institutionId:n.props.institutionId,institutionLocationId:n.state.institutionLocationId,institutionLocation:nF.create(n._formRef?n._formRef.current.getFieldsValue():null)});wc.saveInstitutionLocation(e).then((function(e){(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.props.onSuccess&&(n.props.onSuccess(),n.reset())):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Location could not be saved. "+n.state.message))})).catch((function(e){n.setState({error:e}),S.b.error("Location could not be saved.")})).finally((function(){n.setState({loading:!1,submitting:!1})}
1))},n.state={institutionLocationId:re.default.Empty(),institutionLocation:nF.create()},n}return rF(t,e),t.prototype.componentDidMount=function(){this.setState({loading:!0}),this.loadInstitutionLocation()},t.prototype.componentDidUpdate=function(e){this.props.institutionLocationId&&this.props.institutionLocationId.isNotEmpty()&&this.props.institutionLocationId!=e.institutionLocationId&&(this.setState({institutionLocationId:this.props.institutionLocationId}),this.loadInstitutionLocation())},t.prototype.loadInstitutionLocation=function(){return this.props.institutionLocationId==re.default.Empty()?this.loadNew():this.loadExisting()},t.prototype.render=function(){var e,t,n,r,i,a,s,d,c,l;return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsx)(y.b,iF({size:"small",direction:"vertical"},{children:Object(o.jsxs)(ht.a,iF({ref:this._formRef,layout:"vertical",onValuesChange:this.handleChange,requiredMark:!0},{children:[Object(o.jsx)(mt.a,iF({},this._formItems.get(nF.name),{initialValue:null===(e=this.state.institutionLocation)||void 0===e?void 0:e.name},_t.getValidation(nF.name,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,iF({},this._formItems.get(nF.street1),{initialValue:null===(t=this.state.institutionLocation)||void 0===t?void 0:t.street1},_t.getValidation(nF.street1,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,iF({},this._formItems.get(nF.street2),{initialValue:null===(n=this.state.institutionLocation)||void 0===n?void 0:n.street2},_t.getValidation(nF.street2,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,iF({},this._formItems.get(nF.city),{initialValue:null===(r=this.state.institutionLocation)||void 0===r?void 0:r.city},_t.getValidation(nF.city,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,iF({},this._formItems.get(nF.state),{initialValue:null===(i=this.state.institutionLocation)||void 0===i?void 0:i.state},_t.getValidation(nF.state,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,iF({},this._formItems.get(nF.zip),{initialValue:null===(a=this.state.institutionLocation)||void 0===a?void 0:a.zip},_t.getValidation(nF.zip,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,iF({},this._formItems.get(nF.phone),{initialValue:null===(s=this.state.institutionLocation)||void 0===s?void 0:s.phone},_t.getValidation(nF.phone,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{placeholder:"###-###-#####",disabled:this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,iF({},this._formItems.get(nF.fax),{initialValue:null===(d=this.state.institutionLocation)||void 0===d?void 0:d.fax},_t.getValidation(nF.fax,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{placeholder:"###-###-#####",disabled:this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,iF({},this._formItems.get(nF.isPrimary),{initialValue:null===(c=this.state.institutionLocation)||void 0===c?void 0:c.isPrimary},_t.getValidation(nF.isPrimary,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(eF.a,{defaultChecked:null===(l=this.state.institutionLocation)||void 0===l?void 0:l.isPrimary,disabled:this.state.loading||this.state.submitting},void 0)}),void 0)]}),void 0)}),void 0)},t.prototype.renderErrors=function(){if(this.state.error)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t}(a.Component),aF=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),sF=function(){return sF=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},sF.apply(this,arguments)},dF=function(e){function t(t){var n=e.call(this,t)||this;return n._addInstitutionLocationFormRef=a.createRef(),n.triggerRefresh=function(){var e;null===(e=n._dataTable)||void 0===e||e.refresh()},n.getColumnDefinitions=function(){return[{title:"",width:15,align:"center",dataIndex:Zq.primary,render:function(e,t){if(t.primary)return Object(o.jsx)(Jq.a,{},void 0)}},{title:"Name",dataIndex:Zq.name,sorter:!0,filterType:wr.Text},{title:"Address",dataIndex:Zq.address,sorter:!0,filterType:wr.Text},{title:"Phone",dataIndex:Zq.phone,sorter:!0,filterType:wr.Text},{title:"Fax",dataIndex:Zq.fax,sorter:!0,filterType:wr.Text},{title:"",dataIndex:Zq.id,width:"25px",render:function(e,t){if(Je.isAuthorized([gn.EDIT_INSTITUTION_LOCATION]))return Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(rt.a,sF({type:"link",className:"ant-btn",onClick:function(){var e;return n.addLocation(null!==(e=t.id)&&void 0!==e?e:re.default.Empty())}},{children:Object(o.jsx)(Ei.a,{},void 0)}),void 0),Object(o.jsx)(rt.a,sF({type:"link",className:"ant-btn",onClick:function(){var e;return n.promptConfirmRemove(null!==(e=t.id)&&void 0!==e?e:re.default.Empty())}},{children:Object(o.jsx)(Yd.a,{},void 0)}),void 0)]},void 0)},sorter:!1,filterType:wr.NONE}]},n.handleRemoveLocation=function(e){n.setState({submitting:!0});var t=$q({institutionLocationId:e});wc.removeInstitutionLocation(t).then((function(e){n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,altered:!(null===e||void 0===e?void 0:e.succeeded)}),!0===(null===e||void 0===e?void 0:e.succeeded)?S.b.success("Location was removed."):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(e){n.setState({error:e}),S.b.error("Location could not be removed.")})).finally((function(){n.setState({loading:!1}),n.triggerRefresh()}))},n.promptConfirmRemove=function(e){f.a.confirm({title:"Are you sure you want to remove this loation?",okText:"Remove Location",onOk:function(){return n.handleRemoveLocation(e)}})},n.addLocation=function(e){n.setState({institutionLocationId:e},(function(){return n.openModal()}))},n.openModal=function(){n.setState({addLocation:!0}
1)},n.submitAddLocation=function(){var e;null===(e=n._addInstitutionLocationFormRef.current)||void 0===e||e.submit()},n.cancelAddLocation=function(){var e;n.setState({addLocation:!1}),null===(e=n._addInstitutionLocationFormRef.current)||void 0===e||e.reset()},n.locationAdded=function(){var e;n.setState({addLocation:!1}),null===(e=n._dataTable)||void 0===e||e.refresh()},n.state={addLocation:!1,institutionLocationId:re.default.Empty()},n}return aF(t,e),t.prototype.render=function(){return Object(o.jsxs)(o.Fragment,{children:[this.renderAddLocationModal(),this.renderDataTable()]},void 0)},t.prototype.renderAddLocationModal=function(){return Object(o.jsx)(f.a,sF({visible:this.state.addLocation,title:"Institution Location",okText:"Save",onOk:this.submitAddLocation,onCancel:this.cancelAddLocation},{children:Object(o.jsx)(oF,{ref:this._addInstitutionLocationFormRef,institutionId:this.props.institutionId,onSuccess:this.locationAdded,institutionLocationId:this.state.institutionLocationId},void 0)}),void 0)},t.prototype.renderDataTable=function(){var e=this,t=[];return t.push(oo.Reset()),Je.isAuthorized([gn.EDIT_INSTITUTION_LOCATION])&&t.push(oo.Default("Add Location",(function(){return e.addLocation(re.default.Empty())}))),Object(o.jsx)(io,{ref:function(t){return e._dataTable=t},serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:t,columns:this.getColumnDefinitions(),fetchData:{fetch:function(t){return wc.getInstitutionLocationsDataTable(t,e.props.institutionId)}},stateSaving:{enabled:!0,tableUniqueKey:"institution_location_list"}},void 0)},t}(a.Component),cF=function(e){return Object.assign({creditMinutes:[]},e)},lF={className:"InstitutionCreditTypeMinuteDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",institutionId:"00000000-0000-0000-0000-000000000000",creditTypeId:"00000000-0000-0000-0000-000000000000",minutes:0,creditType:null},e)},id:"id",institutionId:"institutionId",creditTypeId:"creditTypeId",minutes:"minutes",creditType:"creditType"},uF=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),pF=function(){return pF=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},pF.apply(this,arguments)},fF=function(e){function t(t){var n=e.call(this,t)||this;return n._formItems=new Map,n._formRef=a.createRef(),n.loadCreditMinutes=function(){return Xq.getInstituionCreditTypeMinutesTableData(n.props.institutionId).then((function(e){var t;n.setState({institutionCreditTypeMinutes:null!==(t=e.creditMinutes)&&void 0!==t?t:[]})})).catch((function(){n.setState({error:!0})}))},n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields()},n.handleSubmit=function(){n.setState({submitting:!0});for(var e=n._formRef?n._formRef.current.getFieldsValue():null,t=[],r=0;r<n.state.institutionCreditTypeMinutes.length;r++){var i=n.state.institutionCreditTypeMinutes[r],o=lF.create({creditTypeId:i.creditTypeId,institutionId:n.props.institutionId,minutes:e[i.creditTypeId+"minutes"]});t.push(o)}var a=cF({creditMinutes:t});Xq.saveInstitutionCreditTypeMinute(a).then((function(e){e.succeeded?(S.b.success("Saved"),n.reloadTableData().then((function(){n.props.onSave&&n.props.onSave()}))):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(e){n.setState({error:e}),S.b.error(e.message)})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.reloadTableData=function(){return n.loadCreditMinutes().then((function(){n.forceUpdate()}))},n.handleChange=function(){n.setState({altered:!0})},n.getColumnDefinitions=function(){return[{title:"Credit Type",dataIndex:lF.creditTypeId,render:function(e,t){var n;return null===(n=t.creditType)||void 0===n?void 0:n.name}},{title:"Minutes",dataIndex:lF.minutes,render:function(e,t){var r,i=(null===(r=t.creditType)||void 0===r?void 0:r.name)+" Minutes";return Object(o.jsx)(mt.a,pF({},n._formItems.get(t.creditTypeId+lF.minutes),{initialValue:t.minutes},_t.getValidation(t.creditTypeId+lF.minutes,n.state.fieldErrors,n.state.submitted),{children:Object(o.jsx)(ut.a,{title:i,type:"number",min:0,max:1e5,disabled:!n.props.isEditing||n.state.loading||n.state.submitting,defaultValue:t.minutes},void 0)}),void 0)}}]},n.addRowToFormItems=function(e){n._formItems.set(e+lF.minutes,{name:e+lF.minutes}).set(e,{name:e})},n.state={updateMinutes:!1,institutionCreditTypeMinutes:[]},n}return uF(t,e),t.prototype.componentDidMount=function(){this.loadCreditMinutes()},t.prototype.render=function(){return this.state.loading&&this.props.institutionId==re.default.Empty()?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(y.b,pF({size:"small",direction:"vertical"},{children:[this.renderErrors(),Object(o.jsxs)(Ci.a,pF({ref:this._formRef,layout:"vertical",onValuesChange:this.handleChange,onFinish:this.handleSubmit},{children:[Object(o.jsx)(y.b,pF({direction:"vertical"},{children:this.renderTableInputs()}),void 0),Object(o.jsx)(y.b,pF({direction:"vertical",style:{marginTop:24}},{children:this.renderSave()}),void 0)]}),void 0)]}),void 0)},t.prototype.renderTableInputs=function(){for(var e,t=[],n=0;n<this.state.institutionCreditTypeMinutes.length;n++){var r=this.state.institutionCreditTypeMinutes[n];this.addRowToFormItems(null!==(e=r.creditTypeId)&&void 0!==e?e:re.default.Empty()),t.push(r)}return Object(o.jsx)(Pi.a,{pagination:!1,dataSource:t,columns:this.getColumnDefinitions()},void 0)},t.prototype.renderSave=function(){if(this.props.isEditing)return Object(o.jsx)(Ze,pF({validFeatureFlags:[gn.EDIT_INSTITUTION_CREDIT_TYPE_MINUTE]},{children:Object(o.jsxs)(y.b,pF({direction:"horizontal"},{children:[Object(o.jsx)(Tr,{disabled:!br.canSubmit(this._formRef,this._formItems)||!this.props.isEditing||this.state.loading||this.state.submitting,saving:this.state.submitting},void 0),Object(o.jsx)(Ir,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting,onConfirm:this.resetForm},void 0)]}),void 0)}),void 0)},t.prototype.renderErrors=function(){if(this.state.error&&this.state.message)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t}(a.Component),hF=function(e){return Object.assign({institutionId:null,institution:null},e)},vF=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),mF=function(){return mF=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},mF.apply(this,arguments)},gF=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._formItems=(new Map).set(ne.name,{required:!0,name:ne.name,label:"Name",rules:[Ot.required(),Ot.maxLength(150)]}).set(ne.abbreviation,{required:!0,name:ne.abbreviation,label:"Abbreviation",rules:[Ot.required(),Ot.maxLength(10)]}).set(ne.code,{required:!0,name:ne.code,label:"Code",rules:[Ot.required(),Ot.onlyNumericCharacters()]}),n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields()},n.loadExisting=function(){var e;return n.setState({loading:!0}
1),Xq.getInstitutionDetails(null!==(e=n.props.institution.id)&&void 0!==e?e:re.default.Empty()).then((function(e){var t,r;e&&(n.setState({institution:null!==(t=e.institution)&&void 0!==t?t:ne.create()}),null===(r=n._formRef.current)||void 0===r||r.resetFields())})).catch((function(){n.setState({error:!0})}))},n.handleSubmit=function(){n.setState({submitting:!0});var e=hF({institutionId:n.state.institution.id,institution:ne.create(n._formRef?n._formRef.current.getFieldsValue():null)});Xq.saveInstitutionDetails(e).then((function(e){var t,r;n.setState({submitted:!0}),(null===e||void 0===e?void 0:e.succeeded)?(n.setState({institution:null!==(t=null===e||void 0===e?void 0:e.institution)&&void 0!==t?t:ne.create()}),S.b.success("Saved"),n.props.onSave&&(null===(r=e.institution)||void 0===r?void 0:r.id)&&(n.props.onSave(e.institution.id),n.resetForm())):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Error Saving"))})).catch((function(e){n.setState({error:e}),S.b.error("Error Saving")})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.handleChange=function(){n.setState({altered:!0})},n.state={institution:ne.create({Code:""})},n}return vF(t,e),t.prototype.componentDidMount=function(){var e=this;this.setState({institution:this.props.institution},(function(){return e.resetForm()}))},t.prototype.componentDidUpdate=function(e){this.props.institution&&this.props.institution!=e.institution&&this.loadInstitution()},t.prototype.loadInstitution=function(){var e=this;this.setState({loading:!0});var t=[];this.props.institution&&t.push(this.loadExisting()),Promise.all(t).then((function(){e.setState({loading:!1})}))},t.prototype.render=function(){return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(y.b,mF({size:"small",direction:"vertical"},{children:[this.renderErrors(),Object(o.jsxs)(ht.a,mF({ref:this._formRef,layout:"vertical",initialValues:this.state.institution,onValuesChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!0},{children:[Object(o.jsx)(mt.a,mF({},this._formItems.get(ne.name),_t.getValidation(ne.name,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,mF({},this._formItems.get(ne.abbreviation),_t.getValidation(ne.abbreviation,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,mF({},this._formItems.get(ne.code),_t.getValidation(ne.code,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),this.renderSave()]}),void 0)]}),void 0)},t.prototype.renderSave=function(){if(this.props.isEditing)return Object(o.jsx)(Ze,mF({validFeatureFlags:[gn.EDIT_INSTITUTION]},{children:Object(o.jsxs)(y.b,mF({direction:"horizontal"},{children:[Object(o.jsx)(Tr,{disabled:!br.canSubmit(this._formRef,this._formItems),saving:this.state.submitting},void 0),Object(o.jsx)(Ir,{disabled:!br.hasChanged(this._formRef,this._formItems),onConfirm:this.resetForm},void 0)]}),void 0)}),void 0)},t.prototype.renderErrors=function(){if(this.state.error&&this.state.message)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t}(a.Component),bF=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),yF=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return bF(t,e),t.prototype.getInstitutionPresidentDetails=function(e){var t="api/institutionPresident/"+encodeURIComponent(e);return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.saveInstitutionPresident=function(e){var t="api/institutionPresident/save";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t}(U),OF=new yF,jF=function(e){return Object.assign({institutionId:"00000000-0000-0000-0000-000000000000",institutionPresident:null},e)},IF={className:"InstitutionPresidentDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",instituionId:"00000000-0000-0000-0000-000000000000",firstName:"",lastName:"",email:"",ph
1one:""},e)},id:"id",instituionId:"instituionId",firstName:"firstName",lastName:"lastName",email:"email",phone:"phone"},SF=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),EF=function(){return EF=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},EF.apply(this,arguments)},RF=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._formItems=(new Map).set(IF.firstName,{required:!0,name:IF.firstName,label:"First Name",rules:[Ot.maxLength(250),Ot.required()]}).set(IF.lastName,{name:IF.lastName,required:!0,label:"Last Name",rules:[Ot.maxLength(250),Ot.required()]}).set(IF.email,{required:!0,name:IF.email,label:"Email",rules:[Ot.maxLength(250),Ot.required()]}).set(IF.phone,{name:IF.phone,label:"Phone Number",rules:[Ot.maxLength(12),Ot.phoneNumberValidator()]}),n.loadExisting=function(){return OF.getInstitutionPresidentDetails(n.props.institutionId).then((function(e){var t;(null===(t=e.institutionPresident)||void 0===t?void 0:t.id)&&n.setState({institutionPresident:e.institutionPresident}),n.reset()})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))},n.loadNew=function(){n.setState({institutionPresident:IF.create()},(function(){return n.reset()})),n.setState({loading:!1})},n.submit=function(){n.handleSubmit()},n.reset=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields()},n.handleChange=function(){n.setState({altered:!0})},n.handleSubmit=function(){n.setState({submitting:!0});var e=jF({institutionId:n.props.institutionId,institutionPresident:IF.create(n._formRef?n._formRef.current.getFieldsValue():null)});OF.saveInstitutionPresident(e).then((function(e){(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.setState({institutionPresident:e.institutionPresident}),n.props.onSuccess&&n.props.onSuccess()):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("President could not be saved. "+n.state.message))})).catch((function(e){n.setState({error:e}),S.b.error("President could not be saved.")})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.state={institutionPresident:IF.create()},n}return SF(t,e),t.prototype.componentDidMount=function(){this.setState({loading:!0}),this.loadInstitutionPresident()},t.prototype.componentDidUpdate=function(e){this.props.institutionId&&this.props.institutionId!=re.default.Empty()&&this.props.institutionId!=e.institutionId&&this.loadInstitutionPresident()},t.prototype.loadInstitutionPresident=function(){return this.props.institutionId==re.default.Empty()?this.loadNew():this.loadExisting()},t.prototype.render=function(){var e,t,n,r;return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsx)(y.b,EF({size:"small",direction:"vertical"},{children:Object(o.jsxs)(ht.a,EF({ref:this._formRef,layout:"vertical",onValuesChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!0},{children:[Object(o.jsx)(mt.a,EF({},this._formItems.get(IF.firstName),{initialValue:null===(e=this.state.institutionPresident)||void 0===e?void 0:e.firstName},_t.getValidation(IF.firstName,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,EF({},this._formItems.get(IF.lastName),{initialValue:null===(t=this.state.institutionPresident)||void 0===t?void 0:t.lastName},_t.getValidation(IF.lastName,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,EF({},this._formItems.get(IF.email),{initialValue:null===(n=this.state.institutionPresident)||void 0===n?void 0:n.email},_t.getValidation(IF.email,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,EF({},this._formItems.get(IF.phone),{initialValue:null===(r=this.state.institutionPresident)||void 0===r?void 0:r.phone},_t.getValidation(IF.phone,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{placeholder:"###-###
1-#####",disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),this.renderSave()]}),void 0)}),void 0)},t.prototype.renderSave=function(){if(this.props.isEditing)return Object(o.jsx)(Ze,EF({validFeatureFlags:[gn.EDIT_INSTITUTION_PRESIDENT]},{children:Object(o.jsxs)(y.b,EF({direction:"horizontal"},{children:[Object(o.jsx)(Tr,{htmlType:"submit",disabled:!br.canSubmit(this._formRef,this._formItems)||!this.props.isEditing||this.state.loading||this.state.submitting,saving:this.state.submitting},void 0),Object(o.jsx)(Ir,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting,onConfirm:this.reset},void 0)]}),void 0)}),void 0)},t.prototype.renderErrors=function(){if(this.state.error)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t}(a.Component),_F=function(e){return Object.assign({institutionId:null},e)},TF=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),CF=function(){return CF=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},CF.apply(this,arguments)},xF=function(e){function t(n){var r=e.call(this,n)||this;return r._institutionDetailsRef=a.createRef(),r._institutionlocationDataTableRef=a.createRef(),r._institutionPresidentFormRef=a.createRef(),r._institutionCreditTypeMinuteFormeRef=a.createRef(),r.loadInstitution=function(e){r.setState({loading:!0}),Xq.getInstitutionDetails(e).then((function(t){t.institution&&r.setState({institutionId:e,institution:t.institution})})).catch((function(){r.setState({error:!0})})).finally((function(){r.setState({loading:!1})}))},r.toggleIsEditing=function(e,n){var i,o,a,s;if(r.state.editings){var d=r.state.editings;if(void 0!==n?d.set(e,n):d.set(e,null===(i=!d.get(e))||void 0===i||i),!d.get(e))switch(e){case t.INSTITUTION_DETIALS:null===(o=r._institutionDetailsRef.current)||void 0===o||o.resetForm();break;case t.INSTITUTION_MINUTES:null===(a=r._institutionCreditTypeMinuteFormeRef.current)||void 0===a||a.resetForm();break;case t.INSTITUTION_PRESIDENT:null===(s=r._institutionPresidentFormRef.current)||void 0===s||s.reset()}r.setState({editings:d})}},r.instituitionDetailsSaved=function(e){r.setState({isEditing:!1}),e!=r.state.institutionId?T.replace(x.generate(x.INSTITUTION_DETAILS,{id:e})):r.loadInstitution(e)},r.deleteConfirmation=function(e){f.a.confirm({title:"Are you sure you want to delete this Institution?",okText:"Delete",onOk:function(){return r.deleteInstitution(e)}})},r.deleteInstitution=function(e){r.setState({submitting:!0});var t=_F({institutionId:e});Xq.deleteInstitution(t).then((function(e){r.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,altered:!(null===e||void 0===e?void 0:e.succeeded)}),!0===(null===e||void 0===e?void 0:e.succeeded)?S.b.success("Institution was removed."):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(e){r.setState({error:e}),S.b.error("Institution could not be removed.")})).finally((function(){r.setState({loading:!1}),r.goToInstitutions()}))},r.institutionLocationAdded=function(){var e,t;null===(t=null===(e=r._institutionlocationDataTableRef)||void 0===e?void 0:e.current)||void 0===t||t.triggerRefresh()},r.institutionCreditTypeMinuteUpdated=function(){r.toggleIsEditing(t.INSTITUTION_MINUTES)},r.institutionPresidentUpdated=function(){r.toggleIsEditing(t.INSTITUTION_PRESIDENT)},r.goToInstitutions=function(){T.push(x.generate(x.INSTITUTIONS))},r.state={institutionId:re.default.Empty(),editings:new Map},r}return TF(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");"new"==e?(this.setState({isEditing:!0}),this.toggleIsEditing(t.INSTITUTION_DETIALS)):this.loadInstitution(e)},t.prototype.render=function(){var e,t,n,r;if(this.state.loading)return Object(o.jsx)(pt.a,{active:!0},void 0);var i=this.state.loading?"...":this.state.institutionId==re.default.Empty()?"New Institution":null!==(t=null===(e=this.state.institution)||void 0===e?void 0:e.abbreviation)&&void 0!==t?t:"...",a=this.state.loading?"...":this.state.institutionId==re.default.Empty()?"New Institution":null!==(r=null===(n=this.state.institution)||void 0===n?void 0:n.name)&&void 0!==r?r:"...",s=Xn.institutionDetail
1s(i,this.state.institutionId),d=void 0;return null!=this.props.institution&&void 0!=this.props.institution?(s=Xn.singleInstitutionDetails(i,this.state.institutionId),d=void 0):d=this.goToInstitutions,Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:a,pageTitle:i,onBack:d,showBack:null==this.props.institution||void 0==this.props.institution,breadcrumbs:s,loading:this.state.loading,extra:this.renderMoreActions()},void 0),Object(o.jsx)(zr,{when:this.state.isEditing},void 0),Object(o.jsxs)(y.b,CF({direction:"vertical",size:"middle"},{children:[this.renderDetailsCard(),this.renderInstitutionCreditTypeMinutesCard(),this.renderInstitutionLocationsCard()]}),void 0)]},void 0)},t.prototype.renderDetailsCard=function(){var e,n=this;if(this.state.editings){var r=this.state.institutionId==re.default.Empty()?null:Object(o.jsx)(Ze,CF({validFeatureFlags:[gn.EDIT_INSTITUTION]},{children:Object(o.jsx)(Br,{onClick:function(){return n.toggleIsEditing(t.INSTITUTION_DETIALS)},isEditing:this.state.editings.get(t.INSTITUTION_DETIALS)},void 0)}),void 0);return Object(o.jsx)(Qn.a,CF({title:"Details",extra:r},{children:Object(o.jsx)(gF,{ref:this._institutionDetailsRef,institution:null!==(e=this.state.institution)&&void 0!==e?e:ne.create(),isEditing:this.state.editings.get(t.INSTITUTION_DETIALS),onSave:this.instituitionDetailsSaved},void 0)}),void 0)}},t.prototype.renderInstitutionCreditTypeMinutesCard=function(){var e=this;if(this.state.editings){var n=this.state.institutionId==re.default.Empty()?null:Object(o.jsx)(Ze,CF({validFeatureFlags:[gn.EDIT_INSTITUTION_CREDIT_TYPE_MINUTE]},{children:Object(o.jsx)(Br,{onClick:function(){return e.toggleIsEditing(t.INSTITUTION_MINUTES)},isEditing:this.state.editings.get(t.INSTITUTION_MINUTES)},void 0)}),void 0);if(this.state.institutionId!=re.default.Empty()&&Je.isAuthorized([gn.VIEW_INSTITUTION_CREDIT_TYPE_MINUTE]))return Object(o.jsx)(Qn.a,CF({title:"Minutes Per Credit Breakdowns",extra:n},{children:Object(o.jsx)(y.b,CF({direction:"vertical"},{children:Object(o.jsx)(fF,{ref:this._institutionCreditTypeMinuteFormeRef,isEditing:this.state.editings.get(t.INSTITUTION_MINUTES),onSave:this.institutionCreditTypeMinuteUpdated,institutionId:this.state.institutionId},void 0)}),void 0)}),void 0)}},t.prototype.renderInstitutionLocationsCard=function(){if(this.state.institutionId!=re.default.Empty()&&Je.isAuthorized([gn.VIEW_INSTITUTION_LOCATION]))return Object(o.jsx)(Qn.a,CF({title:"Locations"},{children:Object(o.jsx)(y.b,CF({direction:"vertical"},{children:Object(o.jsx)(dF,{ref:this._institutionlocationDataTableRef,triggerUpdate:this.institutionLocationAdded,institutionId:this.state.institutionId},void 0)}),void 0)}),void 0)},t.prototype.renderPresident=function(){var e=this;if(this.state.editings){var n=this.state.institutionId==re.default.Empty()?null:Object(o.jsx)(Ze,CF({validFeatureFlags:[gn.EDIT_INSTITUTION_PRESIDENT]},{children:Object(o.jsx)(Br,{onClick:function(){return e.toggleIsEditing(t.INSTITUTION_PRESIDENT)},isEditing:this.state.editings.get(t.INSTITUTION_PRESIDENT)},void 0)}),void 0);if(this.state.institutionId!=re.default.Empty()&&Je.isAuthorized([gn.VIEW_INSTITUTION_PRESIDENT]))return Object(o.jsx)(Qn.a,CF({title:"President",extra:n},{children:Object(o.jsx)(y.b,CF({direction:"vertical"},{children:Object(o.jsx)(RF,{ref:this._institutionPresidentFormRef,isEditing:this.state.editings.get(t.INSTITUTION_PRESIDENT),onSuccess:this.institutionPresidentUpdated,institutionId:this.state.institutionId},void 0)}),void 0)}),void 0)}},t.prototype.renderMoreActions=function(){var e=this,t=Object(o.jsx)(Gt.a,{children:Object(o.jsx)(Gt.a.Item,CF({title:"Delete Institution",onClick:function(){return e.deleteConfirmation(e.state.institutionId)}},{children:"Delete Institution"}),this.state.institutionId)},void 0);return Object(o.jsx)(Ze,CF({validFeatureFlags:[gn.EDIT_INSTITUTION]},{children:Object(o.jsx)(la.a,CF({overlay:t},{children:Object(o.jsx)(rt.a,CF({size:"large",type:"link"},{children:Object(o.jsx)(aa.a,{},void 0)}),void 0)}),void 0)}),void 0)},t.INSTITUTION_DETIALS="INSTITUTION_DETIALS",t.INSTITUTION_MINUTES="INSTITUTION_MINUTES",t.INSTITUTION_PRESIDENT="INSTITUTION_PRESIDENT",t}(a.Component);var AF=Object(u.i)(Object(l.b)((function(e){return{institution:e.Institution.Selected}}))(xF)),PF=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),NF=function(e){function t(t){var n=e.call(this,t)||this;return n.getColumnDefinitions=function(){return[{title:"Code",dataIndex:ne.code,sorter:!0,filterType:wr.Text},{title:"Abbreviation",dataIndex:ne.abbreviation,sorter:!0,filterType:wr.Text},{title:"Name",dataIndex:ne.name,sorter:!0,filterType:wr.Text}]},n.openInstitution=function(e){e.id&&T.push(x.generate(x.INSTITUTION_DETAILS,{id:e.id},{}))},n.addInstitution=function(){T.push(x.generate(x.NEW_INSTITUTION)
1)},n}return PF(t,e),t.prototype.render=function(){var e=this,t=[];return t.push(oo.Reset()),Je.isAuthorized([gn.EDIT_INSTITUTION])&&t.push(oo.Default("New Institution",(function(){return e.addInstitution()}))),Object(o.jsx)(io,{ref:function(t){return e._dataTable=t},onRowClick:this.openInstitution,serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:t,columns:this.getColumnDefinitions(),fetchData:{fetch:function(e){return Xq.getInstitutionTableData(e)}},stateSaving:{enabled:!0,tableUniqueKey:"institution_list"}},void 0)},t}(a.Component),wF=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),DF=function(e){function t(t){var n=e.call(this,t)||this;return n.goToConfig=function(){T.push(x.generate(x.POST_SECONDARY_HOME))},n}return wF(t,e),t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Community Colleges",onBack:this.goToConfig,breadcrumbs:Xn.institutionList()},void 0),Object(o.jsx)(Qn.a,{children:Object(o.jsx)(NF,{},void 0)},void 0)]},void 0)},t}(a.Component),qF=Object(u.i)(DF),FF=function(){function e(){}return e.ACTIVE=1,e.REMOVED=2,e.INACTIVE=3,e.PENDING=4,e}(),MF={className:"InstitutionUserDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",institutionId:"00000000-0000-0000-0000-000000000000",userId:"00000000-0000-0000-0000-000000000000",statusTypeId:0,institution:null,user:null,emailAddress:"",fullName:"",createdOn:new Date(0).toISOString(),removedOn:null,roleIds:[],roles:[],statusType:null},e)},id:"id",institutionId:"institutionId",userId:"userId",statusTypeId:"statusTypeId",institution:"institution",user:"user",emailAddress:"emailAddress",fullName:"fullName",createdOn:"createdOn",removedOn:"removedOn",roleIds:"roleIds",roles:"roles",statusType:"statusType"},YF=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),UF=function(){return UF=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},UF.apply(this,arguments)},LF=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n.loadExisting=function(e,t){Bp.getInstitutionUserDetails(e,t).then((function(e){n.setState({institutionUser:e.institutionUser})})).catch((function(){n.setState({error:!0})}))},n.loadStatusTypes=function(){return ce.getAll(gi.className).then((function(e){e&&n.setState({statusTypes:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n._formItems=(new Map).set(MF.statusTypeId,{name:MF.statusTypeId,label:"Status: "}).set(MF.createdOn,{name:MF.createdOn,label:"Date Added:"}).set(MF.removedOn,{name:MF.removedOn,label:"Date Removed"}),n.handleChange=function(){n.setState({altered:!0})},n.state={institutionUser:null,statusTypes:[],loading:!0},n}return YF(t,e),t.prototype.componentDidMount=function(){this.loadInstitutionUser()},t.prototype.componentDidUpdate=function(e){this.props.institutionId!=re.default.Empty()&&this.props.institutionId!=e.institutionId&&this.loadInstitutionUser()},t.prototype.loadInstitutionUser=function(){var e=this;this.setState({loading:!0});var t=[];0==this.state.statusTypes.length&&t.push(this.loadStatusTypes()),this.props.institutionId!=re.default.Empty()&&t.push(this.loadExisting(this.props.userId,this.props.institutionId)),Promise.all(t).then((function(){e.setState({loading:!1})}))},t.prototype.render=function(){var e,t,n;return this.state.loading||null==this.state.institutionUser||void 0==this.state.institutionUser?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(ht.a,UF({ref:this._formRef,layout:"vertical",requiredMark:!0,initialValues:this.state.institutionUser},{children:[Object(o.jsx)(mt.a,UF({},this._formItems.get(MF.statusTypeId),{children:Object(o.jsx)(ud,{text:null===(t=null===(e=this.state.institutionUser)||void 0===e?void 0:e.statusType)||void 0===t?void 0:t.name},void 0)}),void 0),Object(o.jsx)(mt.a,UF({}
1,this._formItems.get(MF.createdOn),{children:Object(o.jsx)(ud,{text:$r.longDate(null===(n=this.state.institutionUser)||void 0===n?void 0:n.createdOn)},void 0)}),void 0),this.renderRemovedDate()]}),void 0)},t.prototype.renderRemovedDate=function(){var e;if((null===(e=this.state.institutionUser)||void 0===e?void 0:e.statusTypeId)==FF.REMOVED&&this.state.institutionUser.removedOn)return Object(o.jsx)(mt.a,UF({},this._formItems.get(MF.removedOn),{children:Object(o.jsx)(ud,{value:$r.dateAndTime(this.state.institutionUser.removedOn)},void 0)}),void 0)},t}(a.Component),kF=function(e){return Object.assign({userId:"00000000-0000-0000-0000-000000000000",insttutionId:"00000000-0000-0000-0000-000000000000",roleStatuses:[]},e)},GF=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),VF=function(){return VF=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},VF.apply(this,arguments)},BF=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields(),n.setState({altered:!1})},n.loadInstitutionUserRoles=function(){Bp.getInstitutionRolesForInsitutionUser(n.props.userId,n.props.institutionId).then((function(e){e&&e.institutionUserRoles&&n.setState({institutionRoles:e.institutionUserRoles},(function(){return n.resetForm()}))})).catch((function(e){n.setState({error:!0,message:e})})).finally((function(){n.setState({loading:!1})}))},n.handleSubmit=function(){var e;n.setState({submitting:!0});for(var t=n._formRef?n._formRef.current.getFieldsValue():null,r=n.state.institutionRoles,i=0;i<r.length;i++)r[i].isEnabled=t[null===(e=r[i].role)||void 0===e?void 0:e.id];var o=kF({roleStatuses:r,insttutionId:n.props.institutionId,userId:n.props.userId});Vx.saveInstitutionUserRoles(o).then((function(e){e&&(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,altered:!(null===e||void 0===e?void 0:e.succeeded)}),e.succeeded?(n.setState({institutionRoles:o.roleStatuses}),xi.a.success({message:"Success!",description:"User roles have been saved."}),n.props.onSave&&n.props.onSave()):xi.a.error({message:"Uh Oh!",description:null===e||void 0===e?void 0:e.errors.join("\n")}))})).catch((function(e){n.setState({error:e}),xi.a.error({message:"Uh oh!",description:"Roles could not be saved."})})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.handleChange=function(){n.setState({altered:!0})},n.state={institutionRoles:[],loading:!0},n}return GF(t,e),t.prototype.componentDidMount=function(){this.setState({loading:!0})},t.prototype.componentDidUpdate=function(){0==this.state.institutionRoles.length&&this.loadInstitutionUserRoles()},t.prototype.render=function(){return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsx)(Ci.a,VF({ref:this._formRef,layout:"vertical",onChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!0},{children:Object(o.jsxs)(y.b,VF({direction:"vertical",size:"small"},{children:[this.renderInstitutionRoles(),this.renderActions()]}),void 0)}),void 0)},t.prototype.renderActions=function(){if(this.props.isEditing&&Je.
1isAuthorized([gn.MANAGE_INSTITUTION_USER]))return Object(o.jsxs)(y.b,VF({direction:"horizontal",wrap:!0},{children:[Object(o.jsx)(Tr,{disabled:this.state.loading,saving:this.state.submitting,saved:this.state.saved},void 0),Object(o.jsx)(Ir,{disabled:!this.state.altered,resetting:this.state.resetting,onConfirm:this.resetForm.bind(this)},void 0)]}),void 0)},t.prototype.renderInstitutionRoles=function(){var e=this;if(this.state.institutionRoles.length){var t=this.state.institutionRoles.map((function(t){return e.renderRole(t)}));return Object(o.jsx)(y.b,VF({direction:"horizontal",wrap:!0,size:"small"},{children:t}),void 0)}},t.prototype.renderRole=function(e){if(null!=e&&null!=e.role)return Object(o.jsx)(mt.a,VF({name:e.role.id,initialValue:e.isEnabled,valuePropName:"checked"},{children:Object(o.jsx)(Ti.a,VF({disabled:!this.props.isEditing||this.state.loading||this.state.submitting},{children:e.role.name}),void 0)}),e.role.id)},t}(a.Component),WF=function(e){return Object.assign({institutionId:"00000000-0000-0000-0000-000000000000",userId:"00000000-0000-0000-0000-000000000000"},e)},zF=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),HF=function(){return HF=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},HF.apply(this,arguments)},QF=function(e){function t(t){var n=e.call(this,t)||this;return n._institutionUserDetailsRef=a.createRef(),n._institutionUserRolesRef=a.createRef(),n.loadInstitutionUser=function(e,t){n.setState({loading:!0}),Bp.getInstitutionUserDetails(e,t).then((function(r){r.institutionUser&&n.setState({institutionId:t,userId:e,institutionUser:r.institutionUser})})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))},n.toggleEdit=function(){var e;n.state.isEditing&&(null===(e=n._institutionUserRolesRef.current)||void 0===e||e.resetForm()),n.setState({isEditing:!n.state.isEditing})},n.instituitionUserRolesSaved=function(){n.setState({isEditing:!1})},n.handleRemoveUser=function(){n.setState({submitting:!0});var e=WF({institutionId:n.state.institutionId,userId:n.state.userId});Bp.removeInstitutionUser(e).then((function(e){n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,altered:!(null===e||void 0===e?void 0:e.succeeded)}),!0===(null===e||void 0===e?void 0:e.succeeded)?(xi.a.success({message:"Success!",description:"Institution User has been removed"}),"users"==n.state.originatingPage?n.goToUser():n.goToInstitution()):xi.a.error({message:"Uh oh!",description:null===e||void 0===e?void 0:e.errors.join("\n")})})).catch((function(e){n.setState({error:e}),xi.a.error({message:"Uh oh!",description:"Institution User could not be removed"})})).finally((function(){n.setState({loading:!1})}))},n.goToInstitution=function(){T.push(x.generate(x.INSTITUTION_DETAILS,{id:n.state.institutionId}))},n.goToUser=function(){T.push(x.generate(x.USER_DETAILS,{id:n.state.userId}))},n.goToUserList=function(){T.push(x.generate(x.USERS))},n.promptConfirmRemove=function(){f.a.confirm({title:"Are you sure you want to remove this user from this institution?",okText:"Remove User",okType:"danger",onOk:n.handleRemoveUser})},n.onBack=function(){T.goBack()},n.state={originatingPage:"",institutionId:re.default.Empty(),userId:re.default.Empty()},n}return zF(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"institutionId"),t=Hr.getPathPart(this.props.match,"userId"),n=this.props.match.path.split("/")[1];this.setState({originatingPage:n}),this.loadInstitutionUser(t,e)},t.prototype.render=function(){var e,t,n,r,i,a,s,d,c,l=this.state.loading?"...":null!==(n=null===(t=null===(e=this.state.institutionUser)||void 0===e?void 0:e.user)||void 0===t?void 0:t.fullName)&&void 0!==n?n:"...",u=this.state.loading?"...":null!==(a=null===(i=null===(r=this.state.institutionUser)||void 0===r?void 0:r.institution)||void 0===i?void 0:i.name)&&void 0!==a?a:"...",p=this.state.loading?"...":null!==(c=null===(d=null===(s=this.state.institutionUser)||void 0===s?void 0:s.institution)||void 0===d?void 0:d.abbreviation)&&void 0!==c?c:"...",f="users"==this.state.originatingPage?Xn.userInstitutionDetials(l,this.state.userId,p,this.state.institutionId):Xn.institutionUserDetails(p,this.state.institutionId,l,this.state.userId);return null!=this.props.institution&&void 0!=this.props.institution&&(f=Xn.userList()),Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:l,breadcrumbs:f,extra:this.renderMoreActions(),onBack:this.onBack,subTitle:u},void 0),Object(o.jsx)(zr,{when:this.state.isEditing},void 0),Object(o.jsxs)(y.b,HF({direction:"vertical",size:"large"},{children:[this.renderDetailsCard(),this.renderRolesCard()]}),void 0)]},void 0)},t.prototype.renderDetailsCard=function(){return Object(o.jsx)(Qn.a,HF({title:"Details"},{children:Object(o.jsx)(LF,{ref:this._institutionUserDetailsRef,institutionId:this.state.institutionId,userId:this.state.userId},void 0)}),void 0)},t.prototype.renderRolesCard=function(){var e=this.state.institutionId==re.default.Empty()?null:Object(o.jsx)(Ze,HF({validFeatureFlags:[gn.MANAGE_INSTITUTION_USER]},{children:Object(o.jsx)(Br,{onClick:this.toggleEdit,isEditing:this.state.isEditing},void 0)}),void 0);return Object(o.jsx)(Qn.a,HF({title:"Roles",extra:e},{children:Object(o.jsx)(BF,{ref:this._institutionUserRolesRef,institutionId:this.state.institutionId,userId:this.state.userId,isEditing:this.state.isEditing,onSave:this.instituitionUserRolesSaved},void 0)}),void 0)},t.prototype.renderMoreActions=function(){var e=this,t=Object(o.jsx)(Gt.a,{children:Object(o.jsx)(Gt.a.Item,HF({onClick:function(){return e.promptConfirmRemove()}},{children:"Remove User"}),this.state.userId)},void 0);return Object(o.jsx)(la.a,HF({overlay:t},{children:Object(o.jsx)(rt.a,HF({size:"large",type:"link"},{children:Object(o.jsx)(aa.a,{},void 0)}),void 0)}),void 0)},t}(a.Component);var KF=Object(u.i)(Object(l.b)((function(e){return{institution:e.Institution.Selected}}))(QF)),XF=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),JF=function(){return JF=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},JF.apply(this,arguments)},$F=function(e){function t(t){var n=e.call(this,t)||this;n.goToPastAnnouncements=function(){T.push(x.generate(x.PAST_ANNOUNCEMENTS))};var r=C.parse(t.location.search);return n.state={returnUrl:r.returnUrl},n}return XF(t,e),t.prototype.render=function(){return Object(o.jsxs)(p.a,{children:[Object(o.jsx)(rr,JF({title:"Welcome to STICS!",breadcrumbs:Xn.home()},{children:Object(o.jsx)(ot.a.Paragraph,{children:"The State of Iowa Curriculum System (STICS) is a curriculum database and program approval system. At the post-secondary level, STICS is used for approval of Career and Technical (CTE) and arts and sciences (A&S) courses and programs at Iowa's fifteen community colleges and the storage of the Iowa community college course numbering system (CCN). At the secondary level, STICS is used for approval of CTE programs at Iowa's public school districts."},void 0)}),void 0),Object(o.jsx)(y.b,JF({direction:"vertical"},{children:Object(o.jsxs)(b.a,JF({gutter:[16,16]},{children:[Object(o.jsx)(m.a,JF({},En.THREE_QUARTERS,{children:Object(o.jsx)(Qn.a,JF({title:"Announcements"},{children:Object(o.jsx)(jo,{includeShown:!1,fetchAmount:4,actionButtonIcon:Object(o.jsx)(tg.a,{},void 0),actionButtonText:"View More",actionButtonAction:this.goToPastAnnouncements,actionAvailable:!0},void 0)}),void 0)}),void 0),Object(o.jsx)(m.a,JF({},En.ONE_QUARTER,{children:Object(o.jsx)(Qn.a,JF({title:"Links"},{children:Object(o.jsxs)(y.b,JF({direction:"vertical"},{children:[Object(o.jsx)(Qn.a,JF({type:"inner",title:"Secondary"},{children:Object(o.jsxs)(ua.b,{children:[Object(o.jsx)(ua.b.Item,{children:Object(o.jsx)(at.a,JF({to:x.generate(x.PUBLIC_DISTRICTS)},{children:"View Districts"}),void 0)},void 0),Object(o.jsx)(ua.b.Item,{children:Object(o.jsx)(at.a,JF({to:x.generate(x.PUBLIC_PROGRAMS)},{children:"View Secondary CTE Programs"}),void 0)},void 0)]},void 0)}),void 0),Object(o.jsx)(Qn.a,JF({type:"inner",title:"Post-Secondary"},{children:Object(o.jsxs)(ua.b,{children:[Object(o.jsx)(ua.b.Item,{children:Object(o.jsx)(at.a,JF({to:x.generate(x.COURSES)},{children:"View Courses"}),void 0)},void 0),Object(o.jsx)(ua.b.Item,{children:Object(o.jsx)(at.a,JF({to:x.generate(x.PROGRAMS)},{children:"View Programs"}),void 0)},void 0),Object(o.jsx)(ua.b.Item,{children:Object(o.jsx)(at.a,JF({to:x.generate(x.CONSULTANTS)},{children:"View Consultants"}),void 0)},void 0),Object(o.jsx)(ua.b.Item,{children:Object(o.jsx)(at.a,JF({to:x.generate(x.RESOURCES)},{children:"View Resources"}),void 0)},void 0)]},void 0)}),void 0)]}),void 0)}),void 0)}),void 0)]}),void 0)}),void 0)]},void 0)},t}(a.Component);var ZF=Object(u.i)(Object(l.b)((function(e){return{user:e.UserSession.Value}}))($F)),eM=n(1527),tM=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),nM=function(e){function t(t){var n=e.call(this,t)||this;return n.getColumnDefinitions=function(){var e=[{title:"Type",dataIndex:hq.workItemTypeId,sorter:!0,filterType:wr.DropdownMulti,dropdownFilterOptions:Ii.GetWorkItemTypes(),render:function(e,t){var n;return null===(n=t.workItemType)||void 0===n?void 0:n.name},width:"200px"},{title:"Details",dataIndex:hq.description,sorter:!1,filterType:wr.NONE,render:function(e,t){return t.description}}];return n.props.userId||e.push({title:"User",sorter:!0,dataIndex:hq.userId,filterType:wr.Text,render:function(e,t){var n;return null===(n=t.user)||void 0===n?void 0:n.display}}),e.push({title:"Created",dataIndex:hq.createdOn,sorter:!0,filterType:wr.DateRange,render:function(e,t){return $r.shortDate(t.createdOn)}},{title:"Status",dataIndex:hq.workItemStatusTypeId,filterType:wr.DropdownMulti,sorter:!0,dropdownFilterOptions:Ii.GetWorkItemStatusTypes(),render:function(e,t){var n;return e===ri.ACTIVE&&$r.isBeforeRange(t.activeOn)?"Upcoming":null===(n=t.workItemStatusType)||void 0===n?void 0:n.name}}),e},n.openWorkItem=function(e){if(e.key){var t=e.key.split("_")[1];switch(e.workItemTypeId){case ii.CHANGEREQUESTDRAFT:n.openChangeRequestDraft(e,t);break;
1case ii.REVIEWCHANGEREQUEST:n.openChangeRequestApproval(e,t);break;case ii.APPROVALREDIRECT:n.openApprovalRedirect(e,t);break;case ii.RESPONSETOSELFSTUDY:case ii.REVISESELFSTUDY:case ii.SUBMITSELFSTUDY:T.push(x.generate(x.SELF_STUDIES_DISPLAY,{id:e.key.split("_")[2]},{}));break;case ii.ASSIGNDISTRICTUSER:case ii.ASSIGNRPPCONSULTANT:case ii.ASSIGNDECONSULTANT:T.push(x.generate(x.SELF_STUDIES_DISPLAY,{id:t},{}))}}},n.openChangeRequestDraft=function(e,t){e.workItemStatusTypeId!=ri.ACTIVE||e.userId!=n.props.currentUserId&&!Je.isAuthorized([gn.OVERRIDE_CHANGE_REQUEST_USER])?T.push(x.generate(x.CHANGE_REQUEST_DETAILS,{id:t},{})):T.push(x.generate(x.CHANGE_REQUEST_DRAFT,{key:t},{}))},n.openChangeRequestApproval=function(e,t){T.push(x.generate(x.CHANGE_REQUEST_APPROVAL,{approvalId:t},{}))},n.openApprovalRedirect=function(e,t){T.push(x.generate(x.CHANGE_REQUEST_APPROVAL_REDIRECT,{approvalId:t},{}))},n.state={institutions:[]},n}return tM(t,e),t.prototype.componentDidMount=function(){var e=this;Ii.Institutions().then((function(t){e.setState({institutions:t})}))},t.prototype.render=function(){var e=this,t=[];return t.push(oo.Reset()),Object(o.jsx)(io,{ref:function(t){return e._dataTable=t},onRowClick:this.openWorkItem,buttonBar:t,serverSide:!0,tableProps:{rowKey:"id",scroll:{x:400}},globalSearch:!1,columns:this.getColumnDefinitions(),fetchData:{fetch:function(t){var n,r;return e.props.userId?fq.getWorkItemsForUser(null!==(n=e.props.userId)&&void 0!==n?n:re.default.Empty(),t):e.props.institutionId?fq.getWorkItemsForInstitution(null!==(r=e.props.institutionId)&&void 0!==r?r:re.default.Empty(),t):fq.getWorkItems(t)}},stateSaving:{enabled:!0,tableUniqueKey:"work_item_list"+this.props.userId}},void 0)},t}(a.Component),rM=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),iM=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return rM(t,e),t.prototype.getServiceAreaTableData=function(e,t){var n="api/serviceAreas",r=n.indexOf("?")>0?"&":"?";return null!=t&&(n+=r+"academicYearId="+t,r="&"),n=n.replace(/null|undefined/gi,""),this.SendRequest(e,"post",n,!0,!1)},t.prototype.getServiceAreaDetails=function(e){var t="api/serviceAreas/"+encodeURIComponent(e);return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.saveServiceAreaDetails=function(e){var t="api/serviceAreas/save";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.deleteServiceArea=function(e){var t="api/serviceAreas/delete";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getServiceAreas=function(e){var t="api/serviceAreas/list",n=t.indexOf("?")>0?"&":"?";return null!=e&&(t+=n+"academicYearId="+e,n="&"),t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t}(U),oM=new iM,aM=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),sM=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return aM(t,e),t.prototype.getServiceAreaAssignmentTableData=function(e,t){var n="api/serviceAreaAssignments",r=n.indexOf("?")>0?"&":"?";return null!=t&&(n+=r+"userId="+encodeURIComponent(t),r="&"),n=n.replace(/null|undefined/gi,""),this.SendRequest(e,"post",n,!0,!1)},t.prototype.addServiceAreaAssignment=function(e){var t="api/serviceAreaAssignments/save";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.removeServiceAreaAssignment=function(e){var t="api/serviceAreaAssignments/delete";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t}(U),dM=new sM,cM=function(e){return Object.assign({userId:"00000000-0000-0000-0000-000000000000",serviceAreaIdentifier:0},e)},lM={className:"ServiceAreaAssignmentDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",serviceAreaIdentifier:0,userId:"00000000-0000-0000-0000-000000000000",user:null},e)},id:"id",serviceAreaIdentifier:"serviceAreaIdentifier",userId:"userId",user:"user"},uM={className:"ServiceAreaDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",serviceAreaIdentifier:0,academicYear:0,description:"",display:""},e)},id:"id",serviceAreaIdentifier:"serviceAreaIdentifier",academicYear:"academicYear",description:"description",display:"display"},pM=function(e){return Object.assign({serviceAreaId:"00000000-0000-0000-0000-000000000000",userId:"00000000-0000-0000-0000-000000000000"},e)},fM="serviceAreaId",hM="userId",vM=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),mM=function(){return mM=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},mM.apply(this,arguments)},gM=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._formItems=(new Map).set(hM,{label:"User",required:!0,name:hM,rules:[Ot.required()]}).set(fM,{label:"Service Area",required:!0,name:fM,rules:[Ot.required()]}),n.fetchData=function(){n.setState({loading:!0});var e=[];n.state.serviceAreas&&0!=n.state.serviceAreas.length||e.push(n.loadServiceArea()),Promise.all(e).then((function(){n.setState({loading:!1})}
1))},n.loadServiceArea=function(){return oM.getServiceAreas(0).then((function(e){var t;e.serviceAreas&&n.setState({serviceAreas:null!==(t=e.serviceAreas)&&void 0!==t?t:[]})}))},n.handleSubmit=function(){var e;n.setState({submitted:!0});var t=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldsValue(),r=pM({userId:n.props.userId,serviceAreaId:t.serviceAreaId});dM.addServiceAreaAssignment(r).then((function(e){(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Service Area Added"),n.setState({submitted:!1,fieldErrors:null})):(n.setState({fieldErrors:e.fieldErrors}),S.b.error("Error Adding Service Area"))})).catch((function(){S.b.error("Error Adding Service Area")}))},n.submit=function(){var e;null===(e=n._formRef.current)||void 0===e||e.validateFields().then((function(){return n.handleSubmit()}),(function(){return n.setState({error:!0})}))},n.handleChange=function(){n.setState({altered:!0})},n.renderServiceArea=function(e){var t,n;if(e.id)return Object(o.jsxs)(pr.a.Option,mM({value:null!==(t=e.id)&&void 0!==t?t:re.default.Empty()},{children:[e.serviceAreaIdentifier," - ",e.description]}),null!==(n=e.id)&&void 0!==n?n:re.default.Empty())},n.state={serviceAreas:[]},n}return vM(t,e),t.prototype.componentDidMount=function(){this.fetchData()},t.prototype.componentDidUpdate=function(e){this.props!=e&&this.fetchData()},t.prototype.render=function(){var e=this;return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsx)(ht.a,mM({ref:this._formRef,layout:"vertical",requiredMark:!0,onFinish:this.handleSubmit},{children:Object(o.jsx)(y.b,mM({size:"small",direction:"vertical"},{children:Object(o.jsx)(mt.a,mM({},this._formItems.get(fM),_t.getValidation(fM,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(hd,mM({dropdownMatchSelectWidth:!1},{children:this.state.serviceAreas.map((function(t){return e.renderServiceArea(t)}))}),void 0)}),void 0)}),void 0)}),void 0)},t.prototype.renderErrors=function(){if(this.state.error)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t}(a.Component),bM=function(){return bM=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},bM.apply(this,arguments)};var yM=function(e){var t=s.a.createRef();return Object(o.jsx)(f.a,bM({visible:e.addServiceAreaModal,title:"New Assigment",okText:"Save",onOk:function(){var e;null===(e=t.current)||void 0===e||e.submit()},okButtonProps:{htmlType:"submit"},onCancel:e.onCancel,cancelText:"Close",destroyOnClose:!0},{children:Object(o.jsx)(gM,{ref:t,isEditing:!0,userId:e.userId},void 0)}),void 0)},OM=function(){return OM=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},OM.apply(this,arguments)};var jM=function(e){var t=void 0,n=Object(a.useState)([]),r=n[0],i=n[1],s=Object(a.useState)(!1),d=s[0],c=s[1];a.useEffect((function(){var e=[];e.push(l()),Promise.all(e).then((function(){u()}))}),[e.userId]);var l=function(){return oM.getServiceAreas(0).then((function(e){e.serviceAreas&&i(e.serviceAreas)}))},u=function(){null===t||void 0===t||t.refresh()},p=function(){c(!1)},h=function(e,t){f.a.confirm({title:"Are you sure you want to remove this Service Area?",okText:"Delete",onOk:function(){return v(e,t)},okButtonProps:{type:"primary",danger:!0}})},v=function(e,t){var n=cM({serviceAreaIdentifier:e,userId:t});dM.removeServiceAreaAssignment(n).then((function(e){!0===(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Removed."),u()):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(){S.b.error("Service Area could not be removed.")}))},m=[];return m.push(oo.Reset()),Je.isAuthorized([gn.EDIT_SERVICE_AREA])&&m.push(oo.Default("Add Service Area",(function(){c(!0)}))),Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(yM,{onCancel:p,addServiceAreaModal:d,visible:d,userId:e.userId,onSave:p},void 0),Object(o.jsx)(io,{ref:function(e){return t=e},serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:m,columns:[{title:"Identifier",dataIndex:lM.serviceAreaIdentifier,sorter:!0,width:25,filterType:wr.Text},{title:"Title",dataIndex:uM.description,render:function(e,t){var n;return null===(n=r.find((function(e){return e.serviceAreaIdentifier==t.serviceAreaIdentifier})))||void 0===n?void 0:n.description},sorter:!0,filterType:wr.DropdownMulti,dropdownFilterOptions:null===r||void 0===r?void 0:r.map((function(e){var t,n;return{text:null!==(t=e.description)&&void 0!==t?t:"",value:null!==(n=e.serviceAreaIdentifier.toString())&&void 0!==n?n:""}})),filterDropdownVisible:!0},{title:"Actions",align:"center",dataIndex:lM.id,sorter:!1,width:50,render:function(e,t){if(Je.isAuthorized([gn.CONFIG_ACADEMIC_YEAR]))return Object(o.jsx)(o.Fragment,{children:Object(o.jsx)(rt.a,OM({type:"link",onClick:function(){var e;return h(t.serviceAreaIdentifier,null!==(e=t.userId)&&void 0!==e?e:re.default.Empty())}},{children:Object(o.jsx)(Yd.a,{},void 0)}),void 0)},void 0)}}],fetchData:{fetch:function(t){return dM.getServiceAreaAssignmentTableData(t,e.userId)}},stateSaving:{enabled:!0,tableUniqueKey:"service_area_list"}},void 0)]},void 0)},IM=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),SM=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return IM(t,e),t.prototype.getCipAssignmentsForUserTableData=function(e,t){var n="api/userCipAssignments/cipAssignmentsForUser",r=n.indexOf("?")>0?"&":"?";return null!=t&&(n+=r+"userId="+encodeURIComponent(t),r="&"),n=n.replace(/null|undefined/gi,""),this.SendRequest(e,"post",n,!0,!1)},t.prototype.assignCipNumberToUser=function(e){var t="api/userCipAssignments/assignCipNumberToUser";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getUserCipAssignmentDataTableExport=function(e,t){var n="api/userCipAssignments/export",r=n.indexOf("?")>0?"&":"?";return null!=t&&(n+=r+"userId="+encodeURIComponent(t),r="&"),n=n.replace(/null|undefined/gi,""),this.SendRequest(e,"post",n,!0,!1)},t.prototype.unassignCipNumberToUser=function(e){var t="api/userCipAssignments/unassignCipNumberToUser";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.searchForCipNumbers=function(e,t){var n="api/userCipAssignments/searchCipNumbers",r=n.indexOf("?")>0?"&":"?";return null!=e&&(n+=r+"searchText="+encodeURIComponent(e),r="&"),null!=t&&(n+=r+"userId="+encodeURIComponent(t),r="&"),n=n.replace(/null|undefined/gi,""),this.SendRequest(null,"post",n,!0,!1)},t}(U),EM=new SM,RM=function(e){return Object.assign({cipNumberId:"00000000-0000-0000-0000-000000000000",userId:"00000000-0000-0000-0000-000000000000"},e)},_M={className:"UserCIPAssignmentDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",cipNumberId:"00000000-0000-0000-0000-000000000000",userId:"00000000-0000-0000-0000-000000000000",cipNumberDis
1play:"",title:"",cipNumber:null,user:null},e)},id:"id",cipNumberId:"cipNumberId",userId:"userId",cipNumberDisplay:"cipNumberDisplay",title:"title",cipNumber:"cipNumber",user:"user"},TM=function(e){return Object.assign({cipNumberId:"00000000-0000-0000-0000-000000000000",userId:"00000000-0000-0000-0000-000000000000"},e)},CM=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),xM=function(){return xM=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},xM.apply(this,arguments)},AM=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n.reset=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields()},n.submit=function(){n.handleSubmit()},n.searchForCipNumbers=function(e,t){EM.searchForCipNumbers(e,t).then((function(e){e.cipNumbers&&n.setState({cipNumberList:e.cipNumbers})})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))},n.handleSubmit=function(){n.setState({submitting:!0});var e=TM({cipNumberId:n.state.selectedCipNumberId,userId:n.props.userId});EM.assignCipNumberToUser(e).then((function(e){n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,altered:!(null===e||void 0===e?void 0:e.succeeded)}),!0===(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("CIP Number has been assigned"),n.props.onAdd&&n.props.onAdd()):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(e){n.setState({error:e}),S.b.error("CIP number could not be assigned")})).finally((function(){n.setState({loading:!1})}))},n.handleSearch=function(e){e.length>=2?n.searchForCipNumbers(e,n.props.userId):n.setState({cipNumberList:[]})},n.handleSelected=function(e,t){n.setState({selectedCipNumberId:t.cip.id})},n.state={cipNumberList:[],selectedCipNumberId:re.default.Empty(),loading:!0},n}return CM(t,e),t.prototype.render=function(){var e=this.state.cipNumberList.map((function(e){var t;return{value:(null!==(t=e.cipNumberDetails)&&void 0!==t?t:[])[0].friendlyDisplay,key:e.id,cip:e}}));return Object(o.jsxs)(O.Content,{children:[this.renderErrors,Object(o.jsx)(Dl.a,xM({ref:this._formRef,layout:"horizontal",onFinish:this.handleSubmit,requiredMark:!0},{children:Object(o.jsx)(ut.a.Group,{children:Object(o.jsx)(mt.a,xM({name:"cipNumberId"},_t.getValidation("CipNumber",this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(Ga.a,xM({options:e,onSearch:this.handleSearch,onSelect:this.handleSelected},{children:Object(o.jsx)(ut.a,{placeholder:"Select CIP Number"},void 0)}),void 0)}),void 0)},void 0)}),void 0)]},void 0)},t.prototype.renderErrors=function(){if(this.state.fieldErrors)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t}(a.Component),PM=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),NM=function(){return NM=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},NM.apply(this,arguments)},wM=function(e){function t(t){var n=e.call(this,t)||this;return n._assignUserCipNumberFormRef=a.createRef(),n.triggerRefresh=function(){var e;null===(e=n._dataTable)||void 0===e||e.refresh()},n.getColumnDefinitions=function(){return[{title:"CIP Number",dataIndex:_M.cipNumberId,render:function(e,t){var n,r,i,o=(null!==(r=null===(n=t.cipNumber)||void 0===n?void 0:n.cipNumberDetails)&&void 0!==r?r:[])[0];return null!==(i=null===o||void 0===o?void 0:o.display)&&void 0!==i?i:"Unknown"},sorter:!0,filterType:wr.Text,width:300},{title:"Title",dataIndex:_M.cipNumber,render:function(e,t){var n,r,i,o=(null!==(r=null===(n=t.cipNumber)||void 0===n?void 0:n.cipNumberDetails)&&void 0!==r?r:[])[0];return null!==(i=null===o||void 0===o?void 0:o.title)&&void 0!==i?i:"Unknown"},sorter:!0,filterType:wr.Text},{title:"Actions",dataIndex:_M.cipNumber,render:function(e,t){if(Je.isAuthorized([gn.EDIT_CIP_NUMBER_ASSIGNMENTS]))return Object(o.jsx)(rt.a,{type:"link",icon:Object(o.jsx)(Yd.a,{},void 0),className:"ant-btn",onClick:function(){return n.promptConfirmRemove(t.cipNumberId)}},void 0)},sorter:!1,filterType:wr.NONE,width:50}]},n.addCipAssignment=function(){n.setState({showCipAssignmentModal:!0})},n.submitAssignCipNumber=function(){var e;null===(e=n._assignUserCipNumberFormRef.current)||void 0===e||e.submit(),n.setState({showCipAssignmentModal:!1}),n.triggerRefresh()},n.cancelAssignCipNumber=function(){var e;n.setState({showCipAssignmentModal:!1}),null===(e=n._assignUserCipNumberFormRef.current)||void 0===e||e.reset(),n.triggerRefresh()},n.cipNumberAssigned=function(){n.setState({showCipAssignmentModal:!1}),n.triggerRefresh()},n.handleUnassignCipNumber=function(e){n.setState({submitting:!0});var t=RM({cipNumberId:e,userId:n.props.userId});EM.unassignCipNumberToUser(t).then((function(e){n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,altered:!(null===e||void 0===e?void 0:e.succeeded)}),!0===(null===e||void 0===e?void 0:e.succeeded)?S.b.success("CIP Number has been unassigned."):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(e){n.setState({error:e}),S.b.error("CIP Number could not be unassigned.")})).finally((function(){n.setState({loading:!1}),n.triggerRefresh()}))},n.promptConfirmRemove=function(e){f.a.confirm({title:"Are you sure you want to unassign this CIP Number",okText:"Unassigning this CIP Number",onOk:function(){return n.handleUnassignCipNumber(e)}})},n.state={showCipAssignmentModal:!1},n}return PM(t,e),t.prototype.render=function(){return Object(o.jsxs)(o.Fragment,{children:[this.renderDataTable(),this.renderAddCipAssignmentModal()]},void 0)},t.prototype.renderDataTable=function(){var e=this,t=[];return t.push(oo.Reset()),t.push(oo.Export((function(t){return e.setState({exporting:!0}),EM.getUserCipAssignmentDataTableExport(t,e.props.userId).then((function(t){e.setState({exporting:!1}),R.a.downloadBase64StringAsFile("User_Cip_Assignment_"+$r.getDateStamp()+".xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",null!==t&&void 0!==t?t:void 0)}))}),this.state.exporting)),Je.isAuthorized([gn.EDIT_CIP_NUMBER_ASSIGNMENTS])&&t.pu
1sh(oo.Default("Assign CIP Number",(function(){return e.addCipAssignment()}))),Je.isAuthorized([gn.VIEW_CIP_NUMBER_ASSIGNMENTS])?Object(o.jsx)(y.b,NM({direction:"vertical"},{children:Object(o.jsx)(io,{ref:function(t){return e._dataTable=t},serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:t,columns:this.getColumnDefinitions(),fetchData:{fetch:function(t){return EM.getCipAssignmentsForUserTableData(t,e.props.userId)}},stateSaving:{enabled:!0,tableUniqueKey:"user_cip_assignment_list"}},void 0)}),void 0):Object(o.jsx)(o.Fragment,{},void 0)},t.prototype.renderAddCipAssignmentModal=function(){return Object(o.jsx)(f.a,NM({visible:this.state.showCipAssignmentModal,title:"Assign CIP Number",okText:"Assign",onOk:this.submitAssignCipNumber,onCancel:this.cancelAssignCipNumber},{children:Object(o.jsx)(AM,{onAdd:this.cipNumberAssigned,userId:this.props.userId,ref:this._assignUserCipNumberFormRef},void 0)}),void 0)},t}(a.Component),DM=function(){return DM=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},DM.apply(this,arguments)};var qM=function(e){return e.userId?Object(o.jsxs)(pa.a,DM({activeKey:e.subTab,onChange:e.onChangeTab},{children:[Object(o.jsx)(pa.a.TabPane,DM({tab:"Service Areas"},{children:Object(o.jsx)(jM,{userId:e.userId},void 0)}),"serviceArea"),Object(o.jsx)(pa.a.TabPane,DM({tab:"CIP Numbers"},{children:Object(o.jsx)(wM,{userId:e.userId},void 0)}),"cipNumber")]}),void 0):Object(o.jsx)(pt.a,{},void 0)},FM=function(e){return Object.assign({institutionId:null,userId:"00000000-0000-0000-0000-000000000000"},e)},MM="institutionId",YM=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),UM=function(){return UM=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},UM.apply(this,arguments)},LM=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._formItems=(new Map).set(MM,{required:!0,name:MM,label:"Please select an institution",rules:[Ot.required(),Ot.maxLength(150)]}),n.loadInstitutions=function(){return ce.getAll(ne.className).then((function(e){e&&n.setState({institutions:null!==e&&void 0!==e?e:[]})}))},n.submit=function(){n.handleSubmit()},n.reset=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields()},n.handleChange=function(){n.setState({altered:!0})},n.handleSubmit=function(){var e;n.setState({submitting:!0});var t=FM(n._formRef?n._formRef.current.getFieldsValue():null);t.userId=null!==(e=n.props.userId)&&void 0!==e?e:re.default.Empty(),Bp.addInstitutionUser(t).then((function(e){var t;n.setState({submitted:!0}),(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("User Added"),n.props.onSuccess&&n.props.onSuccess(),null===(t=n._formRef.current)||void 0===t||t.resetFields(),n.setState({altered:!1}),n.props.onSuccess&&n.props.onSuccess()):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Error Adding User"))})).catch((function(e){n.setState({error:e}),S.b.error("Error Adding User")})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.state={institutions:[]},n}return YM(t,e),t.prototype.componentDidMount=function(){var e=this,t=[];t.push(this.loadInstitutions()),Promise.all(t).then((function(){e.setState({loading:!1})}))},t.prototype.render=function(){var e=this;return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsx)(y.b,UM({size:"small",direction:"vertical"},{children:Object(o.jsx)(ht.a,UM({ref:this._formRef,layout:"vertical",onValuesChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!0},{children:Object(o.jsx)(ht.a.Item,UM({},this._formItems.get(MM),_t.getValidation(MM,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(pr.a,UM({disabled:this.state.loading||this.state.submitting},{children:this.state.institutions.map((function(t){return e.renderInstitution(t)}))}),void 0)}),void 0)}),void 0)}),void 0)},t.prototype.renderInstitution=function(e){if(e.id)return Object(o.jsx)(pr.a.Option,UM({value:e.id},{children:e.name}),e.id)},t}(a.Component),kM=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),GM=function(){return GM=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},GM.apply(this,arguments)},VM=function(e){function t(t){var n=e.call(this,t)||this;return n._addToInstitutionFormRef=a.createRef(),n.fetchData=function(){Ii.InstitutionRoles().then((function(e){return n.setState({roles:e})}))},n.triggerRefresh=function(){var e;null===(e=n._dataTable)||void 0===e||e.refresh()},n.getColumnDefinitions=function(){return[{title:"Name",dataIndex:MF.institution,render:function(e,t){var n,r;return null!==(r=null===(n=t.institution)||void 0===n?void 0:n.name)&&void 0!==r?r:"Unknown"},sorter:!0,filterType:wr.Text,width:350},{title:"Roles",dataIndex:MF.roles,renderDataTransform:function(e){return ei.newLineFormat(e,!0)},filterType:wr.DropdownMulti,dropdownFilterOptions:n.state.roles}]},n.openInstitutionUser=function(e){e.id&&e.userId&&e.institutionId&&T.push(x.generate(x.USER_INSTITUTION_DETAILS,{userId:e.userId,institutionId:e.institutionId},{}))},n.closeAddToInstitution=function(){n.setState({addToInstitution:!1})},n.openAddToInstitution=function(){n.setState({addToInstitution:!0})},n.submitAddToInstitution=function(){var e;null===(e=n._addToInstitutionFormRef.current)||void 0===e||e.submit()},n.addedToInstitution=function(){var e;n.closeAddToInstitution(),null===(e=n._dataTable)||void 0===e||e.refresh()},n.state={roles:[]},n}return kM(t,e),t.prototype.componentDidMount=function(){this.fetchData()},t.prototype.render=function(){var e=this,t=[];return t.push(oo.Reset()),Je.isAuthorized([gn.MANAGE_INSTITUTION_USER])&&t.pu
1sh(oo.Default("Add to Institution",this.openAddToInstitution)),Object(o.jsxs)(y.b,GM({direction:"vertical"},{children:[Object(o.jsx)(io,{ref:function(t){return e._dataTable=t},onRowClick:this.openInstitutionUser,serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:t,columns:this.getColumnDefinitions(),fetchData:{fetch:function(t){return Bp.getInstitutionsForUserTableData(t,e.props.userId)}},stateSaving:{enabled:!0,tableUniqueKey:"institution_for_user_list"}},void 0),this.renderAddToInstitutionModal()]}),void 0)},t.prototype.renderAddToInstitutionModal=function(){return Object(o.jsx)(f.a,GM({visible:this.state.addToInstitution,title:"Add To Institution",okText:"Add",onOk:this.submitAddToInstitution,onCancel:this.closeAddToInstitution},{children:Object(o.jsx)(LM,{ref:this._addToInstitutionFormRef,onSuccess:this.addedToInstitution,userId:this.props.userId},void 0)}),void 0)},t}(a.Component),BM=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),WM=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return BM(t,e),t.prototype.getDistrictsForUserTableData=function(e,t,n){var r="api/districtUsers/getDistrictsInUser",i=r.indexOf("?")>0?"&":"?";return null!=t&&(r+=i+"userId="+encodeURIComponent(t),i="&"),null!=n&&(r+=i+"districtIdentifier="+n,i="&"),r=r.replace(/null|undefined/gi,""),this.SendRequest(e,"post",r,!0,!1)},t.prototype.getUsersInDistrictTableData=function(e,t){var n="api/districtUsers/getUsersInDistrict",r=n.indexOf("?")>0?"&":"?";return null!=t&&(n+=r+"districtIdentifier="+t,r="&"),n=n.replace(/null|undefined/gi,""),this.SendRequest(e,"post",n,!0,!1)},t.prototype.addDistrictUser=function(e){var t="api/districtUsers/addUser";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.addDistrictToUser=function(e){var t="api/districtUsers/addDistrict";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.removeDistrictUser=function(e){var t="api/districtUsers/removeUser";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.removeDistrictFromUser=function(e){var t="api/districtUsers/removeDistrictFromUser";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.searchDistrictUsers=function(e){var t="api/districtUsers/searchDistrictUsers";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.editDistrictUserRoles=function(e){var t="api/districtUsers/editRoles";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t}(U),zM=new WM,HM=function(e){return Object.assign({districtIdentifier:0,userId:"00000000-0000-0000-0000-000000000000"},e)},QM={className:"DistrictUserDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",districtIdentifier:0,userId:"00000000-0000-0000-0000-000000000000",user:null,emailAddress:"",firstName:"",lastName:"",districtName:"",roles:[],roleIds:[],dateAdded:"",status:""},e)},id:"id",districtIdentifier:"districtIdentifier",userId:"userId",user:"user",emailAddress:"emailAddress",firstName:"firstName",lastName:"lastName",districtName:"districtName",roles:"roles",roleIds:"roleIds",dateAdded:"dateAdded",status:"status"},KM=function(e){return Object.assign({districtIdentifier:0,userId:"00000000-0000-0000-0000-000000000000",roleIds:[]},e)},XM="districtIdentifier",JM="roleIds",$M=function(e){return Object.assign({},e)},ZM=function(){return ZM=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ZM.apply(this,arguments)},eY=a.forwardRef((function(e,t){var n=a.createRef(),r=(new Map).set(XM,{label:"District",required:!0,name:XM,rules:[Ot.required()]}).set(JM,{label:"District Roles",required:!0,name:JM,rules:[Ot.required()]});Object(a.useImperativeHandle)(t,(function(){return{handleSubmit:function(){return C()},reset:function(){return i()}}}));var i=function(){var e;f(null),m(!1),null===(e=n.current)||void 0===e||e.resetFields()},s=Object(a.useState)(!0),d=s[0],c=s[1],l=Object(a.useState)(!1)[1],u=Object(a.useState)({}),p=u[0],f=u[1],h=Object(a.useState)(!1),v=h[0],m=h[1],g=Object(a.useState)([]),b=g[0],O=g[1],j=Object(a.useState)([]),I=j[0],E=j[1];a.useEffect((function(){R()}),[]);var R=function(){c(!0);var t=[];I&&0!=I.length||t.push(T()),b&&0!=b.length||t.push(_()),Promise.all(t).then((function(){c(!1),e.resetForm&&e.resetForm}))},_=function(){var e=$M({});return z.getAllDistricts(e).then((function(e){var t;e&&O(null!==(t=e.districts)&&void 0!==t?t:[])})).catch((function(){l(!0)}))},T=function(){return ce.getAll(mr.className).then((function(e){e&&E(e)})).catch((function(){l(!0)}))},C=function(){m(!0);var t=n?n.current.getFieldsValue():null,r=KM({userId:e.userId,districtIdentifier:t.districtIdentifier,roleIds:t.roleIds});zM.addDistrictToUser(r).then((function(t){m(!0),(null===t||void 0===t?void 0:t.succeeded)?(S.b.success("District Added"),f(null),m(!1),e.onSubmit&&e.onSubmit()):(l(!(null===t||void 0===t?void 0:t.succeeded)),f(null===t||void 0===t?void 0:t.fieldErrors),S.b.error("District could not be added"))})).catch((function(){l(!0),S.b.error("District could not be added")})).finally((function(){c(!1)}))};return d?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsx)(ht.a,ZM({ref:n,layout:"vertical",requiredMark:!0},{children:Object(o.jsxs)(y.b,ZM({size:"small",direction:"vertical"},{children:[Object(o.jsx)(mt.a,ZM({},r.get(XM),_t.getValidation(XM,p,v),{children:Object(o.jsx)(hd,ZM({dropdownMatchSelectWidth:!1,showSearch:!0,optionFilterProp:"children"},{children:b.map((function(e){return function(e){var t,n;if(e.id)return Object(o.jsxs)(pr.a.Option,ZM({value:null!==(t=e.districtId)&&void 0!==t?t:0},{children:[" ",e.name]}),null!==(n=e.districtId)&&void 0!==n?n:0)}(e)}))}),void 0)}),void 0),Object(o.jsx)(mt.a,ZM({},r.get(JM),_t.getValidation(JM,p,v),{children:Object(o.jsx)(hd,ZM({dropdownMatchSelectWidth:!1,mode:"multiple"},{children:I.map((function(e){return function(e){var t,n;if(e.id&&e.roleTypeId==ni.DISTRICT)return Object(o.jsxs)(pr.a.Option,ZM({value:null!==(t=e.id)&&void 0!==t?t:re.default.Empty()},{children:[" ",e.name]}),null!==(n=e.id)&&void 0!==n?n:re.default.Empty())}(e)}))}),void 0)}),void 0)]}),void 0)}),void 0)}));eY.displayName="AddDistrictToUserForm";var tY=eY,nY=function(e){return Object.assign({academicYear:0,districtIdentifier:0,userId:"00000000-0000-0000-0000-000000000000",roleIds:[]},e)},rY="userId",iY="roleIds",oY=function(){return oY=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},oY.apply(this,arguments)},aY=a.forwardRef((function(e,t){var n=a.createRef(),r=(new Map).set(rY,{label:"User",required:!0,name:rY,rules:[Ot.required()]}).set(iY,{label:"District Roles",required:!0,name:iY,rules:[Ot.required()]});Object(a.useImperativeHandle)(t,(function(){return{handleSubmit:function(){return s()},reset:function(){return i()}}}));var i=function(){var e;m(null),f(!1),null===(e=n.current)||void 0===e||e.resetFields()},s=function(){var t;f(!0);var r=null===(t=n.current)||void 0===t?void 0:t.getFieldsValue(),i=nY({districtIdentifier:e.districtIdentifier,userId:r.userId.id,roleIds:r.roleIds});zM.addDistrictUser(i).then((function(t){(null===t||void 0===t?void 0:t.succeeded)?(S.b.success("User Added Successfully!"),f(!1),m(null),e.onSubmit&&e.onSubmit()):(m(t.fieldErrors),S.b.error("Error Adding User"))})).catch((function(){S.b.error("Error Adding User")}))},d=Object(a.useState)(!0),c=d[0],l=d[1],u=Object(a.useState)(!0),p=u[0],f=u[1],h=Object(a.useState)({}),v=h[0],m=h[1],g=Object(a.useState)(!1)[1],b=Object(a.useState)([]),O=b[0],j=b[1];a.useEffect((function(){I()}),[]);var I=function(){l(!0);var e=[];O&&0!=O.length||e.push(E()),Promise.all(e).then((function(){l(!1)}))},E=function(){return ce.getAll(mr.className).then((function(e){e&&j(e)})).catch((function(){g(!0)}))};return c?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsx)(ht.a,oY({ref:n,layout:"vertical",requiredMark:!0,onFinish:s},{children:Object(o.jsxs)(y.b,oY({size:"small",direction:"vertical"},{children:[Object(o.jsx)(ht.a.Item,oY({},r.get(rY),_t.getValidation(rY,v,p),{children:Object(o.jsx)(za,{},void 0)}),void 0),Object(o.jsx)(mt.a,oY({},r.get(iY),_t.getValidation(iY,v,p),{children:Object(o.jsx)(hd,oY({dropdownMatchSelectWidth:!1,mode:"multiple"},{children:O.map((function(e){return function(e){var t,n;if(e.id&&e.roleTypeId==ni.DISTRICT)return Object(o.jsxs)(pr.a.Option,oY({value:null!==(t=e.id)&&void 0!==t?t:re.default.Empty()},{children:[" ",e.name]}),null!==(n=e.id)&&void 0!==n?n:re.default.Empty())}(e)}))}),void 0)}),void 0)]}),void 0)}),void 0)}));aY.displayName="AddUserToDistrictForm";var sY=aY,dY=function(e){return Object.assign({districtIdentifier:0,userId:"00000000-0000-0000-0000-000000000000",roleIds:[]},e)},cY={className:"UserRegionalPlanningPartnerAssignmentDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",regionalPlanningPartnerIdentifier:0,regionalPlanningPartnerName:"",userId:"00000000-0000-0000-0000-000000000000",user:null,email:"",firstName:"",lastName:"",roles:[],roleIds:[]},e)}
1,id:"id",regionalPlanningPartnerIdentifier:"regionalPlanningPartnerIdentifier",regionalPlanningPartnerName:"regionalPlanningPartnerName",userId:"userId",user:"user",email:"email",firstName:"firstName",lastName:"lastName",roles:"roles",roleIds:"roleIds"},lY=function(){return lY=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},lY.apply(this,arguments)},uY=a.forwardRef((function(e,t){var n=a.createRef(),r=(new Map).set(cY.roleIds,{label:"District Roles",required:!0,name:cY.roleIds,rules:[Ot.required()]});Object(a.useImperativeHandle)(t,(function(){return{handleSubmit:function(){return T()},reset:function(){return i()}}}));var i=function(){var e;m(null),O(!1),null===(e=n.current)||void 0===e||e.resetFields()},s=Object(a.useState)(!0),d=s[0],c=s[1],l=Object(a.useState)({}),u=l[0],p=l[1],f=Object(a.useState)(!1)[1],h=Object(a.useState)({}),v=h[0],m=h[1],g=Object(a.useState)(!1),b=g[0],O=g[1],j=Object(a.useState)([]),I=j[0],E=j[1];a.useEffect((function(){R(),p(e.district)}),[e.district]);var R=function(){c(!0);var t=[];I&&0!=I.length||t.push(_()),Promise.all(t).then((function(){c(!1),e.resetForm&&e.resetForm}))},_=function(){return ce.getAll(mr.className).then((function(e){e&&E(e)})).catch((function(){f(!0)}))},T=function(){O(!0);var t=n?n.current.getFieldsValue():null,r=dY({userId:u.userId,districtIdentifier:e.districtIdentifier,roleIds:t.roleIds});zM.editDistrictUserRoles(r).then((function(t){O(!0),(null===t||void 0===t?void 0:t.succeeded)?(S.b.success("Roles Edited"),O(!1),m(null),e.onSubmit&&e.onSubmit()):(f(!(null===t||void 0===t?void 0:t.succeeded)),m(null===t||void 0===t?void 0:t.fieldErrors),S.b.error("Roles could not be Edited"))})).catch((function(){f(!0),S.b.error("Roles could not be Edited")})).finally((function(){c(!1)}))};return d?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsx)(ht.a,lY({ref:n,layout:"vertical",initialValues:u,requiredMark:!0,onFinish:T},{children:Object(o.jsx)(y.b,lY({size:"small",direction:"vertical"},{children:Object(o.jsx)(mt.a,lY({},r.get(cY.roleIds),_t.getValidation(cY.roleIds,v,b),{children:Object(o.jsx)(hd,lY({dropdownMatchSelectWidth:!1,mode:"multiple"},{children:I.map((function(e){return function(e){var t,n;if(e.id&&e.roleTypeId==ni.DISTRICT)return Object(o.jsxs)(pr.a.Option,lY({value:null!==(t=e.id)&&void 0!==t?t:re.default.Empty()},{children:[" ",e.name]}),null!==(n=e.id)&&void 0!==n?n:re.default.Empty())}(e)}))}),void 0)}),void 0)}),void 0)}),void 0)}));uY.displayName="EditDistrictRoleForm";var pY=uY,fY=function(){return fY=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},fY.apply(this,arguments)};var hY=function(e){var t=void 0,n=Object(a.useState)(!1),r=n[0],i=n[1],s=Object(a.useState)(!1),d=s[0],c=s[1],l=Object(a.useState)(!1),u=l[0],p=l[1],f=Object(a.useState)(),h=f[0],v=f[1],m=a.useRef(),g=a.useRef(),b=a.useRef(),y=function(e){i(!0),v(e)},O=function(){var e;i(!1),v(null),A(),null===(e=null===b||void 0===b?void 0:b.current)||void 0===e||e.reset()},j=function(){var e;null===(e=null===b||void 0===b?void 0:b.current)||void 0===e||e.handleSubmit(h)},I=function(){O()},E=function(){var e;c(!1),A(),null===(e=null===g||void 0===g?void 0:g.current)||void 0===e||e.reset()},R=function(){var e;null===(e=null===g||void 0===g?void 0:g.current)||void 0===e||e.handleSubmit()},_=function(){E()},T=function(){var e;p(!1),A(),null===(e=null===m||void 0===m?void 0:m.current)||void 0===e||e.reset()},C=function(){var e;null===(e=null===m||void 0===m?void 0:m.current)||void 0===e||e.handleSubmit()},x=function(){T()},A=function(){null===t||void 0===t||t.refresh()},P=function(t){var n=e.districtIdentifier?"User.":"District.";Rd.a.confirm({title:"Are you sure you want to unassign this "+n,okText:"Unassign",okButtonProps:{type:"primary",danger:!0},onOk:function(){return function(e){var t=HM({districtIdentifier:e.districtIdentifier,userId:e.userId});zM.removeDistrictFromUser(t).then((function(e){!0===(null===e||void 0===e?void 0:e.succeeded)?S.b.success("District has been unassigned."):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(){S.b.error("District could not be unassigned.")})).finally((function(){A()}
1))}(t)},width:500})},N=[];return Je.isAuthorized([gn.MANAGE_DISTRICT_USERS])&&e.userId&&N.push(oo.Default("Add District",(function(){p(!0)}))),Je.isAuthorized([gn.MANAGE_DISTRICT_USERS])&&e.districtIdentifier&&N.push(oo.Default("Add User",(function(){c(!0)}))),Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(io,{ref:function(e){return t=e},serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},buttonBar:N,columns:function(){var t=[];return e.districtIdentifier?t.pushAll([{title:"First Name",dataIndex:QM.firstName,sorter:!0,render:function(e,t){return t.firstName},filterType:wr.Text},{title:"Last Name",dataIndex:QM.lastName,sorter:!0,render:function(e,t){return t.lastName},filterType:wr.Text},{title:"Email",dataIndex:QM.emailAddress,sorter:!0,render:function(e,t){return t.emailAddress},filterType:wr.Text}]):t.pushAll([{title:"Name",dataIndex:QM.districtName,render:function(e,t){return t.districtName},width:180}]),t.pushAll([{title:"Roles",dataIndex:QM.roles,renderDataTransform:function(e){return ei.newLineFormat(e,!0)}},{title:"Date Added",dataIndex:QM.dateAdded,render:function(e,t){return t.dateAdded}},{title:"Actions",dataIndex:K.className,render:function(e,t){if(Je.isAuthorized([gn.MANAGE_DISTRICT_USERS]))return Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(rt.a,fY({type:"link",onClick:function(){return y(t)}},{children:Object(o.jsx)(Gr.a,{},void 0)}),void 0),Object(o.jsx)(rt.a,fY({type:"link",className:"ant-btn",onClick:function(){return P(t)}},{children:Object(o.jsx)(Yd.a,{},void 0)}),void 0)]},void 0)},sorter:!1,filterType:wr.NONE,width:50}]),t}(),fetchData:{fetch:function(t){var n,r;return zM.getDistrictsForUserTableData(t,null!==(n=e.userId)&&void 0!==n?n:re.default.Empty(),null!==(r=e.districtIdentifier)&&void 0!==r?r:0)}},stateSaving:{enabled:!0,tableUniqueKey:"district_user_list"}},void 0),function(){var t,n;return Object(o.jsx)(Rd.a,fY({visible:r,title:e.districtName,onCancel:O,onOk:j,okText:"Submit"},{children:Object(o.jsx)(pY,{ref:b,userId:null!==(t=e.userId)&&void 0!==t?t:re.default.Empty(),districtIdentifier:null!==(n=null===h||void 0===h?void 0:h.districtIdentifier)&&void 0!==n?n:0,district:null!==h&&void 0!==h?h:QM.create(),onSubmit:I},void 0)}),void 0)}(),function(){var t;return Object(o.jsx)(Rd.a,fY({visible:u,title:"Add District",okText:"Submit",onOk:C,onCancel:T},{children:Object(o.jsx)(tY,{ref:m,userId:null!==(t=e.userId)&&void 0!==t?t:re.default.Empty(),onSubmit:x},void 0)}),void 0)}(),function(){var t;return Object(o.jsx)(Rd.a,fY({visible:d,title:"Add User",okText:"Submit",onOk:R,onCancel:E},{children:Object(o.jsx)(sY,{ref:g,districtIdentifier:null!==(t=e.districtIdentifier)&&void 0!==t?t:0,onSubmit:_},void 0)}),void 0)}()]},void 0)},vY=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),mY=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return vY(t,e),t.prototype.getUserRegionalPlanningPartnerAssignmentTableData=function(e,t,n){var r="api/userRegionalPlanningPartnerAssignment",i=r.indexOf("?")>0?"&":"?";return null!=t&&(r+=i+"userId="+encodeURIComponent(t),i="&"),null!=n&&(r+=i+"regionalPlanningPartner="+n,i="&"),r=r.replace(/null|undefined/gi,""),this.SendRequest(e,"post",r,!0,!1)},t.prototype.getUsersInRegionalPlanningPartnerAssignmentTableData=function(e,t){var n="api/userRegionalPlanningPartnerAssignment/usersInRPP",r=n.indexOf("?")>0?"&":"?";return null!=t&&(n+=r+"rppId="+t,r="&"),n=n.replace(/null|undefined/gi,""),this.SendRequest(e,"post",n,!0,!1)},t.prototype.addRPPUser=function(e){var t="api/userRegionalPlanningPartnerAssignment/addUser";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.addRegionalPartnerPlanningUser=function(e){var t="api/userRegionalPlanningPartnerAssignment/save";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.editUserRegionalPlanningPartnerAssignmentRoles=function(e){var t="api/userRegionalPlanningPartnerAssignment/editRoles";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.unassignRegionalPartnerPlanningUser=function(e){var t="api/userRegionalPlanningPartnerAssignment/unassign";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t}(U),gY=new mY,bY=function(e){return Object.assign({regionalPlanningPartnerIdentifier:0,userId:"00000000-0000-0000-0000-000000000000",roleIds:[]},e)},yY="regionalPlanningPartnerIdentifier",OY="roleIds",jY=function(){return jY=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},jY.apply(this,arguments)},IY=a.forwardRef((function(e,t){var n=a.createRef(),r=(new Map).set(yY,{label:"Regional Planning Partner",required:!0,name:yY,rules:[Ot.required()]}).set(OY,{label:"RPP Roles",required:!0,name:_a.roles,rules:[Ot.required()]});Object(a.useImperativeHandle)(t,(function(){return{handleSubmit:function(){return P()},reset:function(){return i()}}}));var i=function(){var e;m(null),O(!1),null===(e=n.current)||void 0===e||e.resetFields()},s=Object(a.useState)(!0),d=s[0],c=s[1],l=Object(a.useState)(!1),u=l[0],p=l[1],f=Object(a.useState)(!1)[1],h=Object(a.useState)({}),v=h[0],m=h[1],g=Object(a.useState)(!1),b=g[0],O=g[1],j=Object(a.useState)([]),I=j[0],E=j[1],R=Object(a.useState)([]),_=R[0],T=R[1];a.useEffect((function(){C()}),[]);var C=function(){c(!0);var t=[];_&&0!==_.length||t.push(A()),I&&0!==I.length||t.push(x()),Promise.all(t).then((function(){c(!1),e.resetForm&&e.resetForm}))},x=function(){return be.getAllRpps().then((function(e){var t;e&&E(null!==(t=e.regions)&&void 0!==t?t:[])})).catch((function(){f(!0)}))},A=function(){return ce.getAll(mr.className).then((function(e){e&&T(e)})).catch((function(){f(!0)}))},P=function(){p(!0);var t=n?n.current.getFieldsValue():null,r=bY({userId:e.userId,regionalPlanningPartnerIdentifier:t.regionalPlanningPartnerIdentifier,roleIds:t.roles});gY.addRegionalPartnerPlanningUser(r).then((function(t){O(!0),(null===t||void 0===t?void 0:t.succeeded)?(S.b.success("Regional Planning Partner Added"),m(null),O(!1),e.onSubmit&&e.onSubmit()):(f(!(null===t||void 0===t?void 0:t.succeeded)),m(null===t||void 0===t?void 0:t.fieldErrors),S.b.error("Regional Planning Partner could not be added"))})).catch((function(){f(!0),S.b.error("Regional Planning Partner could not be added")})).finally((function(){p(!1)}))};return d?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsx)(ht.a,jY({ref:n,layout:"vertical",requiredMark:!0,onFinish:P},{children:Object(o.jsxs)(y.b,jY({size:"small",direction:"vertical"},{children:[Object(o.jsx)(mt.a,jY({},r.get(yY),_t.getValidation(Oe.regionalPlanningPartnerIdentifier,v,b),{children:Object(o.jsx)(hd,jY({dropdownMatchSelectWidth:!1,disabled:u},{children:I.sort((function(e,t){return e.regionalPlanningPartnerIdentifier-t.regionalPlanningPartnerIdentifier})).map((function(e){return function(e){var t,n;if(e.id)return Object(o.jsx)(pr.a.Option,jY({value:null!==(t=e.regionalPlanningPartnerIdentifier)&&void 0!==t?t:0},{children:e.name}),null!==(n=e.regionalPlanningPartnerIdentifier)&&void 0!==n?n:0)}(e)}))}),void 0)}),void 0),Object(o.jsx)(mt.a,jY({},r.get(OY),_t.getValidation(_a.roleIds,v,b),{children:Object(o.jsx)(hd,jY({dropdownMatchSelectWidth:!1,disabled:u,mode:"multiple"},{children:_.map((function(e){return function(e){var t,n;if(e.id&&e.roleTypeId==ni.RPP)return Object(o.jsx)(pr.a.Option,jY({value:null!==(t=e.id)&&void 0!==t?t:re.default.Empty()},{children:e.name}),null!==(n=e.id)&&void 0!==n?n:re.default.Empty())}(e)}))}),void 0)}),void 0)]}),void 0)}),void 0)}));
1IY.displayName="AddRegionalPlanningPartnerToUserForm";var SY=IY,EY=function(e){return Object.assign({regionalPlanningPartnerId:0,userId:"00000000-0000-0000-0000-000000000000",roleIds:[]},e)},RY=function(){return RY=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},RY.apply(this,arguments)},_Y=a.forwardRef((function(e,t){var n=a.createRef(),r=(new Map).set(cY.roleIds,{label:"RPP Roles",required:!0,name:cY.roleIds,rules:[Ot.required()]});Object(a.useImperativeHandle)(t,(function(){return{handleSubmit:function(){return R()},reset:function(){return i()}}}));var i=function(){var e;h(null),g(!1),null===(e=n.current)||void 0===e||e.resetFields()},s=Object(a.useState)(!0),d=s[0],c=s[1],l=Object(a.useState)({})[0],u=Object(a.useState)(!1)[1],p=Object(a.useState)({}),f=p[0],h=p[1],v=Object(a.useState)(!1),m=v[0],g=v[1],b=Object(a.useState)([]),O=b[0],j=b[1];a.useEffect((function(){I()}),[e.rppId]);var I=function(){c(!0);var t=[];O&&0!=O.length||t.push(E()),Promise.all(t).then((function(){c(!1),e.resetForm&&e.resetForm}))},E=function(){return ce.getAll(mr.className).then((function(e){e&&j(e)})).catch((function(){u(!0)}))},R=function(){g(!0);var t=n?n.current.getFieldsValue():null,r=EY({userId:e.userId,regionalPlanningPartnerId:e.rppId,roleIds:t.roleIds});gY.editUserRegionalPlanningPartnerAssignmentRoles(r).then((function(t){g(!0),(null===t||void 0===t?void 0:t.succeeded)?(S.b.success("Roles Edited"),g(!1),h(null),e.onSubmit&&e.onSubmit()):(u(!(null===t||void 0===t?void 0:t.succeeded)),h(null===t||void 0===t?void 0:t.fieldErrors),S.b.error("Roles could not be Edited"))})).catch((function(){u(!0),S.b.error("Roles could not be Edited")})).finally((function(){c(!1)}))};return d?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsx)(ht.a,RY({ref:n,layout:"vertical",initialValues:l,requiredMark:!0},{children:Object(o.jsx)(y.b,RY({size:"small",direction:"vertical"},{children:Object(o.jsx)(mt.a,RY({},r.get(cY.roleIds),_t.getValidation(cY.roleIds,f,m),{children:Object(o.jsx)(hd,RY({dropdownMatchSelectWidth:!1,mode:"multiple"},{children:O.map((function(e){return function(e){var t,n;if(e.id&&e.roleTypeId==ni.RPP)return Object(o.jsxs)(pr.a.Option,RY({value:null!==(t=e.id)&&void 0!==t?t:re.default.Empty()},{children:[" ",e.name]}),null!==(n=e.id)&&void 0!==n?n:re.default.Empty())}(e)}))}),void 0)}),void 0)}),void 0)}),void 0)}));_Y.displayName="EditRegionalPlanningPartnerRoleForm";var TY=_Y,CY=function(e){return Object.assign({regionalPlanningPartnerIdentifier:0,userId:"00000000-0000-0000-0000-000000000000"},e)},xY=function(e){return Object.assign({rppId:0,userId:"00000000-0000-0000-0000-000000000000",roleIds:[]},e)},AY="userId",PY="roleIds",NY=function(){return NY=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},NY.apply(this,arguments)},wY=a.forwardRef((function(e,t){var n=a.createRef(),r=(new Map).set(AY,{label:"User",required:!0,name:AY,rules:[Ot.required()]}).set(PY,{label:"RPP Roles",required:!0,name:PY,rules:[Ot.required()]});Object(a.useImperativeHandle)(t,(function(){return{handleSubmit:function(){return E()},reset:function(){return i()}}}));var i=function(){var e;O(null),p(!1),null===(e=n.current)||void 0===e||e.resetFields()},s=Object(a.useState)(!0),d=s[0],c=s[1],l=Object(a.useState)(!0),u=l[0],p=l[1],f=Object(a.useState)(!1)[1],h=Object(a.useState)([]),v=h[0],m=h[1],g=Object(a.useState)({}),b=g[0],O=g[1];a.useEffect((function(){j()}),[]);var j=function(){c(!0);var t=[];v&&0!=v.length||t.push(I()),Promise.all(t).then((function(){c(!1),e.resetForm&&e.resetForm}))},I=function(){return ce.getAll(mr.className).then((function(e){e&&m(e)})).catch((function(){f(!0)}))},E=function(){var t;p(!0);var r=null===(t=n.current)||void 0===t?void 0:t.getFieldsValue(),i=xY({rppId:e.rppIdentifier,userId:r.userId.id,roleIds:r.roleIds});gY.addRPPUser(i).then((function(t){(null===t||void 0===t?void 0:t.succeeded)?(S.b.success("User Added"),O(null),p(!1),e.onSubmit&&e.onSubmit()):(O(t.fieldErrors),S.b.error("Error Adding User"))})).catch((function(){S.b.error("Error Adding User")}))};return d?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsx)(ht.a,NY({ref:n,layout:"vertical",requiredMark:!0,onFinish:E},{children:Object(o.jsxs)(y.b,NY({size:"small",direction:"vertical"},{children:[Object(o.jsx)(ht.a.Item,NY({},r.get(AY),_t.getValidation(AY,b,u),{children:Object(o.jsx)(za,{},void 0)}),void 0),Object(o.jsx)(mt.a,NY({},r.get(PY),_t.getValidation(PY,b,u),{children:Object(o.jsx)(hd,NY({dropdownMatchSelectWidth:!1,mode:"multiple"},{children:v.map((function(e){return function(e){var t,n;if(e.id&&e.roleTypeId==ni.RPP)return Object(o.jsxs)(pr.a.Option,NY({value:null!==(t=e.id)&&void 0!==t?t:re.default.Empty()},{children:[" ",e.name]}),null!==(n=e.id)&&void 0!==n?n:re.default.Empty())}(e)}))}),void 0)}),void 0)]}),void 0)}),void 0)}));wY.displayName="AddUserToRPPForm";var DY=wY,qY=function(){return qY=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},qY.apply(this,arguments)};var FY=function(e){var t=a.useRef(),n=a.useRef(),r=a.useRef(),i=void 0,s=Object(a.useState)(!1),d=s[0],c=s[1],l=Object(a.useState)(!1),u=l[0],p=l[1],f=Object(a.useState)(!1),h=f[0],v=f[1],m=Object(a.useState)([]),g=m[0],b=m[1],y=Object(a.useState)(null),O=y[0],j=y[1],I=Object(a.useState)({})[0];Object(a.useEffect)((function(){be.getAllRpps().then((function(e){var t;e&&b(null!==(t=e.regions)&&void 0!==t?t:[])}))}),[]);var E=function(){null===i||void 0===i||i.refresh()},R=function(e){j(e),v(!0)},_=function(){var e;j(null),v(!1),E(),null===(e=null===n||void 0===n?void 0:n.current)||void 0===e||e.reset()},T=function(){var e;null===(e=null===n||void 0===n?void 0:n.current)||void 0===e||e.handleSubmit(O)},C=function(){_()},x=function(){var e;p(!1),E(),null===(e=null===t||void 0===t?void 0:t.current)||void 0===e||e.reset()},A=function(){var e;null===(e=null===t||void 0===t?void 0:t.current)||void 0===e||e.handleSubmit()},P=function(){x()},N=function(){var e;c(!1),E(),null===(e=null===r||void 0===r?void 0:r.current)||void 0===e||e.reset()},w=function(){var e;null===(e=null===r||void 0===r?void 0:r.current)||void 0===e||e.handleSubmit()},D=function(){N()},q=function(e){Rd.a.confirm({title:"Unassign User?",content:"Are you sure you want to unassign this user?",okText:"Unassign User",okButtonProps:{type:"primary",danger:!0},onOk:function(){return function(e){var t=CY({regionalPlanningPartnerIdentifier:e.regionalPlanningPartnerIdentifier,userId:e.userId});gY.unassignRegionalPartnerPlanningUser(t).then((function(e){!0===(null===e||void 0===e?void 0:e.succeeded)?S.b.success("User has been unassigned."):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(){S.b.error("Could Not Unassign.")})).finally((function(){E()}))}(e)},width:500})},F=[];return Je.isAuthorized([gn.MANAGE_RPP_USERS])&&e.userId&&F.push(oo.Default("Add RPP",(function(){c(!0)}
1))),Je.isAuthorized([gn.MANAGE_RPP_USERS])&&e.regionalPlanningPartner&&F.push(oo.Default("Add User",(function(){p(!0)}))),Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(io,{ref:function(e){return i=e},serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},buttonBar:F,columns:function(){var t=[];return e.regionalPlanningPartner?t.pushAll([{title:"First Name",dataIndex:cY.firstName,sorter:!0,render:function(e,t){return t.firstName},filterType:wr.Text},{title:"Last Name",dataIndex:cY.lastName,sorter:!0,render:function(e,t){return t.lastName},filterType:wr.Text},{title:"Email",dataIndex:cY.email}]):t.pushAll([{title:"RPP",dataIndex:cY.regionalPlanningPartnerIdentifier,width:180,render:function(e,t){var n;return null===(n=g.find((function(e){return e.regionalPlanningPartnerIdentifier===t.regionalPlanningPartnerIdentifier})))||void 0===n?void 0:n.name}}]),t.pushAll([{title:"Roles",dataIndex:cY.roles,render:function(e){if(e)return ei.newLineFormat(e,!0)}},{title:"Actions",dataIndex:cY.className,render:function(e,t){if(Je.isAuthorized([gn.MANAGE_RPP_USERS]))return Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(rt.a,qY({type:"link",onClick:function(){return R(t)}},{children:Object(o.jsx)(Gr.a,{},void 0)}),void 0),Object(o.jsx)(rt.a,qY({type:"link",className:"ant-btn",onClick:function(){return q(t)}},{children:Object(o.jsx)(Yd.a,{},void 0)}),void 0)]},void 0)},sorter:!1,filterType:wr.NONE,width:50}]),t}(),fetchData:{fetch:function(t){var n,r;return gY.getUserRegionalPlanningPartnerAssignmentTableData(t,null!==(n=e.userId)&&void 0!==n?n:re.default.Empty(),null!==(r=e.regionalPlanningPartner)&&void 0!==r?r:0)}},stateSaving:{enabled:!0,tableUniqueKey:"rpp_user_list"}},void 0),function(){var t;return Object(o.jsx)(Rd.a,qY({visible:d,title:"Add RPP User",okText:"Submit",onOk:w,onCancel:N},{children:Object(o.jsx)(SY,{ref:r,userId:null!==(t=e.userId)&&void 0!==t?t:re.default.Empty(),onSubmit:D},void 0)}),void 0)}(),function(){var t,r,i,a=null===(t=g.find((function(e){return e.regionalPlanningPartnerIdentifier===(null===O||void 0===O?void 0:O.regionalPlanningPartnerIdentifier)})))||void 0===t?void 0:t.name;return Object(o.jsx)(Rd.a,qY({visible:h,title:"Edit "+a+" Roles",onCancel:_,onOk:T,okText:"Submit"},{children:Object(o.jsx)(TY,{ref:n,userId:null!==(r=e.userId)&&void 0!==r?r:re.default.Empty(),rppId:null!==(i=null===O||void 0===O?void 0:O.regionalPlanningPartnerIdentifier)&&void 0!==i?i:0,onSubmit:C},void 0)}),void 0)}(),function(){var n;return Object(o.jsx)(Rd.a,qY({visible:u,title:"Add User",okText:"Submit",onOk:A,onCancel:x},{children:Object(o.jsx)(DY,{ref:t,fieldErrors:I,onSubmit:P,userId:e.userId,rppIdentifier:null!==(n=e.regionalPlanningPartner)&&void 0!==n?n:0},void 0)}),void 0)}()]},void 0)},MY=function(){return MY=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},MY.apply(this,arguments)};var YY=function(e){return e.userId?Object(o.jsxs)(pa.a,MY({activeKey:e.subTab,onChange:e.onChangeTab},{children:[Object(o.jsx)(pa.a.TabPane,MY({tab:"Districts"},{children:Object(o.jsx)(hY,{userId:e.userId},void 0)}),"districts"),Object(o.jsx)(pa.a.TabPane,MY({tab:"Community Colleges"},{children:Object(o.jsx)(VM,{userId:e.userId},void 0)}),"communityColleges"),Object(o.jsx)(pa.a.TabPane,MY({tab:"RPPs"},{children:Object(o.jsx)(FY,{userId:e.userId},void 0)}),"rpps")]}),void 0):Object(o.jsx)(pt.a,{},void 0)},UY=function(e){return Object.assign({userId:"00000000-0000-0000-0000-000000000000",user:null},e)},LY=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),kY=function(){return kY=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},kY.apply(this,arguments)},GY=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._formItems=(new Map).set(_a.username,{required:!0,name:_a.username,label:"Email",rules:[Ot.required()]}).set(_a.firstName,{required:!0,name:_a.firstName,label:"First Name",rules:[Ot.required()]}).set(_a.lastName,{required:!0,name:_a.lastName,label:"Last Name",rules:[Ot.required()]}).set(_a.phoneNumber,{required:!1,name:_a.phoneNumber,label:"Phone Number",rules:[]}).set(_a.aaUserLogin,{name:_a.aaUserLogin,label:"AA User Login"}),n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields(),n.setState({altered:!1})},n.loadExisting=function(){Ua.getUserDetails(n.props.userId).then((function(e){var t;e&&(n.setState({user:e.user}),null===(t=n._formRef.current)||void 0===t||t.resetFields())})).catch((function(){n.setState({error:!0})}
1))},n.handleSubmit=function(){n.setState({submitting:!0});var e=UY({userId:n.props.userId,user:_a.create(n._formRef?n._formRef.current.getFieldsValue():null)});Ua.saveUser(e).then((function(e){var t,r;n.setState({submitted:!0}),(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.setState({user:null===e||void 0===e?void 0:e.user,altered:!e.succeeded}),(null===(t=e.user)||void 0===t?void 0:t.id)&&n.props.onSave&&n.props.onSave(e.user.id),null===(r=n._formRef.current)||void 0===r||r.resetFields()):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),xi.a.error({message:"Uh oh!",description:null===e||void 0===e?void 0:e.errors.join("\n")}))})).catch((function(e){n.setState({error:e}),xi.a.error({message:"Uh oh!",description:"User could not be saved."})})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.handleChange=function(){n.setState({altered:!0})},n.state={user:null},n}return LY(t,e),t.prototype.componentDidMount=function(){this.loadUser()},t.prototype.componentDidUpdate=function(e){this.props.userId&&this.props.userId!=e.userId&&this.loadUser()},t.prototype.loadUser=function(){var e=this;this.setState({loading:!0});var t=[];this.props.userId!=re.default.Empty()&&t.push(this.loadExisting()),Promise.all(t).then((function(){e.setState({loading:!1})}))},t.prototype.render=function(){return this.state.loading||null==this.state.user||void 0==this.state.user?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(y.b,kY({size:"small",direction:"vertical"},{children:[this.renderErrors(),Object(o.jsxs)(ht.a,kY({ref:this._formRef,layout:"vertical",onChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!0,initialValues:this.state.user},{children:[Object(o.jsx)(ht.a.Item,kY({},_t.getValidation(_a.username,this.state.fieldErrors,this.state.submitted),this._formItems.get(_a.username),{children:Je.isAuthorized([gn.EDIT_USER])?Object(o.jsx)(ut.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0):Object(o.jsx)(ud,{},void 0)}),void 0),Object(o.jsx)(ht.a.Item,kY({},_t.getValidation(_a.firstName,this.state.fieldErrors,this.state.submitted),this._formItems.get(_a.firstName),{children:Je.isAuthorized([gn.EDIT_USER])?Object(o.jsx)(ut.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0):Object(o.jsx)(ud,{},void 0)}),void 0),Object(o.jsx)(ht.a.Item,kY({},_t.getValidation(_a.lastName,this.state.fieldErrors,this.state.submitted),this._formItems.get(_a.lastName),{children:Je.isAuthorized([gn.EDIT_USER])?Object(o.jsx)(ut.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0):Object(o.jsx)(ud,{},void 0)}),void 0),Object(o.jsx)(ht.a.Item,kY({},_t.getValidation(_a.phoneNumber,this.state.fieldErrors,this.state.submitted),this._formItems.get(_a.phoneNumber),{children:Je.isAuthorized([gn.EDIT_USER])?Object(o.jsx)(ut.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0):Object(o.jsx)(ud,{},void 0)}),void 0),Object(o.jsx)(ht.a.Item,kY({},this._formItems.get(_a.aaUserLogin),{children:Je.isAuthorized([gn.MANAGE_AA_USER])?Object(o.jsx)(ut.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0):Object(o.jsx)(ud,{},void 0)}),void 0),this.renderActions()]}),void 0)]}),void 0)},t.prototype.renderActions=function(){if(this.props.isEditing&&Je.
1isAuthorized([gn.EDIT_USER]))return Object(o.jsxs)(y.b,kY({direction:"horizontal",wrap:!0},{children:[Object(o.jsx)(Tr,{disabled:this.state.loading,saving:this.state.submitting,saved:this.state.saved},void 0),Object(o.jsx)(Ir,{disabled:!this.state.altered,resetting:this.state.resetting,onConfirm:this.resetForm},void 0)]}),void 0)},t.prototype.renderErrors=function(){if(this.state.error)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t}(a.Component),VY=function(e){return Object.assign({userId:"00000000-0000-0000-0000-000000000000",selectedFeatureFlagIds:[],userRoleIds:[]},e)},BY=(n(1071),function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),WY=function(){return WY=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},WY.apply(this,arguments)},zY=function(e){function t(t){var n=e.call(this,t)||this;return n.loadRoles=function(){return ce.getAll(mr.className).then((function(e){e&&n.setState({roles:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.onChange=function(e,t){var r=n.state.selectedIds;e.target.checked?r.push(t):r.remove(t),n.setState({selectedIds:r}),n.props.onChange&&n.props.onChange(r)},n.state={selectedIds:[],roles:[]},n}return BY(t,e),t.prototype.componentDidMount=function(){var e;this.props.options?this.setState({roles:this.props.options}):this.loadRoles(),this.setState({selectedIds:null!==(e=JSON.parse(JSON.stringify(this.props.selectedIds)))&&void 0!==e?e:[]})},t.prototype.componentDidUpdate=function(e){var t;this.props.options&&this.props.options!=e.options&&this.setState({roles:this.props.options}),this.props.selectedIds!=e.selectedIds&&this.setState({selectedIds:null!==(t=JSON.parse(JSON.stringify(this.props.selectedIds)))&&void 0!==t?t:[]})},t.prototype.render=function(){var e=this;return Object(o.jsx)(y.b,WY({direction:"horizontal",wrap:!0},{children:this.state.roles.map((function(t){return e.renderRoles(t)}))}),void 0)},t.prototype.renderRoles=function(e){var t=this;if(e.id&&(e.roleTypeId==ni.STATE||e.roleTypeId==ni.CONSULTANT))return Object(o.jsx)(Ti.a,WY({checked:this.state.selectedIds.includes(e.id),onChange:function(n){var r;return t.onChange(n,null!==(r=null===e||void 0===e?void 0:e.id)&&void 0!==r?r:re.default.Empty())},disabled:this.props.disabled},{children:e.name}),void 0)},t}(a.Component),HY=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),QY=function(){return QY=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},QY.apply(this,arguments)},KY=function(e){function t(n){var r=e.call(this,n)||this;return r._formRef=a.createRef(),r.fetchData=function(){var e=[];0==r.state.selectedUserRoleIds.length&&e.push(r.loadFeatureFlagsAndRolesForUser()),0==r.state.roles.length&&e.push(r.loadRoles()),Promise.all(e).then((function(){r.setState({loading:!1})}))},r.loadFeatureFlagsAndRolesForUser=function(){return r.setState({loading:!0}),Ua.getFeatureFlagsAndRolesForUser(r.props.userId).then((function(e){var t;e&&r.setState({selectedFeatureFlagIds:e.selectedFeatureFlagIds,previousSelectedFeatureFlagIds:JSON.parse(JSON.stringify(e.selectedFeatureFlagIds)),selectedUserRoleIds:null!==(t=e.userRoleIds)&&void 0!==t?t:[],previousSelectedUserRoleIds:JSON.parse(JSON.stringify(e.userRoleIds))})})).catch((function(e){r.setState({error:!0,message:e})}))},r.loadRoles=function(){return r.setState({loading:!0}),ce.getAll(mr.className).then((function(e){e&&r.setState({roles:null!==e&&void 0!==e?e:[]})})).catch((function(){r.setState({error:!0})}
1))},r.handleSubmit=function(){r.setState({submitting:!0});var e=VY({userId:r.props.userId,selectedFeatureFlagIds:r.state.selectedFeatureFlagIds,userRoleIds:r.state.selectedUserRoleIds});Ua.saveFeatureFlagsAndRolesForUser(e).then((function(e){e&&(r.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,altered:!(null===e||void 0===e?void 0:e.succeeded)}),e.succeeded?(r.setState({previousSelectedFeatureFlagIds:JSON.parse(JSON.stringify(r.state.selectedFeatureFlagIds)),previousSelectedUserRoleIds:JSON.parse(JSON.stringify(r.state.selectedUserRoleIds))}),S.b.success("Saved"),r.props.onSave&&r.props.onSave()):S.b.error("Saved"))})).catch((function(e){r.setState({error:e}),S.b.error("Saved")})).finally((function(){r.setState({loading:!1,submitting:!1})}))},r.resetForm=function(){r.setState({altered:!1,selectedUserRoleIds:JSON.parse(JSON.stringify(r.state.previousSelectedUserRoleIds)),selectedFeatureFlagIds:JSON.parse(JSON.stringify(r.state.previousSelectedFeatureFlagIds))})},r.handleChange=function(){r.setState({altered:!0})},r.onRoleChange=function(e){r.setState({selectedUserRoleIds:e})},r.onUserFeatureFlagChange=function(e){e.removeAll(r.getFeatureFlagIdsForRoles(r.state.selectedUserRoleIds)),r.setState({selectedFeatureFlagIds:e})},r.onActionsCollapseChange=function(){r.setState({actionVisibility:r.state.actionVisibility==t.ACTIONS_CLOSED?t.ACTIONS_OPEN:t.ACTIONS_CLOSED})},r.state={actionVisibility:t.ACTIONS_CLOSED,previousSelectedFeatureFlagIds:[],previousSelectedUserRoleIds:[],selectedFeatureFlagIds:[],selectedUserRoleIds:[],roles:[]},r}return HY(t,e),t.prototype.componentDidMount=function(){this.fetchData()},t.prototype.componentDidUpdate=function(e){e.userId!=this.props.userId&&this.fetchData()},t.prototype.render=function(){return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsx)(Ci.a,QY({ref:this._formRef,layout:"vertical",onChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!0},{children:Object(o.jsxs)(y.b,QY({direction:"vertical"},{children:[this.renderRoles(),this.renderActions()]}),void 0)}),void 0)},t.prototype.renderActions=function(){if(this.props.isEditing&&Je.
1isAuthorized([gn.EDIT_USER]))return Object(o.jsxs)(y.b,QY({direction:"horizontal",wrap:!0},{children:[Object(o.jsx)(Tr,{disabled:this.state.loading,saving:this.state.submitting,saved:this.state.saved},void 0),Object(o.jsx)(Ir,{disabled:!this.state.altered,resetting:this.state.resetting,onConfirm:this.resetForm},void 0)]}),void 0)},t.prototype.renderRoles=function(){return Object(o.jsx)(zY,{selectedIds:this.state.selectedUserRoleIds,onChange:this.onRoleChange,disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)},t.prototype.renderFeatureFlags=function(){if(this.state.roles.length>0&&Je.isAuthorized([gn.VIEW_USER_ROLE,gn.EDIT_USER_ROLE])){var e=JSON.parse(JSON.stringify(this.state.selectedFeatureFlagIds)),t=this.getFeatureFlagIdsForRoles(this.state.selectedUserRoleIds);return e.pushAll(t),e.distinct(),Object(o.jsx)(Jx.a,QY({onChange:this.onActionsCollapseChange,ghost:!0,collapsible:"header",defaultActiveKey:this.state.actionVisibility},{children:Object(o.jsx)(Jx.a.Panel,QY({header:"Allowed Actions"},{children:Object(o.jsx)(y.b,QY({direction:"vertical",size:"large"},{children:Object(o.jsx)(cA,{selectedIds:e,disabledIds:t,onChange:this.onUserFeatureFlagChange,isEditing:this.props.isEditing},void 0)}),void 0)}),"ACTIONS_OPEN")}),void 0)}},t.prototype.getFeatureFlagIdsForRoles=function(e){var t=[];return this.state.roles.forEach((function(n){n.id&&e.includes(n.id)&&t.pushAll(n.roleFeatureFlagIds)})),t.distinct(),t},t.ACTIONS_OPEN="ACTIONS_OPEN",t.ACTIONS_CLOSED="ACTIONS_CLOSED",t}(a.Component),XY=function(e){return Object.assign({userId:null},e)},JY=function(e){return Object.assign({userId:"00000000-0000-0000-0000-000000000000"},e)},$Y=function(e){return Object.assign({userId:"00000000-0000-0000-0000-000000000000"},e)},ZY=function(e){return Object.assign({userId:"00000000-0000-0000-0000-000000000000"},e)},eU=function(e){return Object.assign({userId:"00000000-0000-0000-0000-000000000000"},e)},tU=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),nU=function(){return nU=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},nU.apply(this,arguments)},rU=function(e){function t(n){var r=e.call(this,n)||this;return r._userDetailsRef=a.createRef(),r._userRolesRef=a.createRef(),r.loadUser=function(e){r.setState({loading:!0,userId:e}),Ua.getUserDetails(e).then((function(e){e.user&&r.setState({user:e.user})})).finally((function(){r.setState({loading:!1})}))},r.toggleIsEditing=function(e,n){var i,o,a;if(r.state.editings){var s=r.state.editings;if(void 0!==n?s.set(e,n):s.set(e,null===(i=!s.get(e))||void 0===i||i),!s.get(e))switch(e){case t.USER_DETAILS:null===(o=r._userDetailsRef.current)||void 0===o||o.resetForm();break;case t.USER_ROLES:null===(a=r._userRolesRef.current)||void 0===a||a.resetForm()}r.setState({editings:s})}},r.isEditingCheck=function(){return!!r.state.editings&&Array.from(r.state.editings.values()).includes(!0)},r.userDetailsSaved=function(e){r.toggleIsEditing(t.USER_DETAILS,!1),e!=r.state.userId?T.replace(x.generate(x.USER_DETAILS,{id:e})):r.loadUser(e)},r.deleteConfirmation=function(e){f.a.confirm({title:"Are you sure you want to delete this User?",okText:"Delete",onOk:function(){return r.deleteUser(e)}})},r.resendConfirmation=function(e){r.setState({submitting:!0});var t=Fo({userId:e});G.resendConfirmEmail(t).then((function(e){e&&S.b.success("Email Sent")})).catch((function(e){r.setState({error:e}),S.b.error("Failed Sending Confirmation Email")})).finally((function(){r.setState({loading:!1})}))},r.deleteUser=function(e){r.setState({submitting:!0});var t=XY({userId:e});Ua.deleteUser(t).then((function(e){r.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,altered:!(null===e||void 0===e?void 0:e.succeeded)}),!0===(null===e||void 0===e?void 0:e.succeeded)?S.b.success("User was removed."):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(e){r.setState({error:e}),S.b.error("User could not be removed.")})).finally((function(){r.setState({loading:!1}),r.goToUsers()}))},r.resendUserConfirmation=function(e){r.setState({submitting:!0});var t=ZY({userId:e});Ua.resendUserConfirmationEmail(t).then((function(e){r.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,altered:!(null===e||void 0===e?void 0:e.succeeded)}),!0===(null===e||void 0===e?void 0:e.succeeded)?S.b.success("User Confirmation Email sent"):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(e){r.setState({error:e}),S.b.error("User Confirmation Email could not be sent.")})).finally((function(){r.setState({submitting:!1,loading:!1})}
1))},r.resendResetPassword=function(e){r.setState({submitting:!0});var t=eU({userId:e});Ua.resendResetPasswordEmail(t).then((function(e){r.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,altered:!(null===e||void 0===e?void 0:e.succeeded)}),!0===(null===e||void 0===e?void 0:e.succeeded)?S.b.success("Reset Password Email sent"):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(e){r.setState({error:e}),S.b.error("Reset Password Email could not be sent.")})).finally((function(){r.setState({submitting:!1,loading:!1})}))},r.userRolesSaved=function(){r.toggleIsEditing(t.USER_ROLES,!1)},r.goToUsers=function(){T.push(x.generate(x.USERS))},r.changeTab=function(e){r.setState({activeTab:e}),T.replace(x.generate("",{},{activeTab:e}),{activeTab:e})},r.changeSubTabOrganization=function(e){r.setState({activeTab:e}),T.replace(x.generate("",{},{activeTab:r.state.activeTab,subTabOrganization:e}),{activeTab:r.state.activeTab,subTabOrganization:e})},r.changeSubTabCipNumber=function(e){r.setState({activeTab:e}),T.replace(x.generate("",{},{activeTab:r.state.activeTab,subTabCipNumber:e}),{activeTab:r.state.activeTab,subTabCipNumber:e})},r.handleLock=function(){r.setState({submitting:!0});var e=JY({userId:r.state.userId});Ua.lockUser(e).then((function(){r.loadUser(r.state.userId)})).catch((function(){S.b.error("Could not lock user")})).finally((function(){r.setState({submitting:!1})}))},r.handleUnlock=function(){r.setState({submitting:!0});var e=$Y({userId:r.state.userId});Ua.unlockUser(e).then((function(){r.loadUser(r.state.userId)})).catch((function(){S.b.error("Could not unlock user")})).finally((function(){r.setState({submitting:!1})}))},r.state={userId:re.default.Empty(),user:_a.create(),editings:new Map,activeTab:"details",subTabOrganizations:"districts",subTabCipNumber:"serviceArea"},r}return tU(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id"),n=Hr.getParameter("activeTab","details"),r=Hr.getParameter("subTabOrganization","districts"),i=Hr.getParameter("subTabCipNumber","serviceArea");this.setState({activeTab:n,subTabOrganizations:r,subTabCipNumber:i}),"new"==e?this.toggleIsEditing(t.USER_DETAILS,!0):this.loadUser(e)},t.prototype.render=function(){var e,t=this.state.loading?"...":this.state.userId==re.default.Empty()?"New User":null!==(e=this.state.user.fullName)&&void 0!==e?e:"...",n=null;return this.state.user.isLocked&&(t=Object(o.jsxs)("span",{children:[Object(o.jsx)(dt.a,{},void 0)," ",t]},void 0),n="Locked on "+$r.shortDateAndTime(this.state.user.lockoutStart)),Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:t,subTitle:n,onBack:this.goToUsers,breadcrumbs:Xn.userDetails(t,this.state.userId),extra:this.renderMoreActions(),footer:Object(o.jsxs)(pa.a,nU({activeKey:this.state.activeTab,onChange:this.changeTab},{children:[Object(o.jsx)(pa.a.TabPane,{tab:"Details"},"details"),Object(o.jsx)(pa.a.TabPane,{tab:"Work Items"},"work_items"),Object(o.jsx)(pa.a.TabPane,{tab:"Organizations"},"organizations"),Object(o.jsx)(pa.a.TabPane,{tab:"Assignments"},"assignments"),Object(o.jsx)(pa.a.TabPane,{tab:"Roles"},"roles")]}),"content")},void 0),Object(o.jsx)(zr,{when:this.isEditingCheck},void 0),this.renderDetailsCard(),this.renderWorkItemsCard(),this.renderCipAssignments(),this.renderRolesCard(),this.renderOrganizations()]},void 0)},t.prototype.renderDetailsCard=function(){var e=this;if("details"===this.state.activeTab&&this.state.editings){var n=this.state.userId==re.default.Empty()?null:Object(o.jsx)(Ze,nU({validFeatureFlags:[gn.EDIT_USER,gn.MANAGE_AA_USER]},{children:Object(o.jsx)(Br,{onClick:function(){return e.toggleIsEditing(t.USER_DETAILS)},isEditing:this.state.editings.get(t.USER_DETAILS)},void 0)}),void 0);return Object(o.jsx)(Qn.a,nU({title:"Details",extra:n},{children:Object(o.jsx)(GY,{ref:this._userDetailsRef,userId:this.state.userId,isEditing:this.state.editings.get(t.USER_DETAILS),onSave:this.userDetailsSaved},void 0)}),void 0)}},t.prototype.renderRolesCard=function(){var e=this;if("roles"===this.state.activeTab&&this.state.userId!=re.default.Empty()&&this.state.editings){var n=this.state.userId==re.default.Empty()?null:Object(o.jsx)(Ze,nU({validFeatureFlags:[gn.EDIT_USER]},{children:Object(o.jsx)(Br,{onClick:function(){return e.toggleIsEditing(t.USER_ROLES)},isEditing:this.state.editings.get(t.USER_ROLES)},void 0)}),void 0);return Object(o.jsx)(Qn.a,nU({title:"Roles",extra:n},{children:Object(o.jsx)(KY,{ref:this._userRolesRef,userId:this.state.userId,isEditing:this.state.editings.get(t.USER_ROLES),onSave:this.userRolesSaved},void 0)}),void 0)}},t.prototype.renderOrganizations=function(){if("organizations"===this.state.activeTab&&this.state.userId&&this.state.userId!=re.default.Empty())return Object(o.jsx)(Qn.a,nU({title:"Organizations"},{children:Object(o.jsx)(YY,{subTab:this.state.subTabOrganizations,onChangeTab:this.changeSubTabOrganization,userId:this.state.userId},void 0)}),void 0)},t.prototype.renderWorkItemsCard=function(){var e,t;if("work_items"===this.state.activeTab&&this.state.userId!=re.default.Empty())return Object(o.jsx)(Qn.a,nU({title:"Work Items"},{children:Object(o.jsx)(nM,{currentUserId:null!==(t=null===(e=this.props.currentUser)||void 0===e?void 0:e.userId)&&void 0!==t?t:re.default.Empty(),userId:this.state.userId},void 0)}),void 0)},t.prototype.renderCipAssignments=function(){if("assignments"===this.state.activeTab&&this.state.userId!=re.default.Empty())return Object(o.jsx)(Qn.a,nU({title:"Assignments"},{children:Object(o.jsx)(qM,{onChangeTab:this.changeSubTabCipNumber,subTab:this.state.subTabCipNumber,userId:this.state.userId},void 0)}),void 0)},t.prototype.renderMoreActions=function(){var e=this,t=Object(o.jsxs)(Gt.a,{children:[Object(o.jsx)(Gt.a.Item,nU({title:"Delete User",onClick:function(){return e.deleteConfirmation(e.state.userId)}},{children:"Delete User"}),"delete_"+this.state.userId),this.state.user.statusTypeId===FF.PENDING&&Je.isAuthorized([gn.SYSTEM_ADMIN])?Object(o.jsx)(Gt.a.Item,nU({title:"Resend Confirmation Email",onClick:function(){return e.resendConfirmation(e.state.userId)}},{children:"Resend Confirmation Email"}),"resend_"+this.state.userId):null,Je.isAuthorized([gn.SYSTEM_ADMIN])?Object(o.jsx)(Gt.a.Item,nU({title:"Send Password Reset",onClick:function(){return e.resendResetPassword(e.state.userId)}},{children:"Send Password Reset"}),this.state.userId):null]},void 0);return Object(o.jsx)(Ze,nU({validFeatureFlags:[gn.EDIT_USER]},{children:Object(o.jsxs)(y.b,nU({direction:"horizontal"},{children:[this.renderUnlockLock(),Object(o.jsx)(la.a,nU({overlay:t},{children:Object(o.jsx)(rt.a,nU({size:"large",type:"link"},{children:Object(o.jsx)(aa.a,{},void 0)}),void 0)}),void 0)]}),void 0)}),void 0)},t.prototype.renderUnlockLock=function(){return this.state.user.isLocked?Object(o.jsx)(rt.a,nU({onClick:this.handleUnlock,loading:this.state.submitting,icon:Object(o.jsx)(eM.a,{},void 0)},{children:"Unlock User"}),void 0):this.state.user.isLocked?void 0:Object(o.jsx)(rt.a,nU({type:"default",danger:!0,onClick:this.handleLock,loading:this.state.submitting,icon:Object(o.jsx)(dt.a,{},void 0)},{children:"Lock User"}),void 0)},t.USER_DETAILS="USER_DETAILS",t.USER_ROLES="USER_ROLES",t}(a.Component);var iU=Object(u.i)(Object(l.b)((function(e){return{institution:e.Institution.Selected,currentUser:e.UserSession.Value}}))(rU)),oU=function(e){return Object.assign({firstName:"",lastName:"",email:"",ph
1oneNumber:"",institutionId:"00000000-0000-0000-0000-000000000000"},e)},aU="firstName",sU="lastName",dU="email",cU="phoneNumber",lU=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),uU=function(){return uU=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},uU.apply(this,arguments)},pU=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._formItems=(new Map).set(aU,{required:!0,name:aU,label:"First Name",rules:[Ot.required(),Ot.maxLength(150)]}).set(sU,{required:!0,name:sU,label:"Last Name",rules:[Ot.required(),Ot.maxLength(150)]}).set(dU,{required:!0,name:dU,label:"Email",rules:[Ot.required(),Ot.maxLength(150)]}).set(cU,{required:!1,name:cU,label:"Phone Number",rules:[]}),n.submit=function(){n.handleSubmit()},n.reset=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields()},n.handleChange=function(){n.setState({altered:!0})},n.handleSubmit=function(){var e;n.setState({submitting:!0});var t=oU(n._formRef?n._formRef.current.getFieldsValue():null);t.institutionId=null!==(e=n.props.institutionId)&&void 0!==e?e:re.default.Empty(),Ua.addUser(t).then((function(e){var t;n.setState({submitted:!0}),(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Added!"),n.props.onSuccess&&n.props.onSuccess(),null===(t=n._formRef.current)||void 0===t||t.resetFields(),n.setState({altered:!1}),n.props.onSuccess&&n.props.onSuccess()):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Error Adding User"))})).catch((function(e){n.setState({error:e}),S.b.error("Error Adding User")})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.state={},n}return lU(t,e),t.prototype.render=function(){return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsx)(y.b,uU({size:"small",direction:"vertical"},{children:Object(o.jsxs)(ht.a,uU({ref:this._formRef,layout:"vertical",onValuesChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!0},{children:[Object(o.jsx)(mt.a,uU({},this._formItems.get(aU),_t.getValidation(aU,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,uU({},this._formItems.get(sU),_t.getValidation(sU,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,uU({},this._formItems.get(dU),_t.getValidation(dU,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,uU({},this._formItems.get(cU),_t.getValidation(cU,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:this.state.loading||this.state.submitting},void 0)}),void 0),this.renderSave()]}),void 0)}),void 0)},t.prototype.renderSave=function(){return Object(o.jsx)(Ze,uU({validFeatureFlags:(this.props.isNew,[gn.EDIT_CATEGORY])},{children:Object(o.jsx)(y.b,uU({direction:"horizontal"},{children:Object(o.jsx)(Tr,{htmlType:"submit",disabled:!br.canSubmit(this._formRef,this._formItems),saving:this.state.submitting,hidden:!0},void 0)}),void 0)}),void 0)},t.prototype.renderErrors=function(){if(this.state.error)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t}(a.Component),fU=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),hU=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return fU(t,e),t.prototype.aaUserImporter=function(e){var t="api/aaUsers/aaUserImporterhandler";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!1,!1)},t.prototype.aaUserTempalte=function(){var e="api/aaUsers/aaUserTemplate";return e=e.replace(/null|undefined/gi,""),this.SendRequest(null,"get",e,!0,!1)},t}(U),vU=new hU,mU="file",gU=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),bU=function(){return bU=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},bU.apply(this,arguments)},yU=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n.getFormItems=function(){return(new Map).set(mU,{name:mU,label:"Please select a file to import AA Users"})},n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields()},n.confirmImport=function(){var e,t,r=null!==(t=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldsValue())&&void 0!==t?t:{};f.a.confirm({title:"Import Data",content:"Importing this file will deactivate any accounts not included in the file.",onOk:function(){return n.handleSubmit(r)},width:500})},n.handleSubmit=function(e){if(n.setState({submitting:!0}
1),br.canSubmit(n._formRef,n.getFormItems())){var t=e.file.newFiles[0],r=Za.attachFileToModel("aaUserImporter",{},mU,t);n.setState({loading:!0}),vU.aaUserImporter(r).then((function(e){n.resetForm(),n.setState({submitting:!1});R.a.downloadBase64StringAsExcel("AA User Summary Report.xlsx",null!==e&&void 0!==e?e:void 0)})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1}),n.props.onSubmit&&n.props.onSubmit([])}))}else S.b.error("Please fill out all required fields."),n.setState({loading:!1,submitting:!1})},n.downloadTemplate=function(){window.open(x.generateFull(x.AA_USER_IMPORT_TEMPLATE,{},{}),"_blank")},n.state={},n}return gU(t,e),t.prototype.render=function(){return Object(o.jsx)(y.b,bU({direction:"vertical"},{children:Object(o.jsx)(Ci.a,bU({layout:"vertical",onFinish:this.handleSubmit,ref:this._formRef},{children:Object(o.jsxs)(y.b,bU({direction:"vertical"},{children:[Object(o.jsx)(Ci.a.Item,bU({},this.getFormItems().get(mU),_t.getValidation(mU,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(hs,{maxCount:1,style:{width:300}},void 0)}),void 0),this.props.isInModal?null:Object(o.jsx)(rt.a,bU({htmlType:"submit",type:"primary",loading:this.state.loading},{children:"Import"}),void 0),Object(o.jsx)(rt.a,bU({icon:Object(o.jsx)(pn.a,{},void 0),type:"link",onClick:this.downloadTemplate},{children:"Download Template"}),void 0),this.renderErrors()]}),void 0)}),void 0)}),void 0)},t.prototype.renderErrors=function(){if(this.state.error&&this.state.message)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:this.state.message},void 0)},t}(a.Component),OU=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),jU=function(){return jU=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},jU.apply(this,arguments)},IU=function(e){function t(t){var n=e.call(this,t)||this;return n._addUserFormRef=a.createRef(),n._aaUserImporterref=a.createRef(),n.fetchData=function(){var e;Ii.Institutions().then((function(e){return n.setState({institutions:e})})),Ii.StatusTypes().then((function(e){return n.setState({statuses:e})})),null!=n.props.institution&&void 0!=n.props.institution?Ii.InstitutionRoles().then((function(e){return n.setState({roles:e})})):Ii.Roles().then((function(e){return n.setState({roles:e})}));var t=[];0===(null===(e=n.state.rpps)||void 0===e?void 0:e.length)&&t.push(n.fetchRpps()),Promise.all(t).then((function(){n.setState({loading:!1})}))},n.fetchRpps=function(){return be.getAllRpps().then((function(e){var t;e.succeeded&&n.setState({rpps:null!==(t=e.regions)&&void 0!==t?t:[]})}))},n.getColumnDefinitions=function(){var e=[{title:"",dataIndex:_a.isLocked,renderDataTransform:function(e,t){return t.isLocked?Object(o.jsx)(dt.a,{},void 0):null},width:25},{title:"Name",dataIndex:_a.fullName,sorter:!0,filterType:wr.Text},{title:"Email",dataIndex:_a.username,sorter:!0,filterType:wr.Text,width:350}];return null==n.props.institution&&e.push({title:"Institutions",dataIndex:_a.institutionNames,renderDataTransform:function(e,t){return ei.newLineFormat(e,!0)},filterType:wr.DropdownMulti,width:350,dropdownFilterOptions:n.state.institutions}),null==n.props.district&&e.push({title:"Districts",dataIndex:_a.districtNames,renderDataTransform:function(e,t){if(e)return ei.newLineFormat(e,!0)},filterType:wr.Text,width:350}),null==n.props.rpp&&e.push({title:"RPPs",dataIndex:_a.rppIds,renderDataTransform:function(e,t){var r,i=null===(r=n.state.rpps)||void 0===r?void 0:r.filter((function(e){var n;return(null===(n=t.rppIds)||void 0===n?void 0:n.indexOf(e.regionalPlanningPartnerIdentifier))>=0})).map((function(e){return e.name})).sort();if(i)return ei.newLineFormat(i,!0)},filterType:wr.Text,width:350}),e.push({title:"Roles",dataIndex:_a.roles,renderDataTransform:function(e,t){return ei.newLineFormat(e,!0)},filterType:wr.DropdownMulti,width:350,dropdownFilterOptions:n.state.roles}),e.push({title:"Status",dataIndex:_a.statusTypeId,renderDataTransform:function(e,t){var n;return null===(n=t.status)||void 0===n?void 0:n.name},filterType:wr.DropdownMulti,width:225,dropdownFilterOptions:n.state.statuses}),e},n.openUser=function(e){var t,r;e.id&&(null==n.props.institution?T.push(x.generate(x.USER_DETAILS,{id:e.id},{})):n.props.institution&&T.push(x.generate(x.INSTITUTION_USER_DETAILS,{institutionId:null!==(r=null===(t=n.props.institution)||void 0===t?void 0:t.id)&&void 0!==r?r:"",userId:e.id})))},n.addUser=function(){n.setState({addUser:!0})},n.submitAddUser=function(){var e;null===(e=n._addUserFormRef.current)||void 0===e||e.submit()},n.cancelAddUser=function(){var e;n.setState({addUser:!1}),null===(e=n._addUserFormRef.current)||void 0===e||e.reset()},n.userAdded=function(){var e;n.setState({addUser:!1}),null===(e=n._dataTable)||void 0===e||e.refresh()},n.openAAImporterModal=function(){n.setState({loading:!0}),f.a.confirm({title:"Import",content:Object(o.jsx)(yU,{ref:n._aaUserImporterref,isInModal:!0,onSubmit:n.modalSubmit},void 0),onOk:function(){var e;return null===(e=n._aaUserImporterref.current)||void 0===e?void 0:e.confirmImport()},onCancel:function(){return n.modalCancel()},width:500})},n.modalSubmit=function(e){n.setState({loading:!1,errors:e})},n.modalCancel=function(){n.setState({loading:!1})},n.downloadTemplate=function(){window.open(x.generateFull(x.AA_USER_IMPORT_TEMPLATE,{},{}),"_blank")},n.renderErrors=function(){if(n.state.errors&&n.state.errors.length>0)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:n.state.errors.map((function(e){return Object(o.jsxs)(o.Fragment,{children:[e," ",Object(o.jsx)("br",{},void 0)]},void 0)}))},void 0)},n.state={institutions:[],districts:[],roles:[],statuses:[],rpps:[],addUser:!1},n}return OU(t,e),t.prototype.componentDidMount=function(){this.fetchData()},t.prototype.render=function(){return Object(o.jsxs)(o.Fragment,{children:[this.renderAddUserModal(),this.renderDataTable()]},void 0)},t.prototype.renderAddUserModal=function(){var e,t;return Object(o.jsx)(f.a,jU({visible:this.state.addUser,title:"Add User",okText:"Add",onOk:this.submitAddUser,onCancel:this.cancelAddUser},{children:Object(o.jsx)(pU,{ref:this._addUserFormRef,onSuccess:this.userAdded,institutionId:null!==(t=null===(e=this.props.institution)||void 0===e?void 0:e.id)&&void 0!==t?t:re.default.Empty()},void 0)}),void 0)},t.prototype.renderDataTable=function(){var e=this,t=[];return t.push(oo.Reset()),Je.isAuthorized([gn.EDIT_USER,gn.MANAGE_INSTITUTION_USER])&&t.pu
1sh(oo.Default("Add User",(function(){return e.addUser()}))),Je.isAuthorized([gn.MANAGE_AA_USER])&&t.push(oo.Default("Import AA Users",(function(){return e.openAAImporterModal()}),void 0,this.state.loading)),Je.isAuthorized([gn.MANAGE_AA_USER])&&t.push(oo.Default("Template",(function(){return e.downloadTemplate()}),Object(o.jsx)(pn.a,{},void 0),this.state.loading)),Object(o.jsxs)(o.Fragment,{children:[this.renderErrors(),Object(o.jsx)(io,{ref:function(t){return e._dataTable=t},onRowClick:this.openUser,serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:t,columns:this.getColumnDefinitions(),fetchData:{fetch:function(t){var n,r,i,o,a,s;return Ua.getUsersList(t,null!==(r=null===(n=e.props.institution)||void 0===n?void 0:n.id)&&void 0!==r?r:re.default.Empty(),null!==(o=null===(i=e.props.district)||void 0===i?void 0:i.districtId)&&void 0!==o?o:0,null!==(s=null===(a=e.props.rpp)||void 0===a?void 0:a.regionalPlanningPartnerIdentifier)&&void 0!==s?s:0)}},stateSaving:{enabled:!0,tableUniqueKey:"users_list"}},void 0)]},void 0)},t}(a.Component),SU=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),EU=function(e){function t(t){return e.call(this,t)||this}return SU(t,e),t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Users",breadcrumbs:Xn.userList()},void 0),Object(o.jsx)(Qn.a,{children:Object(o.jsx)(IU,{institution:this.props.institution,district:this.props.selectedDistrict,rpp:this.props.selectedRPP},void 0)},void 0)]},void 0)},t}(a.Component);var RU=Object(u.i)(Object(l.b)((function(e){return{institution:e.Institution.Selected,selectedDistrict:e.District.Selected,selectedRPP:e.RegionalPlanningPartner.Selected}}))(EU)),_U=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),TU=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _U(t,e),t.prototype.getUserDetails=function(){var e="api/userSettings/getUserDetails";return e=e.replace(/null|undefined/gi,""),this.SendRequest(null,"post",e,!0,!1)},t.prototype.saveUser=function(e){var t="api/userSettings/save";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t}(U),CU=new TU,xU=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),AU=function(){return AU=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},AU.apply(this,arguments)},PU=function(e){function t(n){var r=e.call(this,n)||this;return r._userDetailsRef=a.createRef(),r._resetPasswordRef=a.createRef(),r.loadUser=function(){r.setState({loading:!0}),CU.getUserDetails().then((function(e){var t;r.setState({user:null!==(t=e.user)&&void 0!==t?t:_a.create()})})).finally((function(){r.setState({loading:!1})}))},r.toggleIsEditing=function(e,n){var i,o,a;if(r.state.editings){var s=r.state.editings;if(void 0!==n?s.set(e,n):s.set(e,null===(i=!s.get(e))||void 0===i||i),!s.get(e))switch(e){case t.USER_DETAILS:null===(o=r._userDetailsRef.current)||void 0===o||o.resetForm();break;case t.RESET_PASSWORD:null===(a=r._resetPasswordRef.current)||void 0===a||a.reset()}r.setState({editings:s})}},r.isEditingCheck=function(){return!!r.state.editings&&Array.from(r.state.editings.values()).includes(!0)},r.userDetailsSaved=function(){r.toggleIsEditing(t.USER_DETAILS,!1),r.loadUser()},r.resetPasswordSaved=function(){r.toggleIsEditing(t.RESET_PASSWORD,!1)},r.goHome=function(){T.push(x.generate(x.HOME))},r.state={user:_a.create(),editings:new Map},r}return xU(t,e),t.prototype.componentDidMount=function(){this.loadUser()},t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"User Settings",onBack:this.goHome,breadcrumbs:Xn.userSettings()},void 0),Object(o.jsx)(zr,{when:this.isEditingCheck},void 0),Object(o.jsxs)(y.b,AU({direction:"vertical",size:"large"},{children:[this.renderDetailsCard(),this.renderPasswordCard()]}),void 0)]},void 0)},t.prototype.renderDetailsCard=function(){var e,n,r,i=this;if(this.state.editings){var a=(null===(e=this.props.user)||void 0===e?void 0:e.userId)==re.default.Empty()?null:Object(o.jsx)(Ze,AU({validFeatureFlags:[gn.EDIT_USER]},{children:Object(o.jsx)(Br,{onClick:function(){return i.toggleIsEditing(t.USER_DETAILS)},isEditing:this.state.editings.get(t.USER_DETAILS)},void 0)}),void 0);return Object(o.jsx)(Qn.a,AU({title:"User Details",extra:a},{children:Object(o.jsx)(GY,{ref:this._userDetailsRef,userId:null!==(r=null===(n=this.props.user)||void 0===n?void 0:n.userId)&&void 0!==r?r:re.default.Empty(),isEditing:this.state.editings.get(t.USER_DETAILS),onSave:this.userDetailsSaved},void 0)}),void 0)}},t.prototype.renderPasswordCard=function(){var e,t;return Object(o.jsx)(Qn.a,AU({title:"Change Password"},{children:Object(o.jsx)(ta,{userId:null!==(t=null===(e=this.props.user)||void 0===e?void 0:e.userId)&&void 0!==t?t:re.default.Empty(),isEditing:!0,onSave:this.resetPasswordSaved},void 0)}),void 0)},t.USER_DETAILS="USER_DETAILS",t.RESET_PASSWORD="RESET_PASSWORD",t}(a.Component);var NU=Object(u.i)(Object(l.b)((function(e){var t,n;return{user:null!==(n=null===(t=e.UserSession)||void 0===t?void 0:t.Value)&&void 0!==n?n:null}}))(PU)),wU=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),DU=function(){return DU=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},DU.apply(this,arguments)},qU=function(e){function t(t){var n=e.call(this,t)||this;return n.componentDidMount=function(){var e=Hr.getParameter("activeTab","your_work_items");n.setState({activeTab:e})},n.changeTab=function(e){n.setState({activeTab:e}),T.replace(x.generate("",{},{activeTab:e}),{activeTab:e})},n.state={activeTab:"your_work_items"},n}return wU(t,e),t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Work Items",breadcrumbs:Xn.workItems(),footer:Je.isAuthorized([gn.VIEW_INSTITUTION_WORK_ITEMS,gn.VIEW_ALL_WORK_ITEMS])?Object(o.jsxs)(pa.a,DU({activeKey:this.state.activeTab,onChange:this.changeTab},{children:[Object(o.jsx)(pa.a.TabPane,{tab:"You"},"your_work_items"),this.props.institution&&Je.isAuthorized([gn.VIEW_INSTITUTION_WORK_ITEMS])?Object(o.jsx)(pa.a.TabPane,{tab:this.props.institution.abbreviation+" Users"},"institution_work_items"):null,Je.isAuthorized([gn.VIEW_ALL_WORK_ITEMS])?Object(o.jsx)(pa.a.TabPane,{tab:"All Users"},"all_work_items"):null]}),void 0):null},void 0),this.renderYourItems(),this.renderInstitutionItems(),this.renderAllItems()]},void 0)},t.prototype.renderYourItems=function(){var e,t,n,r;if("your_work_items"===this.state.activeTab)return Object(o.jsx)(Qn.a,DU({title:"Personal"},{children:Object(o.jsx)(nM,{currentUserId:null!==(t=null===(e=this.props.currentUser)||void 0===e?void 0:e.userId)&&void 0!==t?t:re.default.Empty(),userId:null===(n=this.props.currentUser)||void 0===n?void 0:n.userId,institutionId:null===(r=this.props.institution)||void 0===r?void 0:r.id},void 0)}),void 0)},t.prototype.renderInstitutionItems=function(){var e,t,n,r;if("institution_work_items"===this.state.activeTab)return Object(o.jsx)(Qn.a,DU({title:(null===(e=this.props.institution)||void 0===e?void 0:e.name)+" Users"},{children:Object(o.jsx)(nM,{currentUserId:null!==(n=null===(t=this.props.currentUser)||void 0===t?void 0:t.userId)&&void 0!==n?n:re.default.Empty(),institutionId:null===(r=this.props.institution)||void 0===r?void 0:r.id},void 0)}),void 0)},t.prototype.renderAllItems=function(){var e,t;if("all_work_items"===this.state.activeTab)return Object(o.jsx)(Qn.a,DU({title:"All Users"},{children:Object(o.jsx)(nM,{currentUserId:null!==(t=null===(e=this.props.currentUser)||void 0===e?void 0:e.userId)&&void 0!==t?t:re.default.Empty()},void 0)}),void 0)},t}(a.Component);var FU=Object(u.i)(Object(l.b)((function(e){return{institution:e.Institution.Selected,currentUser:e.UserSession.Value}}))(qU)),MU=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),YU=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return MU(t,e),t.prototype.getWorkBasedLearningTypeTableData=function(e){var t="api/workBasedLearningType";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getWorkBasedLearningTypeDataTableExport=function(e){var t="api/workBasedLearningType/export";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getWorkBasedLearningTypeDetails=function(e){var t="api/workBasedLearningType/"+e;return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.saveWorkBasedLearningTypeDetails=function(e){var t="api/workBasedLearningType/save";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.deleteWorkBasedLearningType=function(e){var t="api/workBasedLearningType/deleteWorkBasedLearningType";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t}(U),UU=new YU,LU=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),kU=function(e){function t(t){var n=e.call(this,t)||this;return n.getColumnDefinitions=function(){return[{title:"Name",dataIndex:Nl.name,sorter:!0,filterType:wr.Text}]},n.openInstructionalLevel=function(e){e.id&&T.push(x.generate(x.WORK_BASED_LEARNING_DETAILS,{id:e.id},{}))},n.addWorkBaseLearningType=function(){T.push(x.generate(x.NEW_WORK_BASED_LEARNING_TYPE))},n.state={},n}return LU(t,e),t.prototype.render=function(){var e=this,t=[];return t.push(oo.Reset()),t.push(oo.Export((function(t){return e.setState({exporting:!0}),UU.getWorkBasedLearningTypeDataTableExport(t).then((function(t){e.setState({exporting:!1}),R.a.downloadBase64StringAsFile("Work_Based_Learning_Type_"+$r.getDateStamp()+".xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",null!==t&&void 0!==t?t:void 0)}))}),this.state.exporting)),Je.isAuthorized([gn.EDIT_WORK_BASED_LEARNING])&&t.push(oo.Default("New Work Based Learning Type",(function(){return e.addWorkBaseLearningType()}))),Object(o.jsx)(o.Fragment,{children:Object(o.jsx)(io,{ref:function(t){return e._dataTable=t},onRowClick:this.openInstructionalLevel,serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:t,columns:this.getColumnDefinitions(),fetchData:{fetch:function(e){return UU.getWorkBasedLearningTypeTableData(e)}},stateSaving:{enabled:!0,tableUniqueKey:"work_based_learning_type_list"}},void 0)},void 0)},t}(a.Component),GU=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),VU=function(e){function t(t){var n=e.call(this,t)||this;return n.goToConfig=function(){T.push(x.generate(x.CONFIGURATIONS))},n}return GU(t,e),t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Work Based Learning Types",onBack:this.goToConfig,breadcrumbs:Xn.workBasedLearningTypeList()},void 0),Object(o.jsx)(Qn.a,{children:Object(o.jsx)(kU,{},void 0)},void 0)]},void 0)},t}(a.Component),BU=Object(u.i)(VU),WU=function(e){return Object.assign({workBasedLearningTypeId:0,workBasedLearningType:null},e)},zU=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),HU=function(){return HU=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},HU.apply(this,arguments)},QU=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._formItems=(new Map).set(Nl.name,{required:!0,name:Nl.name,label:"Name",rules:[Ot.required(),Ot.maxLength(150)]}),n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields(),n.setState({altered:!1})},n.loadExisting=function(){n.props.workBasedLearningTypeId&&UU.getWorkBasedLearningTypeDetails(n.props.workBasedLearningTypeId).then((function(e){var t;e&&(null===(t=e.workBasedLearningType)||void 0===t?void 0:t.id)&&n.setState({workBasedLearningTypeId:e.workBasedLearningType.id,workBasedLearningType:e.workBasedLearningType,loading:!1}),n.resetForm()})).catch((function(){n.setState({error:!0})}
1)).finally((function(){n.setState({loading:!1})}))},n.loadNew=function(){n.setState({workBasedLearningType:Nl.create(),loading:!1})},n.handleChange=function(){n.setState({altered:!0})},n.handleSubmit=function(){n.setState({submitting:!0});var e=WU({workBasedLearningTypeId:n.state.workBasedLearningTypeId,workBasedLearningType:Nl.create(n._formRef?n._formRef.current.getFieldsValue():null)});UU.saveWorkBasedLearningTypeDetails(e).then((function(e){var t;n.setState({submitted:!0,workBasedLearningType:null===e||void 0===e?void 0:e.workBasedLearningType}),(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.props.onSave&&(null===(t=e.workBasedLearningType)||void 0===t?void 0:t.id)&&(n.props.onSave(e.workBasedLearningType.id),n.resetForm()),ce.invalidateCache(Nl.className)):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Instructional Level could not be saved. "+n.state.message))})).catch((function(e){n.setState({error:e}),S.b.error("Instructional Level could not be saved.")})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.state={workBasedLearningTypeId:0,workBasedLearningType:Nl.create()},n}return zU(t,e),t.prototype.componentDidMount=function(){this.setState({loading:!0}),this.loadWorkBasedLearningType()},t.prototype.componentDidUpdate=function(e){this.props.workBasedLearningTypeId&&this.props.workBasedLearningTypeId!=e.workBasedLearningTypeId&&(this.setState({workBasedLearningTypeId:this.props.workBasedLearningTypeId}),this.loadWorkBasedLearningType())},t.prototype.loadWorkBasedLearningType=function(){0==this.props.workBasedLearningTypeId?this.loadNew():this.loadExisting()},t.prototype.render=function(){var e;return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(y.b,HU({size:"small",direction:"vertical"},{children:[this.renderErrors(),Object(o.jsxs)(ht.a,HU({ref:this._formRef,layout:"vertical",onValuesChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!0},{children:[Object(o.jsx)(mt.a,HU({},this._formItems.get(Nl.name),{initialValue:null===(e=this.state.workBasedLearningType)||void 0===e?void 0:e.name},_t.getValidation(Nl.name,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),this.renderSave()]}),void 0)]}),void 0)},t.prototype.renderSave=function(){if(this.props.isEditing)return Object(o.jsx)(Ze,HU({validFeatureFlags:[gn.EDIT_INSTRUCTIONAL_LEVEL]},{children:Object(o.jsxs)(y.b,HU({direction:"horizontal"},{children:[Object(o.jsx)(Tr,{saving:this.state.saving},void 0),Object(o.jsx)(Ir,{onConfirm:this.resetForm,disabled:!this.state.altered},void 0)]}),void 0)}),void 0)},t.prototype.renderErrors=function(){if(this.state.error&&this.state.submitted)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t}(a.Component),KU=function(e){return Object.assign({workBasedLearningTypeId:null},e)},XU=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),JU=function(){return JU=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},JU.apply(this,arguments)},$U=function(e){function t(t){var n=e.call(this,t)||this;return n._detailsRef=a.createRef(),n.loadWorkBasedLearningType=function(e){n.setState({workBasedLearningTypeId:e}),UU.getWorkBasedLearningTypeDetails(e).then((function(e){e.workBasedLearningType&&n.setState({workBasedLearningType:e.workBasedLearningType})})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}
1))},n.toggleEdit=function(){var e;n.state.isEditing&&(null===(e=n._detailsRef.current)||void 0===e||e.resetForm()),n.setState({isEditing:!n.state.isEditing})},n.specialEmphasisDetailsSaved=function(e){n.setState({isEditing:!1}),e!=n.state.workBasedLearningTypeId?T.replace(x.generate(x.WORK_BASED_LEARNING_DETAILS,{id:e})):n.loadWorkBasedLearningType(e)},n.deleteConfirmation=function(e){f.a.confirm({title:"Are you sure you want to delete this Work Based Learning Type?",okText:"Delete",onOk:function(){return n.deleteWorkBasedLearningType(e)}})},n.deleteWorkBasedLearningType=function(e){n.setState({submitting:!0});var t=KU({workBasedLearningTypeId:e});UU.deleteWorkBasedLearningType(t).then((function(e){n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,altered:!(null===e||void 0===e?void 0:e.succeeded)}),!0===(null===e||void 0===e?void 0:e.succeeded)?S.b.success("Work Based Learning Type was removed."):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(e){n.setState({error:e}),S.b.error("Work Based Learning Type could not be removed.")})).finally((function(){n.setState({loading:!1}),n.goToWorkBasedLearningType()}))},n.goToWorkBasedLearningType=function(){T.goBack()},n.state={workBasedLearningTypeId:0},n}return XU(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id");if("new"==e)this.setState({isEditing:!0,isNew:!0,loading:!1});else{var t=Number.parseInt(e);this.loadWorkBasedLearningType(t)}},t.prototype.render=function(){var e,t,n=this.state.loading?"...":0==this.state.workBasedLearningTypeId?"New Work Based Learning Type":null!==(t=null===(e=this.state.workBasedLearningType)||void 0===e?void 0:e.name)&&void 0!==t?t:"...";return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:n,onBack:this.goToWorkBasedLearningType,breadcrumbs:Xn.workBasedLearningTypeDetails(n,this.state.workBasedLearningTypeId),extra:this.renderMoreActions()},void 0),Object(o.jsx)(zr,{when:this.state.isEditing},void 0),this.renderDetailsCard()]},void 0)},t.prototype.renderDetailsCard=function(){var e=0==this.state.workBasedLearningTypeId?null:Object(o.jsx)(Ze,JU({validFeatureFlags:[gn.EDIT_INSTRUCTIONAL_LEVEL]},{children:Object(o.jsx)(Br,{isEditing:this.state.isEditing,onClick:this.toggleEdit},void 0)}),void 0);return Object(o.jsx)(Qn.a,JU({title:"Details",extra:e},{children:Object(o.jsx)(QU,{ref:this._detailsRef,workBasedLearningTypeId:this.state.workBasedLearningTypeId,isEditing:this.state.isEditing,isNew:this.state.isNew,onSave:this.specialEmphasisDetailsSaved},void 0)}),void 0)},t.prototype.renderMoreActions=function(){var e=this,t=Object(o.jsx)(Gt.a,{children:Object(o.jsx)(Gt.a.Item,JU({title:"Delete Work Based Learning Type",onClick:function(){return e.deleteConfirmation(e.state.workBasedLearningTypeId)}},{children:"Delete Work Based Learning Type"}),this.state.workBasedLearningTypeId)},void 0);return Object(o.jsx)(Ze,JU({validFeatureFlags:[gn.EDIT_WORK_BASED_LEARNING]},{children:Object(o.jsx)(la.a,JU({overlay:t},{children:Object(o.jsx)(rt.a,JU({size:"large",type:"link"},{children:Object(o.jsx)(aa.a,{},void 0)}),void 0)}),void 0)}),void 0)},t}(a.Component),ZU=Object(u.i)($U),eL=function(){return Object(o.jsx)(u.b,{to:Object.assign({},location,{state:{is404:!0}})},void 0)},tL=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),nL=function(){return nL=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},nL.apply(this,arguments)},rL=function(e){function t(t){var n=e.call(this,t)||this;return n.goBack=function(){T.replace(x.generate(x.HOME))},n.state={loading:!1,academicYear:0},n}return tL(t,e),t.prototype.componentDidMount=function(){var e=Number.parseInt(Hr.getPathPart(this.props.match,"academicYearId"));this.setState({academicYear:e})},t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Secondary Home",onBack:this.goBack,breadcrumbs:Xn.secondary()},void 0),Object(o.jsx)(y.b,nL({direction:"vertical",size:"large"},{children:Object(o.jsx)(Qn.a,nL({title:""},{children:Object(o.jsxs)(Kn.b,{children:[Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(at.a,nL({to:x.generate(x.ACADEMIC_YEARS)},{children:"Program Review Years"}),void 0)},void 0),Je.isAuthorized([gn.EDIT_DISTRICT,gn.MANAGE_DISTRICT_CONTACT,gn.MANAGE_DISTRICT_USERS])?Object(o.jsx)(Ze,nL({validFeatureFlags:[gn.EDIT_DISTRICT,gn.MANAGE_DISTRICT_CONTACT,gn.MANAGE_DISTRICT_USERS]},{children:Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(at.a,nL({to:x.generate(x.ALL_DISTRICTS)},{children:"Districts"}),void 0)},void 0)}),void 0):null,Je.isAuthorized([gn.EDIT_REGIONAL_PLANNING_PARTNER])?Object(o.jsx)(Ze,nL({validFeatureFlags:[gn.EDIT_REGIONAL_PLANNING_PARTNER]},{children:Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(at.a,nL({to:x.generate(x.REGIONAL_PLANNING_PARTNERS)},{children:"Regional Planning Partner"}),void 0)},void 0)}),void 0):null,Je.isAuthorized([gn.EDIT_SECONDARY_PROGRAM])?Object(o.jsx)(Ze,nL({validFeatureFlags:[gn.EDIT_SECONDARY_PROGRAM]},{children:Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(at.a,nL({to:x.generate(x.ALL_SECONDARY_PROGRAMS)},{children:"Programs"}),void 0)},void 0)}),void 0):null,Je.isAuthorized([gn.EDIT_SECONDARY_COURSE])?Object(o.jsx)(Ze,nL({validFeatureFlags:[gn.EDIT_SECONDARY_COURSE]},{children:Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(at.a,nL({to:x.generate(x.ALL_SECONDARY_COURSES)},{children:"Courses"}),void 0)},void 0)}),void 0):null]},void 0)}),void 0)}),void 0)]},void 0)},t}(a.Component);var iL=Object(u.i)(Object(l.b)((function(e){return{institution:e.Institution.Selected}}))(rL)),oL=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),aL=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oL(t,e),t.prototype.isValidAcademicYear=function(e){var t="api/academicYear/isValid/"+e;return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.getAcademicYearTableData=function(e){var t="api/academicYear";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getAcademicYear=function(e){var t="api/academicYear/get";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getAcademicYears=function(e){var t="api/academicYear/getAca
1demicYearsAllInfo";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getAcademicYearsForAPI=function(){var e="api/academicYear/getAcademicYears";return e=e.replace(/null|undefined/gi,""),this.SendRequest(null,"post",e,!0,!1)},t.prototype.saveAcademicYear=function(e){var t="api/academicYear/save";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.completeAcademicYearDataReview=function(e){var t="api/academicYear/completeDataReview";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.confirmSelfStudiesHandler=function(e){var t="api/academicYear/confirmSelfStudiesHandler";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.sendSelfStudyReminderEmails=function(e){var t="api/academicYear/sendSelfStudyReminderEmails";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.releaseApprovalLetters=function(e){var t="api/academicYear/releaseApprovalLetters";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t}(U),sL=new aL,dL=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),cL=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return dL(t,e),t.prototype.getSelfStudyTableData=function(e,t,n,r){var i="api/selfStudies",o=i.indexOf("?")>0?"&":"?";return null!=t&&(i+=o+"academicYearId="+t,o="&"),null!=n&&(i+=o+"districtId="+n,o="&"),null!=r&&(i+=o+"rppIdentifier="+r,o="&"),i=i.replace(/null|undefined/gi,""),this.SendRequest(e,"post",i,!0,!1)},t.prototype.getSelfStudyReportTableData=function(e,t){var n="api/selfStudies/selfStudyRanking",r=n.indexOf("?")>0?"&":"?";return null!=t&&(n+=r+"academicYearId="+t,r="&"),n=n.replace(/null|undefined/gi,""),this.SendRequest(e,"post",n,!0,!1)},t.prototype.getSelfStudyAggregateReportTableData=function(e,t){var n="api/selfStudies/selfStudyAggregate",r=n.indexOf("?")>0?"&":"?";return null!=t&&(n+=r+"academicYearId="+t,r="&"),n=n.replace(/null|undefined/gi,""),this.SendRequest(e,"post",n,!0,!1)},t.prototype.getSelfStudyAggregateReportDataTableExport=function(e){var t="api/selfStudies/selfStudyAggregateExport",n=t.indexOf("?")>0?"&":"?";return null!=e&&(t+=n+"academicYear="+e,n="&"),t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"get",t,!0,!1)},t.prototype.getSelfStudyRankingReportDataTableExport=function(e){var t="api/selfStudies/selfStudyRankingExport",n=t.indexOf("?")>0?"&":"?";return null!=e&&(t+=n+"academicYear="+e,n="&"),t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"get",t,!0,!1)},t.prototype.getProgramConsultantCommentDataTable=function(e,t){var n="api/selfStudies/programConsultantComments",r=n.indexOf("?")>0?"&":"?";return null!=t&&(n+=r+"academicYearId="+t,r="&"),n=n.replace(/null|undefined/gi,""),this.SendRequest(e,"post",n,!0,!1)},t.prototype.getProgramConsultantCommentReportDataTableExport=function(e){var t="api/selfStudies/programConsultantCommentsExport",n=t.indexOf("?")>0?"&":"?";return null!=e&&(t+=n+"academicYear="+e,n="&"),t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"get",t,!0,!1)},t.prototype.generateSelfStudies=function(e){var t="api/selfStudies/generateSelfStudies";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getSelfStudies=function(e){var t="api/selfStudies/get";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.revokeSelfStudyResponse=function(e){var t="api/selfStudies/revokeResponse";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getSelfStudyResponse=function(e){var t="api/selfStudies/getResponse";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getSelfStudyResponseLite=function(e){var t="api/selfStudies/getResponseLite";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getSelfStudyResponses=function(e){var t="api/selfStudies/getResponses";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getSelfStudyWithProgramOverview=function(e){var t="api/selfStudies/getSelfStudyWithProgramOverview";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getSelfStudyWithRankingQuestion=function(e){var t="api/selfStudies/getSelfStudyWithRankingQuestion";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getSelfStudyWithFreeTextQuestion=function(e){var t="api/selfStudies/getSelfStudyWithFreeTextQuestion";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getSelfStudyWithNewGoals=function(e){var t="api/selfStudies/getSelfStudyWithNewGoals";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getSelfStudyWithPreviousGoals=function(e){var t="api/selfStudies/getSelfStudyWithPreviousGoals";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getSelfStudyWithConsultantReview=function(e){var t="api/selfStudies/getSelfStudyWithConsultantReview";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getSelfStudyByResponse=function(e){var t="api/selfStudies/getSelfStudyByResponse";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.reopenSelfStudyResponse=function(e){var t="api/selfStudies/reopenSelfStudyResponse";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getSelfStudyDetails=function(e){var t="api/selfStudies/getDetails";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.saveSelfStudyDetails=function(e){var t="api/selfStudies/save";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.saveSelfStudySection=function(e){var t="api/selfStudies/saveSection";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.saveSelfStudySectionFile=function(e){var t="api/selfStudies/saveSectionFile";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!1,!1)},t.prototype.removeSelfStudySectionFile=function(e){var t="api/selfStudies/removeSectionFile";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getSelfStudySectionFiles=function(e){var t="api/selfStudies/getSelfStudySectionFiles";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getSelfStudySection=function(e){var t="api/selfStudies/section/"+encodeURIComponent(e);return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"get",t,!0,!1)},t.prototype.getSelfStudySectionBySectionOrder=function(e){var t="api/selfStudies/getSelfStudySection";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.deleteSelfStudy=function(e){var t="api/selfStudies/deleteSelfStudy";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.saveResponseUser=function(e){var t="api/selfStudies/saveResponseUser";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getSelfStudyResponseProgramOverview=function(e){var t="api/selfStudies/getSelfStudyResponseProgramOverview";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getDashboardStats=function(e){var t="api/selfStudies/getDashboardStats";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.saveSelfStudyDECommentRelease=function(e){var t="api/selfStudies/saveSelfStudyDECommentRelease";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.submitSelfStudyInstructorResponse=function(e){var t="api/selfStudies/submitSelfStudyInstructorResponse";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.approveSelfStudyResponseHandler=function(e){var t="api/selfStudies/approveSelfStudyResponseHandler";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getScenarioReport=function(e,t){var n="api/selfStudies/getScenarioReport",r=n.indexOf("?")>0?"&":"?";return null!=t&&(n+=r+"academicYearId="+t,r="&"),n=n.replace(/null|undefined/gi,""),this.SendRequest(e,"post",n,!0,!1)},t.prototype.getScenarioReportExport=function(e,t){var n="api/selfStudies/exportScenarioReport",r=n.indexOf("?")>0?"&":"?";return null!=t&&(n+=r+"academicYearId="+t,r="&"),n=n.replace(/null|undefined/gi,""),this.SendRequest(e,"post",n,!0,!1)},t.prototype.getContactsReport=function(e,t){var n="api/selfStudies/getContactsReport",r=n.indexOf("?")>0?"&":"?";return null!=t&&(n+=r+"academicYearId="+t,r="&"),n=n.replace(/null|undefined/gi,""),this.SendRequest(e,"post",n,!0,!1)},t.prototype.getContactsReportExport=function(e,t){var n="api/selfStudies/exportContactsReport",r=n.indexOf("?")>0?"&":"?";return null!=t&&(n+=r+"academicYearId="+t,r="&"),n=n.replace(/null|undefined/gi,""),this.SendRequest(e,"post",n,!0,!1)},t.prototype.getCareerAcademyReport=function(e,t){var n="api/selfStudies/getCareerAcademyReport",r=n.indexOf("?")>0?"&":"?";return null!=t&&(n+=r+"academicYearId="+t,r="&"),n=n.replace(/null|undefined/gi,""),this.SendRequest(e,"post",n,!0,!1)},t.prototype.getCareerAcademyReportExport=function(e,t){var n="api/selfStudies/exportCareerAcademyReport",r=n.indexOf("?")>0?"&":"?";return null!=t&&(n+=r+"academicYearId="+t,r="&"),n=n.replace(/null|undefined/gi,""),this.SendRequest(e,"post",n,!0,!1)},t.prototype.getActionPlanReport=function(e,t){var n="api/selfStudies/getActionPlanReport",r=n.indexOf("?")>0?"&":"?";return null!=t&&(n+=r+"academicYearId="+t,r="&"),n=n.replace(/null|undefined/gi,""),this.SendRequest(e,"post",n,!0,!1)},t.prototype.getActionPlanRows=function(e){var t="api/selfStudies/getActionPlanRows";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getActionPlanReportDataTableExport=function(e){var t="api/selfStudies/actionPlanReportExport",n=t.indexOf("?")>0?"&":"?";return null!=e&&(t+=n+"academicYear="+e,n="&"),t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"get",t,!0,!1)},t.prototype.getProgramMasterReportDataTableExport=function(e){var t="api/selfStudies/programMasterReportExport",n=t.indexOf("?")>0?"&":"?";return null!=e&&(t+=n+"academicYear="+e,n="&"),t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"get",t,!0,!1)},t.prototype.programsForReviewStats=function(e){var t="api/selfStudies/ProgramsForReviewStats";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.generateSelfStudiesForProgramReview=function(e){var t="api/selfStudies/generateSelfStudiesForProgramReview";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.assignMissingDEConsultants=function(e){var t="api/selfStudies/assignMissingDEConsultants";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getEducationProgramReportDataTableExport=function(e){var t="api/selfStudies/educationProgramReportExport",n=t.indexOf("?")>0?"&":"?";return null!=e&&(t+=n+"academicYear="+e,n="&"),t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"get",t,!0,!1)},t}(U),lL=new cL,uL=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),pL=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return uL(t,e),t.prototype.getSecondaryCipNumberTableData=function(e,t){var n="api/secondaryCipNumbers",r=n.indexOf("?")>0?"&":"?";return null!=t&&(n+=r+"academicYear="+t,r="&"),n=n.replace(/null|undefined/gi,""),this.SendRequest(e,"post",n,!0,!1)},t.prototype.academicYearHasCIPNumbers=function(e){var t="api/secondaryCipNumbers/hasCips/"+e;return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.getUserSecondaryCipNumberTableData=function(e,t){var n="api/secondaryCipNumbers/userCipNumbers",r=n.indexOf("?")>0?"&":"?";return null!=t&&(n+=r+"userId="+encodeURIComponent(t),r="&"),n=n.replace(/null|undefined/gi,""),this.SendRequest(e,"post",n,!0,!1)},t.prototype.getSecondaryCipNumberDetails=function(e){var t="api/secondaryCipNumbers/"+encodeURIComponent(e);return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.saveSecondaryCipNumberDetails=function(e){var t="api/secondaryCipNumbers/save";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.deleteSecondaryCipNumber=function(e){var t="api/secondaryCipNumbers/deleteSecondaryCipNumber";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getSecondaryCipNumbers=function(e){var t="api/secondaryCipNumbers/getSecondaryCipNumbers";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.assignSecondaryCIPNumbers=function(e){var t="api/secondaryCipNumbers/assignSecondaryCIPNumbers";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.unassignSecondaryCIPNumbers=function(e){var t="api/secondaryCipNumbers/unassignSecondaryCIPNumbers";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.searchForSecondaryCipNumbers=function(e){var t="api/secondaryCipNumbers/searchForSecondaryCipNumbers";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.secondaryCipNumberImporter=function(e){var t="api/secondaryCipNumbers/secondaryCipNumberImporter";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!1,!1)},t.prototype.secondaryCipNumberTemplate=function(){var e="api/secondaryCipNumbers/secondaryCipNumberTemplate";return e=e.replace(/null|undefined/gi,""),this.SendRequest(null,"get",e,!0,!1)},t}(U),fL=new pL,hL=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),vL=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return hL(t,e),t.prototype.getSecondaryProgramTableData=function(e,t,n,r){var i="api/secondaryPrograms",o=i.indexOf("?")>0?"&":"?";return null!=t&&(i+=o+"academicYearId="+t,o="&"),null!=n&&(i+=o+"isPublic="+n,o="&"),null!=r&&(i+=o+"id="+encodeURIComponent(r),o="&"),i=i.replace(/null|undefined/gi,""),this.SendRequest(e,"post",i,!0,!1)},t.prototype.getProgramMasterReportTableData=function(e,t){var n="api/secondaryPrograms/programMasterReport",r=n.indexOf("?")>0?"&":"?";return null!=t&&(n+=r+"academicYearId="+t,r="&"),n=n.replace(/null|undefined/gi,""),this.SendRequest(e,"post",n,!0,!1)},t.prototype.getProgramMasterReportDataTableExport=function(e,t){var n="api/secondaryPrograms/export",r=n.indexOf("?")>0?"&":"?";return null!=t&&(n+=r+"academicYearId="+t,r="&"),n=n.replace(/null|undefined/gi,""),this.SendRequest(e,"post",n,!0,!1)},t.prototype.academicYearHasSecondaryPrograms=function(e){var t="api/secondaryPrograms/hasPrograms/"+e;return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.getSecondaryProgramDetails=function(e){var t="api/secondaryPrograms/get";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getSecondaryPrograms=function(e){var t="api/secondaryPrograms/getSecondaryPrograms";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.saveSecondaryProgramDetails=function(e){var t="api/secondaryPrograms/save";return t=t.replace(/null|undefined/gi,""),this.Sen
1dRequest(e,"post",t,!0,!1)},t.prototype.deleteSecondaryProgram=function(e){var t="api/secondaryPrograms/deleteSecondaryProgram";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.secondaryProgramImporter=function(e){var t="api/secondaryPrograms/secondaryProgramImporter";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!1,!1)},t.prototype.searchForSecondaryPrograms=function(e){var t="api/secondaryPrograms/searchForSecondaryPrograms";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.secondaryProgramTemplate=function(){var e="api/secondaryPrograms/secondaryProgramTemplate";return e=e.replace(/null|undefined/gi,""),this.SendRequest(null,"get",e,!0,!1)},t}(U),mL=new vL,gL=function(e){return Object.assign({academicYearId:0,secondaryProgramId:"00000000-0000-0000-0000-000000000000"},e)},bL=function(e){return Object.assign({academicYearId:0,districtId:null},e)},yL=function(e){return Object.assign({academicYear:0},e)},OL=function(e){return Object.assign({academicYearId:0,secondaryProgramId:null,districtId:null},e)},jL=function(e){return Object.assign({academicYear:0,secondaryProgramIdentifier:null,regionalPlanningPartnerId:null,districtId:null},e)},IL={className:"SecondaryProgramDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",secondaryProgramId:0,secondaryCipNumber:null,academicYear:0,districtId:"00000000-0000-0000-0000-000000000000",district:null,cipNumberId:"00000000-0000-0000-0000-000000000000",programStartYear:null,programEndYear:null,secondaryProgramReviewHistories:[],secondaryProgramCourses:[],thirdPartyCredentials:[]},e)},id:"id",secondaryProgramId:"secondaryProgramId",secondaryCipNumber:"secondaryCipNumber",academicYear:"academicYear",districtId:"districtId",district:"district",cipNumberId:"cipNumberId",programStartYear:"programStartYear",programEndYear:"programEndYear",secondaryProgramReviewHistories:"secondaryProgramReviewHistories",secondaryProgramCourses:"secondaryProgramCourses",thirdPartyCredentials:"thirdPartyCredentials"},SL={className:"SelfStudyDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",selfStudyTemplateId:"00000000-0000-0000-0000-000000000000",selfStudyTemplate:null,academicYearId:0,academicYear:null,secondaryProgramId:"00000000-0000-0000-0000-000000000000",secondaryProgram:null,deCommentRelease:!1,currentSelfStudyResponseType:"",currentSelfStudyResponseTypeId:null,activeSelfStudyResponseStatusId:null,secondaryProgramStatusTypeId:null,activeSelfStudyResponseStatus:null,selfStudyResponses:[]},e)},id:"id",selfStudyTemplateId:"selfStudyTemplateId",selfStudyTemplate:"selfStudyTemplate",academicYearId:"academicYearId",academicYear:"academicYear",secondaryProgramId:"secondaryProgramId",secondaryProgram:"secondaryProgram",deCommentRelease:"deCommentRelease",currentSelfStudyResponseType:"currentSelfStudyResponseType",currentSelfStudyResponseTypeId:"currentSelfStudyResponseTypeId",activeSelfStudyResponseStatusId:"activeSelfStudyResponseStatusId",secondaryProgramStatusTypeId:"secondaryProgramStatusTypeId",activeSelfStudyResponseStatus:"activeSelfStudyResponseStatus",selfStudyResponses:"selfStudyResponses"},EL=function(){return EL=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},EL.apply(this,arguments)},RL=a.forwardRef((function(e,t){var n,r=a.createRef(),i=a.createRef(),s=(new Map).set(K.academicYear,{label:"Please select an program review year",required:!0,name:K.academicYear}).set(K.id,{label:"Select District",required:!0,name:K.id}).set(_a.roles,{label:"Select User Roles",required:!0,name:_a.roles});Object(a.useImperativeHandle)(t,(function(){return{resetForm:function(){return e.resetForm},handleSubmit:function(){return G()}}}));var d=Object(a.useState)(!0),c=d[0],l=d[1],u=Object(a.useState)(!1)[1],p=Object(a.useState)({}),f=p[0],h=p[1],v=Object(a.useState)(!1),m=v[0],g=v[1],b=Object(a.useState)(null),O=b[0],j=b[1],I=Object(a.useState)([]),E=I[0],R=I[1],_=Object(a.useState)({}),T=_[0],C=_[1],x=Object(a.useState)([]),A=x[0],P=x[1],N=Object(a.useState)(null!==(n=e.selfStudy)&&void 0!==n?n:[]),w=N[0],D=N[1],q=Object(a.useState)([]),F=q[0],M=q[1];a.useEffect((function(){Y()}),[e.selfStudy]);var Y=function(){l(!0);var t=[];E&&0!=E.length||t.push(U()),F&&0!=F.length||t.push(k()),t.push(L()),Promise.all(t).then((function(){l(!1),e.resetForm&&e.resetForm}))},U=function(){var t=bL({academicYearId:e.academicYear});z.getDistricts(t).then((function(e){var t;e&&R(null!==(t=e.districts)&&void 0!==t?t:[])})).catch((function(){u(!0)}))},L=function(){var t=jL({academicYear:e.academicYear});lL.getSelfStudies(t).then((function(e){var t;e&&D(null!==(t=e.selfStudies)&&void 0!==t?t:[])})).catch((function(){u(!0)}))},k=function(){var t=yL({academicYearId:e.academicYear});fL.getSecondaryCipNumbers(t).then((function(e){var t;e&&M(null!==(t=e.secondaryCipNumbers)&&void 0!==t?t:[])})).catch((function(){u(!0)}))},G=function(){var t=gL({academicYearId:e.academicYear,secondaryProgramId:T.id});lL.generateSelfStudies(t).then((function(e){g(!0),(null===e||void 0===e?void 0:e.succeeded)?S.b.success("Program Added for Review"):(u(!(null===e||void 0===e?void 0:e.succeeded)),h(null===e||void 0===e?void 0:e.fieldErrors),e.fieldErrors[SL.academicYearId]?S.b.error(e.fieldErrors[SL.academicYearId][0].message):S.b.error("Program could not be added"))})).catch((function(){u(!0),S.b.error("Program could not be added")})).finally((function(){g(!1),l(!1)}))};return c?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsx)(ht.a,EL({ref:r,layout:"vertical",requiredMark:!0},{children:Object(o.jsxs)(y.b,EL({size:"small",direction:"vertical"},{children:[Object(o.jsx)(mt.a,EL({initialValue:O},s.get(K.id),_t.getValidation(K.id,f,m),{children:Object(o.jsx)(hd,EL({showSearch:!0,optionFilterProp:"children",dropdownMatchSelectWidth:!1,onSelect:function(t){j(t),function(t){var n=OL({academicYearId:e.academicYear,districtId:t});mL.getSecondaryPrograms(n).then((function(e){var t;e&&P(null!==(t=e.secondaryPrograms)&&void 0!==t?t:[])})).catch((function(){u(!0)})).finally((function(){l(!1)}))}(t)}},{children:E.map((function(e){return function(e){var t,n;if(e.id)return Object(o.jsxs)(pr.a.Option,EL({value:null!==(t=e.id)&&void 0!==t?t:re.default.Empty()},{children:[" ",e.name]}),null!==(n=e.id)&&void 0!==n?n:re.default.Empty())}(e)}))}),void 0)}),void 0),Object(o.jsx)(Pi.a,EL({dataSource:function(){var e;return null===(e=i.current)||void 0===e||e.refresh(),A}(),ref:i,pagination:!1,rowKey:IL.secondaryProgramId,rowClassName:function(e){return-1==w.findIndex((function(t){return t.secondaryProgramId==e.id}))?"":"disabled-row"}
1,rowSelection:{columnTitle:"Actions",columnWidth:100,type:"radio",onChange:function(e,t){!function(e){C(e[0])}(t)}}},{children:Object(o.jsx)(Pi.a.Column,{title:"CIP Number",dataIndex:IL.secondaryCipNumber,render:function(e,t){var n,r,i;return Object(o.jsx)(Ws.a,EL({title:null===(n=F.find((function(e){return e.id==t.cipNumberId})))||void 0===n?void 0:n.code,placement:"right"},{children:(null===(r=F.find((function(e){return e.id==t.cipNumberId})))||void 0===r?void 0:r.code)+" - "+(null===(i=F.find((function(e){return e.id==t.cipNumberId})))||void 0===i?void 0:i.description)}),void 0)}},void 0)}),void 0)]}),void 0)}),void 0)}));RL.displayName="AddSelfStudyForm";var _L=RL,TL=function(){function e(){}return e.UPCOMING=1,e.OPEN=2,e.CLOSED=3,e.SELFSTUDYPREPARATION=4,e.REVIEWSELFSTUDYPROGRAMS=5,e.SELFSTUDYSUBMITTED=6,e.RELEASEDAPPROVALCOMMENTS=7,e}(),CL=function(){function e(){}return e.INSTRUCTOR=1,e.RPP=2,e.DOE=3,e}(),xL=function(e){return Object.assign({selfStudyId:"00000000-0000-0000-0000-000000000000",academicYearId:0},e)},AL=function(e){return Object.assign({academicYearId:0,regionalPlanningPartnerIdentifier:null},e)},PL=function(e){return Object.assign({academicYear:0},e)},NL={className:"SecondaryCipNumberDTO",create:function(e){return Object.assign(Q.create(),{id:null,cipNumberIdentifier:0,academicYear:0,code:"",description:"",specialUnit:null,federalClusterIdentifier:0,federalClusterId:"00000000-0000-0000-0000-000000000000",federalCluster:null,nonTraditionalGenderIdentifier:null,nonTraditionalGenderId:null,gender:null,serviceAreaIdentifier:0,serviceAreaId:"00000000-0000-0000-0000-000000000000",serviceArea:null,stateApproved:!1,display:""},e)},id:"id",cipNumberIdentifier:"cipNumberIdentifier",academicYear:"academicYear",code:"code",description:"description",specialUnit:"specialUnit",federalClusterIdentifier:"federalClusterIdentifier",federalClusterId:"federalClusterId",federalCluster:"federalCluster",nonTraditionalGenderIdentifier:"nonTraditionalGenderIdentifier",nonTraditionalGenderId:"nonTraditionalGenderId",gender:"gender",serviceAreaIdentifier:"serviceAreaIdentifier",serviceAreaId:"serviceAreaId",serviceArea:"serviceArea",stateApproved:"stateApproved",display:"display"},wL={className:"SelfStudyResponseDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",selfStudyId:"00000000-0000-0000-0000-000000000000",selfStudyReponseTypeId:0,selfStudyResponseStatusTypeId:0,selfStudyResponseStatusType:null,selfStudyResponseType:null,respondingUserId:null,respondingUser:null,selfStudySectionResponses:[],selfStudyResponsePreviousGoals:[],selfStudyResponseNewGoals:[],selfStudyResponseProgramOverview:null},e)},id:"id",selfStudyId:"selfStudyId",selfStudyReponseTypeId:"selfStudyReponseTypeId",selfStudyResponseStatusTypeId:"selfStudyResponseStatusTypeId",selfStudyResponseStatusType:"selfStudyResponseStatusType",selfStudyResponseType:"selfStudyResponseType",respondingUserId:"respondingUserId",respondingUser:"respondingUser",selfStudySectionResponses:"selfStudySectionResponses",selfStudyResponsePreviousGoals:"selfStudyResponsePreviousGoals",selfStudyResponseNewGoals:"selfStudyResponseNewGoals",selfStudyResponseProgramOverview:"selfStudyResponseProgramOverview"},DL={className:"SelfStudyResponseStatusTypeDTO",create:function(e){return Object.assign(Q.create(),{id:0,name:""},e)},id:"id",name:"name"},qL=function(){return qL=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},qL.apply(this,arguments)};var FL=function(e){var t=void 0,n=a.createRef(),r=Object(a.useState)([]),i=r[0],s=r[1],d=Object(a.useState)([]),c=d[0],l=d[1],u=Object(a.useState)([]),p=u[0],h=u[1],v=Object(a.useState)(!1),m=v[0],g=v[1],b=Object(a.useState)(!1)[1],y=Object(a.useState)(!1),O=y[0],j=y[1],I=Object(a.useState)([]),E=I[0],R=I[1];a.useEffect((function(){var t=[];j(!0),t.push(_(e.academicYear)),t.push(C()),t.push(Ii.SelfStudyResponseTypes().then((function(e){s(e)}))),t.push(A()),Promise.all(t).then((function(){j(!1),P()}))}),[e.academicYear]);var _=function(e){var t=AL({academicYearId:e});return be.getRegionalPlanningPartnersByAcademicYear(t).then((function(e){var t;e&&h(null!==(t=e.regions)&&void 0!==t?t:[])})).catch((function(){b(!0)}))},C=function(){return ce.getAll(bi.className).then((function(e){l(e)})).catch((function(){b(!0)}))},A=function(){return ce.getAll(DL.className).then((function(e){R(e)})).catch((function(){b(!0)}))},P=function(){null===t||void 0===t||t.refresh()},N=function(n,r){n.stopPropagation(),null!=r&&f.a.confirm({title:"Are you sure you want to remove this program for review?",okText:"Delete",onOk:function(){var n;return function(n,r){var i=xL({selfStudyId:n,academicYearId:r});lL.deleteSelfStudy(i).then((function(n){!0===(null===n||void 0===n?void 0:n.succeeded)?(S.b.success("Program was removed."),null===t||void 0===t||t.refresh(),e.refreshStats&&e.refreshStats()):S.b.error(null===n||void 0===n?void 0:n.errors.join("\n"))})).catch((function(){S.b.error("Program could not be removed.")}))}(r,null!==(n=e.academicYear)&&void 0!==n?n:0)},okButtonProps:{type:"primary",danger:!0}})},w=function(){g(!1),null===t||void 0===t||t.refresh()},D=function(){var t;null===(t=n.current)||void 0===t||t.handleSubmit(),e.refreshStats&&e.refreshStats()},q=[];return q.push(oo.Reset()),!e.userActions&&Je.isAuthorized([gn.CONFIG_ACADEMIC_YEAR])&&q.push(oo.Default("Add Program",(function(){g(!0)}))),!e.userActions&&Je.isAuthorized([gn.ASSIGN_DE_CONSULTANT_RESPONDER])&&q.push(oo.Default("Assign Missing DE Consultants",(function(){f.a.confirm({title:"Assign Missing Consultants?",content:"Are you sure you would like to assign all missing DE consultants?",onOk:function(){lL.assignMissingDEConsultants(PL({academicYear:e.academicYear})).then((function(e){e.failedSurvieAreas.length>0&&f.a.info({title:"Service Area Assignments Failed",content:"Could not assing responders for the following service areas: "+e.failedSurvieAreas})}))},okText:"Assign Consultants"})}))),O?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(io,{ref:function(e){return t=e},onRowClick:function(t){var n,r,i,o;
1t.id&&(e.selectedDistrict?T.push(x.generate(x.SELF_STUDIES_DISPLAY,{id:null!==(n=t.id)&&void 0!==n?n:0},{academicYearId:e.academicYear,districtId:null!==(i=null===(r=t.secondaryProgram)||void 0===r?void 0:r.districtId)&&void 0!==i?i:re.default.Empty(),rppId:e.rppId})):Je.isAuthorized([gn.VIEW_DISTRICT_RESPONSE,gn.VIEW_RPP_RESPONSE,gn.VIEW_DE_CONSULTANT_RESPONSE,gn.EDIT_RPP_RESPONSE,gn.EDIT_DE_RESPONSE])&&T.push(x.generate(x.SELF_STUDIES_DISPLAY,{id:null!==(o=t.id)&&void 0!==o?o:0},{academicYearId:e.academicYear,fromSelfStudies:e.fromSelfStudies,programsForReview:e.programsForReview})))},serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:q,columns:function(){var t,n,r=[{title:"Identifier",dataIndex:SL.secondaryProgramId,sorter:!0,width:50,render:function(e,t){var n;return null===(n=t.secondaryProgram)||void 0===n?void 0:n.secondaryProgramId},filterType:wr.Text},{title:"RPP",dataIndex:K.regionIdentifier,sorter:!0,width:50,render:function(e,t){var n,r,i;return null===(i=null===(r=null===(n=t.secondaryProgram)||void 0===n?void 0:n.district)||void 0===r?void 0:r.region)||void 0===i?void 0:i.name},filterType:wr.DropdownMulti,dropdownFilterOptions:null===p||void 0===p?void 0:p.map((function(e){var t,n;return{text:null!==(t=e.name)&&void 0!==t?t:"",value:null!==(n=e.regionalPlanningPartnerIdentifier.toString())&&void 0!==n?n:0}}))},{title:"District",dataIndex:IL.districtId,sorter:!0,width:50,render:function(e,t){var n,r;return null===(r=null===(n=t.secondaryProgram)||void 0===n?void 0:n.district)||void 0===r?void 0:r.name},filterType:wr.Text},{title:"CIP Number",dataIndex:NL.code,sorter:!0,width:50,render:function(e,t){var n,r;return null===(r=null===(n=t.secondaryProgram)||void 0===n?void 0:n.secondaryCipNumber)||void 0===r?void 0:r.code},filterType:wr.Text},{title:"Title",dataIndex:NL.description,sorter:!0,width:50,render:function(e,t){var n,r;return null===(r=null===(n=t.secondaryProgram)||void 0===n?void 0:n.secondaryCipNumber)||void 0===r?void 0:r.description},filterType:wr.Text},{title:"Status",dataIndex:IL.secondaryProgramReviewHistories,width:50,render:function(e,t){var n,r,o,a;if(null===(n=t.activeSelfStudyResponseStatus)||void 0===n?void 0:n.name)return null!==(a=(null===(r=i.find((function(e){return e.value==t.currentSelfStudyResponseTypeId})))||void 0===r?void 0:r.text)+": "+(null===(o=t.activeSelfStudyResponseStatus)||void 0===o?void 0:o.name))&&void 0!==a?a:"Unknown"},filterType:wr.DropdownMulti,dropdownFilterOptions:null===E||void 0===E?void 0:E.map((function(e){var t,n;return{text:null!==(t=e.name)&&void 0!==t?t:"",value:null!==(n=e.id.toString())&&void 0!==n?n:0}})),filterDropdownVisible:!0}];return((null===(t=e.academicYearData)||void 0===t?void 0:t.academicYearStatusTypeId)==TL.CLOSED||Je.isAuthorized([gn.VIEW_CURRENT_PROGRAM_STATUS||gn.SYSTEM_ADMIN]))&&r.push({title:"Ap
1proval Status",dataIndex:SL.secondaryProgramStatusTypeId,sorter:!0,width:50,render:function(e,t){var n,r;return null!==(r=null===(n=c.find((function(e){return e.id==t.secondaryProgramStatusTypeId})))||void 0===n?void 0:n.name)&&void 0!==r?r:"Unknown"},filterType:wr.DropdownMulti,dropdownFilterOptions:null===c||void 0===c?void 0:c.map((function(e){var t,n;return{text:null!==(t=e.name)&&void 0!==t?t:"",value:null!==(n=e.id.toString())&&void 0!==n?n:0}}))}),r.pushAll([{title:"Users",dataIndex:wL.respondingUserId,width:50,render:function(e,t){var n,r,i,o,a,s,d,c,l,u=null===(i=null===(r=null===(n=t.selfStudyResponses)||void 0===n?void 0:n.find((function(e){return e.selfStudyReponseTypeId==CL.INSTRUCTOR})))||void 0===r?void 0:r.respondingUser)||void 0===i?void 0:i.fullDisplay,p=null===(s=null===(a=null===(o=t.selfStudyResponses)||void 0===o?void 0:o.find((function(e){return e.selfStudyReponseTypeId==CL.RPP})))||void 0===a?void 0:a.respondingUser)||void 0===s?void 0:s.fullDisplay,f=null===(l=null===(c=null===(d=t.selfStudyResponses)||void 0===d?void 0:d.find((function(e){return e.selfStudyReponseTypeId==CL.DOE})))||void 0===c?void 0:c.respondingUser)||void 0===l?void 0:l.fullDisplay;return(u?"District: "+u+", \n":"")+(p?"RPP: "+p+", \n":"")+(f?"IDOE : "+f:"")},filterType:wr.Text}]),e.userActions||(null===(n=e.academicYearData)||void 0===n?void 0:n.academicYearStatusTypeId)==TL.CLOSED||r.push({title:"Actions",align:"center",dataIndex:SL.className,sorter:!1,render:function(e,t){if(Je.isAuthorized([gn.EDIT_PROGRAM_REVIEW]))return Object(o.jsx)(o.Fragment,{children:Object(o.jsx)(rt.a,qL({type:"link",onClick:function(e){return N(e,t.id)}},{children:Object(o.jsx)(Yd.a,{},void 0)}),void 0)},void 0)},width:50}),r}(),fetchData:{fetch:function(t){var n,r,i,o,a;return lL.getSelfStudyTableData(t,0==e.academicYear?0:null!==(n=e.academicYear)&&void 0!==n?n:0,null!==(i=null===(r=e.selectedDistrict)||void 0===r?void 0:r.districtId)&&void 0!==i?i:0,null!==(a=null===(o=e.selectedRPP)||void 0===o?void 0:o.regionalPlanningPartnerIdentifier)&&void 0!==a?a:0)}},stateSaving:{enabled:!0,tableUniqueKey:"self_study_list"}},void 0),function(){var t;if(Je.isAuthorized([gn.CONFIG_ACADEMIC_YEAR]))return Object(o.jsx)(f.a,qL({visible:m,title:"Add Program",okText:"Save",onOk:D,onCancel:w,width:1e3},{children:Object(o.jsx)(_L,{ref:n,academicYear:null!==(t=e.academicYear)&&void 0!==t?t:0},void 0)}),void 0)}()]},void 0)},ML=function(e){return Object.assign({numberOfAcademicYears:null},e)},YL=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),UL=function(){return UL=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},UL.apply(this,arguments)},LL=function(e){function t(t){var n=e.call(this,t)||this;return n.loadAcademicYears=function(e){n.setState({loading:!0});var t=ML({academicYearId:e});return sL.getAcademicYears(t).then((function(e){var t;e&&e.academicYears&&n.setState({academicYears:null!==(t=e.academicYears)&&void 0!==t?t:[],academicYear:$r.getCurrentYear()})})).catch().finally((function(){n.setState({loading:!1})}))},n.loadSelfStudies=function(e){var t=jL({academicYearId:null!==e&&void 0!==e?e:0});lL.getSelfStudies(t).then((function(e){var t;e&&n.setState({selfStudy:null!==(t=e.selfStudies)&&void 0!==t?t:[]})})).finally((function(){n.setState({loading:!1})}))},n.onSelect=function(e){n.setState({academicYear:e}),n.loadSelfStudies(e)},n.onBack=function(){n.state.fromAcademicYearList?T.push(x.generate(x.ACADEMIC_YEAR_DASHBOARD_FROM_LIST,{academicYearId:n.state.academicYear},{})):n.state.fromSelfStudies?T.push(x.generate(x.SELF_STUDIES_ACADEMIC_YEAR_DASHBOARD,{academicYearId:n.state.academicYear},{})):T.push(x.generate(x.HOME,{},{}))},n.state={loading:!1,academicYear:0,academicYears:[],fromSelfStudies:!1,fromAcademicYearList:!1,selfStudy:[]},n}return YL(t,e),t.prototype.componentDidMount=function(){var e=Number.parseInt(Hr.getPathPart(this.props.match,"academicYearId"));this.setState({fromAcademicYearList:this.props.match.path.split("/").findIndex((function(e){return"academicYearList"==e}))>-1,fromSelfStudies:this.props.match.path.split("/").findIndex((function(e){return"selfStudy"==e}))>-1}),this.state.academicYear!=e?(this.setState({academicYear:e,fromSelfStudies:!0}),this.loadSelfStudies(e)):this.loadAcademicYears(e)},t.prototype.render=function(){var e=this,t=0==this.state.academicYear?0:this.state.academicYear;return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Self Studies",breadcrumbs:Xn.selfStudyList(t),onBack:this.onBack,extra:this.state.fromSelfStudies?null:Object(o.jsx)(hd,UL({value:this.state.academicYear,onSelect:this.onSelect,dropdownMatchSelectWidth:!1},{children:this.state.academicYears.map((function(t){return e.renderAcademicYear(t)}))}),void 0)},void 0),Object(o.jsx)(y.b,UL({direction:"vertical",size:"large"},{children:Object(o.jsx)(Qn.a,UL({title:"Self Studies"},{children:Object(o.jsx)(y.b,UL({direction:"vertical",size:"large"},{children:Object(o.jsx)(FL,{academicYear:this.state.academicYear,selectedDistrict:this.props.selectedDistrict,selectedRPP:this.props.selectedRPP,fromSelfStudies:this.state.fromSelfStudies,fromAcademicYearList:this.state.fromAcademicYearList},void 0)}),void 0)}),void 0)}),void 0)]},void 0)},t.prototype.renderAcademicYear=function(e){return Object(o.jsx)(pr.a.Option,UL({value:e.id},{children:e.id}
1),e.id)},t}(a.Component);var kL=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected,selectedDistrict:e.District.Selected,selectedRPP:e.RegionalPlanningPartner.Selected}}))(LL)),GL=n(126),VL=(n(366),n(710)),BL=n.n(VL),WL=function(e){return Object.assign({academicYear:0},e)},zL=function(e){return Object.assign({academicYear:0},e)},HL=function(e){return Object.assign({academicYear:0},e)},QL=function(){return QL=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},QL.apply(this,arguments)},KL=a.forwardRef((function(e){var t=Object(a.useState)(!1),n=t[0],r=t[1],i=Object(a.useState)(!1),s=i[0],d=i[1],c=Object(a.useState)(0),l=c[0],u=c[1],p=Object(a.useState)(0),f=p[0],h=p[1],v=Object(a.useState)(0),g=v[0],O=v[1],j=Object(a.useState)(0),I=j[0],E=j[1],R=Object(a.useState)(0),_=R[0],C=R[1],A=Object(a.useState)(0),P=A[0],N=A[1];Object(a.useEffect)((function(){w()}),[e.academicYear,e.selectedRPP,e.selectedDistrict]);var w=function(){r(!0);var t=[];e.academicYear&&0!=e.academicYear&&t.push(q()),Promise.all(t).then((function(){r(!1),e.resetForm&&e.resetForm}))},D=function(){d(!0);var t=WL({academicYear:e.academicYear});sL.confirmSelfStudiesHandler(t).then((function(t){var n;t.succeeded?(T.push(x.generate(x.SELF_STUDIES_ACADEMIC_YEAR_DASHBOARD,{academicYearId:null!==(n=e.academicYear)&&void 0!==n?n:0})),S.b.success("Programs Confirmed"),d(!1)):(S.b.error("Failed to Confirm Programs"),d(!1))})).catch((function(){S.b.error("Failed to Confirm Programs"),d(!1)})).finally((function(){d(!1)}))},q=function(){var t=zL({academicYear:e.academicYear});return lL.generateSelfStudiesForProgramReview(t).then((function(e){e.succeeded&&F()})).catch((function(){S.b.error("Could not retrive data")}))},F=function(){var t=HL({academicYear:e.academicYear});return lL.programsForReviewStats(t).then((function(e){e.succeeded&&(u(e.totalPrograms),h(e.approvedPrograms),C(e.conditionalPrograms),O(e.extendedPrograms),E(e.pendingPrograms),N(e.newPrograms))})).catch((function(){S.b.error("Could not retrive data")}))},M=function(){T.push(x.generate(x.USERS,{}))};return n?Object(o.jsxs)(y.b,QL({direction:"vertical"},{children:[Object(o.jsx)(ot.a.Title,QL({level:4},{children:"Please wait while we fetch the program reviews."}),void 0),Object(o.jsx)(pt.a,{active:!0},void 0)]}),void 0):Object(o.jsxs)(y.b,QL({size:"small",direction:"vertical",className:"ant-form ant-form-vertical"},{children:[Object(o.jsx)(FL,{programsForReview:!0,academicYear:e.academicYear,selectedDistrict:e.selectedDistrict,selectedRPP:e.selectedRPP,fromSelfStudies:e.fromSelfStudies,fromAcademicYearList:e.fromAcademicYearList,refreshStats:q},void 0),Object(o.jsx)(Qn.a,QL({title:"Breakdown",type:"inner"},{children:Object(o.jsxs)(y.b,QL({direction:"vertical",size:"large"},{children:[Object(o.jsx)(b.a,{children:Object(o.jsx)(m.a,QL({flex:"auto"},{children:Object(o.jsx)(GL.a,{title:Object(o.jsx)(ot.a.Title,QL({level:5},{children:"Total Programs for Review"}),void 0),value:l},void 0)}),void 0)},void 0),Object(o.jsx)(b.a,{children:Object(o.jsxs)(y.b,QL({size:"large"},{children:[Object(o.jsx)(m.a,QL({flex:"auto"},{children:Object(o.jsx)(GL.a,{title:"Approved Programs",value:f},void 0)}),void 0),Object(o.jsx)(m.a,QL({flex:"auto"},{children:Object(o.jsx)(GL.a,{title:"Conditional Programs",value:_},void 0)}),void 0),Object(o.jsx)(m.a,QL({flex:"auto"},{children:Object(o.jsx)(GL.a,{title:"Extended Programs",value:g},void 0)}),void 0),Object(o.jsx)(m.a,QL({flex:"auto"},{children:Object(o.jsx)(GL.a,{title:"New Programs",value:P},void 0)}),void 0),Object(o.jsx)(m.a,QL({flex:"auto"},{children:Object(o.jsx)(GL.a,{title:"Pending",value:I},void 0)}),void 0)]}),void 0)},void 0)]}),void 0)}),void 0),Object(o.jsx)(rt.a,QL({title:"Confirm Programs",type:"primary",loading:s,onClick:function(){Rd.a.confirm({title:"Users Updated?",content:Object(o.jsx)(y.b,QL({direction:"vertical"},{children:Object(o.jsxs)(ot.a.Text,{children:["Have users been updated in the system? Confirming the programs will assign the initial users based on the current users in the system. ",Object(o.jsx)(BL.a,QL({onClick:M},{children:"Users can be updated here."}),void 0)]},void 0)}),void 0),okText:"Users have been updated",onOk:D})}},{children:"Confirm Programs"}),void 0)]}),void 0)}));KL.displayName="ProgramsForReviewForm";var XL=KL,JL=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),$L=function(){return $L=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},$L.apply(this,arguments)},ZL=function(e){function t(t){var n=e.call(this,t)||this;return n.loadAcademicYears=function(e){n.setState({loading:!0});var t=ML({academicYearId:e});return sL.getAcademicYears(t).then((function(e){var t;e&&e.academicYears&&n.setState({academicYears:null!==(t=e.academicYears)&&void 0!==t?t:[],academicYear:$r.getCurrentYear()})})).catch().finally((function(){n.setState({loading:!1})}
1))},n.loadSelfStudies=function(e){var t=jL({academicYearId:null!==e&&void 0!==e?e:0});lL.getSelfStudies(t).then((function(e){var t;e&&n.setState({selfStudy:null!==(t=e.selfStudies)&&void 0!==t?t:[]})})).finally((function(){n.setState({loading:!1})}))},n.onSelect=function(e){n.setState({academicYear:e}),n.loadSelfStudies(e)},n.onBack=function(){n.state.fromAcademicYearList?T.push(x.generate(x.ACADEMIC_YEAR_DASHBOARD_FROM_LIST,{academicYearId:n.state.academicYear},{})):n.state.fromSelfStudies?T.push(x.generate(x.SELF_STUDIES_ACADEMIC_YEAR_DASHBOARD,{academicYearId:n.state.academicYear},{})):T.push(x.generate(x.HOME,{},{}))},n.state={loading:!1,academicYear:0,academicYears:[],fromSelfStudies:!1,fromAcademicYearList:!1,selfStudy:[]},n}return JL(t,e),t.prototype.componentDidMount=function(){var e=Number.parseInt(Hr.getPathPart(this.props.match,"academicYearId"));this.setState({fromAcademicYearList:this.props.match.path.split("/").findIndex((function(e){return"academicYearList"==e}))>-1,fromSelfStudies:this.props.match.path.split("/").findIndex((function(e){return"selfStudy"==e}))>-1}),this.state.academicYear!=e?(this.setState({academicYear:e,fromSelfStudies:!0}),this.loadSelfStudies(e)):this.loadAcademicYears(e)},t.prototype.render=function(){var e=this;if(0!=this.state.academicYear){var t=0==this.state.academicYear?0:this.state.academicYear;return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Confirm Programs",breadcrumbs:Xn.selfStudyListPage(t),onBack:this.onBack,extra:this.state.fromSelfStudies?null:Object(o.jsx)(hd,$L({value:this.state.academicYear,onSelect:this.onSelect,dropdownMatchSelectWidth:!1},{children:this.state.academicYears.map((function(t){return e.renderAcademicYear(t)}))}),void 0)},void 0),Object(o.jsx)(y.b,$L({direction:"vertical",size:"large"},{children:Object(o.jsx)(Qn.a,$L({title:"Confirm Programs"},{children:Object(o.jsx)(XL,{academicYear:this.state.academicYear,selectedDistrict:this.props.selectedDistrict,selectedRPP:this.props.selectedRPP,fromSelfStudies:this.state.fromSelfStudies,fromAcademicYearList:this.state.fromAcademicYearList},void 0)}),void 0)}),void 0)]},void 0)}return Object(o.jsx)(pt.a,{active:!0},void 0)},t.prototype.renderAcademicYear=function(e){return Object(o.jsx)(pr.a.Option,$L({value:e.id},{children:e.id}),e.id)},t}(a.Component);var ek=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected,selectedDistrict:e.District.Selected,selectedRPP:e.RegionalPlanningPartner.Selected}}))(ZL)),tk=function(e){return Object.assign({id:"00000000-0000-0000-0000-000000000000"},e)},nk=function(e){return Object.assign({selfStudyId:null,selfStudy:null},e)},rk=function(){return rk=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},rk.apply(this,arguments)},ik=a.forwardRef((function(e,t){var n,r,i,s,d=a.useRef(),c=(new Map).set(SL.id,{required:!0,name:SL.id,rules:[Ot.required()]}).set(SL.secondaryProgramId,{required:!0,name:SL.secondaryProgramId,rules:[Ot.required()]});Object(a.useImperativeHandle)(t,(function(){return{resetForm:function(){return F()}}}));var l=Object(a.useState)({}),u=l[0],p=l[1],f=Object(a.useState)(!0),h=f[0],v=f[1],m=Object(a.useState)(!1),g=m[0],b=m[1],O=Object(a.useState)(!1)[1],j=Object(a.useState)({}),I=j[0],E=j[1],R=Object(a.useState)(!1),_=R[0],T=R[1],C=Object(a.useState)(!1),x=C[0],A=C[1],P=Object(a.useState)([]),N=P[0],w=P[1];a.useEffect((function(){D()}),[]);var D=function(){v(!0);var e=[];e.push(q()),N&&0!=N.length||e.push(Y()),Promise.all(e).then((function(){v(!1),F()}))},q=function(){h&&(e.selfStudyId==re.default.Empty()||e.isNew?U():M())},F=function(){var e;null===(e=d.current)||void 0===e||e.resetFields(),b(!0)},M=function(){if(e.selfStudyId&&e.academicYearId){var t=tk({id:e.selfStudyId});lL.getSelfStudyDetails(t).then((function(t){var n;t&&(p(null!==(n=t.selfStudy)&&void 0!==n?n:SL.create({id:e.selfStudyId==re.default.Empty()?void 0:e.selfStudyId,secondaryProgramId:void 0,selfStudyStepId:void 0,selfStudyStatusTypeId:void 0})),F())})).catch((function(){O(!0)}))}},Y=function(){return ce.getAll(vi.className).then((function(e){e&&w(e)})).catch((function(){O(!0)}))},U=function(){v(!1),p(SL.create({id:e.selfStudyId==re.default.Empty()?void 0:e.selfStudyId,secondaryProgramId:void 0,selfStudyStepId:void 0,selfStudyStatusTypeId:void 0}))};return h||!u.id?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsx)(y.b,rk({size:"small",direction:"vertical"},{children:Object(o.jsxs)(ht.a,rk({ref:d,layout:"vertical",initialValues:u,onValuesChange:function(){b(!0)},onFinish:function(){T(!0);var t=nk({selfStudyId:e.selfStudyId,selfStudy:SL.create(rk(rk({},d.current?(null===d||void 0===d?void 0:d.current).getFieldsValue():null),{academicYearId:e.academicYearId}))});lL.saveSelfStudyDetails(t).then((function(t){var n,r;A(!0),(null===t||void 0===t?void 0:t.succeeded)?(p(null!==(n=t.selfStudy)&&void 0!==n?n:SL.create({id:e.selfStudyId==re.default.Empty()?void 0:e.selfStudyId,secondaryProgramId:void 0,selfStudyStepId:void 0,selfStudyStatusTypeId:void 0})),E(null),O(!1),S.b.success("Saved"),e.onSave&&(null===(r=t.selfStudy)||void 0===r?void 0:r.id)&&
1(e.onSave(t.selfStudy.id),F()),M()):(O(!(null===t||void 0===t?void 0:t.succeeded)),E(null===t||void 0===t?void 0:t.fieldErrors),S.b.error("Program Review could not be saved"))})).catch((function(){O(!0),S.b.error("Program Review could not be saved")})).finally((function(){v(!1),T(!1)}))},requiredMark:!0},{children:[Object(o.jsxs)(Kn.b,rk({size:"small",bordered:!0,layout:"vertical",column:{xs:1,sm:1,md:1,lg:2,xl:4,xxl:4}},{children:[Object(o.jsxs)(Kn.b.Item,rk({label:"Id"},{children:[" ",e.readonly||!e.isEditing?u.id:Object(o.jsx)(mt.a,rk({className:"description-container"},c.get(SL.id),_t.getValidation(SL.id,I,x),{children:Object(o.jsx)(il,{disabled:!e.isEditing||h||_},void 0)}),void 0)," "]}),void 0),Object(o.jsxs)(Kn.b.Item,rk({label:"District"},{children:[" ",null===(r=null===(n=u.secondaryProgram)||void 0===n?void 0:n.district)||void 0===r?void 0:r.name," "]}),void 0),Object(o.jsxs)(Kn.b.Item,rk({label:"CIP Number"},{children:[" ",null===(s=null===(i=u.secondaryProgram)||void 0===i?void 0:i.secondaryCipNumber)||void 0===s?void 0:s.code," "]}),void 0)]}),void 0),function(){if(e.isEditing)return Object(o.jsx)(Ze,rk({validFeatureFlags:[gn.EDIT_PROGRAM_REVIEW]},{children:Object(o.jsxs)(y.b,rk({direction:"horizontal"},{children:[Object(o.jsx)(Tr,{disabled:!g,saving:_},void 0),Object(o.jsx)(Ir,{disabled:!g,onConfirm:F},void 0)]}),void 0)}),void 0)}()]}),void 0)}),void 0)}));ik.displayName="SelfStudyDetailsForm";var ok=ik,ak=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),sk=function(){return sk=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},sk.apply(this,arguments)},dk=function(e){function t(t){var n=e.call(this,t)||this;return n._selfStudyDetailsRef=a.createRef(),n.loadSelfStudy=function(e,t,r){n.setState({id:e});var i=tk({id:e,selfStudyId:r,academicYear:t});lL.getSelfStudyDetails(i).then((function(e){var t;e.selfStudy?n.setState({selfStudy:e.selfStudy,id:null!==(t=e.selfStudy.id)&&void 0!==t?t:re.default.Empty(),isNew:!1,isEditing:!1}):n.setState({isNew:!0,id:re.default.Empty(),selfStudyId:n.state.selfStudyId,selfStudy:void 0,isEditing:!0})})).catch((function(){n.setState({error:!0})}))},n.loadAcademicYears=function(){n.setState({loading:!0});var e=ML({});return sL.getAcademicYears(e).then((function(e){var t;e&&e.academicYears&&n.setState({academicYears:null!==(t=e.academicYears)&&void 0!==t?t:[]})})).catch((function(){n.setState({error:!0})}))},n.toggleEdit=function(){n.state.isEditing&&n._selfStudyDetailsRef.current.resetForm(),n.setState({isEditing:!n.state.isEditing})},n.selfStudyDetailsPageSaved=function(e){n.setState({isEditing:!1,isNew:!1}),e!=n.state.id?(T.push(x.generate(x.SELF_STUDIES_DETAILS,{id:e},{academicYearId:n.state.academicYearId,fromSelfStudies:n.state.fromSelfStudies,fromAcademicYearList:n.state.fromAcademicYearList})),n.loadSelfStudy(e)):n.loadSelfStudy(e)},n.deleteConfirmation=function(e,t){f.a.confirm({title:"Are you sure you want to remove this program for review?",okText:"Delete",onOk:function(){return n.deleteSelfStudy(e,t)}})},n.deleteSelfStudy=function(e,t){n.setState({submitting:!0});var r=xL({selfStudyId:e,academicYearId:t});lL.deleteSelfStudy(r).then((function(e){n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,altered:!(null===e||void 0===e?void 0:e.succeeded)}),!0===(null===e||void 0===e?void 0:e.succeeded)?S.b.success("Removed"):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(e){n.setState({error:e}),S.b.error("Program could not be removed.")})).finally((function(){n.setState({loading:!1}),n.goToListing()}))},n.goToListing=function(){T.goBack()},n.state={id:re.default.Empty(),selfStudyId:0,academicYears:[],academicYearId:0,fromAcademicYearList:!1,fromSelfStudies:!1,selfStudies:[],selfStudyCourses:[]},n}return ak(t,e),t.prototype.componentDidMount=function(){var e,t=this,n=Hr.getPathPart(this.props.match,"id"),r=Hr.getParameter("academicYearId"),i=Hr.getParameter("fromAcademicYearList"),o=Hr.getParameter("fromSelfStudies");(this.setState({academicYearId:Number.parseInt(r),fromSelfStudies:"true"==o,fromAcademicYearList:"true"==i,id:n,loading:!0}),this.props.match.path.split("/").findIndex((function(e){return"new"==e}))>-1)?(this.setState({isEditing:!0,isNew:!0,loading:!1}),(e=[]).push(this.loadAcademicYears()),Promise.all(e).then((function(){t.setState({loading:!1})}
1))):((e=[]).push(this.loadSelfStudy(n)),e.push(this.loadAcademicYears()),Promise.all(e).then((function(){t.setState({loading:!1})})))},t.prototype.render=function(){var e,t,n,r,i,a,s,d;if(this.state.loading||void 0==this.state.loading)return Object(o.jsx)(pt.a,{active:!0},void 0);var c=this.state.loading?"...":null!==(r=null===(n=null===(t=null===(e=this.state.selfStudy)||void 0===e?void 0:e.secondaryProgram)||void 0===t?void 0:t.secondaryCipNumber)||void 0===n?void 0:n.description)&&void 0!==r?r:"...",l=this.state.loading?"...":null!==(d=null===(s=null===(a=null===(i=this.state.selfStudy)||void 0===i?void 0:i.secondaryProgram)||void 0===a?void 0:a.district)||void 0===s?void 0:s.name)&&void 0!==d?d:"...";return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:c,subTitle:l,onBack:this.goToListing,breadcrumbs:Xn.selfStudyDetailPage(c.toString(),this.state.id,this.state.academicYearId,this.state.fromAcademicYearList,this.state.fromSelfStudies),extra:this.renderMoreActions()},void 0),this.renderDetailsCard()]},void 0)},t.prototype.renderDetailsCard=function(){var e=this.state.id==re.default.Empty()?null:Object(o.jsx)(Ze,sk({validFeatureFlags:[gn.EDIT_PROGRAM_REVIEW]},{children:Object(o.jsx)(Br,{isEditing:this.state.isEditing,onClick:this.toggleEdit},void 0)}),void 0);return Object(o.jsx)(Qn.a,sk({title:"Details",extra:e},{children:Object(o.jsx)(ok,{ref:this._selfStudyDetailsRef,selfStudyId:this.state.id,isEditing:this.state.isEditing,isNew:this.state.isNew,readonly:null==Xe.Get(),onSave:this.selfStudyDetailsPageSaved,academicYearId:this.state.academicYearId},void 0)}),void 0)},t.prototype.renderMoreActions=function(){var e=this,t=Object(o.jsx)(Gt.a,{children:Object(o.jsx)(Gt.a.Item,sk({title:"Remove From Review",onClick:function(){return e.deleteConfirmation(e.state.id,e.state.academicYearId)}},{children:"Remove From Review"}),this.state.id)},void 0);return Object(o.jsx)(o.Fragment,{children:Object(o.jsx)(Ze,sk({validFeatureFlags:[gn.EDIT_PROGRAM_REVIEW]},{children:this.state.isNew?null:Object(o.jsx)(la.a,sk({overlay:t},{children:Object(o.jsx)(rt.a,{icon:Object(o.jsx)(aa.a,{},void 0),type:"link"},void 0)}),void 0)}),void 0)},void 0)},t.prototype.renderSelfStudyAcademicYear=function(e){var t,n;return Object(o.jsx)(pr.a.Option,sk({value:null!==(t=e.id)&&void 0!==t?t:re.default.Empty()},{children:e.academicYearId}),null!==(n=e.id)&&void 0!==n?n:re.default.Empty())},t.prototype.renderAcademicYear=function(e){return Object(o.jsx)(pr.a.Option,sk({value:e.id},{children:e.id}),e.id)},t}(a.Component),ck=Object(u.i)(dk),lk=function(){function e(){}return e.PENDING=1,e.INPROGRESS=2,e.COMPLETE=3,e.PENDINGAPPROVAL=4,e.REVISING=5,e.REVISIONSNEEDED=6,e}(),uk=function(e){return Object.assign({selfStudyResponseId:"00000000-0000-0000-0000-000000000000",academicYear:0},e)},pk=function(e){return Object.assign({selfStudyId:"00000000-0000-0000-0000-000000000000",userId:"00000000-0000-0000-0000-000000000000",selfStudyResponseTypeId:0},e)},fk={className:"AcademicYearDTO",create:function(e){return Object.assign(Q.create(),{id:0,programInfoYear:0,academicYearStatusTypeId:0,academicYearStatusType:null,instructorStartDate:null,instructorEndDate:null,rppStartDate:null,rppEndDate:null,deStartDate:null,deEndDate:null,commentReleaseDate:null,finalizationDate:null},e)},id:"id",programInfoYear:"programInfoYear",academicYearStatusTypeId:"academicYearStatusTypeId",academicYearStatusType:"academicYearStatusType",instructorStartDate:"instructorStartDate",instructorEndDate:"instructorEndDate",rppStartDate:"rppStartDate",rppEndDate:"rppEndDate",deStartDate:"deStartDate",deEndDate:"deEndDate",commentReleaseDate:"commentReleaseDate",finalizationDate:"finalizationDate"},hk=function(e){return Object.assign({districtIdentifier:0,academicYear:0,searchString:""},e)},vk=function(){return vk=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},vk.apply(this,arguments)};var mk=function(e){var t,n=a.useState([]),r=n[0],i=n[1],s=a.useState([]),d=s[0],c=s[1],l=a.useState(e.value),u=l[0],p=l[1],f=a.useState(!1),h=f[0],v=f[1];return Object(o.jsxs)(ut.a.Group,vk({compact:!0},{children:[Object(o.jsx)("label",{title:"District User Search",htmlFor:"districtUser"},void 0),Object(o.jsx)(Wa,{id:"districtUser",disabled:e.disabled,initialValue:null===(t=e.value)||void 0===t?void 0:t.display,value:u,options:r,onSearch:function(t){if(t.length>2){var n=hk({districtIdentifier:e.districtIdentifier,academicYear:e.academicYear,searchString:t});v(!0),zM.searchDistrictUsers(n).then((function(e){var t,n,r=null===(t=e.users)||void 0===t?void 0:t.map((function(e){return{value:e.id,display:e.fullDisplay}}));c(null!==(n=e.users)&&void 0!==n?n:[]),i(r),v(!1)}))}},onChange:function(t){var n,r=null!==(n=d.find((function(e){return e.id==t})))&&void 0!==n?n:null;p(r),e.onChange&&e.onChange(r)},searching:h},void 0)]}),void 0)},gk=function(e){return Object.assign({searchString:"",serviceAreaIdentifier:null},e)},bk=function(){return bk=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},bk.apply(this,arguments)};
1var yk=function(e){var t,n=a.useState([]),r=n[0],i=n[1],s=a.useState([]),d=s[0],c=s[1],l=a.useState(e.value),u=l[0],p=l[1],f=a.useState(!1),h=f[0],v=f[1];return Object(o.jsx)(ut.a.Group,bk({compact:!0},{children:Object(o.jsx)(Wa,{disabled:e.disabled,initialValue:null===(t=e.value)||void 0===t?void 0:t.display,value:u,options:r,onSearch:function(e){if(e.length>2){var t=gk({searchString:e});v(!0),Ua.searchForIDOEConsultantUser(t).then((function(e){var t,n,r=null===(t=e.users)||void 0===t?void 0:t.map((function(e){return{value:e.id,display:e.fullDisplay}}));c(null!==(n=e.users)&&void 0!==n?n:[]),i(r),v(!1)}))}},onChange:function(t){var n,r=null!==(n=d.find((function(e){return e.id==t})))&&void 0!==n?n:null;p(r),e.onChange&&e.onChange(r)},searching:h},void 0)}),void 0)},Ok=function(e){return Object.assign({rppId:0,searchString:""},e)},jk=function(){return jk=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},jk.apply(this,arguments)};var Ik=function(e){var t,n=a.useState([]),r=n[0],i=n[1],s=a.useState([]),d=s[0],c=s[1],l=a.useState(e.value),u=l[0],p=l[1],f=a.useState(!1),h=f[0],v=f[1];return Object(o.jsx)(ut.a.Group,jk({compact:!0},{children:Object(o.jsx)(Wa,{disabled:e.disabled,initialValue:null===(t=e.value)||void 0===t?void 0:t.display,value:u,options:r,onSearch:function(t){if(t.length>2){var n=Ok({rppId:e.rppId,searchString:t});v(!0),be.searchRPPUsers(n).then((function(e){var t,n,r=null===(t=e.users)||void 0===t?void 0:t.map((function(e){return{value:e.id,display:e.fullDisplay}}));c(null!==(n=e.users)&&void 0!==n?n:[]),i(r),v(!1)}))}},onChange:function(t){var n,r=null!==(n=d.find((function(e){return e.id==t})))&&void 0!==n?n:null;p(r),e.onChange&&e.onChange(r)},searching:h},void 0)}),void 0)},Sk=function(e){return Object.assign({academicYearId:0},e)},Ek=n(35),Rk=n(128),_k=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Tk=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _k(t,e),t.prototype.getSelfStudyResponseByType=function(e){var t="api/selfStudyResponses/getResponseByType";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t}(U),Ck=new Tk,xk=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ak=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return xk(t,e),t.prototype.saveSelfStudyTemplate=function(e){var t="api/selfStudyTemplates/saveTemplateDetails";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getSelfStudy=function(e){var t="api/selfStudyTemplates/"+e;return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"get",t,!0,!1)},t.prototype.getSelfStudySectionTemplates=function(e){var t="api/selfStudyTemplates/getSelfStudySectionTemplates/"+e;return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"get",t,!0,!1)},t.prototype.getSelfStudySectionTemplateBySectionOrder=function(e,t){var n="api/selfStudyTemplates/getSelfStudySectionTemplate",r=n.indexOf("?")>0?"&":"?";return null!=e&&(n+=r+"academicYearId="+e,r="&"),null!=t&&(n+=r+"sectionIndex="+t,r="&"),n=n.replace(/null|undefined/gi,""),this.SendRequest(null,"get",n,!0,!1)},t.prototype.getSelfStudySectionComponentTemplateBySectionOrder=function(e){var t="api/selfStudyTemplates/getSelfStudySectionComponentTemplate";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t}(U),Pk=new Ak,Nk=function(){function e(){}return e.RANKINGQUESTION=1,e.FREETEXTQUESTION=2,e.INSTRUCTIONS=3,e.PROGRAMOVERVIEW=4,e.PREVIOUSGOALS=5,e.NEWGOALS=6,e.CONSULTANTREVIEW=7,e}(),wk=function(e){return Object.assign({selfStudyResponseId:"00000000-0000-0000-0000-000000000000"},e)},Dk=function(e){return Object.assign({selfStudyId:"00000000-0000-0000-0000-000000000000",selfStudyResponseTypeId:0},e)},qk=function(e){return Object.assign({id:"00000000-0000-0000-0000-000000000000"},e)},Fk=function(e){return Object.assign({id:"00000000-0000-0000-0000-000000000000"},e)},Mk=function(e){return Object.assign({academicYear:0,selfStudySectionOrder:0,selfStudyResponseId:"00000000-0000-0000-0000-000000000000",allowNew:!1},e)},Yk={className:"SelfStudyResponseProgramOverviewDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",selfStudyResponseId:"00000000-0000-0000-0000-000000000000",selfStudyResponse:null,regionaPlanningPartnerIdentifier:0,communityCollegeId:"00000000-0000-0000-0000-000000000000",communityCollege:null,districtIdentifier:0,secondaryCipNumberIdentifier:0,secondaryProgramScenarioId:"00000000-0000-0000-0000-000000000000",secondaryProgramScenario:null,thirdPartyCredentials:[]},e)},id:"id",selfStudyResponseId:"selfStudyResponseId",selfStudyResponse:"selfStudyResponse",regionaPlanningPartnerIdentifier:"regionaPlanningPartnerIdentifier",communityCollegeId:"communityCollegeId",communityCollege:"communityCollege",districtIdentifier:"districtIdentifier",secondaryCipNumberIdentifier:"secondaryCipNumberIdentifier",secondaryProgramScenarioId:"secondaryProgramScenarioId",secondaryProgramScenario:"secondaryProgramScenario",thirdPartyCredentials:"thirdPartyCredentials"},Uk={className:"SelfStudyResponseTemplateConsultantReviewQuestionDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",selfStudySectionComponentTemplateId:"00000000-0000-0000-0000-000000000000",selfStudySectionComponentTemplate:null,order:0,question:""},e)},id:"id",selfStudySectionComponentTemplateId:"selfStudySectionComponentTemplateId",selfStudySectionComponentTemplate:"selfStudySectionComponentTemplate",order:"order",question:"question"},Lk={className:"SelfStudySectionComponentTemplateDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",selfStudySectionComponentTypeId:null,selfStudySectionComponentType:null,rankingQuestionIdentifier:"",numberOfPreviousGoals:null,numberOfNewGoals:null,primaryText:"",order:0,careerAcademy:null,programOfStudyTenets:"",rppInstructions:"",selfStudySectionComponentScenarios:[],selfStudyResponseTemplateConsultantReviewQuestions:[]},e)},id:"id",selfStudySectionComponentTypeId:"selfStudySectionComponentTypeId",selfStudySectionComponentType:"selfStudySectionComponentType",rankingQuestionIdentifier:"rankingQuestionIdentifier",numberOfPreviousGoals:"numberOfPreviousGoals",numberOfNewGoals:"numberOfNewGoals",primaryText:"primaryText",order:"order",careerAcademy:"careerAcademy",programOfStudyTenets:"programOfStudyTenets",rppInstructions:"rppInstructions",selfStudySectionComponentScenarios:"selfStudySectionComponentScenarios",selfStudyResponseTemplateConsultantReviewQuestions:"selfStudyResponseTemplateConsultantReviewQuestions"},kk={className:"SelfStudySectionComponentTypeDTO",create:function(e){return Object.assign(Q.create(),{id:0,name:"",isEditable:!1},e)},id:"id",name:"name",isEditable:"isEditable"},Gk={className:"SelfStudySectionTemplateDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",selfStudyId:"00000000-0000-0000-0000-000000000000",academicYearId:0,order:0,title:"",isSectionComments:!1,selfStudySectionComponentTemplates:[],selfStudySectionTemplateSecondaryProgramScenarios:[]},e)},id:"id",selfStudyId:"selfStudyId",academicYearId:"academicYearId",order:"order",title:"title",isSectionComments:"isSectionComments",selfStudySectionComponentTemplates:"selfStudySectionComponentTemplates",selfStudySectionTemplateSecondaryProgramScenarios:"selfStudySectionTemplateSecondaryProgramScenarios"},Vk={className:"SelfStudyTemplateDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",academicYear:0,selfStudySectionTemplates:[],minimumCareerAcademyScore:0},e)},id:"id",academicYear:"academicYear",selfStudySectionTemplates:"selfStudySectionTemplates",minimumCareerAcademyScore:"minimumCareerAcademyScore"},Bk=n(185),Wk=n.n(Bk),zk=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Hk=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return zk(t,e),t.prototype.getSecondaryProgramAttachment=function(e){var t="api/secondaryProgramAttchments/get";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t}(U),Qk=new Hk,Kk=function(){function e(){}return e.APPROVED=1,e.DENIED=2,e.CONDITIONAL=3,e.EXTENSION=4,e.NEWPROGRAM=5,e.PENDING=6,e}(),Xk=function(e){return Object.assign({academicYear:null,secondaryProgramId:null},e)},Jk=function(e){return Object.assign({academicYear:0,selfStudySectionOrder:0,selfStudySectionComponentOrder:0},e)},$k=function(e){return Object.assign({selfStudyResponseId:"00000000-0000-0000-0000-000000000000",academicYear:0},e)},Zk={className:"SecondaryProgramAttachmentDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",secondaryProgramIdentifier:0,academicYear:0,azureBlobFileId:"00000000-0000-0000-0000-000000000000",azureBlobFile:null},e)},id:"id",secondaryProgramIdentifier:"secondaryProgramIdentifier",academicYear:"academicYear",azureBlobFileId:"azureBlobFileId",azureBlobFile:"azureBlobFile"},eG={className:"SelfStudyResponseConsultantReviewQuestionDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",selfStudySectionComponentId:"00000000-0000-0000-0000-000000000000",selfStudySectionComponentResponse:null,consultantAnswer:null,comment:""},e)},id:"id",selfStudySectionComponentId:"selfStudySectionComponentId",selfStudySectionComponentResponse:"selfStudySectionComponentResponse",consultantAnswer:"consultantAnswer",comment:"comment"},tG={className:"SelfStudySectionComponentResponseDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",selfStudySectionComponentTemplateId:"00000000-0000-0000-0000-000000000000",selfStudySectionComponentTemplate:null,selfStudySectionReponseId:"00000000-0000-0000-0000-000000000000",selfStudySectionResponse:null,rating:0,responseText:"",rppApproval:null,secondaryProgramStatusTypeId:null,deConsultantApproval:null,selfStudySectionComponentResponseResources:[],selfStudyResponseConsultantReviewQuestionDTOs:[]},e)},id:"id",selfStudySectionComponentTemplateId:"selfStudySectionComponentTemplateId",selfStudySectionComponentTemplate:"selfStudySectionComponentTemplate",selfStudySectionReponseId:"selfStudySectionReponseId",selfStudySectionResponse:"selfStudySectionResponse",rating:"rating",responseText:"responseText",rppApproval:"rppApproval",secondaryProgramStatusTypeId:"secondaryProgramStatusTypeId",deConsultantApproval:"deConsultantApproval",selfStudySectionComponentResponseResources:"selfStudySectionComponentResponseResources",selfStudyResponseConsultantReviewQuestionDTOs:"selfStudyResponseConsultantReviewQuestionDTOs"},nG=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),rG=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return nG(t,e),t.prototype.getSelfStudySectionComponentResponseByType=function(e){var t="api/selfStudySectionComponentResponses/getSectionComponentResponseByType";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t}(U),iG=new rG,oG=function(e){return Object.assign({selfStudyId:"00000000-0000-0000-0000-000000000000",selfStudyResponseTypeId:0,sectionIndex:0,componentIndex:0},e)},aG=function(){return aG=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},aG.apply(this,arguments)},sG=a.forwardRef((function(e){var t=function(t){var n=!e.disable;return(new Map).set(eG.consultantAnswer,{required:n,name:[t,eG.consultantAnswer],rules:[Ot.required()]}).set(eG.comment,{name:[t,eG.comment],label:"Comment"}).set(tG.responseText,{label:"Comments",required:!0,name:[t,tG.responseText],rules:[Ot.required()]})},n=Object(a.useState)(!1),r=n[0],i=n[1],s=Object(a.useState)(e.f
1ieldErrors),d=s[0],c=s[1],l=Object(a.useState)(e.submitted),u=l[0],p=l[1],f=Object(a.useState)({}),h=f[0],v=f[1],m=Object(a.useState)({}),g=m[0],b=m[1];Object(a.useEffect)((function(){O()}),[e.academicYear,e.selfStudyResponseId]),Object(a.useEffect)((function(){c(e.fieldErrors),p(e.submitted)}),[e.submitted,e.fieldErrors]);var O=function(){i(!0);var t=[];0==e.academicYear||e.selfStudyResponseId==re.default.Empty()||e.previewComponent?e.previewComponent&&i(!1):(t.push(I()),e.selfStudyId&&e.selfStudyId!=re.default.Empty()&&t.push(j()),Promise.all(t).then((function(){i(!1)})))},j=function(){var t,n=oG({selfStudyId:null!==(t=e.selfStudyId)&&void 0!==t?t:re.default.Empty(),selfStudyResponseTypeId:CL.DOE,sectionIndex:e.sectionIndex,componentIndex:e.componentIndex});return iG.getSelfStudySectionComponentResponseByType(n).then((function(e){var t;e.selfStudySectionComponentResponse&&b(null!==(t=e.selfStudySectionComponentResponse)&&void 0!==t?t:tG.create())}))},I=function(){var t=Jk({academicYear:e.academicYear,selfStudySectionOrder:e.sectionIndex,selfStudySectionComponentOrder:e.componentIndex});return Pk.getSelfStudySectionComponentTemplateBySectionOrder(t).then((function(e){var t;e.selfStudySectionComponentTemplate&&v(null!==(t=e.selfStudySectionComponentTemplate)&&void 0!==t?t:Lk.create())}))};return e.pdfView?function(){var e,t,n,r,i,a,s,d=[],c=g;c.selfStudyResponseConsultantReviewQuestionDTOs;for(var l=0;l<(null!==(t=null===(e=c.selfStudyResponseConsultantReviewQuestionDTOs)||void 0===e?void 0:e.length)&&void 0!==t?t:0);l++)d.push(Object(o.jsxs)(Ek.View,aG({style:{border:"1pt solid #f0f0f0",margin:10}},{children:[Object(o.jsx)(Ek.Text,aG({style:{padding:5,fontSize:12,border:"1pt solid #f0f0f0",backgroundColor:"#f0f0f0"}},{children:"Question "+(l+1)}),void 0),Object(o.jsxs)(Ek.View,aG({style:{margin:10}},{children:[Object(o.jsx)(Ek.Text,aG({style:{paddingBottom:"10pt",fontSize:8}},{children:(null===(r=(null!==(n=null===c||void 0===c?void 0:c.selfStudyResponseConsultantReviewQuestionDTOs)&&void 0!==n?n:[])[l])||void 0===r?void 0:r.consultantAnswer)?"Yes":"No"}),void 0),Object(o.jsx)(Ek.Text,aG({style:{paddingBottom:"10pt",fontSize:10}},{children:" Comments"}),void 0),Object(o.jsx)(Rk.a,aG({style:{paddingBottom:"10pt",fontSize:8}},{children:null!==(s=null===(a=(null!==(i=null===c||void 0===c?void 0:c.selfStudyResponseConsultantReviewQuestionDTOs)&&void 0!==i?i:[])[l])||void 0===a?void 0:a.comment)&&void 0!==s?s:""}),void 0)]}),void 0)]}),void 0));return d}():r?Object(o.jsx)(pt.a,{active:!0},void 0):e.previewComponent?function(){for(var n,r=[],i=0;i<(null!==(n=e.consultantReviewQuestionCount)&&void 0!==n?n:0);i++)r.push(Object(o.jsx)(y.b,aG({direction:"vertical"},{children:Object(o.jsxs)(Qn.a,aG({title:"Question "+(i+1),type:"inner"},{children:[Object(o.jsx)(mt.a,aG({},t(i).get(eG.consultantAnswer),_t.getValidation(eG.consultantAnswer,d,u),{children:Object(o.jsx)(Hd,{disabled:e.readonly||e.disable},i)}),void 0),Object(o.jsx)(mt.a,aG({},t(i).get(eG.comment),_t.getValidation(eG.comment,d,u),{children:Object(o.jsx)(il,{disabled:e.disable,readonly:e.readonly},void 0)}),void 0)]}),void 0)}),i));return r}():Object(o.jsx)(y.b,aG({size:"small",direction:"vertical"},{children:function(){var n,r=-1,i=null===(n=null===h||void 0===h?void 0:h.selfStudyResponseTemplateConsultantReviewQuestions)||void 0===n?void 0:n.map((function(n){var i,a,s,c,l,p=g;return r++,Object(o.jsx)(y.b,aG({direction:"vertical"},{children:Object(o.jsxs)(Qn.a,aG({type:"inner",className:"sub-inner-card"},{children:[Object(o.jsx)(mt.a,aG({label:n.question,initialValue:null!==(s=null===(a=(null!==(i=null===p||void 0===p?void 0:p.selfStudyResponseConsultantReviewQuestionDTOs)&&void 0!==i?i:[])[r])||void 0===a?void 0:a.consultantAnswer)&&void 0!==s?s:null},t(r).get(eG.consultantAnswer),_t.getValidation(eG.consultantAnswer+e.sectionIndex+e.componentIndex+r,d,u),{children:Object(o.jsx)(Hd,{disabled:e.readonly||e.disable},r)}),n.id),Object(o.jsx)(mt.a,aG({initialValue:null===(l=(null!==(c=null===p||void 0===p?void 0:p.selfStudyResponseConsultantReviewQuestionDTOs)&&void 0!==c?c:[])[r])||void 0===l?void 0:l.comment},t(r).get(eG.comment),_t.getValidation(eG.comment,d,u),{children:Object(o.jsx)(il,{disabled:e.disable,readonly:e.readonly},void 0)}),n.id)]}),void 0)}),r)}));return i}()}),void 0)}));sG.displayName="SelfStudyConsultantReviewQuestion";var dG=sG,cG=function(){return cG=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},cG.apply(this,arguments)},lG=a.forwardRef((function(e){var t,n,r=function(t){var n=!e.disable;return(new Map).set(eG.consultantAnswer,{required:n,name:[t,eG.consultantAnswer],rules:[Ot.required()]}).set(eG.consultantAnswer,{required:n,name:[t,eG.consultantAnswer],rules:[Ot.required()]}).set(Lk.primaryText,{name:[t,Lk.primaryText]}).set(Lk.rppInstructions,{name:[t,Lk.rppInstructions]}).set(eG.comment,{name:[t,eG.comment],label:"Additional Comments"}).set(tG.secondaryProgramStatusTypeId,{required:!e.readonly,name:[t,tG.secondaryProgramStatusTypeId],label:"Please set the approval status for this program.",rules:e.readonly?[]:[Ot.required()]}).set(tG.responseText,{label:"Additional Comments",name:[t,tG.responseText]}).set(tG.rppApproval,{required:S.selfStudyReponseTypeId==CL.RPP,label:S.selfStudyReponseTypeId==CL.RPP?"Please approve or deny.":"",name:[t,tG.rppApproval],rules:S.selfStudyReponseTypeId==CL.RPP?[Ot.required()]:[]})},i=Object(a.useState)(!1),s=i[0],d=i[1],c=Object(a.useState)(!1),l=c[0],u=c[1],p=Object(a.useState)(e.f
1ieldErrors),f=p[0],h=p[1],v=Object(a.useState)(e.submitted),m=v[0],g=v[1],b=Object(a.useState)({}),O=b[0],j=b[1],I=Object(a.useState)({}),S=I[0],E=I[1],R=Object(a.useState)({}),_=R[0],T=R[1],C=Object(a.useState)([]),A=C[0],P=C[1],N=Object(a.useState)([]),w=N[0],D=N[1];Object(a.useEffect)((function(){q()}),[e.academicYear,e.selfStudyResponseId]),Object(a.useEffect)((function(){h(e.fieldErrors),g(e.submitted)}),[e.submitted,e.fieldErrors]);var q=function(){var t,n;d(!0);var r=[];0==e.academicYear||e.selfStudyResponseId==re.default.Empty()||e.previewComponent?e.previewComponent&&(d(!1),e.renderComplete&&e.renderComplete(null!==(n=e.sectionIndex)&&void 0!==n?n:0,e.componentIndex,!0)):(r.push(F(null!==(t=e.selfStudyResponseId)&&void 0!==t?t:re.default.Empty())),r.push(Y()),r.push(M()),Promise.all(r).then((function(){var t;d(!1),e.renderComplete&&e.renderComplete(null!==(t=e.sectionIndex)&&void 0!==t?t:0,e.componentIndex,!0)})))},F=function(t){var n=$k({selfStudyResponseId:t,academicYear:e.academicYear});return lL.getSelfStudyWithConsultantReview(n).then((function(n){var r,i,o,a,s;if(n.selfStudy){j(n.selfStudy),E(null!==(i=null===(r=n.selfStudy.selfStudyResponses)||void 0===r?void 0:r.find((function(e){return e.id==t})))&&void 0!==i?i:wL.create());var d=[];d.push(U(null!==(o=e.academicYear)&&void 0!==o?o:0,null!==(s=null===(a=n.selfStudy.secondaryProgram)||void 0===a?void 0:a.secondaryProgramId)&&void 0!==s?s:0)),Promise.all(d).then((function(){u(!1)}))}}))},M=function(){var t=Jk({academicYear:e.academicYear,selfStudySectionOrder:e.sectionIndex,selfStudySectionComponentOrder:e.componentIndex});return Pk.getSelfStudySectionComponentTemplateBySectionOrder(t).then((function(e){var t;e.selfStudySectionComponentTemplate&&T(null!==(t=e.selfStudySectionComponentTemplate)&&void 0!==t?t:Lk.create())}))},Y=function(){return ce.getAll(bi.className).then((function(e){D(e.filter((function(e){return e.selectable})))}))},U=function(e,t){u(!0);var n=Xk({academicYear:e,secondaryProgramId:t});return Qk.getSecondaryProgramAttachment(n).then((function(e){e.secondaryProgramAttachments&&P(e.secondaryProgramAttachments)}))},L=function(t){e.handleFileUpload&&e.handleFileUpload(e.componentIndex,e.sectionIndex,t)},k=function(){var e=[];return A&&A.length>0&&A.forEach((function(t){var n,r;void 0!=A&&e.push({uid:t.azureBlobFileId,url:x.generateDownload(null!==(n=t.azureBlobFileId)&&void 0!==n?n:re.default.Empty()),name:null===(r=t.azureBlobFile)||void 0===r?void 0:r.fileName})})),e},G=S.selfStudyReponseTypeId==CL.INSTRUCTOR&&(S.selfStudyResponseStatusTypeId==lk.REVISING||S.selfStudyResponseStatusTypeId==lk.REVISIONSNEEDED);if(e.selfStudyResponseTypeId!=CL.INSTRUCTOR){if(e.pdfView){var V=(null!==(t=null===_||void 0===_?void 0:_.primaryText)&&void 0!==t?t:"").replaceAll(new RegExp("font-size:?[0-9]{1,2}px","g"),"font-size:10px");return Object(o.jsx)(Ek.View,cG({style:{margin:10}},{children:e.previewComponent?Object(o.jsx)(Rk.a,{children:V},void 0):Object(o.jsxs)(Ek.View,cG({style:{border:"1pt solid #f0f0f0"}},{children:[Object(o.jsx)(Ek.Text,cG({style:{padding:5,fontSize:10,border:"1pt solid #f0f0f0",backgroundColor:"#f0f0f0"}},{children:"Program Approval"}),void 0),Object(o.jsxs)(Ek.View,cG({style:{margin:10}},{children:[function(){var t,n,r,i,a,s,d,c,l,u,p=null!==(n=null===(t=w.find((function(t){var n,r,i;return t.id==(null===(i=null===(r=null===(n=O.secondaryProgram)||void 0===n?void 0:n.secondaryProgramReviewHistories)||void 0===r?void 0:r.find((function(t){return t.reviewYear==e.academicYear})))||void 0===i?void 0:i.secondaryProgramStatusTypeId)})))||void 0===t?void 0:t.name)&&void 0!==n?n:null===(r=w.find((function(t){var n,r,i;return t.id==(null===(i=null===(r=null===(n=O.secondaryProgram)||void 0===n?void 0:n.secondaryProgramReviewHistories)||void 0===r?void 0:r.find((function(t){return t.nextReviewYear==e.academicYear})))||void 0===i?void 0:i.secondaryProgramStatusTypeId)})))||void 0===r?void 0:r.name;return S.selfStudyReponseTypeId==CL.DOE?Object(o.jsxs)(Ek.View,{children:[Object(o.jsx)(Rk.a,cG({style:{paddingBottom:"10pt",fontSize:10}},{children:null!==(i=null===_||void 0===_?void 0:_.primaryText)&&void 0!==i?i:""}),void 0),Object(o.jsx)(dG,{academicYear:e.academicYear,selfStudyId:e.selfStudyId,selfStudyResponseId:e.selfStudyResponseId,sectionIndex:e.sectionIndex,componentIndex:e.componentIndex,readonly:e.readonly,fieldErrors:f,submitted:m,pdfView:e.pdfView},void 0),Object(o.jsx)(Ek.Text,cG({style:{paddingBottom:"10pt",fontSize:10}},{children:null===(u=null===(l=null===(c=null===(d=null===(s=null===(a=O.selfStudyResponses)||void 0===a?void 0:a.find((function(e){return e.selfStudyReponseTypeId==CL.RPP})))||void 0===s?void 0:s.selfStudySectionResponses)||void 0===d?void 0:d.find((function(t){var n;return(null===(n=t.selfStudySectionTemplate)||void 0===n?void 0:n.order)==e.sectionIndex})))||void 0===c?void 0:c.selfStudySectionComponentResponses)||void 0===l?void 0:l.find((function(t){var n;return(null===(n=t.selfStudySectionComponentTemplate)||void 0===n?void 0:n.order)==e.componentIndex})))||void 0===u?void 0:u.responseText}),void 0),Object(o.jsx)(Ek.Text,cG({style:{paddingBottom:"10pt",fontSize:10}},{children:"DOE Approval Status"}),void 0),Object(o.jsx)(Ek.Text,cG({style:{paddingBottom:"10pt",fontSize:8}},{children:p}),void 0)]},void 0):null}(),function(){var t,n,r,i,a,s,d;if(S.selfStudyReponseTypeId!=CL.INSTRUCTOR||G){var c=null===(s=null===(i=null===(r=null===(t=S.selfStudySectionResponses)||void 0===t?void 0:t.at(null!==(n=e.sectionIndex)&&void 0!==n?n:0))||void 0===r?void 0:r.selfStudySectionComponentResponses)||void 0===i?void 0:i.at(null!==(a=e.componentIndex)&&void 0!==a?a:0))||void 0===s?void 0:s.rppApproval;return Object(o.jsxs)(Ek.View,{children:[S.selfStudyReponseTypeId==CL.RPP?Object(o.jsx)(Rk.a,cG({style:{fontSize:10,paddingBottom:"20pt"}},{children:null!==(d=null===_||void 0===_?void 0:_.rppInstructions)&&void 0!==d?d:""}),void 0):Object(o.jsx)(Ek.Text,cG({style:{fontSize:10,paddingBottom:"10pt"}},{children:" Regional Planning Partner Approval Status"}),void 0),e.readonly||S.selfStudyReponseTypeId==CL.DOE?Object(o.jsx)(Ek.Text,cG({style:{fontSize:8,paddingBottom:"10pt"}},{children:"Approved"}),void 0):Object(o.jsxs)(Ek.View,{children:[Object(o.jsx)(Ek.Text,cG({style:{fontSize:10,paddingBottom:"10pt"}},{children:"Please approve or deny"}),void 0),Object(o.jsx)(Ek.Text,cG({style:{fontSize:8}},{children:void 0==c?"":1==c?"Approved":"Deny"}),void 0)]},void 0)]},void 0)}return null}()]}),void 0)]}),void 0)}),void 0)}return s||l?Object(o.jsx)(pt.a,{active:!0},void 0):e.previewComponent?Object(o.jsx)(mt.a,cG({initialValue:null===_||void 0===_?void 0:_.primaryText},r(null!==(n=e.componentIndex)&&void 0!==n?n:0).get(Lk.primaryText),_t.getValidation(Lk.primaryText+e.sectionIndex+e.componentIndex,f,m),{children:Object(o.jsx)(Mr,{readonly:!0},void 0)}),void 0):Object(o.jsxs)(Qn.a,cG({title:"Program Approval",type:"inner"}
1,{children:[function(){var t,n,i,a,s,d,c,l,u,p=null===w||void 0===w?void 0:w.map((function(e){return{id:e.id,display:e.name}}));p=p.filter((function(e){return e.id!=Kk.PENDING&&e.id!=Kk.NEWPROGRAM}));var h,v=null===(t=w.find((function(e){return e.id==O.secondaryProgramStatusTypeId})))||void 0===t?void 0:t.name,g=k();return S.selfStudyReponseTypeId==CL.DOE?Object(o.jsxs)(y.b,cG({direction:"vertical"},{children:[Object(o.jsx)(mt.a,cG({initialValue:null===_||void 0===_?void 0:_.primaryText},r(null!==(n=e.componentIndex)&&void 0!==n?n:0).get(Lk.primaryText),_t.getValidation(Lk.primaryText+e.sectionIndex+e.componentIndex,f,m),{children:Object(o.jsx)(Mr,{readonly:!0},void 0)}),void 0),Object(o.jsx)(Wk.a,cG({name:[e.componentIndex,tG.selfStudyResponseConsultantReviewQuestionDTOs]},{children:function(){return Object(o.jsx)(dG,{academicYear:e.academicYear,selfStudyId:e.selfStudyId,selfStudyResponseId:e.selfStudyResponseId,sectionIndex:e.sectionIndex,componentIndex:e.componentIndex,readonly:e.readonly,fieldErrors:f,submitted:m},void 0)}}),void 0),Object(o.jsx)(mt.a,cG({},r(null!==(i=e.componentIndex)&&void 0!==i?i:0).get(null===tG||void 0===tG?void 0:tG.responseText),_t.getValidation(tG.responseText+e.sectionIndex+e.componentIndex,f,m),{children:G?Object(o.jsx)(ud,{text:null===(u=null===(l=null===(c=null===(d=null===(s=null===(a=O.selfStudyResponses)||void 0===a?void 0:a.find((function(e){return e.selfStudyReponseTypeId==CL.RPP})))||void 0===s?void 0:s.selfStudySectionResponses)||void 0===d?void 0:d.find((function(t){var n;return(null===(n=t.selfStudySectionTemplate)||void 0===n?void 0:n.order)==e.sectionIndex})))||void 0===c?void 0:c.selfStudySectionComponentResponses)||void 0===l?void 0:l.find((function(t){var n;return(null===(n=t.selfStudySectionComponentTemplate)||void 0===n?void 0:n.order)==e.componentIndex})))||void 0===u?void 0:u.responseText},void 0):Object(o.jsx)(Mr,{readonly:!e.disable&&e.readonly},void 0)}),void 0),Object(o.jsx)(mt.a,cG({},(h=e.componentIndex,(new Map).set(Zk.className,{name:[h,Zk.className]})).get(Zk.className),_t.getValidation(Zk.className,f,m),{children:Object(o.jsx)(hs,{onUploaded:L,disabled:e.readonly,readonly:e.readonly,existingList:g,style:{width:300},text:"Supporting documents"},void 0)}),void 0),Object(o.jsx)(mt.a,cG({},r(e.componentIndex).get(tG.secondaryProgramStatusTypeId),_t.getValidation(tG.secondaryProgramStatusTypeId+e.sectionIndex+e.componentIndex,f,m),{children:e.readonly?Object(o.jsx)(ud,{text:v},void 0):Object(o.jsx)(_p,{direction:"horizontal",options:null!==p&&void 0!==p?p:[],disabled:e.readonly},void 0)}),void 0)]}),void 0):null}(),function(){var t;return S.selfStudyReponseTypeId!=CL.INSTRUCTOR||G?Object(o.jsxs)(y.b,cG({direction:"vertical"},{children:[S.selfStudyReponseTypeId==CL.RPP?Object(o.jsx)(Mr,{readonly:!0,value:null===_||void 0===_?void 0:_.rppInstructions},void 0):Object(o.jsx)(ud,{text:"Regional Planning Partner Approval Status"},void 0),Object(o.jsx)(mt.a,cG({},r(e.componentIndex).get(tG.rppApproval),_t.getValidation(tG.rppApproval+e.sectionIndex+e.componentIndex,f,m),{children:e.readonly||S.selfStudyReponseTypeId==CL.DOE?Object(o.jsx)(ud,{strong:S.selfStudyReponseTypeId==CL.RPP,text:"Approved"},void 0):Object(o.jsx)(_p,{direction:"horizontal",options:null!==(t=[{id:!1,display:"Approve"},{id:!0,display:"Deny"}])&&void 0!==t?t:[],disabled:e.readonly},void 0)}),void 0)]}),void 0):null}()]}),void 0)}return null}));lG.displayName="SelfStudyConsultantReview";var uG=lG,pG=function(e){return Object.assign({selfStudyResponseId:"00000000-0000-0000-0000-000000000000",academicYear:0},e)},fG={className:"SelfStudySectionResponseDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",selfStudyResponseId:"00000000-0000-0000-0000-000000000000",selfStudyResponse:null,selfStudySectionTemplateId:"00000000-0000-0000-0000-000000000000",selfStudySectionTemplate:null,sectionComments:"",selfStudySectionComponentResponses:[]},e)},id:"id",selfStudyResponseId:"selfStudyResponseId",selfStudyResponse:"selfStudyResponse",selfStudySectionTemplateId:"selfStudySectionTemplateId",selfStudySectionTemplate:"selfStudySectionTemplate",sectionComments:"sectionComments",selfStudySectionComponentResponses:"selfStudySectionComponentResponses"},hG=function(){return hG=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},hG.apply(this,arguments)},vG=a.forwardRef((function(e){var t,n=function(){return(new Map).set(Lk.primaryText,{name:[e.componentIndex,Lk.primaryText]}).set(tG.selfStudySectionComponentResponseResources,{name:[e.componentIndex,tG.selfStudySectionComponentResponseResources]}).set(tG.responseText,{required:!((null===v||void 0===v?void 0:v.selfStudyReponseTypeId)==CL.DOE||!e.disable&&e.readonly),name:[e.componentIndex,tG.responseText],label:"Response",rules:(null===v||void 0===v?void 0:v.selfStudyReponseTypeId)==CL.DOE||e.readonly?[]:[Ot.required()]})},r=Object(a.useState)(!1),i=r[0],s=r[1],d=Object(a.useState)(e.f
1ieldErrors),c=d[0],l=d[1],u=Object(a.useState)(e.submitted),p=u[0],f=u[1],h=Object(a.useState)({}),v=h[0],m=h[1],g=Object(a.useState)({}),b=g[0],j=g[1],I=Object(a.useState)({}),S=I[0],E=I[1],R=Object(a.useState)({}),_=R[0],T=R[1],C=Object(a.useState)({}),A=C[0],P=C[1],N=Object(a.useState)({}),w=N[0],D=N[1];Object(a.useEffect)((function(){q()}),[e.academicYear,e.selfStudyResponseId]),Object(a.useEffect)((function(){l(e.fieldErrors),f(e.submitted)}),[e.submitted,e.fieldErrors]);var q=function(){var t,n;s(!0);var r=[];0==e.academicYear||e.selfStudyResponseId==re.default.Empty()||e.previewComponent?e.previewComponent&&(s(!1),e.renderComplete&&e.renderComplete(null!==(n=e.sectionIndex)&&void 0!==n?n:0,e.componentIndex,!0)):(r.push(M(null!==(t=e.selfStudyResponseId)&&void 0!==t?t:re.default.Empty())),e.selfStudyId&&e.selfStudyId!=re.default.Empty()&&(r.push(F(CL.INSTRUCTOR,T)),r.push(F(CL.RPP,P)),r.push(F(CL.DOE,D))),r.push(Y()),Promise.all(r).then((function(){var t;s(!1),e.renderComplete&&e.renderComplete(null!==(t=e.sectionIndex)&&void 0!==t?t:0,e.componentIndex,!0)})))},F=function(t,n){var r=oG({selfStudyId:e.selfStudyId,selfStudyResponseTypeId:t,sectionIndex:e.sectionIndex,componentIndex:e.componentIndex});return iG.getSelfStudySectionComponentResponseByType(r).then((function(e){var t;e.selfStudySectionComponentResponse&&n(null!==(t=e.selfStudySectionComponentResponse)&&void 0!==t?t:fG.create())}))},M=function(t){var n=pG({selfStudyResponseId:t,academicYear:e.academicYear});return lL.getSelfStudyWithFreeTextQuestion(n).then((function(e){var n,r;e.selfStudy&&(j(e.selfStudy),m(null!==(r=null===(n=e.selfStudy.selfStudyResponses)||void 0===n?void 0:n.find((function(e){return e.id==t})))&&void 0!==r?r:wL.create()))}))},Y=function(){var t=Jk({academicYear:e.academicYear,selfStudySectionOrder:e.sectionIndex,selfStudySectionComponentOrder:e.componentIndex});return Pk.getSelfStudySectionComponentTemplateBySectionOrder(t).then((function(e){var t;e.selfStudySectionComponentTemplate&&E(null!==(t=e.selfStudySectionComponentTemplate)&&void 0!==t?t:Lk.create())}))},U=function(e){var t=[];return e.forEach((function(e){var n,r;void 0!=e&&t.push({uid:e.azureBlobStorageId,url:x.generateDownload(null!==(n=e.azureBlobStorageId)&&void 0!==n?n:re.default.Empty()),name:null===(r=e.azureBlobFile)||void 0===r?void 0:r.fileName})})),t},L=function(){var e;return U(null!==(e=null===w||void 0===w?void 0:w.selfStudySectionComponentResponseResources)&&void 0!==e?e:[])},k=function(){var e;return U(null!==(e=_.selfStudySectionComponentResponseResources)&&void 0!==e?e:[])},G=function(){var e;return U(null!==(e=A.selfStudySectionComponentResponseResources)&&void 0!==e?e:[])},V=function(t){e.handleFileUpload&&e.handleFileUpload(e.componentIndex,e.sectionIndex,t)},B=function(t){e.handleFileRemoved&&e.handleFileRemoved(e.componentIndex,e.sectionIndex,t)},W=function(e,t,n,r){return Object(o.jsx)(Qn.a,hG({title:e,type:"inner",className:"sub-inner-card",size:"small"},{children:Object(o.jsxs)(y.b,hG({direction:"vertical"},{children:[Object(o.jsx)(Mr,{value:n,readonly:!0},void 0),Object(o.jsx)(hs,{onUploaded:V,onRemoved:B,readonly:!0,disabled:!0,existingList:r,style:{width:300},text:"Add supporting documents"},void 0)]}),void 0)}),void 0)},z=function(e,t,n){var r=n.replaceAll(new RegExp("ptpx","g"),"px").replaceAll(new RegExp("font-size:?[0-9]{1,2}px","g"),"font-size:8px").replaceAll(new RegExp("font-size:?[0-9]{1,2}.[0-9]{1,2}px","g"),"font-size:8px").replaceAll(new RegExp("font-family:","g"),"");return Object(o.jsxs)(Ek.View,hG({style:{border:"1pt solid #f0f0f0",margin:10}},{children:[Object(o.jsx)(Ek.Text,hG({style:{padding:5,fontSize:10,border:"1pt solid #f0f0f0",backgroundColor:"#f0f0f0"}},{children:e}),void 0),Object(o.jsx)(Ek.View,hG({style:{marginLeft:10,marginTop:2}},{children:Object(o.jsx)(Rk.b,hG({style:{fontSize:8}},{children:r}),void 0)}),void 0)]}),void 0)};if(e.pdfView){var H=(null!==(t=null===S||void 0===S?void 0:S.primaryText)&&void 0!==t?t:"").replaceAll(new RegExp("font-size:?[0-9]{1,2}px","g"),"font-size:10px").replaceAll(new RegExp("font-size:?[0-9]{1,2}.[0-9]{1,2}px","g"),"font-size:10px").replaceAll(new RegExp("font-family:","g"),"");return Object(o.jsx)(Ek.View,hG({style:{paddingBottom:"10pt"}},{children:Object(o.jsx)(Ek.View,hG({style:{border:"1pt solid #f0f
10f0",margin:10}},{children:Object(o.jsxs)(Ek.View,hG({style:{margin:10}},{children:[Object(o.jsx)(Rk.b,hG({style:{fontSize:10}},{children:H}),void 0),function(){var t;return v.selfStudyReponseTypeId!=CL.INSTRUCTOR||v.selfStudyReponseTypeId==CL.INSTRUCTOR&&e.pdfView?z("District Response",null===_||void 0===_?void 0:_.rating,null!==(t=null===_||void 0===_?void 0:_.responseText)&&void 0!==t?t:""):Object(o.jsx)(o.Fragment,{},void 0)}(),function(){var t;if((v.selfStudyReponseTypeId==CL.DOE||v.selfStudyReponseTypeId==CL.RPP&&e.pdfView)&&Je.isAuthorized([gn.EDIT_RPP_RESPONSE,gn.VIEW_RPP_RESPONSE,gn.EDIT_DE_RESPONSE,gn.VIEW_DE_CONSULTANT_RESPONSE])||v.selfStudyResponseStatusTypeId==lk.REVISING||v.selfStudyResponseStatusTypeId==lk.REVISIONSNEEDED||v.selfStudyResponseStatusTypeId==lk.COMPLETE)return z("RPP Response",null===A||void 0===A?void 0:A.rating,null!==(t=null===A||void 0===A?void 0:A.responseText)&&void 0!==t?t:"")}(),function(){var t,n;if(v.selfStudyReponseTypeId==CL.DOE&&e.pdfView&&Je.isAuthorized([gn.EDIT_DE_RESPONSE,gn.VIEW_DE_CONSULTANT_RESPONSE])||(null===(t=b.academicYear)||void 0===t?void 0:t.academicYearStatusTypeId)==TL.RELEASEDAPPROVALCOMMENTS)return z("DE Response",null===w||void 0===w?void 0:w.rating,null!==(n=null===w||void 0===w?void 0:w.responseText)&&void 0!==n?n:"")}(),e.previewComponent?Object(o.jsx)(Ek.Text,hG({style:{margin:10,fontSize:10}},{children:" Response"}),void 0):null]}),void 0)}),void 0)}),void 0)}return i?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsx)(Qn.a,hG({type:"inner"},{children:Object(o.jsxs)(y.b,hG({direction:"vertical"},{children:[Object(o.jsx)(Mr,{readonly:!0,value:null===S||void 0===S?void 0:S.primaryText},void 0),function(){var t;if(v.selfStudyReponseTypeId!=CL.INSTRUCTOR||v.selfStudyReponseTypeId==CL.INSTRUCTOR&&e.readonly)return W("District Response",null===_||void 0===_?void 0:_.rating,null!==(t=null===_||void 0===_?void 0:_.responseText)&&void 0!==t?t:"",k())}(),function(){var t;if((v.selfStudyReponseTypeId==CL.DOE||v.selfStudyReponseTypeId==CL.RPP&&e.readonly)&&Je.isAuthorized([gn.EDIT_RPP_RESPONSE,gn.VIEW_RPP_RESPONSE,gn.EDIT_DE_RESPONSE,gn.VIEW_DE_CONSULTANT_RESPONSE])||v.selfStudyResponseStatusTypeId==lk.REVISING||v.selfStudyResponseStatusTypeId==lk.REVISIONSNEEDED||v.selfStudyResponseStatusTypeId==lk.COMPLETE)return W("RPP Response",null===A||void 0===A?void 0:A.rating,null!==(t=null===A||void 0===A?void 0:A.responseText)&&void 0!==t?t:"",G())}(),function(){var t,n;if(v.selfStudyReponseTypeId==CL.DOE&&e.readonly&&Je.isAuthorized([gn.EDIT_DE_RESPONSE,gn.VIEW_DE_CONSULTANT_RESPONSE])||(null===(t=b.academicYear)||void 0===t?void 0:t.academicYearStatusTypeId)==TL.RELEASEDAPPROVALCOMMENTS)return W("DE Response",null===w||void 0===w?void 0:w.rating,null!==(n=null===w||void 0===w?void 0:w.responseText)&&void 0!==n?n:"",L())}(),function(){var t=e.componentIndex,r=[];switch(v.selfStudyReponseTypeId){case CL.INSTRUCTOR:r=k();break;case CL.RPP:r=G();break;case CL.DOE:r=L()}return e.readonly?null:Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(mt.a,hG({},n().get(tG.responseText),_t.getValidation(tG.responseText+e.sectionIndex+t,c,p),{children:Object(o.jsx)(Mr,{readonly:!e.disable&&e.readonly},void 0)}),void 0),Object(o.jsx)(mt.a,hG({},n().get(null===tG||void 0===tG?void 0:tG.selfStudySectionComponentResponseResources),_t.getValidation(tG.selfStudySectionComponentResponseResources+t,c,p),{children:Object(o.jsx)(hs,{onUploaded:V,onRemoved:B,disabled:e.disable||e.readonly,existingList:r,style:{width:300},text:"Add supporting documents"},void 0)}),void 0)]},void 0)}()]}),void 0)}),void 0)}));vG.displayName="SelfStudyFreeTextQuestion";var mG=vG,gG=function(){return gG=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},gG.apply(this,arguments)},bG=a.forwardRef((function(e){var t,n,r,i,s,d=Object(a.useState)(!1),c=d[0],l=d[1],u=Object(a.useState)(null),p=u[0],f=u[1],h=Object(a.useState)(e.fieldErrors)[0],v=Object(a.useState)(e.submitted)[0];Object(a.useEffect)((function(){m()}),[e.academicYear,e.sectionIndex]);var m=function(){l(!0),0!=e.academicYear&&void 0!=e.sectionIndex&&g()},g=function(){var t,n;return Pk.getSelfStudySectionTemplateBySectionOrder(null!==(t=e.academicYear)&&void 0!==t?t:0,null!==(n=e.sectionIndex)&&void 0!==n?n:0).then((function(e){e.selfStudySectionTemplate&&f(e.selfStudySectionTemplate)})).finally((function(){var t;l(!1),e.renderComplete&&e.renderComplete(null!==(t=e.sectionIndex)&&void 0!==t?t:0,e.componentIndex,!0)}))};if(e.pdfView){var b=(null!==(r=null===(n=null===(t=null===p||void 0===p?void 0:p.selfStudySectionComponentTemplates)||void 0===t?void 0:t.find((function(t){return t.order==e.componentIndex})))||void 0===n?void 0:n.primaryText)&&void 0!==r?r:"").replaceAll(new RegExp("font-size:?[0-9]{1,2}px","g"),"font-size:10px");return Object(o.jsx)(Ek.View,gG({style:{margin:10}},{children:Object(o.jsx)(Rk.b,gG({style:{fontSize:10}},{children:b}),void 0)}),void 0)}return c?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsx)(O.Content,{children:Object(o.jsx)(mt.a,gG({initialValue:null===(s=null===(i=null===p||void 0===p?void 0:p.selfStudySectionComponentTemplates)||void 0===i?void 0:i.find((function(t){return t.order==e.componentIndex})))||void 0===s?void 0:s.primaryText},(new Map).set(Lk.primaryText,{name:[e.componentIndex,Lk.primaryText]}).get(Lk.primaryText),_t.getValidation(Lk.primaryText+e.componentIndex,h,v),{children:Object(o.jsx)(Mr,{readonly:!0},void 0)}),void 0)},void 0)}));bG.displayName="SelfStudyInstruction";var yG=bG,OG=n(380),jG=(n(1465),function(e){return Object.assign({selfStudyResponseId:"00000000-0000-0000-0000-000000000000",academicYear:0},e)}),IG={className:"SelfStudyResponseNewGoalDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",selfStudyResponseId:"00000000-0000-0000-0000-000000000000",selfStudyResponse:null,section:"",actionStepsAndTimeline:"",measureOfSuccess:"",results:"",sectionTitle:[],order:0},e)},id:"id",selfStudyResponseId:"selfStudyResponseId",selfStudyResponse:"selfStudyResponse",section:"section",actionStepsAndTimeline:"actionStepsAndTimeline",measureOfSuccess:"measureOfSuccess",results:"results",sectionTitle:"sectionTitle",order:"order"},SG=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),EG=function(){return EG=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},EG.apply(this,arguments)},RG=function(e){function t(t){return e.call(this,t)||this}return SG(t,e),t.prototype.render=function(){var e=this.props.text||0==this.props.text?this.props.text:this.props.value;
1return e=this.props.ellipsis?ei.ellipsisCharacterLimit(e,30):e,Object(o.jsx)(O.Content,{children:Object(o.jsxs)(y.b,EG({direction:"vertical"},{children:[this.props.label,this.props.children?this.props.children:Object(o.jsxs)(ot.a.Text,EG({type:this.props.type,strong:!0},{children:[" ",e," "]}),void 0)]}),void 0)},void 0)},t}(a.Component),_G=function(){return _G=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},_G.apply(this,arguments)};var TG=function(e){return e.readonly?Object(o.jsx)(ud,{text:e.value},void 0):Object(o.jsx)(ut.a.TextArea,_G({},e),void 0)},CG=function(){return CG=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},CG.apply(this,arguments)},xG=a.forwardRef((function(e){var t,n,r,i,s,d,c,l,u,p,f=function(t){return(new Map).set(IG.section,{required:!e.disable&&!e.readonly,name:[t,IG.section],label:"Section",rules:[Ot.required()]}).set(IG.actionStepsAndTimeline,{label:"Action Step(s) And Timeline",required:!e.disable&&!e.readonly,name:[t,IG.actionStepsAndTimeline],rules:[Ot.required()]}).set(IG.measureOfSuccess,{label:"Measure Of Success",required:!e.disable&&!e.readonly,name:[t,IG.measureOfSuccess],rules:[Ot.required()]})},h=Object(a.useState)(!1),v=h[0],m=h[1],g=Object(a.useState)(e.fieldErrors),b=g[0],O=g[1],j=Object(a.useState)(e.submitted),I=j[0],S=j[1],E=Object(a.useState)({}),R=E[0],_=E[1],T=Object(a.useState)({}),C=T[0],x=T[1],A=Object(a.useState)({}),P=A[0],N=A[1],w=Object(a.useState)([]),D=w[0],q=w[1];Object(a.useEffect)((function(){F()}),[e.academicYear,e.selfStudyResponseId]),Object(a.useEffect)((function(){O(e.fieldErrors),S(e.submitted)}),[e.submitted,e.fieldErrors]);var F=function(){var t,n;m(!0);var r=[];0==e.academicYear||e.selfStudyResponseId==re.default.Empty()||e.previewComponent?e.previewComponent&&(r.push(Y()),m(!1),e.renderComplete&&e.renderComplete(null!==(n=e.sectionIndex)&&void 0!==n?n:0,e.componentIndex,!0)):(r.push(M(null!==(t=e.selfStudyResponseId)&&void 0!==t?t:re.default.Empty())),r.push(Y()),r.push(U(e.academicYear)),Promise.all(r).then((function(){var t;m(!1),e.renderComplete&&e.renderComplete(null!==(t=e.sectionIndex)&&void 0!==t?t:0,e.componentIndex,!0)})))},M=function(t){var n=jG({selfStudyResponseId:t,academicYear:e.academicYear});return lL.getSelfStudyWithNewGoals(n).then((function(e){var n,r;e.selfStudy&&(_(e.selfStudy),x(null!==(r=null===(n=e.selfStudy.selfStudyResponses)||void 0===n?void 0:n.find((function(e){return e.id==t})))&&void 0!==r?r:wL.create()))}))},Y=function(){var t=Jk({academicYear:e.academicYear,selfStudySectionOrder:e.sectionIndex,selfStudySectionComponentOrder:e.componentIndex});return Pk.getSelfStudySectionComponentTemplateBySectionOrder(t).then((function(e){var t;e.selfStudySectionComponentTemplate&&N(null!==(t=e.selfStudySectionComponentTemplate)&&void 0!==t?t:Lk.create())}))},U=function(e){return Pk.getSelfStudySectionTemplates(e).then((function(e){var t;e.selfStudySectionTemplates&&q(null!==(t=e.selfStudySectionTemplates)&&void 0!==t?t:[])}))},L=function(){var e,t,n,r=[],i=null===(n=null===(t=null===(e=R.selfStudyResponses)||void 0===e?void 0:e.find((function(e){return e.selfStudyReponseTypeId==CL.INSTRUCTOR})))||void 0===t?void 0:t.selfStudyResponseProgramOverview)||void 0===n?void 0:n.secondaryProgramScenarioId;return null===D||void 0===D||D.forEach((function(e){var t,n,o,a,s;if((0==e.selfStudySectionTemplateSecondaryProgramScenarios.length||(null!==(n=null===(t=e.selfStudySectionTemplateSecondaryProgramScenarios)||void 0===t?void 0:t.findIndex((function(e){return e==i})))&&void 0!==n?n:-1)>-1)&&(null!==(a=null===(o=null===e||void 0===e?void 0:e.selfStudySectionComponentTemplates)||void 0===o?void 0:o.findIndex((function(e){var t,n;return e.selfStudySectionComponentTypeId==Nk.RANKINGQUESTION&&((null!==(n=null===(t=e.selfStudySectionComponentScenarios)||void 0===t?void 0:t.findIndex((function(e){return e==i})))&&void 0!==n?n:-1)>-1||!e.selfStudySectionComponentScenarios||0==e.selfStudySectionComponentScenarios.length)})))&&void 0!==a?a:-1)>-1){var d={value:e.title,label:e.title,children:[{}]};null===(s=e.selfStudySectionComponentTemplates)||void 0===s||s.forEac
1h((function(e){var t,n;(0==e.selfStudySectionComponentScenarios.length||(null!==(n=null===(t=e.selfStudySectionComponentScenarios)||void 0===t?void 0:t.findIndex((function(e){return e==i})))&&void 0!==n?n:-1)>-1)&&e.selfStudySectionComponentTypeId==Nk.RANKINGQUESTION&&d.children.push({value:e.rankingQuestionIdentifier+" - "+e.programOfStudyTenets,label:e.rankingQuestionIdentifier+" - "+e.programOfStudyTenets})})),r.push(d)}})),r},k=function(e){var t,n,r,i=(null!==(r=null===(n=null===(t=R.selfStudyResponses)||void 0===t?void 0:t.find((function(e){return e.selfStudyReponseTypeId==CL.INSTRUCTOR})))||void 0===n?void 0:n.selfStudyResponseNewGoals)&&void 0!==r?r:[])[e];return Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(RG,{label:"Section",text:null===i||void 0===i?void 0:i.section},void 0),Object(o.jsx)(RG,{label:"Action Steps and Timeline",text:null===i||void 0===i?void 0:i.actionStepsAndTimeline},void 0),Object(o.jsx)(RG,{label:"Measure Of Success",text:null===i||void 0===i?void 0:i.measureOfSuccess},void 0)]},void 0)},G=function(e){var t,n,r,i=(null!==(r=null===(n=null===(t=R.selfStudyResponses)||void 0===t?void 0:t.find((function(e){return e.selfStudyReponseTypeId==CL.INSTRUCTOR})))||void 0===n?void 0:n.selfStudyResponseNewGoals)&&void 0!==r?r:[])[e];return Object(o.jsxs)(Ek.View,CG({style:{border:"1pt solid #f0f0f0",margin:10}},{children:[Object(o.jsxs)(Ek.Text,CG({style:{padding:5,fontSize:12,border:"1pt solid #f0f0f0",backgroundColor:"#f0f0f0"}},{children:["Goal ",e+1]}),void 0),Object(o.jsxs)(Ek.View,CG({style:{margin:10}},{children:[Object(o.jsx)(Ek.Text,CG({style:{paddingBottom:"10pt",fontSize:10}},{children:"Section"}),void 0),Object(o.jsx)(Ek.Text,CG({style:{paddingBottom:"10pt",fontSize:8}},{children:null===i||void 0===i?void 0:i.section}),void 0),Object(o.jsx)(Ek.Text,CG({style:{paddingBottom:"10pt",fontSize:10}},{children:"Action Step(s) And Timeline"}),void 0),Object(o.jsx)(Ek.Text,CG({style:{paddingBottom:"10pt",fontSize:8}},{children:null===i||void 0===i?void 0:i.actionStepsAndTimeline}),void 0),Object(o.jsx)(Ek.Text,CG({style:{paddingBottom:"10pt",fontSize:10}},{children:"Measure Of Success"}),void 0),Object(o.jsx)(Ek.Text,CG({style:{paddingBottom:"10pt",fontSize:8}},{children:null===i||void 0===i?void 0:i.measureOfSuccess}),void 0)]}),void 0)]}),void 0)};if(e.pdfView){var V=null===P||void 0===P?void 0:P.numberOfNewGoals;e.previewComponent&&(V=null!==(t=e.newGoalCount)&&void 0!==t?t:0);for(var B=[],W=0;W<(null!==V&&void 0!==V?V:0);W++){var z=(null===C||void 0===C?void 0:C.selfStudyResponseNewGoals)?(null!==(n=null===C||void 0===C?void 0:C.selfStudyResponseNewGoals)&&void 0!==n?n:[])[W]:IG.create();B.push(Object(o.jsx)(Ek.View,CG({style:{paddingBottom:(null!==V&&void 0!==V?V:0)-1>W?"10pt":"0pt"}},{children:(null===C||void 0===C?void 0:C.selfStudyReponseTypeId)==CL.INSTRUCTOR||e.previewComponent?Object(o.jsxs)(Ek.View,CG({style:{border:"1pt solid #f0f0f0",margin:10}},{children:[Object(o.jsxs)(Ek.Text,CG({style:{padding:5,fontSize:12,border:"1pt solid #f0f0f0",backgroundColor:"#f0f0f0"}},{children:["Goal ",W+1]}),void 0),Object(o.jsxs)(Ek.View,CG({style:{margin:10}},{children:[Object(o.jsx)(Ek.Text,CG({style:{paddingBottom:"10pt",fontSize:10}},{children:"Section"}),void 0),Object(o.jsx)(Ek.Text,CG({style:{paddingBottom:"10pt",fontSize:8}},{children:null===(r=null===z||void 0===z?void 0:z.section)||void 0===r?void 0:r.split(" / ")}),void 0),Object(o.jsx)(Ek.Text,CG({style:{paddingBottom:"10pt",fontSize:10}},{children:"Action Step(s) And Timeline"}),void 0),Object(o.jsx)(Ek.Text,CG({style:{paddingBottom:"10pt",fontSize:8}},{children:null===z||void 0===z?void 0:z.actionStepsAndTimeline}),void 0),Object(o.jsx)(Ek.Text,CG({style:{paddingBottom:"10pt",fontSize:10}},{children:"Measure Of Success"}),void 0),Object(o.jsx)(Ek.Text,CG({style:{paddingBottom:"10pt",fontSize:8}},{children:null===z||void 0===z?void 0:z.measureOfSuccess}),void 0)]}),void 0)]}),void 0):Object(o.jsx)(Ek.View,{children:G(W)},void 0)}),void 0))}var H=(null!==(s=null===(i=null===P||void 0===P?void 0:P.primaryText)||void 0===i?void 0:i.replaceAll(new RegExp("ptpx","g"),"px"))&&void 0!==s?s:"").replaceAll(new RegExp("font-size:?[0-9]{1,2}px","g"),"font-size:10px").replaceAll(new RegExp("font-size:?[0-9]{1,2}.[0-9]{1,2}px","g"),"font-size:10px").replaceAll(new RegExp("font-family:","g"),"");return Object(o.jsx)(Ek.View,CG({style:{paddingBottom:"10pt"}},{children:Object(o.jsxs)(Ek.View,CG({style:{border:"1pt solid #f0f
10f0",margin:10}},{children:[Object(o.jsx)(Ek.Text,CG({style:{fontSize:12,border:"1pt solid #f0f0f0",backgroundColor:"#f0f0f0",padding:5}},{children:"Program Goals"}),void 0),Object(o.jsxs)(Ek.View,CG({style:{margin:10}},{children:[Object(o.jsx)(Rk.b,CG({style:{fontSize:10}},{children:H}),void 0),B]}),void 0)]}),void 0)}),void 0)}if(v)return Object(o.jsx)(pt.a,{active:!0},void 0);B=[];var Q=e.componentIndex;V=null===P||void 0===P?void 0:P.numberOfNewGoals;e.previewComponent&&(V=null!==(d=e.newGoalCount)&&void 0!==d?d:0);for(W=0;W<(null!==V&&void 0!==V?V:0);W++){z=(null===C||void 0===C?void 0:C.selfStudyResponseNewGoals)?(null!==(c=null===C||void 0===C?void 0:C.selfStudyResponseNewGoals)&&void 0!==c?c:[])[W]:IG.create();B.push(Object(o.jsx)(y.b,CG({direction:"vertical"},{children:Object(o.jsx)(Qn.a,CG({type:"inner",title:"Goal "+(W+1)},{children:(null===C||void 0===C?void 0:C.selfStudyReponseTypeId)==CL.INSTRUCTOR||e.previewComponent?Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(mt.a,CG({initialValue:null===(l=null===z||void 0===z?void 0:z.section)||void 0===l?void 0:l.split(" / ")},f(W).get(IG.section),_t.getValidation(IG.section+e.sectionIndex+Q,b,I),{children:!e.disable&&e.readonly?Object(o.jsx)(ud,{text:null===(p=null===(u=null===z||void 0===z?void 0:z.section)||void 0===u?void 0:u.split(" / "))||void 0===p?void 0:p.join(" / ")},void 0):Object(o.jsx)(OG.a,{style:{width:"100%"},dropdownMatchSelectWidth:!1,options:L(),disabled:e.disable},void 0)}),void 0),Object(o.jsx)(mt.a,CG({initialValue:null===z||void 0===z?void 0:z.actionStepsAndTimeline},f(W).get(IG.actionStepsAndTimeline),_t.getValidation(IG.actionStepsAndTimeline+e.sectionIndex+Q,b,I),{children:Object(o.jsx)(TG,{showCount:!0,disabled:e.disable,readonly:!e.disable&&e.readonly},void 0)}),void 0),Object(o.jsx)(mt.a,CG({initialValue:null===z||void 0===z?void 0:z.measureOfSuccess},f(W).get(IG.measureOfSuccess),_t.getValidation(IG.measureOfSuccess+e.sectionIndex+Q,b,I),{children:Object(o.jsx)(TG,{showCount:!0,maxLength:2e3,disabled:e.disable,readonly:!e.disable&&e.readonly},void 0)}),void 0)]},void 0):Object(o.jsx)(y.b,CG({direction:"vertical"},{children:k(W)}),void 0)}),void 0)}),void 0))}return Object(o.jsxs)(Qn.a,CG({type:"inner",title:"Program Goals"},{children:[Object(o.jsx)(Mr,{readonly:!0,value:null===P||void 0===P?void 0:P.primaryText},void 0),B]}),void 0)}));xG.displayName="SelfStudyNewGoals";var AG=xG,PG=function(e){return Object.assign({selfStudyResponseId:"00000000-0000-0000-0000-000000000000",academicYear:0},e)},NG={className:"SelfStudyResponsePreviousGoalDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",selfStudyResponseId:"00000000-0000-0000-0000-000000000000",selfStudyResponse:null,section:"",actionStepsAndTimeline:"",measureOfSuccess:"",results:"",sectionTitle:[],order:0},e)},id:"id",selfStudyResponseId:"selfStudyResponseId",selfStudyResponse:"selfStudyResponse",section:"section",actionStepsAndTimeline:"actionStepsAndTimeline",measureOfSuccess:"measureOfSuccess",results:"results",sectionTitle:"sectionTitle",order:"order"},wG=function(){return wG=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},wG.apply(this,arguments)},DG=a.forwardRef((function(e){var t,n,r,i,s,d,c,l,u=function(e,t){return(new Map).set(NG.section,{required:!t,name:[e,NG.section],label:"Section",rules:[Ot.required()]}).set(NG.actionStepsAndTimeline,{required:!t,label:"Action Step(s) And Timeline",name:[e,NG.actionStepsAndTimeline],rules:[Ot.required()]}).set(NG.measureOfSuccess,{required:!t,label:"Measure Of Success",name:[e,NG.measureOfSuccess],rules:[Ot.required()]}).set(NG.results,{required:!t,label:"Result",name:[e,NG.results],rules:[Ot.required()]})},p=Object(a.useState)(!1),f=p[0],h=p[1],v=Object(a.useState)(e.fieldErrors),m=v[0],g=v[1],b=Object(a.useState)(e.submitted),O=b[0],j=b[1],I=Object(a.useState)({}),S=I[0],E=I[1],R=Object(a.useState)({}),_=R[0],T=R[1],C=Object(a.useState)({}),x=C[0],A=C[1];Object(a.useEffect)((function(){P()}),[e.academicYear,e.selfStudyResponseId]),Object(a.useEffect)((function(){g(e.fieldErrors),j(e.submitted)}),[e.submitted,e.fieldErrors]);var P=function(){var t,n;h(!0);var r=[];0==e.academicYear||e.selfStudyResponseId==re.default.Empty()||e.previewComponent?e.previewComponent&&(r.push(w()),h(!1),e.renderComplete&&e.renderComplete(null!==(n=e.sectionIndex)&&void 0!==n?n:0,e.componentIndex,!0)):(r.push(N(null!==(t=e.selfStudyResponseId)&&void 0!==t?t:re.default.Empty())),r.push(w()),Promise.all(r).then((function(){var t;h(!1),e.renderComplete&&e.renderComplete(null!==(t=e.sectionIndex)&&void 0!==t?t:0,e.componentIndex,!0)})))},N=function(t){var n=PG({selfStudyResponseId:t,academicYear:e.academicYear});return lL.getSelfStudyWithPreviousGoals(n).then((function(e){var n,r;e.selfStudy&&(E(e.selfStudy),T(null!==(r=null===(n=e.selfStudy.selfStudyResponses)||void 0===n?void 0:n.find((function(e){return e.id==t})))&&void 0!==r?r:wL.create()))}
1))},w=function(){var t=Jk({academicYear:e.academicYear,selfStudySectionOrder:e.sectionIndex,selfStudySectionComponentOrder:e.componentIndex});return Pk.getSelfStudySectionComponentTemplateBySectionOrder(t).then((function(e){var t;e.selfStudySectionComponentTemplate&&A(null!==(t=e.selfStudySectionComponentTemplate)&&void 0!==t?t:Lk.create())}))},D=function(e){var t,n,r,i=(null!==(r=null===(n=null===(t=S.selfStudyResponses)||void 0===t?void 0:t.find((function(e){return e.selfStudyReponseTypeId==CL.INSTRUCTOR})))||void 0===n?void 0:n.selfStudyResponsePreviousGoals)&&void 0!==r?r:[])[e];return Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(RG,{label:"Section",text:null===i||void 0===i?void 0:i.section},void 0),Object(o.jsx)(RG,{label:"Action Steps and Timeline",text:null===i||void 0===i?void 0:i.actionStepsAndTimeline},void 0),Object(o.jsx)(RG,{label:"Measure Of Success",text:null===i||void 0===i?void 0:i.measureOfSuccess},void 0),Object(o.jsx)(RG,{label:"Results",text:null===i||void 0===i?void 0:i.results},void 0)]},void 0)},q=function(e){var t,n,r,i=(null!==(r=null===(n=null===(t=S.selfStudyResponses)||void 0===t?void 0:t.find((function(e){return e.selfStudyReponseTypeId==CL.INSTRUCTOR})))||void 0===n?void 0:n.selfStudyResponsePreviousGoals)&&void 0!==r?r:[])[e];return Object(o.jsxs)(Ek.View,wG({style:{border:"1pt solid #f0f0f0",margin:10}},{children:[Object(o.jsxs)(Ek.Text,wG({style:{padding:5,fontSize:12,backgroundColor:"#f0f0f0",border:"1pt solid #f0f0f0"}},{children:["Goal ",e+1]}),void 0),Object(o.jsxs)(Ek.View,wG({style:{margin:10}},{children:[Object(o.jsx)(Ek.Text,wG({style:{paddingBottom:"10pt",fontSize:10}},{children:"Section"}),void 0),Object(o.jsx)(Ek.Text,wG({style:{paddingBottom:"10pt",fontSize:8}},{children:null===i||void 0===i?void 0:i.section}),void 0),Object(o.jsx)(Ek.Text,wG({style:{paddingBottom:"10pt",fontSize:10}},{children:"Action Step(s) And Timeline"}),void 0),Object(o.jsx)(Ek.Text,wG({style:{paddingBottom:"10pt",fontSize:8}},{children:null===i||void 0===i?void 0:i.actionStepsAndTimeline}),void 0),Object(o.jsx)(Ek.Text,wG({style:{paddingBottom:"10pt",fontSize:10}},{children:"Measure Of Success"}),void 0),Object(o.jsx)(Ek.Text,wG({style:{paddingBottom:"10pt",fontSize:8}},{children:null===i||void 0===i?void 0:i.measureOfSuccess}),void 0),Object(o.jsx)(Ek.Text,wG({style:{paddingBottom:"10pt",fontSize:10}},{children:"Results"}),void 0),Object(o.jsx)(Ek.Text,wG({style:{paddingBottom:"10pt",fontSize:8}},{children:null===i||void 0===i?void 0:i.results}),void 0)]}),void 0)]}),void 0)};if(e.pdfView){var F=null===x||void 0===x?void 0:x.numberOfPreviousGoals;e.previewComponent&&(F=null!==(t=e.previousGoalCount)&&void 0!==t?t:0);for(var M=[],Y=0;Y<(null!==F&&void 0!==F?F:0);Y++){var U=(null===_||void 0===_?void 0:_.selfStudyResponsePreviousGoals)?(null!==(n=null===_||void 0===_?void 0:_.selfStudyResponsePreviousGoals)&&void 0!==n?n:[])[Y]:NG.create();M.push(Object(o.jsx)(Ek.View,{children:(null===_||void 0===_?void 0:_.selfStudyReponseTypeId)==CL.INSTRUCTOR||e.previewComponent?Object(o.jsxs)(Ek.View,wG({style:{border:"1pt solid #f0f0f0",margin:10}},{children:[Object(o.jsxs)(Ek.Text,wG({style:{padding:5,fontSize:12,border:"1pt solid #f0f0f0",backgroundColor:"#f0f0f0"}},{children:["Goal ",Y+1]}),void 0),Object(o.jsxs)(Ek.View,wG({style:{margin:10}},{children:[Object(o.jsx)(Ek.Text,wG({style:{paddingBottom:"10pt",fontSize:10}},{children:"Section"}),void 0),Object(o.jsx)(Ek.Text,wG({style:{paddingBottom:"10pt",fontSize:8}},{children:null===(r=null===U||void 0===U?void 0:U.section)||void 0===r?void 0:r.split(" / ")}),void 0),Object(o.jsx)(Ek.Text,wG({style:{paddingBottom:"10pt",fontSize:10}},{children:"Action Step(s) And Timeline"}),void 0),Object(o.jsx)(Ek.Text,wG({style:{paddingBottom:"10pt",fontSize:8}},{children:null===U||void 0===U?void 0:U.actionStepsAndTimeline}),void 0),Object(o.jsx)(Ek.Text,wG({style:{paddingBottom:"10pt",fontSize:10}},{children:"Measure Of Success"}),void 0),Object(o.jsx)(Ek.Text,wG({style:{paddingBottom:"10pt",fontSize:8}},{children:null===U||void 0===U?void 0:U.measureOfSuccess}
1),void 0),Object(o.jsx)(Ek.Text,wG({style:{paddingBottom:"10pt",fontSize:10}},{children:"Results"}),void 0),Object(o.jsx)(Ek.Text,wG({style:{paddingBottom:"10pt",fontSize:8}},{children:null===U||void 0===U?void 0:U.results}),void 0)]}),void 0)]}),void 0):Object(o.jsx)(Ek.View,{children:q(Y)},void 0)},void 0))}var L=(null!==(s=null===(i=null===x||void 0===x?void 0:x.primaryText)||void 0===i?void 0:i.replaceAll(new RegExp("ptpx","g"),"px"))&&void 0!==s?s:"").replaceAll(new RegExp("font-size:?[0-9]{1,2}px","g"),"font-size:10px").replaceAll(new RegExp("font-size:?[0-9]{1,2}.[0-9]{1,2}px","g"),"font-size:10px").replaceAll(new RegExp("font-family:","g"),"");return Object(o.jsx)(Ek.View,wG({style:{paddingBottom:"10pt"}},{children:Object(o.jsxs)(Ek.View,wG({style:{border:"1pt solid #f0f0f0",margin:10}},{children:[Object(o.jsx)(Ek.Text,wG({style:{fontSize:12,border:"1pt solid #f0f0f0",backgroundColor:"#f0f0f0",padding:5}},{children:"Previous Program Goals"}),void 0),Object(o.jsxs)(Ek.View,wG({style:{margin:10}},{children:[(null===x||void 0===x?void 0:x.primaryText)?Object(o.jsx)(Rk.b,{children:L},void 0):null,M]}),void 0)]}),void 0)}),void 0)}if(f)return Object(o.jsx)(pt.a,{active:!0},void 0);var k=e.componentIndex,G=null!==(d=null===x||void 0===x?void 0:x.numberOfPreviousGoals)&&void 0!==d?d:0;e.previewComponent&&(G=null!==(c=e.previousGoalCount)&&void 0!==c?c:0);for(M=[],Y=0;Y<(null!==G&&void 0!==G?G:0);Y++){var V=void 0!=(U=(null===_||void 0===_?void 0:_.selfStudyResponsePreviousGoals)?(null!==(l=null===_||void 0===_?void 0:_.selfStudyResponsePreviousGoals)&&void 0!==l?l:[])[Y]:NG.create());M.push(Object(o.jsx)(y.b,wG({direction:"vertical"},{children:Object(o.jsx)(Qn.a,wG({type:"inner",title:"Goal "+(Y+1)},{children:(null===_||void 0===_?void 0:_.selfStudyReponseTypeId)==CL.INSTRUCTOR||e.previewComponent?Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(mt.a,wG({initialValue:null===U||void 0===U?void 0:U.section},u(Y,V).get(NG.section),_t.getValidation(NG.section+e.sectionIndex+k,m,O),{children:Object(o.jsx)(il,{disabled:e.disable,readonly:!e.disable&&e.readonly},void 0)}),void 0),Object(o.jsx)(mt.a,wG({initialValue:null===U||void 0===U?void 0:U.actionStepsAndTimeline},u(Y,V).get(NG.actionStepsAndTimeline),_t.getValidation(NG.actionStepsAndTimeline+e.sectionIndex+k,m,O),{children:Object(o.jsx)(TG,{showCount:!0,maxLength:2e3,disabled:e.disable,readonly:!e.disable&&e.readonly},void 0)}),void 0),Object(o.jsx)(mt.a,wG({initialValue:null===U||void 0===U?void 0:U.measureOfSuccess},u(Y,V).get(NG.measureOfSuccess),_t.getValidation(NG.measureOfSuccess+e.sectionIndex+k,m,O),{children:Object(o.jsx)(TG,{showCount:!0,maxLength:2e3,disabled:e.disable,readonly:!e.disable&&e.readonly},void 0)}),void 0),Object(o.jsx)(mt.a,wG({initialValue:null===U||void 0===U?void 0:U.results},u(Y,V).get(NG.results),_t.getValidation(NG.results+e.sectionIndex+k,m,O),{children:Object(o.jsx)(TG,{showCount:!0,maxLength:2e3,disabled:e.disable,readonly:!e.disable&&e.readonly},void 0)}),void 0)]},void 0):Object(o.jsx)(y.b,wG({direction:"vertical"},{children:D(Y)}),void 0)}),void 0)}),void 0))}return Object(o.jsxs)(Qn.a,wG({type:"inner",title:"Previous Program Goals"},{children:[Object(o.jsx)(Mr,{readonly:!0,value:x.primaryText},void 0),M]}),void 0)}));DG.displayName="SelfStudyPreviousGoals";var qG=DG,FG=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),MG=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return FG(t,e),t.prototype.getSecondaryProgramScenarioTableData=function(e,t){var n="api/SecondaryProgramScenarios",r=n.indexOf("?")>0?"&":"?";return null!=t&&(n+=r+"academicYearId="+t,r="&"),n=n.replace(/null|undefined/gi,""),this.SendRequest(e,"post",n,!0,!1)},t.prototype.getSecondaryProgramScenarioDetails=function(e){var t="api/SecondaryProgramScenarios/get";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.saveSecondaryProgramScenarioDetails=function(e){var t="api/SecondaryProgramScenarios/save";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.deleteSecondaryProgramScenario=function(e){var t="api/SecondaryProgramScenarios/deleteSecondaryProgramScenario";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getSecondaryProgramScenarios=function(e){var t="api/SecondaryProgramScenarios/SecondaryProgramScenarios";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t}(U),YG=new MG,UG=function(e){return Object.assign({academicYearId:0},e)},LG=function(e){return Object.assign({selfStudyResponseId:"00000000-0000-0000-0000-000000000000"},e)},kG={className:"SecondaryCourseDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",secondaryCourseId:0,academicYear:0,enrollment:0,localCourseNumber:"",courseName:"",institutionCourseId:null,institutionCourse:null,carnegieUnit:0,communityCollegeIdentifier:0,communityCollegeId:null,communityCollege:null,districtIdentifier:0,districtId:null,district:null,sced:"",display:""},e)},id:"id",secondaryCourseId:"secondaryCourseId",academicYear:"academicYear",enrollment:"enrollment",localCourseNumber:"localCourseNumber",courseName:"courseName",institutionCourseId:"institutionCourseId",institutionCourse:"institutionCourse",carnegieUnit:"carnegieUnit",communityCollegeIdentifier:"communityCollegeIdentifier",communityCollegeId:"communityCollegeId",communityCollege:"communityCollege",districtIdentifier:"districtIdentifier",districtId:"districtId",district:"district",sced:"sced",display:"display"},GG={className:"SecondaryProgramCourseDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",secondaryProgramCourseId:0,academicYear:0,programId:"00000000-0000-0000-0000-000000000000",programIdentifier:0,program:null,courseIdentifier:0,courseId:"00000000-0000-0000-0000-000000000000",course:null,isOfferTeach:null,isCoreCourse:null,districtId:"00000000-0000-0000-0000-000000000000",programTitle:""},e)},id:"id",secondaryProgramCourseId:"secondaryProgramCourseId",academicYear:"academicYear",programId:"programId",programIdentifier:"programIdentifier",program:"program",courseIdentifier:"courseIdentifier",courseId:"courseId",course:"course",isOfferTeach:"isOfferTeach",isCoreCourse:"isCoreCourse",districtId:"districtId",programTitle:"programTitle"},VG=function(e){return Object.assign({secondaryProgramScenarioId:"00000000-0000-0000-0000-000000000000",academicYearId:0},e)},BG={className:"SecondaryProgramScenarioDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",secondaryProgramScenarioId:0,academicYear:0,title:"",description:""},e)},id:"id",secondaryProgramScenarioId:"secondaryProgramScenarioId",academicYear:"academicYear",title:"title",description:"description"},WG=function(e){return Object.assign({id:"00000000-0000-0000-0000-000000000000",academicYear:null,secondaryProgramScenarioId:null},e)},zG=function(e){return Object.assign({secondaryProgramScenarioId:null,
1secondaryProgramScenario:null},e)},HG=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),QG=function(){return QG=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},QG.apply(this,arguments)},KG=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._formItems=(new Map).set(BG.secondaryProgramScenarioId,{required:!0,name:BG.secondaryProgramScenarioId,label:"Id",rules:[Ot.required(),Ot.onlyNumericCharacters()]}).set(BG.title,{required:!0,name:BG.title,label:"Title",rules:[Ot.required(),Ot.maxLength(100)]}).set(BG.description,{required:!0,name:BG.description,label:"Description",rules:[Ot.required(),Ot.maxLength(5e3)]}),n.fetchData=function(){n.setState({loading:!0});var e=[];e.push(n.loadSecondaryProgramScenario()),Promise.all(e).then((function(){n.setState({loading:!1}),n.resetForm()}))},n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields(),n.setState({altered:!1})},n.loadExisting=function(){if(n.props.SecondaryProgramScenarioId&&n.props.academicYear){var e=WG({id:n.props.SecondaryProgramScenarioId});YG.getSecondaryProgramScenarioDetails(e).then((function(e){var t;e&&(n.setState({SecondaryProgramScenario:null!==(t=e.secondaryProgramScenario)&&void 0!==t?t:BG.create({id:n.props.SecondaryProgramScenarioId==re.default.Empty()?void 0:n.props.SecondaryProgramScenarioId,secondaryProgramScenarioId:void 0,name:void 0})},(function(){return n.resetForm()})),n.props.SecondaryProgramScenarioId==re.default.Empty()&&n.setState({altered:!0}))})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))}},n.loadNew=function(){n.setState({loading:!1,SecondaryProgramScenario:BG.create({id:n.props.SecondaryProgramScenarioId==re.default.Empty()?void 0:n.props.SecondaryProgramScenarioId,secondaryProgramScenarioId:void 0,name:void 0}),altered:!0})},n.submit=function(){var e;null===(e=n._formRef.current)||void 0===e||e.validateFields().then((function(){return n.handleSubmit()}),(function(){return n.setState({error:!0})}))},n.handleChange=function(){n.setState({altered:!0})},n.handleSubmit=function(){n.setState({submitting:!0});var e=zG({SecondaryProgramScenarioId:n.props.SecondaryProgramScenarioId,SecondaryProgramScenario:BG.create(QG(QG({},n._formRef?n._formRef.current.getFieldsValue():null),{academicYear:n.props.academicYear}))});YG.saveSecondaryProgramScenarioDetails(e).then((function(e){var t,r;n.setState({submitted:!0}),(null===e||void 0===e?void 0:e.succeeded)?(n.setState({SecondaryProgramScenario:null!==(t=e.secondaryProgramScenario)&&void 0!==t?t:BG.create(),fieldErrors:void 0,error:!1}),S.b.success("Saved"),n.props.onSave&&(null===(r=e.secondaryProgramScenario)||void 0===r?void 0:r.id)&&
1(n.resetForm(),n.props.onSave(e.secondaryProgramScenario.id))):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("ProgramType could not be saved"),n.setState({loading:!1,submitting:!1}))})).catch((function(e){n.setState({error:e,loading:!1,submitting:!1}),S.b.error("ProgramType could not be saved")}))},n.state={SecondaryProgramScenario:BG.create({id:void 0,name:void 0,secondaryProgramScenarioId:void 0})},n}return HG(t,e),t.prototype.componentDidMount=function(){this.fetchData()},t.prototype.componentDidUpdate=function(e){this.props!=e&&this.fetchData()},t.prototype.loadSecondaryProgramScenario=function(){this.state.loading||(this.props.SecondaryProgramScenarioId==re.default.Empty()||this.props.isNew?this.loadNew():this.loadExisting())},t.prototype.render=function(){return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(y.b,QG({size:"small",direction:"vertical"},{children:[this.renderErrors(),Object(o.jsxs)(ht.a,QG({ref:this._formRef,layout:"vertical",initialValues:this.state.SecondaryProgramScenario,onValuesChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!0},{children:[Object(o.jsx)(mt.a,QG({},this._formItems.get(BG.secondaryProgramScenarioId),_t.getValidation(BG.secondaryProgramScenarioId,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(il,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,QG({},this._formItems.get(BG.title),_t.getValidation(BG.title,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(il,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,QG({},this._formItems.get(BG.description),_t.getValidation(BG.description,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(TG,{maxLength:5e3,showCount:!0,autoSize:{minRows:5},disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0)]}),void 0)]}),void 0)},t.prototype.renderErrors=function(){if(this.state.error)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t}(a.Component),XG=function(){return XG=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},XG.apply(this,arguments)};var JG=function(e){var t,n=s.a.createRef(),r=e.secondaryProgramScenarioId==re.default.Empty();return Object(o.jsx)(f.a,XG({visible:!0,title:r?"New Program Type":"Edit Program Type",okText:"Save",onOk:function(){var e;null===(e=n.current)||void 0===e||e.submit()},okButtonProps:{htmlType:"submit"},onCancel:e.onCancel,destroyOnClose:!0},{children:Object(o.jsx)(KG,{ref:n,SecondaryProgramScenarioId:null!==(t=e.secondaryProgramScenarioId)&&void 0!==t?t:re.default.Empty,isEditing:!0,onSave:e.onSave,isNew:r,academicYear:e.academicYear},void 0)}),void 0)},$G=function(){return $G=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},$G.apply(this,arguments)};var ZG=function(e){var t=void 0,n=Object(a.useState)(),r=n[0],i=n[1],s=function(e){e.id&&i(e.id)},d=function(){i(null)},c=function(t){null!=t&&f.a.confirm({title:"Are you sure you want to delete this Scenario?",okText:"Delete",onOk:function(){return l(t,e.academicYear)},okButtonProps:{type:"primary",danger:!0}})},l=function(e,n){var r=VG({SecondaryProgramScenarioId:e,academicYearId:n}
1);YG.deleteSecondaryProgramScenario(r).then((function(e){!0===(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Scenario was removed."),null===t||void 0===t||t.refresh()):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(){S.b.error("Scenario could not be removed.")}))},u=[];return u.push(oo.Reset()),!Je.isAuthorized([gn.EDIT_SECONDARY_PROGRAM_SCENARIO])||e.programId||e.fromProgramOverview||u.push(oo.Default("New Scenario",(function(){i(re.default.Empty)}))),Object(o.jsxs)(o.Fragment,{children:[function(){if(r)return Object(o.jsx)(JG,{onCancel:d,visible:!0,secondaryProgramScenarioId:r,academicYear:e.academicYear,onSave:d},void 0)}(),Object(o.jsx)(io,{ref:function(e){return t=e},serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:u,columns:function(){var t=[];return e.fromProgramOverview||t.push({title:"Id",dataIndex:BG.secondaryProgramScenarioId,sorter:!0,width:100,render:function(e,t){return t.secondaryProgramScenarioId},filterType:wr.Text}),t.pushAll([{title:"Title",dataIndex:BG.title,sorter:!0,ellipsis:!0,width:200,render:function(e,t){return t.title},filterType:wr.Text},{title:"Description",dataIndex:BG.description,sorter:!0,ellipsis:!0,render:function(e,t){return t.description},filterType:wr.Text}]),e.fromProgramOverview||t.push({title:"Actions",align:"center",dataIndex:BG.secondaryProgramScenarioId,sorter:!1,render:function(e,t){if(Je.isAuthorized([gn.CONFIG_ACADEMIC_YEAR]))return Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(rt.a,$G({type:"link",onClick:function(){return s(t)}},{children:Object(o.jsx)(Gr.a,{},void 0)}),void 0),Object(o.jsx)(rt.a,$G({type:"link",onClick:function(){return c(t.id)}},{children:Object(o.jsx)(Yd.a,{},void 0)}),void 0)]},void 0)},width:100}),t}(),fetchData:{fetch:function(t){return YG.getSecondaryProgramScenarioTableData(t,e.academicYear)}},stateSaving:{enabled:!0,tableUniqueKey:"secondary_program_scenario_list"}},void 0)]},void 0)},eV=n(186),tV=n.n(eV),nV=function(){return nV=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},nV.apply(this,arguments)};function rV(e){var t,n,r,i,s,d,c,l,u,p,h,v,m,g,b,O,j,I,S,E,R,_,T,C,x,A,P,N,w,D,q,F,M,Y,U,L,k,G,V,B,W,z,H,Q,K,X,J,$,Z=Object(a.useState)(!0),ee=Z[0],te=Z[1],ne=Object(a.useState)(e.fieldErrors),ie=ne[0],oe=ne[1],ae=Object(a.useState)(!1)[1],se=Object(a.useState)({}),de=se[0],ce=se[1],le=Object(a.useState)({}),ue=le[0],pe=le[1],fe=Object(a.useState)(e.submitted),he=fe[0],ve=fe[1],me=Object(a.useState)([]),ge=me[0],be=me[1],ye=Object(a.useState)(!1),Oe=ye[0],je=ye[1];Object(a.useEffect)((function(){Ie()}),[e.academicYear,e.selfStudyResponseId]),Object(a.useEffect)((function(){oe(e.fieldErrors),ve(e.submitted)}),[e.submitted,e.fieldErrors]);var Ie=function(){var t,n;te(!0);var r=[];0==e.academicYear||e.selfStudyResponseId==re.default.Empty()||e.previewComponent||(de.id&&de.id!=re.default.Empty()||!ee||r.push(Ee(null!==(t=e.selfStudyResponseId)&&void 0!==t?t:re.default.Empty())),r.push(Se()),Promise.all(r).then((function(){var t;te(!1),e.renderComplete&&e.renderComplete(null!==(t=e.sectionIndex)&&void 0!==t?t:0,e.componentIndex,!0)}))),e.previewComponent&&(te(!1),e.renderComplete&&e.renderComplete(null!==(n=e.sectionIndex)&&void 0!==n?n:0,e.componentIndex,!0))},Se=function(){var t,n=UG({academicYearId:null!==(t=e.academicYear)&&void 0!==t?t:0});return YG.getSecondaryProgramScenarios(n).then((function(e){var t;e&&be(null!==(t=e.secondaryProgramScenario)&&void 0!==t?t:[])})).catch((function(){ae(!0)}))},Ee=function(e){var t=LG({selfStudyResponseId:e});return lL.getSelfStudyWithProgramOverview(t).then((function(t){var n,r;t.selfStudy&&(ce(t.selfStudy),pe(null!==(r=null===(n=t.selfStudy.selfStudyResponses)||void 0===n?void 0:n.find((function(t){return t.id==e})))&&void 0!==r?r:wL.create()))})).catch((function(){ae(!0)}))},Re=function(){je(!0)},_e=function(){var e,t,n=0;return null===(t=null===(e=de.secondaryProgram)||void 0===e?void 0:e.secondaryProgramCourses)||void 0===t||t.forEach((function(e){var t,r;return n+=null!==(r=null===(t=e.course)||void 0===t?void 0:t.carnegieUnit)&&void 0!==r?r:0})),n},Te=function(){var e,t,n,r=null===(t=null===(e=de.selfStudyResponses)||void 0===e?void 0:e.find((function(e){return e.selfStudyReponseTypeId==CL.INSTRUCTOR})))||void 0===t?void 0:t.selfStudyResponseProgramOverview;return Object(o.jsx)(o.Fragment,{children:Object(o.jsx)(RG,{label:"Scenario",text:null===(n=ge.find((function(e){return e.id==(null===r||void 0===r?void 0:r.secondaryProgramScenarioId)})))||void 0===n?void 0:n.description},void 0)},void 0)},Ce=function(e,t){return Object(o.jsx)("div",nV({style:{height:30,background:e%2===0?void 0:"#f0f0f0",border:"1pt solid #f0f
10f0",padding:5}},{children:t}),void 0)},xe=function(e){return Object(o.jsx)("div",nV({style:{padding:5,border:"1pt solid #f0f0f0"}},{children:e}),void 0)};if(e.pdfView){var Ae=null===(n=null===(t=de.selfStudyResponses)||void 0===t?void 0:t.find((function(e){return e.selfStudyReponseTypeId==CL.INSTRUCTOR})))||void 0===n?void 0:n.selfStudyResponseProgramOverview,Pe=tV.a.renderToStaticMarkup(Object(o.jsxs)(y.b,nV({direction:"vertical",size:"large"},{children:[Object(o.jsx)(ud,{style:{paddingTop:"10",fontSize:10},value:"Courses"},void 0),Object(o.jsxs)(Pi.a,nV({style:{fontSize:8,border:"1pt solid #f0f0f0"},className:"disable-table-hover",dataSource:null!==(i=null===(r=de.secondaryProgram)||void 0===r?void 0:r.secondaryProgramCourses)&&void 0!==i?i:[],pagination:!1,scroll:{x:500}},{children:[Object(o.jsx)(Pi.a.Column,{title:xe("Course Number"),dataIndex:kG.localCourseNumber,render:function(e,t,n){var r;return Ce(n,null===(r=t.course)||void 0===r?void 0:r.localCourseNumber)}},void 0),Object(o.jsx)(Pi.a.Column,{title:xe("Title"),dataIndex:kG.courseName,width:200,render:function(e,t,n){var r;return Ce(n,null===(r=t.course)||void 0===r?void 0:r.courseName)}},void 0),Object(o.jsx)(Pi.a.Column,{title:xe("Carnegie Units"),dataIndex:kG.carnegieUnit,render:function(e,t,n){var r;return Ce(n,null===(r=t.course)||void 0===r?void 0:r.carnegieUnit)}},void 0),Object(o.jsx)(Pi.a.Column,{title:xe("Enrollment"),dataIndex:kG.enrollment,render:function(e,t,n){var r;return Ce(n,null===(r=t.course)||void 0===r?void 0:r.enrollment)}},void 0),Object(o.jsx)(Pi.a.Column,{title:xe("Offer and Teach"),dataIndex:GG.isOfferTeach,render:function(e,t,n){return Ce(n,t.isOfferTeach?"Yes":"No")}},void 0),Object(o.jsx)(Pi.a.Column,{title:xe("SCED"),dataIndex:kG.sced,render:function(e,t,n){var r;return Ce(n,null===(r=t.course)||void 0===r?void 0:r.sced)}},void 0)]}),void 0),ue.selfStudyReponseTypeId!=CL.INSTRUCTOR?Object(o.jsx)(y.b,nV({direction:"vertical"},{children:Te()}),void 0):Object(o.jsxs)(y.b,{children:[Object(o.jsx)(ud,nV({style:{fontSize:10,paddingBottom:"10pt"},value:"Scenario"},{children:"Scenario"}),void 0),Object(o.jsx)(ud,{style:{fontSize:8},value:null===(s=null===ge||void 0===ge?void 0:ge.find((function(e){var t;return e.id==(null===(t=ue.selfStudyResponseProgramOverview)||void 0===t?void 0:t.secondaryProgramScenarioId)})))||void 0===s?void 0:s.title},void 0)]},void 0),ee||e.academicYear<=2023?null:Object(o.jsx)(al,{pdfView:!0,thirdPartyCredentials:null!==(d=null===Ae||void 0===Ae?void 0:Ae.thirdPartyCredentials)&&void 0!==d?d:[],isSecondaryProgram:!0,sectionIndex:e.sectionIndex,componentIndex:e.componentIndex,readonly:null===(c=ue.selfStudyReponseTypeId!=CL.INSTRUCTOR)||void 0===c||c||ee,submitted:he,fieldErrors:ie},void 0)]}),void 0)),Ne=[{title:"Program Review Year",data:de.academicYearId+" - "+(de.academicYearId+1)},{title:"Program Information Year",data:(null===(l=de.academicYear)||void 0===l?void 0:l.programInfoYear)+" - "+((null!==(p=null===(u=de.academicYear)||void 0===u?void 0:u.programInfoYear)&&void 0!==p?p:0)+1)},{title:"Title",data:null===(v=null===(h=de.secondaryProgram)||void 0===h?void 0:h.secondaryCipNumber)||void 0===v?void 0:v.description},{title:"Regional Planning Partner",data:null===(b=null===(g=null===(m=de.secondaryProgram)||void 0===m?void 0:m.district)||void 0===g?void 0:g.region)||void 0===b?void 0:b.name},{title:"Community College",data:null===(S=null===(I=null===(j=null===(O=de.secondaryProgram)||void 0===O?void 0:O.district)||void 0===j?void 0:j.region)||void 0===I?void 0:I.institution)||void 0===S?void 0:S.name},{title:"District",data:null===(R=null===(E=de.secondaryProgram)||void 0===E?void 0:E.district)||void 0===R?void 0:R.display},{title:"CIP Number",data:null===(T=null===(_=null===de||void 0===de?void 0:de.secondaryProgram)||void 0===_?void 0:_.secondaryCipNumber)||void 0===T?void 0:T.code},{title:"Total Carnegie Unit",data:_e()}],we=tV.a.renderToStaticMarkup(Object(o.jsxs)(Pi.a,nV({style:{fontSize:8},className:"disable-table-hover",dataSource:Ne,pagination:!1,showHeader:!1,scroll:{x:500}},{children:[Object(o.jsx)(Pi.a.Column,{dataIndex:kG.localCourseNumber,render:function(e,t){return Object(o.jsx)("div",nV({style:{background:"#f0f0f0",border:"1pt solid #f0f
10f0",padding:5}},{children:t.title}),void 0)}},void 0),Object(o.jsx)(Pi.a.Column,{dataIndex:kG.courseName,width:200,render:function(e,t){return Object(o.jsx)("div",nV({style:{border:"1pt solid #f0f0f0",padding:5}},{children:t.data}),void 0)}},void 0)]}),void 0));return Object(o.jsxs)(Ek.View,nV({style:{border:"1pt solid #f0f0f0",margin:10}},{children:[Object(o.jsx)(Ek.Text,nV({style:{fontSize:10,padding:5,backgroundColor:"#f0f0f0",border:"1pt solid #f0f0f0"}},{children:"Program Information"}),void 0),Object(o.jsxs)(Ek.View,nV({style:{margin:10}},{children:[Object(o.jsx)(Rk.b,nV({style:{paddingTop:"10pt"}},{children:we}),void 0),Object(o.jsx)(Rk.b,nV({style:{fontSize:"10px"}},{children:Pe}),void 0)]}),void 0)]}),void 0)}if(ee)return Object(o.jsx)(pt.a,{active:!0},void 0);var De;Ae=null===(x=null===(C=de.selfStudyResponses)||void 0===C?void 0:C.find((function(e){return e.selfStudyReponseTypeId==CL.INSTRUCTOR})))||void 0===x?void 0:x.selfStudyResponseProgramOverview;return Object(o.jsxs)(Qn.a,nV({type:"inner",title:"Program Information"},{children:[Object(o.jsx)(f.a,nV({visible:Oe,closable:!0,title:"Scenario Information",width:1e3,onCancel:function(){je(!1)},footer:null},{children:Object(o.jsx)(ZG,{fromProgramOverview:!0,academicYear:null!==(A=e.academicYear)&&void 0!==A?A:0},void 0)}),void 0),Object(o.jsxs)(y.b,nV({direction:"vertical",size:"large"},{children:[Object(o.jsxs)(Kn.b,nV({size:"small",bordered:!0,layout:"horizontal",column:{xs:1,sm:1,md:1,lg:1,xl:1,xxl:1}},{children:[Object(o.jsx)(Kn.b.Item,nV({label:"Program Review Year"},{children:de.academicYearId+" - "+(de.academicYearId+1)}),void 0),Object(o.jsx)(Kn.b.Item,nV({label:"Program Information Year"},{children:(null===(P=de.academicYear)||void 0===P?void 0:P.programInfoYear)+" - "+((null!==(w=null===(N=de.academicYear)||void 0===N?void 0:N.programInfoYear)&&void 0!==w?w:0)+1)}),void 0),Object(o.jsx)(Kn.b.Item,nV({label:"Title"},{children:null===(q=null===(D=de.secondaryProgram)||void 0===D?void 0:D.secondaryCipNumber)||void 0===q?void 0:q.description}),void 0),Object(o.jsx)(Kn.b.Item,nV({label:"Regional Planning Partner"},{children:null===(Y=null===(M=null===(F=de.secondaryProgram)||void 0===F?void 0:F.district)||void 0===M?void 0:M.region)||void 0===Y?void 0:Y.name}),void 0),Object(o.jsx)(Kn.b.Item,nV({label:"Community College"},{children:null===(G=null===(k=null===(L=null===(U=de.secondaryProgram)||void 0===U?void 0:U.district)||void 0===L?void 0:L.region)||void 0===k?void 0:k.institution)||void 0===G?void 0:G.name}),void 0),Object(o.jsx)(Kn.b.Item,nV({label:"District"},{children:null===(B=null===(V=de.secondaryProgram)||void 0===V?void 0:V.district)||void 0===B?void 0:B.display}),void 0),Object(o.jsx)(Kn.b.Item,nV({label:"CIP Number"},{children:null===(z=null===(W=null===de||void 0===de?void 0:de.secondaryProgram)||void 0===W?void 0:W.secondaryCipNumber)||void 0===z?void 0:z.code}),void 0),Object(o.jsx)(Kn.b.Item,nV({label:"Total Carnegie Unit"},{children:_e()}),void 0)]}),void 0),Object(o.jsx)(ud,{value:"Courses"},void 0),Object(o.jsxs)(Pi.a,nV({className:"disable-table-hover",dataSource:null!==(Q=null===(H=de.secondaryProgram)||void 0===H?void 0:H.secondaryProgramCourses)&&void 0!==Q?Q:[],pagination:!1,scroll:{x:500}},{children:[Object(o.jsx)(Pi.a.Column,{title:"Course Number",width:125,dataIndex:kG.localCourseNumber,render:function(e,t){var n;return null===(n=t.course)||void 0===n?void 0:n.localCourseNumber}},void 0),Object(o.jsx)(Pi.a.Column,{title:"Title",dataIndex:kG.courseName,render:function(e,t){var n;return null===(n=t.course)||void 0===n?void 0:n.courseName}},void 0),Object(o.jsx)(Pi.a.Column,{title:"Carnegie Units",dataIndex:kG.carnegieUnit,render:function(e,t){var n;return null===(n=t.course)||void 0===n?void 0:n.carnegieUnit}},void 0),Object(o.jsx)(Pi.a.Column,{title:"Enrollment",dataIndex:kG.enrollment,render:function(e,t){var n;return null===(n=t.course)||void 0===n?void 0:n.enrollment}},void 0),Object(o.jsx)(Pi.a.Column,{title:"Offer and Teach",dataIndex:GG.isOfferTeach,render:function(e,t){return t.isOfferTeach?"Yes":"No"}},void 0),Object(o.jsx)(Pi.a.Column,{title:"SCED",dataIndex:kG.sced,render:function(e,t){var n;return null===(n=t.course)||void 0===n?void 0:n.sced}},void 0)]}),void 0),ue.selfStudyReponseTypeId!=CL.INSTRUCTOR?Object(o.jsx)(y.b,nV({direction:"vertical"},{children:Te()}),void 0):Object(o.jsx)(y.b,nV({direction:"vertical"},{children:Object(o.jsx)(mt.a,nV({initialValue:null===(K=ue.selfStudyResponseProgramOverview)||void 0===K?void 0:K.secondaryProgramScenarioId},(De=e.componentIndex,(new Map).set(Yk.secondaryProgramScenarioId,{required:!e.readonly,name:[De,Yk.secondaryProgramScenarioId],label:Object(o.jsxs)(o.Fragment,{children:["Scenario",Object(o.jsx)(rt.a,{size:"small",type:"link",icon:Object(o.jsx)(ap.a,{},void 0),onClick:Re},void 0)]},void 0),rules:[Ot.required()]})).get(Yk.secondaryProgramScenarioId),_t.getValidation(Yk.secondaryProgramScenarioId+e.sectionIndex+e.componentIndex,ie,he),{children:!e.disable&&e.readonly?Object(o.jsx)(ud,{text:null===(X=null===ge||void 0===ge?void 0:ge.find((function(e){var t;return e.id==(null===(t=ue.selfStudyResponseProgramOverview)||void 0===t?void 0:t.secondaryProgramScenarioId)})))||void 0===X?void 0:X.title},void 0):Object(o.jsx)(hd,nV({readOnly:!e.disable&&e.readonly,dropdownMatchSelectWidth:!1,disabled:ee||e.disable},{children:null===ge||void 0===ge?void 0:ge.map((function(e){return function(e){var t,n,r;if(e.id)return Object(o.jsx)(pr.a.Option,nV({title:null!==(t=e.title)&&void 0!==t?t:"",value:null!==(n=e.id)&&void 0!==n?n:re.default.Empty()},{children:e.title}),null!==(r=e.id)&&void 0!==r?r:re.default.Empty())}(e)}))}),void 0)}),void 0)}),void 0),ee||e.academicYear<=2023?null:Object(o.jsx)(al,{thirdPartyCredentials:null!==(J=null===Ae||void 0===Ae?void 0:Ae.thirdPartyCredentials)&&void 0!==J?J:[],isSecondaryProgram:!0,sectionIndex:e.sectionIndex,componentIndex:e.componentIndex,readonly:null===($=ue.selfStudyReponseTypeId!=CL.INSTRUCTOR)||void 0===$||$||e.readonly||ee,submitted:he,fieldErrors:ie},void 0)]}),void 0)]}),void 0)}rV.displayName="SelfStudyProgramOverview";var iV=rV,oV=function(e){return Object.assign({selfStudyResponseId:"00000000-0000-0000-0000-000000000000",academicYear:0},e)},aV=function(){return aV=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},aV.apply(this,arguments)},sV=a.forwardRef((function(e){var t,n,r,i,s,d=[{id:"0",display:"0 - This area needs major improvement"},{id:"1",display:"1 - This area needs some improvement"}
1,{id:"2",display:"2 - This is satisfactory"},{id:"3",display:"3 - This is a strength"}],c="District Response",l="RPP Response",u="DE Response",p=function(){return(new Map).set(Lk.primaryText,{name:[e.componentIndex,Lk.primaryText]}).set(Lk.programOfStudyTenets,{label:"Program Study of Tenent(s)",name:[e.componentIndex,Lk.programOfStudyTenets]}).set(tG.rating,{required:!0,name:[e.componentIndex,tG.rating],rules:[Ot.required()]}).set(tG.selfStudySectionComponentResponseResources,{name:[e.componentIndex,tG.selfStudySectionComponentResponseResources]}).set(tG.responseText,{label:(null===R||void 0===R?void 0:R.selfStudyReponseTypeId)==CL.INSTRUCTOR||e.previewComponent?"Please provide additional supporting information to your response.":"Comments",required:!((null===R||void 0===R?void 0:R.selfStudyReponseTypeId)==CL.DOE||!e.disable&&e.readonly),name:[e.componentIndex,tG.responseText],rules:(null===R||void 0===R?void 0:R.selfStudyReponseTypeId)==CL.DOE||e.readonly?[]:[Ot.required()]})},f=Object(a.useState)(!1),h=f[0],v=f[1],m=Object(a.useState)(e.fieldErrors),g=m[0],b=m[1],j=Object(a.useState)(e.submitted),I=j[0],S=j[1],E=Object(a.useState)({}),R=E[0],_=E[1],T=Object(a.useState)({}),C=T[0],A=T[1],P=Object(a.useState)({}),N=P[0],w=P[1],D=Object(a.useState)({}),q=D[0],F=D[1],M=Object(a.useState)({}),Y=M[0],U=M[1],L=Object(a.useState)({}),k=L[0],G=L[1];Object(a.useEffect)((function(){V()}),[e.academicYear,e.selfStudyResponseId]),Object(a.useEffect)((function(){b(e.fieldErrors),S(e.submitted)}),[e.submitted,e.fieldErrors]);var V=function(){var t;v(!0);var n=[];0!=e.academicYear&&e.selfStudyResponseId&&e.selfStudyResponseId!=re.default.Empty()?(n.push(W(null!==(t=e.selfStudyResponseId)&&void 0!==t?t:re.default.Empty())),e.selfStudyId&&e.selfStudyId!=re.default.Empty()&&(n.push(B(CL.INSTRUCTOR,F)),n.push(B(CL.RPP,U)),n.push(B(CL.DOE,G)),n.push(z())),Promise.all(n).then((function(){var t;v(!1),e.renderComplete&&e.renderComplete(null!==(t=e.sectionIndex)&&void 0!==t?t:0,e.componentIndex,!0)}))):e.previewComponent&&(n.push(z()),Promise.all(n).then((function(){var t;v(!1),e.renderComplete&&e.renderComplete(null!==(t=e.sectionIndex)&&void 0!==t?t:0,e.componentIndex,!0)})))},B=function(t,n){var r=oG({selfStudyId:e.selfStudyId,selfStudyResponseTypeId:t,sectionIndex:e.sectionIndex,componentIndex:e.componentIndex});return iG.getSelfStudySectionComponentResponseByType(r).then((function(e){var t;e.selfStudySectionComponentResponse&&n(null!==(t=e.selfStudySectionComponentResponse)&&void 0!==t?t:tG.create())}))},W=function(t){var n=oV({selfStudyResponseId:t,academicYear:e.academicYear});return lL.getSelfStudyWithRankingQuestion(n).then((function(e){var n,r;e.selfStudy&&(A(e.selfStudy),_(null!==(r=null===(n=e.selfStudy.selfStudyResponses)||void 0===n?void 0:n.find((function(e){return e.id==t})))&&void 0!==r?r:wL.create()))}))},z=function(){var t=Jk({academicYear:e.academicYear,selfStudySectionOrder:e.sectionIndex,selfStudySectionComponentOrder:e.componentIndex});return Pk.getSelfStudySectionComponentTemplateBySectionOrder(t).then((function(e){var t;e.selfStudySectionComponentTemplate&&w(null!==(t=e.selfStudySectionComponentTemplate)&&void 0!==t?t:Lk.create())}))},H=function(e){var t=null===e||void 0===e?void 0:e.rankingQuestionIdentifier,n=null===e||void 0===e?void 0:e.programOfStudyTenets;return t||(t=null===N||void 0===N?void 0:N.rankingQuestionIdentifier),n||(n=null===N||void 0===N?void 0:N.programOfStudyTenets),t+" - "+n},Q=function(e){var t=[];return e.forEach((function(e){var n,r;void 0!=e&&t.push({uid:e.azureBlobStorageId,url:x.generateDownload(null!==(n=e.azureBlobStorageId)&&void 0!==n?n:re.default.Empty()),name:null===(r=e.azureBlobFile)||void 0===r?void 0:r.fileName})})),t},K=function(){var e;return Q(null!==(e=null===k||void 0===k?void 0:k.selfStudySectionComponentResponseResources)&&void 0!==e?e:[])},X=function(){var e;return Q(null!==(e=q.selfStudySectionComponentResponseResources)&&void 0!==e?e:[])},J=function(){var e;return Q(null!==(e=Y.selfStudySectionComponentResponseResources)&&void 0!==e?e:[])},$=function(t){e.handleFileUpload&&e.handleFileUpload(e.componentIndex,e.sectionIndex,t)},Z=function(t){e.handleFileRemoved&&e.handleFileRemoved(e.componentIndex,e.sectionIndex,t)},ee=function(e,t){if(e==c)return Object(o.jsx)(_p,{value:t,direction:"horizontal",options:d,disabled:!0,readonly:!0},void 0)},te=function(e,t,n,r){return Object(o.jsx)(Qn.a,aV({title:e,type:"inner",className:"sub-inner-card",size:"small"},{children:Object(o.jsxs)(y.b,aV({direction:"vertical"},{children:[ee(e,t),Object(o.jsx)(Mr,{value:n,readonly:!0},void 0),Object(o.jsx)(hs,{onUploaded:$,onRemoved:Z,readonly:!0,disabled:!0,existingList:r,style:{width:300},text:"Add supporting documents"},void 0)]}),void 0)}),void 0)},ne=function(e,t){var n;if(e==c)return Object(o.jsx)(Ek.Text,aV({style:{fontSize:8}},{children:void 0==t?"":null===(n=d.at(t))||void 0===n?void 0:n.display}),void 0)},ie=function(t,n,r){var i=r.replaceAll(new RegExp("ptpx","g"),"px").replaceAll(new RegExp("font-size:?[0-9]{1,2}px","g"),"font-size:8px").replaceAll(new RegExp("font-size:?[0-9]{1,2}.[0-9]{1,2}px","g"),"font-size:8px").replaceAll(new RegExp("font-family:","g"),"");
1return Object(o.jsxs)(Ek.View,aV({style:{border:"1pt solid #f0f0f0",marginBottom:10}},{children:[Object(o.jsx)(Ek.Text,aV({style:{fontSize:10,border:"1pt solid #f0f0f0",backgroundColor:"#f0f0f0",padding:5}},{children:t}),void 0),Object(o.jsx)(Ek.View,aV({style:{margin:10}},{children:Object(o.jsxs)(Ek.View,aV({style:{marginLeft:5,marginTop:2}},{children:[e.previewComponent?null:Object(o.jsxs)(Ek.View,{children:[ne(t,n),Object(o.jsx)(Ek.Text,aV({style:{paddingTop:"10pt",fontSize:10}},{children:"Comments"}),void 0)]},void 0),Object(o.jsx)(Rk.b,aV({style:{fontSize:8}},{children:i}),void 0)]}),void 0)}),void 0)]}),void 0)},oe=function(t){if(R.selfStudyReponseTypeId==CL.INSTRUCTOR)return Object(o.jsx)(mt.a,aV({},p().get(tG.rating),_t.getValidation(tG.rating+e.sectionIndex+t,g,I),{children:Object(o.jsx)(_p,{direction:"horizontal",options:null!==d&&void 0!==d?d:[],disabled:e.disable||e.readonly},void 0)}),void 0)};if(e.pdfView){var ae=(null!==(t=null===N||void 0===N?void 0:N.primaryText)&&void 0!==t?t:"").replaceAll(new RegExp("font-size:?[0-9]{1,2}px","g"),"font-size:10px").replaceAll(new RegExp("font-size:?[0-9]{1,2}.[0-9]{1,2}px","g"),"font-size:10px").replaceAll(new RegExp("font-family:","g"),"");return Object(o.jsx)(Ek.View,aV({style:{paddingBottom:"10pt"}},{children:Object(o.jsxs)(Ek.View,aV({style:{border:"1pt solid #f0f0f0",margin:10}},{children:[Object(o.jsx)(Ek.Text,aV({style:{fontSize:10,border:"1pt solid #f0f0f0",backgroundColor:"#f0f0f0",padding:5}},{children:H(N)}),void 0),Object(o.jsxs)(Ek.View,aV({style:{margin:10,paddingBottom:10}},{children:[Object(o.jsx)(Rk.b,aV({style:{fontSize:10}},{children:ae}),void 0),function(){var t;return R.selfStudyReponseTypeId!=CL.INSTRUCTOR||R.selfStudyReponseTypeId==CL.INSTRUCTOR&&e.pdfView?ie(c,null===q||void 0===q?void 0:q.rating,null!==(t=null===q||void 0===q?void 0:q.responseText)&&void 0!==t?t:""):Object(o.jsx)(Ek.Text,{},void 0)}(),function(){var t;if((R.selfStudyReponseTypeId==CL.DOE||R.selfStudyReponseTypeId==CL.RPP&&e.pdfView)&&Je.isAuthorized([gn.EDIT_RPP_RESPONSE,gn.VIEW_RPP_RESPONSE,gn.EDIT_DE_RESPONSE,gn.VIEW_DE_CONSULTANT_RESPONSE])||R.selfStudyResponseStatusTypeId==lk.REVISING||R.selfStudyResponseStatusTypeId==lk.REVISIONSNEEDED||R.selfStudyResponseStatusTypeId==lk.COMPLETE)return ie(l,null===Y||void 0===Y?void 0:Y.rating,null!==(t=null===Y||void 0===Y?void 0:Y.responseText)&&void 0!==t?t:"")}(),function(){var t,n;if(R.selfStudyReponseTypeId==CL.DOE&&e.pdfView&&Je.isAuthorized([gn.EDIT_DE_RESPONSE,gn.VIEW_DE_CONSULTANT_RESPONSE])||(null===(t=C.academicYear)||void 0===t?void 0:t.academicYearStatusTypeId)==TL.RELEASEDAPPROVALCOMMENTS)return ie(u,null===k||void 0===k?void 0:k.rating,null!==(n=null===k||void 0===k?void 0:k.responseText)&&void 0!==n?n:"")}(),e.previewComponent?Object(o.jsxs)(Ek.View,{children:[Object(o.jsx)(Ek.Text,aV({style:{paddingTop:"10pt",width:"60%",fontSize:8}},{children:null===(n=d.at(0))||void 0===n?void 0:n.display}),void 0),Object(o.jsx)(Ek.Text,aV({style:{width:"60%",fontSize:8}},{children:null===(r=d.at(1))||void 0===r?void 0:r.display}),void 0),Object(o.jsx)(Ek.Text,aV({style:{width:"60%",fontSize:8}},{children:null===(i=d.at(2))||void 0===i?void 0:i.display}),void 0),Object(o.jsx)(Ek.Text,aV({style:{width:"60%",fontSize:8}},{children:null===(s=d.at(3))||void 0===s?void 0:s.display}),void 0),Object(o.jsx)(Ek.Text,aV({style:{paddingTop:"10pt",fontSize:8}},{children:"Please provide additional supporting information to your response."}),void 0)]},void 0):null]}),void 0)]}),void 0)}),void 0)}return h?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsx)(Qn.a,aV({title:H(N),type:"inner"},{children:Object(o.jsxs)(y.b,aV({direction:"vertical",size:"small"},{children:[Object(o.jsx)(Mr,{readonly:!0,value:null===N||void 0===N?void 0:N.primaryText},void 0),function(){var t;return R.selfStudyReponseTypeId!=CL.INSTRUCTOR||R.selfStudyReponseTypeId==CL.INSTRUCTOR&&e.readonly?te(c,null===q||void 0===q?void 0:q.rating,null!==(t=null===q||void 0===q?void 0:q.responseText)&&void 0!==t?t:"",X()):Object(o.jsx)(o.Fragment,{},void 0)}(),function(){var t;if((R.selfStudyReponseTypeId==CL.DOE||R.selfStudyReponseTypeId==CL.RPP&&e.pdfView)&&Je.isAuthorized([gn.EDIT_RPP_RESPONSE,gn.VIEW_RPP_RESPONSE,gn.EDIT_DE_RESPONSE,gn.VIEW_DE_CONSULTANT_RESPONSE])||R.selfStudyResponseStatusTypeId==lk.REVISING||R.selfStudyResponseStatusTypeId==lk.REVISIONSNEEDED||R.selfStudyResponseStatusTypeId==lk.COMPLETE)return te(l,null===Y||void 0===Y?void 0:Y.rating,null!==(t=null===Y||void 0===Y?void 0:Y.responseText)&&void 0!==t?t:"",J())}(),function(){var t,n;if(R.selfStudyReponseTypeId==CL.DOE&&e.readonly&&Je.isAuthorized([gn.EDIT_DE_RESPONSE,gn.VIEW_DE_CONSULTANT_RESPONSE])||(null===(t=C.academicYear)||void 0===t?void 0:t.academicYearStatusTypeId)==TL.RELEASEDAPPROVALCOMMENTS)return te(u,null===k||void 0===k?void 0:k.rating,
1null!==(n=null===k||void 0===k?void 0:k.responseText)&&void 0!==n?n:"",K())}(),function(){var t=e.componentIndex,n=[];switch(R.selfStudyReponseTypeId){case CL.INSTRUCTOR:n=X();break;case CL.RPP:n=J();break;case CL.DOE:n=K()}return e.readonly?null:Object(o.jsxs)(O.Content,{children:[oe(t),Object(o.jsx)("label",{title:"richText",htmlFor:"richText"},void 0),Object(o.jsx)(mt.a,aV({},p().get(tG.responseText),_t.getValidation(tG.responseText+e.sectionIndex+t,g,I),{children:Object(o.jsx)(Mr,{id:"richText",editorId:"richText",readonly:!e.disable&&e.readonly},void 0)}),void 0),Object(o.jsx)(mt.a,aV({},p().get(tG.selfStudySectionComponentResponseResources),_t.getValidation(tG.selfStudySectionComponentResponseResources+t,g,I),{children:Object(o.jsx)(hs,{onUploaded:$,onRemoved:Z,disabled:e.disable||e.readonly,existingList:n,style:{width:300},text:"Add supporting documents"},void 0)}),void 0)]},void 0)}()]}),void 0)}),void 0)}));sV.displayName="SelfStudyRankingQuestion";var dV=sV,cV=n(1528),lV=n(403),uV=n.n(lV),pV=function(){return pV=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},pV.apply(this,arguments)},fV=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{d(r.next(e))}catch(t){o(t)}}function s(e){try{d(r.throw(e))}catch(t){o(t)}}function d(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}d((r=r.apply(e,t||[])).next())}))},hV=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},vV=a.forwardRef((function(e){var t=Object(a.useState)({}),n=t[0],r=t[1],i=Object(a.useState)({}),s=i[0],d=i[1],c=Object(a.useState)({}),l=c[0],u=c[1],p=Object(a.useState)(!1),f=p[0],h=p[1],v=Object(a.useState)(null),m=v[0],g=v[1],b=Object(a.useState)(null),y=b[0],O=b[1],j=Object(a.useState)({}),I=j[0],S=j[1],E=Object(a.useState)({}),R=E[0],_=E[1],T=Object(a.useState)(!0),C=T[0],x=T[1],A=Object(a.useState)(!1),P=A[0],N=A[1],w=Object(a.useState)(),D=w[0],q=w[1],F=Object(a.useState)(!1),M=F[0],Y=F[1],U=Object(a.useState)(!1),L=U[0],k=U[1],G=Object(a.useState)(!1),V=G[0],B=G[1],W=Object(a.useState)(!1)[1],z=Object(a.useState)([]),H=z[0],Q=z[1],K=Object(a.useState)({}),X=K[0],J=K[1],$=Object(a.useState)({}),Z=$[0],ee=$[1],te=Object(a.useState)({}),ne=te[0],ie=te[1];a.useEffect((function(){x(!0),de()}),[e.sectionIndex,e.sectionLoaded]),a.useEffect((function(){var e;y&&I&&(null===(e=null===y||void 0===y?void 0:y.selfStudySectionTemplates)||void 0===e||e.forEach((function(e){var t;return ae(e.order,e,null!==(t=e.selfStudySectionComponentTemplates)&&void 0!==t?t:[])})))}),[y,I]),a.useEffect((function(){var e=!0;Object.entries(R).forEach((function(t){return Object.entries(t[1]).forEach((function(t){!e||t[1]||(e=!1)}))})),e&&D&&L&&Y(!0),N(!1)}),[P]);a.useEffect((function(){fV(void 0,void 0,void 0,(function(){var t,n,r,i,o,a,s;return hV(this,(function(d){switch(d.label){case 0:return M?[4,D.toBlob()]:[3,2];case 1:t=d.sent(),uV()(t,e.fileName?e.fileName:e.academicYear+"_"+function(){switch(e.selfStudyResponseType){case CL.INSTRUCTOR:return"Instructor";case CL.RPP:return"RPP";case CL.DOE:return"DE"}}()+"_"+(null===(i=null===(r=null===(n=e.selfStudy)||void 0===n?void 0:n.secondaryProgram)||void 0===r?void 0:r.secondaryCipNumber)||void 0===i?void 0:i.description)+"_"+(null===(s=null===(a=null===(o=e.selfStudy)||void 0===o?void 0:o.secondaryProgram)||void 0===a?void 0:a.district)||void 0===s?void 0:s.name)+".pdf"),oe(),Y(!1),k(!1),d.label=2;case 2:return[2]}}
1))}))}),[M]);var oe=function(){var e=R;Object.entries(e).forEach((function(t){return Object.entries(t[1]).forEach((function(n){return e[t[0]][n[0]]=!1}))})),_(e),N(!0)},ae=function(e,t,n){var r=R;r[e]={},null===n||void 0===n||n.forEach((function(n){null!=n.selfStudySectionComponentTypeId&&(0==t.selfStudySectionTemplateSecondaryProgramScenarios.length||t.selfStudySectionTemplateSecondaryProgramScenarios.findIndex((function(e){return e==I.secondaryProgramScenarioId}))>-1)&&(0==n.selfStudySectionComponentScenarios.length||n.selfStudySectionComponentScenarios.findIndex((function(e){return e==I.secondaryProgramScenarioId}))>-1)&&(r[e][n.order]=!1)})),_(r),N(!0)},se=function(e,t,n){var r=R;r[e][t]=n,_(r),N(!0)},de=function(){var t;x(!0);var r=[];window.scrollTo(0,0),e.selfStudyResponseId&&e.selfStudyResponseId!=re.default.Empty()&&(s.id&&s.id!=re.default.Empty()||r.push(he()),n.id&&n.id!=re.default.Empty()||r.push(le(e.selfStudyResponseId)),H&&0!=H.length||r.push(ge()),(null===m||void 0===m?void 0:m.id)&&(null===m||void 0===m?void 0:m.id)!=re.default.Empty()||(r.push(me()),r.push(Pk.getSelfStudy(null!==(t=e.academicYear)&&void 0!==t?t:0).then((function(t){t.selfStudy?(O(t.selfStudy),B(!0)):O(Vk.create({academicYear:e.academicYear,selfStudySectionTemplates:[Gk.create({selfStudySectionScenarios:[],selfStudySectionTypeId:null,title:"",selfStudySectionComponentTemplates:[Lk.create({selfStudySectionComponentScenarios:[],selfStudySectionComponentTypeId:null,selfStudyResponseTemplateConsultantReviewQuestions:[Uk.create()]})]})]}))})))),l.id&&l.id!=re.default.Empty()||r.push(ve()),e.selfStudyId&&e.selfStudyId!=re.default.Empty()&&(r.push(ue()),r.push(pe()),r.push(fe())),Promise.all(r).then((function(){x(!1)})))},le=function(e){var t=wk({selfStudyResponseId:e});return lL.getSelfStudyByResponse(t).then((function(e){e.selfStudy&&r(e.selfStudy)})).catch((function(){W(!0)}))},ue=function(){var t=Dk({selfStudyId:e.selfStudyId,selfStudyResponseTypeId:CL.INSTRUCTOR});return Ck.getSelfStudyResponseByType(t).then((function(e){var t;e.selfStudyResponse&&J(null!==(t=e.selfStudyResponse)&&void 0!==t?t:wL.create())})).catch((function(){W(!0)}))},pe=function(){var t=Dk({selfStudyId:e.selfStudyId,selfStudyResponseTypeId:CL.RPP});return Ck.getSelfStudyResponseByType(t).then((function(e){var t;e.selfStudyResponse&&ee(null!==(t=e.selfStudyResponse)&&void 0!==t?t:wL.create())})).catch((function(){W(!0)}))},fe=function(){var t=Dk({selfStudyId:e.selfStudyId,selfStudyResponseTypeId:CL.DOE});return Ck.getSelfStudyResponseByType(t).then((function(e){var t;e.selfStudyResponse&&ie(null!==(t=e.selfStudyResponse)&&void 0!==t?t:wL.create())})).catch((function(){W(!0)}))},he=function(){var t=qk({id:e.selfStudyResponseId});return lL.getSelfStudyResponseLite(t).then((function(e){var t,n;if(e.selfStudyResponse){var r=e.selfStudyResponse.selfStudyResponseStatusTypeId!=lk.INPROGRESS&&e.selfStudyResponse.selfStudyResponseStatusTypeId!=lk.REVISING&&e.selfStudyResponse.selfStudyResponseStatusTypeId!=lk.REVISIONSNEEDED&&e.selfStudyResponse.selfStudyResponseStatusTypeId!=lk.PENDING;d(e.selfStudyResponse),h(r),function(e){var t=Fk({id:e});lL.getSelfStudyResponseProgramOverview(t).then((function(e){var t;e.selfStudyResponseProgramOverview&&S(null!==(t=null===e||void 0===e?void 0:e.selfStudyResponseProgramOverview)&&void 0!==t?t:Yk.create())}))}(null!==(n=null===(t=e.selfStudyResponse)||void 0===t?void 0:t.id)&&void 0!==n?n:re.default.Empty())}}))},ve=function(){var t,n=Mk({selfStudyResponseId:e.selfStudyResponseId,academicYear:null!==(t=e.academicYear)&&void 0!==t?t:0,selfStudySectionOrder:e.sectionIndex});return lL.getSelfStudySectionBySectionOrder(n).then((function(e){e.selfStudySection?u(e.selfStudySection):u({})})).catch((function(){W(!0)}))},me=function(){var t,n;return Pk.getSelfStudySectionTemplateBySectionOrder(null!==(t=e.academicYear)&&void 0!==t?t:0,null!==(n=e.sectionIndex)&&void 0!==n?n:0).then((function(e){e.selfStudySectionTemplate&&g(e.selfStudySectionTemplate)}))},ge=function(){return ce.getAll(kk.className).then((function(e){Q(e)})).catch((function(){W(!0)}))},be=function(e){var t,n,r,i=null!==(r=null===(n=null===(t=X.selfStudySectionResponses)||void 0===t?void 0:t.find((function(t){var n;return(null===(n=t.selfStudySectionTemplate)||void 0===n?void 0:n.order)==e})))||void 0===n?void 0:n.sectionComments)&&void 0!==r?r:"";if(s.selfStudyReponseTypeId!=CL.INSTRUCTOR||s.selfStudyReponseTypeId==CL.INSTRUCTOR)return je("District Comments",i)},ye=function(e){var t,n,r,i=null!==(r=null===(n=null===(t=Z.selfStudySectionResponses)||void 0===t?void 0:t.find((function(t){var n;return(null===(n=t.selfStudySectionTemplate)||void 0===n?void 0:n.order)==e})))||void 0===n?void 0:n.sectionComments)&&void 0!==r?r:"";if((s.selfStudyReponseTypeId==CL.DOE||s.selfStudyReponseTypeId==CL.RPP)&&Je.isAuthorized([gn.EDIT_RPP_RESPONSE,gn.VIEW_RPP_RESPONSE,gn.EDIT_DE_RESPONSE,gn.VIEW_DE_CONSULTANT_RESPONSE])||s.selfStudyResponseStatusTypeId==lk.REVISING||s.selfStudyResponseStatusTypeId==lk.REVISIONSNEEDED||s.selfStudyResponseStatusTypeId==lk.COMPLETE)return je("Regional Planning Partner Comments",i)},Oe=function(e){var t,r,i,o,a=null!==(i=null===(r=null===(t=ne.selfStudySectionResponses)||void 0===t?void 0:t.find((function(t){var n;return(null===(n=t.selfStudySectionTemplate)||void 0===n?void 0:n.order)==e})))||void 0===r?void 0:r.sectionComments)&&void 0!==i?i:"";if((null===(o=n.academicYear)||void 0===o?void 0:o.academicYearStatusTypeId)==TL.RELEASEDAPPROVALCOMMENTS||s.selfStudyReponseTypeId==CL.DOE&&Je.isAuthorized([gn.EDIT_DE_RESPONSE,gn.VIEW_DE_CONSULTANT_RESPONSE]))return je("DE Comments",a)},je=function(e,t){var n,r=(null!==(n=t.replaceAll(new RegExp("ptpx","g"),"px"))&&void 0!==n?n:"").replaceAll(new RegExp("font-size:?[0-9]{1,2}px","g"),"font-size:8px").replaceAll(new RegExp("font-size:?[0-9]{1,2}.[0-9]{1,2}px","g"),"font-size:8px").replaceAll(new RegExp("font-family:","g"),"");
1return Object(o.jsxs)(Ek.View,pV({style:{border:"1pt solid #f0f0f0",margin:10}},{children:[Object(o.jsx)(Ek.Text,pV({style:{fontSize:10,border:"1pt solid #f0f0f0",backgroundColor:"#f0f0f0",padding:5}},{children:e}),void 0),Object(o.jsx)(Rk.a,pV({style:{fontSize:8}},{children:r}),void 0)]}),void 0)},Ie=function(e,t){var n,r,i,o,a,s,d,c,l,u;if(-1!=t){var p=[];return(null===(o=null===(i=null===(r=(null!==(n=null===y||void 0===y?void 0:y.selfStudySectionTemplates)&&void 0!==n?n:[])[e])||void 0===r?void 0:r.selfStudySectionComponentTemplates)||void 0===i?void 0:i.find((function(e){return e.order==t})))||void 0===o?void 0:o.selfStudySectionComponentScenarios)&&(p=null!==(l=null===(c=null===(d=null===(s=(null!==(a=null===y||void 0===y?void 0:y.selfStudySectionTemplates)&&void 0!==a?a:[])[e])||void 0===s?void 0:s.selfStudySectionComponentTemplates)||void 0===d?void 0:d.find((function(e){return e.order==t})))||void 0===c?void 0:c.selfStudySectionComponentScenarios)&&void 0!==l?l:[]),!I.secondaryProgramScenarioId||0==(null!==(u=null===p||void 0===p?void 0:p.length)&&void 0!==u?u:0)||p&&p.findIndex((function(e){return e==I.secondaryProgramScenarioId}))>-1?Se(e,t):null}},Se=function(t,n){var r,i,a,d,c,l;switch(null===(d=(null!==(a=null===(i=null===(r=null===y||void 0===y?void 0:y.selfStudySectionTemplates)||void 0===r?void 0:r.at(t))||void 0===i?void 0:i.selfStudySectionComponentTemplates)&&void 0!==a?a:[]).at(n))||void 0===d?void 0:d.selfStudySectionComponentTypeId){case Nk.INSTRUCTIONS:return Object(o.jsx)(yG,{academicYear:e.academicYear,sectionIndex:t,componentIndex:n,pdfView:!0,renderComplete:se},void 0);case Nk.RANKINGQUESTION:return Object(o.jsx)(dV,{academicYear:e.academicYear,sectionIndex:t,selfStudyId:e.selfStudyId,selfStudyResponseId:e.selfStudyResponseId,componentIndex:n,readonly:e.readonly||f,pdfView:!0,renderComplete:se},void 0);case Nk.PREVIOUSGOALS:return Object(o.jsx)(qG,{selfStudyResponseId:e.selfStudyResponseId,academicYear:e.academicYear,sectionIndex:t,componentIndex:n,readonly:e.readonly||s.selfStudyReponseTypeId!=CL.INSTRUCTOR||f,pdfView:!0,renderComplete:se},void 0);case Nk.NEWGOALS:return Object(o.jsx)(AG,{selfStudyResponseId:e.selfStudyResponseId,academicYear:e.academicYear,sectionIndex:t,componentIndex:n,readonly:e.readonly||s.selfStudyReponseTypeId!=CL.INSTRUCTOR||f,pdfView:!0,renderComplete:se},void 0);case Nk.FREETEXTQUESTION:return Object(o.jsx)(mG,{academicYear:e.academicYear,selfStudyId:e.selfStudyId,selfStudyResponseId:e.selfStudyResponseId,sectionIndex:t,componentIndex:n,readonly:e.readonly||f,pdfView:!0,renderComplete:se},void 0);case Nk.PROGRAMOVERVIEW:return Object(o.jsx)(iV,{academicYear:null!==(c=e.academicYear)&&void 0!==c?c:0,selfStudyResponseId:e.selfStudyResponseId,readonly:e.readonly||f,componentIndex:n,sectionIndex:t,loading:C,pdfView:!0,renderComplete:se},void 0);case Nk.CONSULTANTREVIEW:return Object(o.jsx)(uG,{academicYear:null!==(l=e.academicYear)&&void 0!==l?l:0,selfStudyResponseId:e.selfStudyResponseId,selfStudyId:e.selfStudyId,sectionIndex:t,readonly:e.readonly||f,componentIndex:n,pdfView:!0,selfStudyResponseTypeId:s.selfStudyReponseTypeId,renderComplete:se},void 0)}},Ee=function(){var e;return Object(o.jsxs)(Ek.Page,pV({style:{padding:20}},{children:[Object(o.jsx)(Ek.View,pV({style:{margin:10}},{children:Object(o.jsxs)(Ek.Text,{children:[" ",Object(o.jsx)(Ek.Image,{src:"/IDOE-logo-grayscale.png",style:{width:"50px",height:"50px",paddingBottom:"10pt"}},void 0)," ","Iowa Department of Education"]},void 0)}),void 0),null===(e=null===y||void 0===y?void 0:y.selfStudySectionTemplates)||void 0===e?void 0:e.map((function(e,t){return function(e,t){var n,r,i,a,s,d,c,l,u,p,f,h,v=[];(null===(r=(null!==(n=null===y||void 0===y?void 0:y.selfStudySectionTemplates)&&void 0!==n?n:[])[t])||void 0===r?void 0:r.selfStudySectionTemplateSecondaryProgramScenarios)&&(v=null!==(s=null===(a=(null!==(i=null===y||void 0===y?void 0:y.selfStudySectionTemplates)&&void 0!==i?i:[])[t])||void 0===a?void 0:a.selfStudySectionTemplateSecondaryProgramScenarios)&&void 0!==s?s:[]);var g=null===e||void 0===e?void 0:e.map((function(e,n){return Ie(t,n)}
1));if(!I.secondaryProgramScenarioId||!v||0==(null===v||void 0===v?void 0:v.length)||v&&v.findIndex((function(e){return e==I.secondaryProgramScenarioId}))>-1)return Object(o.jsx)(Ek.View,pV({style:{paddingBottom:"10pt"}},{children:Object(o.jsxs)(Ek.View,pV({style:{border:"1pt solid #f0f0f0"}},{children:[Object(o.jsx)(Ek.Text,pV({style:{border:"1pt solid #f0f0f0",fontSize:12,backgroundColor:"#f0f0f0",padding:5}},{children:null===(c=(null!==(d=null===y||void 0===y?void 0:y.selfStudySectionTemplates)&&void 0!==d?d:[])[t])||void 0===c?void 0:c.title}),void 0),g,(null!==(f=null===(p=null===(u=null===(l=null===y||void 0===y?void 0:y.selfStudySectionTemplates)||void 0===l?void 0:l.at(t))||void 0===u?void 0:u.selfStudySectionComponentTemplates)||void 0===p?void 0:p.findIndex((function(e){var t;return e.selfStudySectionComponentTypeId!=Nk.INSTRUCTIONS&&(!I.secondaryProgramScenarioId||!e.selfStudySectionComponentScenarios||0==(null===(t=e.selfStudySectionComponentScenarios)||void 0===t?void 0:t.length)||e.selfStudySectionComponentScenarios&&e.selfStudySectionComponentScenarios.findIndex((function(e){return e==I.secondaryProgramScenarioId}))>-1)})))&&void 0!==f?f:-1)>-1&&-1==(null===(h=null===m||void 0===m?void 0:m.selfStudySectionComponentTemplates)||void 0===h?void 0:h.findIndex((function(e){return e.selfStudySectionComponentTypeId==Nk.CONSULTANTREVIEW})))?Object(o.jsxs)(Ek.View,{children:[be(t),ye(t),Oe(t)]},void 0):null]}),void 0)}),void 0)}(e.selfStudySectionComponentTemplates,t)}))]}),void 0)},Re=function(){return fV(void 0,void 0,void 0,(function(){var e,t;return hV(this,(function(n){switch(n.label){case 0:return k(!0),e=Object(o.jsx)(Ek.Document,pV({title:"Self Study Response Pdf",subject:"Self Study Response Pdf"},{children:Ee()}),void 0),[4,Object(Ek.pdf)(e)];case 1:return t=n.sent(),q(t),[2]}}))}))};return e.downloadText?Object(o.jsx)(rt.a,pV({type:"link",onClick:Re,loading:L||!V},{children:e.downloadText}),void 0):Object(o.jsx)(rt.a,{type:"link",onClick:Re,loading:L||!V||C,icon:Object(o.jsx)(cV.a,{},void 0)},void 0)}));vV.displayName="SelfStudyPdfDocument";var mV=vV,gV=function(){return gV=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},gV.apply(this,arguments)};var bV=function(e){var t,n,r,i,s,d,c,l,u,p,h,v,m,g,b,O,j,I,E,R,_=(new Map).set("user",{label:"Please Select a User",required:!0,name:"user"}),C=Object(a.useState)({}),A=C[0],P=C[1],N=Object(a.useState)(!1),w=N[0],D=N[1],q=Object(a.useState)(!1),F=q[0],M=q[1],Y=Object(a.useState)(!1),U=Y[0],L=Y[1],k=Object(a.useState)(!1),G=k[0],V=k[1],B=Object(a.useState)(!1),W=B[0],z=B[1],H=Object(a.useState)(0),Q=H[0],K=H[1],X=Object(a.useState)({})[0],J=Object(a.useState)(!1)[0],$=Object(a.useState)({}),Z=$[0],ee=$[1],te=a.useRef();Object(a.useEffect)((function(){var t=[];t.push(ne(e.selfStudyId)),Promise.all(t).then((function(){L(!1)}))}),[]);var ne=function(e){L(!0);var t=tk({id:e});return lL.getSelfStudyDetails(t).then((function(e){var t;e.selfStudy&&(P(null!==(t=null===e||void 0===e?void 0:e.selfStudy)&&void 0!==t?t:SL.create()),ie(e.selfStudy.academicYearId))})).catch((function(e){S.b.success(e.toString())}))},ie=function(e){L(!0);var t=Sk({academicYearId:e});return sL.getAcademicYear(t).then((function(e){var t;e&&ee(null!==(t=e.academicYear)&&void 0!==t?t:fk.create())})).finally((function(){L(!1)}))},oe=function(t){var n,r,i,o;T.push(x.generate(x.COMPLETE_SELF_STUDIES,{academicYearId:null!==(n=e.academicYear)&&void 0!==n?n:0,selfStudyResponseId:null!==(o=null===(i=null===(r=null===A||void 0===A?void 0:A.selfStudyResponses)||void 0===r?void 0:r.find((function(e){return e.selfStudyReponseTypeId==t})))||void 0===i?void 0:i.id)&&void 0!==o?o:re.default.Empty(),sectionIndex:0},{selfStudyResponseType:t,step:0}))},ae=function(e){K(e),e==CL.INSTRUCTOR?D(!0):e==CL.RPP?M(!0):e==CL.DOE&&z(!0)},se=function(){K(0),D(!1),M(!1),z(!1)},de=function(){var t,n=null===(t=te.current)||void 0===t?void 0:t.getFieldsValue();if(V(!0),void 0!=n.user&&null!=n.user){var r=pk({selfStudyId:A.id,userId:n.user.id,selfStudyResponseTypeId:Q});lL.saveResponseUser(r).then((function(t){(null===t||void 0===t?void 0:t.succeeded)?(S.b.success("User Added Successfully!"),se(),e.onUserAdd&&e.onUserAdd()):S.b.error("Error Adding User")})).catch((function(){S.b.error("Error Adding User")})).finally((function(){V(!1)}))}else S.b.error("Error Adding User")},ce=function(){var e;null===(e=te.current)||void 0===e||e.resetFields()},le=((null!==(n=null===(t=A.selfStudyResponses)||void 0===t?void 0:t.findIndex((function(e){return e.selfStudyResponseStatusTypeId!=lk.COMPLETE})))&&void 0!==n?n:-1)>-1||Je.isAuthorized([gn.VIEW_CURRENT_PROGRAM_STATUS,gn.SYSTEM_ADMIN]))&&Z.academicYearStatusTypeId!=TL.RELEASEDAPPROVALCOMMENTS&&Z.academicYearStatusTypeId!=TL.CLOSED,ue=null===(r=null===A||void 0===A?void 0:A.selfStudyResponses)||void 0===r?void 0:r.find((function(e){return e.selfStudyReponseTypeId==CL.INSTRUCTOR})),pe=null===(i=null===A||void 0===A?void 0:A.selfStudyResponses)||void 0===i?void 0:i.find((function(e){return e.selfStudyReponseTypeId==CL.RPP})),fe=null===(s=null===A||void 0===A?void 0:A.selfStudyResponses)||void 0===s?void 0:s.find((function(e){return e.selfStudyReponseTypeId==CL.DOE})),he=[lk.PENDINGAPPROVAL,lk.COMPLETE],ve=function(t,n){var r=Object(o.jsx)(Gt.a,{children:Object(o.jsx)(Gt.a.Item,gV({title:"Reopen Response",onClick:function(){var t;return function(t){var n=uk({selfStudyResponseId:t});return lL.reopenSelfStudyResponse(n).then((function(n){var r;n&&T.push(x.generate(x.COMPLETE_SELF_STUDIES,{academicYearId:null!==(r=e.academicYear)&&void 0!==r?r:0,selfStudyResponseId:null!==t&&void 0!==t?t:re.default.Empty(),sectionIndex:0},{selfStudyResponseType:t,step:0}))}
1)).catch((function(e){S.b.success(e.toString())}))}(null!==(t=null===n||void 0===n?void 0:n.id)&&void 0!==t?t:re.default.Empty())}},{children:"Reopen Response"}),void 0)},void 0);return n.selfStudyResponseStatusTypeId!=lk.COMPLETE?Object(o.jsx)(rt.a,gV({title:t,onClick:function(){return oe(n.selfStudyReponseTypeId)},type:"primary"},{children:t}),void 0):Object(o.jsx)(la.a.Button,gV({type:"primary",onClick:function(){return oe(n.selfStudyReponseTypeId)},overlay:r,icon:Object(o.jsx)(aa.a,{},void 0)},{children:t}),void 0)};return U?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(y.b,gV({direction:"vertical"},{children:Object(o.jsxs)(Kn.b,gV({bordered:!0,size:"small",layout:"vertical"},{children:[Object(o.jsx)(ws.a,gV({label:"Program"},{children:null===(d=null===A||void 0===A?void 0:A.secondaryProgram)||void 0===d?void 0:d.secondaryProgramId}),void 0),Object(o.jsx)(ws.a,gV({label:"District"},{children:null===(l=null===(c=null===A||void 0===A?void 0:A.secondaryProgram)||void 0===c?void 0:c.district)||void 0===l?void 0:l.name}),void 0),Object(o.jsx)(ws.a,gV({label:"RPP"},{children:null===(h=null===(p=null===(u=null===A||void 0===A?void 0:A.secondaryProgram)||void 0===u?void 0:u.district)||void 0===p?void 0:p.region)||void 0===h?void 0:h.name}),void 0),Object(o.jsx)(ws.a,gV({label:"District Status"},{children:null===(v=null===ue||void 0===ue?void 0:ue.selfStudyResponseStatusType)||void 0===v?void 0:v.name}),void 0),Object(o.jsx)(ws.a,gV({label:"RPP Status"},{children:null===(m=null===pe||void 0===pe?void 0:pe.selfStudyResponseStatusType)||void 0===m?void 0:m.name}),void 0),Object(o.jsx)(ws.a,gV({label:"DOE Status"},{children:null===(g=null===fe||void 0===fe?void 0:fe.selfStudyResponseStatusType)||void 0===g?void 0:g.name}),void 0),Object(o.jsx)(ws.a,gV({label:"District Responder"},{children:Object(o.jsxs)(y.b,gV({direction:"vertical"},{children:[Object(o.jsxs)(y.b,{children:[null!==(O=null===(b=null===ue||void 0===ue?void 0:ue.respondingUser)||void 0===b?void 0:b.display)&&void 0!==O?O:"Unassigned",function(){if(le&&Je.isAuthorized([gn.ASSIGN_DISTRICT_RESPONDER]))return Object(o.jsx)(rt.a,gV({title:"Add District User",onClick:function(){return ae(CL.INSTRUCTOR)},type:"link"},{children:Object(o.jsx)(ya.a,{},void 0)}),void 0)}()]},void 0),function(){var t,n,r,i,a,s,d,c,l,u,p,f,h,v,m,g,b,O,j,I,S,E,R,_,T,C,x;if(le||Je.isAuthorized([gn.EDIT_DISTRICT_RESPONSE,gn.SYSTEM_ADMIN]))if(ue&&null!=(null===ue||void 0===ue?void 0:ue.respondingUserId)&&ue.respondingUserId!=re.default.Empty()||Je.isAuthorized([gn.SYSTEM_ADMIN])){var P=he.findIndex((function(e){return e==(null===ue||void 0===ue?void 0:ue.selfStudyResponseStatusTypeId)}))>=0?"View Self-Study":(null===ue||void 0===ue?void 0:ue.selfStudyResponseStatusTypeId)==lk.INPROGRESS||(null===ue||void 0===ue?void 0:ue.selfStudyResponseStatusTypeId)==lk.REVISING?"Edit Self-Study":"Start Self-Study";if((null===(n=null===(t=null===A||void 0===A?void 0:A.secondaryProgram)||void 0===t?void 0:t.district)||void 0===n?void 0:n.districtApprovalUserId)&&(null===(i=null===(r=null===A||void 0===A?void 0:A.secondaryProgram)||void 0===r?void 0:r.district)||void 0===i?void 0:i.districtApprovalUserId)==(null===(a=Xe.Get())||void 0===a?void 0:a.userId)&&(null===ue||void 0===ue?void 0:ue.selfStudyResponseStatusTypeId)==lk.PENDINGAPPROVAL)return Object(o.jsxs)(y.b,{children:[Object(o.jsx)(rt.a,gV({title:P,onClick:function(){return oe(CL.INSTRUCTOR)},type:"primary"},{children:"Approve Self-Study"}),void 0),Object(o.jsx)(mV,{selfStudyResponseId:null!==(c=null===(d=null===(s=null===A||void 0===A?void 0:A.selfStudyResponses)||void 0===s?void 0:s.find((function(e){return e.selfStudyReponseTypeId==CL.INSTRUCTOR})))||void 0===d?void 0:d.id)&&void 0!==c?c:re.default.Empty(),selfStudyResponseType:CL.INSTRUCTOR,academicYear:e.academicYear,selfStudy:A,selfStudyId:null!==(l=A.id)&&void 0!==l?l:"",sectionIndex:0},void 0)]},void 0);if(Je.isAuthorized([gn.EDIT_DISTRICT_RESPONSE])&&(null===ue||void 0===ue?void 0:ue.respondingUserId)==(null===(u=Xe.Get())||void 0===u?void 0:u.userId)||Je.isAuthorized([gn.SYSTEM_ADMIN]))return Object(o.jsxs)(y.b,{children:[ve(P,null!==ue&&void 0!==ue?ue:wL.create()),Object(o.jsx)(mV,{selfStudyResponseId:null!==(h=null===(f=null===(p=null===A||void 0===A?void 0:A.selfStudyResponses)||void 0===p?void 0:p.find((function(e){return e.selfStudyReponseTypeId==CL.INSTRUCTOR})))||void 0===f?void 0:f.id)&&void 0!==h?h:re.default.Empty(),selfStudyResponseType:CL.INSTRUCTOR,academicYear:e.academicYear,selfStudy:A,selfStudyId:null!==(v=A.id)&&void 0!==v?v:"",sectionIndex:0},void 0)]},void 0);if(Je.isAuthorized([gn.VIEW_DISTRICT_RESPONSE,gn.SYSTEM_ADMIN]))return Object(o.jsxs)(y.b,{children:[Object(o.jsx)(rt.a,gV({title:P,onClick:function(){return oe(CL.INSTRUCTOR)},type:"primary"},{children:"View Response"}),void 0),Object(o.jsx)(mV,{selfStudyResponseId:null!==(b=null===(g=null===(m=null===A||void 0===A?void 0:A.selfStudyResponses)||void 0===m?void 0:m.find((function(e){return e.selfStudyReponseTypeId==CL.INSTRUCTOR})))||void 0===g?void 0:g.id)&&void 0!==b?b:re.default.Empty(),selfStudyResponseType:CL.INSTRUCTOR,academicYear:e.academicYear,selfStudy:A,selfStudyId:null!==(O=A.id)&&void 0!==O?O:"",sectionIndex:0},void 0)]},void 0)}else if((null===(I=null===(j=null===A||void 0===A?void 0:A.secondaryProgram)||void 0===j?void 0:j.district)||void 0===I?void 0:I.districtApprovalUserId)&&(null===(E=null===(S=null===A||void 0===A?void 0:A.secondaryProgram)||void 0===S?void 0:S.district)||void 0===E?void 0:E.districtApprovalUserId)==(null===(R=Xe.Get())||void 0===R?void 0:R.userId)&&(null===ue||void 0===ue?void 0:ue.selfStudyResponseStatusTypeId)==lk.PEND
1INGAPPROVAL)return Object(o.jsxs)(y.b,{children:[Object(o.jsx)(rt.a,gV({title:"Approve Response",onClick:function(){return oe(CL.INSTRUCTOR)},type:"primary"},{children:"Approve Response"}),void 0),Object(o.jsx)(mV,{selfStudyResponseId:null!==(C=null===(T=null===(_=null===A||void 0===A?void 0:A.selfStudyResponses)||void 0===_?void 0:_.find((function(e){return e.selfStudyReponseTypeId==CL.INSTRUCTOR})))||void 0===T?void 0:T.id)&&void 0!==C?C:re.default.Empty(),selfStudyResponseType:CL.INSTRUCTOR,academicYear:e.academicYear,selfStudy:A,selfStudyId:null!==(x=A.id)&&void 0!==x?x:"",sectionIndex:0},void 0)]},void 0)}()]}),void 0)}),void 0),Object(o.jsx)(ws.a,gV({label:"RPP Responder"},{children:Object(o.jsxs)(y.b,gV({direction:"vertical"},{children:[Object(o.jsxs)(y.b,{children:[null!==(I=null===(j=null===pe||void 0===pe?void 0:pe.respondingUser)||void 0===j?void 0:j.display)&&void 0!==I?I:"Unassigned",function(){if(le&&Je.isAuthorized([gn.ASSIGN_RPP_RESPONDER]))return Object(o.jsx)(rt.a,gV({title:"Add RPP Consultant",onClick:function(){return ae(CL.RPP)},type:"link"},{children:Object(o.jsx)(ya.a,{},void 0)}),void 0)}()]},void 0),function(){var t,n,r,i,a,s,d,c,l,u,p,f,h,v,m,g,b;if((le||Je.isAuthorized([gn.EDIT_RPP_RESPONSE,gn.SYSTEM_ADMIN]))&&((null===ue||void 0===ue?void 0:ue.selfStudyResponseStatusTypeId)==lk.COMPLETE&&pe&&null!=(null===pe||void 0===pe?void 0:pe.respondingUserId)&&pe.respondingUserId!=re.default.Empty()||Je.isAuthorized([gn.SYSTEM_ADMIN]))){var O=he.findIndex((function(e){return e==(null===pe||void 0===pe?void 0:pe.selfStudyResponseStatusTypeId)}))>=0?"View Self-Study Review":"Review Self-Study";if((null===(n=null===(t=null===A||void 0===A?void 0:A.secondaryProgram)||void 0===t?void 0:t.district)||void 0===n?void 0:n.districtApprovalUserId)&&(null===(i=null===(r=null===A||void 0===A?void 0:A.secondaryProgram)||void 0===r?void 0:r.district)||void 0===i?void 0:i.districtApprovalUserId)==(null===(a=Xe.Get())||void 0===a?void 0:a.userId)&&(null===pe||void 0===pe?void 0:pe.selfStudyResponseStatusTypeId)==lk.PENDINGAPPROVAL)return Object(o.jsxs)(y.b,{children:[Object(o.jsx)(rt.a,gV({title:O,onClick:function(){return oe(CL.RPP)},type:"primary"},{children:"Approve Response"}),void 0),Object(o.jsx)(mV,{selfStudyResponseId:null!==(c=null===(d=null===(s=null===A||void 0===A?void 0:A.selfStudyResponses)||void 0===s?void 0:s.find((function(e){return e.selfStudyReponseTypeId==CL.RPP})))||void 0===d?void 0:d.id)&&void 0!==c?c:re.default.Empty(),selfStudyResponseType:CL.RPP,academicYear:e.academicYear,selfStudy:A,selfStudyId:null!==(l=A.id)&&void 0!==l?l:"",sectionIndex:0},void 0)]},void 0);if(Je.isAuthorized([gn.EDIT_RPP_RESPONSE,gn.SYSTEM_ADMIN]))return Object(o.jsxs)(y.b,{children:[ve(O,null!==pe&&void 0!==pe?pe:wL.create()),Object(o.jsx)(mV,{selfStudyResponseId:null!==(f=null===(p=null===(u=null===A||void 0===A?void 0:A.selfStudyResponses)||void 0===u?void 0:u.find((function(e){return e.selfStudyReponseTypeId==CL.RPP})))||void 0===p?void 0:p.id)&&void 0!==f?f:re.default.Empty(),selfStudyResponseType:CL.RPP,academicYear:e.academicYear,selfStudy:A,selfStudyId:null!==(h=A.id)&&void 0!==h?h:"",sectionIndex:0},void 0)]},void 0);if(Je.isAuthorized([gn.VIEW_RPP_RESPONSE,gn.SYSTEM_ADMIN]))return Object(o.jsxs)(y.b,{children:[Object(o.jsx)(rt.a,gV({title:O,onClick:function(){return oe(CL.RPP)},type:"primary"},{children:"View Response"}),void 0),Object(o.jsx)(mV,{selfStudyResponseId:null!==(g=null===(m=null===(v=null===A||void 0===A?void 0:A.selfStudyResponses)||void 0===v?void 0:v.find((function(e){return e.selfStudyReponseTypeId==CL.RPP})))||void 0===m?void 0:m.id)&&void 0!==g?g:re.default.Empty(),selfStudyResponseType:CL.RPP,academicYear:e.academicYear,selfStudy:A,selfStudyId:null!==(b=A.id)&&void 0!==b?b:"",sectionIndex:0},void 0)]},void 0)}}()]}),void 0)}),void 0),Object(o.jsx)(ws.a,gV({label:"DOE Responder"},{children:Object(o.jsxs)(y.b,gV({direction:"vertical"},{children:[Object(o.jsxs)(y.b,{children:[null!==(R=null===(E=null===fe||void 0===fe?void 0:fe.respondingUser)||void 0===E?void 0:E.display)&&void 0!==R?R:"Unassigned",function(){if(le&&Je.isAuthorized([gn.ASSIGN_DE_CONSULTANT_RESPONDER]))return Object(o.jsx)(rt.a,gV({title:"Add IDOE Consultant",onClick:function(){return ae(CL.DOE)},type:"link"},{children:Object(o.jsx)(ya.a,{},void 0)}),void 0)}()]}
1,void 0),function(){var t,n,r,i,a,s,d,c,l,u,p,f,h,v,m,g,b;if((le||Je.isAuthorized([gn.EDIT_DE_RESPONSE,gn.SYSTEM_ADMIN]))&&((null===ue||void 0===ue?void 0:ue.selfStudyResponseStatusTypeId)==lk.COMPLETE&&fe&&null!=(null===fe||void 0===fe?void 0:fe.respondingUserId)&&fe.respondingUserId!=re.default.Empty()||Je.isAuthorized([gn.SYSTEM_ADMIN]))){var O=he.findIndex((function(e){return e==(null===fe||void 0===fe?void 0:fe.selfStudyResponseStatusTypeId)}))>=0?"View Self-Study Review":"Review Self-Study";if((null===(n=null===(t=null===A||void 0===A?void 0:A.secondaryProgram)||void 0===t?void 0:t.district)||void 0===n?void 0:n.districtApprovalUserId)&&(null===(i=null===(r=null===A||void 0===A?void 0:A.secondaryProgram)||void 0===r?void 0:r.district)||void 0===i?void 0:i.districtApprovalUserId)==(null===(a=Xe.Get())||void 0===a?void 0:a.userId)&&(null===fe||void 0===fe?void 0:fe.selfStudyResponseStatusTypeId)==lk.PENDINGAPPROVAL)return Object(o.jsxs)(y.b,{children:[Object(o.jsx)(rt.a,gV({title:O,onClick:function(){return oe(CL.DOE)},type:"primary"},{children:"Approve Response"}),void 0),Object(o.jsx)(mV,{selfStudyResponseId:null!==(c=null===(d=null===(s=null===A||void 0===A?void 0:A.selfStudyResponses)||void 0===s?void 0:s.find((function(e){return e.selfStudyReponseTypeId==CL.DOE})))||void 0===d?void 0:d.id)&&void 0!==c?c:re.default.Empty(),selfStudyResponseType:CL.DOE,academicYear:e.academicYear,selfStudy:A,selfStudyId:null!==(l=A.id)&&void 0!==l?l:"",sectionIndex:0},void 0)]},void 0);if(Je.isAuthorized([gn.EDIT_DE_RESPONSE,gn.SYSTEM_ADMIN]))return Object(o.jsxs)(y.b,{children:[ve(O,null!==fe&&void 0!==fe?fe:wL.create()),Object(o.jsx)(mV,{selfStudyResponseId:null!==(f=null===(p=null===(u=null===A||void 0===A?void 0:A.selfStudyResponses)||void 0===u?void 0:u.find((function(e){return e.selfStudyReponseTypeId==CL.DOE})))||void 0===p?void 0:p.id)&&void 0!==f?f:re.default.Empty(),selfStudyResponseType:CL.DOE,academicYear:e.academicYear,selfStudy:A,selfStudyId:null!==(h=A.id)&&void 0!==h?h:"",sectionIndex:0},void 0)]},void 0);if(Je.isAuthorized([gn.VIEW_DE_CONSULTANT_RESPONSE,gn.SYSTEM_ADMIN]))return Object(o.jsxs)(y.b,{children:[Object(o.jsx)(rt.a,gV({title:O,onClick:function(){return oe(CL.DOE)},type:"primary"},{children:"View Response"}),void 0),Object(o.jsx)(mV,{selfStudyResponseId:null!==(g=null===(m=null===(v=null===A||void 0===A?void 0:A.selfStudyResponses)||void 0===v?void 0:v.find((function(e){return e.selfStudyReponseTypeId==CL.DOE})))||void 0===m?void 0:m.id)&&void 0!==g?g:re.default.Empty(),selfStudyResponseType:CL.DOE,academicYear:e.academicYear,selfStudy:A,selfStudyId:null!==(b=A.id)&&void 0!==b?b:"",sectionIndex:0},void 0)]},void 0)}}()]}),void 0)}),void 0)]}),void 0)}),void 0),function(){var t,n,r;return Object(o.jsx)(f.a,gV({visible:w,title:"Assign District Responder",onOk:de,onCancel:se,footer:[Object(o.jsx)(rt.a,gV({type:"link",onClick:ce},{children:"Clear Selected"}),"clear"),Object(o.jsx)(rt.a,gV({loading:G,onClick:se},{children:"Cancel"}),"back"),Object(o.jsx)(rt.a,gV({loading:G,type:"primary",onClick:de},{children:"Assign User"}),"submit")]},{children:Object(o.jsx)(Ci.a,gV({ref:te,layout:"vertical",requiredMark:!0},{children:Object(o.jsx)(Ci.a.Item,gV({},_.get("user"),_t.getValidation("user",X,J),{children:Object(o.jsx)(mk,{districtIdentifier:null!==(r=null===(n=null===(t=null===A||void 0===A?void 0:A.secondaryProgram)||void 0===t?void 0:t.district)||void 0===n?void 0:n.districtId)&&void 0!==r?r:0,academicYear:e.academicYear},void 0)}),void 0)}),void 0)}),void 0)}(),function(){var e,t,n;return Object(o.jsx)(f.a,gV({visible:F,title:"Assign RPP Responder",onOk:de,onCancel:se,footer:[Object(o.jsx)(rt.a,gV({type:"link",onClick:ce},{children:"Clear Selected"}),"clear"),Object(o.jsx)(rt.a,gV({onClick:se},{children:"Cancel"}),"back"),Object(o.jsx)(rt.a,gV({type:"primary",onClick:de},{children:"Assign User"}),"submit")]},{children:Object(o.jsx)(Ci.a,gV({ref:te,layout:"vertical",requiredMark:!0},{children:Object(o.jsx)(Ci.a.Item,gV({},_.get("user"),_t.getValidation("user",X,J),{children:Object(o.jsx)(Ik,{rppId:null!==(n=null===(t=null===(e=null===A||void 0===A?void 0:A.secondaryProgram)||void 0===e?void 0:e.district)||void 0===t?void 0:t.regi
1onIdentifier)&&void 0!==n?n:0},void 0)}),void 0)}),void 0)}),void 0)}(),function(){var e,t;return Object(o.jsx)(f.a,gV({visible:W,title:"Assign IDOE Consultant Responder",onOk:de,onCancel:se,footer:[Object(o.jsx)(rt.a,gV({type:"link",onClick:ce},{children:"Clear Selected"}),"clear"),Object(o.jsx)(rt.a,gV({onClick:se},{children:"Cancel"}),"back"),Object(o.jsx)(rt.a,gV({type:"primary",onClick:de},{children:"Assign User"}),"submit")]},{children:Object(o.jsx)(Ci.a,gV({ref:te,layout:"vertical",requiredMark:!0},{children:Object(o.jsx)(Ci.a.Item,gV({},_.get("user"),_t.getValidation("user",X,J),{children:Object(o.jsx)(yk,{serviceAreaIdentifier:null===(t=null===(e=A.secondaryProgram)||void 0===e?void 0:e.secondaryCipNumber)||void 0===t?void 0:t.serviceAreaIdentifier},void 0)}),void 0)}),void 0)}),void 0)}()]},void 0)},yV=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),OV=function(){return OV=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},OV.apply(this,arguments)},jV=function(e){function t(t){var n=e.call(this,t)||this;return n.loadAcademicYear=function(e){n.setState({loading:!0});var t=Sk({academicYearId:e});return sL.getAcademicYear(t).then((function(e){var t;e&&n.setState({academicYear:null!==(t=e.academicYear)&&void 0!==t?t:fk.create()})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})})).finally((function(){n.setState({loading:!1})}))},n.loadSelfStudy=function(e){n.setState({loading:!0});var t=tk({id:e});return lL.getSelfStudyDetails(t).then((function(e){e.selfStudy&&(n.setState({selfStudy:e.selfStudy,academicYearId:e.selfStudy.academicYearId}),n.loadAcademicYear(e.selfStudy.academicYearId))})).catch((function(e){S.b.success(e.toString()),n.setState({error:!0})}))},n.onAddUserSubmit=function(){var e=[];e.push(n.loadSelfStudy(n.state.id)),Promise.all(e).then((function(){n.setState({loading:!1})}))},n.goToListing=function(){T.goBack()},n.goToReview=function(){var e,t;T.push(x.generate(x.SELF_STUDIES_DISPLAY,{id:null!==(t=null===(e=n.state.selfStudy)||void 0===e?void 0:e.id)&&void 0!==t?t:re.default.Empty(),sectionIndex:0}))},n.state={id:re.default.Empty(),academicYearId:0,programsForReview:!1,selfStudy:SL.create(),districtId:re.default.Empty(),academicYear:fk.create()},n}return yV(t,e),t.prototype.componentDidMount=function(){var e=this,t=Hr.getPathPart(this.props.match,"id"),n=Hr.getParameter("academicYearId"),r=Hr.getParameter("programsForReview"),i=Hr.getParameter("districtId");this.setState({academicYearId:Number.parseInt(n),id:t,loading:!0,programsForReview:"true"==r,districtId:i});var o=[];o.push(this.loadSelfStudy(t)),Promise.all(o).then((function(){e.setState({loading:!1})}))},t.prototype.render=function(){var e,t,n,r,i,a,s,d,c,l,u,p,f,h,v,m,g;if(this.state.loading)return Object(o.jsx)(pt.a,{active:!0},void 0);var b=null!==(r=null===(n=null===(t=null===(e=this.state.selfStudy)||void 0===e?void 0:e.secondaryProgram)||void 0===t?void 0:t.secondaryCipNumber)||void 0===n?void 0:n.description)&&void 0!==r?r:"...";return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:b,subTitle:null===(s=null===(a=null===(i=this.state.selfStudy)||void 0===i?void 0:i.secondaryProgram)||void 0===a?void 0:a.district)||void 0===s?void 0:s.name,onBack:this.goToListing,breadcrumbs:this.state.programsForReview?Xn.selfStudyDisplayPageFromProgramForReview(null!==(d=this.state.selfStudy.id)&&void 0!==d?d:re.default.Empty(),this.state.academicYearId,null!==b&&void 0!==b?b:"..."):this.state.districtId==re.default.Empty()||""==this.state.districtId?Xn.selfStudyDisplayPage(null!==(c=this.state.selfStudy.id)&&void 0!==c?c:re.default.Empty(),this.state.academicYearId,null!==b&&void 0!==b?b:"..."):Xn.selfStudyDetailFromDistrict(b.toString(),this.state.id,this.state.academicYearId,null!==(f=null===(p=null===(u=null===(l=this.state.selfStudy)||void 0===l?void 0:l.secondaryProgram)||void 0===u?void 0:u.district)||void 0===p?void 0:p.name)&&void 0!==f?f:"",null!==(g=null===(m=null===(v=null===(h=this.state.selfStudy)||void 0===h?void 0:h.secondaryProgram)||void 0===v?void 0:v.district)||void 0===m?void 0:m.id)&&void 0!==g?g:re.default.Empty())},void 0),this.renderDetailsCard()]},void 0)},t.prototype.renderDetailsCard=function(){var e;return Object(o.jsx)(Qn.a,OV({title:"Details"},{children:Object(o.jsx)(bV,{selfStudyId:null!==(e=this.state.selfStudy.id
1)&&void 0!==e?e:re.default.Empty(),isEditing:this.state.isEditing,isNew:this.state.isNew,academicYear:this.state.academicYearId,onUserAdd:this.onAddUserSubmit},void 0)}),void 0)},t}(a.Component),IV=Object(u.i)(jV),SV=function(e){return Object.assign({selfStudyResponseId:"00000000-0000-0000-0000-000000000000",workItemKey:""},e)},EV=function(e){return Object.assign({academicYear:0,programStatusTypeId:0,deniedApproval:null,selfStudySectionResponse:null,selfStudyResponse:null,saveAndContinue:!1,submit:!1},e)},RV=function(e){return Object.assign({selfStudyResponseId:"00000000-0000-0000-0000-000000000000",selfStudyId:"00000000-0000-0000-0000-000000000000",secondaryProgramStatusTypeId:null},e)},_V=function(e){return Object.assign({academicYear:0,selfStudyResponseId:"00000000-0000-0000-0000-000000000000",sectionTemplateIndex:0,componentTemplateIndex:0,responseTypeId:0,file:null},e)},TV="file",CV=function(e){return Object.assign({azureBlobFileId:"00000000-0000-0000-0000-000000000000",academicYear:0,selfStudyResponseId:"00000000-0000-0000-0000-000000000000",sectionTemplateIndex:0,componentTemplateIndex:0,responseTypeId:0},e)},xV=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),AV=function(){return AV=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},AV.apply(this,arguments)},PV=function(e){function t(t){var n=e.call(this,t)||this;return n.state={},n}return xV(t,e),t.prototype.render=function(){var e,t=this.props.htmlType?this.props.htmlType:"submit",n=this.props.type?this.props.type:"primary";return Object(o.jsx)(rt.a,AV({},this.props,{htmlType:t,type:n,icon:Object(o.jsx)(is.a,{},void 0),loading:this.props.submitting||this.props.loading},{children:null!==(e=this.props.title)&&void 0!==e?e:"Next"}),void 0)},t}(a.Component),NV=function(){return NV=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},NV.apply(this,arguments)},wV=a.forwardRef((function(e){var t=a.useRef(),n=a.useRef(),r=Object(a.useState)({}),i=r[0],s=r[1],d=Object(a.useState)({}),c=d[0],l=d[1],u=Object(a.useState)({}),p=u[0],h=u[1],v=Object(a.useState)(!1),m=v[0],g=v[1],b=Object(a.useState)(null),O=b[0],j=b[1],I=Object(a.useState)({}),E=I[0],R=I[1],_=Object(a.useState)(!0),C=_[0],A=_[1],P=Object(a.useState)(!1),N=P[0],w=P[1],D=Object(a.useState)(!1)[1],q=Object(a.useState)({}),F=q[0],M=q[1],Y=Object(a.useState)(!1),U=Y[0],L=Y[1],k=Object(a.useState)(!1),G=k[0],V=k[1],B=Object(a.useState)(!1),W=B[0],z=B[1],H=Object(a.useState)([]),Q=H[0],K=H[1],X=Object(a.useState)({}),J=X[0],$=X[1],Z=Object(a.useState)({}),ee=Z[0],te=Z[1],ne=Object(a.useState)({}),ie=ne[0],oe=ne[1],ae=Object(a.useState)(!1),se=ae[0],de=ae[1];a.useEffect((function(){A(!0),le()}),[e.sectionIndex,e.sectionLoaded]);var le=function(){A(!0);var t=[];window.scrollTo(0,0),e.selfStudyResponseId&&e.selfStudyResponseId!=re.default.Empty()&&e.sectionLoaded&&(c.id&&c.id!=re.default.Empty()||t.push(me()),i.id&&i.id!=re.default.Empty()||t.push(pe(e.selfStudyResponseId)),Q&&0!=Q.length||t.push(ye()),(null===O||void 0===O?void 0:O.id)&&(null===O||void 0===O?void 0:O.id)!=re.default.Empty()||t.push(be()),p.id&&p.id!=re.default.Empty()||t.push(ge()),e.selfStudyId&&e.selfStudyId!=re.default.Empty()&&(t.push(fe()),t.push(he()),t.push(ve())),Promise.all(t).then((function(){A(!1),ue()})))},ue=function(){var e;w(!0),null===(e=t.current)||void 0===e||e.resetFields()},pe=function(e){var t=wk({selfStudyResponseId:e});return lL.getSelfStudyByResponse(t).then((function(e){e.selfStudy&&s(e.selfStudy)})).catch((function(){D(!0)}))},fe=function(){var t=Dk({selfStudyId:e.selfStudyId,selfStudyResponseTypeId:CL.INSTRUCTOR});return Ck.getSelfStudyResponseByType(t).then((function(e){var t;e.selfStudyResponse&&$(null!==(t=e.selfStudyResponse)&&void 0!==t?t:wL.create())})).catch((function(){D(!0)}))},he=function(){var t=Dk({selfStudyId:e.selfStudyId,selfStudyResponseTypeId:CL.RPP});return Ck.getSelfStudyResponseByType(t).then((function(e){var t;e.selfStudyResponse&&te(null!==(t=e.selfStudyResponse)&&void 0!==t?t:wL.create())})).catch((function(){D(!0)}))},ve=function(){var t=Dk({selfStudyId:e.selfStudyId,selfStudyResponseTypeId:CL.DOE});return Ck.getSelfStudyResponseByType(t).then((function(e){var t;e.selfStudyResponse&&oe(null!==(t=e.selfStudyResponse)&&void 0!==t?t:wL.create())})).catch((function(){D(!0)}))},me=function(){var t=qk({id:e.selfStudyResponseId});return lL.getSelfStudyResponseLite(t).then((function(t){var n,r;if(t.selfStudyResponse){var i=t.selfStudyResponse.selfStudyResponseStatusTypeId!=lk.INPROGRESS&&t.selfStudyResponse.selfStudyResponseStatusTypeId!=lk.REVISING&&t.selfStudyResponse.selfStudyResponseStatusTypeId!=lk.REVISIONSNEEDED&&t.selfStudyResponse.selfStudyResponseStatusTypeId!=lk.PEND
1ING;l(t.selfStudyResponse),de(!e.detailsPage&&0==e.sectionIndex&&t.selfStudyResponse.selfStudyReponseTypeId==CL.INSTRUCTOR&&t.selfStudyResponse.selfStudyResponseStatusTypeId==lk.REVISIONSNEEDED),g(i),function(e){var t=Fk({id:e});lL.getSelfStudyResponseProgramOverview(t).then((function(e){var t;e.selfStudyResponseProgramOverview&&R(null!==(t=null===e||void 0===e?void 0:e.selfStudyResponseProgramOverview)&&void 0!==t?t:Yk.create())}))}(null!==(r=null===(n=t.selfStudyResponse)||void 0===n?void 0:n.id)&&void 0!==r?r:re.default.Empty())}}))},ge=function(){var t,n=Mk({selfStudyResponseId:e.selfStudyResponseId,academicYear:null!==(t=e.academicYear)&&void 0!==t?t:0,selfStudySectionOrder:e.sectionIndex});return lL.getSelfStudySectionBySectionOrder(n).then((function(e){e.selfStudySection?h(e.selfStudySection):h({})})).catch((function(){D(!0)}))},be=function(){var t;return Pk.getSelfStudySectionTemplateBySectionOrder(null!==(t=e.academicYear)&&void 0!==t?t:0,e.sectionIndex).then((function(e){e.selfStudySectionTemplate&&j(e.selfStudySectionTemplate)}))},ye=function(){return ce.getAll(kk.className).then((function(e){K(e)})).catch((function(){D(!0)}))},Oe=function(){var t;T.push(x.generate(x.COMPLETE_SELF_STUDIES,{academicYearId:null!==(t=e.academicYear)&&void 0!==t?t:0,selfStudyResponseId:e.selfStudyResponseId,sectionIndex:e.sectionIndex-1},{districtAdmin:e.readonly,step:e.stepSection}))},je=function(e){var t,n=[],r=0,i=null===(t=null===e||void 0===e?void 0:e.selfStudySectionComponentResponses)||void 0===t?void 0:t.findIndex((function(e){var t,n;return(null===(n=null===(t=null===O||void 0===O?void 0:O.selfStudySectionComponentTemplates)||void 0===t?void 0:t.find((function(t){return t.id==e.selfStudySectionComponentTemplateId})))||void 0===n?void 0:n.selfStudySectionComponentTypeId)==Nk.NEWGOALS}));return(null===e||void 0===e?void 0:e.selfStudySectionComponentResponses[i])&&(n=e.selfStudySectionComponentResponses.map((function(e){var t,n,i;return IG.create(NV(NV({},e),{id:c&&(null===c||void 0===c?void 0:c.selfStudyResponseNewGoals)?null===(n=(null!==(t=null===c||void 0===c?void 0:c.selfStudyResponseNewGoals)&&void 0!==t?t:[])[r++])||void 0===n?void 0:n.id:re.default.Empty(),section:null===(i=e.section)||void 0===i?void 0:i.join(" / ")}))}))),n},Ie=function(e){var t,n=[],r=0,i=null===(t=null===e||void 0===e?void 0:e.selfStudySectionComponentResponses)||void 0===t?void 0:t.findIndex((function(e){var t,n;return(null===(n=null===(t=null===O||void 0===O?void 0:O.selfStudySectionComponentTemplates)||void 0===t?void 0:t.find((function(t){return t.id==e.selfStudySectionComponentTemplateId})))||void 0===n?void 0:n.selfStudySectionComponentTypeId)==Nk.PREVIOUSGOALS}));return(null===e||void 0===e?void 0:e.selfStudySectionComponentResponses[i])&&(n=e.selfStudySectionComponentResponses.map((function(e){var t,n;return NG.create(NV(NV({},e),{id:c&&(null===c||void 0===c?void 0:c.selfStudyResponsePreviousGoals)?null===(n=(null!==(t=null===c||void 0===c?void 0:c.selfStudyResponsePreviousGoals)&&void 0!==t?t:[])[r++])||void 0===n?void 0:n.id:re.default.Empty(),section:e.section}))}))),n},Se=function(e){var t,n,r=null===(t=null===e||void 0===e?void 0:e.selfStudySectionComponentResponses)||void 0===t?void 0:t.findIndex((function(e){var t,n;return(null===(n=null===(t=null===O||void 0===O?void 0:O.selfStudySectionComponentTemplates)||void 0===t?void 0:t.find((function(t){return t.id==e.selfStudySectionComponentTemplateId})))||void 0===n?void 0:n.selfStudySectionComponentTypeId)==Nk.PROGRAMOVERVIEW}));if(null===e||void 0===e?void 0:e.selfStudySectionComponentResponses[r]){var i=null===e||void 0===e?void 0:e.selfStudySectionComponentResponses[r];return Yk.create(NV(NV({},i),{id:null!==(n=E.id)&&void 0!==n?n:re.default.Empty()}))}return null},Ee=function(r,o){var a,s,d,l,u,f,v,m,g,b,y,j,I,E,R;L(!0);var _,C,P=(null===t||void 0===t?void 0:t.current).getFieldsValue(),N={};(null===P||void 0===P?void 0:P.selfStudySectionResponses)&&(N=P.selfStudySectionResponses[0]),_=null===(l=(null!==(a=null===N||void 0===N?void 0:N.selfStudySectionComponentResponses)&&void 0!==a?a:[])[null!==(d=null===(s=null===O||void 0===O?void 0:O.selfStudySectionComponentTemplates)||void 0===s?void 0:s.findIndex((function(e){return e.selfStudySectionComponentTypeId==Nk.CONSULTANTREVIEW}
1)))&&void 0!==d?d:0])||void 0===l?void 0:l.rppApproval,C=EV({saveAndContinue:r,submit:o,academicYear:e.academicYear,deniedApproval:_,programStatusTypeId:null!==(g=null===(m=(null!==(u=null===N||void 0===N?void 0:N.selfStudySectionComponentResponses)&&void 0!==u?u:[])[null!==(v=null===(f=null===O||void 0===O?void 0:O.selfStudySectionComponentTemplates)||void 0===f?void 0:f.findIndex((function(e){return e.selfStudySectionComponentTypeId==Nk.CONSULTANTREVIEW})))&&void 0!==v?v:0])||void 0===m?void 0:m.secondaryProgramStatusTypeId)&&void 0!==g?g:0,selfStudySectionResponse:fG.create(NV(NV({},N),{academicYearId:e.academicYear,selfStudyId:e.selfStudyResponseId,id:p.id,order:e.sectionIndex,selfStudyResponseId:null===c||void 0===c?void 0:c.id,selfStudySectionTemplateId:null===O||void 0===O?void 0:O.id})),selfStudyResponse:wL.create(NV(NV({},c),{selfStudyResponsePreviousGoals:Ie(N),selfStudyResponseNewGoals:je(N),selfStudyResponseProgramOverview:Se(N)}))});var w=0;for(var q in null===(y=null===(b=C.selfStudyResponse)||void 0===b?void 0:b.selfStudyResponsePreviousGoals)||void 0===y||y.forEach((function(e){e.order=w++})),null===(I=null===(j=C.selfStudyResponse)||void 0===j?void 0:j.selfStudyResponseNewGoals)||void 0===I||I.forEach((function(e){e.order=w++})),null===(E=C.selfStudySectionResponse)||void 0===E?void 0:E.selfStudySectionComponentResponses){(null===(R=C.selfStudySectionResponse)||void 0===R?void 0:R.selfStudySectionComponentResponses[q]).selfStudySectionComponentResponseResources=[]}lL.saveSelfStudySection(C).then((function(a){var s,d,l,u,p,f,v;if(z(!0),r||o)if(a.denyApproval&&o)S.b.success("Saved"),T.push(x.generate(x.SELF_STUDIES_DISPLAY,{id:null!==(s=c.selfStudyId)&&void 0!==s?s:0},{academicYearId:e.academicYear}));else{var m=(null!==(u=null===(l=null===(d=i.selfStudyTemplate)||void 0===d?void 0:d.selfStudySectionTemplates)||void 0===l?void 0:l.length)&&void 0!==u?u:0)-1;(null===a||void 0===a?void 0:a.succeeded)&&m>e.sectionIndex?(le(),S.b.success("Saved"),e.onSave&&e.onSave(e.sectionIndex+1,null)):(null===a||void 0===a?void 0:a.succeeded)&&m<=e.sectionIndex?(h(null!==(p=a.selfStudySection)&&void 0!==p?p:fG.create()),S.b.success("Saved"),M(null),D(!1),function(){var t;V(!0);var r=RV({selfStudyResponseId:null===c||void 0===c?void 0:c.id,selfStudyId:c.selfStudyId,secondaryProgramStatusTypeId:null===(t=null===n||void 0===n?void 0:n.current)||void 0===t?void 0:t.getFieldsValue().secondaryProgramStatusType});lL.submitSelfStudyInstructorResponse(r).then((function(t){var n;t.succeeded?(S.b.success("Submit Succeeded"),T.push(x.generate(x.SELF_STUDIES_DISPLAY,{id:null!==(n=c.selfStudyId)&&void 0!==n?n:0},{academicYearId:e.academicYear}))):S.b.error(t.errors[0])})).catch((function(){S.b.error("Submit Failed"),D(!0)})).finally((function(){V(!1)}))}()):(D(!(null===a||void 0===a?void 0:a.succeeded)),M(null===a||void 0===a?void 0:a.fieldErrors),e.onSave&&e.onSave(e.sectionIndex+1,a.fieldErrors),S.b.error("Response could not be saved"))}else h(null!==(f=a.selfStudySection)&&void 0!==f?f:fG.create()),null===(v=t.current)||void 0===v||v.setFieldsValue({selfStudySectionResponses:[C.selfStudyResponse]}),S.b.success("Saved"),e.onSave&&e.onSave(e.sectionIndex,null,!0),M(null),D(!1),ue()})).catch((function(){D(!0),S.b.error("Response could not be saved")})).finally((function(){A(!1),L(!1)}))},Re=function(){f.a.confirm({title:"Are you sure you want to submit the response?",okText:"Submit",onOk:function(){return Ee(!1,!0)}})},_e=function(){de(!1)},Te=function(){f.a.confirm({title:"Are you sure you want to approve the program?",okText:"Approve",onOk:function(){return function(){var t=SV({selfStudyResponseId:null===c||void 0===c?void 0:c.id,workItemKey:"sss_"+e.academicYear+"_"+i.id+"_"+c.selfStudyReponseTypeId});lL.approveSelfStudyResponseHandler(t).then((function(t){var n;t.succeeded?(S.b.success("Approval Succeeded"),T.push(x.generate(x.SELF_STUDIES_DISPLAY,{id:null!==(n=c.selfStudyId)&&void 0!==n?n:0},{academicYearId:e.academicYear}))):S.b.error("Approval Failed")})).catch((function(){S.b.error("Approval Failed"),D(!0)}))}()}})},Ce=function(){var t,n,r,i=null!==(r=null===(n=null===(t=J.selfStudySectionResponses)||void 0===t?void 0:t.find((function(t){var n;return(null===(n=t.selfStudySectionTemplate)||void 0===n?void 0:n.order)==e.sectionIndex})))||void 0===n?void 0:n.sectionComments)&&void 0!==r?r:"";if(c.selfStudyReponseTypeId!=CL.INSTRUCTOR||c.selfStudyReponseTypeId==CL.INSTRUCTOR&&(e.readonly||m))return Pe("District Comments",i)},xe=function(){var t,n,r,i=null!==(r=null===(n=null===(t=ee.selfStudySectionResponses)||void 0===t?void 0:t.find((function(t){var n;return(null===(n=t.selfStudySectionTemplate)||void 0===n?void 0:n.order)==e.sectionIndex})))||void 0===n?void 0:n.sectionComments)&&void 0!==r?r:"";if((c.selfStudyReponseTypeId==CL.DOE||c.selfStudyReponseTypeId==CL.RPP&&(e.readonly||m))&&Je.isAuthorized([gn.EDIT_RPP_RESPONSE,gn.VIEW_RPP_RESPONSE,gn.EDIT_DE_RESPONSE,gn.VIEW_DE_CONSULTANT_RESPONSE])||c.selfStudyResponseStatusTypeId==lk.REVISING||c.selfStudyResponseStatusTypeId==lk.REVISIONSNEEDED||c.selfStudyResponseStatusTypeId==lk.COMPLETE)return Pe("Regional Planning Partner Comments",i)},Ae=function(){var t,n,r,o,a=null!==(r=null===(n=null===(t=ie.selfStudySectionResponses)||void 0===t?void 0:t.find((function(t){var n;return(null===(n=t.selfStudySectionTemplate)||void 0===n?void 0:n.order)==e.sectionIndex})))||void 0===n?void 0:n.sectionComments)&&void 0!==r?r:"";if(c.selfStudyReponseTypeId==CL.DOE&&(e.readonly||m)&&Je.isAuthorized([gn.EDIT_DE_RESPONSE,gn.VIEW_DE_CONSULTANT_RESPONSE])||(null===(o=i.academicYear)||void 0===o?void 0:o.academicYearStatusTypeId)==TL.RELEASEDAPPROVALCOMMENTS)return Pe("DE Comments",a)},Pe=function(e,t){return Object(o.jsxs)(y.b,NV({direction:"vertical"},{children:[Object(o.jsx)(ud,{text:e},void 0),Object(o.jsx)(Mr,{readonly:!0,value:t},void 0)]}),void 0)},Ne=function(){var t,n;if(!e.readonly&&!m)return Object(o.jsx)(mt.a,NV({},(n=0,(new Map).set(fG.sectionComments,{name:[n,fG.sectionComments],label:"Additional Comments"})).get(fG.sectionComments),_t.getValidation(fG.sectionComments+(null===(t=null===p||void 0===p?void 0:p.selfStudySectionTemplate)||void 0===t?void 0:t.order),F,W),{children:Object(o.jsx)(Mr,{readonly:e.readonly||m},void 0)}),void 0)},we=function(t,n,r){L(!0);var i=_V({academicYear:e.academicYear,selfStudyResponseId:e.selfStudyResponseId,sectionTemplateIndex:n,componentTemplateIndex:t,responseTypeId:e.selfStudyResponseType}),o=Za.attachFileToModel("saveSelfStudySectionFile",i,TV,r);return lL.saveSelfStudySectionFile(o).then((function(){S.b.success("File Added")})).catch((function(){S.b.error("Error Adding File"),D(!0)})).finally((function(){L(!1)}))},De=function(t,n,r){L(!0);var i=CV({academicYear:e.academicYear,selfStudyResponseId:e.selfStudyResponseId,sectionTemplateIndex:n,componentTemplateIndex:t,responseTypeId:e.selfStudyResponseType,azureBlobFileId:null===r||void 0===r?void 0:r.uid});return lL.removeSelfStudySectionFile(i).then((function(){S.b.success("File Removed")})).catch((function(){S.b.error("Error Removing File"),D(!0)})).finally((function(){L(!1)}))},qe=function(){return Object(o.jsx)(Wk.a,NV({name:[0,fG.selfStudySectionComponentResponses]},{children:function(t){return Object(o.jsx)(y.b,NV({direction:"vertical"},{children:t.map((function(t,n){var r,i,a,s,d,l;if(t){var u=[];
1if((null===(i=null===(r=null===O||void 0===O?void 0:O.selfStudySectionComponentTemplates)||void 0===r?void 0:r.find((function(e){return e.order==n})))||void 0===i?void 0:i.selfStudySectionComponentScenarios)&&(u=null!==(d=null===(s=null===(a=null===O||void 0===O?void 0:O.selfStudySectionComponentTemplates)||void 0===a?void 0:a.find((function(e){return e.order==n})))||void 0===s?void 0:s.selfStudySectionComponentScenarios)&&void 0!==d?d:[]),!E.secondaryProgramScenarioId||0==(null!==(l=null===u||void 0===u?void 0:u.length)&&void 0!==l?l:0)||u&&u.findIndex((function(e){return e==E.secondaryProgramScenarioId}))>-1)return function(t){var n,r,i,a;switch(null===(r=(null!==(n=null===O||void 0===O?void 0:O.selfStudySectionComponentTemplates)&&void 0!==n?n:[])[t])||void 0===r?void 0:r.selfStudySectionComponentTypeId){case Nk.INSTRUCTIONS:return Object(o.jsx)(yG,{academicYear:e.academicYear,sectionIndex:e.sectionIndex,componentIndex:t,fieldErrors:F,submitted:W},void 0);case Nk.RANKINGQUESTION:return Object(o.jsx)(dV,{handleFileUpload:we,handleFileRemoved:De,academicYear:e.academicYear,sectionIndex:e.sectionIndex,selfStudyId:e.selfStudyId,selfStudyResponseId:e.selfStudyResponseId,componentIndex:t,readonly:e.readonly||m,fieldErrors:F,submitted:W},void 0);case Nk.PREVIOUSGOALS:return Object(o.jsx)(qG,{selfStudyResponseId:e.selfStudyResponseId,academicYear:e.academicYear,sectionIndex:e.sectionIndex,componentIndex:t,readonly:e.readonly||c.selfStudyReponseTypeId!=CL.INSTRUCTOR||m,fieldErrors:F,submitted:W},void 0);case Nk.NEWGOALS:return Object(o.jsx)(AG,{selfStudyResponseId:e.selfStudyResponseId,academicYear:e.academicYear,sectionIndex:e.sectionIndex,componentIndex:t,readonly:e.readonly||c.selfStudyReponseTypeId!=CL.INSTRUCTOR||m,fieldErrors:F,submitted:W},void 0);case Nk.FREETEXTQUESTION:return Object(o.jsx)(mG,{handleFileUpload:we,handleFileRemoved:De,academicYear:e.academicYear,selfStudyId:e.selfStudyId,selfStudyResponseId:e.selfStudyResponseId,sectionIndex:e.sectionIndex,componentIndex:t,readonly:e.readonly||m,fieldErrors:F,submitted:W},void 0);case Nk.PROGRAMOVERVIEW:return Object(o.jsx)(iV,{academicYear:null!==(i=e.academicYear)&&void 0!==i?i:0,selfStudyResponseId:e.selfStudyResponseId,readonly:e.readonly||m,componentIndex:t,sectionIndex:e.sectionIndex,fieldErrors:F,submitted:W,loading:C},void 0);case Nk.CONSULTANTREVIEW:if(c.selfStudyReponseTypeId!=CL.INSTRUCTOR)return Object(o.jsx)(uG,{handleFileUpload:we,handleFileRemoved:De,academicYear:null!==(a=e.academicYear)&&void 0!==a?a:0,selfStudyResponseId:e.selfStudyResponseId,selfStudyId:e.selfStudyId,sectionIndex:e.sectionIndex,readonly:e.readonly||m,componentIndex:t,fieldErrors:F,submitted:W},void 0)}}(n)}}))}),void 0)}}),void 0)};if(C)return Object(o.jsx)(pt.a,{active:!0},void 0);var Fe=NV(NV({},c),{selfStudySectionResponses:[p]});return Object(o.jsxs)(y.b,NV({size:"small",direction:"vertical"},{children:[Object(o.jsx)(f.a,NV({visible:se,title:"Submission Denied",onOk:_e,footer:[Object(o.jsx)(rt.a,NV({type:"primary",onClick:_e},{children:"Okay"}),"submit")]},{children:"Please review consultant comments and make changes before resubmitting."}),void 0),Object(o.jsx)(ht.a,NV({ref:t,layout:"vertical",initialValues:Fe,onValuesChange:function(){w(!0)},requiredMark:!0},{children:Object(o.jsxs)(y.b,NV({direction:"vertical"},{children:[function(){var e,t=[];(null===O||void 0===O?void 0:O.selfStudySectionTemplateSecondaryProgramScenarios)&&(t=null!==(e=null===O||void 0===O?void 0:O.selfStudySectionTemplateSecondaryProgramScenarios)&&void 0!==e?e:[]);var n=Object(o.jsx)(Wk.a,NV({name:wL.selfStudySectionResponses},{children:function(){var e,t,n;return Object(o.jsxs)(y.b,NV({direction:"vertical"},{children:[qe(),(null!==(t=null===(e=null===O||void 0===O?void 0:O.selfStudySectionComponentTemplates)||void 0===e?void 0:e.findIndex((function(e){var t;return e.selfStudySectionComponentTypeId!=Nk.INSTRUCTIONS&&(!E.secondaryProgramScenarioId||!e.selfStudySectionComponentScenarios||0==(null===(t=e.selfStudySectionComponentScenarios)||void 0===t?void 0:t.length)||e.selfStudySectionComponentScenarios&&e.selfStudySectionComponentScenarios.findIndex((function(e){return e==E.secondaryProgramScenarioId}))>-1)})))&&void 0!==t?t:-1)>-1&&-1==(null===(n=null===O||void 0===O?void 0:O.selfStudySectionComponentTemplates)||void 0===n?void 0:n.findIndex((function(e){return e.selfStudySectionComponentTypeId==Nk.CONSULTANTREVIEW})))?Object(o.jsxs)(o.Fragment,{children:[Ce(),xe(),Ae(),Ne()]},void 0):null]}),void 0)}}),void 0);if(!E.secondaryProgramScenarioId||!t||0==(null===t||void 0===t?void 0:t.length)||t&&t.findIndex((function(e){return e==E.secondaryProgramScenarioId}))>-1)return n}(),e.detailsPage?null:function(){var t,n,r,a,s,d,l;if(e.isEditing&&void 0!=C&&!C){var u=(null!==(r=null===(n=null===(t=i.selfStudyTemplate)||void 0===t?void 0:t.selfStudySectionTemplates)||void 0===n?void 0:n.length)&&void 0!==r?r:0)-1,p=Object(o.jsx)(rt.a,NV({type:"primary",icon:Object(o.jsx)(Ko.a,{},void 0),onClick:Te,disabled:!N,loading:U},{children:"Approve"}),void 0),f=Object(o.jsx)(rt.a,NV({type:"primary",icon:Object(o.jsx)(Ko.a,{},void 0),onClick:Re,disabled:!N,loading:G||U},{children:"Submit"}),void 0),h=Object(o.jsx)(rt.a,NV({icon:Object(o.jsx)(Er.a,{},void 0),onClick:function(){return Ee(!1)},disabled:!N,loading:U},{children:"Save"}),void 0),v=(null===c||void 0===c?void 0:c.selfStudyResponseStatusTypeId)==lk.COMPLETE;return!v&&(null===(a=Xe.Get())||void 0===a?void 0:a.userId)!=c.respondingUserId&&!Je.isAuthorized([gn.SYSTEM_ADMIN,gn.APPROVE_DISTRICT_RESPONSE])||(null===(s=Xe.Get())||void 0===s?void 0:s.userId)!=c.respondingUserId&&!Je.isAuthorized([gn.SYSTEM_ADMIN])?Object(o.jsxs)(y.b,NV({direction:"horizontal"},{children:[0==e.sectionIndex?null:Object(o.jsx)(rs,{onClick:Oe},void 0),u>e.sectionIndex&&((null===(d=Xe.Get())||void 0===d?void 0:d.userId)!=c.respondingUserId||e.readonly)?Object(o.jsx)(PV,{onClick:function(){e.onSave&&e.onSave(e.sectionIndex+1)}},void 0):null]}),void 0):v||!Je.isAuthorized([gn.EDIT_DISTRICT_RESPONSE,gn.EDIT_RPP_RESPONSE,gn.EDIT_DE_RESPONSE,gn.APPROVE_DISTRICT_RESPONSE])&&Je.isAuthorized([gn.VIEW_DISTRICT_RESPONSE,gn.VIEW_RPP_RESPONSE,gn.VIEW_DE_CONSULTANT_RESPONSE])?(null===(l=Xe.Get())||void 0===l?void 0:l.userId)==c.respondingUserId&&(null===c||void 0===c?void 0:c.selfStudyResponseStatusTypeId)!=lk.COMPLETE?Object(o.jsxs)(y.b,NV({direction:"horizontal"},{children:[0==e.sectionIndex?null:Object(o.jsx)(rs,{onClick:Oe},void 0),u<=e.sectionIndex?Je.isAuthorized([gn.APPROVE_DISTRICT_RESPONSE])?p:null:Object(o.jsx)(PV,{onClick:function(){e.onSave&&e.onSave(e.sectionIndex+1)}},void 0)]}),void 0):Object(o.jsxs)(y.b,NV({direction:"horizontal"},{children:[0==e.sectionIndex?null:Object(o.jsx)(rs,{onClick:Oe},void 0),u>e.sectionIndex&&v?Object(o.jsx)(PV,{onClick:function(){e.onSave&&e.onSave(e.sectionIndex+1)}},void 0):null]}),void 0):Object(o.jsx)(Ze,NV({validFeatureFlags:[gn.EDIT_PROGRAM_REVIEW,gn.EDIT_DISTRICT_RESPONSE,gn.EDIT_RPP_RESPONSE,gn.EDIT_DE_RESPONSE,gn.APPROVE_DISTRICT_RESPONSE]},{children:Object(o.jsxs)(y.b,NV({direction:"horizontal"},{children:[0==e.sectionIndex?null:Object(o.jsx)(rs,{onClick:Oe},void 0),u<=e.sectionIndex?e.readonly?Je.isAuthorized([gn.APPROVE_DISTRICT_RESPONSE])?p:null:Object(o.jsxs)(y.b,{children:[h,f]},void 0):e.readonly?Object(o.jsx)(PV,{onClick:function(){e.onSave&&e.onSave(e.sectionIndex+1)}},void 0):Object(o.jsxs)(y.b,{children:[h,Object(o.jsx)(ss,{onClick:function(){return Ee(!0)},disabled:!N,submitting:U},void 0)]},void 0)]}),void 0)}),void 0)}}()]}),void 0)}),void 0)]}),void 0)}));
1wV.displayName="CompleteSelfStudyForm";var DV=wV,qV=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),FV=function(){return FV=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},FV.apply(this,arguments)},MV=function(e){function t(t){var n=e.call(this,t)||this;return n.loadSelfStudy=function(e,t){n.setState({loading:!0});var r=tk({id:t});lL.getSelfStudyDetails(r).then((function(t){var r,i;t.selfStudy&&n.setState({selfStudy:t.selfStudy,selfStudyResponse:null!==(i=null===(r=t.selfStudy.selfStudyResponses)||void 0===r?void 0:r.find((function(t){return t.id==e})))&&void 0!==i?i:wL.create(),academicYear:t.selfStudy.academicYearId})})).catch((function(e){S.b.success(e.toString()),n.setState({error:!0})}))},n.goToListing=function(){n.state.programsForReview,T.goBack()},n.onFillOutSelfStudy=function(){var e,t,r,i,o;(null!==(t=null===(e=n.state.selfStudyResponse)||void 0===e?void 0:e.id)&&void 0!==t?t:re.default.Empty())!=re.default.Empty()&&T.push(x.generate(x.COMPLETE_SELF_STUDIES,{academicYearId:null!==(r=n.state.academicYear)&&void 0!==r?r:0,selfStudyResponseId:null!==(o=null===(i=n.state.selfStudyResponse)||void 0===i?void 0:i.id)&&void 0!==o?o:re.default.Empty(),sectionIndex:0},{selfStudyResponseType:n.state.selfStudyResponse.selfStudyReponseTypeId,step:0}))},n.renderProgramReview=function(e){var t,r;return Object(o.jsx)(Qn.a,FV({title:(null===(t=e.selfStudyResponseType)||void 0===t?void 0:t.name)+" Response"},{children:null===(r=e.selfStudySectionResponses)||void 0===r?void 0:r.map((function(t){var r,i,a,s;return Object(o.jsx)(o.Fragment,{children:Object(o.jsx)(DV,{academicYear:n.state.selfStudy.academicYearId,selfStudyResponseId:null!==(r=e.id)&&void 0!==r?r:re.default.Empty(),sectionIndex:null!==(a=null===(i=t.selfStudySectionTemplate)||void 0===i?void 0:i.order)&&void 0!==a?a:0,isEditing:!0,readonly:!0,detailsPage:!0,selfStudyResponseType:e.selfStudyReponseTypeId},null===(s=t.selfStudySectionTemplate)||void 0===s?void 0:s.order)},void 0)}))}),void 0)},n.state={id:re.default.Empty(),academicYear:0,programsForReview:!1,selfStudy:SL.create(),selfStudyResponse:wL.create(),activeTab:"details"},n}return qV(t,e),t.prototype.componentDidMount=function(){var e=this,t=Hr.getPathPart(this.props.match,"id"),n=Hr.getPathPart(this.props.match,"selfStudyId"),r=Hr.getParameter("academicYearId"),i=Hr.getParameter("programsForReview");this.setState({academicYear:Number.parseInt(r),id:t,loading:!0,programsForReview:"true"==i});var o=[];o.push(this.loadSelfStudy(t,n)),Promise.all(o).then((function(){e.setState({loading:!1})}))},t.prototype.render=function(){var e,t,n,r,i,a,s,d,c,l;if(this.state.loading||void 0==this.state.loading||void 0==this.state.selfStudy)return Object(o.jsx)(pt.a,{active:!0},void 0);var u=null!==(n=null===(t=null===(e=this.state.selfStudy)||void 0===e?void 0:e.secondaryProgram)||void 0===t?void 0:t.secondaryProgramId)&&void 0!==n?n:"...";return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:u,subTitle:null===(a=null===(i=null===(r=this.state.selfStudy)||void 0===r?void 0:r.secondaryProgram)||void 0===i?void 0:i.district)||void 0===a?void 0:a.name,onBack:this.goToListing,breadcrumbs:Xn.selfStudyDisplayPage(null!==(s=this.state.selfStudy.id)&&void 0!==s?s:re.default.Empty(),this.state.academicYear,null!==(l=null===(c=null===(d=this.state.selfStudy.secondaryProgram)||void 0===d?void 0:d.secondaryCipNumber)||void 0===c?void 0:c.description)&&void 0!==l?l:"...")},void 0),this.renderProgramReview(this.state.selfStudyResponse)]},void 0)},t}(a.Component),YV=Object(u.i)(MV),UV=function(){return UV=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},UV.apply(this,arguments)};var LV=function(e){var t,n,r=-1;if(e.selfStudySectionsTemplate&&(null===e||void 0===e?void 0:e.selfStudySectionsTemplate.length)>0){var i=e.fieldErrors;return Object(o.jsx)(Og,UV({current:e.currentStep,direction:"vertical"},{children:null!==(n=null===(t=null===e||void 0===e?void 0:e.selfStudySectionsTemplate)||void 0===t?void 0:t.map((function(t){var n;if(t.selfStudySectionTemplateSecondaryProgramScenarios&&(0==t.selfStudySectionTemplateSecondaryProgramScenarios.length||t.selfStudySectionTemplateSecondaryProgramScenarios.findIndex((function(t){var n;return t==(null!==(n=e.scenario)&&void 0!==n?n:0)}))>-1)){r++;var a=!!i&&(null!==(n=i["selfStudyResponseDTO"+r])&&void 0!==n&&n)?Object(o.jsxs)("span",{children:[Object(o.jsx)(yx.a,{color:"red"}
1,void 0)," ",null===t||void 0===t?void 0:t.title]},void 0):ei.shorten(t.title,40,!0);return Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{enabled:e.currentStep!=r,title:a,route:x.generate(x.COMPLETE_SELF_STUDIES,{academicYearId:e.academicYear,selfStudyResponseId:e.selfStudyResponseId,sectionIndex:t.order},{districtAdmin:e.districtAdmin,selfStudyResponseType:e.selfStudyResponseType,step:r})},t.title)},t.id)}})))&&void 0!==n?n:[]}),void 0)}return null},kV=function(){return kV=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},kV.apply(this,arguments)};var GV=function(e){var t=Object(o.jsx)(LV,{academicYear:e.academicYear,selfStudyResponseId:e.selfStudyResponseId,sectionIndex:e.sectionIndex,selfStudyResponse:e.selfStudyResponse,selfStudySections:e.selfStudySections,selfStudySectionsTemplate:e.selfStudySectionsTemplate,currentStep:e.currentStep,districtAdmin:e.districtAdmin,scenario:e.scenario,selfStudyResponseType:e.selfStudyResponseType,fieldErrors:e.fieldErrors},void 0),n=pg()(),r=Object(o.jsx)("div",{},void 0);return r=n.xxl||n.xl?Object(o.jsx)(m.a,{children:Object(o.jsx)(Qn.a,kV({title:"Steps"},{children:t}),void 0)},void 0):Object(o.jsx)(Qn.a,{children:t},void 0),Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:e.title,breadcrumbs:e.breadcrumbs,onBack:e.onBack,extra:e.renderRevokeResponse()},void 0),Object(o.jsxs)(b.a,kV({gutter:[16,16]},{children:[Object(o.jsx)(m.a,kV({},{xs:24,sm:24,md:24,lg:24,xl:6,xxl:6},{children:r}),void 0),Object(o.jsx)(m.a,kV({},{xs:24,sm:24,md:24,lg:24,xl:18,xxl:18},{children:Object(o.jsx)(b.a,kV({gutter:[16,16]},{children:Object(o.jsx)(m.a,kV({},{xs:24,sm:24,md:24,lg:24,xl:24,xxl:24},{children:e.children}),void 0)}),void 0)}),void 0)]}),void 0)]},void 0)},VV=function(e){return Object.assign({selfStudyResponseId:"00000000-0000-0000-0000-000000000000"},e)},BV=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),WV=function(){return WV=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},WV.apply(this,arguments)},zV=function(e){function t(t){var n=e.call(this,t)||this;return n._modalRef=a.createRef(),n.loadSelfStudyResponse=function(e){var t=qk({id:e});return lL.getSelfStudyResponseLite(t).then((function(e){e.selfStudyResponse&&n.setState({selfStudyResponse:e.selfStudyResponse,isNew:!1})})).catch((function(){n.setState({error:!0})}))},n.loadSelfStudy=function(e){var t=wk({selfStudyResponseId:e});return lL.getSelfStudyByResponse(t).then((function(e){var t;e.selfStudy&&n.setState({selfStudy:e.selfStudy,selfStudyResponseId:null!==(t=e.selfStudy.id)&&void 0!==t?t:re.default.Empty(),isNew:!1})})).catch((function(){n.setState({error:!0})}))},n.loadSelfStudySectionTemplates=function(e){return Pk.getSelfStudySectionTemplates(e).then((function(e){e.selfStudySectionTemplates&&n.setState({selfStudyTemplateSectionTemplates:e.selfStudySectionTemplates,isNew:!1})})).catch((function(){n.setState({error:!0})}))},n.loadExisting=function(e,t,r){var i=Mk({selfStudyResponseId:e,academicYear:null!==t&&void 0!==t?t:0,selfStudySectionOrder:r,selfStudyResponseTypeId:CL.INSTRUCTOR,allowNew:!0});return lL.getSelfStudySectionBySectionOrder(i).then((function(e){e.selfStudySection?(n.setState({selfStudySection:e.selfStudySection,isNew:!1,sectionLoaded:!0}),n.loadSelfStudySectionTemplate(t,r)):(n.setState({selfStudySection:{},isNew:!1}),n.loadSelfStudySectionTemplate(t,r),n.loadSelfStudySectionTemplates(t))}))},n.loadSelfStudySectionTemplate=function(e,t){return Pk.getSelfStudySectionTemplateBySectionOrder(e,t).then((function(e){e.selfStudySectionTemplate&&n.setState({selfStudySectionTemplate:e.selfStudySectionTemplate})}))},n.onBack=function(){T.goBack()},n.onSave=function(e,t,r){var i;if(r)n.setState({fieldErrors:t});else if(t)n.setState({fieldErrors:t});else{var o=n.nextSection(e),a=n.nextStep();T.push(x.generate(x.COMPLETE_SELF_STUDIES,{academicYearId:n.state.academicYear,selfStudyResponseId:null!==(i=n.state.selfStudyResponse.id)&&void 0!==i?i:re.default.Empty(),sectionIndex:o},{districtAdmin:n.state.districtAdmin,selfStudyResponseType:n.state.selfStudyResponseType,step:a}))}n.setState({fieldErrors:t})},n.nextSection=function(e){var t,r,i,o,a,s,d,c,l=null===(t=n.state.selfStudyTemplateSectionTemplates.find((function(t){return t.order==e})))||void 0===t?void 0:t.selfStudySectionTemplateSecondaryProgramScenarios,u=null===(r=n.state.selfStudy.selfStudyResponses)||void 0===r?void 0:r.find((function(e){return e.selfStudyReponseTypeId==CL.INSTRUCTOR}));if((null===u||void 0===u?void 0:u.selfStudyResponseProgramOverview)&&(null===(i=null===u||void 0===u?void 0:u.selfStudyResponseProgramOverview)||void 0===i?void 0:i.secondaryProgramScenarioId)){var p=null===(o=null===u||void 0===u?void 0:u.selfStudyResponseProgramOverview)||void 0===o?void 0:o.secondaryProgramScenarioId;return 0==(null!==(a=null===l||void 0===l?void 0:l.length)&&void 0!==a?a:-1)||(null!==(s=null===l||void 0===l?void 0:l.findIndex((function(e){return e==p})))&&void 0!==s?s:-1)>-1?e:null!==(c=null===(d=n.state.selfStudyTemplateSectionTemplates.find((function(t){var n;return((null!==(n=t.selfStudySectionTemplateSecondaryProgramScenarios.findIndex((function(e){return e==p})))&&void 0!==n?n:-1)>0||0==t.selfStudySectionTemplateSecondaryProgramScenarios.length)&&t.order>e})))||void 0===d?void 0:d.order)&&void 0!==c?c:0}return e},n.nextStep=function(){return Number.parseInt(Hr.getParameter("step"))+1},n.onRevokeClick=function(){var e=VV({selfStudyResponseId:n.state.selfStudyResponse.id});lL.revokeSelfStudyResponse(e).then((function(e){var t;e.succeeded?(S.b.success("Revoke Succeeded"),T.push(x.generate(x.SELF_STUDIES_DISPLAY,{id:null!==(t=n.state.selfStudyResponse.selfStudyId)&&void 0!==t?t:0},{academicYearId:n.state.academicYear}))):S.b.error(e.errors[0])})).catch((function(){S.b.error("Revoke Failed")}))},n.renderRevokeResponse=function(){var e,t,r,i,a,s=Number.parseInt(Hr.getPathPart(n.props.match,"academicYearId")),d=Hr.getPathPart(n.props.match,"selfStudyResponseId"),c=Number.parseInt(Hr.getParameter("selfStudyResponseType")),l=Object(o.jsxs)(Gt.a,{children:[(null===(t=null===(e=n.state.selfStudy.selfStudyResponses)||void 0===e?void 0:e.find((function(e){return e.selfStudyReponseTypeId==CL.DOE})))||void 0===t?void 0:t.selfStudyResponseStatusTypeId)==lk.PEND
1INGAPPROVAL||(null===(i=null===(r=n.state.selfStudy.selfStudyResponses)||void 0===r?void 0:r.find((function(e){return e.selfStudyReponseTypeId==CL.DOE})))||void 0===i?void 0:i.selfStudyResponseStatusTypeId)==lk.COMPLETE||n.state.selfStudyResponse.selfStudyResponseStatusTypeId!=lk.PENDINGAPPROVAL&&n.state.selfStudyResponse.selfStudyResponseStatusTypeId!=lk.COMPLETE?null:Object(o.jsx)(Gt.a.Item,WV({title:"Revoke Response",onClick:n.onRevokeClick},{children:"Revoke Response"}),void 0),Object(o.jsx)(Gt.a.Item,WV({title:"Download"},{children:Object(o.jsx)(mV,{selfStudyResponseType:c,selfStudyResponseId:d,academicYear:s,selfStudy:n.state.selfStudy,selfStudyId:null!==(a=n.state.selfStudy.id)&&void 0!==a?a:"",downloadText:"Download"},void 0)}),void 0)]},void 0);return Object(o.jsx)(la.a,WV({overlay:l},{children:Object(o.jsx)(rt.a,WV({size:"large",type:"link"},{children:Object(o.jsx)(aa.a,{},void 0)}),void 0)}),void 0)},n.contentWidth={xs:24,sm:24,md:24,lg:24,xl:18,xxl:18},n.state={loading:!1,academicYear:0,selfStudyResponseId:re.default.Empty(),selfStudy:SL.create(),selfStudySection:fG.create(),selfStudySectionTemplate:Gk.create(),sectionIndex:0,selfStudyTemplateSectionTemplates:[],districtAdmin:!1,selfStudyResponseType:0,selfStudyResponse:wL.create(),sectionLoaded:!1},n}return BV(t,e),t.prototype.componentDidMount=function(){var e=this,t=Number.parseInt(Hr.getPathPart(this.props.match,"academicYearId")),n=Hr.getPathPart(this.props.match,"selfStudyResponseId"),r=Number.parseInt(Hr.getPathPart(this.props.match,"sectionIndex")),i=Hr.getParameter("districtAdmin"),o=Number.parseInt(Hr.getParameter("selfStudyResponseType"));if(this.state.academicYear!=t){this.setState({academicYear:t,loading:!0,selfStudyResponseId:n,sectionIndex:r,districtAdmin:"true"==i,selfStudyResponseType:o,sectionLoaded:!1});var a=[];a.push(this.loadSelfStudyResponse(n)),a.push(this.loadSelfStudy(n)),a.push(this.loadExisting(n,t,r)),a.push(this.loadSelfStudySectionTemplates(t)),Promise.all(a).then((function(){e.setState({loading:!1})}))}},t.prototype.componentDidUpdate=function(){var e=this,t=Number.parseInt(Hr.getPathPart(this.props.match,"sectionIndex"));if(t!=this.state.sectionIndex){var n=Hr.getPathPart(this.props.match,"selfStudyResponseId"),r=Number.parseInt(Hr.getPathPart(this.props.match,"academicYearId")),i=Hr.getParameter("districtAdmin"),o=Number.parseInt(Hr.getParameter("selfStudyResponseType"));this.setState({sectionIndex:t,loading:!0,districtAdmin:"true"==i,selfStudyResponseType:o,sectionLoaded:!1});var a=[];a.push(this.loadExisting(n,r,t)),a.push(this.loadSelfStudy(n)),a.push(this.loadSelfStudySectionTemplates(r)),Promise.all(a).then((function(){e.setState({loading:!1})}))}},t.prototype.render=function(){var e,t,n,r,i,a,s,d,c,l,u,p,f,h,v,g,y,j,I,S,E,R,_,T,C,x,A,P,N,w,D,q=this,F=Number.parseInt(Hr.getPathPart(this.props.match,"academicYearId")),M=Hr.getPathPart(this.props.match,"selfStudyResponseId"),Y=Number.parseInt(Hr.getParameter("selfStudyResponseType")),U=Number.parseInt(Hr.getPathPart(this.props.match,"sectionIndex")),L=Number.parseInt(Hr.getParameter("step")),k=this.state.loading?"...":this.state.isNew?"Adding Program for Review":null!==(e=this.state.selfStudySectionTemplate.title)&&void 0!==e?e:"...",G=null===(r=null===(n=null===(t=this.state.selfStudy.selfStudyResponses)||void 0===t?void 0:t.find((function(e){return e.selfStudyReponseTypeId==CL.INSTRUCTOR})))||void 0===n?void 0:n.selfStudyResponseProgramOverview)||void 0===r?void 0:r.secondaryProgramScenarioId;if(this.state.loading||0==this.state.academicYear)return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Program "+(null===(a=null===(i=this.state.selfStudy)||void 0===i?void 0:i.secondaryProgram)||void 0===a?void 0:a.secondaryProgramId),breadcrumbs:Xn.completeSelfStudy(k,null!==(l=null===(c=null===(d=null===(s=this.state.selfStudy)||void 0===s?void 0:s.secondaryProgram)||void 0===d?void 0:d.secondaryCipNumber)||void 0===c?void 0:c.description)&&void 0!==l?l:"...",F,this.state.selfStudyResponseId,L),onBack:function(){return q.onBack()},extra:this.renderRevokeResponse()},void 0),Object(o.jsxs)(b.a,WV({gutter:[16,16]},{children:[Object(o.jsx)(m.a,{children:Object(o.jsx)(Qn.a,WV({title:"Steps"},{children:Object(o.jsx)(LV,{academicYear:F,selfStudyResponseId:M,sectionIndex:U,selfStudyResponse:this.state.selfStudyResponse,selfStudySections:null!==(f=null===(p=null===(u=this.state.selfStudy.selfStudyResponses)||void 0===u?void 0:u.find((function(e){return e.id==M})))||void 0===p?void 0:p.selfStudySectionResponses)&&void 0!==f?f:void 0,selfStudySectionsTemplate:null!==(h=this.state.selfStudyTemplateSectionTemplates)&&void 0!==h?h:void 0,currentStep:L,scenario:G,districtAdmin:this.state.districtAdmin,selfStudyResponseType:Y,fieldErrors:this.state.fieldErrors},void 0)}),void 0)},void 0),Object(o.jsx)(m.a,WV({},this.contentWidth,{children:Object(o.jsx)(Qn.a,WV({title:k},{children:Object(o.jsx)(pt.a,{active:!0},void 0)}),void 0)}),void 0)]}),void 0)]},void 0);var V=this.state.selfStudyResponse.selfStudyResponseStatusTypeId==lk.PEND
1INGAPPROVAL||this.state.selfStudyResponse.selfStudyResponseStatusTypeId==lk.COMPLETE||!Je.isAuthorized([gn.EDIT_DISTRICT_RESPONSE,gn.EDIT_RPP_RESPONSE,gn.EDIT_DE_RESPONSE])&&Je.isAuthorized([gn.VIEW_DISTRICT_RESPONSE,gn.VIEW_RPP_RESPONSE,gn.VIEW_DE_CONSULTANT_RESPONSE])||(null===(v=this.state.selfStudyResponse)||void 0===v?void 0:v.selfStudyResponseStatusTypeId)!=lk.COMPLETE&&(null===(g=Xe.Get())||void 0===g?void 0:g.userId)!=this.state.selfStudyResponse.respondingUserId&&!Je.isAuthorized([gn.SYSTEM_ADMIN]);return Object(o.jsx)(o.Fragment,{children:Object(o.jsx)(GV,WV({academicYear:F,selfStudyResponseId:M,sectionIndex:U,selfStudyResponse:this.state.selfStudyResponse,selfStudySections:null!==(I=null===(j=null===(y=this.state.selfStudy.selfStudyResponses)||void 0===y?void 0:y.find((function(e){return e.id==M})))||void 0===j?void 0:j.selfStudySectionResponses)&&void 0!==I?I:void 0,selfStudySectionsTemplate:null!==(S=this.state.selfStudyTemplateSectionTemplates)&&void 0!==S?S:void 0,currentStep:L,districtAdmin:this.state.districtAdmin,scenario:G,selfStudyResponseType:Y,title:null!==(_=null===(R=null===(E=this.state.selfStudy.secondaryProgram)||void 0===E?void 0:E.secondaryCipNumber)||void 0===R?void 0:R.description)&&void 0!==_?_:"...",subtitle:null!==(x=null===(C=null===(T=this.state.selfStudy.secondaryProgram)||void 0===T?void 0:T.district)||void 0===C?void 0:C.name)&&void 0!==x?x:"...",breadcrumbs:Xn.completeSelfStudy(k,null!==(w=null===(N=null===(P=null===(A=this.state.selfStudy)||void 0===A?void 0:A.secondaryProgram)||void 0===P?void 0:P.secondaryCipNumber)||void 0===N?void 0:N.description)&&void 0!==w?w:"...",F,this.state.selfStudyResponseId,L),onBack:this.onBack,renderRevokeResponse:this.renderRevokeResponse,fieldErrors:this.state.fieldErrors},{children:Object(o.jsx)(Qn.a,WV({title:k},{children:Object(o.jsx)(DV,{ref:this._modalRef,academicYear:F,selfStudyResponseId:M,selfStudyId:null!==(D=this.state.selfStudy.id)&&void 0!==D?D:re.default.Empty(),sectionIndex:U,stepSection:L,isEditing:!0,onSave:this.onSave,readonly:V,selfStudyResponseType:Y,sectionLoaded:this.state.sectionLoaded},void 0)}),void 0)}),void 0)},void 0)},t}(a.Component);var HV=Object(u.i)(Object(l.b)((function(e){return{institution:e.Institution.Selected}}))(zV)),QV=function(e){return Object.assign({academicYear:0,rppId:null,districtId:null},e)},KV=function(e){return Object.assign({deCommentRelease:!1,selfStudyId:null,academicYear:null},e)},XV=function(){return XV=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},XV.apply(this,arguments)},JV=[TL.RELEASEDAPPROVALCOMMENTS,TL.CLOSED];function $V(e){var t,n,r,i,s,d,c,l,u,p,f,h,v,m,g,y,O,j,I,E=(null!==(n=null===(t=e.selfStudyStats)||void 0===t?void 0:t.instructorNotStarted)&&void 0!==n?n:0)+(null!==(i=null===(r=e.selfStudyStats)||void 0===r?void 0:r.instructorInProgress)&&void 0!==i?i:0)+(null!==(d=null===(s=e.selfStudyStats)||void 0===s?void 0:s.instructorPendingApproval)&&void 0!==d?d:0);E+=(null!==(l=null===(c=e.selfStudyStats)||void 0===c?void 0:c.rppNotStarted)&&void 0!==l?l:0)+(null!==(p=null===(u=e.selfStudyStats)||void 0===u?void 0:u.rppInProgress)&&void 0!==p?p:0)+(null!==(h=null===(f=e.selfStudyStats)||void 0===f?void 0:f.rppPendingApproval)&&void 0!==h?h:0),E+=(null!==(m=null===(v=e.selfStudyStats)||void 0===v?void 0:v.doeNotStarted)&&void 0!==m?m:0)+(null!==(y=null===(g=e.selfStudyStats)||void 0===g?void 0:g.doeInProgress)&&void 0!==y?y:0)+(null!==(j=null===(O=e.selfStudyStats)||void 0===O?void 0:O.doePendingApproval)&&void 0!==j?j:0);var R=(null===(I=e.academicYear)||void 0===I?void 0:I.academicYearStatusTypeId)===TL.REVIEWSELFSTUDYPROGRAMS&&0==E&&Je.isAuthorized([gn.CONFIG_ACADEMIC_YEAR]),_=JV.indexOf(e.academicYear.academicYearStatusTypeId)>=0,T=a.useState(!1),C=T[0],x=T[1],A=function(){var t=KV({deCommentRelease:!0,academicYear:e.academicYear.id});lL.saveSelfStudyDECommentRelease(t).then((function(t){var n,r;(null===t||void 0===t?void 0:t.succeeded)?(e.loadAcademicYear&&e.loadAcademicYear(null!==(r=null===(n=t.academicYear)||void 0===n?void 0:n.id)&&void 0!==r?r:0),S.b.success("Comments Released")):S.b.error("Comments could not be released")})).catch((function(){S.b.error("Comments could not be released")})).finally((function(){x(!1)}))},P=function(){return x(!0),Rd.a.confirm({title:"Release DE Comments",content:"Are you sure you want to release DE Comments?",onCancel:function(){x(!1)},onOk:A,okText:"Release"})},N=$r.shortFormat(e.academicYear.commentReleaseDate);return Object(o.jsx)(bg.a.Step,{status:_?"finish":R?"process":"wait",title:"Ap
1proval Comments Release",subTitle:N,description:function(){var t;if(R&&Je.isAuthorized([gn.CONFIG_ACADEMIC_YEAR])&&R&&!1===e.compactView&&$r.isAfterRange(null!==(t=e.academicYear.commentReleaseDate)&&void 0!==t?t:It()()))return Object(o.jsx)(b.a,{children:Object(o.jsx)(rt.a,XV({title:"Release Comments",type:"primary",icon:Object(o.jsx)(Ko.a,{},void 0),loading:C,onClick:P},{children:"Release Comments"}),void 0)},void 0)}()},void 0)}var ZV=function(){return ZV=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ZV.apply(this,arguments)},eB=[TL.CLOSED,TL.REVIEWSELFSTUDYPROGRAMS,TL.RELEASEDAPPROVALCOMMENTS,TL.SELFSTUDYPREPARATION];function tB(e){var t,n=(null===(t=e.academicYear)||void 0===t?void 0:t.academicYearStatusTypeId)===TL.SELFSTUDYSUBMITTED,r=eB.indexOf(e.academicYear.academicYearStatusTypeId)>=0;return Je.isAuthorized([gn.EDIT_PROGRAM_REVIEW,gn.CONFIG_ACADEMIC_YEAR])?Object(o.jsx)(bg.a.Step,{status:n?"process":r?"finish":"wait",title:"Confirm Programs for Review",description:function(){if(n&&!1===e.compactView&&Je.isAuthorized([gn.EDIT_PROGRAM_REVIEW,gn.CONFIG_ACADEMIC_YEAR])&&e.academicYear.academicYearStatusTypeId==TL.SELFSTUDYSUBMITTED)return Object(o.jsx)(b.a,{children:Object(o.jsx)(rt.a,ZV({title:"Review Programs",type:"primary",onClick:function(){T.push(x.generate(x.SELF_STUDIES_REVIEW,{academicYearId:e.academicYear.id},{}))}},{children:"Review Programs"}),void 0)},void 0)}()},void 0):null}var nB=function(){return nB=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},nB.apply(this,arguments)};function rB(e){var t,n=(null===(t=e.academicYear)||void 0===t?void 0:t.academicYearStatusTypeId)!==TL.OPEN,r=function(){T.push(x.generate(x.DATA_REVIEW_AREA_EDUCATION_AGENCY,{academicYearId:e.academicYear.id},{}))};if(Je.isAuthorized([gn.EDIT_PROGRAM_REVIEW,gn.CONFIG_ACADEMIC_YEAR])){var i=e.compactView||n||e.academicYear.academicYearStatusTypeId!=TL.OPEN?null:Object(o.jsx)(rt.a,nB({title:"Start Data Review",type:"primary",onClick:r},{children:"Start Data Review"}),void 0);return Object(o.jsx)(bg.a.Step,{status:n?"finish":"process",title:"Data Configuration",description:i},void 0)}return null}var iB=function(e){return Object.assign({academicYear:null,selfStudyResponseTypeId:0},e)},oB=function(){return oB=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},oB.apply(this,arguments)},aB=[TL.CLOSED,TL.RELEASEDAPPROVALCOMMENTS];function sB(e){var t,n,r,i,s,d,c,l,u,p=(null===(t=e.academicYear)||void 0===t?void 0:t.academicYearStatusTypeId)===TL.REVIEWSELFSTUDYPROGRAMS&&$r.isAfterRange(null!==(n=e.academicYear.deStartDate)&&void 0!==n?n:""),f=aB.indexOf(e.academicYear.academicYearStatusTypeId)>=0,h=(null!==(i=null===(r=e.selfStudyStats)||void 0===r?void 0:r.doeNotStarted)&&void 0!==i?i:0)+(null!==(d=null===(s=e.selfStudyStats)||void 0===s?void 0:s.doeInProgress)&&void 0!==d?d:0)+(null!==(l=null===(c=e.selfStudyStats)||void 0===c?void 0:c.doePendingApproval)&&void 0!==l?l:0),v=$r.isAfterRange(null!==(u=e.academicYear.deEndDate)&&void 0!==u?u:"")&&h>0,g=a.useState(!1),O=g[0],j=g[1],I=function(){j(!0);var t=iB({academicYear:e.academicYear,selfStudyResponseTypeId:CL.DOE});sL.sendSelfStudyReminderEmails(t).then((function(e){e.succeeded?S.b.success("Reminder Emails Sent!"):S.b.error("Failed to Send Reminder Emails")})).catch((function(){S.b.error("Failed to Send Reminder Emails")})).finally((function(){j(!1)}))},E=$r.dateRangeShortFormat(e.academicYear.deStartDate,e.academicYear.deEndDate),R=function(){var t;return Je.isAuthorized([gn.CONFIG_ACADEMIC_YEAR])&&$r.isAfterRange(null!==(t=e.academicYear.deEndDate)&&void 0!==t?t:It()())?Object(o.jsx)(rt.a,oB({type:v?"primary":"default",danger:v,loading:O,onClick:I},{children:"Send Reminder Emails"}),void 0):null};return Je.isAuthorized([gn.EDIT_DISTRICT_RESPONSE,gn.EDIT_RPP_RESPONSE,gn.EDIT_DE_RESPONSE])?Object(o.jsx)(bg.a.Step,{title:"Department of Education Response Window",icon:v?Object(o.jsx)(oa.a,{}
1,void 0):null,status:v?"error":f?"finish":p?"process":"wait",subTitle:E,description:function(){var t,n,r,i,a;if(p&&!1===e.compactView&&$r.isAfterRange(null!==(t=e.academicYear.deStartDate)&&void 0!==t?t:It()())&&Je.isAuthorized([gn.EDIT_DE_RESPONSE]))return Object(o.jsxs)(y.b,oB({direction:"vertical"},{children:[Object(o.jsxs)(b.a,{children:[Object(o.jsx)(m.a,oB({},En.ONE_QUARTER,{children:Object(o.jsx)(GL.a,{title:"Not Started",value:null===(n=e.selfStudyStats)||void 0===n?void 0:n.doeNotStarted},void 0)}),void 0),Object(o.jsx)(m.a,oB({},En.ONE_QUARTER,{children:Object(o.jsx)(GL.a,{title:"In Progress",value:null===(r=e.selfStudyStats)||void 0===r?void 0:r.doeInProgress},void 0)}),void 0),Object(o.jsx)(m.a,oB({},En.ONE_QUARTER,{children:Object(o.jsx)(GL.a,{title:"Pending Approval",value:null===(i=e.selfStudyStats)||void 0===i?void 0:i.doePendingApproval},void 0)}),void 0),Object(o.jsx)(m.a,oB({},En.ONE_QUARTER,{children:Object(o.jsx)(GL.a,{title:"Completed",value:null===(a=e.selfStudyStats)||void 0===a?void 0:a.doeCompleted},void 0)}),void 0)]},void 0),R()]}),void 0)}()},void 0):null}var dB=function(){return dB=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},dB.apply(this,arguments)},cB=[TL.CLOSED,TL.RELEASEDAPPROVALCOMMENTS];function lB(e){var t,n,r,i,s,d,c,l,u,p=(null===(t=e.academicYear)||void 0===t?void 0:t.academicYearStatusTypeId)===TL.REVIEWSELFSTUDYPROGRAMS&&$r.isAfterRange(null!==(n=e.academicYear.instructorStartDate)&&void 0!==n?n:""),f=cB.indexOf(e.academicYear.academicYearStatusTypeId)>=0,h=(null!==(i=null===(r=e.selfStudyStats)||void 0===r?void 0:r.instructorNotStarted)&&void 0!==i?i:0)+(null!==(d=null===(s=e.selfStudyStats)||void 0===s?void 0:s.instructorInProgress)&&void 0!==d?d:0)+(null!==(l=null===(c=e.selfStudyStats)||void 0===c?void 0:c.instructorPendingApproval)&&void 0!==l?l:0),v=$r.isAfterRange(null!==(u=e.academicYear.instructorEndDate)&&void 0!==u?u:"")&&h>0,g=$r.dateRangeShortFormat(e.academicYear.instructorStartDate,e.academicYear.instructorEndDate),O=a.useState(!1),j=O[0],I=O[1],E=function(){I(!0);var t=iB({academicYear:e.academicYear,selfStudyResponseTypeId:CL.INSTRUCTOR});sL.sendSelfStudyReminderEmails(t).then((function(e){e.succeeded?S.b.success("Reminder Emails Sent!"):S.b.error("Failed to Send Reminder Emails")})).catch((function(){S.b.error("Failed to Send Reminder Emails")})).finally((function(){I(!1)}))},R=function(){var t;return Je.isAuthorized([gn.CONFIG_ACADEMIC_YEAR])&&$r.isAfterRange(null!==(t=e.academicYear.instructorEndDate)&&void 0!==t?t:It()())?Object(o.jsx)(rt.a,dB({type:v?"primary":"default",danger:v,loading:j,onClick:E},{children:"Send Reminder Emails"}),void 0):null};return Je.isAuthorized([gn.EDIT_DISTRICT_RESPONSE,gn.EDIT_RPP_RESPONSE,gn.EDIT_DE_RESPONSE])?Object(o.jsx)(bg.a.Step,{title:"District Response Window",className:"ant-title-warning",icon:v?Object(o.jsx)(oa.a,{},void 0):null,status:v?"error":f?"finish":p?"process":"wait",subTitle:g,description:function(){var t,n,r,i,a;return!p||!0===e.compactView||$r.isBeforeRange(null!==(t=e.academicYear.instructorStartDate)&&void 0!==t?t:It()())?null:Je.isAuthorized([gn.EDIT_DISTRICT_RESPONSE,gn.EDIT_RPP_RESPONSE,gn.EDIT_DE_RESPONSE])?Object(o.jsxs)(y.b,dB({direction:"vertical"},{children:[Object(o.jsxs)(b.a,{children:[Object(o.jsx)(m.a,dB({},En.ONE_QUARTER,{children:Object(o.jsx)(GL.a,{title:"Not Started",value:null===(n=e.selfStudyStats)||void 0===n?void 0:n.instructorNotStarted},void 0)}),void 0),Object(o.jsx)(m.a,dB({},En.ONE_QUARTER,{children:Object(o.jsx)(GL.a,{title:"In Progress",value:null===(r=e.selfStudyStats)||void 0===r?void 0:r.instructorInProgress},void 0)}),void 0),Object(o.jsx)(m.a,dB({},En.ONE_QUARTER,{children:Object(o.jsx)(GL.a,{title:"Pending Approval",value:null===(i=e.selfStudyStats)||void 0===i?void 0:i.instructorPendingApproval},void 0)}),void 0),Object(o.jsx)(m.a,dB({},En.ONE_QUARTER,{children:Object(o.jsx)(GL.a,{title:"Completed",value:null===(a=e.selfStudyStats)||void 0===a?void 0:a.instructorCompleted},void 0)}),void 0)]},void 0),R()]}),void 0):null}()},void 0):null}var uB=function(e){return Object.assign({academicYear:null},e)},pB=function(){return pB=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},pB.apply(this,arguments)},fB=[TL.CLOSED];function hB(e){var t,n=(null===(t=e.academicYear)||void 0===t?void 0:t.academicYearStatusTypeId)===TL.RELEASEDAPPROVALCOMMENTS,r
1=fB.indexOf(e.academicYear.academicYearStatusTypeId)>=0,i=a.useState(!1),s=i[0],d=i[1],c=function(){var t=uB({academicYear:e.academicYear});sL.releaseApprovalLetters(t).then((function(t){var n,r;t.succeeded?(S.b.success("Approval Letters Sent!"),e.loadAcademicYear&&e.loadAcademicYear(null!==(r=null===(n=t.academicYearObj)||void 0===n?void 0:n.id)&&void 0!==r?r:0)):S.b.error("Failed to Send Approval Letters")})).catch((function(){S.b.error("Failed to Send Approval Letters")})).finally((function(){d(!1)}))},l=function(){return d(!0),Rd.a.confirm({title:"Release DE Comments",content:"Are you sure you want to finalize the Program Review Year?",onCancel:function(){d(!1)},onOk:c,okText:"Release"})},u=It()(e.academicYear.finalizationDate).format("MMMM Do YYYY");return Object(o.jsx)(bg.a.Step,{status:r?"finish":n?"process":"wait",title:"Program Review Year Finalized",subTitle:u,description:!1===e.compactView&&Je.isAuthorized([gn.CONFIG_ACADEMIC_YEAR])&&e.academicYear.academicYearStatusTypeId==TL.RELEASEDAPPROVALCOMMENTS&&n?Object(o.jsx)(b.a,{children:Object(o.jsx)(rt.a,pB({title:"Release Approval Letters",type:"link",loading:s,icon:Object(o.jsx)(Ko.a,{},void 0),onClick:l},{children:" Release Approval Letters"}),void 0)},void 0):null},void 0)}var vB=function(){return vB=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},vB.apply(this,arguments)},mB=[TL.CLOSED,TL.RELEASEDAPPROVALCOMMENTS];function gB(e){var t,n,r,i,s,d,c,l,u,p=(null===(t=e.academicYear)||void 0===t?void 0:t.academicYearStatusTypeId)===TL.REVIEWSELFSTUDYPROGRAMS&&$r.isAfterRange(null!==(n=e.academicYear.rppStartDate)&&void 0!==n?n:""),f=mB.indexOf(e.academicYear.academicYearStatusTypeId)>=0,h=(null!==(i=null===(r=e.selfStudyStats)||void 0===r?void 0:r.rppNotStarted)&&void 0!==i?i:0)+(null!==(d=null===(s=e.selfStudyStats)||void 0===s?void 0:s.rppInProgress)&&void 0!==d?d:0)+(null!==(l=null===(c=e.selfStudyStats)||void 0===c?void 0:c.rppPendingApproval)&&void 0!==l?l:0),v=$r.isAfterRange(null!==(u=e.academicYear.rppEndDate)&&void 0!==u?u:"")&&h>0,g=a.useState(!1),O=g[0],j=g[1],I=function(){j(!0);var t=iB({academicYear:e.academicYear,selfStudyResponseTypeId:CL.RPP});sL.sendSelfStudyReminderEmails(t).then((function(e){e.succeeded?S.b.success("Reminder Emails Sent!"):S.b.error("Failed to Send Reminder Emails")})).catch((function(){S.b.error("Failed to Send Reminder Emails")})).finally((function(){j(!1)}))},E=$r.dateRangeShortFormat(e.academicYear.rppStartDate,e.academicYear.rppEndDate),R=function(){var t;return Je.isAuthorized([gn.CONFIG_ACADEMIC_YEAR])&&$r.isAfterRange(null!==(t=e.academicYear.rppEndDate)&&void 0!==t?t:It()())?Object(o.jsx)(rt.a,vB({type:v?"primary":"default",danger:v,loading:O,onClick:I},{children:"Send Reminder Emails"}),void 0):null};return Je.isAuthorized([gn.EDIT_DISTRICT_RESPONSE,gn.EDIT_RPP_RESPONSE,gn.EDIT_DE_RESPONSE])?Object(o.jsx)(bg.a.Step,{title:"RPP Response Window",icon:v?Object(o.jsx)(oa.a,{},void 0):null,status:v?"error":f?"finish":p?"process":"wait",subTitle:E,description:function(){var t,n,r,i,a;return p&&!1===e.compactView&&$r.isAfterRange(null!==(t=e.academicYear.rppStartDate)&&void 0!==t?t:It()())&&Je.isAuthorized([gn.EDIT_RPP_RESPONSE,gn.EDIT_DE_RESPONSE])?Object(o.jsxs)(y.b,vB({direction:"vertical"},{children:[Object(o.jsxs)(b.a,{children:[Object(o.jsx)(m.a,vB({},En.ONE_QUARTER,{children:Object(o.jsx)(GL.a,{title:"Not Started",value:null===(n=e.selfStudyStats)||void 0===n?void 0:n.rppNotStarted},void 0)}),void 0),Object(o.jsx)(m.a,vB({},En.ONE_QUARTER,{children:Object(o.jsx)(GL.a,{title:"In Progress",value:null===(r=e.selfStudyStats)||void 0===r?void 0:r.rppInProgress},void 0)}),void 0),Object(o.jsx)(m.a,vB({},En.ONE_QUARTER,{children:Object(o.jsx)(GL.a,{title:"Pending Approval",value:null===(i=e.selfStudyStats)||void 0===i?void 0:i.rppPendingApproval},void 0)}),void 0),Object(o.jsx)(m.a,vB({},En.ONE_QUARTER,{children:Object(o.jsx)(GL.a,{title:"Completed",value:null===(a=e.selfStudyStats)||void 0===a?void 0:a.rppCompleted},void 0)}),void 0)]},void 0),R()]}),void 0):null}()},void 0):null}var bB=function(){return bB=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},bB.apply(this,arguments)},yB=[TL.REVIEWSELFSTUDYPROGRAMS,TL.SELFSTUDYSUBMITTED,TL.RELEASEDAPPROVALCOMMENTS,TL.CLOSED];function OB(e){var t,n=(null===(t=e.academicYear)||void 0===t?void 0:t.academicYearStatusTypeId)===TL.SELFSTUDYPREPARATION,r=yB.indexOf(e.academicYear.academicYearStatusTypeId)>=0,i=function(){T.push(x.generate(x.SELF_STUDIES_CONFIGURATION,{academicYearId:e.academicYear.id},{}))};return Je.isAuthorized([gn.EDIT_PROGRAM_REVIEW,gn.CONFIG_ACADEMIC_YEAR])?Object(o.jsx)(bg.a.Step,{status:n?"process":r?"finish":"wait",title:"Self Study Configuration",description:n?Object(o.jsx)(y.b,bB({direction:"vertical"},{children:Object(o.jsx)(rt.a,bB({type:"primary",onClick:i},{children:"Configure Self Study"}),void 0)}),void 0):null},void 0):null}var jB=function(){return jB=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},jB.apply(this,arguments)};var IB=function(e){var t=e.academicYear,n=Object(a.useState)(null),r=n[0],i=n[1],s=Object(a.useState)(t),d=s[0],c=s[1];null!=t&&(t.instructorStartDate=It()(t.instructorStartDate),t.instructorEndDate=It()(t.instructorEndDate),t.rppStartDate=It()(t.rppStartDate),t.rppEndDate=It()(t.rppEndDate),t.deStartDate=It()(t.deStartDate),t.deEndDate=It()(t.deEndDate),t.commentReleaseDate=It()(t.commentReleaseDate),t.finalizationDate=It()(t.finalizationDate)),Object(a.useEffect)((function(){l()}),[e.academicYear,e.selectedDistrict,e.selectedRPP]);var l=function(){var n,r,o=QV({academicYear:t.id,districtId:null===(n=e.selectedDistrict)||void 0===n?void 0:n.districtId,rppId:null===(r=e.selectedRPP)||void 0===r?void 0:r.regionalPlanningPartnerIdentifier});lL.getDashboardStats(o).then((function(t){var n;t.succeeded?(i(t.stats),c(null!==(n=t.academicYear)&&void 0!==n?n:e.academicYear)):S.b.error("Could not retrieve data")})).catch((function(){S.b.error("Could not retrieve data")}))};return Object(o.jsxs)(bg.a,jB({direction:"vertical"},{children:[rB({academicYear:d,compactView:e.compactView}),OB({academicYear:d,compactView:e.compactView}),tB({academicYear:d,compactView:e.compactView}),lB({academicYear:d,compactView:e.compactView,selfStudyStats:r}),gB({academicYear:d,compactView:e.compactView,selfStudyStats:r}),sB({academicYear:d,compactView:e.compactView,selfStudyStats:r}),$V({academicYear:d,compactView:e.compactView,selfStudyStats:r,loadAcademicYear:e.loadAcademicYear}),hB({academicYear:d,compactView:e.compactView,selfStudyStats:r,loadAcademicYear:e.loadAcademicYear})]}),void 0)},SB=function(e){return Object.assign({academicYearId:0,academicYear:null},e)},EB=function(){return EB=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},EB.apply(this,arguments)};var RB=function(e){return e.readonly?Object(o.jsx)(ud,{text:e.value},void 0):Object(o.jsx)(Ni.a,EB({},e),void 0)},_B=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),TB=function(){return TB=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},TB.apply(this,arguments)},CB=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._formItems=(new Map).set(fk.programInfoYear,{required:!0,name:fk.programInfoYear,label:"Program Information Year",rules:[Ot.required()]}).set(fk.instructorStartDate,{required:!0,name:fk.instructorStartDate,label:"Instructor Review Submission",rules:[Ot.required()]}).set(fk.rppStartDate,{required:!0,name:fk.rppStartDate,label:"RPP Review Submission",rules:[Ot.required()]}).set(fk.deStartDate,{required:!0,name:fk.deStartDate,label:"Department of Education Consultant Review Submission",rules:[Ot.required()]}).set(fk.commentReleaseDate,{name:fk.commentReleaseDate,label:"Comment Release",rules:[]}).set(fk.finalizationDate,{required:!0,name:fk.finalizationDate,label:"Program Review Year Finalization and Letter Send Out",rules:[Ot.required()]}),n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields(),n.setState({altered:!1})},n.handleChange=function(){n.setState({altered:!0})},n.cleanResultDates=function(e){return null!=e&&(e.instructorStartDate=e.instructorStartDate?It()(e.instructorStartDate):"",e.instructorEndDate=e.instructorEndDate?It()(e.instructorEndDate):"",e.rppStartDate=e.rppStartDate?It()(e.rppStartDate):"",e.rppEndDate=e.rppEndDate?It()(e.rppEndDate):"",e.deStartDate=e.deStartDate?It()(e.deStartDate):"",e.deEndDate=e.deEndDate?It()(e.deEndDate):"",e.commentReleaseDate=e.commentReleaseDate?It()(e.commentReleaseDate):"",e.finalizationDate=e.finalizationDate?It()(e.finalizationDate):""),e},n.loadAcademicYear=function(){n.setState({loading:!0});var e=Sk({academicYearId:n.props.academicYearId});return sL.getAcademicYear(e).then((function(e){var t;e&&e.academicYear&&n.setState({academicYear:null!==(t=n.cleanResultDates(e.academicYear))&&void 0!==t?t:fk.create(),academicYearId:n.props.academicYearId},(function(){return n.resetForm()}))})).catch((function(){n.setState({error:!0,message:"Could not load Program Review Year."})})).finally((function(){n.setState({loading:!1})}
1))},n.getValue=function(){return n._formRef},n.createAcademicYearValue=function(e){if(e)return{programInfoYear:e.programInfoYear,instructorStartDate:e.instructorStartDate&&e.instructorEndDate?[It()(e.instructorStartDate),It()(e.instructorEndDate)]:"",rppStartDate:e.rppStartDate&&e.rppEndDate?[It()(e.rppStartDate),It()(e.rppEndDate)]:"",deStartDate:e.deStartDate&&e.deEndDate?[It()(e.deStartDate),It()(e.deEndDate)]:"",commentReleaseDate:e.commentReleaseDate?It()(e.commentReleaseDate):"",finalizationDate:e.finalizationDate?It()(e.finalizationDate):""}},n.state={academicYear:null,academicYearId:0},n}return _B(t,e),t.prototype.componentDidMount=function(){this.props.academicYearId&&0!=this.props.academicYearId&&(this.setState({loading:!0}),this.loadAcademicYear(),this.setState({academicYearId:this.props.academicYearId,fieldErrors:this.props.fieldErrors}))},t.prototype.componentDidUpdate=function(e){this.props.academicYearId&&0!=this.props.academicYearId&&e.academicYearId!=this.props.academicYearId&&(this.setState({loading:!0}),this.loadAcademicYear(),this.setState({academicYearId:this.props.academicYearId,fieldErrors:this.props.fieldErrors}))},t.prototype.render=function(){var e;if(this.state.loading||void 0==this.state.loading)return Object(o.jsx)(pt.a,{active:!0},void 0);var t=null!==(e=this.createAcademicYearValue(this.state.academicYear))&&void 0!==e?e:void 0;return Object(o.jsxs)(ht.a,TB({ref:this._formRef,initialValues:t,layout:"vertical",onValuesChange:this.handleChange,requiredMark:!0},{children:[Object(o.jsx)(mt.a,TB({},this._formItems.get(fk.programInfoYear),_t.getValidation(fk.programInfoYear,this.props.fieldErrors,this.props.submitted||this.props.readonly),{children:Object(o.jsx)(RB,{disabled:this.props.readonly||this.props.submitting||!this.props.isEditing},void 0)}),fk.programInfoYear),Object(o.jsx)(mt.a,TB({},this._formItems.get(fk.instructorStartDate),_t.getValidation(fk.instructorStartDate,this.props.fieldErrors,this.props.submitted||this.props.readonly),{children:Object(o.jsx)(ur.a.RangePicker,{format:"M/D/YYYY",disabled:this.props.readonly||this.props.submitting||!this.props.isEditing},void 0)}),fk.instructorStartDate),Object(o.jsx)(mt.a,TB({},this._formItems.get(fk.rppStartDate),_t.getValidation(fk.rppStartDate,this.props.fieldErrors,this.props.submitted||this.props.readonly),{children:Object(o.jsx)(ur.a.RangePicker,{format:"M/D/YYYY",disabled:this.props.readonly||this.props.submitting||!this.props.isEditing},void 0)}),fk.rppStartDate),Object(o.jsx)(mt.a,TB({},this._formItems.get(fk.deStartDate),_t.getValidation(fk.deStartDate,this.props.fieldErrors,this.props.submitted||this.props.readonly),{children:Object(o.jsx)(ur.a.RangePicker,{format:"M/D/YYYY",disabled:this.props.readonly||this.props.submitting||!this.props.isEditing},void 0)}),fk.deStartDate),Object(o.jsx)(mt.a,TB({},this._formItems.get(fk.commentReleaseDate),_t.getValidation(fk.commentReleaseDate,this.props.fieldErrors,this.props.submitted||this.props.readonly),{children:Object(o.jsx)(ur.a,{format:"M/D/YYYY",disabled:this.props.readonly||this.props.submitting||!this.props.isEditing},void 0)}),fk.commentReleaseDate),Object(o.jsx)(mt.a,TB({},this._formItems.get(fk.finalizationDate),_t.getValidation(fk.finalizationDate,this.props.fieldErrors,this.props.submitted||this.props.readonly),{children:Object(o.jsx)(ur.a,{format:"M/D/YYYY",disabled:this.props.readonly||this.props.submitting||!this.props.isEditing},void 0)}),fk.finalizationDate)]}),void 0)},t}(a.Component),xB=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),AB=function(){return AB=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},AB.apply(this,arguments)},PB=function(e){function t(t){var n=e.call(this,t)||this;return n._academicYearDatesFormRef=a.createRef(),n.onSubmit=function(){var e,t,r,i,o=null===(t=null===(e=n._academicYearDatesFormRef)||void 0===e?void 0:e.current)||void 0===t?void 0:t.getValue(),a=[];null===(r=null===o||void 0===o?void 0:o.current)||void 0===r||r.validateFields(),a.push(null===(i=null===o||void 0===o?void 0:o.current)||void 0===i?void 0:i.validateFields()),Promise.all(a).then((function(){var e;n.handleSubmit(null===(e=null===o||void 0===o?void 0:o.current)||void 0===e?void 0:e.getFieldsValue())}))},n.handleSubmit=function(e){n.setState({submitting:!0});var t=SB({academicYear:fk.create({programInfoYear:e.programInfoYear,instructorStartDate:It()(e.instructorStartDate[0]),instructorEndDate:It()(e.instructorStartDate[1]),rppStartDate:It()(e.rppStartDate[0]),rppEndDate:It()(e.rppStartDate[1]),deStartDate:It()(e.deStartDate[0]),deEndDate:It()(e.deStartDate[1]),commentReleaseDate:It()(e.commentReleaseDate),finalizationDate:
1It()(e.finalizationDate)}),academicYearId:n.state.academicYearId});sL.saveAcademicYear(t).then((function(e){var t;n.setState({submitted:!0}),(null===e||void 0===e?void 0:e.succeeded)?(n.props.isNew?S.b.success("Program Review Year Opened"):S.b.success("Program Review Year Saved"),n.setState({saved:!0,submitted:!1,fieldErrors:void 0}),n.props.onSubmit&&n.props.onSubmit(null!==(t=n.props.fromAcademicYearList)&&void 0!==t&&t),n.props.onAcademicYearSave&&n.props.onAcademicYearSave(e.academicYearId)):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Error"))})).catch((function(e){n.setState({error:e,submitting:!1}),S.b.error("Error")})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.state={academicYearId:0},n}return xB(t,e),t.prototype.componentDidMount=function(){this.props.academicYearId&&0!=this.props.academicYearId&&this.setState({academicYearId:this.props.academicYearId})},t.prototype.componentDidUpdate=function(e){this.props.academicYearId&&0!=this.props.academicYearId&&e.academicYearId!=this.props.academicYearId&&this.setState({academicYearId:this.props.academicYearId})},t.prototype.render=function(){return Object(o.jsxs)(y.b,AB({direction:"vertical"},{children:[Object(o.jsx)(CB,{ref:this._academicYearDatesFormRef,academicYearId:this.state.academicYearId,readonly:this.props.readonly,fieldErrors:this.state.fieldErrors,submitted:this.state.submitted,submitting:this.state.submitting,isNew:this.props.isNew,isEditing:this.props.isEditing||this.props.isNew},void 0),this.props.isNew?null:this.renderActions()]}),void 0)},t.prototype.renderActions=function(){if(!this.props.readonly&&this.props.isEditing){var e=this.props.isNew?Object(o.jsx)(ss,{submitting:this.state.submitting,onClick:this.onSubmit},void 0):Object(o.jsx)(Tr,{onClick:this.onSubmit},void 0);return Object(o.jsx)(y.b,AB({direction:"horizontal",wrap:!0},{children:e}),void 0)}},t}(a.Component),NB=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),wB=function(){return wB=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},wB.apply(this,arguments)},DB=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._academicYearFormRef=a.createRef(),n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields(),n.setState({altered:!1})},n.loadAcademicYear=function(){n.setState({loading:!0});var e=ML({numberOfAcademicYears:20});return sL.getAcademicYears(e).then((function(e){var t;e&&n.setState({academicYear:null!==(t=e.academicYears)&&void 0!==t?t:[]})})).catch((function(){n.setState({error:!0,message:"Could not load change request."})})).finally((function(){n.setState({loading:!1})}))},n.onAcademicYearSave=function(e){T.push(x.generate(x.SELF_STUDIES_ACADEMIC_YEAR_DASHBOARD,{academicYearId:e}))},n.openModal=function(e){n.setState({openYear:e})},n.goToAcademicSelfStudyDashboard=function(e,t){t?n.openModal(e):T.push(x.generate(x.SELF_STUDIES_ACADEMIC_YEAR_DASHBOARD,{academicYearId:e}))},n.renderAcademicYear=function(e){return Object(o.jsxs)(y.b,wB({className:"academic-year-overview",direction:"vertical"},{children:[Object(o.jsx)(ot.a.Title,wB({level:4},{children:e.id+" - "+(e.id+1)}),void 0),Object(o.jsx)(IB,{academicYear:e,compactView:!0},void 0),Object(o.jsxs)(rt.a,wB({onClick:function(){return n.goToAcademicSelfStudyDashboard(e.id)}},{children:[Object(o.jsx)(is.a,{},void 0),"Go To Dashboard"]}),void 0)]}),void 0)},n.state={academicYear:[],openYear:null},n}return NB(t,e),t.prototype.componentDidMount=function(){this.loadAcademicYear()},t.prototype.render=function(){return this.state.loading||void 0==this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(y.b,wB({direction:"horizontal",size:"large",wrap:!0},{children:[this.renderAcademicYears(),this.renderNextAcademicYear(),this.renderOpenModal()]}),void 0)},t.prototype.renderOpenModal=function(){var e=this;if(this.state.openYear)return Object(o.jsx)(f.a,wB({title:"Open "+this.state.openYear+"-"+(this.state.openYear+1)+" Program Review Year",visible:!0,onOk:function(){var t;return null===(t=e._academicYearFormRef.current)||void 0===t?void 0:t.onSubmit()},onCancel:function(){return e.setState({openYear:null})},okText:"Open Program Review Year",width:500},{children:Object(o.jsx)(PB,{ref:this._academicYearFormRef,academicYearId:this.state.openYear,isNew:!0,onAcademicYearSave:this.onAcademicYearSave},void 0)}),void 0)},t.prototype.renderAcademicYears=function(){var e=this;return this.state.academicYear.map((function(t){return e.renderAcademicYear(t)}))},t.prototype.renderNextAcademicYear=function(){var e,t=this,n=null!==(e=this.state.academicYear[this.state.academicYear.length-1])&&void 0!==e?e:fk.create({id:$r.getCurrentYear()});if(Je.isAuthorized([gn.CONFIG_ACADEMIC_YEAR]))return Object(o.jsxs)(y.b,wB({className:"academic-year-overview",direction:"vertical"},{children:[Object(o.jsx)(ot.a.Title,wB({level:4},{children:n.id+1+" - "+(n.id+2)}),void 0),Object(o.jsx)(ot.a.Paragraph,{children:"This program review year has not been opened."},void 0),Object(o.jsx)(rt.a,wB({type:"primary",onClick:function(){return t.goToAcademicSelfStudyDashboard(n.id+1,!0)},icon:Object(o.jsx)(is.a,{},void 0)},{children:"Open Program Review Year"}),void 0)]}),void 0)},t}(a.Component),qB=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),FB=function(){return FB=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},FB.apply(this,arguments)},MB=function(e){function t(t){var n=e.call(this,t)||this;return n.goToAllSelfStudies=function(){T.replace(x.generate(x.ALL_ACADEMIC_YEARS))},n.goBack=function(){T.replace(x.generate(x.SECONDARY_HOME))},n.state={loading:!1},n}return qB(t,e),t.prototype.render=function(){var e=this;return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Program Review Years",onBack:this.goBack,breadcrumbs:Xn.academicYears()},void 0),Object(o.jsx)(y.b,FB({direction:"vertical",size:"large"},{children:Object(o.jsx)(Qn.a,FB({title:"Program Review Years",extra:Object(o.jsxs)(rt.a,FB({type:"link",onClick:function(){return e.goToAllSelfStudies()}},{children:[Object(o.jsx)(is.a,{},void 0),"View All"]}),void 0)},{children:Object(o.jsx)(DB,{institution:this.props.institution},void 0)}),void 0)}),void 0)]},void 0)},t}(a.Component);var YB=Object(u.i)(Object(l.b)((function(e){return{institution:e.Institution.Selected}}))(MB)),UB=n(1529),LB=function(e){return Object.assign({academicYear:0,selfStudy:null,finalize:!1},e)},kB=n(1487),GB=n(724),VB=n(1488),BB=n(1489),WB=function(){return WB=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},WB.apply(this,arguments)},zB="DraggableTabNode",HB=function(e){var t=e.index,n=e.children,r=e.moveNode,i=Object(a.useRef)(null);return(0,Object(VB.a)({accept:zB,collect:function(e){return(e.getItem()||{}).index===t?{}:{isOver:e.isOver(),dropClassName:"dropping"}},drop:function(e){r(e.index,t)}})[1])((0,Object(BB.a)({type:zB,item:{index:t},collect:function(e){return{isDragging:e.isDragging()}}})[1])(i)),Object(o.jsx)("div",WB({ref:i},{children:n}),void 0)},QB=function(){return QB=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},QB.apply(this,arguments)},KB=function(e){var t=e.children,n=[];
1return a.Children.forEach(t,(function(e){n.push(e)})),Object(o.jsx)(kB.a,QB({backend:GB.a},{children:Object(o.jsx)(pa.a,QB({renderTabBar:function(t,n){return Object(o.jsx)(n,QB({},t,{children:function(t){return Object(o.jsx)(HB,QB({index:t.key,moveNode:e.moveTabNode},{children:t}),t.key)}}),void 0)}},e,{children:n}),void 0)}),void 0)},XB={className:"SelfStudySectionTypeDTO",create:function(e){return Object.assign(Q.create(),{id:0,name:""},e)},id:"id",name:"name"},JB=function(){return JB=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},JB.apply(this,arguments)},$B=function(e){var t=e.id,n=e.content,r=e.index,i=e.moveCard,s=Object(a.useRef)(null),d=Object(VB.a)({accept:"DraggableCard",collect:function(e){return{handlerId:e.getHandlerId()}},hover:function(e,t){var n;if(s.current){var o=e.index,a=r;if(o!==a){var d=null===(n=s.current)||void 0===n?void 0:n.getBoundingClientRect(),c=(d.bottom-d.top)/2,l=t.getClientOffset().y-d.top;o<a&&l<c||o>a&&l>c||(i(o,a),e.index=a)}}}}),c=d[0].handlerId,l=d[1];return(0,Object(BB.a)({type:"DraggableCard",item:function(){return{id:t,index:r}},collect:function(e){return{isDragging:e.isDragging()}}})[1])(l(s)),Object(o.jsx)("div",JB({ref:s,"data-handler-id":c},{children:n}),void 0)},ZB=function(){return ZB=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ZB.apply(this,arguments)};var eW=function(e){var t,n=Object(a.useState)(e.section),r=n[0],i=n[1],s=Object(a.useState)(e.submitted)[1],d=Object(a.useState)([]),c=d[0],l=d[1],u=Object(a.useState)([]),p=u[0],f=u[1],h=Object(a.useState)([]),v=h[0],m=h[1],g=Object(a.useState)(null)[1],b=Object(a.useState)(!1),O=b[0],j=b[1],I=Object(a.useState)(!1)[1],S=Object(a.useState)([])[1];Object(a.useEffect)((function(){R()}),[e.academicYear,e.form]);var E,R=function(){var e=[];0==c.length&&e.push(T()),0==p.length&&e.push(_()),0==v.length&&e.push(x()),e.push(C()),Promise.all(e).then((function(){s(!1)}))},_=function(){return ce.getAll(kk.className).then((function(e){f(e)})).catch((function(){g(!0)}))},T=function(){return ce.getAll(XB.className).then((function(e){l(e)})).catch((function(){g(!0)}))},C=function(){return ce.getAll(bi.className).then((function(e){S(e.filter((function(e){return e.selectable})))})).catch((function(){g(!0)}))},x=function(){var t,n=UG({academicYearId:null!==(t=e.academicYear)&&void 0!==t?t:0});return YG.getSecondaryProgramScenarios(n).then((function(e){var t;e&&m(null!==(t=e.secondaryProgramScenario)&&void 0!==t?t:[])})).catch((function(){g(!0)}))},A=function(e){return(new Map).set(Gk.title,{required:!0,name:[e,Gk.title],label:"Title",rules:[Ot.required()]}).set(Gk.selfStudySectionTemplateSecondaryProgramScenarios,{name:[e,Gk.selfStudySectionTemplateSecondaryProgramScenarios],label:"Scenario(s)"}).set(Gk.isSectionComments,{name:[e,Gk.isSectionComments],label:"Allow section comments for reviews?"})},P=function(e,t){var n="Instructions";return t==Nk.RANKINGQUESTION?n="Question":t==Nk.FREETEXTQUESTION&&(n="Text"),(new Map).set(Lk.selfStudySectionComponentTypeId,{required:!0,name:[e,Lk.selfStudySectionComponentTypeId],label:"Type",rules:[Ot.required()]}).set(Lk.primaryText,{required:!0,name:[e,Lk.primaryText],label:n,rules:[Ot.required()]}).set(Lk.rppInstructions,{required:!0,name:[e,Lk.rppInstructions],label:"RPP Instruction",rules:[Ot.required()]}).set(Lk.programOfStudyTenets,{required:!0,name:[e,Lk.programOfStudyTenets],label:"Program of Study Tenet(s)",rules:[Ot.required()]}).set(Lk.rankingQuestionIdentifier,{required:!0,name:[e,Lk.rankingQuestionIdentifier],label:"Identifier",rules:[Ot.required()]}).set(Lk.numberOfPreviousGoals,{required:!0,name:[e,Lk.numberOfPreviousGoals],label:"Number of Previous Goals",rules:[Ot.required()]}).set(Lk.numberOfNewGoals,{required:!0,name:[e,Lk.numberOfNewGoals],label:"Number of New Goals",rules:[Ot.required()]}).set(Lk.selfStudySectionComponentScenarios,{name:[e,Lk.selfStudySectionComponentScenarios],label:"Scenario"}).set(Lk.careerAcademy,{required:!0,name:[e,Lk.careerAcademy],label:"Career Academy",rules:[Ot.required()]})},N=function(e){return(new Map).set(Uk.question,{required:!0,name:[e,Uk.question],label:"Question",rules:[Ot.required()]})},w=function(){e.onAltered&&(e.onAltered(),I(!0))},D=function(t){e.form.setFieldsValue({SelfStudySectionComponentTypeId:t})},q=function(e){return Object(o.jsx)(rt.a,ZB({onClick:function(){return function(e){e(Uk.create()),j(!O)}(e)},icon:Object(o.jsx)(Xc.a,{},void 0)},{children:"Add Question"}),void 0)},F=function(e,t){return Object(o.jsx)(rt.a,{type:"link",icon:Object(o.jsx)(Yd.a,{},void 0),onClick:function(){return function(e,t){e(t),j(!O)}(e,t)}},void 0)},M=function(t,n){return Object(o.jsx)(Wk.a,ZB({name:[n,Lk.selfStudyResponseTemplateConsultantReviewQuestions]},{children:function(r,i){var a=i.add,s=i.remove,d=1;return Object(o.jsxs)(y.b,ZB({direction:"vertical"},{children:[r.map((function(r){return Object(o.jsx)(Qn.a,ZB({title:"Question "+d++,type:"inner",extra:F(s,r.name)},{children:Object(o.jsx)(mt.a,ZB({},N(r.name).get(Uk.question),_t.getValidation(Lk.selfStudyResponseTemplateConsultantReviewQuestions+t+n+r.name,e.fieldErrors,e.submitted),{children:Object(o.jsx)(il,{},void 0)}),void 0)}),r.fieldKey)})),q(a)]}),void 0)}}),void 0)},Y=function(e){return Object(o.jsx)(rt.a,ZB({onClick:function(){return e()},icon:Object(o.jsx)(Xc.a,{},void 0)},{children:"Add Component"}),void 0)},U=function(t,n,r,a){var s,d,c,l,u,f="Component "+(n+1),h=Object(o.jsx)(rt.a,{type:"link",size:"small",title:"Delete Component",onClick:function(){return a(t.name)},icon:Object(o.jsx)(Yd.a,{},void 0)},void 0),m=null===(u=null===(l=(null!==(c=null===(d=null===(s=e.form)||void 0===s?void 0:s.getFieldsValue())||void 0===d?void 0:d.selfStudySectionTemplates)&&void 0!==c?c:[])[r])||void 0===l?void 0:l.selfStudySectionComponentTemplates[n])||void 0===u?void 0:u.selfStudySectionComponentTypeId,g=P(n);return Object(o.jsx)($B,{id:n,index:n,moveCard:function(t,n){return function(t,n,r){var o,a=Gk.create(e.form?e.form.getFieldsValue():null),s=a.selfStudySectionTemplates[r],d=s.selfStudySectionComponentTemplates,c=(null!==(o=null===d||void 0===d?void 0:d.splice(t,1)
1)&&void 0!==o?o:[])[0];null===d||void 0===d||d.splice(n,0,c);var l=s;l.selfStudySectionComponentTemplates=d,l.title=s.title,i(l),e.form.setFieldsValue({selfStudySectionTemplates:a.selfStudySectionTemplates}),w()}(t,n,r)},content:Object(o.jsx)(Qn.a,ZB({title:Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(UB.a,{},void 0)," ",f]},void 0),type:"inner",extra:h},{children:Object(o.jsxs)(y.b,ZB({direction:"vertical"},{children:[Object(o.jsx)(mt.a,ZB({},g.get(Lk.selfStudySectionComponentTypeId),_t.getValidation(Lk.selfStudySectionComponentTypeId+r+n,e.fieldErrors,e.submitted),{children:Object(o.jsx)(hd,ZB({onChange:D},{children:p.map((function(e){var t,n;return Object(o.jsx)(pr.a.Option,ZB({value:null!==(t=e.id)&&void 0!==t?t:0},{children:e.name}),null!==(n=e.id)&&void 0!==n?n:0)}))}),void 0)}),void 0),m>0&&Object(o.jsx)(Ci.a.Item,ZB({},g.get(Lk.selfStudySectionComponentScenarios),_t.getValidation(Lk.selfStudySectionComponentScenarios+r+n,e.fieldErrors,e.submitted),{children:Object(o.jsx)(hd,ZB({mode:"multiple",placeholder:"Leave empty for all scenarios"},{children:v.map((function(e){var t,n;return Object(o.jsx)(pr.a.Option,ZB({value:null!==(t=e.id)&&void 0!==t?t:re.default.Empty()},{children:e.title}),null!==(n=e.id)&&void 0!==n?n:re.default.Empty())}))}),void 0)}),void 0),m==Nk.RANKINGQUESTION?Object(o.jsx)(mt.a,ZB({},g.get(Lk.rankingQuestionIdentifier),_t.getValidation(Lk.rankingQuestionIdentifier+r+n,e.fieldErrors,e.submitted),{children:Object(o.jsx)(il,{},void 0)}),void 0):null,m==Nk.RANKINGQUESTION?Object(o.jsx)(mt.a,ZB({},g.get(Lk.programOfStudyTenets),_t.getValidation(Lk.programOfStudyTenets+r+n,e.fieldErrors,e.submitted),{children:Object(o.jsx)(ut.a,{},void 0)}),void 0):null,m==Nk.RANKINGQUESTION?Object(o.jsx)(mt.a,ZB({},g.get(Lk.careerAcademy),_t.getValidation(Lk.careerAcademy+r+n,e.fieldErrors,e.submitted),{children:Object(o.jsx)(Hd,{},void 0)}),void 0):null,m==Nk.PREVIOUSGOALS?Object(o.jsx)(mt.a,ZB({},g.get(Lk.numberOfPreviousGoals),_t.getValidation(Lk.numberOfPreviousGoals+r+n,e.fieldErrors,e.submitted),{children:Object(o.jsx)(RB,{},void 0)}),void 0):null,m==Nk.NEWGOALS?Object(o.jsx)(mt.a,ZB({},g.get(Lk.numberOfNewGoals),_t.getValidation(Lk.numberOfNewGoals+r+n,e.fieldErrors,e.submitted),{children:Object(o.jsx)(RB,{},void 0)}),void 0):null,m==Nk.CONSULTANTREVIEW?M(r,n):null,m==Nk.CONSULTANTREVIEW?Object(o.jsx)(mt.a,ZB({},P(n,m).get(Lk.rppInstructions),_t.getValidation(Lk.rppInstructions+r+n,e.fieldErrors,e.submitted),{children:Object(o.jsx)(Mr,{},void 0)}),void 0):null,m>0&&Object(o.jsx)(mt.a,ZB({},P(n,m).get(Lk.primaryText),_t.getValidation(Lk.primaryText+r+n,e.fieldErrors,e.submitted),{children:Object(o.jsx)(Mr,{},void 0)}),void 0)]}),void 0)}),n)},n)},L=function(t,n){return function(t,n,r){var i,a,s,d,c,l,u,p,f,h,v,m,g,b,y=null===(d=(null!==(s=null===(a=null===(i=e.form)||void 0===i?void 0:i.getFieldsValue())||void 0===a?void 0:a.selfStudySectionTemplates)&&void 0!==s?s:[])[r])||void 0===d?void 0:d.selfStudySectionComponentTemplates[n],O=null===(f=null===(p=(null!==(u=null===(l=null===(c=e.form)||void 0===c?void 0:c.getFieldsValue())||void 0===l?void 0:l.selfStudySectionTemplates)&&void 0!==u?u:[])[r])||void 0===p?void 0:p.selfStudySectionComponentTemplates[n])||void 0===f?void 0:f.selfStudySectionComponentTypeId;if(!e.secondaryProgramScenarioId||!e.preview||void 0==(null===y||void 0===y?void 0:y.selfStudySectionComponentScenarios)||0==(null===(h=null===y||void 0===y?void 0:y.selfStudySectionComponentScenarios)||void 0===h?void 0:h.length)||(null===(v=null===y||void 0===y?void 0:y.selfStudySectionComponentScenarios)||void 0===v?void 0:v.findIndex((function(t){return t==e.secondaryProgramScenarioId})))>-1)switch(O){case Nk.INSTRUCTIONS:return Object(o.jsx)(yG,{academicYear:e.academicYear,sectionIndex:r,componentIndex:n,pdfView:e.pdfView,renderComplete:e.sectionComplete},void 0);case Nk.PROGRAMOVERVIEW:return Object(o.jsx)(iV,{readonly:!0,academicYear:e.academicYear,disable:!0,sectionIndex:r,componentIndex:n,previewComponent:!0,pdfView:e.pdfView,renderComplete:e.sectionComplete},void 0);case Nk.RANKINGQUESTION:return Object(o.jsx)(dV,{disable:!0,sectionIndex:r,academicYear:e.academicYear,componentIndex:n,readonly:e.readonly,previewComponent:!0,pdfView:e.pdfView,renderComplete:e.sectionComplete},void 0);case Nk.FREETEXTQUESTION:return Object(o.jsx)(mG,{disable:!0,sectionIndex:r,academicYear:e.academicYear,componentIndex:n,readonly:e.readonly,previewComponent:!0,pdfView:e.pdfView,renderComplete:e.sectionComplete},void 0);case Nk.NEWGOALS:return Object(o.jsx)(AG,{sectionIndex:r,componentIndex:n,disable:!0,academicYear:e.academicYear,previewComponent:!0,newGoalCount:null!==(m=y.numberOfNewGoals)&&void 0!==m?m:0,pdfView:!0,renderComplete:e.sectionComplete},void 0);case Nk.PREVIOUSGOALS:return Object(o.jsx)(qG,{sectionIndex:e.sectionIndex,componentIndex:n,disable:!0,academicYear:e.academicYear,previewComponent:!0,previousGoalCount:null!==(g=y.numberOfPreviousGoals)&&void 0!==g?g:0,pdfView:!0,renderComplete:e.sectionComplete},void 0);case Nk.CONSULTANTREVIEW:return Object(o.jsx)(uG,{disable:!0,sectionIndex:e.sectionIndex,componentIndex:n,academicYear:e.academicYear,previewComponent:!0,consultantReviewQuestionCount:null!==(b=y.selfStudyResponseTemplateConsultantReviewQuestions.length)&&void 0!==b?b:0,pdfView:!0,renderComplete:e.sectionComplete},void 0)}return null}(0,n,e.sectionIndex)},k=function(e){return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:e||"Needed section"},void 0)};return e.pdfView?Object(o.jsx)(Ek.View,{children:function(){var t,n;return null===(n=null===(t=null===e||void 0===e?void 0:e.section)||void 0===t?void 0:t.selfStudySectionComponentTemplates)||void 0===n?void 0:n.map((function(e,t){return L(0,t)}))}()},void 0):r?Object(o.jsxs)(y.b,ZB({direction:"vertical",size:"small"},{children:[e.preview?function(){var t=e.sectionIndex;return Object(o.jsx)(Wk.a,ZB({name:[t,Gk.selfStudySectionComponentTemplates]},{children:function(n){return Object(o.jsx)(y.b,ZB({direction:"vertical"},{children:n.map((function(n,r){if(n)return function(t,n,r){var i,a,s,d,
1c,l,u,p,f,h,v,m,g,b,y=null===(d=(null!==(s=null===(a=null===(i=e.form)||void 0===i?void 0:i.getFieldsValue())||void 0===a?void 0:a.selfStudySectionTemplates)&&void 0!==s?s:[])[r])||void 0===d?void 0:d.selfStudySectionComponentTemplates[n],O=null===(f=null===(p=(null!==(u=null===(l=null===(c=e.form)||void 0===c?void 0:c.getFieldsValue())||void 0===l?void 0:l.selfStudySectionTemplates)&&void 0!==u?u:[])[r])||void 0===p?void 0:p.selfStudySectionComponentTemplates[n])||void 0===f?void 0:f.selfStudySectionComponentTypeId;if(!e.secondaryProgramScenarioId||!e.preview||void 0==(null===y||void 0===y?void 0:y.selfStudySectionComponentScenarios)||0==(null===(h=null===y||void 0===y?void 0:y.selfStudySectionComponentScenarios)||void 0===h?void 0:h.length)||(null===(v=null===y||void 0===y?void 0:y.selfStudySectionComponentScenarios)||void 0===v?void 0:v.findIndex((function(t){return t==e.secondaryProgramScenarioId})))>-1)switch(O){case Nk.INSTRUCTIONS:return Object(o.jsx)(yG,{academicYear:e.academicYear,sectionIndex:r,componentIndex:n},void 0);case Nk.PROGRAMOVERVIEW:return Object(o.jsx)(iV,{readonly:!0,academicYear:e.academicYear,sectionIndex:r,disable:!0,componentIndex:n,previewComponent:!0},void 0);case Nk.RANKINGQUESTION:return Object(o.jsx)(dV,{disable:!0,sectionIndex:r,academicYear:e.academicYear,componentIndex:n,readonly:e.readonly,previewComponent:!0},void 0);case Nk.FREETEXTQUESTION:return Object(o.jsx)(mG,{disable:!0,sectionIndex:r,academicYear:e.academicYear,componentIndex:n,readonly:e.readonly,previewComponent:!0},void 0);case Nk.NEWGOALS:return Object(o.jsx)(AG,{sectionIndex:r,componentIndex:n,disable:!0,academicYear:e.academicYear,previewComponent:!0,newGoalCount:null!==(m=y.numberOfNewGoals)&&void 0!==m?m:0},void 0);case Nk.PREVIOUSGOALS:return Object(o.jsx)(qG,{sectionIndex:e.sectionIndex,componentIndex:n,disable:!0,academicYear:e.academicYear,previewComponent:!0,previousGoalCount:null!==(g=y.numberOfPreviousGoals)&&void 0!==g?g:0},void 0);case Nk.CONSULTANTREVIEW:return Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(uG,{disable:!0,sectionIndex:e.sectionIndex,componentIndex:n,academicYear:e.academicYear,previewComponent:!0,consultantReviewQuestionCount:null!==(b=y.selfStudyResponseTemplateConsultantReviewQuestions.length)&&void 0!==b?b:0},void 0)," "]},void 0)}}(0,r,t)}))}),void 0)}}),void 0)}():(E=null!==(t=e.sectionIndex)&&void 0!==t?t:0,Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(Ci.a.Item,ZB({},A(E).get(Gk.title),_t.getValidation(Gk.title+E,e.fieldErrors,e.submitted),{children:Object(o.jsx)(il,{disabled:!1},void 0)}),void 0),Object(o.jsx)(Ci.a.Item,ZB({},A(E).get(Gk.selfStudySectionTemplateSecondaryProgramScenarios),_t.getValidation(Gk.selfStudySectionTemplateSecondaryProgramScenarios+E,e.fieldErrors,e.submitted),{children:Object(o.jsx)(hd,ZB({mode:"multiple",placeholder:"Leave empty for all scenarios"},{children:v.map((function(e){var t,n;return Object(o.jsx)(pr.a.Option,ZB({value:null!==(t=e.id)&&void 0!==t?t:re.default.Empty()},{children:e.title}),null!==(n=e.id)&&void 0!==n?n:re.default.Empty())}))}),void 0)}),void 0),Object(o.jsx)(Ci.a.Item,ZB({},A(E).get(Gk.isSectionComments),_t.getValidation(Gk.isSectionComments+E,e.fieldErrors,e.submitted),{children:Object(o.jsx)(Hd,{},void 0)}),void 0),Object(o.jsx)(Wk.a,ZB({name:[E,Gk.selfStudySectionComponentTemplates]},{children:function(e,t){var n=t.add,r=t.remove;return Object(o.jsxs)(y.b,ZB({direction:"vertical"},{children:[e.map((function(e,t){if(e)return U(e,t,E,r)})),Y(n)]}),void 0)}}),void 0)]},void 0)),function(){var t;if(e.fieldErrors)return Object(o.jsx)(o.Fragment,{children:null===(t=_t.getValidation(Lk.selfStudySectionComponentType,e.fieldErrors,e.submitted))||void 0===t?void 0:t.messages.map((function(e){return k(e)}))},void 0)}()]}),void 0):Object(o.jsx)(pt.a,{active:!0},void 0)},tW=function(){return tW=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},tW.apply(this,arguments)},nW=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{d(r.next(e))}catch(t){o(t)}}function s(e){try{d(r.throw(e))}catch(t){o(t)}}function d(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}d((r=r.apply(e,t||[])).next())}))},rW=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;
1function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},iW=a.forwardRef((function(e,t){var n=Object(a.useState)("0"),r=n[0],i=n[1],s=Object(a.useState)(!1),d=s[0],c=s[1],l=Object(a.useState)(null),u=l[0],p=l[1],h=Object(a.useState)(!1)[1],v=Object(a.useState)(!1),m=v[0],g=v[1],b=Object(a.useState)(!1),O=b[0],j=b[1],I=Object(a.useState)(null),E=I[0],R=I[1],_=Object(a.useState)(null)[1],C=Object(a.useState)(null)[1],A=Object(a.useState)(!1),P=A[0],N=A[1],w=Object(wl.useForm)()[0],D=Object(a.useState)(null),q=D[0],F=D[1],M=Object(a.useState)([]),Y=M[0],U=M[1],L=Object(a.useState)({}),k=L[0],G=L[1],V=Object(a.useState)(!1),B=V[0],W=V[1],z=Object(a.useState)(),H=z[0],Q=z[1],K=Object(a.useState)(!1),X=K[0],J=K[1],$=Object(a.useState)(!1),Z=$[0],ee=$[1],te=Object(a.useState)(!1)[1];Object(a.useEffect)((function(){N(!0);var t=[];0!=e.academicYear&&(t.push(ae()),t.push(Pk.getSelfStudy(e.academicYear).then((function(t){var n;t.selfStudy?(p(t.selfStudy),null===(n=t.selfStudy.selfStudySectionTemplates)||void 0===n||n.forEach((function(e){var t;return ie(e.order,null!==(t=e.selfStudySectionComponentTemplates)&&void 0!==t?t:[])})),te(!0),se()):p(Vk.create({academicYear:e.academicYear,selfStudySectionTemplates:[Gk.create({selfStudySectionScenarios:[],selfStudySectionTypeId:null,title:"",selfStudySectionComponentTemplates:[Lk.create({selfStudySectionComponentScenarios:[],selfStudySectionComponentTypeId:null,selfStudyResponseTemplateConsultantReviewQuestions:[Uk.create()]})]})]}))}))),Promise.all(t).then((function(){N(!1),se()})))}),[e.academicYear]),a.useEffect((function(){var e=!0;Object.entries(k).forEach((function(t){return Object.entries(t[1]).forEach((function(t){!e||t[1]||(e=!1)}))})),e&&H&&Z&&J(!0),W(!1)}),[B]),a.useEffect((function(){nW(void 0,void 0,void 0,(function(){var t;return rW(this,(function(n){switch(n.label){case 0:return X?[4,H.toBlob()]:[3,2];case 1:t=n.sent(),Object(lV.saveAs)(t,e.academicYear+"_Self Study Configuration"),ne(),J(!1),ee(!1),n.label=2;case 2:return[2]}}
1))}))}),[X]);var ne=function(){var e=k;Object.entries(e).forEach((function(t){return Object.entries(t[1]).forEach((function(n){return e[t[0]][n[0]]=!1}))})),G(e),W(!0)},ie=function(e,t){var n=k;n[e]={},null===t||void 0===t||t.forEach((function(t){null!=t.selfStudySectionComponentTypeId&&(n[e][t.order]=!1)})),G(n),W(!0)},oe=function(e,t,n){var r=k;r[e][t]=n,G(r),W(!0)};Object(a.useImperativeHandle)(t,(function(){return{documentDownload:function(){return be()}}}));var ae=function(){var t,n=UG({academicYearId:null!==(t=e.academicYear)&&void 0!==t?t:0});return YG.getSecondaryProgramScenarios(n).then((function(e){var t,n;e&&(U(null!==(t=e.secondaryProgramScenario)&&void 0!==t?t:[]),F((null!==(n=e.secondaryProgramScenario)&&void 0!==n?n:[])[0].id))})).catch((function(){C(!0)}))},se=function(){null===w||void 0===w||w.resetFields(),h(!1)},de=function(e){i(e)},ce=function(t){var n,r,i;j(!0);var o=Vk.create(w?w.getFieldsValue():null);o.id=null!==(n=null===u||void 0===u?void 0:u.id)&&void 0!==n?n:re.default.Empty();var a=null===(r=o.selfStudySectionTemplates)||void 0===r?void 0:r.find((function(e){var t;return null===(t=e.selfStudySectionComponentTemplates)||void 0===t?void 0:t.find((function(e){return e.selfStudySectionComponentTypeId==Nk.PREVIOUSGOALS}))})),s=null===a||void 0===a?void 0:a.selfStudySectionComponentTemplates;a&&(a.selfStudySectionComponentTemplates=null===s||void 0===s?void 0:s.filter((function(e){return null!==(null===e||void 0===e?void 0:e.section)||(null===e||void 0===e?void 0:e.primaryText)||(null===e||void 0===e?void 0:e.selfStudySectionComponentTypeId)||(null===e||void 0===e?void 0:e.selfStudySectionTemplateSecondaryProgramScenarios)})));var d=null===(i=o.selfStudySectionTemplates)||void 0===i?void 0:i.find((function(e){var t;return null===(t=e.selfStudySectionComponentTemplates)||void 0===t?void 0:t.find((function(e){return e.selfStudySectionComponentTypeId==Nk.NEWGOALS}))})),c=null===d||void 0===d?void 0:d.selfStudySectionComponentTemplates;d&&(d.selfStudySectionComponentTemplates=null===c||void 0===c?void 0:c.filter((function(e){return null!==(null===e||void 0===e?void 0:e.measureOfSuccess)||(null===e||void 0===e?void 0:e.primaryText)||(null===e||void 0===e?void 0:e.selfStudySectionComponentTypeId)||(null===e||void 0===e?void 0:e.selfStudySectionTemplateSecondaryProgramScenarios)})));var l=LB({academicYear:e.academicYear,selfStudy:o,finalize:t});Pk.saveSelfStudyTemplate(l).then((function(e){g(!0),(null===e||void 0===e?void 0:e.succeeded)?l.finalize?(S.b.success("Program Review Finalized"),T.push(x.generate(x.SELF_STUDIES_ACADEMIC_YEAR_DASHBOARD,{academicYearId:l.academicYear},{}))):(p(e.selfStudy),S.b.success("Saved"),R(e.fieldErrors),h(!1),se()):(S.b.error("Program Review could not be saved"),R(e.fieldErrors),_(null===e||void 0===e?void 0:e.errors.join("\n")),C(!(null===e||void 0===e?void 0:e.succeeded)),g(!0))})).catch((function(){S.b.error("Program Review could not be saved.")})).finally((function(){j(!1)}))},le=function(){h(!0)},ue=function(e,t){console.log(t)},pe=function(){var e,t,n;if(d){var r=Vk.create(w?w.getFieldsValue():null);r.id=null!==(e=null===u||void 0===u?void 0:u.id)&&void 0!==e?e:re.default.Empty();var i=null===(t=r.selfStudySectionTemplates)||void 0===t?void 0:t.find((function(e){var t;return null===(t=null===e||void 0===e?void 0:e.selfStudySectionComponentTemplates)||void 0===t?void 0:t.find((function(e){return e.selfStudySectionComponentTypeId==Nk.PREVIOUSGOALS}))})),o=null===i||void 0===i?void 0:i.selfStudySectionComponentTemplates;i&&(i.selfStudySectionComponentTemplates=null===o||void 0===o?void 0:o.filter((function(e){return null!==(null===e||void 0===e?void 0:e.section)||(null===e||void 0===e?void 0:e.primaryText)||(null===e||void 0===e?void 0:e.selfStudySectionComponentTypeId)||(null===e||void 0===e?void 0:e.selfStudySectionTemplateSecondaryProgramScenarios)})));var a=null===(n=r.selfStudySectionTemplates)||void 0===n?void 0:n.find((function(e){var t;return null===(t=null===e||void 0===e?void 0:e.selfStudySectionComponentTemplates)||void 0===t?void 0:t.find((function(e){return e.selfStudySectionComponentTypeId==Nk.NEWGOALS}))}
1)),s=null===a||void 0===a?void 0:a.selfStudySectionComponentTemplates;a&&(a.selfStudySectionComponentTemplates=s.filter((function(e){return null!==(null===e||void 0===e?void 0:e.measureOfSuccess)||(null===e||void 0===e?void 0:e.primaryText)||(null===e||void 0===e?void 0:e.selfStudySectionComponentTypeId)||(null===e||void 0===e?void 0:e.selfStudySectionTemplateSecondaryProgramScenarios)}))),w.setFieldsValue({selfStudySectionTemplates:r.selfStudySectionTemplates})}c(!d)},fe=function(e){F(e)},he=function(){F(null)},ve=function(e,t){var n,r=Vk.create(w?w.getFieldsValue():null),o=r.selfStudySectionTemplates,a=(null!==(n=null===o||void 0===o?void 0:o.splice(Number.parseInt(e.toString()),1))&&void 0!==n?n:[])[0];null===o||void 0===o||o.splice(Number.parseInt(t.toString()),0,a),r.id=null===u||void 0===u?void 0:u.id,p(r),i(t.toString()),se()},me=function(e,t,n){"add"===t?function(e){var t,n;e(Gk.create({selfStudySectionTypeId:null,title:"New Section",selfStudySectionComponentTemplates:[Lk.create({selfStudySectionComponentTypeId:null})]}));var r=null!==(n=null===(t=w.getFieldsValue().selfStudySectionTemplates)||void 0===t?void 0:t.length)&&void 0!==n?n:0;i((r-1).toString())}(n):"remove"===t&&f.a.confirm({title:"Remove Section",content:"Are you sure you want to remove this Section?",onOk:function(){return ge(e)},okText:"Remove",width:500})},ge=function(e){var t=Number.parseInt(e),n=Vk.create(w?w.getFieldsValue():null),r=n.selfStudySectionTemplates;r.remove(r[t]),n.id=null===u||void 0===u?void 0:u.id,p(n),i((t-1>=0?t-1:t).toString()),w.setFieldsValue({selfStudySectionTemplates:n.selfStudySectionTemplates})},be=function(){return nW(void 0,void 0,void 0,(function(){var e,t;return rW(this,(function(n){switch(n.label){case 0:return ee(!0),e=Object(o.jsx)(Ek.Document,tW({title:"Self Study Configuration Pdf",subject:"Self Study Configuration Pdf"},{children:Oe()}),void 0),[4,Object(Ek.pdf)(e)];case 1:return t=n.sent(),Q(t),[2]}}))}))},ye=function(t,n){var r,i,a=Gk.create(),s=w.getFieldsValue(),c=(null!==(r=null===s||void 0===s?void 0:s.selfStudySectionTemplates)&&void 0!==r?r:[])[t.key];(null===u||void 0===u?void 0:u.selfStudySectionTemplates)&&(a=u.selfStudySectionTemplates[t.key]),!a&&(null===s||void 0===s?void 0:s.selfStudySectionTemplates)&&(a=null===s||void 0===s?void 0:s.selfStudySectionTemplates[t.key]);var l=!!E&&(null!==(i=E[Vk.selfStudySectionTemplates+n])&&void 0!==i&&i)?Object(o.jsxs)("span",{children:[Object(o.jsx)(yx.a,{color:"red"},void 0)," ",null===a||void 0===a?void 0:a.title]},void 0):ei.shorten(null===a||void 0===a?void 0:a.title,40,!0);return Object(o.jsx)(pa.a.TabPane,tW({tab:Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(UB.a,{},void 0)," ",l]},void 0),className:"customDraggableTab",closeIcon:Object(o.jsx)(Yd.a,{},void 0)},{children:!q||!d||0==c.selfStudySectionTemplateSecondaryProgramScenarios.length||c.selfStudySectionTemplateSecondaryProgramScenarios.findIndex((function(e){return e==q}))>-1?Object(o.jsx)(eW,{form:w,preview:d,section:a,sectionIndex:n,fieldErrors:E,submitted:m,academicYear:e.academicYear,secondaryProgramScenarioId:q,resetForm:se,onAltered:le,onTitleChange:ue},n):null}),n)},Oe=function(){var t;return Object(o.jsxs)(Ek.Page,tW({style:{padding:20}},{children:[Object(o.jsx)(Ek.View,tW({style:{margin:10}},{children:Object(o.jsxs)(Ek.Text,{children:[Object(o.jsx)(Ek.Image,{src:"/IDOE-logo-grayscale.png",style:{width:"50px",height:"50px",paddingBottom:"10pt"}},void 0)," Iowa Department of Education"]},void 0)}),void 0),null===(t=null===u||void 0===u?void 0:u.selfStudySectionTemplates)||void 0===t?void 0:t.map((function(t,n){return function(t,n){var r,i,a,s=Gk.create(),c=w.getFieldsValue(),l=(null!==(r=null===c||void 0===c?void 0:c.selfStudySectionTemplates)&&void 0!==r?r:[])[n];return(null===u||void 0===u?void 0:u.selfStudySectionTemplates)&&(s=u.selfStudySectionTemplates[n]),!s&&(null===c||void 0===c?void 0:c.selfStudySectionTemplates)&&(s=null===c||void 0===c?void 0:c.selfStudySectionTemplates[n]),Object(o.jsx)(Ek.View,tW({style:{paddingBottom:"10pt"}},{children:Object(o.jsx)(Ek.View,tW({style:{paddingBottom:"10pt"}},{children:Object(o.jsxs)(Ek.View,tW({style:{border:"1pt solid #f0f
10f0"}},{children:[Object(o.jsx)(Ek.Text,tW({style:{border:"1pt solid #f0f0f0",fontSize:12,backgroundColor:"#f0f0f0",padding:5}},{children:null===(a=(null!==(i=null===u||void 0===u?void 0:u.selfStudySectionTemplates)&&void 0!==i?i:[])[n])||void 0===a?void 0:a.title}),void 0),!q||!d||0==l.selfStudySectionTemplateSecondaryProgramScenarios.length||l.selfStudySectionTemplateSecondaryProgramScenarios.findIndex((function(e){return e==q}))>-1?Object(o.jsx)(eW,{form:w,preview:d,pdfView:!0,section:t,sectionIndex:n,fieldErrors:E,submitted:m,academicYear:e.academicYear,secondaryProgramScenarioId:q,resetForm:se,onAltered:le,onTitleChange:ue,sectionComplete:oe},n):null]}),void 0)}),void 0)}),void 0)}(t,n)}))]}),void 0)};return P&&q?Object(o.jsx)(pt.a,{active:!0},void 0):!P&&u?Object(o.jsx)(y.b,tW({direction:"vertical"},{children:Object(o.jsx)(Ci.a,tW({form:w,layout:"vertical",initialValues:u,onChange:le},{children:Object(o.jsx)(y.b,tW({direction:"vertical"},{children:Object(o.jsx)(Qn.a,tW({title:"Configuration",extra:Object(o.jsxs)(y.b,{children:[Object(o.jsx)("label",{children:"Preview: "},void 0),Object(o.jsx)(eF.a,{title:"preview",id:"preview",onChange:pe},void 0),d?Object(o.jsx)(hd,tW({defaultValue:q,dropdownMatchSelectWidth:!1,allowClear:!0,onClear:he,onSelect:fe},{children:null===Y||void 0===Y?void 0:Y.map((function(e){return function(e){var t,n,r;if(e.id)return Object(o.jsx)(pr.a.Option,tW({title:null!==(t=e.title)&&void 0!==t?t:"",value:null!==(n=e.id)&&void 0!==n?n:re.default.Empty()},{children:e.title}),null!==(r=e.id)&&void 0!==r?r:re.default.Empty())}(e)}))}),void 0):null]},void 0)},{children:Object(o.jsxs)(y.b,tW({direction:"vertical",size:"large"},{children:[Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(ot.a.Title,tW({level:5},{children:"Settings"}),void 0),Object(o.jsx)(mt.a,tW({},(new Map).set(Vk.minimumCareerAcademyScore,{required:!0,name:Vk.minimumCareerAcademyScore,label:"Minimum Career Academy Score",rules:[Ot.required()]}).get(Vk.minimumCareerAcademyScore),_t.getValidation(Vk.minimumCareerAcademyScore,e.fieldErrors,m),{children:Object(o.jsx)(RB,{},void 0)}),void 0)]},void 0),Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(ot.a.Title,tW({level:5},{children:"Sections"}),void 0),Object(o.jsx)(Wk.a,tW({name:Vk.selfStudySectionTemplates},{children:function(e,t){var n=t.add;return Object(o.jsx)(KB,tW({addIcon:Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(Xc.a,{},void 0)," Add Section"]},void 0),activeKey:r,onChange:de,tabPosition:"left",type:"editable-card",moveTabNode:ve,onEdit:function(e,t){return me(e,t,n)}},{children:e.map((function(e,t){return ye(e,t)}))}),void 0)}}),void 0)]},void 0),function(){if(!e.readonly)return Object(o.jsxs)(y.b,tW({direction:"horizontal",wrap:!0},{children:[Object(o.jsx)(rt.a,tW({type:"primary",loading:O,onClick:function(){return ce(!0)}},{children:"Save and Finalize"}),void 0),Object(o.jsx)(rt.a,tW({type:"default",loading:O,onClick:function(){return ce(!1)}},{children:"Save"}),void 0)]}),void 0)}()]}),void 0)}),void 0)}),void 0)}),void 0)}),void 0):Object(o.jsx)(pt.a,{active:!0},void 0)}));iW.displayName="SelfStudyConfigurationForm";var oW=iW,aW=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),sW=function(){return sW=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},sW.apply(this,arguments)},dW=function(e){function t(t){var n=e.call(this,t)||this;return n._modalRef=a.createRef(),n.onBack=function(){T.goBack()},n.renderActions=function(){var e=Object(o.jsx)(Gt.a,{children:Object(o.jsx)(Gt.a.Item,sW({title:"Download",onClick:function(){var e;return null===(e=n._modalRef.current)||void 0===e?void 0:e.documentDownload()}},{children:"Download"}),void 0)},void 0);return Object(o.jsx)(la.a,sW({overlay:e},{children:Object(o.jsx)(rt.a,sW({size:"large",type:"link"},{children:Object(o.jsx)(aa.a,{},void 0)}),void 0)}),void 0)},n.state={loading:!1,academicYear:0},n}return aW(t,e),t.prototype.componentDidMount=function(){var e=Number.parseInt(Hr.getPathPart(this.props.match,"academicYearId"));this.state.academicYear!=e&&this.setState({academicYear:e})},t.prototype.render=function(){var e=this,t=!1;return this.props.match.path.split("/").findIndex((function(e){return"academicYear-list"==e}))>-1&&(t=!0),Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Self Study Configuration",breadcrumbs:t?Xn.selfStudyConfigurationFromAcademicList(this.state.academicYear):Xn.selfStudyConfiguration(this.state.academicYear),onBack:function(){return e.onBack()},extra:this.renderActions()},void 0),Object(o.jsx)(oW,{ref:this._modalRef,academicYear:this.state.academicYear},void 0)]},void 0)},t}(a.Component);var cW=Object(u.i)(Object(l.b)((function(e){return{institution:e.Institution.Selected}}))(dW)),lW=function(){return lW=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},lW.apply(this,arguments)},uW=a.forwardRef((function(e){var t=a.createRef();return Object(a.useState)(!1)[0]?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsx)(ht.a,lW({ref:t,layout:"vertical",requiredMark:!0},{children:Object(o.jsxs)(y.b,lW({size:"small",direction:"vertical"},{children:[Object(o.jsxs)(Kn.b,lW({title:"Data",column:4},{children:[Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(at.a,lW({to:x.generate(x.ACADEMIC_YEAR_AREA_EDUCATION_AGENCIES_CONFIGURATION,{academicYearId:e.academicYear},{})},{children:"Area Education Agencies"}),void 0)},void 0),Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(at.a,lW({to:x.generate(x.ACADEMIC_YEAR_FEDERAL_CLUSTERS_CONFIGURATION,{academicYearId:e.academicYear},{})}
1,{children:"Federal Clusters"}),void 0)},void 0),Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(at.a,lW({to:x.generate(x.ACADEMIC_YEAR_REGIONAL_PLANNING_PARTNER_CONFIGURATION,{academicYearId:e.academicYear},{})},{children:"Regional Planning Partner"}),void 0)},void 0),Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(at.a,lW({to:x.generate(x.ACADEMIC_YEAR_SCENARIOS_CONFIGURATION,{academicYearId:e.academicYear},{})},{children:"Scenarios"}),void 0)},void 0),Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(at.a,lW({to:x.generate(x.ACADEMIC_YEAR_SERVICE_AREAS_CONFIGURATION,{academicYearId:e.academicYear},{})},{children:"Service Areas"}),void 0)},void 0)]}),void 0),Object(o.jsxs)(Kn.b,lW({title:"Imports",column:4},{children:[Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(at.a,lW({to:x.generate(x.ACADEMIC_YEAR_SECONDARY_CIP_NUMBER_CONFIGURATION,{academicYearId:e.academicYear},{})},{children:"CIP Numbers"}),void 0)},void 0),Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(at.a,lW({to:x.generate(x.ACADEMIC_YEAR_SECONDARY_COURSES_CONFIGURATION,{academicYearId:e.academicYear},{})},{children:"Courses"}),void 0)},void 0),Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(at.a,lW({to:x.generate(x.ACADEMIC_YEAR_DISTRICT_CONFIGURATION,{academicYearId:e.academicYear},{})},{children:"Districts"}),void 0)},void 0),Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(at.a,lW({to:x.generate(x.ACADEMIC_YEAR_DISTRICT_CONTACT_CONFIGURATION,{academicYearId:e.academicYear},{})},{children:"District Contacts"}),void 0)},void 0),Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(at.a,lW({to:x.generate(x.ACADEMIC_YEAR_SECONDARY_PROGRAM_CONFIGURATION,{academicYearId:e.academicYear},{})},{children:"Programs"}),void 0)},void 0),Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(at.a,lW({to:x.generate(x.ACADEMIC_YEAR_SECONDARY_PROGRAM_COURSES_CONFIGURATION,{academicYearId:e.academicYear},{})},{children:"Program Courses"}),void 0)},void 0)]}),void 0),Object(o.jsxs)(Kn.b,lW({title:"Program Review Year",column:4},{children:[Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(at.a,lW({to:x.generate(x.ACADEMIC_YEAR_CONFIGURATION,{academicYearId:e.academicYear},{})},{children:"Dates Configuration"}),void 0)},void 0),Object(o.jsx)(Kn.b.Item,{children:Object(o.jsx)(at.a,lW({to:x.generate(x.SELF_STUDIES_CONFIGURATION,{academicYearId:e.academicYear},{})},{children:"Self Study Configuration"}),void 0)},void 0)]}),void 0)]}),void 0)}),void 0)}));uW.displayName="AcademicYearConfigurationForm";var pW=uW,fW=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),hW=function(){return hW=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},hW.apply(this,arguments)},vW=function(e){function t(t){var n=e.call(this,t)||this;return n.loadAcademicYear=function(e){n.setState({loading:!0});var t=Sk({academicYearId:e});return sL.getAcademicYear(t).then((function(t){var r;t&&t.academicYear&&n.setState({academicYearDto:null!==(r=n.cleanResultDates(t.academicYear))&&void 0!==r?r:fk.create(),academicYear:e})})).catch().finally((function(){n.setState({loading:!1})}))},n.changeTab=function(e){n.setState({activeTab:e}),T.replace(x.generate("",{},{activeTab:e}),{activeTab:e})},n.cleanResultDates=function(e){return null!=e&&(e.instructorStartDate=It()(e.instructorStartDate),e.instructorEndDate=It()(e.instructorEndDate),e.rppStartDate=It()(e.rppStartDate),e.rppEndDate=It()(e.rppEndDate),e.deStartDate=It()(e.deStartDate),e.deEndDate=It()(e.deEndDate),e.commentReleaseDate=It()(e.commentReleaseDate),e.finalizationDate=It()(e.finalizationDate)),e},n.onBack=function(e){e?T.push(x.generate(x.ALL_ACADEMIC_YEARS,{academicYearId:n.state.academicYear},{})):T.push(x.generate(x.ACADEMIC_YEARS,{academicYearId:n.state.academicYear},{}))},n.onProgramConsultantCommentsReportClick=function(){T.push(x.generate(x.ACADEMIC_YEAR_PROGRAM_CONSULTANT_COMMENT_REPORT,{academicYearId:n.state.academicYear}))},n.onRankingReportClick=function(){T.push(x.generate(x.ACADEMIC_YEAR_SELF_STUDY_RANKING_REPORT,{academicYearId:n.state.academicYear}))},n.onSelfStudyAggregateReportClick=function(){T.push(x.generate(x.ACADEMIC_YEAR_SELF_STUDY_AGGREGATE_REPORT,{academicYearId:n.state.academicYear}))},n.goToContactReport=function(){T.push(x.generate(x.ACADEMIC_YEAR_CONTACTS_REPORT,{academicYearId:n.state.academicYear},{}))},n.goToCareerAcademyReport=function(){T.push(x.generate(x.ACADEMIC_YEAR_CAREER_ACADEMY_REPORT,{academicYearId:n.state.academicYear},{}))},n.goToActionPlanReport=function(){T.push(x.generate(x.ACADEMIC_YEAR_ACTION_PLAN_REPORT,{academicYearId:n.state.academicYear},{}))},n.goToScenarioReport=function(){T.push(x.generate(x.ACADEMIC_YEAR_SCENARIO_REPORT,{academicYearId:n.state.academicYear},{}))},n.goToProgramMasterReport=function(){T.push(x.generate(x.ACADEMIC_YEAR_PROGRAM_MASTER_REPORT,{academicYearId:n.state.academicYear},{}))},n.goToEducationProgramReport=function(){T.push(x.generate(x.ACADEMIC_YEAR_EDUCATION_PROGRAM_REPORT,{academicYearId:n.state.academicYear},{}))},n.goBack=function(){T.push(x.generate(x.ACADEMIC_YEARS,{},{}))},n.state={loading:!1,academicYear:0,activeTab:"dashboard",academicYearDto:fk.create()},n}return fW(t,e),t.prototype.componentDidMount=function(){var e=Number.parseInt(Hr.getPathPart(this.props.match,"academicYearId")),t=Hr.getParameter("activeTab","dashboard");this.setState({activeTab:t}),this.setState({loading:!0}),this.state.academicYear!=e&&this.loadAcademicYear(e)},t.prototype.render=function(){var e=this;if(this.state.loading||0==this.state.academicYear)return Object(o.jsx)(pt.a,{active:!0},void 0);var t=!1;this.props.match.path.split("/").findIndex((function(e){return"academicYearList"==e}))>-1&&(t=!0);var n=[TL.OPEN,TL.SELFSTUDYPREPARATION,TL.SELFSTUDYSUBMITTED];return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:this.state.academicYear+" - "+(this.state.academicYear+1),onBack:this.goBack,breadcrumbs:Xn.academicYearDashboard(this.state.academicYear),footer:Object(o.jsxs)(pa.a,hW({activeKey:this.state.activeTab,onChange:this.changeTab},{children:[Object(o.jsx)(pa.a.TabPane,{id:"dashboard",tab:"Dashboard"},"dashboard"),n.findIndex((function(t){return t==e.state.academicYearDto.academicYearStatusTypeId}))<=-1?Object(o.jsx)(pa.a.TabPane,{tab:"Program Reviews"},"programs"):null,Je.isAuthorized([gn.DOWNLOAD_REPORTS])?Object(o.jsx)(pa.a.TabPane,{tab:"Reports"},"reports"):null,Je.isAuthorized([gn.EDIT_PROGRAM_REVIEW,gn.CONFIG_ACADEMIC_YEAR])?Object(o.jsx)(pa.a.TabPane,{tab:"Configuration"},"configuration"):null]}),void 0)},void 0),this.renderWorkFlowDashboard(t),this.renderSeflStudies(),this.renderReportsTab(),this.renderConfigurationPage()]},void 0)},t.prototype.renderWorkFlowDashboard=function(e){if("dashboard"==this.state.activeTab)return Object(o.jsx)(Qn.a,hW({title:"Work Flow"},{children:Object(o.jsx)(IB,{compactView:!1,fromAcademicYearList:e,academicYear:this.state.academicYearDto,loadAcademicYear:this.loadAcademicYear,selectedDistrict:this.props.selectedDistrict,selectedRPP:this.props.selectedRPP},void 0)}),void 0)},t.prototype.renderConfigurationPage=function(){if("configuration"==this.state.activeTab)return Object(o.jsx)(Qn.a,hW({title:"Configuration"},{children:Object(o.jsx)(pW,{academicYear:this.state.academicYear},void 0)}),void 0)},t.prototype.renderSeflStudies=function(){var e;if("programs"==this.state.activeTab)return Object(o.jsx)(Qn.a,hW({title:"Programs"},{children:Object(o.jsx)(FL,{academicYearData:null!==(e=this.state.academicYearDto)&&void 0!==e?e:void 0,academicYear:this.state.academicYear,selectedDistrict:this.props.selectedDistrict,selectedRPP:this.props.selectedRPP,fromAcademicDashboard:!0},void 0)}),void 0)},t.prototype.renderReportsTab=function(){if(Je.isAuthorized([gn.DOWNLOAD_REPORTS])&&"reports"==this.state.activeTab)return Object(o.jsxs)(Qn.a,hW({title:"Reports"},{children:[Object(o.jsx)(b.a,{children:Object(o.jsx)(rt.a,hW({type:"link",onClick:this.goToActionPlanReport},{children:"Action Plan Report"}),void 0)},void 0),Object(o.jsx)(b.a,{children:Object(o.jsx)(rt.a,hW({type:"link",onClick:this.goToCareerAcademyReport},{children:"Career Academy Report"}),void 0)},void 0),Object(o.jsx)(b.a,{children:Object(o.jsx)(rt.a,hW({type:"link",onClick:this.goToContactReport},{children:"Contact Information Report"}),void 0)},void 0),Object(o.jsx)(b.a,{children:Object(o.jsx)(rt.a,hW({type:"link",onClick:this.onProgramConsultantCommentsReportClick},{children:"Program Consultant Comment Report"}),void 0)},void 0),Object(o.jsx)(b.a,{children:Object(o.jsx)(rt.a,hW({type:"link",onClick:this.onRankingReportClick},{children:"Ranking Report"}),void 0)},void 0),Object(o.jsx)(b.a,{children:Object(o.jsx)(rt.a,hW({type:"link",onClick:this.onSelfStudyAggregateReportClick},{children:"Aggregate Report"}),void 0)},void 0),Object(o.jsx)(b.a,{children:Object(o.jsx)(rt.a,hW({type:"link",onClick:this.goToScenarioReport},{children:"Scenario Report"}),void 0)},void 0),Object(o.jsx)(b.a,{children:Object(o.jsx)(rt.a,hW({type:"link",onClick:this.goToProgramMasterReport},{children:"Program Master Report"}),void 0)},void 0),Object(o.jsx)(b.a,{children:Object(o.jsx)(rt.a,hW({type:"link",onClick:this.goToEducationProgramReport},{children:"Education Program Report"}),void 0)},void 0)]}),void 0)},t}(a.Component);var mW=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected,selectedDistrict:e.District.Selected,selectedRPP:e.RegionalPlanningPartner.Selected}}))(vW)),gW=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),bW=function(){return bW=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},bW.apply(this,arguments)},yW=function(e){function t(t){var n=e.call(this,t)||this;return n.onBack=function(){T.goBack()},n.toggleEdit=function(){n.setState({isEditing:!n.state.isEditing})},n.state={loading:!1,academicYear:0},n}return gW(t,e),t.prototype.componentDidMount=function(){var e=Number.parseInt(Hr.getPathPart(this.props.match,"academicYearId"));this.setState({academicYear:e})},t.prototype.render=function(){var e=Object(o.jsx)(Ze,bW({validFeatureFlags:[gn.CONFIG_ACADEMIC_YEAR]},{children:Object(o.jsx)(Br,{onClick:this.toggleEdit,isEditing:this.state.isEditing},void 0)}),void 0);return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Program Review Year Dates",breadcrumbs:Xn.academicYearDatesConfigurationList(this.state.academicYear),onBack:this.onBack},void 0),Object(o.jsx)(y.b,bW({direction:"vertical",size:"large"},{children:Object(o.jsx)(Qn.a,bW({title:"Program Review Year Dates",extra:e},{children:Object(o.jsx)(y.b,bW({direction:"vertical",size:"large"},{children:Object(o.jsx)(PB,{academicYearId:this.state.academicYear,isEditing:this.state.isEditing},void 0)}),void 0)}),void 0)}),void 0)]},void 0)},t}(a.Component);var OW=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected}}))(yW)),jW=function(){return jW=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},jW.apply(this,arguments)};var IW=function(e){return Object(o.jsxs)(Og,jW({direction:"vertical",current:e.currentStep},{children:[Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{title:"Set Milestone Dates"},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{title:"Review Area Education Agency"},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{title:"Review Active Users"},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{title:"Review Course Data"},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{title:"Review Program Data"},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{title:"Start Program Review Year"},void 0)},void 0)]}),void 0)},SW=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),EW=function(){return EW=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},EW.apply(this,arguments)},RW=function(e){function t(t){var n=e.call(this,t)||this;return n.componentDidMount=function(){n.portalRoot=document.getElementById("academicYearCardPortal"),n.portalRoot&&n.portalRoot.appendChild(n.el)},n.componentWillUnmount=function(){n.portalRoot&&n.portalRoot.removeChild(n.el)},n.el=document.createElement("div"),n.state={},n}
1return SW(t,e),t.prototype.render=function(){var e=Object(o.jsx)(a.Fragment,{children:Object(o.jsx)(Qn.a,EW({title:this.props.title},{children:Object(o.jsxs)(b.a,{children:[Object(o.jsx)(m.a,EW({},En.ONE_QUARTER,{children:Object(o.jsx)(IW,{currentStep:this.props.currentStep},void 0)}),void 0),Object(o.jsx)(m.a,EW({},En.HALF,{children:this.props.children}),void 0)]},void 0)}),void 0)},void 0);return c.a.createPortal(e,this.el)},t}(a.Component),_W=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),TW=function(){return TW=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},TW.apply(this,arguments)},CW=function(e){function t(t){var n=e.call(this,t)||this;return n.goToNextStep=function(e){T.push(x.generate(x.REVIEW_AREA_EDUCATION_AGENCY,{academicYearId:n.state.academicYearId},{fromAcademicYearList:e,reviewAcademicYear:!0}))},n.state={loading:!1,academicYearId:0},n}return _W(t,e),t.prototype.componentDidMount=function(){var e=Number.parseInt(Hr.getPathPart(this.props.match,"academicYearId"));this.state.academicYearId!=e&&this.setState({academicYearId:e})},t.prototype.render=function(){var e=!1;return this.props.match.path.split("/").findIndex((function(e){return"academicYear-list"==e}))>-1&&(e=!0),Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Program Review Year",breadcrumbs:Xn.academicYearDashboard(this.state.academicYearId)},void 0),Object(o.jsxs)(y.b,TW({direction:"vertical",size:"large"},{children:[Object(o.jsx)("div",{id:"academicYearCardPortal"},void 0),Object(o.jsx)(RW,TW({currentStep:0,title:"Opening "+this.state.academicYearId+"-"+(this.state.academicYearId+1)+" Program Review Year"},{children:Object(o.jsx)(PB,{fromAcademicYearList:e,academicYearId:this.state.academicYearId,onSubmit:this.goToNextStep},void 0)}),void 0)]}),void 0)]},void 0)},t}(a.Component);var xW=Object(u.i)(Object(l.b)((function(e){return{institution:e.Institution.Selected}}))(CW));var AW=function(){var e=Object(a.useState)([])[1];Object(a.useEffect)((function(){Ii.AcademicYearStatusTypes().then((function(t){e(t)}))}),[]);var t=function(e){return $r.isWithinRange(It()(e.instructorStartDate),It()(e.instructorEndDate))?"Instructor Response":$r.isBeforeRange(It()(e.instructorStartDate))&&Je.isAuthorized([gn.CONFIG_ACADEMIC_YEAR])?"Open Program Review Year":n(e)},n=function(e){return $r.isWithinRange(It()(e.rppStartDate),It()(e.rppEndDate))?"RPP Response":r(e)},r=function(e){return $r.isWithinRange(It()(e.deStartDate),It()(e.deStartDate))?"DE Response":i(e)},i=function(e){return $r.isBeforeRange(It()(e.commentReleaseDate))?"Comment Release":s(e)},s=function(e){return $r.isBeforeRange(It()(e.finalizationDate))?"Finalization":"Program Review Year Closed"},d=[];return d.push(oo.Reset()),Object(o.jsx)(io,{onRowClick:function(e){T.push(x.generate(x.SELF_STUDIES_ACADEMIC_YEAR_DASHBOARD,{academicYearId:e.id}))},serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:d,columns:[{title:"Year",dataIndex:fk.id,sorter:!0,width:50,render:function(e,t){return t.id+"-"+(t.id+1)},filterType:wr.Text},{title:"State",dataIndex:fk.className,width:75,render:function(e,n){return t(n)}}],fetchData:{fetch:function(e){return sL.getAcademicYearTableData(e)}},stateSaving:{enabled:!0,tableUniqueKey:"academic_years_list"}},void 0)},PW=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),NW=function(){return NW=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},NW.apply(this,arguments)},wW=function(e){function t(t){var n=e.call(this,t)||this;return n.onBack=function(){T.push(x.generate(x.ACADEMIC_YEARS,{},{}))},n}return PW(t,e),t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Program Review Years",breadcrumbs:Xn.academicYearList(),onBack:this.onBack},void 0),Object(o.jsx)(y.b,NW({direction:"vertical",size:"large"},{children:Object(o.jsx)(Qn.a,NW({title:"Program Review Years"},{children:Object(o.jsx)(y.b,NW({direction:"vertical",size:"large"},{children:Object(o.jsx)(AW,{},void 0)}),void 0)}),void 0)}),void 0)]},void 0)},t}(a.Component);var DW=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected}}))(wW)),qW=function(e){return Object.assign({academicYear:0},e)},FW={className:"SelfStudyRankingReportDataTableDTO",create:function(e){return Object.assign(Q.create(),{selfStudyResponseId:"00000000-0000-0000-0000-000000000000",rpp:"",communityCollege:"",district:"",serviceArea:"",cipNumber:"",program:"",submitter:"",reviewer:"",reviewYear:0,reviewType:""},e)},selfStudyResponseId:"selfStudyResponseId",rpp:"rpp",communityCollege:"communityCollege",district:"district",serviceArea:"serviceArea",cipNumber:"cipNumber",program:"program",submitter:"submitter",reviewer:"reviewer",reviewYear:"reviewYear",reviewT
1ype:"reviewType"};var MW=function(e){var t=void 0,n=Object(a.useState)([])[1],r=Object(a.useState)([]),i=r[0],s=r[1],d=Object(a.useState)({}),c=d[0],l=d[1],u=Object(a.useState)([]),p=u[0],f=u[1],h=Object(a.useState)(!1)[1],v=Object(a.useState)(!1),m=v[0],g=v[1];a.useEffect((function(){var e=[];Ii.SelfStudyResponseTypes().then((function(e){n(e)})),Ii.Institutions().then((function(e){return f(e)})),b(),e.push(y()),e.push(O()),Promise.all(e).then((function(){g(!1),b()}))}),[]);var b=function(){null===t||void 0===t||t.refresh()},y=function(){var t;return Pk.getSelfStudy(null!==(t=e.academicYear)&&void 0!==t?t:0).then((function(e){var t;e&&l(null!==(t=e.selfStudy)&&void 0!==t?t:Vk.create())})).catch((function(){h(!0)}))},O=function(){var t=qW({academicYear:e.academicYear});return lL.getSelfStudyResponses(t).then((function(e){e.selfStudyResponses&&s(e.selfStudyResponses)}))},j=[];return j.push(oo.Reset()),j.push(oo.Default("Export",(function(){window.open(x.generateFull(x.SELF_STUDY_RANKING_REPORT,{},{academicYear:e.academicYear}),"_blank")}))),m?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsx)(o.Fragment,{children:Object(o.jsx)(io,{ref:function(e){return t=e},serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:j,columns:function(){var e,t=[{title:"Regional Planning Partner",dataIndex:FW.rpp,sorter:!0,width:50,render:function(e,t){return t.rpp},filterType:wr.Text},{title:"Community College",dataIndex:FW.communityCollege,sorter:!0,width:50,render:function(e,t){return t.communityCollege},filterType:wr.DropdownMulti,dropdownFilterOptions:p},{title:"District",dataIndex:FW.district,sorter:!0,width:50,render:function(e,t){return t.district},filterType:wr.Text},{title:"Service Area",dataIndex:FW.serviceArea,sorter:!0,width:50,render:function(e,t){return t.serviceArea},filterType:wr.Text},{title:"CIP Number",dataIndex:FW.cipNumber,sorter:!0,width:50,render:function(e,t){return t.cipNumber},filterType:wr.Text},{title:"Program",dataIndex:FW.program,sorter:!0,width:50,render:function(e,t){return t.program},filterType:wr.Text},{title:"Submitter",dataIndex:FW.submitter,sorter:!0,width:50,render:function(e,t){return t.submitter},filterType:wr.Text},{title:"Review Year",dataIndex:FW.reviewYear,sorter:!0,width:50,render:function(e,t){return t.reviewYear+" "+t.reviewType},filterType:wr.Text}];return null===(e=c.selfStudySectionTemplates)||void 0===e||e.forEach((function(e){var n,r=[];null===(n=e.selfStudySectionComponentTemplates)||void 0===n||n.forEach((function(t){var n;r.push({title:null!==(n=t.rankingQuestionIdentifier)&&void 0!==n?n:e.order+1+"."+(t.order+1),render:function(n,r){var o,a,s,d,c,l;return null!==(l=null===(c=null===(d=null===(s=null===(a=null===(o=i.find((function(e){return e.id==r.selfStudyResponseId})))||void 0===o?void 0:o.selfStudySectionResponses)||void 0===a?void 0:a.find((function(t){return t.selfStudySectionTemplateId==e.id})))||void 0===s?void 0:s.selfStudySectionComponentResponses)||void 0===d?void 0:d.find((function(e){return e.selfStudySectionComponentTemplateId==t.id})))||void 0===c?void 0:c.rating)&&void 0!==l?l:0}})})),t.push({title:e.title,dataIndex:SL.id,width:50,children:r})})),t}(),fetchData:{fetch:function(t){var n;return lL.getSelfStudyReportTableData(t,0==e.academicYear?0:null!==(n=e.academicYear)&&void 0!==n?n:0)}},stateSaving:{enabled:!0,tableUniqueKey:"self_study_list"}},void 0)},void 0)},YW=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),UW=function(){return UW=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},UW.apply(this,arguments)},LW=function(e){function t(t){var n=e.call(this,t)||this;return n.loadAcademicYears=function(e){n.setState({loading:!0});var t=ML({academicYearId:e});return sL.getAcademicYears(t).then((function(e){var t;e&&e.academicYears&&n.setState({academicYears:null!==(t=e.academicYears)&&void 0!==t?t:[],academicYear:$r.getCurrentYear()})})).catch().finally((function(){n.setState({loading:!1})}
1))},n.loadSelfStudies=function(e){var t=jL({academicYearId:null!==e&&void 0!==e?e:0});lL.getSelfStudies(t).then((function(e){var t;e&&n.setState({selfStudy:null!==(t=e.selfStudies)&&void 0!==t?t:[]})})).finally((function(){n.setState({loading:!1})}))},n.onSelect=function(e){n.setState({academicYear:e}),n.loadSelfStudies(e)},n.onBack=function(){T.goBack()},n.state={loading:!1,academicYear:0,academicYears:[],fromSelfStudies:!1,fromAcademicYearList:!1,selfStudy:[]},n}return YW(t,e),t.prototype.componentDidMount=function(){var e=Number.parseInt(Hr.getPathPart(this.props.match,"academicYearId"));this.setState({fromAcademicYearList:this.props.match.path.split("/").findIndex((function(e){return"academicYearList"==e}))>-1,fromSelfStudies:this.props.match.path.split("/").findIndex((function(e){return"selfStudy"==e}))>-1}),this.state.academicYear!=e?(this.setState({academicYear:e,fromSelfStudies:!0}),this.loadSelfStudies(e)):this.loadAcademicYears(e)},t.prototype.render=function(){var e=this,t=0==this.state.academicYear?0:this.state.academicYear,n=Number.parseInt(Hr.getPathPart(this.props.match,"academicYearId"));return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Ranking Report",breadcrumbs:Xn.selfStudyReport(t),onBack:this.onBack,extra:this.state.fromSelfStudies?null:Object(o.jsx)(hd,UW({value:this.state.academicYear,onSelect:this.onSelect,dropdownMatchSelectWidth:!1},{children:this.state.academicYears.map((function(t){return e.renderAcademicYear(t)}))}),void 0)},void 0),Object(o.jsx)(y.b,UW({direction:"vertical",size:"large"},{children:Object(o.jsx)(Qn.a,UW({title:"Ranking Report"},{children:Object(o.jsx)(y.b,UW({direction:"vertical",size:"large"},{children:Object(o.jsx)(MW,{academicYear:n,selectedDistrict:this.props.selectedDistrict,selectedRPP:this.props.selectedRPP,fromSelfStudies:this.state.fromSelfStudies,fromAcademicYearList:this.state.fromAcademicYearList},void 0)}),void 0)}),void 0)}),void 0)]},void 0)},t.prototype.renderAcademicYear=function(e){return Object(o.jsx)(pr.a.Option,UW({value:e.id},{children:e.id}),e.id)},t}(a.Component);var kW=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected,selectedDistrict:e.District.Selected,selectedRPP:e.RegionalPlanningPartner.Selected}}))(LW)),GW={className:"ProgramConsultantCommentDataTableDTO",create:function(e){return Object.assign(Q.create(),{selfStudyResponseId:"00000000-0000-0000-0000-000000000000",selfStudyResponse:null,selfStudyId:"00000000-0000-0000-0000-000000000000",rpp:"",communityCollege:"",district:"",serviceArea:"",cipNumber:"",program:"",submitter:"",responseType:"",reviewYear:0},e)},selfStudyResponseId:"selfStudyResponseId",selfStudyResponse:"selfStudyResponse",selfStudyId:"selfStudyId",rpp:"rpp",communityCollege:"communityCollege",district:"district",serviceArea:"serviceArea",cipNumber:"cipNumber",program:"program",submitter:"submitter",responseType:"responseType",reviewYear:"reviewYear"};var VW=function(e){var t=void 0,n=Object(a.useState)([])[1],r=Object(a.useState)([]),i=r[0],s=r[1],d=Object(a.useState)({}),c=d[0],l=d[1],u=Object(a.useState)(!1),p=u[0],f=u[1],h=Object(a.useState)([]),v=h[0],m=h[1],g=Object(a.useState)(!1)[1];a.useEffect((function(){f(!0);var e=[];Ii.SelfStudyResponseTypes().then((function(e){n(e)})),Ii.Institutions().then((function(e){return m(e)})),b(),e.push(O()),e.push(y()),Promise.all(e).then((function(){f(!1),b()}))}),[]);var b=function(){null===t||void 0===t||t.refresh()},y=function(){var t;return Pk.getSelfStudy(null!==(t=e.academicYear)&&void 0!==t?t:0).then((function(e){var t;e&&l(null!==(t=e.selfStudy)&&void 0!==t?t:Vk.create())})).catch((function(){g(!0)}))},O=function(){var t=qW({academicYear:e.academicYear});lL.getSelfStudyResponses(t).then((function(e){e.selfStudyResponses&&s(e.selfStudyResponses)}))},j=[];return j.push(oo.Reset()),j.push(oo.Default("Export",(function(){window.open(x.generateFull(x.PROGRAM_CONSULTANT_COMMENTS,{},{academicYear:e.academicYear}),"_blank")}))),p?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsx)(o.Fragment,{children:Object(o.jsx)(io,{ref:function(e){return t=e},serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:j,columns:function(){var e,t,n,r,a,s,d,l,u=[{title:"Regional Planning Partner",dataIndex:GW.rpp,sorter:!0,render:function(e,t){return t.rpp},filterType:wr.Text},{title:"Community College",dataIndex:GW.communityCollege,sorter:!0,render:function(e,t){return t.communityCollege},filterType:wr.DropdownMulti,dropdownFilterOptions:v},{title:"District",dataIndex:GW.district,sorter:!0,render:function(e,t){return t.district},filterType:wr.Text},{title:"Service Area",dataIndex:GW.serviceArea,sorter:!0,render:function(e,t){return t.serviceArea},filterType:wr.Text},{title:"CIP",dataIndex:GW.cipNumber,sorter:!0,render:function(e,t){return t.cipNumber},filterType:wr.Text},{title:"Program",dataIndex:GW.program,sorter:!0,render:function(e,t){return t.program},filterType:wr.Text},{title:"Submitter",dataIndex:GW.submitter,sorter:!0,render:function(e,t){return t.submitter},filterType:wr.Text},{title:"Review Year",dataIndex:GW.reviewYear,sorter:!0,render:function(e,t){var n,r;return Object(o.jsxs)("span",{children:[null!==(n=null===t||void 0===t?void 0:t.reviewYear)&&void 0!==n?n:"0"," ",null!==(r=null===t||void 0===t?void 0:t.responseType)&&void 0!==r?r:"district"," "]},void 0)},filterType:wr.Text}];null===(e=null===c||void 0===c?void 0:c.selfStudySectionTemplates)||void 0===e||e.forEach((function(e){var t=[];t.push({title:"RPP PEER REVIEW COMMENTS",render:function(t,n){var r,o,a;return null===(a=null===(o=null===(r=i.find((function(e){return e.selfStudyId==n.selfStudyId&&e.selfStudyReponseTypeId==CL.RPP})))||void 0===r?void 0:r.selfStudySectionResponses)||void 0===o?void 0:o.find((function(t){var n;return(null===(n=t.selfStudySectionTemplate)||void 0===n?void 0:n.order)==e.order})))||void 0===a?void 0:a.sectionComments}}),t.push({title:"DE CONSULTANT COMMENTS",render:function(t,n){var r,o,a;return null===(a=null===(o=null===(r=i.find((function(e){return e.id==n.selfStudyResponseId})))||void 0===r?void 0:r.selfStudySectionResponses)||void 0===o?void 0:o.find((function(t){var n;return(null===(n=t.selfStudySectionTemplate)||void 0===n?void 0:n.order)==e.order})))||void 0===a?void 0:a.sectionComments}}),u.push({title:e.title,dataIndex:SL.id,children:t})}));var p=[];if(c&&0!=(null===i||void 0===i?void 0:i.length)){var f=null!==(n=null===(t=null===c||void 0===c?void 0:c.selfStudySectionTemplates)||void 0===t?void 0:t.findIndex((function(e){var t,n;return(null!==(n=null===(t=e.selfStudySectionComponentTemplates)||void 0===t?void 0:t.findIndex((function(e){return e.selfStudySectionComponentTypeId==Nk.CONSULTANTREVIEW})))&&void 0!==n?n:-1)>-1})))&&void 0!==n?n:0,h=null!==(a=(null!==(r=null===c||void 0===c?void 0:c.selfStudySectionTemplates)&&void 0!==r?r:[])[f])&&void 0!==a?a:0,m=null===(s=h.selfStudySectionComponentTemplates)||void 0===s?void 0:s.find((function(e){return e.selfStudySectionComponentTypeId==Nk.CONSULTANTREVIEW})),g=null===(l=null===(d=h.selfStudySectionComponentTemplates)||void 0===d?void 0:d.find((function(e){return e.selfStudySectionComponentTypeId==Nk.CONSULTANTREVIEW})))||void 0===l?void 0:l.selfStudyResponseTemplateConsultantReviewQuestions;null===g||void 0===g||g.forEach((function(e){p.push({title:e.question,render:function(t,n){var r,o,a,s,d,c,l,u=null===(l=(null!==(c=null===(d=null===(s=null===(a=(null!==(o=null===(r=i.find((function(e){return e.id==n.selfStudyResponseId})))||void 0===r?void 0:r.selfStudySectionResponses)&&void 0!==o?o:[])[f])||void 0===a?void 0:a.selfStudySectionComponentResponses)||void 0===s?void 0:s.find((function(e){return e.selfStudySectionComponentTemplateId==(null===m||void 0===m?void 0:m.id)}
1)))||void 0===d?void 0:d.selfStudyResponseConsultantReviewQuestionDTOs)&&void 0!==c?c:[])[e.order])||void 0===l?void 0:l.consultantAnswer;return void 0!=u?1==u?"Yes":"No":""}}),p.push({title:"Comments",render:function(t,n){var r,o,a,s,d,c,l,u;return null!==(u=null===(l=(null!==(c=null===(d=null===(s=null===(a=(null!==(o=null===(r=i.find((function(e){return e.id==n.selfStudyResponseId})))||void 0===r?void 0:r.selfStudySectionResponses)&&void 0!==o?o:[])[f])||void 0===a?void 0:a.selfStudySectionComponentResponses)||void 0===s?void 0:s.find((function(e){return e.selfStudySectionComponentTemplateId==(null===m||void 0===m?void 0:m.id)})))||void 0===d?void 0:d.selfStudyResponseConsultantReviewQuestionDTOs)&&void 0!==c?c:[])[e.order])||void 0===l?void 0:l.comment)&&void 0!==u?u:""}})})),u.push({title:"CONSULTANT REVIEW OF OVERALL PROGRAM PRIORITIES AND ACTION PLANS",dataIndex:SL.id,children:p})}return u}(),fetchData:{fetch:function(t){var n;return lL.getProgramConsultantCommentDataTable(t,0==e.academicYear?0:null!==(n=e.academicYear)&&void 0!==n?n:0)}},stateSaving:{enabled:!0,tableUniqueKey:"self_study_list"}},void 0)},void 0)},BW=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),WW=function(){return WW=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},WW.apply(this,arguments)},zW=function(e){function t(t){var n=e.call(this,t)||this;return n.loadAcademicYears=function(e){n.setState({loading:!0});var t=ML({academicYearId:e});return sL.getAcademicYears(t).then((function(e){var t;e&&e.academicYears&&n.setState({academicYears:null!==(t=e.academicYears)&&void 0!==t?t:[],academicYear:$r.getCurrentYear()})})).catch().finally((function(){n.setState({loading:!1})}))},n.loadSelfStudies=function(e){var t=jL({academicYearId:null!==e&&void 0!==e?e:0});lL.getSelfStudies(t).then((function(e){var t;e&&n.setState({selfStudy:null!==(t=e.selfStudies)&&void 0!==t?t:[]})})).finally((function(){n.setState({loading:!1})}))},n.onSelect=function(e){n.setState({academicYear:e}),n.loadSelfStudies(e)},n.onBack=function(){T.goBack()},n.state={loading:!1,academicYear:0,academicYears:[],fromSelfStudies:!1,fromAcademicYearList:!1,selfStudy:[]},n}return BW(t,e),t.prototype.componentDidMount=function(){var e=Number.parseInt(Hr.getPathPart(this.props.match,"academicYearId"));this.setState({fromAcademicYearList:this.props.match.path.split("/").findIndex((function(e){return"academicYearList"==e}))>-1,fromSelfStudies:this.props.match.path.split("/").findIndex((function(e){return"selfStudy"==e}))>-1}),this.state.academicYear!=e?(this.setState({academicYear:e,fromSelfStudies:!0}),this.loadSelfStudies(e)):this.loadAcademicYears(e)},t.prototype.render=function(){var e=this,t=0==this.state.academicYear?0:this.state.academicYear,n=Number.parseInt(Hr.getPathPart(this.props.match,"academicYearId"));return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Program Consultant Comments",breadcrumbs:Xn.programConsultantCommentReport(t),onBack:this.onBack,extra:this.state.fromSelfStudies?null:Object(o.jsx)(hd,WW({value:this.state.academicYear,onSelect:this.onSelect,dropdownMatchSelectWidth:!1},{children:this.state.academicYears.map((function(t){return e.renderAcademicYear(t)}))}),void 0)},void 0),Object(o.jsx)(y.b,WW({direction:"vertical",size:"large"},{children:Object(o.jsx)(Qn.a,WW({title:"Program Consultant Comments"},{children:Object(o.jsx)(y.b,WW({direction:"vertical",size:"large"},{children:Object(o.jsx)(VW,{academicYear:n,selectedDistrict:this.props.selectedDistrict,selectedRPP:this.props.selectedRPP,fromSelfStudies:this.state.fromSelfStudies,fromAcademicYearList:this.state.fromAcademicYearList},void 0)}),void 0)}),void 0)}),void 0)]},void 0)},t.prototype.renderAcademicYear=function(e){return Object(o.jsx)(pr.a.Option,WW({value:e.id},{children:e.id}
1),e.id)},t}(a.Component);var HW=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected,selectedDistrict:e.District.Selected,selectedRPP:e.RegionalPlanningPartner.Selected}}))(zW)),QW=function(e){return Object.assign({academicYear:0,regionalPlanningPartnerId:null,regionalPlanningPartner:null},e)},KW=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),XW=function(){return XW=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},XW.apply(this,arguments)},JW=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._formItems=(new Map).set(Oe.regi
1onalPlanningPartnerIdentifier,{name:Oe.regionalPlanningPartnerIdentifier,label:"Identifier",rules:[Ot.required(),Ot.onlyNumericCharacters()]}).set(Oe.name,{required:!0,name:Oe.name,label:"Name",rules:[Ot.required(),Ot.maxLength(30)]}).set(Oe.institutionId,{required:!0,name:Oe.institutionId,label:"Community College",rules:[Ot.required()]}),n.submit=function(){var e;null===(e=n._formRef.current)||void 0===e||e.validateFields().then((function(){return n.handleSubmit()}),(function(){return n.setState({error:!0})}))},n.fetchData=function(){n.setState({loading:!0});var e=[];e.push(n.loadRegion()),n.state.institutions&&0!=n.state.institutions.length||e.push(n.loadInstitutions()),Promise.all(e).then((function(){n.setState({loading:!1}),n.resetForm()}))},n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields(),n.setState({altered:!1})},n.loadExisting=function(){if(n.props.regionId){var e=ye({id:n.props.regionId});be.getRegionDetails(e).then((function(e){var t;e&&n.setState({rpp:null!==(t=e.regionPlanningPartner)&&void 0!==t?t:Oe.create()}),n.resetForm()})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))}},n.loadInstitutions=function(){return ce.getAll(ne.className).then((function(e){if(e){var t=e.sort((function(e,t){return e.code-t.code}));n.setState({institutions:null!==t&&void 0!==t?t:[]})}})).catch((function(){n.setState({error:!0})}))},n.loadNew=function(){n.setState({loading:!1,rpp:Oe.create({institutionId:"",regionalPlanningPartnerIdentifier:""})})},n.handleChange=function(){n.setState({altered:!0})},n.handleSubmit=function(){n.setState({submitting:!0});var e=QW({regionalPlanningPartnerId:n.props.regionId,academicYear:n.props.academicYear,regionalPlanningPartner:Oe.create(n._formRef?n._formRef.current.getFieldsValue():null)});be.saveRegionalPlanningPartnerDetails(e).then((function(e){var t,r;n.setState({submitted:!0}),(null===e||void 0===e?void 0:e.succeeded)?(n.setState({rpp:null!==(t=e.regionalPlanningPartner)&&void 0!==t?t:Oe.create(),fieldErrors:null,error:!1}),S.b.success("Saved"),n.props.onSave&&(null===(r=e.regionalPlanningPartner)||void 0===r?void 0:r.id)&&
1(n.props.onSave(e.regionalPlanningPartner.id),n.resetForm())):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error(null===e||void 0===e?void 0:e.errors.join("\n")))})).catch((function(e){n.setState({error:e}),S.b.error("Region could not be saved")})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.state={rpp:Oe.create(),institutions:[]},n}return KW(t,e),t.prototype.componentDidMount=function(){this.fetchData()},t.prototype.componentDidUpdate=function(e){this.props.regionId&&this.props.regionId!=e.regionId&&this.fetchData()},t.prototype.loadRegion=function(){this.state.loading||(this.props.regionId==re.default.Empty()?this.loadNew():this.loadExisting())},t.prototype.render=function(){var e=this;return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(y.b,XW({size:"small",direction:"vertical"},{children:[this.renderErrors(),Object(o.jsxs)(ht.a,XW({ref:this._formRef,layout:"vertical",initialValues:this.state.rpp,onValuesChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!0},{children:[Object(o.jsx)(mt.a,XW({},this._formItems.get(Oe.regionalPlanningPartnerIdentifier),_t.getValidation(Oe.regionalPlanningPartnerIdentifier,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(il,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,XW({},this._formItems.get(Oe.name),_t.getValidation(Oe.name,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(il,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,XW({},this._formItems.get(Oe.institutionId),_t.getValidation(Oe.institutionId,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsxs)(hd,XW({disabled:!this.props.isEditing||this.state.loading||this.state.submitting},{children:[" ",this.state.institutions.map((function(t){return e.renderInstitution(t)}))]}),void 0)}),void 0),this.renderSave()]}),void 0)]}),void 0)},t.prototype.renderInstitution=function(e){var t,n,r;if(e.id)return Object(o.jsxs)(pr.a.Option,XW({title:null!==(t=e.name)&&void 0!==t?t:"",value:null!==(n=e.id)&&void 0!==n?n:re.default.Empty()},{children:[e.code," - ",e.name]}),null!==(r=e.id)&&void 0!==r?r:re.default.Empty())},t.prototype.renderSave=function(){if(this.props.isEditing&&!this.props.fromAcademicYear)return Object(o.jsx)(Ze,XW({validFeatureFlags:[gn.EDIT_REGIONAL_PLANNING_PARTNER]},{children:Object(o.jsxs)(y.b,XW({direction:"horizontal"},{children:[Object(o.jsx)(Tr,{disabled:!this.state.altered,saving:this.state.submitting},void 0),Object(o.jsx)(Ir,{disabled:!this.state.altered,onConfirm:this.resetForm},void 0)]}),void 0)}),void 0)},t.prototype.renderErrors=function(){if(this.state.error)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t}(a.Component),$W=function(){return $W=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},$W.apply(this,arguments)};var ZW=function(e){var t=s.a.createRef(),n=e.regionalPlanningPartnerId==re.default.Empty();return Object(o.jsx)(f.a,$W({visible:!0,title:n?"New Regional Planning Partner":"Edit Regional Planning Partner",okText:"Save",onOk:function(){var e;null===(e=t.current)||void 0===e||e.submit()},okButtonProps:{htmlType:"submit"},onCancel:e.onCancel,destroyOnClose:!0},{children:Object(o.jsx)(JW,{fromAcademicYear:!0,ref:t,regionId:e.regionalPlanningPartnerId,isEditing:!0,onSave:e.onSave,isNew:n,academicYear:e.academicYear},void 0)}),void 0)},ez=function(e){return Object.assign({regionalPlanningPartnerId:"00000000-0000-0000-0000-000000000000"},e)};var tz=function(e){var t=void 0,n=Object(a.useState)([]),r=n[0],i=n[1],s=Object(a.useState)(),d=s[0],c=s[1];Object(a.useEffect)((function(){Ii.Institutions().then((function(e){i(e)}))}),[]);var l=function(e){null!=e&&f.a.confirm({title:"Are you sure you want to delete this Regional Planning Partner?",okText:"Delete",onOk:function(){return u(e)},okButtonProps:{type:"primary",danger:!0}})},u=function(e){var n=ez({RegionalPlanningPartnerId:e});be.deleteRegionalPlanningPartner(n).then((function(e){!0===(null===e||void 0===e?void 0:e.succeeded)?(null===t||void 0===t||t.refresh(),S.b.success("Regional Planning Partner was removed.")):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(){S.b.error("Regional Planning Partner could not be removed.")}))},p=function(e){var t;e.id&&c(null!==(t=e.id)&&void 0!==t?t:re.default.Empty())},h=function(){c(null)},v=[];return v.push(oo.Reset()),Je.isAuthorized([gn.CONFIG_ACADEMIC_YEAR])&&v.push(oo.Default("New Regional Planning Partner",e.fromAcademicYear?function(){c(re.default.Empty())}:function(){T.push(x.generate(x.NEW_REGIONAL_PLANNING_PARTNER_DETAIL,{},{academicYear:e.academicYear}))})),Object(o.jsxs)(o.Fragment,{children:[function(){var t;if(d)return Object(o.jsx)(ZW,{onCancel:h,visible:!0,regionalPlanningPartnerId:d,academicYear:null!==(t=e.academicYear)&&void 0!==t?t:0,onSave:h},void 0)}(),Object(o.jsx)(io,{ref:function(e){return t=e},onRowClick:e.fromAcademicYear?void 0:function(t){var n;T.push(x.generate(x.REGIONAL_PLANNING_PARTNER_DETAIL,{id:null!==(n=null===t||void 0===t?void 0:t.id)&&void 0!==n?n:re.default.Empty()},{academicYear:e.academicYear,configuration:e.configuration}))},serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:v,columns:function(){var t=[{title:"Identifier",dataIndex:Oe.regionalPlanningPartnerIdentifier,sorter:!0,width:50,render:function(e,t){return t.regionalPlanningPartnerIdentifier},filterType:wr.Text},{title:"Title",dataIndex:Oe.name,sorter:!0,width:250,render:function(e,t){return t.name},filterType:wr.Text},{title:"Community College",dataIndex:Oe.institutionId,sorter:!0,render:function(e,t){var n,r;return(null===(n=t.institution)||void 0===n?void 0:n.code)+" - "+(null===(r=t.institution)||void 0===r?void 0:r.name)},filterType:wr.DropdownMulti,dropdownFilterOptions:r}];return e.fromAcademicYear&&t.push({title:"Actions",align:"center",dataIndex:Oe.id,sorter:!1,render:function(e,t){if(Je.isAuthorized([gn.CONFIG_ACADEMIC_YEAR]))return Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(rt.a,{type:"link",onClick:function(){return p(t)},icon:Object(o.jsx)(Gr.a,{},void 0)},void 0),Object(o.jsx)(rt.a,{type:"link",onClick:function(){return l(t.id)},icon:Object(o.jsx)(Yd.a,{},void 0)},void 0)]},void 0)},width:50}),t}(),fetchData:{fetch:function(t){var n;return be.getRegionalPlanningPartnerTableData(t,null!==(n=e.academicYear)&&void 0!==n?n:0)}},stateSaving:{enabled:!0,tableUniqueKey:"rpp_list"}},void 0)]},void 0)},nz=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),rz=function(){return rz=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},rz.apply(this,arguments)},iz=function(e){function t(t){var n=e.call(this,t)||this;return n.loadAcademicYears=function(e){n.setState({loading:!0});var t=ML({academicYearId:isNaN(e)?null:e});return sL.getAcademicYears(t).then((function(e){var t;e&&e.academicYears&&n.setState({academicYears:null!==(t=e.academicYears)&&void 0!==t?t:[],academicYear:$r.getCurrentYear()})})).catch().finally((function(){n.setState({loading:!1})}
1))},n.onSelect=function(e){n.setState({academicYear:e})},n.onBack=function(){T.goBack()},n.state={loading:!1,academicYear:0,academicYears:[]},n}return nz(t,e),t.prototype.componentDidMount=function(){var e=Number.parseInt(Hr.getPathPart(this.props.match,"academicYearId"));this.state.academicYear!=e&&(this.setState({academicYear:e}),this.loadAcademicYears(e))},t.prototype.render=function(){var e=this,t="true"==Hr.getParameter("configuration");return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Regional Planning Partners",onBack:this.onBack,breadcrumbs:t?Xn.regionConfigurationListPage():Xn.regionListPage(),extra:Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)("label",{title:"academicYear",htmlFor:"academicYear"},void 0),Object(o.jsx)(hd,rz({id:"academicYear",value:this.state.academicYear,onSelect:this.onSelect,dropdownMatchSelectWidth:!1},{children:this.state.academicYears.map((function(t){return e.renderAcademicYear(t)}))}),void 0)]},void 0)},void 0),Object(o.jsx)(Qn.a,{children:Object(o.jsx)(tz,{configuration:t,academicYear:isNaN(this.state.academicYear)?0:this.state.academicYear},void 0)},void 0)]},void 0)},t.prototype.renderAcademicYear=function(e){return Object(o.jsx)(pr.a.Option,rz({value:e.id},{children:e.id}),e.id)},t}(a.Component),oz=Object(u.i)(iz),az=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),sz=function(){return sz=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},sz.apply(this,arguments)},dz=function(e){function t(t){var n=e.call(this,t)||this;return n.onBack=function(){T.goBack()},n.state={loading:!1,academicYear:0},n}return az(t,e),t.prototype.componentDidMount=function(){var e=Number.parseInt(Hr.getPathPart(this.props.match,"academicYearId"));this.setState({academicYear:e})},t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Regional Planning Partners",breadcrumbs:Xn.academicYearRPPConfigurationList(this.state.academicYear),onBack:this.onBack},void 0),Object(o.jsx)(y.b,sz({direction:"vertical",size:"large"},{children:Object(o.jsx)(Qn.a,sz({title:"Regional Planning Partners"},{children:Object(o.jsx)(y.b,sz({direction:"vertical",size:"large"},{children:Object(o.jsx)(tz,{academicYear:this.state.academicYear},void 0)}),void 0)}),void 0)}),void 0)]},void 0)},t}(a.Component);var cz=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected}}))(dz)),lz=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),uz=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return lz(t,e),t.prototype.getAreaEducationAgencyTableData=function(e,t){var n="api/areaEducationAgencys",r=n.indexOf("?")>0?"&":"?";return null!=t&&(n+=r+"academicYearId="+t,r="&"),n=n.replace(/null|undefined/gi,""),this.SendRequest(e,"post",n,!0,!1)},t.prototype.getAreaEducationAgencyDetails=function(e){var t="api/areaEducationAgencys/get";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.saveAreaEducationAgencyDetails=function(e){var t="api/areaEducationAgencys/save";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.deleteAreaEducationAgency=function(e){var t="api/areaEducationAgencys/deleteAreaEducationAgency";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getAreaEducationAgencies=function(e){var t="api/areaEducationAgencys/areaEducationAgencys/"+e;return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t}(U),pz=new uz,fz=function(e){return Object.assign({districtId:"00000000-0000-0000-0000-000000000000",academicYearId:0},e)},hz=function(e){return Object.assign({districtId:null,district:null},e)},vz=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),mz=function(){return mz=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},mz.apply(this,arguments)},gz=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._formItems=(new Map).set(K.districtId,{name:K.districtId,label:"Identifier",rules:[Ot.required(),Ot.onlyNumericCharacters()]}).set(K.name,{required:!0,name:K.name,label:"Name",rules:[Ot.required()]}).set(K.districtApprovalUser,{name:K.districtApprovalUser,label:"District Approval User",rules:[]}).set(K.regionIdentifier,{required:!0,name:K.regionIdentifier,label:"Regional Planning Partner",rules:[Ot.required()]}).set(K.areaEducationAgencyIdentifier,{required:!0,name:K.areaEducationAgencyIdentifier,label:"AEA",rules:[Ot.required()]}),n.fetchData=function(){n.setState({loading:!0});var e=[];
1e.push(n.loadDistrict()),n.state.regions&&0!=n.state.regions.length||e.push(n.loadRegionalPlanningPartners()),n.state.areaEducationAgencies&&0!=n.state.areaEducationAgencies.length||e.push(n.loadAreaEducationAgency()),Promise.all(e).then((function(){n.setState({loading:!1}),n.resetForm()}))},n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields(),n.setState({altered:!1})},n.loadExisting=function(){if(n.props.districtId&&n.props.academicYear){var e=H({id:n.props.districtId});z.getDistrictDetails(e).then((function(e){var t;e&&n.setState({district:null!==(t=e.district)&&void 0!==t?t:K.create({id:n.props.districtId==re.default.Empty()?void 0:n.props.districtId,districtId:void 0,regionId:void 0,aeA_Id:void 0})}),n.resetForm()})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))}},n.loadRegionalPlanningPartners=function(){var e;be.getRegionalPlanningPartners(null!==(e=n.props.academicYear)&&void 0!==e?e:0).then((function(e){var t;e&&n.setState({regions:null!==(t=e.regions)&&void 0!==t?t:[]}),n.resetForm()})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))},n.loadAreaEducationAgency=function(){var e;pz.getAreaEducationAgencies(null!==(e=n.props.academicYear)&&void 0!==e?e:0).then((function(e){var t;e&&n.setState({areaEducationAgencies:null!==(t=e.areaEducationAgency)&&void 0!==t?t:[]}),n.resetForm()})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))},n.loadNew=function(){n.setState({loading:!1,district:K.create({id:n.props.districtId==re.default.Empty()?void 0:n.props.districtId,districtId:void 0,regionIdentifier:"",areaEducationAgencyIdentifier:""})})},n.handleChange=function(){n.setState({altered:!0})},n.submit=function(){var e;null===(e=n._formRef.current)||void 0===e||e.validateFields().then((function(){return n.handleSubmit()}),(function(){return n.setState({error:!0})}))},n.handleSubmit=function(){n.setState({submitting:!0});var e=hz({districtId:n.props.districtId,district:K.create(mz(mz({},n._formRef?n._formRef.current.getFieldsValue():null),{academicYear:n.props.academicYear}))});z.saveDistrictDetails(e).then((function(e){var t,r;n.setState({submitted:!0}),(null===e||void 0===e?void 0:e.succeeded)?(n.setState({district:null!==(t=e.district)&&void 0!==t?t:K.create()}),S.b.success("Saved"),n.props.onSave&&(null===(r=e.district)||void 0===r?void 0:r.id)&&
1(n.props.onSave(e.district.id),n.resetForm())):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("District could not be saved"),n.setState({loading:!1,submitting:!1}))})).catch((function(e){n.setState({error:e,loading:!1,submitting:!1}),S.b.error("District could not be saved")}))},n.state={district:K.create({id:null,districtId:void 0,regionId:null,aeA_Id:null}),regions:[],areaEducationAgencies:[]},n}return vz(t,e),t.prototype.componentDidMount=function(){this.fetchData()},t.prototype.componentDidUpdate=function(e){this.props.districtId&&this.props!=e&&this.fetchData()},t.prototype.loadDistrict=function(){this.state.loading||(this.props.districtId==re.default.Empty()||this.props.isNew?this.loadNew():this.loadExisting())},t.prototype.render=function(){var e,t,n,r,i,a=this;if(this.state.loading)return Object(o.jsx)(pt.a,{active:!0},void 0);var s=null==Xe.Get();return Object(o.jsxs)(y.b,mz({size:"small",direction:"vertical"},{children:[this.renderErrors(),Object(o.jsxs)(ht.a,mz({ref:this._formRef,layout:"vertical",initialValues:this.state.district,onValuesChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!s},{children:[Object(o.jsx)(mt.a,mz({},this._formItems.get(K.districtId),_t.getValidation(K.districtId,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(il,{readonly:s,disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,mz({},this._formItems.get(K.name),_t.getValidation(K.name,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(il,{readonly:s,disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,mz({},this._formItems.get(K.regionIdentifier),_t.getValidation(K.regionIdentifier,this.state.fieldErrors,this.state.submitted),{children:s?Object(o.jsx)(ud,{text:null===(e=this.state.regions.find((function(e){return e.regionalPlanningPartnerIdentifier==a.state.district.regionIdentifier})))||void 0===e?void 0:e.name},void 0):Object(o.jsxs)(hd,mz({dropdownMatchSelectWidth:!1,readOnly:s,disabled:!this.props.isEditing||this.state.loading||this.state.submitting},{children:[" ",this.state.regions.sort((function(e,t){return e.regionalPlanningPartnerIdentifier-t.regionalPlanningPartnerIdentifier})).map((function(e){return a.renderRegion(e)}))]}),void 0)}),void 0),Object(o.jsx)(mt.a,mz({},this._formItems.get(K.areaEducationAgencyIdentifier),_t.getValidation(K.areaEducationAgencyIdentifier,this.state.fieldErrors,this.state.submitted),{children:s?Object(o.jsx)(ud,{text:null===(t=this.state.areaEducationAgencies.find((function(e){return e.areaEducationAgencyIdentifier==a.state.district.areaEducationAgencyIdentifier})))||void 0===t?void 0:t.name},void 0):Object(o.jsxs)(hd,mz({dropdownMatchSelectWidth:!1,readOnly:s,disabled:!this.props.isEditing||this.state.loading||this.state.submitting},{children:[" ",this.state.areaEducationAgencies.sort((function(e,t){return e.areaEducationAgencyIdentifier-t.areaEducationAgencyIdentifier})).map((function(e){return a.renderAreaEducationAgency(e)}))]}),void 0)}),void 0),this.props.modal?null:Object(o.jsx)(ht.a.Item,mz({},this._formItems.get(K.districtApprovalUser),_t.getValidation(K.districtApprovalUser,this.state.fieldErrors,this.state.submitted),{children:s?Object(o.jsx)(ud,{text:null===(n=this.state.district.districtApprovalUser)||void 0===n?void 0:n.fullName},void 0):Object(o.jsx)(mk,{value:this.state.district.districtApprovalUser,districtIdentifier:null!==(r=this.state.district.districtId)&&void 0!==r?r:0,academicYear:null!==(i=this.props.academicYear)&&void 0!==i?i:0,disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0)]}),void 0),this.renderSave()]}),void 0)},t.prototype.renderSave=function(){if(this.props.isEditing&&!this.props.modal)return Object(o.jsx)(Ze,mz({validFeatureFlags:[gn.EDIT_DISTRICT]},{children:Object(o.jsxs)(y.b,mz({direction:"horizontal"},{children:[Object(o.jsx)($o,{onClick:this.handleSubmit,disabled:!br.canSubmit(this._formRef,this._formItems),submitting:this.state.submitting},void 0),Object(o.jsx)(Ir,{disabled:!br.hasChanged(this._formRef,this._formItems),onConfirm:this.resetForm},void 0)]}),void 0)}),void 0)},t.prototype.renderRegion=function(e){var t,n,r,i;if(e.id)return Object(o.jsx)(pr.a.Option,mz({title:null!==(t=e.display)&&void 0!==t?t:"",value:null!==(n=e.regionalPlanningPartnerIdentifier)&&void 0!==n?n:re.default.Empty()},{children:null!==(r=null===e||void 0===e?void 0:e.display)&&void 0!==r?r:""}),null!==(i=e.id)&&void 0!==i?i:re.default.Empty())},t.prototype.renderAreaEducationAgency=function(e){var t,n,r;if(e.id)return Object(o.jsx)(pr.a.Option,mz({title:null!==(t=e.display)&&void 0!==t?t:"",value:null!==(n=e.areaEducationAgencyIdentifier)&&void 0!==n?n:re.default.Empty()},{children:null===e||void 0===e?void 0:e.display}),null!==(r=e.id)&&void 0!==r?r:re.default.Empty())},t.prototype.renderErrors=function(){if(this.state.error)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t}(a.Component),bz=function(){return bz=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},bz.apply(this,arguments)};var yz=function(e){var t,n=s.a.createRef(),r=e.districtId==re.default.Empty();return Object(o.jsx)(f.a,bz({visible:!0,title:r?"New District":"Edit District",okText:"Save",onOk:function(){var e;null===(e=n.current)||void 0===e||e.submit()},okButtonProps:{htmlType:"submit"},onCancel:e.onCancel,destroyOnClose:!0},{children:Object(o.jsx)(gz,{ref:n,districtId:null!==(t=e.districtId)&&void 0!==t?t:re.default.Empty,isEditing:!0,onSave:e.onSave,modal:!0,isNew:r,academicYear:e.academicYear},void 0)}),void 0)},Oz="file",jz=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Iz=function(){return Iz=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}
1,Iz.apply(this,arguments)},Sz=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n.getFormItems=function(){return(new Map).set(Oz,{name:Oz,label:"Please select a file to import districts"})},n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields()},n.confirmImport=function(){var e,t,r=null!==(t=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldsValue())&&void 0!==t?t:{};f.a.confirm({title:"Reset Data",content:"Importing this file will delete the current data.",onOk:function(){return n.handleSubmit(r)},width:500})},n.handleSubmit=function(e){if(n.setState({submitting:!0}),br.canSubmit(n._formRef,n.getFormItems())){var t=e.file.newFiles[0],r=Za.attachFileToModel("districtImporter",{academicYearId:n.props.academicYear},Oz,t);n.setState({loading:!0}),z.districtImporter(r).then((function(e){var t;n.resetForm(),n.setState({submitting:!1}),null===(t=n.props.refreshDataTable)||void 0===t||t.resetTable();R.a.downloadBase64StringAsExcel("District Summary Report.xlsx",null!==e&&void 0!==e?e:void 0)})).catch((function(){S.b.error("Import Failed. Please check formatting in file."),n.setState({error:!0})})).finally((function(){n.setState({loading:!1}),n.props.onSubmit&&n.props.onSubmit([])}))}else S.b.error("Please fill out all required fields."),n.setState({loading:!1,submitting:!1})},n.downloadTemplate=function(){window.open(x.generateFull(x.DISTRICT_IMPORT_TEMPLATE,{},{}),"_blank")},n.state={},n}return jz(t,e),t.prototype.render=function(){return Object(o.jsx)(y.b,Iz({direction:"vertical"},{children:Object(o.jsx)(Ci.a,Iz({layout:"vertical",onFinish:this.handleSubmit,ref:this._formRef},{children:Object(o.jsxs)(y.b,Iz({direction:"vertical"},{children:[Object(o.jsx)(Ci.a.Item,Iz({},this.getFormItems().get(Oz),_t.getValidation(Oz,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(hs,{maxCount:1,style:{width:300}},void 0)}),void 0),this.props.isInModal?null:Object(o.jsxs)(y.b,Iz({direction:"horizontal"},{children:[Object(o.jsx)(rt.a,Iz({htmlType:"submit",type:"primary",icon:Object(o.jsx)(ds.a,{},void 0),loading:this.state.loading},{children:"Import"}),void 0),Object(o.jsx)(rt.a,Iz({icon:Object(o.jsx)(pn.a,{},void 0),type:"link",onClick:this.downloadTemplate},{children:"Download Template"}),void 0)]}),void 0),this.renderErrors()]}),void 0)}),void 0)}),void 0)},t.prototype.renderErrors=function(){if(this.state.error&&this.state.message)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:this.state.message},void 0)},t}(a.Component),Ez=function(){return Ez=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ez.apply(this,arguments)};var Rz=function(e){var t=void 0,n=a.createRef(),r=Object(a.useState)([]),i=r[0],s=r[1],d=Object(a.useState)([]),c=d[0],l=d[1],u=Object(a.useState)(!1),p=u[0],f=u[1],h=Object(a.useState)([]),v=h[0],m=h[1],g=Object(a.useState)(),b=g[0],y=g[1];Object(a.useEffect)((function(){isNaN(e.academicYear)||(be.getRegionalPlanningPartners(e.academicYear).then((function(e){var t;l(null!==(t=e.regions)&&void 0!==t?t:[])})),pz.getAreaEducationAgencies(e.academicYear).then((function(e){var t;s(null!==(t=e.areaEducationAgency)&&void 0!==t?t:[])})))}),[e.academicYear]);var O=function(e){e.id&&y(e.id)},j=function(){y(null)},I=function(t){null!=t&&Rd.a.confirm({title:"Are you sure you want to delete this District?",okText:"Delete",onOk:function(){return E(t,e.academicYear)},okButtonProps:{type:"primary",danger:!0}})},E=function(e,n){var r=fz({districtId:e,academicYearId:n}
1);z.deleteDistrict(r).then((function(e){!0===(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("District was removed."),null===t||void 0===t||t.refresh()):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(){S.b.error("District could not be removed.")}))},R=function(e){f(!1),m(e)},_=[];_.push(oo.Reset()),Je.isAuthorized([gn.EDIT_DISTRICT])&&!e.isRPP&&_.push(oo.Default("New District",(function(){y(re.default.Empty())}))),Je.isAuthorized([gn.EDIT_DISTRICT])&&e.fromAcademicYearDataReview&&_.push(oo.Default("Re-import Districts",(function(){return f(!0),void Rd.a.confirm({title:"Import",content:Object(o.jsx)(Sz,{ref:n,academicYear:e.academicYear,refreshDataTable:t,isInModal:!0,onSubmit:R},void 0),onCancel:function(){f(!1)},onOk:function(){var e;return null===(e=n.current)||void 0===e?void 0:e.confirmImport()},width:500})}),void 0,p)),Je.isAuthorized([gn.EDIT_DISTRICT])&&e.fromAcademicYearDataReview&&_.push(oo.Default("Template",(function(){window.open(x.generateFull(x.DISTRICT_IMPORT_TEMPLATE,{},{}),"_blank")}),Object(o.jsx)(pn.a,{},void 0),p));var C=function(){return Object(o.jsx)(o.Fragment,{children:v.map((function(e){return Object(o.jsx)("p",{children:e},e)}))},void 0)};return Object(o.jsxs)(o.Fragment,{children:[function(){if(b)return Object(o.jsx)(yz,{onCancel:j,visible:!0,districtId:b,academicYear:e.academicYear,onSave:j},void 0)}(),function(){if(v&&v.length>0)return Object(o.jsx)(ct.a,{showIcon:!0,type:"error",description:C(),message:"Error Importing"},void 0)}(),Object(o.jsx)(io,{ref:function(e){return t=e},onRowClick:e.fromAcademicYearDataReview?void 0:function(t){t.id&&T.push(x.generate(x.DISTRICT_DETAILS,{id:t.id},{academicYear:e.academicYear,rppId:e.rppId}))},serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:_,columns:function(){var t=[{title:"Identifier",dataIndex:K.districtId,sorter:!0,width:50,render:function(e,t){return t.districtId},filterType:wr.Text},{title:"Name",dataIndex:K.name,sorter:!0,render:function(e,t){return t.name},filterType:wr.Text},{title:"RPP",dataIndex:K.regionIdentifier,sorter:!0,width:250,filterType:wr.DropdownMulti,dropdownFilterOptions:c.map((function(e){return{text:e.regionalPlanningPartnerIdentifier+" - "+e.name,value:e.regionalPlanningPartnerIdentifier.toString()}})),render:function(e,t){var n,r;return c.length>0&&null!==(r=null===(n=c.filter((function(e){return e.regionalPlanningPartnerIdentifier===t.regionIdentifier}))[0])||void 0===n?void 0:n.display)&&void 0!==r?r:""}},{title:"AEA",dataIndex:K.areaEducationAgencyIdentifier,sorter:!0,width:250,filterType:wr.DropdownMulti,dropdownFilterOptions:i.map((function(e){return{text:e.areaEducationAgencyIdentifier+" - "+e.name,value:e.areaEducationAgencyIdentifier.toString()}})),render:function(e,t){var n,r;return i.length>0&&null!==(r=null===(n=i.filter((function(e){return e.areaEducationAgencyIdentifier===t.areaEducationAgencyIdentifier}))[0])||void 0===n?void 0:n.display)&&void 0!==r?r:""}}];if(e.fromAcademicYearDataReview&&t.push({title:"Actions",align:"center",dataIndex:K.districtId,sorter:!1,render:function(e,t){if(Je.isAuthorized([gn.CONFIG_ACADEMIC_YEAR]))return Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(rt.a,Ez({type:"link",onClick:function(){return O(t)}},{children:Object(o.jsx)(Gr.a,{},void 0)}),void 0),Object(o.jsx)(rt.a,Ez({type:"link",onClick:function(){return I(t.id)}},{children:Object(o.jsx)(Yd.a,{},void 0)}),void 0)]},void 0)},width:50}),Xe.Get()){var n=t.pop();n&&t.push(n)}return t}(),fetchData:{fetch:function(t){var n;return z.getDistrictTableData(t,e.academicYear,null==Xe.Get(),null!==(n=e.rppId)&&void 0!==n?n:re.default.Empty())}},stateSaving:{enabled:!0,tableUniqueKey:"districts_list"}},void 0)]},void 0)},_z=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Tz=function(){return Tz=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Tz.apply(this,arguments)},Cz=function(e){function t(t){var n=e.call(this,t)||this;return n._rppDetailRef=a.createRef(),n.loadRpps=function(e,t){var r=AL({academicYearId:t,regionalPlanningPartnerIdentifier:e});be.getRegionalPlanningPartnersByAcademicYear(r).then((function(e){var t;e&&n.setState({rpps:null!==(t=e.regions)&&void 0!==t?t:[]})})).catch((function(){n.setState({error:!0})}
1)).finally((function(){n.setState({loading:!1})}))},n.loadRPP=function(e,t,r){var i=ye({id:e,rppId:r,academicYear:t});be.getRegionDetails(i).then((function(e){var t;e.regionPlanningPartner?(n.setState({rpp:e.regionPlanningPartner,rppId:null!==(t=e.regionPlanningPartner.id)&&void 0!==t?t:re.default.Empty(),isNew:!1,isEditing:!1}),n.state.rpps&&0==n.state.rpps.length&&n.loadRpps(e.regionPlanningPartner.regionalPlanningPartnerIdentifier,n.state.academicYear)):n.setState({isNew:!0,isEditing:!0},(function(){var e;return null===(e=n._rppDetailRef.current)||void 0===e?void 0:e.resetForm()}))})).catch((function(){n.setState({error:!0})}))},n.loadAcademicYears=function(){n.setState({loading:!0});var e=ML({});return sL.getAcademicYears(e).then((function(e){var t;e&&e.academicYears&&n.setState({academicYears:null!==(t=e.academicYears)&&void 0!==t?t:[]})})).catch((function(){n.setState({error:!0})}))},n.deleteConfirmation=function(e){f.a.confirm({title:"Are you sure you want to delete this Regional Planning Partner?",okText:"Delete",onOk:function(){return n.deleteRPP(e)}})},n.deleteRPP=function(e){n.setState({submitting:!0});var t=ez({regionalPlanningPartnerId:e});be.deleteRegionalPlanningPartner(t).then((function(e){n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,altered:!(null===e||void 0===e?void 0:e.succeeded)}),!0===(null===e||void 0===e?void 0:e.succeeded)?S.b.success("Regional Planning Partner was removed."):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(e){n.setState({error:e}),S.b.error("Regional Planning Partner could not be removed.")})).finally((function(){n.setState({loading:!1}),n.goToListing()}))},n.onSelect=function(e){n.setState({academicYear:e,rppId:re.default.Empty()}),n.loadRPP(re.default.Empty(),e,n.state.rpp.regionalPlanningPartnerIdentifier)},n.goToListing=function(){T.goBack()},n.onSave=function(e){n.setState({isEditing:!1,isNew:!1}),e!=n.state.rppId?(T.push(x.generate(x.REGIONAL_PLANNING_PARTNER_DETAIL,{id:e},{academicYear:n.state.academicYear})),n.loadRPP(e)):n.loadRPP(e)},n.toggleEdit=function(){var e;n.state.isEditing&&(null===(e=n._rppDetailRef.current)||void 0===e||e.resetForm()),n.setState({isEditing:!n.state.isEditing})},n.changeTab=function(e){n.setState({activeTab:e}),T.replace(x.generate("",{},{activeTab:e,academicYear:n.state.academicYear}),{activeTab:e,academicYear:n.state.academicYear})},n.state={academicYear:0,rppId:re.default.Empty(),academicYears:[],rpp:Oe.create(),rpps:[],activeTab:"details"},n}return _z(t,e),t.prototype.componentDidMount=function(){var e,t=this,n=Hr.getPathPart(this.props.match,"id"),r=Hr.getParameter("academicYear"),i=Hr.getParameter("activeTab","details");(this.setState({academicYear:Number.parseInt(r),activeTab:i}),this.props.match.path.split("/").findIndex((function(e){return"new"==e}))>-1)?(this.setState({isEditing:!0,isNew:!0,loading:!1,academicYear:Number.parseInt(r)}),(e=[]).push(this.loadAcademicYears()),Promise.all(e).then((function(){t.setState({loading:!1})}))):((e=[]).push(this.loadRPP(n)),e.push(this.loadAcademicYears()),Promise.all(e).then((function(){t.setState({loading:!1})})))},t.prototype.render=function(){var e,t,n,r,i=this.state.loading?"...":this.state.isNew?"New Regional Planning Partner":null!==(t=null===(e=this.state.rpp)||void 0===e?void 0:e.name)&&void 0!==t?t:"...",a="true"==Hr.getParameter("configuration");return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:i,onBack:this.goToListing,extra:this.renderMoreActions(),breadcrumbs:a?Xn.regionConfigurationDetailPage(null!==(n=this.state.rpp.name)&&void 0!==n?n:"New Regional Planning Partner",this.state.rppId):Xn.regionDetailPage(null!==(r=this.state.rpp.name)&&void 0!==r?r:"New Regional Planning Partner",this.state.rppId),footer:Object(o.jsxs)(pa.a,Tz({activeKey:this.state.activeTab,onChange:this.changeTab},{children:[Object(o.jsx)(pa.a.TabPane,{tab:"Details"},"details"),Object(o.jsx)(pa.a.TabPane,{tab:"Users"},"users"),Object(o.jsx)(pa.a.TabPane,{tab:"Districts"},"districts")]}),void 0)},void 0),this.renderDetailsCard(),this.renderRppUsersCard(),this.renderRppDistrict()]},void 0)},t.prototype.renderDetailsCard=function(){var e;if("details"==this.state.activeTab){var t=this.state.rppId==re.default.Empty()?null:Object(o.jsx)(Ze,Tz({validFeatureFlags:[gn.EDIT_REGIONAL_PLANNING_PARTNER]},{children:Object(o.jsx)(Br,{isEditing:this.state.isEditing,onClick:this.toggleEdit},void 0)}),void 0);return Object(o.jsx)(Qn.a,Tz({title:"Details",extra:t},{children:Object(o.jsx)(JW,{regionId:this.state.rppId,academicYear:null!==(e=this.state.academicYear)&&void 0!==e?e:0,isEditing:this.state.isEditing,onSave:this.onSave},void 0)}),void 0)}},t.prototype.renderRppUsersCard=function(){if("users"===this.state.activeTab&&this.state.rpp)return Object(o.jsx)(Qn.a,Tz({title:"Rpp Users"},{children:Object(o.jsx)(FY,{regionalPlanningPartner:this.state.rpp.regionalPlanningPartnerIdentifier},void 0)}),void 0)},t.prototype.renderRppDistrict=function(){if("districts"===this.state.activeTab)return Object(o.jsx)(Qn.a,Tz({title:"Districts"},{children:Object(o.jsx)(Rz,{rppId:this.state.rppId,academicYear:this.state.academicYear,isRPP:!0},void 0)}),void 0)},t.prototype.renderMoreActions=function(){var e=this,t=Object(o.jsx)(Gt.a,{children:Object(o.jsx)(Gt.a.Item,Tz({title:"Delete Regional Planning Partner",onClick:function(){return e.deleteConfirmation(e.state.rppId)}},{children:"Delete Regional Planning Partner"}),this.state.rppId)},void 0);return Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)("label",{title:"academicYear",htmlFor:"academicYear"},void 0),Object(o.jsx)(hd,Tz({id:"academicYear",value:this.state.academicYear,onSelect:this.onSelect,dropdownMatchSelectWidth:!1}
1,{children:this.state.rpps.map((function(t){return e.renderSecondaryCoursesAcademicYear(t)}))}),void 0),Object(o.jsx)(Ze,Tz({validFeatureFlags:[gn.EDIT_SECONDARY_COURSE]},{children:this.state.isNew?null:Object(o.jsx)(la.a,Tz({overlay:t},{children:Object(o.jsx)(rt.a,Tz({size:"large",type:"link"},{children:Object(o.jsx)(aa.a,{},void 0)}),void 0)}),void 0)}),void 0)]},void 0)},t.prototype.renderSecondaryCoursesAcademicYear=function(e){return Object(o.jsx)(pr.a.Option,Tz({value:e.academicYear},{children:e.academicYear}),e.regionalPlanningPartnerIdentifier)},t}(a.Component),xz=Object(u.i)(Cz),Az=function(){return Az=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Az.apply(this,arguments)};var Pz=function(e){var t;return Object(o.jsx)(rt.a,Az({},e,{htmlType:e.htmlType?e.htmlType:"button",type:e.type?e.type:"primary",icon:Object(o.jsx)(is.a,{},void 0)},{children:null!==(t=e.title)&&void 0!==t?t:"Confirm and Continue"}),void 0)},Nz=function(){return Nz=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Nz.apply(this,arguments)};var wz=function(e){return Object(o.jsxs)(Og,Nz({direction:"vertical",current:e.currentStep},{children:[Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{title:"Area Education Agencies",route:x.generate(x.DATA_REVIEW_AREA_EDUCATION_AGENCY,{academicYearId:e.academicYear},{}),enabled:0!=e.currentStep},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{title:"Service Areas",route:x.generate(x.DATA_REVIEW_SERVICE_AREAS,{academicYearId:e.academicYear},{}),enabled:1!=e.currentStep},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{title:"Federal Clusters",route:x.generate(x.DATA_REVIEW_FEDERAL_CLUSTERS,{academicYearId:e.academicYear},{}),enabled:2!=e.currentStep},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{title:"Scenarios",route:x.generate(x.DATA_REVIEW_SECONDARY_PROGRAM_TYPES,{academicYearId:e.academicYear},{}),enabled:3!=e.currentStep},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{title:"Regional Planning Partners",route:x.generate(x.DATA_REVIEW_REGIONAL_PLANNING_PARTNER,{academicYear:e.academicYear},{}),enabled:4!=e.currentStep},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{title:"CIP Numbers",route:x.generate(x.DATA_REVIEW_SECONDARY_CIP_NUMBERS,{academicYearId:e.academicYear},{}),enabled:5!=e.currentStep},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{title:"Districts",route:x.generate(x.DATA_REVIEW_DISTRICTS,{academicYearId:e.academicYear},{}),enabled:6!=e.currentStep},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{title:"District Contacts",route:x.generate(x.DATA_REVIEW_DISTRICT_CONTACTS,{academicYearId:e.academicYear},{}),enabled:7!=e.currentStep},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{title:"Programs",route:x.generate(x.DATA_REVIEW_SECONDARY_PROGRAMS,{academicYearId:e.academicYear},{}),enabled:8!=e.currentStep},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{title:"Courses",route:x.generate(x.DATA_REVIEW_SECONDARY_COURSES,{academicYearId:e.academicYear},{}),enabled:9!=e.currentStep},void 0)},void 0),Object(o.jsx)(bg.a.Step,{title:Object(o.jsx)(Ig,{title:"Program Courses",route:x.generate(x.DATA_REVIEW_SECONDARY_PROGRAM_COURSES,{academicYearId:e.academicYear},{}),enabled:10!=e.currentStep},void 0)},void 0)]}),void 0)},Dz=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),qz=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.render=function(){return Object(o.jsx)(rr,{title:t.props.pageTitle,breadcrumbs:t.props.breadcrumbs},void 0)},t}return Dz(t,e),t}(a.Component),Fz=qz,Mz=function(){return Mz=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}
1,Mz.apply(this,arguments)};var Yz=function(e){var t=Object(a.useState)(null),n=t[0],r=t[1];e.academicYear&&0!=e.academicYear&&Object(a.useEffect)((function(){sL.isValidAcademicYear(e.academicYear).then((function(e){r(e.isValid)}))}),[]);var i=Object(o.jsx)(wz,{currentStep:e.stepNumber,academicYear:e.academicYear},void 0),s=pg()();return i=s.xxl||s.xl?Object(o.jsx)(m.a,{children:Object(o.jsx)(Qn.a,Mz({title:"Steps"},{children:i}),void 0)},void 0):Object(o.jsx)(Qn.a,{children:Object(o.jsx)(y.b,Mz({direction:"horizontal",split:"|",align:"center"},{children:i}),void 0)},void 0),Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(Fz,{pageTitle:"Data Review",breadcrumbs:e.breadcrumbs},void 0),Object(o.jsxs)(b.a,Mz({gutter:[16,16]},{children:[Object(o.jsx)(m.a,Mz({},{xs:24,sm:24,md:24,lg:24,xl:4,xxl:4},{children:i}),void 0),Object(o.jsx)(m.a,Mz({},{xs:24,sm:24,md:24,lg:24,xl:20,xxl:20},{children:Object(o.jsx)(b.a,Mz({gutter:[16,16]},{children:Object(o.jsx)(m.a,Mz({},{xs:24,sm:24,md:24,lg:24,xl:24,xxl:24},{children:n?e.children:0==n?Object(o.jsx)(wn.a,{status:"error",title:"Program Review Year Not Valid",subTitle:"The requested program review year has not been opened."},void 0):Object(o.jsx)(pt.a,{},void 0)}),void 0)}),void 0)}),void 0)]}),void 0)]},void 0)},Uz=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Lz=function(){return Lz=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Lz.apply(this,arguments)},kz=function(e){function t(t){var n=e.call(this,t)||this;return n.onBack=function(){T.push(x.generate(x.DATA_REVIEW_SECONDARY_PROGRAM_TYPES,{academicYearId:n.state.academicYear},{}))},n.onContinue=function(){T.push(x.generate(x.DATA_REVIEW_SECONDARY_CIP_NUMBERS,{academicYearId:n.state.academicYear},{}))},n.state={academicYear:0},n}return Uz(t,e),t.prototype.componentDidMount=function(){var e=Number.parseInt(Hr.getPathPart(this.props.match,"academicYear"));this.state.academicYear!=e&&this.setState({academicYear:e})},t.prototype.render=function(){var e=0==this.state.academicYear?0:this.state.academicYear;return 0!=e?Object(o.jsx)(O.Content,{children:Object(o.jsx)(Yz,Lz({breadcrumbs:Xn.academicYearDataReview(e),stepNumber:4,academicYear:e},{children:Object(o.jsx)(Qn.a,Lz({title:"Regional Planning Partners"},{children:Object(o.jsxs)(y.b,Lz({direction:"vertical",size:"middle"},{children:[Object(o.jsx)(tz,{fromAcademicYear:!0,academicYear:this.state.academicYear},void 0),Object(o.jsxs)(y.b,{children:[Object(o.jsx)(lm,{onClick:this.onBack},void 0),Object(o.jsx)(Pz,{onClick:this.onContinue},void 0)]},void 0)]}),void 0)}),void 0)}),void 0)},void 0):Object(o.jsx)(pt.a,{},void 0)},t}(a.Component),Gz=Object(u.i)(kz),Vz=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Bz=function(){return Bz=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Bz.apply(this,arguments)},Wz=function(e){function t(t){var n=e.call(this,t)||this;return n.loadAcademicYears=function(e){n.setState({loading:!0});var t=ML({academicYearId:isNaN(e)?null:e});return sL.getAcademicYears(t).then((function(e){var t;e&&e.academicYears&&n.setState({academicYears:null!==(t=e.academicYears)&&void 0!==t?t:[],academicYear:$r.getCurrentYear()})})).finally((function(){n.setState({loading:!1})}))},n.loadDistricts=function(e){var t=bL({academicYearId:isNaN(e)?$r.getCurrentYear():e});z.getDistricts(t).then((function(e){var t;e&&n.setState({districts:null!==(t=e.districts)&&void 0!==t?t:[]})})).finally((function(){n.setState({loading:!1})}
1))},n.onSelect=function(e){n.setState({academicYear:e}),n.loadDistricts(e)},n.onBack=function(){n.state.fromAcademicYearList?T.push(x.generate(x.ACADEMIC_YEAR_DASHBOARD_FROM_LIST,{academicYearId:n.state.academicYear},{})):n.state.fromSelfStudies?T.push(x.generate(x.SELF_STUDIES_ACADEMIC_YEAR_DASHBOARD,{academicYearId:n.state.academicYear},{})):T.push(x.generate(x.SECONDARY_HOME,{},{}))},n.state={loading:!1,academicYear:0,academicYears:[],fromSelfStudies:!1,fromAcademicYearList:!1,districts:[]},n}return Vz(t,e),t.prototype.componentDidMount=function(){var e=Number.parseInt(Hr.getPathPart(this.props.match,"academicYearId"));this.setState({fromAcademicYearList:this.props.match.path.split("/").findIndex((function(e){return"academicYearList"==e}))>-1,fromSelfStudies:this.props.match.path.split("/").findIndex((function(e){return"selfStudy"==e}))>-1}),this.state.academicYear!=e?(this.setState({academicYear:e,loading:!0}),this.loadDistricts(e),this.loadAcademicYears(e)):this.loadAcademicYears(e)},t.prototype.render=function(){var e=this;return this.state.loading||0==this.state.academicYear||isNaN(this.state.academicYear)?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Districts",breadcrumbs:Xn.districtList(),onBack:this.onBack,extra:Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)("label",{title:"academicYear",htmlFor:"academicYear"},void 0),Object(o.jsx)(hd,Bz({id:"academicYear",value:this.state.academicYear,onSelect:this.onSelect,dropdownMatchSelectWidth:!1},{children:this.state.academicYears.map((function(t){return e.renderAcademicYear(t)}))}),void 0)]},void 0)},void 0),Object(o.jsx)(y.b,Bz({direction:"vertical",size:"large"},{children:Object(o.jsx)(Qn.a,Bz({title:"Districts"},{children:Object(o.jsx)(y.b,Bz({direction:"vertical",size:"large"},{children:Object(o.jsx)(Rz,{academicYear:this.state.academicYear,fromSelfStudies:this.state.fromSelfStudies,fromAcademicYearList:this.state.fromAcademicYearList},void 0)}),void 0)}),void 0)}),void 0)]},void 0)},t.prototype.renderAcademicYear=function(e){return Object(o.jsx)(pr.a.Option,Bz({value:e.id},{children:e.id}),e.id)},t}(a.Component);var zz=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected}}))(Wz)),Hz=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Qz=function(){return Qz=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Qz.apply(this,arguments)},Kz=function(e){function t(t){var n=e.call(this,t)||this;return n.onBack=function(){T.goBack()},n.state={loading:!1,academicYear:0},n}return Hz(t,e),t.prototype.componentDidMount=function(){var e=Number.parseInt(Hr.getPathPart(this.props.match,"academicYearId"));this.setState({academicYear:e})},t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Districts",breadcrumbs:Xn.academicYearDistrictConfigurationList(this.state.academicYear),onBack:this.onBack},void 0),Object(o.jsx)(y.b,Qz({direction:"vertical",size:"large"},{children:Object(o.jsx)(Qn.a,Qz({title:"Districts"},{children:Object(o.jsx)(y.b,Qz({direction:"vertical",size:"large"},{children:Object(o.jsx)(Rz,{academicYear:this.state.academicYear},void 0)}),void 0)}),void 0)}),void 0)]},void 0)},t}(a.Component);var Xz=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected}}))(Kz)),Jz=function(e){return Object.assign({districtId:null,academicYearId:0,districtContact:null},e)},$z=function(e){return Object.assign({districtContactId:"00000000-0000-0000-0000-000000000000"},e)},Zz={className:"DistrictContactDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",districtId:null,district:null,districtContactTypeId:null,districtContactType:null,fullName:"",email:"",ph
1one:"",title:""},e)},id:"id",districtId:"districtId",district:"district",districtContactTypeId:"districtContactTypeId",districtContactType:"districtContactType",fullName:"fullName",email:"email",phone:"phone",title:"title"},eH={className:"DistrictContactTypeDTO",create:function(e){return Object.assign(Q.create(),{id:0,displayOrder:0,name:""},e)},id:"id",displayOrder:"displayOrder",name:"name"},tH=function(){return tH=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},tH.apply(this,arguments)},nH=a.forwardRef((function(e,t){var n=(new Map).set(Zz.fullName,{label:"Full Name",required:!0,name:Zz.fullName,rules:[Ot.required()]}).set(Zz.title,{label:"Title",required:!1,name:Zz.title}).set(Zz.email,{label:"Email",required:!0,name:Zz.email,rules:[Ot.required()]}).set(Zz.phone,{label:"Phone Number",required:!1,name:Zz.phone}).set(Zz.districtId,{name:Zz.districtId,label:"District"}).set(Zz.districtContactTypeId,{required:!0,name:Zz.districtContactTypeId,label:"Contact Type",rules:[Ot.required(),Ot.onlyNumericCharacters()]});Object(a.useImperativeHandle)(t,(function(){return{resetForm:function(){return e.resetForm}}}));var r=Object(a.useState)(!0),i=r[0],s=r[1],d=Object(a.useState)(!1)[1],c=Object(a.useState)([]),l=c[0],u=c[1],p=Object(a.useState)(void 0),f=p[0],h=p[1],v=Object(a.useState)([]),m=v[0],g=v[1];Object(a.useEffect)((function(){h(e.districtContact)}),[e.districtContact]),Object(a.useEffect)((function(){b()}),[]);var b=function(){s(!0);var t=[];l&&0!=l.length||t.push(j()),m&&0!=m.length||t.push(O()),Promise.all(t).then((function(){s(!1),e.resetForm&&e.resetForm}))},O=function(){var t,n=bL({academicYearId:null!==(t=e.academicYear)&&void 0!==t?t:0});z.getDistricts(n).then((function(e){var t;e&&g(null!==(t=e.districts)&&void 0!==t?t:[])}))},j=function(){return ce.getAll(eH.className).then((function(e){e&&u(e)})).catch((function(){d(!0)}))};return i?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(y.b,tH({size:"small",direction:"vertical",className:"ant-form ant-form-vertical"},{children:[Object(o.jsx)(mt.a,tH({className:"description-container",initialValue:null===f||void 0===f?void 0:f.fullName},n.get(Zz.fullName),_t.getValidation(Zz.fullName,e.fieldErrors,e.submitted),{children:Object(o.jsx)(il,{disabled:i},void 0)}),void 0),Object(o.jsx)(mt.a,tH({className:"description-container",initialValue:null===f||void 0===f?void 0:f.title},n.get(Zz.title),_t.getValidation(Zz.title,e.fieldErrors,e.submitted),{children:Object(o.jsx)(il,{disabled:i},void 0)}),void 0),Object(o.jsx)(mt.a,tH({className:"description-container",initialValue:null===f||void 0===f?void 0:f.email},n.get(Zz.email),_t.getValidation(Zz.email,e.fieldErrors,e.submitted),{children:Object(o.jsx)(il,{disabled:i},void 0)}),void 0),Object(o.jsx)(mt.a,tH({className:"description-container",initialValue:null===f||void 0===f?void 0:f.phone},n.get(Zz.phone),_t.getValidation(Zz.phone,e.fieldErrors,e.submitted),{children:Object(o.jsx)(il,{disabled:i},void 0)}),void 0),Object(o.jsx)(mt.a,tH({className:"description-container",initialValue:void 0==e.districtId?null===f||void 0===f?void 0:f.districtId:e.districtId},n.get(Zz.districtId),_t.getValidation(Zz.districtId,e.fieldErrors,e.submitted),{children:Object(o.jsxs)(hd,tH({dropdownMatchSelectWidth:!1,disabled:i||void 0!=e.districtId},{children:[" ",m.map((function(e){return function(e){var t,n;if(e.id)return Object(o.jsxs)(pr.a.Option,tH({value:null!==(t=e.id)&&void 0!==t?t:re.default.Empty()},{children:[" ",e.display]}),null!==(n=e.id)&&void 0!==n?n:re.default.Empty())}(e)}))]}),void 0)}),void 0),Object(o.jsx)(mt.a,tH({className:"description-container",initialValue:null===f||void 0===f?void 0:f.districtContactTypeId},n.get(Zz.districtContactTypeId),_t.getValidation(Zz.districtContactTypeId,e.fieldErrors,e.submitted),{children:Object(o.jsxs)(hd,tH({dropdownMatchSelectWidth:!1,disabled:i},{children:[" ",l.map((function(e){return function(e){var t,n;if(e.id)return Object(o.jsxs)(pr.a.Option,tH({value:null!==(t=e.id)&&void 0!==t?t:re.default.Empty()},{children:[" ",e.name]}),null!==(n=e.id)&&void 0!==n?n:re.default.Empty())}(e)}))]}),void 0)}),void 0)]}),void 0)}));nH.displayName="DistrictContactDetailsForm";var rH=nH,iH="file",oH=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),aH=function(){return aH=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},aH.apply(this,arguments)},sH=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n.getFormItems=function(){return(new Map).set(iH,{name:iH,label:"Please select a file to import district contacts"})},n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields()},n.confirmImport=function(){var e,t,r=null!==(t=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldsValue())&&void 0!==t?t:{};f.a.confirm({title:"Reset Data",content:"Importing this file will delete the current data.",onOk:function(){return n.handleSubmit(r)},width:500})},n.handleSubmit=function(e){if(n.setState({submitting:!0}
1),br.canSubmit(n._formRef,n.getFormItems())){var t=e.file.newFiles[0],r=Za.attachFileToModel("districtContactImporter",{academicYearId:n.props.academicYear},iH,t);n.setState({loading:!0}),z.districtContactImporter(r).then((function(e){n.resetForm(),n.setState({submitting:!1}),n.props.onSubmit&&n.props.onSubmit([]);R.a.downloadBase64StringAsExcel("District Contact Summary Report.xlsx",null!==e&&void 0!==e?e:void 0)})).catch((function(){S.b.error("Import Failed. Please check formatting in file."),n.setState({error:!0})})).finally((function(){n.setState({loading:!1}),n.props.onSubmit&&n.props.onSubmit([])}))}else S.b.error("Please fill out all required fields."),n.setState({loading:!1,submitting:!1})},n.downloadTemplate=function(){window.open(x.generateFull(x.DISTRICT_CONTACT_IMPORT_TEMPLATE,{},{}),"_blank")},n.state={},n}return oH(t,e),t.prototype.render=function(){return Object(o.jsx)(y.b,aH({direction:"vertical"},{children:Object(o.jsx)(Ci.a,aH({layout:"vertical",onFinish:this.handleSubmit,ref:this._formRef},{children:Object(o.jsxs)(y.b,aH({direction:"vertical"},{children:[Object(o.jsx)(Ci.a.Item,aH({},this.getFormItems().get(iH),_t.getValidation(iH,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(hs,{maxCount:1,style:{width:300}},void 0)}),void 0),this.props.isInModal?null:Object(o.jsxs)(y.b,aH({direction:"horizontal"},{children:[Object(o.jsx)(rt.a,aH({htmlType:"submit",type:"primary",icon:Object(o.jsx)(ds.a,{},void 0),loading:this.state.loading},{children:"Import"}),void 0),Object(o.jsx)(rt.a,aH({icon:Object(o.jsx)(pn.a,{},void 0),type:"link",onClick:this.downloadTemplate},{children:"Download Template"}),void 0)]}),void 0),this.renderErrors()]}),void 0)}),void 0)}),void 0)},t.prototype.renderErrors=function(){if(this.state.error&&this.state.message)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:this.state.message},void 0)},t}(a.Component),dH=function(){return dH=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},dH.apply(this,arguments)};var cH=function(e){var t=void 0,n=Object(a.useState)(void 0),r=n[0],i=n[1],s=Object(a.useState)(!1),d=s[0],c=s[1],l=Object(a.useState)(!1),u=l[0],p=l[1],f=Object(a.useState)(!1),h=f[0],v=f[1],m=Object(a.useState)({}),g=m[0],b=m[1],y=a.useRef(),O=a.useRef(),j=a.createRef(),I=function(e){null!=e&&Rd.a.confirm({title:"Are you sure you want to delete this District Contact?",okText:"Delete",onOk:function(){return E(e)},okButtonProps:{type:"primary",danger:!0}})},E=function(e){var n=$z({districtContactId:e});z.deleteDistrictContact(n).then((function(e){!0===(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("District Contact was removed."),null===t||void 0===t||t.refresh()):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(){S.b.error("District Contact could not be removed.")}))},R=function(e){i(e),setTimeout((function(){return A()}),1),c(!0)},_=function(){c(!1),i(void 0),v(!1),b({})},T=function(){p(!1),null===t||void 0===t||t.refresh()},C=function(){var n,i;v(!0);var o=Zz.create(null===(n=O.current)||void 0===n?void 0:n.getFieldsValue());o.id=null!==(i=null===r||void 0===r?void 0:r.id)&&void 0!==i?i:re.default.Empty();var a=Jz({districtId:e.districtId,academicYearId:e.academicYear,districtContact:o});z.saveDistrictContactDetails(a).then((function(e){(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Contact Added Successfully!"),_(),null===t||void 0===t||t.refresh()):(b(e.fieldErrors),S.b.error("Error Adding Contact"))})).catch((function(){S.b.error("Error Adding Contact")}))},A=function(){var e;null===(e=O.current)||void 0===e||e.resetFields()},P=function(){null===t||void 0===t||t.refresh(),_()},N=[];return N.push(oo.Reset()),Je.isAuthorized([gn.MANAGE_DISTRICT_CONTACT])&&(e.fromDataReview&&(N.push(oo.Default("Re-Import District Contacts",(function(){return p(!0),void Rd.a.confirm({title:"Import",content:Object(o.jsx)(sH,{ref:j,academicYear:e.academicYear,isInModal:!0,onSubmit:T},void 0),onCancel:function(){p(!1)},onOk:function(){var e;return null===(e=j.current)||void 0===e?void 0:e.confirmImport()},width:500})}),void 0,u)),N.push(oo.Default("District Contacts Template",(function(){window.open(x.generateFull(x.DISTRICT_CONTACT_IMPORT_TEMPLATE,{},{}),"_blank")}),Object(o.jsx)(pn.a,{},void 0),u))),N.push(oo.Default("Add Contact",(function(){return R(void 0)})))),Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(io,{ref:function(e){return t=e},serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:N,columns:function(){var e=[{title:"Full Name",dataIndex:Zz.fullName,sorter:!0,render:function(e,t){return t.fullName},filterType:wr.Text},{title:"Email",dataIndex:Zz.email,render:function(e,t){return t.email},filterType:wr.Text},{title:"Title",dataIndex:Zz.title,sorter:!0,render:function(e,t){return t.title},filterType:wr.Text},{title:"District",dataIndex:Zz.districtId,sorter:!0,render:function(e,t){var n;return null===(n=t.district)||void 0===n?void 0:n.display},filterType:wr.Text},{title:"Actions",align:"center",dataIndex:Zz.id,sorter:!1,render:function(e,t){if(Je.isAuthorized([gn.CONFIG_ACADEMIC_YEAR]))return Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(rt.a,dH({type:"link",onClick:function(){return R(t)}},{children:Object(o.jsx)(Gr.a,{},void 0)}),void 0),Object(o.jsx)(rt.a,dH({type:"link",onClick:function(){return I(t.id)}},{children:Object(o.jsx)(Yd.a,{},void 0)}),void 0)]},void 0)},width:50}];return e}(),fetchData:{fetch:function(t){var n;return z.getDistrictContactsDataTable(t,e.academicYear,null!==(n=e.districtId)&&void 0!==n?n:re.default.Empty())}},stateSaving:{enabled:!0,tableUniqueKey:"district_contacts_list"}},void 0),Object(o.jsx)(Dl.a,dH({ref:O,layout:"vertical",requiredMark:!0},{children:Object(o.jsx)(Rd.a,dH({visible:d,title:"District Contact",okText:void 0==r?"Add":"Save",onOk:C,onCancel:_},{children:Object(o.jsx)(rH,{districtId:e.districtId,ref:y,submitted:h,fieldErrors:g,academicYear:e.academicYear,onSuccess:P,districtContact:r,resetForm:A},void 0)}),void 0)}),void 0)]},void 0)},lH=function(e){return Object.assign({secondaryProgramId:"00000000-0000-0000-0000-000000000000",academicYearId:0},e)},uH=function(e){return Object.assign({id:"00000000-0000-0000-0000-000000000000",academicYear:null,secondaryProgramId:null},e)},pH=function(e){return Object.assign({secondaryProgramId:null,secondaryProgram:null},e)},fH=function(e){return Object.assign({searchString:"",academicYear:0},e)},hH=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),vH=function(){return vH=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},vH.apply(this,arguments)},mH=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n.YEAR_TO_HIDE=2023,n._formItems=(new Map).set(IL.secondaryProgramId,{required:!0,name:IL.secondaryProgramId,label:"Identifier",rules:[Ot.required(),Ot.onlyNumericCharacters()]}).set(IL.districtId,{required:!0,name:IL.districtId,label:"District",rules:[Ot.required()]}).set(IL.cipNumberId,{required:!0,name:IL.cipNumberId,label:"CIP Number",rules:[Ot.required()]}).set(IL.programStartYear,{name:IL.programStartYear,label:"Program Start Year"}).set(IL.programEndYear,{name:IL.programEndYear,label:"Program End Year"}),n.fetchData=function(){n.setState({loading:!0});var e=[];e.push(n.loadSecondaryProgram()),n.state.districts&&0!=n.state.districts.length&&n.state.districts[0].academicYear==n.props.academicYear||e.push(n.loadDistricts()),n.state.cipNumbers&&0!=n.state.cipNumbers.length&&n.state.cipNumbers[0].academicYear==n.props.academicYear||e.push(n.loadCipNumbers()),n.state.approvalStatusTypes&&0!=n.state.approvalStatusTypes.length||e.push(n.loadApprovalStatusTypes()),Promise.all(e).then((function(){n.setState({loading:!1}),n.resetForm()}))},n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields(),n.setState({altered:!1})},n.loadExisting=function(){if(n.props.secondaryProgramId&&n.props.academicYear){var e=uH({id:n.props.secondaryProgramId});mL.getSecondaryProgramDetails(e).then((function(e){var t;e&&e.secondaryProgram&&e.secondaryProgram.secondaryCipNumber&&n.setState({cipNumbers:[e.secondaryProgram.secondaryCipNumber],secondaryProgram:null!==(t=e.secondaryProgram)&&void 0!==t?t:IL.create({id:n.props.secondaryProgramId==re.default.Empty()?void 0:n.props.secondaryProgramId,secondaryProgramId:void 0,districtId:void 0,cipNumberId:void 0,studentStatusTypeId:void 0,approvalStatusId:void 0})}),n.resetForm()})).catch((function(){n.setState({error:!0})}
1)).finally((function(){n.setState({loading:!1})}))}},n.loadApprovalStatusTypes=function(){return ce.getAll(ai.className).then((function(e){e&&n.setState({approvalStatusTypes:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})}))},n.loadDistricts=function(){var e,t=bL({academicYearId:null!==(e=n.props.academicYear)&&void 0!==e?e:0});z.getDistricts(t).then((function(e){var t;e&&n.setState({districts:null!==(t=e.districts)&&void 0!==t?t:[]}),n.resetForm()})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))},n.loadCipNumbers=function(){var e=yL({academicYear:n.props.academicYear});fL.getSecondaryCipNumbers(e).then((function(e){var t;e&&n.setState({cipNumbers:null!==(t=e.secondaryCipNumbers)&&void 0!==t?t:[]}),n.resetForm()})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))},n.loadNew=function(){n.setState({loading:!1,secondaryProgram:IL.create({id:n.props.secondaryProgramId==re.default.Empty()?void 0:n.props.secondaryProgramId,secondaryProgramId:void 0,districtId:void 0,cipNumberId:void 0,studentStatusTypeId:void 0,approvalStatusId:void 0})})},n.handleChange=function(){n.setState({altered:!0})},n.submit=function(){var e;null===(e=n._formRef.current)||void 0===e||e.validateFields().then((function(){return n.handleSubmit()}),(function(){return n.setState({error:!0})}))},n.handleSubmit=function(){n.setState({submitting:!0});var e=pH({secondaryProgramId:n.props.secondaryProgramId,secondaryProgram:IL.create(vH(vH({},n._formRef?n._formRef.current.getFieldsValue():null),{academicYear:n.props.academicYear}))});mL.saveSecondaryProgramDetails(e).then((function(e){var t,r;n.setState({submitted:!0}),(null===e||void 0===e?void 0:e.succeeded)?(n.setState({secondaryProgram:null!==(t=e.secondaryProgram)&&void 0!==t?t:IL.create(),fieldErrors:void 0,error:!1}),S.b.success("Saved"),n.props.onSave&&(null===(r=e.secondaryProgram)||void 0===r?void 0:r.id)&&
1(n.props.onSave(e.secondaryProgram.id),n.resetForm())):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Program could not be saved"),n.setState({loading:!1,submitting:!1}))})).catch((function(e){n.setState({error:e,loading:!1,submitting:!1}),S.b.error("Programcould not be saved")})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.handleCipNumberSearch=function(e){if(e.length>1){var t=fH({searchString:e,academicYear:n.props.academicYear});n.setState({searching:!0}),fL.searchForSecondaryCipNumbers(t).then((function(e){var t;n.setState({cipNumbers:null!==(t=e.cipNumbers)&&void 0!==t?t:[],searching:!1})}))}},n.handleCipNumberSelect=function(){},n.state={secondaryProgram:IL.create({id:void 0,secondaryProgramId:void 0,districtId:void 0,cipNumberId:void 0,stateAssistanceEligibleYear:void 0,stateAssistanceEligible:void 0,studentStatusTypeId:void 0,approvalStatusId:void 0}),districts:[],cipNumbers:[],searching:!1,approvalStatusTypes:[]},n}return hH(t,e),t.prototype.componentDidMount=function(){this.fetchData()},t.prototype.componentDidUpdate=function(e){this.props!=e&&this.fetchData()},t.prototype.loadSecondaryProgram=function(){this.state.loading||(this.props.secondaryProgramId==re.default.Empty()||this.props.isNew?this.loadNew():this.loadExisting())},t.prototype.render=function(){var e,t,n,r,i=this;if(this.state.loading)return Object(o.jsx)(pt.a,{active:!0},void 0);var a=null==Xe.Get(),s=this.state.cipNumbers.sort((function(e,t){var n,r,i;return null!==(i=null===(n=e.code)||void 0===n?void 0:n.localeCompare(null!==(r=t.code)&&void 0!==r?r:""))&&void 0!==i?i:0})).map((function(e){return{value:e.id,display:e.display}}));return Object(o.jsxs)(y.b,vH({size:"small",direction:"vertical"},{children:[this.renderErrors(),Object(o.jsx)(ht.a,vH({ref:this._formRef,layout:"vertical",initialValues:this.state.secondaryProgram,onValuesChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!a},{children:Object(o.jsxs)(y.b,vH({size:"small",direction:"vertical"},{children:[Object(o.jsx)(mt.a,vH({className:"description-container"},this._formItems.get(IL.secondaryProgramId),_t.getValidation(IL.secondaryProgramId,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(RB,{readonly:a,disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,vH({className:"description-container"},this._formItems.get(IL.districtId),_t.getValidation(IL.districtId,this.state.fieldErrors,this.state.submitted),{children:a?Object(o.jsx)(ud,{text:null===(e=this.state.districts.find((function(e){return e.id==i.state.secondaryProgram.districtId})))||void 0===e?void 0:e.name},void 0):Object(o.jsx)(hd,vH({readOnly:a,dropdownMatchSelectWidth:!1,disabled:!this.props.isEditing||this.state.loading||this.state.submitting},{children:this.state.districts.sort((function(e,t){return e.districtId-t.districtId})).map((function(e){return i.renderDistrict(e)}))}),void 0)}),void 0),Object(o.jsx)(mt.a,vH({className:"description-container"},this._formItems.get(IL.cipNumberId),_t.getValidation(IL.cipNumberId,this.state.fieldErrors,this.state.submitted),{children:a?Object(o.jsx)(ud,{text:null===(t=this.state.cipNumbers.find((function(e){return e.id==i.state.secondaryProgram.cipNumberId})))||void 0===t?void 0:t.code},void 0):Object(o.jsx)(Wa,{onSelect:this.handleCipNumberSelect,options:null!==s&&void 0!==s?s:[],searching:this.state.searching,onSearch:this.handleCipNumberSearch,disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,vH({className:"description-container"},this._formItems.get(IL.programStartYear),_t.getValidation(IL.programStartYear,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(RB,{readonly:a,disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,vH({className:"description-container"},this._formItems.get(IL.programEndYear),_t.getValidation(IL.programEndYear,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(RB,{readonly:a,disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),(null!==(n=this.props.academicYear)&&void 0!==n?n:0)<=this.YEAR_TO_HIDE?null:Object(o.jsx)(al,{thirdPartyCredentials:null!==(r=this.state.secondaryProgram.thirdPartyCredentials)&&void 0!==r?r:[],isSecondaryProgram:!0,readonly:!this.props.isEditing||this.state.loading||this.state.submitting,submitted:this.state.submitted,fieldErrors:this.state.fieldErrors},void 0),this.renderSave()]}),void 0)}),void 0)]}),void 0)},t.prototype.renderApprovalStatusTypes=function(e){var t,n,r;if(e.id)return Object(o.jsx)(pr.a.Option,vH({title:null!==(t=e.name)&&void 0!==t?t:"",value:null!==(n=e.id)&&void 0!==n?n:re.default.Empty()},{children:e.name}),null!==(r=e.id)&&void 0!==r?r:re.default.Empty())},t.prototype.renderDistrict=function(e){var t,n,r;if(e.id)return Object(o.jsx)(pr.a.Option,vH({title:null!==(t=e.display)&&void 0!==t?t:"",value:null!==(n=e.id)&&void 0!==n?n:re.default.Empty()},{children:e.display}),null!==(r=e.id)&&void 0!==r?r:re.default.Empty())},t.prototype.renderCipNumber=function(e){var t,n,r,i;if(e.id)return Object(o.jsx)(pr.a.Option,vH({title:null!==(n=null===(t=null===e||void 0===e?void 0:e.display)||void 0===t?void 0:t.toString())&&void 0!==n?n:"",value:null!==(r=e.id)&&void 0!==r?r:re.default.Empty()},{children:e.display}),null!==(i=e.id)&&void 0!==i?i:re.default.Empty())},t.prototype.renderSave=function(){if(this.props.isEditing&&!this.props.fromDataReview
1)return Object(o.jsx)(Ze,vH({validFeatureFlags:[gn.EDIT_SECONDARY_PROGRAM]},{children:Object(o.jsxs)(y.b,vH({direction:"horizontal"},{children:[Object(o.jsx)(Tr,{disabled:!this.state.altered,saving:this.state.submitting},void 0),Object(o.jsx)(Ir,{disabled:!this.state.altered,onConfirm:this.resetForm},void 0)]}),void 0)}),void 0)},t.prototype.renderErrors=function(){if(this.state.error)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t}(a.Component),gH=function(){return gH=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},gH.apply(this,arguments)};var bH=function(e){var t,n=s.a.createRef(),r=e.secondaryProgramId==re.default.Empty();return Object(o.jsx)(f.a,gH({visible:!0,title:r?"New Program":"Edit Program",okText:"Save",onOk:function(){var e;null===(e=n.current)||void 0===e||e.submit()},okButtonProps:{htmlType:"submit"},onCancel:e.onCancel,destroyOnClose:!0},{children:Object(o.jsx)(mH,{ref:n,fromDataReview:!0,secondaryProgramId:null!==(t=e.secondaryProgramId)&&void 0!==t?t:re.default.Empty,isEditing:!0,onSave:e.onSave,isNew:r,academicYear:e.academicYear},void 0)}),void 0)},yH="file",OH=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),jH=function(){return jH=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},jH.apply(this,arguments)},IH=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n.getFormItems=function(){return(new Map).set(yH,{name:yH,label:"Please select a file to import Programs"})},n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields()},n.confirmImport=function(){var e,t,r=null!==(t=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldsValue())&&void 0!==t?t:{};f.a.confirm({title:"Reset Data",content:"Importing this file will delete the current data.",onOk:function(){return n.handleSubmit(r)},width:500})},n.handleSubmit=function(e){if(n.setState({submitting:!0}),br.canSubmit(n._formRef,n.getFormItems())){var t=e.file.newFiles[0],r=Za.attachFileToModel("secondaryProgramImporter",{academicYearId:n.props.academicYear},yH,t);n.setState({loading:!0}),mL.secondaryProgramImporter(r).then((function(e){var t;n.resetForm(),n.setState({submitting:!1}),null===(t=n.props.refreshDataTable)||void 0===t||t.resetTable();R.a.downloadBase64StringAsExcel("ProgramSummary Report.xlsx",null!==e&&void 0!==e?e:void 0)})).catch((function(){S.b.error("Import Failed. Please check formatting in file."),n.setState({error:!0})})).finally((function(){n.setState({loading:!1}),n.props.onSubmit&&n.props.onSubmit([])}))}else S.b.error("Please fill out all required fields."),n.setState({loading:!1,submitting:!1})},n.downloadTemplate=function(){window.open(x.generateFull(x.SECONDARY_PROGRAM_IMPORT_TEMPLATE,{},{}),"_blank")},n.state={},n}return OH(t,e),t.prototype.render=function(){return Object(o.jsx)(y.b,jH({direction:"vertical"},{children:Object(o.jsx)(Ci.a,jH({layout:"vertical",onFinish:this.handleSubmit,ref:this._formRef},{children:Object(o.jsxs)(y.b,jH({direction:"vertical"},{children:[Object(o.jsx)(Ci.a.Item,jH({},this.getFormItems().get(yH),_t.getValidation(yH,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(hs,{maxCount:1,style:{width:300}},void 0)}),void 0),this.props.isInModal?null:Object(o.jsxs)(y.b,jH({direction:"horizontal"},{children:[Object(o.jsx)(rt.a,jH({htmlType:"submit",type:"primary",icon:Object(o.jsx)(ds.a,{},void 0),loading:this.state.loading},{children:"Import"}),void 0),Object(o.jsx)(rt.a,jH({icon:Object(o.jsx)(pn.a,{},void 0),type:"link",onClick:this.downloadTemplate},{children:"Download Template"}),void 0)]}),void 0)]}),void 0)}),void 0)}),void 0)},t}(a.Component),SH=function(){return SH=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},SH.apply(this,arguments)};var EH=function(e){var t=void 0,n=a.createRef(),r=Object(a.useState)(),i=r[0],s=r[1],d=Object(a.useState)(!1),c=d[0],l=d[1],u=Object(a.useState)(e.errors),p=u[0],h=u[1],v=Object(a.useState)([]),m=v[0],g=v[1],b=Object(a.useState)([]),y=b[0],O=b[1];Object(a.useEffect)((function(){isNaN(e.academicYear)||(be.getRegionalPlanningPartners(e.academicYear).then((function(e){var t;g(null!==(t=e.regions)&&void 0!==t?t:[])})),Ii.Institutions().then((function(e){O(e)})))}),[e.academicYear]);var j=function(e){e.id&&s(e.id)},I=function(){s(null)},E=function(t){null!=t&&f.a.confirm({title:"Are you sure you want to delete this Program?",okText:"Delete",onOk:function(){return R(t,e.academicYear)}
1,okButtonProps:{type:"primary",danger:!0}})},R=function(e,n){var r=lH({secondaryProgramId:e,academicYearId:n});mL.deleteSecondaryProgram(r).then((function(e){!0===(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Program was removed."),null===t||void 0===t||t.refresh()):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(){S.b.error("Program could not be removed.")}))},_=function(e){l(!1),h(e)},C=[];C.push(oo.Reset()),Je.isAuthorized([gn.EDIT_SECONDARY_PROGRAM])&&!e.districtId&&C.push(oo.Default("New Program",(function(){s(re.default.Empty())}))),Je.isAuthorized([gn.EDIT_SECONDARY_PROGRAM])&&!e.districtId&&e.fromAcademicYearDataReview&&C.push(oo.Default("Re-import Programs",(function(){return l(!0),void f.a.confirm({title:"Import Programs",content:Object(o.jsx)(IH,{ref:n,academicYear:e.academicYear,refreshDataTable:t,isInModal:!0,onSubmit:_},void 0),onCancel:function(){l(!1)},onOk:function(){var e;return null===(e=n.current)||void 0===e?void 0:e.confirmImport()},width:500})}),void 0,c)),Je.isAuthorized([gn.EDIT_SECONDARY_PROGRAM])&&e.fromAcademicYearDataReview&&C.push(oo.Default("Template",(function(){window.open(x.generateFull(x.SECONDARY_PROGRAM_IMPORT_TEMPLATE,{},{}),"_blank")}),Object(o.jsx)(pn.a,{},void 0),c));var A=function(){if(p&&p.length>0)return Object(o.jsx)(o.Fragment,{children:p.map((function(e){return Object(o.jsx)("p",{children:e},e)}))},void 0)};return Object(o.jsxs)(o.Fragment,{children:[function(){if(p&&p.length>0)return Object(o.jsx)(ct.a,{showIcon:!0,type:"error",description:A(),message:"Error Importing"},void 0)}(),function(){if(i)return Object(o.jsx)(bH,{onCancel:I,visible:!0,secondaryProgramId:i,academicYear:e.academicYear,onSave:I},void 0)}(),Object(o.jsx)(io,{ref:function(e){return t=e},serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},onRowClick:e.fromAcademicYearDataReview?void 0:function(t){var n;t.id&&T.push(x.generate(x.SECONDARY_PROGRAM_DETAILS,{id:t.id},{academicYear:e.academicYear,districtId:null!==(n=e.districtId)&&void 0!==n?n:re.default.Empty(),configuration:e.configuration}))},globalSearch:!0,buttonBar:C,columns:function(){var t=[];return e.isPublic?t.pushAll([{title:"CIP Number",dataIndex:IL.cipNumberId,sorter:!0,width:50,render:function(e,t){var n,r;return(null===(n=t.secondaryCipNumber)||void 0===n?void 0:n.code)+" - "+(null===(r=t.secondaryCipNumber)||void 0===r?void 0:r.description)},filterType:wr.Text}]):(t.pushAll([{title:"Identifier",dataIndex:IL.secondaryProgramId,sorter:!0,width:50,filterType:wr.Text},{title:"Title",dataIndex:IL.secondaryCipNumber,sorter:!0,render:function(e,t){var n;return null===(n=t.secondaryCipNumber)||void 0===n?void 0:n.description},filterType:wr.Text},{title:"District",dataIndex:IL.districtId,sorter:!0,render:function(e,t){var n;return null===(n=t.district)||void 0===n?void 0:n.name},filterType:wr.Text},{title:"RPP",dataIndex:K.regionIdentifier,sorter:!0,width:250,filterType:wr.DropdownMulti,dropdownFilterOptions:m.map((function(e){return{text:e.regionalPlanningPartnerIdentifier+" - "+e.name,value:e.regionalPlanningPartnerIdentifier.toString()}})),render:function(e,t){var n,r;if(m.length>0){var i=m.filter((function(e){var n;return e.regionalPlanningPartnerIdentifier===(null===(n=t.district)||void 0===n?void 0:n.regionIdentifier)}));return null!==(r=null===(n=i[0])||void 0===n?void 0:n.display)&&void 0!==r?r:""}return""}},{title:"Community College",dataIndex:Oe.institutionId,sorter:!0,render:function(e,t){var n,r,i,o,a,s;return(null===(i=null===(r=null===(n=t.district)||void 0===n?void 0:n.region)||void 0===r?void 0:r.institution)||void 0===i?void 0:i.code)+" - "+(null===(s=null===(a=null===(o=t.district)||void 0===o?void 0:o.region)||void 0===a?void 0:a.institution)||void 0===s?void 0:s.name)},filterType:wr.DropdownMulti,dropdownFilterOptions:y},{title:"CIP Number",dataIndex:IL.cipNumberId,sorter:!0,render:function(e,t){var n;return null===(n=t.secondaryCipNumber)||void 0===n?void 0:n.code},filterType:wr.Text}]),e.fromAcademicYearDataReview&&t.push({title:"Actions",align:"center",dataIndex:IL.secondaryProgramId,sorter:!1,render:function(e,t){if(Je.isAuthorized([gn.CONFIG_ACADEMIC_YEAR]))return Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(rt.a,SH({type:"link",onClick:function(){return j(t)}},{children:Object(o.jsx)(Gr.a,{},void 0)}),void 0),Object(o.jsx)(rt.a,SH({type:"link",onClick:function(){return E(t.id)}},{children:Object(o.jsx)(Yd.a,{},void 0)}),void 0)]},void 0)},width:50})),t}(),fetchData:{fetch:function(t){var n,r;return mL.getSecondaryProgramTableData(t,e.academicYear,null!==(n=e.isPublic)&&void 0!==n&&n,null!==(r=e.districtId)&&void 0!==r?r:re.default.Empty())}},stateSaving:{enabled:!0,tableUniqueKey:"secondary_program_list"}},void 0)]},void 0)},RH=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),_H=function(){return _H=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},_H.apply(this,arguments)},TH=function(e){function t(t){var n=e.call(this,t)||this;return n._districtDetailsRef=a.createRef(),n.loadDistricts=function(e,t){var r=bL({academicYearId:t,districtId:e});z.getDistricts(r).then((function(e){var t;e&&n.setState({districts:null!==(t=e.districts)&&void 0!==t?t:[]})})).catch((function(){n.setState({error:!0})}
1)).finally((function(){n.setState({loading:!1})}))},n.loadDistrict=function(e,t,r){n.setState({id:e});var i=H({id:e,districtId:r,academicYear:t});z.getDistrictDetails(i).then((function(e){var t;e.district?(n.setState({district:e.district,id:null!==(t=e.district.id)&&void 0!==t?t:re.default.Empty(),isNew:!1,isEditing:!1,districtIdentifier:e.district.districtId,academicYearId:e.district.academicYear}),n.state.district&&0==n.state.districts.length&&n.loadDistricts(e.district.districtId,e.district.academicYear)):n.setState({isNew:!0,id:re.default.Empty(),district:void 0,isEditing:!0})})).catch((function(){n.setState({error:!0})}))},n.loadAcademicYears=function(){n.setState({loading:!0});var e=ML({});return sL.getAcademicYears(e).then((function(e){var t;e&&e.academicYears&&n.setState({academicYears:null!==(t=e.academicYears)&&void 0!==t?t:[]})})).catch((function(){n.setState({error:!0})}))},n.loadRegionalPlanningPartners=function(e){be.getRegionalPlanningPartners(e).then((function(e){var t;e&&n.setState({regions:null!==(t=e.regions)&&void 0!==t?t:[]})})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))},n.toggleEdit=function(){var e;n.state.isEditing&&(null===(e=n._districtDetailsRef.current)||void 0===e||e.resetForm()),n.setState({isEditing:!n.state.isEditing})},n.changeTab=function(e){n.setState({activeTab:e}),T.replace(x.generate("",{},{activeTab:e,academicYear:n.state.academicYearId}),{activeTab:e})},n.districtDetailsPageSaved=function(e){n.setState({isEditing:!1,isNew:!1}),e!=n.state.id?(T.push(x.generate(x.DISTRICT_DETAILS,{id:e},{academicYearId:n.state.academicYearId,fromSelfStudies:n.state.fromSelfStudies,fromAcademicYearList:n.state.fromAcademicYearList})),n.loadDistrict(e)):n.loadDistrict(e)},n.deleteConfirmation=function(e,t){f.a.confirm({title:"Are you sure you want to delete this District?",okText:"Delete",onOk:function(){return n.deleteDistrict(e,t)}})},n.deleteDistrict=function(e,t){n.setState({submitting:!0});var r=fz({districtId:e,academicYearId:t});z.deleteDistrict(r).then((function(e){n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,altered:!(null===e||void 0===e?void 0:e.succeeded)}),!0===(null===e||void 0===e?void 0:e.succeeded)?S.b.success("District was removed."):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(e){n.setState({error:e}),S.b.error("District could not be removed.")})).finally((function(){n.setState({loading:!1}),n.goToListing()}))},n.goToListing=function(){n.state.rppId!=re.default.Empty()&&""!=n.state.rppId?T.goBack():n.state.fromAcademicYearList?T.push(x.generate(x.DISTRICTS_ACADEMIC_YEAR_LIST,{academicYearId:n.state.academicYearId},{})):n.state.fromSelfStudies?T.push(x.generate(x.DISTRICTS,{academicYearId:n.state.academicYearId})):null==Xe.Get()?T.push(x.generate(x.ALL_DISTRICTS,{})):T.push(x.generate(x.ALL_DISTRICTS))},n.onSelect=function(e){n.setState({academicYearId:e,id:re.default.Empty()}),n.loadDistrict(re.default.Empty(),e,n.state.districtIdentifier)},n.state={activeTab:"details",id:re.default.Empty(),districtIdentifier:0,districts:[],academicYears:[],academicYearId:0,fromAcademicYearList:!1,fromSelfStudies:!1,regions:[],rppId:re.default.Empty()},n}return RH(t,e),t.prototype.componentDidMount=function(){var e,t=this,n=Hr.getPathPart(this.props.match,"id"),r=Hr.getParameter("academicYear"),i=Hr.getParameter("fromAcademicYearList"),o=Hr.getParameter("fromSelfStudies"),a=Hr.getParameter("rppId"),s=Hr.getParameter("activeTab","details");(this.setState({academicYearId:Number.parseInt(r),fromSelfStudies:"true"==o,fromAcademicYearList:"true"==i,rppId:a,activeTab:s}),this.props.match.path.split("/").findIndex((function(e){return"new"==e}))>-1)?(this.setState({isEditing:!0,isNew:!0,loading:!1}),(e=[]).push(this.loadAcademicYears()),e.push(this.loadRegionalPlanningPartners(r)),Promise.all(e).then((function(){t.setState({loading:!1})}))):((e=[]).push(this.loadDistrict(n)),e.push(this.loadAcademicYears()),e.push(this.loadRegionalPlanningPartners(r)),Promise.all(e).then((function(){t.setState({loading:!1})}
1)))},t.prototype.render=function(){var e,t,n,r,i=this;if(!this.state.academicYearId||0==this.state.academicYearId)return Object(o.jsx)(pt.a,{active:!0},void 0);var a=this.state.loading?"...":this.state.isNew?"New District":null!==(t=null===(e=this.state.district)||void 0===e?void 0:e.name)&&void 0!==t?t:"...",s=null==Xe.Get();return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:a,onBack:this.goToListing,breadcrumbs:this.state.rppId==re.default.Empty()||""==this.state.rppId?Xn.districtDetailPage(a,this.state.id,this.state.academicYearId):Xn.districtDetailPageFromRPP(a,null!==(r=null===(n=this.state.regions.find((function(e){var t;return e.regionalPlanningPartnerIdentifier==(null===(t=i.state.district)||void 0===t?void 0:t.regionIdentifier)})))||void 0===n?void 0:n.name)&&void 0!==r?r:"",this.state.id,this.state.academicYearId,this.state.rppId),extra:this.renderMoreActions(),footer:Object(o.jsxs)(pa.a,_H({activeKey:this.state.activeTab,onChange:this.changeTab},{children:[Object(o.jsx)(pa.a.TabPane,{tab:"Details"},"details"),Object(o.jsx)(pa.a.TabPane,{tab:"Programs"},"programs"),s?null:Object(o.jsx)(pa.a.TabPane,{tab:"Users"},"users"),Object(o.jsx)(pa.a.TabPane,{tab:"Contacts"},"contacts"),s?null:Object(o.jsx)(pa.a.TabPane,{tab:"Program Reviews"},"programReviews")]}),void 0)},void 0),this.renderDetailsCard(),this.renderProgramsCard(s),this.renderDistrictUsersCard(s),this.renderProgramsForDistricts(),this.renderDistrictContactsCard()]},void 0)},t.prototype.renderDetailsCard=function(){if("details"==this.state.activeTab){var e=this.state.id==re.default.Empty()?null:Object(o.jsx)(Ze,_H({validFeatureFlags:[gn.EDIT_DISTRICT]},{children:Object(o.jsx)(Br,{isEditing:this.state.isEditing,onClick:this.toggleEdit},void 0)}),void 0);return Object(o.jsx)(Qn.a,_H({title:"Details",extra:e},{children:Object(o.jsx)(gz,{ref:this._districtDetailsRef,districtId:this.state.id,isEditing:this.state.isEditing,isNew:this.state.isNew,onSave:this.districtDetailsPageSaved,academicYear:this.state.academicYearId},void 0)}),void 0)}},t.prototype.renderProgramsCard=function(e){var t;if("programs"==this.state.activeTab)return Object(o.jsx)(Qn.a,_H({title:"Programs"},{children:Object(o.jsx)(EH,{isPublic:e,districtId:null!==(t=this.state.id)&&void 0!==t?t:re.default.Empty(),academicYear:this.state.academicYearId},void 0)}),void 0)},t.prototype.renderDistrictUsersCard=function(e){var t,n;if("users"===this.state.activeTab&&this.state.id!=re.default.Empty())return Object(o.jsx)(Qn.a,_H({title:"Districts"},{children:Object(o.jsx)(hY,{districtName:null!==(n=null===(t=this.state.district)||void 0===t?void 0:t.name)&&void 0!==n?n:"",districtIdentifier:this.state.districtIdentifier,isPublic:e},void 0)}),void 0)},t.prototype.renderProgramsForDistricts=function(){var e;if("programReviews"===this.state.activeTab&&this.state.id!=re.default.Empty())return Object(o.jsx)(Qn.a,_H({title:"Program Reviews"},{children:Object(o.jsx)(FL,{programsForReview:!0,academicYear:this.state.academicYearId,selectedDistrict:null!==(e=this.state.district)&&void 0!==e?e:null,selectedRPP:null,userActions:!0},void 0)}),void 0)},t.prototype.renderDistrictContactsCard=function(){if("contacts"===this.state.activeTab&&this.state.id!=re.default.Empty())return Object(o.jsx)(Qn.a,_H({title:"District Contacts"},{children:Object(o.jsx)(cH,{districtId:this.state.id,academicYear:this.state.academicYearId},void 0)}),void 0)},t.prototype.renderMoreActions=function(){var e=this,t=Object(o.jsx)(Gt.a,{children:Object(o.jsx)(Gt.a.Item,_H({title:"Delete District",onClick:function(){return e.deleteConfirmation(e.state.id,e.state.academicYearId)}},{children:"Delete District"}),this.state.id)},void 0);return Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)("label",{title:"academicYear",htmlFor:"academicYear"},void 0),Object(o.jsx)(hd,_H({id:"academicYear",value:this.state.academicYearId,onSelect:this.onSelect,dropdownMatchSelectWidth:!1},{children:this.state.academicYears.map((function(t){return e.renderAcademicYear(t)}))}),void 0),Object(o.jsx)(Ze,_H({validFeatureFlags:[gn.EDIT_DISTRICT]},{children:this.state.isNew?null:Object(o.jsx)(la.a,_H({overlay:t},{children:Object(o.jsx)(rt.a,_H({size:"large",type:"link"},{children:Object(o.jsx)(aa.a,{},void 0)}),void 0)}),void 0)}),void 0)]},void 0)},t.prototype.renderDistrictAcademicYear=function(e){return Object(o.jsx)(pr.a.Option,_H({value:e.academicYear},{children:e.academicYear}),e.districtId)},t.prototype.renderAcademicYear=function(e){return Object(o.jsx)(pr.a.Option,_H({value:e.id},{children:e.id}
1),e.id)},t}(a.Component),CH=Object(u.i)(TH),xH=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),AH=function(){return AH=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},AH.apply(this,arguments)},PH=function(e){function t(t){var n=e.call(this,t)||this;return n.loadDistricts=function(e,t){(t||void 0==n.state.hasDistricts&&e>0)&&z.academicYearHasDistricts(e).then((function(e){e&&n.setState({hasDistricts:e.hasDistricts})}))},n.onBack=function(){T.push(x.generate(x.DATA_REVIEW_SECONDARY_CIP_NUMBERS,{academicYearId:n.state.academicYear},{}))},n.onContinue=function(){T.push(x.generate(x.DATA_REVIEW_DISTRICT_CONTACTS,{academicYearId:n.state.academicYear},{}))},n.state={academicYear:0,hasDistricts:void 0},n}return xH(t,e),t.prototype.componentDidMount=function(){var e=Number.parseInt(Hr.getPathPart(this.props.match,"academicYearId"));this.state.academicYear!=e&&(this.setState({academicYear:e}),this.loadDistricts(e))},t.prototype.render=function(){var e=this,t=this.state.academicYear;return 0!=t?Object(o.jsx)(O.Content,{children:Object(o.jsx)(Yz,AH({breadcrumbs:Xn.academicYearDataReview(t),stepNumber:6,academicYear:t},{children:Object(o.jsx)(Qn.a,AH({title:"Districts"},{children:Object(o.jsxs)(y.b,AH({direction:"vertical",size:"middle"},{children:[this.state.hasDistricts?Object(o.jsx)(Rz,{fromAcademicYearDataReview:!0,academicYear:this.state.academicYear},void 0):Object(o.jsx)(Sz,{onSubmit:function(){return e.loadDistricts(e.state.academicYear,!0)},academicYear:this.state.academicYear},void 0),Object(o.jsxs)(y.b,{children:[Object(o.jsx)(lm,{onClick:this.onBack},void 0),this.state.hasDistricts?Object(o.jsx)(Pz,{onClick:this.onContinue},void 0):null]},void 0)]}),void 0)}),void 0)}),void 0)},void 0):Object(o.jsx)(pt.a,{},void 0)},t}(a.Component),NH=Object(u.i)(PH),wH=function(e){return Object.assign({academicYearId:0,districtId:null},e)},DH=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),qH=function(){return qH=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},qH.apply(this,arguments)},FH=function(e){function t(t){var n=e.call(this,t)||this;return n.onSubmit=function(e){n.loadDistrictContacts(n.state.academicYear),n.setState({errors:null!==e&&void 0!==e?e:[]})},n.loadDistrictContacts=function(e){if((void 0==n.state.hasDistricts||0==n.state.hasDistricts)&&e>0){var t=wH({academicYearId:e});z.getDistrictContacts(t).then((function(e){var t,r;e&&n.setState({hasDistricts:(null!==(r=null===(t=e.districtContacts)||void 0===t?void 0:t.length)&&void 0!==r?r:0)>0})}))}},n.onBack=function(){T.push(x.generate(x.DATA_REVIEW_DISTRICTS,{academicYearId:n.state.academicYear},{}))},n.onContinue=function(){T.push(x.generate(x.DATA_REVIEW_SECONDARY_PROGRAMS,{academicYearId:n.state.academicYear},{}))},n.state={academicYear:0,hasDistricts:void 0},n}return DH(t,e),t.prototype.componentDidMount=function(){var e=Number.parseInt(Hr.getPathPart(this.props.match,"academicYearId"));this.state.academicYear!=e&&(this.setState({academicYear:e}),this.loadDistrictContacts(e))},t.prototype.render=function(){var e=this.state.academicYear;return 0!=e?Object(o.jsx)(O.Content,{children:Object(o.jsx)(Yz,qH({breadcrumbs:Xn.academicYearDataReview(e),stepNumber:7,academicYear:e},{children:Object(o.jsx)(Qn.a,qH({title:"District Contacts"},{children:Object(o.jsxs)(y.b,qH({direction:"vertical",size:"middle"},{children:[this.state.hasDistricts?Object(o.jsx)(cH,{fromDataReview:!0,academicYear:this.state.academicYear},void 0):Object(o.jsx)(sH,{onSubmit:this.onSubmit,academicYear:this.state.academicYear},void 0),Object(o.jsxs)(y.b,{children:[Object(o.jsx)(lm,{onClick:this.onBack},void 0),this.state.hasDistricts?Object(o.jsx)(Pz,{onClick:this.onContinue},void 0):null]},void 0)]}),void 0)}),void 0)}),void 0)},void 0):Object(o.jsx)(pt.a,{},void 0)},t}(a.Component),MH=Object(u.i)(FH),YH=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),UH=function(){return UH=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},UH.apply(this,arguments)},LH=function(e){function t(t){var n=e.call(this,t)||this;return n.onBack=function(){T.goBack()},n.state={loading:!1,academicYear:0},n}return YH(t,e),t.prototype.componentDidMount=function(){var e=Number.parseInt(Hr.getPathPart(this.props.match,"academicYearId"));this.setState({academicYear:e})},t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"District Contacts",breadcrumbs:Xn.academicYearDistrictContactsConfigurationList(this.state.academicYear),onBack:this.onBack},void 0),Object(o.jsx)(y.b,UH({direction:"vertical",size:"large"},{children:Object(o.jsx)(Qn.a,UH({title:"District Contacts"},{children:Object(o.jsx)(y.b,UH({direction:"vertical",size:"large"},{children:Object(o.jsx)(cH,{academicYear:this.state.academicYear},void 0)}),void 0)}),void 0)}),void 0)]},void 0)},t}(a.Component);var kH=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected}}))(LH)),GH=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),VH=function(){return VH=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},VH.apply(this,arguments)},BH=function(e){function t(t){var n=e.call(this,t)||this;return n.loadAcademicYears=function(e){n.setState({loading:!0});var t=ML({academicYearId:isNaN(e)?null:e});return sL.getAcademicYears(t).then((function(e){var t;e&&e.academicYears&&n.setState({academicYears:null!==(t=e.academicYears)&&void 0!==t?t:[],academicYear:$r.getCurrentYear()})})).catch().finally((function(){n.setState({loading:!1})}
1))},n.loadSecondaryPrograms=function(e){var t=OL({academicYearId:isNaN(e)?$r.getCurrentYear():e});mL.getSecondaryPrograms(t).then((function(e){var t;e&&n.setState({secondaryProgram:null!==(t=e.secondaryPrograms)&&void 0!==t?t:[]})})).finally((function(){n.setState({loading:!1})}))},n.onSelect=function(e){n.setState({academicYear:e}),n.loadSecondaryPrograms(e)},n.onBack=function(){n.state.fromAcademicYearList?T.push(x.generate(x.ACADEMIC_YEAR_DASHBOARD_FROM_LIST,{academicYearId:n.state.academicYear},{})):n.state.fromSelfStudies?T.push(x.generate(x.SELF_STUDIES_ACADEMIC_YEAR_DASHBOARD,{academicYearId:n.state.academicYear},{})):T.push(x.generate(x.SECONDARY_HOME,{},{}))},n.state={loading:!1,academicYear:0,academicYears:[],fromSelfStudies:!1,fromAcademicYearList:!1,secondaryProgram:[]},n}return GH(t,e),t.prototype.componentDidMount=function(){var e=Number.parseInt(Hr.getPathPart(this.props.match,"academicYearId"));this.setState({fromAcademicYearList:this.props.match.path.split("/").findIndex((function(e){return"academicYearList"==e}))>-1,fromSelfStudies:this.props.match.path.split("/").findIndex((function(e){return"selfStudy"==e}))>-1}),this.state.academicYear==e||isNaN(e)||(this.setState({academicYear:e,fromSelfStudies:!0}),this.loadSecondaryPrograms(e)),this.loadAcademicYears(e)},t.prototype.render=function(){var e=this;return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Secondary CTE Programs",breadcrumbs:Xn.secondaryProgramList(),onBack:this.onBack,extra:Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)("label",{title:"academicYear",htmlFor:"academicYear"},void 0),Object(o.jsx)(hd,VH({id:"academicYear",value:this.state.academicYear,onSelect:this.onSelect,dropdownMatchSelectWidth:!1},{children:this.state.academicYears.map((function(t){return e.renderAcademicYear(t)}))}),void 0)]},void 0)},void 0),Object(o.jsx)(y.b,VH({direction:"vertical",size:"large"},{children:Object(o.jsx)(Qn.a,VH({title:"Secondary CTE Programs"},{children:Object(o.jsx)(y.b,VH({direction:"vertical",size:"large"},{children:Object(o.jsx)(EH,{academicYear:this.state.academicYear,fromAcademicYearDataReview:this.state.fromAcademicYearList},void 0)}),void 0)}),void 0)}),void 0)]},void 0)},t.prototype.renderAcademicYear=function(e){return Object(o.jsx)(pr.a.Option,VH({value:e.id},{children:e.id}),e.id)},t}(a.Component),WH=Object(u.i)(BH),zH=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),HH=function(){return HH=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},HH.apply(this,arguments)},QH=function(e){function t(t){var n=e.call(this,t)||this;return n.onBack=function(){T.goBack()},n.state={loading:!1,academicYear:0},n}return zH(t,e),t.prototype.componentDidMount=function(){var e=Number.parseInt(Hr.getPathPart(this.props.match,"academicYearId"));this.setState({academicYear:e})},t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Programs",breadcrumbs:Xn.academicYearSecondaryProgramsConfigurationList(this.state.academicYear),onBack:this.onBack},void 0),Object(o.jsx)(y.b,HH({direction:"vertical",size:"large"},{children:Object(o.jsx)(Qn.a,HH({title:"Programs"},{children:Object(o.jsx)(y.b,HH({direction:"vertical",size:"large"},{children:Object(o.jsx)(EH,{academicYear:this.state.academicYear,configuration:!0},void 0)}),void 0)}),void 0)}),void 0)]},void 0)},t}(a.Component);var KH=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected}}))(QH)),XH=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),JH=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return XH(t,e),t.prototype.academicYearHasProgramCourses=function(e){var t="api/secondaryProgramCourses/hasProgramCourses/"+e;return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.getSecondaryProgramCourseTableData=function(e,t){var n="api/secondaryProgramCourses",r=n.indexOf("?")>0?"&":"?";return null!=t&&(n+=r+"academicYear="+t,r="&"),n=n.replace(/null|undefined/gi,""),this.SendRequest(e,"post",n,!0,!1)},t.prototype.getSecondaryProgramCourses=function(e){var t="api/secondaryProgramCourses/secondaryProgramCourses";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getSecondaryProgramCourseDetails=function(e){var t="api/secondaryProgramCourses/details";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.addSecondaryProgramCourseDetails=function(e){var t="api/secondaryProgramCourses/save";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.deleteSecondaryProgramCourse=function(e){var t="api/secondaryProgramCourses/deleteSecondaryProgramCourse";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.secondaryProgramCourseImporter=function(e){var t="api/secondaryProgramCourses/secondaryProgramCourseImporter";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!1,!1)},t.prototype.secondaryProgramCourseTemplate=function(){var e="api/secondaryProgramCourses/secondaryProgramCourseTemplate";return e=e.replace(/null|undefined/gi,""),this.SendRequest(null,"get",e,!0,!1)},t.prototype.getEducationProgramReportTableData=function(e,t){var n="api/secondaryProgramCourses/educationProgramReport",r=n.indexOf("?")>0?"&":"?";return null!=t&&(n+=r+"academicYearId="+t,r="&"),n=n.replace(/null|undefined/gi,""),this.SendRequest(e,"post",n,!0,!1)},t}(U),$H=new JH,ZH=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),eQ=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ZH(t,e),t.prototype.getSecondaryCourseTableData=function(e,t,n,r){var i="api/secondaryCourses",o=i.indexOf("?")>0?"&":"?";return null!=t&&(i+=o+"academicYearId="+t,o="&"),null!=n&&(i+=o+"programId="+n,o="&"),null!=r&&(i+=o+"isPublic="+r,o="&"),i=i.replace(/null|undefined/gi,""),this.SendRequest(e,"post",i,!0,!1)},t.prototype.getSecondaryCourseDetails=function(e){var t="api/secondaryCourses/get";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.academicYearHasCourses=function(e){var t="api/secondaryCourses/hasCourses/"+e;return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.saveSecondaryCourseDetails=function(e){var t="api/secondaryCourses/save";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.deleteSecondaryCourse=function(e){var t="api/secondaryCourses/deleteSecondaryCourse";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.searchForSecondaryCourses=function(e){var t="api/secondaryCourses/searchForSecondaryCourses";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getSecondaryCourses=function(e){var t="api/secondaryCourses/secondaryCourses";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.secondaryCourseImporter=function(e){var t="api/secondaryCourses/secondaryCourseImporter";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!1,!1)},t.prototype.secondaryCourseTemplate=function(){var e="api/secondaryCourses/secondaryCourseTemplate";return e=e.replace(/null|undefined/gi,""),this.SendRequest(null,"get",e,!0,!1)},t}(U),tQ=new eQ,nQ=function(e){return Object.assign({secondaryCourseId:"00000000-0000-0000-0000-000000000000",academicYearId:0},e)},rQ=function(e){return Object.assign({id:"00000000-0000-0000-0000-000000000000",academicYear:null,secondaryCourseId:null},e)},iQ=function(e){return Object.assign({secondaryCourseId:null,secondaryCourse:null},e)},oQ=function(e){return Object.assign({searchText:"",institutionId:"00000000-0000-0000-0000-000000000000"},e)},aQ=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),sQ=function(){return sQ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},sQ.apply(this,arguments)},dQ=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._formItems=(new Map).set(kG.secondaryCourseId,{required:!0,name:kG.secondaryCourseId,label:"Identifier",rules:[Ot.required(),Ot.onlyNumericCharacters()]}).set(kG.districtId,{required:!0,name:kG.districtId,label:"District",rules:[Ot.required()]}).set(kG.localCourseNumber,{required:!0,name:kG.localCourseNumber,label:"Local Course Number",rules:[Ot.required(),Ot.maxLength(50)]}).set(kG.courseName,{required:!0,name:kG.courseName,label:"Course Name",rules:[Ot.required(),Ot.maxLength(500)]}).set(kG.sced,{required:!0,name:kG.sced,label:"SCED",rules:[Ot.required(),Ot.maxLength(50)]}).set(kG.carnegieUnit,{required:!0,name:kG.carnegieUnit,label:"Carnegie Unit",rules:[Ot.required()]}).set(kG.communityCollegeId,{name:kG.communityCollegeId,label:"Community College"}).set(kG.institutionCourseId,{name:kG.institutionCourseId,label:"Institution Course"}).set(kG.enrollment,{required:!0,name:kG.enrollment,label:"Enrollemnt",rules:[Ot.required()]}),n.fetchData=function(){var e;n.setState({loading:!0});var t=[];t.push(n.loadSecondaryCourse()),n.state.institutions&&0!=n.state.institutions.length||t.push(n.loadInstitutions()),(!n.state.districts||0==n.state.districts.length||(null!==(e=n.props.academicYear)&&void 0!==e?e:0)>0)&&t.push(n.loadDistricts(n.props.academicYear)),Promise.all(t).then((function(){n.setState({loading:!1}),n.resetForm()}))},n.loadDistricts=function(e){var t=bL({academicYearId:e});z.getDistricts(t).then((function(e){var t;e&&n.setState({districts:null!==(t=e.districts)&&void 0!==t?t:[]})})).catch((function(){n.setState({error:!0})}
1))},n.loadInstitutions=function(){return ce.getAll(ne.className).then((function(e){e&&(e=e.sort((function(e,t){var n,r;return(null!==(n=null===e||void 0===e?void 0:e.code)&&void 0!==n?n:"")>(null!==(r=null===t||void 0===t?void 0:t.code)&&void 0!==r?r:"")?1:-1})),n.setState({institutions:null!==e&&void 0!==e?e:[]}))})).catch((function(){n.setState({error:!0})}))},n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields(),n.setState({altered:!1})},n.loadExisting=function(){if(n.props.secondaryCourseId&&n.props.academicYear){var e=rQ({id:n.props.secondaryCourseId});tQ.getSecondaryCourseDetails(e).then((function(e){var t;e&&(e.secondaryCourse&&e.secondaryCourse.institutionCourse&&n.setState({institutionCourses:[e.secondaryCourse.institutionCourse]}),n.setState({secondaryCourse:null!==(t=e.secondaryCourse)&&void 0!==t?t:kG.create({id:n.props.secondaryCourseId==re.default.Empty()?void 0:n.props.secondaryCourseId,secondaryCourseId:void 0,districtId:void 0,localCourseNumber:void 0,courseName:void 0,carnegieUnit:void 0})})),n.resetForm()})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))}},n.handleInstitutionCourseSearch=function(e){if(e.length>2){n.setState({searching:!0});var t=oQ({searchText:e,institutionId:(n._formRef?n._formRef.current.getFieldsValue():null).communityCollegeId});du.searchForInstitutionCourseByString(t).then((function(e){var t;e&&n.setState({searching:!1,institutionCourses:null!==(t=e.institutionCourses)&&void 0!==t?t:[]})})).finally((function(){n.setState({searching:!1})}))}},n.handleInstitutionCourseSelect=function(){},n.loadNew=function(){n.setState({loading:!1,secondaryCourse:kG.create({id:n.props.secondaryCourseId==re.default.Empty()?void 0:n.props.secondaryCourseId,secondaryCourseId:void 0,districtId:void 0,localCourseNumber:void 0,courseName:void 0,carnegieUnit:void 0,enrollment:""})},(function(){return n.resetForm()}))},n.handleChange=function(){n.setState({altered:!0})},n.submit=function(){var e;null===(e=n._formRef.current)||void 0===e||e.validateFields().then((function(){return n.handleSubmit()}),(function(){return n.setState({error:!0})}))},n.onGoToInstitutionCourse=function(){var e,t,r=n._formRef?n._formRef.current.getFieldsValue():null;T.push(x.generate(x.COURSE_DETAILS,{institutionCourseId:null!==(e=r.institutionCourseId)&&void 0!==e?e:re.default.Empty()},{fromSecondaryCourses:n.state.secondaryCourse.id,academicYear:null!==(t=n.props.academicYear)&&void 0!==t?t:0}))},n.handleSubmit=function(){n.setState({submitting:!0});var e=iQ({secondaryCourseId:n.props.secondaryCourseId,secondaryCourse:kG.create(sQ(sQ({},n._formRef?n._formRef.current.getFieldsValue():null),{academicYear:n.props.academicYear}))});tQ.saveSecondaryCourseDetails(e).then((function(e){var t,r;n.setState({submitted:!0}),(null===e||void 0===e?void 0:e.succeeded)?(n.setState({secondaryCourse:null!==(t=e.secondaryCourse)&&void 0!==t?t:kG.create(),fieldErrors:void 0,error:!1}),S.b.success("Saved"),n.props.onSave&&(null===(r=e.secondaryCourse)||void 0===r?void 0:r.id)&&
1(n.resetForm(),n.props.onSave(e.secondaryCourse.id))):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Course could not be saved"),n.setState({loading:!1,submitting:!1}))})).catch((function(e){n.setState({error:e,loading:!1,submitting:!1}),S.b.error("Course could not be saved")})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.state={secondaryCourse:kG.create({id:void 0,secondaryCourseId:void 0,districtId:void 0,localCourseNumber:void 0,courseName:void 0,carnegieUnit:void 0}),institutions:[],districts:[],institutionCourses:[],loadingInstitutionCourse:!1,searching:!1},n}return aQ(t,e),t.prototype.componentDidMount=function(){this.fetchData()},t.prototype.componentDidUpdate=function(e){this.props.secondaryCourseId!=e.secondaryCourseId&&this.fetchData()},t.prototype.loadSecondaryCourse=function(){this.state.loading||(this.props.secondaryCourseId==re.default.Empty()||this.props.isNew?this.loadNew():this.state.secondaryCourse.id||this.loadExisting())},t.prototype.render=function(){var e=this;if(this.state.loading||this.state.loadingInstitutionCourse)return Object(o.jsx)(pt.a,{active:!0},void 0);var t=null==Xe.Get(),n=this.state.institutionCourses.map((function(e){var t;return{value:e.id,display:null===(t=e.currentDetail)||void 0===t?void 0:t.display}}));return Object(o.jsxs)(y.b,sQ({size:"small",direction:"vertical"},{children:[this.renderErrors(),Object(o.jsxs)(ht.a,sQ({ref:this._formRef,layout:"vertical",initialValues:this.state.secondaryCourse,onValuesChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!t},{children:[Object(o.jsx)(mt.a,sQ({},this._formItems.get(kG.secondaryCourseId),_t.getValidation(kG.secondaryCourseId,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(RB,{readonly:t,disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,sQ({},this._formItems.get(kG.districtId),_t.getValidation(kG.districtId,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(hd,sQ({dropdownMatchSelectWidth:!1,disabled:!this.props.isEditing||this.state.loading||this.state.submitting,optionFilterProp:"title",filterOption:function(e,t){var n;return null===(n=null===t||void 0===t?void 0:t.title)||void 0===n?void 0:n.toLowerCase().includes(null===e||void 0===e?void 0:e.toLowerCase())},showSearch:!0,allowClear:!0},{children:this.state.districts.sort((function(e,t){return e.districtId-t.districtId})).map((function(t){return e.renderDistrict(t)}))}),void 0)}),void 0),Object(o.jsx)(mt.a,sQ({},this._formItems.get(kG.localCourseNumber),_t.getValidation(kG.localCourseNumber,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(il,{readonly:t,disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,sQ({},this._formItems.get(kG.courseName),_t.getValidation(kG.courseName,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(il,{readonly:t,disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,sQ({},this._formItems.get(kG.sced),_t.getValidation(kG.sced,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(il,{readonly:t,disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,sQ({},this._formItems.get(kG.carnegieUnit),_t.getValidation(kG.carnegieUnit,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(RB,{readonly:t,disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,sQ({},this._formItems.get(kG.communityCollegeId),_t.getValidation(kG.communityCollegeId,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(hd,sQ({dropdownMatchSelectWidth:!1,disabled:!this.props.isEditing||this.state.loading||this.state.submitting,optionFilterProp:"title",filterOption:function(e,t){var n;
1return null===(n=null===t||void 0===t?void 0:t.title)||void 0===n?void 0:n.toLowerCase().includes(null===e||void 0===e?void 0:e.toLowerCase())},showSearch:!0,allowClear:!0},{children:this.state.institutions.sort((function(e,t){return e.code-t.code})).map((function(t){return e.renderInstitution(t)}))}),void 0)}),void 0),Object(o.jsxs)(b.a,{children:[Object(o.jsx)(m.a,sQ({},En.THREE_QUARTERS,{children:Object(o.jsx)(mt.a,sQ({},this._formItems.get(kG.institutionCourseId),_t.getValidation(kG.institutionCourseId,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(Wa,{onSelect:this.handleInstitutionCourseSelect,options:null!==n&&void 0!==n?n:[],searching:this.state.searching,onSearch:this.handleInstitutionCourseSearch,disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0)}),void 0),Object(o.jsx)(m.a,sQ({},En.ONE_QUARTER,{children:this.state.secondaryCourse.institutionCourseId?Object(o.jsx)(mt.a,sQ({label:" "},this._formItems.get(kG.className),{children:Object(o.jsx)(rt.a,{title:"Institution Course",type:"link",onClick:this.onGoToInstitutionCourse,icon:Object(o.jsx)(yI,{},void 0)},void 0)}),void 0):null}),void 0)]},void 0),Object(o.jsx)(mt.a,sQ({},this._formItems.get(kG.enrollment),_t.getValidation(kG.enrollment,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(RB,{readonly:t,disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),this.renderSave()]}),void 0)]}),void 0)},t.prototype.renderInstitution=function(e){var t,n,r;if(e.id)return Object(o.jsx)(pr.a.Option,sQ({title:null!==(t=e.display)&&void 0!==t?t:"",value:null!==(n=e.id)&&void 0!==n?n:re.default.Empty()},{children:e.display}),null!==(r=e.id)&&void 0!==r?r:re.default.Empty())},t.prototype.renderInstitutionCourse=function(e){var t,n,r,i,a,s;if(e.id)return Object(o.jsx)(pr.a.Option,sQ({title:null!==(n=null===(t=e.currentDetail)||void 0===t?void 0:t.title)&&void 0!==n?n:"",value:null!==(r=e.id)&&void 0!==r?r:re.default.Empty()},{children:null!==(a=null===(i=e.currentDetail)||void 0===i?void 0:i.title)&&void 0!==a?a:""}),null!==(s=e.id)&&void 0!==s?s:re.default.Empty())},t.prototype.renderDistrict=function(e){var t,n,r;if(e.id)return Object(o.jsx)(pr.a.Option,sQ({title:null!==(t=e.display)&&void 0!==t?t:"",value:null!==(n=e.id)&&void 0!==n?n:re.default.Empty()},{children:e.display}),null!==(r=e.id)&&void 0!==r?r:re.default.Empty())},t.prototype.renderSave=function(){if(this.props.isEditing&&!this.props.fromDataReview)return Object(o.jsx)(Ze,sQ({validFeatureFlags:[gn.EDIT_SECONDARY_COURSE]},{children:Object(o.jsxs)(y.b,sQ({direction:"horizontal"},{children:[Object(o.jsx)(Tr,{disabled:!this.state.altered,saving:this.state.submitting},void 0),Object(o.jsx)(Ir,{disabled:!this.state.altered,onConfirm:this.resetForm},void 0)]}),void 0)}),void 0)},t.prototype.renderErrors=function(){if(this.state.error)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t}(a.Component),cQ=dQ,lQ=function(){return lQ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},lQ.apply(this,arguments)};var uQ=function(e){var t,n=s.a.createRef(),r=e.secondaryCourseId==re.default.Empty();return Object(o.jsx)(f.a,lQ({visible:!0,title:r?"New Course":"Edit Course",okText:"Save",onOk:function(){var e;null===(e=n.current)||void 0===e||e.submit()},okButtonProps:{htmlType:"submit"},onCancel:e.onCancel,destroyOnClose:!0},{children:Object(o.jsx)(cQ,{ref:n,fromDataReview:!0,secondaryCourseId:null!==(t=e.secondaryCourseId)&&void 0!==t?t:re.default.Empty,isEditing:!0,onSave:e.onSave,isNew:r,academicYear:e.academicYear},void 0)}),void 0)},pQ=function(e){return Object.assign({id:"00000000-0000-0000-0000-000000000000"},e)},fQ=function(e){return Object.assign({secondaryProgramCourseId:null,secondaryProgramCourse:null},e)},hQ=function(e){return Object.assign({searchValue:"",academicYear:0,districtSearch:0},e)},vQ=function(e){return Object.assign({searchValue:"",programId:"00000000-0000-0000-0000-000000000000",districtId:"00000000-0000-0000-0000-000000000000",academicYear:0,courseSearch:0},e)},mQ=function(e){return Object.assign({searchValue:"",districtId:"00000000-0000-0000-0000-000000000000",academicYear:0,programSearch:0},e)},gQ=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),bQ=function(){return bQ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},bQ.apply(this,arguments)},yQ=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n.getFormItems=function(){return(new Map).set(GG.districtId,{required:!0,name:GG.districtId,label:"District",rules:[Ot.required()]}).set(GG.programId,{required:!0,name:GG.programId,label:"Program",rules:[Ot.required()]}).set(GG.courseId,{required:!0,name:GG.courseId,label:"Course",rules:[Ot.required()]}).set(GG.isCoreCourse,{required:!0,name:GG.isCoreCourse,label:"Is this a core course?",rules:[Ot.required()]}).set(GG.isOfferTeach,{required:!0,name:GG.isOfferTeach,label:"Is Offer Teach",rules:[Ot.required()]})},n.fetchData=function(){n.setState({loading:!0});var e=[];e.push(n.loadSecondaryProgramCourse()),e.push(n.handleDistrictSearch("")),Promise.all(e).then((function(){n.setState({loading:!1}),n.resetForm()}))},n.loadSecondaryProgramCourse=function(){n.state.loading||(n.props.secondaryProgramCourseId==re.default.Empty()||n.props.isNew?n.loadNew():n.loadExisting(
1))},n.loadExisting=function(){if(n.props.secondaryProgramCourseId&&n.props.academicYear){var e=pQ({id:n.props.secondaryProgramCourseId});$H.getSecondaryProgramCourseDetails(e).then((function(e){var t;e.secondaryProgramCourse&&e.secondaryProgramCourse.course&&e.secondaryProgramCourse.program&&e.secondaryProgramCourse.program.district?(n.setState({secondaryProgramCourse:null!==(t=e.secondaryProgramCourse)&&void 0!==t?t:GG.create(),secondaryCourses:[e.secondaryProgramCourse.course],programs:[e.secondaryProgramCourse.program],districts:[e.secondaryProgramCourse.program.district]}),n.resetForm()):n.setState({isEditing:!0})})).catch((function(){n.setState({error:!0})}))}},n.loadNew=function(){var e=GG.create({id:n.props.secondaryProgramCourseId==re.default.Empty()?void 0:n.props.secondaryProgramCourseId,programId:"",courseId:"",districtId:""});n.props.districtId&&""!=n.props.districtId&&n.props.districtId!=re.default.Empty()&&(e.districtId=n.props.districtId),n.props.secondaryProgramId&&""!=n.props.secondaryProgramId&&n.props.secondaryProgramId!=re.default.Empty()&&(e.programId=n.props.secondaryProgramId),n.setState({loading:!1,secondaryProgramCourse:e})},n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields()},n.handleDistrictSearch=function(e){var t=n.state.districtSearch+1;n.setState({searching:!0,districtSearch:t});var r=hQ({academicYear:n.props.academicYear,searchValue:e,districtSearch:t});z.searchForDistricts(r).then((function(e){var t;n.setState({districts:null!==(t=e.districts)&&void 0!==t?t:[]})})).finally((function(){n.setState({searching:!1})}))},n.handleProgramSearch=function(e){var t,r,i=null===(t=n._formRef.current)||void 0===t?void 0:t.getFieldValue(GG.districtId);i!=re.default.Empty()&&void 0!=i||(i=null!==(r=n.props.districtId)&&void 0!==r?r:re.default.Empty());var o=n.state.programSearch+1;n.setState({searching:!0,programSearch:o});var a=mQ({academicYear:n.props.academicYear,searchValue:e,districtId:i,programSearch:o});mL.searchForSecondaryPrograms(a).then((function(e){var t;n.setState({programs:null!==(t=e.secondaryPrograms)&&void 0!==t?t:[]})})).finally((function(){n.setState({searching:!1})}))},n.handleCourseSearch=function(e){var t,r,i=null===(t=n._formRef.current)||void 0===t?void 0:t.getFieldValue(GG.districtId),o=null===(r=n._formRef.current)||void 0===r?void 0:r.getFieldValue(GG.programId),a=n.state.courseSearch+1;n.setState({searching:!0,courseSearch:a});var s=vQ({academicYear:n.props.academicYear,searchValue:e,districtId:i,programId:o,courseSearch:a});tQ.searchForSecondaryCourses(s).then((function(e){var t;console.log("s:"+n.state.courseSearch),console.log("r:"+e.courseSearch),n.state.courseSearch==e.courseSearch&&n.setState({searching:!1,secondaryCourses:null!==(t=e.secondaryCourses)&&void 0!==t?t:[]})})).finally((function(){n.setState({searching:!1})}))},n.handleDistrictSelect=function(){n.handleProgramSearch(""),n.handleCourseSearch("")},n.handleProgramSelect=function(){var e,t=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldValue(GG.districtId);(null===t||void 0===t?void 0:t.localeCompare(re.default.Empty()))&&n.handleCourseSearch("")},n.handleCourseSelect=function(){},n.submit=function(){var e;null===(e=n._formRef.current)||void 0===e||e.validateFields().then((function(){return n.handleSubmit()}),(function(){return n.setState({error:!0})}))},n.handleSubmit=function(){var e;n.setState({submitting:!0});var t=[];t.push(null===(e=n._formRef.current)||void 0===e?void 0:e.validateFields());var r=Promise.all(t).then((function(){var e=n._formRef?n._formRef.current.getFieldsValue():null,t=fQ({secondaryProgramCourseId:n.state.secondaryProgramCourse.id,secondaryProgramCourse:GG.create(bQ(bQ({},e),{academicYear:n.props.academicYear}))});$H.addSecondaryProgramCourseDetails(t).then((function(e){var t;e.succeeded?(n.resetForm(),n.setState({submitting:!1}),S.b.success("ProgramCourse was added."),n.props.onSave&&(null===(t=e.secondaryProgramCourse)||void 0===t?void 0:t.id)&&(n.props.onSave(e.secondaryProgramCourse.id),n.resetForm())):(S.b.error("ProgramCourse could not be added."),n.setState({fieldErrors:e.fieldErrors,submitted:!0,submitting:!1}))})).catch((function(){n.setState({error:!0,submitting:!1}),S.b.error("ProgramCourse could not be added.")}))}));return r},n.state={secondaryCourses:[],programs:[],districts:[],searching:!1,secondaryProgramCourse:GG.create(),districtSearch:0,programSearch:0,courseSearch:0},n}return gQ(t,e),t.prototype.componentDidMount=function(){this.fetchData()},t.prototype.componentDidUpdate=function(e){this.props!=e&&this.fetchData()},t.prototype.render=function(){var e=this.state.districts.sort((function(e,t){return e.districtId-t.districtId})).map((function(e){return{value:e.id,display:e.display}})),t=this.state.programs.sort((function(e,t){return e.secondaryProgramId-t.secondaryProgramId})).map((function(e){var t;return{value:e.id,display:null===(t=e.secondaryCipNumber)||void 0===t?void 0:t.display}})),n=this.state.secondaryCourses.sort((function(e,t){var n,r,i;return null!==(i=null===(n=e.localCourseNumber)||void 0===n?void 0:n.localeCompare(null!==(r=t.localCourseNumber)&&void 0!==r?r:""))&&void 0!==i?i:0})).map((function(e){return{value:e.id,display:e.display}}));return Object(o.jsx)(y.b,bQ({direction:"vertical"},{children:Object(o.jsx)(Ci.a,bQ({initialValues:this.state.secondaryProgramCourse,layout:"vertical",onFinish:this.handleSubmit,ref:this._formRef},{children:Object(o.jsxs)(y.b,bQ({direction:"vertical"},{children:[Object(o.jsx)(Ci.a.Item,bQ({},this.getFormItems().get(GG.districtId),_t.getValidation(GG.districtId,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(Wa,{onSelect:this.handleDistrictSelect,options:null!==e&&void 0!==e?e:[],searching:this.state.searching,onSearch:this.handleDistrictSearch,disabled:!this.props.isEditing||this.state.loading||this.state.submitting||void 0!=this.props.districtId},void 0)}),void 0),Object(o.jsx)(Ci.a.Item,bQ({},this.getFormItems().get(GG.programId),_t.getValidation(GG.programId,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(Wa,{onSelect:this.handleProgramSelect,options:null!==t&&void 0!==t?t:[],searching:this.state.searching,onSearch:this.handleProgramSearch,disabled:!this.props.isEditing||this.state.loading||this.state.submitting||void 0!=this.props.secondaryProgramId},void 0)}),void 0),Object(o.jsx)(Ci.a.Item,bQ({},this.getFormItems().get(GG.courseId),_t.getValidation(GG.courseId,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(Wa,{onSelect:this.handleCourseSelect,options:null!==n&&void 0!==n?n:[],searching:this.state.searching,onSearch:this.handleCourseSearch,disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(Ci.a.Item,bQ({},this.getFormItems().get(GG.isOfferTeach),_t.getValidation(GG.isOfferTeach,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(H
1d,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(Ci.a.Item,bQ({},this.getFormItems().get(GG.isCoreCourse),_t.getValidation(GG.isCoreCourse,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(Hd,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),this.renderErrors()]}),void 0)}),void 0)}),void 0)},t.prototype.renderErrors=function(){if(this.state.error&&this.state.message)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:this.state.message},void 0)},t}(a.Component),OQ=function(){return OQ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},OQ.apply(this,arguments)};var jQ=function(e){var t,n=s.a.createRef(),r=e.secondaryProgramCourseId==re.default.Empty();return Object(o.jsx)(f.a,OQ({visible:!0,title:r?"New Program Course":"Edit Program Course",okText:"Save",onOk:function(){var e;null===(e=n.current)||void 0===e||e.submit()},okButtonProps:{htmlType:"submit"},onCancel:e.onCancel,destroyOnClose:!0},{children:Object(o.jsx)(yQ,{ref:n,secondaryProgramCourseId:null!==(t=e.secondaryProgramCourseId)&&void 0!==t?t:re.default.Empty,districtId:e.districtId,secondaryProgramId:e.secondaryProgramId,isEditing:!0,onSave:e.onSave,isNew:r,academicYear:e.academicYear},void 0)}),void 0)},IQ="file",SQ=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),EQ=function(){return EQ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},EQ.apply(this,arguments)},RQ=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n.getFormItems=function(){return(new Map).set(IQ,{name:IQ,label:"Please select a file to import courses"})},n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields()},n.confirmImport=function(){var e,t,r=null!==(t=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldsValue())&&void 0!==t?t:{};f.a.confirm({title:"Reset Data",content:"Importing this file will delete the current data.",onOk:function(){return n.handleSubmit(r)},width:500})},n.handleSubmit=function(e){if(n.setState({submitting:!0}),br.canSubmit(n._formRef,n.getFormItems())){var t=e.file.newFiles[0],r=Za.attachFileToModel("secondaryCourseImporter",{academicYearId:n.props.academicYear},IQ,t);n.setState({loading:!0}),tQ.secondaryCourseImporter(r).then((function(e){var t;n.resetForm(),n.setState({submitting:!1}),null===(t=n.props.refreshDataTable)||void 0===t||t.resetTable();R.a.downloadBase64StringAsExcel("Course Summary Report.xlsx",null!==e&&void 0!==e?e:void 0)})).catch((function(){S.b.error("Import Failed. Please check formatting in file."),n.setState({error:!0})})).finally((function(){n.setState({loading:!1}),n.props.onSubmit&&n.props.onSubmit([])}))}else S.b.error("Please fill out all required fields."),n.setState({loading:!1,submitting:!1})},n.downloadTemplate=function(){window.open(x.generateFull(x.SECONDARY_COURSE_IMPORT_TEMPLATE,{},{}),"_blank")},n.state={},n}return SQ(t,e),t.prototype.render=function(){return Object(o.jsx)(y.b,EQ({direction:"vertical"},{children:Object(o.jsx)(Ci.a,EQ({layout:"vertical",onFinish:this.handleSubmit,ref:this._formRef},{children:Object(o.jsxs)(y.b,EQ({direction:"vertical"},{children:[Object(o.jsx)(Ci.a.Item,EQ({},this.getFormItems().get(IQ),_t.getValidation(IQ,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(hs,{maxCount:1,style:{width:300}},void 0)}),void 0),this.props.isInModal?null:Object(o.jsxs)(y.b,EQ({direction:"horizontal"},{children:[Object(o.jsx)(rt.a,EQ({htmlType:"submit",type:"primary",icon:Object(o.jsx)(ds.a,{},void 0),loading:this.state.loading},{children:"Import"}),void 0),Object(o.jsx)(rt.a,EQ({icon:Object(o.jsx)(pn.a,{},void 0),type:"link",onClick:this.downloadTemplate},{children:"Download Template"}),void 0)]}),void 0),this.renderErrors()]}),void 0)}),void 0)}),void 0)},t.prototype.renderErrors=function(){if(this.state.error&&this.state.message)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:this.state.message},void 0)},t}(a.Component),_Q=function(){return _Q=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},_Q.apply(this,arguments)};var TQ=function(e){var t=void 0,n=a.createRef(),r=Object(a.useState)(!1),i=r[0],s=r[1],d=Object(a.useState)(),c=d[0],l=d[1],u=Object(a.useState)(e.errors),p=u[0],h=u[1],v=Object(a.useState)([]),m=v[0],g=v[1],b=Object(a.useState)(),y=b[0],O=b[1];a.useEffect((function(){Ii.Institutions().then((function(e){g(e)}))}),[]);var j=function(e){e.id&&l(e.id)},I=function(){l(null)},E=function(t){null!=t&&f.a.confirm({title:"Are you sure you want to delete this course?",okText:"Delete",onOk:function(){return R(t,e.academicYear)}
1,okButtonProps:{type:"primary",danger:!0}})},R=function(e,n){var r=nQ({secondaryCourseId:e,academicYearId:n});tQ.deleteSecondaryCourse(r).then((function(e){!0===(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Course was removed."),null===t||void 0===t||t.refresh()):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(){S.b.error("Course could not be removed.")}))},_=function(e){s(!1),h(e)},C=[];e.readonly||(C.push(oo.Reset()),Je.isAuthorized([gn.EDIT_SECONDARY_COURSE])&&!e.programId&&C.push(oo.Default("New Course",(function(){l(re.default.Empty())}))),Je.isAuthorized([gn.CONFIG_ACADEMIC_YEAR])&&!e.programId&&e.fromAcademicYearDataReview&&C.push(oo.Default("Re-import Courses",(function(){return s(!0),void f.a.confirm({title:"Import",content:Object(o.jsx)(RQ,{ref:n,academicYear:e.academicYear,refreshDataTable:t,isInModal:!0,onSubmit:_},void 0),onCancel:function(){s(!1)},onOk:function(){var e;return null===(e=n.current)||void 0===e?void 0:e.confirmImport()},width:500})}),void 0,i)),Je.isAuthorized([gn.EDIT_SECONDARY_PROGRAM])&&e.fromAcademicYearDataReview&&C.push(oo.Default("Template",(function(){window.open(x.generateFull(x.SECONDARY_COURSE_IMPORT_TEMPLATE,{},{}),"_blank")}),Object(o.jsx)(pn.a,{},void 0),i)),Je.isAuthorized([gn.EDIT_SECONDARY_COURSE])&&e.programId&&C.push(oo.Default("New Program Course",(function(){O(re.default.Empty())}))));var A=function(){O(null)},P=function(){if(p&&p.length>0)return Object(o.jsx)(o.Fragment,{children:p.map((function(e){return Object(o.jsx)("p",{children:e},e)}))},void 0)};return Object(o.jsxs)(o.Fragment,{children:[function(){if(p&&p.length>0)return Object(o.jsx)(ct.a,{showIcon:!0,type:"error",description:P(),message:"Error Importing"},void 0)}(),function(){if(c)return Object(o.jsx)(uQ,{onCancel:I,visible:!0,secondaryCourseId:c,academicYear:e.academicYear,onSave:I},void 0)}(),function(){if(y)return Object(o.jsx)(jQ,{onCancel:A,visible:!0,districtId:e.districtId,secondaryProgramId:e.secondaryProgramId,secondaryProgramCourseId:y,academicYear:e.academicYear,onSave:A},void 0)}(),Object(o.jsx)(io,{ref:function(e){return t=e},onRowClick:e.fromAcademicYearDataReview||e.readonly?void 0:function(t){t.id&&T.push(x.generate(x.SECONDARY_COURSE_DETAILS,{id:t.id},{academicYear:e.academicYear,fromSecondaryProgramCourse:e.fromSecondaryProgramCourse}))},serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!e.readonly,buttonBar:C,columns:function(){if(e.isPublic)return[{title:"Identifier",dataIndex:kG.secondaryCourseId,sorter:!0,width:50,render:function(e,t){return t.secondaryCourseId},filterType:wr.Text},{title:"Name",dataIndex:kG.courseName,sorter:!0,filterType:wr.Text},{title:"SCED",dataIndex:kG.sced,sorter:!0,filterType:wr.Text},{title:"Carnegie Unit",dataIndex:kG.carnegieUnit,sorter:!0,render:function(e,t){return t.carnegieUnit},filterType:wr.Text}];var t=[{title:"Identifier",dataIndex:kG.secondaryCourseId,sorter:!0,width:50,render:function(e,t){return t.secondaryCourseId},filterType:wr.Text},{title:"Title",dataIndex:kG.courseName,sorter:!0,render:function(e,t){return t.courseName},filterType:wr.Text},{title:"Local Course Number",dataIndex:kG.localCourseNumber,width:175,sorter:!0,filterType:wr.Text},{title:"District",dataIndex:kG.districtId,width:175,sorter:!0,render:function(e,t){var n;return null===(n=t.district)||void 0===n?void 0:n.name},filterType:wr.Text},{title:"SCED",dataIndex:kG.sced,sorter:!0,filterType:wr.Text},{title:"Carnegie Unit",dataIndex:kG.carnegieUnit,sorter:!0,width:150,render:function(e,t){return t.carnegieUnit},filterType:wr.Text},{title:"Community College",dataIndex:kG.communityCollegeId,sorter:!0,width:150,render:function(e,t){var n;return null===(n=t.communityCollege)||void 0===n?void 0:n.display},filterType:wr.DropdownMulti,dropdownFilterOptions:m},{title:"Institution Course",dataIndex:kG.institutionCourseId,sorter:!0,width:150,render:function(e,t){var n,r,i,o,a,s,d;if(t.institutionCourse)return(null===(i=null===(r=null===(n=t.institutionCourse)||void 0===n?void 0:n.course)||void 0===r?void 0:r.discipline)||void 0===i?void 0:i.code)+""+(null===(a=null===(o=t.institutionCourse)||void 0===o?void 0:o.course)||void 0===a?void 0:a.catalogNumber)+" - "+(null===(d=null===(s=t.institutionCourse)||void 0===s?void 0:s.currentDetail)||void 0===d?void 0:d.title)},filterType:wr.Text},{title:"Enrollment",dataIndex:kG.enrollment,sorter:!0,width:150,render:function(e,t){return t.enrollment},filterType:wr.Text}];
1return e.fromAcademicYearDataReview&&t.push({title:"Actions",align:"center",dataIndex:kG.secondaryCourseId,sorter:!1,render:function(e,t){if(Je.isAuthorized([gn.CONFIG_ACADEMIC_YEAR]))return Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(rt.a,_Q({type:"link",onClick:function(){return j(t)}},{children:Object(o.jsx)(Gr.a,{},void 0)}),void 0),Object(o.jsx)(rt.a,_Q({type:"link",onClick:function(){return E(t.id)}},{children:Object(o.jsx)(Yd.a,{},void 0)}),void 0)]},void 0)},width:50}),t}(),fetchData:{fetch:function(t){var n,r;return tQ.getSecondaryCourseTableData(t,e.academicYear,null!==(n=e.secondaryProgramId)&&void 0!==n?n:re.default.Empty(),null!==(r=e.isPublic)&&void 0!==r&&r)}},stateSaving:{enabled:!0,tableUniqueKey:"secondary_course_list"}},void 0)]},void 0)},CQ=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),xQ=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return CQ(t,e),t.prototype.getSecondaryProgramTableData=function(e,t,n){var r="api/secondaryProgramHistories",i=r.indexOf("?")>0?"&":"?";return null!=t&&(r+=i+"secondaryProgramHistoryId="+t,i="&"),null!=n&&(r+=i+"academicYear="+n,i="&"),r=r.replace(/null|undefined/gi,""),this.SendRequest(e,"post",r,!0,!1)},t.prototype.secondaryProgramHisotryImporter=function(){var e="api/secondaryProgramHistories/secondaryProgramHistoryImporter";return e=e.replace(/null|undefined/gi,""),this.SendRequest(null,"get",e,!0,!1)},t}(U),AQ=new xQ,PQ={className:"SecondaryProgramReviewHistoryDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",secondaryProgramIdentifier:0,secondaryProgramStatusTypeId:0,secondaryProgramStatusType:null,reviewYear:null,reviewUserId:null,nextReviewYear:0},e)},id:"id",secondaryProgramIdentifier:"secondaryProgramIdentifier",secondaryProgramStatusTypeId:"secondaryProgramStatusTypeId",secondaryProgramStatusType:"secondaryProgramStatusType",reviewYear:"reviewYear",reviewUserId:"reviewUserId",nextReviewYear:"nextReviewYear"};var NQ=function(e){var t=void 0,n=Object(a.useState)(!1)[1],r=Object(a.useState)([]),i=r[0],s=r[1],d=Object(a.useState)([]),c=d[0],l=d[1],u=Object(a.useState)(!1)[1];Object(a.useEffect)((function(){if(e.academicYear&&e.secondaryProgramId){n(!0);var t=[];t.push(f()),t.push(h()),Promise.all(t).then((function(){n(!1)}))}p()}),[e.secondaryProgramId]);var p=function(){null===t||void 0===t||t.refresh()},f=function(){var t=jL({academicYear:e.academicYear,secondaryProgramIdentifier:e.secondaryProgramId});return lL.getSelfStudies(t).then((function(e){e.selfStudies&&l(e.selfStudies)})).catch((function(){u(!0)}))},h=function(){return ce.getAll(bi.className).then((function(e){s(e)})).catch((function(){u(!0)}))},v=[];return v.push(oo.Reset()),Object(o.jsx)(o.Fragment,{children:Object(o.jsx)(io,{ref:function(e){return t=e},onRowClick:function(e){var t,n=null===(t=c.find((function(t){var n;return t.academicYearId==(null!==(n=e.reviewYear)&&void 0!==n?n:0)})))||void 0===t?void 0:t.id;n&&n!=re.default.Empty()&&T.push(x.generate(x.SELF_STUDIES_DISPLAY,{id:null!==n&&void 0!==n?n:re.default.Empty()},{}))},serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:v,columns:[{title:"Status",dataIndex:PQ.secondaryProgramStatusTypeId,sorter:!0,render:function(t,n){var r,i,o,a;return Je.isAuthorized([gn.VIEW_CURRENT_PROGRAM_STATUS])?null===(r=n.secondaryProgramStatusType)||void 0===r?void 0:r.name:(null!==(i=n.reviewYear)&&void 0!==i?i:0)<=(null!==(o=e.academicYear)&&void 0!==o?o:0)?null===(a=n.secondaryProgramStatusType)||void 0===a?void 0:a.name:"Pending"},filterType:wr.DropdownMulti,dropdownFilterOptions:null===i||void 0===i?void 0:i.map((function(e){return{value:e.id,text:e.name}})),filterDropdownVisible:!0},{title:"Review Year",dataIndex:PQ.reviewYear,sorter:!0,render:function(e,t){return t.reviewYear},filterType:wr.Text},{title:"Next Review Year",dataIndex:PQ.nextReviewYear,sorter:!0,render:function(e,t){return t.nextReviewYear},filterType:wr.Text}],fetchData:{fetch:function(t){var n,r;return AQ.getSecondaryProgramTableData(t,null!==(n=e.secondaryProgramId)&&void 0!==n?n:0,null!==(r=e.academicYear)&&void 0!==r?r:0)}},stateSaving:{enabled:!0,tableUniqueKey:"contacts_report_list"}},void 0)},void 0)},wQ="file",DQ=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),qQ=function(){return qQ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},qQ.apply(this,arguments)},FQ=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n.getFormItems=function(){return(new Map).set(wQ,{name:wQ,label:"Please select a file to import program courses"})},n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields()},n.confirmImport=function(){var e,t,r=null!==(t=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldsValue())&&void 0!==t?t:{};f.a.confirm({title:"Reset Data",content:"Importing this file will delete the current data.",onOk:function(){return n.handleSubmit(r)},width:500})},n.handleSubmit=function(e){if(n.setState({submitting:!0}
1),br.canSubmit(n._formRef,n.getFormItems())){var t=e.file.newFiles[0],r=Za.attachFileToModel("secondaryProgramCourseImporter",{academicYearId:n.props.academicYear,programId:n.props.programId},wQ,t);n.setState({loading:!0}),$H.secondaryProgramCourseImporter(r).then((function(e){var t;n.resetForm(),n.setState({submitting:!1}),null===(t=n.props.refreshDataTable)||void 0===t||t.resetTable();R.a.downloadBase64StringAsExcel("ProgramCourse Summary Report.xlsx",null!==e&&void 0!==e?e:void 0)})).catch((function(){S.b.error("Import Failed. Please check formatting in file."),n.setState({error:!0})})).finally((function(){n.setState({loading:!1}),n.props.onSubmit&&n.props.onSubmit([])}))}else S.b.error("Please fill out all required fields."),n.setState({loading:!1,submitting:!1})},n.downloadTemplate=function(){window.open(x.generateFull(x.SECONDARY_PROGRAM_COURSES_IMPORT_TEMPLATE,{},{}),"_blank")},n.state={},n}return DQ(t,e),t.prototype.render=function(){return Object(o.jsx)(y.b,qQ({direction:"vertical"},{children:Object(o.jsx)(Ci.a,qQ({layout:"vertical",onFinish:this.handleSubmit,ref:this._formRef},{children:Object(o.jsxs)(y.b,qQ({direction:"vertical"},{children:[Object(o.jsx)(Ci.a.Item,qQ({},this.getFormItems().get(wQ),_t.getValidation(wQ,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(hs,{maxCount:1,style:{width:300}},void 0)}),void 0),this.props.isInModal?null:Object(o.jsxs)(y.b,qQ({direction:"horizontal"},{children:[Object(o.jsx)(rt.a,qQ({htmlType:"submit",type:"primary",icon:Object(o.jsx)(ds.a,{},void 0),loading:this.state.loading},{children:"Import"}),void 0),Object(o.jsx)(rt.a,qQ({icon:Object(o.jsx)(pn.a,{},void 0),type:"link",onClick:this.downloadTemplate},{children:"Download Template"}),void 0)]}),void 0),this.renderErrors()]}),void 0)}),void 0)}),void 0)},t.prototype.renderErrors=function(){if(this.state.error&&this.state.message)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:this.state.message},void 0)},t}(a.Component),MQ=function(e){return Object.assign({academicYearId:0,secondaryProgramId:null},e)},YQ=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),UQ=function(){return UQ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},UQ.apply(this,arguments)},LQ=function(e){function t(t){var n=e.call(this,t)||this;return n._secondaryProgramDetailsRef=a.createRef(),n.loadRegionalPlanningPartners=function(e){be.getRegionalPlanningPartners(e).then((function(e){var t;e&&n.setState({regions:null!==(t=e.regions)&&void 0!==t?t:[]})})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))},n.loadSecondaryPrograms=function(e,t){var r=OL({academicYearId:t,secondaryProgramId:e});mL.getSecondaryPrograms(r).then((function(e){var t;e&&n.setState({secondaryPrograms:null!==(t=e.secondaryPrograms)&&void 0!==t?t:[]})})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))},n.loadSecondaryProgramCourses=function(e,t){var r=MQ({academicYearId:t,secondaryProgramId:e});$H.getSecondaryProgramCourses(r).then((function(e){var t;e&&n.setState({secondaryProgramCourses:null!==(t=e.secondaryProgramCourse)&&void 0!==t?t:[]})})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))},n.loadSecondaryProgram=function(e,t,r){n.setState({secondaryProgramId:e});var i=uH({id:e,secondaryProgramId:r,academicYear:t});mL.getSecondaryProgramDetails(i).then((function(e){var t;e.secondaryProgram?(n.setState({secondaryProgram:e.secondaryProgram,secondaryProgramId:null!==(t=e.secondaryProgram.id)&&void 0!==t?t:re.default.Empty(),secondaryProgramIdentifier:e.secondaryProgram.secondaryProgramId,isNew:!1,isEditing:!1}),n.state.secondaryPrograms&&0==n.state.secondaryPrograms.length&&n.loadSecondaryPrograms(e.secondaryProgram.secondaryProgramId,e.secondaryProgram.academicYear),n.state.secondaryProgramCourses&&0==n.state.secondaryProgramCourses.length&&n.loadSecondaryProgramCourses(e.secondaryProgram.secondaryProgramId,e.secondaryProgram.academicYear)):n.setState({isNew:!0,secondaryProgramId:re.default.Empty(),secondaryProgramIdentifier:n.state.secondaryProgramIdentifier,secondaryProgram:IL.create(),isEditing:!0})}
1)).catch((function(){n.setState({error:!0})}))},n.loadAcademicYears=function(){n.setState({loading:!0});var e=ML({});return sL.getAcademicYears(e).then((function(e){var t;e&&e.academicYears&&n.setState({academicYears:null!==(t=e.academicYears)&&void 0!==t?t:[]})})).catch((function(){n.setState({error:!0})}))},n.changeTab=function(e){n.setState({activeTab:e}),T.replace(x.generate("",{},{activeTab:e,academicYear:n.state.academicYear}),{activeTab:e,academicYear:n.state.academicYear})},n.toggleEdit=function(){var e;n.state.isEditing&&(null===(e=n._secondaryProgramDetailsRef.current)||void 0===e||e.resetForm()),n.setState({isEditing:!n.state.isEditing})},n.secondaryProgramDetailsPageSaved=function(e){n.setState({isEditing:!1,isNew:!1}),e!=n.state.secondaryProgramId?(T.push(x.generate(x.SECONDARY_PROGRAM_DETAILS,{id:e},{academicYearId:n.state.academicYear,fromSelfStudies:n.state.fromSelfStudies,fromAcademicYearList:n.state.fromAcademicYearList})),n.loadSecondaryProgram(e)):n.loadSecondaryProgram(e)},n.deleteConfirmation=function(e,t){f.a.confirm({title:"Are you sure you want to delete this Program?",okText:"Delete",onOk:function(){return n.deleteSecondaryProgram(e,t)}})},n.deleteSecondaryProgram=function(e,t){n.setState({submitting:!0});var r=lH({secondaryProgramId:e,academicYearId:t});mL.deleteSecondaryProgram(r).then((function(e){n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,altered:!(null===e||void 0===e?void 0:e.succeeded)}),!0===(null===e||void 0===e?void 0:e.succeeded)?S.b.success("Programwas removed."):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(e){n.setState({error:e}),S.b.error("Programcould not be removed.")})).finally((function(){n.setState({loading:!1}),n.goToListing()}))},n.goToListing=function(){T.goBack()},n.onSelect=function(e){n.setState({academicYear:e,secondaryProgramId:re.default.Empty()}),n.loadSecondaryProgram(re.default.Empty(),e,n.state.secondaryProgramIdentifier)},n.state={activeTab:"program_details",configuration:!1,secondaryProgramId:re.default.Empty(),secondaryProgramIdentifier:0,academicYears:[],academicYear:0,fromAcademicYearList:!1,fromSelfStudies:!1,secondaryPrograms:[],secondaryProgramCourses:[],regions:[],districtId:re.default.Empty(),secondaryProgram:IL.create()},n}return YQ(t,e),t.prototype.componentDidMount=function(){var e,t=this,n=Hr.getPathPart(this.props.match,"id"),r=Hr.getParameter("academicYear"),i=Hr.getParameter("fromAcademicYearList"),o=Hr.getParameter("fromSelfStudies"),a=Hr.getParameter("districtId"),s=Hr.getParameter("activeTab","program_details"),d=Hr.getParameter("configuration");(this.setState({academicYear:Number.parseInt(r),fromSelfStudies:"true"==o,fromAcademicYearList:"true"==i,districtId:a,activeTab:s,configuration:"true"==d}),0!=Number.parseInt(r))&&(this.props.match.path.split("/").findIndex((function(e){return"new"==e}))>-1?(this.setState({isEditing:!0,isNew:!0,loading:!1}),(e=[]).push(this.loadAcademicYears()),e.push(this.loadRegionalPlanningPartners(r)),Promise.all(e).then((function(){t.setState({loading:!1})}))):((e=[]).push(this.loadSecondaryProgram(n)),e.push(this.loadRegionalPlanningPartners(r)),e.push(this.loadAcademicYears()),Promise.all(e).then((function(){t.setState({loading:!1})}))))},t.prototype.render=function(){var e,t,n,r,i,a,s,d,c,l,u,p,f,h,v,m,g,b,y=this;if(0==this.state.academicYear)return Object(o.jsx)(pt.a,{active:!0},void 0);var j=this.state.loading?"...":this.state.isNew?"New Program":null!==(i=(null===(t=null===(e=this.state.secondaryProgram)||void 0===e?void 0:e.secondaryCipNumber)||void 0===t?void 0:t.code)+" - "+(null===(r=null===(n=this.state.secondaryProgram)||void 0===n?void 0:n.secondaryCipNumber)||void 0===r?void 0:r.description))&&void 0!==i?i:"...",I=this.state.districtId==re.default.Empty()||""==this.state.districtId?Xn.secondaryProgramDetailPage(j,this.state.secondaryProgramId,this.state.academicYear,this.state.fromAcademicYearList,null!==(a=this.state.districtId)&&void 0!==a?a:re.default.Empty(),null!==(l=(null===(d=null===(s=this.state.secondaryProgram)||void 0===s?void 0:s.district)||void 0===d?void 0:d.name)+" - "+(null===(c=this.state.regi
1ons.find((function(e){var t,n;return e.regionalPlanningPartnerIdentifier==(null===(n=null===(t=y.state.secondaryProgram)||void 0===t?void 0:t.district)||void 0===n?void 0:n.regionIdentifier)})))||void 0===c?void 0:c.name))&&void 0!==l?l:""):Xn.secondaryProgramDetailFromDistrict(j,this.state.secondaryProgramId,this.state.academicYear,this.state.fromAcademicYearList,null!==(p=null===(u=this.state.secondaryProgram)||void 0===u?void 0:u.districtId)&&void 0!==p?p:re.default.Empty(),null!==(m=(null===(h=null===(f=this.state.secondaryProgram)||void 0===f?void 0:f.district)||void 0===h?void 0:h.name)+" - "+(null===(v=this.state.regions.find((function(e){var t,n;return e.regionalPlanningPartnerIdentifier==(null===(n=null===(t=y.state.secondaryProgram)||void 0===t?void 0:t.district)||void 0===n?void 0:n.regionIdentifier)})))||void 0===v?void 0:v.name))&&void 0!==m?m:"");this.state.configuration&&(I=Xn.academicYearSecondaryProgramsConfigurationDetail(this.state.academicYear,this.state.secondaryProgramId));var S=null==Xe.Get();return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:j,subTitle:null===(b=null===(g=this.state.secondaryProgram)||void 0===g?void 0:g.district)||void 0===b?void 0:b.name,onBack:this.goToListing,breadcrumbs:I,extra:this.renderMoreActions(),footer:Object(o.jsxs)(pa.a,UQ({activeKey:this.state.activeTab,onChange:this.changeTab},{children:[Object(o.jsx)(pa.a.TabPane,{tab:"Details"},"program_details"),Object(o.jsx)(pa.a.TabPane,{tab:"Courses"},"courses"),S?null:Object(o.jsx)(pa.a.TabPane,{tab:"Program History"},"program_history")]}),void 0)},void 0),this.renderDetailsCard(),this.renderProgramCourses(),this.renderProgramHistoryCard()]},void 0)},t.prototype.renderDetailsCard=function(){if("program_details"==this.state.activeTab){var e=this.state.secondaryProgramId==re.default.Empty()?null:Object(o.jsx)(Ze,UQ({validFeatureFlags:[gn.EDIT_SECONDARY_PROGRAM]},{children:Object(o.jsx)(Br,{isEditing:this.state.isEditing,onClick:this.toggleEdit},void 0)}),void 0);return Object(o.jsx)(Qn.a,UQ({title:"Details",extra:e},{children:Object(o.jsx)(mH,{ref:this._secondaryProgramDetailsRef,secondaryProgramId:this.state.secondaryProgramId,isEditing:this.state.isEditing,isNew:this.state.isNew,readonly:null==Xe.Get(),onSave:this.secondaryProgramDetailsPageSaved,academicYear:this.state.academicYear},void 0)}),void 0)}},t.prototype.renderProgramHistoryCard=function(){if("program_history"==this.state.activeTab)return Object(o.jsx)(Qn.a,UQ({title:"Details"},{children:Object(o.jsx)(NQ,{secondaryProgramId:this.state.secondaryProgramIdentifier,academicYear:this.state.academicYear},void 0)}),void 0)},t.prototype.renderMoreActions=function(){var e=this,t=Object(o.jsx)(Gt.a,{children:Object(o.jsx)(Gt.a.Item,UQ({title:"Delete Program",onClick:function(){return e.deleteConfirmation(e.state.secondaryProgramId,e.state.academicYear)}},{children:"Delete Program"}),this.state.secondaryProgramId)},void 0);return Object(o.jsxs)(o.Fragment,{children:[null==Xe.Get()?null:Object(o.jsxs)(o.Fragment,{children:[" ",Object(o.jsx)("label",{title:"academicYear",htmlFor:"academicYear"},void 0),Object(o.jsx)(hd,UQ({id:"academicYear",value:this.state.academicYear,onSelect:this.onSelect,dropdownMatchSelectWidth:!1},{children:this.state.secondaryPrograms.map((function(t){return e.renderSecondaryProgramAcademicYear(t)}))}),void 0)]},void 0),Object(o.jsx)(Ze,UQ({validFeatureFlags:[gn.EDIT_SECONDARY_PROGRAM]},{children:this.state.isNew?null:Object(o.jsx)(la.a,UQ({overlay:t},{children:Object(o.jsx)(rt.a,UQ({size:"large",type:"link"},{children:Object(o.jsx)(aa.a,{},void 0)}),void 0)}),void 0)}),void 0)]},void 0)},t.prototype.renderProgramCourses=function(){var e,t,n,r,i,a=this;if("courses"==this.state.activeTab)return Object(o.jsx)(Qn.a,UQ({title:"Program Courses"},{children:this.state.secondaryProgramCourses.length>0||!this.state.fromSelfStudies?Object(o.jsx)(TQ,{academicYear:this.state.academicYear,fromSelfStudies:this.state.fromSelfStudies,fromAcademicYearList:this.state.fromAcademicYearList,fromSecondaryProgramCourse:!0,districtId:null!==(t=null===(e=this.state.secondaryProgram)||void 0===e?void 0:e.districtId)&&void 0!==t?t:re.default.Empty(),secondaryProgramId:null!==(r=null===(n=this.state.secondaryProgram)||void 0===n?void 0:n.id)&&void 0!==r?r:re.default.Empty(),programId:null!==(i=this.state.secondaryProgramIdentifier)&&void 0!==i?i:0},void 0):Je.isAuthorized([gn.CONFIG_ACADEMIC_YEAR])?Object(o.jsx)(FQ,{onSubmit:function(){var e;return a.loadSecondaryProgramCourses(null===(e=a.state.secondaryProgram)||void 0===e?void 0:e.secondaryProgramId,a.state.academicYear)}
1,academicYear:this.state.academicYear,programId:this.state.secondaryProgramIdentifier},void 0):Object(o.jsx)(ud,{text:"There is no data for this program review year and user does not have the permission to import program courses."},void 0)}),void 0)},t.prototype.renderSecondaryProgramAcademicYear=function(e){return Object(o.jsx)(pr.a.Option,UQ({value:e.academicYear},{children:e.academicYear}),e.secondaryProgramId)},t.prototype.renderAcademicYear=function(e){return Object(o.jsx)(pr.a.Option,UQ({value:e.id},{children:e.id}),e.id)},t}(a.Component),kQ=Object(u.i)(LQ),GQ=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),VQ=function(){return VQ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},VQ.apply(this,arguments)},BQ=function(e){function t(t){var n=e.call(this,t)||this;return n.loadSecondaryPrograms=function(e,t){(t||void 0==n.state.hasPrograms&&e>0)&&mL.academicYearHasSecondaryPrograms(e).then((function(e){e&&n.setState({hasPrograms:e.hasPrograms})}))},n.onSubmit=function(e){n.loadSecondaryPrograms(n.state.academicYear,!0),n.setState({errors:null!==e&&void 0!==e?e:[]})},n.onBack=function(){T.push(x.generate(x.DATA_REVIEW_DISTRICT_CONTACTS,{academicYearId:n.state.academicYear},{}))},n.onContinue=function(){T.push(x.generate(x.DATA_REVIEW_SECONDARY_COURSES,{academicYearId:n.state.academicYear},{}))},n.state={academicYear:0,errors:[]},n}return GQ(t,e),t.prototype.componentDidMount=function(){var e=Number.parseInt(Hr.getPathPart(this.props.match,"academicYearId"));this.state.academicYear!=e&&(this.setState({academicYear:e}),this.loadSecondaryPrograms(e))},t.prototype.render=function(){var e=this.state.academicYear;return 0!=e?Object(o.jsx)(O.Content,{children:Object(o.jsx)(Yz,VQ({breadcrumbs:Xn.academicYearDataReview(e),stepNumber:8,academicYear:e},{children:Object(o.jsx)(Qn.a,VQ({title:"Programs"},{children:Object(o.jsxs)(y.b,VQ({direction:"vertical",size:"middle"},{children:[this.state.hasPrograms?Object(o.jsx)(EH,{errors:this.state.errors,academicYear:this.state.academicYear,fromAcademicYearDataReview:!0},void 0):Object(o.jsx)(IH,{onSubmit:this.onSubmit,academicYear:this.state.academicYear},void 0),Object(o.jsxs)(y.b,{children:[Object(o.jsx)(lm,{onClick:this.onBack},void 0),this.state.hasPrograms?Object(o.jsx)(Pz,{onClick:this.onContinue},void 0):null]},void 0)]}),void 0)}),void 0)}),void 0)},void 0):Object(o.jsx)(pt.a,{},void 0)},t}(a.Component),WQ=Object(u.i)(BQ),zQ=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),HQ=function(){return HQ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},HQ.apply(this,arguments)},QQ=function(e){function t(t){var n=e.call(this,t)||this;return n.loadAcademicYears=function(e){n.setState({loading:!0});var t=ML({academicYearId:e});return sL.getAcademicYears(t).then((function(e){var t;e&&e.academicYears&&n.setState({academicYears:null!==(t=e.academicYears)&&void 0!==t?t:[],academicYear:$r.getCurrentYear()})})).catch().finally((function(){n.setState({loading:!1})}))},n.onSelect=function(e){n.setState({academicYear:e})},n.onBack=function(){n.state.fromSelfStudies?T.push(x.generate(x.SELF_STUDIES_ACADEMIC_YEAR_DASHBOARD,{academicYearId:n.state.academicYear},{})):T.push(x.generate(x.HOME,{},{}))},n.state={loading:!1,academicYear:0,academicYears:[],fromSelfStudies:!1,fromAcademicYearList:!1},n}return zQ(t,e),t.prototype.componentDidMount=function(){var e=Number.parseInt(Hr.getPathPart(this.props.match,"academicYearId")),t=Hr.getParameter("fromAcademicYearList");this.setState({fromAcademicYearList:"true"==t}),this.state.academicYear!=e?this.setState({academicYear:e,fromSelfStudies:!0}):this.loadAcademicYears(e)},t.prototype.render=function(){var e=this,t=this.state.academicYear;return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"ProgramTypes",breadcrumbs:this.state.fromSelfStudies?Xn.academicYearDataReview(t):Xn.SecondaryProgramScenarioList(),onBack:this.onBack,extra:this.state.fromSelfStudies?null:Object(o.jsx)(hd,HQ({value:this.state.academicYear,onSelect:this.onSelect,dropdownMatchSelectWidth:!1},{children:this.state.academicYears.map((function(t){return e.renderAcademicYear(t)}))}),void 0)},void 0),Object(o.jsx)(y.b,HQ({direction:"vertical",size:"large"},{children:Object(o.jsx)(Qn.a,HQ({title:"ProgramTypes"},{children:Object(o.jsx)(y.b,HQ({direction:"vertical",size:"large"},{children:Object(o.jsx)(ZG,{academicYear:this.state.academicYear,fromSelfStudies:this.state.fromSelfStudies,fromAcademicYearList:this.state.fromAcademicYearList},void 0)}),void 0)}),void 0)}),void 0)]},void 0)},t.prototype.renderAcademicYear=function(e){return Object(o.jsx)(pr.a.Option,HQ({value:e.id},{children:e.id}
1),e.id)},t}(a.Component),KQ=Object(u.i)(QQ),XQ=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),JQ=function(){return JQ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},JQ.apply(this,arguments)},$Q=function(e){function t(t){var n=e.call(this,t)||this;return n.onBack=function(){T.goBack()},n.state={loading:!1,academicYear:0},n}return XQ(t,e),t.prototype.componentDidMount=function(){var e=Number.parseInt(Hr.getPathPart(this.props.match,"academicYearId"));this.setState({academicYear:e})},t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Scenarios",breadcrumbs:Xn.academicYearScenariosConfigurationList(this.state.academicYear),onBack:this.onBack},void 0),Object(o.jsx)(y.b,JQ({direction:"vertical",size:"large"},{children:Object(o.jsx)(Qn.a,JQ({title:"Scenarios"},{children:Object(o.jsx)(y.b,JQ({direction:"vertical",size:"large"},{children:Object(o.jsx)(ZG,{academicYear:this.state.academicYear},void 0)}),void 0)}),void 0)}),void 0)]},void 0)},t}(a.Component);var ZQ=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected}}))($Q)),eK=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),tK=function(){return tK=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},tK.apply(this,arguments)},nK=function(e){function t(t){var n=e.call(this,t)||this;return n._secondaryProgramScenarioDetailsRef=a.createRef(),n.loadSecondaryProgramScenario=function(e,t,r){n.setState({id:e});var i=WG({id:e,academicYear:t,SecondaryProgramScenarioId:r});YG.getSecondaryProgramScenarioDetails(i).then((function(e){var t;e.secondaryProgramScenario?n.setState({SecondaryProgramScenario:e.secondaryProgramScenario,id:null!==(t=e.secondaryProgramScenario.id)&&void 0!==t?t:re.default.Empty(),SecondaryProgramScenarioId:e.secondaryProgramScenario.secondaryProgramScenarioId,isNew:!1,isEditing:!1}):n.setState({isNew:!0,id:re.default.Empty(),SecondaryProgramScenario:void 0,isEditing:!0})})).catch((function(){n.setState({error:!0})}))},n.loadAcademicYears=function(){n.setState({loading:!0});var e=ML({});return sL.getAcademicYears(e).then((function(e){var t;e&&e.academicYears&&n.setState({academicYears:null!==(t=e.academicYears)&&void 0!==t?t:[]})})).catch((function(){n.setState({error:!0})}))},n.toggleEdit=function(){var e;n.state.isEditing&&(null===(e=n._secondaryProgramScenarioDetailsRef.current)||void 0===e||e.resetForm()),n.setState({isEditing:!n.state.isEditing})},n.SecondaryProgramScenarioDetailsPageSaved=function(e){n.setState({isEditing:!1,isNew:!1}),e!=n.state.id?(T.push(x.generate(x.SECONDARY_PROGRAM_TYPE_DETAILS,{id:e},{academicYearId:n.state.academicYearId,fromSelfStudies:n.state.fromSelfStudies,fromAcademicYearList:n.state.fromAcademicYearList})),n.loadSecondaryProgramScenario(e)):n.loadSecondaryProgramScenario(e)},n.deleteConfirmation=function(e,t){f.a.confirm({title:"Are you sure you want to delete this ProgramType?",okText:"Delete",onOk:function(){return n.deleteSecondaryProgramScenario(e,t)}})},n.deleteSecondaryProgramScenario=function(e,t){n.setState({submitting:!0});var r=VG({SecondaryProgramScenarioId:e,academicYearId:t});YG.deleteSecondaryProgramScenario(r).then((function(e){n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,altered:!(null===e||void 0===e?void 0:e.succeeded)}),!0===(null===e||void 0===e?void 0:e.succeeded)?S.b.success("ProgramType was removed."):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(e){n.setState({error:e}),S.b.error("ProgramType could not be removed.")})).finally((function(){n.setState({loading:!1}),n.goToListing()}))},n.goToListing=function(){n.state.fromSelfStudies?T.push(x.generate(x.SECONDARY_PROGRAM_TYPES,{academicYearId:n.state.academicYearId},{fromSelfStudies:n.state.fromSelfStudies,fromAcademicYearList:n.state.fromAcademicYearList})):T.push(x.generate(x.ALL_SECONDARY_PROGRAM_TYPES))},n.onSelect=function(e){n.setState({academicYearId:e}),n.loadSecondaryProgramScenario(n.state.id,e,n.state.SecondaryProgramScenarioId)},n.state={id:re.default.Empty(),SecondaryProgramScenarioId:0,academicYears:[],academicYearId:0,fromAcademicYearList:!1,fromSelfStudies:!1},n}return eK(t,e),t.prototype.componentDidMount=function(){var e,t=this,n=Hr.getPathPart(this.props.match,"id"),r=Hr.getParameter("academicYearId"),i=Hr.getParameter("fromAcademicYearList"),o=Hr.getParameter("fromSelfStudies");(this.setState({academicYearId:Number.parseInt(r),fromSelfStudies:"true"==o,fromAcademicYearList:"true"==i}),this.props.match.path.split("/").findIndex((function(e){return"new"==e}))>-1)?(this.setState({isEditing:!0,isNew:!0,loading:!1}),(e=[]).push(this.loadAcademicYears()),Promise.all(e).then((function(){t.setState({loading:!1})}
1))):((e=[]).push(this.loadSecondaryProgramScenario(n)),e.push(this.loadAcademicYears()),Promise.all(e).then((function(){t.setState({loading:!1})})))},t.prototype.render=function(){var e,t,n=this.state.loading?"...":this.state.isNew?"New ProgramType":null!==(t=null===(e=this.state.SecondaryProgramScenario)||void 0===e?void 0:e.title)&&void 0!==t?t:"...";return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:n,onBack:this.goToListing,breadcrumbs:Xn.SecondaryProgramScenarioDetailPage(n,this.state.id,this.state.academicYearId,this.state.fromAcademicYearList,this.state.fromSelfStudies),extra:this.renderMoreActions()},void 0),this.renderDetailsCard()]},void 0)},t.prototype.renderDetailsCard=function(){var e=this.state.id==re.default.Empty()?null:Object(o.jsx)(Ze,tK({validFeatureFlags:[gn.EDIT_SECONDARY_PROGRAM_SCENARIO]},{children:Object(o.jsx)(Br,{isEditing:this.state.isEditing,onClick:this.toggleEdit},void 0)}),void 0);return Object(o.jsx)(Qn.a,tK({title:"Details",extra:e},{children:Object(o.jsx)(KG,{ref:this._secondaryProgramScenarioDetailsRef,SecondaryProgramScenarioId:this.state.id,isEditing:this.state.isEditing,isNew:this.state.isNew,onSave:this.SecondaryProgramScenarioDetailsPageSaved,academicYear:this.state.academicYearId},void 0)}),void 0)},t.prototype.renderMoreActions=function(){var e=this,t=Object(o.jsx)(Gt.a,{children:Object(o.jsx)(Gt.a.Item,tK({title:"Delete ProgramType",onClick:function(){return e.deleteConfirmation(e.state.id,e.state.academicYearId)}},{children:"Delete ProgramType"}),this.state.id)},void 0);return Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(hd,tK({value:this.state.academicYearId,onSelect:this.onSelect,dropdownMatchSelectWidth:!1},{children:this.state.academicYears.map((function(t){return e.renderAcademicYear(t)}))}),void 0),Object(o.jsx)(Ze,tK({validFeatureFlags:[gn.EDIT_SECONDARY_PROGRAM_SCENARIO]},{children:this.state.isNew?null:Object(o.jsx)(la.a,tK({overlay:t},{children:Object(o.jsx)(rt.a,tK({size:"large",type:"link"},{children:Object(o.jsx)(aa.a,{},void 0)}),void 0)}),void 0)}),void 0)]},void 0)},t.prototype.renderAcademicYear=function(e){return Object(o.jsx)(pr.a.Option,tK({value:e.id},{children:e.id}),e.id)},t}(a.Component),rK=Object(u.i)(nK),iK=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),oK=function(){return oK=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},oK.apply(this,arguments)},aK=function(e){function t(t){var n=e.call(this,t)||this;return n.onBack=function(){T.push(x.generate(x.DATA_REVIEW_FEDERAL_CLUSTERS,{academicYearId:n.state.academicYear},{}))},n.onContinue=function(){T.push(x.generate(x.DATA_REVIEW_REGIONAL_PLANNING_PARTNER,{academicYear:n.state.academicYear},{}))},n.state={academicYear:0},n}return iK(t,e),t.prototype.componentDidMount=function(){var e=Number.parseInt(Hr.getPathPart(this.props.match,"academicYearId"));this.state.academicYear!=e&&this.setState({academicYear:e})},t.prototype.render=function(){var e=0==this.state.academicYear?0:this.state.academicYear;return 0!=e?Object(o.jsx)(O.Content,{children:Object(o.jsx)(Yz,oK({breadcrumbs:Xn.academicYearDataReview(e),stepNumber:3,academicYear:e},{children:Object(o.jsx)(Qn.a,oK({title:"Scenarios"},{children:Object(o.jsxs)(y.b,oK({direction:"vertical",size:"middle"},{children:[Object(o.jsx)(ZG,{academicYear:this.state.academicYear},void 0),Object(o.jsxs)(y.b,{children:[Object(o.jsx)(lm,{onClick:this.onBack},void 0),Object(o.jsx)(Pz,{onClick:this.onContinue},void 0)]},void 0)]}),void 0)}),void 0)}),void 0)},void 0):Object(o.jsx)(pt.a,{},void 0)},t}(a.Component),sK=Object(u.i)(aK),dK=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),cK=function(){return cK=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},cK.apply(this,arguments)},lK=function(e){function t(t){var n=e.call(this,t)||this;return n.loadAcademicYears=function(){n.setState({loading:!0});var e=ML({});return sL.getAcademicYears(e).then((function(e){var t;e&&e.academicYears&&n.setState({academicYears:null!==(t=e.academicYears)&&void 0!==t?t:[],academicYear:$r.getCurrentYear()})})).catch().finally((function(){n.setState({loading:!1})}
1))},n.onSelect=function(e){n.setState({academicYear:e})},n.onBack=function(){T.goBack()},n.state={loading:!1,academicYear:2022,academicYears:[]},n}return dK(t,e),t.prototype.componentDidMount=function(){this.loadAcademicYears()},t.prototype.render=function(){var e=this;return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Scenarios",breadcrumbs:Xn.ScenarioConfigurationList(),onBack:this.onBack,extra:Object(o.jsx)(hd,cK({value:this.state.academicYear,onSelect:this.onSelect,dropdownMatchSelectWidth:!1},{children:this.state.academicYears.map((function(t){return e.renderAcademicYear(t)}))}),void 0)},void 0),Object(o.jsx)(y.b,cK({direction:"vertical",size:"large"},{children:Object(o.jsx)(Qn.a,cK({title:"Scenarios"},{children:Object(o.jsx)(y.b,cK({direction:"vertical",size:"large"},{children:Object(o.jsx)(ZG,{academicYear:this.state.academicYear},void 0)}),void 0)}),void 0)}),void 0)]},void 0)},t.prototype.renderAcademicYear=function(e){return Object(o.jsx)(pr.a.Option,cK({value:e.id},{children:e.id}),e.id)},t}(a.Component),uK=Object(u.i)(lK),pK=function(e){return Object.assign({academicYear:0},e)},fK=function(e){return Object.assign({secondaryProgramCourseId:"00000000-0000-0000-0000-000000000000",academicYearId:0},e)},hK=function(){return hK=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},hK.apply(this,arguments)};var vK=function(e){var t,n=void 0,r=a.createRef(),i=Object(a.useState)(!1),s=i[0],d=i[1],c=Object(a.useState)(),l=c[0],u=c[1],p=Object(a.useState)(null!==(t=e.errors)&&void 0!==t?t:[]),h=p[0],v=p[1],m=function(e){e.id&&u(e.id)},g=function(){u(null)},b=function(t){null!=t&&f.a.confirm({title:"Are you sure you want to delete this Program Course?",okText:"Delete",onOk:function(){return y(t,e.academicYear)},okButtonProps:{type:"primary",danger:!0}})},y=function(e,t){var r=fK({secondaryProgramCourseId:e,academicYearId:t});$H.deleteSecondaryProgramCourse(r).then((function(e){!0===(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Program Course was removed."),null===n||void 0===n||n.refresh()):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(){S.b.error("Program Course could not be removed.")}))},O=function(e){d(!1),v(null!==e&&void 0!==e?e:[])},j=[];j.push(oo.Reset()),Je.isAuthorized([gn.EDIT_SECONDARY_COURSE])&&!e.programId&&j.push(oo.Default("New Program Course",(function(){u(re.default.Empty())}))),Je.isAuthorized([gn.CONFIG_ACADEMIC_YEAR])&&!e.programId&&e.fromAcademicYearDataReview&&j.push(oo.Default("Re-import Program Courses",(function(){return d(!0),void f.a.confirm({title:"Import",content:Object(o.jsx)(FQ,{ref:r,academicYear:e.academicYear,refreshDataTable:n,isInModal:!0,onSubmit:O,programId:0},void 0),onCancel:function(){d(!1)},onOk:function(){var e;return null===(e=r.current)||void 0===e?void 0:e.confirmImport()},width:500})}),void 0,s)),Je.isAuthorized([gn.EDIT_SECONDARY_COURSE])&&e.fromAcademicYearDataReview&&j.push(oo.Default("Import Template",(function(){window.open(x.generateFull(x.SECONDARY_PROGRAM_COURSES_IMPORT_TEMPLATE,{},{}),"_blank")}),Object(o.jsx)(pn.a,{},void 0),s));var I=function(){if(void 0!=h&&h.length>0)return Object(o.jsx)(o.Fragment,{children:h.map((function(e){return Object(o.jsx)("p",{children:e},e)}))},void 0)};return Object(o.jsxs)(o.Fragment,{children:[function(){if(h&&h.length>0)return Object(o.jsx)(ct.a,{showIcon:!0,type:"error",description:I(),message:"Error Importing"},void 0)}(),function(){if(l)return Object(o.jsx)(jQ,{onCancel:g,visible:!0,secondaryProgramCourseId:l,academicYear:e.academicYear,onSave:g},void 0)}(),Object(o.jsx)(io,{ref:function(e){return n=e},serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:j,columns:function(){var e=[{title:"Program",dataIndex:GG.programIdentifier,sorter:!0,width:350,filterType:wr.Text,render:function(e,t){var n,r;return null===(r=null===(n=null===t||void 0===t?void 0:t.program)||void 0===n?void 0:n.secondaryCipNumber)||void 0===r?void 0:r.display}},{title:"Course",dataIndex:GG.courseIdentifier,sorter:!0,width:350,filterType:wr.Text,render:function(e,t){var n;return null===(n=null===t||void 0===t?void 0:t.course)||void 0===n?void 0:n.display}},{title:"Is Offer Teach",dataIndex:GG.isOfferTeach,sorter:!0,width:50,render:function(e,t){return 1==t.isOfferTeach?"Yes":"No"},filterType:wr.DropdownMulti,dropdownFilterOptions:Ii.GetTrueOrFalse(),filterDropdownVisible:!0},{title:"Core Course",dataIndex:GG.isCoreCourse,sorter:!0,width:50,render:function(e,t){return 1==t.isCoreCourse?"Yes":"No"},filterType:wr.DropdownMulti,dropdownFilterOptions:Ii.GetTrueOrFalse()},{title:"Actions",align:"center",dataIndex:GG.secondaryProgramCourseId,sorter:!1,render:function(e,t){if(Je.isAuthorized([gn.CONFIG_ACADEMIC_YEAR]))return Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(rt.a,hK({type:"link",onClick:function(){return m(t)}},{children:Object(o.jsx)(Gr.a,{},void 0)}),void 0),Object(o.jsx)(rt.a,hK({type:"link",onClick:function(){return b(t.id)}},{children:Object(o.jsx)(Yd.a,{},void 0)}),void 0)]},void 0)},width:50}];return e}(),fetchData:{fetch:function(t){return $H.getSecondaryProgramCourseTableData(t,e.academicYear)}
1},stateSaving:{enabled:!0,tableUniqueKey:"secondary_program_course_list"}},void 0)]},void 0)},mK=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),gK=function(){return gK=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},gK.apply(this,arguments)},bK=function(e){function t(t){var n=e.call(this,t)||this;return n.loadSecondaryCourses=function(e,t){(t||void 0==n.state.hasProgramCourses&&e>0)&&$H.academicYearHasProgramCourses(e).then((function(e){e&&n.setState({hasProgramCourses:e.hasProgramCourses})}))},n.onSubmit=function(e){n.loadSecondaryCourses(n.state.academicYear,!0),n.setState({errors:null!==e&&void 0!==e?e:[]})},n.onBack=function(){T.push(x.generate(x.DATA_REVIEW_SECONDARY_COURSES,{academicYearId:n.state.academicYear},{}))},n.onFinalize=function(){n.setState({submitting:!0});var e=pK({academicYear:n.state.academicYear});sL.completeAcademicYearDataReview(e).then((function(e){n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,altered:!(null===e||void 0===e?void 0:e.succeeded)}),!0===(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Program Review Year Data Review Complete"),T.push(x.generate(x.SELF_STUDIES_ACADEMIC_YEAR_DASHBOARD,{academicYearId:e.academicYear},{}))):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(e){n.setState({error:e}),S.b.error("Failed to Complete Program Review Year Data Review")})).finally((function(){n.setState({loading:!1})}))},n.state={academicYear:0,errors:[]},n}return mK(t,e),t.prototype.componentDidMount=function(){var e=Number.parseInt(Hr.getPathPart(this.props.match,"academicYearId"));this.state.academicYear!=e&&(this.setState({academicYear:e}),this.loadSecondaryCourses(e))},t.prototype.render=function(){var e=this.state.academicYear;return 0!=e?Object(o.jsx)(O.Content,{children:Object(o.jsx)(Yz,gK({breadcrumbs:Xn.academicYearDataReview(e),stepNumber:10,academicYear:e},{children:Object(o.jsx)(Qn.a,gK({title:"Program Courses"},{children:Object(o.jsxs)(y.b,gK({direction:"vertical",size:"middle"},{children:[this.state.hasProgramCourses?Object(o.jsx)(vK,{academicYear:this.state.academicYear,errors:this.state.errors,fromAcademicYearDataReview:!0},void 0):Object(o.jsx)(FQ,{onSubmit:this.onSubmit,academicYear:this.state.academicYear,programId:0},void 0),Object(o.jsxs)(y.b,{children:[Object(o.jsx)(lm,{onClick:this.onBack},void 0),this.state.hasProgramCourses?Object(o.jsx)(rt.a,gK({type:"primary",disabled:!this.state.hasProgramCourses,onClick:this.onFinalize},{children:"Finalize Program Review Year Data"}),void 0):null]},void 0)]}),void 0)}),void 0)}),void 0)},void 0):Object(o.jsx)(pt.a,{},void 0)},t}(a.Component),yK=Object(u.i)(bK),OK=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),jK=function(){return jK=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},jK.apply(this,arguments)},IK=function(e){function t(t){var n=e.call(this,t)||this;return n.onBack=function(){T.goBack()},n.state={loading:!1,academicYear:0},n}return OK(t,e),t.prototype.componentDidMount=function(){var e=Number.parseInt(Hr.getPathPart(this.props.match,"academicYearId"));this.setState({academicYear:e})},t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Program Courses",breadcrumbs:Xn.academicYearSecondaryProgramCoursesConfigurationList(this.state.academicYear),onBack:this.onBack},void 0),Object(o.jsx)(y.b,jK({direction:"vertical",size:"large"},{children:Object(o.jsx)(Qn.a,jK({title:"Program Courses"},{children:Object(o.jsx)(y.b,jK({direction:"vertical",size:"large"},{children:Object(o.jsx)(vK,{academicYear:this.state.academicYear},void 0)}),void 0)}),void 0)}),void 0)]},void 0)},t}(a.Component);var SK=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected}}))(IK)),EK=function(e){return Object.assign({academicYearId:0,districtId:null,secondaryCourseId:null},e)},RK=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),_K=function(){return _K=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},_K.apply(this,arguments)},TK=function(e){function t(t){var n=e.call(this,t)||this;return n.loadAcademicYears=function(e){n.setState({loading:!0});var t=ML({academicYearId:isNaN(e)?null:e});return sL.getAcademicYears(t).then((function(e){var t;e&&e.academicYears&&n.setState({academicYears:null!==(t=e.academicYears)&&void 0!==t?t:[],academicYear:$r.getCurrentYear()})})).catch().finally((function(){n.setState({loading:!1})}
1))},n.loadSecondaryCourses=function(e){var t=EK({academicYearId:isNaN(e)?$r.getCurrentYear():e});tQ.getSecondaryCourses(t).then((function(e){var t;e&&n.setState({secondaryCourses:null!==(t=e.secondaryCourse)&&void 0!==t?t:[]})})).finally((function(){n.setState({loading:!1})}))},n.onSelect=function(e){n.setState({academicYear:e}),n.loadSecondaryCourses(e)},n.onBack=function(){T.push(x.generate(x.SECONDARY_HOME,{},{}))},n.state={loading:!1,academicYear:0,academicYears:[],fromSelfStudies:!1,fromAcademicYearList:!1,secondaryCourses:[]},n}return RK(t,e),t.prototype.componentDidMount=function(){var e=Number.parseInt(Hr.getPathPart(this.props.match,"academicYear"));this.setState({fromAcademicYearList:this.props.match.path.split("/").findIndex((function(e){return"academicYearList"==e}))>-1,fromSelfStudies:this.props.match.path.split("/").findIndex((function(e){return"selfStudy"==e}))>-1}),this.state.academicYear!=e?(this.setState({academicYear:e,fromSelfStudies:!0,loading:!0}),this.loadSecondaryCourses(e),this.loadAcademicYears(e)):this.loadAcademicYears(e)},t.prototype.render=function(){var e=this;return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Courses",breadcrumbs:Xn.secondaryCourseList(),onBack:this.onBack,extra:Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)("label",{title:"academicYear",htmlFor:"academicYear"},void 0),Object(o.jsx)(hd,_K({id:"academicYear",value:this.state.academicYear,onSelect:this.onSelect,dropdownMatchSelectWidth:!1},{children:this.state.academicYears.map((function(t){return e.renderAcademicYear(t)}))}),void 0)]},void 0)},void 0),Object(o.jsx)(y.b,_K({direction:"vertical",size:"large"},{children:Object(o.jsx)(Qn.a,_K({title:"Courses"},{children:Object(o.jsx)(y.b,_K({direction:"vertical",size:"large"},{children:Object(o.jsx)(TQ,{academicYear:this.state.academicYear,fromSelfStudies:this.state.fromSelfStudies,fromAcademicYearList:this.state.fromAcademicYearList},void 0)}),void 0)}),void 0)}),void 0)]},void 0)},t.prototype.renderAcademicYear=function(e){return Object(o.jsx)(pr.a.Option,_K({value:e.id},{children:e.id}),e.id)},t}(a.Component);var CK=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected}}))(TK)),xK=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),AK=function(){return AK=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},AK.apply(this,arguments)},PK=function(e){function t(t){var n=e.call(this,t)||this;return n.onBack=function(){T.goBack()},n.state={loading:!1,academicYear:0},n}return xK(t,e),t.prototype.componentDidMount=function(){var e=Number.parseInt(Hr.getPathPart(this.props.match,"academicYearId"));this.setState({academicYear:e})},t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Courses",breadcrumbs:Xn.academicYearSecondaryCoursesConfigurationList(this.state.academicYear),onBack:this.onBack},void 0),Object(o.jsx)(y.b,AK({direction:"vertical",size:"large"},{children:Object(o.jsx)(Qn.a,AK({title:"Courses"},{children:Object(o.jsx)(y.b,AK({direction:"vertical",size:"large"},{children:Object(o.jsx)(TQ,{academicYear:this.state.academicYear},void 0)}),void 0)}),void 0)}),void 0)]},void 0)},t}(a.Component);var NK=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected}}))(PK)),wK=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),DK=function(){return DK=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},DK.apply(this,arguments)},qK=function(e){function t(t){var n=e.call(this,t)||this;return n._secondaryCourseDetailsRef=a.createRef(),n.loadRegionalPlanningPartners=function(e){be.getRegionalPlanningPartners(e).then((function(e){var t;e&&n.setState({regions:null!==(t=e.regions)&&void 0!==t?t:[]})})).catch((function(){n.setState({error:!0})}
1)).finally((function(){n.setState({loading:!1})}))},n.loadSecondaryProgramCourse=function(e){var t=MQ({academicYearId:e});$H.getSecondaryProgramCourses(t).then((function(e){var t;e&&n.setState({secondaryProgramCourses:null!==(t=e.secondaryProgramCourse)&&void 0!==t?t:[]})})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))},n.loadSecondaryPrograms=function(e){var t=OL({academicYearId:e});mL.getSecondaryPrograms(t).then((function(e){var t;e&&n.setState({secondaryPrograms:null!==(t=e.secondaryPrograms)&&void 0!==t?t:[]})})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))},n.loadDistrict=function(e){var t=bL({academicYearId:e});z.getDistricts(t).then((function(e){var t;e&&n.setState({districts:null!==(t=e.districts)&&void 0!==t?t:[]})})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))},n.loadSecondaryCourses=function(e,t){var r=EK({academicYearId:t,secondaryCourseId:e});tQ.getSecondaryCourses(r).then((function(e){var t;e&&n.setState({secondaryCourses:null!==(t=e.secondaryCourse)&&void 0!==t?t:[]})})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))},n.loadSecondaryCourse=function(e,t,r){var i=rQ({id:e,secondaryCourseId:r,academicYear:t});tQ.getSecondaryCourseDetails(i).then((function(e){var t;e.secondaryCourse?(n.setState({secondaryCourse:e.secondaryCourse,id:null!==(t=e.secondaryCourse.id)&&void 0!==t?t:re.default.Empty(),secondaryCourseId:e.secondaryCourse.secondaryCourseId,isNew:!1,isEditing:!1}),n.state.secondaryCourses&&0==n.state.secondaryCourses.length&&n.loadSecondaryCourses(e.secondaryCourse.secondaryCourseId,e.secondaryCourse.academicYear)):n.setState({isNew:!0,id:re.default.Empty(),secondaryCourse:void 0,isEditing:!0},(function(){var e;return null===(e=n._secondaryCourseDetailsRef.current)||void 0===e?void 0:e.resetForm()}))})).catch((function(){n.setState({error:!0})}))},n.loadAcademicYears=function(){n.setState({loading:!0});var e=ML({});return sL.getAcademicYears(e).then((function(e){var t;e&&e.academicYears&&n.setState({academicYears:null!==(t=e.academicYears)&&void 0!==t?t:[]})})).catch((function(){n.setState({error:!0})}))},n.toggleEdit=function(){var e;n.state.isEditing&&(null===(e=n._secondaryCourseDetailsRef.current)||void 0===e||e.resetForm()),n.setState({isEditing:!n.state.isEditing})},n.secondaryCourseDetailsPageSaved=function(e){n.setState({isEditing:!1,isNew:!1}),e!=n.state.id?(T.push(x.generate(x.SECONDARY_COURSE_DETAILS,{id:e},{academicYearId:n.state.academicYear,fromSelfStudies:n.state.fromSelfStudies,fromAcademicYearList:n.state.fromAcademicYearList})),n.loadSecondaryCourse(e)):n.loadSecondaryCourse(e)},n.deleteConfirmation=function(e,t){f.a.confirm({title:"Are you sure you want to delete this course?",okText:"Delete",onOk:function(){return n.deleteSecondaryCourse(e,t)}})},n.deleteSecondaryCourse=function(e,t){n.setState({submitting:!0});var r=nQ({secondaryCourseId:e,academicYearId:t});tQ.deleteSecondaryCourse(r).then((function(e){n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,altered:!(null===e||void 0===e?void 0:e.succeeded)}),!0===(null===e||void 0===e?void 0:e.succeeded)?S.b.success("Course was removed."):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(e){n.setState({error:e}),S.b.error("Course could not be removed.")})).finally((function(){n.setState({loading:!1}),n.goToListing()}))},n.goToListing=function(){n.state.fromSelfStudies?T.push(x.generate(x.SECONDARY_COURSES,{academicYearId:n.state.academicYear},{fromSelfStudies:n.state.fromSelfStudies,fromAcademicYearList:n.state.fromAcademicYearList})):null==Xe.Get()||n.state.fromSecondaryProgramCourse?T.goBack():T.push(x.generate(x.ALL_SECONDARY_COURSES))},n.onSelect=function(e){n.setState({academicYear:e,id:re.default.Empty()}),n.loadSecondaryCourse(re.default.Empty(),e,n.state.secondaryCourseId)},n.state={id:re.default.Empty(),academicYears:[],academicYear:0,secondaryCourseId:0,fromAcademicYearList:!1,fromSelfStudies:!1,secondaryCourses:[],secondaryPrograms:[],districts:[],regions:[],secondaryProgramCourses:[],fromSecondaryProgramCourse:!1},n}return wK(t,e),t.prototype.componentDidMount=function(){var e,t=this,n=Hr.getPathPart(this.props.match,"id"),r=Hr.getParameter("academicYear"),i=Hr.getParameter("fromAcademicYearList"),o=Hr.getParameter("fromSelfStudies"),a=Hr.getParameter("fromSecondaryProgramCourse");(this.setState({academicYear:Number.parseInt(r),fromSelfStudies:"true"==o,fromAcademicYearList:"true"==i,fromSecondaryProgramCourse:"true"==a}),this.props.match.path.split("/").findIndex((function(e){return"new"==e}))>-1)?(this.setState({isEditing:!0,isNew:!0,loading:!1}),(e=[]).push(this.loadAcademicYears()),e.push(this.loadDistrict(r)),e.push(this.loadRegionalPlanningPartners(r)),e.push(this.loadSecondaryPrograms(r)),e.push(this.loadSecondaryProgramCourse(r)),Promise.all(e).then((function(){t.setState({loading:!1})}
1))):((e=[]).push(this.loadSecondaryCourse(n)),e.push(this.loadAcademicYears()),e.push(this.loadDistrict(r)),e.push(this.loadRegionalPlanningPartners(r)),e.push(this.loadSecondaryPrograms(r)),e.push(this.loadSecondaryProgramCourse(r)),Promise.all(e).then((function(){t.setState({loading:!1})})))},t.prototype.render=function(){var e,t,n,r,i,a,s,d,c,l,u,p,f,h,v,m,g=this,b=this.state.secondaryProgramCourses.find((function(e){var t;return e.courseIdentifier==(null===(t=g.state.secondaryCourse)||void 0===t?void 0:t.secondaryCourseId)&&e.academicYear==g.state.academicYear})),y=this.state.secondaryPrograms.find((function(e){return e.secondaryProgramId==(null===b||void 0===b?void 0:b.programIdentifier)&&e.academicYear==g.state.academicYear})),j=this.state.districts.find((function(e){return e.id==(null===y||void 0===y?void 0:y.districtId)})),I=this.state.loading?"...":this.state.isNew?"New Course":null!==(t=null===(e=this.state.secondaryCourse)||void 0===e?void 0:e.courseName)&&void 0!==t?t:"...";return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:I,onBack:this.goToListing,breadcrumbs:this.state.fromSecondaryProgramCourse?Xn.secondaryCourseDetailFromSecondaryPRogram(I,this.state.id,this.state.academicYear,this.state.fromAcademicYearList,this.state.fromSelfStudies,null!==(n=null===j||void 0===j?void 0:j.id)&&void 0!==n?n:re.default.Empty(),null!==(r=null===j||void 0===j?void 0:j.name)&&void 0!==r?r:"",null!==(i=null===y||void 0===y?void 0:y.id)&&void 0!==i?i:re.default.Empty(),null!==(c=(null!==(s=null===(a=null===y||void 0===y?void 0:y.secondaryCipNumber)||void 0===a?void 0:a.code)&&void 0!==s?s:"")+" - "+(null===(d=null===y||void 0===y?void 0:y.secondaryCipNumber)||void 0===d?void 0:d.description))&&void 0!==c?c:""):Xn.secondaryCourseDetailPage(I,this.state.id,this.state.academicYear,this.state.fromAcademicYearList,this.state.fromSelfStudies,null!==(l=null===j||void 0===j?void 0:j.id)&&void 0!==l?l:re.default.Empty(),null!==(u=null===j||void 0===j?void 0:j.name)&&void 0!==u?u:"",null!==(p=null===y||void 0===y?void 0:y.id)&&void 0!==p?p:re.default.Empty(),null!==(m=(null!==(h=null===(f=null===y||void 0===y?void 0:y.secondaryCipNumber)||void 0===f?void 0:f.code)&&void 0!==h?h:"")+" - "+(null===(v=null===y||void 0===y?void 0:y.secondaryCipNumber)||void 0===v?void 0:v.description))&&void 0!==m?m:""),extra:this.renderMoreActions()},void 0),this.renderDetailsCard()]},void 0)},t.prototype.renderDetailsCard=function(){var e=this.state.id==re.default.Empty()?null:Object(o.jsx)(Ze,DK({validFeatureFlags:[gn.EDIT_SECONDARY_COURSE]},{children:Object(o.jsx)(Br,{isEditing:this.state.isEditing,onClick:this.toggleEdit},void 0)}),void 0);return Object(o.jsx)(Qn.a,DK({title:"Details",extra:e},{children:Object(o.jsx)(cQ,{ref:this._secondaryCourseDetailsRef,secondaryCourseId:this.state.id,readonly:null==Xe.Get(),isEditing:this.state.isEditing,isNew:this.state.isNew,onSave:this.secondaryCourseDetailsPageSaved,academicYear:this.state.academicYear},void 0)}),void 0)},t.prototype.renderMoreActions=function(){var e=this,t=Object(o.jsx)(Gt.a,{children:Object(o.jsx)(Gt.a.Item,DK({title:"Delete Course",onClick:function(){return e.deleteConfirmation(e.state.id,e.state.academicYear)}},{children:"Delete Course"}),this.state.id)},void 0);return Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)("label",{title:"academicYear",htmlFor:"academicYear"},void 0),Object(o.jsx)(hd,DK({id:"academicYear",value:this.state.academicYear,onSelect:this.onSelect,dropdownMatchSelectWidth:!1},{children:this.state.secondaryCourses.map((function(t){return e.renderSecondaryCoursesAcademicYear(t)}))}),void 0),Object(o.jsx)(Ze,DK({validFeatureFlags:[gn.EDIT_SECONDARY_COURSE]},{children:this.state.isNew?null:Object(o.jsx)(la.a,DK({overlay:t},{children:Object(o.jsx)(rt.a,DK({size:"large",type:"link"},{children:Object(o.jsx)(aa.a,{},void 0)}),void 0)}),void 0)}),void 0)]},void 0)},t.prototype.renderSecondaryCoursesAcademicYear=function(e){return Object(o.jsx)(pr.a.Option,DK({value:e.academicYear},{children:e.academicYear}),e.secondaryCourseId)},t.prototype.renderAcademicYear=function(e){return Object(o.jsx)(pr.a.Option,DK({value:e.id},{children:e.id}
1),e.id)},t}(a.Component),FK=Object(u.i)(qK),MK=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),YK=function(){return YK=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},YK.apply(this,arguments)},UK=function(e){function t(t){var n=e.call(this,t)||this;return n.loadSecondaryCourses=function(e,t){(t||(void 0==n.state.hasCourses||0==n.state.hasCourses)&&e>0)&&tQ.academicYearHasCourses(e).then((function(e){e&&n.setState({hasCourses:e.hasCourses})}))},n.onSubmit=function(e){n.loadSecondaryCourses(n.state.academicYear),n.setState({errors:null!==e&&void 0!==e?e:[]})},n.onBack=function(){T.push(x.generate(x.DATA_REVIEW_SECONDARY_PROGRAMS,{academicYearId:n.state.academicYear},{}))},n.onContinue=function(){T.push(x.generate(x.DATA_REVIEW_SECONDARY_PROGRAM_COURSES,{academicYearId:n.state.academicYear},{}))},n.state={academicYear:0,hasCourses:void 0,errors:[]},n}return MK(t,e),t.prototype.componentDidMount=function(){var e=Number.parseInt(Hr.getPathPart(this.props.match,"academicYearId"));this.state.academicYear!=e&&(this.setState({academicYear:e}),this.loadSecondaryCourses(e))},t.prototype.render=function(){var e=this.state.academicYear;return 0!=e?Object(o.jsx)(O.Content,{children:Object(o.jsx)(Yz,YK({breadcrumbs:Xn.academicYearDataReview(e),stepNumber:9,academicYear:e},{children:Object(o.jsx)(Qn.a,YK({title:"Courses"},{children:Object(o.jsxs)(y.b,YK({direction:"vertical",size:"middle"},{children:[this.state.hasCourses?Object(o.jsx)(TQ,{errors:this.state.errors,fromAcademicYearDataReview:!0,academicYear:this.state.academicYear},void 0):Object(o.jsx)(RQ,{onSubmit:this.onSubmit,academicYear:this.state.academicYear},void 0),Object(o.jsxs)(y.b,{children:[Object(o.jsx)(lm,{onClick:this.onBack},void 0),this.state.hasCourses?Object(o.jsx)(Pz,{onClick:this.onContinue},void 0):null]},void 0)]}),void 0)}),void 0)}),void 0)},void 0):Object(o.jsx)(pt.a,{},void 0)},t}(a.Component),LK=Object(u.i)(UK),kK={className:"ContactReportDTO",create:function(e){return Object.assign(Q.create(),{rppId:0,serviceArea:"",district:"",cip:"",user:"",email:"",phone:""},e)},rppId:"rppId",serviceArea:"serviceArea",district:"district",cip:"cip",user:"user",email:"email",phone:"phone"};var GK=function(e){var t=void 0,n=Object(a.useState)(!1),r=n[0],i=n[1],s=Object(a.useState)([]),d=s[0],c=s[1],l=Object(a.useState)([]),u=l[0],p=l[1];Object(a.useEffect)((function(){var t,n;be.getRegionalPlanningPartners(null!==(t=e.academicYear)&&void 0!==t?t:0).then((function(e){var t;c(null!==(t=e.regions)&&void 0!==t?t:[])})),oM.getServiceAreas(null!==(n=e.academicYear)&&void 0!==n?n:0).then((function(e){e.serviceAreas&&p(e.serviceAreas)})),f()}),[e.academicYear]);var f=function(){null===t||void 0===t||t.refresh()},h=[];return h.push(oo.Reset()),h.push(oo.Export((function(t){var n;return lL.getContactsReportExport(t,null!==(n=e.academicYear)&&void 0!==n?n:0).then((function(e){i(!1),R.a.downloadBase64StringAsFile("Contact_Information_Report_"+$r.getDateStamp()+".xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",null!==e&&void 0!==e?e:void 0)}))}),r)),Object(o.jsx)(o.Fragment,{children:Object(o.jsx)(io,{ref:function(e){return t=e},serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:h,columns:[{title:"RPP ID",dataIndex:kK.rppId,sorter:!0,filterType:wr.DropdownMulti,dropdownFilterOptions:d.map((function(e){return{text:e.regionalPlanningPartnerIdentifier,value:e.regionalPlanningPartnerIdentifier.toString()}})),render:function(e,t){var n;return null===(n=d.find((function(e){return e.regionalPlanningPartnerIdentifier==t.rppId})))||void 0===n?void 0:n.display}},{title:"Service Area",dataIndex:kK.serviceArea,sorter:!0,filterType:wr.DropdownMulti,dropdownFilterOptions:u.map((function(e){return{text:e.serviceAreaIdentifier.toString(),value:e.serviceAreaIdentifier.toString()}})),render:function(e,t){return t.serviceArea}},{title:"District",dataIndex:kK.district,sorter:!0,render:function(e,t){return t.district},filterType:wr.Text},{title:"CIP Number",dataIndex:kK.cip,sorter:!0,render:function(e,t){return t.cip},filterType:wr.Text},{title:"User",dataIndex:kK.user,sorter:!0,render:function(e,t){return t.user},filterType:wr.Text},{title:"Email",dataIndex:kK.email,sorter:!0,render:function(e,t){return t.email},filterType:wr.Text},{title:"Phone",dataIndex:kK.phone,sorter:!0,render:function(e,t){return t.phone},filterType:wr.Text}],fetchData:{fetch:function(t){var n;return lL.getContactsReport(t,null!==(n=e.academicYear)&&void 0!==n?n:0)}},stateSaving:{enabled:!0,tableUniqueKey:"contacts_report_list"}},void 0)},void 0)},VK=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),BK=function(){return BK=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},BK.apply(this,arguments)},WK=function(e){function t(t){var n=e.call(this,t)||this;return n.loadAcademicYears=function(e){n.setState({loading:!0});var t=ML({academicYearId:e});return sL.getAcademicYears(t).then((function(e){var t;e&&e.academicYears&&n.setState({academicYears:null!==(t=e.academicYears)&&void 0!==t?t:[],academicYear:$r.getCurrentYear()})})).catch().finally((function(){n.setState({loading:!1})}
1))},n.onSelect=function(e){n.setState({academicYear:e})},n.onBack=function(){T.goBack()},n.state={loading:!1,academicYear:0,academicYears:[]},n}return VK(t,e),t.prototype.componentDidMount=function(){var e=Number.parseInt(Hr.getPathPart(this.props.match,"academicYearId"));this.state.academicYear!=e?this.setState({academicYear:e}):this.loadAcademicYears(e)},t.prototype.render=function(){var e=this;return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Contact Information Report",breadcrumbs:Xn.academicYearContactsReport(this.state.academicYear),onBack:this.onBack,extra:Object(o.jsx)(hd,BK({value:this.state.academicYear,onSelect:this.onSelect,dropdownMatchSelectWidth:!1},{children:this.state.academicYears.map((function(t){return e.renderAcademicYear(t)}))}),void 0)},void 0),Object(o.jsx)(y.b,BK({direction:"vertical",size:"large"},{children:Object(o.jsx)(Qn.a,BK({title:"Contact Information Report"},{children:Object(o.jsx)(y.b,BK({direction:"vertical",size:"large"},{children:Object(o.jsx)(GK,{academicYear:this.state.academicYear},void 0)}),void 0)}),void 0)}),void 0)]},void 0)},t.prototype.renderAcademicYear=function(e){return Object(o.jsx)(pr.a.Option,BK({value:e.id},{children:e.id}),e.id)},t}(a.Component);var zK=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected,selectedDistrict:e.District.Selected,selectedRPP:e.RegionalPlanningPartner.Selected}}))(WK)),HK={className:"CareerAcademyReportDTO",create:function(e){return Object.assign(Q.create(),{status:0,rppId:0,serviceAreaIdentifier:0,district:"",cip:"",program:"",submitter:"",reviewYear:"",careerAcademy:""},e)},status:"status",rppId:"rppId",serviceAreaIdentifier:"serviceAreaIdentifier",district:"district",cip:"cip",program:"program",submitter:"submitter",reviewYear:"reviewYear",careerAcademy:"careerAcademy"};var QK=function(e){var t=void 0,n=Object(a.useState)([]),r=n[0],i=n[1],s=Object(a.useState)(!1),d=s[0],c=s[1],l=Object(a.useState)([]),u=l[0],p=l[1],f=Object(a.useState)([]),h=f[0],v=f[1];Object(a.useEffect)((function(){var t,n;be.getRegionalPlanningPartners(null!==(t=e.academicYear)&&void 0!==t?t:0).then((function(e){var t;p(null!==(t=e.regions)&&void 0!==t?t:[])})),ae.getAll(DL.className).then((function(e){i(e),m()})),oM.getServiceAreas(null!==(n=e.academicYear)&&void 0!==n?n:0).then((function(e){e.serviceAreas&&v(e.serviceAreas)})),m()}),[e.academicYear]);var m=function(){null===t||void 0===t||t.refresh()},g=[];return g.push(oo.Reset()),g.push(oo.Export((function(t){var n;return lL.getCareerAcademyReportExport(t,null!==(n=e.academicYear)&&void 0!==n?n:0).then((function(e){c(!1),R.a.downloadBase64StringAsFile("Career_Academy_Report_"+$r.getDateStamp()+".xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",null!==e&&void 0!==e?e:void 0)}))}),d)),0==u.length&&0==r.length&&0==h.length?Object(o.jsx)(pt.a,{},void 0):Object(o.jsx)(o.Fragment,{children:Object(o.jsx)(io,{ref:function(e){return t=e},serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:g,columns:[{title:"Status",dataIndex:HK.status,sorter:!0,filterType:wr.DropdownMulti,dropdownFilterOptions:r.map((function(e){return{text:e.name,value:e.key.toString()}})),render:function(e,t){var n;return null===(n=r.find((function(e){return e.key==t.status})))||void 0===n?void 0:n.name}},{title:"RPP",dataIndex:HK.rppId,sorter:!0,filterType:wr.DropdownMulti,dropdownFilterOptions:u.map((function(e){return{text:e.regionalPlanningPartnerIdentifier,value:e.regionalPlanningPartnerIdentifier.toString()}})),render:function(e,t){var n;return null===(n=u.find((function(e){return e.regionalPlanningPartnerIdentifier==t.rppId})))||void 0===n?void 0:n.name}},{title:"Service Area",dataIndex:HK.serviceAreaIdentifier,sorter:!0,filterType:wr.DropdownMulti,dropdownFilterOptions:h.map((function(e){return{text:e.serviceAreaIdentifier.toString(),value:e.serviceAreaIdentifier.toString()}})),render:function(e,t){var n;return null===(n=h.find((function(e){return e.serviceAreaIdentifier==t.serviceAreaIdentifier})))||void 0===n?void 0:n.description}},{title:"District",dataIndex:HK.district,sorter:!0,filterType:wr.Text},{title:"CIP",dataIndex:HK.cip,sorter:!0,render:function(e,t){return t.cip},filterType:wr.Text},{title:"Program",dataIndex:HK.program,sorter:!0,filterType:wr.Text},{title:"Submitter",dataIndex:HK.submitter,sorter:!0,filterType:wr.Text},{title:"Review Year",dataIndex:HK.reviewYear,sorter:!0},{title:"Career Academy",dataIndex:HK.careerAcademy,sorter:!0,filterType:wr.BooleanRadio}],fetchData:{fetch:function(t){var n;return lL.getCareerAcademyReport(t,null!==(n=e.academicYear)&&void 0!==n?n:0)}},stateSaving:{enabled:!0,tableUniqueKey:"career_academy_report_list"}},void 0)},void 0)},KK=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),XK=function(){return XK=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},XK.apply(this,arguments)},JK=function(e){function t(t){var n=e.call(this,t)||this;return n.loadAcademicYears=function(e){n.setState({loading:!0});var t=ML({academicYearId:e});return sL.getAcademicYears(t).then((function(e){var t;e&&e.academicYears&&n.setState({academicYears:null!==(t=e.academicYears)&&void 0!==t?t:[],academicYear:$r.getCurrentYear()})})).catch().finally((function(){n.setState({loading:!1})}
1))},n.onSelect=function(e){n.setState({academicYear:e})},n.onBack=function(){T.goBack()},n.state={loading:!1,academicYear:0,academicYears:[]},n}return KK(t,e),t.prototype.componentDidMount=function(){var e=Number.parseInt(Hr.getPathPart(this.props.match,"academicYearId"));this.state.academicYear!=e?this.setState({academicYear:e}):this.loadAcademicYears(e)},t.prototype.render=function(){var e=this,t=Number.parseInt(Hr.getPathPart(this.props.match,"academicYearId"));return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Career Academy Report",breadcrumbs:Xn.academicYearCareerAcademyReport(this.state.academicYear),onBack:this.onBack,extra:Object(o.jsx)(hd,XK({value:t,onSelect:this.onSelect,dropdownMatchSelectWidth:!1},{children:this.state.academicYears.map((function(t){return e.renderAcademicYear(t)}))}),void 0)},void 0),Object(o.jsx)(y.b,XK({direction:"vertical",size:"large"},{children:Object(o.jsx)(Qn.a,XK({title:"Career Academy Report"},{children:Object(o.jsx)(y.b,XK({direction:"vertical",size:"large"},{children:Object(o.jsx)(QK,{academicYear:t},void 0)}),void 0)}),void 0)}),void 0)]},void 0)},t.prototype.renderAcademicYear=function(e){return Object(o.jsx)(pr.a.Option,XK({value:e.id},{children:e.id}),e.id)},t}(a.Component);var $K=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected,selectedDistrict:e.District.Selected,selectedRPP:e.RegionalPlanningPartner.Selected}}))(JK)),ZK=n(720),eX=n.n(ZK),tX=function(e){return Object.assign({academicYearId:0},e)},nX={className:"ActionPlanReportDTO",create:function(e){return Object.assign(Q.create(),{status:0,rppId:0,district:"",serviceArea:0,
1cip:"",program:"",newGoals:[],previousGoals:[]},e)},status:"status",rppId:"rppId",district:"district",serviceArea:"serviceArea",cip:"cip",program:"program",newGoals:"newGoals",previousGoals:"previousGoals"};var rX=function(e){var t=void 0,n=Object(a.useState)([]),r=n[0],i=n[1],s=Object(a.useState)([]),d=s[0],c=s[1],l=Object(a.useState)([]),u=l[0],p=l[1],f=Object(a.useState)([]),h=f[0],v=f[1],m=Object(a.useState)(!1)[1];Object(a.useEffect)((function(){var t,n;be.getRegionalPlanningPartners(null!==(t=e.academicYear)&&void 0!==t?t:0).then((function(e){var t;c(null!==(t=e.regions)&&void 0!==t?t:[]),b()})),ae.getAll(DL.className).then((function(e){i(e),b()})),oM.getServiceAreas(null!==(n=e.academicYear)&&void 0!==n?n:0).then((function(e){e.serviceAreas&&(p(e.serviceAreas),b())})),g()}),[e.academicYear]);var g=function(){var t=tX({academicYearId:e.academicYear});lL.getActionPlanRows(t).then((function(e){var t;e&&v(null!==(t=e.dataRows)&&void 0!==t?t:[])})).catch((function(){m(!0)}))},b=function(){null===t||void 0===t||t.refresh()},y=[];return y.push(oo.Reset()),y.push(oo.Default("Export",(function(){window.open(x.generateFull(x.SELF_STUDY_ACTION_PLAN_REPORT,{},{academicYear:e.academicYear}),"_blank")}))),0==d.length&&0==r.length&&0==u.length?Object(o.jsx)(eX.a,{},void 0):Object(o.jsx)(io,{ref:function(e){return t=e},serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:y,columns:function(){var e=[{title:"Status",dataIndex:nX.status,sorter:!0,filterType:wr.DropdownMulti,dropdownFilterOptions:r.map((function(e){return{text:e.name,value:e.key.toString()}})),render:function(e,t){var n;return null===(n=r.find((function(e){return e.key==t.status})))||void 0===n?void 0:n.name}},{title:"RPP",dataIndex:nX.rppId,sorter:!0,filterType:wr.DropdownMulti,dropdownFilterOptions:d.map((function(e){return{text:e.regionalPlanningPartnerIdentifier,value:e.regionalPlanningPartnerIdentifier.toString()}})),render:function(e,t){var n;return null===(n=d.find((function(e){return e.regionalPlanningPartnerIdentifier==t.rppId})))||void 0===n?void 0:n.name}},{title:"Service Area",dataIndex:nX.serviceArea,sorter:!0,filterType:wr.DropdownMulti,dropdownFilterOptions:u.map((function(e){return{text:e.serviceAreaIdentifier.toString(),value:e.serviceAreaIdentifier.toString()}})),render:function(e,t){var n;return null===(n=u.find((function(e){return e.serviceAreaIdentifier==t.serviceArea})))||void 0===n?void 0:n.description}},{title:"District",dataIndex:nX.district,sorter:!0,filterType:wr.Text},{title:"CIP Number",dataIndex:nX.cip,sorter:!0,filterType:wr.Text,width:200},{title:"Program",dataIndex:nX.program,sorter:!0,filterType:wr.Text}],t=Math.max.apply(Math,h.flatMap((function(e){var t,n;return null!==(n=null===(t=e.previousGoals)||void 0===t?void 0:t.length)&&void 0!==n?n:0})));if(void 0!=t||t!=1/0&&t>0)for(var n=function(t){var n=t+1;e.pushAll([{title:"Previous Goal "+n,dataIndex:"previous_"+NG.section+t,render:function(e,n){if(null!=n.previousGoals&&null!=n.previousGoals[t])return n.previousGoals[t].section},sorter:!1,filterType:wr.NONE},{title:"Previous Goal "+n+": Action Plan",dataIndex:"previous_"+NG.actionStepsAndTimeline+t,render:function(e,n){if(null!=n.previousGoals&&null!=n.previousGoals[t])return n.previousGoals[t].actionStepsAndTimeline},sorter:!1,filterType:wr.NONE},{title:"Previous Goal "+n+": Measure of Success",dataIndex:"previous_"+NG.measureOfSuccess+t,render:function(e,n){if(null!=n.previousGoals&&null!=n.previousGoals[t])return n.previousGoals[t].measureOfSuccess},sorter:!1,filterType:wr.NONE},{title:"Previous Goal "+n+": Results",dataIndex:"previous_"+NG.results+t,render:function(e,n){if(null!=n.previousGoals&&null!=n.previousGoals[t])return n.previousGoals[t].results},sorter:!1,filterType:wr.NONE}])},i=0;i<t;i++)n(i);var o=Math.max.apply(Math,h.flatMap((function(e){var t,n;return null!==(n=null===(t=e.newGoals)||void 0===t?void 0:t.length)&&void 0!==n?n:0})));if(void 0!=o||o!=1/0&&o>0){var a=function(t){var n=t+1;e.pushAll([{title:"New Goal "+n,dataIndex:nX.newGoals,render:function(e,n){if(null!=n.newGoals&&null!=n.newGoals[t])return n.newGoals[t].section},sorter:!1,filterType:wr.NONE},{title:"New Goal "+n+": Action Plan",dataIndex:nX.newGoals,render:function(e,n){if(null!=n.newGoals&&null!=n.newGoals[t])return n.newGoals[t].actionPlan},sorter:!1,filterType:wr.NONE},{title:"New Goal "+n+": Measure of Success",dataIndex:nX.newGoals,render:function(e,n){if(null!=n.newGoals&&null!=n.newGoals[t])return n.newGoals[t].measureOfSuccess},sorter:!1,filterType:wr.NONE}])};for(i=0;i<o;i++)a(i)}return e}(),fetchData:{fetch:function(t){var n;return lL.getActionPlanReport(t,null!==(n=e.academicYear)&&void 0!==n?n:0)}},stateSaving:{enabled:!0,tableUniqueKey:"action_plan_report_list"}},void 0)},iX=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),oX=function(){return oX=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},oX.apply(this,arguments)},aX=function(e){function t(t){var n=e.call(this,t)||this;return n.loadAcademicYears=function(e){n.setState({loading:!0});var t=ML({academicYearId:e});return sL.getAcademicYears(t).then((function(e){var t;e&&e.academicYears&&n.setState({academicYears:null!==(t=e.academicYears)&&void 0!==t?t:[],academicYear:$r.getCurrentYear()})})).catch().finally((function(){n.setState({loading:!1})}
1))},n.onSelect=function(e){n.setState({academicYear:e})},n.onBack=function(){T.goBack()},n.state={loading:!1,academicYear:0,academicYears:[]},n}return iX(t,e),t.prototype.componentDidMount=function(){var e=Number.parseInt(Hr.getPathPart(this.props.match,"academicYearId"));this.state.academicYear!=e?this.setState({academicYear:e}):this.loadAcademicYears(e)},t.prototype.render=function(){var e=this;return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Action Plan Report",breadcrumbs:Xn.academicYearActionPlanReport(this.state.academicYear),onBack:this.onBack,extra:Object(o.jsx)(hd,oX({value:this.state.academicYear,onSelect:this.onSelect,dropdownMatchSelectWidth:!1},{children:this.state.academicYears.map((function(t){return e.renderAcademicYear(t)}))}),void 0)},void 0),Object(o.jsx)(y.b,oX({direction:"vertical",size:"large"},{children:Object(o.jsx)(Qn.a,oX({title:"Action Plan Report"},{children:Object(o.jsx)(y.b,oX({direction:"vertical",size:"large"},{children:Object(o.jsx)(rX,{academicYear:this.state.academicYear},void 0)}),void 0)}),void 0)}),void 0)]},void 0)},t.prototype.renderAcademicYear=function(e){return Object(o.jsx)(pr.a.Option,oX({value:e.id},{children:e.id}),e.id)},t}(a.Component);var sX=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected,selectedDistrict:e.District.Selected,selectedRPP:e.RegionalPlanningPartner.Selected}}))(aX)),dX={className:"ScenarioReportDataTableDTO",create:function(e){return Object.assign(Q.create(),{rpp:"",district:"",cipNumber:"",program:"",scenario:"",localCourseNumber:"",courseName:"",scedId:"",scedGorC:"",scedUnits:"",communityCollege:"",ccn:""},e)},rpp:"rpp",district:"district",cipNumber:"cipNumber",program:"program",scenario:"scenario",localCourseNumber:"localCourseNumber",courseName:"courseName",scedId:"scedId",scedGorC:"scedGorC",scedUnits:"scedUnits",communityCollege:"communityCollege",ccn:"ccn"};var cX=function(e){var t=void 0,n=Object(a.useState)(!1),r=n[0],i=n[1],s=Object(a.useState)([]),d=s[0],c=s[1];a.useEffect((function(){Ii.Institutions().then((function(e){return c(e)})),l()}),[e.academicYear]);var l=function(){null===t||void 0===t||t.refresh()},u=[];return u.push(oo.Reset()),u.push(oo.Export((function(t){var n;return lL.getScenarioReportExport(t,null!==(n=e.academicYear)&&void 0!==n?n:0).then((function(e){i(!1),R.a.downloadBase64StringAsFile("Scenario_Report_"+$r.getDateStamp()+".xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",null!==e&&void 0!==e?e:void 0)}))}),r)),Object(o.jsx)(o.Fragment,{children:Object(o.jsx)(io,{ref:function(e){return t=e},serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:u,columns:[{title:"Regional Planning Partner",dataIndex:dX.rpp,filterType:wr.Text,sorter:!0,render:function(e,t){return t.rpp}},{title:"District",dataIndex:dX.district,filterType:wr.Text,sorter:!0,render:function(e,t){return t.district}},{title:"CIP Number",dataIndex:dX.cipNumber,filterType:wr.Text,sorter:!0,render:function(e,t){return t.cipNumber}},{title:"Program",dataIndex:dX.program,filterType:wr.Text,sorter:!0,render:function(e,t){return t.program}},{title:"Scenario",dataIndex:dX.scenario,render:function(e,t){return t.scenario}},{title:"Local Course Number",dataIndex:dX.localCourseNumber,sorter:!0,render:function(e,t){return t.localCourseNumber},filterType:wr.Text},{title:"Course Name",dataIndex:dX.courseName,sorter:!0,render:function(e,t){return t.courseName},filterType:wr.Text},{title:"SCED Id",dataIndex:dX.scedId,sorter:!0,render:function(e,t){return t.scedId},filterType:wr.Text},{title:"SCED G or C",dataIndex:dX.scedGorC,render:function(e,t){return t.scedGorC}},{title:"SCED Units",dataIndex:dX.scedUnits,sorter:!0,render:function(e,t){return t.scedUnits},filterType:wr.Text},{title:"Community Collage",dataIndex:dX.communityCollege,sorter:!0,render:function(e,t){return t.communityCollege},filterType:wr.DropdownMulti,dropdownFilterOptions:d},{title:"CCN",dataIndex:dX.ccn,render:function(e,t){return t.ccn}}],fetchData:{fetch:function(t){var n;return lL.getScenarioReport(t,null!==(n=e.academicYear)&&void 0!==n?n:0)}},stateSaving:{enabled:!0,tableUniqueKey:"scenario_report_list"}},void 0)},void 0)},lX=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),uX=function(){return uX=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},uX.apply(this,arguments)},pX=function(e){function t(t){var n=e.call(this,t)||this;return n.loadAcademicYears=function(e){n.setState({loading:!0});var t=ML({academicYearId:e});return sL.getAcademicYears(t).then((function(e){var t;e&&e.academicYears&&n.setState({academicYears:null!==(t=e.academicYears)&&void 0!==t?t:[],academicYear:$r.getCurrentYear()})})).catch().finally((function(){n.setState({loading:!1})}
1))},n.onSelect=function(e){n.setState({academicYear:e})},n.onBack=function(){T.goBack()},n.state={loading:!1,academicYear:0,academicYears:[]},n}return lX(t,e),t.prototype.componentDidMount=function(){var e=Number.parseInt(Hr.getPathPart(this.props.match,"academicYearId"));this.state.academicYear!=e?this.setState({academicYear:e}):this.loadAcademicYears(e)},t.prototype.render=function(){var e=this;return this.state.academicYear?Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Scenario Report",breadcrumbs:Xn.academicYearScenarioReport(this.state.academicYear),onBack:this.onBack,extra:Object(o.jsx)(hd,uX({value:this.state.academicYear,onSelect:this.onSelect,dropdownMatchSelectWidth:!1},{children:this.state.academicYears.map((function(t){return e.renderAcademicYear(t)}))}),void 0)},void 0),Object(o.jsx)(y.b,uX({direction:"vertical",size:"large"},{children:Object(o.jsx)(Qn.a,uX({title:"Scenario Report"},{children:Object(o.jsx)(y.b,uX({direction:"vertical",size:"large"},{children:Object(o.jsx)(cX,{academicYear:this.state.academicYear},void 0)}),void 0)}),void 0)}),void 0)]},void 0):Object(o.jsx)(pt.a,{active:!0},void 0)},t.prototype.renderAcademicYear=function(e){return Object(o.jsx)(pr.a.Option,uX({value:e.id},{children:e.id}),e.id)},t}(a.Component);var fX=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected,selectedDistrict:e.District.Selected,selectedRPP:e.RegionalPlanningPartner.Selected}}))(pX)),hX={className:"ProgramMasterReportDataTableProviderDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",identifier:0,title:"",academicYear:0,districtName:"",districtIdentifier:0,regionalPlanningPartner:0,aea:"",cipNumberId:"00000000-0000-0000-0000-000000000000",secondaryProgramThirdPartyCredential:[],secondaryCipNumber:"",communityCollege:""},e)},id:"id",identifier:"identifier",title:"title",academicYear:"academicYear",districtName:"districtName",districtIdentifier:"districtIdentifier",regionalPlanningPartner:"regionalPlanningPartner",aea:"aea",cipNumberId:"cipNumberId",secondaryProgramThirdPartyCredential:"secondaryProgramThirdPartyCredential",secondaryCipNumber:"secondaryCipNumber",communityCollege:"communityCollege"};var vX=function(e){var t=Object(a.useState)(e.errors)[0],n=Object(a.useState)([]),r=n[0],i=n[1],s=Object(a.useState)([]),d=s[0],c=s[1],l=Object(a.useState)([]),u=l[0],p=l[1],f=Object(a.useState)(0),h=f[0],v=f[1];Object(a.useEffect)((function(){isNaN(e.academicYear)||(be.getRegionalPlanningPartners(e.academicYear).then((function(e){var t;i(null!==(t=e.regions)&&void 0!==t?t:[])})),Zc.getMaxSecondaryThirdPartyCredentials(e.academicYear).then((function(e){v(e.maxThirdParty)})),pz.getAreaEducationAgencies(e.academicYear).then((function(e){var t;c(null!==(t=e.areaEducationAgency)&&void 0!==t?t:[])})),Ii.Institutions().then((function(e){return p(e)})))}),[e.academicYear]);var m=[];m.push(oo.Reset()),m.push(oo.Default("Export",(function(){window.open(x.generateFull(x.SELF_STUDY_PROGRAM_MASTER_REPORT,{},{academicYear:e.academicYear}),"_blank")})));var g=function(){if(t&&t.length>0)return Object(o.jsx)(o.Fragment,{children:t.map((function(e){return Object(o.jsx)("p",{children:e},e)}))},void 0)};return Object(o.jsxs)(o.Fragment,{children:[function(){if(t&&t.length>0)return Object(o.jsx)(ct.a,{showIcon:!0,type:"error",description:g(),message:"Error Importing"},void 0)}(),Object(o.jsx)(io,{serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:m,columns:function(){var e=[];if(e.pushAll([{title:"Identifier",dataIndex:hX.identifier,sorter:!0,width:50,filterType:wr.Text},{title:"Secondary CTE CIP ID",dataIndex:hX.secondaryCipNumber,sorter:!0,render:function(e,t){return t.secondaryCipNumber},filterType:wr.Text},{title:"CTE Program Name",dataIndex:hX.title,sorter:!0,render:function(e,t){return t.title},filterType:wr.Text},{title:"District Id",dataIndex:hX.districtIdentifier,sorter:!0,render:function(e,t){return t.districtIdentifier},filterType:wr.Text},{title:"District Name",dataIndex:hX.districtName,sorter:!0,render:function(e,t){return t.districtName},filterType:wr.Text},{title:"AEA",dataIndex:hX.aea,sorter:!0,filterType:wr.DropdownMulti,dropdownFilterOptions:d.map((function(e){return{text:e.areaEducationAgencyIdentifier+" - "+e.name,value:e.areaEducationAgencyIdentifier.toString()}})),render:function(e,t){return t.aea}},{title:"Community College",dataIndex:hX.communityCollege,sorter:!0,width:250,filterType:wr.DropdownMulti,dropdownFilterOptions:u,render:function(e,t){return t.communityCollege}},{title:"Regional Planning Partner",dataIndex:hX.regionalPlanningPartner,sorter:!0,width:250,filterType:wr.DropdownMulti,dropdownFilterOptions:r.map((function(e){return{text:e.regionalPlanningPartnerIdentifier+" - "+e.name,value:e.regionalPlanningPartnerIdentifier.toString()}})),render:function(e,t){return t.regionalPlanningPartner}}]),void 0!=h||h!=1/0&&h>0)for(var t=function(t){var n=t+1;e.pushAll([{title:"Third Party Credential "+n,dataIndex:hX.secondaryProgramThirdPartyCredential,render:function(e,n){var r;if(null!=n.secondaryProgramThirdPartyCredential&&null!=n.secondaryProgramThirdPartyCredential[t]){var i=n.secondaryProgramThirdPartyCredential[t];return i.title+" - "+(null===(r=i.thirdPartyCredentialType)||void 0===r?void 0:r.name)+" - "+(i.requirement==el.REQUIRED?"Required":"Optional")+" - "+i.organization}},sorter:!1,filterType:wr.NONE}])},n=0;n<h;n++)t(n);return e}(),fetchData:{fetch:function(t){return mL.getProgramMasterReportTableData(t,e.academicYear)}
1},stateSaving:{enabled:!0,tableUniqueKey:"secondary_program_list"}},void 0)]},void 0)},mX=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),gX=function(){return gX=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},gX.apply(this,arguments)},bX=function(e){function t(t){var n=e.call(this,t)||this;return n.loadAcademicYears=function(e){n.setState({loading:!0});var t=ML({academicYearId:e});return sL.getAcademicYears(t).then((function(e){var t;e&&e.academicYears&&n.setState({academicYears:null!==(t=e.academicYears)&&void 0!==t?t:[],academicYear:$r.getCurrentYear()})})).catch().finally((function(){n.setState({loading:!1})}))},n.onBack=function(){T.goBack()},n.state={loading:!1,academicYear:0,academicYears:[]},n}return mX(t,e),t.prototype.componentDidMount=function(){var e=Number.parseInt(Hr.getPathPart(this.props.match,"academicYearId"));this.state.academicYear!=e?this.setState({academicYear:e}):this.loadAcademicYears(e)},t.prototype.render=function(){return this.state.academicYear?Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Program Master Report",breadcrumbs:Xn.academicYearProgramMasterReport(this.state.academicYear),onBack:this.onBack},void 0),Object(o.jsx)(y.b,gX({direction:"vertical",size:"large"},{children:Object(o.jsx)(Qn.a,gX({title:"Program Master Report"},{children:Object(o.jsx)(y.b,gX({direction:"vertical",size:"large"},{children:Object(o.jsx)(vX,{academicYear:this.state.academicYear},void 0)}),void 0)}),void 0)}),void 0)]},void 0):Object(o.jsx)(pt.a,{active:!0},void 0)},t}(a.Component);var yX=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected,selectedDistrict:e.District.Selected,selectedRPP:e.RegionalPlanningPartner.Selected}}))(bX)),OX={className:"SelfStudyAggregateReportDataTableDTO",create:function(e){return Object.assign(Q.create(),{selfStudyResponseId:"00000000-0000-0000-0000-000000000000",rpp:"",communityCollege:"",district:"",serviceArea:"",cipNumber:"",program:"",submitter:"",reviewer:"",reviewYear:0,reviewType:"",careerAcademy:""},e)},selfStudyResponseId:"selfStudyResponseId",rpp:"rpp",communityCollege:"communityCollege",district:"district",serviceArea:"serviceArea",cipNumber:"cipNumber",program:"program",submitter:"submitter",reviewer:"reviewer",reviewYear:"reviewYear",reviewType:"reviewType",careerAcademy:"careerAcademy"};var jX=function(e){var t=void 0,n=Object(a.useState)([])[1],r=Object(a.useState)([]),i=r[0],s=r[1],d=Object(a.useState)({}),c=d[0],l=d[1],u=Object(a.useState)([]),p=u[0],f=u[1],h=Object(a.useState)([]),v=h[0],m=h[1],g=Object(a.useState)(!1)[1],b=Object(a.useState)(!1),y=b[0],O=b[1];a.useEffect((function(){var e=[];Ii.SelfStudyResponseTypes().then((function(e){n(e)})),Ii.Institutions().then((function(e){return f(e)})),j(),e.push(P()),e.push(w()),e.push(N()),Promise.all(e).then((function(){O(!1),j()}))}),[]);var j=function(){null===t||void 0===t||t.refresh()},I=function(e,t,n){var r,o,a,s=i.find((function(t){return t.id==e})),d=null===(r=null===s||void 0===s?void 0:s.selfStudyResponseProgramOverview)||void 0===r?void 0:r.secondaryProgramScenarioId,c=null===(o=null===s||void 0===s?void 0:s.selfStudySectionResponses)||void 0===o?void 0:o.find((function(e){var n;return e.selfStudySectionTemplateId==t.id&&(null===(n=t.selfStudySectionTemplateSecondaryProgramScenarios)||void 0===n?void 0:n.findIndex((function(e){return e==d})))>-1})),l=null===(a=null===c||void 0===c?void 0:c.selfStudySectionComponentResponses)||void 0===a?void 0:a.find((function(e){var t;return e.selfStudySectionComponentTemplateId==n.id&&(null===(t=n.selfStudySectionComponentScenarios)||void 0===t?void 0:t.findIndex((function(e){return e==d})))>-1}));return l},S=function(e,t,n){var r;e.push({title:null!==(r=n.rankingQuestionIdentifier)&&void 0!==r?r:t.order+1+"."+(n.order+1),render:function(e,r){var i,o,a=I(null!==(i=r.selfStudyResponseId)&&void 0!==i?i:re.default.Empty(),t,n);return null!==(o=null===a||void 0===a?void 0:a.rating)&&void 0!==o?o:0}})},E=function(e,t,n){var r;e.push({title:null!==(r=n.rankingQuestionIdentifier)&&void 0!==r?r:t.order+1+"."+(n.order+1),render:function(e,r){var i,o,a=I(null!==(i=r.selfStudyResponseId)&&void 0!==i?i:re.default.Empty(),t,n);return null!==(o=null===a||void 0===a?void 0:a.responseText)&&void 0!==o?o:""}})},R=function(e,t,n){var r;e.push({title:null!==(r=n.rankingQuestionIdentifier)&&void 0!==r?r:t.order+1+"."+(n.order+1),render:function(){return""}})},_=function(e,t,n){var r;e.push({title:null!==(r=n.rankingQuestionIdentifier)&&void 0!==r?r:t.order+1+"."+(n.order+1),children:[{title:"Scenario",render:function(e,t){var n,r,o;return null===(o=null===(r=null===(n=i.find((function(e){return e.id==t.selfStudyResponseId})))||void 0===n?void 0:n.selfStudyResponseProgramOverview)||void 0===r?void 0:r.secondaryProgramScenario)||void 0===o?void 0:o.title}}]})},T=function(t,n,r){var o;t.push({title:"Status",render:function(t,n){var r,o,a,s,d,c,l,u,p,f,h=null===(d=null===(s=null===(a=null===(o=null===(r=v.find((function(e){var t;return e.id==(null===(t=i.find((function(e){return e.id==n.selfStudyResponseId})))||void 0===t?void 0:t.selfStudyId)})))||void 0===r?void 0:r.secondaryProgram)||void 0===o?void 0:o.secondaryProgramReviewHistories)||void 0===a?void 0:a.find((function(t){return t.reviewYear==e.academicYear})))||void 0===s?void 0:s.secondaryProgramStatusType)||void 0===d?void 0:d.name;return h||(h=null===(f=null===(p=null===(u=null===(l=null===(c=v.find((function(e){var t;return e.id==(null===(t=i.find((function(e){return e.id==n.selfStudyResponseId})))||void 0===t?void 0:t.selfStudyId)})))||void 0===c?void 0:c.secondaryProgram)||void 0===l?void 0:l.secondaryProgramReviewHistories)||void 0===u?void 0:u.find((function(t){return t.nextReviewYear==e.academicYear})))||void 0===p?void 0:p.secondaryProgramStatusType)||void 0===f?void 0:f.name),null!==h&&void 0!==h?h:"Unknown"}}),null===(o=r.selfStudyResponseTemplateConsultantReviewQuestions)||void 0===o||o.forEach((function(e){return t.push({title:e.question,children:[{title:"Answer",render:function(t,i){var o,a,s,d=I(null!==(o=i.selfStudyResponseId)&&void 0!==o?o:re.default.Empty(),n,r);return 1==(null===(s=(null!==(a=null===d||void 0===d?void 0:d.selfStudyResponseConsultantReviewQuestionDTOs)&&void 0!==a?a:[])[e.order])||void 0===s?void 0:s.consultantAnswer)?"Yes":"No"}},{title:"Comment",render:function(t,i){var o,a,s,d=I(null!==(o=i.selfStudyResponseId)&&void 0!==o?o:re.default.Empty(),n,r);return null===(s=(null!==(a=null===d||void 0===d?void 0:d.selfStudyResponseConsultantReviewQuestionDTOs)&&void 0!==a?a:[])[e.order])||void 0===s?void 0:s.comment}}]})}))},C=function(e,t,n){for(var r,o=function(t){e.push({title:"Goal "+(t+1),children:[{title:"Section",render:function(e,n){var r,o,a;return null===(a=(null!==(o=null===(r=i.find((function(e){return e.id==n.selfStudyResponseId})))||void 0===r?void 0:r.selfStudyResponsePreviousGoals)&&void 0!==o?o:[])[t])||void 0===a?void 0:a.section}},{title:"Action Steps and Timeline",render:function(e,n){var r,o,a;return null===(a=(null!==(o=null===(r=i.find((function(e){return e.id==n.selfStudyResponseId})))||void 0===r?void 0:r.selfStudyResponsePreviousGoals)&&void 0!==o?o:[])[t])||void 0===a?void 0:a.actionStepsAndTimeline}},{title:"Measure of Success",render:function(e,n){var r,o,a;return null===(a=(null!==(o=null===(r=i.find((function(e){return e.id==n.selfStudyResponseId})))||void 0===r?void 0:r.selfStudyResponsePreviousGoals)&&void 0!==o?o:[])[t])||void 0===a?void 0:a.measureOfSuccess}},{title:"Result",render:function(e,n){var r,o,a;return null===(a=(null!==(o=null===(r=i.find((function(e){return e.id==n.selfStudyResponseId})))||void 0===r?void 0:r.selfStudyResponsePreviousGoals)&&void 0!==o?o:[])[t])||void 0===a?void 0:a.results}}]})},a=0;a<(null!==(r=null===n||void 0===n?void 0:n.numberOfPreviousGoals)&&void 0!==r?r:0);a++)o(a)},A=function(e,t,n){for(var r,o=function(t){e.push({title:"Goal "+(t+1),children:[{title:"Section",render:function(e,n){var r,o,a;return null===(a=(null!==(o=null===(r=i.find((function(e){return e.id==n.selfStudyResponseId})))||void 0===r?void 0:r.selfStudyResponseNewGoals)&&void 0!==o?o:[])[t])||void 0===a?void 0:a.section}},{title:"Action Steps and Timeline",render:function(e,n){var r,o,a;return null===(a=(null!==(o=null===(r=i.find((function(e){return e.id==n.selfStudyResponseId})))||void 0===r?void 0:r.selfStudyResponseNewGoals)&&void 0!==o?o:[])[t])||void 0===a?void 0:a.actionStepsAndTimeline}},{title:"Measure of Success",render:function(e,n){var r,o,a;return null===(a=(null!==(o=null===(r=i.find((function(e){return e.id==n.selfStudyResponseId})))||void 0===r?void 0:r.selfStudyResponseNewGoals)&&void 0!==o?o:[])[t])||void 0===a?void 0:a.measureOfSuccess}}]})},a=0;a<(null!==(r=null===n||void 0===n?void 0:n.numberOfNewGoals)&&void 0!==r?r:0);a++)o(a)},P=function(){var t;return Pk.getSelfStudy(null!==(t=e.academicYear)&&void 0!==t?t:0).then((function(e){var t;e&&l(null!==(t=e.selfStudy)&&void 0!==t?t:Vk.create())})).catch((function(){g(!0)}))},N=function(){var t=jL({academicYear:e.academicYear});return lL.getSelfStudies(t).then((function(e){var t;e&&m(null!==(t=e.selfStudies)&&void 0!==t?t:[])})).catch((function(){g(!0)}))},w=function(){var t=qW({academicYear:e.academicYear});return lL.getSelfStudyResponses(t).then((function(e){e.selfStudyResponses&&s(e.selfStudyResponses)}))},D=[];return D.push(oo.Reset()),D.push(oo.Default("Export",(function(){window.open(x.generateFull(x.SELF_STUDY_AGGREGATE_REPORT,{},{academicYear:e.academicYear}),"_blank")}))),y?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsx)(o.Fragment,{children:Object(o.jsx)(io,{ref:function(e){return t=e},serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:D,columns:function(){var e,t=[{title:"Regional Planning Partner",dataIndex:OX.rpp,sorter:!0,width:50,render:function(e,t){return t.rpp},filterType:wr.Text},{title:"Community College",dataIndex:OX.communityCollege,sorter:!0,width:50,render:function(e,t){return t.communityCollege},filterType:wr.DropdownMulti,dropdownFilterOptions:p},{title:"District",dataIndex:OX.district,sorter:!0,width:50,render:function(e,t){return t.district},filterType:wr.Text},{title:"Service Area",dataIndex:OX.serviceArea,sorter:!0,width:50,render:function(e,t){return t.serviceArea},filterType:wr.Text},{title:"CIP Number",dataIndex:OX.cipNumber,sorter:!0,width:50,render:function(e,t){return t.cipNumber},filterType:wr.Text},{title:"Program",dataIndex:OX.program,sorter:!0,width:50,render:function(e,t){return t.program},filterType:wr.Text},{title:"Submitter",dataIndex:OX.submitter,sorter:!0,width:50,render:function(e,t){return t.submitter},filterType:wr.Text},{title:"Review Year",dataIndex:OX.reviewYear,sorter:!0,width:50,render:function(e,t){return t.reviewYear+" "+t.reviewT
1ype},filterType:wr.Text},{title:"Career Academy",dataIndex:OX.careerAcademy,sorter:!0,width:50,filterType:wr.DropdownMulti,dropdownFilterOptions:Ii.GetTrueOrFalse()}];return null===(e=c.selfStudySectionTemplates)||void 0===e||e.forEach((function(e){var n,r=[];null===(n=e.selfStudySectionComponentTemplates)||void 0===n||n.forEach((function(t){switch(t.selfStudySectionComponentTypeId){case Nk.INSTRUCTIONS:return R(r,e,t);case Nk.RANKINGQUESTION:return S(r,e,t);case Nk.PREVIOUSGOALS:return C(r,e,t);case Nk.NEWGOALS:return A(r,e,t);case Nk.FREETEXTQUESTION:return E(r,e,t);case Nk.PROGRAMOVERVIEW:return _(r,e,t);case Nk.CONSULTANTREVIEW:return T(r,e,t)}})),t.push({title:e.title,dataIndex:SL.id,width:50,children:r})})),t}(),fetchData:{fetch:function(t){var n;return lL.getSelfStudyAggregateReportTableData(t,0==e.academicYear?0:null!==(n=e.academicYear)&&void 0!==n?n:0)}},stateSaving:{enabled:!0,tableUniqueKey:"self_study_list"}},void 0)},void 0)},IX=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),SX=function(){return SX=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},SX.apply(this,arguments)},EX=function(e){function t(t){var n=e.call(this,t)||this;return n.loadAcademicYears=function(e){n.setState({loading:!0});var t=ML({academicYearId:e});return sL.getAcademicYears(t).then((function(e){var t;e&&e.academicYears&&n.setState({academicYears:null!==(t=e.academicYears)&&void 0!==t?t:[],academicYear:$r.getCurrentYear()})})).catch().finally((function(){n.setState({loading:!1})}))},n.loadSelfStudies=function(e){var t=jL({academicYearId:null!==e&&void 0!==e?e:0});lL.getSelfStudies(t).then((function(e){var t;e&&n.setState({selfStudy:null!==(t=e.selfStudies)&&void 0!==t?t:[]})})).finally((function(){n.setState({loading:!1})}))},n.onSelect=function(e){n.setState({academicYear:e}),n.loadSelfStudies(e)},n.onBack=function(){T.goBack()},n.state={loading:!1,academicYear:0,academicYears:[],fromSelfStudies:!1,fromAcademicYearList:!1,selfStudy:[]},n}return IX(t,e),t.prototype.componentDidMount=function(){var e=Number.parseInt(Hr.getPathPart(this.props.match,"academicYearId"));this.setState({fromAcademicYearList:this.props.match.path.split("/").findIndex((function(e){return"academicYearList"==e}))>-1,fromSelfStudies:this.props.match.path.split("/").findIndex((function(e){return"selfStudy"==e}))>-1}),this.state.academicYear!=e?(this.setState({academicYear:e,fromSelfStudies:!0}),this.loadSelfStudies(e)):this.loadAcademicYears(e)},t.prototype.render=function(){var e=this,t=0==this.state.academicYear?0:this.state.academicYear,n=Number.parseInt(Hr.getPathPart(this.props.match,"academicYearId"));return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Aggregate Report",breadcrumbs:Xn.aggregateReport(t),onBack:this.onBack,extra:this.state.fromSelfStudies?null:Object(o.jsx)(hd,SX({value:this.state.academicYear,onSelect:this.onSelect,dropdownMatchSelectWidth:!1},{children:this.state.academicYears.map((function(t){return e.renderAcademicYear(t)}))}),void 0)},void 0),Object(o.jsx)(y.b,SX({direction:"vertical",size:"large"},{children:Object(o.jsx)(Qn.a,SX({title:"Aggregate Report"},{children:Object(o.jsx)(y.b,SX({direction:"vertical",size:"large"},{children:Object(o.jsx)(jX,{academicYear:n,selectedDistrict:this.props.selectedDistrict,selectedRPP:this.props.selectedRPP,fromSelfStudies:this.state.fromSelfStudies,fromAcademicYearList:this.state.fromAcademicYearList},void 0)}),void 0)}),void 0)}),void 0)]},void 0)},t.prototype.renderAcademicYear=function(e){return Object(o.jsx)(pr.a.Option,SX({value:e.id},{children:e.id}),e.id)},t}(a.Component);var RX=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected,selectedDistrict:e.District.Selected,selectedRPP:e.RegionalPlanningPartner.Selected}}))(EX)),_X={className:"EducationProgramReportDataTableProviderDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",secondaryProgramId:0,districtId:"00000000-0000-0000-0000-000000000000",district:null,cipNumberId:"00000000-0000-0000-0000-000000000000",secondaryCipNumber:null,programStartYear:null,programEndYear:null,secondaryCourseId:0,academicYear:0,enrollment:0,localCourseNumber:"",courseName:"",institutionCourseId:null,institutionCourse:null,carnegieUnit:0,communityCollegeIdentifier:0,communityCollegeId:null,communityCollege:null,sced:""},e)},id:"id",secondaryProgramId:"secondaryProgramId",districtId:"districtId",district:"district",cipNumberId:"cipNumberId",secondaryCipNumber:"secondaryCipNumber",programStartYear:"programStartYear",programEndYear:"programEndYear",secondaryCourseId:"secondaryCourseId",academicYear:"academicYear",enrollment:"enrollment",localCourseNumber:"localCourseNumber",courseName:"courseName",institutionCourseId:"institutionCourseId",institutionCourse:"institutionCourse",carnegieUnit:"carnegieUnit",communityCollegeIdentifier:"communityCollegeIdentifier",communityCollegeId:"communityCollegeId",communityCollege:"communityCollege",sced:"sced"};var TX=function(e){var t=Object(a.useState)(e.errors)[0],n=Object(a.useState)([]),r=n[0],i=n[1];Object(a.useEffect)((function(){Ii.Institutions().then((function(e){i(e)}))}),[]);var s=[];s.push(oo.Reset()),s.push(oo.Default("Export",(function(){window.open(x.generateFull(x.SELF_STUDY_EDUCATION_PROGRAM_REPORT,{},{academicYear:e.academicYear}),"_blank")})));var d=function(){if(t&&t.length>0)return Object(o.jsx)(o.Fragment,{children:t.map((function(e){return Object(o.jsx)("p",{children:e},e)}))},void 0)};return Object(o.jsxs)(o.Fragment,{children:[function(){if(t&&t.length>0)return Object(o.jsx)(ct.a,{showIcon:!0,type:"error",description:d(),message:"Error Importing"},void 0)}(),Object(o.jsx)(io,{serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}}
1,globalSearch:!0,buttonBar:s,columns:function(){var e=[];return e.pushAll([{title:"Program Identifier",dataIndex:_X.secondaryProgramId,sorter:!0,width:50,filterType:wr.Text},{title:"District",dataIndex:_X.districtId,sorter:!0,render:function(e,t){var n;return null===(n=t.district)||void 0===n?void 0:n.display},filterType:wr.Text},{title:"CIP Number",dataIndex:_X.secondaryCipNumber,sorter:!0,render:function(e,t){var n,r;return(null===(n=t.secondaryCipNumber)||void 0===n?void 0:n.code)+" - "+(null===(r=t.secondaryCipNumber)||void 0===r?void 0:r.description)},filterType:wr.Text},{title:"Program Start Year",dataIndex:_X.programStartYear,sorter:!0,filterType:wr.Text},{title:"Program End Year",dataIndex:_X.programEndYear,sorter:!0,filterType:wr.Text},{title:"Course Identifier",dataIndex:_X.secondaryCourseId,sorter:!0,filterType:wr.Text},{title:"Course Name",dataIndex:_X.courseName,sorter:!0,filterType:wr.Text},{title:"Local Course Number",dataIndex:_X.localCourseNumber,sorter:!0,filterType:wr.Text},{title:"SCED",dataIndex:_X.sced,sorter:!0,filterType:wr.Text},{title:"Carnegie Unit",dataIndex:_X.carnegieUnit,sorter:!0,filterType:wr.Text},{title:"Community College",dataIndex:_X.communityCollegeId,sorter:!0,width:150,render:function(e,t){var n;return null===(n=t.communityCollege)||void 0===n?void 0:n.display},filterType:wr.DropdownMulti,dropdownFilterOptions:r},{title:"Institution Course",dataIndex:_X.institutionCourseId,sorter:!0,width:150,render:function(e,t){var n,r,i,o,a,s,d;if(t.institutionCourse)return(null===(i=null===(r=null===(n=t.institutionCourse)||void 0===n?void 0:n.course)||void 0===r?void 0:r.discipline)||void 0===i?void 0:i.code)+""+(null===(a=null===(o=t.institutionCourse)||void 0===o?void 0:o.course)||void 0===a?void 0:a.catalogNumber)+" - "+(null===(d=null===(s=t.institutionCourse)||void 0===s?void 0:s.currentDetail)||void 0===d?void 0:d.title)},filterType:wr.Text},{title:"Enrollment",dataIndex:_X.enrollment,sorter:!0,filterType:wr.Text}]),e}(),fetchData:{fetch:function(t){return $H.getEducationProgramReportTableData(t,e.academicYear)}},stateSaving:{enabled:!0,tableUniqueKey:"secondary_program_course_list"}},void 0)]},void 0)},CX=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),xX=function(){return xX=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},xX.apply(this,arguments)},AX=function(e){function t(t){var n=e.call(this,t)||this;return n.loadAcademicYears=function(e){n.setState({loading:!0});var t=ML({academicYearId:e});return sL.getAcademicYears(t).then((function(e){var t;e&&e.academicYears&&n.setState({academicYears:null!==(t=e.academicYears)&&void 0!==t?t:[],academicYear:$r.getCurrentYear()})})).catch().finally((function(){n.setState({loading:!1})}))},n.onBack=function(){T.goBack()},n.state={loading:!1,academicYear:0,academicYears:[]},n}return CX(t,e),t.prototype.componentDidMount=function(){var e=Number.parseInt(Hr.getPathPart(this.props.match,"academicYearId"));this.state.academicYear!=e?this.setState({academicYear:e}):this.loadAcademicYears(e)},t.prototype.render=function(){return this.state.academicYear?Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Education Program Report",breadcrumbs:Xn.academicYearEducationProgramReport(this.state.academicYear),onBack:this.onBack},void 0),Object(o.jsx)(y.b,xX({direction:"vertical",size:"large"},{children:Object(o.jsx)(Qn.a,xX({title:"Education Program Report"},{children:Object(o.jsx)(y.b,xX({direction:"vertical",size:"large"},{children:Object(o.jsx)(TX,{academicYear:this.state.academicYear},void 0)}),void 0)}),void 0)}),void 0)]},void 0):Object(o.jsx)(pt.a,{active:!0},void 0)},t}(a.Component);var PX=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected,selectedDistrict:e.District.Selected,selectedRPP:e.RegionalPlanningPartner.Selected}}))(AX)),NX=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),wX=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return NX(t,e),t.prototype.getFederalClusterTableData=function(e,t){var n="api/federalClusters",r=n.indexOf("?")>0?"&":"?";return null!=t&&(n+=r+"academicYearId="+t,r="&"),n=n.replace(/null|undefined/gi,""),this.SendRequest(e,"post",n,!0,!1)},t.prototype.getFederalClusterDetails=function(e){var t="api/federalClusters/"+encodeURIComponent(e);return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.saveFederalClusterDetails=function(e){var t="api/federalClusters/save";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)}
1,t.prototype.deleteFederalCluster=function(e){var t="api/federalClusters/deleteFederalCluster";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getFederalClusters=function(e){var t="api/federalClusters/federalClusters",n=t.indexOf("?")>0?"&":"?";return null!=e&&(t+=n+"academicYearId="+e,n="&"),t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t}(U),DX=new wX,qX={className:"FederalClusterDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",federalClusterIdentifier:0,academicYear:0,description:"",serviceAreaIdentifier:null,serviceAreaId:null,serviceArea:null,display:""},e)},id:"id",federalClusterIdentifier:"federalClusterIdentifier",academicYear:"academicYear",description:"description",serviceAreaIdentifier:"serviceAreaIdentifier",serviceAreaId:"serviceAreaId",serviceArea:"serviceArea",display:"display"},FX=function(e){return Object.assign({federalClusterId:"00000000-0000-0000-0000-000000000000",academicYearId:0},e)},MX=function(e){return Object.assign({federalClusterId:"00000000-0000-0000-0000-000000000000",federalCluster:null},e)},YX=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),UX=function(){return UX=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},UX.apply(this,arguments)},LX=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._formItems=(new Map).set(qX.federalClusterIdentifier,{required:!0,name:qX.federalClusterIdentifier,label:"Identifier",rules:[Ot.required()]}).set(qX.description,{required:!0,name:qX.description,label:"Title",rules:[Ot.required()]}).set(qX.serviceAreaIdentifier,{required:!1,name:qX.serviceAreaIdentifier,label:"Service Area"}),n.fetchData=function(){n.setState({loading:!0});var e=[];e.push(n.loadFederalCluster()),n.state.serviceAreas&&0!=n.state.serviceAreas.length||e.push(n.loadServiceAreas()),Promise.all(e).then((function(){n.setState({loading:!1}),n.resetForm()}))},n.loadServiceAreas=function(){n.props.academicYear&&oM.getServiceAreas(n.props.academicYear).then((function(e){var t;e&&n.setState({serviceAreas:null!==(t=e.serviceAreas)&&void 0!==t?t:[]}),n.resetForm()})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))},n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields(),n.setState({altered:!1})},n.loadExisting=function(){n.props.federalClusterId&&n.props.academicYear&&DX.getFederalClusterDetails(n.props.federalClusterId).then((function(e){var t;e&&n.setState({federalCluster:null!==(t=e.federalCluster)&&void 0!==t?t:qX.create({id:n.props.federalClusterId==re.default.Empty()?re.default.Empty():n.props.federalClusterId,serviceAreaId:void 0})}),n.resetForm()})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))},n.loadNew=function(){n.setState({loading:!1,federalCluster:qX.create({id:re.default.Empty(),federalClusterIdentifier:"",serviceAreaIdentifier:"",code:""})})},n.submit=function(){var e;null===(e=n._formRef.current)||void 0===e||e.validateFields().then(n.handleSubmit,(function(){return n.setState({error:!0})}))},n.handleChange=function(){n.setState({altered:!0})},n.handleSubmit=function(){var e;n.setState({submitting:!0});var t=n._formRef?n._formRef.current.getFieldsValue():null;""===t.serviceAreaIdentifier&&(t.serviceAreaIdentifier=null);var r=MX({federalClusterId:n.props.federalClusterId,federalCluster:qX.create(UX(UX({},t),{id:null!==(e=n.props.federalClusterId)&&void 0!==e?e:re.default.Empty(),academicYear:n.props.academicYear}))});DX.saveFederalClusterDetails(r).then((function(e){var t,r,i;n.setState({submitted:!0}),(null===e||void 0===e?void 0:e.succeeded)?(n.setState({federalCluster:null!==(t=e.federalCluster)&&void 0!==t?t:qX.create()}),S.b.success("Saved"),n.props.onSave&&(null===(r=e.federalCluster)||void 0===r?void 0:r.id)&&
1(n.resetForm(),n.props.onSave(null!==(i=e.federalCluster.id)&&void 0!==i?i:re.default.Empty()))):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error(null===e||void 0===e?void 0:e.errors.join("\n")),n.setState({loading:!1,submitting:!1}))})).catch((function(e){n.setState({error:e,loading:!1,submitting:!1}),S.b.error("FederalCluster could not be saved")}))},n.state={federalCluster:qX.create({id:"",serviceAreaIdentifier:""}),serviceAreas:[]},n}return YX(t,e),t.prototype.componentDidMount=function(){this.fetchData()},t.prototype.componentDidUpdate=function(e){(this.props.federalClusterId&&this.props!=e||this.props.academicYear&&this.props.academicYear!=e.academicYear)&&this.fetchData()},t.prototype.loadFederalCluster=function(){this.state.loading||(this.props.federalClusterId==re.default.Empty()||this.props.isNew?this.loadNew():this.loadExisting())},t.prototype.render=function(){var e=this;return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(y.b,UX({size:"small",direction:"vertical"},{children:[this.renderErrors(),Object(o.jsxs)(ht.a,UX({ref:this._formRef,layout:"vertical",initialValues:this.state.federalCluster,onValuesChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!0},{children:[Object(o.jsx)(mt.a,UX({},this._formItems.get(qX.federalClusterIdentifier),_t.getValidation(qX.federalClusterIdentifier,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,UX({},this._formItems.get(qX.description),_t.getValidation(qX.description,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,UX({},this._formItems.get(qX.serviceAreaIdentifier),_t.getValidation(qX.serviceAreaIdentifier,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsxs)(hd,UX({allowClear:!0,disabled:!this.props.isEditing||this.state.loading||this.state.submitting},{children:[" ",this.state.serviceAreas.sort((function(e,t){return e.serviceAreaIdentifier-t.serviceAreaIdentifier})).map((function(t){return e.renderServiceArea(t)}))]}),void 0)}),void 0)]}),void 0)]}),void 0)},t.prototype.renderServiceArea=function(e){var t,n;if(e.id)return Object(o.jsx)(pr.a.Option,UX({title:null!==(t=e.display)&&void 0!==t?t:"",value:e.serviceAreaIdentifier},{children:e.display}),null!==(n=e.id)&&void 0!==n?n:re.default.Empty())},t.prototype.renderErrors=function(){if(this.state.error)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t}(a.Component),kX=function(){return kX=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},kX.apply(this,arguments)};var GX=function(e){var t,n=s.a.createRef(),r=e.federalClusterId==re.default.Empty();return Object(o.jsx)(f.a,kX({visible:!0,title:r?"New Federal Cluster":"Edit Federal Cluster",okText:"Save",onOk:function(){var e;null===(e=n.current)||void 0===e||e.submit()},okButtonProps:{htmlType:"submit"},onCancel:e.onCancel,destroyOnClose:!0},{children:Object(o.jsx)(LX,{ref:n,federalClusterId:null!==(t=e.federalClusterId)&&void 0!==t?t:re.default.Empty(),isEditing:!0,onSave:e.onSave,isNew:r,academicYear:e.academicYear},void 0)}),void 0)},VX=function(){return VX=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},VX.apply(this,arguments)};var BX=function(e){var t=void 0,n=Object(a.useState)(),r=n[0],i=n[1],s=Object(a.useState)([]),d=s[0],c=s[1];a.useEffect((function(){e.academicYear>0&&oM.getServiceAreas(e.academicYear).then((function(e){e.serviceAreas&&c(e.serviceAreas)}))}),[e.academicYear]);var l=function(e){e.id&&i(e.id)},u=function(){i(null)},p=function(e){null!=e&&f.a.confirm({title:"Are you sure you want to delete this Federal Cluster?",okText:"Delete",onOk:function(){return h(e)},okButtonProps:{type:"primary",danger:!0}})},h=function(e){var n=FX({federalClusterId:e});DX.deleteFederalCluster(n).then((function(e){!0===(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Federal Cluster was removed."),null===t||void 0===t||t.refresh()):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(){S.b.error("Federal Cluster could not be removed.")}))},v=[];return v.push(oo.Reset()),Je.isAuthorized([gn.EDIT_FEDERAL_CLUSTER])&&v.push(oo.Default("New Federal Cluster",(function(){i(re.default.Empty())}))),Object(o.jsxs)(o.Fragment,{children:[function(){if(null!=r)return Object(o.jsx)(GX,{onCancel:u,visible:!0,federalClusterId:r,academicYear:e.academicYear,onSave:u},void 0)}(),Object(o.jsx)(io,{ref:function(e){return t=e},serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:v,columns:[{title:"Identifier",dataIndex:qX.federalClusterIdentifier,sorter:!0,width:25,render:function(e,t){return t.federalClusterIdentifier},filterType:wr.Text},{title:"Title",dataIndex:qX.description,sorter:!0,render:function(e,t){return t.description},filterType:wr.Text},{title:"Service Area",dataIndex:qX.serviceAreaIdentifier,sorter:!0,width:250,filterType:wr.DropdownMulti,dropdownFilterOptions:d.map((function(e){return{text:e.display,value:e.serviceAreaIdentifier.toString()}})),render:function(e,t){var n,r;return d.length>0&&null!==(r=null===(n=d.filter((function(e){return e.serviceAreaIdentifier===t.serviceAreaIdentifier}))[0])||void 0===n?void 0:n.description)&&void 0!==r?r:""}},{title:"Actions",align:"center",dataIndex:qX.id,sorter:!1,render:function(e,t){if(Je.isAuthorized([gn.CONFIG_ACADEMIC_YEAR]))return Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(rt.a,
1VX({type:"link",onClick:function(){return l(t)}},{children:Object(o.jsx)(Gr.a,{},void 0)}),void 0),Object(o.jsx)(rt.a,VX({type:"link",onClick:function(){var e;return p(null!==(e=t.id)&&void 0!==e?e:re.default.Empty())}},{children:Object(o.jsx)(Yd.a,{},void 0)}),void 0)]},void 0)},width:50}],fetchData:{fetch:function(t){return DX.getFederalClusterTableData(t,e.academicYear)}},stateSaving:{enabled:!0,tableUniqueKey:"federal_cluster_list"}},void 0)]},void 0)},WX=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),zX=function(){return zX=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},zX.apply(this,arguments)},HX=function(e){function t(t){var n=e.call(this,t)||this;return n.loadAcademicYears=function(e){n.setState({loading:!0});var t=ML({academicYearId:e});return sL.getAcademicYears(t).then((function(e){var t;e&&e.academicYears&&n.setState({academicYears:null!==(t=e.academicYears)&&void 0!==t?t:[],academicYear:$r.getCurrentYear()})})).catch().finally((function(){n.setState({loading:!1})}))},n.onSelect=function(e){n.setState({academicYear:e})},n.onBack=function(){n.state.fromSelfStudies?T.push(x.generate(x.SELF_STUDIES_ACADEMIC_YEAR_DASHBOARD,{academicYearId:n.state.academicYear},{})):T.push(x.generate(x.HOME,{},{}))},n.state={loading:!1,academicYear:0,academicYears:[],fromSelfStudies:!1,fromAcademicYearList:!1},n}return WX(t,e),t.prototype.componentDidMount=function(){var e=Number.parseInt(Hr.getPathPart(this.props.match,"academicYearId")),t=Hr.getParameter("fromAcademicYearList");this.setState({fromAcademicYearList:"true"==t}),this.state.academicYear!=e?this.setState({academicYear:e,fromSelfStudies:!0}):this.loadAcademicYears(e)},t.prototype.render=function(){var e=this,t=this.state.academicYear;return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Federal Clusters",breadcrumbs:this.state.fromSelfStudies?Xn.academicYearDataReview(t):Xn.federalClusterList(),onBack:this.onBack,extra:this.state.fromSelfStudies?null:Object(o.jsx)(hd,zX({value:this.state.academicYear,onSelect:this.onSelect,dropdownMatchSelectWidth:!1},{children:this.state.academicYears.map((function(t){return e.renderAcademicYear(t)}))}),void 0)},void 0),Object(o.jsx)(y.b,zX({direction:"vertical",size:"large"},{children:Object(o.jsx)(Qn.a,zX({title:"Federal Clusters"},{children:Object(o.jsx)(y.b,zX({direction:"vertical",size:"large"},{children:Object(o.jsx)(BX,{academicYear:this.state.academicYear,fromSelfStudies:this.state.fromSelfStudies,fromAcademicYearList:this.state.fromAcademicYearList},void 0)}),void 0)}),void 0)}),void 0)]},void 0)},t.prototype.renderAcademicYear=function(e){return Object(o.jsx)(pr.a.Option,zX({value:e.id},{children:e.id}),e.id)},t}(a.Component);var QX=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected}}))(HX)),KX=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),XX=function(){return XX=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},XX.apply(this,arguments)},JX=function(e){function t(t){var n=e.call(this,t)||this;return n.onBack=function(){T.goBack()},n.state={loading:!1,academicYear:0},n}return KX(t,e),t.prototype.componentDidMount=function(){var e=Number.parseInt(Hr.getPathPart(this.props.match,"academicYearId"));this.setState({academicYear:e})},t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Federal Cluster
1s",breadcrumbs:Xn.academicYearFederalClusterConfigurationList(this.state.academicYear),onBack:this.onBack},void 0),Object(o.jsx)(y.b,XX({direction:"vertical",size:"large"},{children:Object(o.jsx)(Qn.a,XX({title:"Federal Clusters"},{children:Object(o.jsx)(y.b,XX({direction:"vertical",size:"large"},{children:Object(o.jsx)(BX,{academicYear:this.state.academicYear},void 0)}),void 0)}),void 0)}),void 0)]},void 0)},t}(a.Component);var $X=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected}}))(JX)),ZX=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),eJ=function(){return eJ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},eJ.apply(this,arguments)},tJ=function(e){function t(t){var n=e.call(this,t)||this;return n.loadAcademicYears=function(){n.setState({loading:!0});var e=ML({});return sL.getAcademicYears(e).then((function(e){var t;e&&e.academicYears&&n.setState({academicYears:null!==(t=e.academicYears)&&void 0!==t?t:[],academicYear:$r.getCurrentYear()})})).catch().finally((function(){n.setState({loading:!1})}))},n.onSelect=function(e){n.setState({academicYear:e})},n.onBack=function(){T.goBack()},n.state={loading:!1,academicYear:2022,academicYears:[]},n}return ZX(t,e),t.prototype.componentDidMount=function(){this.loadAcademicYears()},t.prototype.render=function(){var e=this;return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Federal Clusters",breadcrumbs:Xn.federalClusterConfigurationList(),onBack:this.onBack,extra:Object(o.jsx)(hd,eJ({value:this.state.academicYear,onSelect:this.onSelect,dropdownMatchSelectWidth:!1},{children:this.state.academicYears.map((function(t){return e.renderAcademicYear(t)}))}),void 0)},void 0),Object(o.jsx)(y.b,eJ({direction:"vertical",size:"large"},{children:Object(o.jsx)(Qn.a,eJ({title:"Federal Clusters"},{children:Object(o.jsx)(y.b,eJ({direction:"vertical",size:"large"},{children:Object(o.jsx)(BX,{academicYear:this.state.academicYear},void 0)}),void 0)}),void 0)}),void 0)]},void 0)},t.prototype.renderAcademicYear=function(e){return Object(o.jsx)(pr.a.Option,eJ({value:e.id},{children:e.id}),e.id)},t}(a.Component);var nJ=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected}}))(tJ)),rJ=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),iJ=function(){return iJ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},iJ.apply(this,arguments)},oJ=function(e){function t(t){var n=e.call(this,t)||this;return n.onBack=function(){T.push(x.generate(x.DATA_REVIEW_SERVICE_AREAS,{academicYearId:n.state.academicYear},{}))},n.onContinue=function(){T.push(x.generate(x.DATA_REVIEW_SECONDARY_PROGRAM_TYPES,{academicYearId:n.state.academicYear},{}))},n.state={academicYear:0},n}return rJ(t,e),t.prototype.componentDidMount=function(){var e=Number.parseInt(Hr.getPathPart(this.props.match,"academicYearId"));this.state.academicYear!=e&&this.setState({academicYear:e})},t.prototype.render=function(){var e=0==this.state.academicYear?0:this.state.academicYear;return 0!=e?Object(o.jsx)(O.Content,{children:Object(o.jsx)(Yz,iJ({breadcrumbs:Xn.academicYearDataReview(e),stepNumber:2,academicYear:e},{children:Object(o.jsx)(Qn.a,iJ({title:"Federal Clusters"},{children:Object(o.jsxs)(y.b,iJ({direction:"vertical",size:"middle"},{children:[Object(o.jsx)(BX,{academicYear:this.state.academicYear},void 0),Object(o.jsxs)(y.b,{children:[Object(o.jsx)(lm,{onClick:this.onBack},void 0),Object(o.jsx)(Pz,{onClick:this.onContinue},void 0)]},void 0)]}),void 0)}),void 0)}),void 0)},void 0):Object(o.jsx)(pt.a,{},void 0)},t}(a.Component);var aJ=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected}}))(oJ)),sJ=function(e){return Object.assign({secondaryCipNumberId:"00000000-0000-0000-0000-000000000000"},e)},dJ=function(e){return Object.assign({secondaryCipNumberId:null,secondaryCipNumber:null},e)},cJ=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),lJ=function(){return lJ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},lJ.apply(this,arguments)},uJ=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._formItems=(new Map).set(NL.cipNumberIdentifier,{required:!0,name:NL.cipNumberIdentifier,label:"Identifier",rules:[Ot.required(),Ot.onlyNumericCharacters()]}).set(NL.code,{required:!0,name:NL.code,label:"CIP Number",rules:[Ot.required(),Ot.onlyNumericCharacters()]}).set(NL.description,{required:!0,name:NL.description,label:"Description",rules:[Ot.required()]}).set(NL.specialUnit,{name:NL.specialUnit,label:"Special Unit",rules:[Ot.onlyNumericCharacters()]}).set(NL.federalClusterIdentifier,{required:!0,name:NL.federalClusterIdentifier,label:"Federal Cluster",rules:[Ot.required()]}).set(NL.serviceAreaIdentifier,{required:!0,name:NL.serviceAreaIdentifier,label:"Service Area",rules:[Ot.required()]}).set(NL.stateApproved,{required:!0,name:NL.stateApproved,label:"State Approved",rules:[Ot.required()]}).set(NL.nonTraditionalGenderId,{required:!1,name:NL.nonTraditionalGenderId,label:"Non-Traditional Gender"}),n.fetchData=function(){n.setState({loading:!0});var e=[];e.push(n.loadSecondaryCipNumber()),n.state.federalClusters&&0==n.state.federalClusters.length&&e.push(n.loadFederalClusters()),n.state.serviceAreas&&0==n.state.serviceAreas.length&&e.push(n.loadStateCluster
1s()),n.state.genders&&0==n.state.genders.length&&e.push(n.loadGenders()),Promise.all(e).then((function(){n.setState({loading:!1}),n.resetForm()}))},n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields(),n.setState({altered:!1})},n.loadExisting=function(){var e;n.props.secondaryCipNumberId&&n.props.academicYear&&fL.getSecondaryCipNumberDetails(null!==(e=n.props.secondaryCipNumberId)&&void 0!==e?e:re.default.Empty()).then((function(e){var t;e&&n.setState({secondaryCipNumber:null!==(t=e.secondaryCipNumber)&&void 0!==t?t:NL.create()}),n.resetForm()})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))},n.loadNew=function(){n.setState({loading:!1,secondaryCipNumber:NL.create({id:re.default.Empty(),cipNumberIdentifier:"",serviceAreaIdentifier:"",federalClusterId:"",federalClusterIdentifier:"",code:"",stateApproved:void 0})})},n.loadStateClusters=function(){n.props.academicYear&&oM.getServiceAreas(n.props.academicYear).then((function(e){var t,r;e&&n.setState({serviceAreas:null!==(r=null===(t=e.serviceAreas)||void 0===t?void 0:t.sort((function(e,t){return e.serviceAreaIdentifier-t.serviceAreaIdentifier})))&&void 0!==r?r:[]}),n.resetForm()})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))},n.loadFederalClusters=function(){n.props.academicYear&&DX.getFederalClusters(n.props.academicYear).then((function(e){var t;e&&n.setState({federalClusters:null!==(t=e.federalClusters)&&void 0!==t?t:[]}),n.resetForm()})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))},n.loadGenders=function(){ce.getAll(Bu.className).then((function(e){n.setState({genders:null!==e&&void 0!==e?e:[]})})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))},n.submit=function(){var e;null===(e=n._formRef.current)||void 0===e||e.validateFields().then((function(){return n.handleSubmit()}),(function(){return n.setState({error:!0})}))},n.handleChange=function(){n.setState({altered:!0})},n.handleSubmit=function(){n.setState({submitting:!0});var e=dJ({secondaryCipNumberId:n.props.secondaryCipNumberId,secondaryCipNumber:NL.create(lJ(lJ({},n._formRef?n._formRef.current.getFieldsValue():null),{academicYear:n.props.academicYear,federalClusterId:re.default.Empty(),serviceAreaId:re.default.Empty(),specialUnit:void 0==n._formRef.current.getFieldsValue().specialUnit?null:n._formRef.current.getFieldsValue().specialUnit}))});fL.saveSecondaryCipNumberDetails(e).then((function(e){var t,r;n.setState({submitted:!0}),(null===e||void 0===e?void 0:e.succeeded)?(n.setState({secondaryCipNumber:null!==(t=e.secondaryCipNumber)&&void 0!==t?t:NL.create(),fieldErrors:void 0,error:!1}),S.b.success("Saved"),n.props.onSave&&(null===(r=e.secondaryCipNumber)||void 0===r?void 0:r.id)&&
1(n.resetForm(),n.props.onSave(e.secondaryCipNumber.id))):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Secondary CIP Number could not be saved"),n.setState({loading:!1,submitting:!1}))})).catch((function(e){n.setState({error:e,loading:!1,submitting:!1}),S.b.error("Secondary CIP Number could not be saved")}))},n.state={secondaryCipNumber:NL.create(),serviceAreas:[],federalClusters:[],genders:[]},n}return cJ(t,e),t.prototype.componentDidMount=function(){this.fetchData()},t.prototype.componentDidUpdate=function(e){this.props!=e&&this.fetchData()},t.prototype.loadSecondaryCipNumber=function(){this.state.loading||(this.props.secondaryCipNumberId==re.default.Empty()||this.props.isNew?this.loadNew():this.loadExisting())},t.prototype.render=function(){var e=this;return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(y.b,lJ({size:"small",direction:"vertical"},{children:[this.renderErrors(),Object(o.jsxs)(ht.a,lJ({ref:this._formRef,layout:"vertical",initialValues:this.state.secondaryCipNumber,onValuesChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!0},{children:[Object(o.jsx)(mt.a,lJ({},this._formItems.get(NL.cipNumberIdentifier),_t.getValidation(NL.cipNumberIdentifier,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(il,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,lJ({},this._formItems.get(NL.code),_t.getValidation(NL.code,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(il,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,lJ({},this._formItems.get(NL.description),_t.getValidation(NL.description,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(il,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,lJ({},this._formItems.get(NL.specialUnit),_t.getValidation(NL.specialUnit,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(il,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,lJ({},this._formItems.get(NL.federalClusterIdentifier),_t.getValidation(NL.federalClusterIdentifier,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(hd,lJ({disabled:!this.props.isEditing||this.state.loading||this.state.submitting},{children:this.state.federalClusters.map((function(t){return e.renderFederalCluster(t)}))}),void 0)}),void 0),Object(o.jsx)(mt.a,lJ({},this._formItems.get(NL.serviceAreaIdentifier),_t.getValidation(NL.id,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(hd,lJ({disabled:!this.props.isEditing||this.state.loading||this.state.submitting},{children:this.state.serviceAreas.map((function(t){return e.renderServiceArea(t)}))}),void 0)}),void 0),Object(o.jsx)(mt.a,lJ({},this._formItems.get(NL.stateApproved),_t.getValidation(NL.stateApproved,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(Hd,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,lJ({},this._formItems.get(NL.nonTraditionalGenderId),_t.getValidation(NL.nonTraditionalGenderId,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(hd,lJ({allowClear:!0,disabled:!this.props.isEditing||this.state.loading||this.state.submitting},{children:this.state.genders.map((function(t){return e.renderGender(t)}))}),void 0)}),void 0)]}),void 0)]}),void 0)},t.prototype.renderFederalCluster=function(e){var t,n,r;if(e.id)return Object(o.jsx)(pr.a.Option,lJ({title:null!==(t=e.display)&&void 0!==t?t:"",value:null!==(n=e.federalClusterIdentifier)&&void 0!==n?n:0},{children:e.display}),null!==(r=e.federalClusterIdentifier)&&void 0!==r?r:0)},t.prototype.renderServiceArea=function(e){var t,n,r;if(e.id)return Object(o.jsx)(pr.a.Option,lJ({title:null!==(t=e.display)&&void 0!==t?t:"",value:null!==(n=e.serviceAreaIdentifier)&&void 0!==n?n:re.default.Empty()},{children:e.display}),null!==(r=e.serviceAreaIdentifier)&&void 0!==r?r:re.default.Empty())},t.prototype.renderGender=function(e){var t,n,r;if(e.id)return Object(o.jsx)(pr.a.Option,lJ({title:null!==(t=e.name)&&void 0!==t?t:"",value:null!==(n=e.id)&&void 0!==n?n:re.default.Empty()},{children:e.name}),null!==(r=e.id)&&void 0!==r?r:re.default.Empty())},t.prototype.renderErrors=function(){if(this.state.error)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t}(a.Component),pJ=function(){return pJ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},pJ.apply(this,arguments)};var fJ=function(e){var t,n=s.a.createRef(),r=e.secondaryCipNumberId==re.default.Empty();return Object(o.jsx)(f.a,pJ({visible:!0,title:r?"New CIP Number":"Edit CIP Number",okText:"Save",onOk:function(){var e;null===(e=n.current)||void 0===e||e.submit()},okButtonProps:{htmlType:"submit"},onCancel:e.onCancel,destroyOnClose:!0},{children:Object(o.jsx)(uJ,{ref:n,secondaryCipNumberId:null!==(t=e.secondaryCipNumberId)&&void 0!==t?t:re.default.Empty,isEditing:!0,onSave:e.onSave,isNew:r,academicYear:e.academicYear},void 0)}),void 0)},hJ="file",vJ=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),mJ=function(){return mJ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},mJ.apply(this,arguments)},gJ=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n.getFormItems=function(){return(new Map).set(hJ,{name:hJ,label:"Please select a file to import Secondary CIP Number"})},n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields()},n.confirmImport=function(){var e,t,r=null!==(t=null===(e=n._formRef.current)||void 0===e?void 0:e.getFieldsValue())&&void 0!==t?t:{};f.a.confirm({title:"Reset Data",content:"Importing this file will delete the current data.",onOk:function(){return n.handleSubmit(r)},width:500})},n.handleSubmit=function(e){if(n.setState({submitting:!0}
1),br.canSubmit(n._formRef,n.getFormItems())){var t=e.file.newFiles[0],r=Za.attachFileToModel("secondaryCipNumberImporter",{academicYearId:n.props.academicYear},hJ,t);n.setState({loading:!0}),fL.secondaryCipNumberImporter(r).then((function(e){var t;n.resetForm(),n.setState({submitting:!1}),null===(t=n.props.refreshDataTable)||void 0===t||t.resetTable();R.a.downloadBase64StringAsExcel("Secondary CIP Number Summary Report.xlsx",null!==e&&void 0!==e?e:void 0),n.props.onSubmit&&n.props.onSubmit(e.errors)})).catch((function(){S.b.error("Import Failed. Please check formatting in file."),n.setState({error:!0})})).finally((function(){n.setState({loading:!1,submitting:!1})}))}else S.b.error("Please fill out all required fields."),n.setState({loading:!1,submitting:!1})},n.downloadTemplate=function(){window.open(x.generateFull(x.SECONDARY_CIP_NUMBER_IMPORT_TEMPLATE,{},{}),"_blank")},n.state={},n}return vJ(t,e),t.prototype.render=function(){return Object(o.jsx)(y.b,mJ({direction:"vertical"},{children:Object(o.jsx)(Ci.a,mJ({layout:"vertical",onFinish:this.handleSubmit,ref:this._formRef},{children:Object(o.jsxs)(y.b,mJ({direction:"vertical"},{children:[Object(o.jsx)(Ci.a.Item,mJ({},this.getFormItems().get(hJ),_t.getValidation(hJ,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(hs,{maxCount:1,style:{width:300}},void 0)}),void 0),this.props.isInModal?null:Object(o.jsxs)(y.b,mJ({direction:"horizontal"},{children:[Object(o.jsx)(rt.a,mJ({htmlType:"submit",type:"primary",icon:Object(o.jsx)(ds.a,{},void 0),loading:this.state.loading},{children:"Import"}),void 0),Object(o.jsx)(rt.a,mJ({icon:Object(o.jsx)(pn.a,{},void 0),type:"link",onClick:this.downloadTemplate},{children:"Download Template"}),void 0)]}),void 0),this.renderErrors()]}),void 0)}),void 0)}),void 0)},t.prototype.renderErrors=function(){if(this.state.error&&this.state.message)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:this.state.message},void 0)},t}(a.Component),bJ=function(){return bJ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},bJ.apply(this,arguments)};var yJ=function(e){var t=void 0,n=a.createRef(),r=Object(a.useState)(),i=r[0],s=r[1],d=Object(a.useState)(!1),c=d[0],l=d[1],u=Object(a.useState)(e.errors),p=u[0],h=u[1],v=Object(a.useState)([]),m=v[0],g=v[1],b=Object(a.useState)([]),O=b[0],j=b[1];a.useEffect((function(){oM.getServiceAreas(e.academicYear).then((function(e){e.serviceAreas&&g(e.serviceAreas)}))}),[e.academicYear]),a.useEffect((function(){ce.getAll(Bu.className).then((function(e){e&&(e.push(Bu.create({id:0,name:"None"})),j(e))}))}),[]);var I=function(e){s(e.id)},E=function(){s(null)},R=function(t){null!=t&&f.a.confirm({title:"Are you sure you want to delete this CIP Number?",okText:"Delete",onOk:function(){return _(t,e.academicYear)},okButtonProps:{type:"primary",danger:!0}})},_=function(e,n){var r=sJ({secondaryCipNumberId:e,academicYearId:n}
1);fL.deleteSecondaryCipNumber(r).then((function(e){!0===(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Secondary CIP Number was removed."),null===t||void 0===t||t.refresh()):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(){S.b.error("Secondary CIP Number could not be removed.")}))},T=function(e){l(!1),h(e)},C=[];return C.push(oo.Reset()),Je.isAuthorized([gn.EDIT_SECONDARY_CIP_NUMBER])&&C.push(oo.Default("New CIP Number",(function(){s(re.default.Empty)}))),Je.isAuthorized([gn.EDIT_SECONDARY_CIP_NUMBER])&&!e.isConfiguration&&C.push(oo.Default("Import CIP Numbers",(function(){return l(!0),void f.a.confirm({title:"Import",content:Object(o.jsx)(gJ,{ref:n,academicYear:e.academicYear,refreshDataTable:t,isInModal:!0,onSubmit:T},void 0),onOk:function(){var e;return null===(e=n.current)||void 0===e?void 0:e.confirmImport()},onCancel:function(){l(!1)},width:500})}),void 0,c)),Je.isAuthorized([gn.EDIT_SECONDARY_CIP_NUMBER])&&!e.isConfiguration&&C.push(oo.Default("Template",(function(){window.open(x.generateFull(x.SECONDARY_CIP_NUMBER_IMPORT_TEMPLATE,{},{}),"_blank")}),Object(o.jsx)(pn.a,{},void 0),c)),Object(o.jsxs)(y.b,bJ({direction:"vertical"},{children:[function(){if(i)return Object(o.jsx)(fJ,{onCancel:E,visible:!0,secondaryCipNumberId:i,academicYear:e.academicYear,onSave:E},void 0)}(),function(){if(p&&p.length>0)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:p.map((function(e){return Object(o.jsxs)(o.Fragment,{children:[e," ",Object(o.jsx)("br",{},void 0)]},void 0)}))},void 0)}(),Object(o.jsx)(io,{ref:function(e){return t=e},serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:C,columns:[{title:"Identifier",dataIndex:NL.cipNumberIdentifier,sorter:!0,width:50,filterType:wr.Text},{title:"CIP Number",dataIndex:NL.code,sorter:!0,width:50,render:function(e,t){return t.code},filterType:wr.Text},{title:"Title",dataIndex:NL.description,sorter:!0,width:50,render:function(e,t){return t.description},filterType:wr.Text},{title:"Special Unit",dataIndex:NL.specialUnit,sorter:!0,width:50,render:function(e,t){return t.specialUnit},filterType:wr.Text},{title:"Service Area",dataIndex:NL.serviceAreaIdentifier,sorter:!0,width:250,filterType:wr.DropdownMulti,dropdownFilterOptions:m.map((function(e){return{text:e.description,value:e.serviceAreaIdentifier.toString()}})),render:function(e,t){var n,r;return m.length>0&&null!==(r=null===(n=m.filter((function(e){return e.serviceAreaIdentifier===t.serviceAreaIdentifier}))[0])||void 0===n?void 0:n.display)&&void 0!==r?r:""}},{title:"State Approved",dataIndex:NL.stateApproved,sorter:!0,width:50,render:function(e,t){return 1==t.stateApproved?"Yes":"No"},filterType:wr.DropdownMulti,dropdownFilterOptions:Ii.GetTrueOrFalse(),filterDropdownVisible:!0},{title:"Non-Traditional Gender",dataIndex:NL.nonTraditionalGenderId,sorter:!0,width:50,filterType:wr.DropdownMulti,dropdownFilterOptions:O.map((function(e){return{text:e.name,value:e.id.toString()}})),render:function(e,t){var n,r;return O.length>0&&null!==(r=null===(n=O.filter((function(e){return e.id===t.nonTraditionalGenderId}))[0])||void 0===n?void 0:n.name)&&void 0!==r?r:""}},{title:"Actions",align:"center",dataIndex:NL.cipNumberIdentifier,sorter:!1,render:function(e,t){if(Je.isAuthorized([gn.CONFIG_ACADEMIC_YEAR]))return Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(rt.a,bJ({type:"link",onClick:function(){return I(t)}},{children:Object(o.jsx)(Gr.a,{},void 0)}),void 0),Object(o.jsx)(rt.a,bJ({type:"link",onClick:function(){return R(t.id)}},{children:Object(o.jsx)(Yd.a,{},void 0)}),void 0)]},void 0)},width:50}],fetchData:{fetch:function(t){return fL.getSecondaryCipNumberTableData(t,e.academicYear)}},stateSaving:{enabled:!0,tableUniqueKey:"secondary_cip_list"}},void 0)]}),void 0)},OJ=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),jJ=function(){return jJ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},jJ.apply(this,arguments)},IJ=function(e){function t(t){var n=e.call(this,t)||this;return n.loadAcademicYears=function(e){n.setState({loading:!0});var t=ML({academicYearId:e});return sL.getAcademicYears(t).then((function(e){var t;e&&e.academicYears&&n.setState({academicYears:null!==(t=e.academicYears)&&void 0!==t?t:[],academicYear:$r.getCurrentYear()})})).catch().finally((function(){n.setState({loading:!1})}
1))},n.onSelect=function(e){n.setState({academicYear:e})},n.onBack=function(){n.state.fromAcademicYearList?T.push(x.generate(x.ACADEMIC_YEAR_DASHBOARD_FROM_LIST,{academicYearId:n.state.academicYear},{})):T.push(x.generate(x.SELF_STUDIES_ACADEMIC_YEAR_DASHBOARD,{academicYearId:n.state.academicYear},{}))},n.state={loading:!1,academicYear:0,academicYears:[],fromSelfStudies:!1,fromAcademicYearList:!1},n}return OJ(t,e),t.prototype.componentDidMount=function(){var e=Number.parseInt(Hr.getPathPart(this.props.match,"academicYearId")),t=Hr.getParameter("fromAcademicYearList");this.setState({fromAcademicYearList:"true"==t}),this.state.academicYear!=e?this.setState({academicYear:e,fromSelfStudies:!0}):this.loadAcademicYears(e)},t.prototype.render=function(){var e=this,t=this.state.academicYear?0:this.state.academicYear;return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"CIP Numbers",breadcrumbs:this.state.fromSelfStudies?Xn.secondaryCipNumberReview(t):Xn.secondaryCipNumberList(),onBack:this.onBack,extra:this.state.fromSelfStudies?null:Object(o.jsx)(hd,jJ({value:this.state.academicYear,onSelect:this.onSelect,dropdownMatchSelectWidth:!1},{children:this.state.academicYears.map((function(t){return e.renderAcademicYear(t)}))}),void 0)},void 0),Object(o.jsx)(y.b,jJ({direction:"vertical",size:"large"},{children:Object(o.jsx)(Qn.a,jJ({title:"CIP Numbers"},{children:Object(o.jsx)(y.b,jJ({direction:"vertical",size:"large"},{children:Object(o.jsx)(yJ,{academicYear:this.state.academicYear,fromSelfStudies:this.state.fromSelfStudies,fromAcademicYearList:this.state.fromAcademicYearList},void 0)}),void 0)}),void 0)}),void 0)]},void 0)},t.prototype.renderAcademicYear=function(e){return Object(o.jsx)(pr.a.Option,jJ({value:e.id},{children:e.id}),e.id)},t}(a.Component);var SJ=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected}}))(IJ)),EJ=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),RJ=function(){return RJ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},RJ.apply(this,arguments)},_J=function(e){function t(t){var n=e.call(this,t)||this;return n.onBack=function(){T.goBack()},n.state={loading:!1,academicYear:0},n}return EJ(t,e),t.prototype.componentDidMount=function(){var e=Number.parseInt(Hr.getPathPart(this.props.match,"academicYearId"));this.setState({academicYear:e})},t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"CIP Numbers",breadcrumbs:Xn.academicYearSecondaryCipNumberConfigurationList(this.state.academicYear),onBack:this.onBack},void 0),Object(o.jsx)(y.b,RJ({direction:"vertical",size:"large"},{children:Object(o.jsx)(Qn.a,RJ({title:"CIP Numbers"},{children:Object(o.jsx)(y.b,RJ({direction:"vertical",size:"large"},{children:Object(o.jsx)(yJ,{academicYear:this.state.academicYear,isConfiguration:!0},void 0)}),void 0)}),void 0)}),void 0)]},void 0)},t}(a.Component);var TJ=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected}}))(_J)),CJ=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),xJ=function(){return xJ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},xJ.apply(this,arguments)},AJ=function(e){function t(t){var n=e.call(this,t)||this;return n._secondaryCipNumberDetailsRef=a.createRef(),n.loadSecondaryCipNumber=function(e){n.setState({secondaryCipNumberId:e}),fL.getSecondaryCipNumberDetails(e).then((function(t){var r;t.secondaryCipNumber?n.setState({secondaryCipNumber:t.secondaryCipNumber,secondaryCipNumberId:null!==(r=t.secondaryCipNumber.id)&&void 0!==r?r:re.default.Empty(),isNew:!1,isEditing:!1}):n.setState({isNew:!0,secondaryCipNumberId:e,secondaryCipNumber:void 0,isEditing:!0})}
1)).catch((function(){n.setState({error:!0})}))},n.toggleEdit=function(){var e;n.state.isEditing&&(null===(e=n._secondaryCipNumberDetailsRef.current)||void 0===e||e.resetForm()),n.setState({isEditing:!n.state.isEditing})},n.secondaryCipNumberDetailsPageSaved=function(e){n.setState({isEditing:!1,isNew:!1}),e!=n.state.secondaryCipNumberId?(T.push(x.generate(x.SECONDARY_CIP_NUMBER_DETAILS,{id:e},{academicYearId:n.state.academicYearId,fromSelfStudies:n.state.fromSelfStudies,fromAcademicYearList:n.state.fromAcademicYearList})),n.loadSecondaryCipNumber(e)):n.loadSecondaryCipNumber(e)},n.deleteConfirmation=function(e,t){f.a.confirm({title:"Are you sure you want to delete this Secondary CIP Number?",okText:"Delete",onOk:function(){return n.deleteSecondaryCipNumber(e,t)}})},n.deleteSecondaryCipNumber=function(e,t){n.setState({submitting:!0});var r=sJ({secondaryCipNumberId:e,academicYearId:t});fL.deleteSecondaryCipNumber(r).then((function(e){n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,altered:!(null===e||void 0===e?void 0:e.succeeded)}),!0===(null===e||void 0===e?void 0:e.succeeded)?S.b.success("Secondary CIP Number was removed."):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(e){n.setState({error:e}),S.b.error("Secondary CIP Number could not be removed.")})).finally((function(){n.setState({loading:!1}),n.goToListing()}))},n.goToListing=function(){n.state.fromSelfStudies?T.push(x.generate(x.ALL_SECONDARY_CIP_NUMBERS,{academicYearId:n.state.academicYearId},{fromSelfStudies:n.state.fromSelfStudies,fromAcademicYearList:n.state.fromAcademicYearList})):T.push(x.generate(x.SECONDARY_CIP_NUMBERS,{academicYearId:n.state.academicYearId}))},n.state={secondaryCipNumberId:re.default.Empty(),academicYears:[],academicYearId:0,fromAcademicYearList:!1,fromSelfStudies:!1},n}return CJ(t,e),t.prototype.componentDidMount=function(){var e=this,t=Hr.getPathPart(this.props.match,"id"),n=Hr.getParameter("academicYearId"),r=Hr.getParameter("fromAcademicYearList"),i=Hr.getParameter("fromSelfStudies");if(this.setState({academicYearId:Number.parseInt(n),fromSelfStudies:"true"==i,fromAcademicYearList:"true"==r}),this.props.match.path.split("/").findIndex((function(e){return"new"==e}))>-1)this.setState({isEditing:!0,isNew:!0,loading:!1});else{var o=[];o.push(this.loadSecondaryCipNumber(t)),Promise.all(o).then((function(){e.setState({loading:!1})}))}},t.prototype.render=function(){var e,t,n=this.state.loading?"...":this.state.isNew?"New Secondary CIP Number":null!==(t=null===(e=this.state.secondaryCipNumber)||void 0===e?void 0:e.code)&&void 0!==t?t:"...";return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:n,onBack:this.goToListing,breadcrumbs:Xn.secondaryCipNumberDetailPage(n.toString(),this.state.secondaryCipNumberId,this.state.academicYearId,this.state.fromAcademicYearList,this.state.fromSelfStudies),extra:this.renderMoreActions()},void 0),this.renderDetailsCard()]},void 0)},t.prototype.renderDetailsCard=function(){var e=this.state.secondaryCipNumberId==re.default.Empty()?null:Object(o.jsx)(Ze,xJ({validFeatureFlags:[gn.EDIT_SECONDARY_PROGRAM]},{children:Object(o.jsx)(Br,{isEditing:this.state.isEditing,onClick:this.toggleEdit},void 0)}),void 0);return Object(o.jsx)(Qn.a,xJ({title:"Details",extra:e},{children:Object(o.jsx)(uJ,{ref:this._secondaryCipNumberDetailsRef,secondaryCipNumberId:this.state.secondaryCipNumberId,isEditing:this.state.isEditing,isNew:this.state.isNew,onSave:this.secondaryCipNumberDetailsPageSaved,academicYear:this.state.academicYearId},void 0)}),void 0)},t.prototype.renderMoreActions=function(){var e=this,t=Object(o.jsx)(Gt.a,{children:Object(o.jsx)(Gt.a.Item,xJ({title:"Delete Secondary CIP Number",onClick:function(){return e.deleteConfirmation(e.state.secondaryCipNumberId,e.state.academicYearId)}},{children:"Delete Secondary CIP Number"}),this.state.secondaryCipNumberId)},void 0);return Object(o.jsx)(o.Fragment,{children:Object(o.jsx)(Ze,xJ({validFeatureFlags:[gn.EDIT_SECONDARY_PROGRAM]},{children:this.state.isNew?null:Object(o.jsx)(la.a,xJ({overlay:t},{children:Object(o.jsx)(rt.a,xJ({size:"large",type:"link"},{children:Object(o.jsx)(aa.a,{},void 0)}),void 0)}),void 0)}),void 0)},void 0)},t.prototype.renderAcademicYear=function(e){return Object(o.jsx)(pr.a.Option,xJ({value:e.id},{children:e.id}
1),e.id)},t}(a.Component),PJ=Object(u.i)(AJ),NJ=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),wJ=function(){return wJ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},wJ.apply(this,arguments)},DJ=function(e){function t(t){var n=e.call(this,t)||this;return n.loadSecondaryCipNumebers=function(e,t){(t||void 0===n.state.hasCips&&e>0)&&fL.academicYearHasCIPNumbers(e).then((function(e){e&&n.setState({hasCips:e.hasCips})}))},n.onSubmit=function(e){n.loadSecondaryCipNumebers(n.state.academicYear,!0),n.setState({errors:null!==e&&void 0!==e?e:[]})},n.onBack=function(){var e,t;T.push(x.generate(x.DATA_REVIEW_REGIONAL_PLANNING_PARTNER,{academicYear:null!==(t=null===(e=n.state.academicYear)||void 0===e?void 0:e.toString())&&void 0!==t?t:0},{}))},n.onContinue=function(){var e,t;T.push(x.generate(x.DATA_REVIEW_DISTRICTS,{academicYearId:null!==(t=null===(e=n.state.academicYear)||void 0===e?void 0:e.toString())&&void 0!==t?t:0},{}))},n.state={academicYear:0,hasCips:void 0,errors:[]},n}return NJ(t,e),t.prototype.componentDidMount=function(){var e=Number.parseInt(Hr.getPathPart(this.props.match,"academicYearId"));this.state.academicYear!=e&&(this.setState({academicYear:e}),this.loadSecondaryCipNumebers(e))},t.prototype.render=function(){var e=0==this.state.academicYear?0:this.state.academicYear;return 0!=e?Object(o.jsx)(O.Content,{children:Object(o.jsx)(Yz,wJ({breadcrumbs:Xn.academicYearDataReview(e),stepNumber:5,academicYear:e},{children:Object(o.jsx)(Qn.a,wJ({title:"CIP Numbers"},{children:Object(o.jsxs)(y.b,wJ({direction:"vertical",size:"middle"},{children:[this.state.hasCips?Object(o.jsx)(yJ,{errors:this.state.errors,academicYear:this.state.academicYear},void 0):Object(o.jsx)(gJ,{onSubmit:this.onSubmit,academicYear:this.state.academicYear},void 0),Object(o.jsxs)(y.b,{children:[Object(o.jsx)(lm,{onClick:this.onBack},void 0),Object(o.jsx)(Pz,{onClick:this.onContinue},void 0)]},void 0)]}),void 0)}),void 0)}),void 0)},void 0):Object(o.jsx)(pt.a,{},void 0)},t}(a.Component),qJ=Object(u.i)(DJ),FJ=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),MJ=function(){return MJ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},MJ.apply(this,arguments)},YJ=function(e){function t(t){var n=e.call(this,t)||this;return n.goToConfig=function(){T.goBack()},n.onSelect=function(e){n.setState({academicYear:e})},n.loadAcademicYears=function(){var e=ML({});return sL.getAcademicYears(e).then((function(e){var t;e&&e.academicYears&&n.setState({academicYears:null!==(t=e.academicYears)&&void 0!==t?t:[],academicYear:$r.getCurrentYear()})})).catch()},n.state={academicYears:[],academicYear:2022},n}return FJ(t,e),t.prototype.componentDidMount=function(){this.loadAcademicYears()},t.prototype.render=function(){var e=this;return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"CIP Numbers",onBack:this.goToConfig,breadcrumbs:Xn.secondaryCipNumberConfigurationList(),extra:Object(o.jsx)(hd,MJ({value:this.state.academicYear,onSelect:this.onSelect,dropdownMatchSelectWidth:!1},{children:this.state.academicYears.map((function(t){return e.renderAcademicYear(t)}))}),void 0)},void 0),Object(o.jsx)(Qn.a,{children:Object(o.jsx)(yJ,{isConfiguration:!0,academicYear:this.state.academicYear},void 0)},void 0)]},void 0)},t.prototype.renderAcademicYear=function(e){return Object(o.jsx)(pr.a.Option,MJ({value:e.id},{children:e.id}
1),e.id)},t}(a.Component),UJ=Object(u.i)(YJ),LJ=function(e){return Object.assign({serviceAreaId:"00000000-0000-0000-0000-000000000000",academicYearId:0},e)},kJ=function(e){return Object.assign({serviceAreaId:"00000000-0000-0000-0000-000000000000",serviceArea:null},e)},GJ=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),VJ=function(){return VJ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},VJ.apply(this,arguments)},BJ=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._formItems=(new Map).set(uM.serviceAreaIdentifier,{required:!0,name:uM.serviceAreaIdentifier,label:"Identifier",rules:[Ot.required()]}).set(uM.description,{required:!0,name:uM.description,label:"Title",rules:[Ot.required()]}),n.fetchData=function(){n.setState({loading:!0});var e=[];e.push(n.loadServiceArea()),Promise.all(e).then((function(){n.setState({loading:!1}),n.resetForm()}))},n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields(),n.setState({altered:!1})},n.loadExisting=function(){n.props.serviceAreaId&&oM.getServiceAreaDetails(n.props.serviceAreaId).then((function(e){var t;e&&n.setState({serviceArea:null!==(t=e.serviceArea)&&void 0!==t?t:n.state.serviceArea}),n.resetForm()})).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))},n.loadNew=function(){n.setState({loading:!1})},n.submit=function(){var e;null===(e=n._formRef.current)||void 0===e||e.validateFields().then(n.handleSubmit,(function(){return n.setState({error:!0})}))},n.handleChange=function(){n.setState({altered:!0})},n.handleSubmit=function(){n.setState({submitting:!0});var e=kJ({serviceAreaId:n.props.serviceAreaId,serviceArea:uM.create(VJ(VJ({},n._formRef?n._formRef.current.getFieldsValue():null),{academicYear:n.props.academicYear}))});oM.saveServiceAreaDetails(e).then((function(e){var t,r;n.setState({submitted:!0}),(null===e||void 0===e?void 0:e.succeeded)?(n.setState({serviceArea:null!==(t=e.serviceArea)&&void 0!==t?t:uM.create()}),S.b.success("Saved"),n.props.onSave&&(null===(r=e.serviceArea)||void 0===r?void 0:r.id)&&
1(n.resetForm(),n.props.onSave(e.serviceArea.id))):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error(null===e||void 0===e?void 0:e.errors.join("\n")),n.setState({loading:!1,submitting:!1}))})).catch((function(e){n.setState({error:e,loading:!1,submitting:!1}),S.b.error("Service Area could not be saved")}))},n.state={serviceArea:uM.create({id:"",code:"",serviceAreaIdentifier:""})},n}return GJ(t,e),t.prototype.componentDidMount=function(){this.fetchData()},t.prototype.componentDidUpdate=function(e){this.props.serviceAreaId&&this.props!=e&&this.fetchData()},t.prototype.loadServiceArea=function(){this.state.loading||(this.props.serviceAreaId==re.default.Empty()||this.props.isNew?this.loadNew():this.loadExisting())},t.prototype.render=function(){return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(y.b,VJ({size:"small",direction:"vertical"},{children:[this.renderErrors(),Object(o.jsxs)(ht.a,VJ({ref:this._formRef,layout:"vertical",initialValues:this.state.serviceArea,onValuesChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!0},{children:[Object(o.jsx)(mt.a,VJ({},this._formItems.get(uM.serviceAreaIdentifier),_t.getValidation(uM.serviceAreaIdentifier,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,VJ({},this._formItems.get(uM.description),_t.getValidation(uM.description,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0)]}),void 0)]}),void 0)},t.prototype.renderErrors=function(){if(this.state.error)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t}(a.Component),WJ=function(){return WJ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},WJ.apply(this,arguments)};var zJ=function(e){var t=s.a.createRef(),n=e.serviceAreaId==re.default.Empty();return Object(o.jsx)(f.a,WJ({visible:!0,title:n?"New Service Area":"Edit Service Area",okText:"Save",onOk:function(){var e;null===(e=t.current)||void 0===e||e.submit()},okButtonProps:{htmlType:"submit"},onCancel:e.onCancel,destroyOnClose:!0},{children:Object(o.jsx)(BJ,{ref:t,serviceAreaId:e.serviceAreaId,isEditing:!0,onSave:e.onSave,isNew:n,academicYear:e.academicYear},void 0)}),void 0)},HJ=function(){return HJ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},HJ.apply(this,arguments)};var QJ=function(e){var t=void 0,n=Object(a.useState)(),r=n[0],i=n[1],s=function(e){e.id&&i(e.id)},d=function(){i(null)},c=function(e){null!=e&&e!=re.default.Empty()&&Rd.a.confirm({title:"Are you sure you want to delete this Service Area?",okText:"Delete",onOk:function(){return l(e)},okButtonProps:{type:"primary",danger:!0}})},l=function(e){var n=LJ({serviceAreaId:e});oM.deleteServiceArea(n).then((function(e){!0===(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Removed."),null===t||void 0===t||t.refresh()):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(){S.b.error("Service Area could not be removed.")}))},u=[];return u.push(oo.Reset()),Je.isAuthorized([gn.EDIT_SERVICE_AREA])&&u.push(oo.Default("New Service Area",(function(){i(re.default.Empty())}))),Object(o.jsxs)(o.Fragment,{children:[function(){if(null!=r)return Object(o.jsx)(zJ,{onCancel:d,visible:!0,serviceAreaId:r,academicYear:e.academicYear,onSave:d},void 0)}(),Object(o.jsx)(io,{ref:function(e){return t=e},serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:u,columns:[{title:"Identifier",dataIndex:uM.serviceAreaIdentifier,sorter:!0,width:25,filterType:wr.Text},{title:"Title",dataIndex:uM.description,sorter:!0,filterType:wr.Text},{title:"Actions",align:"center",dataIndex:uM.id,sorter:!1,width:50,render:function(e,t){if(Je.isAuthorized([gn.CONFIG_ACADEMIC_YEAR]))return Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(rt.a,HJ({type:"link",onClick:function(){return s(t)}},{children:Object(o.jsx)(Gr.a,{},void 0)}),void 0),Object(o.jsx)(rt.a,HJ({type:"link",onClick:function(){return c(t.id)}},{children:Object(o.jsx)(Yd.a,{},void 0)}),void 0)]},void 0)}}],fetchData:{fetch:function(t){return oM.getServiceAreaTableData(t,e.academicYear)}
1},stateSaving:{enabled:!0,tableUniqueKey:"service_area_list"}},void 0)]},void 0)},KJ=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),XJ=function(){return XJ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},XJ.apply(this,arguments)},JJ=function(e){function t(t){var n=e.call(this,t)||this;return n.loadAcademicYears=function(e){n.setState({loading:!0});var t=ML({academicYearId:e});return sL.getAcademicYears(t).then((function(e){var t;e&&e.academicYears&&n.setState({academicYears:null!==(t=e.academicYears)&&void 0!==t?t:[],academicYear:$r.getCurrentYear()})})).catch().finally((function(){n.setState({loading:!1})}))},n.onSelect=function(e){n.setState({academicYear:e})},n.onBack=function(){n.state.fromSelfStudies?T.push(x.generate(x.SELF_STUDIES_ACADEMIC_YEAR_DASHBOARD,{academicYearId:n.state.academicYear},{})):T.push(x.generate(x.HOME,{},{}))},n.state={loading:!1,academicYear:0,academicYears:[],fromSelfStudies:!1,fromAcademicYearList:!1},n}return KJ(t,e),t.prototype.componentDidMount=function(){var e=Number.parseInt(Hr.getPathPart(this.props.match,"academicYearId")),t=Hr.getParameter("fromAcademicYearList");this.setState({fromAcademicYearList:"true"==t}),this.state.academicYear!=e?this.setState({academicYear:e,fromSelfStudies:!0}):this.loadAcademicYears(e)},t.prototype.render=function(){var e=this,t=this.state.academicYear;return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Service Areas",breadcrumbs:this.state.fromSelfStudies?Xn.academicYearDataReview(t):Xn.serviceAreaList(),onBack:this.onBack,extra:this.state.fromSelfStudies?null:Object(o.jsx)(hd,XJ({value:this.state.academicYear,onSelect:this.onSelect,dropdownMatchSelectWidth:!1},{children:this.state.academicYears.map((function(t){return e.renderAcademicYear(t)}))}),void 0)},void 0),Object(o.jsx)(y.b,XJ({direction:"vertical",size:"large"},{children:Object(o.jsx)(Qn.a,XJ({title:"Service Areas"},{children:Object(o.jsx)(y.b,XJ({direction:"vertical",size:"large"},{children:Object(o.jsx)(QJ,{academicYear:this.state.academicYear,fromSelfStudies:this.state.fromSelfStudies,fromAcademicYearList:this.state.fromAcademicYearList},void 0)}),void 0)}),void 0)}),void 0)]},void 0)},t.prototype.renderAcademicYear=function(e){return Object(o.jsx)(pr.a.Option,XJ({value:e.id},{children:e.id}),e.id)},t}(a.Component);var $J=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected}}))(JJ)),ZJ=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),e$=function(){return e$=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},e$.apply(this,arguments)},t$=function(e){function t(t){var n=e.call(this,t)||this;return n.onBack=function(){T.goBack()},n.state={loading:!1,academicYear:0},n}return ZJ(t,e),t.prototype.componentDidMount=function(){var e=Number.parseInt(Hr.getPathPart(this.props.match,"academicYearId"));this.setState({academicYear:e})},t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Service Areas",breadcrumbs:Xn.academicYearServiceAreaConfigurationList(this.state.academicYear),onBack:this.onBack},void 0),Object(o.jsx)(y.b,e$({direction:"vertical",size:"large"},{children:Object(o.jsx)(Qn.a,e$({title:"Service Areas"},{children:Object(o.jsx)(y.b,e$({direction:"vertical",size:"large"},{children:Object(o.jsx)(QJ,{academicYear:this.state.academicYear},void 0)}),void 0)}),void 0)}),void 0)]},void 0)},t}(a.Component);var n$=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected}}))(t$)),r$=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i$=function(){return i$=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},i$.apply(this,arguments)},o$=function(e){function t(t){var n=e.call(this,t)||this;return n.loadAcademicYears=function(){n.setState({loading:!0});var e=ML({});return sL.getAcademicYears(e).then((function(e){var t;e&&e.academicYears&&n.setState({academicYears:null!==(t=e.academicYears)&&void 0!==t?t:[],academicYear:$r.getCurrentYear()})})).catch().finally((function(){n.setState({loading:!1})}
1))},n.onSelect=function(e){n.setState({academicYear:e})},n.onBack=function(){T.goBack()},n.state={loading:!1,academicYear:0,academicYears:[]},n}return r$(t,e),t.prototype.componentDidMount=function(){this.loadAcademicYears()},t.prototype.render=function(){var e=this;return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Service Areas",breadcrumbs:Xn.serviceAreaList(),onBack:this.onBack,extra:Object(o.jsx)(hd,i$({value:this.state.academicYear,onSelect:this.onSelect,dropdownMatchSelectWidth:!1},{children:this.state.academicYears.map((function(t){return e.renderAcademicYear(t)}))}),void 0)},void 0),Object(o.jsx)(y.b,i$({direction:"vertical",size:"large"},{children:Object(o.jsx)(Qn.a,i$({title:"Service Areas"},{children:Object(o.jsx)(y.b,i$({direction:"vertical",size:"large"},{children:Object(o.jsx)(QJ,{academicYear:this.state.academicYear},void 0)}),void 0)}),void 0)}),void 0)]},void 0)},t.prototype.renderAcademicYear=function(e){return Object(o.jsx)(pr.a.Option,i$({value:e.id},{children:e.id}),e.id)},t}(a.Component);var a$=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected}}))(o$)),s$=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),d$=function(){return d$=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},d$.apply(this,arguments)},c$=function(e){function t(t){var n=e.call(this,t)||this;return n.onBack=function(){T.push(x.generate(x.DATA_REVIEW_AREA_EDUCATION_AGENCY,{academicYearId:n.state.academicYear},{}))},n.onContinue=function(){T.push(x.generate(x.DATA_REVIEW_FEDERAL_CLUSTERS,{academicYearId:n.state.academicYear},{}))},n.state={academicYear:0},n}return s$(t,e),t.prototype.componentDidMount=function(){var e=Number.parseInt(Hr.getPathPart(this.props.match,"academicYearId"));this.state.academicYear!=e&&this.setState({academicYear:e})},t.prototype.render=function(){var e=0==this.state.academicYear?0:this.state.academicYear;return 0!=e?Object(o.jsx)(O.Content,{children:Object(o.jsx)(Yz,d$({breadcrumbs:Xn.academicYearDataReview(e),stepNumber:1,academicYear:e},{children:Object(o.jsx)(Qn.a,d$({title:"Service Areas"},{children:Object(o.jsxs)(y.b,d$({direction:"vertical",size:"middle"},{children:[Object(o.jsx)(QJ,{academicYear:this.state.academicYear},void 0),Object(o.jsxs)(y.b,{children:[Object(o.jsx)(lm,{onClick:this.onBack},void 0),Object(o.jsx)(Pz,{onClick:this.onContinue},void 0)]},void 0)]}),void 0)}),void 0)}),void 0)},void 0):Object(o.jsx)(pt.a,{},void 0)},t}(a.Component),l$=Object(u.i)(c$),u$={className:"AreaEducationAgencyDTO",create:function(e){return Object.assign(Q.create(),{id:"00000000-0000-0000-0000-000000000000",areaEducationAgencyIdentifier:0,academicYear:0,name:"",display:""},e)},id:"id",areaEducationAgencyIdentifier:"areaEducationAgencyIdentifier",academicYear:"academicYear",name:"name",display:"display"},p$=function(e){return Object.assign({id:"00000000-0000-0000-0000-000000000000",academicYear:null,areaEducationAgencyId:null},e)},f$=function(e){return Object.assign({areaEducationAgencyId:null,areaEducationAgency:null},e)},h$=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),v$=function(){return v$=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},v$.apply(this,arguments)},m$=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._formItems=(new Map).set(u$.areaEducationAgencyIdentifier,{required:!0,name:u$.areaEducationAgencyIdentifier,label:"Id",rules:[Ot.required(),Ot.onlyNumericCharacters()]}).set(u$.name,{required:!0,name:u$.name,label:"Name",rules:[Ot.required(),Ot.maxLength(100)]}),n.fetchData=function(){n.setState({loading:!0});var e=[];e.push(n.loadAreaEducationAgency()),Promise.all(e).then((function(){n.setState({loading:!1}),n.resetForm()}))},n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields(),n.setState({altered:!1})},n.loadExisting=function(){if(n.props.areaEducationAgencyId&&n.props.academicYear){var e=p$({id:n.props.areaEducationAgencyId});pz.getAreaEducationAgencyDetails(e).then((function(e){var t;e&&(n.setState({areaEducationAgency:null!==(t=e.areaEducationAgency)&&void 0!==t?t:u$.create({id:n.props.areaEducationAgencyId==re.default.Empty()?void 0:n.props.areaEducationAgencyId,areaEducationAgencyId:void 0,name:void 0})},(function(){return n.resetForm()})),n.props.areaEducationAgencyId==re.default.Empty()&&n.setState({altered:!0}))}
1)).catch((function(){n.setState({error:!0})})).finally((function(){n.setState({loading:!1})}))}},n.loadNew=function(){n.setState({loading:!1,areaEducationAgency:u$.create({id:n.props.areaEducationAgencyId==re.default.Empty()?void 0:n.props.areaEducationAgencyId,areaEducationAgencyIdentifier:""}),altered:!0})},n.handleChange=function(){n.setState({altered:!0})},n.submit=function(){var e;null===(e=n._formRef.current)||void 0===e||e.validateFields().then((function(){return n.handleSubmit()}),(function(){return n.setState({error:!0})}))},n.handleSubmit=function(){n.setState({submitting:!0});var e=f$({areaEducationAgencyId:n.props.areaEducationAgencyId,areaEducationAgency:u$.create(v$(v$({},n._formRef?n._formRef.current.getFieldsValue():null),{academicYear:n.props.academicYear}))});pz.saveAreaEducationAgencyDetails(e).then((function(e){var t,r;n.setState({submitted:!0}),(null===e||void 0===e?void 0:e.succeeded)?(n.setState({areaEducationAgency:null!==(t=e.areaEducationAgency)&&void 0!==t?t:u$.create(),fieldErrors:void 0,error:!1}),S.b.success("Saved"),n.props.onSave&&(null===(r=e.areaEducationAgency)||void 0===r?void 0:r.id)&&
1(n.resetForm(),n.props.onSave(e.areaEducationAgency.id))):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Area Education Agency could not be saved"),n.setState({loading:!1,submitting:!1}))})).catch((function(e){n.setState({error:e,loading:!1,submitting:!1}),S.b.error("Area Education Agency could not be saved")}))},n.state={areaEducationAgency:u$.create({id:void 0,name:void 0,areaEducationAgencyId:void 0})},n}return h$(t,e),t.prototype.componentDidMount=function(){this.fetchData()},t.prototype.componentDidUpdate=function(e){this.props!=e&&this.fetchData()},t.prototype.loadAreaEducationAgency=function(){this.state.loading||(this.props.areaEducationAgencyId==re.default.Empty()||this.props.isNew?this.loadNew():this.loadExisting())},t.prototype.render=function(){return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsxs)(y.b,v$({size:"small",direction:"vertical"},{children:[this.renderErrors(),Object(o.jsxs)(ht.a,v$({ref:this._formRef,layout:"vertical",initialValues:this.state.areaEducationAgency,onValuesChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!0},{children:[Object(o.jsx)(mt.a,v$({},this._formItems.get(u$.areaEducationAgencyIdentifier),_t.getValidation(u$.areaEducationAgencyIdentifier,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(il,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0),Object(o.jsx)(mt.a,v$({},this._formItems.get(u$.name),_t.getValidation(u$.name,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(il,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0)}),void 0)]}),void 0)]}),void 0)},t.prototype.renderErrors=function(){if(this.state.error)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t}(a.Component),g$=function(){return g$=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},g$.apply(this,arguments)};var b$=function(e){var t=s.a.createRef(),n=e.areaEducationAgencyId==re.default.Empty();return Object(o.jsx)(f.a,g$({visible:!0,title:n?"New Area Education Agency":"Edit Area Education Agency",okText:"Save",onOk:function(){var e;null===(e=t.current)||void 0===e||e.submit()},okButtonProps:{htmlType:"submit"},onCancel:e.onCancel,destroyOnClose:!0},{children:Object(o.jsx)(m$,{ref:t,areaEducationAgencyId:e.areaEducationAgencyId,isEditing:!0,onSave:e.onSave,isNew:n,academicYear:e.academicYear},void 0)}),void 0)},y$=function(e){return Object.assign({areaEducationAgencyId:"00000000-0000-0000-0000-000000000000",academicYearId:0},e)},O$=function(){return O$=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},O$.apply(this,arguments)};var j$=function(e){var t=void 0,n=Object(a.useState)(),r=n[0],i=n[1],s=function(e){e.id&&i(e.id)},d=function(){i(null)},c=function(e){null!=e&&f.a.confirm({title:"Are you sure you want to delete this Area Education Agency?",okText:"Delete",onOk:function(){return l(e)},okButtonProps:{type:"primary",danger:!0}})},l=function(e){var n=y$({areaEducationAgencyId:e});pz.deleteAreaEducationAgency(n).then((function(e){!0===(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Area Education Agency was removed."),null===t||void 0===t||t.refresh()):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(){S.b.error("Area Education Agency could not be removed.")}))},u=[];return u.push(oo.Reset()),Je.isAuthorized([gn.EDIT_AREA_EDUCATION_AGENCY])&&!e.programId&&u.push(oo.Default("New Area Education Agency",(function(){i(re.default.Empty())}))),Object(o.jsxs)(o.Fragment,{children:[function(){if(r)return Object(o.jsx)(b$,{onCancel:d,visible:!0,areaEducationAgencyId:r,academicYear:e.academicYear,onSave:d},void 0)}(),Object(o.jsx)(io,{ref:function(e){return t=e},serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:u,columns:[{title:"Identifier",dataIndex:u$.areaEducationAgencyIdentifier,sorter:!0,width:50,render:function(e,t){return t.areaEducationAgencyIdentifier},filterType:wr.Text},{title:"Name",dataIndex:u$.name,sorter:!0,render:function(e,t){return t.name},filterType:wr.Text},{title:"Actions",align:"center",dataIndex:u$.id,sorter:!1,render:function(e,t){if(Je.isAuthorized([gn.CONFIG_ACADEMIC_YEAR]))return Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(rt.a,O$({type:"link",title:"Edit",onClick:function(){return s(t)}},{children:Object(o.jsx)(Gr.a,{},void 0)}),void 0),Object(o.jsx)(rt.a,O$({type:"link",title:"Remove",onClick:function(){return c(t.id)}},{children:Object(o.jsx)(Yd.a,{},void 0)}),void 0)]},void 0)},width:50}],fetchData:{fetch:function(t){return pz.getAreaEducationAgencyTableData(t,e.academicYear)}
1},stateSaving:{enabled:!0,tableUniqueKey:"aea_list"}},void 0)]},void 0)},I$=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),S$=function(){return S$=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},S$.apply(this,arguments)},E$=function(e){function t(t){var n=e.call(this,t)||this;return n.loadAcademicYears=function(e){n.setState({loading:!0});var t=ML({academicYearId:e});return sL.getAcademicYears(t).then((function(e){var t;e&&e.academicYears&&n.setState({academicYears:null!==(t=e.academicYears)&&void 0!==t?t:[],academicYearId:$r.getCurrentYear()})})).catch().finally((function(){n.setState({loading:!1})}))},n.onSelect=function(e){n.setState({academicYearId:e})},n.onBack=function(){n.state.fromSelfStudies?T.push(x.generate(x.SELF_STUDIES_ACADEMIC_YEAR_DASHBOARD,{academicYearId:n.state.academicYearId},{})):T.push(x.generate(x.HOME,{},{}))},n.state={loading:!1,academicYearId:0,academicYears:[],fromSelfStudies:!1,fromAcademicYearList:!1,reviewAcademicYear:!1},n}return I$(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"academicYearId"),t=Hr.getParameter("fromAcademicYearList"),n=Hr.getParameter("reviewAcademicYear");this.setState({fromAcademicYearList:"true"==t,reviewAcademicYear:"true"==n}),this.state.academicYearId!=Number.parseInt(e)?this.setState({academicYearId:Number.parseInt(e),fromSelfStudies:!0}):this.loadAcademicYears(Number.parseInt(e))},t.prototype.render=function(){var e=this,t=0==this.state.academicYearId?0:this.state.academicYearId;return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Area Education Agencies",breadcrumbs:this.state.fromSelfStudies?Xn.areaEducationAgencyReview(t):Xn.areaEducationAgencyList(t,this.state.reviewAcademicYear),onBack:this.onBack,extra:this.state.fromSelfStudies?null:Object(o.jsx)(hd,S$({value:this.state.academicYearId,onSelect:this.onSelect,dropdownMatchSelectWidth:!1},{children:this.state.academicYears.map((function(t){return e.renderAcademicYear(t)}))}),void 0)},void 0),Object(o.jsx)(y.b,S$({direction:"vertical",size:"large"},{children:Object(o.jsx)(Qn.a,S$({title:"Area Education Agencies"},{children:Object(o.jsx)(y.b,S$({direction:"vertical",size:"large"},{children:Object(o.jsx)(j$,{academicYear:this.state.academicYearId,fromSelfStudies:this.state.fromSelfStudies,fromAcademicYearList:this.state.fromAcademicYearList},void 0)}),void 0)}),void 0)}),void 0)]},void 0)},t.prototype.renderAcademicYear=function(e){return Object(o.jsx)(pr.a.Option,S$({value:e.id},{children:e.id}),e.id)},t}(a.Component);var R$=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected}}))(E$)),_$=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),T$=function(){return T$=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},T$.apply(this,arguments)},C$=function(e){function t(t){var n=e.call(this,t)||this;return n.onBack=function(){T.goBack()},n.state={loading:!1,academicYear:0},n}return _$(t,e),t.prototype.componentDidMount=function(){var e=Number.parseInt(Hr.getPathPart(this.props.match,"academicYearId"));this.setState({academicYear:e})},t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Area Education Agencies",breadcrumbs:Xn.academicYearAreaEducationAgencyConfigurationList(this.state.academicYear),onBack:this.onBack},void 0),Object(o.jsx)(y.b,T$({direction:"vertical",size:"large"},{children:Object(o.jsx)(Qn.a,T$({title:"Area Education Agencies"},{children:Object(o.jsx)(y.b,T$({direction:"vertical",size:"large"},{children:Object(o.jsx)(j$,{academicYear:this.state.academicYear},void 0)}),void 0)}),void 0)}),void 0)]},void 0)},t}(a.Component);var x$=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected}}))(C$)),A$=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),P$=function(){return P$=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},P$.apply(this,arguments)},N$=function(e){function t(t){var n=e.call(this,t)||this;return n._areaEducationAgencyDetailsRef=a.createRef(),n.loadAreaEducationAgency=function(e,t,r){n.setState({id:e});var i=p$({id:e,academicYear:t,areaEducationAgencyId:r});pz.getAreaEducationAgencyDetails(i).then((function(e){var t;e.areaEducationAgency?n.setState({areaEducationAgency:e.areaEducationAgency,id:null!==(t=e.areaEducationAgency.id)&&void 0!==t?t:re.default.Empty(),areaEducationAgencyId:e.areaEducationAgency.areaEducationAgencyIdentifier,isNew:!1,isEditing:!1}):n.setState({isNew:!0,id:re.default.Empty(),areaEducationAgency:void 0,isEditing:!0})}
1)).catch((function(){n.setState({error:!0})}))},n.loadAcademicYears=function(){n.setState({loading:!0});var e=ML({});return sL.getAcademicYears(e).then((function(e){var t;e&&e.academicYears&&n.setState({academicYears:null!==(t=e.academicYears)&&void 0!==t?t:[]})})).catch((function(){n.setState({error:!0})}))},n.toggleEdit=function(){var e;n.state.isEditing&&(null===(e=n._areaEducationAgencyDetailsRef.current)||void 0===e||e.resetForm()),n.setState({isEditing:!n.state.isEditing})},n.areaEducationAgencyDetailsPageSaved=function(e){n.setState({isEditing:!1,isNew:!1}),e!=n.state.id&&(T.push(x.generate(x.AREA_EDUCATION_AGENCY_DETAILS,{id:e},{academicYearId:n.state.academicYearId,fromSelfStudies:n.state.fromSelfStudies,fromAcademicYearList:n.state.fromAcademicYearList,reviewAcademicYear:n.state.reviewAcademicYear,fromDataReview:n.state.fromDataReview})),n.loadAreaEducationAgency(e))},n.deleteConfirmation=function(e,t){f.a.confirm({title:"Are you sure you want to delete this Area Education Agency?",okText:"Delete",onOk:function(){return n.deleteAreaEducationAgency(e,t)}})},n.deleteAreaEducationAgency=function(e,t){n.setState({submitting:!0});var r=y$({areaEducationAgencyId:e,academicYearId:t});pz.deleteAreaEducationAgency(r).then((function(e){n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,altered:!(null===e||void 0===e?void 0:e.succeeded)}),!0===(null===e||void 0===e?void 0:e.succeeded)?S.b.success("Area Education Agency was removed."):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(e){n.setState({error:e}),S.b.error("Area Education Agency could not be removed.")})).finally((function(){n.setState({loading:!1}),n.goToListing()}))},n.goToListing=function(){n.state.reviewAcademicYear?T.push(x.generate(x.REVIEW_AREA_EDUCATION_AGENCY,{academicYearId:n.state.academicYearId},{fromSelfStudies:n.state.fromSelfStudies,fromAcademicYearList:n.state.fromAcademicYearList,reviewAcademicYear:!0})):n.state.fromDataReview?T.push(x.generate(x.DATA_REVIEW_AREA_EDUCATION_AGENCY,{academicYearId:n.state.academicYearId},{fromAcademicYearList:n.state.fromAcademicYearList})):n.state.fromSelfStudies?T.push(x.generate(x.AREA_EDUCATION_AGENCIES,{academicYearId:n.state.academicYearId},{fromSelfStudies:n.state.fromSelfStudies,fromAcademicYearList:n.state.fromAcademicYearList})):T.push(x.generate(x.ALL_AREA_EDUCATION_AGENCIES))},n.onSelect=function(e){n.setState({academicYearId:e}),n.loadAreaEducationAgency(n.state.id,e,n.state.areaEducationAgencyId)},n.state={id:re.default.Empty(),areaEducationAgencyId:0,academicYears:[],academicYearId:0,fromAcademicYearList:!1,fromSelfStudies:!1,fromDataReview:!1,reviewAcademicYear:!1},n}return A$(t,e),t.prototype.componentDidMount=function(){var e,t=this,n=Hr.getPathPart(this.props.match,"id"),r=Hr.getParameter("academicYearId"),i=Hr.getParameter("fromAcademicYearList"),o=Hr.getParameter("fromSelfStudies"),a=Hr.getParameter("fromDataReview"),s=Hr.getParameter("reviewAcademicYear");(this.setState({academicYearId:Number.parseInt(r),fromSelfStudies:"true"==o,fromAcademicYearList:"true"==i,fromDataReview:"true"==a,reviewAcademicYear:"true"==s}),this.props.match.path.split("/").findIndex((function(e){return"new"==e}))>-1)?(this.setState({isEditing:!0,isNew:!0,loading:!1}),(e=[]).push(this.loadAcademicYears()),Promise.all(e).then((function(){t.setState({loading:!1})}))):((e=[]).push(this.loadAreaEducationAgency(n)),e.push(this.loadAcademicYears()),Promise.all(e).then((function(){t.setState({loading:!1})})))},t.prototype.render=function(){var e,t,n=this.state.loading?"...":this.state.isNew?"New Area Education Agency":null!==(t=null===(e=this.state.areaEducationAgency)||void 0===e?void 0:e.name)&&void 0!==t?t:"...";return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:n,onBack:this.goToListing,breadcrumbs:Xn.areaEducationAgencyDetailPage(n,this.state.id,this.state.academicYearId,this.state.fromAcademicYearList,this.state.fromSelfStudies,this.state.reviewAcademicYear),extra:this.renderMoreActions()},void 0),this.renderDetailsCard()]},void 0)},t.prototype.renderDetailsCard=function(){var e=this.state.id==re.default.Empty()?null:Object(o.jsx)(Ze,P$({validFeatureFlags:[gn.EDIT_AREA_EDUCATION_AGENCY]},{children:Object(o.jsx)(Br,{isEditing:this.state.isEditing,onClick:this.toggleEdit},void 0)}),void 0);
1return Object(o.jsx)(Qn.a,P$({title:"Details",extra:e},{children:Object(o.jsx)(m$,{ref:this._areaEducationAgencyDetailsRef,areaEducationAgencyId:this.state.id,isEditing:this.state.isEditing,isNew:this.state.isNew,onSave:this.areaEducationAgencyDetailsPageSaved,academicYear:this.state.academicYearId},void 0)}),void 0)},t.prototype.renderMoreActions=function(){var e=this,t=Object(o.jsx)(Gt.a,{children:Object(o.jsx)(Gt.a.Item,P$({title:"Delete Area Education Agency",onClick:function(){return e.deleteConfirmation(e.state.id,e.state.academicYearId)}},{children:"Delete Area Education Agency"}),this.state.id)},void 0);return Object(o.jsxs)(o.Fragment,{children:[this.state.reviewAcademicYear?null:Object(o.jsx)(hd,P$({value:this.state.academicYearId,onSelect:this.onSelect,dropdownMatchSelectWidth:!1},{children:this.state.academicYears.map((function(t){return e.renderAcademicYear(t)}))}),void 0),Object(o.jsx)(Ze,P$({validFeatureFlags:[gn.EDIT_AREA_EDUCATION_AGENCY]},{children:this.state.isNew?null:Object(o.jsx)(la.a,P$({overlay:t},{children:Object(o.jsx)(rt.a,P$({size:"large",type:"link"},{children:Object(o.jsx)(aa.a,{},void 0)}),void 0)}),void 0)}),void 0)]},void 0)},t.prototype.renderAcademicYear=function(e){return Object(o.jsx)(pr.a.Option,P$({value:e.id},{children:e.id}),e.id)},t}(a.Component),w$=Object(u.i)(N$),D$=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),q$=function(){return q$=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},q$.apply(this,arguments)},F$=function(e){function t(t){var n=e.call(this,t)||this;return n.onClick=function(){f.a.confirm({title:"Are you sure you want to move onto the next review step?",width:500})},n.state={academicYearId:0,fromSelfStudies:!1,fromAcademicYearList:!1},n}return D$(t,e),t.prototype.componentDidMount=function(){var e;this.props.academicYearId&&0!=this.props.academicYearId&&this.setState({academicYearId:this.props.academicYearId,fromAcademicYearList:null!==(e=this.props.fromAcademicYearList)&&void 0!==e&&e})},t.prototype.componentDidUpdate=function(e){var t;this.props.academicYearId&&0!=this.props.academicYearId&&e.academicYearId!=this.props.academicYearId&&this.setState({academicYearId:this.props.academicYearId,fromAcademicYearList:null!==(t=this.props.fromAcademicYearList)&&void 0!==t&&t})},t.prototype.render=function(){return Object(o.jsxs)(y.b,q$({direction:"vertical"},{children:[Object(o.jsx)(Qn.a,q$({title:"Area Education Agencies"},{children:Object(o.jsx)(y.b,q$({direction:"vertical",size:"large"},{children:Object(o.jsx)(j$,{reviewAcademicYear:!0,academicYear:this.state.academicYearId,fromSelfStudies:this.state.fromSelfStudies,fromAcademicYearList:this.state.fromAcademicYearList},void 0)}),void 0)}),void 0),this.renderActions()]}),void 0)},t.prototype.renderActions=function(){if(!this.props.readonly)return Object(o.jsx)(y.b,q$({direction:"horizontal",wrap:!0},{children:Object(o.jsx)(PV,{submitting:this.state.submitting,onClick:this.onClick},void 0)}),void 0)},t}(a.Component),M$=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Y$=function(){return Y$=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Y$.apply(this,arguments)},U$=function(e){function t(t){var n=e.call(this,t)||this;return n.loadAcademicYears=function(e){n.setState({loading:!0});var t=ML({academicYearId:e});return sL.getAcademicYears(t).then((function(e){var t;e&&e.academicYears&&n.setState({academicYears:null!==(t=e.academicYears)&&void 0!==t?t:[],academicYearId:$r.getCurrentYear()})})).catch().finally((function(){n.setState({loading:!1})}
1))},n.onSelect=function(e){n.setState({academicYearId:e})},n.onBack=function(){n.state.reviewAcademicYear?T.push(x.generate(x.NEW_ACADEMIC_YEAR_FROM_LIST,{academicYearId:n.state.academicYearId},{fromSelfStudies:n.state.fromSelfStudies,fromAcademicYearList:n.state.fromAcademicYearList,reviewAcademicYear:!0})):n.state.fromSelfStudies&&T.push(x.generate(x.SELF_STUDIES_ACADEMIC_YEAR_DASHBOARD,{academicYearId:n.state.academicYearId},{}))},n.state={loading:!1,academicYearId:0,academicYears:[],fromSelfStudies:!1,fromAcademicYearList:!1,reviewAcademicYear:!1},n}return M$(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"academicYearId"),t=Hr.getParameter("fromAcademicYearList"),n=Hr.getParameter("reviewAcademicYear");this.setState({fromAcademicYearList:"true"==t,reviewAcademicYear:"true"==n}),this.state.academicYearId!=Number.parseInt(e)?this.setState({academicYearId:Number.parseInt(e),fromSelfStudies:!0}):this.loadAcademicYears(Number.parseInt(e))},t.prototype.render=function(){var e=this;return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Area Education Agencies",breadcrumbs:Xn.newAcademicYearFromAcademicList(this.state.academicYearId),onBack:this.onBack,extra:this.state.fromSelfStudies?null:Object(o.jsx)(hd,Y$({value:this.state.academicYearId,onSelect:this.onSelect,dropdownMatchSelectWidth:!1},{children:this.state.academicYears.map((function(t){return e.renderAcademicYear(t)}))}),void 0)},void 0),Object(o.jsx)(y.b,Y$({direction:"vertical",size:"large"},{children:Object(o.jsxs)(y.b,Y$({direction:"vertical",size:"large"},{children:[Object(o.jsx)("div",{id:"academicYearCardPortal"},void 0),Object(o.jsx)(RW,Y$({currentStep:1,title:"Opening "+this.state.academicYearId+"-"+(this.state.academicYearId+1)+" Program Review Year"},{children:Object(o.jsx)(F$,{fromAcademicYearList:this.state.fromAcademicYearList,academicYearId:this.state.academicYearId},void 0)}),void 0)]}),void 0)}),void 0)]},void 0)},t.prototype.renderAcademicYear=function(e){return Object(o.jsx)(pr.a.Option,Y$({value:e.id},{children:e.id}),e.id)},t}(a.Component);var L$=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected}}))(U$)),k$=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),G$=function(){return G$=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},G$.apply(this,arguments)},V$=function(e){function t(t){var n=e.call(this,t)||this;return n.onContinue=function(){T.push(x.generate(x.DATA_REVIEW_SERVICE_AREAS,{academicYearId:n.state.academicYear},{}))},n.state={academicYear:0},n}return k$(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"academicYearId");this.state.academicYear!=Number.parseInt(e)&&this.setState({academicYear:Number.parseInt(e)})},t.prototype.render=function(){var e=0==this.state.academicYear?0:this.state.academicYear;return 0!=e?Object(o.jsx)(O.Content,{children:Object(o.jsx)(Yz,G$({breadcrumbs:Xn.academicYearDataReview(e),stepNumber:0,academicYear:e},{children:Object(o.jsxs)(Qn.a,G$({title:"Area Education Agencies"},{children:[Object(o.jsx)(y.b,G$({direction:"vertical",size:"middle"},{children:Object(o.jsx)(j$,{academicYear:this.state.academicYear},void 0)}),void 0),Object(o.jsx)(Pz,{onClick:this.onContinue},void 0)]}),void 0)}),void 0)},void 0):Object(o.jsx)(pt.a,{},void 0)},t}(a.Component),B$=Object(u.i)(V$),W$=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}
1(),z$=function(){return z$=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},z$.apply(this,arguments)},H$=function(e){function t(t){var n=e.call(this,t)||this;return n.loadAcademicYears=function(){n.setState({loading:!0});var e=ML({});return sL.getAcademicYears(e).then((function(e){var t;e&&e.academicYears&&n.setState({academicYears:null!==(t=e.academicYears)&&void 0!==t?t:[],academicYearId:$r.getCurrentYear()})})).catch().finally((function(){n.setState({loading:!1})}))},n.onSelect=function(e){n.setState({academicYearId:e})},n.onBack=function(){T.goBack()},n.state={loading:!1,academicYearId:0,academicYears:[]},n}return W$(t,e),t.prototype.componentDidMount=function(){this.loadAcademicYears()},t.prototype.render=function(){var e=this;return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"Area Education Agencies",breadcrumbs:Xn.areaEducationAgencyConfigurationList(),onBack:this.onBack,extra:Object(o.jsx)(hd,z$({value:this.state.academicYearId,onSelect:this.onSelect,dropdownMatchSelectWidth:!1},{children:this.state.academicYears.map((function(t){return e.renderAcademicYear(t)}))}),void 0)},void 0),Object(o.jsx)(y.b,z$({direction:"vertical",size:"large"},{children:Object(o.jsx)(Qn.a,z$({title:"Area Education Agencies"},{children:Object(o.jsx)(y.b,z$({direction:"vertical",size:"large"},{children:Object(o.jsx)(j$,{academicYear:this.state.academicYearId},void 0)}),void 0)}),void 0)}),void 0)]},void 0)},t.prototype.renderAcademicYear=function(e){return Object(o.jsx)(pr.a.Option,z$({value:e.id},{children:e.id}),e.id)},t}(a.Component);var Q$=Object(u.i)(Object(l.b)((function(e){return{currentUser:e.UserSession.Value,selectedInstitution:e.Institution.Selected}}))(H$)),K$=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),X$=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return K$(t,e),t.prototype.getAPITokenUsersList=function(e){var t="api/APITokenUsers/list";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.addAPITokenUser=function(e){var t="api/APITokenUsers/addAPITokenUser";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.getAPITokenUserDetails=function(e){var t="api/APITokenUsers/"+encodeURIComponent(e);return t=t.replace(/null|undefined/gi,""),this.SendRequest(null,"post",t,!0,!1)},t.prototype.deleteAPITokenUser=function(e){var t="api/APITokenUsers/deleteAPITokenUser";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.saveAPITokenUser=function(e){var t="api/APITokenUsers/save";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t.prototype.regenerateAPITokenUserSecret=function(e){var t="api/APITokenUsers/regenerateAPITokenUserSecret";return t=t.replace(/null|undefined/gi,""),this.SendRequest(e,"post",t,!0,!1)},t}(U),J$=new X$,$$=function(e){return Object.assign({userName:""},e)},Z$="userName",eZ=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),tZ=function(){return tZ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},tZ.apply(this,arguments)},nZ=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._formItems=(new Map).set(Z$,{required:!0,name:Z$,label:"API Name",rules:[Ot.required()]}),n.submit=function(){n.handleSubmit()},n.reset=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields()},n.handleChange=function(){n.setState({altered:!0})},n.handleSubmit=function(){n.setState({submitting:!0});var e=$$(n._formRef?n._formRef.current.getFieldsValue():null);J$.addAPITokenUser(e).then((function(e){var t;n.setState({submitted:!0}),(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Added! The secret is, "+(null===e||void 0===e?void 0:e.secret)+" and key is "+(null===e||void 0===e?void 0:e.user.apiKey)),n.props.onSuccess&&n.props.onSuccess(),null===(t=n._formRef.current)||void 0===t||t.resetFields(),n.setState({altered:!1}),n.props.onSuccess&&n.props.onSuccess()):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),S.b.error("Error Adding User"))})).catch((function(e){n.setState({error:e}),S.b.error("Error Adding User")})).finally((function(){n.setState({loading:!1,submitting:!1})}
1))},n.state={},n}return eZ(t,e),t.prototype.render=function(){return this.state.loading?Object(o.jsx)(pt.a,{active:!0},void 0):Object(o.jsx)(y.b,tZ({size:"small",direction:"vertical"},{children:Object(o.jsxs)(ht.a,tZ({ref:this._formRef,layout:"vertical",onValuesChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!0},{children:[Object(o.jsx)(mt.a,tZ({},this._formItems.get(Z$),_t.getValidation(Z$,this.state.fieldErrors,this.state.submitted),{children:Object(o.jsx)(ut.a,{disabled:this.state.loading||this.state.submitting},void 0)}),void 0),this.renderSave()]}),void 0)}),void 0)},t.prototype.renderSave=function(){return Object(o.jsx)(Ze,tZ({validFeatureFlags:(this.props.isNew,[gn.EDIT_CATEGORY])},{children:Object(o.jsx)(y.b,tZ({direction:"horizontal"},{children:Object(o.jsx)(Tr,{htmlType:"submit",disabled:!br.canSubmit(this._formRef,this._formItems),saving:this.state.submitting,hidden:!0},void 0)}),void 0)}),void 0)},t.prototype.renderErrors=function(){if(this.state.error)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t}(a.Component),rZ={className:"APITokenUserDTO",create:function(e){return Object.assign(Q.create(),{id:null,apiName:"",apiKey:"",roleIds:[],roles:[]},e)},id:"id",apiName:"apiName",apiKey:"apiKey",roleIds:"roleIds",roles:"roles"},iZ=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),oZ=function(){return oZ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},oZ.apply(this,arguments)},aZ=function(e){function t(t){var n=e.call(this,t)||this;return n._addAPITokenUserFormRef=a.createRef(),n.fetchData=function(){Ii.Roles().then((function(e){return n.setState({roles:e})}));Promise.all([]).then((function(){n.setState({loading:!1})}))},n.getColumnDefinitions=function(){var e=[{title:"",dataIndex:!1,width:25},{title:"API Name",dataIndex:rZ.apiName,sorter:!0,filterType:wr.Text},{title:"API Key",dataIndex:rZ.apiKey,sorter:!0,filterType:wr.Text,width:350}];return e.push({title:"Roles",dataIndex:rZ.roles,renderDataTransform:function(e){if(e)return ei.newLineFormat(e,!0)},filterType:wr.DropdownMulti,width:350,dropdownFilterOptions:n.state.roles}),e},n.openAPITokenUser=function(e){e.id&&T.push(x.generate(x.API_TOKEN_USER_DETAILS,{id:e.id},{}))},n.addAPITokenUser=function(){n.setState({addAPITokenUser:!0})},n.submitAddAPITokenUser=function(){var e;null===(e=n._addAPITokenUserFormRef.current)||void 0===e||e.submit()},n.cancelAddAPITokenUser=function(){var e;n.setState({addAPITokenUser:!1}),null===(e=n._addAPITokenUserFormRef.current)||void 0===e||e.reset()},n.apiTokenUserAdded=function(){var e;n.setState({addAPITokenUser:!1}),null===(e=n._dataTable)||void 0===e||e.refresh()},n.renderErrors=function(){if(n.state.errors&&n.state.errors.length>0)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:n.state.errors.map((function(e){return Object(o.jsxs)(o.Fragment,{children:[e," ",Object(o.jsx)("br",{},void 0)]},void 0)}))},void 0)},n.state={roles:[],statuses:[],addAPITokenUser:!1},n}return iZ(t,e),t.prototype.componentDidMount=function(){this.fetchData()},t.prototype.render=function(){return Object(o.jsxs)(o.Fragment,{children:[this.renderAddAPITokenUserModal(),this.renderDataTable()]},void 0)},t.prototype.renderAddAPITokenUserModal=function(){return Object(o.jsx)(f.a,oZ({visible:this.state.addAPITokenUser,title:"Add User",okText:"Add",onOk:this.submitAddAPITokenUser,onCancel:this.cancelAddAPITokenUser},{children:Object(o.jsx)(nZ,{ref:this._addAPITokenUserFormRef,onSuccess:this.apiTokenUserAdded},void 0)}),void 0)},t.prototype.renderDataTable=function(){var e=this,t=[];return t.push(oo.Reset()),Je.isAuthorized([gn.MANAGE_API_TOKEN_USER])&&t.pu
1sh(oo.Default("Add User",(function(){return e.addAPITokenUser()}))),Object(o.jsxs)(o.Fragment,{children:[this.renderErrors(),Object(o.jsx)(io,{ref:function(t){return e._dataTable=t},onRowClick:this.openAPITokenUser,serverSide:!0,tableProps:{rowKey:"id",scroll:{x:500}},globalSearch:!0,buttonBar:t,columns:this.getColumnDefinitions(),fetchData:{fetch:function(e){return J$.getAPITokenUsersList(e)}},stateSaving:{enabled:!0,tableUniqueKey:"api_token_users_list"}},void 0)]},void 0)},t}(a.Component),sZ=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),dZ=function(e){function t(t){return e.call(this,t)||this}return sZ(t,e),t.prototype.render=function(){return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:"API Token Users",breadcrumbs:Xn.apiTokenUserList()},void 0),Object(o.jsx)(Qn.a,{children:Object(o.jsx)(aZ,{},void 0)},void 0)]},void 0)},t}(a.Component);var cZ=Object(u.i)(Object(l.b)((function(){return{}}))(dZ)),lZ=n(721),uZ=n.n(lZ),pZ=function(e){return Object.assign({apiTokenUserId:"00000000-0000-0000-0000-000000000000",apiTokenUser:null},e)},fZ=function(e){return Object.assign({apiTokenUserId:null},e)},hZ=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),vZ=function(){return vZ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},vZ.apply(this,arguments)},mZ=function(e){function t(t){var n=e.call(this,t)||this;return n._formRef=a.createRef(),n._formItems=(new Map).set(rZ.apiName,{required:!0,name:rZ.apiName,label:"API Name",rules:[Ot.required()]}).set(rZ.apiKey,{name:rZ.apiKey,label:"API Key"}).set("Secret",{name:"Secret",label:"Secret"}),n.resetForm=function(){var e;null===(e=n._formRef.current)||void 0===e||e.resetFields(),n.setState({altered:!1})},n.loadExisting=function(){J$.getAPITokenUserDetails(n.props.apiTokenUserId).then((function(e){var t;e&&(n.setState({apiTokenUser:e.apiTokenUser}),null===(t=n._formRef.current)||void 0===t||t.resetFields())})).catch((function(){n.setState({error:!0})}))},n.handleSubmit=function(){n.setState({submitting:!0});var e=pZ({APITokenUserId:n.props.apiTokenUserId,APITokenUser:rZ.create(n._formRef?n._formRef.current.getFieldsValue():null)});J$.saveAPITokenUser(e).then((function(e){var t,r;n.setState({submitted:!0}),(null===e||void 0===e?void 0:e.succeeded)?(S.b.success("Saved"),n.setState({apiTokenUser:null===e||void 0===e?void 0:e.apiTokenUser,altered:!e.succeeded}),(null===(t=e.apiTokenUser)||void 0===t?void 0:t.id)&&n.props.onSave&&n.props.onSave(e.apiTokenUser.id),null===(r=n._formRef.current)||void 0===r||r.resetFields()):(n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors}),xi.a.error({message:"Uh oh!",description:null===e||void 0===e?void 0:e.errors.join("\n")}))})).catch((function(e){n.setState({error:e}),xi.a.error({message:"Uh oh!",description:"User could not be saved."})})).finally((function(){n.setState({loading:!1,submitting:!1})}))},n.handleChange=function(){n.setState({altered:!0})},n.regenerateSecret=function(e){f.a.confirm({title:"Are you sure you want to regenerate the secret?",okText:"Regenerate",onOk:function(){return n.regenerateAPITokenUserSecret(e)}})},n.regenerateAPITokenUserSecret=function(e){var t=fZ({apiTokenUserId:e});J$.regenerateAPITokenUserSecret(t).then((function(e){n.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,altered:!(null===e||void 0===e?void 0:e.succeeded)}),!0===(null===e||void 0===e?void 0:e.succeeded)?n.setState({regeneratedSecret:null===e||void 0===e?void 0:e.secret}):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(e){n.setState({error:e}
1),S.b.error("The secret could not be regenerated.")})).finally((function(){n.setState({loading:!1})}))},n.state={apiTokenUser:null,regeneratedSecret:null},n}return hZ(t,e),t.prototype.componentDidMount=function(){this.loadUser()},t.prototype.componentDidUpdate=function(e){this.props.apiTokenUserId&&this.props.apiTokenUserId!=e.apiTokenUserId&&this.loadUser()},t.prototype.loadUser=function(){var e=this;this.setState({loading:!0});var t=[];this.props.apiTokenUserId!=re.default.Empty()&&t.push(this.loadExisting()),Promise.all(t).then((function(){e.setState({loading:!1})}))},t.prototype.render=function(){var e=this;if(this.state.loading||null==this.state.apiTokenUser||void 0==this.state.apiTokenUser)return Object(o.jsx)(pt.a,{active:!0},void 0);var t=null==this.state.apiTokenUser.id?"":this.state.apiTokenUser.id;return Object(o.jsxs)(y.b,vZ({size:"small",direction:"vertical"},{children:[this.renderErrors(),Object(o.jsxs)(ht.a,vZ({ref:this._formRef,layout:"vertical",onChange:this.handleChange,onFinish:this.handleSubmit,requiredMark:!0,initialValues:this.state.apiTokenUser},{children:[Object(o.jsx)(ht.a.Item,vZ({},_t.getValidation(rZ.apiName,this.state.fieldErrors,this.state.submitted),this._formItems.get(rZ.apiName),{children:Je.isAuthorized([gn.MANAGE_API_TOKEN_USER])?Object(o.jsx)(ut.a,{disabled:!this.props.isEditing||this.state.loading||this.state.submitting},void 0):Object(o.jsx)(ud,{},void 0)}),void 0),Object(o.jsx)(ht.a.Item,vZ({},_t.getValidation(rZ.apiKey,this.state.fieldErrors,this.state.submitted),this._formItems.get(rZ.apiKey),{children:Object(o.jsx)(ud,{},void 0)}),void 0),Object(o.jsx)(ht.a.Item,vZ({},this._formItems.get("Secret"),{children:Je.isAuthorized([gn.MANAGE_API_TOKEN_USER])&&!this.state.regeneratedSecret?Object(o.jsx)(rt.a,vZ({type:"primary",disabled:!this.props.isEditing||this.state.loading||this.state.submitting,onClick:function(){return e.regenerateSecret(t)}},{children:"Regenerate Secret"}),void 0):Je.isAuthorized([gn.MANAGE_API_TOKEN_USER])&&this.state.regeneratedSecret?Object(o.jsxs)(o.Fragment,{children:[" Please copy the secret below. It will not be shown again once you leave this page. ",Object(o.jsx)("br",{},void 0)," ",Object(o.jsx)(uZ.a,vZ({strong:!0},{children:this.state.regeneratedSecret}),void 0)]},void 0):"No regenerate available"}),void 0),this.renderActions()]}),void 0)]}),void 0)},t.prototype.renderActions=function(){if(this.props.isEditing&&Je.
1isAuthorized([gn.MANAGE_API_TOKEN_USER]))return Object(o.jsxs)(y.b,vZ({direction:"horizontal",wrap:!0},{children:[Object(o.jsx)(Tr,{disabled:this.state.loading,saving:this.state.submitting,saved:this.state.saved},void 0),Object(o.jsx)(Ir,{disabled:!this.state.altered,resetting:this.state.resetting,onConfirm:this.resetForm},void 0)]}),void 0)},t.prototype.renderErrors=function(){if(this.state.error)return Object(o.jsx)(ct.a,{type:"error",message:"Error",showIcon:!0,description:"There were errors submitting your request. Please review the fields below."},void 0)},t}(a.Component),gZ=function(e){return Object.assign({apiTokenUserId:null},e)},bZ=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),yZ=function(){return yZ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},yZ.apply(this,arguments)},OZ=function(e){function t(n){var r=e.call(this,n)||this;return r._apiTokenUserDetailsRef=a.createRef(),r._userRolesRef=a.createRef(),r.loadAPITokenUser=function(e){r.setState({loading:!0,apiTokenUserId:e}),J$.getAPITokenUserDetails(e).then((function(e){e.apiTokenUser&&r.setState({apiTokenUser:e.apiTokenUser})})).finally((function(){r.setState({loading:!1})}))},r.toggleIsEditing=function(e,n){var i,o,a;if(r.state.editings){var s=r.state.editings;if(void 0!==n?s.set(e,n):s.set(e,null===(i=!s.get(e))||void 0===i||i),!s.get(e))switch(e){case t.API_TOKEN_USER_DETAILS:null===(o=r._apiTokenUserDetailsRef.current)||void 0===o||o.resetForm();break;case t.API_TOKEN_USER_ROLES:null===(a=r._userRolesRef.current)||void 0===a||a.resetForm()}r.setState({editings:s})}},r.isEditingCheck=function(){return!!r.state.editings&&Array.from(r.state.editings.values()).includes(!0)},r.userDetailsSaved=function(e){r.toggleIsEditing(t.API_TOKEN_USER_DETAILS,!1),e!=r.state.apiTokenUserId?T.replace(x.generate(x.API_TOKEN_USER_DETAILS,{id:e})):r.loadAPITokenUser(e)},r.deleteConfirmation=function(e){f.a.confirm({title:"Are you sure you want to delete this API Token User?",okText:"Delete",onOk:function(){return r.deleteAPITokenUser(e)}})},r.deleteAPITokenUser=function(e){r.setState({submitting:!0});var t=gZ({apiTokenUserId:e});J$.deleteAPITokenUser(t).then((function(e){r.setState({error:!(null===e||void 0===e?void 0:e.succeeded),message:null===e||void 0===e?void 0:e.errors.join("\n"),fieldErrors:null===e||void 0===e?void 0:e.fieldErrors,altered:!(null===e||void 0===e?void 0:e.succeeded)}),!0===(null===e||void 0===e?void 0:e.succeeded)?S.b.success("API Token User was removed."):S.b.error(null===e||void 0===e?void 0:e.errors.join("\n"))})).catch((function(e){r.setState({error:e}),S.b.error("API Token User could not be removed.")})).finally((function(){r.setState({loading:!1}),r.goToAPITokenUsers()}))},r.userRolesSaved=function(){r.toggleIsEditing(t.API_TOKEN_USER_ROLES,!1)},r.goToAPITokenUsers=function(){T.push(x.generate(x.API_TOKEN_USERS))},r.changeTab=function(e){r.setState({activeTab:e}),T.replace(x.generate("",{},{activeTab:e}),{activeTab:e})},r.state={apiTokenUserId:re.default.Empty(),apiTokenUser:rZ.create(),editings:new Map,activeTab:"details"},r}return bZ(t,e),t.prototype.componentDidMount=function(){var e=Hr.getPathPart(this.props.match,"id"),n=Hr.getParameter("activeTab","details");this.setState({activeTab:n}),"new"==e?this.toggleIsEditing(t.API_TOKEN_USER_DETAILS,!0):this.loadAPITokenUser(e)},t.prototype.render=function(){var e,t=this.state.loading?"...":this.state.apiTokenUserId==re.default.Empty()?"New User":null!==(e=this.state.apiTokenUser.apiName)&&void 0!==e?e:"...";return Object(o.jsxs)(O.Content,{children:[Object(o.jsx)(rr,{title:t,subTitle:null,onBack:this.goToAPITokenUsers,breadcrumbs:Xn.apiTokenUserDetails(t,this.state.apiTokenUserId),extra:this.renderMoreActions(),footer:Object(o.jsxs)(pa.a,yZ({activeKey:this.state.activeTab,onChange:this.changeTab},{children:[Object(o.jsx)(pa.a.TabPane,{tab:"Details"},"details"),Object(o.jsx)(pa.a.TabPane,{tab:"Roles"},"roles")]}),"content")},void 0),Object(o.jsx)(zr,{when:this.isEditingCheck},void 0),this.renderDetailsCard(),this.renderRolesCard()]},void 0)},t.prototype.renderDetailsCard=function(){var e=this;if("details"===this.state.activeTab&&this.state.editings){var n=this.state.apiTokenUserId==re.default.Empty()?null:Object(o.jsx)(Ze,yZ({validFeatureFlags:[gn.MANAGE_API_TOKEN_USER]},{children:Object(o.jsx)(Br,{onClick:function(){return e.toggleIsEditing(t.API_TOKEN_USER_DETAILS)},isEditing:this.state.editings.get(t.API_TOKEN_USER_DETAILS)},void 0)}),void 0);return Object(o.jsx)(Qn.a,yZ({title:"Details",extra:n},{children:Object(o.jsx)(mZ,{ref:this._apiTokenUserDetailsRef,apiTokenUserId:this.state.apiTokenUserId,isEditing:this.state.editings.get(t.API_TOKEN_USER_DETAILS),onSave:this.userDetailsSaved},void 0)}),void 0)}},t.prototype.renderRolesCard=function(){var e=this;if("roles"===this.state.activeTab&&this.state.apiTokenUserId!=re.default.Empty()&&this.state.editings){var n=this.state.apiTokenUserId==re.default.Empty()?null:Object(o.jsx)(Ze,yZ({validFeatureFlags:[gn.MANAGE_API_TOKEN_USER]},{children:Object(o.jsx)(Br,{onClick:function(){return e.toggleIsEditing(t.API_TOKEN_USER_ROLES)},isEditing:this.state.editings.get(t.API_TOKEN_USER_ROLES)},void 0)}),void 0);return Object(o.jsx)(Qn.a,yZ({title:"Roles",extra:n},{children:Object(o.jsx)(KY,{ref:this._userRolesRef,userId:this.state.apiTokenUserId,isEditing:this.state.editings.get(t.API_TOKEN_USER_ROLES),onSave:this.userRolesSaved},void 0)}),void 0)}},t.prototype.renderMoreActions=function(){var e=this,t=Object(o.jsx)(Gt.a,{children:Object(o.jsx)(Gt.a.Item,yZ({title:"Delete API Token User",onClick:function(){return e.deleteConfirmation(e.state.apiTokenUserId)}},{children:"Delete API Token User"}),"delete_"+this.state.apiTokenUserId)},void 0);return Object(o.jsx)(Ze,yZ({validFeatureFlags:[gn.MANAGE_API_TOKEN_USER]},{children:Object(o.jsx)(y.b,yZ({direction:"horizontal"},{children:Object(o.jsx)(la.a,yZ({overlay:t},{children:Object(o.jsx)(rt.a,yZ({size:"large",type:"link"},{children:Object(o.jsx)(aa.a,{},void 0)}),void 0)}),void 0)}),void 0)}),void 0)},t.API_TOKEN_USER_DETAILS="API_TOKEN_USER_DETAILS",t.API_TOKEN_USER_ROLES="API_TOKEN_USER_ROLES",t}(a.Component);var jZ=Object(u.i)(Object(l.b)((function(e){return{institution:e.Institution.Selected,currentUser:e.UserSession.Value}}))(OZ)),IZ=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),SZ=function(e){function t(t){var n=e.call(this,t)||this;return n.currentPath=window.location.pathname,T.listen((function(e,t){var r,i,o;var a=n.currentPath?n.currentPath.split("/").filter((function(e){return!!e})):[],s=e.pathname?e.pathname.split("/").filter((function(e){return!!e})):[];a.length>0&&s.length>0&&a[0]!==s[0]&&(null===(o=null===(i=null===(r=document.getElementById("app-main"))||void 0===r?void 0:r.firstChild)||void 0===i?void 0:i.firstChild)||void 0===o||o.scrollTo(0,0)),n.currentPath=e.pathname})),n}return IZ(t,e),t.prototype.componentDidMount=function(){this.props.userSessionCheckAction()},t.prototype.componentDidUpdate=function(e){var t=this;!1===e.versionOutdated&&!0===this.props.versionOutdated&&f.a.confirm({title:"Out of Date",content:"A new version of the app was found. Do you want to update?s",onOk:function(){t.props.versionResetAction(),location.reload()},onCancel:function(){t.props.versionResetAction()}})},t.prototype.render=function(){if(this.props.userSessionChecking)return Object(o.jsx)(p.a,{children:Object(o.jsx)(h.a,{tip:"Loading...",size:"large"},void 0)},void 0);var e=this.props.user?Hn:Cn,t=null==this.props.user?ZF:Un()(Oq),n=null==this.props.user?"extraExtraWide":"full";return Object(o.jsxs)(u.e,{children:[Object(o.jsx)(Nn,{exact:!0,path:x.HOME,component:t,layout:e,width:n},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.POST_SECONDARY_HOME,component:sr,layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.LOGIN,component:Po,layout:e,width:"smallish"},void 0),Object(o.jsx)(Nn,{path:x.REQUEST_RESET_PASSWORD,component:qo,layout:e,width:"smallish"},void 0),Object(o.jsx)(Nn,{path:x.RESET_PASSWORD_LINK,component:ia,layout:e,width:"smallish"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.APS_GENERAL_EDUCATION,component:Un([gn.VIEW_APS_GENERAL_EDUCATION,gn.EDIT_APS_GENERAL_EDUCATION])(dj),layout:e},void 0),Object(o.jsx)(Nn,{path:x.APS_GENERAL_EDUCATION_DETAILS,component:Un([gn.VIEW_APS_GENERAL_EDUCATION,gn.EDIT_APS_GENERAL_EDUCATION])(rj),layout:e},void 0),Object(o.jsx)(Nn,{path:x.NEW_APS_GENERAL_EDUCATION,component:Un([gn.VIEW_APS_GENERAL_EDUCATION,gn.EDIT_APS_GENERAL_EDUCATION])(rj),layout:e},void 0),Object(o.jsx)(Nn,{path:x.CONFIRM_EMAIL,component:Co,layout:e,width:"smallish"},void 0),Object(o.jsx)(Nn,{path:x.RESEND_CONFIRMATION_EMAIL,component:Lo,layout:e,width:"smallish"},void 0),Object(o.jsx)(Nn,{path:x.DASHBOARD,component:Un()(Oq),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.DISCIPLINES,component:Un([gn.VIEW_DISCIPLINE,gn.EDIT_DISCIPLINE])(x_),layout:e},void 0),Object(o.jsx)(Nn,{path:x.DISCIPLINE_DETAILS,component:Un([gn.VIEW_DISCIPLINE,gn.EDIT_DISCIPLINE])(E_),layout:e},void 0),Object(o.jsx)(Nn,{path:x.NEW_DISCIPLINE,component:Un([gn.VIEW_DISCIPLINE,gn.EDIT_DISCIPLINE])(E_),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.DOCUMENTARCHIVES,component:Un([gn.VIEW_DISCIPLINE,gn.EDIT_DISCIPLINE])(L_),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.EXTERNAL_INSTITUTIONS,component:Un([gn.VIEW_EXTERNAL_INSTITUTIONS,gn.EDIT_EXTERNAL_INSTITUTIONS])(AT),layout:e},void 0),Object(o.jsx)(Nn,{path:x.EXTERNAL_INSTITUTIONS_DETAILS,component:Un([gn.VIEW_EXTERNAL_INSTITUTIONS,gn.EDIT_EXTERNAL_INSTITUTIONS])(RT),layout:e},void 0),Object(o.jsx)(Nn,{path:x.NEW_EXTERNAL_INSTITUTIONS,component:Un([gn.VIEW_EXTERNAL_INSTITUTIONS,gn.EDIT_EXTERNAL_INSTITUTIONS])(RT),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.GENDER,component:Un([gn.VIEW_GENDER,gn.EDIT_GENDER])(QT),layout:e},void 0),Object(o.jsx)(Nn,{path:x.GENDER_DETAILS,component:Un([gn.VIEW_GENDER,gn.EDIT_GENDER])(GT),layout:e},void 0),Object(o.jsx)(Nn,{path:x.NEW_GENDER,component:Un([gn.VIEW_GENDER,gn.EDIT_GENDER])(GT),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.GENERAL_EDUCATION,component:Un([gn.VIEW_GENERAL_EDUCATION,gn.EDIT_GENERAL_EDUCATION])(pC),layout:e},void 0),Object(o.jsx)(Nn,{path:x.GENERAL_EDUCATION_DETAILS,component:Un([gn.VIEW_GENERAL_EDUCATION,gn.EDIT_GENERAL_EDUCATION])(sC),layout:e},void 0),Object(o.jsx)(Nn,{path:x.NEW_GENERAL_EDUCATION,component:Un([gn.VIEW_GENERAL_EDUCATION,gn.EDIT_GENERAL_EDUCATION])(sC),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.ANNOUNCEMENTS,component:Un([gn.EDIT_ANNOUNCEMENT])(uo),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.ANNOUNCEMENT_DETAILS,component:Un([gn.EDIT_ANNOUNCEMENT])(Jr),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.PAST_ANNOUNCEMENTS,component:Eo,layout:e},void 0),Object(o.jsx)(Nn,{path:x.NEW_ANNOUNCEMENT,component:Un([gn.EDIT_ANNOUNCEMENT])(Jr),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.AWARD_TYPE,component:Un([gn.VIEW_AWARD_TYPE,gn.EDIT_AWARD_TYPE])(WO),layout:e},void 0),Object(o.jsx)(Nn,{path:x.AWARD_TYPE_DETAILS,component:Un([gn.VIEW_AWARD_TYPE,gn.EDIT_AWARD_TYPE])(UO),layout:e},void 0),Object(o.jsx)(Nn,{path:x.NEW_AWARD_TYPE,component:Un([gn.VIEW_AWARD_TYPE,gn.EDIT_AWARD_TYPE])(UO),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.CATEGORIES,component:Un([gn.VIEW_CATEGORY,gn.EDIT_CATEGORY])(Rj),layout:e},void 0),Object(o.jsx)(Nn,{path:x.CATEGORY_DETAILS,component:Un([gn.VIEW_CATEGORY,gn.EDIT_CATEGORY])(Oj),layout:e},void 0),Object(o.jsx)(Nn,{path:x.NEW_CATEGORY,component:Un([gn.VIEW_CATEGORY,gn.EDIT_CATEGORY])(Oj),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.CHANGE_REQUESTS,component:Un([gn.VIEW_CHANGE_REQUEST,gn.EDIT_CHANGE_REQUEST])(dg),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.CHANGE_REQUEST_DETAILS,component:Un([gn.VIEW_CHANGE_REQUEST,gn.EDIT_CHANGE_REQUEST])(km),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.CHANGE_REQUEST_APPROVAL,component:Un([gn.APPROVE_CHANGE_REQUEST])(km),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.CHANGE_REQUEST_APPROVAL_REDIRECT,component:Un([gn.SYSTEM_ADMIN])(km),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.CHANGE_REQUEST_DRAFT,component:Un([gn.EDIT_CHANGE_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(Wm),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.CHANGE_REQUEST_DRAFT_ID,component:Un([gn.EDIT_CHANGE_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(Wm),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.ADMINISTRATIVE_CHANGE_REQUEST_ENTRY,component:Un([gn.CREATE_ADMINISTRATIVE_CHANGE_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(ob),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_ADMINISTRATIVE_CHANGE_REQUEST_ENTRY_1,component:Un([gn.CREATE_ADMINISTRATIVE_CHANGE_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER,gn.OVERRIDE_CHANGE_REQUEST_USER])(ob),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_ADMINISTRATIVE_CHANGE_REQUEST_ENTRY_2,component:Un([gn.CREATE_ADMINISTRATIVE_CHANGE_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(cb),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_ADMINISTRATIVE_CHANGE_REQUEST_ENTRY_REVIEW,component:Un([gn.CREATE_ADMINISTRATIVE_CHANGE_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(fb),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_ADMINISTRATIVE_CHANGE_REQUEST_ENTRY_SUBMITTED,component:Un([gn.CREATE_ADMINISTRATIVE_CHANGE_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(jb),layout:e},void 0),Object(o.jsx)(Nn,{path:x.NEW_DISCIPLINE_CHANGE_REQUEST_ENTRY,component:Un([gn.CREATE_NEW_DISCIPLINE_CHANGE_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(Oy),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_NEW_DISCIPLINE_CHANGE_REQUEST_ENTRY_1,component:Un([gn.CREATE_NEW_DISCIPLINE_CHANGE_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(Oy),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_NEW_DISCIPLINE_CHANGE_REQUEST_ENTRY_2,component:Un([gn.CREATE_NEW_DISCIPLINE_CHANGE_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(Ey),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_NEW_DISCIPLINE_CHANGE_REQUEST_ENTRY_REVIEW,component:Un([gn.CREATE_NEW_DISCIPLINE_CHANGE_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(my),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_NEW_DISCIPLINE_CHANGE_REQUEST_ENTRY_SUBMITTED,component:Un([gn.CREATE_NEW_DISCIPLINE_CHANGE_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(Ty),layout:e},void 0),Object(o.jsx)(Nn,{path:x.NEW_COURSE_CHANGE_REQUEST_ENTRY,component:Un([gn.CREATE_NEW_COURSE_CHANGE_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(oy),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_NEW_COURSE_CHANGE_REQUEST_ENTRY_1,component:Un([gn.CREATE_NEW_COURSE_CHANGE_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(oy),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_NEW_COURSE_CHANGE_REQUEST_ENTRY_2,component:Un([gn.CREATE_NEW_COURSE_CHANGE_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(cy),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_NEW_COURSE_CHANGE_REQUEST_ENTRY_REVIEW,component:Un([gn.CREATE_NEW_COURSE_CHANGE_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(ty),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_NEW_COURSE_CHANGE_REQUEST_ENTRY_SUBMITTED,component:Un([gn.CREATE_NEW_COURSE_CHANGE_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(py),layout:e},void 0),Object(o.jsx)(Nn,{path:x.COURSE_DEACTIVATION_CHANGE_REQUEST_ENTRY,component:Un([gn.CREATE_COURSE_DEACTIVATION_CHANGE_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(Rb),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_COURSE_DEACTIVATION_CHANGE_REQUEST_ENTRY_1,component:Un([gn.CREATE_COURSE_DEACTIVATION_CHANGE_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(Rb),layout:e,wi
1dth:"full"},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_COURSE_DEACTIVATION_CHANGE_REQUEST_ENTRY_2,component:Un([gn.CREATE_COURSE_DEACTIVATION_CHANGE_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(xb),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_COURSE_DEACTIVATION_CHANGE_REQUEST_ENTRY_REVIEW,component:Un([gn.CREATE_COURSE_DEACTIVATION_CHANGE_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(Fb),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_COURSE_DEACTIVATION_CHANGE_REQUEST_ENTRY_SUBMITTED,component:Un([gn.CREATE_COURSE_DEACTIVATION_CHANGE_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(Nb),layout:e},void 0),Object(o.jsx)(Nn,{path:x.COURSE_MODIFICATION_CHANGE_REQUEST_ENTRY,component:Un([gn.CREATE_MODIFY_COURSE_CHANGE_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(Lb),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_COURSE_MODIFICATION_CHANGE_REQUEST_ENTRY_1,component:Un([gn.CREATE_MODIFY_COURSE_CHANGE_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(Lb),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_COURSE_MODIFICATION_CHANGE_REQUEST_ENTRY_2,component:Un([gn.CREATE_MODIFY_COURSE_CHANGE_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(Bb),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_COURSE_MODIFICATION_CHANGE_REQUEST_ENTRY_3,component:Un([gn.CREATE_MODIFY_COURSE_CHANGE_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(Qb),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_COURSE_MODIFICATION_CHANGE_REQUEST_ENTRY_REVIEW,component:Un([gn.CREATE_MODIFY_COURSE_CHANGE_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(tb),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_COURSE_MODIFICATION_CHANGE_REQUEST_ENTRY_SUBMITTED,component:Un([gn.CREATE_MODIFY_COURSE_CHANGE_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(Jb),layout:e},void 0),Object(o.jsx)(Nn,{path:x.NEW_NOTICE_OF_INTENT_CHANGE_REQUEST_ENTRY,component:Un([gn.CREATE_NOTICE_OF_INTENT_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(Fy),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_NOTICE_OF_INTENT_CHANGE_REQUEST_ENTRY_1,component:Un([gn.CREATE_NOTICE_OF_INTENT_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(Fy),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_NOTICE_OF_INTENT_CHANGE_REQUEST_ENTRY_2,component:Un([gn.CREATE_NOTICE_OF_INTENT_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(Ly),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_NOTICE_OF_INTENT_CHANGE_REQUEST_ENTRY_3,component:Un([gn.CREATE_NOTICE_OF_INTENT_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(By),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_NOTICE_OF_INTENT_CHANGE_REQUEST_ENTRY_4,component:Un([gn.CREATE_NOTICE_OF_INTENT_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(Qy),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_NOTICE_OF_INTENT_CHANGE_REQUEST_ENTRY_5,component:Un([gn.CREATE_NOTICE_OF_INTENT_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])($y),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_NOTICE_OF_INTENT_CHANGE_REQUEST_ENTRY_6,component:Un([gn.CREATE_NOTICE_OF_INTENT_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(nO),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_NOTICE_OF_INTENT_CHANGE_REQUEST_ENTRY_7,component:Un([gn.CREATE_NOTICE_OF_INTENT_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(aO),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_NOTICE_OF_INTENT_CHANGE_REQUEST_ENTRY_8,component:Un([gn.CREATE_NOTICE_OF_INTENT_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(lO),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_NOTICE_OF_INTENT_CHANGE_REQUEST_ENTRY_REVIEW,component:Un([gn.CREATE_NOTICE_OF_INTENT_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(Ny),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_NOTICE_OF_INTENT_CHANGE_REQUEST_ENTRY_SUBMITTED,component:Un([gn.CREATE_NOTICE_OF_INTENT_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(fO),layout:e},void 0),Object(o.jsx)(Nn,{path:x.PROGRAM_DEACTIVATION_CHANGE_REQUEST_ENTRY,component:Un([gn.CREATE_PROGRAM_DEACTIVATION_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(gO),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_PROGRAM_DEACTIVATION_CHANGE_REQUEST_ENTRY_1,component:Un([gn.CREATE_PROGRAM_DEACTIVATION_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(gO),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_PROGRAM_DEACTIVATION_CHANGE_REQUEST_ENTRY_2,component:Un([gn.CREATE_PROGRAM_DEACTIVATION_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(jO),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_PROGRAM_DEACTIVATION_CHANGE_REQUEST_ENTRY_REVIEW,component:Un([gn.CREATE_PROGRAM_DEACTIVATION_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(RO),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_PROGRAM_DEACTIVATION_CHANGE_REQUEST_ENTRY_SUBMITTED,component:Un([gn.CREATE_PROGRAM_DEACTIVATION_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(CO),layout:e},void 0),Object(o.jsx)(Nn,{path:x.NEW_PROGRAM_MODIFICATION_CHANGE_REQUEST_ENTRY,component:Un([gn.CREATE_PROGRAM_MODIFICATION_CHANGE_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(rE),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_PROGRAM_MODIFICATION_CHANGE_REQUEST_ENTRY_1,component:Un([gn.CREATE_PROGRAM_MODIFICATION_CHANGE_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(rE),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_PROGRAM_MODIFICATION_CHANGE_REQUEST_ENTRY_2,component:Un([gn.CREATE_PROGRAM_MODIFICATION_CHANGE_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(fE),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_PROGRAM_MODIFICATION_CHANGE_REQUEST_ENTRY_3,component:Un([gn.CREATE_PROGRAM_MODIFICATION_CHANGE_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(gE),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_PROGRAM_MODIFICATION_CHANGE_REQUEST_ENTRY_4,component:Un([gn.CREATE_PROGRAM_MODIFICATION_CHANGE_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(jE),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_PROGRAM_MODIFICATION_CHANGE_REQUEST_ENTRY_5,component:Un([gn.CREATE_PROGRAM_MODIFICATION_CHANGE_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(RE),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_PROGRAM_MODIFICATION_CHANGE_REQUEST_ENTRY_6,component:Un([gn.CREATE_PROGRAM_MODIFICATION_CHANGE_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(xE),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_PROGRAM_MODIFICATION_CHANGE_REQUEST_ENTRY_REVIEW,component:Un([gn.CREATE_PROGRAM_MODIFICATION_CHANGE_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(wE),width:"full",layout:e},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_PROGRAM_MODIFICATION_CHANGE_REQUEST_ENTRY_SUBMITTED,component:Un([gn.CREATE_PROGRAM_MODIFICATION_CHANGE_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(ME),layout:e},void 0),Object(o.jsx)(Nn,{path:x.NEW_PROGRAM_CHANGE_REQUEST_ENTRY,component:Un([gn.CREATE_NEW_PROGRAM_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(FI),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_1,component:Un([gn.CREATE_NEW_PROGRAM_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(FI),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_2,component:Un([gn.CREATE_NEW_PROGRAM_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(LI),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_3,component:Un([gn.CREATE_NEW_PROGRAM_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(BI),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_4,component:Un([gn.CREATE_NEW_PROGRAM_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(QI),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_5,component:Un([gn.CREATE_NEW_PROGRAM_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])($I),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_6,component:Un([gn.CREATE_NEW_PROGRAM_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(nS),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_7,component:Un([gn.CREATE_NEW_PROGRAM_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(aS),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_8,component:Un([gn.CREATE_NEW_PROGRAM_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(lS),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_9,component:Un([gn.CREATE_NEW_PROGRAM_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(OS),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_10,component:Un([gn.CREATE_NEW_PROGRAM_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(ES),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_11,component:Un([gn.CREATE_NEW_PROGRAM_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(CS),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_12,component:Un([gn.CREATE_NEW_PROGRAM_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(NS),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_13,component:Un([gn.CREATE_NEW_PROGRAM_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(FS),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_14,component:Un([gn.CREATE_NEW_PROGRAM_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(LS),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_15,component:Un([gn.CREATE_NEW_PROGRAM_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(BS),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_REVIEW,component:Un([gn.CREATE_NEW_PROGRAM_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(KS),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.EXISTING_NEW_PROGRAM_CHANGE_REQUEST_ENTRY_SUBMITTED,component:Un([gn.CREATE_NEW_PROGRAM_REQUEST,gn.OVERRIDE_CHANGE_REQUEST_USER])(ZS),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.CHANGE_REQUEST_TYPE,c
1omponent:Un([gn.EDIT_WORKFLOW])(WE),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.CHANGE_REQUEST_TYPE_DETAILS,component:Un([gn.EDIT_WORKFLOW])(cR),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.CONFIGURATIONS,component:Un()(hR),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.CONTACTS,component:Un([gn.EDIT_CONTACT])(WR),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.CONTACT_TYPE,component:Un([gn.EDIT_CONTACT_TYPE,gn.VIEW_CONTACT_TYPE])(ZR),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.CONTACT_TYPE_DETAILS,component:Un([gn.EDIT_CONTACT_TYPE,gn.VIEW_CONTACT_TYPE])(d_),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.NEW_CONTACT_TYPE,component:Un([gn.EDIT_CONTACT_TYPE,gn.VIEW_CONTACT_TYPE])(d_),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.COURSES,component:fD,layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.COURSE_DETAILS,component:Zw,layout:e},void 0),Object(o.jsx)(Nn,{path:x.NEW_COURSE,component:Un([gn.VIEW_COURSE,gn.EDIT_COURSE])(Zw),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.PROGRAMS,component:Ux,layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.PROGRAM_DETAILS,component:Px,layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.INSTITUITION_COURSE_BLOCK_DETAILS,component:Uq,layout:e},void 0),Object(o.jsx)(Nn,{path:x.NEW_INSTITUITION_COURSE_BLOCK,component:Un([gn.VIEW_INSTITUTION_COURSE_BLOCK,gn.EDIT_INSTITUTION_COURSE_BLOCK])(Uq),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.CREDIT_TYPES,component:Un([gn.VIEW_CREDIT_TYPE,gn.EDIT_CREDIT_TYPE])(f_),layout:e},void 0),Object(o.jsx)(Nn,{path:x.CREDIT_TYPE_DETAILS,component:Un([gn.VIEW_CREDIT_TYPE,gn.EDIT_CREDIT_TYPE])(_R),layout:e},void 0),Object(o.jsx)(Nn,{path:x.NEW_CREDIT_TYPE,component:Un([gn.VIEW_CREDIT_TYPE,gn.EDIT_CREDIT_TYPE])(_R),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.ROLES,component:Un([gn.VIEW_ROLE,gn.EDIT_ROLE])(_A),layout:e},void 0),Object(o.jsx)(Nn,{path:x.ROLE_DETAILS,component:Un([gn.VIEW_ROLE,gn.EDIT_ROLE])(OA),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{path:x.NEW_ROLE,component:Un([gn.VIEW_ROLE,gn.EDIT_ROLE])(OA),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.INSTITUTIONS,component:Un([gn.VIEW_INSTITUTION,gn.EDIT_INSTITUTION])(qF),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.INSTITUTION_DETAILS,component:Un([gn.VIEW_INSTITUTION,gn.EDIT_INSTITUTION])(AF),layout:e},void 0),Object(o.jsx)(Nn,{path:x.NEW_INSTITUTION,component:Un([gn.VIEW_INSTITUTION,gn.EDIT_INSTITUTION])(AF),layout:e},void 0),Object(o.jsx)(Nn,{path:x.COURSE_INSTITUTION_DETAILS,component:Un([gn.VIEW_COURSE,gn.EDIT_COURSE])(Hq),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.INSTITUTION_COURSE_DETAILS,component:Un([gn.VIEW_COURSE,gn.EDIT_COURSE])(Hq),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.SINGLE_INSTITUTION_COURSE_DETAILS,component:Un([gn.VIEW_COURSE,gn.EDIT_COURSE])(Hq),layout:e},void 0),Object(o.jsx)(Nn,{path:x.USER_INSTITUTION_DETAILS,component:Un([gn.MANAGE_INSTITUTION_USER])(KF),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.INSTITUTION_USER_DETAILS,component:Un([gn.MANAGE_INSTITUTION_USER])(KF),layout:e},void 0),Object(o.jsx)(Nn,{path:x.CONSULTANTS,component:_D,layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.RACIAL_ETHNIC_GROUPS,component:Un([gn.VIEW_RACIAL_EHTNIC_GROUPS,gn.EDIT_RACIAL_EHTNIC_GROUPS])(QA),layout:e},void 0),Object(o.jsx)(Nn,{path:x.RACIAL_ETHNIC_GROUP_DETAILS,component:Un([gn.VIEW_RACIAL_EHTNIC_GROUPS,gn.EDIT_RACIAL_EHTNIC_GROUPS])(LA),layout:e},void 0),Object(o.jsx)(Nn,{path:x.NEW_RACIAL_ETHNIC_GROUP,component:Un([gn.VIEW_RACIAL_EHTNIC_GROUPS,gn.EDIT_RACIAL_EHTNIC_GROUPS])(LA),layout:e},void 0),Object(o.jsx)(Nn,{path:x.ADMIN_RESOURCES,component:Un([gn.EDIT_RESOURCE])(iq),layout:e},void 0),Object(o.jsx)(Nn,{path:x.RESOURCES,component:lq,layout:e},void 0),Object(o.jsx)(Nn,{path:x.DOWNLOADS_SECTION,component:fT,layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.TERMS,component:Un([gn.VIEW_TERM,gn.EDIT_TERM])(FP),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.TERM_DETAILS,component:Un([gn.VIEW_TERM,gn.EDIT_TERM])(AP),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.NEW_TERM,component:Un([gn.VIEW_TERM,gn.EDIT_TERM])(AP),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.THIRD_PARTY_CREDENTIAL_TYPES,component:Un([gn.VIEW_TERM,gn.EDIT_TERM])(Dw),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.THIRD_PARTY_CREDENTIAL_TYPE_DETAILS,component:Un([gn.VIEW_TERM,gn.EDIT_TERM])(xw),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.NEW_THIRD_PARTY_CREDENTIAL_TYPE,component:Un([gn.VIEW_TERM,gn.EDIT_TERM])(xw),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.USERS,component:Un([gn.VIEW_USER,gn.EDIT_USER,gn.MANAGE_INSTITUTION_USER])(RU),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.USER_DETAILS,component:Un([gn.VIEW_USER,gn.EDIT_USER])(iU),layout:e,width:"wide"}
1,void 0),Object(o.jsx)(Nn,{exact:!0,path:x.USER_SETTINGS,component:Un()(NU),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.API_TOKEN_USERS,component:Un([gn.VIEW_API_TOKEN_USER,gn.MANAGE_API_TOKEN_USER])(cZ),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.API_TOKEN_USER_DETAILS,component:Un([gn.VIEW_API_TOKEN_USER,gn.MANAGE_API_TOKEN_USER])(jZ),layout:e,width:"wide"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.WORK_ITEMS,component:Un()(FU),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.CIPS,component:Un([gn.VIEW_CIP_NUMBER,gn.EDIT_CIP_NUMBER])(Zj),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.CIP_DETAILS,component:Un([gn.VIEW_CIP_NUMBER,gn.EDIT_CIP_NUMBER])(Fj),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.NEW_CIP,component:Un([gn.VIEW_CIP_NUMBER,gn.EDIT_CIP_NUMBER])(Fj),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.PROGRAM_CLASSIFICATION,component:Un([gn.VIEW_PROGRAM_CLASSIFICATION,gn.EDIT_PROGRAM_CLASSIFICATION])(sI),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.PROGRAM_CLASSIFICATION_DETAILS,component:Un([gn.VIEW_PROGRAM_CLASSIFICATION,gn.EDIT_PROGRAM_CLASSIFICATION])(mI),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.NEW_PROGRAM_CLASSIFICATION,component:Un([gn.VIEW_PROGRAM_CLASSIFICATION,gn.EDIT_PROGRAM_CLASSIFICATION])(mI),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.NOTICE_OF_INTENT_CHANGE_REQUEST_WORKFORCE_LINK,component:Un([gn.VIEW_CIP_NUMBER,gn.EDIT_CIP_NUMBER])(NI),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.INSTRUCTIONAL_LEVEL,component:Un([gn.VIEW_INSTRUCTIONAL_LEVEL,gn.EDIT_INSTRUCTIONAL_LEVEL])(AC),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.INSTRUCTIONAL_LEVEL_DETAILS,component:Un([gn.VIEW_INSTRUCTIONAL_LEVEL,gn.EDIT_INSTRUCTIONAL_LEVEL])(EC),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.NEW_INSTRUCTIONAL_LEVEL,component:Un([gn.VIEW_INSTRUCTIONAL_LEVEL,gn.EDIT_INSTRUCTIONAL_LEVEL])(EC),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.IOWA_VARIATION,component:Un([gn.VIEW_IOWA_VARIATION,gn.EDIT_IOWA_VARIATION])(QC),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.IOWA_VARIATION_DETAILS,component:Un([gn.VIEW_IOWA_VARIATION,gn.EDIT_IOWA_VARIATION])(GC),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.NEW_IOWA_VARIATION,component:Un([gn.VIEW_IOWA_VARIATION,gn.EDIT_IOWA_VARIATION])(GC),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.OBJECT_PURPOSE,component:Un([gn.VIEW_OBJECT_PURPOSE,gn.EDIT_OBJECT_PURPOSE])(px),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.OBJECT_PURPOSE_DETAILS,component:Un([gn.VIEW_OBJECT_PURPOSE,gn.EDIT_OBJECT_PURPOSE])(ax),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.NEW_OBJECT_PURPOSE,component:Un([gn.VIEW_OBJECT_PURPOSE,gn.EDIT_OBJECT_PURPOSE])(ax),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.SPECIAL_EMPHASIS,component:Un([gn.VIEW_SPECIAL_EMPHASIS,gn.EDIT_SPECIAL_EMPHASIS])(mP),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.SPECIAL_EMPHASIS_DETAILS,component:Un([gn.VIEW_SPECIAL_EMPHASIS,gn.EDIT_SPECIAL_EMPHASIS])(dP),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.NEW_SPECIAL_EMPHASIS,component:Un([gn.VIEW_SPECIAL_EMPHASIS,gn.EDIT_SPECIAL_EMPHASIS])(dP),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.TRANSFER_MAJOR_LACTS_CATEGORY,component:Un([gn.VIEW_TRANSFER_MAJOR_LACTS_CATEGORY,gn.EDIT_TRANSFER_MAJOR_LACTS_CATEGORY])(CN),layout:e},void 0),Object(o.jsx)(Nn,{path:x.TRANSFER_MAJOR_LACTS_CATEGORY_DETAILS,component:Un([gn.VIEW_TRANSFER_MAJOR_LACTS_CATEGORY,gn.EDIT_TRANSFER_MAJOR_LACTS_CATEGORY])(SN),layout:e},void 0),Object(o.jsx)(Nn,{path:x.NEW_TRANSFER_MAJOR_LACTS_CATEGORY,component:Un([gn.VIEW_TRANSFER_MAJOR_LACTS_CATEGORY,gn.EDIT_TRANSFER_MAJOR_LACTS_CATEGORY])(SN),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.TRANSFER_MAJOR_COURSE_BLOCK,component:Un([gn.VIEW_TRANSFER_MAJOR_COURSE_BLOCKS,gn.EDIT_TRANSFER_MAJOR_COURSE_BLOCKS])(uN),layout:e},void 0),Object(o.jsx)(Nn,{path:x.TRANSFER_MAJOR_COURSE_BLOCK_DETAILS,component:Un([gn.VIEW_TRANSFER_MAJOR_COURSE_BLOCKS,gn.EDIT_TRANSFER_MAJOR_COURSE_BLOCKS])(aN),layout:e},void 0),Object(o.jsx)(Nn,{path:x.NEW_TRANSFER_MAJOR_COURSE_BLOCK,component:Un([gn.VIEW_TRANSFER_MAJOR_COURSE_BLOCKS,gn.EDIT_TRANSFER_MAJOR_COURSE_BLOCKS])(aN),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.TRANSFER_MAJOR_DISCIPLINE_FRAMEWORK_ELEMENT,component:Un([gn.VIEW_TRANSFER_MAJOR_DISCIPLINE_FRAMEWORKS,gn.EDIT_TRANSFER_MAJOR_DISCIPLINE_FRAMEWORKS])(XN),layout:e},void 0),Object(o.jsx)(Nn,{path:x.TRANSFER_MAJOR_DISCIPLINE_FRAMEWORK_ELEMENT_DETAILS,component:Un([gn.VIEW_TRANSFER_MAJOR_DISCIPLINE_FRAMEWORKS,gn.EDIT_TRANSFER_MAJOR_DISCIPLINE_FRAMEWORKS])(WN),layout:e},void 0),Object(o.jsx)(Nn,{path:x.NEW_TRANSFER_MAJOR_DISCIPLINE_FRAMEWORK_ELEMENT,component:Un([gn.VIEW_TRANSFER_MAJOR_DISCIPLINE_FRAMEWORKS,gn.EDIT_TRANSFER_MAJOR_DISCIPLINE_FRAMEWORKS])(WN),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.TRANSFER_MAJOR_GENERAL_EDUCATION_TYPE,component:Un([gn.VIEW_TRANSFER_MAJOR_GENERAL_EDUCATION_TYPE,gn.EDIT_TRANSFER_MAJOR_GENERAL_EDUCATION_TYPE])(fw),layout:e},void 0),Object(o.jsx)(Nn,{path:x.TRANSFER_MAJOR_GENERAL_EDUCATION_TYPE_DETAILS,component:Un([gn.VIEW_TRANSFER_MAJOR_GENERAL_EDUCATION_TYPE,gn.EDIT_TRANSFER_MAJOR_GENERAL_EDUCATION_TYPE])(dw),layout:e},void 0),Object(o.jsx)(Nn,{path:x.NEW_TRANSFER_MAJOR_GENERAL_EDUCATION_TYPE,component:Un([gn.VIEW_TRANSFER_MAJOR_GENERAL_EDUCATION_TYPE,gn.EDIT_TRANSFER_MAJOR_GENERAL_EDUCATION_TYPE])(dw),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.TYPE_OF_PROGRAM,component:Un([gn.VIEW_TYPE_OF_PROGRAM,gn.EDIT_TYPE_OF_PROGRAM])(yw),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.TYPE_OF_PROGRAM_DETAILS,component:Un([gn.VIEW_TYPE_OF_PROGRAM,gn.EDIT_TYPE_OF_PROGRAM])(QP),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.NEW_TYPE_OF_PROGRAM,component:Un([gn.VIEW_TYPE_OF_PROGRAM,gn.EDIT_TYPE_OF_PROGRAM])(QP),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.WORK_BASED_LEARNING_TYPE,component:Un([gn.VIEW_WORK_BASED_LEARNING,gn.EDIT_WORK_BASED_LEARNING])(BU),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.WORK_BASED_LEARNING_DETAILS,component:Un([gn.VIEW_INSTRUCTIONAL_LEVEL,gn.EDIT_INSTRUCTIONAL_LEVEL])(ZU),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.NEW_WORK_BASED_LEARNING_TYPE,component:Un([gn.VIEW_INSTRUCTIONAL_LEVEL,gn.EDIT_INSTRUCTIONAL_LEVEL])(ZU),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.SECONDARY_HOME,component:iL,layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.SELF_STUDIES_LIST,component:kL,layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.SELF_STUDIES_ACADEMIC_YEAR_LIST,component:kL,layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.SELF_STUDIES_DETAILS,component:ck,layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.SELF_STUDIES_DISPLAY,component:IV,layout:e,width:"extraExtraWide"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.SELF_STUDIES_RESPONSE_DISPLAY,component:YV,layout:e,width:"extraExtraWide"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.ACADEMIC_YEARS,component:YB,layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.COMPLETE_SELF_STUDIES,component:HV,layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.SELF_STUDIES_CONFIGURATION,component:cW,layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.SELF_STUDIES_CONFIGURATION_FROM_LIST,component:cW,layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.SELF_STUDIES_ACADEMIC_YEAR_DASHBOARD,component:mW,layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.ACADEMIC_YEAR_DASHBOARD_FROM_LIST,component:mW,layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.NEW_ACADEMIC_YEAR,component:xW,layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.NEW_ACADEMIC_YEAR_FROM_LIST,component:xW,layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.ALL_ACADEMIC_YEARS,component:DW,layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.ACADEMIC_YEAR_SELF_STUDY_RANKING_REPORT,component:kW,layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.ACADEMIC_YEAR_PROGRAM_CONSULTANT_COMMENT_REPORT,component:HW,layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.SELF_STUDIES_REVIEW,component:ek,layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.ACADEMIC_YEAR_CONFIGURATION,component:OW,layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.REGIONAL_PLANNING_PARTNERS,component:Un([gn.EDIT_REGIONAL_PLANNING_PARTNER])(oz),layout:e,width:"extraExtraWide"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.REGIONAL_PLANNING_PARTNER_DETAIL,component:Un([gn.EDIT_REGIONAL_PLANNING_PARTNER])(xz),layout:e,width:"extraExtraWide"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.NEW_REGIONAL_PLANNING_PARTNER_DETAIL,component:Un([gn.EDIT_REGIONAL_PLANNING_PARTNER])(xz),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.DATA_REVIEW_REGIONAL_PLANNING_PARTNER,component:Un([gn.CONFIG_ACADEMIC_YEAR])(Gz),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.ACADEMIC_YEAR_REGIONAL_PLANNING_PARTNER_CONFIGURATION,component:Un([gn.EDIT_REGIONAL_PLANNING_PARTNER])(cz),layout:e,width:"extraExtraWide"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.PUBLIC_DISTRICTS,component:zz,layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.DISTRICTS,component:zz,layout:e,width:"extraExtraWide"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.DISTRICTS_ACADEMIC_YEAR_LIST,component:zz,layout:e,width:"extraExtraWide"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.ALL_DISTRICTS,component:zz,layout:e,width:"extraExtraWide"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.NEW_DISTRICT,component:CH,layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.DISTRICT_DETAILS,component:CH,layout:e,width:"extraExtraWide"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.DATA_REVIEW_DISTRICTS,component:Un([gn.CONFIG_ACADEMIC_YEAR])(NH),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.ACADEMIC_YEAR_DISTRICT_CONFIGURATION,component:Un([gn.CONFIG_ACADEMIC_YEAR])(Xz),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.DATA_REVIEW_DISTRICT_CONTACTS,component:Un([gn.CONFIG_ACADEMIC_YEAR])(MH),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.ACADEMIC_YEAR_DISTRICT_CONTACT_CONFIGURATION,component:Un([gn.CONFIG_ACADEMIC_YEAR])(kH),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.AREA_EDUCATION_AGENCIES,component:Un([gn.CONFIG_ACADEMIC_YEAR])(R$),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.ALL_AREA_EDUCATION_AGENCIES,component:Un([gn.CONFIG_ACADEMIC_YEAR])(R$),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.NEW_AREA_EDUCATION_AGENCY,component:Un([gn.CONFIG_ACADEMIC_YEAR])(w$),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.AREA_EDUCATION_AGENCY_DETAILS,component:Un([gn.CONFIG_ACADEMIC_YEAR])(w$),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.REVIEW_AREA_EDUCATION_AGENCY,component:Un([gn.CONFIG_ACADEMIC_YEAR])(L$),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.DATA_REVIEW_AREA_EDUCATION_AGENCY,component:Un([gn.CONFIG_ACADEMIC_YEAR])(B$),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.AREA_EDUCATION_AGENCIES_CONFIGURATION,component:Un([gn.CONFIG_ACADEMIC_YEAR])(Q$),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.ACADEMIC_YEAR_AREA_EDUCATION_AGENCIES_CONFIGURATION,component:Un([gn.CONFIG_ACADEMIC_YEAR])(x$),layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.FEDERAL_CLUSTERS,component:QX,layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.ALL_FEDERAL_CLUSTERS,component:QX,layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.DATA_REVIEW_FEDERAL_CLUSTERS,component:Un([gn.CONFIG_ACADEMIC_YEAR])(aJ),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.FEDERAL_CLUSTERS_CONFIGURATION,component:Un([gn.CONFIG_ACADEMIC_YEAR])(nJ),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.ACADEMIC_YEAR_FEDERAL_CLUSTERS_CONFIGURATION,component:Un([gn.CONFIG_ACADEMIC_YEAR])($X),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.SERVICE_AREAS,component:$J,layout:e,width:"extraWide"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.ALL_SERVICE_AREAS,component:$J,layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.DATA_REVIEW_SERVICE_AREAS,component:Un([gn.CONFIG_ACADEMIC_YEAR])(l$),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.SERVICE_AREA_CONFIGURATION,component:a$,layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.ACADEMIC_YEAR_SERVICE_AREAS_CONFIGURATION,component:n$,layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.PUBLIC_PROGRAMS,component:WH,layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.SECONDARY_PROGRAMS,component:Un([gn.EDIT_SECONDARY_PROGRAM])(WH),layout:e,width:"extraExtraWide"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.SECONDARY_PROGRAMS_ACADEMIC_YEAR_LIST,component:Un([gn.EDIT_SECONDARY_PROGRAM])(WH),layout:e,width:"extraExtraWide"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.ALL_SECONDARY_PROGRAMS,component:Un([gn.EDIT_SECONDARY_PROGRAM])(WH),layout:e,width:"extraExtraWide"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.NEW_SECONDARY_PROGRAM,component:Un([gn.EDIT_SECONDARY_PROGRAM])(kQ),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.SECONDARY_PROGRAM_DETAILS,component:kQ,layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.DATA_REVIEW_SECONDARY_PROGRAMS,component:Un([gn.CONFIG_ACADEMIC_YEAR])(WQ),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.ACADEMIC_YEAR_SECONDARY_PROGRAM_CONFIGURATION,component:Un([gn.EDIT_SECONDARY_PROGRAM])(KH),layout:e,width:"extraExtraWide"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.SECONDARY_PROGRAM_TYPES,component:Un([gn.EDIT_SECONDARY_PROGRAM_SCENARIO])(KQ
1),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.ALL_SECONDARY_PROGRAM_TYPES,component:Un([gn.EDIT_SECONDARY_PROGRAM_SCENARIO])(KQ),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.NEW_SECONDARY_PROGRAM_TYPE,component:Un([gn.EDIT_SECONDARY_PROGRAM_SCENARIO])(rK),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.SECONDARY_PROGRAM_TYPE_DETAILS,component:Un([gn.EDIT_SECONDARY_PROGRAM_SCENARIO])(rK),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.DATA_REVIEW_SECONDARY_PROGRAM_TYPES,component:Un([gn.CONFIG_ACADEMIC_YEAR])(sK),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.SCENARIO_CONFIGURATION,component:Un([gn.CONFIG_ACADEMIC_YEAR])(uK),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.ACADEMIC_YEAR_SCENARIOS_CONFIGURATION,component:Un([gn.CONFIG_ACADEMIC_YEAR])(ZQ),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.DATA_REVIEW_SECONDARY_PROGRAM_COURSES,component:Un([gn.CONFIG_ACADEMIC_YEAR])(yK),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.ACADEMIC_YEAR_SECONDARY_PROGRAM_COURSES_CONFIGURATION,component:Un([gn.CONFIG_ACADEMIC_YEAR])(SK),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.SECONDARY_COURSES,component:Un([gn.EDIT_SECONDARY_COURSE])(CK),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.SECONDARY_COURSES_ACADEMIC_YEAR_LIST,component:Un([gn.EDIT_SECONDARY_COURSE])(CK),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.ALL_SECONDARY_COURSES,component:Un([gn.EDIT_SECONDARY_COURSE])(CK),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.NEW_SECONDARY_COURSE,component:Un([gn.EDIT_SECONDARY_COURSE])(FK),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.SECONDARY_COURSE_DETAILS,component:FK,layout:e},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.DATA_REVIEW_SECONDARY_COURSES,component:Un([gn.CONFIG_ACADEMIC_YEAR])(LK),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.ACADEMIC_YEAR_SECONDARY_COURSES_CONFIGURATION,component:Un([gn.EDIT_SECONDARY_COURSE])(NK),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.SECONDARY_CIP_NUMBERS,component:Un([gn.EDIT_SECONDARY_PROGRAM])(SJ),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.ALL_SECONDARY_CIP_NUMBERS,component:Un([gn.EDIT_SECONDARY_PROGRAM])(SJ),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.NEW_SECONDARY_CIP_NUMBER,component:Un([gn.EDIT_SECONDARY_PROGRAM])(PJ),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.SECONDARY_CIP_NUMBER_DETAILS,component:Un([gn.EDIT_SECONDARY_PROGRAM])(PJ),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.DATA_REVIEW_SECONDARY_CIP_NUMBERS,component:Un([gn.CONFIG_ACADEMIC_YEAR])(qJ),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.SECONDARY_CIP_NUMBERS_CONFIGURATION,component:Un([gn.CONFIG_ACADEMIC_YEAR])(UJ),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.ACADEMIC_YEAR_SECONDARY_CIP_NUMBER_CONFIGURATION,component:Un([gn.CONFIG_ACADEMIC_YEAR])(TJ),layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.ACADEMIC_YEAR_CONTACTS_REPORT,component:zK,layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.ACADEMIC_YEAR_CAREER_ACADEMY_REPORT,component:$K,layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.ACADEMIC_YEAR_ACTION_PLAN_REPORT,component:sX,layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.ACADEMIC_YEAR_SELF_STUDY_AGGREGATE_REPORT,component:RX,layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.ACADEMIC_YEAR_SCENARIO_REPORT,component:fX,layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.ACADEMIC_YEAR_PROGRAM_MASTER_REPORT,component:yX,layout:e,width:"full"},void 0),Object(o.jsx)(Nn,{exact:!0,path:x.ACADEMIC_YEAR_EDUCATION_PROGRAM_REPORT,component:PX,layout:e,width:"full"},void 0),Object(o.jsx)(u.c,{component:eL},void 0)]},void 0)},t}(a.Component);var EZ=Object(u.i)(Object(l.b)((function(e){return{userSessionChecking:e.UserSession.Checking,versionOutdated:e.Version.Outdated,user:e.UserSession.Value}}),(function(e){return{userSessionCheckAction:function(){return e(Te.check())},versionResetAction:function(){return e(A.reset())}}}))(SZ)),RZ=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),_Z=function(){return _Z=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},_Z.apply(this,arguments)},TZ=function(e){function t(t){return e.call(this,t)||this}return RZ(t,e),t.prototype.render=function(){return Object(o.jsx)(wn.a,{status:"404",title:"Unauthorized",subTitle:"Sorry, we couldn't find what you are looking for.",extra:Object(o.jsx)(at.a,_Z({to:"/"},{children:Object(o.jsx)(rt.a,_Z({type:"primary"},{children:"Home"}),void 0)}),void 0)},void 0)},t}(a.Component),CZ=(n(1478),function(e){e&&e instanceof Function&&import("web-vitals").then((function(t){var n=t.getCLS,r=t.getFID,i=t.getFCP,o=t.getLCP,a=t.getTTFB;n(e),r(e),i(e),o(e),a(e)}))}),xZ=n(722),AZ=function(){return AZ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},AZ.apply(this,arguments)};Object(xZ.a)(),P=Qe,c.a.render(Object(o.jsx)(s.a.StrictMode,{children:Object(o.jsx)(l.a,AZ({store:Qe},{children:Object(o.jsx)(u.d,AZ({history:T},{children:Object(o.jsx)(u.c,{render:function(e){return e.location.state&&e.location.state.is404?Object(o.jsx)(Cn,AZ({},e,{children:Object(o.jsx)(TZ,{},void 0)}),void 0):Object(o.jsx)(EZ,{},void 0)}},void 0)}),void 0)}),void 0)},void 0),document.getElementById("root")),CZ()},3:function(e,t,n){"use strict";n.r(t);var r=function(){function e(){}return e.Empty=function(){return"00000000-0000-0000-0000-000000000000"},e.NewGuid=function(){return e.s4()+e.s4()+"-"+e.s4()+"-"+e.s4()+"-"+e.s4()+"-"+e.s4()+e.s4()+e.s4()},e.s4=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)},e.IsGuid=function(e){return/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(e)},e}();t.default=r},60:function(e,t,n){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),i=function(){function e(){}return e.download=function(e,t){var n=document.createElement("iframe"),i={token:r.default.NewGuid(),attempts:60,callback:t,iframe:n,error:null,isLoaded:!1};n.id=i.token,n.style.display="none",document.body.appendChild(n),n.onload=function(){try{var e=i.iframe.contentDocument||(null!=i.iframe.contentWindow?i.iframe.contentWindow.document:window.document),t=JSON.parse(e.body.innerText);i.error=t?t.message:null,i.isLoaded=!0}catch(n){}};var o=e;o.indexOf("?")<0?o+="?":o+="&",n.src=o+"downloadToken="+i.token,this.checkCookie(i)},e.downloadBase64StringAsExcel=function(e,t){var n=document.createElement("a");n.setAttribute("href","data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;base64,"+t),n.setAttribute("download",e),n.click()},e.downloadBase64StringAsFile=function(e,t,n){var r=document.createElement("a");r.setAttribute("href","data:"+t+";base64,"+n),r.setAttribute("download",e),r.click()},e.getCookie=function(e){var t=document.cookie.split(e+"="),n=null;2===t.length&&(n=(t.pop()||"").split(";").shift()||null);return n},e.expireCookie=function(e){null!=e&&(document.cookie=encodeURIComponent(e)+"=deleted; expires="+new Date(0).toUTCString())},e.checkCookie=function(e){var t=this;t.getCookie(e.token)||e.isLoaded||0===e.attempts?(0===e.attempts&&(e.error="Download timed out."),t.expireCookie(e.token),document.body.removeChild(e.iframe),e.callback(e.error)):window.setTimeout((function(){e.attempts--,t.checkCookie(e)}),500)},e}();t.default=i},722:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return d}));var r=new Intl.NumberFormat(void 0,{style:"currency",currency:"USD",maximumFractionDigits:5,minimumFractionDigits:5}).format,i=new Intl.NumberFormat(void 0,{style:"currency",currency:"USD",maximumFractionDigits:2,minimumFractionDigits:2}).format,o=new Intl.NumberFormat(void 0,{maximumFractionDigits:0,minimumFractionDigits:0}).format,a=new Intl.NumberFormat(void 0,{maximumFractionDigits:2,minimumFractionDigits:2}).format,s=new Intl.NumberFormat(void 0,{maximumFractionDigits:5,minimumFractionDigits:5}).format;function d(){e.FORMAT={currency5:function(e){return r(roundTo(e,5))},currency2:function(e){return i(roundTo(e,2))},quantity0:function(e){return o(roundTo(e,0))},quantity2:function(e){return a(roundTo(e,2))},quantity5:function(e){return s(roundTo(e,5))}},e.tryParseInt=function(e,t){var n=t;return null==e||(isNaN(e)||"string"!==typeof e||""===e?"number"===typeof e&&(n=Math.floor(e)):n=parseInt(e,10),isNaN(n))?t:n},e.roundTo=function(e,t){t=t||0;var n=Math.pow(10,t);return e=Math.round((e+1e-6)*n)/n},e.zeroPad=function(e,t){return("0".repeat(t)+e).substr(-t,t)}}}).call(this,n(113))},746:function(e,t,n){},971:function(e,t,n){}},[[1479,1,2]]]); 2//# sourceMappingURL=main.960dac5a.chunk.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.