Skip to content

Commit

Permalink
Merge branch 'feat/projects-view' of https://github.com/decentraland/…
Browse files Browse the repository at this point in the history
…governance into chore/1790-create-project-personnel
  • Loading branch information
1emu committed May 20, 2024
2 parents da24b77 + ee59ada commit b11c1db
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 7 deletions.
42 changes: 37 additions & 5 deletions src/entities/Grant/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,24 @@ export function toGrantSubtype<OrElse>(value: string | null | undefined, orElse:
return isGrantSubtype(value) ? (value as SubtypeOptions) : orElse()
}

const MilestoneItemSchema = {
title: {
type: 'string',
minLength: 1,
maxLength: 80,
},
tasks: {
type: 'string',
minLength: 1,
maxLength: 750,
},
delivery_date: {
type: 'string',
minLength: 1,
maxLength: 10,
},
}

export const GrantRequestGeneralInfoSchema = {
title: {
type: 'string',
Expand All @@ -108,10 +126,14 @@ export const GrantRequestGeneralInfoSchema = {
type: 'string',
format: 'email',
},
roadmap: {
type: 'string',
minLength: 20,
maxLength: 2000,
milestones: {
type: 'array',
items: {
type: 'object',
additionalProperties: false,
required: [...Object.keys(MilestoneItemSchema)],
properties: MilestoneItemSchema,
},
},
coAuthors: {
type: 'array',
Expand Down Expand Up @@ -315,6 +337,10 @@ export const TeamMemberItemSchema = {
minLength: 1,
maxLength: 750,
},
address: {
type: 'string',
format: 'address',
},
relevantLink: {
type: 'string',
minLength: 0,
Expand Down Expand Up @@ -391,7 +417,7 @@ export type GrantRequestGeneralInfo = {
email: string
specification?: string
personnel?: string
roadmap: string
milestones: Milestone[]
coAuthors?: string[]
}

Expand All @@ -415,6 +441,12 @@ export type TeamMember = {
relevantLink?: string
}

type Milestone = {
title: string
tasks: string
delivery_date: string
}

export type ProposalRequestTeam = {
members: TeamMember[]
}
Expand Down
4 changes: 2 additions & 2 deletions src/entities/Proposal/templates/grant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ ${proposal.email}
${formatMarkdown(proposal.description)}
## Roadmap and milestones
## Milestones
${formatMarkdown(proposal.roadmap)}
${formatMarkdown(proposal.milestones.map((milestone) => `${milestone.delivery_date} - ${milestone.title}`).join('\n'))}
`

0 comments on commit b11c1db

Please sign in to comment.