Skip to content

Commit

Permalink
chore: fix code style
Browse files Browse the repository at this point in the history
  • Loading branch information
rahmanramsi authored and github-actions[bot] committed Dec 19, 2023
1 parent 28146a1 commit fd7654f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,16 @@ public function infolist(Infolist $infolist): Infolist
return $infolist
->schema([
ShoutEntry::make('title')
->hidden(function() {
return StageManager::callForAbstract()->isStageOpen() || ! Auth::user()->can('Workflow:update');;
->hidden(function () {
return StageManager::callForAbstract()->isStageOpen() || ! Auth::user()->can('Workflow:update');
})
->type('warning')
->content(function() {
$htmlString = "Call for abstract stage is closed. ";
->content(function () {
$htmlString = 'Call for abstract stage is closed. ';
$htmlString .= sprintf("<a href='%s' class='text-warning-700 hover:underline'>Click here</a> to open it.", Workflow::getUrl());

return new HtmlString($htmlString);
})
}),
]);
}

Expand Down
17 changes: 10 additions & 7 deletions app/Panel/Resources/SubmissionResource/Pages/ViewSubmission.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ protected function getHeaderActions(): array
public function getSubheading(): string|Htmlable|null
{
$badgeHtml = match ($this->record->status) {
SubmissionStatus::Queued => '<x-filament::badge color="primary" class="w-fit">' . SubmissionStatus::Queued->value . '</x-filament::badge>',
SubmissionStatus::Declined => '<x-filament::badge color="danger" class="w-fit">' . SubmissionStatus::Declined->value . '</x-filament::badge>',
SubmissionStatus::Queued => '<x-filament::badge color="primary" class="w-fit">'.SubmissionStatus::Queued->value.'</x-filament::badge>',
SubmissionStatus::Declined => '<x-filament::badge color="danger" class="w-fit">'.SubmissionStatus::Declined->value.'</x-filament::badge>',
SubmissionStatus::Withdrawn => '<x-filament::badge color="danger" class="w-fit">'.SubmissionStatus::Withdrawn->value.'</x-filament::badge>',
SubmissionStatus::Published => '<x-filament::badge color="success" class="w-fit">'.SubmissionStatus::Published->value.'</x-filament::badge>',
SubmissionStatus::OnReview => '<x-filament::badge color="warning" class="w-fit">'.SubmissionStatus::OnReview->value.'</x-filament::badge>',
Expand Down Expand Up @@ -245,14 +245,15 @@ public function infolist(Infolist $infolist): Infolist
Tab::make('Call for Abstract')
->icon('heroicon-o-information-circle')
->schema(function () {
if (!StageManager::callForAbstract()->isStageOpen() && !$this->record->isPublished()) {
if (! StageManager::callForAbstract()->isStageOpen() && ! $this->record->isPublished()) {
return [
ShoutEntry::make('call-for-abstract-closed')
->type('warning')
->color('warning')
->content('Call for abstract stage is closed.'),
];
}

return [
LivewireEntry::make('call-for-abstract')
->livewire(CallforAbstract::class, [
Expand All @@ -263,39 +264,41 @@ public function infolist(Infolist $infolist): Infolist
Tab::make('Peer Review')
->icon('iconpark-checklist-o')
->schema(function (): array {
if (!StageManager::peerReview()->isStageOpen() && !$this->record->isPublished()) {
if (! StageManager::peerReview()->isStageOpen() && ! $this->record->isPublished()) {
return [
ShoutEntry::make('peer-review-closed')
->type('warning')
->color('warning')
->content('Peer review stage is closed.'),
];
}

return [
LivewireEntry::make('peer-review')
->livewire(PeerReview::class, [
'submission' => $this->record,
])
]),
];
}),
Tab::make('Editing')
->icon('heroicon-o-pencil')
->schema(function () {
if (!StageManager::editing()->isStageOpen() && !$this->record->isPublished()) {
if (! StageManager::editing()->isStageOpen() && ! $this->record->isPublished()) {
return [
ShoutEntry::make('editing-closed')
->type('warning')
->color('warning')
->content('Editing stage is closed.'),
];
}

return [
LivewireEntry::make('editing')
->livewire(Editing::class, [
'submission' => $this->record,
]),
];
})
}),
])
->maxWidth('full'),
]),
Expand Down

0 comments on commit fd7654f

Please sign in to comment.