Skip to content

Commit

Permalink
Merge pull request #21 from achmadhadikurnia/main
Browse files Browse the repository at this point in the history
refactor
  • Loading branch information
achmadhadikurnia committed Mar 31, 2024
2 parents 499b9f3 + cc4715a commit 0945e58
Show file tree
Hide file tree
Showing 191 changed files with 1,053 additions and 13,572 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Changelog

All notable changes to `laravel-siasn-simpeg-api` will be documented in this file.
All notable changes to `laravel-siasn-simpeg` will be documented in this file.
98 changes: 85 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ Want to provide tangible support? Use the following platform to contribute to op

We highly appreciate you sending us a few cups of coffee to accompany us while writing code. Super thanks.

## Use pro version

We also offer a professional version. We're excited for you to try it out, as it allows us to consistently deliver high-quality software. Don't hesitate to contact us at kanekescom@gmail.com for further information.

- Laravel SIASN Referensi Panel
- Laravel SIASN SIMPEG Panel
- SIMPEGDA App

## Installation

You can install the package via composer:
Expand Down Expand Up @@ -46,40 +54,104 @@ php artisan siasn-simpeg:install

## Usage

### Import pegawai
### Pegawai

Import pegawai to database via csv file exported from SIASN Export Data ASN.
Import pegawai to database via csv file exported from SIASN Export Data ASN

```bash
php artisan siasn-simpeg:import {filePath}
php artisan siasn-simpeg:import-pegawai {filePath}
```

Import pegawai by truncate data first.
Import pegawai by truncate data first

```bash
php artisan siasn-simpeg:import {filePath} --truncate
php artisan siasn-simpeg:import-pegawai {filePath} --truncate
```

### Pull riwayat pegawai
### Riwayat

Pull riwayat pegawai to database from endpoint on SIASN Simpeg API

```bash
php artisan siasn-simpeg:pull-riwayat
```

You can also use the ```endpoint``` argument to specify only certain endpoints to be pulled.
Pull specific riwayat pegawai to database from endpoint on SIASN Simpeg API

```bash
php artisan siasn-simpeg:pull-riwayat angkakredit
```

You can also use the ```endpoint``` argument to specify only certain endpoints to be pulled

Available endpoints:
- angkakredit
- cltn
- diklat
- dp3
- golongan
- hukdis
- jabatan
- kinerjaperiodik
- kursus
- masakerja
- pemberhentian
- pendidikan
- penghargaan
- pindahinstansi
- pnsunor
- pwk
- skp
- skp22

Use ```--nipBaru={nipBaru}``` option to select only certain pegawai (separated by commas)

Use ```--skip={number}``` option to skip N pegawai

### PNS

Pull PNS data utama to database from endpoint on SIASN SIMPEG API

```bash
php artisan siasn-simpeg:pull-pns-data-utama
```

Use ```--nipBaru=``` option to select only certain pegawai.
Use ```--nipBaru={nipBaru}``` option to select only certain pegawai (separated by commas)

Use ```--skip=0``` option to skip N pegawai.
Use ```--skip={number}``` option to skip N pegawai

Use ```--track``` option to track the data pulling process.
### Pengadaan

Pull pengadaan list to database from endpoint on SIASN SIMPEG API

```bash
php artisan siasn-simpeg:pull-pengadaan-list {tahun}
```

### Pemberhentian

Pull kp list to database from endpoint on SIASN SIMPEG API

```bash
php artisan siasn-simpeg:pull-kp-list {periode}
```

**periode** format is yyyy-mm-dd

### Pemberhentian

Pull pemberhentian pensiun list to database from endpoint on SIASN SIMPEG API

```bash
php artisan siasn-simpeg:pull-pemberhentian-pensiun-list {tahun}
```

And use ```--startOver``` option to start over the data pulling process from the begining.
### Referensi

### Pull referensi ref unor
Pull referensi ref unor to database from endpoint on SIASN SIMPEG API

```bash
php artisan siasn-simpeg:pull-referensi-ref-unor
php artisan siasn-simpeg:pull-referensi-unor
```

