fixing run build
This commit is contained in:
parent
2dbbbe2a4d
commit
54bc7e36eb
|
|
@ -54,7 +54,7 @@ const columns: ColumnDef<any>[] = [
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const FilterPage = (props: { group?: string; type: string }) => {
|
const FilterPage = () => {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const asPath = usePathname();
|
const asPath = usePathname();
|
||||||
const params = useParams();
|
const params = useParams();
|
||||||
|
|
@ -190,13 +190,9 @@ const FilterPage = (props: { group?: string; type: string }) => {
|
||||||
}, []);
|
}, []);
|
||||||
const initFetch = async () => {
|
const initFetch = async () => {
|
||||||
const response = await getPublicCategoryData(
|
const response = await getPublicCategoryData(
|
||||||
props.group == "mabes"
|
poldaName && String(poldaName)?.length > 1
|
||||||
? ""
|
|
||||||
: props.group == "polda" && poldaName && String(poldaName)?.length > 1
|
|
||||||
? poldaName
|
? poldaName
|
||||||
: props.group == "satker" &&
|
: satkerName && String(satkerName)?.length > 1
|
||||||
satkerName &&
|
|
||||||
String(satkerName)?.length > 1
|
|
||||||
? "satker-" + satkerName
|
? "satker-" + satkerName
|
||||||
: "",
|
: "",
|
||||||
"",
|
"",
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ const columns: ColumnDef<any>[] = [
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const FilterPage = (props: { group?: string; type: string }) => {
|
const FilterPage = () => {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const asPath = usePathname();
|
const asPath = usePathname();
|
||||||
const params = useParams();
|
const params = useParams();
|
||||||
|
|
@ -181,13 +181,9 @@ const FilterPage = (props: { group?: string; type: string }) => {
|
||||||
}, []);
|
}, []);
|
||||||
const initFetch = async () => {
|
const initFetch = async () => {
|
||||||
const response = await getPublicCategoryData(
|
const response = await getPublicCategoryData(
|
||||||
props.group == "mabes"
|
poldaName && String(poldaName)?.length > 1
|
||||||
? ""
|
|
||||||
: props.group == "polda" && poldaName && String(poldaName)?.length > 1
|
|
||||||
? poldaName
|
? poldaName
|
||||||
: props.group == "satker" &&
|
: satkerName && String(satkerName)?.length > 1
|
||||||
satkerName &&
|
|
||||||
String(satkerName)?.length > 1
|
|
||||||
? "satker-" + satkerName
|
? "satker-" + satkerName
|
||||||
: "",
|
: "",
|
||||||
"",
|
"",
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ const columns: ColumnDef<any>[] = [
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const FilterPage = (props: { group?: string; type: string }) => {
|
const FilterPage = () => {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const asPath = usePathname();
|
const asPath = usePathname();
|
||||||
const params = useParams();
|
const params = useParams();
|
||||||
|
|
@ -187,13 +187,9 @@ const FilterPage = (props: { group?: string; type: string }) => {
|
||||||
}, []);
|
}, []);
|
||||||
const initFetch = async () => {
|
const initFetch = async () => {
|
||||||
const response = await getPublicCategoryData(
|
const response = await getPublicCategoryData(
|
||||||
props.group == "mabes"
|
poldaName && String(poldaName)?.length > 1
|
||||||
? ""
|
|
||||||
: props.group == "polda" && poldaName && String(poldaName)?.length > 1
|
|
||||||
? poldaName
|
? poldaName
|
||||||
: props.group == "satker" &&
|
: satkerName && String(satkerName)?.length > 1
|
||||||
satkerName &&
|
|
||||||
String(satkerName)?.length > 1
|
|
||||||
? "satker-" + satkerName
|
? "satker-" + satkerName
|
||||||
: "",
|
: "",
|
||||||
"",
|
"",
|
||||||
|
|
@ -202,7 +198,6 @@ const FilterPage = (props: { group?: string; type: string }) => {
|
||||||
console.log("category", response);
|
console.log("category", response);
|
||||||
setCategories(response?.data?.data?.content);
|
setCategories(response?.data?.data?.content);
|
||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
function initState() {
|
function initState() {
|
||||||
if (dateRange[0] != null && dateRange[1] != null) {
|
if (dateRange[0] != null && dateRange[1] != null) {
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ const columns: ColumnDef<any>[] = [
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const FilterPage = (props: { group?: string; type: string }) => {
|
const FilterPage = () => {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const asPath = usePathname();
|
const asPath = usePathname();
|
||||||
const params = useParams();
|
const params = useParams();
|
||||||
|
|
@ -181,13 +181,9 @@ const FilterPage = (props: { group?: string; type: string }) => {
|
||||||
}, []);
|
}, []);
|
||||||
const initFetch = async () => {
|
const initFetch = async () => {
|
||||||
const response = await getPublicCategoryData(
|
const response = await getPublicCategoryData(
|
||||||
props.group == "mabes"
|
poldaName && String(poldaName)?.length > 1
|
||||||
? ""
|
|
||||||
: props.group == "polda" && poldaName && String(poldaName)?.length > 1
|
|
||||||
? poldaName
|
? poldaName
|
||||||
: props.group == "satker" &&
|
: satkerName && String(satkerName)?.length > 1
|
||||||
satkerName &&
|
|
||||||
String(satkerName)?.length > 1
|
|
||||||
? "satker-" + satkerName
|
? "satker-" + satkerName
|
||||||
: "",
|
: "",
|
||||||
"",
|
"",
|
||||||
|
|
@ -196,7 +192,6 @@ const FilterPage = (props: { group?: string; type: string }) => {
|
||||||
console.log("category", response);
|
console.log("category", response);
|
||||||
setCategories(response?.data?.data?.content);
|
setCategories(response?.data?.data?.content);
|
||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
function initState() {
|
function initState() {
|
||||||
if (dateRange[0] != null && dateRange[1] != null) {
|
if (dateRange[0] != null && dateRange[1] != null) {
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ const columns: ColumnDef<any>[] = [
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const FilterPage = (props: { group?: string; type: string }) => {
|
const FilterPage = () => {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const asPath = usePathname();
|
const asPath = usePathname();
|
||||||
const params = useParams();
|
const params = useParams();
|
||||||
|
|
@ -179,13 +179,9 @@ const FilterPage = (props: { group?: string; type: string }) => {
|
||||||
}, []);
|
}, []);
|
||||||
const initFetch = async () => {
|
const initFetch = async () => {
|
||||||
const response = await getPublicCategoryData(
|
const response = await getPublicCategoryData(
|
||||||
props.group == "mabes"
|
poldaName && String(poldaName)?.length > 1
|
||||||
? ""
|
|
||||||
: props.group == "polda" && poldaName && String(poldaName)?.length > 1
|
|
||||||
? poldaName
|
? poldaName
|
||||||
: props.group == "satker" &&
|
: satkerName && String(satkerName)?.length > 1
|
||||||
satkerName &&
|
|
||||||
String(satkerName)?.length > 1
|
|
||||||
? "satker-" + satkerName
|
? "satker-" + satkerName
|
||||||
: "",
|
: "",
|
||||||
"",
|
"",
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ const columns: ColumnDef<any>[] = [
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const FilterPage = (props: { group?: string; type: string }) => {
|
const FilterPage = () => {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const asPath = usePathname();
|
const asPath = usePathname();
|
||||||
const params = useParams();
|
const params = useParams();
|
||||||
|
|
@ -172,13 +172,9 @@ const FilterPage = (props: { group?: string; type: string }) => {
|
||||||
}, []);
|
}, []);
|
||||||
const fetchContent = async () => {
|
const fetchContent = async () => {
|
||||||
const response = await getPublicCategoryData(
|
const response = await getPublicCategoryData(
|
||||||
props.group == "mabes"
|
poldaName && String(poldaName)?.length > 1
|
||||||
? ""
|
|
||||||
: props.group == "polda" && poldaName && String(poldaName)?.length > 1
|
|
||||||
? poldaName
|
? poldaName
|
||||||
: props.group == "satker" &&
|
: satkerName && String(satkerName)?.length > 1
|
||||||
satkerName &&
|
|
||||||
String(satkerName)?.length > 1
|
|
||||||
? "satker-" + satkerName
|
? "satker-" + satkerName
|
||||||
: "",
|
: "",
|
||||||
"",
|
"",
|
||||||
|
|
@ -187,7 +183,6 @@ const FilterPage = (props: { group?: string; type: string }) => {
|
||||||
console.log("category", response);
|
console.log("category", response);
|
||||||
setCategories(response?.data?.data?.content);
|
setCategories(response?.data?.data?.content);
|
||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
function initState() {
|
function initState() {
|
||||||
if (dateRange[0] != null && dateRange[1] != null) {
|
if (dateRange[0] != null && dateRange[1] != null) {
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ const columns: ColumnDef<any>[] = [
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const FilterPage = (props: { group?: string; type: string }) => {
|
const FilterPage = () => {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const asPath = usePathname();
|
const asPath = usePathname();
|
||||||
const params = useParams();
|
const params = useParams();
|
||||||
|
|
@ -170,17 +170,13 @@ const FilterPage = (props: { group?: string; type: string }) => {
|
||||||
// }
|
// }
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
initFetch();
|
fetchContent();
|
||||||
}, []);
|
}, []);
|
||||||
const initFetch = async () => {
|
const fetchContent = async () => {
|
||||||
const response = await getPublicCategoryData(
|
const response = await getPublicCategoryData(
|
||||||
props.group == "mabes"
|
poldaName && String(poldaName)?.length > 1
|
||||||
? ""
|
|
||||||
: props.group == "polda" && poldaName && String(poldaName)?.length > 1
|
|
||||||
? poldaName
|
? poldaName
|
||||||
: props.group == "satker" &&
|
: satkerName && String(satkerName)?.length > 1
|
||||||
satkerName &&
|
|
||||||
String(satkerName)?.length > 1
|
|
||||||
? "satker-" + satkerName
|
? "satker-" + satkerName
|
||||||
: "",
|
: "",
|
||||||
"",
|
"",
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ const columns: ColumnDef<any>[] = [
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const FilterPage = (props: { group?: string; type: string }) => {
|
const FilterPage = () => {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const asPath = usePathname();
|
const asPath = usePathname();
|
||||||
const params = useParams();
|
const params = useParams();
|
||||||
|
|
@ -170,13 +170,9 @@ const FilterPage = (props: { group?: string; type: string }) => {
|
||||||
}, []);
|
}, []);
|
||||||
const fetchContent = async () => {
|
const fetchContent = async () => {
|
||||||
const response = await getPublicCategoryData(
|
const response = await getPublicCategoryData(
|
||||||
props.group == "mabes"
|
poldaName && String(poldaName)?.length > 1
|
||||||
? ""
|
|
||||||
: props.group == "polda" && poldaName && String(poldaName)?.length > 1
|
|
||||||
? poldaName
|
? poldaName
|
||||||
: props.group == "satker" &&
|
: satkerName && String(satkerName)?.length > 1
|
||||||
satkerName &&
|
|
||||||
String(satkerName)?.length > 1
|
|
||||||
? "satker-" + satkerName
|
? "satker-" + satkerName
|
||||||
: "",
|
: "",
|
||||||
"",
|
"",
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ const columns: ColumnDef<any>[] = [
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const FilterPage = (props: { group?: string; type: string }) => {
|
const FilterPage = () => {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const asPath = usePathname();
|
const asPath = usePathname();
|
||||||
const params = useParams();
|
const params = useParams();
|
||||||
|
|
@ -181,13 +181,9 @@ const FilterPage = (props: { group?: string; type: string }) => {
|
||||||
}, []);
|
}, []);
|
||||||
const initFetch = async () => {
|
const initFetch = async () => {
|
||||||
const response = await getPublicCategoryData(
|
const response = await getPublicCategoryData(
|
||||||
props.group == "mabes"
|
poldaName && String(poldaName)?.length > 1
|
||||||
? ""
|
|
||||||
: props.group == "polda" && poldaName && String(poldaName)?.length > 1
|
|
||||||
? poldaName
|
? poldaName
|
||||||
: props.group == "satker" &&
|
: satkerName && String(satkerName)?.length > 1
|
||||||
satkerName &&
|
|
||||||
String(satkerName)?.length > 1
|
|
||||||
? "satker-" + satkerName
|
? "satker-" + satkerName
|
||||||
: "",
|
: "",
|
||||||
"",
|
"",
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ const columns: ColumnDef<any>[] = [
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const FilterPage = (props: { group?: string; type: string }) => {
|
const FilterPage = () => {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const asPath = usePathname();
|
const asPath = usePathname();
|
||||||
const params = useParams();
|
const params = useParams();
|
||||||
|
|
@ -181,13 +181,9 @@ const FilterPage = (props: { group?: string; type: string }) => {
|
||||||
}, []);
|
}, []);
|
||||||
const initFetch = async () => {
|
const initFetch = async () => {
|
||||||
const response = await getPublicCategoryData(
|
const response = await getPublicCategoryData(
|
||||||
props.group == "mabes"
|
poldaName && String(poldaName)?.length > 1
|
||||||
? ""
|
|
||||||
: props.group == "polda" && poldaName && String(poldaName)?.length > 1
|
|
||||||
? poldaName
|
? poldaName
|
||||||
: props.group == "satker" &&
|
: satkerName && String(satkerName)?.length > 1
|
||||||
satkerName &&
|
|
||||||
String(satkerName)?.length > 1
|
|
||||||
? "satker-" + satkerName
|
? "satker-" + satkerName
|
||||||
: "",
|
: "",
|
||||||
"",
|
"",
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ const columns: ColumnDef<any>[] = [
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const FilterPage = (props: { group?: string; type: string }) => {
|
const FilterPage = () => {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const asPath = usePathname();
|
const asPath = usePathname();
|
||||||
const params = useParams();
|
const params = useParams();
|
||||||
|
|
@ -184,7 +184,7 @@ const FilterPage = (props: { group?: string; type: string }) => {
|
||||||
}, []);
|
}, []);
|
||||||
const initFetch = async () => {
|
const initFetch = async () => {
|
||||||
const response = await getPublicCategoryData(
|
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
|
locale == "en" ? true : false
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ const columns: ColumnDef<any>[] = [
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const FilterPage = (props: { group?: string; type: string }) => {
|
const FilterPage = () => {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const asPath = usePathname();
|
const asPath = usePathname();
|
||||||
const params = useParams();
|
const params = useParams();
|
||||||
|
|
@ -176,13 +176,9 @@ const FilterPage = (props: { group?: string; type: string }) => {
|
||||||
}, []);
|
}, []);
|
||||||
const initFetch = async () => {
|
const initFetch = async () => {
|
||||||
const response = await getPublicCategoryData(
|
const response = await getPublicCategoryData(
|
||||||
props.group == "mabes"
|
poldaName && String(poldaName)?.length > 1
|
||||||
? ""
|
|
||||||
: props.group == "polda" && poldaName && String(poldaName)?.length > 1
|
|
||||||
? poldaName
|
? poldaName
|
||||||
: props.group == "satker" &&
|
: satkerName && String(satkerName)?.length > 1
|
||||||
satkerName &&
|
|
||||||
String(satkerName)?.length > 1
|
|
||||||
? "satker-" + satkerName
|
? "satker-" + satkerName
|
||||||
: "",
|
: "",
|
||||||
"",
|
"",
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
After Width: | Height: | Size: 42 KiB |
Loading…
Reference in New Issue