aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/resources/templates/operations.html
blob: 1c6aa33ce3d403055c5dc65dbd3e6ba25004a067 (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
83
84
85
86
87
88
89
90
91
92
93
94
95
<!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="/operations">
        <table class="table">
            <thead class="theme-dark">
            <tr>
                <th colspan="6">Фильтры</th>
            </tr>
            </thead>
            <tbody>
            <tr>
                <td>Тип</td>
                <td>
                    <select id="operationTypeFilter" name="operationType">
                        <option value="">Любой</option>
                        <option th:value="'SUPPLY'" th:text="SUPPLY" th:selected="${operationTypeFilter == 'SUPPLY'}"></option>
                        <option th:value="'ISSUE'" th:text="ISSUE" th:selected="${operationTypeFilter == 'ISSUE'}"></option>
                    </select>
                </td>
            </tr>
            <tr>
                <td>Статус</td>
                <td>
                    <select id="operationStatusFilter" name="operationStatus">
                        <option value="">Любой</option>
                        <option th:value="'CHECKOUT'" th:text="CHECKOUT" th:selected="${operationStatusFilter == 'CHECKOUT'}"></option>
                        <option th:value="'APPROVAL'" th:text="APPROVAL" th:selected="${operationStatusFilter == 'APPROVAL'}"></option>
                        <option th:value="'READY'" th:text="READY" th:selected="${operationStatusFilter == 'READY'}"></option>
                        <option th:value="'EXECUTED'" th:text="EXECUTED" th:selected="${operationStatusFilter == 'EXECUTED'}"></option>
                        <option th:value="'CANCELLED'" th:text="CANCELLED" th:selected="${operationStatusFilter == 'CANCELLED'}"></option>
                    </select>
                </td>
            </tr>
            <tr>
                <td>Включает товар с названием</td>
                <td>
                    <input type="text" id="operationProductNameFilter" name="operationProductName" th:value="${operationProductNameFilter}">
                </td>
            </tr>
            <tr>
                <td>Партнер (название)</td>
                <td>
                    <input type="text" id="operationPartnerNameFilter" name="operationPartnerName" th:value="${operationPartnerNameFilter}">
                </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>
        </tr>
        </thead>
        <tbody>
        <tr th:if="${operations.isEmpty()}">
            <td colspan="6">Данному фильтру не удовлетворяет ни одной операции.</td>
        </tr>
        <tr th:each="operation : ${operations}">
            <td>
                <a th:href="'/operation?id=' + ${operation.getId()}">
                    <span th:text="${operation.getId()}"></span>
                </a>
            </td>
            <td>
                <span th:text="${operation.getType()}"></span>
            </td>
            <td>
                <span th:text="${operation.getPartner().getName()}"></span>
            </td>
            <td>
                <span th:text="${operation.getStatus()}"></span>
            </td>
        </tr>
        </tbody>
    </table>
</div>

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