v0.0.15 - catalags & apis many to many wip

This commit is contained in:
2025-03-31 00:48:00 -07:00
parent ce74025f6c
commit 4c65d23e2b
8 changed files with 173 additions and 69 deletions

View File

@@ -1,7 +1,7 @@
<?php
/**
* @var \App\View\AppView $this
* @var \Cake\Datasource\EntityInterface $externalProductCatalog
* @var \App\Model\Entity\ExternalProductCatalog $externalProductCatalog
*/
?>
<div class="row">
@@ -18,10 +18,6 @@
<div class="externalProductCatalogs view content">
<h3><?= h($externalProductCatalog->base_url) ?></h3>
<table>
<tr>
<th><?= __('Product Catalog') ?></th>
<td><?= $externalProductCatalog->hasValue('product_catalog') ? $this->Html->link($externalProductCatalog->product_catalog->name, ['controller' => 'ProductCatalogs', 'action' => 'view', $externalProductCatalog->product_catalog->id]) : '' ?></td>
</tr>
<tr>
<th><?= __('Base Url') ?></th>
<td><?= h($externalProductCatalog->base_url) ?></td>
@@ -30,6 +26,10 @@
<th><?= __('Api Url') ?></th>
<td><?= h($externalProductCatalog->api_url) ?></td>
</tr>
<tr>
<th><?= __('Id') ?></th>
<td><?= $this->Number->format($externalProductCatalog->id) ?></td>
</tr>
<tr>
<th><?= __('Created') ?></th>
<td><?= h($externalProductCatalog->created) ?></td>
@@ -38,11 +38,34 @@
<th><?= __('Deleted') ?></th>
<td><?= h($externalProductCatalog->deleted) ?></td>
</tr>
<tr>
<th><?= __('Enabled') ?></th>
<td><?= $externalProductCatalog->enabled ? __('Yes') : __('No'); ?></td>
</tr>
</table>
<div class="related">
<h4><?= __('Related Product Catalogs') ?></h4>
<?php if (!empty($externalProductCatalog->product_catalogs)) : ?>
<div class="table-responsive">
<table>
<tr>
<th><?= __('Name') ?></th>
<th><?= __('Catalog Description') ?></th>
<th><?= __('Enabled') ?></th>
<th class="actions"><?= __('Actions') ?></th>
</tr>
<?php foreach ($externalProductCatalog->product_catalogs as $productCatalog) : ?>
<tr>
<td><?= h($productCatalog->name) ?></td>
<td><?= h($productCatalog->catalog_description) ?></td>
<td><?= h($productCatalog->_joinData->enabled) ?></td>
<td class="actions">
<?= $this->Html->link(__('View'), ['controller' => 'ProductCatalogs', 'action' => 'view', $productCatalog->id]) ?>
<?= $this->Html->link(__('Edit'), ['controller' => 'ProductCatalogs', 'action' => 'edit', $productCatalog->id]) ?>
<?= $this->Form->postLink(__('Delete'), ['controller' => 'ProductCatalogs', 'action' => 'delete', $productCatalog->id], ['confirm' => __('Are you sure you want to delete # {0}?', $productCatalog->id)]) ?>
</td>
</tr>
<?php endforeach; ?>
</table>
</div>
<?php endif; ?>
</div>
</div>
</div>
</div>