Skip to content

Commit

Permalink
[M1_TR-212] Convert indent to space
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoleamber committed Sep 20, 2023
1 parent 6b414f8 commit 68e7998
Show file tree
Hide file tree
Showing 32 changed files with 963 additions and 986 deletions.
10 changes: 5 additions & 5 deletions web/src/app/job/hooks.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { useState } from 'react';

export const useHooks = () => {
const [page, setPage] = useState(1);
const [page, setPage] = useState(1);

return {
page,
setPage
};
return {
page,
setPage
};
};
49 changes: 24 additions & 25 deletions web/src/app/job/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,31 @@ import { JobListContext } from './context';
import { useHooks } from './hooks';

const JobList = (): JSX.Element => {
const { page, setPage } = useHooks();
const { page, setPage } = useHooks();

return (
<main>
<JobListContext.Provider
value={{ columns: JobColumns, data: JobData }}>
<Grid
container
sx={{
padding: 3,
gap: 3,
flexDirection: 'column'
}}>
<Grid item>
<SearchFilterHeader />
</Grid>
<Grid item>
<JobListTable />
</Grid>
<Grid item sx={{ alignSelf: 'center' }}>
<Pagination count={12} page={page} onChange={setPage} />
</Grid>
</Grid>
</JobListContext.Provider>
</main>
);
return (
<main>
<JobListContext.Provider value={{ columns: JobColumns, data: JobData }}>
<Grid
container
sx={{
padding: 3,
gap: 3,
flexDirection: 'column'
}}>
<Grid item>
<SearchFilterHeader />
</Grid>
<Grid item>
<JobListTable />
</Grid>
<Grid item sx={{ alignSelf: 'center' }}>
<Pagination count={12} page={page} onChange={setPage} />
</Grid>
</Grid>
</JobListContext.Provider>
</main>
);
};

export default JobList;
22 changes: 11 additions & 11 deletions web/src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ import { theme } from '@/assets/theme';
import Wrapper from './wrapper';

export const metadata: Metadata = {
title: 'Create Next App',
description: 'Generated by create next app'
title: 'Create Next App',
description: 'Generated by create next app'
};

export default function RootLayout({
children
children
}: {
children: React.ReactNode;
children: React.ReactNode;
}) {
return (
<html lang='en'>
<ThemeProvider theme={theme}>
<Wrapper>{children}</Wrapper>
</ThemeProvider>
</html>
);
return (
<html lang='en'>
<ThemeProvider theme={theme}>
<Wrapper>{children}</Wrapper>
</ThemeProvider>
</html>
);
}
68 changes: 34 additions & 34 deletions web/src/app/wrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,46 +8,46 @@ import Header from '@/components/organisms/Header';
import NavBar from '@/components/organisms/Navbar';

const openSansFont = Open_Sans({
subsets: ['latin'],
weight: ['300', '400', '500', '600', '700']
subsets: ['latin'],
weight: ['300', '400', '500', '600', '700']
});

interface Props {
children: React.ReactNode;
children: React.ReactNode;
}

export const Wrapper: FC<Props> = ({ children }) => {
const [isExpanded, setIsExpanded] = useState<boolean>(true);
let isOpen = true;

const handleToggle = () => {
setIsExpanded(!isExpanded);
isOpen = !isOpen;
};

return (
<Box
className={openSansFont.className}
component={'body'}
sx={{
margin: 0,
backgroundColor: 'background-primary'
}}>
<Header />
<Box display={'flex'}>
<NavBar expanded={isExpanded} handleToggle={handleToggle} />
<Container
maxWidth={false}
disableGutters
sx={{
marginLeft: isExpanded ? '200px' : '66px',
transition: 'margin 0.3s'
}}>
{children}
</Container>
</Box>
</Box>
);
const [isExpanded, setIsExpanded] = useState<boolean>(true);
let isOpen = true;

const handleToggle = () => {
setIsExpanded(!isExpanded);
isOpen = !isOpen;
};

return (
<Box
className={openSansFont.className}
component={'body'}
sx={{
margin: 0,
backgroundColor: 'background-primary'
}}>
<Header />
<Box display={'flex'}>
<NavBar expanded={isExpanded} handleToggle={handleToggle} />
<Container
maxWidth={false}
disableGutters
sx={{
marginLeft: isExpanded ? '200px' : '66px',
transition: 'margin 0.3s'
}}>
{children}
</Container>
</Box>
</Box>
);
};

