aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/resources/templates/storage.html
blob: 975af0f12cf32fc0fd90eda9a5c1c181d6cc87df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org" lang="en">
<div th:replace="~{common :: head}"></div>

<body>
<div th:replace="~{common :: page-header}"></div>

<div class="indent">
    <form method="get" action="/storage">
        <table class="table">
            <thead class="theme-dark">
                <tr>
                    <th colspan="6">Фильтры</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td>Название</td>
                    <td>
                        <input type="text" id="storageNameFilter" name="storageName" th:value="${storageNameFilter}">
                    </td>
                </tr>
                <tr>
                    <td>Статус</td>
                    <td>
                        <select id="storageStatusFilter" name="storageStatus">
                            <option value="">Любой</option>
                            <option th:value="'RESERVED_FOR_SUPPLY'" th:text="RESERVED_FOR_SUPPLY" th:selected="${storageStatusFilter == 'RESERVED_FOR_SUPPLY'}"></option>
                            <option th:value="'PLACED'" th:text="PLACED" th:selected="${storageStatusFilter == 'PLACED'}"></option>
                            <option th:value="'RESERVED_FOR_ISSUE'" th:text="RESERVED_FOR_ISSUE" th:selected="${storageStatusFilter == 'RESERVED_FOR_ISSUE'}"></option>
                            <option th:value="'PROHIBITED'" th:text="PROHIBITED" th:selected="${storageStatusFilter == 'PROHIBITED'}"></option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td colspan="6"><input id="saveBtn" type="submit" value="Применить" class="btn btn-primary"></td>
                </tr>
            </tbody>
        </table>
    </form>

    <table class="table table-bordered table-warning">
        <thead class="thead-dark">
        <tr>
            <th scope="col">Название</th>
            <th scope="col">Локация</th>
            <th scope="col">Количество</th>
            <th scope="col">Время размещения</th>
            <th scope="col">Статус хранения</th>
        </tr>
        </thead>
        <tbody>
        <tr th:if="${storage.isEmpty()}">
            <td colspan="6">Данному фильтру не удовлетворяет ни одного хранящегося продукта.</td>
        </tr>
        <tr th:each="productStorage : ${storage}">
            <td>
                <a th:href="'/product?id=' + ${productStorage.getProduct().getId()}">
                    <span th:text="${productStorage.getProduct().getName()}"></span>
                </a>
            </td>
            <td>
                <span th:text="${productStorage.getSlot().getLocation()}"></span>
            </td>
            <td>
                <span th:text="${productStorage.getAmount()}"></span>
            </td>
            <td>
                <span th:text="${productStorage.getPlacementTime()}"></span>
            </td>
            <td>
                <span th:text="${productStorage.getStatus()}"></span>
            </td>
        </tr>
        </tbody>
    </table>
</div>

<div th:replace="~{common :: site-footer}"></div>
<div th:replace="~{common :: site-script}"></div>
</body>
</html>