-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: campaign type and add files (#670)
* fix: campaign type and add files - 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 * fix: add campaign end - add campaign end type and date
- Loading branch information
Showing
12 changed files
with
128 additions
and
102 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,9 @@ export const mockNewCampaignApplication = { | |
campaignGuarantee: 'Test guarantee', | ||
otherFinanceSources: 'Test otherFinanceSources', | ||
otherNotes: 'Test otherNotes', | ||
category: CampaignTypeCategory.medical, | ||
campaignTypeId: 'ffdbcc41-85ec-0000-9e59-0662f3b433af', | ||
campaignEnd: 'funds', | ||
campaignEndDate: '2024-02-02', | ||
} | ||
|
||
export const mockSingleCampaignApplication = { | ||
|
@@ -37,10 +38,12 @@ 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' }], | ||
campaignEnd: 'funds', | ||
campaignEndDate: undefined, | ||
} | ||
|
||
export const mockCampaigns = [ | ||
|
@@ -63,7 +66,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 +89,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 +120,7 @@ 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', | ||
campaignEnd: 'funds', | ||
campaignEndDate: '2024-09-09', | ||
} |
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
Oops, something went wrong.