diff --git a/public/locales/bg/campaign-application.json b/public/locales/bg/campaign-application.json index c3a6532fe..edfdb439e 100644 --- a/public/locales/bg/campaign-application.json +++ b/public/locales/bg/campaign-application.json @@ -7,6 +7,39 @@ "email": "Email", "transparencyTerms": "Потвърждавам, че кампанията отговаря на основните принципи за публикуване на платформата: да е законна, да е морална, да не е с бизнес насоченост." }, + "application": { + "title": "Информация за кампанията", + "beneficiary": "Имена на бенефициента", + "funds": "Необходима сума в лева", + "campaign-end": { + "title": "Желана крайна дата на кампанията:", + "options": { + "funds": "До събиране на необходимите средства", + "ongoing": "Целогодишно/безсрочно", + "date": "Посочи дата" + } + } + }, + "details": { + "title": "Разкажете ни повече за кампанията Ви", + "description": "Описание", + "current-status": { + "label": "Какво е свършено до момента по кампанията?", + "placeholder": "(набрани материални и/ или нематериални средства, какво е направено с тях, преминати прегледи/ процедури и т.н.)" + }, + "cause": "За какво са нужни средствата?", + "links": { + "label": "Ако е приложимо, прикачете:", + "fields": { + "website": "уебсайт на кампанията", + "media": "линкове към медийно отразяване", + "facebook": "линк към Facebook страница на кампанията", + "donation-platforms": "линк към други платформи за дарения, в които кампанията Ви е (била) активна" + } + }, + "photos": "Снимков/видео материал", + "documents": "Документи" + }, "admin": { "title": "Администраторска редакция", "status": "Статус", diff --git a/public/locales/en/campaign-application.json b/public/locales/en/campaign-application.json index 8e3537d14..206514ddd 100644 --- a/public/locales/en/campaign-application.json +++ b/public/locales/en/campaign-application.json @@ -7,6 +7,39 @@ "email": "Email", "transparencyTerms": "I confirm that the campaign meets the basic principles for publishing on the platform: it is legal, it is moral, and it is not business-oriented." }, + "application": { + "title": "Campaign Application", + "beneficiary": "Beneficiary names", + "funds": "The required amount in leva", + "campaign-end": { + "title": "Desired campaign end date:", + "options": { + "funds": "Until the required funds are raised", + "ongoing": "Year-round/ongoing", + "date": "Specify date" + } + } + }, + "details": { + "title": "Tell us more about your campaign", + "description": "Description", + "current-status": { + "label": "What has been done so far in the campaign?", + "placeholder": "(collected material and/or non-material resources, what has been done with them, completed examinations/procedures, etc.)" + }, + "cause": "What are the funds needed for?", + "links": { + "label": "If applicable, attach:", + "fields": { + "website": "campaign website", + "media": "links to media coverage", + "facebook": "link to the campaign's Facebook page", + "donation-platforms": "link to other donation platforms where your campaign is (or has been) active" + } + }, + "photos": "Photo/Video material", + "documents": "Documents" + }, "admin": { "title": "Admin edit", "status": "Status", diff --git a/src/components/client/campaign-application/CampaignApplicationForm.tsx b/src/components/client/campaign-application/CampaignApplicationForm.tsx index c1dbfbfd9..6667d1409 100644 --- a/src/components/client/campaign-application/CampaignApplicationForm.tsx +++ b/src/components/client/campaign-application/CampaignApplicationForm.tsx @@ -56,6 +56,12 @@ export default function CampaignApplicationForm({ person }: Props) { transparencyTermsAccepted: false, personalInformationProcessingAccepted: false, }, + application: { + beneficiaryNames: '', + campaignType: '', + funds: 0, + campaignEnd: '', + }, } const handleSubmit = () => { diff --git a/src/components/client/campaign-application/helpers/campaignApplication.types.ts b/src/components/client/campaign-application/helpers/campaignApplication.types.ts index cf6713e7a..aec052ca8 100644 --- a/src/components/client/campaign-application/helpers/campaignApplication.types.ts +++ b/src/components/client/campaign-application/helpers/campaignApplication.types.ts @@ -19,8 +19,16 @@ export type CampaignApplicationOrganizer = { personalInformationProcessingAccepted: boolean } +export type CampaignApplication = { + beneficiaryNames: string + campaignType: string + funds: number + campaignEnd: string +} + export type CampaignApplicationFormData = { organizer: CampaignApplicationOrganizer + application: CampaignApplication } export type CampaignApplicationFormDataSteps = { @@ -29,3 +37,9 @@ export type CampaignApplicationFormDataSteps = { organizer: CampaignApplicationOrganizer } } + +export enum CampaignEndTypes { + FUNDS = 'funds', + ONGOING = 'ongoing', + DATE = 'date', +} diff --git a/src/components/client/campaign-application/steps/CampaignApplication.tsx b/src/components/client/campaign-application/steps/CampaignApplication.tsx index 756c39c32..773352f92 100644 --- a/src/components/client/campaign-application/steps/CampaignApplication.tsx +++ b/src/components/client/campaign-application/steps/CampaignApplication.tsx @@ -1,3 +1,94 @@ +import { FormControl, Grid, Typography } from '@mui/material' +import { Field, useField } from 'formik' +import { useTranslation } from 'next-i18next' + +import { StyledFormTextField, StyledStepHeading } from '../helpers/campaignApplication.styled' +import { CampaignEndTypes } from '../helpers/campaignApplication.types' +import CampaignTypeSelect from 'components/client/campaigns/CampaignTypeSelect' +import FormDatePicker from 'components/common/form/FormDatePicker' + +import theme from 'common/theme' + export default function CampaignApplication() { - return
Campaign Application
+ const { t } = useTranslation('campaign-application') + const [campaignEnd] = useField('application.campaignEnd') + + return ( + + + {t('steps.application.title')} + + + + + + + + + + + + + + + {t('steps.application.campaign-end.title')} + + + + + + + + + + + + + + + + {campaignEnd.value === CampaignEndTypes.DATE && ( + + + + )} + + + + + + ) } diff --git a/src/components/client/campaign-application/steps/CampaignApplicationDetails.tsx b/src/components/client/campaign-application/steps/CampaignApplicationDetails.tsx index 2953d14d5..2353b9eea 100644 --- a/src/components/client/campaign-application/steps/CampaignApplicationDetails.tsx +++ b/src/components/client/campaign-application/steps/CampaignApplicationDetails.tsx @@ -1,3 +1,105 @@ +import { useTranslation } from 'next-i18next' +import { Grid, Typography } from '@mui/material' + +import { StyledStepHeading } from '../helpers/campaignApplication.styled' +import FormTextField from 'components/common/form/FormTextField' + +import theme from 'common/theme' +import FileUpload from 'components/common/file-upload/FileUpload' + export default function CampaignApplicationDetails() { - return
Campaign Application Details
+ const { t } = useTranslation('campaign-application') + + return ( + + + {t('steps.details.title')} + + + + + + + + + + + + + + {t('steps.details.links.label')} + + + + + + + + + + + + + + + + + + { + return + }} + /> + + + { + return + }} + /> + + + + ) }