fix: misc batch issues
This commit is contained in:
@@ -270,6 +270,7 @@ import {
|
||||
FormControl,
|
||||
FileUploader,
|
||||
usePageMeta,
|
||||
toast,
|
||||
} from 'frappe-ui'
|
||||
import {
|
||||
inject,
|
||||
@@ -282,7 +283,7 @@ import {
|
||||
getCurrentInstance,
|
||||
} from 'vue'
|
||||
import { showToast } from '@/utils'
|
||||
import { Image, Trash2, X } from 'lucide-vue-next'
|
||||
import { Check, Image, Trash2, X } from 'lucide-vue-next'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { capture } from '@/telemetry'
|
||||
import { useOnboarding } from 'frappe-ui/frappe'
|
||||
@@ -449,7 +450,28 @@ const submitCourse = () => {
|
||||
},
|
||||
{
|
||||
onSuccess() {
|
||||
showToast('Success', 'Course updated successfully', 'check')
|
||||
console.log('Course updated successfully')
|
||||
/* showToast('Success', 'Course updated successfully', 'check') */
|
||||
/* First arg of toast.promise is a promiseToResolve and second is the options obj, how to write this */
|
||||
toast.promise(
|
||||
new Promise((resolve) => {
|
||||
resolve()
|
||||
}),
|
||||
{
|
||||
open: true,
|
||||
type: 'success',
|
||||
message: __('Course updated successfully'),
|
||||
icon: Check,
|
||||
duration: 500,
|
||||
}
|
||||
)
|
||||
/* toast.promise({
|
||||
open: true,
|
||||
type: 'success',
|
||||
message: __('Course updated successfully'),
|
||||
icon: Check,
|
||||
duration: 5
|
||||
}) */
|
||||
},
|
||||
onError(err) {
|
||||
showToast('Error', err.messages?.[0] || err, 'x')
|
||||
|
||||
Reference in New Issue
Block a user