export default Wrapper;
26 changes: 13 additions & 13 deletions web/src/assets/icons/FilterCog.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import { SvgIcon } from '@mui/material';

interface Props {
style?: string;
style?: string;
}

export const FilterCog = ({ style = '' }: Props) => {
return (
<SvgIcon className={style}>
<svg
width='20'
height='20'
viewBox='0 0 20 20'
fill='none'
xmlns='http://www.w3.org/2000/svg'>
<path d='M18.975 16.1L18.0834 15.4167C18.1 15.275 18.1167 15.1417 18.1167 15C18.1167 14.8583 18.1084 14.725 18.0834 14.5833L18.9667 13.9C19.0417 13.8333 19.0667 13.725 19.0167 13.6333L18.1834 12.1917C18.1334 12.0833 18.025 12.0833 17.9167 12.0833L16.8917 12.5C16.6667 12.35 16.4417 12.2083 16.1834 12.1083L16.025 11.0083C16.0167 10.9083 15.925 10.8333 15.8334 10.8333H14.1667C14.0584 10.8333 13.9667 10.9083 13.95 11.0083L13.7917 12.1083C13.5417 12.2167 13.3 12.35 13.0834 12.5L12.05 12.0833C11.9584 12.0833 11.85 12.0833 11.7917 12.1917L10.9584 13.6333C10.9084 13.725 10.925 13.8333 11.0084 13.9L11.8917 14.5833C11.875 14.725 11.8667 14.8583 11.8667 15C11.8667 15.1417 11.875 15.275 11.8917 15.4167L11.0084 16.1C10.9334 16.1667 10.9084 16.275 10.9584 16.3667L11.7917 17.8083C11.8417 17.9167 11.95 17.9167 12.05 17.9167L13.0834 17.5C13.3 17.65 13.5334 17.7917 13.7917 17.8917L13.95 18.9917C13.9667 19.0917 14.05 19.1667 14.1667 19.1667H15.8334C15.925 19.1667 16.0167 19.0917 16.0334 18.9917L16.1917 17.8917C16.4417 17.7833 16.6667 17.65 16.8917 17.5L17.9167 17.9167C18.025 17.9167 18.1334 17.9167 18.1917 17.8083L19.025 16.3667C19.075 16.275 19.05 16.1667 18.975 16.1ZM15 16.25C14.3 16.25 13.75 15.6917 13.75 15C13.75 14.3083 14.3084 13.75 15 13.75C15.6917 13.75 16.25 14.3083 16.25 15C16.25 15.6917 15.6917 16.25 15 16.25ZM2.50002 2.5C2.31669 2.5 2.14169 2.56667 1.98336 2.68333C1.62502 2.96667 1.55836 3.49167 1.84169 3.85L6.64169 10H6.66669V14.8917C6.63336 15.1333 6.71669 15.3917 6.90836 15.5833L8.58336 17.2583C8.87502 17.55 9.32502 17.5667 9.65002 17.3333C9.33336 16.5917 9.16669 15.8 9.16669 15C9.16669 13.9417 9.45836 12.9167 10 12V10H10.025L14.825 3.85C15.1084 3.49167 15.0417 2.96667 14.6834 2.68333C14.525 2.56667 14.35 2.5 14.1667 2.5H2.50002Z' />
</svg>
</SvgIcon>
);
return (
<SvgIcon className={style}>
<svg
width='20'
height='20'
viewBox='0 0 20 20'
fill='none'
xmlns='http://www.w3.org/2000/svg'>
<path d='M18.975 16.1L18.0834 15.4167C18.1 15.275 18.1167 15.1417 18.1167 15C18.1167 14.8583 18.1084 14.725 18.0834 14.5833L18.9667 13.9C19.0417 13.8333 19.0667 13.725 19.0167 13.6333L18.1834 12.1917C18.1334 12.0833 18.025 12.0833 17.9167 12.0833L16.8917 12.5C16.6667 12.35 16.4417 12.2083 16.1834 12.1083L16.025 11.0083C16.0167 10.9083 15.925 10.8333 15.8334 10.8333H14.1667C14.0584 10.8333 13.9667 10.9083 13.95 11.0083L13.7917 12.1083C13.5417 12.2167 13.3 12.35 13.0834 12.5L12.05 12.0833C11.9584 12.0833 11.85 12.0833 11.7917 12.1917L10.9584 13.6333C10.9084 13.725 10.925 13.8333 11.0084 13.9L11.8917 14.5833C11.875 14.725 11.8667 14.8583 11.8667 15C11.8667 15.1417 11.875 15.275 11.8917 15.4167L11.0084 16.1C10.9334 16.1667 10.9084 16.275 10.9584 16.3667L11.7917 17.8083C11.8417 17.9167 11.95 17.9167 12.05 17.9167L13.0834 17.5C13.3 17.65 13.5334 17.7917 13.7917 17.8917L13.95 18.9917C13.9667 19.0917 14.05 19.1667 14.1667 19.1667H15.8334C15.925 19.1667 16.0167 19.0917 16.0334 18.9917L16.1917 17.8917C16.4417 17.7833 16.6667 17.65 16.8917 17.5L17.9167 17.9167C18.025 17.9167 18.1334 17.9167 18.1917 17.8083L19.025 16.3667C19.075 16.275 19.05 16.1667 18.975 16.1ZM15 16.25C14.3 16.25 13.75 15.6917 13.75 15C13.75 14.3083 14.3084 13.75 15 13.75C15.6917 13.75 16.25 14.3083 16.25 15C16.25 15.6917 15.6917 16.25 15 16.25ZM2.50002 2.5C2.31669 2.5 2.14169 2.56667 1.98336 2.68333C1.62502 2.96667 1.55836 3.49167 1.84169 3.85L6.64169 10H6.66669V14.8917C6.63336 15.1333 6.71669 15.3917 6.90836 15.5833L8.58336 17.2583C8.87502 17.55 9.32502 17.5667 9.65002 17.3333C9.33336 16.5917 9.16669 15.8 9.16669 15C9.16669 13.9417 9.45836 12.9167 10 12V10H10.025L14.825 3.85C15.1084 3.49167 15.0417 2.96667 14.6834 2.68333C14.525 2.56667 14.35 2.5 14.1667 2.5H2.50002Z' />
</svg>
</SvgIcon>
);
};
26 changes: 13 additions & 13 deletions web/src/assets/icons/FilterRemove.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import { SvgIcon } from '@mui/material';

