diff --git a/src/composables/useClient.ts b/src/composables/useClient.ts index 50e7532166d..1909cafbc66 100644 --- a/src/composables/useClient.ts +++ b/src/composables/useClient.ts @@ -68,7 +68,7 @@ export function useClient() { body: payload.body, discussion: payload.discussion, choices: payload.choices, - labels: [], + labels: payload.labels, plugins: JSON.stringify(plugins) }); } else if (type === 'vote') { diff --git a/src/composables/useFormSpaceProposal.ts b/src/composables/useFormSpaceProposal.ts index a4b7732bd37..49d04931ee8 100644 --- a/src/composables/useFormSpaceProposal.ts +++ b/src/composables/useFormSpaceProposal.ts @@ -9,6 +9,7 @@ interface ProposalForm { body: string; discussion: string; choices: { key: number; text: string }[]; + labels: string[]; start: number; end: number; snapshot: number; @@ -29,6 +30,7 @@ const EMPTY_PROPOSAL: ProposalForm = { { key: 0, text: '' }, { key: 1, text: '' } ], + labels: [], start: parseInt((Date.now() / 1e3).toFixed()), end: 0, snapshot: 0, @@ -60,6 +62,7 @@ export function useFormSpaceProposal({ spaceType = 'default' } = {}) { name: string; body: string; choices: { key: number; text: string }[]; + labels: string[]; isBodySet: boolean; }>(`snapshot.proposal.${route.params.key}`, clone(EMPTY_PROPOSAL_DRAFT)); diff --git a/src/composables/useFormSpaceSettings.ts b/src/composables/useFormSpaceSettings.ts index 00d82058ef8..d73d1e06f45 100644 --- a/src/composables/useFormSpaceSettings.ts +++ b/src/composables/useFormSpaceSettings.ts @@ -16,6 +16,7 @@ const DEFAULT_DELEGATION = { const EMPTY_SPACE_FORM = { strategies: [], categories: [], + labels: [], treasuries: [], admins: [], moderators: [], diff --git a/src/helpers/queries.ts b/src/helpers/queries.ts index eacc199b349..08d8c175ebd 100644 --- a/src/helpers/queries.ts +++ b/src/helpers/queries.ts @@ -46,6 +46,7 @@ export const PROPOSAL_QUERY = gql` body discussion choices + labels start end snapshot @@ -460,6 +461,12 @@ export const SPACE_QUERY = gql` moderators members categories + labels { + id + name + description + color + } plugins followersCount template diff --git a/src/views/SpaceCreate.vue b/src/views/SpaceCreate.vue index cda8027ce4e..5c8d00b3ab6 100644 --- a/src/views/SpaceCreate.vue +++ b/src/views/SpaceCreate.vue @@ -298,6 +298,7 @@ function setSourceProposal(proposal) { body: proposal.body, discussion: proposal.discussion, choices: proposal.choices, + labels: proposal.labels, start: proposal.start, end: proposal.end, snapshot: proposal.snapshot,