diff --git a/src/hooks/common/useMasterController.js b/src/hooks/common/useMasterController.js index 21220726..dae68c69 100644 --- a/src/hooks/common/useMasterController.js +++ b/src/hooks/common/useMasterController.js @@ -212,9 +212,14 @@ export function useMasterController() { } const getQuotationItem = async (params) => { - return await post({ url: '/api/v1/master/getQuotationItem', data: params }).then((res) => { - return res - }) + return await post({ url: '/api/v1/master/getQuotationItem', data: params }) + .then((res) => { + return res + }) + .catch((error) => { + console.log('🚀 ~ getQuotationItem ~ error:', error) + setIsGlobalLoading(false) + }) } /** diff --git a/src/hooks/usePlan.js b/src/hooks/usePlan.js index 52c60f80..ba8776d4 100644 --- a/src/hooks/usePlan.js +++ b/src/hooks/usePlan.js @@ -343,6 +343,7 @@ export function usePlan(params = {}) { }) .catch((error) => { swalFire({ text: error.message, icon: 'error' }) + setIsGlobalLoading(false) }) return rtn }