product skus v1

This commit is contained in:
2025-04-15 02:39:35 -07:00
parent 4868064c44
commit a01805dc53
10 changed files with 913 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
<?php
/**
* @var \App\View\AppView $this
* @var \Cake\Datasource\EntityInterface $productSku
*/
?>
<div class="row">
<aside class="column">
<div class="side-nav">
<h4 class="heading"><?= __('Actions') ?></h4>
<?= $this->Html->link(__('List Product Skus'), ['action' => 'index'], ['class' => 'side-nav-item']) ?>
</div>
</aside>
<div class="column column-80">
<div class="productSkus form content">
<?= $this->Form->create($productSku) ?>
<fieldset>
<legend><?= __('Add Product Sku') ?></legend>
<?php
echo $this->Form->control('product_id');
echo $this->Form->control('sku');
echo $this->Form->control('barcode');
echo $this->Form->control('price');
echo $this->Form->control('cost');
echo $this->Form->control('deleted', ['empty' => true]);
?>
</fieldset>
<?= $this->Form->button(__('Submit')) ?>
<?= $this->Form->end() ?>
</div>
</div>
</div>

View File

@@ -0,0 +1,36 @@
<?php
/**
* @var \App\View\AppView $this
* @var \Cake\Datasource\EntityInterface $productSku
*/
?>
<div class="row">
<aside class="column">
<div class="side-nav">
<h4 class="heading"><?= __('Actions') ?></h4>
<?= $this->Form->postLink(
__('Delete'),
['action' => 'delete', $productSku->id],
['confirm' => __('Are you sure you want to delete # {0}?', $productSku->id), 'class' => 'side-nav-item']
) ?>
<?= $this->Html->link(__('List Product Skus'), ['action' => 'index'], ['class' => 'side-nav-item']) ?>
</div>
</aside>
<div class="column column-80">
<div class="productSkus form content">
<?= $this->Form->create($productSku) ?>
<fieldset>
<legend><?= __('Edit Product Skus') ?></legend>
<?php
echo $this->Form->control('product_id');
echo $this->Form->control('sku');
echo $this->Form->control('barcode');
echo $this->Form->control('price');
echo $this->Form->control('cost');
?>
</fieldset>
<?= $this->Form->button(__('Submit')) ?>
<?= $this->Form->end() ?>
</div>
</div>
</div>

View File

@@ -0,0 +1,58 @@
<?php
/**
* @var \App\View\AppView $this
* @var iterable<\Cake\Datasource\EntityInterface> $productSkus
*/
?>
<div class="productSkus index content">
<?= $this->Html->link(__('New Product Skus'), ['action' => 'add'], ['class' => 'button float-right']) ?>
<h3><?= __('Product Skus') ?></h3>
<div class="table-responsive">
<table>
<thead>
<tr>
<th><?= $this->Paginator->sort('id') ?></th>
<th><?= $this->Paginator->sort('product_id') ?></th>
<th><?= $this->Paginator->sort('sku') ?></th>
<th><?= $this->Paginator->sort('barcode') ?></th>
<th><?= $this->Paginator->sort('price') ?></th>
<th><?= $this->Paginator->sort('cost') ?></th>
<th><?= $this->Paginator->sort('created') ?></th>
<th><?= $this->Paginator->sort('modified') ?></th>
<th><?= $this->Paginator->sort('deleted') ?></th>
<th class="actions"><?= __('Actions') ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($productSkus as $productSku): ?>
<tr>
<td><?= h($productSku->id) ?></td>
<td><?= h($productSku->product_id) ?></td>
<td><?= h($productSku->sku) ?></td>
<td><?= h($productSku->barcode) ?></td>
<td><?= $productSku->price === null ? '' : $this->Number->format($productSku->price) ?></td>
<td><?= $productSku->cost === null ? '' : $this->Number->format($productSku->cost) ?></td>
<td><?= h($productSku->created) ?></td>
<td><?= h($productSku->modified) ?></td>
<td><?= h($productSku->deleted) ?></td>
<td class="actions">
<?= $this->Html->link(__('View'), ['action' => 'view', $productSku->id]) ?>
<?= $this->Html->link(__('Edit'), ['action' => 'edit', $productSku->id]) ?>
<?= $this->Form->postLink(__('Delete'), ['action' => 'delete', $productSku->id], ['confirm' => __('Are you sure you want to delete # {0}?', $productSku->id)]) ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<div class="paginator">
<ul class="pagination">
<?= $this->Paginator->first('<< ' . __('first')) ?>
<?= $this->Paginator->prev('< ' . __('previous')) ?>
<?= $this->Paginator->numbers() ?>
<?= $this->Paginator->next(__('next') . ' >') ?>
<?= $this->Paginator->last(__('last') . ' >>') ?>
</ul>
<p><?= $this->Paginator->counter(__('Page {{page}} of {{pages}}, showing {{current}} record(s) out of {{count}} total')) ?></p>
</div>
</div>

View File

@@ -0,0 +1,60 @@
<?php
/**
* @var \App\View\AppView $this
* @var \Cake\Datasource\EntityInterface $productSku
*/
?>
<div class="row">
<aside class="column">
<div class="side-nav">
<h4 class="heading"><?= __('Actions') ?></h4>
<?= $this->Html->link(__('Edit Product Skus'), ['action' => 'edit', $productSku->id], ['class' => 'side-nav-item']) ?>
<?= $this->Form->postLink(__('Delete Product Skus'), ['action' => 'delete', $productSku->id], ['confirm' => __('Are you sure you want to delete # {0}?', $productSku->id), 'class' => 'side-nav-item']) ?>
<?= $this->Html->link(__('List Product Skus'), ['action' => 'index'], ['class' => 'side-nav-item']) ?>
<?= $this->Html->link(__('New Product Skus'), ['action' => 'add'], ['class' => 'side-nav-item']) ?>
</div>
</aside>
<div class="column column-80">
<div class="productSkus view content">
<h3><?= h($productSku->sku) ?></h3>
<table>
<tr>
<th><?= __('Id') ?></th>
<td><?= h($productSku->id) ?></td>
</tr>
<tr>
<th><?= __('Product Id') ?></th>
<td><?= h($productSku->product_id) ?></td>
</tr>
<tr>
<th><?= __('Sku') ?></th>
<td><?= h($productSku->sku) ?></td>
</tr>
<tr>
<th><?= __('Barcode') ?></th>
<td><?= h($productSku->barcode) ?></td>
</tr>
<tr>
<th><?= __('Price') ?></th>
<td><?= $productSku->price === null ? '' : $this->Number->format($productSku->price) ?></td>
</tr>
<tr>
<th><?= __('Cost') ?></th>
<td><?= $productSku->cost === null ? '' : $this->Number->format($productSku->cost) ?></td>
</tr>
<tr>
<th><?= __('Created') ?></th>
<td><?= h($productSku->created) ?></td>
</tr>
<tr>
<th><?= __('Modified') ?></th>
<td><?= h($productSku->modified) ?></td>
</tr>
<tr>
<th><?= __('Deleted') ?></th>
<td><?= h($productSku->deleted) ?></td>
</tr>
</table>
</div>
</div>
</div>