interface Props {
style?: string;
style?: string;
}

export const FilterRemove = ({ style = '' }: Props) => {
return (
<SvgIcon className={style}>
<svg
width='20'
height='20'
viewBox='0 0 20 20'
fill='none'
xmlns='http://www.w3.org/2000/svg'>
<path d='M12.3 17.3583L14.6667 15L12.3 12.6417L13.475 11.4667L15.8334 13.8083L18.1917 11.4667L19.3667 12.6417L17.025 15L19.3667 17.3583L18.1917 18.5333L15.8334 16.1667L13.475 18.5333L12.3 17.3583ZM10 10V16.5667C10.0334 16.8167 9.95002 17.0833 9.75836 17.2583C9.43336 17.5833 8.90836 17.5833 8.58336 17.2583L6.90836 15.5833C6.71669 15.3917 6.63336 15.1333 6.66669 14.8917V10H6.64169L1.84169 3.85C1.55836 3.49167 1.62502 2.96667 1.98336 2.68333C2.14169 2.56667 2.31669 2.5 2.50002 2.5H14.1667C14.35 2.5 14.525 2.56667 14.6834 2.68333C15.0417 2.96667 15.1084 3.49167 14.825 3.85L10.025 10H10Z' />
</svg>
</SvgIcon>
);
return (
<SvgIcon className={style}>
<svg
width='20'
height='20'
viewBox='0 0 20 20'
fill='none'
xmlns='http://www.w3.org/2000/svg'>
<path d='M12.3 17.3583L14.6667 15L12.3 12.6417L13.475 11.4667L15.8334 13.8083L18.1917 11.4667L19.3667 12.6417L17.025 15L19.3667 17.3583L18.1917 18.5333L15.8334 16.1667L13.475 18.5333L12.3 17.3583ZM10 10V16.5667C10.0334 16.8167 9.95002 17.0833 9.75836 17.2583C9.43336 17.5833 8.90836 17.5833 8.58336 17.2583L6.90836 15.5833C6.71669 15.3917 6.63336 15.1333 6.66669 14.8917V10H6.64169L1.84169 3.85C1.55836 3.49167 1.62502 2.96667 1.98336 2.68333C2.14169 2.56667 2.31669 2.5 2.50002 2.5H14.1667C14.35 2.5 14.525 2.56667 14.6834 2.68333C15.0417 2.96667 15.1084 3.49167 14.825 3.85L10.025 10H10Z' />
</svg>
</SvgIcon>
);
};
51 changes: 24 additions & 27 deletions web/src/assets/icons/Logo.tsx

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions web/src/components/atoms/StatusChip/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ import { Chip, ChipProps } from '@mui/material';
import { FC } from 'react';

