progress dashboard + disabled search, perbaiki tampilan ui
@ -5,6 +5,7 @@ namespace App\Http\Controllers;
|
||||
use App\Models\AksesFile;
|
||||
use App\Models\DataUser;
|
||||
use App\Models\FileDirectory;
|
||||
use App\Models\MappingUnitKerjaPegawai;
|
||||
use App\Models\UnitKerja;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Http\Request;
|
||||
@ -40,6 +41,7 @@ class AksesFileController extends Controller
|
||||
try {
|
||||
$datas = request('data');
|
||||
foreach ($datas as $data) {
|
||||
$pegawai = MappingUnitKerjaPegawai::where(['objectpegawaifk'=> $data['pegawai_id'], 'statusenabled' => true])->first();
|
||||
$payload = [
|
||||
'pegawai_id' => $data['pegawai_id'],
|
||||
'pegawai_id_entry' => auth()->user()?->dataUser?->id,
|
||||
@ -50,7 +52,7 @@ class AksesFileController extends Controller
|
||||
$payload['all_akses'] = true;
|
||||
}else{
|
||||
$payload['all_akses'] = false;
|
||||
$payload['unit_akses'] = $data['unit_akses'];
|
||||
$payload['unit_akses'] = $pegawai->objectunitkerjapegawaifk ?? null;
|
||||
|
||||
}
|
||||
AksesFile::create($payload);
|
||||
@ -92,13 +94,14 @@ class AksesFileController extends Controller
|
||||
{
|
||||
try {
|
||||
$data = AksesFile::where('akses_file_id', $id)->first();
|
||||
$pegawai = MappingUnitKerjaPegawai::where(['objectpegawaifk' => request('pegawai_id'), 'statusenabled' => true])->first();
|
||||
$payload = [
|
||||
'pegawai_id' => request('pegawai_id'),
|
||||
'pegawai_id_modified' => auth()->user()?->dataUser?->id,
|
||||
'pegawai_nama_modified' => auth()->user()?->dataUser?->namalengkap,
|
||||
'modified_at' => Carbon::now()->format('Y-m-d H:i:s.u'),
|
||||
'all_akses' => request('akses') === "all" ? true : false,
|
||||
'unit_akses' => request('unit_akses')
|
||||
'unit_akses' => $pegawai?->objectunitkerjapegawaifk ?? null
|
||||
];
|
||||
$data->update($payload);
|
||||
|
||||
|
||||
@ -49,16 +49,15 @@ class DashboardController extends Controller
|
||||
|
||||
if($kategori && $filterUnit && $subUnit && $klasifikasi){
|
||||
$katArray = explode(',', $kategori);
|
||||
$unitArray = explode(',', $filterUnit);
|
||||
$subArray = explode(',', $subUnit);
|
||||
$klaArray = explode(',', $klasifikasi);
|
||||
$unitKerja = UnitKerja::where('statusenabled', true)
|
||||
->whereIn('id', $unitArray)
|
||||
->with(['subUnitKerja' => function ($query) use ($katArray, $unitArray, $subArray, $klaArray) {
|
||||
->where('id', $filterUnit)
|
||||
->with(['subUnitKerja' => function ($query) use ($katArray, $filterUnit, $subArray, $klaArray) {
|
||||
$query->whereIn('id', $subArray)
|
||||
->with(['fileDirectory' => function ($q) use ($katArray, $unitArray, $subArray, $klaArray) {
|
||||
$q->when(!empty($unitArray), function ($subQ) use ($unitArray) {
|
||||
$subQ->whereIn('id_unit_kerja', $unitArray);
|
||||
->with(['fileDirectory' => function ($q) use ($katArray, $filterUnit, $subArray, $klaArray) {
|
||||
$q->when($filterUnit, function ($subQ) use ($filterUnit) {
|
||||
$subQ->where('id_unit_kerja', $filterUnit);
|
||||
})->when(!empty($subArray), function ($subQ) use ($subArray) {
|
||||
$subQ->whereIn('id_sub_unit_kerja', $subArray);
|
||||
})->when(!empty($katArray), function ($subQ) use ($katArray) {
|
||||
@ -90,20 +89,25 @@ class DashboardController extends Controller
|
||||
$result = [];
|
||||
foreach($datas as $index => $value){
|
||||
$file = request()->file("data.$index.file");
|
||||
list($id_unit_kerja, $nama_unit_kerja) = explode('/', $value['id_unit_kerja'],2);
|
||||
list($id_sub_unit_kerja, $nama_sub_unit_kerja) = explode('/', $value['id_sub_unit_kerja'],2);
|
||||
list($master_kategori_directory_id, $nama_kategori) = explode('/', $value['master_kategori_directory_id'],2);
|
||||
list($klasifikasi, $nama_klasifikasi) = explode('/', $value['klasifikasi'],2);
|
||||
$payload = [
|
||||
'master_klasifikasi_directory_id' => $value['klasifikasi'],
|
||||
'id_unit_kerja' => $value['id_unit_kerja'],
|
||||
'id_sub_unit_kerja' => $value['id_sub_unit_kerja'],
|
||||
'master_kategori_directory_id' => $value['master_kategori_directory_id'],
|
||||
'master_klasifikasi_directory_id' => $klasifikasi,
|
||||
'id_unit_kerja' => $id_unit_kerja,
|
||||
'id_sub_unit_kerja' => $id_sub_unit_kerja,
|
||||
'master_kategori_directory_id' => $master_kategori_directory_id,
|
||||
'pegawai_id_entry' => auth()->user()->id ?? 1,
|
||||
'pegawai_nama_entry' => auth()->user()->namalengkap ?? 'tes',
|
||||
];
|
||||
if($file){
|
||||
$imageName = $file->getClientOriginalName();
|
||||
Storage::disk('file_directory')->put($imageName, file_get_contents($file));
|
||||
$payload['file'] =$imageName;
|
||||
$path = "{$nama_unit_kerja}/{$nama_sub_unit_kerja}/{$nama_kategori}/{$nama_klasifikasi}";
|
||||
$file->storeAs($path, $imageName, 'file_directory');
|
||||
$payload['file'] =$path .'/' .$imageName;
|
||||
}
|
||||
$saved = FileDirectory::create($payload);
|
||||
FileDirectory::create($payload);
|
||||
}
|
||||
DB::connection('dbDirectory')->commit();
|
||||
return response()->json([
|
||||
@ -130,7 +134,6 @@ class DashboardController extends Controller
|
||||
$aksesFile = AksesFile::where('pegawai_id', $authPegawai->id)
|
||||
->where('statusenabled', true)
|
||||
->first();
|
||||
|
||||
$query = UnitKerja::where('statusenabled', true);
|
||||
if($aksesFile){
|
||||
if($aksesFile->all_akses){
|
||||
@ -139,10 +142,15 @@ class DashboardController extends Controller
|
||||
$query->where('id', $aksesFile->unit_akses);
|
||||
}
|
||||
}else{
|
||||
$query->where('id', $authUnitKerja)
|
||||
$data= $query->where('id', $authUnitKerja)
|
||||
->with(['subUnitKerja' => function($query) use($authSubUnitKerja){
|
||||
$query->where('id', $authSubUnitKerja);
|
||||
}]);
|
||||
}])->select('id', 'name')->get();
|
||||
|
||||
return response()->json([
|
||||
'status' => true,
|
||||
'data' => $data
|
||||
], 200);
|
||||
}
|
||||
|
||||
$data = $query->when($q, function ($query, $q){
|
||||
@ -157,7 +165,25 @@ class DashboardController extends Controller
|
||||
|
||||
public function deleteFile(string $id){
|
||||
$data = FileDirectory::where('file_directory_id', $id)->first();
|
||||
$data->update(['statusenabled' => false]);
|
||||
if(!$data){
|
||||
return response()->json([
|
||||
'success' => false,
|
||||
'message' => 'File tidak ditemukan'
|
||||
]);
|
||||
}
|
||||
$oldPath= public_path('file/' . $data->file);
|
||||
$fileInfo = pathinfo($data->file);
|
||||
$newFileName = $fileInfo['filename'] . '_deleted.' . $fileInfo['extension'];
|
||||
$newPath = public_path('file/' . $fileInfo['dirname'] . '/' . $newFileName);
|
||||
if (file_exists($oldPath)) {
|
||||
// pastikan folder tujuan ada
|
||||
if (!is_dir(dirname($newPath))) {
|
||||
mkdir(dirname($newPath), 0777, true);
|
||||
}
|
||||
rename($oldPath, $newPath);
|
||||
}
|
||||
|
||||
$data->update(['statusenabled' => false, 'file' => $fileInfo['dirname'].'/'. $newFileName]);
|
||||
return response()->json([
|
||||
'success' => true,
|
||||
'message' => 'Berhasil menghapus data'
|
||||
|
||||
|
Before Width: | Height: | Size: 481 KiB |
|
Before Width: | Height: | Size: 1.4 MiB |
|
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.2 MiB |
|
Before Width: | Height: | Size: 69 KiB After Width: | Height: | Size: 69 KiB |
|
Before Width: | Height: | Size: 466 KiB After Width: | Height: | Size: 466 KiB |
|
Before Width: | Height: | Size: 168 KiB After Width: | Height: | Size: 168 KiB |
|
Before Width: | Height: | Size: 102 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 168 KiB |
|
Before Width: | Height: | Size: 131 KiB |
|
Before Width: | Height: | Size: 150 KiB |
|
Before Width: | Height: | Size: 83 KiB |
|
Before Width: | Height: | Size: 146 KiB |
|
Before Width: | Height: | Size: 171 KiB |
|
Before Width: | Height: | Size: 132 KiB |
|
Before Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 102 KiB |
|
Before Width: | Height: | Size: 102 KiB |
|
Before Width: | Height: | Size: 116 KiB |
|
Before Width: | Height: | Size: 112 KiB |
@ -104,37 +104,15 @@ function editAkses(e){
|
||||
new bootstrap.Modal(modalEdit).show();
|
||||
formEditAkses.attr('action', `/akses/${data.akses_file_id}`)
|
||||
$("#akses_id_edit").val(data.akses === 1 ? 'all' : 'unit')
|
||||
selectAksesEdit()
|
||||
|
||||
selectOptionPegawaiEdit()
|
||||
selectOptionUnitEdit()
|
||||
if (data.pegawai_id) {
|
||||
setOldSelect2Value('#pegawai_id_edit', data.pegawai_id, data.pegawai_nama);
|
||||
}
|
||||
|
||||
if (data.unit_id) {
|
||||
setOldSelect2Value('#unit_akses_edit', data.unit_id, data.unit_nama);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
document.addEventListener('change', function(e){
|
||||
e.preventDefault()
|
||||
if(e.target){
|
||||
selectAksesEdit()
|
||||
}
|
||||
})
|
||||
|
||||
function selectAksesEdit(){
|
||||
let aksesId = $(`#akses_id_edit`);
|
||||
let colUnit = $(`#col_select_unit_edit`)
|
||||
if(aksesId.val() === "all"){
|
||||
colUnit.addClass('d-none')
|
||||
}else{
|
||||
colUnit.removeClass('d-none')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function selectOptionPegawaiEdit() {
|
||||
let selectPegawai = $(`#pegawai_id_edit`);
|
||||
@ -165,48 +143,6 @@ function selectOptionPegawaiEdit() {
|
||||
});
|
||||
}
|
||||
|
||||
function selectOptionUnitEdit(oldId = null) {
|
||||
let selectUnit = $(`#unit_akses_edit`);
|
||||
// inisialisasi select2 untuk Unit Kerja
|
||||
selectUnit.select2({
|
||||
placeholder: '-- Pilih Unit --',
|
||||
allowClear:true,
|
||||
width: '100%',
|
||||
dropdownParent: selectUnit.parent(),
|
||||
ajax:{
|
||||
url : '/select-unit-kerja-option',
|
||||
dataType: 'json',
|
||||
delay: 250,
|
||||
data: function(params){
|
||||
return { q: params.term }
|
||||
},
|
||||
processResults: function(data){
|
||||
return {
|
||||
results : data?.data.map(item => ({
|
||||
id: item.id,
|
||||
text: item.name,
|
||||
}))
|
||||
}
|
||||
},
|
||||
cache: true,
|
||||
},
|
||||
minimumInputLength: 1,
|
||||
});
|
||||
|
||||
if (oldId) {
|
||||
$.ajax({
|
||||
url: '/select-unit-kerja',
|
||||
data: { id: oldId },
|
||||
dataType: 'json'
|
||||
}).then(function (data) {
|
||||
if (data?.data?.length) {
|
||||
let item = data.data[0];
|
||||
let option = new Option(item.name, item.id, true, true);
|
||||
selectUnit.append(option).trigger('change');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function setOldSelect2Value(selector, id, text) {
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
$(document).ready(function() {
|
||||
selectOptionPegawai(0)
|
||||
selectOptionUnit(0)
|
||||
});
|
||||
|
||||
function selectOptionPegawai(colCount) {
|
||||
@ -32,54 +31,6 @@ function selectOptionPegawai(colCount) {
|
||||
});
|
||||
}
|
||||
|
||||
function selectOptionUnit(colCount) {
|
||||
let selectUnit = $(`#unit_akses_${colCount}`);
|
||||
// inisialisasi select2 untuk Unit Kerja
|
||||
selectUnit.select2({
|
||||
placeholder: '-- Pilih Unit --',
|
||||
allowClear:true,
|
||||
width: '100%',
|
||||
dropdownParent: selectUnit.parent(),
|
||||
ajax:{
|
||||
url : '/select-unit-kerja-option',
|
||||
dataType: 'json',
|
||||
delay: 250,
|
||||
data: function(params){
|
||||
return { q: params.term }
|
||||
},
|
||||
processResults: function(data){
|
||||
return {
|
||||
results : data?.data.map(item => ({
|
||||
id: item.id,
|
||||
text: item.name,
|
||||
}))
|
||||
}
|
||||
},
|
||||
cache: true,
|
||||
},
|
||||
minimumInputLength: 1,
|
||||
});
|
||||
}
|
||||
|
||||
function selectAkses(colCount){
|
||||
let aksesId = $(`#akses_id_${colCount}`);
|
||||
let colUnit = $(`#col_select_unit_${colCount}`)
|
||||
if(aksesId.val() === "all"){
|
||||
colUnit.addClass('d-none')
|
||||
}else{
|
||||
colUnit.removeClass('d-none')
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
document.addEventListener('change', function(e){
|
||||
e.preventDefault()
|
||||
if(e.target && e.target.id.startsWith("akses_id")){
|
||||
let colCount = e.target.id.split("_")[2];
|
||||
selectAkses(colCount)
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
let colCount = 1;
|
||||
@ -96,7 +47,7 @@ function addForm(){
|
||||
<select class="form-control" name="data[${colCount}][pegawai_id]" id="pegawai_id_${colCount}" required>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-6 mb-2">
|
||||
<div class="col-md-4 mb-2">
|
||||
<label>Akses</label>
|
||||
<select class="form-control" name="data[${colCount}][akses]" id="akses_id_${colCount}" required>
|
||||
<option value="" disable>Select Choose</option>
|
||||
@ -104,12 +55,6 @@ function addForm(){
|
||||
<option value="unit">By Unit Akses</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-10 mb-2 d-none" id="col_select_unit_${colCount}">
|
||||
<label>Pilih Unit</label>
|
||||
<select class="form-control" name="data[${colCount}][unit_akses]" id="unit_akses_${colCount}">
|
||||
<option value="" disable>Select Choose</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<button type="button" class="btn btn-danger mt-3 me-2" onclick="removeCol(${colCount})"><i class="fa-solid fa-trash"></i></button>
|
||||
</div>
|
||||
@ -118,7 +63,6 @@ function addForm(){
|
||||
`
|
||||
col.append(html)
|
||||
selectOptionPegawai(colCount)
|
||||
selectOptionUnit(colCount)
|
||||
colCount++;
|
||||
|
||||
}
|
||||
|
||||
@ -1,31 +1,31 @@
|
||||
let colCount = 1;
|
||||
$(document).ready(function() {
|
||||
$('.unit_kerja').select2({
|
||||
placeholder: '-- Pilih Unit Kerja --',
|
||||
allowClear:true,
|
||||
width: '100%',
|
||||
ajax:{
|
||||
url : '/select-unit-kerja',
|
||||
dataType: 'json',
|
||||
delay: 250,
|
||||
data: function(params){
|
||||
return {
|
||||
q: params.term
|
||||
}
|
||||
},
|
||||
processResults: function(data){
|
||||
return {
|
||||
results : data?.data.map(item => ({
|
||||
$('.unit_kerja').select2({
|
||||
placeholder: '-- Pilih Unit Kerja --',
|
||||
allowClear:true,
|
||||
width: '100%',
|
||||
ajax:{
|
||||
url : '/select-unit-kerja',
|
||||
dataType: 'json',
|
||||
delay: 250,
|
||||
data: function(params){
|
||||
return {
|
||||
q: params.term
|
||||
}
|
||||
},
|
||||
processResults: function(data){
|
||||
let results = data?.data.map(item => ({
|
||||
id: item.id,
|
||||
text: item.name,
|
||||
sub_units: item?.sub_unit_kerja
|
||||
}))
|
||||
}
|
||||
}));
|
||||
|
||||
return {results}
|
||||
},
|
||||
cache: true,
|
||||
},
|
||||
cache: true,
|
||||
},
|
||||
minimumInputLength: 1,
|
||||
});
|
||||
minimumInputLength: 0,
|
||||
});
|
||||
|
||||
$('.sub_unit_kerja').select2({
|
||||
placeholder: '-- Pilih Sub Unit Kerja ',
|
||||
@ -77,7 +77,7 @@ function addForm(){
|
||||
<select class="form-control" name="data[${colCount}][master_kategori_directory_id]" id="select_kategori_${colCount}" required>
|
||||
<option value="" disable>Select Choose</option>
|
||||
${katDok.map(dok => `
|
||||
<option value="${dok?.master_kategori_directory_id}">${dok?.nama_kategori_directory}</option>
|
||||
<option value="${dok?.master_kategori_directory_id}/${dok?.nama_kategori_directory}">${dok?.nama_kategori_directory}</option>
|
||||
`).join('')}
|
||||
</select>
|
||||
</div>
|
||||
@ -90,7 +90,7 @@ function addForm(){
|
||||
<select class="form-select" name="data[${colCount}][klasifikasi]">
|
||||
<option value="" disable >Select Choose</option>
|
||||
${klasifikasiDok.map(kla => `
|
||||
<option value="${kla?.master_klasifikasi_directory_id}">${kla?.nama_klasifikasi_directory}</option>
|
||||
<option value="${kla?.master_klasifikasi_directory_id}/${kla?.nama_klasifikasi_directory}">${kla?.nama_klasifikasi_directory}</option>
|
||||
`).join('')}
|
||||
</select>
|
||||
</div>
|
||||
@ -135,7 +135,7 @@ function selectOptionUnitKerjaV1(colCount) {
|
||||
processResults: function(data){
|
||||
return {
|
||||
results : data?.data.map(item => ({
|
||||
id: item.id,
|
||||
id: item.id+'/'+item.name,
|
||||
text: item.name,
|
||||
sub_units: item.sub_unit_kerja // kirim ke front
|
||||
}))
|
||||
@ -160,7 +160,7 @@ function selectOptionUnitKerjaV1(colCount) {
|
||||
|
||||
if (data.sub_units && data.sub_units.length > 0) {
|
||||
data.sub_units.forEach(sub => {
|
||||
selectSubUnit.append(`<option value="${sub.id}">${sub.name}</option>`);
|
||||
selectSubUnit.append(`<option value="${sub.id}/${sub.name}">${sub.name}</option>`);
|
||||
});
|
||||
}
|
||||
|
||||
@ -185,7 +185,7 @@ function selectOptionUnitKerjaV2(colCount) {
|
||||
success: function(response) {
|
||||
if (response?.data) {
|
||||
response.data.forEach(unit => {
|
||||
const option = new Option(unit.name, unit.id, false, false);
|
||||
const option = new Option(unit.name, unit.id +'/'+unit.name, false, false);
|
||||
$(option).data('sub_units', unit.sub_unit_kerja); // simpan sub unit di data attribute
|
||||
selectUnit.append(option);
|
||||
});
|
||||
@ -217,7 +217,7 @@ function selectOptionUnitKerjaV2(colCount) {
|
||||
|
||||
if (subUnits.length > 0) {
|
||||
subUnits.forEach(sub => {
|
||||
selectSubUnit.append(`<option value="${sub.id}">${sub.name}</option>`);
|
||||
selectSubUnit.append(`<option value="${sub.id}/${sub.name}">${sub.name}</option>`);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@ -51,12 +51,11 @@ function renderTree(units, katDok) {
|
||||
`;
|
||||
}
|
||||
|
||||
function index(kategori_dok = [], unitKerja = [], subUnitKerja = [], klasifikasi_id = []) {
|
||||
function index(kategori_dok = [], unitKerja = null, subUnitKerja = [], klasifikasi_id = []) {
|
||||
const params = new URLSearchParams();
|
||||
console.log(kategori_dok, unitKerja, subUnitKerja);
|
||||
|
||||
if (kategori_dok.length) params.append("kategori", kategori_dok);
|
||||
if (unitKerja.length) params.append("unitKerja", unitKerja);
|
||||
if (unitKerja) params.append("unitKerja", unitKerja);
|
||||
if (subUnitKerja.length) params.append("subUnit", subUnitKerja);
|
||||
if (klasifikasi_id.length) params.append("klasifikasi", klasifikasi_id);
|
||||
|
||||
@ -100,7 +99,7 @@ function searchData(){
|
||||
let subUnitKerja = $("#sub_unit_kerja").val()
|
||||
if( klasifikasi_id.length === 0 ||
|
||||
kategori_dok.length === 0 ||
|
||||
unitKerja.length === 0 ||
|
||||
!unitKerja.length ||
|
||||
subUnitKerja.length === 0){
|
||||
Swal.fire({
|
||||
text: 'Lengkapi Isi form pencarian',
|
||||
|
||||
@ -27,12 +27,6 @@
|
||||
<option value="unit">By Unit Akses</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-12 mb-2 d-none" id="col_select_unit_0">
|
||||
<label>Pilih Unit</label>
|
||||
<select class="form-control" name="data[0][unit_akses]" id="unit_akses_0">
|
||||
<option value="" disable>Select Choose</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div id="col_add_akses"></div>
|
||||
<button type="button" class="btn btn-outline-primary btn-sm mt-2" onclick="addForm()">
|
||||
|
||||
@ -28,12 +28,6 @@
|
||||
<option value="unit">By Unit Akses</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-12 mb-2 d-none" id="col_select_unit_edit">
|
||||
<label>Pilih Unit</label>
|
||||
<select class="form-control" name="unit_akses" id="unit_akses_edit">
|
||||
<option value="" disable>Select Choose</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -60,12 +60,13 @@
|
||||
<div class="card-header d-flex justify-content-between align-items-center">
|
||||
<h4 class="mb-0">Data</h4>
|
||||
</div>
|
||||
{{-- @dd($allAkses) --}}
|
||||
<div class="card-body p-3">
|
||||
<div class="row mb-3 mt-3">
|
||||
<!-- Unit Kerja -->
|
||||
<div class="col-md-2">
|
||||
<label for="unit_kerja" class="form-label">Unit Kerja</label>
|
||||
<select class="form-control unit_kerja" id="unit_kerja" multiple="multiple">
|
||||
<select class="form-control unit_kerja" id="unit_kerja" @if(!$allAkses?->all_akses) disabled @endif>
|
||||
<option value="" disabled>Select Choose</option>
|
||||
</select>
|
||||
</div>
|
||||
@ -73,7 +74,7 @@
|
||||
<!-- Sub Unit Kerja -->
|
||||
<div class="col-md-2">
|
||||
<label for="sub_unit_kerja" class="form-label">Sub Unit Kerja</label>
|
||||
<select class="form-control sub_unit_kerja" id="sub_unit_kerja" multiple="multiple">
|
||||
<select class="form-control sub_unit_kerja" id="sub_unit_kerja" multiple="multiple" @if(!$allAkses?->all_akses && !$allAkses?->unit_akses) disabled @endif>
|
||||
<option value="" disabled>Select Choose</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
@ -31,22 +31,22 @@
|
||||
<select class="form-control" name="data[0][master_kategori_directory_id]" id="select_kategori_0" required>
|
||||
<option value="" disable>Select Choose</option>
|
||||
@foreach ($katDok as $kat)
|
||||
<option value="{{ $kat->master_kategori_directory_id }}">{{ $kat->nama_kategori_directory }}</option>
|
||||
<option value="{{ $kat->master_kategori_directory_id }}/{{ $kat->nama_kategori_directory }}">{{ $kat->nama_kategori_directory }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label>File</label>
|
||||
<input type="file" class="form-control" name="data[0][file]" placeholder="exp : Juknis" required>
|
||||
<input type="hidden" class="form-control" name="id_unit_kerja" id="id_unit_kerja" value="{{ $authUnitKerja }}" placeholder="exp : Juknis">
|
||||
<input type="hidden" class="form-control" name="id_sub_unit_kerja" id="id_sub_unit_kerja" placeholder="exp : Juknis" value="{{ $authSubUnitKerja }}">
|
||||
{{-- <input type="hidden" class="form-control" name="id_unit_kerja" id="id_unit_kerja" value="{{ $authUnitKerja }}" placeholder="exp : Juknis">
|
||||
<input type="hidden" class="form-control" name="id_sub_unit_kerja" id="id_sub_unit_kerja" placeholder="exp : Juknis" value="{{ $authSubUnitKerja }}"> --}}
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label>Klasifikasi File</label>
|
||||
<select class="form-select" name="data[0][klasifikasi]" required>
|
||||
<option value="" disable>Select Choose</option>
|
||||
@foreach ($klasifikasiDok as $klasifikasi)
|
||||
<option value="{{ $klasifikasi->master_klasifikasi_directory_id }}">{{ $klasifikasi->nama_klasifikasi_directory }}</option>
|
||||
<option value="{{ $klasifikasi->master_klasifikasi_directory_id }}/{{ $klasifikasi->nama_klasifikasi_directory }}">{{ $klasifikasi->nama_klasifikasi_directory }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
|
||||