mirror of
https://github.com/abhinavxd/libredesk.git
synced 2025-11-17 12:21:39 +00:00
refactor(editor): Remove unncessary props and simplify code for tiptap editor, update all editors for the same
This commit is contained in:
@@ -248,18 +248,10 @@ const fetchBusinessHours = async () => {
|
||||
})
|
||||
businessHours.value = response.data.data
|
||||
} catch (error) {
|
||||
// If unauthorized (no permission), show a toast message.
|
||||
if (error.response.status === 403) {
|
||||
emitter.emit(EMITTER_EVENTS.SHOW_TOAST, {
|
||||
variant: 'destructive',
|
||||
description: t('admin.businessHours.unauthorized')
|
||||
})
|
||||
} else {
|
||||
emitter.emit(EMITTER_EVENTS.SHOW_TOAST, {
|
||||
variant: 'destructive',
|
||||
description: handleHTTPError(error).message
|
||||
})
|
||||
}
|
||||
emitter.emit(EMITTER_EVENTS.SHOW_TOAST, {
|
||||
variant: 'destructive',
|
||||
description: handleHTTPError(error).message
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user