93 lines
4.6 KiB
PHP
93 lines
4.6 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
@include('layouts.shared/title-meta', ['title' => "History"])
|
|
@include('layouts.shared/head-css', ["mode" => $mode ?? '', "demo" => $demo ?? ''])
|
|
</head>
|
|
|
|
<body class="loading">
|
|
<div class="account-pages">
|
|
<div class="container">
|
|
|
|
<!-- start page title -->
|
|
<div class="row">
|
|
<div class="col-8 p-2">
|
|
<h4 class="page-title">{{$formname}}</h4>
|
|
</div>
|
|
<div class="col-4 p-2">
|
|
|
|
</div>
|
|
</div>
|
|
<!-- end page title -->
|
|
@if(session()->has('message'))
|
|
<div class="alert alert-success">
|
|
{{ session()->get('message') }}
|
|
</div>
|
|
@endif
|
|
@if(session()->has('error'))
|
|
<div class="alert alert-danger">
|
|
{{ session()->get('error') }}
|
|
</div>
|
|
@endif
|
|
<div class="row">
|
|
<div class="col-12 p-0">
|
|
<div class="card">
|
|
<div class="card-body">
|
|
<div class="responsive-table-plugin">
|
|
<div class="table-rep-plugin">
|
|
<div class="table-responsive" data-pattern="priority-columns">
|
|
<table id="tech-companies-1" class="table table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th data-priority="1">Submission Date</th>
|
|
<th data-priority="1" colspan="2">Submitted By</th>
|
|
@foreach($questions as $code => $question)
|
|
<th data-priority="1">{{$question->label}}</th>
|
|
@endforeach
|
|
<th data-priority="1">Action</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach($submissions as $submission)
|
|
<tr>
|
|
<th>{{date("M Y", strtotime(isset($submission->record_date) ? $submission->record_date : $submission->updatedAt))}}</th>
|
|
<th>
|
|
<img src="{{$submission->user_info->avatar}}" class="rounded-circle avatar-sm" />
|
|
</th>
|
|
<td>
|
|
<h5 class="m-0 fw-normal">{{$submission->user_info->name}}</h5>
|
|
<p class="mb-0 text-muted"><small>{{$submission->user_info->designation}}</small></p>
|
|
</td>
|
|
@foreach($questions as $code => $question)
|
|
@if(count((array)$question->options) > 0)
|
|
<td>{{ isset($submission->formdata->{$code}) && isset($question->options->{ $submission->formdata->{$code} }) ? $question->options->{ $submission->formdata->{$code} } : '' }}</td>
|
|
@else
|
|
<td>{{ $submission->formdata->{$code} }}</td>
|
|
@endif
|
|
@endforeach
|
|
<th>
|
|
@if( in_array('edit', $submission->actions) )
|
|
<a href="/form/edit?id={{$submission->id}}" class="btn btn-primary btn-xs">Edit</button>
|
|
@endif
|
|
</th>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</div> <!-- end .table-responsive -->
|
|
|
|
</div> <!-- end .table-rep-plugin-->
|
|
</div> <!-- end .responsive-table-plugin-->
|
|
|
|
</div> <!-- end card body-->
|
|
</div> <!-- end card -->
|
|
</div><!-- end col-->
|
|
</div>
|
|
<!-- end row-->
|
|
</div> <!-- container -->
|
|
|
|
</div>
|
|
<!-- end page -->
|
|
@include('layouts.shared/footer-script')
|
|
</body>
|
|
</html> |