diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 7ddfac9d5..71bba2007 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -27,16 +27,16 @@ stages: - task: DownloadSecureFile@1 displayName: 'download STAG frontend' inputs: - secureFile: 'FRONTEND_ENV_FILE_STAG' # string. Required. Secure File. + secureFile: 'FRONTEND_ENV_FILE_STAG_UPDATED' # string. Required. Secure File. - task: CopyFiles@2 displayName: 'copy STAG frontend' inputs: SourceFolder: '$(Agent.TempDirectory)' - Contents: FRONTEND_ENV_FILE_STAG + Contents: FRONTEND_ENV_FILE_STAG_UPDATED TargetFolder: './frontend' - - script: mv ./frontend/FRONTEND_ENV_FILE_STAG ./frontend/.env + - script: mv ./frontend/FRONTEND_ENV_FILE_STAG_UPDATED ./frontend/.env displayName: 'rename STAG .env' - script: ls -a ./frontend diff --git a/backend/misc/config.js b/backend/misc/config.js index b7ee7deba..123bf9314 100644 --- a/backend/misc/config.js +++ b/backend/misc/config.js @@ -115,7 +115,7 @@ const settings = { }, REDIS_PASSWORD: { required: false, - value: process.env.REDIS_PASSWORD || 'NOPE' + value: process.env.REDIS_PASSWORD || 'NOPE', }, } @@ -127,7 +127,7 @@ const buildConfig = () => { config[key] = obj.default } else { throw new Error( - `Invalid configuration: ${key} must be provided a value from .env, or a default value. See config.js` + `Invalid configuration: ${key} must be provided a value from .env, or a default value. See config.js`, ) } } else { @@ -142,7 +142,7 @@ const config = buildConfig() logger.info({ message: 'Running app with config', - data: config, + // data: config, }) global.gConfig = config diff --git a/frontend/public/index.html b/frontend/public/index.html index 254d9d3df..5de95e8d6 100755 --- a/frontend/public/index.html +++ b/frontend/public/index.html @@ -1,26 +1,50 @@ - - - - - - - - - - - - - - + + + + + + + + - + - - - - %REACT_APP_PAGE_TITLE% - - - + + %REACT_APP_PAGE_TITLE% - + html, + body { + height: 100%; + } - + body { + position: absolute; + left: -17px; + right: -17px; + padding-top: 0; + padding-right: 17px !important; + padding-left: 17px; + padding-bottom: 0px; + overflow-x: hidden; + overflow-y: auto !important; //Remove the !important if you want the scroll bar to disappear + } + + - - -
- - - - - \ No newline at end of file + --> + diff --git a/frontend/src/constants/config.js b/frontend/src/constants/config.js index 0a49e5cdf..7190e238d 100644 --- a/frontend/src/constants/config.js +++ b/frontend/src/constants/config.js @@ -13,9 +13,9 @@ const settings = { required: true, value: process.env.REACT_APP_BASE_URL, }, - WEB_SOCET_URL: { + WEB_SOCKET_URL: { required: false, - value: process.env.REACT_APP_WEB_SOCET_URL, + value: process.env.REACT_APP_WEB_SOCKET_URL, }, CALENDAR_URL: { required: false, @@ -38,7 +38,8 @@ const settings = { ID_TOKEN_NAMESPACE: { required: true, value: - process.env.REACT_APP_ID_TOKEN_NAMESPACE || 'https://eu.junctionplatform.com/', + process.env.REACT_APP_ID_TOKEN_NAMESPACE || + 'https://eu.junctionplatform.com/', }, IS_DEBUG: { default: process.env.REACT_APP_IS_DEBUG === 'true', diff --git a/frontend/src/graphql/client.js b/frontend/src/graphql/client.js index 9722f22ad..bb164c25c 100644 --- a/frontend/src/graphql/client.js +++ b/frontend/src/graphql/client.js @@ -30,7 +30,7 @@ const errorLink = onError(({ graphQLErrors, networkError }) => { export default idToken => { const wsLink = new GraphQLWsLink( createClient({ - url: config.WEB_SOCET_URL,//TODO: is this causing renew loop problem? + url: config.WEB_SOCKET_URL,//TODO: is this causing renew loop problem? connectionParams: { authToken: idToken }, }), ) diff --git a/frontend/src/pages/_dashboard/renderDashboard/index.js b/frontend/src/pages/_dashboard/renderDashboard/index.js index 3a7b6bcbc..3d4220151 100644 --- a/frontend/src/pages/_dashboard/renderDashboard/index.js +++ b/frontend/src/pages/_dashboard/renderDashboard/index.js @@ -81,6 +81,7 @@ export default role => { // Must use lazy query because event is fetched asynchnronously const [getAlerts, { loading: alertsLoading, data: alertsData }] = useLazyQuery(ALERTS_QUERY) + useEffect(() => { if (event) { getAlerts({ variables: { eventId: event._id } }) @@ -129,7 +130,6 @@ export default role => { return newArray }) } - // eslint-disable-next-line react-hooks/exhaustive-deps }, [alertsData, setAlerts, newAlert, setAlertCount]) /** Update project when team changes */ diff --git a/frontend/src/pages/_dashboard/renderDashboard/organiser/participants/teams/index.js b/frontend/src/pages/_dashboard/renderDashboard/organiser/participants/teams/index.js index 9f0e7c53a..b3abe3c32 100644 --- a/frontend/src/pages/_dashboard/renderDashboard/organiser/participants/teams/index.js +++ b/frontend/src/pages/_dashboard/renderDashboard/organiser/participants/teams/index.js @@ -14,23 +14,19 @@ export default () => { const registrationsLoading = useSelector( OrganiserSelectors.registrationsLoading, ) + const challengeList = [] const teamsLoading = useSelector(OrganiserSelectors.teamsLoading) - const challengeList = event?.challenges || [] - - if (challengeList.length > 0) { - challengeList.forEach(challenge => { - challenge.teamCount = 0 - }) - } - - if (teams.length > 0) { - teams.map(team => { - challengeList.find(challenge => { - if (challenge._id === team.challenge) { - challenge.teamCount += 1 - } + if (event?.challenges && event?.challenges.length > 0) { + challengeList.push(...event?.challenges.map(challenge => ({ ...challenge, teamCount: 0 }))) + if (teams.length > 0) { + teams.map(team => { + challengeList.find(challenge => { + if (challenge._id === team.challenge) { + challenge.teamCount += 1 + } + }) }) - }) + } } return ( diff --git a/shared/schemas/Challenge.js b/shared/schemas/Challenge.js index 397607fb1..7a229c152 100644 --- a/shared/schemas/Challenge.js +++ b/shared/schemas/Challenge.js @@ -46,30 +46,6 @@ const ChallengeSchema = new mongoose.Schema({ companyInfo: { type: String, }, - title: { - type: String, - }, - subtitle: { - type: String, - }, - description: { - type: String, - }, - insights: { - type: String, - }, - resources: { - type: String, - }, - prizes: { - type: String, - }, - criteria: { - type: String, - }, - companyInfo: { - type: String, - }, logo: CloudinaryImageSchema.mongoose, }) @@ -97,15 +73,6 @@ const ChallengeType = new GraphQLObjectType({ description: { type: GraphQLString, }, - title: { - type: GraphQLString, - }, - subtitle: { - type: GraphQLString, - }, - description: { - type: GraphQLString, - }, insights: { type: GraphQLString, },