What: Events/Edit.vue has its own watch handlers that parse the Payload/Schema textareas and silently swallow parse errors:
watch(payloadText, (val) => {
try { form.payload = val ? JSON.parse(val) : null } catch {}
})
watch(schemaText, (val) => {
try { form.schema = val ? JSON.parse(val) : null } catch {}
})
Where: resources/js/Pages/Events/Edit.vue:131-137 (watchers), 139-143 (save() submits form.payload/form.schema as-is)
Why it matters: If a user types invalid JSON, form.payload/form.schema silently keep their last-valid value while the textarea visibly shows the broken JSON the user typed. save() then submits the stale (pre-edit) data with no indication anything was wrong — the user believes their edit was saved when it wasn't. This is the same underlying defect already tracked in #98 for Events/Index.vue's inline edit modal, but it exists independently here in a separate routed page (/events/{event}/edit) with its own duplicate watchers — fixing #98 in Index.vue will not fix this page.
Suggested fix: Surface a validation error from the parse catch block (e.g. set form.errors.payload/form.errors.schema) and/or disable the Save button while the JSON is invalid, applied to both this page and the Index.vue modal covered by #98.
What:
Events/Edit.vuehas its ownwatchhandlers that parse the Payload/Schema textareas and silently swallow parse errors:Where:
resources/js/Pages/Events/Edit.vue:131-137(watchers),139-143(save()submitsform.payload/form.schemaas-is)Why it matters: If a user types invalid JSON,
form.payload/form.schemasilently keep their last-valid value while the textarea visibly shows the broken JSON the user typed.save()then submits the stale (pre-edit) data with no indication anything was wrong — the user believes their edit was saved when it wasn't. This is the same underlying defect already tracked in #98 forEvents/Index.vue's inline edit modal, but it exists independently here in a separate routed page (/events/{event}/edit) with its own duplicate watchers — fixing #98 inIndex.vuewill not fix this page.Suggested fix: Surface a validation error from the parse
catchblock (e.g. setform.errors.payload/form.errors.schema) and/or disable the Save button while the JSON is invalid, applied to both this page and the Index.vue modal covered by #98.