<!-- Die Seite diehnt zur Anzeige von Prüfaufträgen die im LIMS angelegt wurden. Die Daten werden in einer Tabelle angezeigt. -->

<!DOCTYPE html>
<html>
<head>

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1" charset="utf-8">
<?xml version="1.0" encoding="UTF-8"?>

<title>Probenliste</title>
<link rel="icon" type="image/x-icon" href="Logo_blomes_fl_2.png">

<!-- <link rel="stylesheet"
	href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
	integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T"
	crossorigin="anonymous"> -->

<link rel="stylesheet" href="style.css"></link>
<link rel="stylesheet" href="arbeitslisteStyle.css"></link>

<link rel="stylesheet" href="styleTable.css"></link>

<!-- Script für logout und autologout -->
<script src="scriptLogout.js"></script>
<!-- Skript für Icons -->
<!--  <script src='https://kit.fontawesome.com/a076d05399.js' crossorigin='anonymous'></script> -->

</head>

<!-- Menü der Website. Diese Seite muss den Tag class="active" enthalten, damit der Menüpunkt richtig gekennzeichnet ist -->
<body>
	<header id ="section-0" class="header">
		<div class="container">
			<div class="row align-items-center justify-content-between">
				<div class="logo">
					<!-- <a href="/happycodingRestServiceClient/src/main/webapp/Logo_blomesystem.png">Logo</a> -->
					<img class="logoimg" src="gus_lab_logo_genii_1.png" onclick="window.open('https://gus-lab.com/', '_blank');" style="width: 200px; height: auto;">
				</div>
				<input type="checkbox" id="nav-check"> 
				<label
					for="nav-check" class="nav-toggler"> <span></span>
				</label>
				<nav class="nav" style="z-index: 10">
					<ul>
					<!-- seitenwechsel aus scriptLogout.js muss ausgeführt werden da der Benutzer sonst ausgeloggt wird (außer er wechselt die Seite innerhalb der Web-App)-->
						<!-- <li><a href="index.html">Login</a></li> -->
						<li><a onclick="seitenwechsel()" href="probenliste.html" class="active">Probenliste</a></li>
						<!--  <li><a onclick="seitenwechsel()" href="scanner.html">Probenscanner</a></li>-->
						<li><a onclick="seitenwechsel()" href="probenbearbeitung.html">Probenbearbeitung</a></li>
						<!--   <li><a onclick="seitenwechsel()" href="administrator.html">Administrator</a></li> -->
						<!-- <li><a onclick="seitenwechsel()" href="help.html">Info</a></li>-->


					</ul>
				</nav>
			</div>
		</div>
	</header>
</head>

<!-- Kontroliert ob ein Login die automatisch Ablaufzeit überschritten hat und loggt den Benutzer gegebenenfalls aus. Begrüßt den Benutzer mit Benutzernamen. -->
<p id="loginstatus" style="text-align: right;  margin-bottom: 0px;" >Login Status</p>
<script type="text/javascript" charset="UTF-8" src="scriptLoginStatus.js"></script>
<!-- Benutzer kann sich abmelden, script oben einbinden ("scriptLogout.js") -->
<div style = "display: flex; justify-content: flex-end;  margin-top: 0px;">
    <button id="logoutbutton" onclick="logout()" style="padding: 2px; font-family: sans-serif; font-size: 12px; font-size:100%;" >Abmelden</button>
</div>

<h1 style="font-family:verdana; font-size: 150%; font-weight: bold; margin-bottom: 10px; margin-top: 10px;">Probenliste</h1>

<!-- <i class='fas fa-clipboard-check'></i> -->
<div id="navigation" style="float:right; display: flex; position: fixed; bottom: 20px; right: 20px; z-index: 9;" >
 <button class="floatingButton" type="button" onclick="checkLoginStatusAndNewTime(); seitenwechsel(); gotoProbenanzeigeMultLoad();">Proben-<br>auswahl<br>laden</button>
</div>

<div>
	<button type="button" onclick="checkLoginStatusAndNewTime(); klickAktualisieren();" style="margin-bottom: 10px; margin-top: 10px;" >Aktualisieren</button>
</div>


<!-- Mit den Buttons können die Tabelleneinträge auf verschiedenen Weise textuell gefiltert werden. -->
<!-- wird nicht mehr verwendet -->
<!--  
<div id="butn" align="left" style="margin-top: 10px;">
	<a> Filter: </a>
    <a><input type="button" class="button_example" value="Status Text" onclick="checkLoginStatusAndNewTime(); filterByStatusText()" /></a>
    <a><input type="button" style="display: none;" class="button_example" value="Status"  onclick="checkLoginStatusAndNewTime(); filterByStatus()" /></a>
    <a><input type="button" class="button_example" value="Sample Number"  onclick="checkLoginStatusAndNewTime(); filterBySampleNumber()"/></a>
    <a><input type="button" class="button_example" value="Id"  onclick="checkLoginStatusAndNewTime(); filterById()"/></a>
