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 v23.03-pasca #6442

Merged
merged 2 commits into from
Feb 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
18 changes: 18 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Deploy
on:
push:
branches:
- master
jobs:
build:
name: Deployment Website Demo
runs-on: ubuntu-latest
steps:
- name: SSH Remote
uses: fifsky/ssh-action@master
with:
host: berputar.opendesa.id
user: ${{ secrets.SSH_USER }}
pass: ${{ secrets.SSH_PASS }}
port: 2244
command: cd /home/berputar.opendesa.id/public_html && git restore . && git pull origin master
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ info.php
sftp-config.json
.php-cs-fixer.cache
.htaccess
*.sql
mitra

# Abaikan file cache milik phpintel (plugin sublime text)
Expand Down
45 changes: 24 additions & 21 deletions app/Libraries/TinyMCE.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class TinyMCE
</tbody>
</table>
';
public const TOP = 3; // cm
public const TOP = 4; // cm
public const BOTTOM = 2; // cm

public function getTemplate()
Expand Down Expand Up @@ -617,26 +617,30 @@ private function getIsianPost($data = [])
$input = $data['input'];

// Statis Post
$postStatis = [
[
'nama' => 'Mulai Berlaku',
'kode' => '[mulai_berlaku]',
],
[
'nama' => 'Berlaku Sampai',
'kode' => '[berlaku_sampai]',
],
];
$postStatis = [];

$postStatis = collect($postStatis)
->map(static function ($item, $key) use ($input) {
return [
'judul' => $item['nama'],
'isian' => $item['kode'],
'data' => $input[underscore($item['nama'], true, true)],
];
})
->toArray();
if ((int) $data['surat']['masa_berlaku'] > 0) {
$postStatis = [
[
'nama' => 'Mulai Berlaku',
'kode' => '[mulai_berlaku]',
],
[
'nama' => 'Berlaku Sampai',
'kode' => '[berlaku_sampai]',
],
];

$postStatis = collect($postStatis)
->map(static function ($item, $key) use ($input) {
return [
'judul' => $item['nama'],
'isian' => $item['kode'],
'data' => $input[underscore($item['nama'], true, true)],
];
})
->toArray();
}

// Dinamis
$postDinamis = collect(json_decode($data['surat']['kode_isian']))
Expand Down Expand Up @@ -710,7 +714,6 @@ public function getPenandatangan($input = [])
public function substitusiNomorSurat($nomor = null, $format = '')
{
// TODO : Cek jika null, cari no surat terakhir berdasarkan kelompok

$format = str_replace('[nomor_surat]', "{$nomor}", $format);
if (preg_match_all('/\[nomor_surat,\s*\d+\]/', $format, $matches)) {
foreach ($matches[0] as $match) {
Expand Down
66 changes: 66 additions & 0 deletions app/Models/Anak.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,72 @@

class Anak extends Model
{
/**
* Static data status gizi anak
*
* @var array
*/
public const STATUS_GIZI_ANAK = [
[
'id' => 1,
'simbol' => 'N',
'nama' => 'Sehat / Normal (N)',
],
[
'id' => 2,
'simbol' => 'GK',
'nama' => 'Gizi Kurang (GK)',
],
[
'id' => 3,
'simbol' => 'GB',
'nama' => 'Gizi Buruk (GB)',
],
[
'id' => 4,
'simbol' => 'S',
'nama' => 'Stunting (S)',
],
];

/**
* Static data status tikar anak
*
* @var array
*/
public const STATUS_TIKAR_ANAK = [
[
'id' => 1,
'simbol' => 'TD',
'nama' => 'Tidak Diukur (TD)',
],
[
'id' => 2,
'simbol' => 'M',
'nama' => 'Merah (M)',
],
[
'id' => 3,
'simbol' => 'K',
'nama' => 'Kuning (K)',
],
[
'id' => 4,
'simbol' => 'H',
'nama' => 'Hijau (H)',
],
];

/**
* Static data status imunisasi campak
*
* @var array
*/
public const STATUS_IMUNISASI_CAMPAK = [
1 => 'Belum',
2 => 'Sudah',
];

/**
* The table associated with the model.
*
Expand Down
23 changes: 23 additions & 0 deletions app/Models/IbuHamil.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,29 @@

class IbuHamil extends Model
{
/**
* Static data status kehamilan ibu
*
* @var array
*/
public const STATUS_KEHAMILAN_IBU = [
[
'id' => 1,
'simbol' => 'N',
'nama' => 'Normal (N)',
],
[
'id' => 2,
'simbol' => 'Risti',
'nama' => 'Risiko Tinggi (Risti)',
],
[
'id' => 3,
'simbol' => 'KEK',
'nama' => 'Kekurangan Energi Kronis (KEK)',
],
];

/**
* The table associated with the model.
*
Expand Down
64 changes: 64 additions & 0 deletions app/Models/RefFontSurat.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<?php

/*
*
* File ini bagian dari:
*
* OpenSID
*
* Sistem informasi desa sumber terbuka untuk memajukan desa
*
* Aplikasi dan source code ini dirilis berdasarkan lisensi GPL V3
*
* Hak Cipta 2009 - 2015 Combine Resource Institution (http://lumbungkomunitas.net/)
* Hak Cipta 2016 - 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 OpenSID
* @author Tim Pengembang OpenDesa
* @copyright Hak Cipta 2009 - 2015 Combine Resource Institution (http://lumbungkomunitas.net/)
* @copyright Hak Cipta 2016 - 2022 Perkumpulan Desa Digital Terbuka (https://opendesa.id)
* @license http://www.gnu.org/licenses/gpl.html GPL V3
* @link https://github.com/OpenSID/OpenSID
*
*/

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class RefFontSurat extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'ref_font_surat';

/**
* The timestamps for the model.
*
* @var bool
*/
public $timestamps = false;

/**
* The guarded with the model.
*
* @var array
*/
protected $guarded = [];
}
21 changes: 21 additions & 0 deletions app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@ class User extends Model

protected $table = 'user';

/**
* The timestamps for the model.
*
* @var bool
*/
public $timestamps = false;

/**
* The attributes that are mass assignable.
*
Expand All @@ -65,6 +72,7 @@ class User extends Model
'name',
'email',
'password',
'last_login',
];

/**
Expand Down Expand Up @@ -105,4 +113,17 @@ public function pamong()
{
return $this->hasOne(Pamong::class, 'pamong_id', 'pamong_id');
}

/**
* Scope query untuk status pengguna
*
* @param mixed $query
* @param mixed $status
*
* @return Builder
*/
public function scopeStatus($query, $status = 1)
{
return $query->where('active', $status);
}
}
8 changes: 4 additions & 4 deletions assets/bootstrap/css/bootstrap-datetimepicker.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions assets/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,13 @@ function notification(type, message)
);
}

function cek_koneksi() {
$('#maincontent').prepend('<div class = "callout callout-warning">' +
'<h4><i class="fa fa-warning"></i>&nbsp;&nbsp;Informasi</h4 >' +
'<p> Aplikasi tidak dapat terhubung dengan koneksi internet, beberapa modul mungkin tidak berjalan dengan baik. </a></p>'+
'</div>');
}

function cari_nik()
{
$('#cari_nik').change(function()
Expand Down
2 changes: 1 addition & 1 deletion assets/js/sweetalert2/sweetalert2.all.min.js

Large diffs are not rendered by default.

Loading