Skip to content

Commit

Permalink
add impact and update input type
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlosQ96 authored and mohammadranjbarz committed Nov 22, 2022
1 parent 3d61a28 commit d7522ca
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/entities/projectVerificationForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ export class Milestones {
problem?: string;
@Field(type => String, { nullable: true })
plans?: string;
@Field(type => String, { nullable: true })
impact?: string;
}

@ObjectType()
Expand Down
3 changes: 3 additions & 0 deletions src/repositories/projectVerificationRepository.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,9 @@ function updateMilestonesOfProjectVerificationTestCases() {
achievedMilestonesProofs: ['ipfsHash'],
foundationDate: new Date().toString(),
mission: 'Make world a better place',
problem: 'Also Make the world a better place',
plans: 'Planning to make the world a better place',
impact: 'Did make the world a better place',
};
const updatedProjectVerification =
await updateMilestonesOfProjectVerification({
Expand Down
6 changes: 6 additions & 0 deletions src/resolvers/types/ProjectVerificationUpdateInput.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ class MilestonesInputType {
achievedMilestones?: string;
@Field(type => [String], { nullable: true })
achievedMilestonesProofs?: string[];
@Field(type => String, { nullable: true })
problem?: string;
@Field(type => String, { nullable: true })
plans?: string;
@Field(type => String, { nullable: true })
impact?: string;
}

@InputType()
Expand Down
5 changes: 5 additions & 0 deletions src/server/components/VerificationFormMilestones.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const VerificationFormMilestones = props => {
});
const problem = props?.record?.params?.['milestones.problem'] || '';
const plans = props?.record?.params?.['milestones.plans'] || '';
const impact = props?.record?.params?.['milestones.impact'] || '';
const foundationDate =
props?.record?.params?.['milestones.foundationDate'] || '';
const achievedMilestones =
Expand Down Expand Up @@ -45,6 +46,10 @@ const VerificationFormMilestones = props => {
<Label>Plans</Label>
{plans}
</Section>
<Section>
<Label>Impact</Label>
{impact}
</Section>

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

const managingFundsValidator = Joi.object({
Expand Down

0 comments on commit d7522ca

Please sign in to comment.