94 lines
5.2 KiB
HTML
94 lines
5.2 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.w3.org/1999/xhtml"
|
|
xmlns:uind="http://www.w3.org/1999/xhtml" xmlns:ctp="http://www.w3.org/1999/xhtml">
|
|
<head th:replace="_fragments :: head('Stitching offline Items')"></head>
|
|
<body>
|
|
<div class="container-fluid">
|
|
<header class="row page-header" th:replace="_fragments :: page-header"></header>
|
|
<main class="row page-main">
|
|
<!-- sidebar starts -->
|
|
<aside class="col-sm-2" th:replace="/stitching/_finished-item-sidebar :: sidebar"></aside>
|
|
<!-- sidebar ends -->
|
|
<!--header starts-->
|
|
<div class="col-sm">
|
|
<div th:replace="_notices :: page-notices"></div>
|
|
<div class="mb-4 d-flex justify-content-between">
|
|
<h3>Stitching Offline Items</h3>
|
|
<a th:href="@{/stitching/create-stitching-items}" class="btn btn-primary">Create Stitched Items</a>
|
|
</div>
|
|
<div th:replace="_fragments :: table-loading-skeleton"></div>
|
|
<form th:action="@{/stitching/generate-barcodes}" method="post">
|
|
<input hidden="hidden" name="artifactType" value="FinishedItem">
|
|
<table th:if="${#lists.size(items) != 0 && #lists != null }" class="table table-striped table-bordered" data-table
|
|
data-order="[[ 0, "asc" ]]">
|
|
<thead>
|
|
<tr>
|
|
<th>ID</th>
|
|
<th>Item ID</th>
|
|
<th>Sku</th>
|
|
<th>Created At</th>
|
|
<th>Created By</th>
|
|
<th>Is QA</th>
|
|
<th>
|
|
<div class="mb-2">
|
|
<button class="btn btn-sm btn-outline-primary" type="submit">Generate Barcode</button>
|
|
</div>
|
|
<div><input type="checkbox" data-checkbox-all></div>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr th:each="item : ${items}" th:object="${item}">
|
|
<td th:text="*{id}"></td>
|
|
<td th:text="*{itemId}"></td>
|
|
<td th:text="*{sku}"></td>
|
|
<td ctp:formatdatetime="*{createdAt}"></td>
|
|
<td th:text="*{createdBy}"></td>
|
|
<td>
|
|
<span th:if="${ not item.isQa}" class="badge badge-danger">NOT PERFORMED</span>
|
|
<div th:if="${item.isQa}">
|
|
<span class="badge badge-APPROVED">PERFORMED</span>
|
|
</div>
|
|
<div th:text="*{qaStatus}"></div>
|
|
<div th:text="*{qaRemarks}"></div>
|
|
</td>
|
|
<td>
|
|
<div class="form-group form-check mb-0">
|
|
<input class="form-check-input" type="checkbox"
|
|
th:value="*{id}"
|
|
name="ids" th:id="*{id}">
|
|
<label th:for="*{id}" class="form-check-label"></label>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</form>
|
|
<h4 th:if="${#lists.size(items) == 0}">No Finished Items found.</h4>
|
|
</div>
|
|
</main>
|
|
</div>
|
|
<div th:replace="_fragments :: page-footer-scripts"></div>
|
|
<script th:inline="javascript">
|
|
(async function () {
|
|
const $selectAllCheckBox = $('[data-checkbox-all]');
|
|
|
|
$selectAllCheckBox.change(function () {
|
|
if ($selectAllCheckBox.prop('checked')) {
|
|
// When parent checkbox is checked, check all child checkboxes
|
|
$('[name="ids"]').each(function () {
|
|
let $this = $(this);
|
|
$this.prop('checked', true);
|
|
});
|
|
} else {
|
|
// When parent checkbox is unchecked, uncheck all child checkboxes
|
|
$('[name="ids"]').each(function () {
|
|
let $this = $(this);
|
|
$this.prop('checked', false);
|
|
});
|
|
}
|
|
});
|
|
})(jQuery)
|
|
</script>
|
|
</body>
|
|
</html> |