improvements
This commit is contained in:
BIN
.playwright-mcp/element-2026-02-19T13-33-20-065Z.png
Normal file
BIN
.playwright-mcp/element-2026-02-19T13-33-20-065Z.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 479 KiB |
BIN
.playwright-mcp/element-2026-02-19T13-37-44-734Z.png
Normal file
BIN
.playwright-mcp/element-2026-02-19T13-37-44-734Z.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 479 KiB |
BIN
.playwright-mcp/element-2026-02-19T13-40-05-307Z.png
Normal file
BIN
.playwright-mcp/element-2026-02-19T13-40-05-307Z.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 81 KiB |
BIN
.playwright-mcp/element-2026-02-19T13-40-12-397Z.png
Normal file
BIN
.playwright-mcp/element-2026-02-19T13-40-12-397Z.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 70 KiB |
BIN
.playwright-mcp/page-2026-02-19T13-34-20-685Z.png
Normal file
BIN
.playwright-mcp/page-2026-02-19T13-34-20-685Z.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 511 KiB |
@@ -65,6 +65,8 @@ public function show(Session $session): InertiaResponse
|
|||||||
*/
|
*/
|
||||||
public function update(UpdateSessionRequest $request, Session $session): RedirectResponse
|
public function update(UpdateSessionRequest $request, Session $session): RedirectResponse
|
||||||
{
|
{
|
||||||
|
sleep(3);
|
||||||
|
|
||||||
$validated = $request->validated();
|
$validated = $request->validated();
|
||||||
|
|
||||||
if (Arr::has($validated, 'answers')) {
|
if (Arr::has($validated, 'answers')) {
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ const updateTextValue = (event) => {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
class="py-5 first:pt-0 transition-all duration-200"
|
class="py-6 transition-all duration-200"
|
||||||
:class="{ 'border-l-2 border-red-400/60 pl-4 -ml-4': error }"
|
:class="{ 'border-l-2 border-red-400/60 pl-4 -ml-4': error }"
|
||||||
>
|
>
|
||||||
<p class="text-white font-medium leading-relaxed mb-4">{{ question.text }}</p>
|
<p class="text-white font-medium leading-relaxed mb-4">{{ question.text }}</p>
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ initializeAnswers()
|
|||||||
|
|
||||||
// Validation state
|
// Validation state
|
||||||
const validationErrors = ref({})
|
const validationErrors = ref({})
|
||||||
|
const processing = ref(false)
|
||||||
const showErrors = ref(false)
|
const showErrors = ref(false)
|
||||||
const questionRefs = ref({})
|
const questionRefs = ref({})
|
||||||
|
|
||||||
@@ -57,6 +58,8 @@ const saveAnswer = (questionId) => {
|
|||||||
preserveScroll: true,
|
preserveScroll: true,
|
||||||
preserveState: true,
|
preserveState: true,
|
||||||
only: ['answers'],
|
only: ['answers'],
|
||||||
|
onStart: () => { processing.value = true },
|
||||||
|
onFinish: () => { processing.value = false },
|
||||||
})
|
})
|
||||||
}, 500)
|
}, 500)
|
||||||
}
|
}
|
||||||
@@ -160,6 +163,9 @@ const completeSession = async () => {
|
|||||||
router.put(`/sessions/${props.session.id}`, {
|
router.put(`/sessions/${props.session.id}`, {
|
||||||
answers: { ...answerData },
|
answers: { ...answerData },
|
||||||
complete: true,
|
complete: true,
|
||||||
|
}, {
|
||||||
|
onStart: () => { processing.value = true },
|
||||||
|
onFinish: () => { processing.value = false },
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -254,7 +260,7 @@ const completeSession = async () => {
|
|||||||
</Transition>
|
</Transition>
|
||||||
|
|
||||||
<div class="flex justify-end">
|
<div class="flex justify-end">
|
||||||
<AppButton size="lg" @click="completeSession" data-cy="complete-session">
|
<AppButton size="lg" :loading="processing" @click="completeSession" data-cy="complete-session">
|
||||||
Complete
|
Complete
|
||||||
</AppButton>
|
</AppButton>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -96,7 +96,6 @@
|
|||||||
|
|
||||||
.meta-left {
|
.meta-left {
|
||||||
width: 58%;
|
width: 58%;
|
||||||
padding-right: 12pt;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.meta-right {
|
.meta-right {
|
||||||
@@ -109,6 +108,7 @@
|
|||||||
border: 1pt solid #3a404d;
|
border: 1pt solid #3a404d;
|
||||||
border-radius: 6pt;
|
border-radius: 6pt;
|
||||||
padding: 16pt 18pt;
|
padding: 16pt 18pt;
|
||||||
|
margin-right: 12pt;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-label {
|
.card-label {
|
||||||
@@ -566,19 +566,17 @@
|
|||||||
<div class="question-item no-break">
|
<div class="question-item no-break">
|
||||||
<table class="question-item-table">
|
<table class="question-item-table">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="question-body">
|
<td class="question-body"@if ($pillLabel === null) colspan="2"@endif>
|
||||||
<div class="question-text">{{ $question->text }}</div>
|
<div class="question-text">{{ $question->text }}</div>
|
||||||
@if (!empty($textValue))
|
@if (!empty($textValue))
|
||||||
<div class="question-text-value">{{ $textValue }}</div>
|
<div class="question-text-value">{{ $textValue }}</div>
|
||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
<td class="question-answer-cell">
|
@if ($pillLabel !== null)
|
||||||
@if ($pillLabel !== null)
|
<td class="question-answer-cell">
|
||||||
<span class="{{ $pillClass }}">{{ $pillLabel }}</span>
|
<span class="{{ $pillClass }}">{{ $pillLabel }}</span>
|
||||||
@else
|
</td>
|
||||||
<span class="answer-missing">Not answered</span>
|
@endif
|
||||||
@endif
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -43,18 +43,3 @@
|
|||||||
return redirect('/');
|
return redirect('/');
|
||||||
});
|
});
|
||||||
|
|
||||||
// Dev PDF preview route — renders the PDF Blade template as raw HTML (no PDF generation)
|
|
||||||
Route::get('/pdf-preview/{session}', function (\App\Models\Session $session) {
|
|
||||||
$session->load(['user', 'category', 'answers.question']);
|
|
||||||
|
|
||||||
$questionGroups = $session->category
|
|
||||||
->questionGroups()
|
|
||||||
->with(['questions' => fn ($q) => $q->orderBy('sort_order')])
|
|
||||||
->orderBy('sort_order')
|
|
||||||
->get();
|
|
||||||
|
|
||||||
return view('pdf.session-result', [
|
|
||||||
'session' => $session,
|
|
||||||
'questionGroups' => $questionGroups,
|
|
||||||
]);
|
|
||||||
});
|
|
||||||
|
|||||||
Reference in New Issue
Block a user