You've already forked AstralRinth
forked from didirus/AstralRinth
fix: DI nonsense (#4174)
* fix: DI nonsense * fix: lint * fix: client try di issue * fix: injects outside of context * fix: use .catch * refactor: convert projects.vue to composition API. * fix: moderation checklist notif pos change watcher * fix: lint issues
This commit is contained in:
@@ -62,10 +62,13 @@ const showPreviewImage = (files) => {
|
||||
const orgId = useRouteId()
|
||||
|
||||
const onSaveChanges = useClientTry(async () => {
|
||||
if (hasChanges.value) {
|
||||
await patchOrganization(orgId, patchData.value)
|
||||
// Only PATCH organization details if there are actual field changes
|
||||
const hasOrgFieldChanges = Object.keys(patchData.value).length > 0
|
||||
if (hasOrgFieldChanges) {
|
||||
await patchOrganization(patchData.value)
|
||||
}
|
||||
|
||||
// Handle icon deletion / upload separately
|
||||
if (deletedIcon.value) {
|
||||
await deleteIcon()
|
||||
deletedIcon.value = false
|
||||
@@ -74,6 +77,7 @@ const onSaveChanges = useClientTry(async () => {
|
||||
icon.value = null
|
||||
}
|
||||
|
||||
// Always refresh after any change
|
||||
await refreshOrganization()
|
||||
|
||||
addNotification({
|
||||
|
||||
Reference in New Issue
Block a user