Skip to content

Commit

Permalink
remove use of proposal category (#3590)
Browse files Browse the repository at this point in the history
* remove use of proposal category

* undo special core v
  • Loading branch information
mattcasey authored Feb 5, 2024
1 parent 25fbbda commit b156cf7
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 14 deletions.
1 change: 0 additions & 1 deletion lib/proposal/createRewardsForProposal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ export async function createRewardsForProposal({ proposalId, userId }: { userId:
include: {
authors: true,
reviewers: true,
category: true,
rubricAnswers: true,
rubricCriteria: {
orderBy: {
Expand Down
4 changes: 0 additions & 4 deletions lib/templates/exportWorkspacePages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,6 @@ export async function exportWorkspacePages({
}
}
});
// unset categoryId until its removed from the db
if (proposal?.categoryId) {
proposal.categoryId = null;
}
node.proposal = proposal;
}

Expand Down
8 changes: 0 additions & 8 deletions scripts/exportProposalScores.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ type ExportedProposal = {
proposalUrl: string;
authors: string;
title: string;
category: string;
total: string | number;
average: string | number;
rubricResults: string;
Expand All @@ -21,7 +20,6 @@ const exportedFormat: Record<ExportKeys, string> = {
authors: 'Author',
proposalUrl: 'Proposal URL',
title: 'Title',
category: 'Category',
total: 'Total',
average: 'Average',
rubricResults: 'Rubric Results'
Expand Down Expand Up @@ -50,11 +48,6 @@ async function exportEvaluatedProposalScores({ domain }: { domain: string }) {
}
},
include: {
category: {
select: {
title: true
}
},
rubricAnswers: true,
rubricCriteria: {
orderBy: {
Expand Down Expand Up @@ -142,7 +135,6 @@ async function exportEvaluatedProposalScores({ domain }: { domain: string }) {
authors: p.authors.map((a) => a.author.username).join(newLine),
average: results.allScores.average ?? '-',
total: results.allScores.sum ?? '-',
category: p.category?.title ?? 'Unnamed Category',
title: p.page?.title ?? 'Proposal',
proposalUrl: `https://app.charmverse.io/${domain}/${p.page?.path}`,
rubricResults: rubricDetails?.trim() ? rubricDetails.trim() : '-'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @ts-nocheck
import { prisma } from '@charmverse/core/prisma-client';
import { createDefaultProposal } from 'lib/proposal/createDefaultProposal';
import { upsertDefaultRewardsBoard } from 'lib/rewards/blocks/upsertDefaultRewardsBoard';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @ts-nocheck
import { prisma } from '@charmverse/core/prisma-client';
import { getDefaultBoard, getDefaultTableView } from 'components/proposals/components/ProposalsBoard/utils/boardData';
import { Block, blockToPrisma } from 'lib/focalboard/block';
Expand All @@ -14,7 +15,6 @@ async function transferProposalCategories() {
proposals: {
select: {
id: true,
categoryId: true,
fields: true
}
},
Expand Down

0 comments on commit b156cf7

Please sign in to comment.