63 lines
1.9 KiB
PHP
63 lines
1.9 KiB
PHP
@extends('layouts.master')
|
|
|
|
@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('form.import', $param);
|
|
$routeExport = route('form.export', $param);
|
|
$routeExportTemplate = route('form.export', array_merge($param, ['isTemplate' => true]));
|
|
$routeApproval = route('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">
|
|
@if ($errors->has('error'))
|
|
<div class="alert alert-danger">
|
|
{{ $errors->first('error') }}
|
|
</div>
|
|
@endif
|
|
|
|
@if (session('success'))
|
|
<div class="alert alert-success">
|
|
{{ session('success') }}
|
|
</div>
|
|
@endif
|
|
|
|
@include('form.action')
|
|
@include('form.table')
|
|
{{-- @include('form.copy') --}}
|
|
</div>
|
|
</div>
|
|
@include('form.import')
|
|
@if ($instansi !== 'all')
|
|
@include('form.aktivitas-user')
|
|
@include('form.metadata.index')
|
|
@endif
|
|
@endsection
|
|
|
|
@include('form.scripts')
|