Skip to content

Commit

Permalink
Fixed supervision setting.
Browse files Browse the repository at this point in the history
  • Loading branch information
amyjko committed Jul 31, 2024
1 parent 0abcea3 commit d727e08
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Dates should be in`YYYY-MM-DD` format and versions are in [semantic versioning](

- Fixed form submission.
- Fixed position of dialogs.
- Fixed supervision setting.

## v0.6.2 2024-07-28

Expand Down
4 changes: 2 additions & 2 deletions src/database/OrganizationsDB.ts
Original file line number Diff line number Diff line change
Expand Up @@ -525,13 +525,13 @@ class OrganizationsDB {
async updateProfileSupervisor(
orgid: OrganizationID,
profileid: ProfileID,
supervisor: PersonID | null
supervisor: ProfileID | null
) {
const { error } = await this.supabase
.from('profiles')
.update({ supervisor })
.eq('orgid', orgid)
.eq('personid', profileid);
.eq('id', profileid);
return error;
}

Expand Down
4 changes: 2 additions & 2 deletions src/routes/org/[orgid]/people/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,10 @@
})
]}
selection={profile.supervisor ?? undefined}
change={(personID) => {
change={(profileID) => {
queryOrError(
errors,
$db.updateProfileSupervisor($organization.getID(), profile.id, personID ?? null),
$db.updateProfileSupervisor($organization.getID(), profile.id, profileID ?? null),
"Couldn't update supervisor."
);
}}
Expand Down

0 comments on commit d727e08

Please sign in to comment.