-
Notifications
You must be signed in to change notification settings - Fork 169
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
230 additions
and
90 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
21 changes: 21 additions & 0 deletions
21
app/webpacker/components/ContactsPage/SubForms/CommunicationsTeam/index.jsx
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,21 @@ | ||
import React from 'react'; | ||
import { Form } from 'semantic-ui-react'; | ||
import I18n from '../../../../lib/i18n'; | ||
import { useDispatch, useStore } from '../../../../lib/providers/StoreProvider'; | ||
import { updateSubFormCommunicationsTeam } from '../../store/actions'; | ||
|
||
export default function CommunicationsTeam() { | ||
const { communications_team: communicationsTeam } = useStore(); | ||
const dispatch = useDispatch(); | ||
const handleFormChange = (_, { name, value }) => dispatch( | ||
updateSubFormCommunicationsTeam(name, value), | ||
); | ||
return ( | ||
<Form.TextArea | ||
label={I18n.t('page.contacts.form.communications_team.message.label')} | ||
name="message" | ||
value={communicationsTeam.message} | ||
onChange={handleFormChange} | ||
/> | ||
); | ||
} |
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
19 changes: 19 additions & 0 deletions
19
app/webpacker/components/ContactsPage/SubForms/ResultsTeam/index.jsx
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,19 @@ | ||
import React from 'react'; | ||
import { Form } from 'semantic-ui-react'; | ||
import I18n from '../../../../lib/i18n'; | ||
import { useDispatch, useStore } from '../../../../lib/providers/StoreProvider'; | ||
import { updateSubFormResultsTeam } from '../../store/actions'; | ||
|
||
export default function ResultsTeam() { | ||
const { results_team: resultsTeam } = useStore(); | ||
const dispatch = useDispatch(); | ||
const handleFormChange = (_, { name, value }) => dispatch(updateSubFormResultsTeam(name, value)); | ||
return ( | ||
<Form.TextArea | ||
label={I18n.t('page.contacts.form.communications_team.message.label')} | ||
name="message" | ||
value={resultsTeam.message} | ||
onChange={handleFormChange} | ||
/> | ||
); | ||
} |
19 changes: 19 additions & 0 deletions
19
app/webpacker/components/ContactsPage/SubForms/SoftwareTeam/index.jsx
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,19 @@ | ||
import React from 'react'; | ||
import { Form } from 'semantic-ui-react'; | ||
import I18n from '../../../../lib/i18n'; | ||
import { useDispatch, useStore } from '../../../../lib/providers/StoreProvider'; | ||
import { updateSubFormSoftwareTeam } from '../../store/actions'; | ||
|
||
export default function SoftwareTeam() { | ||
const { software_team: softwareTeam } = useStore(); | ||
const dispatch = useDispatch(); | ||
const handleFormChange = (_, { name, value }) => dispatch(updateSubFormSoftwareTeam(name, value)); | ||
return ( | ||
<Form.TextArea | ||
label={I18n.t('page.contacts.form.communications_team.message.label')} | ||
name="message" | ||
value={softwareTeam.message} | ||
onChange={handleFormChange} | ||
/> | ||
); | ||
} |
17 changes: 0 additions & 17 deletions
17
app/webpacker/components/ContactsPage/SubForms/Wct/index.jsx
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
export const UpdateUserData = 'UPDATE_USER_DATA'; | ||
export const UpdateContactRecipient = 'UPDATE_CONTACT_RECIPIENT'; | ||
export const UpdateSubFormCompetition = 'UPDATE_SUB_FORM_COMPETITION'; | ||
export const UpdateSubFormCommunicationsTeam = 'UPDATE_SUB_FORM_COMMUNICATIONS_TEAM'; | ||
export const UpdateSubFormResultsTeam = 'UPDATE_SUB_FORM_RESULTS_TEAM'; | ||
export const UpdateSubFormSoftwareTeam = 'UPDATE_SUB_FORM_SOFTWARE_TEAM'; | ||
|
||
export const updateUserData = (name, value) => ({ | ||
type: UpdateUserData, | ||
payload: { name, value }, | ||
}); | ||
|
||
export const updateContactRecipient = (contactRecipient) => ({ | ||
type: UpdateContactRecipient, | ||
payload: { contactRecipient }, | ||
}); | ||
|
||
export const updateSubFormCompetition = (name, value) => ({ | ||
type: UpdateSubFormCompetition, | ||
payload: { name, value }, | ||
}); | ||
|
||
export const updateSubFormCommunicationsTeam = (name, value) => ({ | ||
type: UpdateSubFormCommunicationsTeam, | ||
payload: { name, value }, | ||
}); | ||
|
||
export const updateSubFormResultsTeam = (name, value) => ({ | ||
type: UpdateSubFormResultsTeam, | ||
payload: { name, value }, | ||
}); | ||
|
||
export const updateSubFormSoftwareTeam = (name, value) => ({ | ||
type: UpdateSubFormSoftwareTeam, | ||
payload: { name, value }, | ||
}); |
Oops, something went wrong.