Commit 2b7c09c1 authored by bensinober's avatar bensinober
Browse files

Revert "DEICH-5889 koha: add handling (and colour) for c/o items checkin"

This reverts commit 5fef0752.
parent 5fef0752
...@@ -434,14 +434,9 @@ class RFIDConnectorEventSource extends HTMLElement { ...@@ -434,14 +434,9 @@ class RFIDConnectorEventSource extends HTMLElement {
<div id="checkins" class="output-table"> <div id="checkins" class="output-table">
<style> <style>
:root { :root {
--deich-green: #53f3c5; /* col-ok-2 */ --deich-lilac: #ae87f8;
--deich-green-dark: #085c58; /* col-ok-3 */ --deich-red: #f9869d;
--deich-beige: #dac9bc; /* col-ok-4 */ --deich-orange: #f8aa87;
--deich-orange: #fbcd83; /* col-ok-5 */
--deich-lightred: #fb9687; /* col-ok-6 */
--deich-darkred: #fa4343; /* col-red */
--deich-yellow: #fffe07; /* col-yellow */
--green: #87f8bc; --green: #87f8bc;
--blue: #87dff8; --blue: #87dff8;
--backgrey: #eee; --backgrey: #eee;
...@@ -451,18 +446,17 @@ class RFIDConnectorEventSource extends HTMLElement { ...@@ -451,18 +446,17 @@ class RFIDConnectorEventSource extends HTMLElement {
.table thead th { background-color: var(--tblgrey2); } .table thead th { background-color: var(--tblgrey2); }
.table td { background-color: transparent !important; } .table td { background-color: transparent !important; }
.alert { background-color: var(--deich-orange); } .alert { background-color: var(--deich-orange); }
.co { background-color: var(--blue); }
.fail { background-color: var(--deich-red); } .fail { background-color: var(--deich-red); }
.pickup { background-color: var(--deich-lilac); } .pickup { background-color: var(--deich-lilac); }
.highlight-green { .highlight-green {
background-color: var(--deich-green); background-color: lightgreen;
animation-name: fade; animation-name: fade;
animation-fill-mode: forwards; animation-fill-mode: forwards;
animation-duration: 3s; animation-duration: 3s;
animation-delay: 0s; animation-delay: 0s;
} }
@keyframes fade { @keyframes fade {
0% { background-color: var(--deich-green); } 0% { background-color: lightgreen; }
100% { background-color: transparent; } 100% { background-color: transparent; }
} }
</style> </style>
...@@ -487,12 +481,13 @@ class RFIDConnectorEventSource extends HTMLElement { ...@@ -487,12 +481,13 @@ class RFIDConnectorEventSource extends HTMLElement {
</div>` </div>`
doc.appendChild(div) doc.appendChild(div)
} }
_updateCheckInTable(msg, item) { _updateCheckInTable(msg, item) {
const checkInItems = document.getElementById("rfidItems") const checkInItems = document.getElementById("rfidItems")
const newRow = document.createElement("tr") const newRow = document.createElement("tr")
const { title, author } = item.biblio const { title, author } = item.biblio
let mediatype = "" let mediatype = ""
if (item.metadata) { if (item.medtadata) {
mediatype = item.metadata.mediatype mediatype = item.metadata.mediatype
} }
const { itemcallnumber, location, timestamp, barcode } = item.item const { itemcallnumber, location, timestamp, barcode } = item.item
...@@ -505,9 +500,8 @@ class RFIDConnectorEventSource extends HTMLElement { ...@@ -505,9 +500,8 @@ class RFIDConnectorEventSource extends HTMLElement {
} else if (DataCorrupted) { } else if (DataCorrupted) {
error = `Feil/manglede brikker: ${DataCorrupted}` error = `Feil/manglede brikker: ${DataCorrupted}`
} }
/* Destination is always calculated on checkin, based on location goes/co/lives, so we do not care about location */
if (item.destination) { if (item.destination) {
sortLabel = item.destination.destLabel ? `${item.destination.destBranch} ${item.destination.destLabel}` : item.destination.destBranch sortLabel = item.destination.destLabel ? item.destination.destLabel : item.destination.destBranch
alert = item.destination.note ? item.destination.note : null alert = item.destination.note ? item.destination.note : null
destBranch = item.destination.dest.split(".")[0] destBranch = item.destination.dest.split(".")[0]
if (/pickup/.test(item.destination.dest)) { if (/pickup/.test(item.destination.dest)) {
...@@ -566,8 +560,6 @@ class RFIDConnectorEventSource extends HTMLElement { ...@@ -566,8 +560,6 @@ class RFIDConnectorEventSource extends HTMLElement {
if (error) { if (error) {
newRow.classList.add("fail") newRow.classList.add("fail")
} else if (item.location.co) {
newRow.classList.add("co")
} else if (alert) { } else if (alert) {
newRow.classList.add("alert") newRow.classList.add("alert")
} else if (pickup) { } else if (pickup) {
...@@ -592,18 +584,10 @@ class RFIDConnectorEventSource extends HTMLElement { ...@@ -592,18 +584,10 @@ class RFIDConnectorEventSource extends HTMLElement {
:root { :root {
--deich-lilac: #ae87f8; --deich-lilac: #ae87f8;
--deich-red: #f9869d; --deich-red: #f9869d;
--deich-orange: #f8aa87;
--green: #87f8bc; --green: #87f8bc;
--blue: #87dff8; --blue: #87dff8;
--deich-blue: #38396a; /* col-ok-1 */ --backgrey: #eee;
--deich-green: #53f3c5; /* col-ok-2 */
--deich-green-dark: #085c58; /* col-ok-3 */
--deich-beige: #dac9bc; /* col-ok-4 */
--deich-orange: #fbcd83; /* col-ok-5 */
--deich-lightred: #fb9687; /* col-ok-6 */
--deich-darkred: #fa4343; /* col-red */
--deich-yellow: #fffe07; /* col-yellow */
--backgrey: #eaeaea;
--tblgrey1: #ddd; --tblgrey1: #ddd;
--tblgrey2: #ccc; --tblgrey2: #ccc;
} }
......
Markdown is supported
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