build and format

This commit is contained in:
2025-12-17 14:53:19 +03:30
parent 633da895c2
commit f78ee620cd
244 changed files with 16542 additions and 16551 deletions

View File

@@ -1,30 +1,30 @@
import { useState, useEffect } from "react";
import useRequest from "@/lib/hooks/useRequest";
import { GET_HISTORY_LIST } from "@/core/utils/routes";
export const useHistory = (rowId) => {
const requestServer = useRequest();
const [historyData, setHistoryData] = useState([]);
const [loading, setLoading] = useState(true);
const [error, setError] = useState(null);
useEffect(() => {
if (!rowId) return;
const fetchHistory = async () => {
try {
setLoading(true);
const response = await requestServer(`${GET_HISTORY_LIST}/${rowId}`);
setHistoryData(response.data.data);
} catch (err) {
setError(err.message);
} finally {
setLoading(false);
}
};
fetchHistory();
}, [rowId]);
return { historyData, loading, error };
};
import { useState, useEffect } from "react";
import useRequest from "@/lib/hooks/useRequest";
import { GET_HISTORY_LIST } from "@/core/utils/routes";
export const useHistory = (rowId) => {
const requestServer = useRequest();
const [historyData, setHistoryData] = useState([]);
const [loading, setLoading] = useState(true);
const [error, setError] = useState(null);
useEffect(() => {
if (!rowId) return;
const fetchHistory = async () => {
try {
setLoading(true);
const response = await requestServer(`${GET_HISTORY_LIST}/${rowId}`);
setHistoryData(response.data.data);
} catch (err) {
setError(err.message);
} finally {
setLoading(false);
}
};
fetchHistory();
}, [rowId]);
return { historyData, loading, error };
};

View File

@@ -1,30 +1,30 @@
import { GET_INQUIRY_PRIVACY_STATE_LIST } from "@/core/utils/routes";
import useRequest from "@/lib/hooks/useRequest";
import { useEffect, useState } from "react";
const useInquiryPrivacyState = () => {
const requestServer = useRequest();
const [itemsList, setItemsList] = useState([]);
const [loadingItemsList, setLoadingItemsList] = useState(true);
const [errorItemsList, setErrorItemsList] = useState(null);
useEffect(() => {
const fetchItems = async () => {
try {
const response = await requestServer(`${GET_INQUIRY_PRIVACY_STATE_LIST}`);
setItemsList(response.data.data);
setLoadingItemsList(false);
setErrorItemsList(false);
} catch (e) {
setErrorItemsList(e);
setLoadingItemsList(false);
}
};
fetchItems();
}, []);
return { itemsList, loadingItemsList, errorItemsList };
};
export default useInquiryPrivacyState;
import { GET_INQUIRY_PRIVACY_STATE_LIST } from "@/core/utils/routes";
import useRequest from "@/lib/hooks/useRequest";
import { useEffect, useState } from "react";
const useInquiryPrivacyState = () => {
const requestServer = useRequest();
const [itemsList, setItemsList] = useState([]);
const [loadingItemsList, setLoadingItemsList] = useState(true);
const [errorItemsList, setErrorItemsList] = useState(null);
useEffect(() => {
const fetchItems = async () => {
try {
const response = await requestServer(`${GET_INQUIRY_PRIVACY_STATE_LIST}`);
setItemsList(response.data.data);
setLoadingItemsList(false);
setErrorItemsList(false);
} catch (e) {
setErrorItemsList(e);
setLoadingItemsList(false);
}
};
fetchItems();
}, []);
return { itemsList, loadingItemsList, errorItemsList };
};
export default useInquiryPrivacyState;