-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature: add create new campaign flow (#7543)
- Loading branch information
1 parent
da95ba6
commit 67011c2
Showing
16 changed files
with
882 additions
and
109 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
|
||
namespace Give\Campaigns\ListTable\Columns; | ||
|
||
use Give\Campaigns\Models\Campaign; | ||
use Give\Framework\ListTable\ModelColumn; | ||
|
||
/** | ||
* @unreleased | ||
*/ | ||
class DateColumn extends ModelColumn | ||
{ | ||
protected $sortColumn = 'date'; | ||
|
||
/** | ||
* @unreleased | ||
*/ | ||
public static function getId(): string | ||
{ | ||
return 'date'; | ||
} | ||
|
||
/** | ||
* @unreleased | ||
*/ | ||
public function getLabel(): string | ||
{ | ||
return __('Date', 'give'); | ||
} | ||
|
||
/** | ||
* @unreleased | ||
* | ||
* @param Campaign $model | ||
*/ | ||
public function getCellValue($model, $locale = ''): string | ||
{ | ||
$format = _x('m/d/Y \a\t g:ia', 'date format', 'give'); | ||
|
||
return $model->createdAt->format($format); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
|
||
namespace Give\Campaigns\ListTable\Columns; | ||
|
||
use Give\Campaigns\Models\Campaign; | ||
use Give\Framework\ListTable\ModelColumn; | ||
|
||
/** | ||
* @unreleased | ||
*/ | ||
class GoalColumn extends ModelColumn | ||
{ | ||
protected $sortColumn = 'goal'; | ||
|
||
/** | ||
* @unreleased | ||
*/ | ||
public static function getId(): string | ||
{ | ||
return 'goal'; | ||
} | ||
|
||
/** | ||
* @unreleased | ||
*/ | ||
public function getLabel(): string | ||
{ | ||
return __('Goal', 'give'); | ||
} | ||
|
||
/** | ||
* @unreleased | ||
* | ||
* @param Campaign $model | ||
*/ | ||
public function getCellValue($model): int | ||
{ | ||
return $model->goal; | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
|
||
namespace Give\Campaigns\ListTable\Columns; | ||
|
||
use Give\Campaigns\Models\Campaign; | ||
use Give\Framework\ListTable\ModelColumn; | ||
|
||
/** | ||
* @unreleased | ||
*/ | ||
class RevenueColumn extends ModelColumn | ||
{ | ||
protected $sortColumn = 'revenue'; | ||
|
||
/** | ||
* @unreleased | ||
*/ | ||
public static function getId(): string | ||
{ | ||
return 'revenue'; | ||
} | ||
|
||
/** | ||
* @unreleased | ||
*/ | ||
public function getLabel(): string | ||
{ | ||
return __('Revenue', 'give'); | ||
} | ||
|
||
/** | ||
* @unreleased | ||
* | ||
* @param Campaign $model | ||
*/ | ||
public function getCellValue($model): int | ||
{ | ||
return 0; | ||
} | ||
} |
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.