{"version":3,"sources":["theme/theme.module.scss","assets/images/kingspan-logo.svg","components/Header/Header.module.scss","components/Layout/Layout.module.scss","theme/overrides.module.scss","components/Header/Navigation/Navigation.mobile.tsx","components/Header/Navigation/Navigation.tablet.tsx","config/config.ts","authentication/authProvider.ts","authentication/roles.ts","store/user/user.selectors.ts","components/Header/Navigation/Navigation.tsx","components/Header/Header.tsx","components/Layout/Layout.tsx","store/user/user.reducer.ts","store/construction-data/construction-data.action-types.ts","store/construction-data/construction-data.reducer.ts","store/master-data-download/master-data-download.action-types.ts","store/master-data-download/master-data-download.reducer.ts","types/response-code.types.ts","store/master-data-upload/master-data-upload.reducer.ts","store/calculations-export/calculations-export.action-types.ts","store/calculations-export/calculations-export.reducer.ts","store/news-items/news-items.action-types.ts","store/news-items/news-items-reducer.ts","store/reducers.ts","store/master-data-upload/master-data-upload.action-types.ts","store/store.ts","theme/theme.ts","common/countries.ts","components/CountrySelection/CountrySelection.tsx","components/ConstructionTypeSelection/ConstructionTypeSelection.tsx","store/master-data-download/master-data-download.selectors.ts","store/master-data-download/master-data-download.actions.ts","store/construction-data/construction-data.selectors.ts","store/construction-data/construction-data.action-creators.ts","store/construction-data/construction-data.actions.ts","store/master-data-download/master-data-download.action-creators.ts","components/MasterData/MasterDataDownloadAll.tsx","components/MasterData/MasterDataDownload.tsx","store/master-data-upload/master-data-upload.actions.ts","store/master-data-upload/master-data-upload.action-creators.ts","store/master-data-upload/master-data-upload.selectors.ts","types/master-data-upload-response.types.ts","components/MasterData/CommitMessage.tsx","components/MasterData/ValidationMessage.tsx","components/MasterData/ChooseFile.tsx","components/MasterData/MasterDataUpload.tsx","store/calculations-export/calculations-export.actions.ts","store/calculations-export/calculations-export.action-creators.ts","store/calculations-export/calculations-export.selectors.ts","components/CalculationsExport/DatePickers.tsx","components/CalculationsExport/CalculationsExport.tsx","store/news-items/news-items.selectors.ts","store/news-items/news-items.action-creators.ts","store/news-items/news-items.actions.ts","components/NewsItems/CreateNewsItemDialog/CreateNewsItemDialog.tsx","common/uuid.ts","components/NewsItems/SelectCountry/SelectCountry.tsx","components/NewsItems/NewsManagerTable.tsx","components/NewsItems/EditNewsItemDialog/EditNewsItemDialog.tsx","components/NewsItems/ManageAssociationTable/ManageAssociationTable.tsx","components/NewsItems/ManageAssociationTable/use-manage-association.state.ts","components/NewsItems/NewsItems.tsx","components/Countries/EditCountryDialog.tsx","components/Countries/ManageCountriesTable.tsx","components/Countries/CountryList.tsx","components/LandingPage/SiteTabs.tsx","components/LandingPage/LandingPage.tsx","components/App/App.tsx","i18n.ts","index.tsx"],"names":["module","exports","useStyles","makeStyles","theme","createStyles","signedInAvatar","color","palette","getContrastText","deepPurple","backgroundColor","drawerList","minWidth","NavigationMobile","props","isLoggedIn","userName","handleSignInClick","handleSignOutClick","classes","drawerOpen","setDrawerOpen","useState","Box","IconButton","onClick","Drawer","anchor","open","onClose","className","List","dense","ListItem","button","ListItemIcon","ListItemText","primary","ListItemAvatar","Avatar","src","getInitials","secondary","name","signInLinkContainer","marginRight","spacing","signedInWelcome","NavigationTable","Grid","container","alignItems","data-qa-id","style","float","Link","component","variant","appConfig","azureAdConfig","tenantId","clientId","supportedCulturesPerCountry","getAppConfig","authProvider","getAuthProvider","console","log","config","auth","authority","redirectUri","window","location","origin","toString","cache","cacheLocation","storeAuthStateInCookie","options","loginType","LoginType","Redirect","tokenRefreshUri","MsalAuthProvider","scopes","createAuthProvider","AdminRole","countryIdsSelector","state","user","countryIds","hasTechnicalRoleSelector","hasAdminRoleSelector","TECHNICAL","hasMarketingRoleSelector","MARKETING","adminRole","allRoleClaims","some","role","userSelector","Navigation","isMobileView","useMediaQuery","breakpoints","down","useSelector","login","logout","logo","height","Header","justify","styles","header","alt","Layout","children","Container","disableGutters","page","content","initialState","isLoading","error","constructionTypes","SET_ERROR","hasDownloadedSuccessfully","countryId","constructionTypeId","ResponseCode","isLoadingCommit","errorCommit","response","committedSuccessfully","exportRowCount","allowedCultures","newsItemTableScreen","success","newsItemsData","constructionTypeNewsItems","constructionTypeNewsItemsData","reducers","combineReducers","action","type","AuthenticationActions","LoginSuccess","account","payload","idToken","roles","filter","startsWith","map","substring","length","toUpperCase","LogoutSuccess","constructionData","masterDataDownload","masterDataUpload","status","OK","ok","BAD_REQUEST","badRequest","calculationsExport","newsItems","middleware","thunk","store","createStore","composeWithDevTools","applyMiddleware","themeOptions","keys","values","xs","sm","md","lg","xl","direction","mixins","toolbar","minHeight","overrides","common","black","white","main","themeStyles","colorSecondaryGreyDarkest","light","dark","contrastText","colorHighlightGold","colorError","grey","A100","A200","A400","A700","contrastThreshold","tonalOffset","text","colorTextBase","disabled","hint","divider","background","paper","default","colorSecondaryGreyLightest","active","hover","hoverOpacity","selected","disabledBackground","shadows","typography","htmlFontSize","parseInt","fontSizeBase","fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","h1","fontWeight","fontSizeH1","lineHeight","letterSpacing","headerLetterSpacing","h2","fontSizeH2","h3","fontSizeH3","h4","fontSizeH4","h5","fontSizeH5","h6","fontSizeH6","subtitle1","subtitle2","fontSizeSmall","body1","body2","textTransform","caption","overline","shape","borderRadius","transitions","easing","easeInOut","easeOut","easeIn","sharp","duration","shortest","shorter","short","standard","complex","enteringScreen","leavingScreen","zIndex","mobileStepper","speedDial","appBar","drawer","modal","snackbar","tooltip","createMuiTheme","getCountries","async","token","getIdToken","axios","get","headers","rawIdToken","CountrySelection","t","useTranslation","countries","setCountries","useEffect","then","result","data","isEmpty","InputLabel","id","Trans","i18nKey","Select","labelId","displayEmpty","value","selectedCountryId","onChange","handleChange","renderValue","find","c","MenuItem","sort","a","b","localeCompare","key","ConstructionTypeSelection","selectedConstructionTypeId","ct","constructionTypeNameLocalized","countryIdSelector","constructionTypeIdSelector","errorSelector","isLoadingSelector","setConstructionTypeId","constructionTypesSelector","fetchConstructionTypes","dispatch","fetchConstructionTypesSuccess","fetchConstructionTypesFailure","downloadMasterDataTemplate","message","responseType","url","URL","createObjectURL","Blob","link","document","createElement","href","setAttribute","body","appendChild","Cypress","click","parentNode","removeChild","downloadMasterDataTemplateFailure","MasterDataDownloadAll","hasTechnicalRole","isDownloadingAll","setDownloadingAll","downloadAllError","setDownloadAllError","Divider","m","Button","startTimeMs","Date","getTime","durationMs","durationSeconds1dp","Math","round","toast","join","CircularProgress","Alert","severity","MasterDataDownload","useDispatch","mb","event","target","uploadMasterData","file","fileName","commit","formData","FormData","append","post","params","uploadMasterDataSuccess","commitMasterDataFailure","uploadMasterDataBadRequest","errorCode","args","uploadMasterDataFailure","responseSelector","isLoadingCommitSelector","committedSuccessfullySelector","errorCommitSelector","ChangesItem","CommitMessage","changes","countryConstructionTypeMessage","country","countryName","constructionType","renderChanges","item","change","Object","index","count","MATERIALS","MATERIAL_LINKS","AIR_CAVITY_THICKNESSES","useStyle","ValidationMessage","ChooseFile","isSecondary","my","display","accept","MasterDataUpload","setFileName","fileAsBlob","setFileAsBlob","files","setError","formatDate","date","getFullYear","appendLeadingZero","getMonth","getDate","n","exportRowCountSelector","DatePickers","fromDate","toDate","setFromDate","setToDate","utils","DateFnsUtils","disableToolbar","format","margin","label","compareAsc","KeyboardButtonProps","compareDesc","CalculationsExport","hasMarketingRole","hasAccess","from","to","limitReached","exportCalculationsSuccess","exportCalculationsFailure","statusText","exportCalculations","allowedCultureIdsSelector","newsItemTableStateSelector","constructionTypeNewsItemsSelector","urlRegex","RegExp","urlIsBlank","replace","createOrUpdateNewsItem","title","newsItemContents","subject","test","loadNewsItems","getState","requestResult","getNewsItemsFailure","loadConstructionTypeNewsItemsList","getConstructionTypeNewsItemsFailure","createOrUpdateConstructionTypeNewsItem","CreateNewsItemDialog","allowedCultureIds","setTitle","React","setNewsItemContents","cultureId","newsItemContentId","v4","culture","reduce","obj","createNewsItemModel","setRequestResult","onUpdateItem","updatedField","newsItem","prevState","TextField","multiline","e","fullWidth","Dialog","scroll","disableEscapeKeyDown","disableBackdropClick","aria-labelledby","DialogTitle","DialogContent","DialogActions","SelectCountry","handleCountryChange","useCallback","setCountryId","setAllowedCulturesId","tableIcons","Add","forwardRef","ref","Edit","Clear","DetailPanel","ResetSearch","Search","SortArrow","ArrowUpward","ManageNewsTable","tableState","news","flat","icons","columns","field","defaultGroupOrder","grouping","paging","actions","icon","isFreeAction","setShowCreateItemDialog","setEditCreateItemDialog","cancel","flex","alignSelf","justifyContent","formControl","marginBottom","primaryAction","EditNewsItemDialog","selectedNewsItem","setSelectedNewsItem","showDeleteView","setShowDeleteView","onUpdateNewsField","newsItemContentIdx","findIndex","newsItemContent","slice","FormControl","autoWidth","newsItemId","x","onSelectNewsItem","onUpdateNewsTitle","newTitle","DialogContentText","delete","autoFocus","Check","ManageAssociationTable","tableData","tableColumns","allConstructionTypes","newsItemTableState","getAssignedConstructionNewsItems","newsItemTitle","getUnassignedConstructionNewsItems","assignedConstructionTypeIds","includes","getNewsItemLookup","forEach","createTableState","lookupItems","editable","lookup","setTableState","newTableState","useManageAssociationState","onUpdate","newData","Promise","resolve","constructionTypeNewsItem","mt","actionsColumnIndex","onRowUpdate","_","NewsItems","showCreateItemDialog","showEditItemDialog","setShowEditItemDialog","EditCountryDialog","setIsLoading","FormLabel","Typography","gutterBottom","RadioGroup","resultType","setCountryUnderEdit","previousCountry","FormControlLabel","control","Radio","isVisibleToPublic","put","setCountryUpdated","info","catch","ManageCountriesTable","apiErrorMessage","countryRows","setCountryRows","showEditCountryDialog","setShowEditCountryDialog","countryUnderEdit","countryUpdated","render","countryRow","canEdit","_event","search","sorting","draggable","CountryList","TabPanel","other","hidden","p","a11yProps","SiteTabs","setValue","AppBar","position","Tabs","newValue","aria-label","Tab","LandingPage","provider","reduxStore","authenticationState","accountInfo","AuthenticationState","Authenticated","Unauthenticated","InProgress","Loader","App","ThemeProvider","CssBaseline","fallback","exact","path","i18n","use","Backend","LanguageDetector","initReactI18next","init","fallbackLng","debug","interpolation","escapeValue","clientConfig","fetch","json","apiUrl","configData","defaults","baseURL","ReactDOM","getElementById"],"mappings":"sGACAA,EAAOC,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B,MAAOA,IACpB,kBAAC4oB,EAAA,EAAD,MACA,kBAAC,WAAD,CAAUC,SAAU,kBAACJ,GAAD,OAClB,kBAACvhB,GAAD,KACE,kBAAC,IAAD,KACE,kBAAC,IAAD,KACE,kBAAC,IAAD,CAAO4hB,OAAK,EAACC,KAAK,KAChB,kBAACf,GAAD,OAEF,kBAAC,IAAD,CAAU/L,GAAG,QAGjB,kBAAC,IAAD,U,4CCjCZ+M,KAGGC,IAAIC,MAGJD,IAAIE,MAEJF,IAAIG,MAGJC,KAAK,CACJC,YAAa,KACbC,OAAO,EAEPC,cAAe,CACbC,aAAa,KAIJT,GAAf,GCfA,iBACE,IACE,MAAMU,cAA4BC,MAAM,iBAAiBC,QACnD,OAAEC,GAAWH,EACbI,QAAmBH,MAASE,EAAF,gBAC1BtmB,EAAY,UACNumB,EAAWF,UAClBF,GAGL3lB,QAAQC,IAAI,YAAaT,GhEP3BA,EgESeA,EAGbmO,KAAMqY,SAASC,QAAUH,EAEzBI,IAAStD,OAAO,kBAAC+B,GAAD,MAASxT,SAASgV,eAAe,SACjD,MAAOrL,GACP9a,QAAQ2D,MAAM,kCACd3D,QAAQ2D,MAAMmX,IApBlB,K","file":"static/js/main.d27b8316.chunk.js","sourcesContent":["// extracted by mini-css-extract-plugin\nmodule.exports = {\"spacing\":\"8px\",\"maxWidth\":\"1280px\",\"fontSizeBase\":\"1em\",\"fontSizeSmall\":\".875em\",\"fontSizeSmallest\":\".75em\",\"fontSizeH1\":\"2.5em\",\"fontSizeH2\":\"2em\",\"fontSizeH3\":\"1.75em\",\"fontSizeH4\":\"1.5em\",\"fontSizeH5\":\"1.25em\",\"fontSizeH6\":\"1em\",\"headerLetterSpacing\":\"-.05em\",\"fontFamily\":\"\\\"Montserrat\\\",sans-serif\",\"fontWeightLight\":\"300\",\"fontWeightRegular\":\"500\",\"fontWeightMedium\":\"600\",\"fontWeightBold\":\"800\",\"colorPrimaryBlue\":\"#004289\",\"colorBackgroundWhite\":\"#fff\",\"colorSecondaryGreyDarkest\":\"#3c3c3b\",\"colorSecondaryGreyDark\":\"#8c8c8c\",\"colorSecondaryGreyLight\":\"#b3b3b3\",\"colorSecondaryGreyLightest\":\"#e6e6e6\",\"colorHighlightOrange\":\"#f7a42d\",\"colorHighlightBlue\":\"#138dc6\",\"colorHighlightGreen\":\"#0fa042\",\"colorHighlightGold\":\"#c09a5d\",\"colorError\":\"#d63031\",\"colorTextBase\":\"rgba(0,0,0,0.87)\",\"borderRadius\":\"4px\"};","module.exports = __webpack_public_path__ + \"static/media/kingspan-logo.0880b6c7.svg\";","// extracted by mini-css-extract-plugin\nmodule.exports = {\"spacing\":\"8px\",\"maxWidth\":\"1280px\",\"fontSizeBase\":\"1em\",\"fontSizeSmall\":\".875em\",\"fontSizeSmallest\":\".75em\",\"fontSizeH1\":\"2.5em\",\"fontSizeH2\":\"2em\",\"fontSizeH3\":\"1.75em\",\"fontSizeH4\":\"1.5em\",\"fontSizeH5\":\"1.25em\",\"fontSizeH6\":\"1em\",\"headerLetterSpacing\":\"-.05em\",\"fontFamily\":\"\\\"Montserrat\\\",sans-serif\",\"fontWeightLight\":\"300\",\"fontWeightRegular\":\"500\",\"fontWeightMedium\":\"600\",\"fontWeightBold\":\"800\",\"colorPrimaryBlue\":\"#004289\",\"colorBackgroundWhite\":\"#fff\",\"colorSecondaryGreyDarkest\":\"#3c3c3b\",\"colorSecondaryGreyDark\":\"#8c8c8c\",\"colorSecondaryGreyLight\":\"#b3b3b3\",\"colorSecondaryGreyLightest\":\"#e6e6e6\",\"colorHighlightOrange\":\"#f7a42d\",\"colorHighlightBlue\":\"#138dc6\",\"colorHighlightGreen\":\"#0fa042\",\"colorHighlightGold\":\"#c09a5d\",\"colorError\":\"#d63031\",\"colorTextBase\":\"rgba(0,0,0,0.87)\",\"borderRadius\":\"4px\",\"header\":\"Header_header__1v0yI\",\"logo\":\"Header_logo__3T0lc\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"spacing\":\"8px\",\"maxWidth\":\"1280px\",\"fontSizeBase\":\"1em\",\"fontSizeSmall\":\".875em\",\"fontSizeSmallest\":\".75em\",\"fontSizeH1\":\"2.5em\",\"fontSizeH2\":\"2em\",\"fontSizeH3\":\"1.75em\",\"fontSizeH4\":\"1.5em\",\"fontSizeH5\":\"1.25em\",\"fontSizeH6\":\"1em\",\"headerLetterSpacing\":\"-.05em\",\"fontFamily\":\"\\\"Montserrat\\\",sans-serif\",\"fontWeightLight\":\"300\",\"fontWeightRegular\":\"500\",\"fontWeightMedium\":\"600\",\"fontWeightBold\":\"800\",\"colorPrimaryBlue\":\"#004289\",\"colorBackgroundWhite\":\"#fff\",\"colorSecondaryGreyDarkest\":\"#3c3c3b\",\"colorSecondaryGreyDark\":\"#8c8c8c\",\"colorSecondaryGreyLight\":\"#b3b3b3\",\"colorSecondaryGreyLightest\":\"#e6e6e6\",\"colorHighlightOrange\":\"#f7a42d\",\"colorHighlightBlue\":\"#138dc6\",\"colorHighlightGreen\":\"#0fa042\",\"colorHighlightGold\":\"#c09a5d\",\"colorError\":\"#d63031\",\"colorTextBase\":\"rgba(0,0,0,0.87)\",\"borderRadius\":\"4px\",\"page\":\"Layout_page__3uP2v\",\"content\":\"Layout_content__3nMgS\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"spacing\":\"8px\",\"maxWidth\":\"1280px\",\"fontSizeBase\":\"1em\",\"fontSizeSmall\":\".875em\",\"fontSizeSmallest\":\".75em\",\"fontSizeH1\":\"2.5em\",\"fontSizeH2\":\"2em\",\"fontSizeH3\":\"1.75em\",\"fontSizeH4\":\"1.5em\",\"fontSizeH5\":\"1.25em\",\"fontSizeH6\":\"1em\",\"headerLetterSpacing\":\"-.05em\",\"fontFamily\":\"\\\"Montserrat\\\",sans-serif\",\"fontWeightLight\":\"300\",\"fontWeightRegular\":\"500\",\"fontWeightMedium\":\"600\",\"fontWeightBold\":\"800\",\"colorPrimaryBlue\":\"#004289\",\"colorBackgroundWhite\":\"#fff\",\"colorSecondaryGreyDarkest\":\"#3c3c3b\",\"colorSecondaryGreyDark\":\"#8c8c8c\",\"colorSecondaryGreyLight\":\"#b3b3b3\",\"colorSecondaryGreyLightest\":\"#e6e6e6\",\"colorHighlightOrange\":\"#f7a42d\",\"colorHighlightBlue\":\"#138dc6\",\"colorHighlightGreen\":\"#0fa042\",\"colorHighlightGold\":\"#c09a5d\",\"colorError\":\"#d63031\",\"colorTextBase\":\"rgba(0,0,0,0.87)\",\"borderRadius\":\"4px\"};","import React, { useState } from 'react';\nimport { Avatar, Drawer, List, ListItemText,\n ListItem, Box, ListItemIcon, ListItemAvatar,\n IconButton, makeStyles, createStyles, Theme } from '@material-ui/core';\nimport MenuIcon from '@material-ui/icons/Menu';\nimport CloseIcon from '@material-ui/icons/Close';\nimport { deepPurple } from '@material-ui/core/colors';\n\nconst useStyles = makeStyles((theme: Theme) => (\n createStyles({\n signedInAvatar: {\n color: theme.palette.getContrastText(deepPurple[500]),\n backgroundColor: deepPurple[500],\n },\n drawerList: {\n minWidth: 200,\n },\n })\n))\n\n\nexport type NavigationMobileProps = {\n isLoggedIn: boolean;\n userName: string;\n handleSignInClick: () => void;\n handleSignOutClick: () => void;\n};\n\nexport default function NavigationMobile(props: NavigationMobileProps) {\n\n const { isLoggedIn, userName, handleSignInClick, handleSignOutClick } = props;\n\n const classes = useStyles();\n\n const [drawerOpen, setDrawerOpen] = useState(false);\n\n return (\n \n setDrawerOpen(true)}>\n setDrawerOpen(false)}>\n
\n \n setDrawerOpen(false)}>\n \n \n \n {isLoggedIn\n ? \n \n {getInitials(userName)}\n \n \n :\n \n \n \n \n }\n \n
\n
\n
\n );\n}\n\nconst getInitials = (name: string): string => {\n return name[0];\n};\n","import React from 'react';\nimport { Grid, Avatar, Link, makeStyles, createStyles, Theme } from '@material-ui/core';\nimport { deepPurple } from '@material-ui/core/colors';\n\nconst useStyles = makeStyles((theme: Theme) => (\n createStyles({\n signInLinkContainer: {\n marginRight: theme.spacing(2),\n },\n signedInAvatar: {\n color: theme.palette.getContrastText(deepPurple[500]),\n backgroundColor: deepPurple[500],\n },\n signedInWelcome: {\n marginRight: theme.spacing(2),\n },\n })\n))\n\nexport type NavigationTableProps = {\n isLoggedIn: boolean;\n userName: string;\n handleSignInClick: () => void;\n handleSignOutClick: () => void;\n};\n\nexport default function NavigationTable(props: NavigationTableProps) {\n\n const { isLoggedIn, userName, handleSignInClick, handleSignOutClick } = props;\n\n const classes = useStyles();\n\n return isLoggedIn\n ? \n \n
Welcome, {userName}
\n
Sign out
\n
\n \n {getInitials(userName)}\n \n
\n : \n \n Sign In\n \n \n \n \n ;\n}\n\nconst getInitials = (name: string): string => {\n return name[0];\n};\n","import { AppConfig } from '../types/config/configTypes';\n\nlet appConfig: AppConfig = {\n azureAdConfig: {\n tenantId: 'tenantId-not-set',\n clientId: 'clientId-not-set',\n },\n supportedCulturesPerCountry: {\n\n }\n};\n\nexport function setAppConfig(newAppConfig: AppConfig) {\n appConfig = newAppConfig;\n}\n\nexport function getAppConfig() {\n return appConfig;\n}\n","import { MsalAuthProvider, LoginType, IMsalAuthProviderConfig } from 'react-aad-msal';\nimport { Configuration, CacheLocation } from 'msal';\nimport { getAppConfig } from '../config/config';\n\nlet authProvider: MsalAuthProvider | null = null;\n\nconst createAuthProvider = (): MsalAuthProvider => {\n const cacheLocation: CacheLocation = 'localStorage';\n\n const azureAdConfig = getAppConfig().azureAdConfig;\n console.log('azureAdConfig', azureAdConfig);\n\n const config: Configuration = {\n auth: {\n authority: `https://login.microsoftonline.com/${azureAdConfig.tenantId}`,\n clientId: azureAdConfig.clientId,\n redirectUri: window.location.origin.toString() as string,\n },\n cache: {\n cacheLocation: cacheLocation,\n storeAuthStateInCookie: true,\n },\n };\n\n const authenticationParameters = {\n scopes: [\n 'openid',\n ],\n };\n\n const options: IMsalAuthProviderConfig = {\n loginType: LoginType.Redirect,\n tokenRefreshUri: (window.location.origin.toString() + '/auth.html') as string\n };\n\n return new MsalAuthProvider(config, authenticationParameters, options);\n}\n\nexport const getAuthProvider = (): MsalAuthProvider => {\n if (authProvider == null) {\n authProvider = createAuthProvider();\n }\n return authProvider;\n}\n","export enum AdminRole {\n TECHNICAL = 'technical',\n MARKETING = 'marketing',\n}\n","import { StoreModel, UserModel } from '../store.model';\nimport { AdminRole } from '../../authentication/roles';\n\nexport const countryIdsSelector = (state: StoreModel): string[] => state.user.countryIds;\n\nexport const hasTechnicalRoleSelector = (state: StoreModel): boolean => hasAdminRoleSelector(state, AdminRole.TECHNICAL);\n\nexport const hasMarketingRoleSelector = (state: StoreModel): boolean => hasAdminRoleSelector(state, AdminRole.MARKETING);\n\nexport const hasAdminRoleSelector = (state: StoreModel, adminRole: AdminRole): boolean =>\n state.user.allRoleClaims.some((role) => role === adminRole);\n\nexport const userSelector = (state: StoreModel): UserModel => state.user;\n","import React from 'react';\nimport { useMediaQuery, Theme } from '@material-ui/core';\nimport NavigationMobile from './Navigation.mobile';\nimport NavigationTable from './Navigation.tablet';\nimport { getAuthProvider } from '../../../authentication/authProvider';\nimport { useSelector } from 'react-redux';\nimport { userSelector } from '../../../store/user/user.selectors';\n\nexport default function Navigation() {\n\n const isMobileView = useMediaQuery((theme: Theme) => theme.breakpoints.down('xs'));\n\n const user = useSelector(userSelector);\n\n const handleSignInClick = () => {\n getAuthProvider().login();\n };\n\n const handleSignOutClick = () => {\n getAuthProvider().logout();\n };\n\n return isMobileView\n ? \n : \n}\n","import React from 'react';\n\nimport styles from './Header.module.scss';\nimport logo from '../../assets/images/kingspan-logo.svg';\nimport { Grid, makeStyles, createStyles, Theme, useMediaQuery } from '@material-ui/core';\nimport Navigation from './Navigation/Navigation';\n\nconst useStyles = makeStyles((theme: Theme) => (\n createStyles({\n logo: {\n height: 70,\n }\n })\n))\n\nexport function Header() {\n\n const classes = useStyles();\n\n const isMobileView = useMediaQuery((theme: Theme) => theme.breakpoints.down('xs'));\n\n return (\n \n \n \"Logo\"\n \n \n \n \n \n );\n};","import React, { ReactNode } from 'react';\nimport { Container } from '@material-ui/core';\n\nimport { Header } from '../Header/Header';\nimport styles from './Layout.module.scss';\n\ntype Props = {\n children: ReactNode;\n};\n\nexport function Layout({ children }: Props) {\n return (\n \n
\n \n
\n\n
\n {children}\n
\n \n
\n
\n );\n}\n","import { AnyAction } from 'redux';\nimport { UserModel } from '../store.model';\nimport { AuthenticationActions, IAccountInfo } from 'react-aad-msal';\n\nexport const initialState: UserModel = {\n isLoggedIn: false,\n name: '',\n countryIds: [],\n allRoleClaims: [],\n};\n\nexport function userReducer(state: UserModel = initialState, action: AnyAction) {\n switch (action.type) {\n case AuthenticationActions.LoginSuccess:\n const payload = action.payload as IAccountInfo;\n const account = payload.account;\n \n const countryIds = (account.idToken.roles as unknown as string[])\n .filter((role: string) => role.startsWith('country-'))\n .map((role: string) => role.substring('country-'.length).toUpperCase());\n\n return {\n ...state,\n isLoggedIn: true,\n name: account.name,\n countryIds,\n allRoleClaims: account.idToken.roles,\n };\n\n case AuthenticationActions.LogoutSuccess:\n return {\n ...initialState,\n };\n\n default:\n return state;\n }\n};\n","import {\n ConstructionType,\n} from '../../types/domain/construction-data.types';\n\nexport const FETCH_CONSTRUCTION_TYPES_ATTEMPT = '[Construction Data] FETCH_CONSTRUCTION_TYPES_ATTEMPT';\nexport const FETCH_CONSTRUCTION_TYPES_SUCCESS = '[Construction Data] FETCH_CONSTRUCTION_TYPES_SUCCESS';\nexport const FETCH_CONSTRUCTION_TYPES_FAILURE = '[Construction Data] FETCH_CONSTRUCTION_TYPES_FAILURE';\n\nexport interface FetchConstructionTypesAttempt {\n type: typeof FETCH_CONSTRUCTION_TYPES_ATTEMPT;\n}\n\nexport interface FetchConstructionTypesSuccess {\n type: typeof FETCH_CONSTRUCTION_TYPES_SUCCESS;\n payload: ConstructionType[];\n}\n\nexport interface FetchConstructionTypesFailure {\n type: typeof FETCH_CONSTRUCTION_TYPES_FAILURE;\n error: any;\n}\n\nexport type ConstructionDataActionTypes =\n | FetchConstructionTypesAttempt\n | FetchConstructionTypesSuccess\n | FetchConstructionTypesFailure;","import { ConstructionDataModel } from '../store.model';\nimport {\n ConstructionDataActionTypes,\n FETCH_CONSTRUCTION_TYPES_ATTEMPT,\n FETCH_CONSTRUCTION_TYPES_SUCCESS,\n FETCH_CONSTRUCTION_TYPES_FAILURE,\n} from './construction-data.action-types';\n\nexport const initialState: ConstructionDataModel = {\n isLoading: false,\n error: {},\n constructionTypes: [],\n};\n\nexport function constructionDataReducer(state: ConstructionDataModel = initialState, action: ConstructionDataActionTypes): ConstructionDataModel {\n switch (action.type) {\n case FETCH_CONSTRUCTION_TYPES_ATTEMPT:\n return {\n ...state,\n isLoading: true,\n };\n case FETCH_CONSTRUCTION_TYPES_SUCCESS: \n return {\n ...state,\n isLoading: false,\n constructionTypes: action.payload,\n };\n case FETCH_CONSTRUCTION_TYPES_FAILURE: \n return {\n ...state,\n isLoading: false,\n error: action.error,\n };\n default: \n return state;\n }\n};\n","export const SET_COUNTRY_ID = '[Master Data Download] Set Country Id';\nexport const SET_CONSTRUCTION_TYPE_ID = '[Master Data Download] Set Construction Type Id';\nexport const SET_ERROR = '[Master Data Download] Set Error';\n\nexport const DOWNLOAD_MASTER_DATA_TEMPLATE_ATTEMPT = '[Master Data Download] Download Master Data Template Attempt';\nexport const DOWNLOAD_MASTER_DATA_TEMPLATE_SUCCESS = '[Master Data Download] Download Master Data Template Success';\nexport const DOWNLOAD_MASTER_DATA_TEMPLATE_FAILURE = '[Master Data Download] Download Master Data Template Failure';\n\nexport interface SetCountryId {\n type: typeof SET_COUNTRY_ID;\n payload: string;\n}\n\nexport interface SetConstructionTypeId {\n type: typeof SET_CONSTRUCTION_TYPE_ID;\n payload: string;\n}\n\nexport interface SetError {\n type: typeof SET_ERROR;\n error: any;\n}\n\nexport interface DownloadMasterDataTemplateAttempt {\n type: typeof DOWNLOAD_MASTER_DATA_TEMPLATE_ATTEMPT;\n}\n\nexport interface DownloadMasterDataTemplateSuccess {\n type: typeof DOWNLOAD_MASTER_DATA_TEMPLATE_SUCCESS;\n}\n\nexport interface DownloadMasterDataTemplateFailure {\n type: typeof DOWNLOAD_MASTER_DATA_TEMPLATE_FAILURE;\n error: any;\n}\n\nexport type MasterDataDownloadActionTypes = \n | SetCountryId\n | SetConstructionTypeId\n | SetError\n | DownloadMasterDataTemplateAttempt\n | DownloadMasterDataTemplateSuccess\n | DownloadMasterDataTemplateFailure;\n","import { MasterDataDownloadModel } from '../store.model';\nimport {\n MasterDataDownloadActionTypes,\n SET_COUNTRY_ID,\n SET_CONSTRUCTION_TYPE_ID,\n SET_ERROR,\n DOWNLOAD_MASTER_DATA_TEMPLATE_ATTEMPT,\n DOWNLOAD_MASTER_DATA_TEMPLATE_SUCCESS,\n DOWNLOAD_MASTER_DATA_TEMPLATE_FAILURE\n} from './master-data-download.action-types';\n\nexport const initialState: MasterDataDownloadModel = {\n isLoading: false,\n error: null,\n hasDownloadedSuccessfully: false,\n countryId: '',\n constructionTypeId: '',\n};\n\nexport function masterDataDownloadReducer(state = initialState, action: MasterDataDownloadActionTypes): MasterDataDownloadModel {\n switch (action.type) {\n case SET_COUNTRY_ID:\n return {\n ...state,\n countryId: action.payload,\n };\n case SET_CONSTRUCTION_TYPE_ID:\n return {\n ...state,\n constructionTypeId: action.payload,\n };\n case SET_ERROR:\n return {\n ...state,\n error: action.error,\n };\n case DOWNLOAD_MASTER_DATA_TEMPLATE_ATTEMPT:\n return {\n ...state,\n error: null,\n isLoading: true,\n };\n case DOWNLOAD_MASTER_DATA_TEMPLATE_SUCCESS: \n return {\n ...state,\n error: null,\n isLoading: false,\n };\n case DOWNLOAD_MASTER_DATA_TEMPLATE_FAILURE:\n return {\n ...state,\n isLoading: false,\n error: action.error,\n };\n default:\n return state;\n }\n}\n","\nexport enum ResponseCode {\n BAD_REQUEST = 400,\n OK = 200,\n};\n","import { MasterDataUploadModel } from '../store.model';\nimport {\n MasterDataUploadActionTypes,\n UPLOAD_MASTER_DATA_SUCCESS,\n UPLOAD_MASTER_DATA_FAILURE,\n UPLOAD_MASTER_DATA_ATTEMPT,\n UPLOAD_MASTER_DATA_BAD_REQUEST,\n COMMIT_MASTER_DATA_ATTEMPT,\n COMMIT_MASTER_DATA_SUCCESS,\n COMMIT_MASTER_DATA_FAILURE\n} from './master-data-upload.action-types';\nimport { ResponseCode } from '../../types/response-code.types';\n\nexport const initialState: MasterDataUploadModel = {\n isLoading: false,\n error: null,\n isLoadingCommit: false,\n errorCommit: null,\n response: {},\n committedSuccessfully: false,\n};\n\nexport function masterDataUploadReducer(\n state: MasterDataUploadModel = initialState,\n action: MasterDataUploadActionTypes\n): MasterDataUploadModel {\n switch (action.type) {\n case UPLOAD_MASTER_DATA_ATTEMPT:\n return {\n ...state,\n isLoading: true,\n error: null,\n committedSuccessfully: false,\n };\n case UPLOAD_MASTER_DATA_SUCCESS: \n return {\n ...state,\n isLoading: false,\n response: {\n status: ResponseCode.OK,\n ok: action.payload,\n },\n };\n case UPLOAD_MASTER_DATA_BAD_REQUEST:\n return {\n ...state,\n isLoading: false,\n response: {\n status: ResponseCode.BAD_REQUEST,\n badRequest: action.payload,\n },\n };\n case UPLOAD_MASTER_DATA_FAILURE:\n return {\n ...state,\n isLoading: false,\n error: action.error,\n };\n case COMMIT_MASTER_DATA_ATTEMPT:\n return {\n ...state,\n isLoadingCommit: true,\n };\n case COMMIT_MASTER_DATA_SUCCESS:\n return {\n ...state,\n isLoadingCommit: false,\n errorCommit: null,\n committedSuccessfully: true,\n response: {},\n };\n case COMMIT_MASTER_DATA_FAILURE:\n return {\n ...state,\n isLoadingCommit: false,\n errorCommit: action.error,\n };\n default:\n return state;\n }\n}","import { CalculationsExportRowCount } from '../../types/domain/calculations-export-types';\n\nexport const EXPORT_CALCULATIONS_ATTEMPT = '[Calculations Export] Export Calculations Attempt';\nexport const EXPORT_CALCULATIONS_SUCCESS = '[Calculations Export] Export Calculations Success';\nexport const EXPORT_CALCULATIONS_FAILURE = '[Calculations Export] Export Calculations Failure';\n\nexport const SET_ERROR = '[Calculations Export] Set Error';\n\nexport interface ExportCalculationsAttempt {\n type: typeof EXPORT_CALCULATIONS_ATTEMPT;\n}\n\nexport interface ExportCalculationsSuccess {\n type: typeof EXPORT_CALCULATIONS_SUCCESS;\n payload: CalculationsExportRowCount;\n}\n\nexport interface ExportCalculationsFailure {\n type: typeof EXPORT_CALCULATIONS_FAILURE;\n error: string;\n}\n\nexport interface SetError {\n type: typeof SET_ERROR;\n error: string | null;\n}\n\nexport type CalculationsExportActionTypes =\n | ExportCalculationsAttempt\n | ExportCalculationsSuccess\n | ExportCalculationsFailure\n | SetError;\n","import { CalculationsExportModel } from '../store.model';\nimport {\n CalculationsExportActionTypes,\n EXPORT_CALCULATIONS_ATTEMPT,\n EXPORT_CALCULATIONS_SUCCESS,\n EXPORT_CALCULATIONS_FAILURE,\n SET_ERROR,\n} from './calculations-export.action-types';\n\nexport const initialState: CalculationsExportModel = {\n isLoading: false,\n error: null,\n exportRowCount: null,\n};\n\nexport function calculationsExportReducer(state = initialState, action: CalculationsExportActionTypes): CalculationsExportModel {\n switch (action.type) {\n case EXPORT_CALCULATIONS_ATTEMPT:\n return {\n ...state,\n isLoading: true,\n error: null,\n exportRowCount: null,\n };\n case EXPORT_CALCULATIONS_SUCCESS: \n return {\n ...state,\n isLoading: false,\n exportRowCount: action.payload,\n };\n case EXPORT_CALCULATIONS_FAILURE: \n return {\n ...state,\n isLoading: false,\n error: action.error,\n };\n case SET_ERROR: \n return {\n ...state,\n error: action.error,\n };\n default:\n return state;\n }\n}\n","import {ConstructionTypeNewsItemData, NewsItemData} from \"../../types/domain/news-items.types\";\n\n\nexport const SET_COUNTRY_ID = '[News Items] Set Country Id';\nexport const SET_ALLOWED_CULTURE_IDS = '[News Items] Set Allowed Culture Id';\nexport const SET_ERROR = '[News Items] Set Error';\n\nexport const GET_NEWS_ITEM_ATTEMPT = '[News Items] Get News Items Attempt';\nexport const GET_NEWS_ITEM_SUCCESS = '[News Items] Get News Items Success';\nexport const GET_NEWS_ITEM_FAILURE = '[News Items] Get News Items Failure';\n\nexport const GET_CONSTRUCTION_TYPE_NEWS_ITEMS_ATTEMPT = '[News Items] Get Construction Type News Items Attempt';\nexport const GET_CONSTRUCTION_TYPE_NEWS_ITEMS_SUCCESS = '[News Items] Get Construction Type News Items Success';\nexport const GET_CONSTRUCTION_TYPE_NEWS_ITEMS_FAILURE = '[News Items] Get Construction Type News Items Failure';\n\nexport interface SetCountryId {\n type: typeof SET_COUNTRY_ID;\n payload: string;\n}\n\nexport interface SetAllowedCulturesId {\n type: typeof SET_ALLOWED_CULTURE_IDS;\n payload: string[];\n}\n\nexport interface SetError {\n type: typeof SET_ERROR;\n error: any;\n}\n\nexport interface GetNewsItemsAttempt {\n type: typeof GET_NEWS_ITEM_ATTEMPT;\n}\n\nexport interface GetNewsItemsSuccess {\n type: typeof GET_NEWS_ITEM_SUCCESS;\n payload: NewsItemData[]\n}\n\nexport interface GetNewsItemsFailure {\n type: typeof GET_NEWS_ITEM_FAILURE;\n error: any;\n}\n\nexport interface GetConstructionTypeNewsItemsAttempt {\n type: typeof GET_CONSTRUCTION_TYPE_NEWS_ITEMS_ATTEMPT;\n}\n\nexport interface GetConstructionTypeNewsItemsSuccess {\n type: typeof GET_CONSTRUCTION_TYPE_NEWS_ITEMS_SUCCESS;\n payload: ConstructionTypeNewsItemData[]\n}\n\nexport interface GetConstructionTypeNewsItemsFailure {\n type: typeof GET_CONSTRUCTION_TYPE_NEWS_ITEMS_FAILURE;\n error: any;\n}\n\nexport type NewsItemsActionTypes =\n | SetCountryId\n | SetError\n | SetAllowedCulturesId\n | GetNewsItemsAttempt\n | GetNewsItemsSuccess\n | GetNewsItemsFailure\n | GetConstructionTypeNewsItemsAttempt\n | GetConstructionTypeNewsItemsSuccess\n | GetConstructionTypeNewsItemsFailure;\n","import {NewsItemsModel} from '../store.model';\n\nimport {\n GET_CONSTRUCTION_TYPE_NEWS_ITEMS_ATTEMPT,\n GET_CONSTRUCTION_TYPE_NEWS_ITEMS_FAILURE,\n GET_CONSTRUCTION_TYPE_NEWS_ITEMS_SUCCESS,\n GET_NEWS_ITEM_ATTEMPT,\n GET_NEWS_ITEM_FAILURE,\n GET_NEWS_ITEM_SUCCESS,\n NewsItemsActionTypes,\n SET_ALLOWED_CULTURE_IDS,\n SET_COUNTRY_ID,\n SET_ERROR\n} from './news-items.action-types';\n\nexport const initialState: NewsItemsModel = {\n isLoading: false,\n error: null,\n countryId: \"\",\n allowedCultures: [],\n newsItemTableScreen: {\n isLoading: false,\n error: null,\n success: false,\n newsItemsData: []\n },\n constructionTypeNewsItems: {\n isLoading: false,\n error: null,\n success: false,\n constructionTypeNewsItemsData: [],\n }\n};\n\nexport function newsItemsReducer(state = initialState, action: NewsItemsActionTypes): NewsItemsModel {\n switch (action.type) {\n case SET_COUNTRY_ID:\n return {\n ...state,\n countryId: action.payload,\n };\n case SET_ALLOWED_CULTURE_IDS:\n return {\n ...state,\n allowedCultures: action.payload,\n };\n case SET_ERROR:\n return {\n ...state,\n error: action.error,\n };\n\n case GET_NEWS_ITEM_ATTEMPT:\n return {\n ...state,\n newsItemTableScreen: {\n ...state.newsItemTableScreen,\n isLoading: true,\n success: false,\n },\n };\n case GET_NEWS_ITEM_SUCCESS:\n return {\n ...state,\n newsItemTableScreen: {\n ...state.newsItemTableScreen,\n error: null,\n isLoading: false,\n success: true,\n newsItemsData: action.payload\n }\n };\n case GET_NEWS_ITEM_FAILURE:\n return {\n ...state,\n newsItemTableScreen: {\n ...state.newsItemTableScreen,\n isLoading: false,\n success: false,\n error: action.error,\n },\n };\n\n case GET_CONSTRUCTION_TYPE_NEWS_ITEMS_ATTEMPT:\n return {\n ...state,\n constructionTypeNewsItems: {\n ...state.constructionTypeNewsItems,\n isLoading: true,\n success: false,\n },\n };\n case GET_CONSTRUCTION_TYPE_NEWS_ITEMS_SUCCESS:\n return {\n ...state,\n constructionTypeNewsItems: {\n ...state.constructionTypeNewsItems,\n error: null,\n isLoading: false,\n success: true,\n constructionTypeNewsItemsData: action.payload\n }\n };\n case GET_CONSTRUCTION_TYPE_NEWS_ITEMS_FAILURE:\n return {\n ...state,\n constructionTypeNewsItems: {\n ...state.constructionTypeNewsItems,\n isLoading: false,\n success: false,\n error: action.error,\n },\n };\n default:\n return state;\n }\n}\n","import { combineReducers } from 'redux';\nimport { userReducer } from './user/user.reducer';\nimport { constructionDataReducer } from './construction-data/construction-data.reducer';\nimport { masterDataDownloadReducer } from './master-data-download/master-data-download.reducer';\nimport { masterDataUploadReducer } from './master-data-upload/master-data-upload.reducer';\nimport { calculationsExportReducer } from './calculations-export/calculations-export.reducer';\nimport {newsItemsReducer} from \"./news-items/news-items-reducer\";\n\nexport const reducers = combineReducers({\n user: userReducer,\n constructionData: constructionDataReducer,\n masterDataDownload: masterDataDownloadReducer,\n masterDataUpload: masterDataUploadReducer,\n calculationsExport: calculationsExportReducer,\n newsItems: newsItemsReducer,\n});\n","import { BadRequest, Ok } from \"../../types/master-data-upload-response.types\";\n\nexport const UPLOAD_MASTER_DATA_ATTEMPT = '[Master Data Upload] Upload Master Data - Attempt';\nexport const UPLOAD_MASTER_DATA_SUCCESS = '[Master Data Upload] Upload Master Data - Success';\nexport const UPLOAD_MASTER_DATA_BAD_REQUEST = 'Master Data Upload] Upload Master Data - Bad Request';\nexport const UPLOAD_MASTER_DATA_FAILURE = '[Master Data Upload] Upload Master Data - Failure';\n\nexport const COMMIT_MASTER_DATA_ATTEMPT = '[Master Data Upload] Commit Master Data - Attempt';\nexport const COMMIT_MASTER_DATA_SUCCESS = '[Master Data Upload] Commit Master Data - Success';\nexport const COMMIT_MASTER_DATA_FAILURE = '[Master Data Upload] Commit Master Data - Failure';\n\nexport interface UploadMasterDataAttempt {\n type: typeof UPLOAD_MASTER_DATA_ATTEMPT;\n}\n\nexport interface UploadMasterDataSuccess {\n type: typeof UPLOAD_MASTER_DATA_SUCCESS;\n payload: Ok;\n}\n\nexport interface UploadMasterDataBadRequest {\n type: typeof UPLOAD_MASTER_DATA_BAD_REQUEST;\n payload: BadRequest;\n}\n\nexport interface UploadMasterDataFailure {\n type: typeof UPLOAD_MASTER_DATA_FAILURE;\n error: any;\n}\n\nexport interface CommitMasterDataAttempt {\n type: typeof COMMIT_MASTER_DATA_ATTEMPT;\n}\n\nexport interface CommitMasterDataSuccess {\n type: typeof COMMIT_MASTER_DATA_SUCCESS;\n}\n\nexport interface CommitMasterDataFailure {\n type: typeof COMMIT_MASTER_DATA_FAILURE;\n error: any;\n}\n\nexport type MasterDataUploadActionTypes =\n | UploadMasterDataAttempt\n | UploadMasterDataSuccess\n | UploadMasterDataBadRequest\n | UploadMasterDataFailure\n | CommitMasterDataAttempt\n | CommitMasterDataSuccess\n | CommitMasterDataFailure;","import { createStore, applyMiddleware } from 'redux';\nimport thunk from 'redux-thunk';\nimport { composeWithDevTools } from 'redux-devtools-extension';\nimport reduxImmutableStateInvariant from 'redux-immutable-state-invariant';\n\nimport { reducers } from './reducers';\n\nconst middleware: any[] = [thunk];\n\nif (process.env.NODE_ENV !== 'production') {\n middleware.push(reduxImmutableStateInvariant());\n}\n\nexport const store = createStore(reducers, composeWithDevTools(applyMiddleware(...middleware)));\n","import { ThemeOptions } from '@material-ui/core';\nimport { createMuiTheme } from '@material-ui/core/styles';\n\nimport themeStyles from './theme.module.scss';\nimport './overrides.module.scss';\n\nconst themeOptions: ThemeOptions = {\n breakpoints: {\n keys: ['xs', 'sm', 'md', 'lg', 'xl'],\n values: {\n xs: 0,\n sm: 600,\n md: 960,\n lg: 1280,\n xl: 1920,\n },\n },\n direction: 'ltr',\n mixins: {\n toolbar: {\n minHeight: 56,\n '@media (min-width:0px) and (orientation: landscape)': { minHeight: 48 },\n '@media (min-width:600px)': { minHeight: 64 },\n },\n },\n overrides: {},\n palette: {\n common: {\n black: '#000',\n white: '#fff',\n },\n type: 'light',\n primary: {\n main: themeStyles.colorSecondaryGreyDarkest,\n light: themeStyles.colorSecondaryGreyDarkest,\n dark: themeStyles.colorSecondaryGreyDarkest,\n contrastText: '#fff',\n },\n secondary: {\n main: themeStyles.colorHighlightGold,\n light: themeStyles.colorHighlightGold,\n dark: themeStyles.colorHighlightGold,\n contrastText: '#fff',\n },\n error: {\n light: themeStyles.colorError,\n main: themeStyles.colorError,\n dark: themeStyles.colorError,\n contrastText: '#fff',\n },\n grey: {\n '50': '#fafafa',\n '100': '#f5f5f5',\n '200': '#eeeeee',\n '300': '#e0e0e0',\n '400': '#bdbdbd',\n '500': '#9e9e9e',\n '600': '#757575',\n '700': '#616161',\n '800': '#424242',\n '900': '#212121',\n A100: '#d5d5d5',\n A200: '#aaaaaa',\n A400: '#303030',\n A700: '#616161',\n },\n contrastThreshold: 3,\n tonalOffset: 0.2,\n text: {\n primary: themeStyles.colorTextBase,\n secondary: 'rgba(0, 0, 0, 0.54)',\n disabled: 'rgba(0, 0, 0, 0.38)',\n hint: 'rgba(0, 0, 0, 0.38)',\n },\n divider: 'rgba(0, 0, 0, 0.12)',\n background: { paper: '#fff', default: themeStyles.colorSecondaryGreyLightest },\n action: {\n active: 'rgba(0, 0, 0, 0.54)',\n hover: 'rgba(0, 0, 0, 0.08)',\n hoverOpacity: 0.08,\n selected: 'rgba(0, 0, 0, 0.14)',\n disabled: 'rgba(0, 0, 0, 0.26)',\n disabledBackground: 'rgba(0, 0, 0, 0.12)',\n },\n },\n props: {},\n shadows: [\n 'none',\n '0px 2px 1px -1px rgba(0,0,0,0.2),0px 1px 1px 0px rgba(0,0,0,0.14),0px 1px 3px 0px rgba(0,0,0,0.12)',\n '0px 3px 1px -2px rgba(0,0,0,0.2),0px 2px 2px 0px rgba(0,0,0,0.14),0px 1px 5px 0px rgba(0,0,0,0.12)',\n '0px 3px 3px -2px rgba(0,0,0,0.2),0px 3px 4px 0px rgba(0,0,0,0.14),0px 1px 8px 0px rgba(0,0,0,0.12)',\n '0px 2px 4px -1px rgba(0,0,0,0.2),0px 4px 5px 0px rgba(0,0,0,0.14),0px 1px 10px 0px rgba(0,0,0,0.12)',\n '0px 3px 5px -1px rgba(0,0,0,0.2),0px 5px 8px 0px rgba(0,0,0,0.14),0px 1px 14px 0px rgba(0,0,0,0.12)',\n '0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)',\n '0px 4px 5px -2px rgba(0,0,0,0.2),0px 7px 10px 1px rgba(0,0,0,0.14),0px 2px 16px 1px rgba(0,0,0,0.12)',\n '0px 5px 5px -3px rgba(0,0,0,0.2),0px 8px 10px 1px rgba(0,0,0,0.14),0px 3px 14px 2px rgba(0,0,0,0.12)',\n '0px 5px 6px -3px rgba(0,0,0,0.2),0px 9px 12px 1px rgba(0,0,0,0.14),0px 3px 16px 2px rgba(0,0,0,0.12)',\n '0px 6px 6px -3px rgba(0,0,0,0.2),0px 10px 14px 1px rgba(0,0,0,0.14),0px 4px 18px 3px rgba(0,0,0,0.12)',\n '0px 6px 7px -4px rgba(0,0,0,0.2),0px 11px 15px 1px rgba(0,0,0,0.14),0px 4px 20px 3px rgba(0,0,0,0.12)',\n '0px 7px 8px -4px rgba(0,0,0,0.2),0px 12px 17px 2px rgba(0,0,0,0.14),0px 5px 22px 4px rgba(0,0,0,0.12)',\n '0px 7px 8px -4px rgba(0,0,0,0.2),0px 13px 19px 2px rgba(0,0,0,0.14),0px 5px 24px 4px rgba(0,0,0,0.12)',\n '0px 7px 9px -4px rgba(0,0,0,0.2),0px 14px 21px 2px rgba(0,0,0,0.14),0px 5px 26px 4px rgba(0,0,0,0.12)',\n '0px 8px 9px -5px rgba(0,0,0,0.2),0px 15px 22px 2px rgba(0,0,0,0.14),0px 6px 28px 5px rgba(0,0,0,0.12)',\n '0px 8px 10px -5px rgba(0,0,0,0.2),0px 16px 24px 2px rgba(0,0,0,0.14),0px 6px 30px 5px rgba(0,0,0,0.12)',\n '0px 8px 11px -5px rgba(0,0,0,0.2),0px 17px 26px 2px rgba(0,0,0,0.14),0px 6px 32px 5px rgba(0,0,0,0.12)',\n '0px 9px 11px -5px rgba(0,0,0,0.2),0px 18px 28px 2px rgba(0,0,0,0.14),0px 7px 34px 6px rgba(0,0,0,0.12)',\n '0px 9px 12px -6px rgba(0,0,0,0.2),0px 19px 29px 2px rgba(0,0,0,0.14),0px 7px 36px 6px rgba(0,0,0,0.12)',\n '0px 10px 13px -6px rgba(0,0,0,0.2),0px 20px 31px 3px rgba(0,0,0,0.14),0px 8px 38px 7px rgba(0,0,0,0.12)',\n '0px 10px 13px -6px rgba(0,0,0,0.2),0px 21px 33px 3px rgba(0,0,0,0.14),0px 8px 40px 7px rgba(0,0,0,0.12)',\n '0px 10px 14px -6px rgba(0,0,0,0.2),0px 22px 35px 3px rgba(0,0,0,0.14),0px 8px 42px 7px rgba(0,0,0,0.12)',\n '0px 11px 14px -7px rgba(0,0,0,0.2),0px 23px 36px 3px rgba(0,0,0,0.14),0px 9px 44px 8px rgba(0,0,0,0.12)',\n '0px 11px 15px -7px rgba(0,0,0,0.2),0px 24px 38px 3px rgba(0,0,0,0.14),0px 9px 46px 8px rgba(0,0,0,0.12)',\n ],\n typography: {\n htmlFontSize: parseInt(themeStyles.fontSizeBase),\n fontFamily: themeStyles.fontFamily,\n fontSize: parseInt(themeStyles.fontSizeBase),\n fontWeightLight: parseInt(themeStyles.fontWeightLight),\n fontWeightRegular: parseInt(themeStyles.fontWeightRegular),\n fontWeightMedium: parseInt(themeStyles.fontWeightMedium),\n fontWeightBold: parseInt(themeStyles.fontWeightBold),\n h1: {\n fontFamily: themeStyles.fontFamily,\n fontWeight: parseInt(themeStyles.fontWeightLight),\n fontSize: themeStyles.fontSizeH1,\n lineHeight: 1,\n letterSpacing: themeStyles.headerLetterSpacing,\n },\n h2: {\n fontFamily: themeStyles.fontFamily,\n fontWeight: parseInt(themeStyles.fontWeightLight),\n fontSize: themeStyles.fontSizeH2,\n lineHeight: 1,\n letterSpacing: themeStyles.headerLetterSpacing,\n },\n h3: {\n fontFamily: themeStyles.fontFamily,\n fontWeight: parseInt(themeStyles.fontWeightRegular),\n fontSize: themeStyles.fontSizeH3,\n lineHeight: 1.04,\n letterSpacing: themeStyles.headerLetterSpacing,\n },\n h4: {\n fontFamily: themeStyles.fontFamily,\n fontWeight: parseInt(themeStyles.fontWeightRegular),\n fontSize: themeStyles.fontSizeH4,\n lineHeight: 1.17,\n letterSpacing: '0px',\n },\n h5: {\n fontFamily: themeStyles.fontFamily,\n fontWeight: parseInt(themeStyles.fontWeightRegular),\n fontSize: themeStyles.fontSizeH5,\n lineHeight: 1.33,\n letterSpacing: '0em',\n },\n h6: {\n fontFamily: themeStyles.fontFamily,\n fontWeight: parseInt(themeStyles.fontWeightMedium),\n fontSize: themeStyles.fontSizeH6,\n lineHeight: 1.6,\n letterSpacing: '0px',\n },\n subtitle1: {\n fontFamily: themeStyles.fontFamily,\n fontWeight: parseInt(themeStyles.fontWeightRegular),\n fontSize: themeStyles.fontSizeBase,\n lineHeight: 1.75,\n letterSpacing: '0px',\n },\n subtitle2: {\n fontFamily: themeStyles.fontFamily,\n fontWeight: parseInt(themeStyles.fontWeightMedium),\n fontSize: themeStyles.fontSizeSmall,\n lineHeight: 1.57,\n letterSpacing: '0px',\n },\n body1: {\n fontFamily: themeStyles.fontFamily,\n fontWeight: parseInt(themeStyles.fontWeightRegular),\n fontSize: themeStyles.fontSizeBase,\n lineHeight: 1.5,\n letterSpacing: '0px',\n },\n body2: {\n fontFamily: themeStyles.fontFamily,\n fontWeight: parseInt(themeStyles.fontWeightRegular),\n fontSize: themeStyles.fontSizeBase,\n lineHeight: 1.5,\n letterSpacing: '0px',\n },\n button: {\n fontFamily: themeStyles.fontFamily,\n fontWeight: parseInt(themeStyles.fontWeightMedium),\n fontSize: themeStyles.fontSizeSmall,\n lineHeight: 2,\n letterSpacing: '0px',\n textTransform: 'uppercase',\n },\n caption: {\n fontFamily: themeStyles.fontFamily,\n fontWeight: parseInt(themeStyles.fontWeightRegular),\n fontSize: themeStyles.fontSizeSmall,\n lineHeight: 1.66,\n letterSpacing: '0px',\n },\n overline: {\n fontFamily: themeStyles.fontFamily,\n fontWeight: parseInt(themeStyles.fontWeightRegular),\n fontSize: themeStyles.fontSizeSmall,\n lineHeight: 2.66,\n letterSpacing: '0px',\n textTransform: 'uppercase',\n },\n },\n shape: {\n borderRadius: parseInt(themeStyles.borderRadius),\n },\n transitions: {\n easing: {\n easeInOut: 'cubic-bezier(0.4, 0, 0.2, 1)',\n easeOut: 'cubic-bezier(0.0, 0, 0.2, 1)',\n easeIn: 'cubic-bezier(0.4, 0, 1, 1)',\n sharp: 'cubic-bezier(0.4, 0, 0.6, 1)',\n },\n duration: {\n shortest: 150,\n shorter: 200,\n short: 250,\n standard: 300,\n complex: 375,\n enteringScreen: 225,\n leavingScreen: 195,\n },\n },\n zIndex: {\n mobileStepper: 1000,\n speedDial: 1050,\n appBar: 1100,\n drawer: 1200,\n modal: 1300,\n snackbar: 1400,\n tooltip: 1500,\n },\n};\n\nexport const theme = createMuiTheme(themeOptions);\n","import axios from 'axios';\nimport { getAuthProvider } from '../authentication/authProvider';\n\nexport const getCountries = async () => {\n const token = await getAuthProvider().getIdToken();\n return await axios.get(\"api/countries\", {\n headers: { \"Authorization\": `Bearer ${token.idToken.rawIdToken}` }\n });\n};\n","import { InputLabel, MenuItem, Select } from '@material-ui/core';\nimport { isEmpty } from 'lodash';\nimport React, { useEffect, useState } from 'react';\nimport { Trans, useTranslation } from 'react-i18next';\n\nimport { getCountries } from '../../common/countries';\nimport { CountryModel } from '../Countries/CountryModel';\n\nexport type CountrySelectionPropType = {\n countryIds: string[];\n selectedCountryId: string;\n\n handleChange: (event: React.ChangeEvent<{ value: unknown; }>) => void;\n};\n\nexport default function CountrySelection(props: CountrySelectionPropType) {\n\n const { t } = useTranslation();\n const [countries, setCountries] = useState([]);\n\n useEffect(() => {\n getCountries().then(result => {\n setCountries(result.data);\n });\n }, []);\n\n return isEmpty(props.countryIds)\n ?
{t('country-selection-ui.no-country-permissions')}
\n :
\n Country\n {\n if (props.selectedCountryId.length === 0) {\n return {t('country-selection-ui.select-default')};\n }\n return countries.find(c => c.countryId === props.selectedCountryId)?.name;\n }}\n >\n \n {t('country-selection-ui.select-default')}\n \n\n {props.countryIds.map(countryId => ({\n countryId,\n name: countries.find(c => c.countryId === countryId)?.name ?? countryId ?? ''\n })).sort((a, b) => a.name.localeCompare(b.name)).map(c => (\n \n {c.name}\n \n ))}\n \n
;\n}\n","import { InputLabel, MenuItem, Select } from '@material-ui/core';\nimport React from 'react';\nimport { Trans, useTranslation } from 'react-i18next';\n\nimport { ConstructionType } from '../../types/domain/construction-data.types';\n\nexport type ConstructionTypeSelectionPropType = {\n constructionTypes: ConstructionType[];\n selectedConstructionTypeId: string;\n disabled: boolean;\n handleChange: (event: React.ChangeEvent<{ value: unknown }>) => void\n};\n\nexport default function ConstructionTypeSelection(props: ConstructionTypeSelectionPropType) {\n\n const { t } = useTranslation();\n\n return (\n
\n \n Construction Type\n \n {\n if (props.selectedConstructionTypeId.length === 0) {\n return {t('construction-type-selection-ui.select-default')};\n }\n return props.constructionTypes.find(ct => ct.id === props.selectedConstructionTypeId)?.constructionTypeNameLocalized;\n }}\n >\n \n {t('construction-type-selection-ui.select-default')}\n \n\n {props.constructionTypes.map((ct: ConstructionType) => (\n \n {ct.constructionTypeNameLocalized}\n \n ))}\n \n
\n );\n}\n","import { StoreModel } from \"../store.model\";\n\nexport const countryIdSelector = (state: StoreModel): string => state.masterDataDownload.countryId;\n\nexport const constructionTypeIdSelector = (state: StoreModel): string => state.masterDataDownload.constructionTypeId;\n\nexport const errorSelector = (state: StoreModel): any => state.masterDataDownload.error;\n\nexport const isLoadingSelector = (state: StoreModel): boolean => state.masterDataDownload.isLoading;\n","import {\n SetCountryId,\n SET_COUNTRY_ID,\n SetConstructionTypeId,\n SET_CONSTRUCTION_TYPE_ID,\n SetError,\n SET_ERROR,\n DownloadMasterDataTemplateAttempt,\n DOWNLOAD_MASTER_DATA_TEMPLATE_ATTEMPT,\n DownloadMasterDataTemplateSuccess,\n DOWNLOAD_MASTER_DATA_TEMPLATE_SUCCESS,\n DownloadMasterDataTemplateFailure,\n DOWNLOAD_MASTER_DATA_TEMPLATE_FAILURE\n} from \"./master-data-download.action-types\";\n\nexport const setCountryId = (countryId: string): SetCountryId => ({\n type: SET_COUNTRY_ID,\n payload: countryId,\n});\n\nexport const setConstructionTypeId = (constructionTypeId: string): SetConstructionTypeId => ({\n type: SET_CONSTRUCTION_TYPE_ID,\n payload: constructionTypeId,\n});\n\nexport const setError = (error: any): SetError => ({\n type: SET_ERROR,\n error: error,\n});\n\nexport const downloadMasterDataTemplateAttempt = (): DownloadMasterDataTemplateAttempt => ({\n type: DOWNLOAD_MASTER_DATA_TEMPLATE_ATTEMPT,\n});\n\nexport const downloadMasterDataTemplateSuccess = (): DownloadMasterDataTemplateSuccess => ({\n type: DOWNLOAD_MASTER_DATA_TEMPLATE_SUCCESS\n});\n\nexport const downloadMasterDataTemplateFailure = (error: any): DownloadMasterDataTemplateFailure => ({\n type: DOWNLOAD_MASTER_DATA_TEMPLATE_FAILURE,\n error: error,\n});\n","\nimport { StoreModel } from '../store.model';\nimport { ConstructionType } from '../../types/domain/construction-data.types';\n\nexport const constructionTypesSelector = (state: StoreModel): ConstructionType[] => state.constructionData.constructionTypes;\n","import axios from 'axios';\nimport { getAuthProvider } from '../../authentication/authProvider';\nimport {\n fetchConstructionTypesAttempt,\n fetchConstructionTypesSuccess,\n fetchConstructionTypesFailure\n} from './construction-data.actions';\n\nexport const fetchConstructionTypes = (countryId: string) => (\n\n // TODO: Typing needs to be defined\n async (dispatch: (action: any) => void) => {\n dispatch(fetchConstructionTypesAttempt());\n\n try {\n const token = await getAuthProvider().getIdToken();\n const { data } = await axios.get('/api/constructionTypes/' + countryId, {\n headers: { 'Authorization': `Bearer ${token.idToken.rawIdToken}` }\n });\n\n // TODO: We might want to group the construction types by category and save it that way to the store\n // Here is the code but it's not in use just yet\n // _____________________\n // const constructionTypesByCategory = groupBy(data, (constructionType: ConstructionType) => constructionType.category);\n // console.log('ConstructionTypes grouped by category', constructionTypesByCategory);\n\n dispatch(fetchConstructionTypesSuccess(data));\n } catch (error) {\n dispatch(fetchConstructionTypesFailure(error));\n }\n }\n);\n","import {\n FETCH_CONSTRUCTION_TYPES_ATTEMPT,\n FETCH_CONSTRUCTION_TYPES_SUCCESS,\n FETCH_CONSTRUCTION_TYPES_FAILURE,\n FetchConstructionTypesAttempt,\n FetchConstructionTypesSuccess,\n FetchConstructionTypesFailure,\n} from './construction-data.action-types';\nimport { ConstructionType } from '../../types/domain/construction-data.types';\n\nexport const fetchConstructionTypesAttempt = (): FetchConstructionTypesAttempt => ({\n type: FETCH_CONSTRUCTION_TYPES_ATTEMPT,\n});\n\nexport const fetchConstructionTypesSuccess = (data: ConstructionType[]): FetchConstructionTypesSuccess => ({\n type: FETCH_CONSTRUCTION_TYPES_SUCCESS,\n payload: data,\n});\n\nexport const fetchConstructionTypesFailure = (error: any): FetchConstructionTypesFailure => ({\n type: FETCH_CONSTRUCTION_TYPES_FAILURE,\n error,\n});\n","import { isEmpty } from 'lodash';\nimport axios from 'axios';\nimport { getAuthProvider } from '../../authentication/authProvider';\nimport {\n setError,\n downloadMasterDataTemplateAttempt,\n downloadMasterDataTemplateFailure,\n downloadMasterDataTemplateSuccess,\n} from './master-data-download.actions';\n\nexport const downloadMasterDataTemplate = (countryId: string, constructionTypeId: string) => (\n async (dispatch: any) => {\n if (isEmpty(countryId) || isEmpty(constructionTypeId)) {\n dispatch(setError({ message: 'Please select country and construction type before downloading' }));\n return;\n }\n\n dispatch(downloadMasterDataTemplateAttempt());\n\n try {\n const token = await getAuthProvider().getIdToken();\n const { data } = await axios.get(`api/MasterData/${constructionTypeId}/${countryId}`, {\n headers: { 'Authorization': `Bearer ${token.idToken.rawIdToken}` },\n responseType: 'blob'\n });\n\n // Creating link to the Blob\n const url = window.URL.createObjectURL(new Blob([data]));\n const link = document.createElement('a');\n link.href = url;\n link.setAttribute('download', `Materials-${countryId.toUpperCase()}-${constructionTypeId}.xlsx`);\n document.body.appendChild(link);\n // @ts-ignore\n if (window.Cypress) {\n // NOTE: needed for Automated tests, do not remove\n return;\n }\n link.click();\n link.parentNode?.removeChild(link);\n\n dispatch(downloadMasterDataTemplateSuccess());\n } catch(error) {\n dispatch(downloadMasterDataTemplateFailure(error));\n }\n\n }\n)\n","import React, { useState } from 'react';\nimport { useSelector } from 'react-redux';\nimport { countryIdsSelector, hasTechnicalRoleSelector } from '../../store/user/user.selectors';\nimport { Button, Box, CircularProgress, Divider } from '@material-ui/core';\nimport { Alert } from '@material-ui/lab';\nimport { isEmpty } from 'lodash';\nimport axios from 'axios';\nimport { toast } from 'react-toastify';\nimport { getAuthProvider } from '../../authentication/authProvider';\n\nexport default function MasterDataDownloadAll() {\n\n const countryIds = useSelector(countryIdsSelector);\n const hasTechnicalRole = useSelector(hasTechnicalRoleSelector);\n const [isDownloadingAll, setDownloadingAll] = useState(false);\n const [downloadAllError, setDownloadAllError] = useState('');\n\n const handleDownloadAllClick = async () => {\n setDownloadingAll(true);\n setDownloadAllError('');\n\n var startTimeMs = new Date().getTime();\n\n try {\n const token = await getAuthProvider().getIdToken();\n const { data } = await axios.get('api/MasterData/zip-all', {\n headers: { 'Authorization': `Bearer ${token.idToken.rawIdToken}` },\n responseType: 'blob'\n });\n\n var endTimeMs = new Date().getTime();\n var durationMs = endTimeMs - startTimeMs;\n var durationSeconds1dp = Math.round(durationMs / 100) / 10;\n toast.success(`Downloaded Materials Master Data for countries ${countryIds.join(', ')} in ${durationSeconds1dp} seconds.`);\n\n // Creating link to the Blob\n const url = window.URL.createObjectURL(new Blob([data]));\n const link = document.createElement('a');\n link.href = url;\n link.setAttribute('download', `Materials-All-${countryIds.join('-')}.zip`);\n document.body.appendChild(link);\n link.click();\n link.parentNode?.removeChild(link);\n\n setDownloadingAll(false);\n } catch(error) {\n setDownloadingAll(false);\n setDownloadAllError(error?.toString() || 'Unknown error');\n }\n }\n\n return (\n
\n {countryIds.length > 0 && hasTechnicalRole &&
\n \n

Download all master data

\n \n

\n \n {isDownloadingAll && }\n

\n \n Downloads a zip file containing the Master Data for all of the countries you have access to.\n

\n You can access: {countryIds.join(', ')}\n
\n
\n {!isEmpty(downloadAllError) && {downloadAllError}}\n
}\n
\n );\n};\n","import React, { useEffect } from 'react';\nimport { useSelector, useDispatch } from 'react-redux';\nimport { Trans } from 'react-i18next';\nimport { hasTechnicalRoleSelector, countryIdsSelector } from '../../store/user/user.selectors';\nimport CountrySelection from '../CountrySelection/CountrySelection';\nimport ConstructionTypeSelection from '../ConstructionTypeSelection/ConstructionTypeSelection';\nimport {\n countryIdSelector,\n constructionTypeIdSelector,\n errorSelector,\n isLoadingSelector\n} from '../../store/master-data-download/master-data-download.selectors';\nimport { setCountryId, setConstructionTypeId } from '../../store/master-data-download/master-data-download.actions';\nimport { constructionTypesSelector } from '../../store/construction-data/construction-data.selectors';\nimport { fetchConstructionTypes } from '../../store/construction-data/construction-data.action-creators';\nimport { Button, Box, CircularProgress } from '@material-ui/core';\nimport { Alert } from '@material-ui/lab';\nimport { downloadMasterDataTemplate } from '../../store/master-data-download/master-data-download.action-creators';\nimport { isEmpty } from 'lodash';\nimport MasterDataDownloadAll from './MasterDataDownloadAll';\n\nexport default function MasterDataDownload() {\n\n const dispatch = useDispatch();\n const error = useSelector(errorSelector);\n const isLoading = useSelector(isLoadingSelector);\n\n // All the things for CountrySelection\n const countryIds = useSelector(countryIdsSelector);\n const selectedCountryId = useSelector(countryIdSelector);\n const handleCountryChange = (event: React.ChangeEvent<{ value: unknown }>) => {\n dispatch(setConstructionTypeId(''));\n dispatch(setCountryId(event.target.value as string));\n };\n\n // All the things for ConstructionTypeSelection\n const constructionTypes = useSelector(constructionTypesSelector);\n const selectedConstructionTypeId = useSelector(constructionTypeIdSelector);\n const handleConstructionTypeChange = (event: React.ChangeEvent<{ value: unknown }>) => {\n dispatch(setConstructionTypeId(event.target.value as string));\n };\n\n const hasTechnicalRole = useSelector(hasTechnicalRoleSelector);\n\n const handleDownloadOnClick = () => {\n dispatch(downloadMasterDataTemplate(selectedCountryId, selectedConstructionTypeId));\n }\n\n useEffect(() => {\n if (selectedCountryId) {\n dispatch(fetchConstructionTypes(selectedCountryId));\n }\n }, [selectedCountryId, dispatch]);\n\n return (\n
\n

download-master-data

\n\n {!hasTechnicalRole ?

no-permission

\n :
\n \n \n \n\n \n 0 ? false : true}\n />\n \n\n {isLoading && }\n\n \n \n \n\n {!isEmpty(error) && {error.message}}\n
}\n\n \n
\n );\n};\n","import {\n UPLOAD_MASTER_DATA_ATTEMPT,\n UploadMasterDataAttempt,\n UPLOAD_MASTER_DATA_SUCCESS,\n UploadMasterDataSuccess,\n UploadMasterDataFailure,\n UPLOAD_MASTER_DATA_FAILURE,\n UploadMasterDataBadRequest,\n UPLOAD_MASTER_DATA_BAD_REQUEST,\n COMMIT_MASTER_DATA_ATTEMPT,\n CommitMasterDataAttempt,\n CommitMasterDataSuccess,\n COMMIT_MASTER_DATA_SUCCESS,\n CommitMasterDataFailure,\n COMMIT_MASTER_DATA_FAILURE\n} from './master-data-upload.action-types';\nimport { BadRequest, Ok } from '../../types/master-data-upload-response.types';\n\nexport const uploadMasterDataAttempt = (): UploadMasterDataAttempt => ({\n type: UPLOAD_MASTER_DATA_ATTEMPT,\n});\n\nexport const uploadMasterDataSuccess = (data: Ok): UploadMasterDataSuccess => ({\n type: UPLOAD_MASTER_DATA_SUCCESS,\n payload: data,\n});\n\nexport const uploadMasterDataBadRequest = (data: BadRequest): UploadMasterDataBadRequest => ({\n type: UPLOAD_MASTER_DATA_BAD_REQUEST,\n payload: data,\n});\n\nexport const uploadMasterDataFailure = (error: any): UploadMasterDataFailure => ({\n type: UPLOAD_MASTER_DATA_FAILURE,\n error: error,\n});\n\nexport const commitMasterDataAttempt = (): CommitMasterDataAttempt => ({\n type: COMMIT_MASTER_DATA_ATTEMPT,\n});\n\nexport const commitMasterDataSuccess = (): CommitMasterDataSuccess => ({\n type: COMMIT_MASTER_DATA_SUCCESS,\n});\n\nexport const commitMasterDataFailure = (error: any): CommitMasterDataFailure => ({\n type: COMMIT_MASTER_DATA_FAILURE,\n error: error,\n});\n","import {\n uploadMasterDataAttempt,\n uploadMasterDataFailure,\n uploadMasterDataSuccess,\n uploadMasterDataBadRequest,\n commitMasterDataAttempt,\n commitMasterDataSuccess,\n commitMasterDataFailure,\n} from './master-data-upload.actions';\nimport axios from 'axios';\nimport { getAuthProvider } from '../../authentication/authProvider';\nimport { ResponseCode } from '../../types/response-code.types';\n\nexport const uploadMasterData = (file: any, fileName: string, commit: boolean = false) => (\n async (dispatch: (action: any) => void) => {\n if (commit) {\n dispatch(commitMasterDataAttempt())\n } else {\n dispatch(uploadMasterDataAttempt());\n }\n\n try {\n const formData = new FormData();\n formData.append('masterDataFile', file as string, fileName);\n\n const token = await getAuthProvider().getIdToken();\n const { data } = await axios.post('api/masterData', formData, {\n headers: {\n 'Authorization': `Bearer ${token.idToken.rawIdToken}`,\n 'Content-Type': 'multipart/form-data'\n },\n params: {\n commit: commit,\n }\n });\n \n if (commit) {\n dispatch(commitMasterDataSuccess());\n } else {\n dispatch(uploadMasterDataSuccess({ ...data }));\n }\n\n } catch (error) {\n if (commit) {\n dispatch(commitMasterDataFailure(error));\n return;\n }\n\n const { status, data } = error.response;\n\n if (status === ResponseCode.BAD_REQUEST) {\n dispatch(uploadMasterDataBadRequest({\n errorCode: data.errorCode,\n args: data.args,\n message: data.message,\n }));\n \n return;\n }\n\n dispatch(uploadMasterDataFailure(error.response))\n }\n }\n);\n","import { StoreModel } from '../store.model';\nimport { MasterDataUploadResponse } from '../../types/master-data-upload-response.types';\n\nexport const isLoadingSelector = (state: StoreModel): boolean => state.masterDataUpload.isLoading;\n\nexport const responseSelector = (state: StoreModel): MasterDataUploadResponse => state.masterDataUpload.response;\n\nexport const isLoadingCommitSelector = (state: StoreModel): boolean => state.masterDataUpload.isLoadingCommit;\n\nexport const committedSuccessfullySelector = (state: StoreModel): boolean => state.masterDataUpload.committedSuccessfully;\n\nexport const errorCommitSelector = (state: StoreModel): any => state.masterDataUpload.errorCommit;\n","export type ChangesOutcome = {\n total: number;\n added: number;\n updated?: number;\n deleted: number;\n};\n\nexport enum ChangesItem {\n MATERIALS = 'materials',\n MATERIAL_LINKS = 'material-links',\n AIR_CAVITY_THICKNESSES = 'air-cavity-thicknesses',\n};\n\nexport type BadRequest = {\n errorCode?: string;\n args?: { [key: string]: string };\n message?: string;\n};\n\nexport type Ok = {\n countryId?: string;\n countryName?: string;\n constructionTypeId?: string;\n constructionTypeNameLocalized?: string;\n changes?: {\n [key in ChangesItem]: ChangesOutcome;\n };\n};\n\nexport type MasterDataUploadResponse = {\n status?: number;\n ok?: Ok;\n badRequest?: BadRequest;\n};\n","import React from 'react';\nimport { Ok, ChangesItem } from '../../types/master-data-upload-response.types';\nimport { useTranslation } from 'react-i18next';\nimport { Box, List, ListItem, ListItemText, ListItemIcon } from '@material-ui/core';\nimport ArrowRight from '@material-ui/icons/ArrowRight';\n\nexport default function CommitMessage(props: Ok) {\n\n const { changes } = props;\n\n const { t } = useTranslation();\n\n const countryConstructionTypeMessage = props.countryId && props.constructionTypeId &&\n `${t('master-data-upload-messages.ok.countryConstructionTypeWillBeUpdated', {\n country: props.countryName,\n constructionType: props.constructionTypeNameLocalized\n })}`;\n\n const renderChanges = (item: ChangesItem) => {\n const change = changes![item];\n return Object.keys(change).filter(key => key !== 'softDeleted' && key !== 'hardDeleted').map((key, index) => {\n // @ts-ignore\n const count = change[key];\n return (\n \n \n \n \n );\n });\n }\n\n return (\n \n Before you commit consider the following:\n \n \n {countryConstructionTypeMessage && \n \n \n }\n \n \n \n \n {renderChanges(ChangesItem.MATERIALS)}\n \n \n \n \n {renderChanges(ChangesItem.MATERIAL_LINKS)}\n \n \n \n \n {renderChanges(ChangesItem.AIR_CAVITY_THICKNESSES)}\n \n \n \n );\n}\n","import React from 'react';\nimport { BadRequest } from '../../types/master-data-upload-response.types';\nimport { makeStyles, Theme, createStyles, Box } from '@material-ui/core';\nimport { Alert } from '@material-ui/lab';\n\nconst useStyle = makeStyles((theme: Theme) => (\n createStyles({\n message: {\n color: theme.palette.error.main,\n }\n })\n))\n\nexport default function ValidationMessage(props: BadRequest) {\n\n const { message } = props;\n\n const classes = useStyle();\n\n return (\n
\n Your master data has the following validation error:\n
{message}
\n
\n )\n}\n","import React from 'react';\nimport { Box, CircularProgress, Button } from '@material-ui/core';\nimport { isEmpty } from 'lodash';\n\nexport type ChooseFileProps = {\n fileName: string;\n isLoading: boolean;\n isSecondary: boolean;\n handleChange: (event: any) => void;\n committedSuccessfully?: boolean;\n};\n\nexport default function ChooseFile(props: ChooseFileProps) {\n\n const { fileName, isLoading, isSecondary, handleChange, committedSuccessfully } = props;\n\n return (\n \n {isEmpty(fileName) || committedSuccessfully\n ? No file selected\n : File name: {fileName}\n }\n\n {isLoading && }\n\n \n \n {isSecondary\n ? Choose a different file\n : Choose file\n }\n \n \n \n \n );\n};\n","import React, { useState } from 'react';\nimport { Button, Box, Divider, CircularProgress } from '@material-ui/core';\nimport { Alert } from '@material-ui/lab';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { uploadMasterData } from '../../store/master-data-upload/master-data-upload.action-creators';\nimport { hasTechnicalRoleSelector } from '../../store/user/user.selectors';\nimport {\n isLoadingSelector,\n responseSelector,\n isLoadingCommitSelector,\n committedSuccessfullySelector,\n errorCommitSelector\n} from '../../store/master-data-upload/master-data-upload.selectors';\nimport { Trans } from 'react-i18next';\nimport { isEmpty } from 'lodash';\nimport CommitMessage from './CommitMessage';\nimport ValidationMessage from './ValidationMessage';\nimport ChooseFile from './ChooseFile';\n\nexport default function MasterDataUpload() {\n\n const dispatch = useDispatch();\n\n const hasTechnicalRole = useSelector(hasTechnicalRoleSelector);\n const isLoading = useSelector(isLoadingSelector);\n const response = useSelector(responseSelector);\n const isLoadingCommit = useSelector(isLoadingCommitSelector);\n const committedSuccessfully = useSelector(committedSuccessfullySelector);\n const errorCommit = useSelector(errorCommitSelector);\n\n const [fileName, setFileName] = useState('');\n const [fileAsBlob, setFileAsBlob] = useState('');\n\n const readyToUpload = () => fileAsBlob !== '';\n\n const handleChooseFileChange = (event: any) => {\n if (event.target.files && event.target.files[0]) {\n setFileName(event.target.files[0].name);\n setFileAsBlob(event.target.files[0]);\n dispatch(uploadMasterData(event.target.files[0], event.target.files[0].name));\n\n // Clear out the HTML input control's selected file, allowing the user to select a new file, or even reselect the same file.\n // This does not clear out the blob reference we have, and as long as the file doesn't change on disk before commiting, the commit changes still works.\n event.target.value = null;\n }\n };\n\n const handleCommitChangesOnClick = () => {\n if (readyToUpload()) {\n const commit = true;\n dispatch(uploadMasterData(fileAsBlob, fileName, commit));\n }\n };\n\n return (\n
\n

Upload master data

\n\n {!hasTechnicalRole ?

No Permission

\n :
\n \n \n \n\n {committedSuccessfully && Your master data changes have been applied successfully}\n\n {!isEmpty(response.ok) &&\n \n \n \n \n \n\n {isLoadingCommit && }\n\n \n \n \n\n {!isEmpty(errorCommit) && {errorCommit.message}}\n \n }\n\n {!isEmpty(response.badRequest) &&\n \n \n \n \n \n \n }\n
}\n\n
\n );\n};\n","import { CalculationsExportRowCount } from '../../types/domain/calculations-export-types';\n\nimport {\n ExportCalculationsAttempt,\n EXPORT_CALCULATIONS_ATTEMPT,\n ExportCalculationsSuccess,\n EXPORT_CALCULATIONS_SUCCESS,\n ExportCalculationsFailure,\n EXPORT_CALCULATIONS_FAILURE,\n SetError,\n SET_ERROR,\n} from './calculations-export.action-types';\n\nexport const exportCalculationsAttempt = (): ExportCalculationsAttempt => ({\n type: EXPORT_CALCULATIONS_ATTEMPT,\n});\n\nexport const exportCalculationsSuccess = (exportRowCount: CalculationsExportRowCount): ExportCalculationsSuccess => ({\n type: EXPORT_CALCULATIONS_SUCCESS,\n payload: exportRowCount,\n});\n\nexport const exportCalculationsFailure = (error: string): ExportCalculationsFailure => ({\n type: EXPORT_CALCULATIONS_FAILURE,\n error: error,\n});\n\nexport const setError = (error: string | null): SetError => ({\n type: SET_ERROR,\n error: error,\n});\n","import { exportCalculationsAttempt, exportCalculationsSuccess, exportCalculationsFailure } from \"./calculations-export.actions\"\nimport { CalculationsExportRowCount } from '../../types/domain/calculations-export-types';\nimport { getAuthProvider } from \"../../authentication/authProvider\";\nimport axios from \"axios\";\n\nexport const exportCalculations = (fromDate: Date, toDate: Date) => (\n async (dispatch: any) => {\n\n dispatch(exportCalculationsAttempt());\n\n try {\n const token = await getAuthProvider().getIdToken();\n const response = await axios.get('api/calculations', {\n headers: { 'Authorization': `Bearer ${token.idToken.rawIdToken}` },\n responseType: 'blob',\n params: {\n from: formatDate(fromDate),\n to: formatDate(toDate),\n },\n });\n\n const exportRowCount: CalculationsExportRowCount = {\n count: `${response.headers['export-row-count']}`,\n limitReached: response.headers['export-row-count-limit-reached'] === 'true'\n };\n\n // Creating link to the Blob\n const url = window.URL.createObjectURL(new Blob([response.data]));\n const link = document.createElement('a');\n link.href = url;\n link.setAttribute('download', `KICS-Customer-Calculations.xlsx`);\n document.body.appendChild(link);\n link.click();\n link.parentNode?.removeChild(link);\n\n dispatch(exportCalculationsSuccess(exportRowCount));\n } catch(error) {\n dispatch(exportCalculationsFailure(error.response.statusText));\n }\n\n }\n)\n\nconst formatDate = (date: Date): string => {\n return `${date.getFullYear()}-${appendLeadingZero(date.getMonth() + 1)}-${appendLeadingZero(date.getDate())}T00:00:00.000Z`;\n}\n\nconst appendLeadingZero = (n: number): string => n <= 9 ? '0' + n : n.toString();\n","import { StoreModel } from '../store.model';\nimport { CalculationsExportRowCount } from '../../types/domain/calculations-export-types';\n\nexport const isLoadingSelector = (state: StoreModel): boolean => state.calculationsExport.isLoading;\n\nexport const errorSelector = (state: StoreModel): string | null => state.calculationsExport.error;\n\nexport const exportRowCountSelector = (state: StoreModel): CalculationsExportRowCount | null => state.calculationsExport.exportRowCount;\n","import 'date-fns';\nimport React, { useState } from 'react';\nimport { MuiPickersUtilsProvider, KeyboardDatePicker } from '@material-ui/pickers';\nimport DateFnsUtils from '@date-io/date-fns';\nimport { compareAsc, compareDesc } from 'date-fns';\nimport { Grid, Box } from '@material-ui/core';\nimport { useTranslation } from 'react-i18next';\nimport { isEmpty } from 'lodash';\nimport { Alert } from '@material-ui/lab';\n\nexport type DatePickersProps = {\n fromDate: Date | null;\n toDate: Date | null;\n setFromDate: (date: Date | null) => void;\n setToDate: (date: Date | null) => void;\n};\n\nexport default function DatePickers(props: DatePickersProps) {\n\n const { fromDate, toDate, setFromDate, setToDate } = props;\n\n const { t } = useTranslation();\n\n const [ error, setError ] = useState(null);\n\n const handleFromDateChange = (date: Date | null) => {\n if (date === null) {\n return;\n }\n \n if (toDate === null) {\n setFromDate(date);\n return;\n }\n\n if (compareAsc(toDate, date) < 0) {\n setError(t('calculations-export-ui.date-picking-error'));\n return;\n }\n\n setFromDate(date);\n setError(null);\n };\n\n const handleToDateChange = (date: Date | null) => {\n if (date === null) {\n return;\n }\n\n if (fromDate === null) {\n setToDate(date);\n return;\n }\n \n if (compareDesc(fromDate, date) < 0) {\n setError(t('calculations-export-ui.date-picking-error'));\n return;\n }\n\n setToDate(date);\n setError(null);\n };\n\n return (\n \n \n \n \n \n \n \n \n \n \n \n\n {!isEmpty(error) && {error}}\n \n );\n}","import React, { useState, useEffect } from 'react';\nimport { Box, Button, CircularProgress } from '@material-ui/core';\nimport { Alert } from '@material-ui/lab';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { hasTechnicalRoleSelector, hasMarketingRoleSelector } from '../../store/user/user.selectors';\nimport { exportCalculations } from '../../store/calculations-export/calculations-export.action-creators';\nimport { errorSelector, isLoadingSelector, exportRowCountSelector } from '../../store/calculations-export/calculations-export.selectors';\nimport { isEmpty } from 'lodash';\nimport { Trans, useTranslation } from 'react-i18next';\nimport DatePickers from './DatePickers';\nimport { setError } from '../../store/calculations-export/calculations-export.actions';\n\nexport default function CalculationsExport() {\n\n const dispatch = useDispatch();\n const { t } = useTranslation();\n\n const error = useSelector(errorSelector);\n const isLoading = useSelector(isLoadingSelector);\n const exportRowCount = useSelector(exportRowCountSelector);\n\n const hasTechnicalRole = useSelector(hasTechnicalRoleSelector);\n const hasMarketingRole = useSelector(hasMarketingRoleSelector);\n\n const hasAccess = hasTechnicalRole || hasMarketingRole;\n\n const [fromDate, setFromDate] = useState(null);\n const [toDate, setToDate] = useState(null);\n\n const handleExportOnClick = () => {\n if (fromDate === null || toDate === null) {\n dispatch(setError(t('calculations-export-ui.export-validation-error')));\n return;\n }\n\n dispatch(exportCalculations(fromDate, toDate));\n }\n\n useEffect(() => {\n if (fromDate !== null && toDate !== null) {\n dispatch(setError(null));\n }\n }, [dispatch, fromDate, toDate]);\n\n return (\n \n

Export Calculations

\n\n {!hasAccess ?

no-permission

\n :
\n \n \n \n\n {isLoading && }\n\n \n \n \n\n {!isEmpty(error) && {error}}\n\n {exportRowCount && (\n
\n {t('calculations-export-ui.success', { count: exportRowCount.count as any })}\n\n {exportRowCount.limitReached && {t('calculations-export-ui.warning', { count: exportRowCount.count as any })}}\n
\n )}\n
}\n
\n );\n};\n","import {StoreModel} from \"../store.model\";\nimport {ConstructionTypeNewsItemsModel, NewsItemTableScreenModel} from \"../../types/domain/news-items.types\";\n\nexport const countryIdSelector = (state: StoreModel): string => state.newsItems.countryId;\n\nexport const allowedCultureIdsSelector = (state: StoreModel): string[] => state.newsItems.allowedCultures;\n\nexport const newsItemTableStateSelector = (state: StoreModel): NewsItemTableScreenModel => state.newsItems.newsItemTableScreen;\n\nexport const constructionTypeNewsItemsSelector = (state: StoreModel): ConstructionTypeNewsItemsModel => state.newsItems.constructionTypeNewsItems;\n","import axios from 'axios';\nimport {getAuthProvider} from '../../authentication/authProvider';\nimport {StoreModel} from '../store.model'\nimport {\n getConstructionTypeNewsItemsAttempt,\n getConstructionTypeNewsItemsFailure,\n getConstructionTypeNewsItemsSuccess,\n getNewsItemsAttempt,\n getNewsItemsFailure,\n getNewsItemsSuccess\n} from \"./news-items.actions\";\nimport {ConstructionTypeNewsItemUpdateModel, NewsItemData} from \"../../types/domain/news-items.types\";\nimport {isEmpty} from \"lodash\";\n\n\nexport type RequestResult = {\n success: boolean,\n error: string\n}\n\nconst urlRegex = new RegExp('https?://');\n\nconst urlHasProtocol = (url: string) => {\n return urlRegex.test(url);\n}\n\nconst urlIsBlank = (url: string) => {\n return url.replace(urlRegex, '') === '';\n}\n\nexport const createOrUpdateNewsItem = (data: NewsItemData) => async (dispatch: any): Promise => {\n\n let result: RequestResult = {success: false, error: \"\"};\n\n if (isEmpty(data.title)) {\n result.error = 'news-items-ui.validation-errors.missing-title';\n return result;\n }\n \n for (const item of data.newsItemContents) {\n if (isEmpty(item.url) || isEmpty(item.subject)) {\n result.error = 'news-items-ui.validation-errors.empty-fields';\n return result;\n }\n if (!urlHasProtocol(item.url)) {\n result.error = 'news-items-ui.validation-errors.no-protocol';\n return result;\n }\n if (urlIsBlank(item.url)) {\n result.error = 'news-items-ui.validation-errors.empty-url';\n return result;\n }\n }\n\n try {\n const token = await getAuthProvider().getIdToken();\n const requestResult = await axios.post(`api/NewsItems`, data,\n {\n headers: {\n \"Authorization\": `Bearer ${token.idToken.rawIdToken}`,\n \"Content-Type\": \"application/json\"\n },\n });\n\n if (requestResult.status === 200) {\n dispatch(loadNewsItems());\n\n result.success = true;\n return result;\n }\n } catch (error) {\n result.error = error.message;\n }\n\n return result;\n}\n\nexport const loadNewsItems = () => async (dispatch: any, getState: () => StoreModel) => {\n const countryId = getState().newsItems.countryId;\n dispatch(getNewsItemsAttempt());\n try {\n const token = await getAuthProvider().getIdToken();\n const requestResult = await axios.get(`/api/NewsItems?countryId=${countryId}`,\n {\n headers: {\n \"Authorization\": `Bearer ${token.idToken.rawIdToken}`,\n \"Content-Type\": \"application/json\"\n },\n });\n\n if (requestResult.status === 200) {\n dispatch(getNewsItemsSuccess(requestResult.data));\n }\n } catch (error) {\n dispatch(getNewsItemsFailure(error.message));\n }\n}\n\nexport const deleteNewsItem = (newsItemId: string) => async (dispatch: any): Promise => {\n let result: RequestResult = {success: false, error: \"\"};\n\n try {\n const token = await getAuthProvider().getIdToken();\n const requestResult = await axios.delete(`api/NewsItems/${newsItemId}`,\n {\n headers: {\n \"Authorization\": `Bearer ${token.idToken.rawIdToken}`,\n \"Content-Type\": \"application/json\"\n },\n });\n\n if (requestResult.status === 200) {\n dispatch(loadNewsItems());\n\n result.success = true;\n return result;\n }\n } catch (error) {\n result.error = error.message;\n }\n\n return result;\n}\n\nexport const loadConstructionTypeNewsItemsList = (countryId: string) => async (dispatch: any) => {\n dispatch(getConstructionTypeNewsItemsAttempt());\n try {\n const token = await getAuthProvider().getIdToken();\n const requestResult = await axios.get(`/api/ConstructionTypesNewsItem?countryId=${countryId}`,\n {\n headers: {\n \"Authorization\": `Bearer ${token.idToken.rawIdToken}`,\n \"Content-Type\": \"application/json\"\n },\n });\n\n if (requestResult.status === 200) {\n dispatch(getConstructionTypeNewsItemsSuccess(requestResult.data));\n }\n } catch (error) {\n dispatch(getConstructionTypeNewsItemsFailure(error.message));\n }\n}\n\nexport const createOrUpdateConstructionTypeNewsItem = (data: ConstructionTypeNewsItemUpdateModel) => async (dispatch: any): Promise => {\n let result: RequestResult = {success: false, error: \"\"};\n try {\n const token = await getAuthProvider().getIdToken();\n const requestResult = await axios.post(`/api/ConstructionTypesNewsItem`, data,\n {\n headers: {\n \"Authorization\": `Bearer ${token.idToken.rawIdToken}`,\n \"Content-Type\": \"application/json\"\n },\n });\n\n if (requestResult.status === 200) {\n dispatch(loadConstructionTypeNewsItemsList(data.countryId));\n\n result.success = true;\n return result;\n }\n } catch (error) {\n result.error = error.message;\n }\n\n return result;\n}\n\nexport const deleteConstructionTypeNewsItem = (countryId: string, constructionTypeId: string) => \n async (dispatch: any): Promise => {\n\n let result: RequestResult = {success: false, error: \"\"};\n try {\n const token = await getAuthProvider().getIdToken();\n const requestResult = await axios.delete(`api/ConstructionTypesNewsItem/${countryId}/${constructionTypeId}`,\n {\n headers: {\n \"Authorization\": `Bearer ${token.idToken.rawIdToken}`,\n \"Content-Type\": \"application/json\"\n },\n });\n if (requestResult.status === 200) {\n dispatch(loadConstructionTypeNewsItemsList(countryId));\n \n result.success = true;\n return result;\n }\n } catch (error) {\n result.error = error.message;\n }\n\n return result;\n }\n","import {\n GET_CONSTRUCTION_TYPE_NEWS_ITEMS_ATTEMPT,\n GET_CONSTRUCTION_TYPE_NEWS_ITEMS_FAILURE,\n GET_CONSTRUCTION_TYPE_NEWS_ITEMS_SUCCESS,\n GET_NEWS_ITEM_ATTEMPT,\n GET_NEWS_ITEM_FAILURE,\n GET_NEWS_ITEM_SUCCESS,\n GetConstructionTypeNewsItemsAttempt,\n GetConstructionTypeNewsItemsFailure,\n GetConstructionTypeNewsItemsSuccess,\n GetNewsItemsAttempt,\n GetNewsItemsFailure,\n GetNewsItemsSuccess,\n SET_ALLOWED_CULTURE_IDS,\n SET_COUNTRY_ID,\n SET_ERROR,\n SetAllowedCulturesId,\n SetCountryId,\n SetError,\n} from \"./news-items.action-types\";\nimport {ConstructionTypeNewsItemData, NewsItemData} from \"../../types/domain/news-items.types\";\n\n\nexport const setCountryId = (countryId: string): SetCountryId => ({\n type: SET_COUNTRY_ID,\n payload: countryId,\n});\n\nexport const setAllowedCulturesId = (allowedCultures: string[]): SetAllowedCulturesId => ({\n type: SET_ALLOWED_CULTURE_IDS,\n payload: allowedCultures,\n});\n\nexport const setError = (error: any): SetError => ({\n type: SET_ERROR,\n error: error,\n});\n\nexport const getNewsItemsAttempt = (): GetNewsItemsAttempt => ({\n type: GET_NEWS_ITEM_ATTEMPT\n});\n\nexport const getNewsItemsSuccess = (newsItemsData: NewsItemData[]): GetNewsItemsSuccess => ({\n type: GET_NEWS_ITEM_SUCCESS,\n payload: newsItemsData\n});\n\nexport const getNewsItemsFailure = (error: any): GetNewsItemsFailure => ({\n type: GET_NEWS_ITEM_FAILURE,\n error: error\n});\n\nexport const getConstructionTypeNewsItemsAttempt = (): GetConstructionTypeNewsItemsAttempt => ({\n type: GET_CONSTRUCTION_TYPE_NEWS_ITEMS_ATTEMPT\n});\n\nexport const getConstructionTypeNewsItemsSuccess = (constructionTypeNewsItemData: ConstructionTypeNewsItemData[]):\n GetConstructionTypeNewsItemsSuccess => ({\n type: GET_CONSTRUCTION_TYPE_NEWS_ITEMS_SUCCESS,\n payload: constructionTypeNewsItemData\n});\n\nexport const getConstructionTypeNewsItemsFailure = (error: any): GetConstructionTypeNewsItemsFailure => ({\n type: GET_CONSTRUCTION_TYPE_NEWS_ITEMS_FAILURE,\n error: error\n});\n","import React from \"react\";\nimport Button from \"@material-ui/core/Button\";\nimport TextField from \"@material-ui/core/TextField\";\nimport Dialog from \"@material-ui/core/Dialog\";\nimport DialogActions from \"@material-ui/core/DialogActions\";\nimport DialogContent from \"@material-ui/core/DialogContent\";\nimport DialogTitle from \"@material-ui/core/DialogTitle\";\nimport { Trans, useTranslation } from \"react-i18next\";\nimport { uuid } from \"../../../common/uuid\";\nimport { Box, Grid } from \"@material-ui/core\";\nimport { useDispatch, useSelector } from \"react-redux\";\nimport { allowedCultureIdsSelector, countryIdSelector, } from \"../../../store/news-items/news-items.selectors\";\nimport { createOrUpdateNewsItem } from \"../../../store/news-items/news-items.action-creators\";\nimport { isEmpty } from \"lodash\";\nimport { Alert } from \"@material-ui/lab\";\nimport { ThunkDispatch } from \"redux-thunk\";\nimport { AnyAction } from \"redux\";\nimport { NewsItemContent, NewsItemData } from \"../../../types/domain/news-items.types\";\n\ntype AppDispatch = ThunkDispatch;\n\nconst createNewsItemModel = (allowedCultureIds: string[]): { [newsItemContentId: string]: NewsItemContent } => {\n return allowedCultureIds.map(cultureId => ({\n newsItemContentId: uuid(),\n culture: cultureId,\n subject: \"\",\n url: \"\"\n } as NewsItemContent)).reduce((obj, item) => {\n return {\n ...obj,\n [item.newsItemContentId]: item\n };\n }, {});\n}\n\nexport type CreateNewsItemDialogProps = {\n onClose: () => void,\n};\n\nexport const CreateNewsItemDialog = (props: CreateNewsItemDialogProps) => {\n const { t } = useTranslation();\n const dispatch: AppDispatch = useDispatch();\n\n const selectedCountryId = useSelector(countryIdSelector);\n const allowedCultureIds = useSelector(allowedCultureIdsSelector);\n\n const [title, setTitle] = React.useState(\"\");\n const [newsItemContents, setNewsItemContents] = React.useState(createNewsItemModel(allowedCultureIds));\n const [requestResult, setRequestResult] = React.useState({ isLoading: false, error: \"\" });\n\n const { isLoading, error } = requestResult;\n\n const onUpdateItem = (id: string, updatedField: object) => {\n const newsItem = newsItemContents[id];\n\n setNewsItemContents((prevState) => {\n return {\n ...prevState,\n [newsItem.newsItemContentId]: {\n ...newsItem,\n ...updatedField\n }\n };\n });\n };\n\n const onSubmit = async () => {\n if (!requestResult.isLoading) {\n setRequestResult(prevState => ({ ...prevState, isLoading: true }))\n\n const data = {\n title: title,\n countryId: selectedCountryId,\n newsItemContents: Object.values(newsItemContents).map(item => (\n {\n culture: item.culture,\n subject: item.subject,\n url: item.url\n } as NewsItemContent\n ))\n } as NewsItemData;\n\n let result = await dispatch(createOrUpdateNewsItem(data));\n\n if (result.success) {\n props.onClose()\n } else {\n setRequestResult(prevState => ({ ...prevState, isLoading: false, error: t(result.error) }))\n }\n }\n }\n\n const newsItems = Object.values(newsItemContents).map((item) => {\n return (\n
\n {t(`culture-names.${item.culture}`)}\n \n onUpdateItem(item.newsItemContentId, { subject: e.target.value as string })}\n fullWidth\n />\n \n \n onUpdateItem(item.newsItemContentId, { url: e.target.value as string })}\n fullWidth\n />\n \n
\n );\n })\n\n return (\n \n \n \n Create News item\n \n \n \n setTitle(e.target.value as string)}\n fullWidth\n />\n {newsItems}\n {!isEmpty(error) && {error}}\n \n \n \n Cancel\n \n \n \n \n );\n};\n","import { v4 } from 'uuid';\n\n// For some reason its really hard to mock the uuid module directly,\n// so using this wrapper will all us to mock it in tests with low impact on code\nexport function uuid(): string {\n return v4();\n}\n","import Box from \"@material-ui/core/Box\";\nimport React from \"react\";\n\nimport { countryIdsSelector } from '../../../store/user/user.selectors';\n\nimport CountrySelection from '../../CountrySelection/CountrySelection';\nimport { fetchConstructionTypes } from '../../../store/construction-data/construction-data.action-creators';\nimport {useDispatch, useSelector} from \"react-redux\";\nimport {countryIdSelector} from \"../../../store/news-items/news-items.selectors\";\nimport {setAllowedCulturesId, setCountryId} from \"../../../store/news-items/news-items.actions\";\nimport { getAppConfig } from \"../../../config/config\";\n\nexport function SelectCountry() {\n const dispatch = useDispatch();\n const { supportedCulturesPerCountry } = getAppConfig();\n\n const countryIds = useSelector(countryIdsSelector);\n const selectedCountryId = useSelector(countryIdSelector);\n\n const handleCountryChange = React.useCallback((countryId: string) => {\n const allowedCultures = supportedCulturesPerCountry[countryId];\n\n dispatch(setCountryId(countryId));\n dispatch(fetchConstructionTypes(countryId));\n dispatch(setAllowedCulturesId(allowedCultures));\n }, [dispatch, supportedCulturesPerCountry]);\n\n React.useEffect(() => {\n if (!selectedCountryId) {\n handleCountryChange(countryIds[0]);\n }\n }, [countryIds, selectedCountryId, handleCountryChange])\n\n return \n handleCountryChange(e.target.value as string)}\n />\n \n}\n","import React, {forwardRef} from 'react';\nimport MaterialTable, {Icons} from 'material-table';\nimport AddBox from '@material-ui/icons/AddBox';\nimport ChevronRight from '@material-ui/icons/ChevronRight';\nimport Clear from '@material-ui/icons/Clear';\nimport Edit from '@material-ui/icons/Edit';\nimport Search from '@material-ui/icons/Search';\nimport {Box, CircularProgress, Grid} from \"@material-ui/core\";\nimport {useDispatch, useSelector} from \"react-redux\";\nimport {\n countryIdSelector,\n newsItemTableStateSelector\n} from \"../../store/news-items/news-items.selectors\";\nimport {loadNewsItems} from \"../../store/news-items/news-items.action-creators\";\nimport {isEmpty} from \"lodash\";\nimport {Alert} from \"@material-ui/lab\";\nimport {ArrowUpward} from \"@material-ui/icons\";\nimport {Trans, useTranslation} from 'react-i18next';\n\n\nconst tableIcons: Icons = {\n Add: forwardRef((props, ref) => ),\n Edit: forwardRef((props, ref) => ),\n Clear: forwardRef((props, ref) => ),\n DetailPanel: forwardRef((props, ref) => ),\n ResetSearch: forwardRef((props, ref) => ),\n Search: forwardRef((props, ref) => ),\n SortArrow: forwardRef((props, ref: React.Ref) => ),\n};\n\ntype ManageNewsTableProps = {\n setShowCreateItemDialog: React.Dispatch>,\n setEditCreateItemDialog: React.Dispatch>,\n}\n\nexport interface INewsItems {\n newsItemId: string;\n countryId: string;\n newsItemContents: (INewsItemContentsEntity)[];\n}\n\nexport interface INewsItemContentsEntity {\n newsItemContentId: string;\n culture: string;\n subject: string;\n url: string;\n}\n\nexport default function ManageNewsTable(props: ManageNewsTableProps) {\n const dispatch = useDispatch();\n const {t} = useTranslation();\n\n const selectedCountryId = useSelector(countryIdSelector);\n\n const tableState = useSelector(newsItemTableStateSelector);\n const {isLoading, error, newsItemsData} = tableState;\n\n React.useEffect(() => {\n if (selectedCountryId) {\n dispatch(loadNewsItems());\n }\n }, [dispatch, selectedCountryId])\n\n const data = newsItemsData.map(news => news.newsItemContents.map(newsItem => {\n const culture = t(`culture-names.${newsItem.culture}`);\n\n return {\n title: news.title,\n subject: newsItem.subject,\n url: newsItem.url,\n culture: culture\n };\n })).flat();\n\n return (\n \n {isLoading && }\n {!isLoading && \n Manage News Items\n }\n columns={[\n {title: 'Title', field: 'title', defaultGroupOrder: 0},\n {title: 'Subject', field: 'subject'},\n {title: 'URL', field: 'url'},\n {title: 'Language', field: 'culture'},\n ]}\n data={data}\n options={{\n grouping: false,\n paging: false\n }}\n actions={[\n {\n icon: () => ,\n tooltip: 'Create News Item',\n isFreeAction: true,\n onClick: () => props.setShowCreateItemDialog(true)\n },\n {\n icon: () => ,\n tooltip: 'Edit News Item',\n isFreeAction: true,\n disabled: data.length === 0,\n onClick: () => props.setEditCreateItemDialog(true)\n }\n ]}\n />\n }\n {!isLoading && !isEmpty(error) && {error}}\n \n );\n}\n","import React from \"react\";\nimport Dialog from \"@material-ui/core/Dialog\";\nimport DialogContent from \"@material-ui/core/DialogContent\";\nimport DialogTitle from \"@material-ui/core/DialogTitle\";\nimport { Trans, useTranslation } from \"react-i18next\";\nimport { Box, Grid, InputLabel, MenuItem, Select } from \"@material-ui/core\";\nimport { useDispatch, useSelector } from \"react-redux\";\nimport { ThunkDispatch } from \"redux-thunk\";\nimport { AnyAction } from \"redux\";\nimport { newsItemTableStateSelector } from \"../../../store/news-items/news-items.selectors\";\nimport TextField from \"@material-ui/core/TextField\";\nimport Button from \"@material-ui/core/Button\";\nimport DialogActions from \"@material-ui/core/DialogActions\";\nimport { createOrUpdateNewsItem, deleteNewsItem } from \"../../../store/news-items/news-items.action-creators\";\nimport { createStyles, makeStyles, Theme } from \"@material-ui/core/styles\";\nimport FormControl from \"@material-ui/core/FormControl\";\nimport { isEmpty } from \"lodash\";\nimport { Alert } from \"@material-ui/lab\";\nimport DialogContentText from \"@material-ui/core/DialogContentText\";\nimport { NewsItemData } from \"../../../types/domain/news-items.types\";\n\ntype AppDispatch = ThunkDispatch;\n\nexport type EditNewsItemDialogProps = {\n onClose: () => void,\n};\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n cancel: {\n flex: 1,\n alignSelf: \"flex-end\",\n justifyContent: \"left\"\n },\n formControl: {\n marginBottom: theme.spacing(5),\n },\n primaryAction: {\n minWidth: \"120px\"\n }\n })\n);\n\nexport const EditNewsItemDialog = (props: EditNewsItemDialogProps) => {\n const { t } = useTranslation();\n const classes = useStyles();\n\n const dispatch: AppDispatch = useDispatch();\n const tableState = useSelector(newsItemTableStateSelector);\n\n const { newsItemsData } = tableState;\n\n const [selectedNewsItem, setSelectedNewsItem] = React.useState();\n const [requestResult, setRequestResult] = React.useState({ isLoading: false, error: \"\" });\n const [showDeleteView, setShowDeleteView] = React.useState(false);\n\n const { isLoading, error } = requestResult;\n\n const onSelectNewsItem = (newsItemId: string) => {\n const newsItems = newsItemsData.find(x => x.newsItemId === newsItemId);\n setSelectedNewsItem(newsItems);\n }\n\n const onUpdateNewsTitle = (newTitle: string) => {\n setSelectedNewsItem(prevState => {\n if (prevState) {\n return { ...prevState, title: newTitle }\n }\n return prevState;\n });\n }\n\n const onUpdateNewsField = (newsItemContentId: string, updatedField: object) => {\n setSelectedNewsItem(prevState => {\n if (prevState) {\n let newsItemContentIdx = prevState.newsItemContents.findIndex(item => item.newsItemContentId === newsItemContentId);\n const newsItemContent = prevState.newsItemContents[newsItemContentIdx];\n return {\n ...prevState,\n newsItemContents: [\n ...prevState.newsItemContents.slice(0, newsItemContentIdx),\n { ...newsItemContent, ...updatedField },\n ...prevState.newsItemContents.slice(newsItemContentIdx + 1)\n ]\n }\n }\n return prevState;\n });\n }\n\n const onSubmit = async () => {\n if (!requestResult.isLoading) {\n setRequestResult(prevState => ({ ...prevState, isLoading: true }))\n if (selectedNewsItem) {\n let result = await dispatch(createOrUpdateNewsItem(selectedNewsItem));\n if (result.success) {\n props.onClose()\n } else {\n setRequestResult(prevState => ({ ...prevState, isLoading: false, error: t(result.error), success: result.success }))\n }\n }\n }\n }\n\n const onDeleteItem = async () => {\n if (!requestResult.isLoading && selectedNewsItem) {\n setRequestResult(prevState => ({ ...prevState, isLoading: true }))\n\n let result = await dispatch(deleteNewsItem(selectedNewsItem.newsItemId));\n\n if (result.success) {\n props.onClose()\n } else {\n setRequestResult(prevState => ({ ...prevState, isLoading: false, error: result.error }))\n }\n }\n }\n\n return (\n \n \n \n Edit News Item\n \n \n {!showDeleteView &&\n \n {!selectedNewsItem &&\n
\n \n \n \n Select News Title\n \n \n onSelectNewsItem(e.target.value as string)}\n >\n {newsItemsData.map(newsItem => (\n \n {newsItem.title}\n \n ))}\n \n \n \n \n Cancel\n \n\n \n
}\n {selectedNewsItem &&
\n <>\n onUpdateNewsTitle(e.target.value as string)}\n fullWidth\n />\n {selectedNewsItem.newsItemContents.map(item => {\n return (\n
\n {t(`culture-names.${item.culture}`)}\n \n onUpdateNewsField(item.newsItemContentId, { subject: e.target.value as string })}\n fullWidth\n />\n onUpdateNewsField(item.newsItemContentId, { url: e.target.value as string })}\n fullWidth\n />\n \n
\n )\n })}\n \n \n Cancel\n \n setShowDeleteView(true)}\n >\n \n Delete\n \n \n \n \n \n
}\n {!isLoading && !isEmpty(error) && {error}}\n
\n }\n {showDeleteView && selectedNewsItem &&\n
\n \n \n \n You are about to delete the following Item: {selectedNewsItem.title}\n \n \n \n \n \n \n
}\n \n );\n};\n","import React, { forwardRef } from 'react';\nimport MaterialTable, { Icons } from 'material-table';\nimport Clear from '@material-ui/icons/Clear';\nimport Edit from '@material-ui/icons/Edit';\nimport Search from '@material-ui/icons/Search';\nimport { CircularProgress, Box, Grid } from \"@material-ui/core\";\nimport { ArrowUpward, Check } from \"@material-ui/icons\";\nimport { useDispatch, useSelector } from \"react-redux\";\nimport { createOrUpdateConstructionTypeNewsItem, deleteConstructionTypeNewsItem, } from \"../../../store/news-items/news-items.action-creators\";\nimport { constructionTypeNewsItemsSelector, countryIdSelector } from \"../../../store/news-items/news-items.selectors\";\nimport { ConstructionTypeNewsItemUpdateModel } from \"../../../types/domain/news-items.types\";\nimport { useManageAssociationState, Row, unassignedNewsItemId } from \"./use-manage-association.state\";\nimport { Trans } from \"react-i18next\";\n\nconst tableIcons: Icons = {\n Edit: forwardRef((props, ref) => ),\n Clear: forwardRef((props, ref) => ),\n ResetSearch: forwardRef((props, ref) => ),\n Search: forwardRef((props, ref) => ),\n SortArrow: forwardRef((props, ref: React.Ref) => ),\n Check: forwardRef((props, ref) => ),\n};\n\nexport default function ManageAssociationTable() {\n const dispatch = useDispatch();\n const constructionTypeNewsItems = useSelector(constructionTypeNewsItemsSelector);\n const selectedCountryId = useSelector(countryIdSelector);\n\n const { tableData, tableColumns } = useManageAssociationState();\n\n const onUpdate = (newData: Row): Promise => {\n return new Promise((resolve) => {\n const constructionTypeNewsItem = constructionTypeNewsItems.constructionTypeNewsItemsData.find(item => item.constructionTypeId === newData.constructionTypeId);\n\n if (newData.newsItemId === unassignedNewsItemId && constructionTypeNewsItem) {\n dispatch(deleteConstructionTypeNewsItem(constructionTypeNewsItem.countryId, constructionTypeNewsItem.constructionTypeId));\n } else if (constructionTypeNewsItem) {\n // item already exists -> update\n const payload: ConstructionTypeNewsItemUpdateModel = {\n constructionTypeId: constructionTypeNewsItem.constructionTypeId,\n countryId: constructionTypeNewsItem.countryId,\n newsItemId: newData.newsItemId\n };\n dispatch(createOrUpdateConstructionTypeNewsItem(payload));\n } else if (newData.newsItemId !== unassignedNewsItemId){\n // create new item\n const payload: ConstructionTypeNewsItemUpdateModel = {\n constructionTypeId: newData.constructionTypeId,\n countryId: selectedCountryId,\n newsItemId: newData.newsItemId\n };\n dispatch(createOrUpdateConstructionTypeNewsItem(payload));\n }\n resolve();\n });\n }\n\n return (\n \n {constructionTypeNewsItems.isLoading && }\n {!constructionTypeNewsItems.isLoading && \n \n Associate News Items\n }\n icons={tableIcons}\n columns={tableColumns}\n data={tableData}\n options={{\n paging: false,\n actionsColumnIndex: -1\n }}\n editable={{\n onRowUpdate: (newData, _) => onUpdate(newData)\n }}\n />\n \n }\n \n );\n}\n","import React from \"react\";\n\nimport { useDispatch, useSelector } from \"react-redux\";\nimport { useTranslation } from \"react-i18next\";\nimport { constructionTypesSelector } from \"../../../store/construction-data/construction-data.selectors\";\nimport {\n constructionTypeNewsItemsSelector,\n countryIdSelector,\n newsItemTableStateSelector\n} from \"../../../store/news-items/news-items.selectors\";\nimport { loadConstructionTypeNewsItemsList } from \"../../../store/news-items/news-items.action-creators\";\n\nimport { Column } from \"material-table\";\n\nexport interface Row {\n constructionTypeId: string;\n constructionTypeNameLocalized: string;\n newsItemId: string;\n}\n\nexport interface TableState {\n tableColumns: Array>;\n tableData: Row[];\n}\n\nexport const unassignedNewsItemId = 'unassigned-news-item' as string;\n\nexport function useManageAssociationState() {\n const dispatch = useDispatch();\n const { t } = useTranslation();\n const allConstructionTypes = useSelector(constructionTypesSelector);\n const selectedCountryId = useSelector(countryIdSelector);\n const constructionTypeNewsItems = useSelector(constructionTypeNewsItemsSelector);\n const newsItemTableState = useSelector(newsItemTableStateSelector);\n const { newsItemsData } = newsItemTableState;\n\n React.useEffect(() => {\n if (selectedCountryId) {\n if (selectedCountryId) {\n dispatch(loadConstructionTypeNewsItemsList(selectedCountryId));\n }\n }\n }, [dispatch, selectedCountryId]);\n\n const getAssignedConstructionNewsItems = React.useCallback((): Row[] => {\n return constructionTypeNewsItems.constructionTypeNewsItemsData.map(item => ({\n constructionTypeId: item.constructionTypeId,\n constructionTypeNameLocalized: allConstructionTypes.find(ct => ct.id === item.constructionTypeId)?.constructionTypeNameLocalized ?? item.constructionTypeId,\n newsItemTitle: item.newsItemTitle,\n newsItemId: item.newsItemId\n }));\n }, [constructionTypeNewsItems, allConstructionTypes]);\n\n\n const getUnassignedConstructionNewsItems = React.useCallback((): Row[] => {\n const assignedConstructionTypeIds = constructionTypeNewsItems.constructionTypeNewsItemsData.map(x => x.constructionTypeId)\n return allConstructionTypes.filter(c => !assignedConstructionTypeIds.includes(c.id)).map(x => ({\n constructionTypeId: x.id,\n constructionTypeNameLocalized: x.constructionTypeNameLocalized,\n newsItemTitle: '',\n newsItemId: unassignedNewsItemId\n }) as Row);\n }, [constructionTypeNewsItems.constructionTypeNewsItemsData, allConstructionTypes]);\n\n const getNewsItemLookup = React.useCallback(() => {\n let data: any = { };\n data[unassignedNewsItemId] = t('news-items-ui.unassigned');\n // @ts-ignore\n newsItemsData.forEach(newsItem => data[newsItem.newsItemId] = newsItem.title)\n return data;\n }, [newsItemsData, t])\n\n const createTableState = React.useCallback((data: Row[], lookupItems: {}): TableState => ({\n tableColumns: [\n {\n title: 'Construction Type',\n field: 'constructionTypeNameLocalized',\n editable: 'never'\n },\n {\n title: 'News Item',\n field: 'newsItemId',\n lookup: lookupItems,\n },\n ],\n tableData: data,\n }), [])\n\n const [tableState, setTableState] = React.useState(createTableState([], {}));\n\n React.useEffect(() => {\n const newTableState = createTableState([...getAssignedConstructionNewsItems(), ...getUnassignedConstructionNewsItems()], getNewsItemLookup());\n setTableState(newTableState);\n }, [getNewsItemLookup, getAssignedConstructionNewsItems, getUnassignedConstructionNewsItems, createTableState]);\n\n return tableState;\n}\n","import React from 'react';\nimport Grid from '@material-ui/core/Grid'\nimport { CreateNewsItemDialog } from \"./CreateNewsItemDialog/CreateNewsItemDialog\";\nimport { SelectCountry } from \"./SelectCountry/SelectCountry\";\nimport ManageNewsTable from \"./NewsManagerTable\";\nimport { EditNewsItemDialog } from \"./EditNewsItemDialog/EditNewsItemDialog\";\nimport { useSelector } from \"react-redux\";\nimport { hasMarketingRoleSelector } from \"../../store/user/user.selectors\";\nimport { Trans } from \"react-i18next\";\nimport ManageAssociationTable from \"./ManageAssociationTable/ManageAssociationTable\";\n\nexport default function NewsItems() {\n const [showCreateItemDialog, setShowCreateItemDialog] = React.useState(false);\n const [showEditItemDialog, setShowEditItemDialog] = React.useState(false);\n const hasMarketingRole = useSelector(hasMarketingRoleSelector);\n\n if (!hasMarketingRole) return

