implermented key import

This commit is contained in:
Michel Fedde 2024-07-05 22:29:35 +02:00
parent ace0de4063
commit 74e1b25fcf
20 changed files with 1035 additions and 12 deletions

View file

@ -0,0 +1,51 @@
<?php
declare(strict_types=1);
use GamesShop\Entities\Games\KeyAttribute;
$this->layout('layout/main', [ 'resourceEntry' => 'keys' ]);
?>
<meta name="key-attributes" content="<?= htmlspecialchars(json_encode(KeyAttribute::casesAsAssociative())) ?>" />
<ul id="key-tab" class="nav nav-tabs">
<li class="nav-item">
<button class="nav-link active" data-bs-toggle="tab" data-bs-target="#keys-tab-pane" role="tab">
Keys
</button>
</li>
<li class="nav-item">
<button class="nav-link" data-bs-toggle="tab" data-bs-target="#import-tab-pane" role="tab">
Import
</button>
</li>
</ul>
<div class="tab-content">
<div class="tab-pane fade show active" id="keys-tab-pane" role="tabpanel">
Key Table
</div>
<div class="tab-pane fade" id="import-tab-pane" role="tabpanel">
<label for="formFile" class="form-label mt-3">Insert import file:</label>
<div class="mb-3 input-group">
<input class="form-control" type="file" id="import" accept="text/csv,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet">
<button class="btn btn-primary js--send-import">Send</button>
</div>
<div class="d-none" id="import-info-container">
<table class="table table-striped w-100" id="import-attribute-table">
<thead>
<tr>
<td>Column</td>
<td>Header</td>
<td>Attribute</td>
</tr>
</thead>
<tbody></tbody>
</table>
<button class="btn btn-primary js--do-import">
Import
</button>
</div>
</div>
</div>