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: {
|
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