## Testing
Expand Down
24 changes: 9 additions & 15 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"name": "kanekescom/laravel-siasn-simpeg",
"description": "SIASN Simpeg for Laravel",
"description": "SIASN SIMPEG for Laravel",
"keywords": [
"kanekescom",
"laravel",
"laravel-siasn-simpeg-api",
"laravel-siasn-simpeg",
"siasn-api",
"simpeg-api",
"sian",
"api",
"bkn",
"laravel-siasn-simpeg"
"bkn"
],
"homepage": "https://github.com/kanekescom/laravel-siasn-simpeg",
"license": "MIT",
Expand All @@ -24,15 +24,13 @@
],
"require": {
"php": "^8.1",
"eightynine/filament-excel-import": "^3.0",
"filament/filament": "^3.2",
"guzzlehttp/guzzle": "^7.2",
"illuminate/contracts": "^10.0",
"illuminate/contracts": "^10.0|^11.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",
"maatwebsite/excel": "^3.1",
"spatie/laravel-fractal": "^6.0",
"spatie/laravel-package-tools": "^1.14.0"
},
Expand Down Expand Up @@ -62,7 +60,7 @@
},
"scripts": {
"post-autoload-dump": "@composer run prepare",
"clear": "@php vendor/bin/testbench package:purge-laravel-siasn-simpeg-api --ansi",
"clear": "@php vendor/bin/testbench package:purge-laravel-siasn-simpeg --ansi",
"prepare": "@php vendor/bin/testbench package:discover --ansi",
"build": [
"@composer run prepare",
Expand All @@ -88,12 +86,8 @@
"extra": {
"laravel": {
"providers": [
"Kanekescom\\Siasn\\Simpeg\\SimpegServiceProvider",
"Kanekescom\\Siasn\\Simpeg\\SiasnSimpegPanelProvider"
],
"aliases": {
"Simpeg": "Kanekescom\\Siasn\\Simpeg\\Facades\\Simpeg"
}
"Kanekescom\\Siasn\\Simpeg\\SimpegServiceProvider"
]
},
"branch-alias": {
"dev-main": "2.x-dev"
Expand All @@ -119,4 +113,4 @@
],
"minimum-stability": "dev",
"prefer-stable": true
}
}
82 changes: 0 additions & 82 deletions config/siasn-simpeg.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,90 +2,8 @@

