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