fixing run build

This commit is contained in:
Sabda Yagra 2025-06-20 09:01:54 +07:00
parent 2dbbbe2a4d
commit 54bc7e36eb
14 changed files with 726 additions and 216 deletions

View File

@ -54,7 +54,7 @@ const columns: ColumnDef<any>[] = [
},
];
const FilterPage = (props: { group?: string; type: string }) => {
const FilterPage = () => {
const router = useRouter();
const asPath = usePathname();
const params = useParams();
@ -190,13 +190,9 @@ const FilterPage = (props: { group?: string; type: string }) => {
}, []);
const initFetch = async () => {
const response = await getPublicCategoryData(
props.group == "mabes"
? ""
: props.group == "polda" && poldaName && String(poldaName)?.length > 1
poldaName && String(poldaName)?.length > 1
? poldaName
: props.group == "satker" &&
satkerName &&
String(satkerName)?.length > 1
: satkerName && String(satkerName)?.length > 1
? "satker-" + satkerName
: "",
"",
@ -205,7 +201,7 @@ const FilterPage = (props: { group?: string; type: string }) => {
console.log("category", response);
setCategories(response?.data?.data?.content);
};
useEffect(() => {
function initState() {
if (dateRange[0] != null && dateRange[1] != null) {

View File

@ -47,7 +47,7 @@ const columns: ColumnDef<any>[] = [
},
];
const FilterPage = (props: { group?: string; type: string }) => {
const FilterPage = () => {
const router = useRouter();
const asPath = usePathname();
const params = useParams();
@ -181,13 +181,9 @@ const FilterPage = (props: { group?: string; type: string }) => {
}, []);
const initFetch = async () => {
const response = await getPublicCategoryData(
props.group == "mabes"
? ""
: props.group == "polda" && poldaName && String(poldaName)?.length > 1
poldaName && String(poldaName)?.length > 1
? poldaName
: props.group == "satker" &&
satkerName &&
String(satkerName)?.length > 1
: satkerName && String(satkerName)?.length > 1
? "satker-" + satkerName
: "",
"",

View File

@ -48,7 +48,7 @@ const columns: ColumnDef<any>[] = [
},
];
const FilterPage = (props: { group?: string; type: string }) => {
const FilterPage = () => {
const router = useRouter();
const asPath = usePathname();
const params = useParams();
@ -187,13 +187,9 @@ const FilterPage = (props: { group?: string; type: string }) => {
}, []);
const initFetch = async () => {
const response = await getPublicCategoryData(
props.group == "mabes"
? ""
: props.group == "polda" && poldaName && String(poldaName)?.length > 1
poldaName && String(poldaName)?.length > 1
? poldaName
: props.group == "satker" &&
satkerName &&
String(satkerName)?.length > 1
: satkerName && String(satkerName)?.length > 1
? "satker-" + satkerName
: "",
"",
@ -202,7 +198,6 @@ const FilterPage = (props: { group?: string; type: string }) => {
console.log("category", response);
setCategories(response?.data?.data?.content);
};
useEffect(() => {
function initState() {
if (dateRange[0] != null && dateRange[1] != null) {

View File

@ -49,7 +49,7 @@ const columns: ColumnDef<any>[] = [
},
];
const FilterPage = (props: { group?: string; type: string }) => {
const FilterPage = () => {
const router = useRouter();
const asPath = usePathname();
const params = useParams();
@ -181,13 +181,9 @@ const FilterPage = (props: { group?: string; type: string }) => {
}, []);
const initFetch = async () => {
const response = await getPublicCategoryData(
props.group == "mabes"
? ""
: props.group == "polda" && poldaName && String(poldaName)?.length > 1
poldaName && String(poldaName)?.length > 1
? poldaName
: props.group == "satker" &&
satkerName &&
String(satkerName)?.length > 1
: satkerName && String(satkerName)?.length > 1
? "satker-" + satkerName
: "",
"",
@ -196,7 +192,6 @@ const FilterPage = (props: { group?: string; type: string }) => {
console.log("category", response);
setCategories(response?.data?.data?.content);
};
useEffect(() => {
function initState() {
if (dateRange[0] != null && dateRange[1] != null) {

View File

@ -52,7 +52,7 @@ const columns: ColumnDef<any>[] = [
},
];
const FilterPage = (props: { group?: string; type: string }) => {
const FilterPage = () => {
const router = useRouter();
const asPath = usePathname();
const params = useParams();
@ -179,13 +179,9 @@ const FilterPage = (props: { group?: string; type: string }) => {
}, []);
const initFetch = async () => {
const response = await getPublicCategoryData(
props.group == "mabes"
? ""
: props.group == "polda" && poldaName && String(poldaName)?.length > 1
poldaName && String(poldaName)?.length > 1
? poldaName
: props.group == "satker" &&
satkerName &&
String(satkerName)?.length > 1
: satkerName && String(satkerName)?.length > 1
? "satker-" + satkerName
: "",
"",

View File

@ -46,7 +46,7 @@ const columns: ColumnDef<any>[] = [
},
];
const FilterPage = (props: { group?: string; type: string }) => {
const FilterPage = () => {
const router = useRouter();
const asPath = usePathname();
const params = useParams();
@ -172,13 +172,9 @@ const FilterPage = (props: { group?: string; type: string }) => {
}, []);
const fetchContent = async () => {
const response = await getPublicCategoryData(
props.group == "mabes"
? ""
: props.group == "polda" && poldaName && String(poldaName)?.length > 1
poldaName && String(poldaName)?.length > 1
? poldaName
: props.group == "satker" &&
satkerName &&
String(satkerName)?.length > 1
: satkerName && String(satkerName)?.length > 1
? "satker-" + satkerName
: "",
"",
@ -187,7 +183,6 @@ const FilterPage = (props: { group?: string; type: string }) => {
console.log("category", response);
setCategories(response?.data?.data?.content);
};
useEffect(() => {
function initState() {
if (dateRange[0] != null && dateRange[1] != null) {

View File

@ -45,7 +45,7 @@ const columns: ColumnDef<any>[] = [
},
];
const FilterPage = (props: { group?: string; type: string }) => {
const FilterPage = () => {
const router = useRouter();
const asPath = usePathname();
const params = useParams();
@ -170,17 +170,13 @@ const FilterPage = (props: { group?: string; type: string }) => {
// }
useEffect(() => {
initFetch();
fetchContent();
}, []);
const initFetch = async () => {
const fetchContent = async () => {
const response = await getPublicCategoryData(
props.group == "mabes"
? ""
: props.group == "polda" && poldaName && String(poldaName)?.length > 1
poldaName && String(poldaName)?.length > 1
? poldaName
: props.group == "satker" &&
satkerName &&
String(satkerName)?.length > 1
: satkerName && String(satkerName)?.length > 1
? "satker-" + satkerName
: "",
"",

View File

@ -46,7 +46,7 @@ const columns: ColumnDef<any>[] = [
},
];
const FilterPage = (props: { group?: string; type: string }) => {
const FilterPage = () => {
const router = useRouter();
const asPath = usePathname();
const params = useParams();
@ -170,13 +170,9 @@ const FilterPage = (props: { group?: string; type: string }) => {
}, []);
const fetchContent = async () => {
const response = await getPublicCategoryData(
props.group == "mabes"
? ""
: props.group == "polda" && poldaName && String(poldaName)?.length > 1
poldaName && String(poldaName)?.length > 1
? poldaName
: props.group == "satker" &&
satkerName &&
String(satkerName)?.length > 1
: satkerName && String(satkerName)?.length > 1
? "satker-" + satkerName
: "",
"",
@ -472,7 +468,7 @@ const FilterPage = (props: { group?: string; type: string }) => {
<div className="lg:w-[25%] w-full bg-[#f7f7f7] dark:bg-black p-4 rounded-lg shadow-md">
<h2 className="text-lg font-semibold mb-4 flex items-center gap-1">
<Icon icon="stash:filter-light" fontSize={30} />
Filter
Filter
</h2>
<div className="border-t border-black my-4 dark:border-white"></div>
<div className="space-y-6">

View File

@ -46,7 +46,7 @@ const columns: ColumnDef<any>[] = [
},
];
const FilterPage = (props: { group?: string; type: string }) => {
const FilterPage = () => {
const router = useRouter();
const asPath = usePathname();
const params = useParams();
@ -181,13 +181,9 @@ const FilterPage = (props: { group?: string; type: string }) => {
}, []);
const initFetch = async () => {
const response = await getPublicCategoryData(
props.group == "mabes"
? ""
: props.group == "polda" && poldaName && String(poldaName)?.length > 1
poldaName && String(poldaName)?.length > 1
? poldaName
: props.group == "satker" &&
satkerName &&
String(satkerName)?.length > 1
: satkerName && String(satkerName)?.length > 1
? "satker-" + satkerName
: "",
"",

View File

@ -47,7 +47,7 @@ const columns: ColumnDef<any>[] = [
},
];
const FilterPage = (props: { group?: string; type: string }) => {
const FilterPage = () => {
const router = useRouter();
const asPath = usePathname();
const params = useParams();
@ -181,13 +181,9 @@ const FilterPage = (props: { group?: string; type: string }) => {
}, []);
const initFetch = async () => {
const response = await getPublicCategoryData(
props.group == "mabes"
? ""
: props.group == "polda" && poldaName && String(poldaName)?.length > 1
poldaName && String(poldaName)?.length > 1
? poldaName
: props.group == "satker" &&
satkerName &&
String(satkerName)?.length > 1
: satkerName && String(satkerName)?.length > 1
? "satker-" + satkerName
: "",
"",

View File

@ -48,7 +48,7 @@ const columns: ColumnDef<any>[] = [
},
];
const FilterPage = (props: { group?: string; type: string }) => {
const FilterPage = () => {
const router = useRouter();
const asPath = usePathname();
const params = useParams();
@ -184,7 +184,7 @@ const FilterPage = (props: { group?: string; type: string }) => {
}, []);
const initFetch = async () => {
const response = await getPublicCategoryData(
props.group == "mabes" ? "" : props.group == "polda" && poldaName && String(poldaName)?.length > 1 ? poldaName : props.group == "satker" && satkerName && String(satkerName)?.length > 1 ? "satker-" + satkerName : "",
poldaName && String(poldaName)?.length > 1 ? poldaName : satkerName && String(satkerName)?.length > 1 ? "satker-" + satkerName : "",
"",
locale == "en" ? true : false
);

View File

@ -49,7 +49,7 @@ const columns: ColumnDef<any>[] = [
},
];
const FilterPage = (props: { group?: string; type: string }) => {
const FilterPage = () => {
const router = useRouter();
const asPath = usePathname();
const params = useParams();
@ -176,13 +176,9 @@ const FilterPage = (props: { group?: string; type: string }) => {
}, []);
const initFetch = async () => {
const response = await getPublicCategoryData(
props.group == "mabes"
? ""
: props.group == "polda" && poldaName && String(poldaName)?.length > 1
poldaName && String(poldaName)?.length > 1
? poldaName
: props.group == "satker" &&
satkerName &&
String(satkerName)?.length > 1
: satkerName && String(satkerName)?.length > 1
? "satker-" + satkerName
: "",
"",

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB