diff --git a/app/Controllers/API_Dashboard.php b/app/Controllers/API_Dashboard.php index 7383bc1..e80bad1 100644 --- a/app/Controllers/API_Dashboard.php +++ b/app/Controllers/API_Dashboard.php @@ -11,9 +11,9 @@ class API_Dashboard extends ResourceController { // Mengetahui Apakah User Login adalah Bali atau Surabaya $cityid = session()->get('usercityid'); if ($cityid == 1) { - $filter_query = " AND sr.HOSTORDERNUMBER LIKE 'B%' "; + $filter_query = " AND (sr.HOSTORDERNUMBER LIKE 'B%' OR sr.HOSTORDERNUMBER LIKE 'Z%')"; } elseif ($cityid == 2) { - $filter_query = " AND sr.HOSTORDERNUMBER LIKE 'S%' "; + $filter_query = " AND (sr.HOSTORDERNUMBER LIKE 'S%' OR sr.HOSTORDERNUMBER LIKE 'X%')"; } else { $filter_query = " "; } $db = \Config\Database::connect(); diff --git a/app/Views/admin/dashboard.php b/app/Views/admin/dashboard.php index b61089c..79d4612 100644 --- a/app/Views/admin/dashboard.php +++ b/app/Views/admin/dashboard.php @@ -120,6 +120,15 @@ function index() { accessnumber = data[i].SP_ACCESSNUMBER; patname = data[i].NAME; hon = data[i].HOSTORDERNUMBER; + // Khusus untuk data Testing + let testing_test = ""; + if (hon != null) { // Jaga" Kalau ada yg Null + if (hon[0] === 'X' || hon[0] === 'Z') { + testing_test = "
testing tm

"; + } else { + testing_test = ""; + } + } tests = data[i].TESTS; stat = data[i].STATS; if(stat == 'Pend') { @@ -156,7 +165,7 @@ function index() { stattext = 'Validated'; } let datarow = "" + - "" + colldate + '
'+ colltime +' ' + patnumber + ' ' + patname.trim() + " " + accessnumber + "
" +" " + hon + "
" + tests + '' + + "" + colldate + '
'+ colltime +' ' + patnumber + ' ' + patname.trim() + " " + accessnumber +"
" +" " + testing_test + hon +"
" + tests + '' + ""+stattext+"" + "

" +''; $("#table-body").append(datarow); diff --git a/app/Views/fo/dashboard.php b/app/Views/fo/dashboard.php index 74916b7..92d8366 100644 --- a/app/Views/fo/dashboard.php +++ b/app/Views/fo/dashboard.php @@ -120,6 +120,12 @@ function index() { accessnumber = data[i].SP_ACCESSNUMBER; patname = data[i].NAME; hon = data[i].HOSTORDERNUMBER; + let testing_test = ""; + if (hon[0] === 'X' || hon[0] === 'Z') { + testing_test = "
testing tm

"; + } else { + testing_test = ""; + } tests = data[i].TESTS; stat = data[i].STATS; if(stat == 'Pend') { @@ -156,7 +162,7 @@ function index() { stattext = 'Validated'; } let datarow = "" + - "" + colldate + '
'+ colltime +' ' + patnumber + ' ' + patname.trim() + " " + accessnumber + "
" +" " + hon + "
" + tests + '' + + "" + colldate + '
'+ colltime +' ' + patnumber + ' ' + patname.trim() + " " + accessnumber + "
" +" " + testing_test + hon + "
" + tests + '' + ""+stattext+"" + "

" +''; $("#table-body").append(datarow); diff --git a/app/Views/sampling/dashboard.php b/app/Views/sampling/dashboard.php index f374a63..c41f8b7 100644 --- a/app/Views/sampling/dashboard.php +++ b/app/Views/sampling/dashboard.php @@ -120,6 +120,12 @@ function index() { accessnumber = data[i].SP_ACCESSNUMBER; patname = data[i].NAME; hon = data[i].HOSTORDERNUMBER; + let testing_test = ""; + if (hon[0] === 'X' || hon[0] === 'Z') { + testing_test = "
testing tm

"; + } else { + testing_test = ""; + } tests = data[i].TESTS; stat = data[i].STATS; if(stat == 'Pend') { @@ -156,7 +162,7 @@ function index() { stattext = 'Validated'; } let datarow = "" + - "" + colldate + '
'+ colltime +' ' + patnumber + ' ' + patname.trim() + " " + accessnumber + "
" +" " + hon + "
" + tests + '' + + "" + colldate + '
'+ colltime +' ' + patnumber + ' ' + patname.trim() + " " + accessnumber + "
" +" " + testing_test + hon + "
" + tests + '' + ""+stattext+"" + "

" +''; $("#table-body").append(datarow); diff --git a/app/Views/user/dashboard.php b/app/Views/user/dashboard.php index 7478c5b..6d03140 100644 --- a/app/Views/user/dashboard.php +++ b/app/Views/user/dashboard.php @@ -120,6 +120,12 @@ function index() { accessnumber = data[i].SP_ACCESSNUMBER; patname = data[i].NAME; hon = data[i].HOSTORDERNUMBER; + let testing_test = ""; + if (hon[0] === 'X' || hon[0] === 'Z') { + testing_test = "
testing tm

"; + } else { + testing_test = ""; + } tests = data[i].TESTS; stat = data[i].STATS; if(stat == 'Pend') { @@ -156,7 +162,7 @@ function index() { stattext = 'Validated'; } let datarow = "" + - "" + colldate + '
'+ colltime +' ' + patnumber + ' ' + patname.trim() + " " + accessnumber + "
" +" " + hon + "
" + tests + '' + + "" + colldate + '
'+ colltime +' ' + patnumber + ' ' + patname.trim() + " " + accessnumber + "
" +" " + testing_test + hon + "
" + tests + '' + ""+stattext+"" + "

" +''; $("#table-body").append(datarow);