Fakultas Ilmu Komputer UI

Commit 3310736c authored by Sean Zeliq Urian's avatar Sean Zeliq Urian
Browse files

Merge branch 'sean/tampilan-tabel-statistik-kasus' into 'staging'

[CHORUS] change age range from "&" to "-"

See merge request !43
parents c176d295 ac2778bf
Pipeline #79980 passed with stages
in 10 minutes and 39 seconds
......@@ -650,10 +650,10 @@ function Statistic({
onChange={async (searchVal: string, page: number) => {
let tempData = [];
if (searchVal) {
if(type === StatisticType.Age && searchVal.toLowerCase().split("&", 2).length > 1) {
if(type === StatisticType.Age && searchVal.toLowerCase().split("-", 2).length > 1) {
tempData = tableData.filter(
(val) => parseInt(searchVal.toLowerCase().split("&", 2)[0]) <= parseInt(val[0].toLowerCase())
&& parseInt(val[0].toLowerCase()) <= parseInt(searchVal.toLowerCase().split("&", 2)[1])
(val) => parseInt(searchVal.toLowerCase().split("-", 2)[0]) <= parseInt(val[0].toLowerCase())
&& parseInt(val[0].toLowerCase()) <= parseInt(searchVal.toLowerCase().split("-", 2)[1])
);
}
else {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment