Skip to content

Commit 8d74ec6

Browse files
tnagorrafrozenhelium
authored andcommitted
Do not select project type by default
1 parent 13445ba commit 8d74ec6

File tree

3 files changed

+94
-82
lines changed

3 files changed

+94
-82
lines changed

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

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import CustomOptionReadOnly from './CustomOptionReadOnly';
2222

2323
export interface Props<T extends PartialProjectFormType> {
2424
className?: string;
25-
submissionPending: boolean;
25+
disabled: boolean;
2626
value: T;
2727
setValue: (value: SetBaseValueArg<T>, doNotReset?: boolean) => void;
2828
setFieldValue: (...entries: EntriesAsList<T>) => void;
@@ -31,7 +31,7 @@ export interface Props<T extends PartialProjectFormType> {
3131

3232
function BasicProjectInfoForm(props: Props<PartialProjectFormType>) {
3333
const {
34-
submissionPending,
34+
disabled,
3535
value,
3636
setValue,
3737
setFieldValue,
@@ -99,7 +99,7 @@ function BasicProjectInfoForm(props: Props<PartialProjectFormType>) {
9999
error={error?.projectTopic}
100100
label="Project Topic"
101101
hint="Enter the topic of your project (50 char max)."
102-
disabled={submissionPending}
102+
disabled={disabled}
103103
autoFocus
104104
/>
105105
<TextInput
@@ -109,7 +109,7 @@ function BasicProjectInfoForm(props: Props<PartialProjectFormType>) {
109109
label="Project Region"
110110
hint="Enter name of your project Region (50 chars max)"
111111
error={error?.projectRegion}
112-
disabled={submissionPending}
112+
disabled={disabled}
113113
/>
114114
</div>
115115
<div className={styles.inputGroup}>
@@ -120,7 +120,7 @@ function BasicProjectInfoForm(props: Props<PartialProjectFormType>) {
120120
label="Project Number"
121121
hint="Is this project part of a bigger campaign with multiple projects?"
122122
error={error?.projectNumber}
123-
disabled={submissionPending}
123+
disabled={disabled}
124124
/>
125125
<SelectInput
126126
name={'requestingOrganisation' as const}
@@ -130,7 +130,7 @@ function BasicProjectInfoForm(props: Props<PartialProjectFormType>) {
130130
error={error?.requestingOrganisation}
131131
label="Requesting Organisation"
132132
hint="Which group, institution or community is requesting this project?"
133-
disabled={submissionPending || organisationsPending}
133+
disabled={disabled || organisationsPending}
134134
keySelector={valueSelector}
135135
labelSelector={labelSelector}
136136
/>
@@ -143,7 +143,7 @@ function BasicProjectInfoForm(props: Props<PartialProjectFormType>) {
143143
readOnly
144144
placeholder="[Project Topic] - [Project Region] ([Task Number]) [Requesting Organisation]"
145145
// error={error?.name}
146-
disabled={submissionPending}
146+
disabled={disabled}
147147
/>
148148
<div className={styles.inputGroup}>
149149
<SelectInput
@@ -156,7 +156,7 @@ function BasicProjectInfoForm(props: Props<PartialProjectFormType>) {
156156
label="Visibility"
157157
hint="Choose either 'public' or select the team for which this project should be displayed"
158158
error={error?.visibility}
159-
disabled={submissionPending || teamsPending}
159+
disabled={disabled || teamsPending}
160160
/>
161161
<TextInput
162162
name={'lookFor' as const}
@@ -165,7 +165,7 @@ function BasicProjectInfoForm(props: Props<PartialProjectFormType>) {
165165
error={error?.lookFor}
166166
label="Look For"
167167
hint="What should the users look for (e.g. buildings, cars, trees)? (25 chars max)"
168-
disabled={submissionPending}
168+
disabled={disabled}
169169
/>
170170
</div>
171171
<TextArea
@@ -175,7 +175,7 @@ function BasicProjectInfoForm(props: Props<PartialProjectFormType>) {
175175
error={error?.projectDetails}
176176
label="Project Details"
177177
hint="Enter the description for your project. (markdown syntax is supported)."
178-
disabled={submissionPending}
178+
disabled={disabled}
179179
rows={4}
180180
/>
181181
<div className={styles.inputGroup}>
@@ -187,7 +187,7 @@ function BasicProjectInfoForm(props: Props<PartialProjectFormType>) {
187187
hint="Make sure you have the rights to use the image. It should end with .jpg or .png."
188188
showPreview
189189
error={error?.projectImage}
190-
disabled={submissionPending}
190+
disabled={disabled}
191191
/>
192192
<div className={styles.verticalInputGroup}>
193193
<SelectInput
@@ -200,7 +200,7 @@ function BasicProjectInfoForm(props: Props<PartialProjectFormType>) {
200200
error={error?.tutorialId}
201201
keySelector={valueSelector}
202202
labelSelector={labelSelector}
203-
disabled={submissionPending || tutorialsPending}
203+
disabled={disabled || tutorialsPending}
204204
nonClearable
205205
/>
206206
<NumberInput
@@ -210,7 +210,7 @@ function BasicProjectInfoForm(props: Props<PartialProjectFormType>) {
210210
label="Verification Number"
211211
hint="How many people do you want to see every tile before you consider it finished? (default is 3 - more is recommended for harder tasks, but this will also make project take longer)"
212212
error={error?.verificationNumber}
213-
disabled={submissionPending}
213+
disabled={disabled}
214214
/>
215215
<NumberInput
216216
name={'groupSize' as const}
@@ -219,7 +219,7 @@ function BasicProjectInfoForm(props: Props<PartialProjectFormType>) {
219219
label="Group Size"
220220
hint="How big should a mapping session be? Group size refers to the number of tasks per mapping session."
221221
error={error?.groupSize}
222-
disabled={submissionPending}
222+
disabled={disabled}
223223
/>
224224
</div>
225225
</div>

0 commit comments

Comments
 (0)