-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OPHJOD-1067: Add filters and sorting to tool
- Loading branch information
Showing
8 changed files
with
192 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import { filterValues, sortingValues } from '@/routes/Tool/utils'; | ||
import { useToolStore } from '@/stores/useToolStore'; | ||
import { RadioButton, RadioButtonGroup } from '@jod/design-system'; | ||
import { useTranslation } from 'react-i18next'; | ||
|
||
const OpportunitiesFilter = () => { | ||
const { t } = useTranslation(); | ||
const { filter, sorting, setFilter, setSorting } = useToolStore(); | ||
const filterTitle = t('tool.your-opportunities.filters.title'); | ||
const sortingTitle = t('tool.your-opportunities.sorting.title'); | ||
|
||
return ( | ||
<div className="flex flex-col absolute right-0 top-full z-10 bg-bg-gray-2 p-6 rounded-md mt-4 w-[343px] shadow-border text-left gap-6"> | ||
<h2 className="text-heading-2">{t('do-filter')}</h2> | ||
|
||
<div className="flex flex-col gap-5"> | ||
<h3 className="text-heading-3">{filterTitle}</h3> | ||
<RadioButtonGroup label={filterTitle} value={filter} onChange={setFilter} hideLabel> | ||
<RadioButton | ||
label={t('tool.your-opportunities.filters.job-opportunities')} | ||
value={filterValues.TYOMAHDOLLISUUS} | ||
/> | ||
<RadioButton | ||
label={t('tool.your-opportunities.filters.education-opportunities')} | ||
value={filterValues.KOULUTUSMAHDOLLISUUS} | ||
/> | ||
<RadioButton | ||
label={t('tool.your-opportunities.filters.job-and-education-opportunities')} | ||
value={filterValues.ALL} | ||
/> | ||
</RadioButtonGroup> | ||
|
||
<h3 className="text-heading-3">{sortingTitle}</h3> | ||
<RadioButtonGroup label={sortingTitle} value={sorting} onChange={setSorting} hideLabel> | ||
<RadioButton label={t('tool.your-opportunities.sorting.alphabetically')} value={sortingValues.ALPHABET} /> | ||
<RadioButton label={t('tool.your-opportunities.sorting.by-relevance')} value={sortingValues.RELEVANCE} /> | ||
</RadioButtonGroup> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default OpportunitiesFilter; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
import Competences from './Competences'; | ||
import Goals from './Goals'; | ||
import Interests from './Interests'; | ||
import loader from './loader'; | ||
import OpportunitiesFilter from './OpportunitiesFilter'; | ||
import Restrictions from './Restrictions'; | ||
import Tool from './Tool'; | ||
import loader from './loader'; | ||
|
||
export { Competences, Goals, Interests, Restrictions, Tool, loader as toolLoader }; | ||
export { Competences, Goals, Interests, OpportunitiesFilter, Restrictions, Tool, loader as toolLoader }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.