return [

'name' => 'SISASN SIMPEG',

'chunk_data' => 500,

'truncate_model_before_pull' => true,

'filament' => [

'path' => 'siasn/simpeg',

'domain' => null,

'brandName' => null,

'brandLogo' => null,

'brandLogoHeight' => null,

'favicon' => null,

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

'darkMode' => [
'enabled' => true,
],

'topbar' => [
'enabled' => true,
],

'topNavigation' => [
'enabled' => false,
],

'breadcrumbs' => [
'enabled' => true,
],

'databaseNotifications' => [
'enabled' => false,
'polling' => '30s',
],

'spa' => [
'enabled' => true,
],

'unsavedChangesAlerts' => [
'enabled' => false,
],

'databaseTransactions' => [
'enabled' => true,
],

'sidebarCollapsibleOnDesktop' => [
'enabled' => true,
],

'sidebarFullyCollapsibleOnDesktop' => [
'enabled' => true,
],

'navigation' => [
'enabled' => true,
],

'collapsibleNavigationGroups' => [
'enabled' => true,
],

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

],

];
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ public function up(): void
$table->string('tempat_lahir_id')->nullable()->index('1_tempat_lahir_id');
$table->string('tempat_lahir_nama')->nullable();
$table->string('tanggal_lahir')->nullable();
$table->date('tanggal_lahir_')->nullable();
$table->string('jenis_kelamin')->nullable()->index('1_jenis_kelamin');
$table->string('agama_id')->nullable()->index('1_agama_id');
$table->unsignedTinyInteger('agama_id')->nullable()->index('1_agama_id')->autoIncrement(false);
$table->string('agama_nama')->nullable();
$table->string('jenis_kawin_id')->nullable()->index('1_jenis_kawin_id');
$table->unsignedTinyInteger('jenis_kawin_id')->nullable()->index('1_jenis_kawin_id')->autoIncrement(false);
$table->string('jenis_kawin_nama')->nullable();
$table->string('nik')->nullable()->index('1_nik');
$table->string('nomor_hp')->nullable();
Expand All @@ -33,50 +34,57 @@ public function up(): void
$table->string('alamat')->nullable();
$table->string('npwp_nomor')->nullable()->index('1_npwp_nomor');
$table->string('bpjs')->nullable()->index('1_bpjs');
$table->string('jenis_pegawai_id')->nullable()->index('1_jenis_pegawai_id');
$table->string('jenis_pegawai_id', 2)->nullable()->index('1_jenis_pegawai_id');
$table->string('jenis_pegawai_nama')->nullable();
$table->string('kedudukan_hukum_id')->nullable()->index('1_kedudukan_hukum_id');
$table->string('kedudukan_hukum_id', 2)->nullable()->index('1_kedudukan_hukum_id');
$table->string('kedudukan_hukum_nama')->nullable();
$table->string('status_cpns_pns')->nullable()->index('1_status_cpns_pns');
$table->string('kartu_asn_virtual')->nullable()->index('1_kartu_asn_virtual');
$table->string('nomor_sk_cpns')->nullable();
$table->string('tanggal_sk_cpns')->nullable();
$table->date('tanggal_sk_cpns_')->nullable();
$table->string('tmt_cpns')->nullable();
$table->date('tmt_cpns_')->nullable();
$table->string('nomor_sk_pns')->nullable();
$table->date('nomor_sk_pns_')->nullable();
$table->string('tanggal_sk_pns')->nullable();
$table->date('tanggal_sk_pns_')->nullable();
$table->string('tmt_pns')->nullable();
$table->string('gol_awal_id')->nullable()->index('1_gol_awal_id');
$table->date('tmt_pns_')->nullable();
$table->unsignedTinyInteger('gol_awal_id')->nullable()->index('1_gol_awal_id')->autoIncrement(false);
$table->string('gol_awal_nama')->nullable();
$table->string('gol_akhir_id')->nullable()->index('1_gol_akhir_id');
$table->unsignedTinyInteger('gol_akhir_id')->nullable()->index('1_gol_akhir_id')->autoIncrement(false);
$table->string('gol_akhir_nama')->nullable();
$table->string('tmt_golongan')->nullable();
$table->string('mk_tahun')->nullable();
$table->string('mk_bulan')->nullable();
$table->string('jenis_jabatan_id')->nullable()->index('1_jenis_jabatan_id');
$table->date('tmt_golongan_')->nullable();
$table->unsignedTinyInteger('mk_tahun')->nullable()->autoIncrement(false);
$table->unsignedTinyInteger('mk_bulan')->nullable()->autoIncrement(false);
$table->unsignedTinyInteger('jenis_jabatan_id')->nullable()->index('1_jenis_jabatan_id')->autoIncrement(false);
$table->string('jenis_jabatan_nama')->nullable();
$table->string('jabatan_id')->nullable()->index('1_jabatan_id');
$table->string('jabatan_id', 42)->nullable()->index('1_jabatan_id');
$table->string('jabatan_nama')->nullable();
$table->string('tmt_jabatan')->nullable();
$table->string('tingkat_pendidikan_id')->nullable()->index('1_tingkat_pendidikan_id');
$table->date('tmt_jabatan_')->nullable();
$table->string('tingkat_pendidikan_id', 2)->nullable()->index('1_tingkat_pendidikan_id');
$table->string('tingkat_pendidikan_nama')->nullable();
$table->string('pendidikan_id')->nullable()->index('1_pendidikan_id');
$table->string('pendidikan_id', 42)->nullable()->index('1_pendidikan_id');
$table->string('pendidikan_nama')->nullable();
$table->string('tahun_lulus', 4)->nullable()->index('1_tahun_lulus');
$table->string('kpkn_id')->nullable()->index('1_kpkn_id');
$table->string('kpkn_id', 42)->nullable()->index('1_kpkn_id');
$table->string('kpkn_nama')->nullable();
$table->string('lokasi_kerja_id')->nullable()->index('1_lokasi_kerja_id');
$table->text('lokasi_kerja_nama')->nullable();
$table->string('unor_id')->nullable()->index('1_unor_id');
$table->text('unor_nama')->nullable();
$table->string('instansi_induk_id')->nullable()->index('1_instansi_induk_id');
$table->text('instansi_induk_nama')->nullable();
$table->string('instansi_kerja_id')->nullable()->index('1_instansi_kerja_id');
$table->text('instansi_kerja_nama')->nullable();
$table->string('satuan_kerja_induk_id')->nullable()->index('1_satuan_kerja_induk_id');
$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->string('lokasi_kerja_id', 42)->nullable()->index('1_lokasi_kerja_id');
$table->string('lokasi_kerja_nama')->nullable();
$table->string('unor_id', 42)->nullable()->index('1_unor_id');
$table->string('unor_nama')->nullable();
$table->string('instansi_induk_id', 42)->nullable()->index('1_instansi_induk_id');
$table->string('instansi_induk_nama')->nullable();
$table->string('instansi_kerja_id', 42)->nullable()->index('1_instansi_kerja_id');
$table->string('instansi_kerja_nama')->nullable();
$table->string('satuan_kerja_induk_id', 42)->nullable()->index('1_satuan_kerja_induk_id');
$table->string('satuan_kerja_induk_nama')->nullable();
$table->string('satuan_kerja_kerja_id', 42)->nullable()->index('1_satuan_kerja_kerja_id');
$table->string('satuan_kerja_kerja_nama')->nullable();
$table->boolean('is_valid_nik', 1)->nullable()->index('is_valid_nik');
$table->timestamps();
$table->softDeletes();
});
Expand Down

0 comments on commit 0945e58

Please sign in to comment.