update
parent
b64a56d2d1
commit
92ef78e1a8
|
|
@ -2,7 +2,54 @@
|
|||
|
||||
@section('title', $form->name)
|
||||
|
||||
@section('content')
|
||||
@php
|
||||
$user = Auth::user();
|
||||
$scope = $user->getScope();
|
||||
|
||||
$inventoryYear = request('inventoryYear') ?? date('Y');
|
||||
$instansi = request('instansi') ?? null;
|
||||
|
||||
if ($agencies->count() === 1 && $scope === \App\Enums\LingkupAksesData::INTERNAL->value) {
|
||||
$instansi = $agencies[0]->name;
|
||||
}
|
||||
|
||||
$param = [
|
||||
'sector' => $form->sector,
|
||||
'code' => $form->code,
|
||||
'inventoryYear' => $inventoryYear,
|
||||
'instansi' => $instansi,
|
||||
];
|
||||
|
||||
$routeImport = route('modules.form.import', $param);
|
||||
$routeExport = route('modules.form.export', $param);
|
||||
$routeExportTemplate = route('modules.form.export', array_merge($param, ['isTemplate' => true]));
|
||||
$routeApproval = route('modules.form.approval', $param);
|
||||
|
||||
$internal = $internal ?? null;
|
||||
$limitInternal = ($internal !== null) && !$agencies->isNotEmpty();
|
||||
@endphp
|
||||
|
||||
<div class="card shadow-sm" data-sector="{{ $form->sector }}" data-code="{{ $form->code }}">
|
||||
<div class="card-header d-flex justify-content-between align-items-center">
|
||||
<h5 class="mb-0 font-weight-bold">{{ $form->name }}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
@include('modules.form.action')
|
||||
@include('modules.form.table')
|
||||
{{-- @include('modules.form.copy') --}}
|
||||
</div>
|
||||
</div>
|
||||
@include('modules.form.import')
|
||||
|
||||
@if ($instansi !== 'all')
|
||||
@include('modules.form.aktivitas-user')
|
||||
@include('modules.form.metadata.index')
|
||||
@endif
|
||||
|
||||
{{-- @include('modules.form.form') --}}
|
||||
@endsection
|
||||
|
||||
@section('js')
|
||||
<script>
|
||||
|
|
|
|||
Loading…
Reference in New Issue