const StatusChip: FC<ChipProps> = ({ label }: ChipProps) => {
return (
<Chip
label={label}
sx={{
backgroundColor: ChipColors[label as string] ?? '#65707b33',
typography: 'label1r'
}}
/>
);
return (
<Chip
label={label}
sx={{
backgroundColor: ChipColors[label as string] ?? '#65707b33',
typography: 'label1r'
}}
/>
);
};

export default StatusChip;
28 changes: 14 additions & 14 deletions web/src/components/molecules/CreatedDateRangeFilter/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@ import { Moment } from 'moment';
import { useState } from 'react';

export const useHooks = () => {
const [startDate, setStartDate] = useState<Moment | null>();
const [endDate, setEndDate] = useState<Moment | null>();
const [startDate, setStartDate] = useState<Moment | null>();
const [endDate, setEndDate] = useState<Moment | null>();

const handleStartDateChange = (date: Moment | null): void => {
setStartDate(date);
};
const handleStartDateChange = (date: Moment | null): void => {
setStartDate(date);
};

const handleEndDateChange = (date: Moment | null): void => {
setEndDate(date);
};
const handleEndDateChange = (date: Moment | null): void => {
setEndDate(date);
};

return {
startDate,
handleStartDateChange,
endDate,
handleEndDateChange
};
return {
startDate,
handleStartDateChange,
endDate,
handleEndDateChange
};
};
74 changes: 37 additions & 37 deletions web/src/components/molecules/CreatedDateRangeFilter/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,44 +8,44 @@ import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';
import { useHooks } from './hooks';

const CreateDateRangeFilter = () => {
const { startDate, handleStartDateChange, endDate, handleEndDateChange } =
useHooks();
const { startDate, handleStartDateChange, endDate, handleEndDateChange } =
useHooks();

return (
<Box sx={{ display: 'flex', alignItems: 'center', gap: 1 }}>
<LocalizationProvider dateAdapter={AdapterMoment}>
<DatePicker
label='Created at - Start Date'
value={startDate}
onChange={handleStartDateChange}
className={styles.input}
slotProps={{
textField: {
size: 'small',
color: 'secondary',
id: 'created-start',
name: 'created-start'
}
}}
/>
{' - '}
<DatePicker
label='Created at - End Date'
value={endDate}
onChange={handleEndDateChange}
className={styles.input}
slotProps={{
textField: {
size: 'small',
color: 'secondary',
id: 'created-end',
name: 'created-end'
}
}}
/>
</LocalizationProvider>
</Box>
);
return (
<Box sx={{ display: 'flex', alignItems: 'center', gap: 1 }}>
<LocalizationProvider dateAdapter={AdapterMoment}>
<DatePicker
label='Created at - Start Date'
value={startDate}
onChange={handleStartDateChange}
className={styles.input}
slotProps={{
textField: {
size: 'small',
color: 'secondary',
id: 'created-start',
name: 'created-start'
}
}}
/>
{' - '}
<DatePicker
label='Created at - End Date'
value={endDate}
onChange={handleEndDateChange}
className={styles.input}
slotProps={{
textField: {
size: 'small',
color: 'secondary',
id: 'created-end',
name: 'created-end'
}
}}
/>
</LocalizationProvider>
</Box>
);
};

export default CreateDateRangeFilter;
Loading

0 comments on commit 68e7998

Please sign in to comment.