Changes
Specific Folder FTP Upload / ftp-deploy (push) Successful in 1m50s Details

This commit is contained in:
Ravi Gulhane 2026-11-27 15:10:05 +05:30
parent 68adc6b043
commit f3f2fe0b8d
2 changed files with 0 additions and 75 deletions

View File

@ -185,35 +185,6 @@ class FormController extends Controller
$data['submissions'] = $submissions;
}
$doctorSurveyId = '1790230856-a5ff58a6-d509-4ac0-9b18-6d366a74965e';
$chemistSurveyId = '1790230856-704c97b6-61f7-4eda-901a-2cb4ff6f293d';
if (in_array($formdata->form_id, [$doctorSurveyId, $chemistSurveyId], true)) {
$loadSurveyHistory = function ($id) use ($formdata) {
$history = LambdaRequest::postrequest('form', 'formentity/getformhistory', [
'form_id' => $id,
'user_id' => $formdata->user_id,
'partition' => $formdata->partition,
'limit' => 10000,
]);
$submissions = (isset($history->data) && isset($history->data->submissions)) ? $history->data->submissions : [];
if (is_object($submissions)) {
$submissions = array_values((array) $submissions);
}
return [
'questions' => (isset($history->data) && isset($history->data->questions)) ? $history->data->questions : [],
'submissions' => is_array($submissions) ? $submissions : [],
];
};
$doctorRows = $loadSurveyHistory($doctorSurveyId);
$chemistRows = $loadSurveyHistory($chemistSurveyId);
$data['doctor_form_id'] = $doctorSurveyId;
$data['chemist_form_id'] = $chemistSurveyId;
$data['doctor_questions'] = $doctorRows['questions'];
$data['doctor_submissions'] = $doctorRows['submissions'];
$data['chemist_questions'] = $chemistRows['questions'];
$data['chemist_submissions'] = $chemistRows['submissions'];
}
// if ($formdata->form_id == '1731413373-65062594-7136-45b2-a846-b34be9afe3b9') {
// // For debug: print $data
// echo '<pre>' . print_r($data, true) . '</pre>'; exit;

View File

@ -20,8 +20,6 @@
.table.rcpa-doctors > :not(caption) > * > *:last-child { width: 25%; }
.rcpa-doctors .form-control { font-size: 16px; min-width: 0; padding: 0.2rem 0.3rem; }
.survey-section.locked .section-body { display: none; }
.survey-entries .table { margin-bottom: 0; }
.survey-entries th, .survey-entries td { white-space: nowrap; }
#pageloader {
display: none;
position: fixed;
@ -74,50 +72,6 @@
</div>
</div>
</div>
@if(!empty($doctor_form_id) && !empty($chemist_form_id))
@foreach([
['title' => 'Doctor Survey', 'form_id' => $doctor_form_id, 'name' => 'doctor_name', 'submissions' => $doctor_submissions ?? []],
['title' => 'Chemist Survey', 'form_id' => $chemist_form_id, 'name' => 'chemist_name', 'submissions' => $chemist_submissions ?? []],
] as $section)
<div class="row justify-content-center">
<div class="col-md-8 col-lg-6 col-xl-5 p-0">
<div class="card survey-entries mt-2">
<div class="card-body p-3">
<h5 class="mb-2">{{ $section['title'] }}</h5>
<div class="table-responsive">
<table class="table table-striped table-sm">
<thead>
<tr>
<th>Submission Date</th>
<th>Name</th>
<th>Workflow Status</th>
<th>Action</th>
</tr>
</thead>
<tbody>
@forelse($section['submissions'] as $submission)
<tr>
<td>{{ date('d M Y', strtotime($submission->updatedAt ?? $submission->createdAt)) }}</td>
<td>{{ $submission->formdata->{$section['name']} ?? '' }}</td>
<td>{{ $submission->workflow_status ?? '' }}</td>
<td>
<a href="/form/show?form_id={{ $section['form_id'] }}&id={{ $submission->id }}" class="btn btn-primary btn-xs">Edit</a>
</td>
</tr>
@empty
<tr>
<td colspan="4">No submissions</td>
</tr>
@endforelse
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
@endforeach
@endif
</div>
</div>
</div>