diff --git a/src/main/java/com/example/multikart/domain/dto/CategoryRequestDTO.java b/src/main/java/com/example/multikart/domain/dto/CategoryRequestDTO.java index 1ad6760..c92b0ec 100644 --- a/src/main/java/com/example/multikart/domain/dto/CategoryRequestDTO.java +++ b/src/main/java/com/example/multikart/domain/dto/CategoryRequestDTO.java @@ -10,6 +10,7 @@ @NoArgsConstructor @AllArgsConstructor public class CategoryRequestDTO { + private Long categoryId; @NotBlank private String name; diff --git a/src/main/java/com/example/multikart/domain/dto/CustomerRequestDTO.java b/src/main/java/com/example/multikart/domain/dto/CustomerRequestDTO.java index 6127628..5f47bff 100644 --- a/src/main/java/com/example/multikart/domain/dto/CustomerRequestDTO.java +++ b/src/main/java/com/example/multikart/domain/dto/CustomerRequestDTO.java @@ -11,6 +11,7 @@ @NoArgsConstructor @AllArgsConstructor public class CustomerRequestDTO { + private Long customerId; @NotBlank private String name; diff --git a/src/main/java/com/example/multikart/domain/dto/PaymentRequestDTO.java b/src/main/java/com/example/multikart/domain/dto/PaymentRequestDTO.java index 9808c10..8fa1ece 100644 --- a/src/main/java/com/example/multikart/domain/dto/PaymentRequestDTO.java +++ b/src/main/java/com/example/multikart/domain/dto/PaymentRequestDTO.java @@ -10,6 +10,7 @@ @Setter @Builder public class PaymentRequestDTO { + private Long paymentId; @NotBlank private String name; diff --git a/src/main/java/com/example/multikart/domain/dto/ProductRequestDTO.java b/src/main/java/com/example/multikart/domain/dto/ProductRequestDTO.java index 4fb72ed..5f1f351 100644 --- a/src/main/java/com/example/multikart/domain/dto/ProductRequestDTO.java +++ b/src/main/java/com/example/multikart/domain/dto/ProductRequestDTO.java @@ -12,6 +12,7 @@ @Setter @Builder public class ProductRequestDTO { + private Long productId; @NotBlank private String name; @NotBlank diff --git a/src/main/java/com/example/multikart/domain/dto/SupplierRequestDTO.java b/src/main/java/com/example/multikart/domain/dto/SupplierRequestDTO.java index c29c08f..79b2e5c 100644 --- a/src/main/java/com/example/multikart/domain/dto/SupplierRequestDTO.java +++ b/src/main/java/com/example/multikart/domain/dto/SupplierRequestDTO.java @@ -11,6 +11,7 @@ @Setter @Builder public class SupplierRequestDTO { + private Long supplierId; @NotBlank private String name; diff --git a/src/main/java/com/example/multikart/domain/dto/TransportRequestDTO.java b/src/main/java/com/example/multikart/domain/dto/TransportRequestDTO.java index 515185f..d86d9de 100644 --- a/src/main/java/com/example/multikart/domain/dto/TransportRequestDTO.java +++ b/src/main/java/com/example/multikart/domain/dto/TransportRequestDTO.java @@ -10,6 +10,7 @@ @Setter @Builder public class TransportRequestDTO { + private Long transportId; @NotBlank private String name; diff --git a/src/main/java/com/example/multikart/domain/dto/UnitRequestDTO.java b/src/main/java/com/example/multikart/domain/dto/UnitRequestDTO.java index 5c2814b..021a91c 100644 --- a/src/main/java/com/example/multikart/domain/dto/UnitRequestDTO.java +++ b/src/main/java/com/example/multikart/domain/dto/UnitRequestDTO.java @@ -10,6 +10,7 @@ @Setter @Builder public class UnitRequestDTO { + private Long unitId; @NotBlank private String name; diff --git a/src/main/java/com/example/multikart/domain/dto/UserRequestDTO.java b/src/main/java/com/example/multikart/domain/dto/UserRequestDTO.java index d7a7aec..6c3aadb 100644 --- a/src/main/java/com/example/multikart/domain/dto/UserRequestDTO.java +++ b/src/main/java/com/example/multikart/domain/dto/UserRequestDTO.java @@ -11,6 +11,7 @@ @NoArgsConstructor @AllArgsConstructor public class UserRequestDTO { + private Long userId; private Long roleId; @NotBlank diff --git a/src/main/java/com/example/multikart/service/impl/CategoryServiceImpl.java b/src/main/java/com/example/multikart/service/impl/CategoryServiceImpl.java index c7f108a..50e81e7 100644 --- a/src/main/java/com/example/multikart/service/impl/CategoryServiceImpl.java +++ b/src/main/java/com/example/multikart/service/impl/CategoryServiceImpl.java @@ -53,7 +53,7 @@ public String storeCategory(CategoryRequestDTO input, BindingResult result, Mode return "backend/category/create"; } - var count = categoryRepository.findBySlugAndStatusNot(input.getSlug(), DefaultStatus.DELETED); + var count = categoryRepository.countBySlugAndStatusNot(input.getSlug().trim(), DefaultStatus.DELETED); if (count > 0) { result.rejectValue("slug", "", "Đường dẫn đã được sử dụng"); } @@ -96,13 +96,14 @@ public String updateCategory(Long id, CategoryRequestDTO input, BindingResult re } if (result.hasErrors()) { + input.setCategoryId(id); model.addAttribute("category", input); - return "backend/category/create"; + return "backend/category/edit"; } if (!category.getSlug().equals(input.getSlug())) { - var count = categoryRepository.countBySlugAndStatusNot(input.getSlug(), DefaultStatus.DELETED); + var count = categoryRepository.countBySlugAndStatusNot(input.getSlug().trim(), DefaultStatus.DELETED); if (count > 0) { result.rejectValue("slug", "", "Đường dẫn đã được sử dụng"); } @@ -111,9 +112,10 @@ public String updateCategory(Long id, CategoryRequestDTO input, BindingResult re } if (result.hasErrors()) { + input.setCategoryId(id); model.addAttribute("category", input); - return "backend/category/create"; + return "backend/category/edit"; } category.setName(input.getName()); diff --git a/src/main/java/com/example/multikart/service/impl/CustomerServiceImpl.java b/src/main/java/com/example/multikart/service/impl/CustomerServiceImpl.java index e3f6cc1..bdc8482 100644 --- a/src/main/java/com/example/multikart/service/impl/CustomerServiceImpl.java +++ b/src/main/java/com/example/multikart/service/impl/CustomerServiceImpl.java @@ -44,7 +44,7 @@ public String storeCustomer(CustomerRequestDTO input, BindingResult result, Mode } input.setPassword(bcryptPasswordEncoder.encode(input.getPassword())); - var count = customerRepository.countByEmailAndStatusNot(input.getEmail(), DefaultStatus.DELETED); + var count = customerRepository.countByEmailAndStatusNot(input.getEmail().trim(), DefaultStatus.DELETED); if (count > 0) { result.rejectValue("email", "email.required", "Email đã được sử dụng"); } @@ -86,9 +86,10 @@ public String updateCustomer(Long id, CustomerRequestDTO input, BindingResult re } if (result.hasErrors()) { + input.setCustomerId(id); model.addAttribute("customer", input); - return "backend/customer/create"; + return "backend/customer/edit"; } if (!input.getPassword().isEmpty()) { @@ -96,7 +97,7 @@ public String updateCustomer(Long id, CustomerRequestDTO input, BindingResult re } if (!customer.getEmail().equals(input.getEmail())) { - var count = customerRepository.countByEmailAndStatusNot(input.getEmail(), DefaultStatus.DELETED); + var count = customerRepository.countByEmailAndStatusNot(input.getEmail().trim(), DefaultStatus.DELETED); if (count > 0) { result.rejectValue("email", "email.required", "Email đã được sử dụng"); } @@ -105,9 +106,10 @@ public String updateCustomer(Long id, CustomerRequestDTO input, BindingResult re } if (result.hasErrors()) { + input.setCustomerId(id); model.addAttribute("customer", input); - return "backend/customer/create"; + return "backend/customer/edit"; } customer.setName(input.getName()); diff --git a/src/main/java/com/example/multikart/service/impl/PaymentServiceImpl.java b/src/main/java/com/example/multikart/service/impl/PaymentServiceImpl.java index 01d692a..4c1995e 100644 --- a/src/main/java/com/example/multikart/service/impl/PaymentServiceImpl.java +++ b/src/main/java/com/example/multikart/service/impl/PaymentServiceImpl.java @@ -40,7 +40,7 @@ public String storePayment(PaymentRequestDTO input, BindingResult result, Model return "backend/payment/create"; } - var count = paymentRepository.countByNameAndStatusNot(input.getName(), DefaultStatus.DELETED); + var count = paymentRepository.countByNameAndStatusNot(input.getName().trim(), DefaultStatus.DELETED); if (count > 0) { result.rejectValue("name", "", "Tên đơn vị đã được sử dụng"); } @@ -82,13 +82,14 @@ public String updatePayment(Long id, PaymentRequestDTO input, BindingResult resu } if (result.hasErrors()) { + input.setPaymentId(id); model.addAttribute("payment", input); - return "backend/payment/create"; + return "backend/payment/edit"; } if (!payment.getName().equals(input.getName())) { - var count = paymentRepository.countByNameAndStatusNot(input.getName(), DefaultStatus.DELETED); + var count = paymentRepository.countByNameAndStatusNot(input.getName().trim(), DefaultStatus.DELETED); if (count > 0) { result.rejectValue("name", "", "Tên đơn vị đã được sử dụng"); } @@ -97,9 +98,10 @@ public String updatePayment(Long id, PaymentRequestDTO input, BindingResult resu } if (result.hasErrors()) { + input.setPaymentId(id); model.addAttribute("payment", input); - return "backend/payment/create"; + return "backend/payment/edit"; } payment.setStatus(input.getStatus()); diff --git a/src/main/java/com/example/multikart/service/impl/ProductServiceImpl.java b/src/main/java/com/example/multikart/service/impl/ProductServiceImpl.java index 27c7d33..3054a7e 100644 --- a/src/main/java/com/example/multikart/service/impl/ProductServiceImpl.java +++ b/src/main/java/com/example/multikart/service/impl/ProductServiceImpl.java @@ -85,12 +85,12 @@ public String storeProduct(ProductRequestDTO input, BindingResult result, Model return "backend/product/create"; } - var count = productRepository.countByNameAndStatusNot(input.getName(), DefaultStatus.DELETED); + var count = productRepository.countByNameAndStatusNot(input.getName().trim(), DefaultStatus.DELETED); if (count > 0) { result.rejectValue("name", "", "Tên sản phẩm đã được sử dụng"); } - var countSlug = productRepository.countBySlugAndStatusNot(input.getSlug(), DefaultStatus.DELETED); + var countSlug = productRepository.countBySlugAndStatusNot(input.getSlug().trim(), DefaultStatus.DELETED); if (countSlug > 0) { result.rejectValue("slug", "", "Đường dẫn đã được sử dụng"); } @@ -154,6 +154,7 @@ public String updateProduct(Long id, ProductRequestDTO input, BindingResult resu } if (result.hasErrors()) { + input.setProductId(id); model.addAttribute("product", input); model.addAttribute("categories", categoryRepository.findAllByStatus(DefaultStatus.ACTIVE)); model.addAttribute("units", unitRepository.findAllByStatus(DefaultStatus.ACTIVE)); @@ -162,7 +163,7 @@ public String updateProduct(Long id, ProductRequestDTO input, BindingResult resu } if (!product.getName().equals(input.getName())) { - var count = productRepository.countByNameAndStatusNot(input.getName(), DefaultStatus.DELETED); + var count = productRepository.countByNameAndStatusNot(input.getName().trim(), DefaultStatus.DELETED); if (count > 0) { result.rejectValue("name", "", "Tên sản phẩm đã được sử dụng"); } else { @@ -170,7 +171,7 @@ public String updateProduct(Long id, ProductRequestDTO input, BindingResult resu } } if (!product.getSlug().equals(input.getSlug())) { - var countSlug = productRepository.countBySlugAndStatusNot(input.getSlug(), DefaultStatus.DELETED); + var countSlug = productRepository.countBySlugAndStatusNot(input.getSlug().trim(), DefaultStatus.DELETED); if (countSlug > 0) { result.rejectValue("slug", "", "Đường dẫn đã được sử dụng"); } else { @@ -193,6 +194,7 @@ public String updateProduct(Long id, ProductRequestDTO input, BindingResult resu } if (result.hasErrors()) { + input.setProductId(id); model.addAttribute("product", input); model.addAttribute("categories", categoryRepository.findAllByStatus(DefaultStatus.ACTIVE)); model.addAttribute("units", unitRepository.findAllByStatus(DefaultStatus.ACTIVE)); diff --git a/src/main/java/com/example/multikart/service/impl/SupplierServiceImpl.java b/src/main/java/com/example/multikart/service/impl/SupplierServiceImpl.java index a2542dc..b2e888e 100644 --- a/src/main/java/com/example/multikart/service/impl/SupplierServiceImpl.java +++ b/src/main/java/com/example/multikart/service/impl/SupplierServiceImpl.java @@ -40,7 +40,7 @@ public String storeSupplier(SupplierRequestDTO input, BindingResult result, Mode return "backend/supplier/create"; } - var count = supplierRepository.countByNameAndStatusNot(input.getName(), DefaultStatus.DELETED); + var count = supplierRepository.countByNameAndStatusNot(input.getName().trim(), DefaultStatus.DELETED); if (count > 0) { result.rejectValue("name", "", "Tên đơn vị đã được sử dụng"); } @@ -82,13 +82,14 @@ public String updateSupplier(Long id, SupplierRequestDTO input, BindingResult re } if (result.hasErrors()) { + input.setSupplierId(id); model.addAttribute("supplier", input); - return "backend/supplier/create"; + return "backend/supplier/edit"; } if (!supplier.getName().equals(input.getName())) { - var count = supplierRepository.countByNameAndStatusNot(input.getName(), DefaultStatus.DELETED); + var count = supplierRepository.countByNameAndStatusNot(input.getName().trim(), DefaultStatus.DELETED); if (count > 0) { result.rejectValue("name", "", "Tên đơn vị đã được sử dụng"); } @@ -97,9 +98,10 @@ public String updateSupplier(Long id, SupplierRequestDTO input, BindingResult re } if (result.hasErrors()) { + input.setSupplierId(id); model.addAttribute("supplier", input); - return "backend/supplier/create"; + return "backend/supplier/edit"; } supplier.setStatus(input.getStatus()); diff --git a/src/main/java/com/example/multikart/service/impl/TransportServiceImpl.java b/src/main/java/com/example/multikart/service/impl/TransportServiceImpl.java index fec42ff..a93c60d 100644 --- a/src/main/java/com/example/multikart/service/impl/TransportServiceImpl.java +++ b/src/main/java/com/example/multikart/service/impl/TransportServiceImpl.java @@ -40,7 +40,7 @@ public String storeTransport(TransportRequestDTO input, BindingResult result, Mo return "backend/transport/create"; } - var count = transportRepository.countByNameAndStatusNot(input.getName(), DefaultStatus.DELETED); + var count = transportRepository.countByNameAndStatusNot(input.getName().trim(), DefaultStatus.DELETED); if (count > 0) { result.rejectValue("name", "", "Tên đơn vị đã được sử dụng"); } @@ -82,13 +82,14 @@ public String updateTransport(Long id, TransportRequestDTO input, BindingResult } if (result.hasErrors()) { + input.setTransportId(id); model.addAttribute("transport", input); - return "backend/transport/create"; + return "backend/transport/edit"; } if (!transport.getName().equals(input.getName())) { - var count = transportRepository.countByNameAndStatusNot(input.getName(), DefaultStatus.DELETED); + var count = transportRepository.countByNameAndStatusNot(input.getName().trim(), DefaultStatus.DELETED); if (count > 0) { result.rejectValue("name", "", "Tên đơn vị đã được sử dụng"); } @@ -97,9 +98,10 @@ public String updateTransport(Long id, TransportRequestDTO input, BindingResult } if (result.hasErrors()) { + input.setTransportId(id); model.addAttribute("transport", input); - return "backend/transport/create"; + return "backend/transport/edit"; } transport.setStatus(input.getStatus()); diff --git a/src/main/java/com/example/multikart/service/impl/UnitServiceImpl.java b/src/main/java/com/example/multikart/service/impl/UnitServiceImpl.java index fe7e246..b4e00c9 100644 --- a/src/main/java/com/example/multikart/service/impl/UnitServiceImpl.java +++ b/src/main/java/com/example/multikart/service/impl/UnitServiceImpl.java @@ -40,7 +40,7 @@ public String storeUnit(UnitRequestDTO input, BindingResult result, Model model, return "backend/unit/create"; } - var count = unitRepository.countByNameAndStatusNot(input.getName(), DefaultStatus.DELETED); + var count = unitRepository.countByNameAndStatusNot(input.getName().trim(), DefaultStatus.DELETED); if (count > 0) { result.rejectValue("name", "", "Tên đơn vị đã được sử dụng"); } @@ -82,13 +82,14 @@ public String updateUnit(Long id, UnitRequestDTO input, BindingResult result, Mo } if (result.hasErrors()) { + input.setUnitId(id); model.addAttribute("unit", input); - return "backend/unit/create"; + return "backend/unit/edit"; } if (!unit.getName().equals(input.getName())) { - var count = unitRepository.countByNameAndStatusNot(input.getName(), DefaultStatus.DELETED); + var count = unitRepository.countByNameAndStatusNot(input.getName().trim(), DefaultStatus.DELETED); if (count > 0) { result.rejectValue("name", "", "Tên đơn vị đã được sử dụng"); } @@ -97,9 +98,10 @@ public String updateUnit(Long id, UnitRequestDTO input, BindingResult result, Mo } if (result.hasErrors()) { + input.setUnitId(id); model.addAttribute("unit", input); - return "backend/unit/create"; + return "backend/unit/edit"; } unit.setStatus(input.getStatus()); diff --git a/src/main/java/com/example/multikart/service/impl/UserServiceImpl.java b/src/main/java/com/example/multikart/service/impl/UserServiceImpl.java index 9c2cd11..97f70e8 100644 --- a/src/main/java/com/example/multikart/service/impl/UserServiceImpl.java +++ b/src/main/java/com/example/multikart/service/impl/UserServiceImpl.java @@ -48,7 +48,7 @@ public String storeUser(UserRequestDTO input, BindingResult result, Model model, return "backend/user/create"; } - var count = userRepository.countByEmailAndStatusNot(input.getEmail(), DefaultStatus.DELETED); + var count = userRepository.countByEmailAndStatusNot(input.getEmail().trim(), DefaultStatus.DELETED); if (count > 0) { result.rejectValue("email", "email.required", "Email đã được sử dụng"); } @@ -93,10 +93,11 @@ public String updateUser(Long id, UserRequestDTO input, BindingResult result, Mo } if (result.hasErrors()) { + input.setUserId(id); model.addAttribute("user", input); model.addAttribute("roles", roleRepository.findAllByStatus(DefaultStatus.ACTIVE)); - return "backend/user/create"; + return "backend/user/edit"; } if (!input.getPassword().isEmpty()) { @@ -104,7 +105,7 @@ public String updateUser(Long id, UserRequestDTO input, BindingResult result, Mo } if (!user.getEmail().equals(input.getEmail())) { - var count = userRepository.countByEmailAndStatusNot(input.getEmail(), DefaultStatus.DELETED); + var count = userRepository.countByEmailAndStatusNot(input.getEmail().trim(), DefaultStatus.DELETED); if (count > 0) { result.rejectValue("email", "email.required", "Email đã được sử dụng"); } @@ -113,10 +114,11 @@ public String updateUser(Long id, UserRequestDTO input, BindingResult result, Mo } if (result.hasErrors()) { + input.setUserId(id); model.addAttribute("user", input); model.addAttribute("roles", roleRepository.findAllByStatus(DefaultStatus.ACTIVE)); - return "backend/user/create"; + return "backend/user/edit"; } user.setName(input.getName()); diff --git a/src/main/resources/static/backend/assets/js/custom.js b/src/main/resources/static/backend/assets/js/custom.js new file mode 100644 index 0000000..19289cc --- /dev/null +++ b/src/main/resources/static/backend/assets/js/custom.js @@ -0,0 +1,50 @@ +function convertToSlug(text) { + text = text.toString().toLowerCase().trim(); + + const sets = [ + {to: 'a', from: '[ÀÁÂÃÄÅÆĀĂĄẠẢẤẦẨẪẬẮẰẲẴẶἀ]'}, + {to: 'c', from: '[ÇĆĈČ]'}, + {to: 'd', from: '[ÐĎĐÞ]'}, + {to: 'e', from: '[ÈÉÊËĒĔĖĘĚẸẺẼẾỀỂỄỆ]'}, + {to: 'g', from: '[ĜĞĢǴ]'}, + {to: 'h', from: '[ĤḦ]'}, + {to: 'i', from: '[ÌÍÎÏĨĪĮİỈỊ]'}, + {to: 'j', from: '[Ĵ]'}, + {to: 'ij', from: '[IJ]'}, + {to: 'k', from: '[Ķ]'}, + {to: 'l', from: '[ĹĻĽŁ]'}, + {to: 'm', from: '[Ḿ]'}, + {to: 'n', from: '[ÑŃŅŇ]'}, + {to: 'o', from: '[ÒÓÔÕÖØŌŎŐỌỎỐỒỔỖỘỚỜỞỠỢǪǬƠ]'}, + {to: 'oe', from: '[Œ]'}, + {to: 'p', from: '[ṕ]'}, + {to: 'r', from: '[ŔŖŘ]'}, + {to: 's', from: '[ߌŜŞŠȘ]'}, + {to: 't', from: '[ŢŤ]'}, + {to: 'u', from: '[ÙÚÛÜŨŪŬŮŰŲỤỦỨỪỬỮỰƯ]'}, + {to: 'w', from: '[ẂŴẀẄ]'}, + {to: 'x', from: '[ẍ]'}, + {to: 'y', from: '[ÝŶŸỲỴỶỸ]'}, + {to: 'z', from: '[ŹŻŽ]'}, + {to: '-', from: '[·/_,:;\']'} + ]; + + sets.forEach(set => { + text = text.replace(new RegExp(set.from, 'gi'), set.to) + }); + + return text + .replace(/\s+/g, '-') // Replace spaces with - + .replace(/[^-a-z0-9а-я\u0370-\u03ff\u1f00-\u1fff]+/g, '') // Remove all non-word chars + .replace(/--+/g, '-') // Replace multiple - with single - + .replace(/^-+/, '') // Trim - from start of text + .replace(/-+$/, '') // Trim - from end of text +} + +//Add new method for jquery validate to check regex +$.validator.addMethod('regex', function (value, element, parameter) { + var re = new RegExp(parameter); + return this.optional(element) || re.test(value); +}, ''); + + diff --git a/src/main/resources/templates/backend/category/create.html b/src/main/resources/templates/backend/category/create.html index 44d42ca..15a307a 100644 --- a/src/main/resources/templates/backend/category/create.html +++ b/src/main/resources/templates/backend/category/create.html @@ -55,31 +55,31 @@

Thêm danh mục
+ method="post" id="form-input">
-
- +
-
+
- +
+
+ +
+ \ No newline at end of file diff --git a/src/main/resources/templates/backend/category/edit.html b/src/main/resources/templates/backend/category/edit.html index 596f0ef..63b4f38 100644 --- a/src/main/resources/templates/backend/category/edit.html +++ b/src/main/resources/templates/backend/category/edit.html @@ -56,7 +56,7 @@

Sửa danh mục + method="post" id="form-input">
@@ -65,18 +65,18 @@

Sửa danh mục Tên
-
+ placeholder="Tên danh mục..." th:field="*{name}"> +

-
+ placeholder="Đường dẫn..."> +
@@ -112,5 +112,41 @@

Sửa danh mục

+
+ +
\ No newline at end of file diff --git a/src/main/resources/templates/backend/category/index.html b/src/main/resources/templates/backend/category/index.html index d254c99..9e564b0 100644 --- a/src/main/resources/templates/backend/category/index.html +++ b/src/main/resources/templates/backend/category/index.html @@ -63,7 +63,7 @@
Manage Order
+ th:method="POST" class="delete-form">
sửa @@ -82,5 +82,27 @@
Manage Order
+
+ +
\ No newline at end of file diff --git a/src/main/resources/templates/backend/customer/create.html b/src/main/resources/templates/backend/customer/create.html index 061dd61..54b91fb 100644 --- a/src/main/resources/templates/backend/customer/create.html +++ b/src/main/resources/templates/backend/customer/create.html @@ -55,7 +55,7 @@

Create User + method="post" id="form-input">
@@ -66,7 +66,9 @@

Account Details

Name
+ placeholder="Name..." th:field="*{name}"> +
@@ -74,8 +76,8 @@

Account Details

-
+
@@ -119,5 +121,44 @@

Account Details

+
+ +
\ No newline at end of file diff --git a/src/main/resources/templates/backend/customer/edit.html b/src/main/resources/templates/backend/customer/edit.html index b2c366b..aa80ede 100644 --- a/src/main/resources/templates/backend/customer/edit.html +++ b/src/main/resources/templates/backend/customer/edit.html @@ -56,7 +56,7 @@

Edit User + method="post" id="form-input">
@@ -67,16 +67,18 @@

Account Details

Name
+ placeholder="Name..." th:field="*{name}"> +
-
+ placeholder="Email..."> +
@@ -120,5 +122,42 @@

Account Details

+
+ +
\ No newline at end of file diff --git a/src/main/resources/templates/backend/customer/index.html b/src/main/resources/templates/backend/customer/index.html index fa08bca..0e9ad29 100644 --- a/src/main/resources/templates/backend/customer/index.html +++ b/src/main/resources/templates/backend/customer/index.html @@ -62,7 +62,7 @@
Manage Order
+ th:method="POST" class="delete-form">
sửa @@ -81,5 +81,27 @@
Manage Order
+
+ +
\ No newline at end of file diff --git a/src/main/resources/templates/backend/payment/create.html b/src/main/resources/templates/backend/payment/create.html index d2dc746..dab9f45 100644 --- a/src/main/resources/templates/backend/payment/create.html +++ b/src/main/resources/templates/backend/payment/create.html @@ -56,7 +56,7 @@

Thêm phương thức thanh toán + method="post" id="form-input">
@@ -65,10 +65,10 @@

Thêm phương thức thanh toán Tên
-
+

@@ -104,5 +104,29 @@

Thêm phương thức thanh toán

+
+ +
\ No newline at end of file diff --git a/src/main/resources/templates/backend/payment/edit.html b/src/main/resources/templates/backend/payment/edit.html index c4d0cfa..d1b1531 100644 --- a/src/main/resources/templates/backend/payment/edit.html +++ b/src/main/resources/templates/backend/payment/edit.html @@ -57,7 +57,7 @@

Sửa phương thức thanh toán + method="post" id="form-input">
@@ -66,7 +66,7 @@

Sửa phương thức thanh toán Tên
@@ -105,5 +105,29 @@

Sửa phương thức thanh toán

+
+ +
\ No newline at end of file diff --git a/src/main/resources/templates/backend/payment/index.html b/src/main/resources/templates/backend/payment/index.html index 92b3381..820793b 100644 --- a/src/main/resources/templates/backend/payment/index.html +++ b/src/main/resources/templates/backend/payment/index.html @@ -58,7 +58,7 @@

Phương thức thanh toán + th:method="POST" class="delete-form">
sửa @@ -77,5 +77,27 @@

Phương thức thanh toán

+
+ +
\ No newline at end of file diff --git a/src/main/resources/templates/backend/product/create.html b/src/main/resources/templates/backend/product/create.html index bd14316..110ef86 100644 --- a/src/main/resources/templates/backend/product/create.html +++ b/src/main/resources/templates/backend/product/create.html @@ -1,13 +1,14 @@ - + Thêm sản phẩm -
@@ -15,7 +16,8 @@
-

Thêm sản phẩm +

+ Thêm sản phẩm Multikart Admin panel

@@ -24,9 +26,18 @@

Thêm sản phẩm