Skip to content

Commit

Permalink
Adjust: Partner dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
RamaTaufik committed Sep 2, 2024
1 parent 97af24f commit 08cbdaf
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 2 deletions.
1 change: 1 addition & 0 deletions app/Filament/Partner/Resources/ReportResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ public static function table(Table $table): Table
->actions([
// Tables\Actions\EditAction::make(),
Tables\Actions\ViewAction::make(),
Tables\Actions\EditAction::make(),
])
->bulkActions([
Tables\Actions\BulkActionGroup::make([
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,11 @@
class ViewReport extends ViewRecord
{
protected static string $resource = ReportResource::class;

protected function getHeaderActions(): array
{
return [
Actions\EditAction::make(),
];
}
}
3 changes: 2 additions & 1 deletion app/Filament/Partner/Widgets/ReportTableWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use App\Models\Report;
use Filament\Tables;
use Filament\Tables\Table;
use Illuminate\Database\Eloquent\Builder;
use Filament\Widgets\TableWidget as BaseWidget;

class ReportTableWidget extends BaseWidget
Expand All @@ -14,7 +15,7 @@ public function table(Table $table): Table
{
return $table
->query(
Report::query()
Report::query()->where('partner_id', auth()->user()->partner->id)
)
->columns([
Tables\Columns\TextColumn::make('title')
Expand Down
4 changes: 4 additions & 0 deletions public/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@
padding: 15px 20px 15px 20px;
border-radius: 10px;
}
.btn-orange {
background-color: #FF6E01;
color: #ffffff;
}
.btn-white-outline {
background-color: rgba(0,0,0,0);
color: #ffffff;
Expand Down
5 changes: 4 additions & 1 deletion resources/views/filament/partner/pages/dashboard.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@
</div>
</div>

<a href="{{ route('filament.partner.resources.reports.create') }}" class="bg-red-700 px-4 py-2 rounded-lg">Buat Laporan</a>
<div class="flex justify-between">
<p class="text-2xl"><strong>Laporan Mitra</strong></p>
<a href="{{ route('filament.partner.resources.reports.create') }}" class="bg-red-700 px-4 py-2 rounded-lg btn btn-orange">Buat Laporan</a>
</div>

{{-- add widgets --}}
<div class="bg-white p-8">
Expand Down

0 comments on commit 08cbdaf

Please sign in to comment.