Skip to content

Commit

Permalink
Merge pull request #11 from achmadhadikurnia/main
Browse files Browse the repository at this point in the history
refactor: many refactor
  • Loading branch information
achmadhadikurnia committed Mar 5, 2024
2 parents e2f90c6 + ef24379 commit fd628c1
Show file tree
Hide file tree
Showing 134 changed files with 5,693 additions and 801 deletions.
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@
"illuminate/contracts": "^10.0",
"kanekescom/laravel-helperia": "^2.0",
"kanekescom/laravel-siasn-api": "^2.0",
"kanekescom/laravel-siasn-referensi": "^2.0",
"kanekescom/laravel-siasn-simpeg-api": "^2.0",
"shuvroroy/filament-spatie-laravel-backup": "^2.1",
"spatie/laravel-fractal": "^6.0",
"spatie/laravel-package-tools": "^1.14.0"
},
Expand Down Expand Up @@ -117,4 +119,4 @@
],
"minimum-stability": "dev",
"prefer-stable": true
}
}
26 changes: 25 additions & 1 deletion config/siasn-simpeg.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,35 @@

'chunk_data' => 500,

'delete_model_before_pull' => true,
'truncate_model_before_pull' => true,

'filament' => [

'id' => 'siasn-simpeg',

'path' => 'siasn/simpeg',

'topbar' => true,

'brandLogo' => null,

'favicon' => null,

'colors' => [
'primary' => \Filament\Support\Colors\Color::Amber,
],

'navigationGroups' => [
'Pegawai',
'PNS',
'Riwayat',
'KP',
'Pemberhentian',
'Pengadaan',
'Referensi',
'Tools',
],

],

];
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function up(): void
$table->string('tingkat_pendidikan_nama')->nullable();
$table->string('pendidikan_id')->nullable()->index('1_pendidikan_id');
$table->string('pendidikan_nama')->nullable();
$table->string('tahun_lulus')->nullable()->index('1_tahun_lulus');
$table->string('tahun_lulus', 4)->nullable()->index('1_tahun_lulus');
$table->string('kpkn_id')->nullable()->index('1_kpkn_id');
$table->string('kpkn_nama')->nullable();
$table->string('lokasi_kerja_id')->nullable()->index('1_lokasi_kerja_id');
Expand All @@ -76,6 +76,7 @@ public function up(): void
$table->text('satuan_kerja_induk_nama')->nullable();
$table->string('satuan_kerja_kerja_id')->nullable()->index('1_satuan_kerja_kerja_id');
$table->text('satuan_kerja_kerja_nama')->nullable();
$table->string('is_valid_nik', 1)->nullable()->index('is_valid_nik');
$table->timestamps();
$table->softDeletes();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function up(): void
$table->string('tkPendidikanTerakhir')->nullable();
$table->string('pendidikanTerakhirId', 42)->nullable()->index('6_pendidikanTerakhirId');
$table->string('pendidikanTerakhirNama')->nullable();
$table->string('tahunLulus')->nullable();
$table->string('tahunLulus', 4)->nullable();
$table->string('tmtPns')->nullable();
$table->string('tmtPensiun')->nullable();
$table->string('bupPensiun', 2)->nullable();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ public function up(): void
$table->string('nomorSk')->nullable();
$table->string('tanggalSk')->nullable();
$table->string('bulanMulaiPenailan')->nullable();
$table->string('tahunMulaiPenailan')->nullable();
$table->string('tahunMulaiPenailan', 4)->nullable();
$table->string('bulanSelesaiPenailan')->nullable();
$table->string('tahunSelesaiPenailan')->nullable();
$table->string('tahunSelesaiPenailan', 4)->nullable();
$table->string('kreditUtamaBaru')->nullable();
$table->string('kreditPenunjangBaru')->nullable();
$table->string('kreditBaruTotal')->nullable();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function up(): void
$table->string('latihanStrukturalNama')->nullable();
$table->string('nomor')->nullable();
$table->string('tanggal')->nullable();
$table->string('tahun')->nullable()->index('12_tahun');
$table->string('tahun', 4)->nullable()->index('12_tahun');
$table->json('path')->nullable();
$table->string('jumlahJam')->nullable();
$table->string('tanggalSelesai')->nullable();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public function up(): void
Schema::create('siasn_simpeg_pns_rw_dp3', function (Blueprint $table) {
$table->string('id', 42)->primary();
$table->string('pnsId', 42)->nullable()->index('13_pnsId');
$table->string('tahun')->nullable()->index('13_tahun');
$table->string('tahun', 4)->nullable()->index('13_tahun');
$table->string('atasanNonPns')->nullable();
$table->string('atasanPejabatPenilaiId', 42)->nullable()->index('13_atasanPejabatPenilaiId');
$table->string('atasanPenilaiGolongan')->nullable();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public function up(): void
$table->string('masaKerjaGolonganTahun')->nullable();
$table->string('masaKerjaGolonganBulan')->nullable();
$table->json('path')->nullable();
$table->string('pangkat')->nullable();
$table->timestamps();
$table->softDeletes();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function up(): void
$table->string('golongan')->nullable();
$table->string('kedudukanHukum')->nullable();
$table->string('jenisHukuman')->nullable()->index('15_jenisHukuman');
$table->string('pnsOrang')->nullable()->index('15_pnsOrang');
$table->string('pnsOrang', 42)->nullable()->index('15_pnsOrang');
$table->string('skNomor')->nullable();
$table->string('skTanggal')->nullable();
$table->string('hukumanTanggal')->nullable();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public function up(): void
$table->string('namaJabatan')->nullable();
$table->string('tmtPelantikan')->nullable();
$table->json('path')->nullable();
$table->string('jenjang')->nullable();
$table->timestamps();
$table->softDeletes();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public function up(): void
{
Schema::create('siasn_simpeg_pns_rw_kinerjaperiodik', function (Blueprint $table) {
$table->string('id', 42)->primary();
$table->string('tahun')->nullable()->index('17_tahun');
$table->string('tahun', 4)->nullable()->index('17_tahun');
$table->string('nip')->nullable()->index('17_nip');
$table->string('nama')->nullable();
$table->string('hasilKinerja')->nullable();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function up(): void
$table->string('jumlahJam')->nullable();
$table->string('namaKursus')->nullable();
$table->string('noSertipikat')->nullable();
$table->string('tahunKursus')->nullable()->index('18_tahunKursus');
$table->string('tahunKursus', 4)->nullable()->index('18_tahunKursus');
$table->string('tanggalKursus')->nullable();
$table->json('path')->nullable();
$table->string('jenisDiklatId', 42)->nullable()->index('18_jenisDiklatId');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function up(): void
$table->string('pendidikanNama')->nullable();
$table->string('tkPendidikanId', 42)->nullable()->index('21_tkPendidikanId');
$table->string('tkPendidikanNama')->nullable();
$table->string('tahunLulus')->nullable()->index('21_tahunLulus');
$table->string('tahunLulus', 4)->nullable()->index('21_tahunLulus');
$table->string('tglLulus')->nullable();
$table->string('isPendidikanPertama')->nullable()->index('21_isPendidikanPertama');
$table->string('nomorIjasah')->nullable();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public function up(): void
{
Schema::create('siasn_simpeg_pns_rw_penghargaan', function (Blueprint $table) {
$table->string('id', 42)->primary();
$table->string('tahun')->nullable()->index('22_tahun');
$table->string('tahun', 4)->nullable()->index('22_tahun');
$table->string('skNomor')->nullable();
$table->string('skDate')->nullable();
$table->string('hargaNama')->nullable();
Expand Down
2 changes: 1 addition & 1 deletion src/Commands/PullPnsDataUtamaCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public function handle()
$model = new PnsDataUtama;

DB::transaction(function () use ($model, $response) {
if (config('siasn-simpeg.delete_model_before_pull')) {
if (config('siasn-simpeg.truncate_model_before_pull')) {
$model->delete();
}

Expand Down
2 changes: 1 addition & 1 deletion src/Commands/PullReferensiRefUnorCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function handle()
$model = new ReferensiRefUnor;

DB::transaction(function () use ($model, $response, $bar) {
if (config('siasn-simpeg.delete_model_before_pull')) {
if (config('siasn-simpeg.truncate_model_before_pull')) {
$model->delete();
}

Expand Down
15 changes: 12 additions & 3 deletions src/Commands/PullRiwayatCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,17 @@ public function handle()
$iPegawai = $skip;

if ($startOver && $hasPullTracking) {
$hasPullTracking->delete();
$hasPullTracking = null;
try {
$hasPullTracking->errors()->delete();
$hasPullTracking->delete();
$hasPullTracking = null;
} catch (\Exception $e) {
$this->error($e);
$this->newLine();

return self::FAILURE;
}

$skip = 0;

$this->info(str('Start over command.')->upper());
Expand Down Expand Up @@ -196,7 +205,7 @@ public function handle()
$model = $model->where($this->pnsId[$endpoint], $pegawai->pns_id);

DB::transaction(function () use ($endpoint, $model, $response, $bar) {
if (config('siasn-simpeg.delete_model_before_pull')) {
if (config('siasn-simpeg.truncate_model_before_pull')) {
$model->delete();
}

Expand Down
22 changes: 16 additions & 6 deletions src/Filament/Resources/DataPernikahanResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ class DataPernikahanResource extends Resource
{
protected static ?string $model = DataPernikahan::class;

protected static ?string $slug = 'data-pernikahan';
protected static ?string $slug = '--data-pernikahan';

protected static ?string $pluralLabel = 'Data Pernikahan';
protected static ?string $pluralLabel = '--Data Pernikahan';

protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';

protected static ?string $navigationLabel = 'Data Pernikahan';
protected static ?string $navigationLabel = '--Data Pernikahan';

protected static ?string $navigationGroup = 'SIASN SIMPEG';
protected static ?string $navigationGroup = 'PNS';

protected static bool $shouldRegisterNavigation = true;

Expand Down Expand Up @@ -60,47 +60,57 @@ public static function table(Table $table): Table
return $table
->columns([
Tables\Columns\TextColumn::make('id')
->label('ID')
->copyable()
->sortable()
->searchable(isIndividual: true),
->searchable(isIndividual: true)
->label('ID'),
Tables\Columns\TextColumn::make('orangId')
->wrap()
->copyable()
->sortable()
->searchable(isIndividual: true),
Tables\Columns\TextColumn::make('pnsOrangId')
->wrap()
->copyable()
->sortable()
->searchable(isIndividual: true),
Tables\Columns\TextColumn::make('tgglMenikah')
->wrap()
->copyable()
->sortable()
->searchable(isIndividual: true),
Tables\Columns\TextColumn::make('aktaMenikah')
->wrap()
->copyable()
->sortable()
->searchable(isIndividual: true),
Tables\Columns\TextColumn::make('tgglCerai')
->wrap()
->copyable()
->sortable()
->searchable(isIndividual: true),
Tables\Columns\TextColumn::make('aktaCerai')
->wrap()
->copyable()
->sortable()
->searchable(isIndividual: true),
Tables\Columns\TextColumn::make('posisi')
->wrap()
->copyable()
->sortable()
->searchable(isIndividual: true),
Tables\Columns\TextColumn::make('status')
->wrap()
->copyable()
->sortable()
->searchable(isIndividual: true),
Tables\Columns\TextColumn::make('isPns')
->wrap()
->copyable()
->sortable()
->searchable(isIndividual: true),
Tables\Columns\TextColumn::make('noSkPensiun')
->wrap()
->copyable()
->sortable()
->searchable(isIndividual: true),
Expand Down
22 changes: 20 additions & 2 deletions src/Filament/Resources/OrangtuaAyahResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,18 @@ class OrangtuaAyahResource extends Resource
{
protected static ?string $model = OrangtuaAyah::class;

protected static ?string $slug = '--orangtua-ayah';

protected static ?string $pluralLabel = '--Orangtua Ayah';

protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';

protected static ?string $navigationLabel = '--Orangtua Ayah';

protected static ?string $navigationGroup = 'PNS';

protected static bool $shouldRegisterNavigation = true;

public static function form(Form $form): Form
{
return $form
Expand Down Expand Up @@ -46,39 +56,47 @@ public static function table(Table $table): Table
return $table
->columns([
Tables\Columns\TextColumn::make('id')
->label('ID')
->copyable()
->sortable()
->searchable(isIndividual: true),
->searchable(isIndividual: true)
->label('ID'),
Tables\Columns\TextColumn::make('nama')
->wrap()
->copyable()
->sortable()
->searchable(isIndividual: true),
Tables\Columns\TextColumn::make('tempatLahir')
->wrap()
->copyable()
->sortable()
->searchable(isIndividual: true),
Tables\Columns\TextColumn::make('tglLahir')
->wrap()
->copyable()
->sortable()
->searchable(isIndividual: true),
Tables\Columns\TextColumn::make('aktaMeninggal')
->wrap()
->copyable()
->sortable()
->searchable(isIndividual: true),
Tables\Columns\TextColumn::make('tglMeninggal')
->wrap()
->copyable()
->sortable()
->searchable(isIndividual: true),
Tables\Columns\TextColumn::make('jenisKelamin')
->wrap()
->copyable()
->sortable()
->searchable(isIndividual: true),
Tables\Columns\TextColumn::make('jenisAnak')
->wrap()
->copyable()
->sortable()
->searchable(isIndividual: true),
Tables\Columns\TextColumn::make('ayahId')
->wrap()
->copyable()
->sortable()
->searchable(isIndividual: true),
Expand Down

0 comments on commit fd628c1

Please sign in to comment.