Filter manage-booking workers by service category
Guests modifying a booking saw every worker for the subpage, so an eyelash booking exposed nail-only workers as switchable. Now the worker list is scoped to the booking's service category, other-category services are disabled in step 1, and the process handler rejects any worker/service category mismatch to defend against crafted POSTs. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
4a93b5efa0
commit
f86952dc95
@@ -338,6 +338,7 @@
|
||||
<?php
|
||||
foreach($groups[$label] as $serviceItem){
|
||||
$isChecked = in_array($serviceItem->service_id, $selectedServiceIds);
|
||||
$isOtherCategory = ($categorySlug !== '' && $serviceItem->serv_cat_slug !== $categorySlug);
|
||||
?>
|
||||
<div class="serviceRow">
|
||||
<div class="serviceCol serviceNameCol" id="serviceName_<?php echo $serviceItem->service_id; ?>">
|
||||
@@ -362,7 +363,8 @@
|
||||
id="<?php echo $serviceItem->service_id; ?>"
|
||||
name="service_<?php echo $serviceItem->service_id; ?>"
|
||||
value="1"
|
||||
<?php echo $isChecked ? 'checked' : ''; ?>/>
|
||||
<?php echo $isChecked ? 'checked' : ''; ?>
|
||||
<?php echo $isOtherCategory ? 'disabled' : ''; ?>/>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
Reference in New Issue
Block a user