{"version":3,"sources":["Components/Layout/HamburgerMenu.tsx","App.Config.tsx","Auth/UserAuth.ts","API/getAPI.tsx","API/putAPI.tsx","API/postAPI.tsx","Components/Layout/StatusNavbar.tsx","Components/Layout/Side Bar Link Items/SideBarLinkItems.tsx","Components/Layout/StatusSidebar.tsx","DTO/Constants/Function/DateConversion.tsx","Pages/Dashboard/Components/ActiveIncident.tsx","Pages/Dashboard/Components/Product.tsx","Pages/Dashboard/Components/ProductGroup.tsx","DTO/Constants/Function/ReturnIsAllLoaded.tsx","Pages/Dashboard/Dashboard.tsx","DTO/Constants/Object/ConstantsList.tsx","Pages/Dashboard/Forms/IncidentForm.tsx","Pages/IncidentHistory/Components/NotActiveIncident.tsx","Pages/IncidentHistory/IncidentHistory.tsx","Components/Common/private-route.tsx","Routes/StatusSiteRoutes.tsx","API/AppVersion/AppVersionAPI.tsx","Components/Layout/PageFooter.tsx","App.tsx","reportWebVitals.ts","index.tsx","telemetry.ts"],"names":["ENVIRONMENTS","appObject","productBrandLight","productBrandBold","iconName","color","subtitle","HamburgerMenu","useEffect","elements","document","getElementsByTagName","index","length","setAttribute","urls","currUrl","window","location","href","toLowerCase","includes","DEV","LOCALHOST","credentials","heavyJob","skills","forms","telematics","eLogs","trucking","intelligence","plans","community","academy","STAGING","GetAppUrls","HamburgerMenuItem","supportLinks","scopes","clientId","devAPI","devUI","prodUI","local","endpoints","status_api","oidc","authority","clientSecret","redirectUri","postLogoutRedirectUri","responseType","scope","role","siteAdmin","telemetry","enabled","appInsightsConnectionString","dev","devHcssApps","production","productionHcssApps","productionHcss","GetEnvironmentConfig","hostname","origin","UserDetails","auth","useAuth","profile","userData","companyName","givenName","surName","email","userId","IsUserAdmin","toUpperCase","getProductGroupAsync","a","endpoint","axios","get","request","getIncidentStatusAsync","getStatusIconsAsync","getIncidentAsync","id","getIncidentsAsync","isDescending","filter","startDate","endDate","params","getUserProductsAsync","putIncidentAsync","incident","put","putUserProducts","userProducts","postIncidentAsync","post","postUserAsync","user","StatusNavbar","initialLoad","useRef","useState","isLoggedIn","setIsLoggedIn","isDisplaySubscriptions","setIsDisplaySubscriptions","productSelection","isUserAdmin","isProductSelected","setIsProductSelected","isProductGroupSelected","setIsProductGroupSelected","isProductGroupHidden","setIsProductGroupHidden","profileFirstName","profileSurName","profileSubText","profileDropDownLinkText","isUserPosted","isMounted","current","isProductSelectedMap","Map","then","resolution","data","products","map","product","set","productGroup","isTestingProductGroup","firstIndex","isProductGroupSelectedTemp","isSingleProductSelected","tempProductGroup","secondIndex","isSelected","previous","setProductSubscription","LoadStatusNavbarInformation","userDTO","name","phoneNumber","isAdmin","isDeleted","postUser","HandleProductGroupCheckbox","HandleProductCheckbox","productsDisplay","key","onClick","updateStatus","HandleProductGroupHidden","margin","onChange","HandleProductGroupSelected","checked","style","marginLeft","display","HandleProductSelected","SaveUserProducts","selectedProducts","push","Navbar","hamburgerMenu","helpMenu","profileMenu","ProfileMenu","firstName","lastName","subtext","DropdownDivider","DropdownMenuItem","iconClassName","signOutRedirect","signIn","className","onHide","show","bsSize","maxHeight","Header","backgroundColor","closeButton","Title","fontSize","hcssStyle","borderRadius","Body","Footer","SideBarLinkItems","props","SidebarLinkMenuItem","renderHtmlAnchor","to","StatusSidebar","Sidebar","isLocalToUTCDate","date","isLocaltime","timeOffset","Date","getTimezoneOffset","setMinutes","getMinutes","DisplayDateString","stringFormat","isLocalTime","addTimezoneAbbreviation","datetimeString","moment","format","toLocaleTimeString","timeZoneName","split","ActiveIncident","isHidden","setIsHidden","setIsMounted","setFormProperties","handleClick","getIncident","productsAffectedDisplay","statusLabel","iconColor","incidentStatusMessage","incidentStatus","startDateTimeString","startTime","expectedResolveTimeString","expectedResolveTime","statusUpdatesDisplay","incidentUpdates","update","updateTime","time","details","data-testid","borderBottom","title","charAt","slice","textAlign","marginBottom","description","renderEditIncidentButton","Product","padding","ProductGroup","type","ReturnIsAllLoaded","isAllLoaded","isAllAsyncLoaded","value","Dashboard","isLoaded","setIsLoaded","activeIncidentExists","setActiveIncidentExists","activeIncidents","setActiveIncidents","statusIcons","setStatusIcons","productGroups","setProductGroups","connection","setConnection","LoadDashboardInformation","getStatusIcons","getIncidents","getProductGroups","connect","HubConnectionBuilder","withUrl","withAutomaticReconnect","build","start","on","catch","error","console","log","NotActiveIncident","ActiveIncidents","activeIncidentsDisplay","isTestingIncident","productGroupsDisplay","productGroupIcon","currentHighestOrder","returnIcon","order","HighestOrderStatus","ReturnProductGroupsDisplay","statusIconsDisplay","statusIcon","isLoading","size","Grid","item","md","sm","marginRight","renderAddIncidentButton","IncidentLabelNames","StatusLabelNames","IncidentForm","setProductSelection","incidentSelection","setIncidentSelection","statusSelection","setStatusSelection","useParams","setIncident","incidentStatusInput","setIncidentStatusInput","setIsLocalTime","pageHistory","useHistory","isAllSelected","setIsAllSelected","isProductGroupsHidden","setIsProductGroupsHidden","LoadIncidentFormInformation","isEditIncident","label","incidentUpdateTemp","setDetailedIncidentUpdate","status","originalProducts","isAllProductsSelected","returnProduct","EditIncident","AddIncident","getIncidentStatus","undefined","onSubmitHandler","values","UserObject","ProductId","IncidentId","StatusId","updatedProducts","originalProduct","finalProducts","Array","from","resolveTime","isActiveIncident","incidentDTO","uuidv4","incidentDescription","detailedIncidentUpdate","isAdded","updatedTime","goBack","getElementById","substring","initialValues","productsAffected","productStatus","handleProductStatus","event","currentTarget","handleProductCheckbox","changeToLocalTime","minWidth","handleProductGroupDisplay","previousGroup","handleProductGroupsAffected","handleProductsAffected","statusTableDisplay","statusCheckboxDisplay","incidentStatusDisplay","IncidentTable","tableRow","isDisplayProductSelection","setIsDisplayProductSelection","enableReinitialize","validateOnChange","validateOnBlur","onSubmit","validate","errors","atleastOneProduct","productsWithoutStatus","productsSelected","trim","join","getTime","missingValues","Object","dangerMessage","errorMessage","notify","htmlFor","width","placeholder","handleChange","data-tip","data-for","effect","place","options","selectedOption","handleIncidentStatus","setFieldValue","flexFlow","groupStatus","handleAllAffected","border","formControl","incidentUpdateString","target","disabled","isSubmitting","ReturnDateRange","decrement","setHours","setDate","getDate","DateRange","Last7Days","Last30Days","AllIncidents","Custom","IncidentHistory","selectOptions","entries","incidentsHistory","setIncidentsHistory","incidentHistoryLength","setIncidentHistoryLength","startIndex","setStartIndex","endIndex","setEndIndex","setStartDate","setEndDate","filterPlaceholder","setFilterPlaceholder","isFilterDisplayed","setIsFilterDisplayed","isCustomSelected","setIsCustomSelected","LoadIncidentHistory","Math","ceil","tempStartDate","tempEndDate","getIncidentsHistory","HandleCustomDate","inputDate","isStart","incidentsHistoryDate","dateString","tempIncidentHistoryDate","incidentHistoryDisplay","forEach","pageSelectionDisplay","i","selectOptionsDisplay","option","height","input","persist","inputValue","HandleDateRange","PrivateRoute","StatusSiteRoutes","exact","path","component","getVersionNumberAsync","PageFooter","version","setVersion","getVersionNumber","versionDisplay","App","autoSignIn","onSignIn","history","replaceState","navbar","sidebar","mainContent","footer","reportWebVitals","onPerfEntry","Function","getCLS","getFID","getFCP","getLCP","getTTFB","ReactDOM","render","theme","themes","heavyBid","appInsights","ApplicationInsights","config","connectionString","enableAutoRouteTracking","loadAppInsights","trackPageView","info","initializeTelemetry"],"mappings":"uPAGKA,E,iHAAAA,K,UAAAA,E,sBAAAA,E,mBAAAA,M,KAML,IAgDMC,EACW,CACTC,kBAAmB,OAAQC,iBAAkB,cAAeC,SAAU,sBAAuBC,MAAO,UAAWC,SAAU,iCAF3HL,EAIY,CACVC,kBAAmB,OAAQC,iBAAkB,gBAAiBC,SAAU,gBAAiBC,MAAO,UAAWC,SAAU,uCALvHL,EAOQ,CACNC,kBAAmB,OAAQC,iBAAkB,WAAYC,SAAU,mBAAoBC,MAAO,UAAWC,SAAU,6BARrHL,EAUM,CACJC,kBAAmB,OAAQC,iBAAkB,SAAUC,SAAU,iBAAkBC,MAAO,UAAWC,SAAU,oCAXjHL,EAaK,CACHC,kBAAmB,OAAQC,iBAAkB,QAASC,SAAU,gBAAiBC,MAAO,UAAWC,SAAU,gCAd/GL,EAgBU,CACRC,kBAAmB,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AA/CiX,EAA8C,EAA9CA,OAAQC,EAAsC,EAAtCA,OAAQC,EAA8B,EAA9BA,OAAQC,EAAsB,EAAtBA,OAAQC,EAAc,EAAdA,QAC3DJ,EAAOF,GACPG,EAAOH,GACPI,EAAOJ,GACPK,EAAOL,GACPM,EAAQN,O,UCAdO,IAASC,OACP,kBAAC,KAAD,KACE,kBAAC,IAAD,MACA,kBAAC,IAAD,CAAeC,MAAOC,IAAOC,UAC3B,kBAAC,GAAD,QAGJlf,SAASkW,eAAe,SCbS,WACjC,MAAiD5S,IAAuBR,UAAhEC,EAAR,EAAQA,QAASC,EAAjB,EAAiBA,4BAEjB,GAAKD,GAAYC,EAKjB,IACE,IAAMmc,EAAc,IAAIC,KAAoB,CAC1CC,OAAQ,CACNC,iBAAkBtc,EAClBuc,yBAAyB,KAI7BJ,EAAYK,kBACZL,EAAYM,gBACZlO,QAAQmO,KAAK,uCACb,MAAOpO,GACPC,QAAQD,MAAM,kCAAmCA,QAhBjDC,QAAQmO,KAAK,qDDYjBC,GAKArB,M","file":"static/js/main.5f944c60.chunk.js","sourcesContent":["import { Layout } from \"hcss-components\";\r\nimport React, { useEffect } from \"react\";\r\n\r\nenum ENVIRONMENTS {\r\n DEV = \"dev\",\r\n LOCALHOST = \"localhost\",\r\n STAGING = \"staging\"\r\n}\r\n\r\nconst GetAppUrls = () => {\r\n let currUrl: string = window.location.href.toLowerCase();\r\n if (currUrl.includes(ENVIRONMENTS.DEV) || currUrl.includes(ENVIRONMENTS.LOCALHOST)) {\r\n return {\r\n credentials: \"https://dev-credentials.hcssapps.com\",\r\n heavyJob: \"https://dev-heavyjob.hcssapps.com/\",\r\n skills: \"https://dev-skills.hcssapps.com\",\r\n forms: \"https://dev-forms.hcssapps.com\",\r\n telematics: \"https://gps-r-dev.hcssapps.com/\",\r\n eLogs: \"https://elogs.hcss.com/\",\r\n trucking: \"https://dev1-trucking.hcssapps.com/\",\r\n intelligence: \"https://dev-BI.hcssapps.com/\",\r\n plans: \"https://dev.plans.hcssapps.com/\",\r\n community: \"https://full-hcss.cs78.force.com/Community\",\r\n academy: \"https://academy.hcss.com/\"\r\n }\r\n }\r\n else if (currUrl.includes(ENVIRONMENTS.STAGING)) {\r\n return {\r\n credentials: \"https://staging-credentials.hcssapps.com\",\r\n heavyJob: \"https://staging-heavyjob.hcssapps.com\",\r\n skills: \"https://staging-skills.hcssapps.com\",\r\n forms: \"https://staging-forms.hcssapps.com\",\r\n telematics: \"https://gps-r-staging.hcssapps.com/\",\r\n eLogs: \"https://elogs.hcss.com/\",\r\n trucking: \"https://staging-trucking.hcssapps.com/\",\r\n intelligence: \"https://staging-BI.hcssapps.com/\",\r\n plans: \"https://plans.hcssapps.com\", // Plans does not have a staging environment\r\n community: \"https://full-hcss.cs78.force.com/Community\",\r\n academy: \"https://academy.hcss.com/\"\r\n }\r\n }\r\n else\r\n return {\r\n credentials: \"https://credentials.hcssapps.com\",\r\n heavyJob: \"https://dev-heavyjob.hcssapps.com/\",\r\n skills: \"https://skills.hcssapps.com\",\r\n forms: \"https://forms.hcssapps.com\",\r\n telematics: \"https://telematics.hcssapps.com\",\r\n eLogs: \"https://elogs.hcss.com/\",\r\n trucking: \"https://trucking.hcssapps.com/\",\r\n intelligence: \"https://bi.hcssapps.com/\",\r\n plans: \"https://plans.hcssapps.com\",\r\n community: \"https://community.hcss.com/\",\r\n academy: \"https://academy.hcss.com/\"\r\n }\r\n}\r\n\r\nconst appObject = {\r\n credentials: {\r\n productBrandLight: \"HCSS\", productBrandBold: \"Credentials\", iconName: \"product-credentials\", color: \"#5f7361\", subtitle: \"Licenses & user subscriptions\"\r\n },\r\n supportLinks: {\r\n productBrandLight: \"HCSS\", productBrandBold: \"Support Links\", iconName: \"external-link\", color: \"#5f7361\", subtitle: \"Internal and External Support Links\"\r\n },\r\n heavyJob: {\r\n productBrandLight: \"HCSS\", productBrandBold: \"HeavyJob\", iconName: \"product-heavyjob\", color: \"#005eb8\", subtitle: \"Time cards & job analysis\"\r\n },\r\n skills: {\r\n productBrandLight: \"HCSS\", productBrandBold: \"Skills\", iconName: \"product-skills\", color: \"#50748a\", subtitle: \"Employee skills & certifications\"\r\n },\r\n forms: {\r\n productBrandLight: \"HCSS\", productBrandBold: \"Forms\", iconName: \"product-forms\", color: \"#3e8ede\", subtitle: \"Custom forms & fillable PDFs\"\r\n },\r\n telematics: {\r\n productBrandLight: \"HCSS\", productBrandBold: \"Telematics\", iconName: \"product-gps\", color: \"#00b5e2\", subtitle: \"Fleet tracking & analysis\"\r\n },\r\n eLogs: {\r\n productBrandLight: \"HCSS\", productBrandBold: \"eLogs\", iconName: \"product-elogs\", color: \"#79993d\", subtitle: \"Electronic logging devices\"\r\n },\r\n trucking: {\r\n productBrandLight: \"HCSS\", productBrandBold: \"Trucking\", iconName: \"product-trucking\", color: \"#00afab\", subtitle: \"Truck & ticket management\"\r\n },\r\n intelligence: {\r\n productBrandLight: \"HCSS\", productBrandBold: \"Intelligence\", iconName: \"product-hcss-intelligence\", color: \"#1a3e70\", subtitle: \"Business intelligence & data warehousing\"\r\n },\r\n plans: {\r\n productBrandLight: \"HCSS\", productBrandBold: \"Plans\", iconName: \"hcss-plans-icon\", color: \"#4d5fab\", subtitle: \"Digital plan management\"\r\n },\r\n community: {\r\n productBrandLight: \"HCSS\", productBrandBold: \"Community\", iconName: \"hcss-community\", color: \"#0f9948\", subtitle: \"Support resources & peer discussions\"\r\n },\r\n academy: {\r\n productBrandLight: \"HCSS\", productBrandBold: \"Academy\", iconName: \"product-academy\", color: \"#009639\", subtitle: \"Online training courses\"\r\n }\r\n}\r\n\r\nexport const HamburgerMenu = () => {\r\n\r\n useEffect(() => {\r\n let elements = document.getElementsByTagName(\".hamburgermenu-item a\");\r\n for (let index = 0; index < elements.length; index++) {\r\n elements[index].setAttribute(\"target\", \"_blank\");\r\n }\r\n }, [])\r\n\r\n const urls = GetAppUrls();\r\n\r\n let credentials = \r\n let heavyJob = \r\n let skills = \r\n let forms = \r\n let telematics = \r\n let eLogs = \r\n let trucking = \r\n let intelligence = \r\n let plans = \r\n let community = \r\n let academy = \r\n let supportLinks = \r\n\r\n return (\r\n \r\n {supportLinks}\r\n {credentials}\r\n {heavyJob}\r\n {skills}\r\n {forms}\r\n {telematics}\r\n {eLogs}\r\n {trucking}\r\n {intelligence}\r\n {plans}\r\n {community}\r\n {academy}\r\n \r\n );\r\n\r\n}","export interface Config {\r\n endpoints: {\r\n status_api: string;\r\n };\r\n oidc: {\r\n authority: string;\r\n clientId: string;\r\n clientSecret: string;\r\n redirectUri: string;\r\n postLogoutRedirectUri: string;\r\n scope: string;\r\n responseType: string;\r\n };\r\n role: {\r\n siteAdmin: string;\r\n };\r\n telemetry: {\r\n enabled: boolean,\r\n appInsightsConnectionString: string,\r\n };\r\n}\r\n\r\nconst scopes = \"openid profile status:write\";\r\nconst clientId = \"hcss-status-ui\";\r\n\r\nconst devAPI = \"https://dev-hcss-status-api.azurewebsites.net\";\r\nconst devUI = \"https://hcssstatusdev.azureedge.net\";\r\n\r\nconst devHccsAppsAPI = \"https://dev-status-api.hcssapps.com\";\r\nconst devHcssAppsUI = \"https://dev-status.hcssapps.com\";\r\n\r\nconst prodAPI = \"https://prod-hcss-status-api.azurewebsites.net\";\r\nconst prodUI = \"https://hcssstatusprod.azureedge.net\";\r\n\r\nconst prodHcssAppsAPI = \"https://status-api.hcssapps.com\"; \r\nconst prodHcssAppsUI = \"https://status.hcssapps.com\";\r\n\r\nconst prodHcssUI = \"https://status.hcss.com\";\r\n\r\nconst devAdminRole = \"HCSS ADMIN\";\r\nconst prodAdminRole = \"HCSS ADMIN\";\r\n\r\nconst local: Config = {\r\n endpoints: {\r\n status_api: \"https://localhost:51274\",\r\n },\r\n oidc: {\r\n authority: \"https://dev-identity.hcssapps.com\",\r\n clientId: clientId,\r\n clientSecret: \"dummy\",\r\n redirectUri: \"https://localhost:3000/oidc/signin-callback\",\r\n postLogoutRedirectUri: \"https://localhost:3000/\",\r\n responseType: \"code\",\r\n scope: scopes,\r\n },\r\n role: {\r\n siteAdmin: devAdminRole,\r\n },\r\n telemetry: {\r\n enabled: false,\r\n appInsightsConnectionString: \"InstrumentationKey=c2236307-fcd3-44e9-ac28-b1f6ebf1bf50;IngestionEndpoint=https://eastus-8.in.applicationinsights.azure.com/;LiveEndpoint=https://eastus.livediagnostics.monitor.azure.com/;ApplicationId=df3a9442-e18d-4bc5-bd7a-1f6a239e53c0\",\r\n },\r\n};\r\n\r\nconst dev: Config = {\r\n endpoints: {\r\n status_api: devAPI,\r\n },\r\n oidc: {\r\n authority: \"https://dev-identity.hcssapps.com\",\r\n clientId: clientId,\r\n clientSecret: \"dummy\",\r\n redirectUri: `${devUI}/oidc/signin-callback`,\r\n postLogoutRedirectUri: `${devUI}/`,\r\n responseType: \"code\",\r\n scope: scopes,\r\n },\r\n role: {\r\n siteAdmin: devAdminRole,\r\n },\r\n telemetry: {\r\n enabled: false,\r\n appInsightsConnectionString: \"InstrumentationKey=c2236307-fcd3-44e9-ac28-b1f6ebf1bf50;IngestionEndpoint=https://eastus-8.in.applicationinsights.azure.com/;LiveEndpoint=https://eastus.livediagnostics.monitor.azure.com/;ApplicationId=df3a9442-e18d-4bc5-bd7a-1f6a239e53c0\",\r\n },\r\n};\r\n\r\nconst devHcssApps: Config = {\r\n endpoints: {\r\n status_api: devAPI,\r\n },\r\n oidc: {\r\n authority: \"https://dev-identity.hcssapps.com\",\r\n clientId: clientId,\r\n clientSecret: \"dummy\",\r\n redirectUri: `${devHcssAppsUI}/oidc/signin-callback`,\r\n postLogoutRedirectUri: `${devHcssAppsUI}/`,\r\n responseType: \"code\",\r\n scope: scopes,\r\n },\r\n role: {\r\n siteAdmin: devAdminRole,\r\n },\r\n telemetry: {\r\n enabled: false,\r\n appInsightsConnectionString: \"InstrumentationKey=c2236307-fcd3-44e9-ac28-b1f6ebf1bf50;IngestionEndpoint=https://eastus-8.in.applicationinsights.azure.com/;LiveEndpoint=https://eastus.livediagnostics.monitor.azure.com/;ApplicationId=df3a9442-e18d-4bc5-bd7a-1f6a239e53c0\",\r\n },\r\n};\r\n\r\nconst production: Config = {\r\n endpoints: {\r\n status_api: prodAPI,\r\n },\r\n oidc: {\r\n authority: \"https://identity.hcssapps.com\",\r\n clientId: clientId,\r\n clientSecret: \"dummy\",\r\n redirectUri: `${prodUI}/oidc/signin-callback`,\r\n postLogoutRedirectUri: `${prodUI}/`,\r\n responseType: \"code\",\r\n scope: scopes,\r\n },\r\n role: {\r\n siteAdmin: prodAdminRole,\r\n },\r\n telemetry: {\r\n enabled: true,\r\n appInsightsConnectionString: \"InstrumentationKey=bcc8dcd4-2433-49ce-87eb-47caaa30617d;IngestionEndpoint=https://eastus-0.in.applicationinsights.azure.com/;LiveEndpoint=https://eastus.livediagnostics.monitor.azure.com/;ApplicationId=ff48b367-99d7-4524-a2eb-06927d77ddf6\",\r\n },\r\n};\r\n\r\nconst productionHcssApps: Config = {\r\n endpoints: {\r\n status_api: prodHcssAppsAPI,\r\n },\r\n oidc: {\r\n authority: \"https://identity.hcssapps.com\",\r\n clientId: clientId,\r\n clientSecret: \"dummy\",\r\n redirectUri: `${prodHcssAppsUI}/oidc/signin-callback`,\r\n postLogoutRedirectUri: `${prodHcssAppsUI}/`,\r\n responseType: \"code\",\r\n scope: scopes,\r\n },\r\n role: {\r\n siteAdmin: prodAdminRole,\r\n },\r\n telemetry: {\r\n enabled: true,\r\n appInsightsConnectionString: \"InstrumentationKey=bcc8dcd4-2433-49ce-87eb-47caaa30617d;IngestionEndpoint=https://eastus-0.in.applicationinsights.azure.com/;LiveEndpoint=https://eastus.livediagnostics.monitor.azure.com/;ApplicationId=ff48b367-99d7-4524-a2eb-06927d77ddf6\",\r\n },\r\n};\r\n\r\nconst productionHcss: Config = {\r\n endpoints: {\r\n status_api: prodHcssAppsAPI,\r\n },\r\n oidc: {\r\n authority: \"https://identity.hcssapps.com\",\r\n clientId: clientId,\r\n clientSecret: \"dummy\",\r\n redirectUri: `${prodHcssUI}/oidc/signin-callback`,\r\n postLogoutRedirectUri: `${prodHcssUI}/`,\r\n responseType: \"code\",\r\n scope: scopes,\r\n },\r\n role: {\r\n siteAdmin: prodAdminRole,\r\n },\r\n telemetry: {\r\n enabled: true,\r\n appInsightsConnectionString: \"InstrumentationKey=bcc8dcd4-2433-49ce-87eb-47caaa30617d;IngestionEndpoint=https://eastus-0.in.applicationinsights.azure.com/;LiveEndpoint=https://eastus.livediagnostics.monitor.azure.com/;ApplicationId=ff48b367-99d7-4524-a2eb-06927d77ddf6\",\r\n },\r\n};\r\n\r\nexport const GetEnvironmentConfig = () => {\r\n const hostname = window.location.hostname.toLowerCase();\r\n const origin = window.location.origin.toLowerCase();\r\n if (hostname.includes(\"localhost\")) return local;\r\n if (hostname.includes(\"dev-status\")) return devHcssApps;\r\n if (hostname.includes(\"hcssstatusdev\")) return dev;\r\n if (origin.includes(\"https://status.hcssapps.com\")) return productionHcssApps;\r\n if (origin.includes(\"https://dev-status.hcssapps.com\")) return devHcssApps;\r\n if (origin.includes(\"https://status.hcss.com\")) return productionHcss;\r\n if (hostname.includes(\"hcssstatusprod\")) return production;\r\n return production;\r\n};\r\n","import { useAuth } from \"oidc-react\";\r\nimport { GetEnvironmentConfig } from \"../App.Config\";\r\n\r\nexport function UserDetails() {\r\n const auth = useAuth();\r\n\r\n const profile = auth.userData ? auth.userData.profile : null;\r\n const companyClaim =\r\n \"http://credentials.hcssapps.com/schemas/2015/09/identity/claims/companyname\";\r\n const givenNameClaim =\r\n \"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname\";\r\n const surNameClaim =\r\n \"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname\";\r\n const emailClaim =\r\n \"http://credentials.hcssapps.com/schemas/2015/09/identity/claims/emailcontact\";\r\n const roleClaim =\r\n \"http://schemas.microsoft.com/ws/2008/06/identity/claims/role\";\r\n const userIdClaim =\r\n \"http://credentials.hcssapps.com/schemas/2015/09/identity/claims/userid\";\r\n const companyName = profile ? profile[companyClaim] : \"\";\r\n const givenName = profile ? profile[givenNameClaim] : \"\";\r\n const surName = profile ? profile[surNameClaim] : \"\";\r\n const email = profile ? profile[emailClaim] : \"\";\r\n const role = profile ? profile[roleClaim] : \"\";\r\n const userId = profile ? profile[userIdClaim] : \"\";\r\n return { givenName, surName, email, companyName, role, userId };\r\n}\r\n\r\n// Checks if UserDetails.role === adminRole specified inside App.config.tsx. If role is not admin, then add/edit buttons for incidents are not displayed.\r\nexport function IsUserAdmin():boolean {\r\n const userDetails = UserDetails();\r\n const role = userDetails.role.toUpperCase();\r\n\r\n return (role === GetEnvironmentConfig().role.siteAdmin);\r\n}\r\n","import axios from 'axios';\r\nimport { GetEnvironmentConfig } from \"../App.Config\";\r\n\r\nexport const getProductGroupAsync = async ():Promise => {\r\n let endpoint = GetEnvironmentConfig().endpoints.status_api;\r\n let request = await axios.get(`${endpoint}/api/v1/productgroup`);\r\n return request;\r\n}\r\n\r\nexport const getIncidentStatusAsync = async ():Promise => {\r\n let endpoint = GetEnvironmentConfig().endpoints.status_api;\r\n let request = await axios.get(`${endpoint}/api/v1/incidentstatus`);\r\n return request;\r\n}\r\n\r\nexport const getStatusIconsAsync = async ():Promise => {\r\n let endpoint = GetEnvironmentConfig().endpoints.status_api;\r\n let request = await axios.get(`${endpoint}/api/v1/statuslabel`);\r\n return request;\r\n}\r\n\r\nexport const getIncidentAsync = async (id: string):Promise => {\r\n let endpoint = GetEnvironmentConfig().endpoints.status_api;\r\n let request = await axios.get(`${endpoint}/api/v1/incident/${id}`);\r\n return request;\r\n}\r\n\r\nexport const getIncidentsAsync = async (isDescending: boolean=true, filter: string='All', startDate: Date | null, endDate: Date | null):Promise => {\r\n let endpoint = GetEnvironmentConfig().endpoints.status_api;\r\n let request = await axios.get(`${endpoint}/api/v1/incident/filter`, {params: {isDescending: isDescending, filter: filter, startDate: startDate, endDate: endDate}});\r\n return request;\r\n}\r\n\r\nexport const getUserProductsAsync = async (id: string):Promise => {\r\n let endpoint = GetEnvironmentConfig().endpoints.status_api;\r\n let request = await axios.get(`${endpoint}/api/v1/userproduct/${id}`);\r\n return request;\r\n}","import axios from 'axios';\r\nimport { GetEnvironmentConfig } from \"../App.Config\";\r\n\r\nexport const putIncidentAsync = async (incident: any) => {\r\n let endpoint = GetEnvironmentConfig().endpoints.status_api;\r\n try{\r\n await axios.put(`${endpoint}/api/v1/incident`, incident);\r\n }\r\n catch(error){\r\n throw error;\r\n }\r\n}\r\n\r\nexport const putUserProducts = async (userProducts: any) => {\r\n let endpoint = GetEnvironmentConfig().endpoints.status_api;\r\n try{\r\n await axios.put(`${endpoint}/api/v1/userproduct`, userProducts);\r\n }\r\n catch(error){\r\n throw error;\r\n }\r\n}","import axios from 'axios';\r\nimport { GetEnvironmentConfig } from \"../App.Config\";\r\n\r\nexport const postIncidentAsync = async (incident: any) => {\r\n let endpoint = GetEnvironmentConfig().endpoints.status_api;\r\n try{\r\n await axios.post(`${endpoint}/api/v1/incident`, incident);\r\n }\r\n catch(error){\r\n throw error;\r\n }\r\n}\r\n\r\nexport const postUserAsync = async (user: any) => {\r\n let endpoint = GetEnvironmentConfig().endpoints.status_api;\r\n try{\r\n await axios.post(`${endpoint}/api/v1/user`, user);\r\n }\r\n catch(error){\r\n throw error;\r\n }\r\n}","import './Layout.css';\r\nimport React, { useState, useEffect, useRef } from \"react\";\r\nimport { Layout, Modal, Icon, Checkbox, Button, Link } from \"hcss-components\";\r\nimport { HamburgerMenu } from \"./HamburgerMenu\";\r\nimport { IsUserAdmin, UserDetails } from \"../../Auth/UserAuth\";\r\nimport { useAuth } from \"oidc-react\";\r\n\r\nimport { ProductGroupDTO } from '../../DTO/ProductGroupDTO';\r\nimport { ProductDTO } from '../../DTO/ProductDTO';\r\nimport { UserDTO } from '../../DTO/UserDTO';\r\nimport { UserProductDTO } from '../../DTO/UserProductDTO';\r\nimport { getProductGroupAsync } from '../../API/getAPI';\r\nimport { getUserProductsAsync } from '../../API/getAPI';\r\nimport { putUserProducts } from '../../API/putAPI';\r\nimport { postUserAsync } from '../../API/postAPI';\r\n\r\nexport const StatusNavbar = (): JSX.Element => {\r\n const initialLoad = useRef(true);\r\n\r\n const [isAsyncLoaded, setIsAsyncLoaded] = useState(false);\r\n const isAllLoaded = useRef([false]);\r\n\r\n const auth = useAuth();\r\n const user = UserDetails();\r\n \r\n const [isLoggedIn, setIsLoggedIn] = useState(false);\r\n const [userSubscriptions, setUserSubscriptions] = useState(null);\r\n\r\n const [isDisplaySubscriptions, setIsDisplaySubscriptions] = useState(false);\r\n const productSelection = useRef([]);\r\n\r\n const isUserAdmin: boolean = IsUserAdmin();\r\n \r\n interface IsProductSelectedInterface {\r\n id: string,\r\n isSelected: boolean\r\n }\r\n const [isProductSelected, setIsProductSelected] = useState([]);\r\n const [isProductGroupSelected, setIsProductGroupSelected] = useState([]);\r\n\r\n const [isProductGroupHidden, setIsProductGroupHidden] = useState([]);\r\n\r\n const profileFirstName = useRef(\"Not Logged In\");\r\n const profileSurName= useRef(\"\");\r\n const profileSubText = useRef(\"\");\r\n const profileDropDownLinkText = useRef(\"Log in\");\r\n\r\n const isUserPosted = useRef(false);\r\n\r\n const LoadStatusNavbarInformation = (isMounted: boolean) => {\r\n async function setProductSubscription() {\r\n const isProductSelectedMap = new Map();\r\n await getUserProductsAsync(user.userId).then(resolution => {\r\n if(isMounted) {\r\n resolution.data.products.map((product: string) => {\r\n isProductSelectedMap.set(product, product);\r\n });\r\n }\r\n });\r\n\r\n if(initialLoad.current) {\r\n initialLoad.current = false;\r\n await getProductGroupAsync().then(resolution => {\r\n if(isMounted) {\r\n productSelection.current = resolution.data\r\n .filter((productGroup: ProductGroupDTO) => {\r\n if(isUserAdmin) {\r\n return true;\r\n }\r\n else {\r\n return !productGroup.isTestingProductGroup;\r\n }\r\n });\r\n resolution.data\r\n .map((productGroup: ProductGroupDTO, firstIndex: number) => {\r\n let isProductGroupSelectedTemp: boolean = true;\r\n let isSingleProductSelected: boolean = false;\r\n const tempProductGroup: IsProductSelectedInterface[] = productGroup.products\r\n .map((product: ProductDTO, secondIndex: number) => {\r\n const returnProduct: string | undefined = isProductSelectedMap.get(product.id);\r\n if(returnProduct) {\r\n isSingleProductSelected = true;\r\n return {id: product.id, isSelected: true};\r\n }\r\n else {\r\n isProductGroupSelectedTemp = false;\r\n return {id: product.id, isSelected: false};\r\n }\r\n });\r\n setIsProductSelected(previous => {\r\n return [...previous, tempProductGroup];\r\n });\r\n\r\n setIsProductGroupSelected(previous => {\r\n return [...previous, isProductGroupSelectedTemp];\r\n });\r\n\r\n setIsProductGroupHidden(previous => {\r\n return [...previous, !isSingleProductSelected];\r\n });\r\n });\r\n }\r\n });\r\n }\r\n }\r\n setProductSubscription();\r\n }\r\n\r\n useEffect(() => {\r\n let isMounted = true;\r\n\r\n if(auth.userData) {\r\n profileFirstName.current = user.givenName;\r\n profileSurName.current = user.surName;\r\n profileSubText.current = user.companyName;\r\n profileDropDownLinkText.current = \"Log Out\";\r\n \r\n LoadStatusNavbarInformation(isMounted);\r\n setIsLoggedIn(true);\r\n\r\n const userDTO: UserDTO = {\r\n id: user.userId,\r\n name: user.givenName + ' ' + user.surName,\r\n email: user.email,\r\n phoneNumber: '',\r\n isAdmin: isUserAdmin,\r\n isDeleted: false,\r\n }\r\n\r\n if(!isUserPosted.current) {\r\n isUserPosted.current = true;\r\n const postUser = async () => {\r\n await postUserAsync(userDTO);\r\n }\r\n postUser();\r\n }\r\n }\r\n else {\r\n profileFirstName.current = \"Not Logged In\";\r\n profileSurName.current = \"\";\r\n profileSubText.current = \"\";\r\n profileDropDownLinkText.current = \"Log In\";\r\n \r\n setIsLoggedIn(false);\r\n }\r\n\r\n return () => {isMounted = false};\r\n }, [auth]);\r\n\r\n const HandleProductGroupSelected = (firstIndex: number) => {\r\n const updateStatus = !isProductGroupSelected[firstIndex];\r\n setIsProductGroupSelected((previous) => {\r\n previous[firstIndex] = updateStatus;\r\n return [...previous];\r\n });\r\n\r\n setIsProductSelected((previous) => {\r\n previous[firstIndex] = previous[firstIndex].map((product: IsProductSelectedInterface) => {\r\n return {id: product.id, isSelected: updateStatus};\r\n });\r\n return [...previous];\r\n })\r\n }\r\n\r\n const HandleProductSelected = (firstIndex: number, secondIndex: number) => {\r\n const updateStatus = !isProductSelected[firstIndex][secondIndex].isSelected;\r\n if(!updateStatus) {\r\n setIsProductGroupSelected((previous) => {\r\n previous[firstIndex] = updateStatus;\r\n return [...previous];\r\n })\r\n }\r\n\r\n setIsProductSelected((previous) => {\r\n previous[firstIndex][secondIndex].isSelected = updateStatus;\r\n return [...previous];\r\n });\r\n }\r\n\r\n const HandleProductGroupCheckbox = (firstIndex: number) => {\r\n if(firstIndex < isProductGroupSelected.length) {\r\n return isProductGroupSelected[firstIndex];\r\n }\r\n return false;\r\n }\r\n\r\n const HandleProductCheckbox = (firstIndex: number, secondIndex: number) => {\r\n if(firstIndex < isProductSelected.length) {\r\n if(secondIndex < isProductSelected[firstIndex].length) {\r\n return isProductSelected[firstIndex][secondIndex].isSelected;\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n const HandleProductGroupHidden = (firstIndex: number) => {\r\n setIsProductGroupHidden(previous => {\r\n const updateStatus = !previous[firstIndex];\r\n previous[firstIndex] = updateStatus;\r\n return [...previous];\r\n });\r\n }\r\n\r\n const productsDisplay: JSX.Element[] = productSelection.current.map((productGroup: ProductGroupDTO, firstIndex: number) => {\r\n return(\r\n
\r\n HandleProductGroupHidden(firstIndex)} margin='both'>\r\n HandleProductGroupSelected(firstIndex)} checked={HandleProductGroupCheckbox(firstIndex)}>\r\n {productGroup.name}\r\n
\r\n {productGroup.products.map((product: ProductDTO, secondIndex: number) => {\r\n return(\r\n
\r\n HandleProductSelected(firstIndex, secondIndex)} checked={HandleProductCheckbox(firstIndex, secondIndex)}>{product.name}\r\n
\r\n );\r\n })}\r\n
\r\n
\r\n );\r\n });\r\n\r\n const DeselectAllProducts = () => {\r\n isProductSelected.map((productGroup: IsProductSelectedInterface[], firstIndex: number) => {\r\n setIsProductGroupSelected(previous => {\r\n previous[firstIndex] = false;\r\n return [...previous];\r\n });\r\n productGroup.map((product: IsProductSelectedInterface, secondIndex: number) => {\r\n setIsProductSelected(previous => {\r\n previous[firstIndex][secondIndex].isSelected = false;\r\n return [...previous];\r\n });\r\n })\r\n })\r\n }\r\n\r\n const SaveUserProducts = async () => {\r\n const selectedProducts: string[] = [];\r\n isProductSelected.map((productGroup: IsProductSelectedInterface[]) => {\r\n productGroup.map((product: IsProductSelectedInterface) => {\r\n if(product.isSelected) {\r\n selectedProducts.push(product.id);\r\n }\r\n });\r\n });\r\n\r\n const userProducts: UserProductDTO = {\r\n userId: user.userId,\r\n products: selectedProducts\r\n }\r\n\r\n setIsDisplaySubscriptions(false);\r\n\r\n await putUserProducts(userProducts);\r\n }\r\n\r\n return (\r\n <>\r\n }\r\n helpMenu={<>}\r\n profileMenu={\r\n \r\n \r\n setIsDisplaySubscriptions(true)} iconClassName=\"fa fa-envelope\" style={{display: isLoggedIn ? 'block' : 'none'}}>\r\n {\"Subscribe\"}\r\n \r\n \r\n {profileDropDownLinkText.current}\r\n \r\n \r\n }\r\n />\r\n setIsDisplaySubscriptions(false)} show={isDisplaySubscriptions} bsSize={'large'} style={{maxHeight: '95vh'}}>\r\n \r\n Subscriptions\r\n
Sign up for the products you want to receive notifications for.
\r\n
\r\n \r\n DeselectAllProducts()}>Deselect All Subscriptions\r\n
\r\n
\r\n \r\n
\r\n {productsDisplay}\r\n
\r\n
\r\n \r\n
\r\n \r\n );\r\n};\r\n\r\nexport default StatusNavbar;\r\n","import * as React from \"react\";\r\nimport { Layout } from \"hcss-components\";\r\n\r\n/* SideBarLinkItems are the individual links beneath the HCSS Status Site e.g 'Dashboard | Incident History' */\r\n\r\ninterface SideBarLinkItemsInterface {\r\n to: string,\r\n name: string,\r\n iconName: string\r\n}\r\nexport const SideBarLinkItems = (props: SideBarLinkItemsInterface):JSX.Element => {\r\n return (\r\n \r\n {props.name}\r\n \r\n );\r\n}","import * as React from \"react\";\r\nimport { Layout } from \"hcss-components\";\r\nimport { SideBarLinkItems } from \"./Side Bar Link Items/SideBarLinkItems\";\r\n\r\n/* Creates the layout for the sidebar. Every SideBarLinkItem adds a 'linked'-column */\r\n\r\nexport const StatusSidebar = ():JSX.Element => {\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\nexport default StatusSidebar;","import moment from 'moment';\r\n\r\nconst monthConverter = new Map([\r\n [0, 'January'], [1, 'February'], [2, 'March'],\r\n [3, 'April'], [4, 'May'], [5, 'June'],\r\n [6, 'July'], [7, 'August'], [8, 'September'],\r\n [9, 'October'], [10, 'November'], [11, 'December']\r\n]);\r\n\r\nexport const isLocalToUTCDate = (date: Date | null, isLocaltime: boolean): Date => {\r\n if(date !== null) {\r\n if(!isLocaltime) {\r\n const timeOffset = new Date().getTimezoneOffset();\r\n date.setMinutes(date.getMinutes() - timeOffset);\r\n }\r\n }\r\n else {\r\n date = new Date();\r\n }\r\n return date;\r\n}\r\n\r\nexport const DisplayDateString = (date: Date | null, stringFormat: string, isLocalTime: boolean = false, addTimezoneAbbreviation: boolean = true): string => {\r\n let datetimeString = '';\r\n if(date !== null) {\r\n if(!isLocalTime) {\r\n const timeOffset = new Date().getTimezoneOffset();\r\n date.setMinutes(date.getMinutes() - timeOffset);\r\n }\r\n if(addTimezoneAbbreviation) {\r\n datetimeString = moment(date).format(stringFormat) + ' ' + new Date().toLocaleTimeString('en-us',{timeZoneName:'short'}).split(' ')[2];\r\n }\r\n else {\r\n datetimeString = moment(date).format(stringFormat);\r\n }\r\n }\r\n return datetimeString;\r\n}\r\n","import '../Dashboard.css';\r\nimport React, { useState } from 'react';\r\nimport { Icon } from \"hcss-components\";\r\nimport { Link } from \"react-router-dom\";\r\nimport { getIncidentAsync } from \"../../../API/getAPI\";\r\n\r\nimport { ProductDTO } from '../../../DTO/ProductDTO';\r\nimport { IncidentDTO } from '../../../DTO/IncidentDTO';\r\nimport { IncidentUpdateDTO } from '../../../DTO/IncidentUpdateDTO';\r\nimport { DisplayDateString } from '../../../DTO/Constants/Function/DateConversion';\r\n\r\nimport { IsUserAdmin } from '../../../Auth/UserAuth';\r\n\r\nexport const ActiveIncident = (props: IncidentDTO): JSX.Element => {\r\n const [isHidden, setIsHidden] = useState(false);\r\n const [isMounted, setIsMounted] = useState(false);\r\n const [formProperties, setFormProperties] = useState();\r\n\r\n const handleClick = () => {\r\n setIsMounted(true);\r\n async function getIncident() {\r\n await getIncidentAsync(props.id).then(resolution => {\r\n if(isMounted) {\r\n setFormProperties(resolution.data);\r\n }\r\n });\r\n }\r\n getIncident();\r\n }\r\n\r\n const productsAffectedDisplay = props.products.map((product: ProductDTO, index: number) => {\r\n return(
  • {product.name}
  • );\r\n })\r\n\r\n let incidentStatusMessage: string = '';\r\n if(props.incidentStatus.name === 'Investigating') {\r\n incidentStatusMessage = 'The incident is currently under investigation.';\r\n } else if (props.incidentStatus.name === 'Identified') {\r\n incidentStatusMessage = 'The root cause of the incident has been identified.';\r\n } else {\r\n incidentStatusMessage = 'The incident has been resolved.';\r\n }\r\n\r\n const startDateTimeString: string = DisplayDateString(new Date(props.startTime), 'LLL', false, true);\r\n let expectedResolveTimeString: string = 'We are unsure of the resolution time.';\r\n if(props.expectedResolveTime) {\r\n expectedResolveTimeString = 'We expect this to be resolved by ' + DisplayDateString(new Date(props.expectedResolveTime), 'LLL', false, true);\r\n }\r\n\r\n let statusUpdatesDisplay:JSX.Element[] = [];\r\n if(props.incidentUpdates) {\r\n statusUpdatesDisplay = props.incidentUpdates.map((update: IncidentUpdateDTO, index: number) => {\r\n const updateTime: string = DisplayDateString(new Date(update.time), 'LLL', false, true);\r\n return(
  • {updateTime} - {update.details}
  • );\r\n })\r\n }\r\n\r\n const renderEditIncidentButton = () => {\r\n if (IsUserAdmin()) {\r\n return(\r\n
    \r\n Edit Incident\r\n \r\n \r\n
    \r\n );\r\n }\r\n }\r\n\r\n return(\r\n
    \r\n \r\n
    \r\n
    \r\n Products Affected:\r\n
      \r\n {productsAffectedDisplay}\r\n
    \r\n
    \r\n
    {incidentStatusMessage}
    \r\n
    Expected Resolution Date Time: {expectedResolveTimeString}
    \r\n
    Reported Date Time: {startDateTimeString}
    \r\n
    \r\n Status Updates:\r\n
      \r\n {statusUpdatesDisplay}\r\n
    \r\n
    \r\n {renderEditIncidentButton()}\r\n
    \r\n
    \r\n );\r\n}","import \"../Dashboard.css\"\r\nimport React from \"react\";\r\nimport { Icon } from \"hcss-components\";\r\n\r\nimport { ProductDTO } from '../../../DTO/ProductDTO';\r\n\r\nexport const Product = (props: ProductDTO):JSX.Element => {\r\n return(\r\n
    \r\n \r\n
    \r\n
    {props.name}
    \r\n
    {props.description}
    \r\n
    \r\n
    \r\n );\r\n}","import \"../Dashboard.css\"\r\nimport React, { useState } from \"react\";\r\nimport { Product } from \"./Product\";\r\nimport { Icon } from \"hcss-components\";\r\n\r\nimport { ProductGroupDTO } from '../../../DTO/ProductGroupDTO';\r\nimport { ProductDTO } from '../../../DTO/ProductDTO';\r\nimport { StatusLabelDTO } from '../../../DTO/StatusLabelDTO';\r\n\r\ninterface ProductGroupInterface {\r\n productGroup: ProductGroupDTO,\r\n statusLabel: StatusLabelDTO\r\n}\r\nexport const ProductGroup = (props: ProductGroupInterface):JSX.Element => {\r\n const [isHidden, setIsHidden] = useState(true);\r\n const handleClick = () => {\r\n setIsHidden(previous => !previous);\r\n };\r\n\r\n return(\r\n
    \r\n \r\n
    \r\n {props.productGroup.products.map((product: ProductDTO, index: number) => {\r\n return(\r\n \r\n );\r\n })}\r\n
    \r\n
    \r\n );\r\n}","export const ReturnIsAllLoaded = (isAllLoaded: boolean[]):boolean => {\r\n let isAllAsyncLoaded: boolean = true;\r\n isAllLoaded.map((value, index) => {\r\n if(!value) {\r\n isAllAsyncLoaded = false;\r\n }\r\n });\r\n return isAllAsyncLoaded;\r\n}","import './Dashboard.css';\r\nimport React, { useState, useEffect, useRef } from \"react\";\r\nimport { PageHeader, SubTitle, Icon, Link, Button, LoadingContainer } from \"hcss-components\";\r\nimport { ActiveIncident } from \"./Components/ActiveIncident\";\r\nimport { ProductGroup } from \"./Components/ProductGroup\";\r\nimport { Product } from \"./Components/Product\";\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { IsUserAdmin, UserDetails } from '../../Auth/UserAuth';\r\nimport { useAuth } from 'oidc-react';\r\nimport { ReturnIsAllLoaded } from '../../DTO/Constants/Function/ReturnIsAllLoaded';\r\n\r\nimport { getIncidentsAsync, getProductGroupAsync, getStatusIconsAsync } from '../../API/getAPI';\r\nimport { ProductGroupDTO } from '../../DTO/ProductGroupDTO';\r\nimport { StatusLabelDTO } from '../../DTO/StatusLabelDTO';\r\nimport { IncidentDTO } from '../../DTO/IncidentDTO';\r\nimport { ProductDTO } from '../../DTO/ProductDTO';\r\nimport { UserDTO } from '../../DTO/UserDTO';\r\n\r\nimport { GetEnvironmentConfig } from \"../../App.Config\";\r\nimport { HubConnection, HubConnectionBuilder } from '@microsoft/signalr';\r\n\r\nexport const Dashboard = ():JSX.Element => {\r\n // isLoaded is set to true whenever all API calls have finished. On state change page is refreshed loading all the new information.\r\n const isAllLoaded = useRef([false, false, false]);\r\n const [isLoaded, setIsLoaded] = useState(false);\r\n\r\n // Checks for the existence of an active incident. If no activce incident, displays the Good incident's message.\r\n const [activeIncidentExists, setActiveIncidentExists] = useState(false);\r\n\r\n const [activeIncidents, setActiveIncidents] = useState([]);\r\n const [statusIcons, setStatusIcons] = useState([]);\r\n const [productGroups, setProductGroups] = useState([]);\r\n\r\n const [connection, setConnection] = useState(null);\r\n\r\n const LoadDashboardInformation = async (isMounted: boolean) => {\r\n async function getProductGroups() {\r\n await getProductGroupAsync().then(resolution => {\r\n if(isMounted) {\r\n setProductGroups([...resolution.data]);\r\n }\r\n });\r\n isAllLoaded.current[0] = true;\r\n setIsLoaded(ReturnIsAllLoaded(isAllLoaded.current));\r\n }\r\n getProductGroups();\r\n\r\n async function getStatusIcons() {\r\n await getStatusIconsAsync().then(resolution => {\r\n if(isMounted) {\r\n setStatusIcons([...resolution.data]);\r\n }\r\n });\r\n isAllLoaded.current[1] = true;\r\n setIsLoaded(ReturnIsAllLoaded(isAllLoaded.current));\r\n }\r\n getStatusIcons();\r\n\r\n async function getIncidents() {\r\n await getIncidentsAsync(true, 'active', null, null).then(resolution => {\r\n if(isMounted) {\r\n setActiveIncidents([...resolution.data]);\r\n setActiveIncidentExists(resolution.data.length ? true : false);\r\n }\r\n });\r\n isAllLoaded.current[2] = true;\r\n setIsLoaded(ReturnIsAllLoaded(isAllLoaded.current));\r\n }\r\n getIncidents();\r\n }\r\n\r\n useEffect(() => {\r\n let isMounted = true;\r\n\r\n let endpoint = GetEnvironmentConfig().endpoints.status_api;\r\n const connect = new HubConnectionBuilder()\r\n .withUrl(`${endpoint}/hubs/database`)\r\n .withAutomaticReconnect()\r\n .build();\r\n\r\n setConnection(connect);\r\n LoadDashboardInformation(isMounted); \r\n\r\n return () => {isMounted = false};\r\n }, []);\r\n\r\n useEffect(() => {\r\n let isMounted = true;\r\n if(connection) {\r\n connection.start().then(() => {\r\n connection.on(\"Update\", () => {\r\n LoadDashboardInformation(isMounted);\r\n });\r\n })\r\n .catch((error) => console.log(\"Connection Failed: \", error));\r\n }\r\n\r\n return () => {isMounted = false};\r\n }, [connection]);\r\n\r\n const NotActiveIncident = ():JSX.Element => {\r\n return(\r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n

    All systems are up and running!

    \r\n
    \r\n
    \r\n );\r\n }\r\n\r\n const ActiveIncidents = ():JSX.Element => {\r\n const isAdmin = IsUserAdmin();\r\n const activeIncidentsDisplay:JSX.Element[] = activeIncidents.filter((incident: IncidentDTO) => {\r\n if(isAdmin) {\r\n return true;\r\n }\r\n else {\r\n return !incident.isTestingIncident;\r\n }\r\n })\r\n .map((incident: IncidentDTO, index: number) => {\r\n return();\r\n });\r\n\r\n return(\r\n
    \r\n Ongoing Incidents\r\n
    \r\n {activeIncidentsDisplay}\r\n
    \r\n
    \r\n );\r\n }\r\n\r\n const HighestOrderStatus = (products: ProductDTO[]):StatusLabelDTO => {\r\n let currentHighestOrder : number | undefined = 0;\r\n let returnIcon: StatusLabelDTO = {\r\n id: '438A96BA-4FDD-44E7-85BF-A6B82ACBD9C5',\r\n name: 'Good',\r\n iconName: 'check-circle',\r\n iconColor: '#14AF80',\r\n order: 10,\r\n isDeleted: false\r\n };\r\n\r\n for(const product of products) {\r\n if(product.statusLabel.order) {\r\n if (product.statusLabel.order > currentHighestOrder) {\r\n returnIcon = {\r\n id: product.statusLabel.id,\r\n name: product.statusLabel.name,\r\n iconName: product.statusLabel.iconName,\r\n iconColor: product.statusLabel.iconColor,\r\n order: product.statusLabel.order,\r\n isDeleted: product.statusLabel.isDeleted\r\n };\r\n currentHighestOrder = product.statusLabel.order;\r\n }\r\n }\r\n }\r\n return returnIcon;\r\n }\r\n\r\n const ReturnProductGroupsDisplay = (isAdmin: boolean, productGroups: ProductGroupDTO[]):JSX.Element[] => {\r\n const productGroupsDisplay:JSX.Element[] = productGroups.filter((productGroup: ProductGroupDTO) => {\r\n if(isAdmin) {\r\n return true;\r\n }\r\n else {\r\n return !productGroup.isTestingProductGroup;\r\n }\r\n })\r\n .map((productGroup: ProductGroupDTO, index: number) => {\r\n const productGroupIcon: StatusLabelDTO = HighestOrderStatus(productGroup.products);\r\n return(\r\n );\r\n });\r\n\r\n return productGroupsDisplay;\r\n }\r\n const productGroupsDisplay:JSX.Element[] = ReturnProductGroupsDisplay(IsUserAdmin(), productGroups);\r\n\r\n const statusIconsDisplay:JSX.Element[] = statusIcons.map((statusIcon: StatusLabelDTO, index: number) => {\r\n return(\r\n
    \r\n {statusIcon.name}\r\n \r\n
    \r\n );\r\n });\r\n\r\n const renderAddIncidentButton = () => {\r\n if (IsUserAdmin()) {\r\n return(\r\n
    \r\n \r\n
    \r\n );\r\n }\r\n }\r\n\r\n return (\r\n \r\n \r\n Dashboard\r\n {renderAddIncidentButton()}\r\n
    \r\n {activeIncidentExists ? : }\r\n
    \r\n
    \r\n
    \r\n Product Groups\r\n
    \r\n {statusIconsDisplay}\r\n
    \r\n
    \r\n
    \r\n {productGroupsDisplay}\r\n
    \r\n
    \r\n
    \r\n
    \r\n );\r\n}","export const IncidentLabelNames = {\r\n resolvedString: 'Resolved'\r\n}\r\n\r\nexport const StatusLabelNames = {\r\n good: 'Good',\r\n information: 'Information',\r\n warning: 'Warning',\r\n critical: 'Critical'\r\n}","import \"../Dashboard.css\";\r\nimport React, { useState, useEffect, useRef } from \"react\";\r\nimport { useParams, useHistory } from 'react-router-dom';\r\nimport ReactTooltip from 'react-tooltip';\r\nimport { Formik, Form, ErrorMessage } from 'formik';\r\nimport { PageHeader, Modal, Button, Icon, Select, Textarea, TextField, Checkbox, TreeSelector, Link, LoadingContainer, notify} from 'hcss-components';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { DisplayDateString, isLocalToUTCDate } from '../../../DTO/Constants/Function/DateConversion';\r\nimport { useUserPost } from '../../../DTO/Constants/Function/CustomHooks/useUserPost';\r\nimport { ReturnIsAllLoaded } from '../../../DTO/Constants/Function/ReturnIsAllLoaded';\r\n\r\nimport { getProductGroupAsync, getStatusIconsAsync, getIncidentStatusAsync, getIncidentAsync } from '../../../API/getAPI';\r\nimport { postIncidentAsync } from '../../../API/postAPI';\r\nimport { putIncidentAsync } from '../../../API/putAPI';\r\nimport { ProductGroupDTO } from '../../../DTO/ProductGroupDTO';\r\nimport { ProductDTO } from '../../../DTO/ProductDTO';\r\nimport { StatusLabelDTO } from '../../../DTO/StatusLabelDTO';\r\nimport { IncidentDTO } from '../../../DTO/IncidentDTO';\r\nimport { IncidentStatusDTO } from '../../../DTO/IncidentStatusDTO';\r\nimport { IncidentUpdateDTO } from '../../../DTO/IncidentUpdateDTO';\r\nimport { IncidentLabelNames, StatusLabelNames } from '../../../DTO/Constants/Object/ConstantsList';\r\nimport { UserDetails, IsUserAdmin } from \"../../../Auth/UserAuth\";\r\nimport { useAuth } from \"oidc-react\";\r\n\r\nimport { v4 as uuidv4 } from 'uuid';\r\n\r\nimport { GetEnvironmentConfig } from \"../../../App.Config\";\r\n\r\nexport const IncidentForm = (props: IncidentDTO):JSX.Element => {\r\n // isLoaded is set to true whenever all API calls have finished. On state change page is refreshed loading all the new information.\r\n const isAllLoaded = useRef([false, false, false]);\r\n const [isLoaded, setIsLoaded] = useState(false);\r\n\r\n \r\n \r\n // Objects holding the products (HeavyJob Web, etc...), incidents status (investigating, identified, resolved)\r\n // and status labels (Good, warning, critical, information)\r\n const [productSelection, setProductSelection] = useState([]);\r\n const [incidentSelection, setIncidentSelection] = useState([]);\r\n const [statusSelection, setStatusSelection] = useState([]);\r\n \r\n // Id specifies if the incident form is edit or add. If id === undefined, then it is Add Incident because and incident Id\r\n // does not exist. Id comes from url-parameter.\r\n const { id } = useParams<{id: string}>();\r\n const [incident, setIncident] = useState(null);\r\n const [incidentStatusInput, setIncidentStatusInput] = useState<{label: string, value: string}>();\r\n const [isLocalTime, setIsLocalTime] = useState([false, false, false]);\r\n const [isResolved, setIsResolved] = useState(false);\r\n\r\n const pageHistory = useHistory();\r\n const isUserAdmin = useRef(IsUserAdmin());\r\n\r\n interface DetailedIncidentUpdateInterface {\r\n id: string;\r\n details: string;\r\n time: Date;\r\n isAdded: boolean;\r\n }\r\n\r\n const user = UserDetails();\r\n const auth = useAuth();\r\n\r\n /* isProductSelected is a two-dimension array containing an array of product objects. The product objects contain the attributes\r\n {name: (product's name), status: (product's status label), isSelected: (does the product belong to the incident)}.\r\n The logic is, isProductSelected is a two-dimensional array, isProductSelected[firstIndex] is a product group (HeavyJob) and\r\n isProductSelected[firstIndex][secondIndex] is a product inside a product group (Heavy Job - Web). This structure helps to access\r\n any product object by using a map function, by first mapping isProductSelected to iterate through the firstIndex and nesting\r\n another map inside a individual productGroup through using the secondIndex. \r\n \r\n Visual:\r\n isProductSelected:\r\n [\r\n HeavyBid:\r\n [{name: HeavyBid Desktop, status: '', isSelected: false}, {name: HeavyBid PreConstruction, status: 'Warning', isSelected: true}, etc...]\r\n\r\n HeavyJob:\r\n [{name: HeavyJob Desktop, status: '', isSelected: false}, {name: HeavyJob Web, status: '', isSelected: false}, etc...]\r\n \r\n etc... (For every ProductGroup containing a list of products)\r\n ]\r\n */\r\n interface ProductSelectedInterface {\r\n name: string,\r\n status: string,\r\n isSelected: boolean\r\n }\r\n const [isProductSelected, setIsProductSelected] = useState([]);\r\n const [isProductGroupSelected, setIsProductGroupSelected] = useState([]);\r\n const [isAllSelected, setIsAllSelected] = useState(false);\r\n\r\n const [isProductGroupsHidden, setIsProductGroupsHidden] = useState(false);\r\n const handleProductGroupsDisplay = () => {\r\n setIsProductGroupsHidden(previous => !previous);\r\n }\r\n const [isProductGroupHidden, setIsProductGroupHidden] = useState([])\r\n const isAdmin = IsUserAdmin();\r\n\r\n const LoadIncidentFormInformation = (isMounted: boolean, isEditIncident: boolean) => {\r\n async function EditIncident() {\r\n const isProductSelectedMap = new Map();\r\n await getIncidentAsync(id).then(resolution => {\r\n if(isMounted) {\r\n setIncident(resolution.data);\r\n setIncidentStatusInput({label: resolution.data.incidentStatus.name, value: resolution.data.incidentStatus.name});\r\n\r\n const incidentUpdateTemp: DetailedIncidentUpdateInterface[] = resolution.data.incidentUpdates.map((incident: IncidentUpdateDTO) => {\r\n const updateTime = new Date(incident.time);\r\n updateTime.setMinutes(updateTime.getMinutes() - new Date().getTimezoneOffset());\r\n return {id: incident.id, details: incident.details, time: updateTime};\r\n });\r\n setDetailedIncidentUpdate([...incidentUpdateTemp]);\r\n\r\n resolution.data.products.map((product: ProductDTO) => {\r\n isProductSelectedMap.set(product.name, {name: product.name, status: product.statusLabel.name, isSelected: true});\r\n originalProducts.current.push({id: product.id, name: product.name, statusLabel: {id: product.statusLabel.id}});\r\n });\r\n }\r\n });\r\n\r\n await getProductGroupAsync().then(resolution => {\r\n if(isMounted) {\r\n setProductSelection([...resolution.data]);\r\n let isAllProductsSelected: boolean = true;\r\n resolution.data.filter((incident: IncidentDTO) => {\r\n if(isAdmin) {\r\n return true;\r\n }\r\n else {\r\n return !incident.isTestingIncident;\r\n }\r\n })\r\n .map((productGroup: ProductGroupDTO) => {\r\n let isProductGroupSelectedTemp: boolean = true;\r\n let isSingleProductSelected: boolean = false;\r\n const tempProductGroup: ProductSelectedInterface[] = productGroup.products.map((product: ProductDTO) => {\r\n const returnProduct: ProductSelectedInterface | undefined = isProductSelectedMap.get(product.name);\r\n if(returnProduct && returnProduct.name && returnProduct.status) {\r\n isSingleProductSelected = true;\r\n return {name: returnProduct.name, status: returnProduct.status, isSelected: true};\r\n } \r\n else {\r\n isAllProductsSelected = false;\r\n isProductGroupSelectedTemp = false;\r\n return {name: product.name, status: '', isSelected: false};\r\n }\r\n });\r\n\r\n setIsProductSelected((previous) => {\r\n return [...previous, tempProductGroup];\r\n });\r\n setIsProductGroupSelected((previous) => {\r\n return [...previous, isProductGroupSelectedTemp];\r\n });\r\n\r\n setIsProductGroupHidden((previous) => {\r\n return [...previous, !isSingleProductSelected];\r\n });\r\n });\r\n setIsAllSelected(isAllProductsSelected);\r\n }\r\n });\r\n isAllLoaded.current[0] = true;\r\n setIsLoaded(ReturnIsAllLoaded(isAllLoaded.current));\r\n }\r\n\r\n async function AddIncident() {\r\n await getProductGroupAsync().then(resolution => {\r\n if(isMounted) {\r\n setProductSelection([...resolution.data]);\r\n resolution.data.map((productGroup: ProductGroupDTO) => {\r\n setIsProductGroupHidden(previous => {\r\n return [...previous, true];\r\n });\r\n \r\n setIsProductSelected((previous) => {\r\n return [...previous, [...productGroup.products.map((product: ProductDTO) => {\r\n return ({name: product.name, status: '', isSelected: false});\r\n })]];\r\n });\r\n\r\n setIsProductGroupSelected((previous) => {\r\n return [...previous, false];\r\n });\r\n });\r\n }\r\n });\r\n isAllLoaded.current[0] = true;\r\n setIsLoaded(ReturnIsAllLoaded(isAllLoaded.current));\r\n }\r\n\r\n isEditIncident ? EditIncident() : AddIncident();\r\n \r\n async function getIncidentStatus() {\r\n await getIncidentStatusAsync().then(resolution => {\r\n if(isMounted) {\r\n setIncidentSelection([...resolution.data]);\r\n }\r\n });\r\n isAllLoaded.current[1] = true;\r\n setIsLoaded(ReturnIsAllLoaded(isAllLoaded.current));\r\n }\r\n getIncidentStatus();\r\n\r\n async function getStatusIcons() {\r\n await getStatusIconsAsync().then(resolution => {\r\n if(isMounted) {\r\n setStatusSelection([...resolution.data]);\r\n }\r\n });\r\n isAllLoaded.current[2] = true;\r\n setIsLoaded(ReturnIsAllLoaded(isAllLoaded.current));\r\n }\r\n getStatusIcons();\r\n }\r\n \r\n // originalProducts is compared with updatedProducts on submission of form. If a product inside originalProducts\r\n // is not inside updatedProducts, it sets the product's isDeleted flag to true, removing the product from the incident\r\n const originalProducts = useRef<{id: string, name: string, statusLabel: {id: string}}[]>([]);\r\n useEffect(() => {\r\n let isMounted = true;\r\n \r\n if(id !== undefined) {\r\n LoadIncidentFormInformation(isMounted, true);\r\n }\r\n else {\r\n setIsLocalTime([true, true, true]);\r\n LoadIncidentFormInformation(isMounted, false);\r\n }\r\n\r\n return () => {isMounted = false};\r\n }, []);\r\n\r\n const handleIncidentStatus = (selectedOption: any) => {\r\n setIncidentStatusInput(selectedOption);\r\n }\r\n\r\n const handleDetailedIncidentUpdate = (incidentUpdateString: string) => {\r\n if(incidentUpdateString !== null) {\r\n (document.getElementById('detailedIncidentUpdate') as HTMLInputElement)!.value = '';\r\n if(incidentUpdateString.trim()) {\r\n setDetailedIncidentUpdate((previous) => {\r\n return [...detailedIncidentUpdate, {id: uuidv4(), details: incidentUpdateString, time: new Date(), isAdded: true}];\r\n });\r\n }\r\n }\r\n }\r\n\r\n const validateHandler = (values: any):Partial => {\r\n interface Error {\r\n [key: string]: any\r\n }\r\n const errors: Partial = {};\r\n\r\n let atleastOneProduct: boolean = false;\r\n const productsWithoutStatus: string[] = [];\r\n isProductSelected.map((productGroup: ProductSelectedInterface[], firstIndex: number) => {\r\n productGroup.map((product: ProductSelectedInterface, secondIndex: number) => {\r\n if(product.isSelected) {\r\n atleastOneProduct = true;\r\n }\r\n if(product.isSelected && !product.status) {\r\n productsWithoutStatus.push(product.name);\r\n }\r\n });\r\n });\r\n if(!atleastOneProduct && incidentStatusInput?.label !== IncidentLabelNames.resolvedString) {\r\n errors.productsSelected = \"Product(s) must be selected.\";\r\n }\r\n\r\n if(!values.title) {\r\n errors.title = 'Enter a Title for the incident.';\r\n } else if (!values.title.trim()) {\r\n errors.title = 'Enter a Title for the incident.';\r\n }\r\n\r\n if(!values.incidentStatus) {\r\n errors.incidentStatus = 'Indicate the Incident Status.';\r\n }\r\n\r\n if (productsWithoutStatus.length) {\r\n errors.productStatus = `Select status for Product(s): ${productsWithoutStatus.join(', ')}`;\r\n }\r\n\r\n if(!values.incidentDescription) {\r\n errors.incidentDescription = 'Enter a Description for the incident.';\r\n } else if (!values.incidentDescription.trim()) {\r\n errors.incidentDescription = 'Enter a Description for the incident.';\r\n }\r\n\r\n if(!values.startTime) {\r\n errors.startTime = 'Enter the Start Time of the incident.';\r\n }\r\n\r\n if(values.startTime && values.resolveTime) {\r\n const resolveTime = new Date(values.resolveTime);\r\n resolveTime.setMinutes(resolveTime.getMinutes() + new Date().getTimezoneOffset());\r\n\r\n if(new Date(resolveTime).getTime() < new Date(values.startTime).getTime()) {\r\n errors.resolveTime = 'Incident cannot be Resolve Time cannot be before Start Time.'\r\n }\r\n }\r\n\r\n if(values.startTime && values.expectedResolveTime) {\r\n const expectedResolveTime = new Date(values.expectedResolveTime);\r\n expectedResolveTime.setMinutes(expectedResolveTime.getMinutes() + new Date().getTimezoneOffset());\r\n \r\n if(new Date(expectedResolveTime).getTime() < new Date(values.startTime).getTime()) {\r\n errors.expectedResolveTime = 'Expected Recovery Time cannot be before Start Time.'\r\n }\r\n }\r\n\r\n if(incidentStatusInput?.label === IncidentLabelNames.resolvedString) {\r\n if(!values.resolveTime) {\r\n errors.resolveTime = 'Resolve Time cannot be empty on a \"Resolved\" status.'\r\n }\r\n }\r\n \r\n const missingValues = Object.values(errors);\r\n if(missingValues.length) {\r\n let dangerMessage = <>{missingValues.map((errorMessage: string, index: number) =>
    {errorMessage}
    )};\r\n notify(\"danger\",\"Missing fields\",dangerMessage,3500);\r\n }\r\n return errors;\r\n }\r\n\r\n const onSubmitHandler = async (values: any) => {\r\n const UserObject: {id: string, name: string, email: string, phoneNumber: string, isAdmin: boolean} = {\r\n id: user.userId,\r\n name: user.givenName + ' ' + user.surName,\r\n email: user.email ?? 'No Email',\r\n phoneNumber: '000-000-0000',\r\n isAdmin: isUserAdmin.current\r\n };\r\n\r\n const ProductId = new Map();\r\n productSelection.map((productGroup: ProductGroupDTO) => {\r\n productGroup.products.map((product: ProductDTO) => {\r\n ProductId.set(product.name, product.id);\r\n })\r\n });\r\n\r\n const IncidentId = new Map();\r\n incidentSelection.map((incident: IncidentStatusDTO) => {\r\n IncidentId.set(incident.name, incident.id);\r\n });\r\n \r\n const StatusId = new Map();\r\n statusSelection.map((status: StatusLabelDTO) => {\r\n StatusId.set(status.name, status.id);\r\n });\r\n\r\n const updatedProducts = new Map();\r\n isProductSelected.map((productGroup: ProductSelectedInterface[], firstIndex: number) => {\r\n productGroup.map((product: ProductSelectedInterface, secondIndex: number) => {\r\n if(product.isSelected) {\r\n updatedProducts.set(product.name, {id: ProductId.get(product.name), statusLabel: {id: incidentStatusInput?.label === IncidentLabelNames.resolvedString ? StatusId.get('Good') : StatusId.get(product.status)}, isDeleted: false});\r\n }\r\n });\r\n });\r\n\r\n originalProducts.current.map((originalProduct: {id: string, name: string, statusLabel: {id: string}}) => {\r\n if(updatedProducts.get(originalProduct.name) === undefined) {\r\n updatedProducts.set(originalProduct.name, {id: originalProduct.id, statusLabel: {id: originalProduct.statusLabel.id}, isDeleted: true});\r\n }\r\n });\r\n const finalProducts: {id: string, statusLabel: {id: string}, isDeleted: boolean}[] = Array.from(updatedProducts.values());\r\n\r\n let startTime: Date | null = null;\r\n let resolveTime: Date | null = null;\r\n let expectedResolveTime: Date | null = null;\r\n \r\n // Adding Incident (Time is auto-formatted to String, Localtime)\r\n if(id === undefined) {\r\n if(values.startTime) {\r\n startTime = isLocalToUTCDate(new Date(values.startTime), isLocalTime[0]);\r\n }\r\n if(values.resolveTime) {\r\n resolveTime = isLocalToUTCDate(new Date(values.resolveTime), isLocalTime[1]);\r\n }\r\n if(values.expectedResolveTime) {\r\n expectedResolveTime = isLocalToUTCDate(new Date(values.expectedResolveTime), isLocalTime[2]);\r\n }\r\n }\r\n // Editing Incident (Time is auto-formatted to Date, UTC on default. String, Local on input)\r\n else {\r\n if(values.startTime) {\r\n if(isLocalTime[0]) {\r\n startTime = isLocalToUTCDate(new Date(values.startTime), isLocalTime[0]);\r\n }\r\n else {\r\n startTime = isLocalToUTCDate(values.startTime, isLocalTime[0]);\r\n }\r\n }\r\n if(values.resolveTime) {\r\n if(isLocalTime[1]) {\r\n resolveTime = isLocalToUTCDate(new Date(values.resolveTime), isLocalTime[1]);\r\n }\r\n else {\r\n resolveTime = isLocalToUTCDate(values.resolveTime, isLocalTime[1]);\r\n }\r\n\r\n if(incidentStatusInput?.label !== IncidentLabelNames.resolvedString) {\r\n resolveTime = null;\r\n }\r\n }\r\n if(values.expectedResolveTime) {\r\n if(isLocalTime[2]) {\r\n expectedResolveTime = isLocalToUTCDate(new Date(values.expectedResolveTime), isLocalTime[2]);\r\n }\r\n else {\r\n expectedResolveTime = isLocalToUTCDate(values.expectedResolveTime, isLocalTime[2]);\r\n }\r\n }\r\n }\r\n\r\n const isActiveIncident: boolean = incidentStatusInput?.label === IncidentLabelNames.resolvedString ? false : true\r\n \r\n const incidentDTO = {\r\n id: (id !== undefined ? id : uuidv4()),\r\n title: values.title,\r\n description: values.incidentDescription,\r\n startTime: startTime,\r\n resolveTime: resolveTime,\r\n expectedResolveTime: expectedResolveTime,\r\n isActiveIncident: isActiveIncident,\r\n isDeleted: false,\r\n incidentStatus: {\r\n id: IncidentId.get(incidentStatusInput?.label)\r\n },\r\n products: [...finalProducts],\r\n user: {...UserObject},\r\n incidentUpdates: detailedIncidentUpdate.map((update: DetailedIncidentUpdateInterface) => {\r\n if(update.isAdded) {\r\n const updatedTime = isLocalToUTCDate(update.time, true);\r\n update.time = (updatedTime !== null ? updatedTime : update.time);\r\n }\r\n \r\n return(\r\n {\r\n id: update.id,\r\n details: update.details,\r\n time: update.time,\r\n incidentStatus: {\r\n id: IncidentId.get(incidentStatusInput?.label),\r\n name: incidentStatusInput?.label\r\n },\r\n user: {...UserObject}\r\n }\r\n );\r\n })\r\n }\r\n\r\n if(UserObject.isAdmin) {\r\n if(id !== undefined) {\r\n await putIncidentAsync(incidentDTO);\r\n } \r\n else {\r\n await postIncidentAsync(incidentDTO);\r\n }\r\n }\r\n pageHistory.goBack();\r\n }\r\n\r\n // If id !== undefined, then the form is an Edit Incident.\r\n // Nested-conditionals check if the DOM-object (document.getElementById) has loaded.\r\n // Other conditionals check if the value (incident and incident.startTime or incident.expectedResolveTime) are not null or undefined (typescript)\r\n if(id !== undefined) {\r\n const timeOffset = new Date().getTimezoneOffset();\r\n if(!isLocalTime[0] && document.getElementById(`startTime`) && incident && incident.startTime) {\r\n const startTime = new Date(incident.startTime);\r\n (document.getElementById(`startTime`) as HTMLInputElement)!.value = DisplayDateString(startTime, '', false, false).substring(0,16);\r\n }\r\n if(!isLocalTime[0] && document.getElementById(`resolveTime`) && incident && incident.resolveTime) {\r\n const resolveTime = new Date(incident.resolveTime);\r\n (document.getElementById(`resolveTime`) as HTMLInputElement)!.value = DisplayDateString(resolveTime, '', false, false).substring(0,16);\r\n }\r\n if(!isLocalTime[2] && document.getElementById(`expectedResolveTime`) && incident && incident.expectedResolveTime) {\r\n const expectedResolveTime = new Date(incident.expectedResolveTime);\r\n (document.getElementById(`expectedResolveTime`) as HTMLInputElement)!.value = DisplayDateString(expectedResolveTime, '', false, false).substring(0,16);\r\n }\r\n }\r\n\r\n interface InitialValuesInterface {\r\n productsAffected: ProductDTO[] | null;\r\n title: string | null;\r\n incidentStatus: IncidentStatusDTO | null;\r\n productStatus: ProductDTO[] | null;\r\n incidentDescription: string | null;\r\n detailedIncidentUpdate: IncidentUpdateDTO[] | null;\r\n startTime: Date | null;\r\n resolveTime: Date | null;\r\n expectedResolveTime: Date | null;\r\n }\r\n const initialValues: InitialValuesInterface = {\r\n productsAffected: null,\r\n title: null,\r\n incidentStatus: null,\r\n productStatus: null,\r\n incidentDescription: null,\r\n detailedIncidentUpdate: null,\r\n startTime: null,\r\n resolveTime: null,\r\n expectedResolveTime: null\r\n };\r\n if(incident !== null) {\r\n initialValues.productsAffected = incident.products;\r\n initialValues.title = incident.title;\r\n initialValues.incidentStatus = incident.incidentStatus;\r\n initialValues.productStatus = incident.products;\r\n initialValues.incidentDescription = incident.description;\r\n if(incident.incidentUpdates !== undefined) {\r\n initialValues.detailedIncidentUpdate = incident.incidentUpdates;\r\n }\r\n initialValues.startTime = new Date(incident.startTime);\r\n if(incident.resolveTime !== undefined) {\r\n if(incident.resolveTime !== null) {\r\n initialValues.resolveTime = new Date(incident.resolveTime);\r\n }\r\n }\r\n if(incident.expectedResolveTime !== undefined) {\r\n if(incident.expectedResolveTime !== null) {\r\n initialValues.expectedResolveTime = new Date(incident.expectedResolveTime);\r\n }\r\n }\r\n }\r\n\r\n const handleProductGroupDisplay = (firstIndex: number) => {\r\n setIsProductGroupHidden(previous => {\r\n previous[firstIndex] = !previous[firstIndex];\r\n return [...previous];\r\n })\r\n }\r\n\r\n const handleProductStatus = (event: React.ChangeEvent, firstIndex: number, secondIndex: number) => {\r\n const productStatus: string = event.currentTarget.value;\r\n setIsProductSelected(previous => {\r\n previous[firstIndex][secondIndex].status = productStatus;\r\n return [...previous];\r\n });\r\n }\r\n\r\n const handleProductsAffected = (firstIndex: number, secondIndex: number) => {\r\n const updateStatus = !isProductSelected[firstIndex][secondIndex].isSelected;\r\n if(!updateStatus) {\r\n setIsAllSelected(previous => {\r\n return updateStatus;\r\n });\r\n setIsProductGroupSelected(previous => {\r\n previous[firstIndex] = updateStatus;\r\n return [...previous];\r\n });\r\n }\r\n setIsProductSelected(previous => {\r\n previous[firstIndex][secondIndex].isSelected = updateStatus;\r\n if(!updateStatus) {\r\n previous[firstIndex][secondIndex].status = '';\r\n }\r\n return [...previous];\r\n });\r\n }\r\n const handleProductGroupsAffected = (firstIndex: number) => {\r\n const updateStatus = !isProductGroupSelected[firstIndex];\r\n if(!updateStatus) {\r\n setIsAllSelected(previous => {\r\n return updateStatus;\r\n });\r\n }\r\n setIsProductGroupSelected(previous => {\r\n previous[firstIndex] = updateStatus;\r\n return [...previous];\r\n });\r\n setIsProductSelected(previous => {\r\n previous[firstIndex].map((previousGroup: ProductSelectedInterface, secondIndex: number) => {\r\n previous[firstIndex][secondIndex].isSelected = updateStatus;\r\n })\r\n return [...previous];\r\n });\r\n }\r\n\r\n const handleAllAffected = () => {\r\n const updateStatus = !isAllSelected;\r\n setIsAllSelected(previous => {\r\n return updateStatus\r\n });\r\n setIsProductGroupSelected(previous => {\r\n previous.map((groupStatus: boolean, firstIndex: number) => {\r\n previous[firstIndex] = updateStatus;\r\n });\r\n return [...previous];\r\n });\r\n setIsProductSelected(previous => {\r\n previous.map((productGroup: ProductSelectedInterface[], firstIndex: number) => {\r\n productGroup.map((product: ProductSelectedInterface, secondIndex: number) => {\r\n previous[firstIndex][secondIndex].isSelected = updateStatus;\r\n });\r\n });\r\n return [...previous];\r\n });\r\n }\r\n\r\n const handleAllCheckbox = ():boolean => {\r\n isProductSelected.map((productGroup: ProductSelectedInterface[]) => {\r\n productGroup.map((product: ProductSelectedInterface) => {\r\n if(!product.isSelected) {\r\n return false;\r\n }\r\n })\r\n })\r\n return true;\r\n }\r\n const handleProductGroupCheckbox = (firstIndex: number):boolean => {\r\n if(firstIndex < isProductSelected.length) {\r\n isProductSelected[firstIndex].map((product: ProductSelectedInterface) => {\r\n if(!product.isSelected) {\r\n return false;\r\n }\r\n });\r\n return true;\r\n }\r\n return false;\r\n }\r\n const handleProductCheckbox = (firstIndex: number, secondIndex: number):boolean => {\r\n if(firstIndex < isProductSelected.length) {\r\n if(secondIndex < isProductSelected[firstIndex].length) {\r\n if(isProductSelected[firstIndex][secondIndex].isSelected) {\r\n return true;\r\n }\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n const changeToLocalTime = (index: number) => {\r\n setIsLocalTime(previous => {\r\n previous[index] = true;\r\n return [...previous];\r\n });\r\n }\r\n\r\n // Maps the objects inside productSelection into an array of JSX.Element.\r\n const productsDisplay: JSX.Element[] = productSelection.map((productGroup: ProductGroupDTO, firstIndex: number) => {\r\n return(\r\n
    \r\n handleProductGroupDisplay(firstIndex)} margin='both'>\r\n handleProductGroupsAffected(firstIndex)} checked={firstIndex < isProductGroupSelected.length ? isProductGroupSelected[firstIndex] : false}>\r\n {productGroup.name}\r\n
    \r\n {productGroup.products.map((product: ProductDTO, secondIndex: number) => {\r\n return(\r\n
    \r\n handleProductsAffected(firstIndex, secondIndex)} checked={handleProductCheckbox(firstIndex, secondIndex)}>{product.name}\r\n
    \r\n );\r\n })}\r\n
    \r\n
    \r\n );\r\n });\r\n\r\n const statusTableDisplay: JSX.Element[] = statusSelection.map((status: StatusLabelDTO, index: number) => {\r\n return(\r\n \r\n
    \r\n {status.name}\r\n \r\n
    \r\n \r\n );\r\n });\r\n\r\n let statusCheckboxDisplay: JSX.Element[] = [];\r\n isProductSelected.map((productGroup: ProductSelectedInterface[], firstIndex: number) => {\r\n productGroup.map((product: ProductSelectedInterface, secondIndex: number) => {\r\n statusCheckboxDisplay.push(\r\n \r\n
    {product.name}
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n })\r\n });\r\n\r\n const incidentStatusDisplay: {label: string, value: string}[] = incidentSelection.map((incident: IncidentStatusDTO) => {\r\n return({label: incident.name, value: incident.name});\r\n })\r\n\r\n const [detailedIncidentUpdate, setDetailedIncidentUpdate] = useState([]);\r\n const IncidentTable = ():JSX.Element => {\r\n return(\r\n \r\n \r\n \r\n \r\n \r\n \r\n {detailedIncidentUpdate.map((tableRow: DetailedIncidentUpdateInterface, index: number) => {\r\n return(\r\n \r\n \r\n \r\n );\r\n })}\r\n \r\n
    Detailed Incident UpdateTime
    {tableRow.details}{DisplayDateString(tableRow.time, 'LLL', true, true)}
    \r\n );\r\n }\r\n const [isDisplayProductSelection, setIsDisplayProductSelection] = useState(false);\r\n return(\r\n \r\n \r\n {id !== undefined ? 'Edit Incident' : 'Add Incident'}\r\n \r\n {(props:any) => (\r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n {props.errors.title ?
    {props.errors.title}
    : null}\r\n
    \r\n\r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
      \r\n
    • Investigating - Incident is currently being investigated.
    • \r\n
    • Identified - Incident has been found.
    • \r\n
    • Resolved - Incident is resolved and any impact to customers is eliminated or significantly minimized.
    • \r\n
    \r\n
    \r\n
    \r\n \r\n {props.errors.incidentStatus ?
    {props.errors.incidentStatus}
    : null}\r\n
    \r\n\r\n
    \r\n \r\n setIsDisplayProductSelection(false)} show={isDisplayProductSelection} bsSize={'large'} style={{maxHeight: '95vh'}}>\r\n \r\n Select Products Affected\r\n \r\n \r\n
    \r\n \r\n
    \r\n handleProductGroupsDisplay()}>\r\n handleAllAffected()} checked={isAllSelected}>\r\n Select All\r\n
    \r\n
    \r\n {productsDisplay}\r\n
    \r\n
    \r\n
    \r\n \r\n \r\n \r\n
    \r\n {props.errors.productsSelected ?
    {props.errors.productsSelected}
    : null}\r\n
    \r\n\r\n
    \r\n \r\n \r\n \r\n \r\n {statusTableDisplay}\r\n \r\n {statusCheckboxDisplay}\r\n \r\n
    \r\n
    \r\n
    \r\n {props.errors.productStatus ?
    {props.errors.productStatus}
    : null}\r\n
    \r\n\r\n
    \r\n
    \r\n \r\n {props.errors.incidentDescription ?
    {props.errors.incidentDescription}
    : null}\r\n
    \r\n\r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n\r\n
    \r\n
    \r\n
    \r\n {changeToLocalTime(0); return props.setFieldValue('startTime', selectedOption.target.value)}}>\r\n {props.errors.startTime ?
    {props.errors.startTime}
    : null}\r\n
    \r\n
    \r\n
    \r\n {changeToLocalTime(1); return props.setFieldValue('resolveTime', selectedOption.target.value)}}>\r\n {props.errors.resolveTime ?
    {props.errors.resolveTime}
    : null}\r\n
    \r\n
    \r\n\r\n
    \r\n
    \r\n
    \r\n \r\n \r\n

    Estimate and Subject to Change.

    \r\n
    \r\n
    \r\n
    \r\n {changeToLocalTime(2); return props.setFieldValue('expectedResolveTime', selectedOption.target.value)}}>\r\n {props.errors.expectedResolveTime ?
    {props.errors.expectedResolveTime}
    : null}\r\n
    \r\n
    \r\n
    \r\n\r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n )}\r\n \r\n
    \r\n
    \r\n);\r\n}","import '../IncidentHistory.css';\r\nimport React, { useState } from 'react';\r\nimport { IncidentDTO } from '../../../DTO/IncidentDTO';\r\nimport { ProductDTO } from '../../../DTO/ProductDTO';\r\nimport { IncidentUpdateDTO } from '../../../DTO/IncidentUpdateDTO';\r\nimport { DisplayDateString } from '../../../DTO/Constants/Function/DateConversion';\r\nimport { Icon } from \"hcss-components\";\r\nimport { Link } from \"react-router-dom\";\r\nimport { getIncidentAsync } from \"../../../API/getAPI\";\r\n\r\nimport { IsUserAdmin } from '../../../Auth/UserAuth';\r\n\r\nexport const NotActiveIncident = (props: IncidentDTO):JSX.Element => {\r\n const [isMounted, setIsMounted] = useState(false);\r\n const [formProperties, setFormProperties] = useState();\r\n const productsAffectedDisplay: string = props.products.map((product: ProductDTO, index: number) => {\r\n return product.name;\r\n }).join(', ');\r\n\r\n const handleClick = () => {\r\n setIsMounted(true);\r\n async function getIncident() {\r\n await getIncidentAsync(props.id).then(resolution => {\r\n if(isMounted) {\r\n setFormProperties(resolution.data);\r\n }\r\n });\r\n }\r\n getIncident();\r\n }\r\n\r\n let statusUpdatesDisplay: JSX.Element[] = [];\r\n if(props.incidentUpdates) {\r\n statusUpdatesDisplay = props.incidentUpdates.map((incident: IncidentUpdateDTO, index: number) => {\r\n const updateTime: string = DisplayDateString(new Date(incident.time), 'LLL', false, true);\r\n return(\r\n
  • {updateTime} - {incident.details}
  • \r\n );\r\n })\r\n }\r\n\r\n const renderEditIncidentButton = () => {\r\n if (IsUserAdmin()) {\r\n return(\r\n
    \r\n Edit Incident\r\n \r\n \r\n
    \r\n );\r\n }\r\n }\r\n\r\n const startTime: string = DisplayDateString(new Date(props.startTime), 'LLL', false, true);\r\n let resolveTime: string = '--';\r\n if(props.resolveTime) {\r\n resolveTime = DisplayDateString(new Date(props.resolveTime), 'LLL', false, true);\r\n }\r\n\r\n return(\r\n
    \r\n
    {props.title}
    \r\n
    {props.description}
    \r\n
    Products Affected: {productsAffectedDisplay}
    \r\n
    Start Date Time: {startTime}
    \r\n
    Resolved Date Time: {resolveTime}
    \r\n
    \r\n Status Updates:\r\n
      \r\n {statusUpdatesDisplay}\r\n
    \r\n
    \r\n {renderEditIncidentButton()}\r\n
    \r\n );\r\n}","import './IncidentHistory.css';\r\nimport React, { useState, useEffect, useRef } from 'react';\r\nimport { Formik, Form, ErrorMessage } from 'formik';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { Modal, Button, PageHeader, SubTitle, Icon, Select, LoadingContainer, notify } from 'hcss-components';\r\nimport ReactTooltip from 'react-tooltip';\r\nimport { NotActiveIncident } from './Components/NotActiveIncident';\r\nimport { getIncidentsAsync } from '../../API/getAPI';\r\nimport { IsUserAdmin } from '../../Auth/UserAuth';\r\n\r\nimport { IncidentDTO } from '../../DTO/IncidentDTO';\r\nimport { DisplayDateString } from '../../DTO/Constants/Function/DateConversion';\r\nimport { ReturnIsAllLoaded } from '../../DTO/Constants/Function/ReturnIsAllLoaded';\r\n\r\nimport { GetEnvironmentConfig } from \"../../App.Config\";\r\nimport { HubConnection, HubConnectionBuilder } from '@microsoft/signalr';\r\n\r\nconst ReturnDateRange = (decrement: number) => {\r\n const startDate: Date = new Date();\r\n startDate.setHours(0,0,0,0);\r\n startDate.setDate(startDate.getDate() - decrement);\r\n\r\n const endDate: Date = new Date();\r\n endDate.setHours(23,59,59,999);\r\n \r\n return {startDate, endDate};\r\n}\r\n\r\nconst DateRange = {\r\n Last7Days: {name: \"Last 7 Days\", decrement: 6},\r\n Last30Days: {name: \"Last 30 Days\", decrement: 29},\r\n AllIncidents: {name: \"All\", decrement: 0},\r\n Custom: {name: \"Custom\", decrement: 0}\r\n};\r\n\r\nexport const IncidentHistory = ():JSX.Element => {\r\n // isLoaded is set to true whenever all API calls have finished. On state change page is refreshed loading all the new information.\r\n const isAllLoaded = useRef([false]);\r\n const [isLoaded, setIsLoaded] = useState(false);\r\n\r\n const selectOptions = new Map();\r\n for(const [selectOption, value] of Object.entries(DateRange)) {\r\n selectOptions.set(value.name, {name: value.name, decrement: value.decrement});\r\n };\r\n\r\n const [incidentsHistory, setIncidentsHistory] = useState([]);\r\n\r\n const [incidentHistoryLength, setIncidentHistoryLength] = useState(0);\r\n // startIndex and endIndex are the respective stard and end indexes for the incidentsHistory list.\r\n const [startIndex, setStartIndex] = useState(0);\r\n const [endIndex, setEndIndex] = useState(9);\r\n\r\n const [startDate, setStartDate] = useState(null);\r\n const [endDate, setEndDate] = useState(null);\r\n\r\n // filterPlaceholder is the text that is displayed inside the selection dropdown.\r\n const [filterPlaceholder, setFilterPlaceholder] = useState(DateRange.AllIncidents.name);\r\n const [isFilterDisplayed, setIsFilterDisplayed] = useState(false);\r\n const [isCustomSelected, setIsCustomSelected] = useState(false); \r\n\r\n const [connection, setConnection] = useState(null);\r\n\r\n const LoadIncidentHistory = (isMounted: boolean, startDate: Date | null, endDate: Date | null) => {\r\n async function getIncidentsHistory() {\r\n await getIncidentsAsync(true, 'inactive', startDate, endDate).then(resolution => {\r\n if(isMounted) {\r\n setIncidentHistoryLength(Math.ceil(resolution.data.length/10)*10);\r\n setIncidentsHistory([...resolution.data]);\r\n }\r\n if(resolution.data.length && (startDate == null && endDate == null)) {\r\n const tempStartDate = new Date(resolution.data[0].startTime);\r\n tempStartDate.setHours(0,0,0,0);\r\n \r\n const tempEndDate = new Date(resolution.data[resolution.data.length - 1].startTime);\r\n tempEndDate.setHours(23,59,59,999);\r\n\r\n setStartDate(tempStartDate);\r\n setEndDate(tempEndDate);\r\n }\r\n });\r\n isAllLoaded.current[0] = true;\r\n setIsLoaded(ReturnIsAllLoaded(isAllLoaded.current));\r\n }\r\n\r\n getIncidentsHistory();\r\n }\r\n\r\n useEffect(() => {\r\n let isMounted = true;\r\n\r\n let endpoint = GetEnvironmentConfig().endpoints.status_api;\r\n const connect = new HubConnectionBuilder()\r\n .withUrl(`${endpoint}/hubs/database`)\r\n .withAutomaticReconnect()\r\n .build();\r\n\r\n setConnection(connect);\r\n LoadIncidentHistory(isMounted, startDate, endDate);\r\n\r\n return () => {isMounted = false};\r\n }, []);\r\n\r\n useEffect(() => {\r\n let isMounted = true;\r\n if(connection) {\r\n connection.start().then(() => {\r\n connection.on(\"Update\", () => {\r\n LoadIncidentHistory(isMounted, startDate, endDate);\r\n });\r\n })\r\n .catch((error) => console.log(\"Connection Failed: \", error));\r\n }\r\n\r\n return () => {isMounted = false};\r\n }, [connection]);\r\n\r\n // Form's error-checking. If the returned 'errors' object contains a value, the form will not submit.\r\n const validateHandler = (values: any):Partial => {\r\n interface Error {\r\n [key: string]: any\r\n }\r\n const errors: Partial = {};\r\n if(isCustomSelected) {\r\n if(!startDate) {\r\n errors.startDate = 'Enter a Start Date.'\r\n }\r\n\r\n if(!endDate) {\r\n errors.endDate = 'Enter a End Date.'\r\n }\r\n\r\n if(startDate && endDate) {\r\n if(startDate > endDate) {\r\n errors.endDate = 'End Date cannot come before Start Date.'\r\n }\r\n }\r\n }\r\n \r\n const missingValues = Object.values(errors);\r\n if(missingValues.length) {\r\n let dangerMessage = <>{missingValues.map((errorMessage, index) =>
    {errorMessage}
    )};\r\n notify(\"danger\",\"Missing fields\",dangerMessage,3500);\r\n }\r\n return errors;\r\n }\r\n\r\n // Start and Resolve inputs are sent to the API. Incidents whose Resolved Date Time are in the range are returned.\r\n const onSubmitHandler = (values: any) => {\r\n const isAllIncidentsSelected: boolean = (filterPlaceholder === DateRange.AllIncidents.name ? true : false);\r\n if(isAllIncidentsSelected) {\r\n LoadIncidentHistory(true, null, null)\r\n }\r\n else {\r\n LoadIncidentHistory(true, startDate, endDate);\r\n }\r\n }\r\n\r\n const HandleDateRange = (input: any) => {\r\n input.persist();\r\n\r\n const inputValue = input.target.value;\r\n const selectedOption = selectOptions.get(inputValue);\r\n if(selectedOption) {\r\n if(selectedOption.name === DateRange.Custom.name) {\r\n setIsCustomSelected(true);\r\n }\r\n else if(selectedOption.name === DateRange.AllIncidents.name) {\r\n setIsCustomSelected(false);\r\n }\r\n else {\r\n setIsCustomSelected(false);\r\n const startDate = ReturnDateRange(selectedOption.decrement).startDate;\r\n const endDate = ReturnDateRange(selectedOption.decrement).endDate;\r\n setStartDate(startDate);\r\n setEndDate(endDate);\r\n }\r\n }\r\n setFilterPlaceholder(inputValue);\r\n }\r\n\r\n interface InitialValuesInterface {\r\n startDate: Date | null;\r\n endDate: Date | null;\r\n }\r\n const initialValues: InitialValuesInterface = {\r\n startDate: null,\r\n endDate: null\r\n };\r\n\r\n const HandleCustomDate = (inputDate: Date, isStart: boolean) => {\r\n inputDate.setDate(inputDate.getDate() + 1);\r\n if(isStart) {\r\n inputDate.setHours(0,0,0,0);\r\n setStartDate(inputDate);\r\n }\r\n else {\r\n inputDate.setHours(23,59,59,999);\r\n setEndDate(inputDate);\r\n }\r\n };\r\n\r\n const HandlePreviousIndex = () => {\r\n setStartIndex(previous => {\r\n setEndIndex(previous - 1);\r\n return previous - 10;\r\n })\r\n };\r\n\r\n const HandleAfterIndex = () => {\r\n setEndIndex(previous => {\r\n setStartIndex(previous + 1);\r\n return previous + 10;\r\n })\r\n };\r\n\r\n const HandlePageSelector = (index: number) => {\r\n setStartIndex(index);\r\n setEndIndex(index + 9);\r\n }\r\n\r\n const incidentsHistoryDate: Map = new Map();\r\n const isAdmin = IsUserAdmin();\r\n incidentsHistory.filter((incident: IncidentDTO) => {\r\n if(isAdmin) {\r\n return true;\r\n }\r\n else {\r\n return !incident.isTestingIncident;\r\n }\r\n })\r\n .map((incident: IncidentDTO, index: number) => {\r\n if(index >= startIndex && index <= endIndex)\r\n {\r\n const dateString = DisplayDateString(new Date(incident.startTime), 'MMMM YYYY', true, false);\r\n const tempIncidentHistoryDate: JSX.Element[] | undefined = incidentsHistoryDate.get(dateString);\r\n if(tempIncidentHistoryDate !== undefined) {\r\n incidentsHistoryDate.set(dateString, [...tempIncidentHistoryDate, ]);\r\n }\r\n else {\r\n incidentsHistoryDate.set(dateString, []);\r\n }\r\n }\r\n });\r\n\r\n const incidentHistoryDisplay: JSX.Element[] = [];\r\n incidentsHistoryDate.forEach((value: JSX.Element[], key: string) => {\r\n incidentHistoryDisplay.push(\r\n
    \r\n
    {key}
    \r\n
    {value}
    \r\n
    \r\n );\r\n });\r\n\r\n const pageSelectionDisplay: JSX.Element[] = [];\r\n for(let i=0; i HandlePageSelector(i)}>{pageSelectionDisplay.length + 1}\r\n );\r\n };\r\n\r\n const selectOptionsDisplay: JSX.Element[] = [];\r\n selectOptions.forEach((option) => {\r\n selectOptionsDisplay.push()\r\n });\r\n\r\n return(\r\n \r\n \r\n Incident History\r\n
    \r\n \r\n
    \r\n setIsFilterDisplayed(false)} show={isFilterDisplayed} style={{maxHeight: '95vh'}}>\r\n \r\n Filter\r\n \r\n \r\n \r\n {(props:any) => (\r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    \r\n \r\n HandleCustomDate(new Date(selectedOption.target.value), true)} >\r\n {props.errors.startDate ?
    {props.errors.startDate}
    : null}\r\n \r\n
     - 
    \r\n \r\n \r\n HandleCustomDate(new Date(selectedOption.target.value), false)}>\r\n {props.errors.endDate ?
    {props.errors.endDate}
    : null}\r\n
    \r\n
    \r\n
    \r\n
    Filter is applied against the Start Date and Time of an incident.
    \r\n \r\n
    \r\n
    \r\n )}\r\n \r\n
    \r\n \r\n
    \r\n
    \r\n {incidentHistoryDisplay}\r\n
    \r\n
    \r\n
    \r\n {pageSelectionDisplay}\r\n
    \r\n
    \r\n
    HandlePreviousIndex()} className='selection-icon'>
    \r\n
    = incidentsHistory.length ? 'none' : 'block'}} onClick={() => HandleAfterIndex()} className='selection-icon'>
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n );\r\n}","import React from 'react';\r\nimport { Redirect, Route, RouteProps } from \"react-router\";\r\nimport { IsUserAdmin } from \"../../Auth/UserAuth\";\r\nimport { useAuth } from \"oidc-react\";\r\n\r\nexport function PrivateRoute(props: RouteProps) {\r\n\r\n const auth = useAuth();\r\n\r\n if (!auth.userData) {\r\n auth.signIn();\r\n return
    ;\r\n }\r\n if (!IsUserAdmin()) {\r\n return ;\r\n }\r\n\r\n return ;\r\n}\r\n","import React from \"react\";\r\nimport { Switch, Route } from \"react-router-dom\";\r\nimport { Dashboard } from \"../Pages/Dashboard/Dashboard\";\r\nimport { IncidentForm } from \"../Pages/Dashboard/Forms/IncidentForm\";\r\nimport { IncidentHistory } from \"../Pages/IncidentHistory/IncidentHistory\";\r\nimport { PrivateRoute } from \"../Components/Common/private-route\";\r\n\r\n/* Routes the React browser. Switch is similar to a Switch-case and 'exact path' checks if the \r\ncurrent path matches the 's path, if so loads the component.\r\n*/\r\n\r\nexport const StatusSiteRoutes = () => {\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n};","import axios from \"axios\";\r\nimport { GetEnvironmentConfig } from '../../App.Config';\r\n\r\nexport const getVersionNumberAsync = async ():Promise => {\r\n let endpoint = GetEnvironmentConfig().endpoints.status_api;\r\n const request = await axios.get(`${endpoint}/api/v1/appinfo`);\r\n return request;\r\n}","import React, { useState, useEffect } from \"react\";\r\nimport { getVersionNumberAsync } from \"../../API/AppVersion/AppVersionAPI\";\r\nimport { Footer } from \"hcss-components\";\r\n\r\nexport const PageFooter = () => {\r\n const [version, setVersion] = useState(\"\");\r\n useEffect(() => {\r\n let isMounted = true;\r\n async function getVersionNumber() {\r\n await getVersionNumberAsync().then(resolution => {\r\n if(isMounted) {\r\n setVersion(resolution.data);\r\n }\r\n });\r\n }\r\n getVersionNumber();\r\n\r\n return () => {isMounted = false};\r\n },[]);\r\n const versionDisplay = `Status Site - ${version}`;\r\n\r\n return(\r\n
    {versionDisplay}
    \r\n );\r\n}","import React from \"react\";\r\nimport \"./App.css\";\r\nimport { Layout } from \"hcss-components\";\r\nimport { StatusNavbar } from \"./Components/Layout/StatusNavbar\";\r\nimport { StatusSidebar } from \"./Components/Layout/StatusSidebar\";\r\nimport { StatusSiteRoutes } from \"./Routes/StatusSiteRoutes\";\r\nimport { AuthProvider } from \"oidc-react\";\r\nimport { GetEnvironmentConfig } from \"./App.Config\";\r\nimport { PageFooter } from \"./Components/Layout/PageFooter\";\r\n\r\n/*\r\nMedia Query: Collapse the side-bar when the screen-width reaches lower widths.\r\n*/\r\nexport const App = (): JSX.Element => {\r\n return (\r\n {window.history.replaceState(undefined, \"home\", \"/\");} } >\r\n \r\n }\r\n sidebar={\r\n \r\n }\r\n mainContent={\r\n
    \r\n \r\n
    \r\n }\r\n footer={\r\n
    \r\n \r\n
    \r\n }\r\n />\r\n
    \r\n );\r\n};\r\n\r\nexport default App;\r\n","import { ReportHandler } from \"web-vitals\";\r\n\r\nconst reportWebVitals = (onPerfEntry?: ReportHandler) => {\r\n if (onPerfEntry && onPerfEntry instanceof Function) {\r\n import(\"web-vitals\").then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {\r\n getCLS(onPerfEntry);\r\n getFID(onPerfEntry);\r\n getFCP(onPerfEntry);\r\n getLCP(onPerfEntry);\r\n getTTFB(onPerfEntry);\r\n });\r\n }\r\n};\r\n\r\nexport default reportWebVitals;\r\n","import React from \"react\";\r\nimport ReactDOM from \"react-dom\";\r\nimport './index.css';\r\nimport App from './App';\r\nimport reportWebVitals from './reportWebVitals';\r\nimport { ThemeProvider, themes, Notification } from 'hcss-components';\r\nimport { BrowserRouter } from \"react-router-dom\";\r\nimport { initializeTelemetry } from \"./telemetry\";\r\n\r\nReactDOM.render(\r\n \r\n \r\n \r\n \r\n \r\n ,\r\n document.getElementById('root')\r\n);\r\n\r\ninitializeTelemetry();\r\n\r\n// If you want to start measuring performance in your app, pass a function\r\n// to log results (for example: reportWebVitals(console.log))\r\n// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals\r\nreportWebVitals();\r\n","import { ApplicationInsights } from '@microsoft/applicationinsights-web';\r\nimport { GetEnvironmentConfig } from \"./App.Config\";\r\n\r\nexport const initializeTelemetry = () => {\r\n const { enabled, appInsightsConnectionString } = GetEnvironmentConfig().telemetry;\r\n\r\n if (!enabled || !appInsightsConnectionString) {\r\n console.info(\"Telemetry is disabled or not properly configured.\");\r\n return;\r\n }\r\n\r\n try {\r\n const appInsights = new ApplicationInsights({\r\n config: {\r\n connectionString: appInsightsConnectionString,\r\n enableAutoRouteTracking: true,\r\n },\r\n });\r\n\r\n appInsights.loadAppInsights();\r\n appInsights.trackPageView();\r\n console.info(\"Telemetry initialized successfully.\");\r\n } catch (error) {\r\n console.error(\"Failed to initialize telemetry:\", error);\r\n }\r\n};"],"sourceRoot":""}