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
18 changes: 9 additions & 9 deletions app/Helpers/Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class Helper
'11' => 'November',
'12' => 'Desember',
];

/**
* Role admin|kpa|kepala|ppk|bendahara|ppspm|koordinator|anggota|pbj|bmn.
*
Expand Down Expand Up @@ -274,7 +274,7 @@ public static function nomor($tanggal, $tahun, $jenis_naskah_id, $unit_kerja_id,
$segmen = NaskahKeluar::where('tahun', $tahun)->where('kode_naskah_id', $kode_naskah->id)->where('no_urut', $no_urut)->max('segmen') + 1;
$replaces['<no_urut>'] = $no_urut.'.'.$segmen;
}
$format = $jenis_naskah->format ?? $kode_naskah->format;
$format = $jenis_naskah->format ?? $kode_naskah->format;
$replaces['<tahun>'] = $tahun;
$replaces['<unit_kerja_id>'] = $unit_kerja->kode;
$replaces['<kode_arsip_id>'] = $kode_arsip->kode;
Expand Down Expand Up @@ -570,16 +570,16 @@ public static function getDetailAnggaran($mak, $level = 'akun', bool $kode_prefi
* @param string $bulan
* @return array
*/
public static function getJenisKontrak($tahun, $bulan) : array
public static function getJenisKontrak($tahun, $bulan): array
{
$tanggal = Carbon::createFromDate($tahun, $bulan)->startOfMonth();

return JenisKontrak::cache()->get('all')->where('tanggal','<=', $tanggal)->sortByDesc('tanggal')->first()->jenis;
return JenisKontrak::cache()->get('all')->where('tanggal', '<=', $tanggal)->sortByDesc('tanggal')->first()->jenis;
}

/**
* Pilihan Jenis kontrak.
*
*
* @param string $tahun
* @param string $bulan
* @return array
Expand All @@ -591,13 +591,13 @@ public static function setOptionJenisKontrak($tahun, $bulan)
foreach ($jeniskontrak as $option) {
$options[$option['jenis']] = $option['jenis'];
}
return $options;

return $options;
}

/**
* Mengambil batas SBML.
*
*
* @param string $tahun
* @param string $bulan
* @param string $jenis
Expand All @@ -608,9 +608,9 @@ public static function getSbml($tahun, $bulan, $jenis)
$nilai = 0;
$jeniskontrak = self::getJenisKontrak($tahun, $bulan);
foreach ($jeniskontrak as $option) {
$nilai = $option['jenis'] === $jenis ? $option['sbml'] : 0;
$nilai = $option['jenis'] === $jenis ? $option['sbml'] : 0;
}

return $nilai;
}

}
1 change: 0 additions & 1 deletion app/Models/JenisKontrak.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,4 @@ public static function cacheEntities(): array
}),
];
}

}
1 change: 0 additions & 1 deletion app/Nova/Dashboards/Main.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use DigitalCreative\NovaWelcomeCard\WelcomeCard;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Storage;
use Laravel\Nova\Cards\Help;
use Laravel\Nova\Dashboards\Main as Dashboard;
use Orion\NovaGreeter\GreeterCard;

Expand Down
3 changes: 1 addition & 2 deletions app/Nova/HonorSurvei.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace App\Nova;

use App\Helpers\Helper;
use App\Models\JenisKontrak;
use App\Models\User;
use App\Nova\Actions\ImportDaftarHonor;
use Illuminate\Database\Eloquent\Model;
Expand Down Expand Up @@ -102,7 +101,7 @@ public function fields(NovaRequest $request)
->filterable()
->displayUsingLabels()
->dependsOn('bulan', function (Select $field, NovaRequest $request, FormData $form) {
$field->options(Helper::setOptionJenisKontrak(session('year'),$form->bulan));
$field->options(Helper::setOptionJenisKontrak(session('year'), $form->bulan));
}),
Text::make('Satuan Pembayaran', 'satuan')
->rules('required')
Expand Down
11 changes: 5 additions & 6 deletions app/Nova/JenisKontrak.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
use Illuminate\Http\Request;
use Laravel\Nova\Fields\Currency;
use Laravel\Nova\Fields\Date;
use Laravel\Nova\Fields\ID;
use Laravel\Nova\Fields\Text;
use Laravel\Nova\Http\Requests\NovaRequest;
use Outl1ne\NovaSimpleRepeatable\SimpleRepeatable;
Expand Down Expand Up @@ -57,12 +56,12 @@ public function fields(NovaRequest $request)
->rules('required'),
SimpleRepeatable::make('Jenis Kontrak dan SBML', 'jenis', [
Text::make('Jenis Kontrak', 'jenis')
->rules('required'),
->rules('required'),
Currency::make('Batas maksimal (SBML)', 'sbml')
->rules('required')
->step(1)
->default(0),
])->rules('required',
->rules('required')
->step(1)
->default(0),
])->rules('required',
function ($attribute, $value, $fail) {
if (Helper::cekGanda(json_decode($value), 'jenis')) {
return $fail('validation.unique')->translate();
Expand Down
2 changes: 1 addition & 1 deletion lang/en/auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
declare(strict_types=1);

return [
'failed' => 'These credentials do not match our records.',
'failed' => 'These credentials do not match our records.',
'password' => 'The password is incorrect.',
'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
];
2 changes: 1 addition & 1 deletion lang/en/pagination.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
declare(strict_types=1);

return [
'next' => 'Next &raquo;',
'next' => 'Next &raquo;',
'previous' => '&laquo; Previous',
];
8 changes: 4 additions & 4 deletions lang/en/passwords.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
declare(strict_types=1);

return [
'reset' => 'Your password has been reset.',
'sent' => 'We have emailed your password reset link.',
'reset' => 'Your password has been reset.',
'sent' => 'We have emailed your password reset link.',
'throttled' => 'Please wait before retrying.',
'token' => 'This password reset token is invalid.',
'user' => 'We can\'t find a user with that email address.',
'token' => 'This password reset token is invalid.',
'user' => 'We can\'t find a user with that email address.',
];
Loading