-
Notifications
You must be signed in to change notification settings - Fork 195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: Form inherits campaign goal #7569
Feature: Form inherits campaign goal #7569
Conversation
…o feature/form-inherit-campaign-goal-GIVE-1263 # Conflicts: # src/Campaigns/Routes/RegisterCampaignRoutes.php # src/Campaigns/ValueObjects/CampaignGoalType.php # src/Campaigns/resources/admin/components/CampaignFormModal/index.tsx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alaca I left a few comments with improvement suggestions.
Also, after pulling this branch I could see the campaign on the list table and I got the following fatal error in the logs:
[18-Oct-2024 17:46:55 UTC] PHP Fatal error: Uncaught TypeError: Return value of Give\Campaigns\DataTransferObjects\CampaignGoalData::getPercentage() must be of the type int, float returned in C:\Users\glaub\Local Sites\givewp\app\public\wp-content\plugins\give\src\Campaigns\DataTransferObjects\CampaignGoalData.php:83
Stack trace:
#0 C:\Users\glaub\Local Sites\givewp\app\public\wp-content\plugins\give\src\Campaigns\DataTransferObjects\CampaignGoalData.php(53): Give\Campaigns\DataTransferObjects\CampaignGoalData->getPercentage()
#1 C:\Users\glaub\Local Sites\givewp\app\public\wp-content\plugins\give\src\Campaigns\ListTable\Columns\GoalColumn.php(39): Give\Campaigns\DataTransferObjects\CampaignGoalData->__construct(Object(Give\Campaigns\Models\Campaign))
#2 C:\Users\glaub\Local Sites\givewp\app\public\wp-content\plugins\give\src\Framework\ListTable\ListTable.php(135): Give\Campaigns\ListTable\Columns\GoalColumn->getCellValue(Object(Give\Campaigns\Models\Campaign), 'en-US')
#3 C:\Users\glaub\Local Sites\givewp\app\public\wp-content\plugins\give\src\Framewo in C:\Users\glaub\Local Sites\givewp\app\public\wp-content\plugins\give\src\Campaigns\DataTransferObjects\CampaignGoalData.php on line 83
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Description
WIP
This PR adds functionality that sets the form goal based on the campaign goal.
Affects
Form goal
Testing Instructions
Create a new campaign
Set campaign goal
Verify that the default campaign form has the same goal settings as the campaign
Create another form and verify that the new form also has the same goal settings as the campaign.
Pre-review Checklist
@unreleased
tags included in DocBlocks