Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rilis V22.06.01 #424

Merged
merged 27 commits into from
Jun 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
1dcaff6
#72 Amankan route api penduduk dengan middleware.
apidong May 12, 2022
c2f8c1e
Update phpcs.yml
andifahruddinakas May 13, 2022
52e63fe
#302 Pengaturan peta kecamatan yang sesuai perda setempat pada data k…
apidong May 15, 2022
2cc3424
Sesuaikan sebutan desa yang tidak muncul.
andifahruddinakas May 15, 2022
3adf59b
#333 Sinkronisasi Data Pembangunan OpenSID ke OpenDK.
apidong May 17, 2022
251d28e
#401 Perbaiki tidak bisa ubah gambar slider.
apidong May 23, 2022
c46570d
#391 Perbaiki gagal upload foto profil user.
apidong May 24, 2022
a1e5dae
#384 Sediakan ganti password saat selesai login jika menggunakan pass…
apidong May 24, 2022
ac91c1a
#402 Perbaiki artikel baru tidak tampil dan sesuaikan urutannya.
apidong May 25, 2022
6ef02ba
#400 Perbaiki select data penyakit tidak sesuai dengan inputan pada f…
widoagus17 May 25, 2022
d830509
docs: update .all-contributorsrc
allcontributors[bot] May 25, 2022
f0ea366
#416 Sinkronisasi Data Program Bantuan OpenSID ke OpenDK.
apidong May 26, 2022
539298b
#368 Sediakan impor data Bantuan dari OpenSID.
apidong May 26, 2022
a5c8ce1
Update DataDesa.php
andifahruddinakas May 27, 2022
b7f186e
perbaikan api pembangunan (#418)
apidong May 30, 2022
029be28
Sesuaikan middleware API kirim data dari OpenSID
andifahruddinakas May 30, 2022
b9b8a7b
#412 Perbaiki error contoh data website demo saat intalasi awal.
andifahruddinakas May 30, 2022
0c96bea
perbaiki peta tidak tampil (#419)
apidong May 30, 2022
ec302f7
Susulan : sinkronsisai bantuan dan sinkronisasi program (#422)
apidong May 31, 2022
7047c29
pr susulan : peta wilayah (#423)
apidong May 31, 2022
2feb46d
Susulan perbaikan (#421)
andifahruddinakas May 31, 2022
d8bde83
Gunakan contoh impor dari OpenSID
andifahruddinakas May 31, 2022
45ad233
Sesuaikan tampilan tabel data pembangunan
andifahruddinakas May 31, 2022
974e029
Default foto jika null
andifahruddinakas May 31, 2022
6106098
update v22.06.01
apidong May 31, 2022
f8e8d6f
update kontributor
apidong May 31, 2022
8cf4866
Merge branch 'master' into v22.06.01
apidong May 31, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,15 @@
"contributions": [
"code"
]
},
{
"login": "widoagus17",
"name": "widoagus17",
"avatar_url": "https://avatars.githubusercontent.com/u/87120968?v=4",
"profile": "https://github.com/widoagus17",
"contributions": [
"code"
]
}
],
"contributorsPerLine": 7,
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/phpcs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Check & fix styling
name: Fix styling

on:
on:
pull_request:
branches:
- dev
Expand All @@ -9,7 +9,8 @@ on:
jobs:
php-cs-fixer:
runs-on: ubuntu-latest

# Check if contains [ci skip] will be skip github action
if: "!contains(github.event.head_commit.message, '[ci skip]')"
steps:
- name: Checkout code
uses: actions/checkout@v2
Expand All @@ -24,4 +25,4 @@ jobs:
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Fix styling
commit_message: "Fix styling"
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ copy_public.sh
**/.DS_Store
public/error_log
composer.lock
.php-cs-fixer.cache
.php-cs-fixer.cache
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ Berikut adalah teman-teman luar biasa yang telah berkontribusi langsung mengemba
</tr>
<tr>
<td align="center"><a href="https://github.com/apidong"><img src="https://avatars.githubusercontent.com/u/20056421?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Afila</b></sub></a><br /><a href="https://github.com/OpenSID/OpenDK/commits?author=apidong" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/widoagus17"><img src="https://avatars.githubusercontent.com/u/87120968?v=4?s=100" width="100px;" alt=""/><br /><sub><b>widoagus17</b></sub></a><br /><a href="https://github.com/OpenSID/OpenDK/commits?author=widoagus17" title="Code">💻</a></td>
</tr>
</table>

Expand All @@ -62,5 +63,5 @@ Berikut adalah teman-teman luar biasa yang telah berkontribusi langsung mengemba
Daftar kontributor sesuai spesifikasi [all-contributors](https://github.com/all-contributors/all-contributors), menggunakan @all-contributors Bot.

<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-14-orange.svg?style=flat-square)](#contributors-)
[![All Contributors](https://img.shields.io/badge/all_contributors-16-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->
10 changes: 0 additions & 10 deletions app/Http/Controllers/Api/LaporanApbdesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,6 @@

class LaporanApbdesController extends Controller
{
/**
* Create a new AuthController instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('auth:api');
}

/**
* Tambah / Ubah Data Apbdes Sesuai OpenSID
*
Expand Down
10 changes: 0 additions & 10 deletions app/Http/Controllers/Api/LaporanPendudukController.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,6 @@

class LaporanPendudukController extends Controller
{
/**
* Create a new AuthController instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('auth:api');
}

/**
* Tambah / Ubah Data Laporan Penduduk Dari OpenSID
*
Expand Down
125 changes: 125 additions & 0 deletions app/Http/Controllers/Api/PembangunanController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
<?php

/*
* File ini bagian dari:
*
* OpenDK
*
* Aplikasi dan source code ini dirilis berdasarkan lisensi GPL V3
*
* Hak Cipta 2017 - 2022 Perkumpulan Desa Digital Terbuka (https://opendesa.id)
*
* Dengan ini diberikan izin, secara gratis, kepada siapa pun yang mendapatkan salinan
* dari perangkat lunak ini dan file dokumentasi terkait ("Aplikasi Ini"), untuk diperlakukan
* tanpa batasan, termasuk hak untuk menggunakan, menyalin, mengubah dan/atau mendistribusikan,
* asal tunduk pada syarat berikut:
*
* Pemberitahuan hak cipta di atas dan pemberitahuan izin ini harus disertakan dalam
* setiap salinan atau bagian penting Aplikasi Ini. Barang siapa yang menghapus atau menghilangkan
* pemberitahuan ini melanggar ketentuan lisensi Aplikasi Ini.
*
* PERANGKAT LUNAK INI DISEDIAKAN "SEBAGAIMANA ADANYA", TANPA JAMINAN APA PUN, BAIK TERSURAT MAUPUN
* TERSIRAT. PENULIS ATAU PEMEGANG HAK CIPTA SAMA SEKALI TIDAK BERTANGGUNG JAWAB ATAS KLAIM, KERUSAKAN ATAU
* KEWAJIBAN APAPUN ATAS PENGGUNAAN ATAU LAINNYA TERKAIT APLIKASI INI.
*
* @package OpenDK
* @author Tim Pengembang OpenDesa
* @copyright Hak Cipta 2017 - 2022 Perkumpulan Desa Digital Terbuka (https://opendesa.id)
* @license http://www.gnu.org/licenses/gpl.html GPL V3
* @link https://github.com/OpenSID/opendk
*/

namespace App\Http\Controllers\Api;

use App\Http\Controllers\Controller;
use App\Http\Requests\PembangunanDokumentasiRequest;
use App\Http\Requests\PembangunanRequest;
use App\Imports\SinkronPembangunan;
use App\Imports\SinkronPembangunanDokumentasi;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Str;
use ZipArchive;

class PembangunanController extends Controller
{
/**
* Tambah Data Pembangunan Sesuai OpenSID
*
* @param PendudukRequest $request
* @return \Illuminate\Http\JsonResponse
*/
public function store(PembangunanRequest $request)
{
try {
// Upload file zip temporary.
$file = $request->file('file');
$file->storeAs('temp', $name = $file->getClientOriginalName());

// Temporary path file
$path = storage_path("app/temp/{$name}");
$extract = storage_path('app/public/pembangunan/');

// Ekstrak file
$zip = new ZipArchive();
$zip->open($path);
$zip->extractTo($extract);
$zip->close();

// Proses impor data pembangunan
(new SinkronPembangunan())
->queue($extract . $filecsv = Str::replaceLast('zip', 'csv', $name));
} catch (\Exception $e) {
report($e);
return response()->json([
"message" => "Proses Sinkronisasi Data gagal. Error : " . $e->getMessage(),
"status" => "danger"
]);
}

// Hapus folder temp ketika sudah selesai
Storage::deleteDirectory('temp');
// Hapus file excell temp ketika sudah selesai
Storage::disk('public')->delete('pembangunan/' . $filecsv);

return response()->json([
"message" => "Proses Sinkronisasi Data Pembangunan OpenSID sedang berjalan",
"status" => "success"
]);
}

public function storeDokumentasi(PembangunanDokumentasiRequest $request)
{
try {
// Upload file zip temporary.
$file = $request->file('file');
$file->storeAs('temp', $name = $file->getClientOriginalName());

// Temporary path file
$path = storage_path("app/temp/{$name}");
$extract = storage_path('app/public/pembangunan/');

// Ekstrak file
$zip = new ZipArchive();
$zip->open($path);
$zip->extractTo($extract);
$zip->close();

// Proses impor data dokumentasi pembangunan
(new SinkronPembangunanDokumentasi())
->queue($extract . $filecsv = Str::replaceLast('zip', 'csv', $name));
} catch (\Exception $e) {
report($e);
return back()->with('error', 'Import data gagal.');
}

// Hapus folder temp ketika sudah selesai
Storage::deleteDirectory('temp');
// Hapus file excell temp ketika sudah selesai
Storage::disk('public')->delete('pembangunan/' . $filecsv);

return response()->json([
"message" => "Proses Sinkronisasi Data Pembangunan OpenSID sedang berjalan",
"status" => "success"
]);
}
}
10 changes: 0 additions & 10 deletions app/Http/Controllers/Api/PendudukController.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,6 @@

class PendudukController extends Controller
{
/**
* Create a new AuthController instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('auth:api');
}

/**
* Hapus Data Penduduk Sesuai OpenSID
*
Expand Down
5 changes: 0 additions & 5 deletions app/Http/Controllers/Api/PesanController.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,6 @@

class PesanController extends Controller
{
public function __construct()
{
$this->middleware('auth:api');
}

public function store(PesanRequest $request)
{
$desa = DataDesa::where('desa_id', '=', $request->kode_desa)->first();
Expand Down
8 changes: 2 additions & 6 deletions app/Http/Controllers/Api/ProfilDesaController.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,12 @@

class ProfilDesaController extends Controller
{
public function __construct()
{
$this->middleware('auth:api');
}

public function store(ProfilDesaRequest $request)
{
DataDesa::where('desa_id', $request->kode_desa)->update([
'website' => $request->website,
'sebutan_desa' => $request->sebutan_desa
'sebutan_desa' => $request->sebutan_desa,
'path' => $request->path
]);

return response()->json([
Expand Down
115 changes: 115 additions & 0 deletions app/Http/Controllers/Api/ProgamBantuanController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
<?php

/*
* File ini bagian dari:
*
* OpenDK
*
* Aplikasi dan source code ini dirilis berdasarkan lisensi GPL V3
*
* Hak Cipta 2017 - 2022 Perkumpulan Desa Digital Terbuka (https://opendesa.id)
*
* Dengan ini diberikan izin, secara gratis, kepada siapa pun yang mendapatkan salinan
* dari perangkat lunak ini dan file dokumentasi terkait ("Aplikasi Ini"), untuk diperlakukan
* tanpa batasan, termasuk hak untuk menggunakan, menyalin, mengubah dan/atau mendistribusikan,
* asal tunduk pada syarat berikut:
*
* Pemberitahuan hak cipta di atas dan pemberitahuan izin ini harus disertakan dalam
* setiap salinan atau bagian penting Aplikasi Ini. Barang siapa yang menghapus atau menghilangkan
* pemberitahuan ini melanggar ketentuan lisensi Aplikasi Ini.
*
* PERANGKAT LUNAK INI DISEDIAKAN "SEBAGAIMANA ADANYA", TANPA JAMINAN APA PUN, BAIK TERSURAT MAUPUN
* TERSIRAT. PENULIS ATAU PEMEGANG HAK CIPTA SAMA SEKALI TIDAK BERTANGGUNG JAWAB ATAS KLAIM, KERUSAKAN ATAU
* KEWAJIBAN APAPUN ATAS PENGGUNAAN ATAU LAINNYA TERKAIT APLIKASI INI.
*
* @package OpenDK
* @author Tim Pengembang OpenDesa
* @copyright Hak Cipta 2017 - 2022 Perkumpulan Desa Digital Terbuka (https://opendesa.id)
* @license http://www.gnu.org/licenses/gpl.html GPL V3
* @link https://github.com/OpenSID/opendk
*/

namespace App\Http\Controllers\Api;

use App\Http\Controllers\Controller;
use App\Http\Requests\ProgramBantuanRequest;
use App\Imports\SinkronBantuan;
use App\Imports\SinkronPesertaBantuan;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Str;
use ZipArchive;

class ProgamBantuanController extends Controller
{
public function store(ProgramBantuanRequest $request)
{
try {
// Upload file zip temporary.
$file = $request->file('file');
$file->storeAs('temp', $name = $file->getClientOriginalName());

// Temporary path file
$path = storage_path("app/temp/{$name}");
$extract = storage_path('app/public/bantuan/');

// Ekstrak file
$zip = new ZipArchive();
$zip->open($path);
$zip->extractTo($extract);
$zip->close();

(new SinkronBantuan())
->queue($extract . $csvName = Str::replaceLast('zip', 'csv', $name));
} catch (\Exception $e) {
report($e);
return response()->json([
"status" => "danger",
"message" => $e->getMessage(),
]);
}

// Hapus folder temp ketika sudah selesai
Storage::deleteDirectory('temp');
// Hapus file excell temp ketika sudah selesai
Storage::disk('public')->delete('bantuan' . $csvName);

return response()->json([
"message" => "Data Bantuan Sedang di Sinkronkan",
"status" => "success"
]);
}

public function storePeserta(ProgramBantuanRequest $request)
{
try {
// Upload file zip temporary.
$file = $request->file('file');
$file->storeAs('temp', $name = $file->getClientOriginalName());
// Temporary path file
$path = storage_path("app/temp/{$name}");
$extract = storage_path('app/public/bantuan/');
// Ekstrak file
$zip = new ZipArchive();
$zip->open($path);
$zip->extractTo($extract);
$zip->close();
// Proses impor excell
(new SinkronPesertaBantuan())
->queue($extract . $csvName = Str::replaceLast('zip', 'csv', $name));
} catch (\Exception $e) {
report($e);
return response()->json([
"status" => "danger",
"message" => $e->getMessage(),
]);
}
// Hapus folder temp ketika sudah selesai
Storage::deleteDirectory('temp');
// Hapus file excell temp ketika sudah selesai
Storage::disk('public')->delete('bantuan/' . $csvName);
return response()->json([
"status" => "success",
"message" => "Data Bantuan Sedang di Sinkronkan",
]);
}
}
Loading