Skip to content

Commit 3caa544

Browse files
Merge pull request #106 from laravelwebdev/analysis-o7PxO7
Apply fixes from StyleCI
2 parents 8a63657 + a8960bb commit 3caa544

File tree

6 files changed

+18
-17
lines changed

6 files changed

+18
-17
lines changed

app/Nova/DaftarSp2d.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ public function cards(NovaRequest $request)
239239
->setTidakAdaLabel('Tidak Ada SP2D'),
240240
];
241241
}
242+
242243
/**
243244
* Get the filters available for the resource.
244245
*

app/Nova/Metrics/MetricKeberadaan.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class MetricKeberadaan extends Partition
2020

2121
private $adaLabel = 'Ada';
2222

23-
private $tidakAdaLabel = 'Tidak';
23+
private $tidakAdaLabel = 'Tidak';
2424

2525
private $null_strict = true;
2626

@@ -61,9 +61,9 @@ public function calculate(NovaRequest $request): PartitionResult
6161
$table = $this->model->newQuery();
6262
$results = DB::query()
6363
->selectRaw(
64-
$this->null_strict ?
65-
"SUM(CASE WHEN {$this->column} IS NOT NULL THEN 1 ELSE 0 END) as ada, SUM(CASE WHEN {$this->column} IS NULL THEN 1 ELSE 0 END) as tidak" :
66-
"SUM(CASE WHEN {$this->column} > 0 THEN 1 ELSE 0 END) as ada, SUM(CASE WHEN {$this->column} <= 0 THEN 1 ELSE 0 END) as tidak"
64+
$this->null_strict ?
65+
"SUM(CASE WHEN {$this->column} IS NOT NULL THEN 1 ELSE 0 END) as ada, SUM(CASE WHEN {$this->column} IS NULL THEN 1 ELSE 0 END) as tidak" :
66+
"SUM(CASE WHEN {$this->column} > 0 THEN 1 ELSE 0 END) as ada, SUM(CASE WHEN {$this->column} <= 0 THEN 1 ELSE 0 END) as tidak"
6767
)
6868
->fromSub($table, 'sub')
6969
->get()

app/Nova/PelaksanaanTindakLanjut.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public function fields(NovaRequest $request)
6161
{
6262
return [
6363
Select::make('Bulan Pelaksanaan', 'bulan')
64-
->options(function () {
64+
->options(function () {
6565
$triwulan = $this->tindakLanjut->triwulan;
6666
switch ($triwulan) {
6767
case 1:

app/Nova/RealisasiKinerja.php

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ public static function label()
4444
public function subtitle()
4545
{
4646
$triwulan = Helper::getTriwulanBerjalan(now()->month);
47-
return $this->{'realisasi_tw' . $triwulan};
47+
48+
return $this->{'realisasi_tw'.$triwulan};
4849
}
4950

5051
/**
@@ -87,7 +88,7 @@ public function fields(NovaRequest $request)
8788
->step(0.01)
8889
->help('Target total selama triwulan I')
8990
->rules('required', 'integer', 'gte:0'),
90-
Number::make('Target Triwulan II', 'target_tw2')
91+
Number::make('Target Triwulan II', 'target_tw2')
9192
->step(0.01)
9293
->help('Target kumulatif sampai dengan triwulan II')
9394
->rules('required', 'integer', 'gte:target_tw1'),
@@ -98,7 +99,7 @@ public function fields(NovaRequest $request)
9899
Number::make('Target Triwulan IV', 'target_tw4')
99100
->step(0.01)
100101
->help('Target kumulatif sampai dengan triwulan IV')
101-
->rules('required', 'integer', 'gte:target_tw3'),
102+
->rules('required', 'integer', 'gte:target_tw3'),
102103
Textarea::make('Penjelasan Target Target', 'keterangan_target')
103104
->alwaysShow()
104105
->rules('required'),
@@ -211,17 +212,17 @@ public function cards(NovaRequest $request)
211212
{
212213
$model = ModelsRealisasiKinerja::where('perjanjian_kinerja_id', optional(PerjanjianKinerja::where('tahun', session('year'))->first())->id);
213214
$triwulan = Helper::getTriwulanBerjalan(now()->month);
214-
$title = 'Triwulan ' . strtoupper($triwulan);
215+
$title = 'Triwulan '.strtoupper($triwulan);
215216

216217
return [
217218
MetricValue::make($model, 'total-realisasi-kinerja')
218-
->width('1/2')
219-
->refreshWhenActionsRun(),
219+
->width('1/2')
220+
->refreshWhenActionsRun(),
220221
MetricKeberadaan::make('Kelengkapan Isian '.$title, $model, 'realisasi_tw'.$triwulan, 'keberadaan-realisasi-kinerja-tw'.$triwulan)
221-
->refreshWhenActionsRun()
222-
->setAdaLabel('Terisi')
223-
->setTidakAdaLabel('Kosong')
224-
->width('1/2'),
222+
->refreshWhenActionsRun()
223+
->setAdaLabel('Terisi')
224+
->setTidakAdaLabel('Kosong')
225+
->width('1/2'),
225226
];
226227
}
227228

app/Providers/NovaServiceProvider.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
use App\Nova\RapatInternal;
4242
use App\Nova\RealisasiAnggaran;
4343
use App\Nova\RealisasiKinerja;
44-
use App\Nova\ResponRate;
4544
use App\Nova\RewardPegawai;
4645
use App\Nova\ShareLink;
4746
use App\Nova\SkTranslok;

database/migrations/2025_01_24_092748_create_perjanjian_kinerjas_table.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public function up(): void
1616
$table->string('tahun', 4)->nullable();
1717
$table->string('tujuan')->nullable();
1818
$table->string('sasaran')->nullable();
19-
$table->string('indikator')->nullable();
19+
$table->string('indikator')->nullable();
2020
$table->decimal('target_tw1')->nullable()->unsigned();
2121
$table->decimal('target_tw2')->nullable()->unsigned();
2222
$table->decimal('target_tw3')->nullable()->unsigned();

0 commit comments

Comments
 (0)