refactor: new toast api

This commit is contained in:
Jannat Patel
2025-05-13 14:08:04 +05:30
parent 403e56b4ef
commit d9d031ed2b
39 changed files with 149 additions and 295 deletions

View File

@@ -31,10 +31,9 @@
</Dialog>
</template>
<script setup>
import { Dialog, createResource } from 'frappe-ui'
import { Dialog, createResource, toast } from 'frappe-ui'
import { ref, inject } from 'vue'
import Link from '@/components/Controls/Link.vue'
import { showToast } from '@/utils'
import { useOnboarding } from 'frappe-ui/frappe'
import { useSettings } from '@/stores/settings'
@@ -83,7 +82,7 @@ const addCourse = (close) => {
evaluator.value = null
},
onError(err) {
showToast('Error', err.message[0] || err, 'x')
toast.error(err.messages?.[0] || err)
},
}
)