-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- add files to the campaign application findOne - replace category with campaignTypeId (category is a property of the campaignType and was used incorrectly to define it) - linting fixes
- Loading branch information
Showing
11 changed files
with
76 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
import { CampaignApplicationState, CampaignTypeCategory } from '@prisma/client' | ||
import { CreateCampaignApplicationDto } from '../dto/create-campaign-application.dto' | ||
import { CampaignApplicationState } from '@prisma/client' | ||
|
||
export const mockNewCampaignApplication = { | ||
campaignName: 'Test Campaign', | ||
|
@@ -15,7 +14,7 @@ export const mockNewCampaignApplication = { | |
campaignGuarantee: 'Test guarantee', | ||
otherFinanceSources: 'Test otherFinanceSources', | ||
otherNotes: 'Test otherNotes', | ||
category: CampaignTypeCategory.medical, | ||
campaignTypeId: 'ffdbcc41-85ec-0000-9e59-0662f3b433af', | ||
} | ||
|
||
export const mockSingleCampaignApplication = { | ||
|
@@ -37,7 +36,7 @@ export const mockSingleCampaignApplication = { | |
otherFinanceSources: 'test otherFinanceSources1', | ||
otherNotes: 'test otherNotes1', | ||
state: CampaignApplicationState.review, | ||
category: CampaignTypeCategory.medical, | ||
campaignTypeId: 'ffdbcc41-85ec-0000-9e59-0662f3b433af', | ||
ticketURL: 'testsodifhso1', | ||
archived: false, | ||
documents: [{ id: 'fileId' }], | ||
|
@@ -63,7 +62,7 @@ export const mockCampaigns = [ | |
otherFinanceSources: 'test otherFinanceSources1', | ||
otherNotes: 'test otherNotes1', | ||
state: CampaignApplicationState.review, | ||
category: CampaignTypeCategory.medical, | ||
campaignTypeId: 'ffdbcc41-85ec-0000-9e59-0662f3b433af', | ||
ticketURL: 'testsodifhso1', | ||
archived: false, | ||
}, | ||
|
@@ -86,7 +85,7 @@ export const mockCampaigns = [ | |
otherFinanceSources: 'test otherFinanceSources2', | ||
otherNotes: 'test otherNotes2', | ||
state: CampaignApplicationState.review, | ||
category: CampaignTypeCategory.medical, | ||
campaignTypeId: 'ffdbcc41-85ec-0000-9e59-0662f3b433af', | ||
ticketURL: 'testsodifhso2', | ||
archived: false, | ||
}, | ||
|
@@ -117,42 +116,5 @@ export const mockUpdateCampaignApplication = { | |
campaignGuarantee: 'Test guarantee', | ||
otherFinanceSources: 'Test otherFinanceSources', | ||
otherNotes: 'Test otherNotes', | ||
category: CampaignTypeCategory.medical, | ||
} | ||
|
||
const mockUpdateCampaignApplicationResponceOrganizer = { | ||
amount: '1000', | ||
beneficiary: 'Test beneficary', | ||
campaignGuarantee: 'Test guarantee', | ||
campaignName: 'Test Campaign', | ||
category: 'medical', | ||
description: 'Test description', | ||
goal: 'Test goal', | ||
history: 'Test history', | ||
organizerBeneficiaryRel: 'Test organizerBeneficiaryRel', | ||
organizerEmail: '[email protected]', | ||
organizerName: 'Test Organizer', | ||
organizerPhone: '123456789', | ||
otherFinanceSources: 'Test otherFinanceSources', | ||
otherNotes: 'Test otherNotes', | ||
} | ||
|
||
const mockUpdateCampaignApplicationResponceAdmin = { | ||
amount: '1000', | ||
beneficiary: 'Test beneficary', | ||
campaignGuarantee: 'Test guarantee', | ||
campaignName: 'Test Campaign', | ||
category: 'medical', | ||
description: 'Test description', | ||
goal: 'Test goal', | ||
history: 'Test history', | ||
organizerBeneficiaryRel: 'Test organizerBeneficiaryRel', | ||
organizerEmail: '[email protected]', | ||
organizerName: 'Test Organizer', | ||
organizerPhone: '123456789', | ||
otherFinanceSources: 'Test otherFinanceSources', | ||
otherNotes: 'Test otherNotes', | ||
archived: false, | ||
state: 'active', | ||
ticketURL: 'http://test.com/ticket', | ||
campaignTypeId: 'ffdbcc41-85ec-0000-9e59-0662f3b433af', | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
migrations/20240907144954_replace_category_with_campaign_type_id/migration.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* | ||
Warnings: | ||
- You are about to drop the column `category` on the `campaign_applications` table. All the data in the column will be lost. | ||
*/ | ||
-- AlterTable | ||
ALTER TABLE "campaign_applications" DROP COLUMN "category", | ||
ADD COLUMN "campaignTypeId" UUID; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters