Fix formatting
This commit is contained in:
parent
532b7b9fe2
commit
2285b3dd33
@ -1,6 +1,5 @@
|
|||||||
<%~ E.includeFile("../partials/head.eta.html", {"title": "Settings - Storage Manager"}) %> <%~ E.includeFile("../partials/controls.eta.html", {"active": "SETT_STORE"}) %>
|
<%~ E.includeFile("../partials/head.eta.html", {"title": "Settings - Storage Manager"}) %> <%~ E.includeFile("../partials/controls.eta.html", {"active": "SETT_STORE"}) %> <%~ E.includeFile("../partials/deleteModal.eta.html")
|
||||||
|
%>
|
||||||
<%~ E.includeFile("../partials/deleteModal.eta.html") %>
|
|
||||||
|
|
||||||
<!-- Modal -->
|
<!-- Modal -->
|
||||||
<div class="modal fade" id="storageLocationModal" tabindex="-1" aria-labelledby="storageLocationModal" aria-hidden="true">
|
<div class="modal fade" id="storageLocationModal" tabindex="-1" aria-labelledby="storageLocationModal" aria-hidden="true">
|
||||||
@ -21,8 +20,8 @@
|
|||||||
<label for="storageLocationModalUnit" class="form-label">Select a storage unit</label>
|
<label for="storageLocationModalUnit" class="form-label">Select a storage unit</label>
|
||||||
<select class="form-select" id="storageLocationModalUnit" name="description" required>
|
<select class="form-select" id="storageLocationModalUnit" name="description" required>
|
||||||
<% it.storUnits.forEach(function(storageunits){ %>
|
<% it.storUnits.forEach(function(storageunits){ %>
|
||||||
<option value="<%= storageunits.id %>"><%= storageunits.name %></option>
|
<option value="<%= storageunits.id %>"><%= storageunits.name %></option>
|
||||||
<% }) %>
|
<% }) %>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!--<input type="text" class="form-control" id="createNewCategoryModalDescription" name="description" />-->
|
<!--<input type="text" class="form-control" id="createNewCategoryModalDescription" name="description" />-->
|
||||||
@ -55,7 +54,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<form class="frontendForm" method="post" data-target="/api/v1/storageUnits" id="storageUnitModalForm">
|
<form class="frontendForm" method="post" data-target="/api/v1/storageUnits" id="storageUnitModalForm">
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="storageUnitModalName" class="form-label">Name</label>
|
<label for="storageUnitModalName" class="form-label">Name</label>
|
||||||
<input type="text" class="form-control" id="storageUnitModalName" name="name" required />
|
<input type="text" class="form-control" id="storageUnitModalName" name="name" required />
|
||||||
@ -67,17 +65,16 @@
|
|||||||
<select class="form-select" id="storageUnitModalLocationSelect" name="location" onchange="handleSelector()" required>
|
<select class="form-select" id="storageUnitModalLocationSelect" name="location" onchange="handleSelector()" required>
|
||||||
<option value="META_CREATENEW">➕ Create new location</option>
|
<option value="META_CREATENEW">➕ Create new location</option>
|
||||||
<% it.address.forEach(function(address){ %>
|
<% it.address.forEach(function(address){ %>
|
||||||
<option value="<%= address.id %>"><%= address.street %> <%= address.houseNumber %>, <%= address.city %> <%= address.country %></option>
|
<option value="<%= address.id %>"><%= address.street %> <%= address.houseNumber %>, <%= address.city %> <%= address.country %></option>
|
||||||
<% }) %>
|
<% }) %>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!--<input type="text" class="form-control" id="storageUnitModalLocationSelect" name="select" required />-->
|
<!--<input type="text" class="form-control" id="storageUnitModalLocationSelect" name="select" required />-->
|
||||||
<div id="storageUnitModalLocationSelectText" class="form-text">This text explains something idk.</div>
|
<div id="storageUnitModalLocationSelectText" class="form-text">Select or create a new address.</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="storageUnitModalContactInfoCreator" class="d-none">
|
<div id="storageUnitModalContactInfoCreator" class="d-none">
|
||||||
<hr>
|
<hr />
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="storageUnitModalStreet" class="form-label">Street</label>
|
<label for="storageUnitModalStreet" class="form-label">Street</label>
|
||||||
<input type="text" class="form-control requireOnCreate" id="storageUnitModalStreet" name="street" />
|
<input type="text" class="form-control requireOnCreate" id="storageUnitModalStreet" name="street" />
|
||||||
@ -85,25 +82,25 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="storageUnitModalHouseNumber" class="form-label">Housenumber</label>
|
<label for="storageUnitModalHouseNumber" class="form-label">Housenumber</label>
|
||||||
<input type="text" class="form-control requireOnCreate" id="storageUnitModalHouseNumber" name="housenumber" />
|
<input type="text" class="form-control requireOnCreate" id="storageUnitModalHouseNumber" name="housenumber" />
|
||||||
<div id="storageUnitModalHouseNumberText" class="form-text">6a</div>
|
<div id="storageUnitModalHouseNumberText" class="form-text">6a</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="storageUnitModalzipcode" class="form-label">Zipcode</label>
|
<label for="storageUnitModalzipcode" class="form-label">Zipcode</label>
|
||||||
<input type="text" class="form-control requireOnCreate" id="storageUnitModalzipcode" name="zipcode" />
|
<input type="text" class="form-control requireOnCreate" id="storageUnitModalzipcode" name="zipcode" />
|
||||||
<div id="storageUnitModalzipcodeText" class="form-text">123456</div>
|
<div id="storageUnitModalzipcodeText" class="form-text">123456</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="storageUnitModalCity" class="form-label">City</label>
|
<label for="storageUnitModalCity" class="form-label">City</label>
|
||||||
<input type="text" class="form-control requireOnCreate" id="storageUnitModalCity" name="city" />
|
<input type="text" class="form-control requireOnCreate" id="storageUnitModalCity" name="city" />
|
||||||
<div id="storageUnitModalCityText" class="form-text">Berlin</div>
|
<div id="storageUnitModalCityText" class="form-text">Berlin</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="storageUnitModalCountry" class="form-label">Country</label>
|
<label for="storageUnitModalCountry" class="form-label">Country</label>
|
||||||
<input type="text" class="form-control requireOnCreate" id="storageUnitModalCountry" name="country" />
|
<input type="text" class="form-control requireOnCreate" id="storageUnitModalCountry" name="country" />
|
||||||
<div id="storageUnitModalCountryText" class="form-text">Germany</div>
|
<div id="storageUnitModalCountryText" class="form-text">Germany</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -128,69 +125,57 @@
|
|||||||
<h1>Storages</h1>
|
<h1>Storages</h1>
|
||||||
<ul class="nav nav-underline" id="storageTabList" role="tablist">
|
<ul class="nav nav-underline" id="storageTabList" role="tablist">
|
||||||
<li class="nav-item" role="presentation">
|
<li class="nav-item" role="presentation">
|
||||||
<button
|
<button class="nav-link active" id="storage-loc-tab" data-bs-toggle="tab" data-bs-target="#storage-loc-tab-pane" type="button" role="tab" aria-controls="storage-loc-tab-pane" aria-selected="true">
|
||||||
class="nav-link active"
|
|
||||||
id="storage-loc-tab"
|
|
||||||
data-bs-toggle="tab"
|
|
||||||
data-bs-target="#storage-loc-tab-pane"
|
|
||||||
type="button"
|
|
||||||
role="tab"
|
|
||||||
aria-controls="storage-loc-tab-pane"
|
|
||||||
aria-selected="true">
|
|
||||||
<i class="bi bi-bookshelf"></i> Storage Location
|
<i class="bi bi-bookshelf"></i> Storage Location
|
||||||
</button>
|
</button>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item" role="presentation">
|
<li class="nav-item" role="presentation">
|
||||||
<button
|
<button class="nav-link" id="storage-unit-tab" data-bs-toggle="tab" data-bs-target="#storage-unit-tab-pane" type="button" role="tab" aria-controls="storage-unit-tab-pane" aria-selected="false">
|
||||||
class="nav-link"
|
|
||||||
id="storage-unit-tab"
|
|
||||||
data-bs-toggle="tab"
|
|
||||||
data-bs-target="#storage-unit-tab-pane"
|
|
||||||
type="button"
|
|
||||||
role="tab"
|
|
||||||
aria-controls="storage-unit-tab-pane"
|
|
||||||
aria-selected="false">
|
|
||||||
<i class="bi bi-buildings"></i> Storage Unit
|
<i class="bi bi-buildings"></i> Storage Unit
|
||||||
</button>
|
</button>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="tab-content" id="storageTabListContent">
|
<div class="tab-content" id="storageTabListContent">
|
||||||
<div class="tab-pane fade show active" id="storage-loc-tab-pane" role="tabpanel" aria-labelledby="storage-loc-tab-pane" tabindex="0">
|
<div class="tab-pane fade show active" id="storage-loc-tab-pane" role="tabpanel" aria-labelledby="storage-loc-tab-pane" tabindex="0">
|
||||||
<br>
|
<br />
|
||||||
A storage location is a place where you can store your items. It can be a room, a shelf or a box.
|
A storage location is a place where you can store your items. It can be a room, a shelf or a box.
|
||||||
<br>
|
<br />
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<a href="/settings/category/new" class="btn btn-primary" onclick="primeCreateNew()" data-bs-toggle="modal" data-bs-target="#storageLocationModal"><i class="bi bi-plus-lg"></i> Create new Location</a>
|
<a href="/settings/category/new" class="btn btn-primary" onclick="primeCreateNew()" data-bs-toggle="modal" data-bs-target="#storageLocationModal"
|
||||||
|
><i class="bi bi-plus-lg"></i> Create new Location</a
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col">LocId</th>
|
<th scope="col">LocId</th>
|
||||||
<th scope="col">Name</th>
|
<th scope="col">Name</th>
|
||||||
<th scope="col">Storage Unit</th>
|
<th scope="col">Storage Unit</th>
|
||||||
<th scope="col">Actions</th>
|
<th scope="col">Actions</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<% it.storLocs.forEach(function(locations){ %>
|
<% it.storLocs.forEach(function(locations){ %>
|
||||||
<tr id="listEntry-<%= locations.id %>">
|
<tr id="listEntry-<%= locations.id %>">
|
||||||
<td scope="row" data-bs-toggle="tooltip" data-bs-placement="left" data-bs-title="ID: <%= locations.id %>"><%= locations.name %></td>
|
<td scope="row" data-bs-toggle="tooltip" data-bs-placement="left" data-bs-title="ID: <%= locations.id %>"><%= locations.name %></td>
|
||||||
<td><%= locations.contactInfo %></td>
|
<td><%= locations.contactInfo %></td>
|
||||||
<td>
|
<td>
|
||||||
<button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#storageLocationModal" onclick="primeEdit(); getDataForEdit('<%= locations.name %>')"><i class="bi bi-pencil"></i></button>
|
<button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#storageLocationModal" onclick="primeEdit(); getDataForEdit('<%= locations.name %>')">
|
||||||
|
<i class="bi bi-pencil"></i>
|
||||||
|
</button>
|
||||||
<button class="btn btn-danger" onclick="preFillDeleteModal('<%= locations.name %>')" data-bs-toggle="modal" data-bs-target="#staticBackdrop"><i class="bi bi-trash"></i></button>
|
<button class="btn btn-danger" onclick="preFillDeleteModal('<%= locations.name %>')" data-bs-toggle="modal" data-bs-target="#staticBackdrop"><i class="bi bi-trash"></i></button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<% }) %>
|
<% }) %>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="tab-pane fade" id="storage-unit-tab-pane" role="tabpanel" aria-labelledby="storage-unit-tab-pane" tabindex="0">
|
<div class="tab-pane fade" id="storage-unit-tab-pane" role="tabpanel" aria-labelledby="storage-unit-tab-pane" tabindex="0">
|
||||||
<br>
|
<br />
|
||||||
A storage unit is a physical place, like a warehouse. This contains an address and a name.
|
A storage unit is a physical place, like a warehouse. This contains an address and a name.
|
||||||
<br>
|
<br />
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<a class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#storageUnitModal" onclick="primeCreateNew()"><i class="bi bi-building-add"></i> Create new unit</a>
|
<a class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#storageUnitModal" onclick="primeCreateNew()"><i class="bi bi-building-add"></i> Create new unit</a>
|
||||||
@ -206,16 +191,19 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<% it.storUnits.forEach(function(units){ %>
|
<% it.storUnits.forEach(function(units){ %>
|
||||||
<tr id="listEntry-<%= units.id %>">
|
<tr id="listEntry-<%= units.id %>">
|
||||||
<td scope="row" data-bs-toggle="tooltip" data-bs-placement="left" data-bs-title="ID: <%= units.id %>"><%= units.name %></td>
|
<td scope="row" data-bs-toggle="tooltip" data-bs-placement="left" data-bs-title="ID: <%= units.id %>"><%= units.name %></td>
|
||||||
<td><%= units.contactInfo.street %> <%= units.contactInfo.houseNumber %>, <%= units.contactInfo.city %> <%= units.contactInfo.country %></td>
|
<td><%= units.contactInfo.street %> <%= units.contactInfo.houseNumber %>, <%= units.contactInfo.city %> <%= units.contactInfo.country %></td>
|
||||||
<td>
|
<td>
|
||||||
<button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#storageUnitModal" onclick="primeEdit(); getDataForEdit('<%= units.name %>')"><i class="bi bi-pencil"></i></button>
|
<button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#storageUnitModal" onclick="primeEdit(); getDataForEdit('<%= units.name %>')">
|
||||||
<button class="btn btn-danger" onclick="preFillDeleteModal('<%= units.name %>')" data-bs-toggle="modal" data-bs-target="#staticBackdrop"><i class="bi bi-trash"></i></button>
|
<i class="bi bi-pencil"></i>
|
||||||
</td>
|
</button>
|
||||||
</tr>
|
<button class="btn btn-danger" onclick="preFillDeleteModal('<%= units.name %>')" data-bs-toggle="modal" data-bs-target="#staticBackdrop"><i class="bi bi-trash"></i></button>
|
||||||
<% }) %>
|
</td>
|
||||||
|
</tr>
|
||||||
|
<% }) %>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script src="/js/editStorages.js"></script>
|
<script src="/js/editStorages.js"></script>
|
||||||
|
Loading…
Reference in New Issue
Block a user