Skip to content

Commit

Permalink
Ubah permision pada file logging (#444)
Browse files Browse the repository at this point in the history
Co-authored-by: sarwono <scqolbu@gmail.com>
Co-authored-by: scqolbu24 <scqolbu24@users.noreply.github.com>
  • Loading branch information
3 people authored Oct 10, 2024
1 parent 55421e2 commit 9b9a1c3
Show file tree
Hide file tree
Showing 49 changed files with 478 additions and 421 deletions.
2 changes: 2 additions & 0 deletions app/Console/Commands/BackupDatabaseStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ public function handle()
$this->folder_database = folderBackupDatabase();
$this->backupDatabase();
$this->backupStorage();

changeLogPermissions('777');
}
}

Expand Down
1 change: 1 addition & 0 deletions app/Console/Commands/BackupGoogleDrive.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public function handle()

// proses backup
$this->remote->backupToCloudStorage($storage_type, $remote_name, tanggal_backup(), null);
changeLogPermissions('777');
}
}
}
1 change: 1 addition & 0 deletions app/Console/Commands/BackupVps.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public function handle()

// proses backup
$this->remote->backupToCloudStorage($storage_type, $remote_name, tanggal_backup(), $root);
changeLogPermissions('777');
}
}
}
2 changes: 2 additions & 0 deletions app/Console/Commands/BpsKemendagriCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,10 @@ public function handle()
$this->requests($this->provinsi, 'kabupaten');
$this->requests($this->kabupaten, 'kecamatan');
$this->requests($this->kecamatan, 'desa');
changeLogPermissions('777');
} catch (ClientException $e) {
report($e);
changeLogPermissions('777');
}
}

Expand Down
2 changes: 2 additions & 0 deletions app/Console/Commands/DesaOptimasiCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,7 @@ public function handle()
]);
}
});

changeLogPermissions('777');
}
}
6 changes: 3 additions & 3 deletions app/Exports/DesaExport.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
namespace App\Exports;

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

class DesaExport implements FromCollection, WithHeadings, ShouldAutoSize
{
Expand All @@ -17,14 +17,14 @@ public function __construct($data)

public function collection()
{
return $this->data->map(function($item, $index) {
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'] ?? ''),
'kontak' => ($item->kontak['nama'] ?? '').' '.($item->kontak['hp'] ?? ''),
'url_hosting' => $item->url_hosting,
'versi_lokal' => $item->versi_lokal,
'versi_hosting' => $item->versi_hosting,
Expand Down
8 changes: 4 additions & 4 deletions app/Exports/KelolaDesaExport.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
namespace App\Exports;

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

class KelolaDesaExport implements FromCollection, WithHeadings, ShouldAutoSize
{
Expand All @@ -17,7 +17,7 @@ public function __construct($data)

public function collection()
{
return $this->data->map(function($item, $index) {
return $this->data->map(function ($item, $index) {
return [
'no' => $index + 1, // Menambahkan nomor urut berdasarkan index
'id_device' => $item->id_device,
Expand All @@ -39,7 +39,7 @@ public function headings(): array
'Desa',
'Kecamatan',
'Kabupaten',
'Provinsi'
'Provinsi',
];
}
}
}
8 changes: 4 additions & 4 deletions app/Exports/LayananDesaExport.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
namespace App\Exports;

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

class LayananDesaExport implements FromCollection, WithHeadings, ShouldAutoSize
{
Expand All @@ -17,7 +17,7 @@ public function __construct($data)

public function collection()
{
return $this->data->map(function($item, $index) {
return $this->data->map(function ($item, $index) {
return [
'no' => $index + 1, // Menambahkan nomor urut berdasarkan index
'id' => $item->id,
Expand All @@ -39,7 +39,7 @@ public function headings(): array
'Desa',
'Kecamatan',
'Kabupaten',
'Provinsi'
'Provinsi',
];
}
}
}
16 changes: 8 additions & 8 deletions app/Exports/OpenDKExport.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
namespace App\Exports;

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

class OpenDKExport implements FromCollection, WithHeadings, ShouldAutoSize
{
Expand All @@ -17,7 +17,7 @@ public function __construct($data)

public function collection()
{
return $this->data->map(function($item, $index) {
return $this->data->map(function ($item, $index) {
return [
'no' => $index + 1, // Menambahkan nomor urut berdasarkan index
'nama_kecamatan' => $item->nama_kecamatan,
Expand All @@ -26,10 +26,10 @@ public function collection()
'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'] ?? '',
'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,
Expand Down Expand Up @@ -59,7 +59,7 @@ public function headings(): array
'Jumlah Penduduk',
'Jumlah KK',
'Jumlah Program Bantuan',
'Alamat Kantor'
'Alamat Kantor',
];
}
}
}
4 changes: 2 additions & 2 deletions app/Exports/WilayahDesaExport.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
namespace App\Exports;

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

class WilayahDesaExport implements FromCollection, WithHeadings, ShouldAutoSize
{
Expand All @@ -17,7 +17,7 @@ public function __construct($data)

public function collection()
{
return $this->data->map(function($item, $index) {
return $this->data->map(function ($item, $index) {
return [
'no' => $index + 1, // Menambahkan nomor urut berdasarkan index
'kode_desa' => $item->kode_desa,
Expand Down
4 changes: 2 additions & 2 deletions app/Exports/WilayahKabupatenExport.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
namespace App\Exports;

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

class WilayahKabupatenExport implements FromCollection, WithHeadings, ShouldAutoSize
{
Expand All @@ -17,7 +17,7 @@ public function __construct($data)

public function collection()
{
return $this->data->map(function($item, $index) {
return $this->data->map(function ($item, $index) {
return [
'no' => $index + 1, // Menambahkan nomor urut berdasarkan index
'kode_kabupaten' => $item->kode_kabupaten,
Expand Down
4 changes: 2 additions & 2 deletions app/Exports/WilayahKecamatanExport.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
namespace App\Exports;

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

class WilayahKecamatanExport implements FromCollection, WithHeadings, ShouldAutoSize
{
Expand All @@ -17,7 +17,7 @@ public function __construct($data)

public function collection()
{
return $this->data->map(function($item, $index) {
return $this->data->map(function ($item, $index) {
return [
'no' => $index + 1, // Menambahkan nomor urut berdasarkan index
'kode_kecamatan' => $item->kode_kecamatan,
Expand Down
4 changes: 2 additions & 2 deletions app/Exports/WilayahProvinsiExport.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
namespace App\Exports;

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

class WilayahProvinsiExport implements FromCollection, WithHeadings, ShouldAutoSize
{
Expand All @@ -17,7 +17,7 @@ public function __construct($data)

public function collection()
{
return $this->data->map(function($item, $index) {
return $this->data->map(function ($item, $index) {
return [
'no' => $index + 1, // Menambahkan nomor urut berdasarkan index
'kode_provinsi' => $item->kode_provinsi,
Expand Down
Loading

0 comments on commit 9b9a1c3

Please sign in to comment.