summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/auth/components/CompanyProfile.jsx8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/auth/components/CompanyProfile.jsx b/src/lib/auth/components/CompanyProfile.jsx
index 95575c87..f9f7fe13 100644
--- a/src/lib/auth/components/CompanyProfile.jsx
+++ b/src/lib/auth/components/CompanyProfile.jsx
@@ -5,6 +5,7 @@ import addressApi from '@/lib/address/api/addressApi'
import { ChevronDownIcon, ChevronUpIcon } from '@heroicons/react/24/outline'
import { useEffect, useState } from 'react'
import { Controller, useForm } from 'react-hook-form'
+import { toast } from 'react-hot-toast'
const CompanyProfile = () => {
const auth = useAuth()
@@ -58,7 +59,12 @@ const CompanyProfile = () => {
tax_name: values.taxName
};
const isUpdated = await odooApi('PUT', `/api/v1/partner/${auth.parentId}`, data)
- console.log(isUpdated);
+ if (isUpdated?.id) {
+ setIsOpen(false)
+ toast.success('Berhasil mengubah profil', { duration: 1500 })
+ return
+ }
+ toast.error('Terjadi kesalahan internal')
}
return (