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

This commit is contained in:
Ravi Gulhane 2026-10-27 12:37:20 +05:30
parent b56c9a5423
commit cc0b8144d3
3 changed files with 74 additions and 41 deletions

View File

@ -1,39 +0,0 @@
@php
$byCode = [];
foreach ($questions ?? [] as $question) {
if (isset($question->code)) {
$byCode[$question->code] = $question;
}
}
$submitted = $submitted_formdata ?? null;
$val = function ($code) use ($byCode, $submitted) {
if (is_object($submitted) && isset($submitted->{$code}) && $submitted->{$code} !== '' && $submitted->{$code} !== null) {
return $submitted->{$code};
}
if (is_array($submitted) && isset($submitted[$code]) && $submitted[$code] !== '' && $submitted[$code] !== null) {
return $submitted[$code];
}
if (isset($byCode[$code]->value) && $byCode[$code]->value !== '' && $byCode[$code]->value !== null) {
return $byCode[$code]->value;
}
return '';
};
$show = function ($code) use ($val) {
$value = $val($code);
return $value !== '' && $value !== null ? $value : '—';
};
$fileUrl = function ($url) {
$url = trim((string) $url);
if ($url === '') {
return '';
}
if (!preg_match('#^https?://#i', $url)) {
return rtrim((string) env('AWS_URL'), '/') . '/' . ltrim($url, '/');
}
return $url;
};
$isImageUrl = function ($url) {
$ext = strtolower(pathinfo((string) parse_url($url, PHP_URL_PATH), PATHINFO_EXTENSION));
return in_array($ext, ['jpg', 'jpeg', 'png', 'gif', 'webp'], true);
};
@endphp

View File

@ -6,8 +6,44 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
</head>
<body class="preview-approval-body">
@include('form.rapport-team3.partials.survey-preview-helpers')
@php
$byCode = [];
foreach ($questions ?? [] as $question) {
if (isset($question->code)) {
$byCode[$question->code] = $question;
}
}
$submitted = $submitted_formdata ?? null;
$val = function ($code) use ($byCode, $submitted) {
if (is_object($submitted) && isset($submitted->{$code}) && $submitted->{$code} !== '' && $submitted->{$code} !== null) {
return $submitted->{$code};
}
if (is_array($submitted) && isset($submitted[$code]) && $submitted[$code] !== '' && $submitted[$code] !== null) {
return $submitted[$code];
}
if (isset($byCode[$code]->value) && $byCode[$code]->value !== '' && $byCode[$code]->value !== null) {
return $byCode[$code]->value;
}
return '';
};
$show = function ($code) use ($val) {
$value = $val($code);
return $value !== '' && $value !== null ? $value : '—';
};
$fileUrl = function ($url) {
$url = trim((string) $url);
if ($url === '') {
return '';
}
if (!preg_match('#^https?://#i', $url)) {
return rtrim((string) env('AWS_URL'), '/') . '/' . ltrim($url, '/');
}
return $url;
};
$isImageUrl = function ($url) {
$ext = strtolower(pathinfo((string) parse_url($url, PHP_URL_PATH), PATHINFO_EXTENSION));
return in_array($ext, ['jpg', 'jpeg', 'png', 'gif', 'webp'], true);
};
$products = [
'Asthalin Inhaler' => 'asthalin_inhaler',
'Asthalin Rotacap' => 'asthalin_rotacap',

View File

@ -6,8 +6,44 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
</head>
<body class="preview-approval-body">
@include('form.rapport-team3.partials.survey-preview-helpers')
@php
$byCode = [];
foreach ($questions ?? [] as $question) {
if (isset($question->code)) {
$byCode[$question->code] = $question;
}
}
$submitted = $submitted_formdata ?? null;
$val = function ($code) use ($byCode, $submitted) {
if (is_object($submitted) && isset($submitted->{$code}) && $submitted->{$code} !== '' && $submitted->{$code} !== null) {
return $submitted->{$code};
}
if (is_array($submitted) && isset($submitted[$code]) && $submitted[$code] !== '' && $submitted[$code] !== null) {
return $submitted[$code];
}
if (isset($byCode[$code]->value) && $byCode[$code]->value !== '' && $byCode[$code]->value !== null) {
return $byCode[$code]->value;
}
return '';
};
$show = function ($code) use ($val) {
$value = $val($code);
return $value !== '' && $value !== null ? $value : '—';
};
$fileUrl = function ($url) {
$url = trim((string) $url);
if ($url === '') {
return '';
}
if (!preg_match('#^https?://#i', $url)) {
return rtrim((string) env('AWS_URL'), '/') . '/' . ltrim($url, '/');
}
return $url;
};
$isImageUrl = function ($url) {
$ext = strtolower(pathinfo((string) parse_url($url, PHP_URL_PATH), PATHINFO_EXTENSION));
return in_array($ext, ['jpg', 'jpeg', 'png', 'gif', 'webp'], true);
};
$products = [
'Asthalin Inhaler' => 'asthalin_inhaler',
'Asthalin Rotacap' => 'asthalin_rotacap',