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
3 changes: 2 additions & 1 deletion app/Helpers/Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ public static function setOptions($collection, $value, $label, $group = '')
return $options;
}

public static function getYearFromDate ($tanggal, $typeDate = true)
public static function getYearFromDate($tanggal, $typeDate = true)
{
return $typeDate ? Carbon::createFromFormat('Y-m-d', $tanggal->format('Y-m-d'))->year : Carbon::createFromFormat('Y-m-d', $tanggal)->year;
}
Expand Down Expand Up @@ -829,6 +829,7 @@ public static function hapusTitikAkhirKalimat($kalimat)
public static function setOptionsMataAnggaran($tahun)
{
$dipa_id = Dipa::cache()->get('all')->where('tahun', $tahun)->first()->id;

return self::setOptions(MataAnggaran::cache()->get('all')->where('dipa_id', $dipa_id), 'mak', 'mak');
}
}
4 changes: 1 addition & 3 deletions app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,10 @@ public function dataPegawai(): HasMany
return $this->hasMany(DataPegawai::class);
}


protected static function booted(): void
protected static function booted(): void
{
static::creating(function (User $user) {
$user->avatar = $user->avatar ?? 'G99ElrTEgEDRG4blE3m1xxMmFcfB0VVeLio0L3H6.jpg';
});
}
}

2 changes: 0 additions & 2 deletions app/Nova/KerangkaAcuan.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@

use App\Helpers\Helper;
use App\Helpers\Policy;
use App\Models\MataAnggaran;
use App\Models\UnitKerja;
use App\Nova\Actions\Download;
use Carbon\Carbon;
use Illuminate\Http\Request;
use Laravel\Nova\Fields\BelongsTo;
use Laravel\Nova\Fields\Boolean;
Expand Down