This commit is contained in:
Dean 2024-04-05 14:53:14 +01:00
parent 203d6484ea
commit 7f9dc42e31
2 changed files with 3 additions and 6 deletions

View File

@ -1,7 +1,6 @@
<script> <script>
import { onMount } from "svelte" import { onMount, createEventDispatcher } from "svelte"
import Icon from "../../Icon/Icon.svelte" import Icon from "../../Icon/Icon.svelte"
import { createEventDispatcher } from "svelte"
const dispatch = createEventDispatcher() const dispatch = createEventDispatcher()

View File

@ -15,7 +15,6 @@
const { API, notifications, props } = getContext("grid") const { API, notifications, props } = getContext("grid")
let isOpen = false let isOpen = false
let editing = false
let signature let signature
let modal let modal
@ -48,7 +47,7 @@
const deleteRequest = value.map(item => item.key) const deleteRequest = value.map(item => item.key)
try { try {
await API.deleteBuilderAttachments(deleteRequest) await API.deleteBuilderAttachments(deleteRequest)
} catch (e) { } catch (error) {
$notifications.error(error.message || "Failed to delete signature") $notifications.error(error.message || "Failed to delete signature")
} }
} }
@ -63,7 +62,7 @@
const uploadReq = await API.uploadBuilderAttachment(attachRequest) const uploadReq = await API.uploadBuilderAttachment(attachRequest)
onChange(uploadReq) onChange(uploadReq)
} catch (error) { } catch (error) {
$notifications.error(error.message || "Failed to upload attachment") $notifications.error(error.message || "Failed to save signature")
return [] return []
} }
} }
@ -117,7 +116,6 @@
<ActionButton <ActionButton
fullWidth fullWidth
on:click={() => { on:click={() => {
editing = true
modal.show() modal.show()
}} }}
> >