Skip to content

Commit fb3a13f

Browse files
authored
Merge pull request #941 from mapswipe/feature/add-manual-url-field
Add optional manualUrl field to Manager Dashboard NewProject view
2 parents 716d82e + dab4717 commit fb3a13f

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

manager-dashboard/app/views/NewProject/BasicProjectInfoForm/index.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,16 @@ function BasicProjectInfoForm(props: Props<PartialProjectFormType>) {
187187
disabled={disabled || tutorialsPending}
188188
nonClearable
189189
/>
190+
<TextInput
191+
name={'manualUrl' as const}
192+
value={value?.manualUrl}
193+
onChange={setFieldValue}
194+
error={error?.manualUrl}
195+
label="Additional information resource (URL)"
196+
hint="Provide an optional link to a resource with additional information on the project (only visible in the MapSwipe web app)"
197+
spellCheck="false"
198+
disabled={disabled}
199+
/>
190200
<NumberInput
191201
name={'verificationNumber' as const}
192202
value={value?.verificationNumber}

manager-dashboard/app/views/NewProject/utils.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ export interface ProjectFormType {
5959
visibility: string;
6060
lookFor: string;
6161
tutorialId: string;
62+
manualUrl: string;
6263
projectDetails: string;
6364
projectImage: File; // image
6465
verificationNumber: number;
@@ -230,6 +231,10 @@ export const projectFormSchema: ProjectFormSchema = {
230231
requiredValidation: requiredStringCondition,
231232
validations: [getNoMoreThanNCharacterCondition(XS_TEXT_MAX_LENGTH)],
232233
},
234+
manualUrl: {
235+
required: false,
236+
validations: [urlCondition],
237+
},
233238
projectDetails: {
234239
required: true,
235240
requiredValidation: requiredStringCondition,

0 commit comments

Comments
 (0)