Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion app/Helpers/Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use App\Models\DaftarHonorMitra;
use App\Models\DaftarHonorPegawai;
use App\Models\DaftarSp2d;
use App\Models\DataPegawai;
use App\Models\DerajatNaskah;
use App\Models\Dipa;
Expand Down
1 change: 0 additions & 1 deletion app/Models/DaftarSp2d.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace App\Models;

use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Database\Eloquent\Relations\HasMany;
Expand Down
1 change: 0 additions & 1 deletion app/Models/KerangkaAcuan.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace App\Models;

use App\Helpers\Helper;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
Expand Down
7 changes: 3 additions & 4 deletions app/Nova/DaftarSp2d.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
use Laravel\Nova\Fields\Date;
use Laravel\Nova\Fields\File;
use Laravel\Nova\Fields\HasMany;
use Laravel\Nova\Fields\Number;
use Laravel\Nova\Fields\Select;
use Laravel\Nova\Fields\Text;
use Laravel\Nova\Fields\URL;
Expand Down Expand Up @@ -89,8 +88,8 @@ public function fields(NovaRequest $request)
->options([
0 => 'Belum Ada KAK',
])
->filterable(function ($request, $query, $value, $attribute) {
$query->has('kerangkaAcuan', '<=', $value);
->filterable(function ($request, $query, $value, $attribute) {
$query->has('kerangkaAcuan', '<=', $value);
})
->onlyOnDetail(),
Panel::make('Arsip', [
Expand Down Expand Up @@ -185,6 +184,6 @@ public function actions(NovaRequest $request)

public static function indexQuery(NovaRequest $request, $query)
{
$query->whereYear('tanggal_sp2d',session('year'))->withCount('kerangkaAcuan');
$query->whereYear('tanggal_sp2d', session('year'))->withCount('kerangkaAcuan');
}
}
7 changes: 2 additions & 5 deletions app/Policies/DaftarSp2dPolicy.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ public function replicate(): bool
return false;
}


public function attachKerangkaAcuan(): bool
{
return Policy::make()
Expand All @@ -78,9 +77,7 @@ public function attachAnyKerangkaAcuan(): bool
public function detachKerangkaAcuan(): bool
{
return Policy::make()
->allowedFor('ppspm,arsiparis')
->get();
->allowedFor('ppspm,arsiparis')
->get();
}


}