Skip to content

Commit

Permalink
Rilis 2409.0.0 (#388)
Browse files Browse the repository at this point in the history
  • Loading branch information
vickyrolanda authored Sep 2, 2024
2 parents da7e8f4 + 359318d commit 28b3ae1
Show file tree
Hide file tree
Showing 290 changed files with 66,517 additions and 95 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,4 @@ npm-debug.log
yarn-error.log
/.idea
/.vscode
composer.lock
/backup
10 changes: 10 additions & 0 deletions app/Console/Commands/BackupDatabaseStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace App\Console\Commands;

use App\Http\Controllers\Helpers\CommandController;
use App\Models\LogBackup;
use Exception;
use Illuminate\Console\Command;
use Spatie\DbDumper\Databases\MySql;
Expand Down Expand Up @@ -65,8 +66,17 @@ private function backupDatabase()
->setPassword(env('DB_PASSWORD'));

$backup->dumpToFile($this->folder_database.'/'.$this->database_name);

LogBackup::create([
'status' => 1,
'log' => 'Success backup pantau:backup-database-storage',
]);
} catch (Exception $ex) {
$this->command->notifMessage('Peringatan : gagal backup ke database Pantau, silakan cek koneksi !!!');
LogBackup::create([
'status' => 0,
'log' => 'pantau:backup-database-storage :'.$ex->getMessage(),
]);

return exec('rm '.$this->folder_database.'/'.$this->database_name);
}
Expand Down
75 changes: 75 additions & 0 deletions app/Exports/DesaExport.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<?php

namespace App\Exports;

use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\WithHeadings;
use Maatwebsite\Excel\Concerns\ShouldAutoSize;

class DesaExport implements FromCollection, WithHeadings, ShouldAutoSize
{
protected $data;

public function __construct($data)
{
$this->data = $data;
}

public function collection()
{
return $this->data->map(function($item, $index) {
return [
'no' => $index + 1, // Menambahkan nomor urut berdasarkan index
'nama_desa' => $item->nama_desa,
'nama_kecamatan' => $item->nama_kecamatan,
'nama_kabupaten' => $item->nama_kabupaten,
'nama_provinsi' => $item->nama_provinsi,
'kontak' => ($item->kontak['nama'] ?? '') . ' ' . ($item->kontak['hp'] ?? ''),
'url_hosting' => $item->url_hosting,
'versi_lokal' => $item->versi_lokal,
'versi_hosting' => $item->versi_hosting,
'modul_tte' => ($item->modul_tte == 1) ? 'Aktif' : 'Tidak Aktif',
'jml_surat_tte' => $item->jml_surat_tte,
'jml_penduduk' => $item->jml_penduduk,
'jml_artikel' => $item->jml_artikel,
'jml_surat_keluar' => $item->jml_surat_keluar,
'jml_bantuan' => $item->jml_bantuan,
'jml_mandiri' => $item->jml_mandiri,
'jml_pengguna' => $item->jml_pengguna,
'jml_unsur_peta' => $item->jml_unsur_peta,
'jml_persil' => $item->jml_persil,
'jml_dokumen' => $item->jml_dokumen,
'jml_keluarga' => $item->jml_keluarga,
'tgl_akses' => $item->tgl_akses,
];
});
}

public function headings(): array
{
return [
'No',
'Desa',
'Kecamatan',
'Kabupaten',
'Provinsi',
'Kontak',
'Web',
'Versi Offline',
'Versi Online',
'Modul TTE',
'Surat ter-TTE',
'Penduduk',
'Artikel',
'Surat Keluar',
'Program Bantuan',
'Pengguna Mandiri',
'Pengguna',
'Unsur Peta',
'Persil',
'Dokumen',
'Keluarga',
'Akses Terakhir',
];
}
}
45 changes: 45 additions & 0 deletions app/Exports/KelolaDesaExport.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?php

namespace App\Exports;

use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\WithHeadings;
use Maatwebsite\Excel\Concerns\ShouldAutoSize;

class KelolaDesaExport implements FromCollection, WithHeadings, ShouldAutoSize
{
protected $data;

public function __construct($data)
{
$this->data = $data;
}

public function collection()
{
return $this->data->map(function($item, $index) {
return [
'no' => $index + 1, // Menambahkan nomor urut berdasarkan index
'id_device' => $item->id_device,
'tgl_akses' => $item->tgl_akses,
'nama_desa' => $item->desa->nama_desa,
'nama_kecamatan' => $item->desa->nama_kecamatan,
'nama_kabupaten' => $item->desa->nama_kabupaten,
'nama_provinsi' => $item->desa->nama_provinsi,
];
});
}

public function headings(): array
{
return [
'No',
'Id',
'Tgl Terpantau',
'Desa',
'Kecamatan',
'Kabupaten',
'Provinsi'
];
}
}
45 changes: 45 additions & 0 deletions app/Exports/LayananDesaExport.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?php

namespace App\Exports;

use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\WithHeadings;
use Maatwebsite\Excel\Concerns\ShouldAutoSize;

class LayananDesaExport implements FromCollection, WithHeadings, ShouldAutoSize
{
protected $data;

public function __construct($data)
{
$this->data = $data;
}

public function collection()
{
return $this->data->map(function($item, $index) {
return [
'no' => $index + 1, // Menambahkan nomor urut berdasarkan index
'id' => $item->id,
'tgl_terpantau' => $item->tgl_akses,
'nama_desa' => $item->desa->nama_desa,
'nama_kecamatan' => $item->desa->nama_kecamatan,
'nama_kabupaten' => $item->desa->nama_kabupaten,
'nama_provinsi' => $item->desa->nama_provinsi,
];
});
}

public function headings(): array
{
return [
'No',
'Id',
'Tgl Terpantau',
'Desa',
'Kecamatan',
'Kabupaten',
'Provinsi'
];
}
}
65 changes: 65 additions & 0 deletions app/Exports/OpenDKExport.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<?php

