diff --git a/assets/css/app/tables.css b/assets/css/app/tables.css index b2d8882c..2fee7b71 100644 --- a/assets/css/app/tables.css +++ b/assets/css/app/tables.css @@ -125,3 +125,25 @@ Classes for Datatables export .export-helper{ display: none; } + +/********************************************************** +* Table row highlighting tools +***********************************************************/ + +.row-highlight { + box-shadow: 0 4px 15px rgba(0,0,0,0.20); /* Adds depth */ + position: relative; + z-index: 1; /* Ensures the shadow overlaps other rows */ + border-left: 5px solid var(--bs-primary); /* Adds a vertical accent bar */ +} + +@keyframes pulse-highlight { + 0% { outline: 2px solid transparent; } + 50% { outline: 2px solid var(--bs-primary); } + 100% { outline: 2px solid transparent; } +} + +.row-pulse { + animation: pulse-highlight 1s ease-in-out; + animation-iteration-count: 3; +} diff --git a/src/Controller/PartController.php b/src/Controller/PartController.php index 3a121ad2..ef2bae5f 100644 --- a/src/Controller/PartController.php +++ b/src/Controller/PartController.php @@ -135,6 +135,7 @@ final class PartController extends AbstractController 'description_params' => $this->partInfoSettings->extractParamsFromDescription ? $parameterExtractor->extractParameters($part->getDescription()) : [], 'comment_params' => $this->partInfoSettings->extractParamsFromNotes ? $parameterExtractor->extractParameters($part->getComment()) : [], 'withdraw_add_helper' => $withdrawAddHelper, + 'highlightLotId' => $request->query->getInt('highlightLot', 0), ] ); } diff --git a/src/Services/LabelSystem/BarcodeScanner/BarcodeRedirector.php b/src/Services/LabelSystem/BarcodeScanner/BarcodeRedirector.php index 2de7c035..d5ddc1de 100644 --- a/src/Services/LabelSystem/BarcodeScanner/BarcodeRedirector.php +++ b/src/Services/LabelSystem/BarcodeScanner/BarcodeRedirector.php @@ -92,7 +92,7 @@ final class BarcodeRedirector throw new EntityNotFoundException(); } - return $this->urlGenerator->generate('app_part_show', ['id' => $lot->getPart()->getID()]); + return $this->urlGenerator->generate('app_part_show', ['id' => $lot->getPart()->getID(), 'highlightLot' => $lot->getID()]); case LabelSupportedElement::STORELOCATION: return $this->urlGenerator->generate('part_list_store_location', ['id' => $barcodeScan->target_id]); diff --git a/templates/parts/info/_part_lots.html.twig b/templates/parts/info/_part_lots.html.twig index b0dcb455..1ef25ae4 100644 --- a/templates/parts/info/_part_lots.html.twig +++ b/templates/parts/info/_part_lots.html.twig @@ -19,7 +19,7 @@ {% for lot in part.partLots %} - + {{ lot.description }} {% if lot.storageLocation %} @@ -117,4 +117,4 @@ - \ No newline at end of file +