Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hotfix verifiction form problem #734

Merged
merged 2 commits into from
Nov 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "giveth-graphql-api",
"version": "1.7.3",
"version": "1.7.4",
"description": "Backend GraphQL server for Giveth originally forked from Topia",
"main": "./dist/index.js",
"dependencies": {
Expand Down
5 changes: 4 additions & 1 deletion src/entities/projectVerificationForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,16 @@ export class ProjectContacts {
export class Milestones {
@Field(type => String, { nullable: true })
foundationDate?: String;

@Field({ nullable: true })
mission?: string;
@Field({ nullable: true })
achievedMilestones?: string;
@Field(type => [String], { nullable: true })
achievedMilestonesProofs?: string[];
@Field(type => String, { nullable: true })
problem?: string;
@Field(type => String, { nullable: true })
plans?: string;
}

@ObjectType()
Expand Down
10 changes: 10 additions & 0 deletions src/server/components/VerificationFormMilestones.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ const VerificationFormMilestones = props => {
proofs.push(props.record.params[key]);
}
});
const problem = props?.record?.params?.['milestones.problem'] || '';
const plans = props?.record?.params?.['milestones.plans'] || '';
const foundationDate =
props?.record?.params?.['milestones.foundationDate'] || '';
const achievedMilestones =
Expand All @@ -23,6 +25,10 @@ const VerificationFormMilestones = props => {
<Label>Project Milestones</Label>

<Section>
<Section>
<Label>Problem</Label>
{problem}
</Section>
<Section>
<Label>Foundation date</Label>
{foundationDate}
Expand All @@ -35,6 +41,10 @@ const VerificationFormMilestones = props => {
<Label>Achieved Milestones</Label>
{achievedMilestones}
</Section>
<Section>
<Label>Plans</Label>
{plans}
</Section>

<Section>
<Label>Milestones Proofs</Label>
Expand Down
2 changes: 2 additions & 0 deletions src/utils/validators/graphqlQueryValidators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ const milestonesValidator = Joi.object({
mission: Joi.string().allow(''),
achievedMilestones: Joi.string().allow(''),
achievedMilestonesProofs: Joi.array()?.items(Joi.string()).max(5),
problem: Joi.string().allow(''),
plans: Joi.string().allow(''),
});

const managingFundsValidator = Joi.object({
Expand Down