diff options
author | mrfoxygmfr <mrfoxygmfr@sch9.ru> | 2025-05-04 11:56:37 +0300 |
---|---|---|
committer | mrfoxygmfr <mrfoxygmfr@sch9.ru> | 2025-05-04 11:56:37 +0300 |
commit | 3005e34b8ec65bef44f722a9a0576227a41690fc (patch) | |
tree | bf0215f922693173436e48177d9280dc9d9f4275 /src/main/resources/templates/operationView.html | |
parent | 185c9d3102b401634bba4717b86dc0fbf3f1a039 (diff) |
feat: operation creation, view and manage
Diffstat (limited to 'src/main/resources/templates/operationView.html')
-rw-r--r-- | src/main/resources/templates/operationView.html | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/src/main/resources/templates/operationView.html b/src/main/resources/templates/operationView.html new file mode 100644 index 0000000..37631b8 --- /dev/null +++ b/src/main/resources/templates/operationView.html @@ -0,0 +1,58 @@ +<!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"> + <div id="updateToggleSelector"> + <button id="updateBtn" class="btn btn-primary" onclick="toggleDisabled()">Изменить</button><br><br> + <a th:href="'/operationProducts/' + ${operation.getId()}"> + <button class="btn btn-primary">Управление продуктами</button> + </a><br><br> + </div> + + <form method="post" action="/operation"> + <input disabled hidden id="operationId" name="operationId" th:value="${operation.getId()}"> + + <p th:text="'Тип: ' + ${operation.getType().toString()}"></p> + <label for="operationStatus">Статус:</label> + <select disabled id="operationStatus" name="operationStatus" required> + <option value="0" disabled>Выберите статус</option> + <option th:value="'CHECKOUT'" th:text="CHECKOUT" th:selected="${operation.getStatus().toString() == 'CHECKOUT'}"></option> + <option th:value="'APPROVAL'" th:text="APPROVAL" th:selected="${operation.getStatus().toString() == 'APPROVAL'}"></option> + <option th:value="'READY'" th:text="READY" th:selected="${operation.getStatus().toString() == 'READY'}"></option> + <option th:value="'EXECUTED'" th:text="EXECUTED" th:selected="${operation.getStatus().toString() == 'EXECUTED'}"></option> + <option th:value="'CANCELLED'" th:text="CANCELLED" th:selected="${operation.getStatus().toString() == 'CANCELLED'}"></option> + </select> <br><br> + + <a th:href="@{/partner(id=${operation.getPartner().getId()})}"> + <p th:text="'Партнер: ' + ${operation.getPartner().getName()}"></p> + </a> + + <label for="operationResponsible">Ответственное лицо:</label> + <select disabled id="operationResponsible" name="operationResponsible" required> + <option value="0" disabled>Выберите ответственного</option> + <option th:each="contact : ${operation.getPartner().getContacts()}" + th:value="${contact.getId()}" th:text="${contact.getSurname()} + ' ' + ${contact.getName()}" th:selected="${operation.getResponsible() == contact}"></option> + </select> <br><br> + + <label for="operationAddress">Адрес:</label> + <input disabled type="text" id="operationAddress" name="operationAddress" required th:value="${operation.getAddress()}"><br><br> + + <p th:text="'Дата создания: ' + ${operation.getDateCreated()}"></p> + <p th:text="'Дата изменения: ' + ${operation.getDateModified()}"></p> + <p th:if="${operation.getDateFinished() != null}" th:text="'Дата окончания: ' + ${operation.getDateFinished()}"></p> + + <input id="saveBtn" type="submit" value="Сохранить" class="btn btn-primary" hidden> + </form> +</div> + + +<div th:replace="~{common :: site-footer}"></div> +<div th:replace="~{common :: site-script}"></div> +<div th:replace="~{common :: editFieldsToggle}"></div> + +</body> +</html>
\ No newline at end of file |