namespace App\Exports;

use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\WithHeadings;
use Maatwebsite\Excel\Concerns\ShouldAutoSize;

class OpenDKExport implements FromCollection, WithHeadings, ShouldAutoSize
{
protected $data;

public function __construct($data)
{
$this->data = $data;
}

public function collection()
{
return $this->data->map(function($item, $index) {
return [
'no' => $index + 1, // Menambahkan nomor urut berdasarkan index
'nama_kecamatan' => $item->nama_kecamatan,
'nama_kabupaten' => $item->nama_kabupaten,
'nama_provinsi' => $item->nama_provinsi,
'url' => $item->url,
'versi' => $item->versi,
'format_updated_at' => $item->format_updated_at,
'Batas Wilayah Utara' => ($item->batas_wilayah == null)? '' : $item->batas_wilayah['bts_wil_utara'] ?? '',
'Batas Wilayah Barat' => ($item->batas_wilayah == null)? '' : $item->batas_wilayah['bts_wil_barat'] ?? '',
'Batas Wilayah Timur' => ($item->batas_wilayah == null)? '' : $item->batas_wilayah['bts_wil_timur'] ?? '',
'Batas Wilayah Selatan' => ($item->batas_wilayah == null)? '' : $item->batas_wilayah['bts_wil_selatan'] ?? '',
'Jumlah Desa' => $item->jml_desa,
'Jumlah Desa Tersinkronisasi' => $item->jumlahdesa_sinkronisasi,
'Jumlah Penduduk' => $item->jumlah_penduduk,
'Jumlah KK' => $item->jumlah_keluarga,
'Jumlah Program Bantuan' => $item->jumlah_bantuan,
'Alamat Kantor' => $item->alamat,
];
});
}

public function headings(): array
{
return [
'No',
'Kecamatan',
'Kabupaten',
'Provinsi',
'Web',
'Versi',
'Akses Terakhir',
'Batas Wilayah Utara',
'Batas Wilayah Barat',
'Batas Wilayah Timur',
'Batas Wilayah Selatan',
'Jumlah Desa',
'Jumlah Desa Tersinkronisasi',
'Jumlah Penduduk',
'Jumlah KK',
'Jumlah Program Bantuan',
'Alamat Kantor'
];
}
}
45 changes: 45 additions & 0 deletions app/Exports/WilayahDesaExport.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?php

namespace App\Exports;

use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\WithHeadings;
use Maatwebsite\Excel\Concerns\ShouldAutoSize;

class WilayahDesaExport implements FromCollection, WithHeadings, ShouldAutoSize
{
protected $data;

public function __construct($data)
{
$this->data = $data;
}

public function collection()
{
return $this->data->map(function($item, $index) {
return [
'no' => $index + 1, // Menambahkan nomor urut berdasarkan index
'kode_desa' => $item->kode_desa,
'nama_provinsi' => $item->nama_provinsi,
'nama_kabupaten' => $item->nama_kabupaten,
'nama_kecamatan' => $item->nama_kecamatan,
'nama_desa' => $item->nama_desa,
'nama_desa_baru' => $item->nama_desa_baru,
];
});
}

public function headings(): array
{
return [
'NO',
'KODE WILAYAH',
'NAMA PROVINSI',
'NAMA KABUPATEN',
'NAMA KECAMATAN',
'NAMA DESA',
'NAMA DESA UBAHAN',
];
}
}
39 changes: 39 additions & 0 deletions app/Exports/WilayahKabupatenExport.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?php

namespace App\Exports;

use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\WithHeadings;
use Maatwebsite\Excel\Concerns\ShouldAutoSize;

class WilayahKabupatenExport implements FromCollection, WithHeadings, ShouldAutoSize
{
protected $data;

public function __construct($data)
{
$this->data = $data;
}

public function collection()
{
return $this->data->map(function($item, $index) {
return [
'no' => $index + 1, // Menambahkan nomor urut berdasarkan index
'kode_kabupaten' => $item->kode_kabupaten,
'nama_provinsi' => $item->nama_provinsi,
'nama_kabupaten' => $item->nama_kabupaten,
];
});
}

public function headings(): array
{
return [
'NO',
'KODE WILAYAH',
'NAMA PROVINSI',
'NAMA KABUPATEN',
];
}
}
41 changes: 41 additions & 0 deletions app/Exports/WilayahKecamatanExport.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?php

namespace App\Exports;

use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\WithHeadings;
use Maatwebsite\Excel\Concerns\ShouldAutoSize;

class WilayahKecamatanExport implements FromCollection, WithHeadings, ShouldAutoSize
{
protected $data;

public function __construct($data)
{
$this->data = $data;
}

public function collection()
{
return $this->data->map(function($item, $index) {
return [
'no' => $index + 1, // Menambahkan nomor urut berdasarkan index
'kode_kecamatan' => $item->kode_kecamatan,
'nama_provinsi' => $item->nama_provinsi,
'nama_kabupaten' => $item->nama_kabupaten,
'nama_kecamatan' => $item->nama_kecamatan,
];
});
}

public function headings(): array
{
return [
'NO',
'KODE WILAYAH',
'NAMA PROVINSI',
'NAMA KABUPATEN',
'NAMA KECAMATAN',
];
}
}
Loading

0 comments on commit 28b3ae1

Please sign in to comment.