update
parent
a05680b06e
commit
cc00af9ed3
|
|
@ -31,7 +31,7 @@ class FormAdaptasiController extends Controller
|
|||
'penurunan' => $km->emission_factor,
|
||||
];
|
||||
|
||||
return view('form.index-adaptasi-thankyou', compact('data', 'km'));
|
||||
return view('modules.form.index-adaptasi-thankyou', compact('data', 'km'));
|
||||
}
|
||||
|
||||
public function downloadPDF(string $id)
|
||||
|
|
@ -51,7 +51,7 @@ class FormAdaptasiController extends Controller
|
|||
'penurunan' => $km->emission_factor,
|
||||
];
|
||||
|
||||
$pdf = PDF::loadView('form.index-adaptasi.pdf', compact('data'))
|
||||
$pdf = PDF::loadView('modules.form.index-adaptasi-pdf', compact('data'))
|
||||
->setPaper('a4', 'portrait');
|
||||
|
||||
return $pdf->download('bukti-submission-'.$km->nama_kegiatan.'.pdf');
|
||||
|
|
@ -84,7 +84,7 @@ class FormAdaptasiController extends Controller
|
|||
'detail_kegiatan' => $ka->detail_kegiatan,
|
||||
];
|
||||
|
||||
return view('form.index-adaptasi-view', [
|
||||
return view('modules.form.index-adaptasi-view', [
|
||||
'sessionData' => $sessionData,
|
||||
'id' => $id,
|
||||
]);
|
||||
|
|
@ -126,7 +126,7 @@ class FormAdaptasiController extends Controller
|
|||
|
||||
$sectors = KegiatanAdaptasi::distinct()->pluck('sektor')->toArray();
|
||||
|
||||
return view('form.index-adaptasi-edit', [
|
||||
return view('modules.form.index-adaptasi-edit', [
|
||||
'sessionData' => $sessionData,
|
||||
'years' => $years,
|
||||
'currentYear' => $currentYear,
|
||||
|
|
@ -148,7 +148,7 @@ class FormAdaptasiController extends Controller
|
|||
$years = range($startYear, $currentYear);
|
||||
rsort($years);
|
||||
|
||||
return view('form.index-adaptasi', compact('sessionData', 'years', 'currentYear'));
|
||||
return view('modules.form.index-adaptasi', compact('sessionData', 'years', 'currentYear'));
|
||||
}
|
||||
|
||||
public function update(Request $request, $id)
|
||||
|
|
@ -195,9 +195,10 @@ class FormAdaptasiController extends Controller
|
|||
|
||||
return response()->json([
|
||||
'success' => true,
|
||||
'redirect' => route('formAdaptasi.thankYou', $id),
|
||||
'redirect' => route('modules.formAdaptasi.thankYou', $id),
|
||||
]);
|
||||
} catch(\Exception $e) {
|
||||
// dd($e->getMessage());
|
||||
Log::error('Error updating data: ' . $e->getMessage());
|
||||
return back()->with('error', 'Gagal mengupdate data. Silakan coba lagi.');
|
||||
}
|
||||
|
|
@ -302,11 +303,12 @@ class FormAdaptasiController extends Controller
|
|||
|
||||
return response()->json([
|
||||
'success' => true,
|
||||
'redirect' => route('formAdaptasi.thankYou', $adaptasiId),
|
||||
'redirect' => route('modules.formAdaptasi.thankYou', $adaptasiId),
|
||||
]);
|
||||
} catch (\Exception $e) {
|
||||
Log::error('Error storing final data: ' . $e->getMessage());
|
||||
return back()->with('error', 'Gagal menyimpan data. Silakan coba lagi.');
|
||||
dd($e->getMessage());
|
||||
// Log::error('Error storing final data: ' . $e->getMessage());
|
||||
// return back()->with('error', 'Gagal menyimpan data. Silakan coba lagi.');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ class FormMitigasiController extends Controller
|
|||
'penurunan' => $km->emission_factor,
|
||||
];
|
||||
|
||||
return view('form.index-mitigasi-thankyou', compact('data', 'km'));
|
||||
return view('modules.form.index-mitigasi-thankyou', compact('data', 'km'));
|
||||
}
|
||||
|
||||
public function downloadPDF(string $id)
|
||||
|
|
@ -84,7 +84,7 @@ class FormMitigasiController extends Controller
|
|||
'penurunan' => $km->emission_factor,
|
||||
];
|
||||
|
||||
$pdf = PDF::loadView('form.index-mitigasi-pdf', compact('data'))
|
||||
$pdf = PDF::loadView('modules.form.index-mitigasi-pdf', compact('data'))
|
||||
->setPaper('a4', 'portrait');
|
||||
|
||||
return $pdf->download('bukti-submission-'.$km->nama_kegiatan.'.pdf');
|
||||
|
|
@ -150,7 +150,7 @@ class FormMitigasiController extends Controller
|
|||
})->toArray(),
|
||||
];
|
||||
|
||||
return view('form.index-mitigasi-view', [
|
||||
return view('modules.form.index-mitigasi-view', [
|
||||
'sessionData' => $sessionData,
|
||||
'id' => $id,
|
||||
]);
|
||||
|
|
@ -225,7 +225,7 @@ class FormMitigasiController extends Controller
|
|||
|
||||
$sectors = KegiatanMitigasi::distinct()->pluck('sektor')->toArray();
|
||||
|
||||
return view('form.index-mitigasi-edit', [
|
||||
return view('modules.form.index-mitigasi-edit', [
|
||||
'sessionData' => $sessionData,
|
||||
'years' => $years,
|
||||
'currentYear' => $currentYear,
|
||||
|
|
@ -291,7 +291,7 @@ class FormMitigasiController extends Controller
|
|||
$years = range($startYear, $currentYear);
|
||||
rsort($years);
|
||||
|
||||
return view('form.index-mitigasi', compact('sessionData', 'years', 'currentYear'));
|
||||
return view('modules.form.index-mitigasi', compact('sessionData', 'years', 'currentYear'));
|
||||
}
|
||||
|
||||
public function update(Request $request, $id)
|
||||
|
|
@ -366,7 +366,7 @@ class FormMitigasiController extends Controller
|
|||
|
||||
return response()->json([
|
||||
'success' => true,
|
||||
'redirect' => route('formMitigasi.thankYou', $id),
|
||||
'redirect' => route('modules.formMitigasi.thankYou', $id),
|
||||
]);
|
||||
} catch (\Exception $e) {
|
||||
Log::error('Error updating data: ' . $e->getMessage());
|
||||
|
|
@ -399,7 +399,7 @@ class FormMitigasiController extends Controller
|
|||
'am.activity_desc as activity_desc',
|
||||
'am.activity_type as title'
|
||||
)
|
||||
->join('activity.mitigation as am', 'activity_data_mitigation.mitigation_id', '=', 'am.id')
|
||||
->join('mitigation as am', 'activity_data_mitigation.mitigation_id', '=', 'am.id')
|
||||
->where('activity_data_mitigation.mitigation_id', $mitigation_id)
|
||||
->orderBy('activity_data_mitigation.sequence')
|
||||
->get()
|
||||
|
|
@ -591,7 +591,9 @@ class FormMitigasiController extends Controller
|
|||
|
||||
public function storeFinal(Request $request)
|
||||
{
|
||||
// dd($request->all());
|
||||
$sessionData = $request->session()->get('kegiatan_mitigasi');
|
||||
|
||||
if (empty($sessionData)) {
|
||||
return response()->json([
|
||||
'success' => false,
|
||||
|
|
@ -665,11 +667,12 @@ class FormMitigasiController extends Controller
|
|||
|
||||
return response()->json([
|
||||
'success' => true,
|
||||
'redirect' => route('formMitigasi.thankYou', $mitigasiId),
|
||||
'redirect' => route('modules.formMitigasi.thankYou', $mitigasiId),
|
||||
]);
|
||||
} catch (\Exception $e) {
|
||||
dd($e->getMessage());
|
||||
Log::error('Error storing final data: ' . $e->getMessage());
|
||||
return back()->with('error', 'Gagal menyimpan data. Silakan coba lagi.');
|
||||
// return back()->with('error', 'Gagal menyimpan data. Silakan coba lagi.');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,14 +12,7 @@ class EmissionReductionMitigation extends Model
|
|||
|
||||
protected $table = 'emission_reduction_mitigation';
|
||||
|
||||
protected $fillable = [
|
||||
'mitigation_id',
|
||||
'baseline_emission',
|
||||
'emission_ton',
|
||||
'emission_reduction',
|
||||
'type_emission_reduction',
|
||||
'method',
|
||||
];
|
||||
protected $guarded = [];
|
||||
|
||||
protected $keyType = 'string';
|
||||
public $incrementing = false;
|
||||
|
|
|
|||
|
|
@ -14,43 +14,7 @@ class KegiatanMitigasi extends Model
|
|||
protected $keyType = 'string';
|
||||
public $incrementing = false;
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'tipe_laporan',
|
||||
'tipe_kegiatan',
|
||||
'tahun_kegiatan',
|
||||
'sektor',
|
||||
'sub_sektor',
|
||||
'kategori_perhitungan',
|
||||
'kategori_sub_aktivitas',
|
||||
'nama_kegiatan',
|
||||
'informasi_lokasi_kegiatan',
|
||||
'jenis_kegiatan',
|
||||
'pelaksana_kegiatan',
|
||||
'tautan_rad',
|
||||
'nomenklatur_kemendagri',
|
||||
'target',
|
||||
'satuan',
|
||||
'realisasi',
|
||||
'sdg',
|
||||
'catatan',
|
||||
'mitigation_id',
|
||||
'pelaksana_kegiatan_rad',
|
||||
'alokasi_apbn',
|
||||
'alokasi_apbd',
|
||||
'alokasi_swasta',
|
||||
'alokasi_sumber_dana_lain',
|
||||
'realisasi_apbn',
|
||||
'realisasi_apbd',
|
||||
'realisasi_swasta',
|
||||
'realisasi_sumber_dana_lain',
|
||||
'kabupaten_kota_location',
|
||||
'kecamatan_location',
|
||||
'kelurahan_location',
|
||||
'lat_location',
|
||||
'long_location',
|
||||
'emission_factor',
|
||||
];
|
||||
protected $guarded = [];
|
||||
|
||||
protected $casts = [
|
||||
'sdg' => 'array',
|
||||
|
|
|
|||
|
|
@ -4,8 +4,19 @@ namespace App\Repositories;
|
|||
|
||||
use App\Models\EmissionReductionMitigation;
|
||||
|
||||
interface EmissionReductionRepository
|
||||
class EmissionReductionRepository
|
||||
{
|
||||
public function findByMitigation(string $mitigationId, ?string $typeEmissionReduction = null): ?EmissionReductionMitigation;
|
||||
public function findAllByMitigation(string $mitigationId);
|
||||
public function findByMitigation(string $mitigationId, ?string $typeEmissionReduction = null): ?EmissionReductionMitigation
|
||||
{
|
||||
return EmissionReductionMitigation::where('mitigation_id', $mitigationId)
|
||||
->when($typeEmissionReduction, function ($q) use ($typeEmissionReduction) {
|
||||
$q->where('type', $typeEmissionReduction);
|
||||
})
|
||||
->first();
|
||||
}
|
||||
|
||||
public function findAllByMitigation(string $mitigationId)
|
||||
{
|
||||
return EmissionReductionMitigation::where('mitigation_id', $mitigationId)->get();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ class FormMitigasiService
|
|||
logger()->info('TypeEmissionReduction', ['value' => $typeEmissionReduction]);
|
||||
|
||||
// Build REF_xxx mapping
|
||||
$contextMaps = DB::table('activity.emission_reduction_context_map')
|
||||
$contextMaps = DB::table('emission_reduction_context_map')
|
||||
->where('mitigation_id', $mitigationId)
|
||||
->get();
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
"license": "MIT",
|
||||
"require": {
|
||||
"php": "^8.2",
|
||||
"barryvdh/laravel-dompdf": "^3.1",
|
||||
"laravel/framework": "^11.31",
|
||||
"laravel/tinker": "^2.9",
|
||||
"laravel/ui": "^4.6",
|
||||
|
|
|
|||
|
|
@ -4,8 +4,85 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "b1787b324041390419ca8c585a294fd2",
|
||||
"content-hash": "4a7860bdf856472b69ccfcbf1fe227d6",
|
||||
"packages": [
|
||||
{
|
||||
"name": "barryvdh/laravel-dompdf",
|
||||
"version": "v3.1.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/barryvdh/laravel-dompdf.git",
|
||||
"reference": "ee3b72b19ccdf57d0243116ecb2b90261344dedc"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/barryvdh/laravel-dompdf/zipball/ee3b72b19ccdf57d0243116ecb2b90261344dedc",
|
||||
"reference": "ee3b72b19ccdf57d0243116ecb2b90261344dedc",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"dompdf/dompdf": "^3.0",
|
||||
"illuminate/support": "^9|^10|^11|^12|^13.0",
|
||||
"php": "^8.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"larastan/larastan": "^2.7|^3.0",
|
||||
"orchestra/testbench": "^7|^8|^9.16|^10|^11.0",
|
||||
"phpro/grumphp": "^2.5",
|
||||
"squizlabs/php_codesniffer": "^3.5"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"aliases": {
|
||||
"PDF": "Barryvdh\\DomPDF\\Facade\\Pdf",
|
||||
"Pdf": "Barryvdh\\DomPDF\\Facade\\Pdf"
|
||||
},
|
||||
"providers": [
|
||||
"Barryvdh\\DomPDF\\ServiceProvider"
|
||||
]
|
||||
},
|
||||
"branch-alias": {
|
||||
"dev-master": "3.0-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Barryvdh\\DomPDF\\": "src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Barry vd. Heuvel",
|
||||
"email": "barryvdh@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "A DOMPDF Wrapper for Laravel",
|
||||
"keywords": [
|
||||
"dompdf",
|
||||
"laravel",
|
||||
"pdf"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/barryvdh/laravel-dompdf/issues",
|
||||
"source": "https://github.com/barryvdh/laravel-dompdf/tree/v3.1.2"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://fruitcake.nl",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/barryvdh",
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2026-02-21T08:51:10+00:00"
|
||||
},
|
||||
{
|
||||
"name": "brick/math",
|
||||
"version": "0.14.1",
|
||||
|
|
@ -533,6 +610,161 @@
|
|||
],
|
||||
"time": "2024-02-05T11:56:58+00:00"
|
||||
},
|
||||
{
|
||||
"name": "dompdf/dompdf",
|
||||
"version": "v3.1.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/dompdf/dompdf.git",
|
||||
"reference": "f11ead23a8a76d0ff9bbc6c7c8fd7e05ca328496"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/dompdf/dompdf/zipball/f11ead23a8a76d0ff9bbc6c7c8fd7e05ca328496",
|
||||
"reference": "f11ead23a8a76d0ff9bbc6c7c8fd7e05ca328496",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"dompdf/php-font-lib": "^1.0.0",
|
||||
"dompdf/php-svg-lib": "^1.0.0",
|
||||
"ext-dom": "*",
|
||||
"ext-mbstring": "*",
|
||||
"masterminds/html5": "^2.0",
|
||||
"php": "^7.1 || ^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-gd": "*",
|
||||
"ext-json": "*",
|
||||
"ext-zip": "*",
|
||||
"mockery/mockery": "^1.3",
|
||||
"phpunit/phpunit": "^7.5 || ^8 || ^9 || ^10 || ^11",
|
||||
"squizlabs/php_codesniffer": "^3.5",
|
||||
"symfony/process": "^4.4 || ^5.4 || ^6.2 || ^7.0"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-gd": "Needed to process images",
|
||||
"ext-gmagick": "Improves image processing performance",
|
||||
"ext-imagick": "Improves image processing performance",
|
||||
"ext-zlib": "Needed for pdf stream compression"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Dompdf\\": "src/"
|
||||
},
|
||||
"classmap": [
|
||||
"lib/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"LGPL-2.1"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "The Dompdf Community",
|
||||
"homepage": "https://github.com/dompdf/dompdf/blob/master/AUTHORS.md"
|
||||
}
|
||||
],
|
||||
"description": "DOMPDF is a CSS 2.1 compliant HTML to PDF converter",
|
||||
"homepage": "https://github.com/dompdf/dompdf",
|
||||
"support": {
|
||||
"issues": "https://github.com/dompdf/dompdf/issues",
|
||||
"source": "https://github.com/dompdf/dompdf/tree/v3.1.5"
|
||||
},
|
||||
"time": "2026-03-03T13:54:37+00:00"
|
||||
},
|
||||
{
|
||||
"name": "dompdf/php-font-lib",
|
||||
"version": "1.0.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/dompdf/php-font-lib.git",
|
||||
"reference": "a6e9a688a2a80016ac080b97be73d3e10c444c9a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/dompdf/php-font-lib/zipball/a6e9a688a2a80016ac080b97be73d3e10c444c9a",
|
||||
"reference": "a6e9a688a2a80016ac080b97be73d3e10c444c9a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-mbstring": "*",
|
||||
"php": "^7.1 || ^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^7.5 || ^8 || ^9 || ^10 || ^11 || ^12"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"FontLib\\": "src/FontLib"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"LGPL-2.1-or-later"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "The FontLib Community",
|
||||
"homepage": "https://github.com/dompdf/php-font-lib/blob/master/AUTHORS.md"
|
||||
}
|
||||
],
|
||||
"description": "A library to read, parse, export and make subsets of different types of font files.",
|
||||
"homepage": "https://github.com/dompdf/php-font-lib",
|
||||
"support": {
|
||||
"issues": "https://github.com/dompdf/php-font-lib/issues",
|
||||
"source": "https://github.com/dompdf/php-font-lib/tree/1.0.2"
|
||||
},
|
||||
"time": "2026-01-20T14:10:26+00:00"
|
||||
},
|
||||
{
|
||||
"name": "dompdf/php-svg-lib",
|
||||
"version": "1.0.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/dompdf/php-svg-lib.git",
|
||||
"reference": "8259ffb930817e72b1ff1caef5d226501f3dfeb1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/dompdf/php-svg-lib/zipball/8259ffb930817e72b1ff1caef5d226501f3dfeb1",
|
||||
"reference": "8259ffb930817e72b1ff1caef5d226501f3dfeb1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-mbstring": "*",
|
||||
"php": "^7.1 || ^8.0",
|
||||
"sabberworm/php-css-parser": "^8.4 || ^9.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^7.5 || ^8 || ^9 || ^10 || ^11"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Svg\\": "src/Svg"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"LGPL-3.0-or-later"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "The SvgLib Community",
|
||||
"homepage": "https://github.com/dompdf/php-svg-lib/blob/master/AUTHORS.md"
|
||||
}
|
||||
],
|
||||
"description": "A library to read, parse and export to PDF SVG files.",
|
||||
"homepage": "https://github.com/dompdf/php-svg-lib",
|
||||
"support": {
|
||||
"issues": "https://github.com/dompdf/php-svg-lib/issues",
|
||||
"source": "https://github.com/dompdf/php-svg-lib/tree/1.0.2"
|
||||
},
|
||||
"time": "2026-01-02T16:01:13+00:00"
|
||||
},
|
||||
{
|
||||
"name": "dragonmantank/cron-expression",
|
||||
"version": "v3.6.0",
|
||||
|
|
@ -2704,6 +2936,73 @@
|
|||
},
|
||||
"time": "2022-12-02T22:17:43+00:00"
|
||||
},
|
||||
{
|
||||
"name": "masterminds/html5",
|
||||
"version": "2.10.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Masterminds/html5-php.git",
|
||||
"reference": "fcf91eb64359852f00d921887b219479b4f21251"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/Masterminds/html5-php/zipball/fcf91eb64359852f00d921887b219479b4f21251",
|
||||
"reference": "fcf91eb64359852f00d921887b219479b4f21251",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-dom": "*",
|
||||
"php": ">=5.3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^4.8.35 || ^5.7.21 || ^6 || ^7 || ^8 || ^9"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.7-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Masterminds\\": "src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Matt Butcher",
|
||||
"email": "technosophos@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Matt Farina",
|
||||
"email": "matt@mattfarina.com"
|
||||
},
|
||||
{
|
||||
"name": "Asmir Mustafic",
|
||||
"email": "goetas@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "An HTML5 parser and serializer.",
|
||||
"homepage": "http://masterminds.github.io/html5-php",
|
||||
"keywords": [
|
||||
"HTML5",
|
||||
"dom",
|
||||
"html",
|
||||
"parser",
|
||||
"querypath",
|
||||
"serializer",
|
||||
"xml"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/Masterminds/html5-php/issues",
|
||||
"source": "https://github.com/Masterminds/html5-php/tree/2.10.0"
|
||||
},
|
||||
"time": "2025-07-25T09:04:22+00:00"
|
||||
},
|
||||
{
|
||||
"name": "monolog/monolog",
|
||||
"version": "3.10.0",
|
||||
|
|
@ -4264,6 +4563,86 @@
|
|||
],
|
||||
"time": "2025-02-25T21:11:49+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sabberworm/php-css-parser",
|
||||
"version": "v9.3.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/MyIntervals/PHP-CSS-Parser.git",
|
||||
"reference": "88dbd0f7f91abbfe4402d0a3071e9ff4d81ed949"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/MyIntervals/PHP-CSS-Parser/zipball/88dbd0f7f91abbfe4402d0a3071e9ff4d81ed949",
|
||||
"reference": "88dbd0f7f91abbfe4402d0a3071e9ff4d81ed949",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-iconv": "*",
|
||||
"php": "^7.2.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0",
|
||||
"thecodingmachine/safe": "^1.3 || ^2.5 || ^3.4"
|
||||
},
|
||||
"require-dev": {
|
||||
"php-parallel-lint/php-parallel-lint": "1.4.0",
|
||||
"phpstan/extension-installer": "1.4.3",
|
||||
"phpstan/phpstan": "1.12.32 || 2.1.32",
|
||||
"phpstan/phpstan-phpunit": "1.4.2 || 2.0.8",
|
||||
"phpstan/phpstan-strict-rules": "1.6.2 || 2.0.7",
|
||||
"phpunit/phpunit": "8.5.52",
|
||||
"rawr/phpunit-data-provider": "3.3.1",
|
||||
"rector/rector": "1.2.10 || 2.2.8",
|
||||
"rector/type-perfect": "1.0.0 || 2.1.0",
|
||||
"squizlabs/php_codesniffer": "4.0.1",
|
||||
"thecodingmachine/phpstan-safe-rule": "1.2.0 || 1.4.1"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-mbstring": "for parsing UTF-8 CSS"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "9.4.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"files": [
|
||||
"src/Rule/Rule.php",
|
||||
"src/RuleSet/RuleContainer.php"
|
||||
],
|
||||
"psr-4": {
|
||||
"Sabberworm\\CSS\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Raphael Schweikert"
|
||||
},
|
||||
{
|
||||
"name": "Oliver Klee",
|
||||
"email": "github@oliverklee.de"
|
||||
},
|
||||
{
|
||||
"name": "Jake Hotson",
|
||||
"email": "jake.github@qzdesign.co.uk"
|
||||
}
|
||||
],
|
||||
"description": "Parser for CSS Files written in PHP",
|
||||
"homepage": "https://www.sabberworm.com/blog/2010/6/10/php-css-parser",
|
||||
"keywords": [
|
||||
"css",
|
||||
"parser",
|
||||
"stylesheet"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/MyIntervals/PHP-CSS-Parser/issues",
|
||||
"source": "https://github.com/MyIntervals/PHP-CSS-Parser/tree/v9.3.0"
|
||||
},
|
||||
"time": "2026-03-03T17:31:43+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/clock",
|
||||
"version": "v7.4.0",
|
||||
|
|
@ -6685,6 +7064,149 @@
|
|||
],
|
||||
"time": "2025-12-18T07:04:31+00:00"
|
||||
},
|
||||
{
|
||||
"name": "thecodingmachine/safe",
|
||||
"version": "v3.4.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/thecodingmachine/safe.git",
|
||||
"reference": "705683a25bacf0d4860c7dea4d7947bfd09eea19"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/thecodingmachine/safe/zipball/705683a25bacf0d4860c7dea4d7947bfd09eea19",
|
||||
"reference": "705683a25bacf0d4860c7dea4d7947bfd09eea19",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^8.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"php-parallel-lint/php-parallel-lint": "^1.4",
|
||||
"phpstan/phpstan": "^2",
|
||||
"phpunit/phpunit": "^10",
|
||||
"squizlabs/php_codesniffer": "^3.2"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"files": [
|
||||
"lib/special_cases.php",
|
||||
"generated/apache.php",
|
||||
"generated/apcu.php",
|
||||
"generated/array.php",
|
||||
"generated/bzip2.php",
|
||||
"generated/calendar.php",
|
||||
"generated/classobj.php",
|
||||
"generated/com.php",
|
||||
"generated/cubrid.php",
|
||||
"generated/curl.php",
|
||||
"generated/datetime.php",
|
||||
"generated/dir.php",
|
||||
"generated/eio.php",
|
||||
"generated/errorfunc.php",
|
||||
"generated/exec.php",
|
||||
"generated/fileinfo.php",
|
||||
"generated/filesystem.php",
|
||||
"generated/filter.php",
|
||||
"generated/fpm.php",
|
||||
"generated/ftp.php",
|
||||
"generated/funchand.php",
|
||||
"generated/gettext.php",
|
||||
"generated/gmp.php",
|
||||
"generated/gnupg.php",
|
||||
"generated/hash.php",
|
||||
"generated/ibase.php",
|
||||
"generated/ibmDb2.php",
|
||||
"generated/iconv.php",
|
||||
"generated/image.php",
|
||||
"generated/imap.php",
|
||||
"generated/info.php",
|
||||
"generated/inotify.php",
|
||||
"generated/json.php",
|
||||
"generated/ldap.php",
|
||||
"generated/libxml.php",
|
||||
"generated/lzf.php",
|
||||
"generated/mailparse.php",
|
||||
"generated/mbstring.php",
|
||||
"generated/misc.php",
|
||||
"generated/mysql.php",
|
||||
"generated/mysqli.php",
|
||||
"generated/network.php",
|
||||
"generated/oci8.php",
|
||||
"generated/opcache.php",
|
||||
"generated/openssl.php",
|
||||
"generated/outcontrol.php",
|
||||
"generated/pcntl.php",
|
||||
"generated/pcre.php",
|
||||
"generated/pgsql.php",
|
||||
"generated/posix.php",
|
||||
"generated/ps.php",
|
||||
"generated/pspell.php",
|
||||
"generated/readline.php",
|
||||
"generated/rnp.php",
|
||||
"generated/rpminfo.php",
|
||||
"generated/rrd.php",
|
||||
"generated/sem.php",
|
||||
"generated/session.php",
|
||||
"generated/shmop.php",
|
||||
"generated/sockets.php",
|
||||
"generated/sodium.php",
|
||||
"generated/solr.php",
|
||||
"generated/spl.php",
|
||||
"generated/sqlsrv.php",
|
||||
"generated/ssdeep.php",
|
||||
"generated/ssh2.php",
|
||||
"generated/stream.php",
|
||||
"generated/strings.php",
|
||||
"generated/swoole.php",
|
||||
"generated/uodbc.php",
|
||||
"generated/uopz.php",
|
||||
"generated/url.php",
|
||||
"generated/var.php",
|
||||
"generated/xdiff.php",
|
||||
"generated/xml.php",
|
||||
"generated/xmlrpc.php",
|
||||
"generated/yaml.php",
|
||||
"generated/yaz.php",
|
||||
"generated/zip.php",
|
||||
"generated/zlib.php"
|
||||
],
|
||||
"classmap": [
|
||||
"lib/DateTime.php",
|
||||
"lib/DateTimeImmutable.php",
|
||||
"lib/Exceptions/",
|
||||
"generated/Exceptions/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"description": "PHP core functions that throw exceptions instead of returning FALSE on error",
|
||||
"support": {
|
||||
"issues": "https://github.com/thecodingmachine/safe/issues",
|
||||
"source": "https://github.com/thecodingmachine/safe/tree/v3.4.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/OskarStark",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/shish",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/silasjoisten",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/staabm",
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2026-02-04T18:08:13+00:00"
|
||||
},
|
||||
{
|
||||
"name": "tijsverkoyen/css-to-inline-styles",
|
||||
"version": "v2.4.0",
|
||||
|
|
|
|||
|
|
@ -0,0 +1,301 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Settings
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Set some default values. It is possible to add all defines that can be set
|
||||
| in dompdf_config.inc.php. You can also override the entire config file.
|
||||
|
|
||||
*/
|
||||
'show_warnings' => false, // Throw an Exception on warnings from dompdf
|
||||
|
||||
'public_path' => null, // Override the public path if needed
|
||||
|
||||
/*
|
||||
* Dejavu Sans font is missing glyphs for converted entities, turn it off if you need to show € and £.
|
||||
*/
|
||||
'convert_entities' => true,
|
||||
|
||||
'options' => [
|
||||
/**
|
||||
* The location of the DOMPDF font directory
|
||||
*
|
||||
* The location of the directory where DOMPDF will store fonts and font metrics
|
||||
* Note: This directory must exist and be writable by the webserver process.
|
||||
* *Please note the trailing slash.*
|
||||
*
|
||||
* Notes regarding fonts:
|
||||
* Additional .afm font metrics can be added by executing load_font.php from command line.
|
||||
*
|
||||
* Only the original "Base 14 fonts" are present on all pdf viewers. Additional fonts must
|
||||
* be embedded in the pdf file or the PDF may not display correctly. This can significantly
|
||||
* increase file size unless font subsetting is enabled. Before embedding a font please
|
||||
* review your rights under the font license.
|
||||
*
|
||||
* Any font specification in the source HTML is translated to the closest font available
|
||||
* in the font directory.
|
||||
*
|
||||
* The pdf standard "Base 14 fonts" are:
|
||||
* Courier, Courier-Bold, Courier-BoldOblique, Courier-Oblique,
|
||||
* Helvetica, Helvetica-Bold, Helvetica-BoldOblique, Helvetica-Oblique,
|
||||
* Times-Roman, Times-Bold, Times-BoldItalic, Times-Italic,
|
||||
* Symbol, ZapfDingbats.
|
||||
*/
|
||||
'font_dir' => storage_path('fonts'), // advised by dompdf (https://github.com/dompdf/dompdf/pull/782)
|
||||
|
||||
/**
|
||||
* The location of the DOMPDF font cache directory
|
||||
*
|
||||
* This directory contains the cached font metrics for the fonts used by DOMPDF.
|
||||
* This directory can be the same as DOMPDF_FONT_DIR
|
||||
*
|
||||
* Note: This directory must exist and be writable by the webserver process.
|
||||
*/
|
||||
'font_cache' => storage_path('fonts'),
|
||||
|
||||
/**
|
||||
* The location of a temporary directory.
|
||||
*
|
||||
* The directory specified must be writeable by the webserver process.
|
||||
* The temporary directory is required to download remote images and when
|
||||
* using the PDFLib back end.
|
||||
*/
|
||||
'temp_dir' => sys_get_temp_dir(),
|
||||
|
||||
/**
|
||||
* ==== IMPORTANT ====
|
||||
*
|
||||
* dompdf's "chroot": Prevents dompdf from accessing system files or other
|
||||
* files on the webserver. All local files opened by dompdf must be in a
|
||||
* subdirectory of this directory. DO NOT set it to '/' since this could
|
||||
* allow an attacker to use dompdf to read any files on the server. This
|
||||
* should be an absolute path.
|
||||
* This is only checked on command line call by dompdf.php, but not by
|
||||
* direct class use like:
|
||||
* $dompdf = new DOMPDF(); $dompdf->load_html($htmldata); $dompdf->render(); $pdfdata = $dompdf->output();
|
||||
*/
|
||||
'chroot' => realpath(base_path()),
|
||||
|
||||
/**
|
||||
* Protocol whitelist
|
||||
*
|
||||
* Protocols and PHP wrappers allowed in URIs, and the validation rules
|
||||
* that determine if a resouce may be loaded. Full support is not guaranteed
|
||||
* for the protocols/wrappers specified
|
||||
* by this array.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
'allowed_protocols' => [
|
||||
'data://' => ['rules' => []],
|
||||
'file://' => ['rules' => []],
|
||||
'http://' => ['rules' => []],
|
||||
'https://' => ['rules' => []],
|
||||
],
|
||||
|
||||
/**
|
||||
* Operational artifact (log files, temporary files) path validation
|
||||
*/
|
||||
'artifactPathValidation' => null,
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
'log_output_file' => null,
|
||||
|
||||
/**
|
||||
* Whether to enable font subsetting or not.
|
||||
*/
|
||||
'enable_font_subsetting' => false,
|
||||
|
||||
/**
|
||||
* The PDF rendering backend to use
|
||||
*
|
||||
* Valid settings are 'PDFLib', 'CPDF' (the bundled R&OS PDF class), 'GD' and
|
||||
* 'auto'. 'auto' will look for PDFLib and use it if found, or if not it will
|
||||
* fall back on CPDF. 'GD' renders PDFs to graphic files.
|
||||
* {@link * Canvas_Factory} ultimately determines which rendering class to
|
||||
* instantiate based on this setting.
|
||||
*
|
||||
* Both PDFLib & CPDF rendering backends provide sufficient rendering
|
||||
* capabilities for dompdf, however additional features (e.g. object,
|
||||
* image and font support, etc.) differ between backends. Please see
|
||||
* {@link PDFLib_Adapter} for more information on the PDFLib backend
|
||||
* and {@link CPDF_Adapter} and lib/class.pdf.php for more information
|
||||
* on CPDF. Also see the documentation for each backend at the links
|
||||
* below.
|
||||
*
|
||||
* The GD rendering backend is a little different than PDFLib and
|
||||
* CPDF. Several features of CPDF and PDFLib are not supported or do
|
||||
* not make any sense when creating image files. For example,
|
||||
* multiple pages are not supported, nor are PDF 'objects'. Have a
|
||||
* look at {@link GD_Adapter} for more information. GD support is
|
||||
* experimental, so use it at your own risk.
|
||||
*
|
||||
* @link http://www.pdflib.com
|
||||
* @link http://www.ros.co.nz/pdf
|
||||
* @link http://www.php.net/image
|
||||
*/
|
||||
'pdf_backend' => 'CPDF',
|
||||
|
||||
/**
|
||||
* html target media view which should be rendered into pdf.
|
||||
* List of types and parsing rules for future extensions:
|
||||
* http://www.w3.org/TR/REC-html40/types.html
|
||||
* screen, tty, tv, projection, handheld, print, braille, aural, all
|
||||
* Note: aural is deprecated in CSS 2.1 because it is replaced by speech in CSS 3.
|
||||
* Note, even though the generated pdf file is intended for print output,
|
||||
* the desired content might be different (e.g. screen or projection view of html file).
|
||||
* Therefore allow specification of content here.
|
||||
*/
|
||||
'default_media_type' => 'screen',
|
||||
|
||||
/**
|
||||
* The default paper size.
|
||||
*
|
||||
* North America standard is "letter"; other countries generally "a4"
|
||||
*
|
||||
* @see CPDF_Adapter::PAPER_SIZES for valid sizes ('letter', 'legal', 'A4', etc.)
|
||||
*/
|
||||
'default_paper_size' => 'a4',
|
||||
|
||||
/**
|
||||
* The default paper orientation.
|
||||
*
|
||||
* The orientation of the page (portrait or landscape).
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
'default_paper_orientation' => 'portrait',
|
||||
|
||||
/**
|
||||
* The default font family
|
||||
*
|
||||
* Used if no suitable fonts can be found. This must exist in the font folder.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
'default_font' => 'serif',
|
||||
|
||||
/**
|
||||
* Image DPI setting
|
||||
*
|
||||
* This setting determines the default DPI setting for images and fonts. The
|
||||
* DPI may be overridden for inline images by explictly setting the
|
||||
* image's width & height style attributes (i.e. if the image's native
|
||||
* width is 600 pixels and you specify the image's width as 72 points,
|
||||
* the image will have a DPI of 600 in the rendered PDF. The DPI of
|
||||
* background images can not be overridden and is controlled entirely
|
||||
* via this parameter.
|
||||
*
|
||||
* For the purposes of DOMPDF, pixels per inch (PPI) = dots per inch (DPI).
|
||||
* If a size in html is given as px (or without unit as image size),
|
||||
* this tells the corresponding size in pt.
|
||||
* This adjusts the relative sizes to be similar to the rendering of the
|
||||
* html page in a reference browser.
|
||||
*
|
||||
* In pdf, always 1 pt = 1/72 inch
|
||||
*
|
||||
* Rendering resolution of various browsers in px per inch:
|
||||
* Windows Firefox and Internet Explorer:
|
||||
* SystemControl->Display properties->FontResolution: Default:96, largefonts:120, custom:?
|
||||
* Linux Firefox:
|
||||
* about:config *resolution: Default:96
|
||||
* (xorg screen dimension in mm and Desktop font dpi settings are ignored)
|
||||
*
|
||||
* Take care about extra font/image zoom factor of browser.
|
||||
*
|
||||
* In images, <img> size in pixel attribute, img css style, are overriding
|
||||
* the real image dimension in px for rendering.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
'dpi' => 96,
|
||||
|
||||
/**
|
||||
* Enable embedded PHP
|
||||
*
|
||||
* If this setting is set to true then DOMPDF will automatically evaluate embedded PHP contained
|
||||
* within <script type="text/php"> ... </script> tags.
|
||||
*
|
||||
* ==== IMPORTANT ==== Enabling this for documents you do not trust (e.g. arbitrary remote html pages)
|
||||
* is a security risk.
|
||||
* Embedded scripts are run with the same level of system access available to dompdf.
|
||||
* Set this option to false (recommended) if you wish to process untrusted documents.
|
||||
* This setting may increase the risk of system exploit.
|
||||
* Do not change this settings without understanding the consequences.
|
||||
* Additional documentation is available on the dompdf wiki at:
|
||||
* https://github.com/dompdf/dompdf/wiki
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
'enable_php' => false,
|
||||
|
||||
/**
|
||||
* Enable inline JavaScript
|
||||
*
|
||||
* If this setting is set to true then DOMPDF will automatically insert JavaScript code contained
|
||||
* within <script type="text/javascript"> ... </script> tags as written into the PDF.
|
||||
* NOTE: This is PDF-based JavaScript to be executed by the PDF viewer,
|
||||
* not browser-based JavaScript executed by Dompdf.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
'enable_javascript' => true,
|
||||
|
||||
/**
|
||||
* Enable remote file access
|
||||
*
|
||||
* If this setting is set to true, DOMPDF will access remote sites for
|
||||
* images and CSS files as required.
|
||||
*
|
||||
* ==== IMPORTANT ====
|
||||
* This can be a security risk, in particular in combination with isPhpEnabled and
|
||||
* allowing remote html code to be passed to $dompdf = new DOMPDF(); $dompdf->load_html(...);
|
||||
* This allows anonymous users to download legally doubtful internet content which on
|
||||
* tracing back appears to being downloaded by your server, or allows malicious php code
|
||||
* in remote html pages to be executed by your server with your account privileges.
|
||||
*
|
||||
* This setting may increase the risk of system exploit. Do not change
|
||||
* this settings without understanding the consequences. Additional
|
||||
* documentation is available on the dompdf wiki at:
|
||||
* https://github.com/dompdf/dompdf/wiki
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
'enable_remote' => false,
|
||||
|
||||
/**
|
||||
* List of allowed remote hosts
|
||||
*
|
||||
* Each value of the array must be a valid hostname.
|
||||
*
|
||||
* This will be used to filter which resources can be loaded in combination with
|
||||
* isRemoteEnabled. If enable_remote is FALSE, then this will have no effect.
|
||||
*
|
||||
* Leave to NULL to allow any remote host.
|
||||
*
|
||||
* @var array|null
|
||||
*/
|
||||
'allowed_remote_hosts' => null,
|
||||
|
||||
/**
|
||||
* A ratio applied to the fonts height to be more like browsers' line height
|
||||
*/
|
||||
'font_height_ratio' => 1.1,
|
||||
|
||||
/**
|
||||
* Use the HTML5 Lib parser
|
||||
*
|
||||
* @deprecated This feature is now always on in dompdf 2.x
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
'enable_html5_parser' => true,
|
||||
],
|
||||
|
||||
];
|
||||
|
|
@ -72,10 +72,10 @@
|
|||
<td>{{ $a->sektor }}</td>
|
||||
<td>{{ $a->sub_sektor }}</td>
|
||||
<td class="text-center">
|
||||
<a href="{{ route($route.'adaptasi.view', $a->id) }}" class="text-secondary me-2">
|
||||
<a href="{{ route($route.'.view', $a->id) }}" class="text-secondary me-2">
|
||||
<i class="ti ti-eye"></i>
|
||||
</a>
|
||||
<a href="{{ route($route.'adaptasi.edit', $a->id) }}" class="text-secondary">
|
||||
<a href="{{ route($route.'.edit', $a->id) }}" class="text-secondary">
|
||||
<i class="ti ti-pencil"></i>
|
||||
</a>
|
||||
</td>
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
<title>@yield('title',@$title) | SIGD</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta content="SIDG" name="description" />
|
||||
<meta content="{{ csrf_token() }}" name="csrf-token" />
|
||||
<meta content="ilhamwara" name="author" />
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="{{ asset('assets/logo-dinas.ico') }}">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="{{ asset('assets/logo-dinas.ico') }}">
|
||||
|
|
|
|||
|
|
@ -8,13 +8,12 @@
|
|||
#scope = $user->getScope();
|
||||
@endphp
|
||||
|
||||
<div class="card shadow-sm">
|
||||
<div class="card-header d-flex justify-content-between align-items-center">
|
||||
<h3 class="mb-0 font-weight-bold" style="color: #278074; font-size: 20px;">ADAPTASI</h3>
|
||||
<div class="card rounded">
|
||||
<div class="card-body d-flex justify-content-between align-items-center">
|
||||
<h3 class="mb-0 font-bold" style="font-size: 20px;">ADAPTASI</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br/><br/>
|
||||
<form onsubmit="return false;">
|
||||
@csrf
|
||||
|
||||
|
|
@ -160,7 +159,7 @@
|
|||
</div>
|
||||
|
||||
<div class="mt-4 mb-4 text-right">
|
||||
<button type="button" class="btn btn-submit px-4 py-2" data-target="#collapse2">
|
||||
<button type="button" class="btn btn-submit btn-primary px-4 py-2" data-target="#collapse2">
|
||||
Selanjutnya
|
||||
</button>
|
||||
</div>
|
||||
|
|
@ -249,7 +248,7 @@
|
|||
</div>
|
||||
|
||||
<div class="mt-4 mb-4 text-right">
|
||||
<button type="button" class="btn btn-submit px-4 py-2" data-target="#collapse3">
|
||||
<button type="button" class="btn btn-submit btn-primary px-4 py-2" data-target="#collapse3">
|
||||
Selanjutnya
|
||||
</button>
|
||||
</div>
|
||||
|
|
@ -284,7 +283,7 @@
|
|||
</div>
|
||||
|
||||
<div class="mt-4 mb-4 text-right">
|
||||
<button type="submit" id="final-submit" class="btn btn-submit px-4 py-2">
|
||||
<button type="submit" id="final-submit" class="btn btn-success btn-submit btn-primary px-4 py-2">
|
||||
Simpan
|
||||
</button>
|
||||
</div>
|
||||
|
|
@ -302,6 +301,7 @@
|
|||
@section('js')
|
||||
<script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>
|
||||
<script>
|
||||
var base_url = '{{ url("/") }}';
|
||||
// -------- REMOVE RESET --------
|
||||
if (window.location.search.includes('reset=1')) {
|
||||
const url = new URL(window.location.href);
|
||||
|
|
@ -405,7 +405,7 @@
|
|||
return txt.value;
|
||||
}
|
||||
function loadSektor(selectedValue = null) {
|
||||
return $.get('/adaptasi/form-adaptasi-sector-dropdown', {})
|
||||
return $.get(base_url+'/adaptasi/form-adaptasi-sector-dropdown', {})
|
||||
.then(data => {
|
||||
const $dropdown = $('#sektor-dropdown').empty();
|
||||
$dropdown.append('<option value="">Pilih Sektor</option>')
|
||||
|
|
@ -418,7 +418,7 @@
|
|||
}
|
||||
|
||||
function loadSubSektor(sector, selectedValue = null) {
|
||||
return $.get('/adaptasi/form-adaptasi-subsector-dropdown', { sector })
|
||||
return $.get(base_url+'/adaptasi/form-adaptasi-subsector-dropdown', { sector })
|
||||
.then(data => {
|
||||
const $dropdown = $('#subsektor-dropdown').empty();
|
||||
$dropdown.append('<option value="">Pilih Sub-Sektor</option>');
|
||||
|
|
@ -431,7 +431,7 @@
|
|||
}
|
||||
|
||||
function loadKategoriAksi(sector, subSector, selectedValue = null) {
|
||||
return $.get('/adaptasi/form-adaptasi-kategoriaksi-dropdown', { sub_sector: subSector, sector: sector })
|
||||
return $.get(base_url+'/adaptasi/form-adaptasi-kategoriaksi-dropdown', { sub_sector: subSector, sector: sector })
|
||||
.then(data => {
|
||||
const $dropdown = $('#kategoriaksi-dropdown').empty();
|
||||
$dropdown.append('<option value="">Pilih Kategori Aksi</option>');
|
||||
|
|
@ -447,7 +447,7 @@
|
|||
|
||||
|
||||
// function loadJenisAksi(sector, subSector, kategori, selectedValue = null) {
|
||||
// return $.get('/adaptasi/form-adaptasi-jenisaksi-dropdown', { sub_sector: subSector, sector: sector, kategori: kategori })
|
||||
// return $.get(base_url+'/adaptasi/form-adaptasi-jenisaksi-dropdown', { sub_sector: subSector, sector: sector, kategori: kategori })
|
||||
// .then(data => {
|
||||
// const $dropdown = $('#jenisaksi-dropdown').empty();
|
||||
// $dropdown.append('<option value="">Pilih Jenis Aksi</option>');
|
||||
|
|
@ -460,7 +460,7 @@
|
|||
// }
|
||||
|
||||
// function loadAksi(sector, subSector, kategori, jenis, selectedValue = null) {
|
||||
// return $.get('/adaptasi/form-adaptasi-aksi-dropdown', { sub_sector: subSector, sector: sector, kategori: kategori, jenis: jenis })
|
||||
// return $.get(base_url+'/adaptasi/form-adaptasi-aksi-dropdown', { sub_sector: subSector, sector: sector, kategori: kategori, jenis: jenis })
|
||||
// .then(data => {
|
||||
// const $dropdown = $('#aksi-dropdown').empty();
|
||||
// $dropdown.append('<option value="">Pilih Aksi</option>');
|
||||
|
|
@ -592,7 +592,7 @@
|
|||
formData += '&adaptation_id=' + encodeURIComponent(adaptationId);
|
||||
formData += '&_token=' + $('meta[name="csrf-token"]').attr('content');
|
||||
console.log(formData)
|
||||
$.post("{{ route('adaptasi-form.store-part1') }}", formData)
|
||||
$.post("{{ route('modules.adaptasi-form.store-part1') }}", formData)
|
||||
.done(response => {
|
||||
if(response.success) {
|
||||
$('#collapse1').one('hidden.bs.collapse', () => {
|
||||
|
|
@ -619,7 +619,7 @@
|
|||
let formData = $('#collapse2').find('input, select, textarea').serialize();
|
||||
formData += '&_token=' + $('meta[name="csrf-token"]').attr('content');
|
||||
|
||||
$.post("{{ route('adaptasi-form.store-part2') }}", formData)
|
||||
$.post("{{ route('modules.adaptasi-form.store-part2') }}", formData)
|
||||
.done(function(response) {
|
||||
if(response.success) {
|
||||
$('#collapse2').one('hidden.bs.collapse', () => {
|
||||
|
|
@ -639,7 +639,7 @@
|
|||
const formData = $('form').serialize();
|
||||
|
||||
$.ajax({
|
||||
url: "{{ route('adaptasi-form.store-final') }}",
|
||||
url: "{{ route('modules.adaptasi-form.store-final') }}",
|
||||
method: 'POST',
|
||||
data: formData,
|
||||
success: function(response) {
|
||||
|
|
|
|||
|
|
@ -8,13 +8,12 @@
|
|||
#scope = $user->getScope();
|
||||
@endphp
|
||||
|
||||
<div class="card shadow-sm">
|
||||
<div class="card-header d-flex justify-content-between align-items-center">
|
||||
<h3 class="mb-0 font-weight-bold" style="color: #278074; font-size: 20px;">MITIGASI</h3>
|
||||
<div class="card rounded">
|
||||
<div class="card-body d-flex justify-content-between align-items-center">
|
||||
<h3 class="mb-0 font-bold" style="font-size: 20px;">MITIGASI</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br/><br/>
|
||||
<form onsubmit="return false;">
|
||||
@csrf
|
||||
|
||||
|
|
@ -29,7 +28,7 @@
|
|||
<h5 class="mb-0">
|
||||
<button class="btn d-flex justify-content-between w-100 align-items-center form-title-accordion" data-toggle="collapse" data-target="#collapse1" aria-expanded="true">
|
||||
INFORMASI UMUM
|
||||
<span class="arrow mr-2"><i class="ti ti-angle-right"></i></span>
|
||||
<span class="arrow mr-2"><i class="bx bx-plus"></i></span>
|
||||
</button>
|
||||
</h5>
|
||||
</div>
|
||||
|
|
@ -110,7 +109,7 @@
|
|||
</div>
|
||||
|
||||
<div class="mt-4 text-right">
|
||||
<button type="button" class="btn btn-submit px-4 py-2" data-target="#collapse2">
|
||||
<button type="button" class="btn btn-submit btn-primary px-4 py-2" data-target="#collapse2">
|
||||
Selanjutnya
|
||||
</button>
|
||||
</div>
|
||||
|
|
@ -124,7 +123,7 @@
|
|||
<h5 class="mb-0">
|
||||
<button class="btn d-flex justify-content-between w-100 align-items-center collapsed form-title-accordion" data-toggle="collapse" data-target="#collapse2">
|
||||
DATA UMUM KEGIATAN MITIGASI
|
||||
<span class="arrow mr-2"><i class="ti ti-angle-right"></i></span>
|
||||
<span class="arrow mr-2"><i class="bx bx-plus"></i></span>
|
||||
</button>
|
||||
</h5>
|
||||
</div>
|
||||
|
|
@ -393,7 +392,7 @@
|
|||
</div>
|
||||
|
||||
<div class="mt-4 text-right">
|
||||
<button type="button" class="btn btn-submit px-4 py-2" data-target="#collapse3">
|
||||
<button type="button" class="btn btn-submit btn-primary px-4 py-2" data-target="#collapse3">
|
||||
Selanjutnya
|
||||
</button>
|
||||
</div>
|
||||
|
|
@ -407,7 +406,7 @@
|
|||
<h5 class="mb-0">
|
||||
<button class="btn d-flex justify-content-between w-100 align-items-center collapsed form-title-accordion" data-toggle="collapse" data-target="#collapse3">
|
||||
INFORMASI ALOKASI/REALISASI ANGGARAN
|
||||
<span class="arrow mr-2"><i class="ti ti-angle-right"></i></span>
|
||||
<span class="arrow mr-2"><i class="bx bx-plus"></i></span>
|
||||
</button>
|
||||
</h5>
|
||||
</div>
|
||||
|
|
@ -482,7 +481,7 @@
|
|||
</div>
|
||||
|
||||
<div class="mt-4 text-right">
|
||||
<button type="button" class="btn btn-submit px-4 py-2" data-target="#collapse4">
|
||||
<button type="button" class="btn btn-submit btn-primary px-4 py-2" data-target="#collapse4">
|
||||
Selanjutnya
|
||||
</button>
|
||||
</div>
|
||||
|
|
@ -501,7 +500,7 @@
|
|||
<h5 class="mb-0">
|
||||
<button class="btn d-flex justify-content-between w-100 align-items-center form-title-accordion collapsed" data-toggle="collapse" data-target="#collapse4" aria-expanded="false">
|
||||
FORM SUMBER DATA
|
||||
<span class="arrow mr-2"><i class="ti ti-angle-right"></i></span>
|
||||
<span class="arrow mr-2"><i class="bx bx-plus"></i></span>
|
||||
</button>
|
||||
</h5>
|
||||
</div>
|
||||
|
|
@ -521,22 +520,109 @@
|
|||
|
||||
@if (!empty($sumberDataList))
|
||||
@foreach ($sumberDataList as $index => $sumber)
|
||||
<x-sumber-data-card
|
||||
:number="$index + 1"
|
||||
:title="$sumber['title'] ?? ''"
|
||||
:yearSelected="$sumber['year'] ?? ''"
|
||||
:link="$sumber['link'] ?? ''"
|
||||
:years="$years"
|
||||
/>
|
||||
|
||||
<div class="card card-box sumber-data-card mt-4 mb-4">
|
||||
<div class="card-header" id="heading4-{{ $index + 1 }}">
|
||||
<h6 class="mb-0">Sumber Data {{ $index + 1 }}</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="card card-box">
|
||||
<div class="card-header" id="heading4-{{ $index + 1 }}-1">
|
||||
<h6 class="mb-0">Sumber Data</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-group mt-4">
|
||||
<label class="label-title" for="titleSourceReference{{ $index + 1 }}">
|
||||
JUDUL SUMBER DATA
|
||||
</label>
|
||||
<input type="text" class="form-control" name="titleSourceReference[]" id="titleSourceReference{{ $index + 1 }}" value="{{ $sumber['title'] }}">
|
||||
</div>
|
||||
|
||||
<div class="form-group mt-4">
|
||||
<label class="label-title" for="yearSourceReference{{ $index + 1 }}">
|
||||
Tahun
|
||||
</label>
|
||||
<select class="form-control select-button" name="yearSourceReference[]" id="yearSourceReference{{ $index + 1 }}">
|
||||
<option value="">-- Pilih Tahun --</option>
|
||||
@foreach($years as $year)
|
||||
<option value="{{ $year }}" {{ $year == $sumber['year'] ? 'selected' : '' }}>
|
||||
{{ $year }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group mt-4">
|
||||
<label class="label-title" for="linkSourceReference{{ $index + 1 }}">
|
||||
TAUTAN URL FILE
|
||||
</label>
|
||||
<input type="text" class="form-control" name="linkSourceReference[]" id="linkSourceReference{{ $index + 1 }}" value="{{ $sumber['link'] }}">
|
||||
<p class="text-muted mt-1" style="font-size: 10px;">
|
||||
Tautan URL langsung menuju file (jika dapat diunduh)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<button type="button" class="btn btn-danger btn-delete px-4 py-2" onclick="removeSumberData(this)">Hapus</button>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
@else
|
||||
<x-sumber-data-card :number="1" :years="$years" />
|
||||
<div class="card card-box sumber-data-card mt-4 mb-4">
|
||||
<div class="card-header" id="heading4-1">
|
||||
<h6 class="mb-0">Sumber Data 1</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="card card-box">
|
||||
<div class="card-header" id="heading4-1-1">
|
||||
<h6 class="mb-0">Sumber Data</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-group mt-4">
|
||||
<label class="label-title" for="titleSourceReference1">
|
||||
JUDUL SUMBER DATA
|
||||
</label>
|
||||
<input type="text" class="form-control" name="titleSourceReference[]" id="titleSourceReference1" value="">
|
||||
</div>
|
||||
|
||||
<div class="form-group mt-4">
|
||||
<label class="label-title" for="yearSourceReference1">
|
||||
Tahun
|
||||
</label>
|
||||
<select class="form-control select-button" name="yearSourceReference[]" id="yearSourceReference1">
|
||||
<option value="">-- Pilih Tahun --</option>
|
||||
@foreach($years as $year)
|
||||
<option value="{{ $year }}">
|
||||
{{ $year }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group mt-4">
|
||||
<label class="label-title" for="linkSourceReference1">
|
||||
TAUTAN URL FILE
|
||||
</label>
|
||||
<input type="text" class="form-control" name="linkSourceReference[]" id="linkSourceReference1" value="">
|
||||
<p class="text-muted mt-1" style="font-size: 10px;">
|
||||
Tautan URL langsung menuju file (jika dapat diunduh)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<button type="button" class="btn btn-danger btn-delete px-4 py-2" onclick="removeSumberData(this)">Hapus</button>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<template id="sumberDataTemplate">
|
||||
{!! str_replace('__INDEX__', '${index}',
|
||||
view('components.sumber-data-card', [
|
||||
view('modules.components.sumber-data-card', [
|
||||
'number' => '__INDEX__',
|
||||
'years' => $years,
|
||||
'title' => '',
|
||||
|
|
@ -547,16 +633,12 @@
|
|||
</template>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="mt-4">
|
||||
<button type="button" class="btn-add-data" onclick="addSumberData()">
|
||||
<div class="col-md-12">
|
||||
<div class="mt-4 d-flex justify-content-center align-items-center">
|
||||
<button type="button" class="btn-add-data btn btn-success" onclick="addSumberData()">
|
||||
Tambah sumber data
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="mt-4 text-right">
|
||||
<button type="button" class="btn btn-submit px-4 py-2" data-target="#collapse5">
|
||||
<button type="button" class="btn btn-submit btn-primary px-4 py-2" data-target="#collapse5">
|
||||
Selanjutnya
|
||||
</button>
|
||||
</div>
|
||||
|
|
@ -577,7 +659,7 @@
|
|||
<h5 class="mb-0">
|
||||
<button class="btn d-flex justify-content-between w-100 align-items-center form-title-accordion collapsed" data-toggle="collapse" data-target="#collapse5" aria-expanded="false">
|
||||
FORM DATA LOKASI KEGIATAN MITIGASI
|
||||
<span class="arrow mr-2"><i class="ti ti-angle-right"></i></span>
|
||||
<span class="arrow mr-2"><i class="bx bx-plus"></i></span>
|
||||
</button>
|
||||
</h5>
|
||||
</div>
|
||||
|
|
@ -641,7 +723,7 @@
|
|||
<div id="maps" style="height: 500px; width: 100%; border-radius: 10px;"></div>
|
||||
</div>
|
||||
<div class="col-12 d-flex justify-content-end mt-4">
|
||||
<button id="btn-remove-location" class="button-action px-4 py-2">Hapus Lokasi</button>
|
||||
<button id="btn-remove-location" class="button-action btn btn-danger px-4 py-2">Hapus Lokasi</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -650,7 +732,7 @@
|
|||
</div>
|
||||
|
||||
<div class="mt-4 mb-4 text-right">
|
||||
<button type="button" class="btn btn-submit px-4 py-2" data-target="#collapse6">
|
||||
<button type="button" class="btn btn-submit btn-primary px-4 py-2" data-target="#collapse6">
|
||||
Submit
|
||||
</button>
|
||||
</div>
|
||||
|
|
@ -699,6 +781,7 @@
|
|||
<script src="https://unpkg.com/leaflet.markercluster@1.4.1/dist/leaflet.markercluster.js"></script>
|
||||
<script src="https://unpkg.com/leaflet-control-geocoder/dist/Control.Geocoder.js"></script>
|
||||
<script>
|
||||
var base_url = '{{ url("/") }}';
|
||||
// -------- REMOVE RESET --------
|
||||
if (window.location.search.includes('reset=1')) {
|
||||
const url = new URL(window.location.href);
|
||||
|
|
@ -946,7 +1029,7 @@
|
|||
|
||||
// -------- DROPDOWN LOADING FUNCTIONS WITH PROMISE --------
|
||||
function loadSektor(selectedValue = null) {
|
||||
return $.get('/mitigasi/form-mitigasi-sector-dropdown', {})
|
||||
return $.get(base_url+'/mitigasi/form-mitigasi-sector-dropdown', {})
|
||||
.then(data => {
|
||||
const $dropdown = $('#sektor-dropdown').empty();
|
||||
$dropdown.append('<option value="">Pilih Sektor</option>')
|
||||
|
|
@ -959,7 +1042,7 @@
|
|||
}
|
||||
|
||||
function loadSubSektor(sector, selectedValue = null) {
|
||||
return $.get('/mitigasi/form-mitigasi-subsector-dropdown', { sector })
|
||||
return $.get(base_url+'/mitigasi/form-mitigasi-subsector-dropdown', { sector })
|
||||
.then(data => {
|
||||
const $dropdown = $('#subsektor-dropdown').empty();
|
||||
$dropdown.append('<option value="">Pilih Sub-Sektor</option>');
|
||||
|
|
@ -972,7 +1055,7 @@
|
|||
}
|
||||
|
||||
function loadPerhitungan(sector, subSector, selectedValue = null) {
|
||||
return $.get('/mitigasi/form-mitigasi-perhitungan-dropdown', { sub_sector: subSector, sector: sector })
|
||||
return $.get(base_url+'/mitigasi/form-mitigasi-perhitungan-dropdown', { sub_sector: subSector, sector: sector })
|
||||
.then(data => {
|
||||
const $dropdown = $('#perhitungan-dropdown').empty();
|
||||
$dropdown.append('<option value="">Pilih Kategori/ Mode Perhitungan</option>');
|
||||
|
|
@ -985,7 +1068,7 @@
|
|||
}
|
||||
|
||||
function loadSubAktivitas(sector, subSector, perhitungan, selectedValue = null) {
|
||||
return $.get('/mitigasi/form-mitigasi-subaktivitas-dropdown', { sub_sector: subSector, sector: sector, activity: perhitungan })
|
||||
return $.get(base_url+'/mitigasi/form-mitigasi-subaktivitas-dropdown', { sub_sector: subSector, sector: sector, activity: perhitungan })
|
||||
.then(data => {
|
||||
const $dropdown = $('#subactivity-dropdown').empty();
|
||||
$dropdown.append('<option value="">Pilih Sub-Aktivitas</option>');
|
||||
|
|
@ -1020,7 +1103,7 @@
|
|||
}
|
||||
|
||||
function loadRAD(subSector, selectedValue = null) {
|
||||
return $.get('/mitigasi/form-mitigasi-aksi-rad', { sub_sector: subSector })
|
||||
return $.get(base_url+'/mitigasi/form-mitigasi-aksi-rad', { sub_sector: subSector })
|
||||
.then(data => {
|
||||
const $dropdown = $('#rad-dropdown').empty();
|
||||
$dropdown.append('<option value="">Tambah kegiatan di luar RAD</option>');
|
||||
|
|
@ -1033,7 +1116,7 @@
|
|||
}
|
||||
|
||||
function loadKabupaten(selectedValue = null) {
|
||||
return $.get('/mitigasi/form-kabupaten', {})
|
||||
return $.get(base_url+'/mitigasi/form-kabupaten', {})
|
||||
.then(data => {
|
||||
const $dropdown = $('#kabupaten').empty();
|
||||
$dropdown.append('<option value="">Pilih Kabupaten Kota</option>');
|
||||
|
|
@ -1046,7 +1129,7 @@
|
|||
}
|
||||
|
||||
function loadKecamatan(kabkotId, selectedValue = null) {
|
||||
return $.get('/mitigasi/form-kecamatan', {kabkot_id: kabkotId})
|
||||
return $.get(base_url+'/mitigasi/form-kecamatan', {kabkot_id: kabkotId})
|
||||
.then(data => {
|
||||
const $dropdown = $('#kecamatan').empty();
|
||||
$dropdown.append('<option value="">Pilih Kecamatan</option>');
|
||||
|
|
@ -1059,7 +1142,7 @@
|
|||
}
|
||||
|
||||
function loadKelurahan(kabkotId, kecId, selectedValue = null) {
|
||||
return $.get('/mitigasi/form-kelurahan', {kabkot_id: kabkotId, kec_id: kecId})
|
||||
return $.get(base_url+'/mitigasi/form-kelurahan', {kabkot_id: kabkotId, kec_id: kecId})
|
||||
.then(data => {
|
||||
const $dropdown = $('#kelurahan').empty();
|
||||
$dropdown.append('<option value="">Pilih Kelurahan</option>');
|
||||
|
|
@ -1249,7 +1332,7 @@
|
|||
// <div class="card multiple-card" data-index="${idx}">
|
||||
// <div class="card-header d-flex justify-content-between align-items-center">
|
||||
// <strong>${title}</strong>
|
||||
// <button type="button" class="btn btn-delete btn-sm remove-card">
|
||||
// <button type="button" class="btn btn-danger btn-delete btn-sm remove-card">
|
||||
// Hapus Data
|
||||
// </button>
|
||||
// </div>
|
||||
|
|
@ -1281,7 +1364,7 @@
|
|||
// <button class="btn d-flex justify-content-between w-100 align-items-center form-title-accordion collapsed"
|
||||
// data-toggle="collapse" data-target="#collapse6">
|
||||
// ${data[0].title.toUpperCase()}
|
||||
// <span class="arrow mr-2"><i class="ti ti-angle-right"></i></span>
|
||||
// <span class="arrow mr-2"><i class="bx bx-plus"></i></span>
|
||||
// </button>
|
||||
// </h5>
|
||||
// </div>
|
||||
|
|
@ -1452,7 +1535,7 @@
|
|||
$('#section4').show();
|
||||
$('#accordion-4').html('<p class="text-muted ml-1">Loading...</p>');
|
||||
|
||||
$.get('/mitigasi/form-mitigasi-question', { mitigation_id })
|
||||
$.get(base_url+'/mitigasi/form-mitigasi-question', { mitigation_id })
|
||||
.done(data => {
|
||||
if (!data || !data.length) {
|
||||
$('#accordion-4').html(
|
||||
|
|
@ -1572,7 +1655,7 @@
|
|||
<div class="card multiple-card" data-index="${idx}">
|
||||
<div class="card-header d-flex justify-content-between align-items-center">
|
||||
<strong class="card-title" id="multiple-card-title-${idx}" data-index="${idx}">${title}</strong>
|
||||
<button type="button" class="btn btn-delete btn-sm remove-card">
|
||||
<button type="button" class="btn btn-danger btn-delete btn-sm remove-card">
|
||||
Hapus Data
|
||||
</button>
|
||||
</div>
|
||||
|
|
@ -1626,7 +1709,7 @@
|
|||
<div id="multiple-container">
|
||||
${allMultiQs.map((qs, idx) => makeMultipleCard(idx, qs)).join('')}
|
||||
</div>
|
||||
<button type="button" id="add-group" class="btn btn-add-data add-row btn-sm mt-2" style="display:none">
|
||||
<button type="button" id="add-group" class="btn btn-success btn-add-data add-row btn-sm mt-2" style="display:none">
|
||||
Tambah Data
|
||||
</button>
|
||||
</div>`;
|
||||
|
|
@ -1640,7 +1723,7 @@
|
|||
<button class="btn d-flex justify-content-between w-100 align-items-center form-title-accordion collapsed"
|
||||
data-toggle="collapse" data-target="#collapse6">
|
||||
${data[0].title.toUpperCase()}
|
||||
<span class="arrow mr-2"><i class="ti ti-angle-right"></i></span>
|
||||
<span class="arrow mr-2"><i class="bx bx-plus"></i></span>
|
||||
</button>
|
||||
</h5>
|
||||
</div>
|
||||
|
|
@ -1650,7 +1733,7 @@
|
|||
${allHtml}
|
||||
${multipleLayout}
|
||||
<div class="mt-4 text-right">
|
||||
<button type="submit" id="final-submit" class="btn btn-submit px-4 py-2">
|
||||
<button type="submit" id="final-submit" class="btn btn-primary btn-submit px-4 py-2">
|
||||
Submit
|
||||
</button>
|
||||
</div>
|
||||
|
|
@ -2039,7 +2122,7 @@
|
|||
formData += '&mitigation_id=' + encodeURIComponent(mitigationId);
|
||||
formData += '&_token=' + $('meta[name="csrf-token"]').attr('content');
|
||||
|
||||
$.post("{{ route('mitigasi-form.store-part1') }}", formData)
|
||||
$.post("{{ route('modules.mitigasi-form.store-part1') }}", formData)
|
||||
.done(response => {
|
||||
if(response.success){
|
||||
$('#collapse1').one('hidden.bs.collapse', () => {
|
||||
|
|
@ -2065,7 +2148,7 @@
|
|||
let formData = $('#collapse2').find('input, select, textarea').serialize();
|
||||
formData += '&_token=' + $('meta[name="csrf-token"]').attr('content');
|
||||
|
||||
$.post("{{ route('mitigasi-form.store-part2') }}", formData)
|
||||
$.post("{{ route('modules.mitigasi-form.store-part2') }}", formData)
|
||||
.done(function(response) {
|
||||
if (response.success) {
|
||||
$('#collapse2').one('hidden.bs.collapse', () => {
|
||||
|
|
@ -2087,7 +2170,7 @@
|
|||
let formData = $('#collapse3').find('input, select, textarea').serialize();
|
||||
formData += '&_token=' + $('meta[name="csrf-token"]').attr('content');
|
||||
|
||||
$.post("{{ route('mitigasi-form.store-part3') }}", formData)
|
||||
$.post("{{ route('modules.mitigasi-form.store-part3') }}", formData)
|
||||
.done(function(response) {
|
||||
if (response.success) {
|
||||
$('#collapse3').one('hidden.bs.collapse', () => {
|
||||
|
|
@ -2115,7 +2198,7 @@
|
|||
|
||||
formData.append('_token', document.querySelector('meta[name="csrf-token"]').getAttribute('content'));
|
||||
|
||||
fetch("{{ route('mitigasi-form.store-part4') }}", {
|
||||
fetch("{{ route('modules.mitigasi-form.store-part4') }}", {
|
||||
method: 'POST',
|
||||
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
|
||||
body: formData.toString()
|
||||
|
|
@ -2142,7 +2225,7 @@
|
|||
let formData = $('#collapse5').find('input, select, textarea').serialize();
|
||||
formData += '&_token=' + $('meta[name="csrf-token"]').attr('content');
|
||||
|
||||
$.post("{{ route('mitigasi-form.store-part5') }}", formData)
|
||||
$.post("{{ route('modules.mitigasi-form.store-part5') }}", formData)
|
||||
.done(function(response) {
|
||||
if(response.success) {
|
||||
$('#collapse5').one('hidden.bs.collapse', () => {
|
||||
|
|
@ -2167,7 +2250,7 @@
|
|||
const formData = $('form').serialize();
|
||||
|
||||
$.ajax({
|
||||
url: "{{ route('mitigasi-form.store-final') }}",
|
||||
url: "{{ route('modules.mitigasi-form.store-final') }}",
|
||||
method: 'POST',
|
||||
data: formData,
|
||||
success: function(response) {
|
||||
|
|
|
|||
|
|
@ -66,10 +66,15 @@ Route::name('dashboard.')->prefix('dashboard')->group(function () {
|
|||
Route::get('/aksi', [DashboardMitigasiController::class, 'aksi'])
|
||||
->name('aksi')
|
||||
->middleware(['auth']);
|
||||
|
||||
Route::get('{id}/edit', [FormMitigasiController::class, 'edit'])->name('edit')->middleware(['auth']);
|
||||
Route::get('{id}/view', [FormMitigasiController::class, 'view'])->name('view')->middleware(['auth']);
|
||||
});
|
||||
Route::name('adaptasi.')->prefix('adaptasi')->group(function () {
|
||||
Route::resource('/',DashboardAdaptasiController::class);
|
||||
Route::get('/aksi', [DashboardAdaptasiController::class, 'aksi'])->name('aksi')->middleware(['auth']);
|
||||
Route::get('{id}/edit', [FormAdaptasiController::class, 'edit'])->name('edit')->middleware(['auth']);
|
||||
Route::get('{id}/view', [FormAdaptasiController::class, 'view'])->name('view')->middleware(['auth']);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
@ -97,10 +102,8 @@ Route::name('management.')->prefix('management')->group(function () {
|
|||
|
||||
});
|
||||
|
||||
Route::get('mitigasi/{id}/edit', [FormMitigasiController::class, 'edit'])->name('mitigasi.edit')->middleware(['auth']);
|
||||
Route::get('mitigasi/{id}/view', [FormMitigasiController::class, 'view'])->name('mitigasi.view')->middleware(['auth']);
|
||||
Route::get('adaptasi/{id}/edit', [FormAdaptasiController::class, 'edit'])->name('adaptasi.edit')->middleware(['auth']);
|
||||
Route::get('adaptasi/{id}/view', [FormAdaptasiController::class, 'view'])->name('adaptasi.view')->middleware(['auth']);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue