{"version":3,"sources":["assets/thumbnail.png","redux/types.ts","redux/actions.ts","models/SWMPAnnulReportStep.ts","models/SWMPStatus.ts","models/SWMPAddStep.ts","models/MCM.ts","models/PermitConditions.ts","models/SWMPAddOption.ts","redux/select.ts","containers/App/index.tsx","models/SWMP.ts","services.ts","models/MG.ts","utils/downloadFile.ts","utils/getStepRoute.ts","utils/removeAnnualReportEntity.ts","utils/getSortedEntities.ts","utils/getDifferentEntities.ts","components/ActivityCard.tsx","components/AddButton.tsx","hooks/useModal.ts","hooks/useSwmpStatusDisplay.ts","hooks/useValidator.ts","models/BMP.ts","components/BmpCard.tsx","components/LabelContainer.tsx","components/Modal.tsx","theme.ts","components/SwmpCard.tsx","components/SwmpStep.tsx","components/Textarea.tsx","components/TextField.tsx","models/constants.ts","containers/SwmpDraft/SwmpGeneralInfo.tsx","containers/SwmpDraft/SwmpAddBmp.tsx","containers/SwmpDraft/SwmpStart.tsx","containers/SwmpDraft/index.tsx","containers/SwmpAccess/index.ts","containers/SwmpAccess/SwmpAccess.tsx","containers/SwmpActive/index.tsx","containers/SwmpAnnualReport/SwmpComplianceStatus.tsx","containers/SwmpAnnualReport/SwmpActivities.tsx","containers/SwmpAnnualReport/SwmpAdditionalBmp.tsx","containers/SwmpAnnualReport/SwmpAdditionalInformation.tsx","containers/SwmpAnnualReport/SwmpConstructionActivities.tsx","containers/SwmpAnnualReport/SwmpDataSummary.tsx","containers/SwmpAnnualReport/SwmpGeneralInfo.tsx","containers/SwmpAnnualReport/SwmpImpairedWaterBodies.tsx","containers/SwmpAnnualReport/SwmpModifications.tsx","containers/SwmpAnnualReport/index.tsx","models/Activity.ts","containers/SwmpDetail/SwmpActivity.tsx","containers/SwmpDetail/index.tsx","containers/SwmpList/index.tsx","models/AnnualReport.ts","models/AnnualReportContact.ts","redux/reducer.ts","App.tsx","serviceWorker.ts","index.tsx"],"names":["module","exports","ActionTypes","SWMPAnnulReportStep","SWMPStatus","SWMPAddStep","MCM","PermitConditions","SWMPAddOption","setCustomer","customer","type","SET_CUSTOMER","payload","updateSwmp","swmp","UPDATE_SWMP","updateBmp","bmp","UPDATE_BMP","updateMg","mg","UPDATE_MG","updateActivity","activities","UPDATE_ACTIVITY","setActivityAttachment","attachments","SET_ACTIVITY_ATTACHMENT","updateAnnualReport","path","value","UPDATE_ANNUAL_REPORT","setError","error","SET_ERROR","setLoading","isLoading","SET_LOADING","selector","state","get","select","swmpList","planLength","bstMgtPracs","measurableGoals","activityAttachments","annualReport","annualReportYear","annualReportContact","loading","connect","dispatch","onClearError","CLEAR_ERROR","useState","showError","setShowError","useEffect","Fragment","LinearProgress","color","Container","maxWidth","Box","m","exact","Snackbar","anchorOrigin","vertical","horizontal","open","onClose","message","INITIAL_SWMP","id","year","number","name","operatorLevel","contactName","phone","emailAddress","mailingAddress","annualReportingYear","status","Draft","updatedDate","fetchSwmpList","axios","then","patchData","fetchSwmpDetails","swmpId","reportId","fetchSwmpActivityAttachments","fetchAnnualReportStatus","fetchAnnualReport","createSwmp","addOption","post","createBmp","createActivity","activity","put","createActivityAttachments","activityId","a","data","FormData","forEach","f","append","createAnnualReport","startSwmp","updateEntities","extendSwmp","deleteActivity","delete","downloadAnnualReport","res","INITIAL_MG","title","minimumControlMeasures","description","yearsImplemented","isQuantityRequired","informationUsed","units","annualGoal","downloadFile","fileName","url","linkNode","document","createElement","body","appendChild","href","download","click","setTimeout","removeChild","getStepRoute","currentStep","isForward","swmpAccessType","step","steps","Object","keys","currentIndex","findIndex","upperFirst","camelCase","window","scrollTo","removeAnnualReportEntity","prop","index","entity","callback","selectedEntity","splice","sortAlphaNum","b","localeCompare","numeric","sortByMultiple","entities","firstSortBy","secondSortBy","sort","firstBy","thenBy","getSortedEntities","sortByEntityType","entitiesByType","reduce","acc","isBmp","push","getDifferentEntities","primaryEntities","filteringEntities","entityName","isExactMatch","p","some","useStyles","makeStyles","theme","chip","marginRight","spacing","marginBottom","whiteSpace","cardContent","paddingBottom","cardAction","justifyContent","card","cursor","ActivityCard","username","onClick","onDelete","onDeleteAttachment","classes","mb","Card","className","CardContent","display","Typography","variant","D","Date","date","quantity","mt","flexWrap","map","attachment","Chip","key","avatar","Avatar","alt","src","thumbnailUrl","require","label","originalFileName","e","stopPropagation","fileUrl","CardActions","IconButton","fontSize","addButton","alignItems","border","borderColor","palette","grey","boxSizing","borderRadius","shape","paddingTop","textTransform","AddButton","text","textVariant","rest","Button","mr","useModal","isAddModal","isBmpModal","Modal","useMemo","AddModal","SaveModal","replace","statusDisplayMap","amber","Icon","DraftIcon","Active","green","ActiveIcon","Previous","red","PreviousIcon","useValidator","requiredFields","isModalOpen","setEntity","handleCompleteEntity","validator","setValidator","field","Array","isArray","length","handleChange","event","fieldName","target","checkedValue","checked","test","parseInt","bmpMcms","filter","val","includes","handleComplete","values","err","INITIAL_BMP","startYear","divider","marginLeft","onSetError","actions","bmps","showUpdateButton","onEditBmp","onRemoveBmp","onCompleteMg","onRemoveMg","measurableGoal","setMeasurableGoal","selectedMgBmp","setSelectedMgBmp","setIsAddModal","setIsModalOpen","initializeMgModal","response","join","fullWidth","Divider","fieldKey","startCase","textAlign","onComplete","onCancel","flexBasis","placeholder","onChange","helperText","flex","from","_","FormControlLabel","toString","control","Checkbox","disabled","indeterminate","highlightLabel","fontWeight","LabelContainer","children","cancelButton","completeActionText","Dialog","DialogTitle","DialogContent","DialogActions","startIcon","Close","props","createMuiTheme","overrides","MuiTypography","gutterBottom","colorTextSecondary","MuiDialogTitle","root","MuiDialogContent","MuiDialogActions","padding","MuiSvgIcon","MuiFormGroup","flexDirection","MuiFormHelperText","contained","MuiButton","outlinedSecondary","containedSecondary","MuiCardContent","MuiLink","underlineHover","textDecoration","MuiInputBase","MuiSelect","lineHeight","disableElevation","primary","light","teal","main","dark","contrastText","secondary","blue","typography","h6","h5","subtitle1","subtitle2","body1","body2","button","boxContainer","SwmpCard","swmpStatus","Error","useSwmpStatusDisplay","content","getFullYear","boxShadow","bgcolor","py","px","stepButton","stepDivider","height","background","doneStep","SwmpStep","totalSteps","history","useHistory","accessType","useParams","currentStepIndex","slice","cx","stepId","route","handleMoveStep","textArea","font","resize","width","minHeight","outline","borderWidth","textAreaContainer","position","textAreaBorder","left","top","borderStyle","pointerEvents","Textarea","TextareaAutosize","TextField","noMb","SWMP_ADD_STEPS","General","Bmp","Start","SWMP_ANNUAL_REPORT_STEPS","GeneralInfo","ComplianceStatus","StormwaterDataSummary","ImpairedWaterBodies","StormwaterActivities","StormwaterModifications","AdditionalBmp","AdditionalInformation","ConstructionActivities","COMPLIANCE_STATUS","permitCondition","SubmittedSwmp","RecordKeepingRequirements","EligibilityRequirements","ConductedAnnualReview","datePicker","buttonIcon","onUpdate","isCalendarYear","setIsCalendarYear","handleChangeGeneralInfo","isView","FormControl","Select","level","MenuItem","InputProps","startAdornment","InputAdornment","RadioGroup","JSON","parse","Radio","utils","DateFnsUtils","disableToolbar","format","inputVariant","InputAdornmentProps","endIcon","onUpdateBmp","onUpdateMg","setBmp","handleCompleteBmp","uuid","newBmp","selectedBmpIndex","handleCompleteMg","isAdd","bmpId","createdMg","newMg","updatedBmpIndex","concat","mgIndex","assignedBmpMgIndex","handleRemoveMg","mgId","handleRemoveBmp","showAddButton","find","ml","startButton","isUpdate","isPromptModalOpen","setIsPromptModalOpen","classesGeneral","useGeneralStyles","handleCompleteSwmp","subTitle","completeText","align","my","onLoad","onSave","isDeleteModalOpen","setIsDeleteModalOpen","stepContainer","handleDeleteSwmp","swmpUpdateSteps","cloneDeep","admin","SwmpAccess","showBmpSection","setShowBmpSection","isEqual","SwmpActive","activatedSwmp","s","fetchSwmps","paddingLeft","paddingRight","incompletedQuantity","completedQuantity","onUpdateAnnualReport","complianceStatus","generalAssessmentBmpId","setGeneralAssessmentBmpId","progressReducingPollutantsMgId","setProgressReducingPollutantsMgId","successImplementationMgId","setSuccessImplementationMgId","generalAssessments","progressReducingPollutants","successImplementations","defaultValue","onBlur","multiline","rows","displayEmpty","selectedBmp","g","selectedMg","totalQuantity","t","totalQuantityPercents","Math","floor","stormwaterActivities","selectedBmpId","setSelectedBmpId","stormwaterActivity","additionalBmps","setNewBmp","additionalBmpsImplementations","implementationSchedule","pb","additionalInformation","setEntityName","authorizationNumber","setAuthorizationNumber","isPermitteeRelyingOnEntities","relyingEntities","explanation","isPermitteePartOfGroup","isReportIncludingAllPermittees","associatedResponsibilities","permittee","r","constructionActivities","numberOfConstructionActivities","numberOfMunicipalActivities","numericFields","setNumericFields","handleChangeNumericFields","utilizeSeventhMcm","dataSummary","updateAnnualReportContact","UPDATE_ANNUAL_REPORT_CONTACT","general","reportingYear","initialValues","formFields","setFormFields","originalFormFieldsRef","useRef","current","prevFields","handleBlurGeneralInfo","stringify","isCopyReportSubmitted","reportSubmittedRegion","impairedWaterBodes","benchmarkParameter","setBenchmarkParameter","archievingBenchmarkParameterId","setArchievingBenchmarkParameterId","impairmentBacteriaBmpId","setImpairmentBacteriaBmpId","effectivenessBmpBenchmarkParameterId","setEffectivenessBmpBenchmarkParameterId","impairmentBacteriaReports","identifyImpairedWater","activitiesToDischarge","implementationOfTargetedControls","identifiedBenchmarks","benchmarkValue","yearsConducted","archievingBenchmarkAnalyses","benchmarkParameterId","bmpEffectivenessProgresses","swmpModifications","selectedEntityId","setSelectedEntityId","entityChanges","isImplementationReviewedEachYear","hasChanges","split","mcm","additionalChangesDescription","swmpActivities","SET_ANNUAL_REPORT_YEAR","report","SET_ANNUAL_REPORT","contact","SET_ANNUAL_REPORT_CONTACT","StepContainer","isLoadingStates","setIsLoadingStates","initialLoad","fetchEntities","SwmpComplianceStatus","SwmpDataSummary","SwmpImpairedWaterBodies","SwmpActivities","SwmpModifications","SwmpAdditionalBmp","SwmpAdditionalInformation","SwmpConstructionActivities","SwmpGeneralInfo","handleDownloadAnnualReport","INITIAL_ACTIVITY","dropzone","backgroundColor","img","mcmFilterInput","bmpFilterInput","extend","onUpdateActivity","onUpdateActivityAttachment","prevActivities","prevActivityAttachments","successCallback","newFileIndex","files","newFiles","newMs4Files","catch","onExtendSwmp","hasDateError","setHasDateError","setActivity","setAttachments","mcmFilter","setMcmFilter","bmpFilter","setBmpFilter","delActivityId","setDelActivityId","attachmentId","delAttachmentIds","setDelAttachmentIds","isOpenExtendSwmpModal","setIsOpenExtendSwmpModal","snackbar","setSnackbar","useDropzone","onDrop","acceptedFiles","getRootProps","getInputProps","currentYear","thumbs","file","blob","mimeType","URL","createObjectURL","minWidth","overflow","initializeStates","handleCompleteActivity","handleCloseSnackbar","reason","handleExtendSwmp","handleDeleteAttachment","fileId","deleteActivityAttachment","quantityRequiredMg","filteredActivities","matchedBmps","sortedActivities","undefined","sensitivity","firstDate","secondDate","fullName","handleClickActivity","swmpStartYear","OutlinedInput","endAdornment","component","autoHideDuration","SnackbarContent","action","updateActivities","handleDeleteActivity","listItem","transition","modalContent","iconLabelWrapper","icon","IconLabel","DownloadIcon","PenIcon","onReset","annualReports","setAnnualReports","isOpenAnnualReportModal","setIsOpenAnnualReportModal","handleAccessAnnualReport","handleCreateAnnualReport","handleSelectAnnualReport","header","exportButton","right","SET_SWMP_LIST","setSwmp","Blank","setAddOption","Copy","handleExport","fileLink","Example","INITIAL_VALUE_WITH_DESCRIPTION","INITIAL_ANNUAL_REPORT_CONTACT","initialState","stateAbbr","submittedSwmp","recordKeepingRequirements","eligibilityRequirements","conductedAnnualReview","reducer","datesMapped","prototype","call","set","defaults","baseURL","process","withCredentials","store","createStore","App","CssBaseline","Boolean","location","hostname","match","MutationObserver","element","getElementById","ReactDOM","render","StrictMode","observe","childList","subtree","navigator","serviceWorker","ready","registration","unregister","console"],"mappings":"iHAAAA,EAAOC,QAAU,86K,kFC4BLC,E,iJAAAA,K,8BAAAA,E,4BAAAA,E,gDAAAA,E,sCAAAA,E,0BAAAA,E,wBAAAA,E,sBAAAA,E,kCAAAA,E,kDAAAA,E,4CAAAA,E,sBAAAA,E,0BAAAA,E,0BAAAA,E,sDAAAA,E,6DAAAA,M,KCjBL,ICXKC,ECAAC,ECAAC,ECAAC,ECAAC,ECAAC,EN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B,EACgBA,MAEd,OAAOwuB,eAAI,gBAAD,OAAiBzuB,GAAQC,EAAOS,GAE5C,KAAKtC,EAAYiC,UACf,OAAO,gBACFK,EADL,CAEEN,MAAO2rB,EAAOhtB,UAGlB,KAAKX,EAAYqD,YACf,OAAO,gBACFf,EADL,CAEEN,MAAO,KAGX,KAAKhC,EAAYoC,YACf,OAAO,gBACFE,EADL,CAEEW,QAAS0qB,EAAOhtB,UAGpB,KAAKX,EAAY0B,wBACf,OAAO,gBACFY,EADL,CAEEO,oBAAqB8qB,EAAOhtB,UAGhC,QACE,OAAO2B,IC3HbkD,IAAM8qB,SAASC,QAAUC,uCACzBhrB,IAAM8qB,SAASG,iBAAkB,EAEjC,IAAMC,GAAQC,aAAYV,IAaXW,GAXO,WACpB,OACE,kBAAC,IAAD,CAAUF,MAAOA,IACf,kBAACG,EAAA,EAAD,MACA,kBAAC,IAAD,CAAkB/kB,MAAOA,IACvB,kBAAC,EAAD,SCTYglB,QACW,cAA7BpnB,OAAOqnB,SAASC,UAEe,UAA7BtnB,OAAOqnB,SAASC,UAEhBtnB,OAAOqnB,SAASC,SAASC,MACvB,2DCZW,IAAIC,kBAAiB,WACpC,IAAMC,EAAU9oB,SAAS+oB,eAAe,QAEpCD,GACFE,IAASC,OACP,kBAAC,IAAMC,WAAP,KACE,kBAAC,GAAD,OAEFJ,MAKGK,QAAQnpB,SAAU,CACzBopB,WAAW,EACXC,SAAS,IDmHL,kBAAmBC,WACrBA,UAAUC,cAAcC,MACrBpsB,MAAK,SAACqsB,GACLA,EAAaC,gBAEd7H,OAAM,SAACloB,GACNgwB,QAAQhwB,MAAMA,EAAMwC,c","file":"static/js/main.e670b3cf.chunk.js","sourcesContent":["module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAIAAAAiOjnJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAFIGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78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4l/bQmLYWnV7JQAAAABJRU5ErkJggg==\"","import { Activity } from 'models/Activity';\nimport { AnnualReport } from 'models/AnnualReport';\nimport { AnnualReportContact } from 'models/AnnualReportContact';\nimport { BMP } from 'models/BMP';\nimport { Customer } from 'models/Customer';\nimport { MG } from 'models/MG';\nimport { Ms4File } from 'models/Ms4File';\nimport { SWMP } from 'models/SWMP';\n\n/* App State */\n\nexport interface AppState {\n loading: boolean;\n customer: Customer;\n swmpList: SWMP[];\n swmp: SWMP;\n bstMgtPracs: BMP[];\n measurableGoals: MG[];\n activities: Activity[];\n activityAttachments: Record;\n annualReportYear: number;\n annualReport: AnnualReport;\n annualReportContact: AnnualReportContact;\n error: string;\n}\n\n/* Action Types */\n\nexport enum ActionTypes {\n SET_SWMP_LIST = 'SET_SWMP_LIST',\n SET_CUSTOMER = 'SET_CUSTOMER',\n SET_ANNUAL_REPORT_YEAR = 'SET_ANNUAL_REPORT_YEAR',\n SET_ANNUAL_REPORT = 'SET_ANNUAL_REPORT',\n UPDATE_SWMP = 'UPDATE_SWMP',\n UPDATE_BMP = 'UPDATE_BMP',\n UPDATE_MG = 'UPDATE_MG',\n UPDATE_ACTIVITY = 'UPDATE_ACTIVITY',\n SET_ACTIVITY_ATTACHMENT = 'SET_ACTIVITY_ATTACHMENT',\n UPDATE_ANNUAL_REPORT = 'UPDATE_ANNUAL_REPORT',\n SET_ERROR = 'SET_ERROR',\n CLEAR_ERROR = 'CLEAR_ERROR',\n SET_LOADING = 'SET_LOADING',\n SET_ANNUAL_REPORT_CONTACT = 'SET_ANNUAL_REPORT_CONTACT',\n UPDATE_ANNUAL_REPORT_CONTACT = 'UPDATE_ANNUAL_REPORT_CONTACT',\n}\n\n/* Actions */\n\ninterface SetSwmpListAction {\n type: typeof ActionTypes.SET_SWMP_LIST;\n payload: SWMP[];\n}\n\ninterface SetCustomer {\n type: typeof ActionTypes.SET_CUSTOMER;\n payload: Customer;\n}\n\ninterface SetAnnualReportYear {\n type: typeof ActionTypes.SET_ANNUAL_REPORT_YEAR;\n payload: number;\n}\n\ninterface SetAnnualReport {\n type: typeof ActionTypes.SET_ANNUAL_REPORT;\n payload: AnnualReport;\n}\n\ninterface SetAnnualReportContact {\n type: typeof ActionTypes.SET_ANNUAL_REPORT_CONTACT;\n payload: AnnualReportContact;\n}\n\ninterface UpdateAnnualReportContactAction {\n type: typeof ActionTypes.UPDATE_ANNUAL_REPORT_CONTACT;\n payload: AnnualReportContact;\n}\n\ninterface UpdateSwmpAction {\n type: typeof ActionTypes.UPDATE_SWMP;\n payload: SWMP;\n}\n\ninterface UpdateBmpAction {\n type: typeof ActionTypes.UPDATE_BMP;\n payload: BMP[];\n}\n\ninterface UpdateMgAction {\n type: typeof ActionTypes.UPDATE_MG;\n payload: MG[];\n}\n\ninterface UpdateActivityAction {\n type: typeof ActionTypes.UPDATE_ACTIVITY;\n payload: Activity[];\n}\n\ninterface SetActivityAttachmentAction {\n type: typeof ActionTypes.SET_ACTIVITY_ATTACHMENT;\n payload: Record;\n}\n\ninterface UpdateAnnualReportAction {\n type: typeof ActionTypes.UPDATE_ANNUAL_REPORT;\n payload: { path: string; value: any };\n}\n\ninterface SetErrorAction {\n type: typeof ActionTypes.SET_ERROR;\n payload: string;\n}\n\ninterface ClearErrorAction {\n type: typeof ActionTypes.CLEAR_ERROR;\n}\n\ninterface SetLoadingAction {\n type: typeof ActionTypes.SET_LOADING;\n payload: boolean;\n}\n\nexport type Actions =\n | SetSwmpListAction\n | SetCustomer\n | SetAnnualReportYear\n | SetAnnualReport\n | UpdateSwmpAction\n | UpdateBmpAction\n | UpdateMgAction\n | UpdateActivityAction\n | SetActivityAttachmentAction\n | UpdateAnnualReportAction\n | SetErrorAction\n | ClearErrorAction\n | SetLoadingAction\n | SetAnnualReportContact\n | UpdateAnnualReportContactAction;\n","import { Activity } from 'models/Activity';\nimport { AnnualReport } from 'models/AnnualReport';\nimport { AnnualReportContact } from 'models/AnnualReportContact';\nimport { BMP } from 'models/BMP';\nimport { Customer } from 'models/Customer';\nimport { MG } from 'models/MG';\nimport { Ms4File } from 'models/Ms4File';\nimport { SWMP } from 'models/SWMP';\n\nimport { ActionTypes, Actions } from './types';\n\nexport const setSwmpList = (swmpList: SWMP[]): Actions => ({\n type: ActionTypes.SET_SWMP_LIST,\n payload: swmpList,\n});\n\nexport const setCustomer = (customer: Customer): Actions => ({\n type: ActionTypes.SET_CUSTOMER,\n payload: customer,\n});\n\nexport const setAnnualReportYear = (year: number): Actions => ({\n type: ActionTypes.SET_ANNUAL_REPORT_YEAR,\n payload: year,\n});\n\nexport const setAnnualReport = (report: AnnualReport): Actions => ({\n type: ActionTypes.SET_ANNUAL_REPORT,\n payload: report,\n});\n\nexport const setAnnualReportContact = (\n contact: AnnualReportContact\n): Actions => ({\n type: ActionTypes.SET_ANNUAL_REPORT_CONTACT,\n payload: contact,\n});\n\nexport const updateAnnualReportContact = (\n annualReportContact: AnnualReportContact\n): Actions => ({\n type: ActionTypes.UPDATE_ANNUAL_REPORT_CONTACT,\n payload: annualReportContact,\n});\n\nexport const updateSwmp = (swmp: SWMP): Actions => ({\n type: ActionTypes.UPDATE_SWMP,\n payload: swmp,\n});\n\nexport const updateBmp = (bmp: BMP[]): Actions => ({\n type: ActionTypes.UPDATE_BMP,\n payload: bmp,\n});\n\nexport const updateMg = (mg: MG[]): Actions => ({\n type: ActionTypes.UPDATE_MG,\n payload: mg,\n});\n\nexport const updateActivity = (activities: Activity[]): Actions => ({\n type: ActionTypes.UPDATE_ACTIVITY,\n payload: activities,\n});\n\nexport const setActivityAttachment = (\n attachments: Record\n): Actions => ({\n type: ActionTypes.SET_ACTIVITY_ATTACHMENT,\n payload: attachments,\n});\n\nexport const updateAnnualReport = (path: string, value: any): Actions => ({\n type: ActionTypes.UPDATE_ANNUAL_REPORT,\n payload: { path, value },\n});\n\nexport const setError = (error: string): Actions => ({\n type: ActionTypes.SET_ERROR,\n payload: error,\n});\n\nexport const clearError = (): Actions => ({\n type: ActionTypes.CLEAR_ERROR,\n});\n\nexport const setLoading = (isLoading: boolean): Actions => ({\n type: ActionTypes.SET_LOADING,\n payload: isLoading,\n});\n","export enum SWMPAnnulReportStep {\n GeneralInfo = 'GeneralInfo',\n ComplianceStatus = 'ComplianceStatus',\n StormwaterDataSummary = 'StormwaterDataSummary',\n ImpairedWaterBodies = 'ImpairedWaterBodies',\n StormwaterActivities = 'StormwaterActivities',\n StormwaterModifications = 'StormwaterModifications',\n AdditionalBmp = 'AdditionalBmp',\n AdditionalInformation = 'AdditionalInformation',\n ConstructionActivities = 'ConstructionActivities',\n}\n","export enum SWMPStatus {\n Draft = 'Draft',\n Active = 'Active',\n Previous = 'Previous',\n}\n","export enum SWMPAddStep {\n General = 'General',\n Bmp = 'Bmp',\n Start = 'Start',\n}\n","export enum MCM {\n PublicEducationInvolvement = 'Public Education, Outreach, and Involvement',\n IllicitDischargeDetection = 'Illicit Discharge Detection and Elimination',\n ConstructionSiteRunoff = 'Construction Site Stormwater Runoff Control',\n PostConstructionManagement = 'Post-construction Stormwater Management in New Development and Redevelopment',\n GoodHousekeeping = 'Pollution Prevention and Good Housekeeping for Municipal Operations',\n IndustrialStormwaterSource = 'Industrial Stormwater Sources (only if your MS4 serves a population more than 100,000)',\n}\n","export enum PermitConditions {\n SubmittedSwmp = 'SubmittedSwmp',\n RecordKeepingRequirements = 'RecordKeepingRequirements',\n EligibilityRequirements = 'EligibilityRequirements',\n ConductedAnnualReview = 'ConductedAnnualReview',\n}\n","export enum SWMPAddOption {\n Copy = 'Copy',\n Blank = 'Blank',\n Example = 'Example',\n}\n","import { get } from 'lodash';\n\nimport { AppState } from './types';\n\nconst selector = (path: string) => (state: AppState) => get(state, path);\n\nconst select = {\n customer: selector('customer'),\n swmpList: selector('swmpList'),\n swmp: selector('swmp'),\n planLength: selector('swmp.planLength'),\n bstMgtPracs: selector('bstMgtPracs'),\n measurableGoals: selector('measurableGoals'),\n activities: selector('activities'),\n activityAttachments: selector('activityAttachments'),\n annualReport: selector('annualReport'),\n annualReportYear: selector('annualReportYear'),\n annualReportContact: selector('annualReportContact'),\n error: selector('error'),\n loading: selector('loading'),\n};\n\nexport default select;\n","import Box from '@material-ui/core/Box';\nimport Container from '@material-ui/core/Container';\nimport LinearProgress from '@material-ui/core/LinearProgress';\nimport Snackbar from '@material-ui/core/Snackbar';\nimport {\n SwmpAccess,\n SwmpActive,\n SwmpAnnualReport,\n SwmpDetail,\n SwmpDraft,\n SwmpList,\n} from 'containers';\nimport React, { useEffect, useState } from 'react';\nimport { connect } from 'react-redux';\nimport { Route, BrowserRouter as Router, Switch } from 'react-router-dom';\nimport * as actions from 'redux/actions';\nimport select from 'redux/select';\n\ninterface AppProps {\n loading: boolean;\n error: string;\n onClearError: () => void;\n}\n\nconst App: React.FC = ({ loading, error, onClearError }) => {\n const [showError, setShowError] = useState(false);\n\n useEffect(() => {\n if (!error) {\n showError && setShowError(false);\n return;\n }\n\n setShowError(true);\n }, [error, showError]);\n\n return (\n \n {loading && }\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n );\n};\n\nconst mapStateToProps = (state) => ({\n error: select.error(state),\n loading: select.loading(state),\n});\n\nconst mapDispatchToProps = (dispatch) => ({\n onClearError: () => dispatch(actions.clearError()),\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(App);\n","import { SWMPStatus } from './SWMPStatus';\n\nexport interface SWMP {\n id: number;\n year: string;\n number: string;\n name: string;\n operatorLevel: number;\n contactName: string;\n phone: string;\n emailAddress: string;\n mailingAddress: string;\n annualReportingYear: Date | null;\n status: SWMPStatus;\n updatedDate?: Date | null;\n planLength: number;\n}\n\nexport const INITIAL_SWMP: SWMP = {\n id: 0,\n year: '',\n number: '',\n name: '',\n operatorLevel: 1,\n contactName: '',\n phone: '',\n emailAddress: '',\n mailingAddress: '',\n annualReportingYear: null,\n status: SWMPStatus.Draft,\n updatedDate: null,\n planLength: 5,\n};\n","import axios, { AxiosResponse } from 'axios';\nimport { SWMPAddOption } from 'models';\nimport { Activity } from 'models/Activity';\nimport { AnnualReportContact } from 'models/AnnualReportContact';\nimport { BMP } from 'models/BMP';\nimport { MG } from 'models/MG';\nimport { SWMP } from 'models/SWMP';\n\nexport const fetchSwmpList = () => axios.get('/swmp').then(patchData);\n\nexport const fetchSwmpDetails = (swmpId: number, reportId?: number) =>\n axios.get(`/swmpactivities/${swmpId}/${reportId || 0}`).then(patchData);\n\nexport const fetchSwmpActivityAttachments = (swmpId: number) =>\n axios.get(`/swmpactivities/${swmpId}/attachments`).then(patchData);\n\nexport const fetchAnnualReportStatus = (swmpId: number) =>\n axios.get(`/annualreport/status/${swmpId}`).then(patchData);\n\nexport const fetchAnnualReport = (id: number) =>\n axios.get(`/annualreport/${id}`).then(patchData);\n\nexport const createSwmp = (year: number, addOption: SWMPAddOption) =>\n axios.post('/swmp', { year, addOption }).then(patchData);\n\nexport const createBmp = (bmp: BMP) => axios.post('/bmp', bmp).then(patchData);\n\nexport const createMg = (mg: MG & { bmpId: string }) =>\n axios.post('/mg', mg).then(patchData);\n\nexport const createActivity = (activity: Activity) =>\n axios.post('/swmpactivities', activity).then(patchData);\n\nexport const updateActivity = (activity: Activity) =>\n axios.put('/swmpactivities', activity).then(patchData);\n\nexport const createActivityAttachments = async (\n activityId: number,\n attachments: File[]\n) => {\n const data = new FormData();\n attachments.forEach((f) => data.append('attachments', f, f.name));\n\n return axios\n .post(`/swmpactivities/${activityId}/files`, data)\n .then(patchData);\n};\n\nexport const deleteActivityAttachment = (activityId: string, fileId: number) =>\n axios.delete(`/swmpactivities/${activityId}/files/${fileId}`);\n\nexport const createAnnualReport = (swmpId: number, year: number) =>\n axios.post('/annualreport', { swmpId, year }).then(patchData);\n\nexport const updateSwmp = (swmp: SWMP) => axios.put('/swmp', swmp);\n\nexport const startSwmp = (swmp: SWMP) => axios.put('/swmp/activate', swmp);\n\nexport const deleteSwmp = (id: number) => axios.delete(`/swmp/${id}`);\n\nexport const updateEntities = (swmp: SWMP, bstMgtPracs: BMP[]) =>\n axios.post('/swmp/updateEntities', {\n swmp,\n bstMgtPracs,\n });\n\nexport const extendSwmp = (swmp: SWMP) => axios.put('/swmp/extend', swmp);\n\nexport const updateBmp = (bmp: BMP) => axios.put('/bmp', bmp);\n\nexport const updateMg = (mg: MG & { bmpId: string }) => axios.put('/mg', mg);\n\nexport const deleteBmp = (id: string) => axios.delete(`/bmp/${id}`);\n\nexport const deleteMg = (id: string) => axios.delete(`/mg/${id}`);\n\nexport const deleteActivity = (id: string) =>\n axios.delete(`/swmpactivities/${id}`);\n\nexport const updateAnnualReport = (id: string, report: any) =>\n axios.put('/annualreport', { id, report });\n\nexport const updateAnnualReportContact = (\n annualReportContact: AnnualReportContact\n) => axios.put('/annualreport/contact', annualReportContact);\n\nexport const downloadAnnualReport = (id: number) =>\n axios.post('/reports/swmp-annual', { id }).then(patchData);\n\nexport const exportSwmp = () => axios.post('/export/swmp').then(patchData);\n\nconst patchData = (res: AxiosResponse) => res.data;\n","export interface MG {\n id: string;\n bmp: {\n id: string;\n number?: string;\n title: string;\n minimumControlMeasures: string[];\n };\n number: string;\n title: string;\n description?: string;\n yearsImplemented: number[];\n isQuantityRequired?: boolean;\n informationUsed?: string;\n units?: string;\n annualGoal?: string;\n}\n\nexport const INITIAL_MG: MG = {\n id: '',\n bmp: {\n id: '',\n title: '',\n minimumControlMeasures: [],\n },\n number: '',\n title: '',\n description: '',\n yearsImplemented: [],\n isQuantityRequired: false,\n informationUsed: '',\n units: '',\n annualGoal: '',\n};\n","export const downloadFile = (fileName: string, url: string) => {\n const linkNode = document.createElement('a');\n document.body.appendChild(linkNode);\n linkNode.href = url;\n linkNode.download = fileName;\n linkNode.click();\n setTimeout(() => {\n document.body.removeChild(linkNode);\n }, 0);\n};\n","import { camelCase, upperFirst } from 'lodash';\nimport { SWMPAddStep, SWMPAnnulReportStep } from 'models';\n\nexport const getStepRoute = (\n swmpId: number,\n reportId: number | null,\n currentStep: string,\n isForward: boolean,\n swmpAccessType?: string\n) => {\n let step = '';\n const steps = Object.keys(reportId ? SWMPAnnulReportStep : SWMPAddStep);\n\n const currentIndex = steps.findIndex(\n (step) => step === upperFirst(currentStep)\n );\n\n if (isForward) {\n step = camelCase(steps[currentIndex + 1]);\n } else {\n step = camelCase(steps[currentIndex - 1]);\n }\n\n window.scrollTo(0, 0);\n\n if (reportId) {\n return `/swmp/${swmpId}/${reportId}/annualReport/${step}`;\n } else if (swmpAccessType) {\n return `/swmp/${swmpId}/${swmpAccessType}/${camelCase(step)}`;\n }\n\n return `/swmp/draft/${swmpId}/${step}`;\n};\n","export const removeAnnualReportEntity = (\n prop: string,\n index: number,\n entity: any,\n callback: (prop: string, entity: any) => void\n) => {\n const selectedEntity = entity[prop];\n selectedEntity.splice(index, 1);\n\n callback(prop, selectedEntity);\n};\n","import { get } from 'lodash';\nimport { firstBy } from 'thenby';\n\nconst sortAlphaNum = (a: string, b: string) =>\n a.localeCompare(b, 'en', { numeric: true });\n\nconst sortByMultiple = (\n entities: any[],\n firstSortBy: string,\n secondSortBy: string\n) => {\n return entities.sort(\n firstBy((a: any, b: any) =>\n sortAlphaNum(get(a, firstSortBy, ''), get(b, firstSortBy, ''))\n ).thenBy((a: any, b: any) =>\n sortAlphaNum(get(a, secondSortBy, ''), get(b, secondSortBy, ''))\n )\n );\n};\n\nexport const getSortedEntities = (\n entities: any[],\n sortByEntityType?: string\n) => {\n // in case of annual report F > 2\n if (!sortByEntityType) {\n const entitiesByType = entities.reduce(\n (acc, entity) => {\n if (entity.isBmp) {\n acc['bmp'].push(entity);\n } else {\n acc['mg'].push(entity);\n }\n\n return acc;\n },\n {\n bmp: [],\n mg: [],\n }\n );\n\n return [\n ...sortByMultiple(entitiesByType.bmp, 'entity.number', 'entity.title'),\n ...sortByMultiple(entitiesByType.mg, 'entity.number', 'entity.title'),\n ];\n }\n\n return sortByMultiple(\n entities,\n `${sortByEntityType}.number`,\n `${sortByEntityType}.title`\n );\n};\n","export const getDifferentEntities = (\n primaryEntities: any[],\n filteringEntities: any,\n entityName: string,\n isExactMatch?: boolean\n) => {\n return primaryEntities.reduce((acc, p) => {\n const isExist = filteringEntities.some((f) => {\n if (!isExactMatch) {\n return f[entityName].id === p.id;\n }\n\n return f[entityName] === p.id;\n });\n\n if (!isExist) {\n acc.push(p);\n }\n\n return acc;\n }, [] as any[]);\n};\n","import Avatar from '@material-ui/core/Avatar';\nimport Box from '@material-ui/core/Box';\nimport Card from '@material-ui/core/Card';\nimport CardActions from '@material-ui/core/CardActions';\nimport CardContent from '@material-ui/core/CardContent';\nimport Chip from '@material-ui/core/Chip';\nimport IconButton from '@material-ui/core/IconButton';\nimport { makeStyles } from '@material-ui/core/styles';\nimport Typography from '@material-ui/core/Typography';\nimport DeleteIcon from '@material-ui/icons/Delete';\nimport * as D from 'date-fns';\nimport { Activity } from 'models/Activity';\nimport { INITIAL_MG } from 'models/MG';\nimport { Ms4File } from 'models/Ms4File';\nimport React from 'react';\nimport { downloadFile } from 'utils';\n\ninterface ActivityCardProps {\n activity: Activity;\n attachments: Ms4File[];\n username: string;\n onClick?: () => void;\n onDelete: (activityId: string) => void;\n onDeleteAttachment: (activityId: string, attachmentId: number) => void;\n}\n\nconst useStyles = makeStyles((theme) => ({\n chip: {\n marginRight: theme.spacing(2),\n marginBottom: theme.spacing(2),\n },\n description: {\n whiteSpace: 'pre-wrap',\n },\n cardContent: {\n paddingBottom: 0,\n },\n cardAction: {\n justifyContent: 'flex-end',\n },\n card: {\n cursor: 'pointer',\n },\n}));\n\nconst ActivityCard: React.FC = ({\n activity,\n attachments,\n username,\n onClick,\n onDelete,\n onDeleteAttachment,\n}) => {\n const classes = useStyles();\n const { mg = INITIAL_MG } = activity;\n\n return (\n \n \n \n \n \n {D.format(new Date(activity.date), 'MMMM d, yyyy')}\n \n {mg.isQuantityRequired && (\n <>\n  • \n \n {mg.informationUsed}: {activity.quantity} {mg.units}\n \n \n )}\n \n  • \n {username}\n \n \n \n \n {mg.number} {mg.bmp.title} • {mg.title}\n \n \n \n \n {activity.description}\n \n \n \n {(attachments || []).map((attachment, index) => (\n \n }\n label={\n \n {attachment.originalFileName}\n \n }\n onClick={(e) => {\n e.stopPropagation();\n downloadFile(attachment.originalFileName, attachment.fileUrl);\n }}\n onDelete={(e) => {\n e.stopPropagation();\n onDeleteAttachment(activity.id as string, attachment.id);\n }}\n />\n ))}\n \n \n\n \n {\n e.stopPropagation();\n onDelete(activity.id as string);\n }}>\n \n \n \n \n \n );\n};\n\nexport default ActivityCard;\n","import { ButtonProps } from '@material-ui/core';\nimport Box from '@material-ui/core/Box';\nimport Button from '@material-ui/core/Button';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { Variant } from '@material-ui/core/styles/createTypography';\nimport Typography from '@material-ui/core/Typography';\nimport AddOutlined from '@material-ui/icons/AddOutlined';\nimport React from 'react';\n\ninterface AddButtonProps {\n text: string;\n textVariant?: Variant;\n}\n\nconst useStyles = makeStyles((theme) => ({\n addButton: {\n display: 'flex',\n alignItems: 'center',\n border: '1px dashed',\n borderColor: theme.palette.grey[300],\n boxSizing: 'border-box',\n borderRadius: theme.shape.borderRadius,\n paddingTop: theme.spacing(2),\n paddingBottom: theme.spacing(2),\n textTransform: 'none',\n },\n}));\n\nconst AddButton: React.FC = ({\n text,\n textVariant = 'subtitle2',\n ...rest\n}) => {\n const classes = useStyles();\n\n return (\n \n );\n};\n\nexport default AddButton;\n","import { AddModal, SaveModal } from 'components';\nimport { ModalProps } from 'components/Modal';\nimport { useMemo } from 'react';\n\nexport const useModal = (\n isAddModal: boolean,\n isBmpModal: boolean\n): {\n Modal: React.FC>;\n title: string;\n} => {\n const Modal = useMemo(() => {\n if (isAddModal) {\n return AddModal;\n }\n\n return SaveModal;\n }, [isAddModal]);\n\n let title = 'Add Best Management Practice';\n\n if (!isBmpModal) {\n // in case of MG modal\n title = 'Add Measurable Goal';\n }\n\n if (!isAddModal) {\n title = title.replace('Add', 'Change');\n }\n\n return {\n Modal,\n title,\n };\n};\n","import { amber, green, red } from '@material-ui/core/colors';\nimport SvgIcon from '@material-ui/core/SvgIcon';\nimport ActiveIcon from '@material-ui/icons/Check';\nimport DraftIcon from '@material-ui/icons/CreateOutlined';\nimport PreviousIcon from '@material-ui/icons/LockOutlined';\nimport { SWMPStatus } from 'models';\n\nexport interface SWMPStatusDisplay {\n status: SWMPStatus;\n color: string;\n Icon: typeof SvgIcon;\n}\n\nconst statusDisplayMap: { [key: string]: SWMPStatusDisplay } = {\n [SWMPStatus.Draft]: {\n status: SWMPStatus.Draft,\n color: amber[100],\n Icon: DraftIcon,\n },\n [SWMPStatus.Active]: {\n status: SWMPStatus.Active,\n color: green[100],\n Icon: ActiveIcon,\n },\n [SWMPStatus.Previous]: {\n status: SWMPStatus.Previous,\n color: red[100],\n Icon: PreviousIcon,\n },\n};\n\n/** Provide display properties (ie. icon, color) for a SWMPStatus */\nexport const useSwmpStatusDisplay = (\n swmpStatus: SWMPStatus\n): SWMPStatusDisplay => {\n const display = statusDisplayMap[swmpStatus];\n if (!display) {\n throw new Error(\n `Display configuration for SWMPStatus '${swmpStatus}' not defined`\n );\n }\n return display;\n};\n","import { Activity } from 'models/Activity';\nimport { BMP } from 'models/BMP';\nimport { MG } from 'models/MG';\nimport { SWMP } from 'models/SWMP';\nimport { useEffect, useState } from 'react';\n\nexport const useValidator = (\n entity: BMP | MG | SWMP | Activity,\n requiredFields: string[],\n isModalOpen: boolean,\n setEntity: React.Dispatch>,\n handleCompleteEntity: () => void\n) => {\n const [validator, setValidator] = useState<{ [key: string]: boolean | null }>(\n {}\n );\n\n useEffect(() => {\n if (!isModalOpen) {\n return;\n }\n\n const validator = requiredFields.reduce((acc, field) => {\n if (\n !entity[field] ||\n (Array.isArray(entity[field]) && !entity[field].length)\n ) {\n acc[field] = null;\n } else {\n acc[field] = true;\n }\n return acc;\n }, {});\n\n setValidator(validator);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isModalOpen]);\n\n const handleChange = (\n event: React.ChangeEvent<\n | HTMLInputElement\n | HTMLTextAreaElement\n | { name?: string | undefined; value: unknown }\n >\n ) => {\n const fieldName = event.target.name!;\n const checkedValue = (event.target as HTMLInputElement).checked;\n let value: any = event.target.value;\n\n switch (fieldName) {\n case 'year':\n if (!/^[0-9]*$/.test(value)) {\n value = entity[fieldName];\n }\n break;\n\n case 'startYear':\n value = parseInt(value);\n break;\n\n case 'minimumControlMeasures':\n const { minimumControlMeasures: bmpMcms } = entity as BMP;\n\n if (checkedValue) {\n value = [...bmpMcms, value];\n } else {\n value = bmpMcms.filter((val: string) => val !== value);\n }\n break;\n\n case 'isQuantityRequired':\n value = checkedValue;\n break;\n\n case 'yearsImplemented':\n const { yearsImplemented } = entity as MG;\n\n if (checkedValue) {\n value = [...yearsImplemented, parseInt(value)];\n } else {\n value = yearsImplemented.filter(\n (val: number) => val !== parseInt(value)\n );\n }\n break;\n\n default:\n break;\n }\n\n if (requiredFields.includes(fieldName)) {\n if (!value || (typeof value !== 'number' && !value.length)) {\n validator[fieldName] = false;\n setValidator(validator);\n } else if (!validator[fieldName]) {\n // to prevent set the same state\n validator[fieldName] = true;\n setValidator(validator);\n }\n }\n\n setEntity({\n ...entity,\n [fieldName]: value,\n });\n };\n\n const handleComplete = () => {\n const hasError = Object.values(validator).some((err) => !err);\n\n if (hasError) {\n Object.keys(validator).forEach((field) => {\n if (validator[field] === null) {\n validator[field] = false;\n }\n });\n\n return setValidator({ ...validator });\n }\n\n handleCompleteEntity();\n };\n\n return {\n validator,\n handleChange,\n handleComplete,\n };\n};\n","import { MG } from './MG';\n\nexport interface BMP {\n id: string;\n swmpId?: number;\n number: string;\n title: string;\n description?: string;\n startYear: number;\n minimumControlMeasures: string[];\n measurableGoals: MG[];\n}\n\nexport const INITIAL_BMP: BMP = {\n id: '',\n swmpId: 0,\n number: '',\n title: '',\n description: '',\n startYear: 0, // existing year as a default\n minimumControlMeasures: [],\n measurableGoals: [],\n};\n","import Box from '@material-ui/core/Box';\nimport Card from '@material-ui/core/Card';\nimport CardContent from '@material-ui/core/CardContent';\nimport Checkbox from '@material-ui/core/Checkbox';\nimport Divider from '@material-ui/core/Divider';\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\nimport IconButton from '@material-ui/core/IconButton';\nimport { makeStyles } from '@material-ui/core/styles';\nimport Typography from '@material-ui/core/Typography';\nimport BlockIcon from '@material-ui/icons/BlockOutlined';\nimport CheckIcon from '@material-ui/icons/CheckOutlined';\nimport EditIcon from '@material-ui/icons/CreateOutlined';\nimport RemoveIcon from '@material-ui/icons/DeleteOutlined';\nimport { AddButton, LabelContainer, TextField, Textarea } from 'components';\nimport { useModal, useValidator } from 'hooks';\nimport { startCase } from 'lodash';\nimport { BMP, INITIAL_BMP } from 'models/BMP';\nimport { INITIAL_MG, MG } from 'models/MG';\nimport React, { useState } from 'react';\nimport { connect } from 'react-redux';\nimport * as actions from 'redux/actions';\n\ninterface BmpCardProps {\n bmps: BMP[];\n planLength: number;\n showUpdateButton?: boolean;\n onEditBmp: (bmpId: string) => void;\n onRemoveBmp: (bmpId: string) => void;\n onCompleteMg: (measurableGoal: MG, isAdd: boolean, bmp: BMP) => void;\n onRemoveMg: (mgId: string, bmpId: string) => void;\n onSetError: (error: string) => void;\n}\n\nconst useStyles = makeStyles((theme) => ({\n divider: {\n marginRight: -theme.spacing(2),\n marginLeft: -theme.spacing(2),\n },\n error: {\n color: '#F00',\n },\n description: {\n whiteSpace: 'pre-wrap',\n },\n}));\n\nconst BmpCard: React.FC = ({\n bmps,\n planLength,\n showUpdateButton = true,\n onEditBmp,\n onRemoveBmp,\n onCompleteMg,\n onRemoveMg,\n onSetError,\n}) => {\n const [measurableGoal, setMeasurableGoal] = useState(INITIAL_MG);\n const [selectedMgBmp, setSelectedMgBmp] = useState(INITIAL_BMP);\n const [isAddModal, setIsAddModal] = useState(true);\n const [isModalOpen, setIsModalOpen] = useState(false);\n const { Modal, title } = useModal(isAddModal, false);\n const classes = useStyles();\n\n const initializeMgModal = () => {\n setIsModalOpen(false);\n setIsAddModal(true);\n setMeasurableGoal(INITIAL_MG);\n };\n\n const handleCompleteMg = async () => {\n try {\n await onCompleteMg(measurableGoal, isAddModal, selectedMgBmp);\n initializeMgModal();\n } catch (error) {\n onSetError(error.response.data.message);\n }\n };\n\n const { validator, handleChange, handleComplete } = useValidator(\n measurableGoal,\n ['number', 'title', 'yearsImplemented'],\n isModalOpen,\n setMeasurableGoal,\n handleCompleteMg\n );\n\n return (\n <>\n {bmps.map((bmp) => (\n \n \n \n \n \n {bmp.number} {bmp.title}\n \n {showUpdateButton && (\n \n onEditBmp(bmp.id)}>\n \n \n onRemoveBmp(bmp.id)}>\n \n \n \n )}\n \n \n \n {`MCMs: ${bmp.minimumControlMeasures.sort().join(', ')}`}\n    •   \n {`Year Implemented: ${bmp.startYear ? bmp.startYear : 1}`}\n \n \n \n \n {bmp.description}\n \n \n {showUpdateButton && (\n {\n setSelectedMgBmp(bmp);\n setMeasurableGoal({\n ...measurableGoal,\n number: bmp.number,\n title: bmp.title,\n });\n setIsModalOpen(true);\n }}\n />\n )}\n {bmp.measurableGoals.length > 0 ? (\n <>\n \n Measurable Goals\n \n {bmp.measurableGoals.map((mg) => (\n \n \n \n \n {mg.number} {mg.title}\n \n {showUpdateButton && (\n \n {\n setMeasurableGoal(mg);\n setSelectedMgBmp(bmp);\n setIsAddModal(false);\n setIsModalOpen(true);\n }}>\n \n \n onRemoveMg(mg.id, bmp.id)}>\n \n \n \n )}\n \n \n \n Years Implemented:{' '}\n {mg.yearsImplemented.sort().join(', ')}\n \n \n \n {!mg.isQuantityRequired && (\n <>\n \n \n \n \n Quantity Not Required\n \n \n )}\n {mg.isQuantityRequired && (\n <>\n {['informationUsed', 'units', 'annualGoal'].map(\n (fieldKey) => (\n \n \n {startCase(fieldKey)}: {mg[fieldKey]}\n    •   \n \n \n )\n )}\n \n \n \n \n Quantity Required\n \n \n )}\n \n \n {mg.description}\n \n \n ))}\n \n ) : (\n \n \n Add at least 1 Measurable Goal to track activity for this\n Best Management Practice\n \n \n )}\n \n \n \n ))}\n\n \n \n \n \n \n \n \n \n \n \n {Array.from({ length: planLength }).map((_, index) => (\n \n \n }\n />\n \n ))}\n \n {validator['yearsImplemented'] === false ? 'Year is required' : ''}\n \n \n \n \n }\n label=\"Allow tracking quantities with activities\"\n />\n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nconst mapDispatchToProps = (dispatch) => ({\n onSetError: (error: string) => dispatch(actions.setError(error)),\n});\n\nexport default connect(null, mapDispatchToProps)(BmpCard);\n","import { BoxProps } from '@material-ui/core';\nimport Box from '@material-ui/core/Box';\nimport { makeStyles } from '@material-ui/core/styles';\nimport Typography from '@material-ui/core/Typography';\nimport React from 'react';\n\ninterface LabelContainerProps extends BoxProps {\n label?: string;\n disabled?: boolean;\n}\n\nconst useStyles = makeStyles({\n label: {\n whiteSpace: 'pre-wrap',\n fontWeight: 500,\n },\n});\n\nconst LabelContainer: React.FC = ({\n label,\n children,\n disabled,\n ...rest\n}) => {\n const classes = useStyles();\n\n return (\n \n \n \n {label}\n \n \n {children}\n \n );\n};\n\nexport default LabelContainer;\n","import { DialogProps } from '@material-ui/core';\nimport Box from '@material-ui/core/Box';\nimport Button from '@material-ui/core/Button';\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogActions from '@material-ui/core/DialogActions';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport DialogTitle from '@material-ui/core/DialogTitle';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { Close } from '@material-ui/icons';\nimport React from 'react';\n\nexport interface ModalProps extends DialogProps {\n title: string;\n completeActionText: string;\n onComplete: () => void;\n onCancel: () => void;\n}\n\nconst useStyles = makeStyles({\n cancelButton: {\n border: 'none',\n },\n});\n\nconst Modal: React.FC = ({\n open,\n title,\n completeActionText,\n onComplete,\n onCancel,\n children,\n}) => {\n const classes = useStyles();\n\n return (\n \n \n {title}\n {children}\n \n }\n onClick={onCancel}>\n Cancel\n \n \n {completeActionText}\n \n \n \n \n );\n};\n\nexport const AddModal: React.FC> = (\n props\n) => ;\n\nexport const SaveModal: React.FC> = (\n props\n) => ;\n\nexport default Modal;\n","import { unstable_createMuiStrictModeTheme as createMuiTheme } from '@material-ui/core';\nimport { blue, teal } from '@material-ui/core/colors';\n\nconst theme = createMuiTheme({\n overrides: {\n MuiTypography: {\n gutterBottom: {\n marginBottom: '1rem',\n },\n colorTextSecondary: {\n color: 'rgba(0, 0, 0, 0.6)',\n },\n },\n MuiDialogTitle: {\n root: {\n textAlign: 'center',\n '& h2': {\n fontSize: `${18 / 16}rem`,\n fontWeight: 400,\n },\n },\n },\n MuiDialogContent: {\n root: {\n paddingTop: 0,\n },\n },\n MuiDialogActions: {\n root: {\n justifyContent: 'center',\n },\n spacing: {\n padding: 24,\n },\n },\n MuiSvgIcon: {\n root: {\n color: 'rgba(0, 0, 0, 0.6)',\n },\n },\n MuiFormGroup: {\n root: {\n flexDirection: 'row',\n },\n },\n MuiFormHelperText: {\n contained: {\n marginLeft: 0,\n marginRight: 0,\n color: '#F00',\n },\n },\n MuiButton: {\n outlinedSecondary: {\n border: 'none !important',\n },\n containedSecondary: {\n color: '#FFF !important',\n },\n },\n MuiCardContent: {\n root: {\n '&:last-child': {\n paddingBottom: 16,\n },\n },\n },\n MuiLink: {\n root: {\n color: 'inherit',\n },\n underlineHover: {\n textDecoration: 'none !important',\n },\n },\n MuiInputBase: {\n root: {\n '&$disabled': {\n color: 'rgba(0, 0, 0, 0.7)',\n },\n },\n },\n MuiSelect: {\n root: {\n '& p': {\n lineHeight: 'unset',\n },\n },\n },\n },\n props: {\n MuiButton: {\n disableElevation: true,\n },\n },\n palette: {\n primary: {\n light: teal[100],\n main: teal[500],\n dark: teal[700],\n contrastText: '#FFF',\n },\n secondary: {\n light: blue[100],\n main: blue[400],\n dark: blue[900],\n contrastText: '#FFF',\n },\n },\n shape: {\n borderRadius: 3,\n },\n typography: {\n fontSize: 14,\n h6: {\n fontSize: `${16 / 16}rem`,\n fontWeight: 400,\n },\n h5: {\n fontSize: `${18 / 16}rem`,\n fontWeight: 400,\n },\n subtitle1: {\n fontSize: `${24 / 16}rem`,\n },\n subtitle2: {\n fontSize: `${18 / 16}rem`,\n fontWeight: 400,\n },\n body1: {\n fontSize: `${14 / 16}rem`,\n },\n body2: {\n fontSize: `${12 / 16}rem`,\n },\n button: {\n fontWeight: 400,\n },\n },\n});\n\nexport default theme;\n","import Box from '@material-ui/core/Box';\nimport { makeStyles } from '@material-ui/core/styles';\nimport Typography from '@material-ui/core/Typography';\nimport * as D from 'date-fns';\nimport { useSwmpStatusDisplay } from 'hooks';\nimport { SWMPStatus } from 'models';\nimport { SWMP } from 'models/SWMP';\nimport React from 'react';\nimport theme from 'theme';\n\ninterface SwmpCardProps {\n swmp: SWMP;\n}\n\nconst useStyles = makeStyles({\n boxContainer: {\n cursor: 'pointer',\n },\n});\n\nconst SwmpCard: React.FC = ({ swmp }) => {\n const { color, Icon } = useSwmpStatusDisplay(swmp.status);\n const classes = useStyles();\n const content = swmp.number ? [`${swmp.number}`] : [];\n\n switch (swmp.status) {\n case SWMPStatus.Draft:\n content.push(\n `Starting ${\n swmp.annualReportingYear\n ? `${D.format(new Date(swmp.annualReportingYear), 'MMMM d, ')} ${\n swmp.year\n }`\n : `January 1, ${swmp.year}`\n }`\n );\n break;\n\n case SWMPStatus.Active:\n content.push(\n `Currently in Year ${\n new Date().getFullYear() - parseInt(swmp.year) + 1\n }`\n );\n\n if (swmp.updatedDate) {\n content.push(\n `Updated ${D.format(new Date(swmp.updatedDate), 'MMMM d, yyyy')}`\n );\n }\n break;\n\n case SWMPStatus.Previous:\n content.push(\n `Completed ${\n swmp.annualReportingYear\n ? `${D.format(new Date(swmp.annualReportingYear), 'MMMM d,')} ${\n parseInt(swmp.year) + swmp.planLength\n }`\n : `December 31, ${parseInt(swmp.year) + swmp.planLength}`\n }`\n );\n break;\n\n default:\n break;\n }\n\n return (\n \n \n \n \n \n \n {swmp.status}\n \n \n \n {swmp.year}\n \n {content.join(' • ')}\n \n \n \n );\n};\n\nexport default SwmpCard;\n","import Box from '@material-ui/core/Box';\nimport Button from '@material-ui/core/Button';\nimport { makeStyles } from '@material-ui/core/styles';\nimport cx from 'classnames';\nimport { camelCase } from 'lodash';\nimport { SWMPAddStep, SWMPAnnulReportStep } from 'models';\nimport { SWMPAddStepInfo, SWMPAnnualReportStepInfo } from 'models/constants';\nimport React, { useMemo } from 'react';\nimport { useHistory, useParams } from 'react-router-dom';\n\nexport interface SwmpStepProps {\n swmpId: number;\n currentStep: SWMPAddStep | SWMPAnnulReportStep;\n totalSteps: (SWMPAddStepInfo | SWMPAnnualReportStepInfo)[];\n reportId?: number;\n}\n\nconst useStyles = makeStyles((theme) => ({\n stepButton: {\n borderRadius: 100,\n textTransform: 'unset',\n fontWeight: 400,\n },\n stepDivider: {\n flexBasis: 20,\n height: 2,\n background: theme.palette.secondary.light,\n },\n doneStep: {\n '& button': {\n background: theme.palette.secondary.main,\n },\n // styling for step divider\n '& + div': {\n background: theme.palette.secondary.main,\n },\n },\n currentStep: {\n '& button': {\n background: theme.palette.secondary.dark,\n },\n // styling for step divider\n '& + div': {\n background: theme.palette.secondary.light,\n },\n },\n}));\n\nconst SwmpStep: React.FC = ({\n swmpId,\n currentStep,\n totalSteps,\n reportId,\n}) => {\n const classes = useStyles();\n const history = useHistory();\n const { accessType } = useParams();\n\n let currentStepIndex = useMemo(\n () =>\n totalSteps.findIndex((step) => {\n return step.id === currentStep;\n }),\n [totalSteps, currentStep]\n );\n let steps: any[] = [];\n\n if (totalSteps.length === 2) {\n steps = totalSteps;\n } else if (currentStepIndex === 0) {\n steps = totalSteps.slice(0, 3);\n currentStepIndex = 0;\n } else if (currentStepIndex === totalSteps.length - 1) {\n steps = totalSteps.slice(totalSteps.length - 3, totalSteps.length);\n currentStepIndex = 2;\n } else {\n steps = [\n totalSteps[currentStepIndex - 1],\n totalSteps[currentStepIndex],\n totalSteps[currentStepIndex + 1],\n ];\n currentStepIndex = 1;\n }\n\n const handleMoveStep = (stepId: string) => {\n let route = '';\n\n if (reportId) {\n route = `/swmp/${swmpId}/${reportId}/annualReport/${camelCase(stepId)}`;\n } else if (accessType) {\n route = `/swmp/${swmpId}/${accessType}/${camelCase(stepId)}`;\n } else {\n route = `/swmp/draft/${swmpId}/${camelCase(stepId)}`;\n }\n\n history.push(route);\n };\n\n return (\n \n {steps.map((step, index) => (\n \n \n handleMoveStep(step.id)}>\n {step.text}\n \n \n {index !== steps.length - 1 && (\n \n )}\n \n ))}\n \n );\n};\n\nexport default SwmpStep;\n","import { TextareaAutosizeProps } from '@material-ui/core';\nimport Box from '@material-ui/core/Box';\nimport { makeStyles } from '@material-ui/core/styles';\nimport TextareaAutosize from '@material-ui/core/TextareaAutosize';\nimport Typography from '@material-ui/core/Typography';\nimport React from 'react';\n\ninterface TextareaProps extends TextareaAutosizeProps {\n label?: string;\n disabled?: boolean;\n}\n\nconst useStyles = makeStyles((theme) => ({\n textArea: {\n font: 'inherit',\n resize: 'vertical',\n width: '100%',\n minHeight: theme.spacing(25),\n outline: 0,\n border: 0,\n padding: '1em',\n\n '&:hover ~ div': {\n borderColor: '#000',\n },\n '&:focus ~ div': {\n borderWidth: 2,\n borderColor: theme.palette.primary.dark,\n },\n },\n textAreaContainer: {\n position: 'relative',\n display: 'flex',\n\n '& textarea:last-of-type': {\n display: 'none',\n },\n },\n textAreaBorder: {\n content: \"''\",\n position: 'absolute',\n display: 'block',\n width: '100%',\n height: '100%',\n left: 0,\n top: 0,\n borderStyle: 'solid',\n borderWidth: 1,\n borderColor: 'rgba(0, 0, 0, 0.23)',\n pointerEvents: 'none',\n borderRadius: 3,\n },\n}));\n\nconst Textarea: React.FC = ({ label, disabled, ...rest }) => {\n const classes = useStyles();\n\n return (\n <>\n {label && (\n \n \n {label}\n \n \n )}\n \n \n \n \n \n );\n};\n\nexport default Textarea;\n","import { TextFieldProps as MatTextFieldProps } from '@material-ui/core';\nimport Box from '@material-ui/core/Box';\nimport MatTextField from '@material-ui/core/TextField';\nimport Typography from '@material-ui/core/Typography';\nimport React from 'react';\n\ntype TextFieldProps = MatTextFieldProps & {\n noMb?: boolean;\n highlightLabel?: boolean;\n};\n\nconst TextField: React.FC> = ({\n noMb,\n label,\n disabled,\n highlightLabel = true,\n ...rest\n}) => {\n return (\n \n {label && (\n \n \n {label}\n \n \n )}\n\n \n \n );\n};\n\nexport default TextField;\n","import { PermitConditions } from './PermitConditions';\nimport { SWMPAddStep } from './SWMPAddStep';\nimport { SWMPAnnulReportStep } from './SWMPAnnulReportStep';\n\nexport interface SWMPAddStepInfo {\n id: SWMPAddStep;\n text: string;\n}\n\nexport const SWMP_ADD_STEPS: SWMPAddStepInfo[] = [\n {\n id: SWMPAddStep.General,\n text: 'General Information',\n },\n {\n id: SWMPAddStep.Bmp,\n text: 'Best Management Practices',\n },\n {\n id: SWMPAddStep.Start,\n text: 'Start SWMP',\n },\n];\n\nexport interface SWMPAnnualReportStepInfo {\n id: SWMPAnnulReportStep;\n text: string;\n}\n\nexport const SWMP_ANNUAL_REPORT_STEPS: SWMPAnnualReportStepInfo[] = [\n {\n id: SWMPAnnulReportStep.GeneralInfo,\n text: 'A. General Information',\n },\n {\n id: SWMPAnnulReportStep.ComplianceStatus,\n text: 'B. Status of Compliance',\n },\n {\n id: SWMPAnnulReportStep.StormwaterDataSummary,\n text: 'C. Stormwater Data Summary',\n },\n {\n id: SWMPAnnulReportStep.ImpairedWaterBodies,\n text: 'D. Impaired Waterbodies',\n },\n {\n id: SWMPAnnulReportStep.StormwaterActivities,\n text: 'E. Stormwater Activities',\n },\n {\n id: SWMPAnnulReportStep.StormwaterModifications,\n text: 'F. SWMP Modifications',\n },\n {\n id: SWMPAnnulReportStep.AdditionalBmp,\n text: 'G. Additional BMPs',\n },\n {\n id: SWMPAnnulReportStep.AdditionalInformation,\n text: 'H. Additional Information',\n },\n {\n id: SWMPAnnulReportStep.ConstructionActivities,\n text: 'I. Construction Activities',\n },\n];\n\nexport const COMPLIANCE_STATUS: {\n permitCondition: PermitConditions;\n text: string;\n}[] = [\n {\n permitCondition: PermitConditions.SubmittedSwmp,\n text:\n 'Permittee is currently in compliance with the SWMP as submitted to and approved by the TCEQ.',\n },\n {\n permitCondition: PermitConditions.RecordKeepingRequirements,\n text:\n 'Permittee is currently in compliance with recordkeeping and reporting requirements.',\n },\n {\n permitCondition: PermitConditions.EligibilityRequirements,\n text:\n 'Permittee meets the eligibility requirements of the permit (e.g., TMDL requirements, Edwards Aquifer limitations, compliance history, etc.).',\n },\n {\n permitCondition: PermitConditions.ConductedAnnualReview,\n text:\n 'Permittee conducted an annual review of its SWMP in conjunction with preparation of the annual report',\n },\n];\n","import DateFnsUtils from '@date-io/date-fns';\nimport Box from '@material-ui/core/Box';\nimport Button from '@material-ui/core/Button';\nimport FormControl from '@material-ui/core/FormControl';\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\nimport InputAdornment from '@material-ui/core/InputAdornment';\nimport MenuItem from '@material-ui/core/MenuItem';\nimport Radio from '@material-ui/core/Radio';\nimport RadioGroup from '@material-ui/core/RadioGroup';\nimport Select from '@material-ui/core/Select';\nimport { makeStyles } from '@material-ui/core/styles';\nimport Typography from '@material-ui/core/Typography';\nimport ArrowForwardIos from '@material-ui/icons/ArrowForwardIos';\nimport EmailOutlined from '@material-ui/icons/EmailOutlined';\nimport PhoneOutlined from '@material-ui/icons/PhoneOutlined';\nimport {\n KeyboardDatePicker,\n MuiPickersUtilsProvider,\n} from '@material-ui/pickers';\nimport { LabelContainer, TextField } from 'components';\nimport { SWMP } from 'models/SWMP';\nimport React, { useEffect, useMemo, useState } from 'react';\nimport { connect } from 'react-redux';\nimport { useHistory, useParams } from 'react-router-dom';\nimport * as actions from 'redux/actions';\nimport select from 'redux/select';\nimport { getStepRoute } from 'utils';\n\ninterface SwmpGeneralInfoProps {\n swmp: SWMP;\n onUpdate: (swmp: SWMP) => void;\n}\n\nexport const useStyles = makeStyles({\n datePicker: {\n flex: 1,\n },\n buttonIcon: {\n color: '#FFF',\n },\n error: {\n color: '#F00',\n },\n});\n\nconst SwmpGeneralInfo: React.FC = ({\n swmp,\n onUpdate,\n}) => {\n const [isCalendarYear, setIsCalendarYear] = useState(true);\n const { id: swmpId, step, accessType } = useParams();\n const history = useHistory();\n const classes = useStyles();\n\n const handleChangeGeneralInfo = (\n event:\n | React.ChangeEvent\n | React.ChangeEvent<{ name?: string; value: unknown }>\n ) => {\n const { name, value } = event.target;\n\n if (name === 'year' && !/^[0-9]*$/.test(value as string)) {\n return;\n }\n\n onUpdate({\n ...swmp,\n [name as string]: value,\n });\n };\n\n useEffect(() => {\n if (swmp.annualReportingYear) {\n setIsCalendarYear(false);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [swmp.id]);\n\n const isView = useMemo(() => {\n return accessType === 'view';\n }, [accessType]);\n\n return (\n <>\n \n \n \n \n \n Operator Level\n \n \n \n {Array.from({ length: 4 }).map((_, level) => (\n \n {level + 1}\n \n ))}\n \n \n \n \n \n \n \n \n \n ),\n }}\n value={swmp.phone || ''}\n onChange={handleChangeGeneralInfo}\n />\n \n \n \n \n \n ),\n }}\n value={swmp.emailAddress || ''}\n onChange={handleChangeGeneralInfo}\n />\n \n \n \n \n {\n const value = JSON.parse(e.target.value);\n setIsCalendarYear(value);\n onUpdate({\n ...swmp,\n annualReportingYear: value\n ? null\n : new Date(parseInt(swmp.year), 11, 31),\n });\n }}>\n }\n label=\"Calendar Year\"\n disabled={isView}\n />\n }\n label=\"Other (last day of reporting year)\"\n disabled={isView}\n />\n \n \n onUpdate({\n ...swmp,\n annualReportingYear: date,\n })\n }\n className={classes.datePicker}\n inputVariant=\"outlined\"\n InputAdornmentProps={{ position: 'start' }}\n />\n \n \n \n \n \n }\n onClick={() =>\n history.push(getStepRoute(swmpId, null, step, true, accessType))\n }>\n Best Management Practices\n \n \n \n );\n};\n\nconst mapStateToProps = (state) => ({\n swmp: select.swmp(state),\n});\n\nconst mapDispatchToProps = (dispatch) => ({\n onUpdate: (swmp: SWMP) => dispatch(actions.updateSwmp(swmp)),\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(SwmpGeneralInfo);\n","import Box from '@material-ui/core/Box';\nimport Button from '@material-ui/core/Button';\nimport Checkbox from '@material-ui/core/Checkbox';\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\nimport Radio from '@material-ui/core/Radio';\nimport RadioGroup from '@material-ui/core/RadioGroup';\nimport Typography from '@material-ui/core/Typography';\nimport ArrowBackIcon from '@material-ui/icons/ArrowBackIos';\nimport ArrowForwardIcon from '@material-ui/icons/ArrowForwardIos';\nimport {\n AddButton,\n BmpCard,\n LabelContainer,\n TextField,\n Textarea,\n} from 'components';\nimport { useModal, useValidator } from 'hooks';\nimport { BMP, INITIAL_BMP } from 'models/BMP';\nimport { MG } from 'models/MG';\nimport React, { useMemo, useState } from 'react';\nimport { connect } from 'react-redux';\nimport { useHistory, useParams } from 'react-router-dom';\nimport * as actions from 'redux/actions';\nimport select from 'redux/select';\nimport {\n createBmp,\n createMg,\n deleteBmp,\n deleteMg,\n updateBmp,\n updateMg,\n} from 'services';\nimport { getStepRoute } from 'utils';\nimport * as uuid from 'uuid';\n\nimport { useStyles } from './SwmpGeneralInfo';\n\ninterface SwmpAddBmpProps {\n planLength: number;\n bstMgtPracs: BMP[];\n measurableGoals: MG[];\n onUpdateBmp: (bmp: BMP[]) => void;\n onUpdateMg: (mg: MG[]) => void;\n onSetError: (error: string) => void;\n}\n\nconst SwmpAddBmp: React.FC = ({\n planLength,\n bstMgtPracs,\n measurableGoals,\n onUpdateBmp,\n onUpdateMg,\n onSetError,\n}) => {\n const [isAddModal, setIsAddModal] = useState(true); // Add modal when the value is true. Otherwise it's a change modal\n const [isModalOpen, setIsModalOpen] = useState(false);\n const [bmp, setBmp] = useState(INITIAL_BMP);\n const { Modal, title } = useModal(isAddModal, true);\n const { id: swmpId, step, accessType } = useParams();\n const history = useHistory();\n const classes = useStyles();\n\n const handleCompleteBmp = async () => {\n try {\n if (isAddModal) {\n const newBmp = accessType\n ? { id: uuid.v4(), swmpId }\n : await createBmp({\n ...bmp,\n swmpId,\n });\n\n onUpdateBmp([\n {\n ...bmp,\n swmpId: newBmp.swmpId,\n id: newBmp.id,\n },\n ...bstMgtPracs,\n ]);\n } else {\n !accessType && (await updateBmp(bmp));\n const selectedBmpIndex = bstMgtPracs.findIndex((b) => b.id === bmp.id);\n bstMgtPracs[selectedBmpIndex] = bmp;\n onUpdateBmp(bstMgtPracs);\n }\n\n setIsModalOpen(false);\n setBmp(INITIAL_BMP);\n } catch (error) {\n onSetError(error.response.data.message);\n }\n };\n\n const handleCompleteMg = async (\n measurableGoal: MG,\n isAdd: boolean,\n bmp: BMP\n ) => {\n if (isAdd) {\n const createdMg = accessType\n ? {\n id: uuid.v4(),\n }\n : await createMg({\n ...measurableGoal,\n bmpId: bmp.id,\n });\n const newMg: MG = {\n ...measurableGoal,\n id: createdMg.id,\n bmp: {\n id: bmp.id,\n title: bmp.title,\n minimumControlMeasures: bmp.minimumControlMeasures,\n },\n };\n const updatedBmpIndex = bstMgtPracs.findIndex((b) => b.id === bmp.id);\n bstMgtPracs[updatedBmpIndex].measurableGoals = bstMgtPracs[\n updatedBmpIndex\n ].measurableGoals.concat(newMg);\n\n onUpdateMg(measurableGoals.concat(newMg));\n onUpdateBmp(bstMgtPracs);\n } else {\n !accessType &&\n (await updateMg({\n ...measurableGoal,\n bmpId: bmp.id,\n }));\n const mgIndex = measurableGoals.findIndex(\n (mg) => mg.id === measurableGoal.id\n );\n measurableGoals[mgIndex] = measurableGoal;\n const updatedBmpIndex = bstMgtPracs.findIndex((b) => b.id === bmp.id);\n const assignedBmpMgIndex = bstMgtPracs[\n updatedBmpIndex\n ].measurableGoals.findIndex((mg) => mg.id === measurableGoal.id);\n bstMgtPracs[updatedBmpIndex].measurableGoals[\n assignedBmpMgIndex\n ] = measurableGoal;\n\n onUpdateMg(measurableGoals);\n onUpdateBmp([...bstMgtPracs]);\n }\n };\n\n const handleRemoveMg = async (mgId: string, bmpId: string) => {\n !accessType && (await deleteMg(mgId));\n const updatedBmpIndex = bstMgtPracs.findIndex((bmp) => bmp.id === bmpId);\n bstMgtPracs[updatedBmpIndex].measurableGoals = bstMgtPracs[\n updatedBmpIndex\n ].measurableGoals.filter((mg) => mg.id !== mgId);\n\n onUpdateMg(measurableGoals.filter((mg) => mg.id !== mgId));\n onUpdateBmp(bstMgtPracs);\n };\n\n const handleRemoveBmp = async (bmpId: string) => {\n !accessType && (await deleteBmp(bmpId));\n onUpdateBmp(bstMgtPracs.filter((bmp) => bmp.id !== bmpId));\n };\n\n const { validator, handleChange, handleComplete } = useValidator(\n bmp,\n ['number', 'title', 'minimumControlMeasures'],\n isModalOpen,\n setBmp,\n handleCompleteBmp\n );\n\n const showAddButton = useMemo(() => {\n return !accessType || accessType === 'update';\n }, [accessType]);\n\n return (\n <>\n {showAddButton && (\n {\n setIsAddModal(true);\n setIsModalOpen(true);\n }}\n />\n )}\n {\n setBmp(bstMgtPracs.find((bmp) => bmp.id === bmpId)!);\n setIsAddModal(false);\n setIsModalOpen(true);\n }}\n onRemoveBmp={handleRemoveBmp}\n onCompleteMg={handleCompleteMg}\n onRemoveMg={handleRemoveMg}\n showUpdateButton={showAddButton}\n planLength={planLength}\n />\n\n \n \n }\n onClick={() =>\n history.push(getStepRoute(swmpId, null, step, false, accessType))\n }>\n General Information\n \n {showAddButton && (\n \n }\n onClick={() =>\n history.push(getStepRoute(swmpId, null, step, true, accessType))\n }>\n {accessType === 'update' ? 'Apply Updates' : 'Start Permit'}\n \n )}\n \n\n {\n setBmp(INITIAL_BMP);\n setIsModalOpen(false);\n }}>\n \n \n \n \n \n \n \n \n \n {Array.from({ length: 6 }).map((_, index) => (\n \n \n }\n label={(index + 1).toString()}\n />\n \n ))}\n \n \n }\n label=\"TMDL\"\n />\n \n \n {validator['minimumControlMeasures'] === false\n ? 'MCM is required'\n : ''}\n \n \n \n \n } />\n {Array.from({ length: planLength }).map((_, index) => (\n \n }\n />\n \n ))}\n \n \n \n \n \n \n \n );\n};\n\nconst mapStateToProps = (state) => ({\n planLength: select.planLength(state),\n bstMgtPracs: select.bstMgtPracs(state),\n measurableGoals: select.measurableGoals(state),\n});\n\nconst mapDispatchToProps = (dispatch) => ({\n onUpdateBmp: (bmp: BMP[]) => dispatch(actions.updateBmp(bmp)),\n onUpdateMg: (mg: MG[]) => dispatch(actions.updateMg(mg)),\n onSetError: (error: string) => dispatch(actions.setError(error)),\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(SwmpAddBmp);\n","import Box from '@material-ui/core/Box';\nimport Button from '@material-ui/core/Button';\nimport { makeStyles } from '@material-ui/core/styles';\nimport Typography from '@material-ui/core/Typography';\nimport ArrowBackIcon from '@material-ui/icons/ArrowBackIos';\nimport StartIcon from '@material-ui/icons/SlideshowOutlined';\nimport { Modal } from 'components';\nimport { SWMPStatus } from 'models';\nimport { BMP } from 'models/BMP';\nimport { INITIAL_SWMP, SWMP } from 'models/SWMP';\nimport React, { useMemo, useState } from 'react';\nimport { connect } from 'react-redux';\nimport { useHistory, useParams } from 'react-router-dom';\nimport * as actions from 'redux/actions';\nimport select from 'redux/select';\nimport { startSwmp, updateEntities } from 'services';\nimport { getStepRoute } from 'utils';\n\nimport { useStyles as useGeneralStyles } from './SwmpGeneralInfo';\n\ninterface SwmpStartProps {\n swmp: SWMP;\n bstMgtPracs: BMP[];\n onComplete: (\n swmp: SWMP,\n bstMgtPracs: BMP[],\n isUpdate: boolean\n ) => Promise;\n onSetError: (error: string) => void;\n}\n\nconst useStyles = makeStyles((theme) => ({\n startButton: {\n padding: `${theme.spacing(1.5)}px ${theme.spacing(4)}px`,\n },\n}));\n\nconst SwmpStart: React.FC = ({\n swmp,\n bstMgtPracs,\n onComplete,\n onSetError,\n}) => {\n const [isPromptModalOpen, setIsPromptModalOpen] = useState(false);\n const history = useHistory();\n const classes = useStyles();\n const classesGeneral = useGeneralStyles();\n const { id: swmpId, step, accessType } = useParams();\n\n const handleCompleteSwmp = async () => {\n try {\n setIsPromptModalOpen(false);\n await onComplete(swmp, bstMgtPracs, !!accessType);\n\n history.push(!!accessType ? `/swmp/${swmpId}` : '/swmp');\n } catch (error) {\n onSetError(error.response.data.message);\n }\n };\n\n const { title, subTitle, completeText } = useMemo(() => {\n if (!accessType) {\n return {\n title: 'Make this SWMP the new active SWMP by starting',\n subTitle:\n 'Once started, all activity will start to be logged against this SWMP.',\n completeText: 'Start',\n };\n }\n\n return {\n title: 'Update Stormwater Management Plan',\n subTitle: `Updates will be available for all new Stormwater Management\n Plan activities. Previously recorded activities will retain\n the Best Management Practice and goals originally applied.`,\n completeText: 'Update',\n };\n }, [accessType]);\n\n return (\n <>\n \n \n {title}\n \n \n \n {subTitle}\n \n \n \n }\n onClick={() => setIsPromptModalOpen(true)}>\n {completeText} MS4 SWMP for {swmp.year}\n \n \n \n }\n onClick={() =>\n history.push(getStepRoute(swmpId, null, step, false, accessType))\n }>\n Best Management Practices\n \n setIsPromptModalOpen(false)}\n onComplete={handleCompleteSwmp}>\n \n {title}\n \n \n \n {subTitle}\n \n \n \n \n );\n};\n\nconst mapStateToProps = (state) => ({\n swmp: select.swmp(state),\n bstMgtPracs: select.bstMgtPracs(state),\n});\n\nconst mapDispatchToProps = (dispatch) => ({\n onComplete: async (swmp: SWMP, bstMgtPracs: BMP[], isUpdate: boolean) => {\n if (!isUpdate) {\n swmp.status = SWMPStatus.Active;\n await startSwmp(swmp);\n } else {\n await updateEntities(swmp, bstMgtPracs);\n }\n\n dispatch(actions.updateSwmp(INITIAL_SWMP));\n dispatch(actions.updateBmp([]));\n dispatch(actions.updateMg([]));\n },\n onSetError: (error: string) => dispatch(actions.setError(error)),\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(SwmpStart);\n","import Box from '@material-ui/core/Box';\nimport Button from '@material-ui/core/Button';\nimport Typography from '@material-ui/core/Typography';\nimport ArrowBackIcon from '@material-ui/icons/ArrowBackIos';\nimport { SwmpStep, Modal } from 'components';\nimport { startCase, upperFirst } from 'lodash';\nimport { cloneDeep } from 'lodash';\nimport { SWMPAddStep } from 'models';\nimport { SWMP_ADD_STEPS } from 'models/constants';\nimport { Customer } from 'models/Customer';\nimport { INITIAL_SWMP, SWMP } from 'models/SWMP';\nimport React, { useEffect, useMemo, useState } from 'react';\nimport { connect } from 'react-redux';\nimport { useHistory, useParams } from 'react-router-dom';\nimport * as actions from 'redux/actions';\nimport select from 'redux/select';\nimport { fetchSwmpDetails, deleteSwmp } from 'services';\nimport { updateSwmp } from 'services';\n\nimport SwmpAddBmp from './SwmpAddBmp';\nimport SwmpGeneralInfo from './SwmpGeneralInfo';\nimport SwmpStart from './SwmpStart';\n\ninterface SwmpDraftProps {\n swmp: SWMP;\n customer: Customer;\n onLoad: (swmpId: number) => Promise;\n onSave: (swmp: SWMP) => Promise;\n}\n\nconst SwmpDraft: React.FC = ({\n swmp,\n customer,\n onLoad,\n onSave,\n}) => {\n const { id: swmpId, step, accessType } = useParams();\n const history = useHistory();\n\n const [isDeleteModalOpen, setIsDeleteModalOpen] = useState(false);\n\n useEffect(() => {\n onLoad(swmpId);\n }, [onLoad, swmpId]);\n\n const handleDeleteSwmp = async () => {\n await deleteSwmp(swmp.id);\n\n history.push('/swmp');\n };\n\n let stepContainer: React.ReactNode;\n\n switch (upperFirst(step)) {\n case SWMPAddStep.General:\n stepContainer = ;\n break;\n\n case SWMPAddStep.Bmp:\n stepContainer = ;\n break;\n\n case SWMPAddStep.Start:\n stepContainer = ;\n break;\n\n default:\n break;\n }\n\n const totalSteps = useMemo(() => {\n if (!accessType) {\n return SWMP_ADD_STEPS;\n }\n\n if (accessType === 'view') {\n return SWMP_ADD_STEPS.slice(0, 2);\n }\n\n const swmpUpdateSteps = cloneDeep(SWMP_ADD_STEPS);\n swmpUpdateSteps[2].text = 'Apply Updates';\n\n return swmpUpdateSteps;\n }, [accessType]);\n\n const subTitle = useMemo(() => {\n if (!accessType) {\n return 'Draft';\n }\n\n if (accessType === 'update') {\n return 'Apply Updates';\n }\n\n return '';\n }, [accessType]);\n\n return (\n <>\n \n }\n onClick={() => {\n !accessType && onSave(swmp);\n history.push(accessType ? `/swmp/${swmpId}` : '/swmp');\n }}>\n Stormwater Management Plan{accessType ? ` ${swmp.year}` : 's'}\n \n\n {!accessType && customer.admin && (\n \n )}\n \n\n \n Stormwater Management Plan {swmp.year}\n \n \n \n {subTitle}\n \n \n \n\n {stepContainer}\n\n setIsDeleteModalOpen(false)}\n onComplete={handleDeleteSwmp}\n />\n \n );\n};\n\nconst mapStateToProps = (state) => ({\n swmp: select.swmp(state),\n customer: select.customer(state),\n});\n\nconst mapDispatchToProps = (dispatch) => ({\n onLoad: async (swmpId: number) => {\n const { bmp, mg, swmp, customer } = await fetchSwmpDetails(swmpId);\n\n dispatch(actions.setCustomer(customer));\n dispatch(actions.updateSwmp(swmp));\n dispatch(actions.updateBmp(bmp));\n dispatch(actions.updateMg(mg));\n },\n onSave: async (swmp: SWMP) => {\n await updateSwmp(swmp);\n\n dispatch(actions.updateSwmp(INITIAL_SWMP));\n dispatch(actions.updateBmp([]));\n dispatch(actions.updateMg([]));\n },\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(SwmpDraft);\n","import SwmpAccess from './SwmpAccess';\n\nexport default SwmpAccess;\n","import { isEqual } from 'lodash';\nimport { SWMPStatus } from 'models';\nimport { INITIAL_SWMP, SWMP } from 'models/SWMP';\nimport React, { useEffect, useState } from 'react';\nimport { connect } from 'react-redux';\nimport { useHistory, useParams } from 'react-router-dom';\nimport * as actions from 'redux/actions';\nimport select from 'redux/select';\nimport { fetchSwmpDetails } from 'services';\n\nimport SwmpDraft from '../SwmpDraft';\n\ninterface SwmpAccessProps {\n swmp: SWMP;\n onLoad: (swmpId: number) => Promise;\n}\n\nconst SwmpAccess: React.FC = ({ swmp, onLoad }) => {\n const [showBmpSection, setShowBmpSection] = useState(false);\n const { id: swmpId } = useParams();\n const history = useHistory();\n\n useEffect(() => {\n onLoad(swmpId);\n }, [swmpId, onLoad]);\n\n useEffect(() => {\n if (!swmp || isEqual(swmp, INITIAL_SWMP)) {\n return;\n }\n\n if (swmp.status === SWMPStatus.Draft) {\n return history.push(`/swmp/${swmp.id}`);\n }\n\n setShowBmpSection(true);\n }, [swmp, history]);\n\n if (!showBmpSection) {\n return null;\n }\n\n return ;\n};\n\nconst mapStateToProps = (state) => ({\n swmp: select.swmp(state),\n});\n\nconst mapDispatchToProps = (dispatch) => ({\n onLoad: async (swmpId: number) => {\n const { bmp, mg, swmp } = await fetchSwmpDetails(swmpId);\n\n dispatch(actions.updateSwmp(swmp));\n dispatch(actions.updateBmp(bmp));\n dispatch(actions.updateMg(mg));\n },\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(SwmpAccess);\n","import { SWMPStatus } from 'models';\nimport { SWMP } from 'models/SWMP';\nimport React, { useEffect } from 'react';\nimport { useHistory } from 'react-router-dom';\nimport { fetchSwmpList } from 'services';\n\nconst SwmpActive: React.FC = () => {\n const history = useHistory();\n\n useEffect(() => {\n const fetchSwmps = async () => {\n const { swmp }: { swmp: SWMP[] } = await fetchSwmpList();\n const activatedSwmp = swmp.find((s) => s.status === SWMPStatus.Active);\n\n if (!activatedSwmp) {\n return history.push('/swmp');\n }\n\n history.push(`/swmp/${activatedSwmp.id}`);\n };\n\n fetchSwmps();\n }, [history]);\n\n return <>;\n};\n\nexport default SwmpActive;\n","import Box from '@material-ui/core/Box';\nimport Button from '@material-ui/core/Button';\nimport { teal } from '@material-ui/core/colors';\nimport FormControl from '@material-ui/core/FormControl';\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\nimport IconButton from '@material-ui/core/IconButton';\nimport MenuItem from '@material-ui/core/MenuItem';\nimport Radio from '@material-ui/core/Radio';\nimport RadioGroup from '@material-ui/core/RadioGroup';\nimport Select from '@material-ui/core/Select';\nimport { makeStyles } from '@material-ui/core/styles';\nimport Typography from '@material-ui/core/Typography';\nimport AddIcon from '@material-ui/icons/Add';\nimport ArrowBackIcon from '@material-ui/icons/ArrowBackIos';\nimport ArrowForwardIcon from '@material-ui/icons/ArrowForwardIos';\nimport DeleteIcon from '@material-ui/icons/Delete';\nimport { LabelContainer, TextField } from 'components';\nimport { camelCase } from 'lodash';\nimport { Activity } from 'models/Activity';\nimport { BMP } from 'models/BMP';\nimport { COMPLIANCE_STATUS } from 'models/constants';\nimport { MG } from 'models/MG';\nimport React, { useState } from 'react';\nimport { connect } from 'react-redux';\nimport { useHistory, useParams } from 'react-router-dom';\nimport * as actions from 'redux/actions';\nimport select from 'redux/select';\nimport {\n getDifferentEntities,\n getSortedEntities,\n getStepRoute,\n removeAnnualReportEntity,\n} from 'utils';\nimport * as uuid from 'uuid';\n\nimport { SwmpAnnualReportPromptProps } from '.';\n\ninterface SwmpComplianceStatusProps extends SwmpAnnualReportPromptProps {\n annualReportYear: number;\n bstMgtPracs: BMP[];\n measurableGoals: MG[];\n activities: Activity[];\n}\n\nexport const useStyles = makeStyles((theme) => ({\n addButton: {\n paddingTop: theme.spacing(1.75),\n paddingBottom: theme.spacing(1.75),\n paddingLeft: theme.spacing(2.5),\n paddingRight: theme.spacing(2.5),\n },\n buttonIcon: {\n color: '#FFF',\n },\n incompletedQuantity: {\n color: '#F00',\n },\n completedQuantity: {\n color: teal[600],\n },\n}));\n\nconst SwmpComplianceStatus: React.FC = ({\n annualReportYear,\n activities,\n bstMgtPracs,\n measurableGoals,\n annualReport,\n onUpdateAnnualReport,\n}) => {\n const { complianceStatus } = annualReport;\n const classes = useStyles();\n const history = useHistory();\n const { swmpId, reportId, step } = useParams();\n const [generalAssessmentBmpId, setGeneralAssessmentBmpId] = useState(\n ''\n );\n const [\n progressReducingPollutantsMgId,\n setProgressReducingPollutantsMgId,\n ] = useState('');\n const [successImplementationMgId, setSuccessImplementationMgId] = useState<\n string\n >('');\n\n const generalAssessments = getSortedEntities(\n complianceStatus.generalAssessments,\n 'bmp'\n );\n\n const progressReducingPollutants = getSortedEntities(\n complianceStatus.progressReducingPollutants,\n 'mg'\n );\n\n const successImplementations = getSortedEntities(\n complianceStatus.successImplementations,\n 'mg'\n );\n\n return (\n <>\n \n {COMPLIANCE_STATUS.map((status, index) => {\n const prop = camelCase(status.permitCondition);\n\n return (\n \n \n \n {status.text}\n \n \n onUpdateAnnualReport(\n `${prop}.value`,\n e.target.value === 'true'\n )\n }>\n }\n />\n }\n />\n \n \n \n onUpdateAnnualReport(`${prop}.description`, e.target.value)\n }\n placeholder=\"Provide information on the status of complying with permit conditions\"\n multiline\n rows={5}\n />\n \n );\n })}\n \n\n \n \n \n \n \n setGeneralAssessmentBmpId(e.target.value as string)\n }>\n \n Select a BMP\n \n {getDifferentEntities(\n bstMgtPracs,\n complianceStatus.generalAssessments,\n 'bmp'\n ).map((bmp) => (\n \n \n {bmp.number} {bmp.title}\n \n \n ))}\n \n \n \n \n }\n onClick={() => {\n if (!generalAssessmentBmpId) {\n return;\n }\n\n const selectedBmp = bstMgtPracs.find(\n (bmp) => bmp.id === generalAssessmentBmpId\n );\n const entities = [\n ...complianceStatus.generalAssessments,\n {\n id: uuid.v4(),\n bmp: selectedBmp,\n description: '',\n },\n ];\n\n onUpdateAnnualReport('generalAssessments', entities);\n setGeneralAssessmentBmpId('');\n }}>\n Add\n \n \n \n\n {generalAssessments.map((g, index) => (\n \n \n \n \n MCM: {g.bmp.minimumControlMeasures.join(', ')} • BMP:{' '}\n {g.bmp.number} {g.bmp.title}\n \n \n \n removeAnnualReportEntity(\n 'generalAssessments',\n index,\n complianceStatus,\n onUpdateAnnualReport\n )\n }>\n \n \n \n \n \n onUpdateAnnualReport(\n `generalAssessments.${index}.description`,\n e.target.value\n )\n }\n />\n \n \n ))}\n\n \n \n \n \n \n setProgressReducingPollutantsMgId(e.target.value as string)\n }>\n \n \n Select a Measurable Goal\n \n \n {getDifferentEntities(\n measurableGoals,\n complianceStatus.progressReducingPollutants,\n 'mg'\n ).map((mg) => (\n \n \n {mg.number} {mg.title}\n \n \n ))}\n \n \n \n \n }\n onClick={() => {\n if (!progressReducingPollutantsMgId) {\n return;\n }\n\n const selectedMg = measurableGoals.find(\n (mg) => mg.id === progressReducingPollutantsMgId\n );\n const entities = [\n ...complianceStatus.progressReducingPollutants,\n {\n id: uuid.v4(),\n mg: selectedMg,\n informationUsed: selectedMg?.informationUsed,\n quantity: selectedMg?.annualGoal,\n units: selectedMg?.units,\n description: '',\n },\n ];\n\n onUpdateAnnualReport('progressReducingPollutants', entities);\n setProgressReducingPollutantsMgId('');\n }}>\n Add\n \n \n \n\n {progressReducingPollutants.map((p, index) => {\n const annualGoal = measurableGoals.find((mg) => mg.id === p.mg.id)\n ?.annualGoal;\n const totalQuantity = activities\n .filter((t) => t.mgId === p.mg.id)\n .reduce((acc, t) => {\n if (new Date(t.date).getFullYear() === annualReportYear) {\n acc += parseInt(t.quantity);\n }\n return acc;\n }, 0);\n const totalQuantityPercents =\n Math.floor(\n (totalQuantity / parseInt(annualGoal as string)) * 100 * 100\n ) / 100;\n\n return (\n \n \n \n \n MCM: {p.mg.bmp.minimumControlMeasures.join(', ')} • MG:{' '}\n {p.mg.number} {p.mg.title}\n {p.informationUsed &&\n ` • Information Used: ${p.informationUsed}`}\n {annualGoal && ` • Annual Goal: ${annualGoal}`}\n {p.units && ` • Units: ${p.units}`}\n \n {p.mg.isQuantityRequired && (\n \n {totalQuantity} of {annualGoal}\n \n {` (${totalQuantityPercents}%) `}\n \n {p.mg.informationUsed} Marked this reporting period\n \n )}\n \n \n removeAnnualReportEntity(\n 'progressReducingPollutants',\n index,\n complianceStatus,\n onUpdateAnnualReport\n )\n }>\n \n \n \n \n \n \n onUpdateAnnualReport(\n `progressReducingPollutants.${index}.informationUsed`,\n e.target.value\n )\n }\n />\n \n\n \n \n onUpdateAnnualReport(\n `progressReducingPollutants.${index}.quantity`,\n e.target.value\n )\n }\n />\n \n\n \n \n onUpdateAnnualReport(\n `progressReducingPollutants.${index}.units`,\n e.target.value\n )\n }\n />\n \n \n \n onUpdateAnnualReport(\n `progressReducingPollutants.${index}.description`,\n e.target.value\n )\n }\n />\n \n );\n })}\n\n \n \n \n \n \n setSuccessImplementationMgId(e.target.value as string)\n }>\n \n \n Select a Measurable Goal\n \n \n {getDifferentEntities(\n measurableGoals,\n complianceStatus.successImplementations,\n 'mg'\n ).map((mg) => (\n \n \n {mg.number} {mg.title}\n \n \n ))}\n \n \n \n \n }\n onClick={() => {\n if (!successImplementationMgId) {\n return;\n }\n\n const selectedMg = measurableGoals.find(\n (mg) => mg.id === successImplementationMgId\n );\n const entities = [\n ...complianceStatus.successImplementations,\n {\n id: uuid.v4(),\n mg: selectedMg,\n description: '',\n },\n ];\n\n onUpdateAnnualReport('successImplementations', entities);\n setSuccessImplementationMgId('');\n }}>\n Add\n \n \n \n\n {successImplementations.map((s, index) => {\n const annualGoal = measurableGoals.find((mg) => mg.id === s.mg.id)\n ?.annualGoal;\n const totalQuantity = activities\n .filter((t) => t.mgId === s.mg.id)\n .reduce((acc, t) => {\n if (new Date(t.date).getFullYear() === annualReportYear) {\n acc += parseInt(t.quantity);\n }\n return acc;\n }, 0);\n const totalQuantityPercents =\n Math.floor(\n (totalQuantity / parseInt(annualGoal as string)) * 100 * 100\n ) / 100;\n\n return (\n \n \n \n \n MCM: {s.mg.bmp.minimumControlMeasures.join(', ')} • MG:{' '}\n {s.mg.number} {s.mg.title}\n \n {s.mg.isQuantityRequired && (\n \n {totalQuantity} of {annualGoal}\n \n {` (${totalQuantityPercents}%) `}\n \n {s.mg.informationUsed} this reporting period\n \n )}\n \n \n removeAnnualReportEntity(\n 'successImplementations',\n index,\n complianceStatus,\n onUpdateAnnualReport\n )\n }>\n \n \n \n \n onUpdateAnnualReport(\n `successImplementations.${index}.description`,\n e.target.value\n )\n }\n />\n \n );\n })}\n\n \n \n }\n onClick={() =>\n history.push(getStepRoute(swmpId, reportId, step, false))\n }>\n General Information\n \n \n }\n onClick={() =>\n history.push(getStepRoute(swmpId, reportId, step, true))\n }>\n Stormwater Data Summary\n \n \n \n );\n};\n\nconst mapStateToProps = (state) => ({\n bstMgtPracs: select.bstMgtPracs(state),\n measurableGoals: select.measurableGoals(state),\n activities: select.activities(state),\n annualReportYear: select.annualReportYear(state),\n annualReport: select.annualReport(state),\n});\n\nconst mapDispatchToProps = (dispatch) => ({\n onUpdateAnnualReport: (path: string, value: any) =>\n dispatch(actions.updateAnnualReport(`complianceStatus.${path}`, value)),\n});\n\nexport default connect(\n mapStateToProps,\n mapDispatchToProps\n)(SwmpComplianceStatus);\n","import Box from '@material-ui/core/Box';\nimport Button from '@material-ui/core/Button';\nimport FormControl from '@material-ui/core/FormControl';\nimport IconButton from '@material-ui/core/IconButton';\nimport MenuItem from '@material-ui/core/MenuItem';\nimport Select from '@material-ui/core/Select';\nimport Typography from '@material-ui/core/Typography';\nimport AddIcon from '@material-ui/icons/Add';\nimport ArrowBackIcon from '@material-ui/icons/ArrowBackIos';\nimport ArrowForwardIcon from '@material-ui/icons/ArrowForwardIos';\nimport DeleteIcon from '@material-ui/icons/Delete';\nimport { LabelContainer, TextField } from 'components';\nimport { BMP } from 'models/BMP';\nimport React, { useState } from 'react';\nimport { connect } from 'react-redux';\nimport { useHistory, useParams } from 'react-router-dom';\nimport * as actions from 'redux/actions';\nimport select from 'redux/select';\nimport {\n getDifferentEntities,\n getSortedEntities,\n getStepRoute,\n removeAnnualReportEntity,\n} from 'utils';\nimport * as uuid from 'uuid';\n\nimport { useStyles } from './SwmpComplianceStatus';\nimport { SwmpAnnualReportPromptProps } from '.';\n\ninterface SwmpActivitiesProps extends SwmpAnnualReportPromptProps {\n bstMgtPracs: BMP[];\n}\n\nconst SwmpActivities: React.FC = ({\n bstMgtPracs,\n annualReport,\n onUpdateAnnualReport,\n}) => {\n const { stormwaterActivities } = annualReport;\n const classes = useStyles();\n const history = useHistory();\n const { swmpId, step, reportId } = useParams();\n const [selectedBmpId, setSelectedBmpId] = useState('');\n\n const activities = getSortedEntities(stormwaterActivities.activities, 'bmp');\n\n return (\n <>\n \n \n \n \n setSelectedBmpId(e.target.value as string)}>\n \n Select a BMP\n \n {getDifferentEntities(\n bstMgtPracs,\n stormwaterActivities.activities,\n 'bmp'\n ).map((bmp) => (\n \n \n {bmp.number} {bmp.title}\n \n \n ))}\n \n \n \n \n }\n onClick={() => {\n if (!selectedBmpId) {\n return;\n }\n\n const selectedBmp = bstMgtPracs.find(\n (bmp) => bmp.id === selectedBmpId\n );\n const entities = [\n ...stormwaterActivities.activities,\n {\n id: uuid.v4(),\n bmp: selectedBmp,\n stormwaterActivity: '',\n description: '',\n },\n ];\n\n onUpdateAnnualReport('activities', entities);\n setSelectedBmpId('');\n }}>\n Add\n \n \n \n\n {activities.map((s, index) => (\n \n \n \n \n MCM: {s.bmp.minimumControlMeasures.join(', ')} • BMP:{' '}\n {s.bmp.number} {s.bmp.title}\n \n \n \n removeAnnualReportEntity(\n 'activities',\n index,\n stormwaterActivities,\n onUpdateAnnualReport\n )\n }>\n \n \n \n \n \n onUpdateAnnualReport(\n `activities.${index}.stormwaterActivity`,\n e.target.value\n )\n }\n />\n \n \n \n onUpdateAnnualReport(\n `activities.${index}.description`,\n e.target.value\n )\n }\n />\n \n \n ))}\n\n \n \n }\n onClick={() =>\n history.push(getStepRoute(swmpId, reportId, step, false))\n }>\n Impaired Waterbodies\n \n \n }\n onClick={() =>\n history.push(getStepRoute(swmpId, reportId, step, true))\n }>\n SWMP Modifications\n \n \n \n );\n};\n\nconst mapStateToProps = (state) => ({\n bstMgtPracs: select.bstMgtPracs(state),\n annualReport: select.annualReport(state),\n});\n\nconst mapDispatchToProps = (dispatch) => ({\n onUpdateAnnualReport: (path: string, value: any) =>\n dispatch(actions.updateAnnualReport(`stormwaterActivities.${path}`, value)),\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(SwmpActivities);\n","import Box from '@material-ui/core/Box';\nimport Button from '@material-ui/core/Button';\nimport IconButton from '@material-ui/core/IconButton';\nimport Typography from '@material-ui/core/Typography';\nimport AddIcon from '@material-ui/icons/Add';\nimport ArrowBackIcon from '@material-ui/icons/ArrowBackIos';\nimport ArrowForwardIcon from '@material-ui/icons/ArrowForwardIos';\nimport DeleteIcon from '@material-ui/icons/Delete';\nimport { LabelContainer, TextField } from 'components';\nimport React, { useState } from 'react';\nimport { connect } from 'react-redux';\nimport { useHistory, useParams } from 'react-router-dom';\nimport * as actions from 'redux/actions';\nimport select from 'redux/select';\nimport { getStepRoute, removeAnnualReportEntity } from 'utils';\nimport * as uuid from 'uuid';\n\nimport { useStyles } from './SwmpComplianceStatus';\nimport { SwmpAnnualReportPromptProps } from '.';\n\nconst SwmpAdditionalBmp: React.FC = ({\n annualReport,\n onUpdateAnnualReport,\n}) => {\n const { additionalBmps } = annualReport;\n const classes = useStyles();\n const history = useHistory();\n const { swmpId, step, reportId } = useParams();\n const [newBmp, setNewBmp] = useState('');\n\n return (\n <>\n \n \n \n setNewBmp(e.target.value)}\n />\n \n \n }\n onClick={() => {\n if (!newBmp) {\n return;\n }\n const index = additionalBmps.additionalBmpsImplementations.length;\n\n onUpdateAnnualReport(`additionalBmpsImplementations.${index}`, {\n id: uuid.v4(),\n bmp: newBmp,\n description: '',\n implementationSchedule: '',\n status: '',\n });\n }}>\n Add\n \n \n \n\n {additionalBmps.additionalBmpsImplementations.map((b, index) => (\n \n \n \n BMP: {b.bmp}\n \n \n removeAnnualReportEntity(\n 'additionalBmpsImplementations',\n index,\n additionalBmps,\n onUpdateAnnualReport\n )\n }>\n \n \n \n\n \n \n \n onUpdateAnnualReport(\n `additionalBmpsImplementations.${index}.implementationSchedule`,\n e.target.value\n )\n }\n />\n \n\n \n \n onUpdateAnnualReport(\n `additionalBmpsImplementations.${index}.status`,\n e.target.value\n )\n }\n />\n \n \n \n onUpdateAnnualReport(\n `additionalBmpsImplementations.${index}.description`,\n e.target.value\n )\n }\n />\n \n ))}\n\n \n \n }\n onClick={() =>\n history.push(getStepRoute(swmpId, reportId, step, false))\n }>\n SWMP Modifications\n \n \n }\n onClick={() =>\n history.push(getStepRoute(swmpId, reportId, step, true))\n }>\n Additional Information\n \n \n \n );\n};\n\nconst mapStateToProps = (state) => ({\n bstMgtPracs: select.bstMgtPracs(state),\n annualReport: select.annualReport(state),\n});\n\nconst mapDispatchToProps = (dispatch) => ({\n onUpdateAnnualReport: (path: string, value: any) =>\n dispatch(actions.updateAnnualReport(`additionalBmps.${path}`, value)),\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(SwmpAdditionalBmp);\n","import Box from '@material-ui/core/Box';\nimport Button from '@material-ui/core/Button';\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\nimport IconButton from '@material-ui/core/IconButton';\nimport Radio from '@material-ui/core/Radio';\nimport RadioGroup from '@material-ui/core/RadioGroup';\nimport Typography from '@material-ui/core/Typography';\nimport AddIcon from '@material-ui/icons/Add';\nimport ArrowBackIcon from '@material-ui/icons/ArrowBackIos';\nimport ArrowForwardIcon from '@material-ui/icons/ArrowForwardIos';\nimport DeleteIcon from '@material-ui/icons/Delete';\nimport { LabelContainer, TextField } from 'components';\nimport React, { useState } from 'react';\nimport { connect } from 'react-redux';\nimport { useHistory, useParams } from 'react-router-dom';\nimport * as actions from 'redux/actions';\nimport select from 'redux/select';\nimport { getStepRoute, removeAnnualReportEntity } from 'utils';\nimport * as uuid from 'uuid';\n\nimport { useStyles } from './SwmpComplianceStatus';\nimport { SwmpAnnualReportPromptProps } from '.';\n\nconst SwmpAdditionalInformation: React.FC = ({\n annualReport,\n onUpdateAnnualReport,\n}) => {\n const { additionalInformation } = annualReport;\n const classes = useStyles();\n const history = useHistory();\n const { swmpId, step, reportId } = useParams();\n const [entityName, setEntityName] = useState('');\n const [authorizationNumber, setAuthorizationNumber] = useState('');\n\n return (\n <>\n \n \n \n 1. Is the permittee relying on another entity to satisfy any permit\n obligations?\n \n \n \n onUpdateAnnualReport(\n 'isPermitteeRelyingOnEntities',\n e.target.value === 'true'\n )\n }>\n } />\n } />\n \n \n\n {additionalInformation.isPermitteeRelyingOnEntities && (\n \n \n \n \n setEntityName(e.target.value)}\n />\n \n \n }\n onClick={() => {\n if (!entityName) {\n return;\n }\n\n const index = additionalInformation.relyingEntities.length;\n\n onUpdateAnnualReport(`relyingEntities.${index}`, {\n id: uuid.v4(),\n name: entityName,\n explanation: '',\n });\n }}>\n Add\n \n \n \n\n {additionalInformation.relyingEntities.map((e, index) => (\n \n \n \n Name: {e.name}\n \n \n removeAnnualReportEntity(\n 'relyingEntities',\n index,\n additionalInformation,\n onUpdateAnnualReport\n )\n }>\n \n \n \n \n onUpdateAnnualReport(\n `relyingEntities.${index}.explanation`,\n e.target.value\n )\n }\n />\n \n ))}\n \n )}\n\n \n \n \n 2.a. Is the permittee part of a group sharing a SWMP with other\n entities?\n \n \n \n onUpdateAnnualReport(\n 'isPermitteePartOfGroup',\n e.target.value === 'true'\n )\n }>\n } />\n } />\n \n \n\n {additionalInformation.isPermitteePartOfGroup && (\n \n \n \n 2.b. Is this a system-wide annual report including information for\n all permittees?\n \n \n \n onUpdateAnnualReport(\n 'isReportIncludingAllPermittees',\n e.target.value === 'true'\n )\n }>\n } />\n } />\n \n \n )}\n\n {additionalInformation.isPermitteePartOfGroup &&\n additionalInformation.isReportIncludingAllPermittees && (\n <>\n \n \n \n setAuthorizationNumber(e.target.value)}\n />\n \n \n }\n onClick={() => {\n if (!authorizationNumber) {\n return;\n }\n\n const index =\n additionalInformation.associatedResponsibilities.length;\n\n onUpdateAnnualReport(\n `associatedResponsibilities.${index}`,\n {\n id: uuid.v4(),\n authorizationNumber,\n permittee: '',\n }\n );\n }}>\n Add\n \n \n \n {additionalInformation.associatedResponsibilities.map(\n (r, index) => (\n \n \n \n \n Authorization Number: {r.authorizationNumber}\n \n \n \n removeAnnualReportEntity(\n 'associatedResponsibilities',\n index,\n additionalInformation,\n onUpdateAnnualReport\n )\n }>\n \n \n \n \n onUpdateAnnualReport(\n `associatedResponsibilities.${index}.permittee`,\n e.target.value\n )\n }\n />\n \n )\n )}\n \n )}\n\n \n \n }\n onClick={() =>\n history.push(getStepRoute(swmpId, reportId, step, false))\n }>\n Additional BMPs for TMDLs and I-Plans\n \n \n }\n onClick={() =>\n history.push(getStepRoute(swmpId, reportId, step, true))\n }>\n Construction Activities\n \n \n \n );\n};\n\nconst mapStateToProps = (state) => ({\n annualReport: select.annualReport(state),\n});\n\nconst mapDispatchToProps = (dispatch) => ({\n onUpdateAnnualReport: (path: string, value: any) =>\n dispatch(\n actions.updateAnnualReport(`additionalInformation.${path}`, value)\n ),\n});\n\nexport default connect(\n mapStateToProps,\n mapDispatchToProps\n)(SwmpAdditionalInformation);\n","import Box from '@material-ui/core/Box';\nimport Button from '@material-ui/core/Button';\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\nimport Radio from '@material-ui/core/Radio';\nimport RadioGroup from '@material-ui/core/RadioGroup';\nimport Typography from '@material-ui/core/Typography';\nimport ArrowBackIcon from '@material-ui/icons/ArrowBackIos';\nimport { TextField } from 'components';\nimport React, { useState } from 'react';\nimport { connect } from 'react-redux';\nimport { useHistory, useParams } from 'react-router-dom';\nimport * as actions from 'redux/actions';\nimport select from 'redux/select';\nimport { getStepRoute } from 'utils';\n\nimport { useStyles } from './SwmpComplianceStatus';\nimport { SwmpAnnualReportPromptProps } from '.';\n\nconst SwmpConstructionActivities: React.FC = ({\n annualReport,\n onUpdateAnnualReport,\n}) => {\n const { constructionActivities } = annualReport;\n const classes = useStyles();\n const history = useHistory();\n const { swmpId, reportId, step } = useParams();\n const [numericFields, setNumericFields] = useState({\n numberOfConstructionActivities:\n constructionActivities.numberOfConstructionActivities,\n numberOfMunicipalActivities:\n constructionActivities.numberOfMunicipalActivities,\n });\n\n const handleChangeNumericFields = (\n event: React.ChangeEvent\n ) => {\n const value = event.target.value;\n\n if (!/^[0-9]*$/.test(value)) {\n return;\n }\n\n setNumericFields({\n ...numericFields,\n [event.target.name]: value,\n });\n };\n\n return (\n <>\n \n onUpdateAnnualReport(\n 'numberOfConstructionActivities',\n numericFields.numberOfConstructionActivities\n )\n }\n />\n\n \n \n \n 2.a. Does the permittee utilize the optional seventh MCM related to\n construction?\n \n \n \n onUpdateAnnualReport('utilizeSeventhMcm', e.target.value === 'true')\n }>\n } />\n } />\n \n \n\n {constructionActivities.utilizeSeventhMcm && (\n \n onUpdateAnnualReport(\n 'numberOfMunicipalActivities',\n numericFields.numberOfMunicipalActivities\n )\n }\n />\n )}\n\n \n \n }\n onClick={() =>\n history.push(getStepRoute(swmpId, reportId, step, false))\n }>\n Additional Information\n \n \n \n );\n};\n\nconst mapStateToProps = (state) => ({\n annualReport: select.annualReport(state),\n});\n\nconst mapDispatchToProps = (dispatch) => ({\n onUpdateAnnualReport: (path: string, value: any) =>\n dispatch(\n actions.updateAnnualReport(`constructionActivities.${path}`, value)\n ),\n});\n\nexport default connect(\n mapStateToProps,\n mapDispatchToProps\n)(SwmpConstructionActivities);\n","import Box from '@material-ui/core/Box';\nimport Button from '@material-ui/core/Button';\nimport ArrowBackIcon from '@material-ui/icons/ArrowBackIos';\nimport ArrowForwardIcon from '@material-ui/icons/ArrowForwardIos';\nimport { LabelContainer, TextField } from 'components';\nimport React from 'react';\nimport { connect } from 'react-redux';\nimport { useHistory, useParams } from 'react-router-dom';\nimport * as actions from 'redux/actions';\nimport select from 'redux/select';\nimport { getStepRoute } from 'utils';\n\nimport { useStyles } from './SwmpComplianceStatus';\nimport { SwmpAnnualReportPromptProps } from '.';\n\nconst SwmpDataSummary: React.FC = ({\n annualReport,\n onUpdateAnnualReport,\n}) => {\n const { dataSummary } = annualReport;\n const classes = useStyles();\n const history = useHistory();\n const { swmpId, reportId, step } = useParams();\n\n return (\n <>\n \n onUpdateAnnualReport('description', e.target.value)}\n rows={5}\n />\n \n\n \n \n }\n onClick={() =>\n history.push(getStepRoute(swmpId, reportId, step, false))\n }>\n Status of Compliance with the MS4 GP and SWMP\n \n \n }\n onClick={() =>\n history.push(getStepRoute(swmpId, reportId, step, true))\n }>\n Impaired Waterbodies\n \n \n \n );\n};\n\nconst mapStateToProps = (state) => ({\n annualReport: select.annualReport(state),\n});\n\nconst mapDispatchToProps = (dispatch) => ({\n onUpdateAnnualReport: (path: string, value: any) =>\n dispatch(actions.updateAnnualReport(`dataSummary.${path}`, value)),\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(SwmpDataSummary);\n","import DateFnsUtils from '@date-io/date-fns';\nimport Box from '@material-ui/core/Box';\nimport Button from '@material-ui/core/Button';\nimport FormControl from '@material-ui/core/FormControl';\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\nimport InputAdornment from '@material-ui/core/InputAdornment';\nimport MenuItem from '@material-ui/core/MenuItem';\nimport Radio from '@material-ui/core/Radio';\nimport RadioGroup from '@material-ui/core/RadioGroup';\nimport Select from '@material-ui/core/Select';\nimport { makeStyles } from '@material-ui/core/styles';\nimport Typography from '@material-ui/core/Typography';\nimport ArrowForwardIcon from '@material-ui/icons/ArrowForwardIos';\nimport EmailOutlined from '@material-ui/icons/EmailOutlined';\nimport PhoneOutlined from '@material-ui/icons/PhoneOutlined';\nimport {\n KeyboardDatePicker,\n MuiPickersUtilsProvider,\n} from '@material-ui/pickers';\nimport { TextField } from 'components';\nimport { AnnualReportContact } from 'models/AnnualReportContact';\nimport { SWMP } from 'models/SWMP';\nimport React, { useEffect, useMemo, useRef, useState } from 'react';\nimport { connect } from 'react-redux';\nimport { useHistory, useParams } from 'react-router-dom';\nimport * as actions from 'redux/actions';\nimport select from 'redux/select';\nimport { updateAnnualReportContact } from 'services';\nimport { getStepRoute } from 'utils';\n\nimport { SwmpAnnualReportPromptProps } from '.';\n\ninterface SwmpGeneralInfoProps extends SwmpAnnualReportPromptProps {\n swmp: SWMP;\n annualReportContact: AnnualReportContact;\n onUpdate: (annualReportContact: AnnualReportContact) => void;\n}\n\nexport const useStyles = makeStyles({\n datePicker: {\n flex: 1,\n },\n buttonIcon: {\n color: '#FFF',\n },\n error: {\n color: '#F00',\n },\n});\n\nconst SwmpGeneralInfo: React.FC = ({\n swmp,\n annualReport,\n annualReportYear,\n annualReportContact,\n onUpdateAnnualReport,\n onUpdate,\n}) => {\n const { general } = annualReport;\n const classes = useStyles();\n const history = useHistory();\n const { swmpId, step, reportId } = useParams();\n\n const reportingYear = useMemo(() => {\n return annualReportYear - parseInt(swmp.year) + 1;\n }, [annualReportYear, swmp.year]);\n\n const initialValues = useMemo(\n () => ({\n id: annualReportContact.id,\n contactName: annualReportContact?.contactName || swmp.contactName || '',\n phone: annualReportContact?.phone || swmp.phone || '',\n emailAddress:\n annualReportContact?.emailAddress || swmp.emailAddress || '',\n mailingAddress:\n annualReportContact?.mailingAddress || swmp.mailingAddress || '',\n }),\n [annualReportContact, swmp]\n );\n\n const [formFields, setFormFields] = useState(initialValues);\n\n const originalFormFieldsRef = useRef(initialValues);\n\n useEffect(() => {\n setFormFields(initialValues);\n originalFormFieldsRef.current = initialValues;\n }, [initialValues]);\n\n const handleChangeGeneralInfo = (event) => {\n const { name, value } = event.target;\n setFormFields((prevFields) => ({\n ...prevFields,\n [name]: value,\n }));\n };\n\n const handleBlurGeneralInfo = () => {\n if (\n JSON.stringify(formFields) !==\n JSON.stringify(originalFormFieldsRef.current)\n ) {\n onUpdate(formFields);\n originalFormFieldsRef.current = formFields;\n }\n };\n\n return (\n <>\n \n \n {swmp.year && !swmp.annualReportingYear && (\n \n )}\n {swmp.annualReportingYear && (\n <>\n \n \n \n \n Last day of fiscal year\n \n \n \n {}}\n InputAdornmentProps={{ position: 'start' }}\n />\n \n \n \n )}\n \n \n \n Operator Level\n \n \n \n {Array.from({ length: 4 }).map((_, level) => (\n \n {level + 1}\n \n ))}\n \n \n \n \n \n \n \n \n \n ),\n }}\n value={formFields.phone}\n onBlur={handleBlurGeneralInfo}\n onChange={handleChangeGeneralInfo}\n />\n \n \n \n \n \n ),\n }}\n value={formFields.emailAddress}\n onBlur={handleBlurGeneralInfo}\n onChange={handleChangeGeneralInfo}\n />\n \n \n \n \n \n \n A copy of the annual report was submitted to the TCEQ Region\n \n \n \n onUpdateAnnualReport(\n 'isCopyReportSubmitted',\n e.target.value === 'true'\n )\n }>\n } />\n } />\n \n \n \n \n onUpdateAnnualReport('reportSubmittedRegion', e.target.value)\n }\n fullWidth\n InputProps={{\n startAdornment: (\n \n TCEQ Region\n \n ),\n }}\n />\n \n \n \n }\n onClick={() =>\n history.push(getStepRoute(swmpId, reportId, step, true))\n }>\n Status of Compliance with the MS4 GP and SWMP\n \n \n \n );\n};\n\nconst mapStateToProps = (state) => ({\n swmp: select.swmp(state),\n annualReport: select.annualReport(state),\n annualReportYear: select.annualReportYear(state),\n annualReportContact: select.annualReportContact(state),\n});\n\nconst mapDispatchToProps = (dispatch) => ({\n onUpdateAnnualReport: (path: string, value: any) =>\n dispatch(actions.updateAnnualReport(`general.${path}`, value)),\n onUpdate: (annualReportContact: AnnualReportContact) => {\n updateAnnualReportContact(annualReportContact);\n dispatch(actions.updateAnnualReportContact(annualReportContact));\n },\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(SwmpGeneralInfo);\n","import Box from '@material-ui/core/Box';\nimport Button from '@material-ui/core/Button';\nimport FormControl from '@material-ui/core/FormControl';\nimport IconButton from '@material-ui/core/IconButton';\nimport MenuItem from '@material-ui/core/MenuItem';\nimport Select from '@material-ui/core/Select';\nimport Typography from '@material-ui/core/Typography';\nimport AddIcon from '@material-ui/icons/Add';\nimport ArrowBackIcon from '@material-ui/icons/ArrowBackIos';\nimport ArrowForwardIcon from '@material-ui/icons/ArrowForwardIos';\nimport DeleteIcon from '@material-ui/icons/Delete';\nimport { LabelContainer, TextField } from 'components';\nimport { BMP, INITIAL_BMP } from 'models/BMP';\nimport React, { useState } from 'react';\nimport { connect } from 'react-redux';\nimport { useHistory, useParams } from 'react-router-dom';\nimport * as actions from 'redux/actions';\nimport select from 'redux/select';\nimport {\n getDifferentEntities,\n getSortedEntities,\n getStepRoute,\n removeAnnualReportEntity,\n} from 'utils';\nimport * as uuid from 'uuid';\n\nimport { useStyles } from './SwmpComplianceStatus';\nimport { SwmpAnnualReportPromptProps } from '.';\n\ninterface SwmpImpairedWaterBodiesProps extends SwmpAnnualReportPromptProps {\n bstMgtPracs: BMP[];\n}\n\nconst SwmpImpairedWaterBodies: React.FC = ({\n bstMgtPracs,\n annualReport,\n onUpdateAnnualReport,\n}) => {\n const { impairedWaterBodes } = annualReport;\n const classes = useStyles();\n const history = useHistory();\n const { swmpId, step, reportId } = useParams();\n const [benchmarkParameter, setBenchmarkParameter] = useState('');\n const [\n archievingBenchmarkParameterId,\n setArchievingBenchmarkParameterId,\n ] = useState('');\n const [impairmentBacteriaBmpId, setImpairmentBacteriaBmpId] = useState<\n string\n >('');\n const [\n effectivenessBmpBenchmarkParameterId,\n setEffectivenessBmpBenchmarkParameterId,\n ] = useState('');\n\n const impairmentBacteriaReports = getSortedEntities(\n impairedWaterBodes.impairmentBacteriaReports,\n 'bmp'\n );\n\n return (\n <>\n \n \n onUpdateAnnualReport('identifyImpairedWater', e.target.value)\n }\n />\n \n \n \n onUpdateAnnualReport('activitiesToDischarge', e.target.value)\n }\n />\n \n \n \n onUpdateAnnualReport(\n 'implementationOfTargetedControls',\n e.target.value\n )\n }\n />\n \n\n \n \n \n setBenchmarkParameter(e.target.value)}\n />\n \n\n \n }\n onClick={() => {\n if (!benchmarkParameter) {\n return;\n }\n const index = impairedWaterBodes.identifiedBenchmarks.length;\n onUpdateAnnualReport(`identifiedBenchmarks.${index}`, {\n id: uuid.v4(),\n benchmarkParameter,\n benchmarkValue: '',\n yearsConducted: '',\n description: '',\n });\n }}>\n Add\n \n \n \n\n {impairedWaterBodes.identifiedBenchmarks.map((b, index) => (\n \n \n \n \n Benchmark Parameter: {b.benchmarkParameter}\n {b.benchmarkValue && ` • Benchmark Value: ${b.benchmarkValue}`}\n {b.yearsConducted &&\n ` • Year(s) conducted: ${b.yearsConducted}`}\n \n \n \n removeAnnualReportEntity(\n 'identifiedBenchmarks',\n index,\n impairedWaterBodes,\n onUpdateAnnualReport\n )\n }>\n \n \n \n\n \n \n \n onUpdateAnnualReport(\n `identifiedBenchmarks.${index}.benchmarkValue`,\n e.target.value\n )\n }\n />\n \n\n \n \n onUpdateAnnualReport(\n `identifiedBenchmarks.${index}.yearsConducted`,\n e.target.value\n )\n }\n />\n \n \n\n \n onUpdateAnnualReport(\n `identifiedBenchmarks.${index}.description`,\n e.target.value\n )\n }\n />\n \n ))}\n\n \n \n \n \n \n setArchievingBenchmarkParameterId(e.target.value as string)\n }>\n \n \n Select a Benchmark Parameter\n \n \n {getDifferentEntities(\n impairedWaterBodes.identifiedBenchmarks,\n impairedWaterBodes.archievingBenchmarkAnalyses,\n 'benchmarkParameterId',\n true\n ).map((b) => (\n \n {b.benchmarkParameter}\n \n ))}\n \n \n \n \n }\n onClick={() => {\n if (!archievingBenchmarkParameterId) {\n return;\n }\n\n const index =\n impairedWaterBodes.archievingBenchmarkAnalyses.length;\n const benchmarkParameter = impairedWaterBodes.identifiedBenchmarks.find(\n (b) => b.id === archievingBenchmarkParameterId\n )?.benchmarkParameter;\n\n onUpdateAnnualReport(`archievingBenchmarkAnalyses.${index}`, {\n id: uuid.v4(),\n benchmarkParameterId: archievingBenchmarkParameterId,\n benchmarkParameter,\n bmp: INITIAL_BMP,\n description: '',\n });\n setArchievingBenchmarkParameterId('');\n }}>\n Add\n \n \n \n\n {impairedWaterBodes.archievingBenchmarkAnalyses.map((b, index) => (\n \n \n \n \n Benchmark Parameter: {b.benchmarkParameter}{' '}\n {b.bmp.id && ` • Selected BMP: ${b.bmp.number} ${b.bmp.title}`}\n \n \n \n removeAnnualReportEntity(\n 'archievingBenchmarkAnalyses',\n index,\n impairedWaterBodes,\n onUpdateAnnualReport\n )\n }>\n \n \n \n \n \n Selected BMP\n \n \n {\n const selectedBmp = bstMgtPracs.find(\n (bmp) => bmp.id === e.target.value\n );\n onUpdateAnnualReport(\n `archievingBenchmarkAnalyses.${index}.bmp`,\n selectedBmp\n );\n }}>\n \n Select a BMP\n \n {bstMgtPracs.map((bmp) => (\n \n \n {bmp.number} {bmp.title}\n \n \n ))}\n \n \n \n \n onUpdateAnnualReport(\n `archievingBenchmarkAnalyses.${index}.description`,\n e.target.value\n )\n }\n />\n \n ))}\n\n \n \n \n \n \n setImpairmentBacteriaBmpId(e.target.value as string)\n }>\n \n Select a BMP\n \n {getDifferentEntities(\n bstMgtPracs,\n impairedWaterBodes.impairmentBacteriaReports,\n 'bmp'\n ).map((bmp) => (\n \n \n {bmp.number} {bmp.title}\n \n \n ))}\n \n \n \n \n }\n onClick={() => {\n if (!impairmentBacteriaBmpId) {\n return;\n }\n\n const selectedBmp = bstMgtPracs.find(\n (bmp) => bmp.id === impairmentBacteriaBmpId\n );\n const entities = [\n ...impairedWaterBodes.impairmentBacteriaReports,\n {\n id: uuid.v4(),\n bmp: selectedBmp,\n description: '',\n },\n ];\n\n onUpdateAnnualReport('impairmentBacteriaReports', entities);\n setImpairmentBacteriaBmpId('');\n }}>\n Add\n \n \n \n\n {impairmentBacteriaReports.map((b, index) => (\n \n \n \n \n BMP: {b.bmp.number} {b.bmp.title}\n \n \n \n removeAnnualReportEntity(\n 'impairmentBacteriaReports',\n index,\n impairedWaterBodes,\n onUpdateAnnualReport\n )\n }>\n \n \n \n \n onUpdateAnnualReport(\n `impairmentBacteriaReports.${index}.description`,\n e.target.value\n )\n }\n />\n \n ))}\n\n \n \n \n \n \n setEffectivenessBmpBenchmarkParameterId(\n e.target.value as string\n )\n }>\n \n \n Select a Benchmark Parameter\n \n \n {getDifferentEntities(\n impairedWaterBodes.identifiedBenchmarks,\n impairedWaterBodes.bmpEffectivenessProgresses,\n 'benchmarkParameterId',\n true\n ).map((b) => (\n \n {b.benchmarkParameter}\n \n ))}\n \n \n \n\n \n }\n onClick={() => {\n if (!effectivenessBmpBenchmarkParameterId) {\n return;\n }\n\n const index =\n impairedWaterBodes.bmpEffectivenessProgresses.length;\n const benchmarkParameter = impairedWaterBodes.identifiedBenchmarks.find(\n (b) => b.id === effectivenessBmpBenchmarkParameterId\n )?.benchmarkParameter;\n\n onUpdateAnnualReport(`bmpEffectivenessProgresses.${index}`, {\n id: uuid.v4(),\n benchmarkParameterId: effectivenessBmpBenchmarkParameterId,\n benchmarkParameter,\n description: '',\n });\n setEffectivenessBmpBenchmarkParameterId('');\n }}>\n Add\n \n \n \n\n {impairedWaterBodes.bmpEffectivenessProgresses.map((b, index) => (\n \n \n \n \n Benchmark Parameter: {b.benchmarkParameter}\n \n \n \n removeAnnualReportEntity(\n 'bmpEffectivenessProgresses',\n index,\n impairedWaterBodes,\n onUpdateAnnualReport\n )\n }>\n \n \n \n \n onUpdateAnnualReport(\n `bmpEffectivenessProgresses.${index}.description`,\n e.target.value\n )\n }\n />\n \n ))}\n\n \n \n }\n onClick={() =>\n history.push(getStepRoute(swmpId, reportId, step, false))\n }>\n Stormwater Data Summary\n \n \n }\n onClick={() =>\n history.push(getStepRoute(swmpId, reportId, step, true))\n }>\n Stormwater Activities\n \n \n \n );\n};\n\nconst mapStateToProps = (state) => ({\n bstMgtPracs: select.bstMgtPracs(state),\n annualReport: select.annualReport(state),\n});\n\nconst mapDispatchToProps = (dispatch) => ({\n onUpdateAnnualReport: (path: string, value: any) =>\n dispatch(actions.updateAnnualReport(`impairedWaterBodes.${path}`, value)),\n});\n\nexport default connect(\n mapStateToProps,\n mapDispatchToProps\n)(SwmpImpairedWaterBodies);\n","import Box from '@material-ui/core/Box';\nimport Button from '@material-ui/core/Button';\nimport FormControl from '@material-ui/core/FormControl';\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\nimport IconButton from '@material-ui/core/IconButton';\nimport MenuItem from '@material-ui/core/MenuItem';\nimport Radio from '@material-ui/core/Radio';\nimport RadioGroup from '@material-ui/core/RadioGroup';\nimport Select from '@material-ui/core/Select';\nimport Typography from '@material-ui/core/Typography';\nimport AddIcon from '@material-ui/icons/Add';\nimport ArrowBackIcon from '@material-ui/icons/ArrowBackIos';\nimport ArrowForwardIcon from '@material-ui/icons/ArrowForwardIos';\nimport DeleteIcon from '@material-ui/icons/Delete';\nimport { LabelContainer, TextField } from 'components';\nimport { BMP } from 'models/BMP';\nimport { MG } from 'models/MG';\nimport React, { useState } from 'react';\nimport { connect } from 'react-redux';\nimport { useHistory, useParams } from 'react-router-dom';\nimport * as actions from 'redux/actions';\nimport select from 'redux/select';\nimport {\n getDifferentEntities,\n getSortedEntities,\n getStepRoute,\n removeAnnualReportEntity,\n} from 'utils';\nimport * as uuid from 'uuid';\n\nimport { useStyles } from './SwmpComplianceStatus';\nimport { SwmpAnnualReportPromptProps } from '.';\n\ninterface SwmpModificationsProps extends SwmpAnnualReportPromptProps {\n bstMgtPracs: BMP[];\n measurableGoals: MG[];\n}\n\nconst SwmpModifications: React.FC = ({\n bstMgtPracs,\n measurableGoals,\n annualReport,\n onUpdateAnnualReport,\n}) => {\n const { swmpModifications } = annualReport;\n const classes = useStyles();\n const history = useHistory();\n const { swmpId, step, reportId } = useParams();\n const [selectedEntityId, setSelectedEntityId] = useState('');\n\n const entityChanges = getSortedEntities(swmpModifications.entityChanges);\n\n return (\n <>\n \n \n \n 1. The SWMP and MCM implementation procedures are reviewed each\n year.\n \n \n \n onUpdateAnnualReport(\n 'isImplementationReviewedEachYear',\n e.target.value === 'true'\n )\n }>\n } />\n } />\n \n \n\n \n \n \n 2. Changes have been made or are proposed to the SWMP since the NOI\n or the last annual report, including changes in response to TCEQ’s\n review.\n \n \n \n onUpdateAnnualReport('hasChanges', e.target.value === 'true')\n }>\n } />\n } />\n \n \n\n {swmpModifications.hasChanges && (\n <>\n \n \n \n \n \n setSelectedEntityId(e.target.value as string)\n }>\n \n \n Select a BMP or MG\n \n \n {getDifferentEntities(\n bstMgtPracs,\n swmpModifications.entityChanges.filter((e) => e.isBmp),\n 'entity'\n ).map((bmp) => (\n \n \n {bmp.number} {bmp.title}\n \n \n ))}\n {getDifferentEntities(\n measurableGoals,\n swmpModifications.entityChanges.filter((e) => !e.isBmp),\n 'entity'\n ).map((mg) => (\n \n \n {mg.number} {mg.title}\n \n \n ))}\n \n \n \n\n \n }\n onClick={() => {\n if (!selectedEntityId) {\n return;\n }\n let selectedEntity;\n\n if (selectedEntityId.includes('bmp')) {\n selectedEntity = bstMgtPracs.find(\n (bmp) =>\n parseInt(bmp.id) ===\n parseInt(selectedEntityId.split('-')[1])\n );\n } else {\n selectedEntity = measurableGoals.find(\n (mg) =>\n parseInt(mg.id) ===\n parseInt(selectedEntityId.split('-')[1])\n );\n }\n\n const entities = [\n ...swmpModifications.entityChanges,\n {\n id: uuid.v4(),\n entity: selectedEntity,\n isBmp: selectedEntityId.includes('bmp'),\n description: '',\n },\n ];\n\n onUpdateAnnualReport('entityChanges', entities);\n setSelectedEntityId('');\n }}>\n Add\n \n \n \n\n {entityChanges.map((e, index) => {\n const mcm = e.isBmp\n ? (e.entity as BMP).minimumControlMeasures.join(', ')\n : (e.entity as MG).bmp.minimumControlMeasures.join(', ');\n\n return (\n \n \n \n \n MCM: {mcm} • {e.isBmp ? 'BMP' : 'MG'}: {e.entity.number}{' '}\n {e.entity.title}\n \n \n \n removeAnnualReportEntity(\n 'entityChanges',\n index,\n swmpModifications,\n onUpdateAnnualReport\n )\n }>\n \n \n \n \n \n onUpdateAnnualReport(\n `entityChanges.${index}.description`,\n e.target.value\n )\n }\n />\n \n \n );\n })}\n \n )}\n\n \n \n onUpdateAnnualReport('additionalChangesDescription', e.target.value)\n }\n />\n \n\n \n \n }\n onClick={() =>\n history.push(getStepRoute(swmpId, reportId, step, false))\n }>\n Stormwater Activities\n \n \n }\n onClick={() =>\n history.push(getStepRoute(swmpId, reportId, step, true))\n }>\n Additional BMPs for TMDLs and I-Plans\n \n \n \n );\n};\n\nconst mapStateToProps = (state) => ({\n bstMgtPracs: select.bstMgtPracs(state),\n measurableGoals: select.measurableGoals(state),\n annualReport: select.annualReport(state),\n});\n\nconst mapDispatchToProps = (dispatch) => ({\n onUpdateAnnualReport: (path: string, value: any) =>\n dispatch(actions.updateAnnualReport(`swmpModifications.${path}`, value)),\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(SwmpModifications);\n","import Box from '@material-ui/core/Box';\nimport Button from '@material-ui/core/Button';\nimport Typography from '@material-ui/core/Typography';\nimport ArrowBackIcon from '@material-ui/icons/ArrowBackIos';\nimport { SwmpStep } from 'components';\nimport { upperFirst } from 'lodash';\nimport { SWMPAnnulReportStep } from 'models';\nimport { AnnualReport } from 'models/AnnualReport';\nimport { SWMP_ANNUAL_REPORT_STEPS } from 'models/constants';\nimport { SWMP } from 'models/SWMP';\nimport React, { useEffect, useRef, useState } from 'react';\nimport { connect } from 'react-redux';\nimport { useHistory, useParams } from 'react-router-dom';\nimport * as actions from 'redux/actions';\nimport select from 'redux/select';\nimport {\n downloadAnnualReport,\n fetchAnnualReport,\n fetchSwmpDetails,\n updateAnnualReport,\n} from 'services';\nimport { downloadFile } from 'utils';\n\nimport SwmpActivities from './SwmpActivities';\nimport SwmpAdditionalBmp from './SwmpAdditionalBmp';\nimport SwmpAdditionalInformation from './SwmpAdditionalInformation';\nimport SwmpComplianceStatus from './SwmpComplianceStatus';\nimport SwmpConstructionActivities from './SwmpConstructionActivities';\nimport SwmpDataSummary from './SwmpDataSummary';\nimport SwmpGeneralInfo from './SwmpGeneralInfo';\nimport SwmpImpairedWaterBodies from './SwmpImpairedWaterBodies';\nimport SwmpModifications from './SwmpModifications';\n\nexport interface SwmpAnnualReportPromptProps {\n annualReport: AnnualReport;\n annualReportYear: number;\n onUpdateAnnualReport: (path: string, value: any) => void;\n}\n\ninterface SwmpAnnualReportProps {\n annualReport: AnnualReport;\n annualReportYear: number;\n swmp: SWMP;\n onLoad: (swmpId: number, reportId: number) => Promise;\n}\n\nconst SwmpAnnualReport: React.FC = ({\n annualReport,\n annualReportYear,\n swmp,\n onLoad,\n}) => {\n const [isLoadingStates, setIsLoadingStates] = useState(true);\n\n const initialLoad = useRef(true);\n const { swmpId, step, reportId } = useParams();\n const history = useHistory();\n\n useEffect(() => {\n const fetchEntities = async () => {\n await onLoad(swmpId, reportId);\n // to re-render the components when the annual report data is fully loaded\n // because of we are setting defaultValue to the input components\n setIsLoadingStates(false);\n initialLoad.current = false;\n };\n\n fetchEntities();\n }, [onLoad, swmpId, reportId]);\n\n useEffect(() => {\n if (initialLoad.current) return;\n\n updateAnnualReport(reportId, annualReport);\n }, [annualReport, reportId]);\n\n let StepContainer: React.FC;\n\n switch (upperFirst(step)) {\n case SWMPAnnulReportStep.ComplianceStatus:\n StepContainer = SwmpComplianceStatus;\n break;\n\n case SWMPAnnulReportStep.StormwaterDataSummary:\n StepContainer = SwmpDataSummary;\n break;\n\n case SWMPAnnulReportStep.ImpairedWaterBodies:\n StepContainer = SwmpImpairedWaterBodies;\n break;\n\n case SWMPAnnulReportStep.StormwaterActivities:\n StepContainer = SwmpActivities;\n break;\n\n case SWMPAnnulReportStep.StormwaterModifications:\n StepContainer = SwmpModifications;\n break;\n\n case SWMPAnnulReportStep.AdditionalBmp:\n StepContainer = SwmpAdditionalBmp;\n break;\n\n case SWMPAnnulReportStep.AdditionalInformation:\n StepContainer = SwmpAdditionalInformation;\n break;\n\n case SWMPAnnulReportStep.ConstructionActivities:\n StepContainer = SwmpConstructionActivities;\n break;\n\n default:\n StepContainer = SwmpGeneralInfo;\n break;\n }\n\n const handleDownloadAnnualReport = async () => {\n const { fileName, fileUrl } = await downloadAnnualReport(reportId);\n downloadFile(fileName, fileUrl);\n };\n\n return (\n \n \n }\n onClick={() => history.push(`/swmp/${swmpId}`)}>\n Stormwater Management Plan {swmp.year}\n \n \n Preview Report\n \n \n \n \n {swmp.year} TCEQ Annual Report (Year{' '}\n {annualReportYear ? annualReportYear - parseInt(swmp.year) + 1 : ''})\n \n \n \n \n \n );\n};\n\nconst mapStateToProps = (state) => ({\n annualReportYear: select.annualReportYear(state),\n annualReport: select.annualReport(state),\n swmp: select.swmp(state),\n});\n\nconst mapDispatchToProps = (dispatch) => ({\n onLoad: async (swmpId: number, reportId: number) => {\n dispatch(actions.setLoading(true));\n\n const { swmpActivities, bmp, mg, swmp } = await fetchSwmpDetails(\n swmpId,\n reportId\n );\n const annualReport = await fetchAnnualReport(reportId);\n const {\n id,\n contactName,\n phone,\n emailAddress,\n mailingAddress,\n } = annualReport;\n const annualReportContact = {\n id,\n contactName,\n phone,\n emailAddress,\n mailingAddress,\n };\n dispatch(actions.setAnnualReportYear(annualReport.year));\n dispatch(actions.setAnnualReport(annualReport.report));\n dispatch(actions.setAnnualReportContact(annualReportContact));\n dispatch(actions.updateSwmp(swmp));\n dispatch(actions.updateBmp(bmp));\n dispatch(actions.updateMg(mg));\n dispatch(actions.updateActivity(swmpActivities));\n dispatch(actions.setLoading(false));\n },\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(SwmpAnnualReport);\n","import { MG } from './MG';\n\nexport interface Activity {\n id?: string;\n swmpId?: number;\n mg?: MG;\n dateAdded?: Date;\n mgId?: string;\n date: Date;\n description: string;\n quantity: string;\n}\n\nexport const INITIAL_ACTIVITY: Activity = {\n id: '',\n swmpId: 0,\n mgId: '',\n date: new Date(),\n description: '',\n quantity: '',\n};\n","import DateFnsUtils from '@date-io/date-fns';\nimport Box from '@material-ui/core/Box';\nimport { blue, grey } from '@material-ui/core/colors';\nimport FormControl from '@material-ui/core/FormControl';\nimport InputAdornment from '@material-ui/core/InputAdornment';\nimport MenuItem from '@material-ui/core/MenuItem';\nimport OutlinedInput from '@material-ui/core/OutlinedInput';\nimport Select from '@material-ui/core/Select';\nimport Snackbar, { SnackbarCloseReason } from '@material-ui/core/Snackbar';\nimport SnackbarContent from '@material-ui/core/SnackbarContent';\nimport { makeStyles } from '@material-ui/core/styles';\nimport Typography from '@material-ui/core/Typography';\nimport {\n KeyboardDatePicker,\n MuiPickersUtilsProvider,\n} from '@material-ui/pickers';\nimport {\n ActivityCard,\n AddButton,\n AddModal,\n LabelContainer,\n Modal,\n Textarea,\n} from 'components';\nimport { useValidator } from 'hooks';\nimport { cloneDeep } from 'lodash';\nimport { SWMPStatus } from 'models';\nimport { Activity, INITIAL_ACTIVITY } from 'models/Activity';\nimport { BMP } from 'models/BMP';\nimport { Customer } from 'models/Customer';\nimport { MG } from 'models/MG';\nimport { Ms4File } from 'models/Ms4File';\nimport { SWMP } from 'models/SWMP';\nimport React, { useEffect, useMemo, useState } from 'react';\nimport { useDropzone } from 'react-dropzone';\nimport { connect } from 'react-redux';\nimport { useParams } from 'react-router-dom';\nimport * as actions from 'redux/actions';\nimport select from 'redux/select';\nimport {\n createActivity,\n createActivityAttachments,\n deleteActivity,\n deleteActivityAttachment,\n extendSwmp,\n updateActivity,\n} from 'services';\nimport { firstBy } from 'thenby';\n\ninterface SwmpActivityProps {\n customer: Customer;\n activities: Activity[];\n activityAttachments: Record;\n measurableGoals: MG[];\n bstMgtPracs: BMP[];\n swmp: SWMP;\n onExtendSwmp: (swmp: SWMP) => Promise;\n onUpdateActivity: (activities: Activity[]) => void;\n onUpdateActivityAttachment: (attachments: Record) => void;\n onSave: (\n prevActivities: Activity[],\n prevActivityAttachments: Record,\n activity: Activity,\n attachments: any[],\n successCallback: () => void\n ) => void;\n}\n\nexport const useStyles = makeStyles((theme) => ({\n dropzone: {\n flex: 1,\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n padding: theme.spacing(2.5),\n borderWidth: 1,\n borderRadius: 3,\n borderColor: '#C4C4C4',\n borderStyle: 'dashed',\n backgroundColor: '#FFF',\n color: '#C4C4C4',\n outline: 'none',\n cursor: 'pointer',\n },\n img: {\n display: 'block',\n width: 'auto',\n height: '100%',\n },\n error: {\n color: '#F00',\n },\n mcmFilterInput: {\n width: theme.spacing(15),\n },\n bmpFilterInput: {\n width: theme.spacing(20.25),\n },\n datePicker: {\n '& p.Mui-error': {\n display: 'none',\n },\n },\n extend: {\n color: blue[500],\n cursor: 'pointer',\n },\n}));\n\nconst SwmpActivity: React.FC = ({\n activities,\n activityAttachments,\n swmp,\n measurableGoals,\n customer,\n bstMgtPracs,\n onExtendSwmp,\n onSave,\n onUpdateActivity,\n onUpdateActivityAttachment,\n}) => {\n const classes = useStyles();\n const [isModalOpen, setIsModalOpen] = useState(false);\n const [hasDateError, setHasDateError] = useState(false);\n const [activity, setActivity] = useState(INITIAL_ACTIVITY);\n const [attachments, setAttachments] = useState([]);\n const [mcmFilter, setMcmFilter] = useState('');\n const [bmpFilter, setBmpFilter] = useState('');\n const [delActivityId, setDelActivityId] = useState('');\n const [delAttachmentIds, setDelAttachmentIds] = useState({\n activityId: '',\n attachmentId: 0,\n });\n const [isOpenExtendSwmpModal, setIsOpenExtendSwmpModal] = useState(false);\n const [snackbar, setSnackbar] = useState({\n open: false,\n year: '',\n });\n\n const { getRootProps, getInputProps } = useDropzone({\n onDrop: (acceptedFiles) =>\n setAttachments(\n activity.id ? [...attachments, ...acceptedFiles] : acceptedFiles\n ),\n });\n const { id: swmpId } = useParams();\n\n useEffect(() => {\n if (!swmp.id) {\n return;\n }\n\n const currentYear = new Date().getFullYear() - parseInt(swmp.year) + 1;\n\n if (currentYear > swmp.planLength) {\n setSnackbar({\n open: true,\n year: currentYear.toString(),\n });\n }\n }, [swmp]);\n\n const thumbs = attachments.map((file, index) => {\n let blob = require('assets/thumbnail.png');\n\n if (file.id && file.mimeType.includes('image')) {\n blob = file.fileUrl;\n } else if (!file.id && file.type.includes('image')) {\n blob = URL.createObjectURL(file);\n }\n\n return (\n \n \n \"attachments\"\n \n \n );\n });\n\n const initializeStates = () => {\n setIsModalOpen(false);\n setActivity(INITIAL_ACTIVITY);\n setAttachments([]);\n };\n\n const handleChangeActivityDate = (date: Date | null) => {\n const year = date?.getFullYear();\n const swmpStartYear = parseInt(swmp.year);\n\n setActivity({\n ...activity,\n date: date as Date,\n });\n\n // invalid activity date\n if (\n !year ||\n year < swmpStartYear ||\n year > swmpStartYear + swmp.planLength\n ) {\n return setHasDateError(true);\n }\n\n if (hasDateError) {\n setHasDateError(false);\n }\n };\n\n const handleCompleteActivity = async () => {\n if (hasDateError) {\n return;\n }\n\n onSave(\n activities,\n activityAttachments,\n {\n ...activity,\n swmpId,\n },\n attachments,\n initializeStates\n );\n };\n\n const handleCloseSnackbar = (\n event?: React.SyntheticEvent,\n reason?: SnackbarCloseReason\n ) => {\n if (reason === 'clickaway') {\n return;\n }\n\n setSnackbar({\n open: false,\n year: '',\n });\n };\n\n const handleExtendSwmp = async () => {\n swmp.planLength = new Date().getFullYear() - parseInt(swmp.year) + 1;\n\n await onExtendSwmp(swmp);\n setIsOpenExtendSwmpModal(false);\n };\n\n const handleClickActivity = (activity: Activity) => {\n setIsModalOpen(true);\n setActivity(activity);\n setAttachments(activityAttachments[activity.id as string] || []);\n };\n\n const handleDeleteActivity = () => {\n const updateActivities = activities;\n const index = updateActivities.findIndex((a) => a.id === delActivityId);\n\n updateActivities.splice(index, 1);\n onUpdateActivity([...updateActivities]);\n deleteActivity(delActivityId);\n setDelActivityId('');\n };\n\n const handleDeleteAttachment = () => {\n const { activityId, attachmentId } = delAttachmentIds;\n const attachments = activityAttachments;\n const index = attachments[activityId].findIndex(\n (a) => a.id === attachmentId\n );\n attachments[activityId].splice(index, 1);\n\n onUpdateActivityAttachment({ ...attachments });\n deleteActivityAttachment(activityId, attachmentId);\n setDelAttachmentIds({\n activityId: '',\n attachmentId: 0,\n });\n };\n\n const { validator, handleChange, handleComplete } = useValidator(\n activity,\n ['mgId'],\n isModalOpen,\n setActivity,\n handleCompleteActivity\n );\n\n const quantityRequiredMg = useMemo(() => {\n if (!activity.mgId) {\n return null;\n }\n\n const selectedMg = measurableGoals.find((mg) => mg.id === activity.mgId)!;\n\n if (!selectedMg.isQuantityRequired) {\n return null;\n }\n\n return selectedMg;\n }, [activity.mgId, measurableGoals]);\n\n const filteredActivities = useMemo(() => {\n let matchedBmps: BMP[] = bstMgtPracs;\n let sortedActivities = activities.map((activity) => ({\n ...activity,\n mg: measurableGoals.find((m) => m.id === activity.mgId),\n }));\n\n if (bmpFilter || mcmFilter) {\n sortedActivities = sortedActivities.sort(\n firstBy((a: Activity, b: Activity) =>\n (a.mg?.bmp.number as string).localeCompare(\n b.mg?.bmp.number as string,\n undefined,\n {\n numeric: true,\n sensitivity: 'base',\n }\n )\n )\n .thenBy((a: Activity, b: Activity) =>\n (a.mg?.number as string).localeCompare(\n b.mg?.number as string,\n undefined,\n {\n numeric: true,\n sensitivity: 'base',\n }\n )\n )\n .thenBy((a: Activity, b: Activity) => {\n const firstDate = new Date(a.date as Date);\n const secondDate = new Date(b.date as Date);\n\n if (firstDate < secondDate) {\n return 1;\n }\n\n if (firstDate > secondDate) {\n return -1;\n }\n\n return 0;\n })\n );\n } else {\n sortedActivities = sortedActivities.sort((a: Activity, b: Activity) => {\n const firstDate = new Date(a.date as Date);\n const secondDate = new Date(b.date as Date);\n\n if (firstDate < secondDate) {\n return 1;\n }\n\n if (firstDate > secondDate) {\n return -1;\n }\n\n return 0;\n });\n }\n\n if (bmpFilter) {\n matchedBmps = matchedBmps.filter((b) => b.id === bmpFilter);\n }\n\n if (mcmFilter) {\n matchedBmps = matchedBmps.filter((b) =>\n b.minimumControlMeasures.includes(mcmFilter)\n );\n }\n\n return sortedActivities.filter((t) =>\n matchedBmps.some((b) => b.measurableGoals.some((m) => m.id === t.mgId))\n );\n }, [mcmFilter, bmpFilter, activities, measurableGoals, bstMgtPracs]);\n\n return (\n <>\n {customer.admin && swmp.status === SWMPStatus.Active && (\n setIsModalOpen(true)}\n />\n )}\n \n Activities\n \n \n Filter:\n \n \n \n setMcmFilter(e.target.value as string)}>\n \n MCM\n \n {Array.from({ length: 6 }).map((_, index) => (\n \n {index + 1}\n \n ))}\n TMDL\n \n \n \n \n setBmpFilter(e.target.value as string)}>\n \n BMP\n \n {bstMgtPracs.map((b) => (\n \n {b.title}\n \n ))}\n \n \n \n \n \n {filteredActivities.map((activity) => (\n handleClickActivity(activity)}\n onDelete={setDelActivityId}\n onDeleteAttachment={(activityId, attachmentId) =>\n setDelAttachmentIds({ activityId, attachmentId })\n }\n />\n ))}\n \n\n \n \n \n \n \n {hasDateError && (\n \n Invalid Activity Date\n \n )}\n \n\n \n \n \n \n \n Select a Measurable Goal\n \n \n {measurableGoals.map((mg) => (\n \n \n {mg.number} {mg.bmp.title} • {mg.title}\n \n \n ))}\n \n \n {validator['mgId'] === false && (\n \n Measurable goal is required\n \n )}\n \n\n \n \n {quantityRequiredMg ? quantityRequiredMg.units : ''}\n \n }\n />\n \n\n \n \n \n\n \n \n \n \n Drag & Drop or{' '}\n \n Browse\n \n \n \n \n {thumbs}\n \n \n \n\n \n {\n setIsOpenExtendSwmpModal(true);\n handleCloseSnackbar();\n }}>\n Extend\n \n }\n />\n \n\n setIsOpenExtendSwmpModal(false)}\n onComplete={handleExtendSwmp}>\n \n \n Once started, all activity will start to be logged against this\n SWMP. Please review that all general information and best management\n practices are correct. These cannot be changed once started.\n \n \n \n\n \n !!delActivityId\n ? setDelActivityId('')\n : setDelAttachmentIds({\n activityId: '',\n attachmentId: 0,\n })\n }\n onComplete={() =>\n !!delActivityId ? handleDeleteActivity() : handleDeleteAttachment()\n }\n />\n \n );\n};\n\nconst mapStateToProps = (state) => ({\n customer: select.customer(state),\n swmp: select.swmp(state),\n activities: select.activities(state),\n activityAttachments: select.activityAttachments(state),\n measurableGoals: select.measurableGoals(state),\n bstMgtPracs: select.bstMgtPracs(state),\n});\n\nconst mapDispatchToProps = (dispatch) => ({\n onUpdateActivity: (activities: Activity[]) =>\n dispatch(actions.updateActivity(activities)),\n onUpdateActivityAttachment: (attachments: Record) =>\n dispatch(actions.setActivityAttachment(attachments)),\n onSave: (\n prevActivities: Activity[],\n prevActivityAttachments: Record,\n activity: Activity,\n attachments: any[],\n successCallback: () => void\n ) => {\n const postActivity = activity.id ? updateActivity : createActivity;\n\n postActivity(activity)\n .then(async (id) => {\n try {\n let files = attachments;\n let activities = prevActivities;\n const activityAttachments = prevActivityAttachments;\n\n const newFileIndex = files.findIndex((t) => !t.id);\n\n if (newFileIndex !== -1) {\n const newFiles = files.slice(newFileIndex, files.length);\n const newMs4Files = await createActivityAttachments(id, newFiles);\n files.splice(newFileIndex, newMs4Files.length, ...newMs4Files);\n }\n\n const payload = { ...activity, id };\n\n if (activity.id) {\n const index = activities.findIndex((t) => t.id === activity.id);\n activities[index] = payload;\n } else {\n activities = [payload, ...activities];\n }\n\n activityAttachments[id] = files;\n\n dispatch(actions.updateActivity([...activities]));\n dispatch(actions.setActivityAttachment({ ...activityAttachments }));\n successCallback();\n } catch (error) {\n dispatch(actions.setError(error.response.data.message));\n deleteActivity(id);\n }\n })\n .catch((error) => {\n dispatch(actions.setError(error.response.data.message));\n });\n },\n onExtendSwmp: async (swmp: SWMP) => {\n await extendSwmp(swmp);\n dispatch(actions.updateSwmp(cloneDeep(swmp)));\n },\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(SwmpActivity);\n","import Box from '@material-ui/core/Box';\nimport Button from '@material-ui/core/Button';\nimport { grey } from '@material-ui/core/colors';\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport DialogTitle from '@material-ui/core/DialogTitle';\nimport { makeStyles } from '@material-ui/core/styles';\nimport Typography from '@material-ui/core/Typography';\nimport ArrowBackIcon from '@material-ui/icons/ArrowBackIos';\nimport PenIcon from '@material-ui/icons/CreateOutlined';\nimport DownloadIcon from '@material-ui/icons/GetAppOutlined';\nimport { Modal } from 'components';\nimport { SWMPStatus } from 'models';\nimport { Customer } from 'models/Customer';\nimport { INITIAL_SWMP, SWMP } from 'models/SWMP';\nimport React, { useEffect, useState } from 'react';\nimport { connect } from 'react-redux';\nimport { useHistory, useParams } from 'react-router-dom';\nimport * as actions from 'redux/actions';\nimport select from 'redux/select';\nimport {\n createAnnualReport,\n downloadAnnualReport,\n extendSwmp,\n fetchAnnualReportStatus,\n fetchSwmpActivityAttachments,\n fetchSwmpDetails,\n} from 'services';\nimport { downloadFile } from 'utils';\n\nimport SwmpActivity from './SwmpActivity';\n\ninterface SwmpDetailProps {\n swmp: SWMP;\n customer: Customer;\n onLoad: (swmpId: number) => Promise;\n onExtendSwmp: (swmp: SWMP) => Promise;\n onReset: () => void;\n}\n\ninterface IconLabelProps {\n label: string;\n onClick: () => void;\n}\n\nconst useStyles = makeStyles((theme) => ({\n listItem: {\n transition: 'all 0.3s cubic-bezier(0.215, 0.61, 0.355, 1)',\n '&:hover': {\n backgroundColor: grey[200],\n },\n height: theme.spacing(6),\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3),\n '&:last-child': {\n marginBottom: theme.spacing(2),\n },\n },\n modalContent: {\n padding: 0,\n },\n iconLabelWrapper: {\n cursor: 'pointer',\n },\n icon: {\n color: theme.palette.primary.main,\n },\n}));\n\nconst IconLabel: React.FC = ({ label, onClick }) => {\n const classes = useStyles();\n const Icon = label === 'Download' ? DownloadIcon : PenIcon;\n\n return (\n \n \n \n \n {label}\n \n \n \n );\n};\n\nconst SwmpDetail: React.FC = ({\n swmp,\n customer,\n onExtendSwmp,\n onLoad,\n onReset,\n}) => {\n const [annualReports, setAnnualReports] = useState<\n {\n id: number | null;\n year: number;\n }[]\n >([]);\n const [isOpenAnnualReportModal, setIsOpenAnnualReportModal] = useState<\n boolean\n >(false);\n const [isOpenExtendSwmpModal, setIsOpenExtendSwmpModal] = useState(\n false\n );\n const { id: swmpId } = useParams();\n const history = useHistory();\n const classes = useStyles();\n\n useEffect(() => {\n onLoad(swmpId);\n }, [swmpId, onLoad]);\n\n const handleAccessAnnualReport = (reportId: number | null) => {\n history.push(`${swmpId}/${reportId}/annualReport/generalInfo`);\n };\n\n const handleDownloadAnnualReport = async (reportId: number | null) => {\n const { fileName, fileUrl } = await downloadAnnualReport(\n reportId as number\n );\n downloadFile(fileName, fileUrl);\n };\n\n const handleCreateAnnualReport = async (year: number) => {\n const report = await createAnnualReport(swmpId, year);\n return handleAccessAnnualReport(report.id);\n };\n\n const handleExtendSwmp = async () => {\n swmp.planLength = swmp.planLength + 1;\n\n await onExtendSwmp(swmp);\n setIsOpenExtendSwmpModal(false);\n };\n\n const handleSelectAnnualReport = async () => {\n setIsOpenAnnualReportModal(true);\n setAnnualReports(await fetchAnnualReportStatus(swmpId));\n };\n\n return (\n <>\n }\n onClick={() => {\n onReset();\n history.push('/swmp');\n }}>\n Stormwater Management Plans\n \n \n \n Stormwater Management Plan {swmp.year}\n \n \n Currently in Year{' '}\n {swmp.year && new Date().getFullYear() - parseInt(swmp.year) + 1}\n \n \n {customer.admin && (\n \n {customer.annualReport && (\n \n \n Annual Reports\n \n \n )}\n {swmp.status === SWMPStatus.Active && (\n <>\n \n \n history.push(`/swmp/${swmp.id}/update/general`)\n }>\n Update SWMP\n \n \n \n setIsOpenExtendSwmpModal(true)}>\n {`Extend SWMP (Year ${swmp.planLength + 1})`}\n \n \n \n )}\n history.push(`/swmp/${swmp.id}/view/general`)}>\n View SWMP Details\n \n \n )}\n\n \n \n \n \n \n\n setIsOpenAnnualReportModal(false)}>\n Annual Reports\n \n {annualReports.map((r, index) => (\n \n {r.year}\n \n {r.id ? (\n <>\n \n handleAccessAnnualReport(r.id)}\n />\n \n handleDownloadAnnualReport(r.id)}\n />\n \n ) : (\n handleCreateAnnualReport(r.year)}\n />\n )}\n \n \n ))}\n \n \n\n setIsOpenExtendSwmpModal(false)}\n onComplete={handleExtendSwmp}>\n \n \n Once started, all activity will start to be logged against this\n SWMP.\n \n \n \n \n );\n};\n\nconst mapStateToProps = (state) => ({\n swmp: select.swmp(state),\n customer: select.customer(state),\n});\n\nconst mapDispatchToProps = (dispatch) => ({\n onLoad: async (swmpId: number) => {\n dispatch(actions.setLoading(true));\n\n const { swmpActivities, bmp, mg, customer, swmp } = await fetchSwmpDetails(\n swmpId\n );\n\n dispatch(actions.setCustomer(customer));\n dispatch(actions.updateSwmp(swmp));\n dispatch(actions.updateBmp(bmp));\n dispatch(actions.updateMg(mg));\n dispatch(actions.updateActivity(swmpActivities));\n\n const attachments = await fetchSwmpActivityAttachments(swmpId);\n\n dispatch(actions.setActivityAttachment(attachments));\n dispatch(actions.setLoading(false));\n },\n onExtendSwmp: async (swmp: SWMP) => {\n await extendSwmp(swmp);\n dispatch(actions.updateSwmp(swmp));\n },\n onReset: () => {\n dispatch(actions.updateSwmp(INITIAL_SWMP));\n dispatch(actions.updateBmp([]));\n dispatch(actions.updateMg([]));\n dispatch(actions.updateActivity([]));\n },\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(SwmpDetail);\n","import { makeStyles } from '@material-ui/core';\nimport Box from '@material-ui/core/Box';\nimport Button from '@material-ui/core/Button';\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\nimport Radio from '@material-ui/core/Radio';\nimport RadioGroup from '@material-ui/core/RadioGroup';\nimport Typography from '@material-ui/core/Typography';\nimport {\n AddButton,\n AddModal,\n LabelContainer,\n SwmpCard,\n TextField,\n} from 'components';\nimport { useValidator } from 'hooks';\nimport { SWMPStatus, SWMPAddOption } from 'models';\nimport { Customer } from 'models/Customer';\nimport { INITIAL_SWMP, SWMP } from 'models/SWMP';\nimport React, { useEffect, useState } from 'react';\nimport { connect } from 'react-redux';\nimport { useHistory } from 'react-router-dom';\nimport * as actions from 'redux/actions';\nimport select from 'redux/select';\nimport { createSwmp, fetchSwmpList, exportSwmp } from 'services';\nimport { downloadFile } from 'utils';\n\ninterface SwmpListProps {\n swmpList: SWMP[];\n customer: Customer;\n onLoad: () => Promise;\n onSetError: (error: string) => void;\n}\n\nconst useStyles = makeStyles({\n header: {\n position: 'relative',\n },\n exportButton: {\n position: 'absolute',\n right: 0,\n },\n});\n\nconst SwmpList: React.FC = ({\n swmpList,\n customer,\n onLoad,\n onSetError,\n}) => {\n const classes = useStyles();\n const [isModalOpen, setIsModalOpen] = useState(false);\n const [swmp, setSwmp] = useState({\n ...INITIAL_SWMP,\n year: new Date().getFullYear().toString(),\n });\n const [addOption, setAddOption] = useState(SWMPAddOption.Blank);\n const history = useHistory();\n\n useEffect(() => {\n swmpList.length && setAddOption(SWMPAddOption.Copy);\n }, [swmpList]);\n\n useEffect(() => {\n onLoad();\n }, [onLoad]);\n\n const handleNavigate = (swmpId: number, status: SWMPStatus) =>\n history.push(\n status === SWMPStatus.Draft\n ? `/swmp/draft/${swmpId}/general`\n : `swmp/${swmpId}`\n );\n\n const handleCreateSwmp = async () => {\n try {\n const { id } = await createSwmp(parseInt(swmp.year), addOption);\n history.push(`/swmp/draft/${id}/general`);\n } catch (error) {\n onSetError(error.response.data.message);\n }\n };\n\n const { validator, handleChange, handleComplete } = useValidator(\n swmp,\n ['year'],\n isModalOpen,\n setSwmp,\n handleCreateSwmp\n );\n\n const handleExport = async () => {\n const { fileName, fileLink } = await exportSwmp();\n downloadFile(fileName, fileLink);\n };\n\n return (\n <>\n \n Stormwater Management Plans\n {customer.admin && (\n \n Export\n \n )}\n \n\n {customer.admin && (\n <>\n setIsModalOpen(true)}\n />\n {swmpList.map((swmp) => (\n handleNavigate(swmp.id, swmp.status)}>\n \n \n ))}\n \n )}\n\n setIsModalOpen(false)}>\n \n \n setAddOption(e.target.value as SWMPAddOption)}>\n {swmpList.length !== 0 && (\n }\n label=\"Copy Previous Stormwater Management Plan\"\n />\n )}\n\n }\n label=\"Blank\"\n />\n\n }\n label=\"Example\"\n />\n \n \n \n \n );\n};\n\nconst mapStateToProps = (state) => ({\n swmpList: select.swmpList(state),\n customer: select.customer(state),\n});\n\nconst mapDispatchToProps = (dispatch) => ({\n onLoad: async () => {\n const { swmp, customer } = await fetchSwmpList();\n\n dispatch(actions.setSwmpList(swmp));\n dispatch(actions.setCustomer(customer));\n },\n onSetError: (error: string) => dispatch(actions.setError(error)),\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(SwmpList);\n","import { BMP } from 'models/BMP';\nimport { MG } from 'models/MG';\n\nexport interface ValueWithDescription {\n value: boolean | null;\n description: string;\n}\n\nexport const INITIAL_VALUE_WITH_DESCRIPTION: ValueWithDescription = {\n value: null,\n description: '',\n};\n\nexport interface AnnualReport {\n general: {\n isCopyReportSubmitted: boolean | null;\n reportSubmittedRegion: string;\n };\n\n complianceStatus: {\n submittedSwmp: ValueWithDescription;\n recordKeepingRequirements: ValueWithDescription;\n eligibilityRequirements: ValueWithDescription;\n conductedAnnualReview: ValueWithDescription;\n generalAssessments: {\n id: string;\n bmp: BMP;\n description: string;\n }[];\n progressReducingPollutants: {\n id: string;\n mg: MG;\n informationUsed: string;\n quantity: string;\n units: string;\n description: string;\n }[];\n successImplementations: {\n id: string;\n mg: MG;\n description: string;\n }[];\n };\n\n dataSummary: {\n description: string;\n };\n\n impairedWaterBodes: {\n identifyImpairedWater: string;\n activitiesToDischarge: string;\n implementationOfTargetedControls: string;\n identifiedBenchmarks: {\n id: string;\n benchmarkParameter: string;\n benchmarkValue: string;\n yearsConducted: string;\n description: string;\n }[];\n archievingBenchmarkAnalyses: {\n id: string;\n benchmarkParameterId: string;\n benchmarkParameter: string;\n bmp: BMP;\n description: string;\n }[];\n impairmentBacteriaReports: {\n id: string;\n bmp: BMP;\n description: '';\n }[];\n bmpEffectivenessProgresses: {\n id: string;\n benchmarkParameterId: string;\n benchmarkParameter: string;\n description: '';\n }[];\n };\n\n stormwaterActivities: {\n activities: {\n id: string;\n bmp: BMP;\n stormwaterActivity: string;\n description: string;\n }[];\n };\n\n swmpModifications: {\n isImplementationReviewedEachYear: boolean | null;\n hasChanges: boolean | null;\n entityChanges: {\n id: string;\n entity: BMP | MG;\n isBmp: boolean;\n description: string;\n }[];\n additionalChangesDescription: string;\n };\n\n additionalBmps: {\n additionalBmpsImplementations: {\n id: string;\n bmp: string;\n description: string;\n implementationSchedule: string;\n status: string;\n }[];\n };\n\n additionalInformation: {\n isPermitteeRelyingOnEntities: boolean | null;\n relyingEntities: {\n id: string;\n name: string;\n explanation: string;\n }[];\n isPermitteePartOfGroup: boolean | null;\n isReportIncludingAllPermittees: boolean | null;\n associatedResponsibilities: {\n id: string;\n authorizationNumber: string;\n permittee: string;\n }[];\n };\n\n constructionActivities: {\n numberOfConstructionActivities: string;\n utilizeSeventhMcm: boolean | null;\n numberOfMunicipalActivities: string;\n };\n}\n\nexport const INITIAL_ANNUAL_REPORT: AnnualReport = {\n general: {\n isCopyReportSubmitted: null,\n reportSubmittedRegion: '',\n },\n\n complianceStatus: {\n submittedSwmp: INITIAL_VALUE_WITH_DESCRIPTION,\n recordKeepingRequirements: INITIAL_VALUE_WITH_DESCRIPTION,\n eligibilityRequirements: INITIAL_VALUE_WITH_DESCRIPTION,\n conductedAnnualReview: INITIAL_VALUE_WITH_DESCRIPTION,\n generalAssessments: [],\n progressReducingPollutants: [],\n successImplementations: [],\n },\n\n dataSummary: {\n description: '',\n },\n\n impairedWaterBodes: {\n identifyImpairedWater: '',\n activitiesToDischarge: '',\n implementationOfTargetedControls: '',\n identifiedBenchmarks: [],\n archievingBenchmarkAnalyses: [],\n impairmentBacteriaReports: [],\n bmpEffectivenessProgresses: [],\n },\n\n stormwaterActivities: {\n activities: [],\n },\n\n swmpModifications: {\n isImplementationReviewedEachYear: null,\n hasChanges: null,\n entityChanges: [],\n additionalChangesDescription: '',\n },\n\n additionalBmps: {\n additionalBmpsImplementations: [],\n },\n\n additionalInformation: {\n isPermitteeRelyingOnEntities: null,\n relyingEntities: [],\n isPermitteePartOfGroup: null,\n isReportIncludingAllPermittees: null,\n associatedResponsibilities: [],\n },\n\n constructionActivities: {\n numberOfConstructionActivities: '',\n utilizeSeventhMcm: null,\n numberOfMunicipalActivities: '',\n },\n};\n","export interface AnnualReportContact {\n id: number;\n contactName: string;\n phone: string;\n emailAddress: string;\n mailingAddress: string;\n}\n\nexport const INITIAL_ANNUAL_REPORT_CONTACT: AnnualReportContact = {\n id: 0,\n contactName: '',\n phone: '',\n emailAddress: '',\n mailingAddress: '',\n};\n","import { set } from 'lodash/fp';\nimport { INITIAL_ANNUAL_REPORT } from 'models/AnnualReport';\nimport { INITIAL_ANNUAL_REPORT_CONTACT } from 'models/AnnualReportContact';\nimport { INITIAL_SWMP } from 'models/SWMP';\nimport { getSortedEntities } from 'utils';\n\nimport { ActionTypes, Actions, AppState } from './types';\n\nconst initialState: AppState = {\n loading: false,\n customer: {\n id: '',\n fullName: '',\n stateAbbr: '',\n annualReport: false,\n admin: false,\n },\n swmpList: [],\n swmp: INITIAL_SWMP,\n bstMgtPracs: [],\n measurableGoals: [],\n activities: [],\n activityAttachments: {},\n annualReportYear: 0,\n annualReport: INITIAL_ANNUAL_REPORT,\n annualReportContact: INITIAL_ANNUAL_REPORT_CONTACT,\n error: '',\n};\n\nconst reducer = (state = initialState, action: Actions) => {\n switch (action.type) {\n case ActionTypes.SET_SWMP_LIST:\n return {\n ...state,\n swmpList: action.payload,\n };\n\n case ActionTypes.SET_CUSTOMER:\n return {\n ...state,\n customer: action.payload,\n };\n\n case ActionTypes.SET_ANNUAL_REPORT_YEAR:\n return {\n ...state,\n annualReportYear: action.payload,\n };\n\n case ActionTypes.SET_ANNUAL_REPORT:\n return {\n ...state,\n annualReport: action.payload,\n };\n\n case ActionTypes.SET_ANNUAL_REPORT_CONTACT:\n return {\n ...state,\n annualReportContact: action.payload,\n };\n\n case ActionTypes.UPDATE_ANNUAL_REPORT_CONTACT:\n return {\n ...state,\n annualReportContact: action.payload || INITIAL_ANNUAL_REPORT_CONTACT,\n };\n\n case ActionTypes.UPDATE_SWMP:\n return {\n ...state,\n swmp: action.payload || INITIAL_SWMP,\n };\n\n case ActionTypes.UPDATE_BMP:\n return {\n ...state,\n bstMgtPracs: getSortedEntities(action.payload, 'bmp'),\n };\n\n case ActionTypes.UPDATE_MG:\n return {\n ...state,\n measurableGoals: getSortedEntities(action.payload, 'mg'),\n };\n\n case ActionTypes.UPDATE_ACTIVITY:\n const datesMapped = (action.payload || []).map((activity) => ({\n ...activity,\n // dates returned from the server are strings not type `Date`\n // dates added locally are type `Date`\n // Convert string date values to dates\n // Strings from server also include `Z` (zulu) timezone\n // `new Date` will convert this to the local timezone, but these are absolute dates (no timezone in database)\n // Strip the 'Z' to prevent the timezone conversion\n date:\n Object.prototype.toString.call(activity.date) === '[object String]'\n ? new Date((activity.date as any).slice(0, -1))\n : activity.date,\n }));\n return {\n ...state,\n activities: datesMapped,\n };\n\n case ActionTypes.UPDATE_ANNUAL_REPORT:\n const { path, value } = action.payload;\n\n return set(`annualReport.${path}`, value, state);\n\n case ActionTypes.SET_ERROR:\n return {\n ...state,\n error: action.payload,\n };\n\n case ActionTypes.CLEAR_ERROR:\n return {\n ...state,\n error: '',\n };\n\n case ActionTypes.SET_LOADING:\n return {\n ...state,\n loading: action.payload,\n };\n\n case ActionTypes.SET_ACTIVITY_ATTACHMENT:\n return {\n ...state,\n activityAttachments: action.payload,\n };\n\n default:\n return state;\n }\n};\n\nexport default reducer;\n","import CssBaseline from '@material-ui/core/CssBaseline';\nimport { MuiThemeProvider } from '@material-ui/core/styles';\nimport axios from 'axios';\nimport { App as AppContainer } from 'containers';\nimport React from 'react';\nimport { Provider } from 'react-redux';\nimport { createStore } from 'redux';\nimport reducer from 'redux/reducer';\n\nimport theme from './theme';\n\naxios.defaults.baseURL = process.env.REACT_APP_BASE_URL;\naxios.defaults.withCredentials = true;\n\nconst store = createStore(reducer);\n\nconst App: React.FC = () => {\n return (\n \n \n \n \n \n \n );\n};\n\nexport default App;\n","// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read https://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.0/8 are considered localhost for IPv4.\n window.location.hostname.match(\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\n )\n);\n\ntype Config = {\n onSuccess?: (registration: ServiceWorkerRegistration) => void;\n onUpdate?: (registration: ServiceWorkerRegistration) => void;\n};\n\nexport function register(config?: Config) {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit https://bit.ly/CRA-PWA'\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl: string, config?: Config) {\n navigator.serviceWorker\n .register(swUrl)\n .then((registration) => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n 'New content is available and will be used when all ' +\n 'tabs for this page are closed. See https://bit.ly/CRA-PWA.'\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch((error) => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl: string, config?: Config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl, {\n headers: { 'Service-Worker': 'script' },\n })\n .then((response) => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get('content-type');\n if (\n response.status === 404 ||\n (contentType != null && contentType.indexOf('javascript') === -1)\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then((registration) => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log(\n 'No internet connection found. App is running in offline mode.'\n );\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready\n .then((registration) => {\n registration.unregister();\n })\n .catch((error) => {\n console.error(error.message);\n });\n }\n}\n","import React from 'react';\nimport ReactDOM from 'react-dom';\n\nimport App from './App';\nimport * as serviceWorker from './serviceWorker';\n\nconst observer = new MutationObserver(() => {\n const element = document.getElementById('root');\n\n if (element) {\n ReactDOM.render(\n \n \n ,\n element\n );\n }\n});\n\nobserver.observe(document, {\n childList: true,\n subtree: true,\n});\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://bit.ly/CRA-PWA\nserviceWorker.unregister();\n"],"sourceRoot":""}