=Changes
Specific Folder FTP Upload / ftp-deploy (push) Successful in 1m21s
Details
Specific Folder FTP Upload / ftp-deploy (push) Successful in 1m21s
Details
This commit is contained in:
parent
b56c9a5423
commit
cc0b8144d3
|
|
@ -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
|
||||
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
Loading…
Reference in New Issue