diff --git a/src/views/products/Detail.jsx b/src/views/products/Detail.jsx
index 5967b20..e28175e 100644
--- a/src/views/products/Detail.jsx
+++ b/src/views/products/Detail.jsx
@@ -12,12 +12,12 @@ import ProductInfo from './Detail/ProductInfo';
import NewProductModal from './Detail/NewProductModal';
function Detail() {
- const { notification, modal } = App.useApp()
+ const { notification, modal } = App.useApp();
const { travel_agency_id, audit_state, use_year } = useParams();
const [addProductVisible, setAddProductVisible] = useState(false);
const [agencyProducts, switchParams] = useProductsStore((state) => [state.agencyProducts, state.switchParams]);
const [getAgencyProducts, activeAgency] = useProductsStore((state) => [state.getAgencyProducts, state.activeAgency]);
- const [loading, setLoading] = useProductsStore(state => [state.loading, state.setLoading]);
+ const [loading, setLoading] = useProductsStore((state) => [state.loading, state.setLoading]);
const { travelAgencyId } = usingStorage();
const handleGetAgencyProducts = ({ pick_year, pick_agency, pick_state } = {}) => {
@@ -26,14 +26,14 @@ function Detail() {
const state = pick_state ?? audit_state;
const param = { travel_agency_id: agency, use_year: year, audit_state: state };
// setEditingProduct({});
- getAgencyProducts(param).catch(ex => {
+ getAgencyProducts(param).catch((ex) => {
setLoading(false);
notification.error({
message: 'Notification',
description: ex.message,
placement: 'top',
duration: 4,
- })
+ });
});
};
@@ -41,27 +41,17 @@ function Detail() {
setAddProductVisible(true)}
- />
- }>
- {isEmpty(agencyProducts) ? (
-
- ) : (
- <>
-
- {/* onNodeSelect={handleNodeSelect} */}
-
-
-
-
- >
- )}
+ header={ setAddProductVisible(true)} />}>
+ <>
+
+ {/* onNodeSelect={handleNodeSelect} */}
+
+
+
+
+ >
);
}
diff --git a/src/views/products/Detail/Header.jsx b/src/views/products/Detail/Header.jsx
index 6b34edd..debeba0 100644
--- a/src/views/products/Detail/Header.jsx
+++ b/src/views/products/Detail/Header.jsx
@@ -143,7 +143,7 @@ const Header = ({ refresh, ...props }) => {
{/*
{(use_year || '').replace('all', '')} */}
-