-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix display gala project in organization dashboard page
Fix display logic Fix update gala project
- Loading branch information
1 parent
91f5969
commit 5f421c8
Showing
17 changed files
with
526 additions
and
187 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace App\Enums; | ||
|
||
use App\Concerns\Enums\Arrayable; | ||
use App\Concerns\Enums\Comparable; | ||
use App\Concerns\Enums\HasLabel; | ||
|
||
enum GalaProjectStatus: string | ||
{ | ||
use Arrayable; | ||
use Comparable; | ||
use HasLabel; | ||
|
||
case draft = 'draft'; | ||
case publish = 'published'; | ||
|
||
protected function labelKeyPrefix(): ?string | ||
{ | ||
return 'project.gala_project_status_ar'; | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace App\Http\Resources\GalaProject; | ||
|
||
use Illuminate\Http\Request; | ||
use Illuminate\Http\Resources\Json\JsonResource; | ||
|
||
class ShowResource extends JsonResource | ||
{ | ||
/** | ||
* Transform the resource into an array. | ||
* | ||
* @return array<string, mixed> | ||
*/ | ||
public static $wrap = null; | ||
|
||
public function toArray(Request $request): array | ||
{ | ||
return [ | ||
|
||
'organization' => [ | ||
'name' => $this->organization->name, | ||
'id' => $this->organization->id, | ||
], | ||
'name' => $this->name, | ||
'slug' => $this->slug, | ||
'description' => $this->description, | ||
'start_date' => $this->start_date, | ||
'end_date' => $this->end_date, | ||
'areas' => $this->area, | ||
'youth' => $this->youth ? __('field.boolean.true') : __('field.boolean.false'), | ||
'organization_type' => $this->organization_type->label(), | ||
'reason' => $this->reason, | ||
'solution' => $this->solution, | ||
'project_details' => $this->project_details, | ||
'special' => $this->special, | ||
'is_draft' => $this->isDraft(), | ||
'results' => $this->results, | ||
'proud' => $this->proud, | ||
'partnership' => $this->partnership ? __('field.boolean.true') : __('field.boolean.false'), | ||
'partnership_details' => $this->partnership_details, | ||
'budget_details' => $this->budget_details, | ||
'participants' => $this->participants, | ||
'team_details' => $this->team_details, | ||
'contact' => $this->contact, | ||
'status' => $this->status->label(), | ||
'eligible' => $this->eligible ? __('field.boolean.true') : __('field.boolean.false'), | ||
'short_list' => $this->short_list ? __('field.boolean.true') : __('field.boolean.false'), | ||
'created_at' => $this->created_at, | ||
'updated_at' => $this->updated_at, | ||
|
||
]; | ||
} | ||
|
||
} |
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.