Fix logo upload and show current logo

This commit is contained in:
Andrew Kingston 2021-05-18 18:48:07 +01:00
parent 6a92e7304b
commit d00a412889
1 changed files with 4 additions and 1 deletions

View File

@ -25,7 +25,9 @@
} }
let loading = false let loading = false
let file let file = $organisation.logoUrl
? { url: $organisation.logoUrl, type: "image", name: "Logo" }
: null
async function uploadLogo() { async function uploadLogo() {
let data = new FormData() let data = new FormData()
@ -40,6 +42,7 @@
await toggleAnalytics() await toggleAnalytics()
if (file) { if (file) {
await uploadLogo() await uploadLogo()
await organisation.init()
} }
const res = await organisation.save({ const res = await organisation.save({
company: $organisation.company, company: $organisation.company,