</div>
-->
<!-- Textuelle Eingabe zur Filterung der Tabelle. -->
<!-- wird nicht mehr verwendet -->
<!--  
<div class="row" >
	<div class="col" >
		<div class="card card-body" style="background-color: rgb(210, 217, 221);">
			<input id="search-input" class="from-control" type="text" placeholder="Gefiltert durch Status Text" onkeydown="checkLoginStatusAndNewTime()" onkeyup="userInputFilter()" style="width: 200px;">
		</div>
	</div>
</div>
-->
<!-- Tabelle zum anzeigen der Arbeitsliste mit Proben die im LIMS angelegt wurden. -->
<!-- Beispiel, falls eine Tabelle nicht angezeigt werden soll -->
<!-- <th name="sortColumn" id="tabellenSpalte3" columnId="2" style="display: none;" data-column="status" order="desc" style="cursor: pointer;" onclick="checkLoginStatusAndNewTime(); sortTable(getElementById('tabellenSpalte3').id)">Status &#9650</th> -->

<table id="arbeitslistenTabelle" class="table table-striped">
	<thead>
	<tr class="bg-info">
		<th name="sortColumn" id="tabellenSpalte1" columnId="0" style="display: none;" data-column="id" order="desc" style="cursor: pointer;" onclick="checkLoginStatusAndNewTime(); sortTable(getElementById('tabellenSpalte1').id)">Id &#9650</th>
		<th name="sortColumn" id="tabellenSpalte2" columnId="1" style="display: none;" data-column="exportId" order="desc" style="cursor: pointer;" onclick="checkLoginStatusAndNewTime(); sortTable(getElementById('tabellenSpalte2').id)">Export Id &#9650</th>
		<th name="sortColumn" id="tabellenSpalte3" columnId="2" data-column="kennung" order="desc" style="cursor: pointer;" onclick="checkLoginStatusAndNewTime(); sortTable(getElementById('tabellenSpalte3').id)">Kennung &#9650</th>
		<th name="sortColumn" id="tabellenSpalte4" columnId="3" data-column="probenNr" order="desc" style="cursor: pointer;" onclick="checkLoginStatusAndNewTime(); sortTable(getElementById('tabellenSpalte4').id)">Probennr. &#9650</th>
		<th name="sortColumn" id="tabellenSpalte5" columnId="4" data-column="pnsNr" order="desc" style="cursor: pointer;" onclick="checkLoginStatusAndNewTime(); sortTable(getElementById('tabellenSpalte5').id)">PNS Nr. &#9650</th>
		<th name="sortColumn" id="tabellenSpalte6" columnId="5" data-column="kennungAg" order="desc" style="cursor: pointer;" onclick="checkLoginStatusAndNewTime(); sortTable(getElementById('tabellenSpalte6').id)">Kennung Ag &#9650</th>
		<th name="sortColumn" id="tabellenSpalte7" columnId="6" data-column="eingVergabelaborDatum" order="desc" style="cursor: pointer;" onclick="checkLoginStatusAndNewTime(); sortTable(getElementById('tabellenSpalte7').id)">Eingang Datum &#9650</th>
		<th name="sortColumn" id="tabellenSpalte8" columnId="7" data-column="untersuchungFertig" order="desc" style="cursor: pointer;" onclick="checkLoginStatusAndNewTime(); sortTable(getElementById('tabellenSpalte8').id)">Untersuchung fertig &#9650</th>
		<th name="sortColumn" id="tabellenSpalte9" columnId="8" data-column="untersuchungFertigDatum" order="desc" style="cursor: pointer;" onclick="checkLoginStatusAndNewTime(); sortTable(getElementById('tabellenSpalte9').id)">Untersuchung fertig Datum &#9650</th>
		<th name="sortColumn" id="tabellenSpalte10" columnId="9" data-column="importNeueDbDatum" order="desc" style="cursor: pointer;" onclick="checkLoginStatusAndNewTime(); sortTable(getElementById('tabellenSpalte10').id)">Import Datum &#9650</th>
		<th name="sortColumn" id="tabellenSpalte11" columnId="10" data-column="exportNeueDbDatum" order="desc" style="cursor: pointer;" onclick="checkLoginStatusAndNewTime(); sortTable(getElementById('tabellenSpalte11').id)">Export Datum &#9650</th>
		<th name="sortColumn" id="tabellenSpalte12" columnId="11" data-column="webStatus" order="desc" style="cursor: pointer;" onclick="checkLoginStatusAndNewTime(); sortTable(getElementById('tabellenSpalte12').id)">Status &#9650</th>
		<th name="sortColumn" id="tabellenSpalte13" columnId="12" data-column="untersuchungsumfang" order="desc" style="cursor: pointer;" onclick="checkLoginStatusAndNewTime(); sortTable(getElementById('tabellenSpalte13').id)">Untersuchungsumfang &#9650</th>
		<th style="text-align: center; width: 125px;">Auswahl</th>
	</tr>
	
			<!-- Inputfelder für Fiterung pro Spalte -->
	          <tr>
              <!--   <th><input type="text" id="filterId" placeholder="Id filtern" style="display: none;"></th>
                <th><input type="text" id="filterExportId" placeholder="Export Id filtern" style="display: none;"></th>              
                -->
                <th><input type="text" id="filterKennung" placeholder="Kennung filtern" style="width: 100%; box-sizing: border-box;" onkeyup="debouncedUserInputFilter2('filterKennung', '2')" onclick="checkLoginStatusAndNewTime()"></th>               
                <th><input type="text" id="filterProbenNr" placeholder="ProbenNr filtern" style="width: 100%; box-sizing: border-box;" onkeyup="debouncedUserInputFilter2('filterProbenNr', '3')" onclick="checkLoginStatusAndNewTime()"></th>
                <th><input type="text" id="filterPnsNr" placeholder="PNS NR filtern" style="width: 100%; box-sizing: border-box;" onkeyup="debouncedUserInputFilter2('filterPnsNr', '4')" onclick="checkLoginStatusAndNewTime()"></th>
                <th><input type="text" id="filterKennungAg" placeholder="KennungAg filtern" style="width: 100%; box-sizing: border-box;" onkeyup="debouncedUserInputFilter2('filterKennungAg', '5')" onclick="checkLoginStatusAndNewTime()"></th>               
                <th><input type="text" id="filterEingVergabelaborDatum" placeholder="Eingangsdatum filtern" style="width: 100%; box-sizing: border-box;" onkeyup="debouncedUserInputFilter2('filterEingVergabelaborDatum', '6')" onclick="checkLoginStatusAndNewTime()"></th>
                <th><input type="text" id="filterUntersuchungFertig" placeholder="Untersuchung fertig filtern" style="width: 100%; box-sizing: border-box;" onkeyup="debouncedUserInputFilter2('filterUntersuchungFertig', '7')" onclick="checkLoginStatusAndNewTime()"></th>
                <th><input type="text" id="filterUntersuchungFertigDatum" placeholder="Untersuchung fertig Datum filtern" style="width: 100%; box-sizing: border-box;" onkeyup="debouncedUserInputFilter2('filterUntersuchungFertigDatum', '8')" onclick="checkLoginStatusAndNewTime()"></th>               
                <th><input type="text" id="filterImportNeueDbDatum" placeholder="Importdatum filtern" style="width: 100%; box-sizing: border-box;" onkeyup="debouncedUserInputFilter2('filterImportNeueDbDatum', '9')" onclick="checkLoginStatusAndNewTime()"></th>
                <th><input type="text" id="filterExportNeueDbDatum" placeholder="Exportdatum filtern" style="width: 100%; box-sizing: border-box;" onkeyup="debouncedUserInputFilter2('filterExportNeueDbDatum', '10')" onclick="checkLoginStatusAndNewTime()"></th>
                <th><input type="text" id="filterWebStatus" placeholder="Status filtern" style="width: 100%; box-sizing: border-box;" onkeyup="debouncedUserInputFilter2('filterWebStatus', '11')" onclick="checkLoginStatusAndNewTime()"></th>              
                <th><input type="text" id="filterUntersuchungsumfang" placeholder="Untersuchungsumfang filtern" style="width: 100%; box-sizing: border-box;" onkeyup="debouncedUserInputFilter2('filterUntersuchungsumfang', '12')" onclick="checkLoginStatusAndNewTime()"></th>
                <th><input type="text" id="filterAuswahl" placeholder="Auswahl filtern" style="display: none;"></th>
                
            </tr>
	</thead>
	<tbody id="myTable">

	</tbody>
</table>

<script src="probenlisteScript2.js"></script>

 <br>
 
 <p style="display:none;">Probenauswahl: </p>
 <p id="checkboxList" style="display:none;"></p>

<!-- Ein Link am Ende der Seite, der zum Anfang der Seite springt. -->
	<p style="margin-bottom: 20px; margin-top: 20px;">
      <a style="color: rgb(41, 148, 171);" href="#section-0">Seitenanfang</a>
    </p>

</body>
</html>