diff --git a/docker-compose.fd.ci.yml b/docker-compose.fd.ci.yml index 712410c2b..0fb548101 100644 --- a/docker-compose.fd.ci.yml +++ b/docker-compose.fd.ci.yml @@ -21,6 +21,7 @@ services: SENTRY_DSN: '' SERVICE_PROVIDER: fd LANGUAGE_CENTER_VIEW_ENABLED: 'false' # currently no intention to be enabled + SIS_URL: 'https://sis-qa.funidata.fi' NODE_ENV: production image: ${DOCKER_OODIKONE_NAMESPACE:-637423527834.dkr.ecr.eu-north-1.amazonaws.com/oodikone}/oodikone-frontend:${DOCKER_IMAGE_TAG:-dev} diff --git a/docker-compose.fd.yml b/docker-compose.fd.yml index b97cbb212..01572346a 100644 --- a/docker-compose.fd.yml +++ b/docker-compose.fd.yml @@ -64,6 +64,7 @@ services: environment: REACT_APP_SERVICE_PROVIDER: fd REACT_APP_LANGUAGE_CENTER_VIEW_ENABLED: 'false' + REACT_APP_SIS_URL: 'https://sis-qa.funidata.fi' volumes: - ./services/frontend/src/:/opt/app-root/src/src - ./services/shared/:/opt/app-root/src/src/shared diff --git a/services/frontend/Dockerfile b/services/frontend/Dockerfile index 717037139..38c2d0966 100644 --- a/services/frontend/Dockerfile +++ b/services/frontend/Dockerfile @@ -32,6 +32,9 @@ ENV REACT_APP_SERVICE_PROVIDER=$SERVICE_PROVIDER ARG LANGUAGE_CENTER_VIEW_ENABLED ENV REACT_APP_LANGUAGE_CENTER_VIEW_ENABLED=$LANGUAGE_CENTER_VIEW_ENABLED +ARG SIS_URL +ENV REACT_APP_SIS_URL=$SIS_URL + COPY ./frontend/package* ./ RUN npm ci --include=dev COPY ./frontend . diff --git a/services/frontend/src/components/common/SisuLinkItem.tsx b/services/frontend/src/components/common/SisuLinkItem.tsx index 3502111eb..7b42dd23d 100644 --- a/services/frontend/src/components/common/SisuLinkItem.tsx +++ b/services/frontend/src/components/common/SisuLinkItem.tsx @@ -1,4 +1,5 @@ import { Icon, Item } from 'semantic-ui-react' +import { sisUrl } from '@/conf' interface SisuLinkItemProps { id: string @@ -6,7 +7,7 @@ interface SisuLinkItemProps { export const SisuLinkItem = ({ id }: SisuLinkItemProps) => (
- + Sisu diff --git a/services/frontend/src/components/material/StudentInfoItem.tsx b/services/frontend/src/components/material/StudentInfoItem.tsx index 169af5c2e..09a82f5e2 100644 --- a/services/frontend/src/components/material/StudentInfoItem.tsx +++ b/services/frontend/src/components/material/StudentInfoItem.tsx @@ -1,7 +1,7 @@ import { Person as PersonIcon } from '@mui/icons-material' import { IconButton, Stack } from '@mui/material' import { Link } from 'react-router' - +import { sisUrl } from '@/conf' import { ExternalLink } from './Footer/ExternalLink' export const StudentInfoItem = ({ sisPersonId, studentNumber }: { sisPersonId: string; studentNumber: string }) => ( @@ -11,10 +11,7 @@ export const StudentInfoItem = ({ sisPersonId, studentNumber }: { sisPersonId: s - + ) diff --git a/services/frontend/src/conf.js b/services/frontend/src/conf.js index bcbe6eb55..aace378c0 100644 --- a/services/frontend/src/conf.js +++ b/services/frontend/src/conf.js @@ -28,3 +28,6 @@ export const serviceProvider = process.env.REACT_APP_SERVICE_PROVIDER export const languageCenterViewEnabled = !process.env.REACT_APP_LANGUAGE_CENTER_VIEW_ENABLED ? true : process.env.REACT_APP_LANGUAGE_CENTER_VIEW_ENABLED === 'true' + +// SISU url +export const sisUrl = process.env.REACT_APP_SIS_URL ? process.env.REACT_APP_SIS_URL : 'https://sisu.helsinki.fi' diff --git a/services/frontend/src/pages/Students/StudentDetails/StudentInfoCard.tsx b/services/frontend/src/pages/Students/StudentDetails/StudentInfoCard.tsx index c98a61a61..f0fbf90e4 100644 --- a/services/frontend/src/pages/Students/StudentDetails/StudentInfoCard.tsx +++ b/services/frontend/src/pages/Students/StudentDetails/StudentInfoCard.tsx @@ -4,6 +4,7 @@ import { Card, CardContent, Typography, Button, Stack } from '@mui/material' import { callApi } from '@/apiConnection' import { ExternalLink } from '@/components/material/Footer/ExternalLink' import { useStudentNameVisibility } from '@/components/StudentNameVisibilityToggle' +import { sisUrl } from '@/conf' import { DISPLAY_DATE_FORMAT, DISPLAY_DATE_FORMAT_DEV } from '@/constants/date' import { useGetAuthorizedUserQuery } from '@/redux/auth' import { reformatDate } from '@/util/timeAndDate' @@ -31,7 +32,7 @@ export const StudentInfoCard = ({ student }) => {