Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
})
const state = reactive({
showNewVersionDialog: false,
})
const handleNewVersionClose = () => { state.showNewVersionDialog = false }
const handleNewVersionDone = () => {
handleNewVersionClose()
props.close()
}
const {
mutate: updateDatabase,
} = useMutation(updateDatabaseDetailsMutation)
// hacking
const submit = updateDatabase as unknown as (update: UpdateDatabaseDetailsMutation) => void
const submitAndRefetch = async(details: MolecularDB) => {
await submit({
id: props.id,
details,
})
await refetch()
}
return () => {
let content
if (result.value === undefined) {
setup(props, { root, emit }) {
const { mutate } = useMutation(deleteDatabaseMutation)
const deleteDatabase = mutate as unknown as (variables: DeleteDatabaseMutation) => void
const formattedName = formatDatabaseLabel(props.db)
const handleDelete = () => {
confirmPrompt({
title: '',
message: `Are you sure you want to delete ${formattedName}?`,
confirmButtonText: 'Delete',
confirmButtonLoadingText: 'Deleting...',
}, async() => {
try {
await deleteDatabase({ id: props.db.id })
root.$message({ message: `${formattedName} deleted`, type: 'success' })
emit('deleted')
} catch (e) {