aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/resources
diff options
context:
space:
mode:
authormrfoxygmfr <mrfoxygmfr@sch9.ru>2025-04-28 00:46:14 +0300
committermrfoxygmfr <mrfoxygmfr@sch9.ru>2025-04-28 00:46:14 +0300
commitdc403877870dbacd7ee1abe2376a52d0828a29ab (patch)
treeed29b0df396f86a45dd2cce3cfa9d292c8525f28 /src/main/resources
parente9cef81f89584110776c84ee511e26097eb8323c (diff)
feat: operations controller + pages
Diffstat (limited to 'src/main/resources')
-rw-r--r--src/main/resources/templates/operationEdit.html10
-rw-r--r--src/main/resources/templates/operations.html100
2 files changed, 110 insertions, 0 deletions
diff --git a/src/main/resources/templates/operationEdit.html b/src/main/resources/templates/operationEdit.html
new file mode 100644
index 0000000..566549b
--- /dev/null
+++ b/src/main/resources/templates/operationEdit.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <title>Title</title>
+</head>
+<body>
+
+</body>
+</html> \ No newline at end of file
diff --git a/src/main/resources/templates/operations.html b/src/main/resources/templates/operations.html
new file mode 100644
index 0000000..e310992
--- /dev/null
+++ b/src/main/resources/templates/operations.html
@@ -0,0 +1,100 @@
+<!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="/newOperation">
+ <button id="newOperationBtn" type="submit" class="btn btn-primary">Создать новую операцию</button>
+ </form>
+ <br>
+
+ <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> \ No newline at end of file