diff --git a/back/extensions/documentation/documentation/1.0.0/full_documentation.json b/back/extensions/documentation/documentation/1.0.0/full_documentation.json
index 137ce3df..8c864e5e 100644
--- a/back/extensions/documentation/documentation/1.0.0/full_documentation.json
+++ b/back/extensions/documentation/documentation/1.0.0/full_documentation.json
@@ -14,7 +14,7 @@
"name": "Apache 2.0",
"url": "https://www.apache.org/licenses/LICENSE-2.0.html"
},
- "x-generation-date": "02/06/2024 10:37:22 AM"
+ "x-generation-date": "02/07/2024 10:13:36 AM"
},
"x-strapi-config": {
"path": "/documentation",
diff --git a/web/components/Campaign/CampaignHelper.tsx b/web/components/Campaign/CampaignHelper.tsx
new file mode 100644
index 00000000..d64ea309
--- /dev/null
+++ b/web/components/Campaign/CampaignHelper.tsx
@@ -0,0 +1,35 @@
+import { HStack, Text, Flex, Button, StackProps } from '@chakra-ui/react'
+import { useTranslation } from 'next-i18next'
+import { ActiveCampaign } from '~components/Campaign/CampaignContext'
+
+const CampaignHelper = ({
+ campaign,
+ ...props
+}: { campaign?: ActiveCampaign } & StackProps) => {
+ const { t } = useTranslation('common')
+
+ return (
+
+
+
+ {campaign ? campaign?.title : t('solidarity.helper_title')}
+
+ {campaign ? campaign.description : t('solidarity.helper')}
+
+
+
+
+
+ )
+}
+
+export default CampaignHelper
diff --git a/web/components/Campaign/CampaignProvider.tsx b/web/components/Campaign/CampaignProvider.tsx
index 9545208c..e54e93a7 100644
--- a/web/components/Campaign/CampaignProvider.tsx
+++ b/web/components/Campaign/CampaignProvider.tsx
@@ -22,7 +22,8 @@ const CampaignProvider = ({ children }: ICampaignProvider) => {
useEffect(() => {
if (Boolean(campaigns?.length)) {
const activeCampaigns = campaigns?.map((campaign) => {
- const mode = getCampaignMode(campaign)
+ // const mode = getCampaignMode(campaign)
+ const mode = 'applications'
const limitDate = getLimitDate(campaign, mode)
return { ...campaign, mode, limitDate }
})
diff --git a/web/components/Campaign/HomeInsert/HomeCampaignInsert.tsx b/web/components/Campaign/HomeInsert/HomeCampaignInsert.tsx
index 3e1a3c34..9fc866e6 100644
--- a/web/components/Campaign/HomeInsert/HomeCampaignInsert.tsx
+++ b/web/components/Campaign/HomeInsert/HomeCampaignInsert.tsx
@@ -1,9 +1,10 @@
-import { VStack, Text, Tag, Box, Button, Stack } from '@chakra-ui/react'
+import { VStack, Text, Box, Button, Stack } from '@chakra-ui/react'
import Hands from 'public/assets/img/hands-outline.svg'
import theme from '~theme'
import { useTranslation } from 'next-i18next'
import { ROUTE_ACCOUNT_PLACES, ROUTE_PLACES } from '~constants'
import { CampaignMode } from '~components/Campaign/CampaignContext'
+import Tag from '~components/Tag'
const HomeCampaignInsert = ({
mode,
@@ -28,7 +29,7 @@ const HomeCampaignInsert = ({
height="100%"
>
- {t('campaign.tag', { title })}
+ {title}
{
lg: true,
})
const { t } = useTranslation('home')
- const { data: places } = usePlaces({
- published_eq: true,
- _limit: 20,
- _sort: 'dispoAsc',
- })
+ const { t: tCommon } = useTranslation('common')
+ const filters = campaign
+ ? {
+ 'disponibilities.campaign': campaign?.id,
+ }
+ : {}
+ const { data: places } = usePlaces(
+ {
+ published_eq: true,
+ _limit: 20,
+ _sort: 'dispoAsc',
+ ...filters,
+ },
+ campaign && 'campaignPlaces',
+ )
if (!places || places.length === 0) return null
@@ -44,38 +55,18 @@ const HomePlaces = ({ campaign }: Props) => {
- {campaign
- ? t('places.campaign.title', { title: campaign?.title })
- : t('places.title')}
+ {campaign ? campaign?.title : t('places.title')}
{campaign && (
-
- {t('places.campaign.tag', {
+
+ {tCommon('campaign.open', {
date: format(new Date(campaign?.limitDate), 'd MMMM yyyy'),
})}
)}
-
-
-
- {campaign ? campaign?.title : t('places.solidarity.helper_title')}
-
- {campaign ? campaign.description : t('places.solidarity.helper')}
-
-
-
-
-
+
@@ -89,7 +80,9 @@ const HomePlaces = ({ campaign }: Props) => {
color={'campaign.dark'}
_hover={{ bg: 'campaign.light', textDecor: 'none' }}
>
- {t('places.campaign.cta', { title: campaign?.title })}
+ {t('places.campaign.cta', {
+ title: campaign?.title.toLowerCase(),
+ })}
) : (