-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Feature] Instructor led training page (#12083)
* Make id required on TrainingOpportunity type * Add metadata component * Add new instructor led training page * Add new InstructorLedTrainingPage component * Add CourseLanguageChip component * Add MetaData base component * Update links on ItTrainingFundPage * Remove toast error * Add most translations * merge main * Remove unused var and imports * Add rest of translations * Update translations * Remove duplicate routes * Update duplicate lang snapshot * Change link text on it training fun page * Change to MetaData to Metadata * Change cancel button styling * Increase pagination initial fetch total * Add bilingual opportunities to other filters * Improve button label accessibility * Use useQuery orderby * Use where.opportunityLanguage to filter list --------- Co-authored-by: Yoni K <[email protected]>
- Loading branch information
Showing
16 changed files
with
749 additions
and
30 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
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
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
37 changes: 37 additions & 0 deletions
37
apps/web/src/pages/InstructorLedTrainingPage/CourseLanguageChip.tsx
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,37 @@ | ||
import { useIntl } from "react-intl"; | ||
|
||
import { CourseLanguage } from "@gc-digital-talent/graphql"; | ||
import { commonMessages } from "@gc-digital-talent/i18n"; | ||
import { Chip } from "@gc-digital-talent/ui"; | ||
|
||
const CourseLanguageChip = ({ | ||
courseLanguage, | ||
}: { | ||
courseLanguage?: CourseLanguage; | ||
}) => { | ||
const intl = useIntl(); | ||
switch (courseLanguage) { | ||
case CourseLanguage.Bilingual: | ||
return ( | ||
<Chip color="tertiary"> | ||
{intl.formatMessage(commonMessages.bilingual)} | ||
</Chip> | ||
); | ||
case CourseLanguage.English: | ||
return ( | ||
<Chip color="primary"> | ||
{intl.formatMessage(commonMessages.english)} | ||
</Chip> | ||
); | ||
case CourseLanguage.French: | ||
return ( | ||
<Chip color="secondary"> | ||
{intl.formatMessage(commonMessages.french)} | ||
</Chip> | ||
); | ||
default: | ||
return null; | ||
} | ||
}; | ||
|
||
export default CourseLanguageChip; |
Oops, something went wrong.