Skip to content

Commit

Permalink
Merge pull request #643 from Rushikesh-Sonawane99/release-1.1.0
Browse files Browse the repository at this point in the history
Issue #PS-000 chore: Updated Heading for surveys page
  • Loading branch information
itsvick authored Jan 24, 2025
2 parents a8add86 + 11c4c20 commit 9a85619
Showing 1 changed file with 30 additions and 10 deletions.
40 changes: 30 additions & 10 deletions src/pages/observation/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import { serverSideTranslations } from 'next-i18next/serverSideTranslations';
import { useRouter } from 'next/router';
import React, { useEffect, useState } from 'react';
import { entityList } from '../../../app.config';
import { useTheme } from '@mui/material/styles';

const ObservationForms: React.FC = () => {
const [entityNames, setEntityNames] = useState<String[]>();
Expand All @@ -33,6 +34,7 @@ const ObservationForms: React.FC = () => {
);
const router = useRouter();
const { t } = useTranslation();
const theme = useTheme<any>();
const [selectedOption, setSelectedOption] = useState('all');
const [sortOrder, setSortOrder] = useState('');
const currentDate = new Date();
Expand Down Expand Up @@ -236,6 +238,21 @@ const ObservationForms: React.FC = () => {
return (
<div>
<Header />
<Box
display={'flex'}
width={'100%'}
sx={{ backgroundColor: theme.palette.warning['A400'] }}
>
<Typography
textAlign={'left'}
fontSize={'22px'}
m={'1.5rem 1.2rem 0.8rem'}
color={theme?.palette?.warning['300']}
className="joyride-step-1"
>
{t('YOUTHNET_SURVEY.SURVEY')}
</Typography>
</Box>
<Box sx={{ borderBottom: 1, borderColor: 'divider' }}>
<Tabs
value={value}
Expand Down Expand Up @@ -286,13 +303,12 @@ const ObservationForms: React.FC = () => {
{value === 0 && (
<FormControl
sx={{
width: { xs: '100%', sm: '100%', md: "100%" },
width: { xs: '100%', sm: '100%', md: '100%' },
}}
variant="outlined"
margin="normal"
>
<InputLabel sx=
{{ mx: '20px' }} id="days-sort-label">
<InputLabel sx={{ mx: '20px' }} id="days-sort-label">
<Typography variant="h3">
{t('OBSERVATION.DAYS_LEFT')}{' '}
</Typography>
Expand All @@ -302,10 +318,14 @@ const ObservationForms: React.FC = () => {
value={sortOrder}
onChange={handleSortChange}
label={t('OBSERVATION.DAYS_LEFT')}
sx={{ height: '50px' , mx:'20px' }}
sx={{ height: '50px', mx: '20px' }}
>
<MenuItem value="lowToHigh">{t('COMMON.LOW_TO_HIGH')}</MenuItem>
<MenuItem value="highToLow">{t('COMMON.HIGH_TO_LOW')}</MenuItem>
<MenuItem value="lowToHigh">
{t('COMMON.LOW_TO_HIGH')}
</MenuItem>
<MenuItem value="highToLow">
{t('COMMON.HIGH_TO_LOW')}
</MenuItem>
</Select>
</FormControl>
)}
Expand All @@ -316,7 +336,7 @@ const ObservationForms: React.FC = () => {
window.localStorage &&
localStorage.getItem('role') === Role.TEAM_LEADER && (
<FilterSelect
px={"20px"}
px={'20px'}
menuItems={menuItems}
selectedOption={selectedOption}
handleFilterChange={handleFilterChange}
Expand Down Expand Up @@ -345,9 +365,9 @@ const ObservationForms: React.FC = () => {
<Box>
<Grid container spacing={2}>
{value === 0 &&
filteredObservationData.filter(
(item: any) => item.entityType === name
).length > 0 ? (
filteredObservationData.filter(
(item: any) => item.entityType === name
).length > 0 ? (
filteredObservationData
.filter(
(item: any) =>
Expand Down

0 comments on commit 9a85619

Please sign in to comment.