Skip to content

Commit

Permalink
Merge pull request #192 from canyongbs/features/AIDAPP-205-add-badge-…
Browse files Browse the repository at this point in the history
…for-current-status

[AIDAPP-205]: Introduce a badge that displays the current status (e.g., published) for a knowledge base article.
  • Loading branch information
Orrison authored Jul 31, 2024
2 parents 6d15d72 + f3b4f07 commit 064305e
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{{--
<COPYRIGHT>
Copyright © 2016-2024, Canyon GBS LLC. All rights reserved.
Aiding App™ is licensed under the Elastic License 2.0. For more details,
see <https://github.com/canyongbs/aidingapp/blob/main/LICENSE.>
Notice:
- You may not provide the software to third parties as a hosted or managed
service, where the service provides users with access to any substantial set of
the features or functionality of the software.
- You may not move, change, disable, or circumvent the license key functionality
in the software, and you may not remove or obscure any functionality in the
software that is protected by the license key.
- You may not alter, remove, or obscure any licensing, copyright, or other notices
of the licensor in the software. Any use of the licensor’s trademarks is subject
to applicable law.
- Canyon GBS LLC respects the intellectual property rights of others and expects the
same in return. Canyon GBS™ and Aiding App™ are registered trademarks of
Canyon GBS LLC, and we are committed to enforcing and protecting our trademarks
vigorously.
- The software solution, including services, infrastructure, and code, is offered as a
Software as a Service (SaaS) by Canyon GBS LLC.
- Use of this software implies agreement to the license terms and conditions as stated
in the Elastic License 2.0.
For more information or inquiries please visit our website at
<https://www.canyongbs.com> or contact us via email at legal@canyongbs.com.
</COPYRIGHT>
--}}

<div class="flex gap-2">
<x-filament::badge>
{{ $getRecord()?->status?->name ?? '' }}
</x-filament::badge>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@

use Filament\Forms\Form;
use Filament\Actions\EditAction;
use Filament\Forms\Components\View;
use Filament\Forms\Components\Section;
use FilamentTiptapEditor\TiptapEditor;
use Illuminate\Database\Eloquent\Model;
Expand Down Expand Up @@ -87,6 +88,8 @@ public function form(Form $form): Form
}),
),
]),
View::make('knowledge-base::filament.pages.badges')
->visible(fn (Model $record): bool => ! empty($record->status)),
TiptapEditor::make('article_details')
->label('Article Details')
->columnSpanFull()
Expand Down

0 comments on commit 064305e

Please sign in to comment.