no-permission

;\n\n return (\n
\n \n \n {showCreateItemDialog && setShowCreateItemDialog(false)} />}\n {showEditItemDialog && setShowEditItemDialog(false)} />}\n \n \n \n
\n );\n}\n","import { Box, CircularProgress, Grid } from '@material-ui/core';\nimport Button from '@material-ui/core/Button';\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogActions from '@material-ui/core/DialogActions';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport DialogTitle from '@material-ui/core/DialogTitle';\nimport FormControl from '@material-ui/core/FormControl';\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\nimport FormLabel from '@material-ui/core/FormLabel';\nimport Radio from '@material-ui/core/Radio';\nimport RadioGroup from '@material-ui/core/RadioGroup';\nimport Typography from '@material-ui/core/Typography';\nimport { Alert } from '@material-ui/lab';\nimport axios from 'axios';\nimport React from 'react';\nimport { Trans } from 'react-i18next';\nimport { toast } from 'react-toastify';\n\nimport { getAuthProvider } from '../../authentication/authProvider';\nimport { CountryModel } from './CountryModel';\n\nexport type EditCountryDialogProps = {\n country: CountryModel | null;\n setCountryUnderEdit: React.Dispatch>;\n setCountryUpdated: React.Dispatch>;\n onClose: () => void;\n};\n\nexport const EditCountryDialog = (props: EditCountryDialogProps) => {\n\n const [isLoading, setIsLoading] = React.useState(false);\n\n const handleResultTypeChange = (event: { target: { value: React.SetStateAction; }; }) => {\n props.setCountryUnderEdit((previousCountry) => {\n return {\n ...(previousCountry as CountryModel), resultType: event.target.value as string\n }\n });\n };\n\n const handleIsVisibleToPublicChange = (event: { target: { value: React.SetStateAction; }; }) => {\n const isVisibleToPublic: boolean = event.target.value === \"true\";\n props.setCountryUnderEdit((previousCountry) => {\n return {\n ...(previousCountry as CountryModel), isVisibleToPublic: isVisibleToPublic\n }\n });\n };\n\n const onSave = async () => {\n setIsLoading(true);\n const token = await getAuthProvider().getIdToken();\n\n axios.put(\"/api/countries\", props.country, {\n headers: { \"Authorization\": `Bearer ${token.idToken.rawIdToken}` }\n }).then(function (response) {\n toast.success(props.country?.name + \" updated successfully.\")\n setIsLoading(false);\n props.setCountryUpdated(props.country);\n props.onClose();\n console.info(response);\n }).catch(function (error) {\n toast.error(error);\n console.error(error);\n setIsLoading(false);\n });\n }\n\n return (\n \n \n \n Edit Country\n \n \n\n {\n isLoading && \n }\n\n {\n !isLoading && <>\n \n
\n \n \n Country Details\n \n \n \n\n \n \n Country Name\n \n \n \n {props.country?.name}\n \n\n \n \n Country Code\n \n \n \n {props.country?.countryId}\n \n\n \n \n \n \n Result Type\n \n \n \n } label=\"U-value\" />\n } label=\"Rc-value\" />\n \n \n \n\n \n \n \n \n Country visible to the public?\n \n \n \n } label=\"Enabled\" />\n } label=\"Disabled\" />\n \n \n\n \n \n When a country is enabled, that country is visible to the public from the customer facing website with a URL\n containing the country code shown on this page. Changes are applied when you select the save button below.\n \n \n \n\n \n
\n
\n\n \n \n Cancel\n \n \n Save\n \n \n \n }\n \n );\n};","import { Box, CircularProgress, Grid } from '@material-ui/core';\nimport Edit from '@material-ui/icons/Edit';\nimport MaterialTable from 'material-table';\nimport React, { useEffect, useState } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { toast } from 'react-toastify';\n\nimport { getCountries } from '../../common/countries';\nimport { CountryModel } from './CountryModel';\nimport { EditCountryDialog } from './EditCountryDialog';\n\nexport default function ManageCountriesTable() {\n\n const { t } = useTranslation();\n const apiErrorMessage = t(\"countries-ui.countries-table.countries-api-error\");\n\n const [isLoading, setIsLoading] = useState(true);\n const [countryRows, setCountryRows] = useState([]);\n const [showEditCountryDialog, setShowEditCountryDialog] = useState(false);\n const [countryUnderEdit, setCountryUnderEdit] = useState(null);\n const [countryUpdated, setCountryUpdated] = useState(null);\n\n useEffect(() => {\n setIsLoading(true);\n getCountries().then(result => {\n setCountryRows(result.data);\n setIsLoading(false);\n }).catch(error => {\n toast.error(apiErrorMessage);\n console.error(error);\n setIsLoading(false);\n });\n }, [apiErrorMessage, countryUpdated]);\n\n function editCountry(country: CountryModel): void {\n setCountryUnderEdit(country);\n setShowEditCountryDialog(true);\n };\n\n return (\n <>\n\n {\n showEditCountryDialog &&\n setShowEditCountryDialog(false)}\n country={countryUnderEdit}\n setCountryUnderEdit={setCountryUnderEdit}\n setCountryUpdated={setCountryUpdated}\n />\n }\n\n {\n isLoading && \n }\n\n {\n !isLoading &&\n \n \n t(countryRow.resultType)\n },\n {\n title: t(\"countries-ui.countries-table.header-is-visible-to-public\"),\n field: \"isVisibleToPublic\",\n render: countryRow => countryRow.isVisibleToPublic ? t(\"yes\") : t(\"no\")\n }\n ]}\n data={countryRows}\n actions={[\n countryRow => ({\n icon: () => ,\n tooltip: countryRow.canEdit\n ? t('countries-ui.countries-table.edit-button-tootip-default', { countryName: countryRow.name })\n : t('countries-ui.countries-table.edit-button-tootip-denied', { countryName: countryRow.name }),\n onClick: (_event: any, data: any): void => editCountry(data),\n disabled: !countryRow.canEdit\n })\n ]}\n options={{\n actionsColumnIndex: -1,\n search: false,\n sorting: false,\n paging: false,\n toolbar: false,\n draggable: false\n }}\n />\n \n \n }\n \n );\n};\n","import { Box } from '@material-ui/core';\nimport React from 'react';\nimport { Trans } from 'react-i18next';\n\nimport ManageCountriesTable from './ManageCountriesTable';\n\nexport const CountryList = () => {\n\n return (\n \n

\n Countries\n

\n\n \n\n
\n );\n}\n","import React from 'react';\nimport { AppBar, Tabs, Tab, Box, Grid } from '@material-ui/core';\nimport MasterDataDownload from '../MasterData/MasterDataDownload';\nimport MasterDataUpload from '../MasterData/MasterDataUpload';\nimport CalculationsExport from '../CalculationsExport/CalculationsExport';\nimport NewsItems from '../NewsItems/NewsItems';\nimport { useTranslation } from 'react-i18next';\nimport { CountryList } from '../Countries/CountryList';\n\ninterface TabPanelProps {\n children?: React.ReactNode;\n index: any;\n value: any;\n}\n\nfunction TabPanel(props: TabPanelProps) {\n const { children, value, index, ...other } = props;\n\n return (\n