main
Ilham Wara Nugroho 2026-06-17 13:56:51 +07:00
parent 9ad887018b
commit 2de440e83e
1 changed files with 27 additions and 0 deletions

View File

@ -4,6 +4,33 @@
@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>