31c1b database submission action update not working (#51)

* Editable Submissions

* Database submission action-Update Not Working

Co-authored-by: JhumanJ <julien@nahum.net>
This commit is contained in:
Chirag 2023-01-13 19:26:37 +05:30 committed by GitHub
parent 1d3541f785
commit a0750573ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 4 deletions

View File

@ -112,6 +112,7 @@ class PublicFormController extends Controller
} }
$submission = FormSubmission::findOrFail($submissionId); $submission = FormSubmission::findOrFail($submissionId);
if ($submission->form_id != $form->id) { if ($submission->form_id != $form->id) {
return $this->error([ return $this->error([
'message' => 'Not allowed.', 'message' => 'Not allowed.',

View File

@ -308,7 +308,6 @@ export default {
} }
} }
} }
if (this.isPublicFormPage) { if (this.isPublicFormPage) {
let pendingData let pendingData
try { try {

View File

@ -180,11 +180,10 @@ export default {
filterableFields() { filterableFields() {
if (this.submissionOptions.databaseAction !== 'update') return [] if (this.submissionOptions.databaseAction !== 'update') return []
return this.form.properties.filter((field) => { return this.form.properties.filter((field) => {
return !field.hidden && window.config.notion.database_filterable_types.includes(field.type) return !field.hidden && !['files','signature','multi_select'].includes(field.type)
}).map((field) => { }).map((field) => {
const fieldName = (field.name !== field.notion_name) ? (field.name + ' (' + field.notion_name + ')') : field.name
return { return {
name: fieldName, name: field.name,
value: field.id value: field.id
} }
}) })