Skip to content

Commit

Permalink
Merge branch 'lebihae/1228' into 'main'
Browse files Browse the repository at this point in the history
fix(permissions): make documents access toggle actually trigger the mutation (fixes #1228)

Closes #1228

See merge request churros/churros!276
  • Loading branch information
LeGmask committed Nov 19, 2024
2 parents 5f47a42 + 11d9947 commit 2b72804
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/bright-rocks-matter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@churros/app': patch
---

fix(permissions): make documents access toggle actually trigger the mutation (fixes #1228)
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,10 @@
<InputToggle
slot="right"
value={loading(user.canAccessDocuments, false)}
on:change={async ({ currentTarget }) => {
if (!(currentTarget instanceof HTMLInputElement)) return;
on:update={async ({ detail }) => {
await mutateAndToast(SetCanAccessDocuments, {
uid: $page.params.uid,
enabled: currentTarget.checked,
enabled: detail,
});
}}
></InputToggle>
Expand Down

0 comments on commit 2b72804

Please sign in to comment.