@extends('layouts.app') @section('css') @endsection @section('content')
@php $date_format = config('constants.APP_DATE_FORMAT'); if (config('constants.APP_TIME_FORMAT') == '12') { $date_format .= ' h:i A'; } elseif (config('constants.APP_TIME_FORMAT') == '24') { $date_format .= ' H:i'; } else { $date_format = 'm/d/Y h:i A'; } @endphp
{{ $form->name }}
@php $is_enabled_sub_ref_no = false; if ( isset($form->schema['settings']['form_submision_ref']['is_enabled']) && $form->schema['settings']['form_submision_ref']['is_enabled'] ) { $is_enabled_sub_ref_no = true; } @endphp
@if (!empty($form->schema)) @php $schema = $form->schema['form']; $col_visible = $form['schema']['settings']['form_data']['col_visible']; $btn_enabled = $form['schema']['settings']['form_data']['btn_enabled']; @endphp @if (auth()->user()->hasRole([\App\Enums\User\RoleEnum::SUPERVISOR->value, \App\Enums\User\RoleEnum::ADMIN->value], 'web')) @endif @if ($is_enabled_sub_ref_no) @endif @foreach ($schema as $element) @if (in_array($element['name'], $col_visible)) @endif @endforeach @foreach ($data as $k => $row) @if (auth()->user()->hasRole([\App\Enums\User\RoleEnum::SUPERVISOR->value, \App\Enums\User\RoleEnum::ADMIN->value], 'web')) @endif @if ($is_enabled_sub_ref_no) @endif @foreach ($schema as $row_element) @if (in_array($row_element['name'], $col_visible)) @endif @endforeach @endforeach
@lang('messages.action')@lang('messages.submission_numbering')@lang('messages.username') {{-- $element['label'] --}} @if (in_array(session()->get('locale'), ['ru', 'est']) && isset($element['label_' . session()->get('locale')])) {{ $element['label_' . session()->get('locale')] }} @else {{ $element['label'] }} @endif @lang('messages.submitted_on')
@if (in_array('view', $btn_enabled)) @endif @if (in_array('delete', $btn_enabled)) @endif @php $form_id = !empty($form->slug) ? $form->slug : $form->id; @endphp @lang('messages.edit') {{ $row['submission_ref'] }} {{ $row->submittedBy?->name }} @isset($row->data[$row_element['name']]) @if ($row_element['type'] == 'file_upload') @include('form_data.file_view', [ 'form_upload' => $row->data[$row_element['name']], ]) @elseif($row_element['type'] == 'signature') @if (!empty($row->data[$row_element['name']])) @endif @elseif(is_array($row->data[$row_element['name']]) && $row_element['type'] != 'file_upload') {{ implode(', ', $row->data[$row_element['name']]) }} @else {!! nl2br($row->data[$row_element['name']]) !!} @endif @endisset {{ \Carbon\Carbon::createFromTimestamp(strtotime($row->updated_at))->format($date_format) }}
{{ $row->updated_at->diffForHumans() }}
@else

Form Not found

@endif
@endsection @section('footer') @endsection