Skip to content

Commit

Permalink
Add hardwareReportLink to organization basecamp form (#810)
Browse files Browse the repository at this point in the history
  • Loading branch information
zichongkao committed May 8, 2023
1 parent eb13d0f commit 34022b3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/components/basecamp/OrganizationForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ export default function OrganizationForm ({ existingOrg, onClose }: Organization
email: existingOrg?.content?.email ?? '',
instagramLink: existingOrg?.content?.instagramLink ?? '',
donationLink: existingOrg?.content?.donationLink ?? '',
hardwareReportLink: existingOrg?.content?.hardwareReportLink ?? '',
facebookLink: existingOrg?.content?.facebookLink ?? ''
}
})
Expand All @@ -109,6 +110,7 @@ export default function OrganizationForm ({ existingOrg, onClose }: Organization
donationLink,
facebookLink,
instagramLink,
hardwareReportLink,
description
}: HtmlFormProps): Promise<void> => {
const dirtyEditableFields: OrganizationEditableFieldsType = {
Expand All @@ -120,6 +122,7 @@ export default function OrganizationForm ({ existingOrg, onClose }: Organization
...dirtyFields?.donationLink === true && { donationLink },
...dirtyFields?.facebookLink === true && { facebookLink },
...dirtyFields?.instagramLink === true && { instagramLink },
...dirtyFields?.hardwareReportLink === true && { hardwareReportLink },
...dirtyFields?.description === true && { description }
}
if (existingOrg == null) {
Expand Down Expand Up @@ -224,6 +227,11 @@ export default function OrganizationForm ({ existingOrg, onClose }: Organization
name='facebookLink'
placeholder='https://www.facebook.com/climbingorg'
/>
<Input
label='Hardware Report Link:'
name='hardwareReportLink'
placeholder='https://www.climbingorg.com/reporthardware'
/>
<Input
label='Donation Link:'
name='donationLink'
Expand Down
1 change: 1 addition & 0 deletions src/js/graphql/gql/organization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ fragment OrganizationFragment on Organization {
donationLink
instagramLink
facebookLink
hardwareReportLink
description
}
createdAt
Expand Down
1 change: 1 addition & 0 deletions src/js/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ export interface OrganizationContentType {
donationLink?: string
instagramLink?: string
facebookLink?: string
hardwareReportLink?: string
description?: string
}

Expand Down

0 comments on commit 34022b3

Please sign in to comment.