Skip to content

Commit

Permalink
Merge branch 'main' into 12fa6-right-to-left-mode
Browse files Browse the repository at this point in the history
  • Loading branch information
JhumanJ authored Nov 20, 2024
2 parents acbae32 + fbf0831 commit b194c50
Show file tree
Hide file tree
Showing 5 changed files with 338 additions and 110 deletions.
9 changes: 8 additions & 1 deletion api/app/Http/Controllers/Forms/PublicFormController.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,14 @@ public function fetchSubmission(Request $request, string $slug, string $submissi
]);
}

$submission = new FormSubmissionResource(FormSubmission::findOrFail($submissionId));
$submission = FormSubmission::find($submissionId);
if (!$submission) {
return $this->error([
'message' => 'Submission not found.',
]);
}

$submission = new FormSubmissionResource($submission);
$submission->publiclyAccessed();

if ($submission->form_id != $form->id) {
Expand Down
3 changes: 3 additions & 0 deletions client/components/open/forms/OpenForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,9 @@ export default {
await this.recordsStore.loadRecord(
opnFetch('/forms/' + this.form.slug + '/submissions/' + this.form.submission_id).then((data) => {
return {submission_id: this.form.submission_id, id: this.form.submission_id, ...data.data}
}).catch((error) => {
useAlert().error(error?.data?.message || 'Something went wrong')
return null
})
)
return this.recordsStore.getByKey(this.form.submission_id)
Expand Down
1 change: 0 additions & 1 deletion client/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ export default defineNuxtConfig({
'@nuxtjs/sitemap',
'@nuxt/ui',
'nuxt-utm',
'@nuxt/icon',
...process.env.NUXT_PUBLIC_GTM_CODE ? ['@zadigetvoltaire/nuxt-gtm'] : [],
],
build: {
Expand Down
Loading

0 comments on commit b194c50

Please sign in to comment.