Merge branch 'AddressDB/add-new-tool-type-field' into 'master'

Address db/add new tool type field

See merge request fronk/thetool!1394
This commit is contained in:
Luca Haid
2025-05-27 14:08:34 +00:00

View File

@@ -27,6 +27,14 @@ $pagination_entity_name = "Vorbestellungen";
max-width: 650px;
}
.tr-highlight {
background-color: #a0eaaf !important;
}
.tr-highlight .status {
border-radius: unset !important;
}
.is-billed-button {
padding:6px;
padding-left: 8px;
@@ -487,8 +495,32 @@ $pagination_entity_name = "Vorbestellungen";
<th></th>
<th></th>
</tr>
<?php foreach($preorders as $preorder): ?>
<tr class="preorder-list-tr" id="preorder-<?=$preorder->id?>">
<?php foreach($preorders as $preorder):
$hasStatus245 = false;
foreach (PreorderstatusModel::getAll() as $status) {
if ($preorder->status_id == $status->id && $status->code == 245) {
$hasStatus245 = true;
break;
}
}
$requiredFlagIds = [1, 3, 4, 5];
$allFlagsChecked = true;
foreach ($requiredFlagIds as $flagId) {
if (!array_key_exists($flagId, $preorder->statusflags) ||
!$preorder->statusflags[$flagId]->value ||
!$preorder->statusflags[$flagId]->value->value) {
$allFlagsChecked = false;
break;
}
}
$doHighlight = $hasStatus245 && $allFlagsChecked;
?>
<tr class="preorder-list-tr <?=($doHighlight) ? " tr-highlight" : ""?>" id="preorder-<?=$preorder->id?>">
<?php if(!$me->is(["preorderfront"]) && !$me->is("preorderreadonly")): ?>
<td class="bg-lightblue border border-end text-center pointer" onclick="togglePreorder(<?=$preorder->id?>); return false;">
<i class="fas fa-fw fa-angle-down"></i>