view category, attribute options table

This commit is contained in:
2025-03-31 20:52:12 -07:00
parent 5a2582a333
commit fad4f575b8
2 changed files with 2 additions and 6 deletions

View File

@@ -65,7 +65,7 @@ class ProductCategoryAttributeOptionsTable extends Table
public function validationDefault(Validator $validator): Validator
{
$validator
->integer('product_category_attribute_id')
->uuid('product_category_attribute_id')
->notEmptyString('product_category_attribute_id');
$validator
@@ -96,7 +96,7 @@ class ProductCategoryAttributeOptionsTable extends Table
*/
public function buildRules(RulesChecker $rules): RulesChecker
{
$rules->add($rules->existsIn(['product_category_attribute_id'], 'ProductCategoryAttributes'), ['errorField' => '0']);
$rules->add($rules->existsIn(['product_category_attribute_id'], 'ProductCategoryAttributes'), ['errorField' => 'product_category_attribute_id']);
return $rules;
}

View File

@@ -75,16 +75,12 @@
<table>
<tr>
<th><?= __('Name') ?></th>
<th><?= __('Options') ?></th>
<th><?= __('Enabled') ?></th>
<th class="actions"><?= __('Actions') ?></th>
</tr>
<?php foreach ($productCategory->product_category_attributes as $productCategoryAttribute) : ?>
<tr>
<td><?= h($productCategoryAttribute->name) ?></td>
<td>
options
</td>
<td><?= h($productCategoryAttribute->enabled) ?></td>
<td class="actions">
<?= $this->Html->link(__('View'), ['controller' => 'ProductCategoryAttributes', 'action' => 'view', $productCategoryAttribute->id]) ?>