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 bf50c7f3..15d438a5 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/22/2024 12:58:52 PM"
+ "x-generation-date": "02/22/2024 1:55:11 PM"
},
"x-strapi-config": {
"path": "/documentation",
diff --git a/web/components/Account/Application/Company/ApplicationCompanyHelper.tsx b/web/components/Account/Application/Company/ApplicationCompanyHelper.tsx
deleted file mode 100644
index 0793a0c0..00000000
--- a/web/components/Account/Application/Company/ApplicationCompanyHelper.tsx
+++ /dev/null
@@ -1,56 +0,0 @@
-import { Box, Button, Stack, Text } from '@chakra-ui/react'
-import { useTranslation } from 'next-i18next'
-import useCampaignContext from '~components/Campaign/useCampaignContext'
-import { ROUTE_PLACES } from '~constants'
-import { useCurrentUser } from '~hooks/useCurrentUser'
-import { format } from '~utils/date'
-import Link from '~components/Link'
-
-const ApplicationCompanyHelper = () => {
- const { remainingApplications } = useCurrentUser()
- const { currentCampaign } = useCampaignContext()
- const { t } = useTranslation('application')
- if (remainingApplications > 0 && currentCampaign.mode === 'applications')
- return (
-
-
-
-
- {t(
- `company.helper.start${remainingApplications > 1 ? 's' : ''}`,
- {
- num: remainingApplications,
- },
- )}
-
-
- {t('company.helper.end', {
- date: format(currentCampaign.application_end),
- })}
-
-
-
-
-
- )
- return null
-}
-
-export default ApplicationCompanyHelper
diff --git a/web/components/Account/Application/Company/ApplicationCompanyList.tsx b/web/components/Account/Application/Company/ApplicationCompanyList.tsx
index 91db1475..dbad50d6 100644
--- a/web/components/Account/Application/Company/ApplicationCompanyList.tsx
+++ b/web/components/Account/Application/Company/ApplicationCompanyList.tsx
@@ -13,7 +13,7 @@ import Chevron from 'public/assets/img/chevron-down.svg'
import Cell from '~components/Account/Booking/Cell'
import ApplicationCompanyListItem from '~components/Account/Application/Company/ApplicationCompanyListItem'
import useCampaignContext from '~components/Campaign/useCampaignContext'
-import ApplicationCompanyHelper from '~components/Account/Application/Company/ApplicationCompanyHelper'
+import ApplicationCompanyHelper from '~components/Account/Application/Company/ApplicationsHelpers/ApplicationCompanyHelper'
interface Props {
applications: Application[]
diff --git a/web/components/Account/Application/Company/ApplicationCompanyListItem.tsx b/web/components/Account/Application/Company/ApplicationCompanyListItem.tsx
index 0240f774..772d1bea 100644
--- a/web/components/Account/Application/Company/ApplicationCompanyListItem.tsx
+++ b/web/components/Account/Application/Company/ApplicationCompanyListItem.tsx
@@ -8,12 +8,14 @@ import ConfirmButton from '~components/Account/Application/ConfirmButton'
import { client } from '~api/client-api'
import useToast from '~hooks/useToast'
import { useQueryClient } from 'react-query'
+import useCampaignContext from '~components/Campaign/useCampaignContext'
interface Props {
application: Application
}
const ApplicationCompanyListItem = ({ application }: Props) => {
+ const { currentCampaign } = useCampaignContext()
const { errorToast, successToast } = useToast()
const { t } = useTranslation('application')
const queryClient = useQueryClient()
@@ -60,24 +62,26 @@ const ApplicationCompanyListItem = ({ application }: Props) => {
{application?.creation_title}
-
-
-
+
+
+ )}
|
)
diff --git a/web/components/Account/Application/Company/ApplicationsHelpers/ApplicationCompanyHelper.tsx b/web/components/Account/Application/Company/ApplicationsHelpers/ApplicationCompanyHelper.tsx
new file mode 100644
index 00000000..11fa2644
--- /dev/null
+++ b/web/components/Account/Application/Company/ApplicationsHelpers/ApplicationCompanyHelper.tsx
@@ -0,0 +1,24 @@
+import { Box, Button, Stack, Text } from '@chakra-ui/react'
+import { useTranslation } from 'next-i18next'
+import useCampaignContext from '~components/Campaign/useCampaignContext'
+import { ROUTE_PLACES } from '~constants'
+import { useCurrentUser } from '~hooks/useCurrentUser'
+import { format } from '~utils/date'
+import Link from '~components/Link'
+import OpenApplications from '~components/Account/Application/Company/ApplicationsHelpers/OpenApplications'
+import ClosedApplications from '~components/Account/Application/Company/ApplicationsHelpers/ClosedApplications'
+
+const ApplicationCompanyHelper = () => {
+ const { remainingApplications } = useCurrentUser()
+ const { currentCampaign } = useCampaignContext()
+ const { t } = useTranslation('application')
+ if (remainingApplications > 0 && currentCampaign.mode === 'applications')
+ return
+
+ if (currentCampaign.mode === 'preselections') {
+ return
+ }
+ return null
+}
+
+export default ApplicationCompanyHelper
diff --git a/web/components/Account/Application/Company/ApplicationsHelpers/ClosedApplications.tsx b/web/components/Account/Application/Company/ApplicationsHelpers/ClosedApplications.tsx
new file mode 100644
index 00000000..dc0f59c8
--- /dev/null
+++ b/web/components/Account/Application/Company/ApplicationsHelpers/ClosedApplications.tsx
@@ -0,0 +1,38 @@
+import { Box, Stack, Text } from '@chakra-ui/react'
+import { useTranslation } from 'next-i18next'
+import useCampaignContext from '~components/Campaign/useCampaignContext'
+import { format } from '~utils/date'
+
+const ClosedApplications = () => {
+ const { currentCampaign } = useCampaignContext()
+ const { t } = useTranslation('application')
+
+ return (
+
+
+
+
+ {t(`company.helper.closed_start`, {
+ title: currentCampaign.title,
+ })}
+
+
+ {t('company.helper.closed_end', {
+ date: format(currentCampaign.preselection_end),
+ })}
+
+
+
+
+ )
+}
+
+export default ClosedApplications
diff --git a/web/components/Account/Application/Company/ApplicationsHelpers/OpenApplications.tsx b/web/components/Account/Application/Company/ApplicationsHelpers/OpenApplications.tsx
new file mode 100644
index 00000000..eaec0175
--- /dev/null
+++ b/web/components/Account/Application/Company/ApplicationsHelpers/OpenApplications.tsx
@@ -0,0 +1,54 @@
+import { Box, Button, Stack, Text } from '@chakra-ui/react'
+import { useTranslation } from 'next-i18next'
+import useCampaignContext from '~components/Campaign/useCampaignContext'
+import { ROUTE_PLACES } from '~constants'
+import { format } from '~utils/date'
+import Link from '~components/Link'
+
+const OpenApplications = ({
+ remainingApplications,
+}: {
+ remainingApplications: number
+}) => {
+ const { currentCampaign } = useCampaignContext()
+ const { t } = useTranslation('application')
+
+ return (
+
+
+
+
+ {t(`company.helper.start${remainingApplications > 1 ? 's' : ''}`, {
+ num: remainingApplications,
+ })}
+
+
+ {t('company.helper.end', {
+ date: format(currentCampaign.application_end),
+ })}
+
+
+
+
+
+ )
+}
+
+export default OpenApplications
diff --git a/web/components/Account/Application/Place/SelectionHelpers/ValidatedSelections.tsx b/web/components/Account/Application/Place/SelectionHelpers/ValidatedSelections.tsx
index 0ed1ea11..d63c0fd3 100644
--- a/web/components/Account/Application/Place/SelectionHelpers/ValidatedSelections.tsx
+++ b/web/components/Account/Application/Place/SelectionHelpers/ValidatedSelections.tsx
@@ -1,5 +1,5 @@
import { Box, HStack, Text } from '@chakra-ui/react'
-import PreselectionsValidated from 'public/assets/img/PreselectionsValidated.svg'
+import PreselectionsValidated from 'public/assets/img/preselectionsValidated.svg'
import { useTranslation } from 'next-i18next'
const ValidatedSelections = () => {
diff --git a/web/components/Account/Application/Place/ApplicationSelector.tsx b/web/components/Account/Application/Place/Selectors/ApplicationSelector.tsx
similarity index 83%
rename from web/components/Account/Application/Place/ApplicationSelector.tsx
rename to web/components/Account/Application/Place/Selectors/ApplicationSelector.tsx
index 749a0f38..0891ae15 100644
--- a/web/components/Account/Application/Place/ApplicationSelector.tsx
+++ b/web/components/Account/Application/Place/Selectors/ApplicationSelector.tsx
@@ -1,6 +1,7 @@
import { HStack, Select } from '@chakra-ui/react'
import { useRouter } from 'next/router'
import { useEffect, useMemo, useState } from 'react'
+import SelectMenu from '~components/Account/Application/Place/Selectors/SelectMenu'
import useCampaignContext from '~components/Campaign/useCampaignContext'
import { ROUTE_ACCOUNT_APPLICATIONS } from '~constants'
import { Espace } from '~typings/api'
@@ -54,7 +55,23 @@ const ApplicationSelector = ({ places }: { places: Espace[] }) => {
const dispoOptions = useMemo(() => getDispoOptions(espace), [espace])
return (
-
+
+ ({
+ value: place.id,
+ label: place.name,
+ }))}
+ onChange={(data) => {
+ console.log(data)
+
+ // const disponibility = getDispoOptions(e.target.value)[0]?.id
+ // router.push({
+ // pathname: router.pathname,
+ // query: { espace: e.target.value, disponibility },
+ // })
+ }}
+ value={espace as string}
+ />