fix: update toast messages for document update success and error handling
This commit is contained in:
parent
6f49573f2f
commit
c67ec08e1a
@ -18,14 +18,14 @@ export function useDocument(doctype, docname) {
|
|||||||
setValue: {
|
setValue: {
|
||||||
onSuccess: () => {
|
onSuccess: () => {
|
||||||
createToast({
|
createToast({
|
||||||
title: 'Data Updated',
|
title: __('Document updated successfully'),
|
||||||
icon: 'check',
|
icon: 'check',
|
||||||
iconClasses: 'text-ink-green-3',
|
iconClasses: 'text-ink-green-3',
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
onError: (err) => {
|
onError: (err) => {
|
||||||
createToast({
|
createToast({
|
||||||
title: 'Error',
|
title: __('Error updating document'),
|
||||||
text: err.messages[0],
|
text: err.messages[0],
|
||||||
icon: 'x',
|
icon: 'x',
|
||||||
iconClasses: 'text-red-600',
|
iconClasses: 'text-red-600',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user