diff --git a/webapp/CHANGELOG.md b/webapp/CHANGELOG.md index b99c0b87..cca04a93 100644 --- a/webapp/CHANGELOG.md +++ b/webapp/CHANGELOG.md @@ -1,3 +1,16 @@ +## [0.68.1](https://github.com/SocialGouv/carte-jeune-engage/compare/v0.68.0...v0.68.1) (2024-11-19) + + +### Bug Fixes + +* wordings, icons and add missing one for condition blocks ([9fa391d](https://github.com/SocialGouv/carte-jeune-engage/commit/9fa391d414ee51703bd11a3c98b2086fba3ff919)) + +# [0.68.0](https://github.com/SocialGouv/carte-jeune-engage/compare/v0.67.2...v0.68.0) (2024-11-19) + +### Features + +- add crisp to help button ([0b08132](https://github.com/SocialGouv/carte-jeune-engage/commit/0b0813285b641ed051bc8dff3c14cc5b7d7755a0)) + ## [0.67.2](https://github.com/SocialGouv/carte-jeune-engage/compare/v0.67.1...v0.67.2) (2024-11-18) ### Bug Fixes diff --git a/webapp/package.json b/webapp/package.json index f3eca2ee..eb871be5 100644 --- a/webapp/package.json +++ b/webapp/package.json @@ -1,6 +1,6 @@ { "name": "webapp", - "version": "0.67.2", + "version": "0.68.1", "private": true, "scripts": { "dev": "next dev", diff --git a/webapp/src/components/offer/ConditionBlocksSection.tsx b/webapp/src/components/offer/ConditionBlocksSection.tsx index cda690c4..6ea62dd9 100644 --- a/webapp/src/components/offer/ConditionBlocksSection.tsx +++ b/webapp/src/components/offer/ConditionBlocksSection.tsx @@ -8,7 +8,12 @@ import ReactIcon from "~/utils/dynamicIcon"; const disabledColor = theme.colors["disabled"] as string; type ConditionBlocksSectionProps = { - offerConditionBlocks: { text: string; icon: string; isCrossed: boolean }[]; + offerConditionBlocks: { + text: string; + icon: string; + slug: string; + isCrossed: boolean; + }[]; offerSource: Offer["source"]; }; @@ -18,15 +23,24 @@ const ConditionBlocksSection = ({ }: ConditionBlocksSectionProps) => { return ( - {offerConditionBlocks.map(({ text, icon, isCrossed }) => { + {offerConditionBlocks.map(({ text, icon, slug, isCrossed }) => { return ( - {typeof icon === "string" && ( + {typeof icon === "string" && slug !== "one-time" ? ( + ) : ( + + x1 + )} {text} diff --git a/webapp/src/payload/components/CustomSelectBlocksOfUse.tsx b/webapp/src/payload/components/CustomSelectBlocksOfUse.tsx index 010e0dfe..8d5ea276 100644 --- a/webapp/src/payload/components/CustomSelectBlocksOfUse.tsx +++ b/webapp/src/payload/components/CustomSelectBlocksOfUse.tsx @@ -10,7 +10,7 @@ export const getItemsConditionBlocks = (source: Offer["source"]) => { icon: "HiMiniEye", }, { - text: "Offre utilisable à l'infini", + text: "Offre valable tout le temps", slug: "all-time", icon: "TiInfinity", }, @@ -39,9 +39,14 @@ export const getItemsConditionBlocks = (source: Offer["source"]) => { icon: "HiCreditCard", }, { - text: "Cumulable avec d’autres bons", + text: "Cumulable avec plusieurs bons d'achat", slug: "cumulative-with-other-codes", - icon: "BsCashStack", + icon: "HiSquare2Stack", + }, + { + text: "Cumulable avec d'autres réductions", + slug: "cumulative-with-other-discounts", + icon: "HiMiniReceiptPercent", }, ]; }; @@ -54,9 +59,7 @@ export const CustomSelectConditionBlocks: React.FC<{ path: string }> = ({ { label: string; value: string }[] >([]); - const offerSource = useFormFields(([fields, _]) => fields.kind); - - console.log("offerSource", offerSource); + const offerSource = useFormFields(([fields, _]) => fields.source); React.useEffect(() => { const tmpOptions = getItemsConditionBlocks(