update tampilan team activity
This commit is contained in:
@@ -222,7 +222,7 @@ class PenilaianController extends Controller
|
|||||||
});
|
});
|
||||||
})->unique('id');
|
})->unique('id');
|
||||||
|
|
||||||
$existingTeamIds = $teamPenilai->pluck('id')->toArray();
|
$existingTeamIds = $userTeam->pluck('id')->toArray();
|
||||||
|
|
||||||
$updateTeamPenilai = Teams::with(['regions', 'teamsUsers', 'teamsUsers.user'])
|
$updateTeamPenilai = Teams::with(['regions', 'teamsUsers', 'teamsUsers.user'])
|
||||||
->whereNotIn('id', $existingTeamIds)
|
->whereNotIn('id', $existingTeamIds)
|
||||||
@@ -232,23 +232,14 @@ class PenilaianController extends Controller
|
|||||||
foreach ($userTeam as $item) {
|
foreach ($userTeam as $item) {
|
||||||
$regionName = $item->regions;
|
$regionName = $item->regions;
|
||||||
}
|
}
|
||||||
// $regionName = $userTeam->first()?->regions->name;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$penilaian = Penilaian::where('nomor_registrasi', $permohonan->nomor_registrasi)->first();
|
$penilaian = Penilaian::where('nomor_registrasi', $permohonan->nomor_registrasi)->first();
|
||||||
|
|
||||||
|
|
||||||
$penilaianTeam = collect();
|
$penilaianTeam = collect();
|
||||||
if ($penilaian && $penilaian->id) {
|
if ($penilaian && $penilaian->id) {
|
||||||
$penilaianTeam = PenilaianTeam::where('penilaian_id', $penilaian->id)->get();
|
$penilaianTeam = PenilaianTeam::where('penilaian_id', $penilaian->id)->get();
|
||||||
}
|
}
|
||||||
|
|
||||||
// return response()->json([
|
|
||||||
// 'penilaianTeam' => $penilaianTeam
|
|
||||||
// ]);
|
|
||||||
|
|
||||||
|
|
||||||
return view('lpj::penilaian.form', compact('permohonan', 'teamPenilai', 'jenisPenilaian', 'penilaian', 'regionName', 'updateTeamPenilai', 'penilaianTeam'));
|
return view('lpj::penilaian.form', compact('permohonan', 'teamPenilai', 'jenisPenilaian', 'penilaian', 'regionName', 'updateTeamPenilai', 'penilaianTeam'));
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ use Modules\Lpj\Models\SpekKategoritBangunan;
|
|||||||
use Modules\Lpj\Models\SaranaPelengkap;
|
use Modules\Lpj\Models\SaranaPelengkap;
|
||||||
use Modules\Lpj\Models\ArahMataAngin;
|
use Modules\Lpj\Models\ArahMataAngin;
|
||||||
use Modules\Lpj\Models\Analisa;
|
use Modules\Lpj\Models\Analisa;
|
||||||
|
use Modules\Lpj\Models\PerkerasanJalan;
|
||||||
use Modules\Lpj\Models\AnalisaFakta;
|
use Modules\Lpj\Models\AnalisaFakta;
|
||||||
use Modules\Lpj\Models\AnalisaLingkungan;
|
use Modules\Lpj\Models\AnalisaLingkungan;
|
||||||
use Modules\Lpj\Models\AnalisaTanahBagunan;
|
use Modules\Lpj\Models\AnalisaTanahBagunan;
|
||||||
@@ -591,6 +592,7 @@ class SurveyorController extends Controller
|
|||||||
$golMasySekitar = GolonganMasySekitar::all();
|
$golMasySekitar = GolonganMasySekitar::all();
|
||||||
$tingkatKeramaian = TingkatKeramaian::all();
|
$tingkatKeramaian = TingkatKeramaian::all();
|
||||||
$laluLintasLokasi = LaluLintasLokasi::all();
|
$laluLintasLokasi = LaluLintasLokasi::all();
|
||||||
|
$perkerasanJalan = PerkerasanJalan::all();
|
||||||
|
|
||||||
|
|
||||||
$analisa = Analisa::with('analisaTanahBangunan', 'analisaLingkungan', 'analisaFakta', 'jenisJaminan')
|
$analisa = Analisa::with('analisaTanahBangunan', 'analisaLingkungan', 'analisaFakta', 'jenisJaminan')
|
||||||
@@ -598,6 +600,7 @@ class SurveyorController extends Controller
|
|||||||
->where('jenis_jaminan_id', $jaminanId)
|
->where('jenis_jaminan_id', $jaminanId)
|
||||||
->first();
|
->first();
|
||||||
|
|
||||||
|
// return response()->json($permohonan);
|
||||||
|
|
||||||
|
|
||||||
return view('lpj::surveyor.components.inspeksi', compact(
|
return view('lpj::surveyor.components.inspeksi', compact(
|
||||||
@@ -622,7 +625,8 @@ class SurveyorController extends Controller
|
|||||||
'viewUnit',
|
'viewUnit',
|
||||||
'golMasySekitar',
|
'golMasySekitar',
|
||||||
'tingkatKeramaian',
|
'tingkatKeramaian',
|
||||||
'laluLintasLokasi'
|
'laluLintasLokasi',
|
||||||
|
'perkerasanJalan'
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -714,26 +718,26 @@ class SurveyorController extends Controller
|
|||||||
try {
|
try {
|
||||||
$type = $request->route('type');
|
$type = $request->route('type');
|
||||||
|
|
||||||
$modelClass = $this->getModelClass($type);
|
$modelClass = $this->getModelClass($type);
|
||||||
|
|
||||||
|
if (!$modelClass) {
|
||||||
|
return redirect()
|
||||||
|
->route('basicdata.'. $type .'.index')
|
||||||
|
->with('error', 'Invalid type specified.');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($type == 'spek-bangunan') {
|
||||||
|
$validate['spek_kategori_bagunan_id'] = $request->spek_kategori_bagunan_id;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$data = array_merge($validate, ['status' => true]);
|
||||||
|
$modelClass::create($data);
|
||||||
|
|
||||||
if (!$modelClass) {
|
|
||||||
return redirect()
|
return redirect()
|
||||||
->route('basicdata.'. $type .'.index')
|
->route('basicdata.' . $type .'.index')
|
||||||
->with('error', 'Invalid type specified.');
|
->with('success', 'created successfully');
|
||||||
}
|
|
||||||
|
|
||||||
if ($type == 'spek-bangunan') {
|
|
||||||
$validate['spek_kategori_bagunan_id'] = $request->spek_kategori_bagunan_id;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$data = array_merge($validate, ['status' => true]);
|
|
||||||
$modelClass::create($data);
|
|
||||||
|
|
||||||
return redirect()
|
|
||||||
->route('basicdata.' . $type .'.index')
|
|
||||||
->with('success', 'created successfully');
|
|
||||||
|
|
||||||
} catch (Exeception $e) {
|
} catch (Exeception $e) {
|
||||||
|
|
||||||
@@ -842,6 +846,7 @@ class SurveyorController extends Controller
|
|||||||
'Golongan Masyarakat Sekitar' => GolonganMasySekitar::class,
|
'Golongan Masyarakat Sekitar' => GolonganMasySekitar::class,
|
||||||
'Lantai Unit' => Lantai::class,
|
'Lantai Unit' => Lantai::class,
|
||||||
'View Unit' => ViewUnit::class,
|
'View Unit' => ViewUnit::class,
|
||||||
|
'Perkerasan jalan' => PerkerasanJalan::class
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
@@ -961,7 +966,8 @@ class SurveyorController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function validateSubmit(){
|
public function validateSubmit()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1039,6 +1045,7 @@ class SurveyorController extends Controller
|
|||||||
'spek-bangunan' => ['Spek Bangunan', 'spek-bangunan'],
|
'spek-bangunan' => ['Spek Bangunan', 'spek-bangunan'],
|
||||||
'lantai-unit' => ['Lantai Unit', 'lantai-unit'],
|
'lantai-unit' => ['Lantai Unit', 'lantai-unit'],
|
||||||
'view-unit' => ['View Unit', 'view-unit'],
|
'view-unit' => ['View Unit', 'view-unit'],
|
||||||
|
'perkerasan-jalan' => ['Perkerasan jalan', 'perkerasan-jalan']
|
||||||
];
|
];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ class PerkerasanJalan extends Model
|
|||||||
{
|
{
|
||||||
use HasFactory;
|
use HasFactory;
|
||||||
|
|
||||||
|
protected $table = 'perkerasan_jalan';
|
||||||
/**
|
/**
|
||||||
* The attributes that are mass assignable.
|
* The attributes that are mass assignable.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -33,6 +33,11 @@
|
|||||||
.dropdowns-content a:hover {
|
.dropdowns-content a:hover {
|
||||||
background-color: #f1f1f1;
|
background-color: #f1f1f1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.break-words {
|
||||||
|
word-break: break-word;
|
||||||
|
white-space: normal;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@endpush
|
@endpush
|
||||||
|
|
||||||
@@ -46,7 +51,6 @@
|
|||||||
@php
|
@php
|
||||||
|
|
||||||
$sortedTeamsActivity = $teamsActivity->sortBy(function ($item) {
|
$sortedTeamsActivity = $teamsActivity->sortBy(function ($item) {
|
||||||
|
|
||||||
return $item->team->penilaianTeam
|
return $item->team->penilaianTeam
|
||||||
->filter(function ($penilaianTeam) use ($item) {
|
->filter(function ($penilaianTeam) use ($item) {
|
||||||
return $penilaianTeam->user_id == $item->user->id;
|
return $penilaianTeam->user_id == $item->user->id;
|
||||||
@@ -64,8 +68,9 @@
|
|||||||
style="margin-start: 10px">
|
style="margin-start: 10px">
|
||||||
<table class="table table-auto align-middle text-gray-700 font-medium text-sm">
|
<table class="table table-auto align-middle text-gray-700 font-medium text-sm">
|
||||||
<tr>
|
<tr>
|
||||||
<th class="min-w-[150px]">
|
<th class="min-w-[150px]" style="width: 600px">
|
||||||
<span class="text-base text-gray-900 font-normal">{{ $item->user->name }}</span>
|
<span
|
||||||
|
class="text-base text-gray-900 font-normal break-words">{{ $item->user->name }} Lorem, ipsum dolor sit amet consectetur</span>
|
||||||
</th>
|
</th>
|
||||||
<th class="min-w-[150px]">
|
<th class="min-w-[150px]">
|
||||||
<span class="text-base text-gray-900 font-normal">
|
<span class="text-base text-gray-900 font-normal">
|
||||||
@@ -86,13 +91,14 @@
|
|||||||
class="ki-outline ki-minus text-gray-600 text-2sm accordion-active:block hidden"></i>
|
class="ki-outline ki-minus text-gray-600 text-2sm accordion-active:block hidden"></i>
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
</button>
|
</button>
|
||||||
<div class="accordion-content hidden" id="accordion_{{ $index }}content_{{ $index }}">
|
<div class="accordion-content hidden" id="accordion_{{ $index }}content_{{ $index }}">
|
||||||
<div class="mx-8 pb-4" style="margin-bottom: 20px">
|
<div class="mx-8 pb-4" style="margin-bottom: 20px">
|
||||||
<div class="card card-grid min-w-full" data-datatable="false"
|
<div class="card card-grid min-w-full" data-datatable="false"
|
||||||
id="activity-table-{{ $index }}"
|
id="activity-table-{{ $index }}"
|
||||||
data-api-url="{{ route('activity.progres.datatables', ['id' => $item->user->id ]) }}">
|
data-api-url="{{ route('activity.progres.datatables', ['id' => $item->user->id]) }}">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="scrollable-x-auto">
|
<div class="scrollable-x-auto">
|
||||||
<table
|
<table
|
||||||
@@ -176,7 +182,8 @@
|
|||||||
},
|
},
|
||||||
jenis_asset: {
|
jenis_asset: {
|
||||||
title: 'Jenis Asset',
|
title: 'Jenis Asset',
|
||||||
render: (item, data) => `${data.permohonan.debiture.documents.map(d => d.jenis_jaminan.name) || ''}`,
|
render: (item, data) =>
|
||||||
|
`${data.permohonan.debiture.documents.map(d => d.jenis_jaminan.name) || ''}`,
|
||||||
},
|
},
|
||||||
jenis_report: {
|
jenis_report: {
|
||||||
title: 'Jenis Report',
|
title: 'Jenis Report',
|
||||||
|
|||||||
@@ -210,11 +210,6 @@
|
|||||||
@enderror
|
@enderror
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{-- @php
|
|
||||||
var_dump($penilaianTeam);
|
|
||||||
@endphp --}}
|
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 {{ $penilaianTeam->isEmpty() ? '' : 'hidden' }}">
|
class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 {{ $penilaianTeam->isEmpty() ? '' : 'hidden' }}">
|
||||||
<label class="form-label max-w-56">
|
<label class="form-label max-w-56">
|
||||||
@@ -264,8 +259,7 @@
|
|||||||
|
|
||||||
@if (
|
@if (
|
||||||
$penilaianTeam->isNotEmpty() &&
|
$penilaianTeam->isNotEmpty() &&
|
||||||
$penilaianTeam->contains(fn($item) => $item->role == 'surveyor' && is_null($item->user_id))
|
$penilaianTeam->contains(fn($item) => $item->role == 'surveyor' && is_null($item->user_id)))
|
||||||
)
|
|
||||||
<div id="surveyorId" class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
<div id="surveyorId" class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
<label class="form-label max-w-56">
|
<label class="form-label max-w-56">
|
||||||
Surveyor yang di tunjuk
|
Surveyor yang di tunjuk
|
||||||
@@ -305,7 +299,7 @@
|
|||||||
@endforeach
|
@endforeach
|
||||||
|
|
||||||
@if ($penilaianTeam->isEmpty())
|
@if ($penilaianTeam->isEmpty())
|
||||||
<option value="pilih_dari_region">pilih dari region berdeda
|
<option value="pilih_dari_region">Pilih Surveyor Dari Region
|
||||||
</option>
|
</option>
|
||||||
@endif
|
@endif
|
||||||
</select>
|
</select>
|
||||||
@@ -344,10 +338,8 @@
|
|||||||
|
|
||||||
|
|
||||||
@if (
|
@if (
|
||||||
$penilaianTeam->isNotEmpty() &&
|
$penilaianTeam->isNotEmpty() &&
|
||||||
$penilaianTeam->contains(fn($item) => $item->role == 'penilai' && is_null($item->user_id))
|
$penilaianTeam->contains(fn($item) => $item->role == 'penilai' && is_null($item->user_id)))
|
||||||
)
|
|
||||||
|
|
||||||
<div id="penilaiId" class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
<div id="penilaiId" class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
<label class="form-label max-w-56">
|
<label class="form-label max-w-56">
|
||||||
Penilai yang di tunjuk
|
Penilai yang di tunjuk
|
||||||
@@ -371,7 +363,7 @@
|
|||||||
@enderror
|
@enderror
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@elseif($penilaianTeam->isEmpty())
|
@elseif($penilaianTeam->isEmpty())
|
||||||
<div id="penilaiId" class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
<div id="penilaiId" class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
<label class="form-label max-w-56">
|
<label class="form-label max-w-56">
|
||||||
Penilai yang di tunjuk
|
Penilai yang di tunjuk
|
||||||
@@ -385,7 +377,7 @@
|
|||||||
<option value="{{ $item->id }}">{{ $item->name }}</option>
|
<option value="{{ $item->id }}">{{ $item->name }}</option>
|
||||||
@endforeach
|
@endforeach
|
||||||
@if ($penilaianTeam->isEmpty())
|
@if ($penilaianTeam->isEmpty())
|
||||||
<option value="pilih_dari_region">pilih dari region berdeda
|
<option value="pilih_dari_region">Pilih Penilai Dari Region
|
||||||
</option>
|
</option>
|
||||||
@endif
|
@endif
|
||||||
</select>
|
</select>
|
||||||
@@ -437,6 +429,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
<label class="form-label max-w-56">
|
<label class="form-label max-w-56">
|
||||||
Catatan
|
Catatan
|
||||||
@@ -566,12 +559,6 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
document.addEventListener('DOMContentLoaded', function() {
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
const revisiForm = document.getElementById('revisiForm');
|
const revisiForm = document.getElementById('revisiForm');
|
||||||
const btnSubmit = document.getElementById('btnSubmit');
|
const btnSubmit = document.getElementById('btnSubmit');
|
||||||
@@ -613,4 +600,9 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
</script>
|
||||||
@endpush
|
@endpush
|
||||||
|
|||||||
Reference in New Issue
Block a user