diff --git a/resources/views/admin/home.blade.php b/resources/views/admin/home.blade.php index de50072..1669938 100644 --- a/resources/views/admin/home.blade.php +++ b/resources/views/admin/home.blade.php @@ -240,7 +240,7 @@ @@ -516,10 +516,25 @@ setBarChartOption($(this).val()) }) } + function hospitalSelectListner () { + if (window.location.search) { + var project_id = window.location.search.split("=") + if (project_id[1]) { + $("[name=hospital-select] option[value="+project_id[1]+"]").prop("selected",true) + } + } + + $("[name=hospital-select]").change(function () { + var url = window.location.origin + window.location.pathname; + url += ("?project_id=" + $(this).val()); + window.open(url,'_self'); + }) + } (function () { initPieChart() initBarChart() typeSwitchListener() + hospitalSelectListner() })() @endpush