Merge branch 'dev' into daily
This commit is contained in:
@@ -44,10 +44,8 @@ public class AdminCreatePostController {
|
|||||||
bindingVO.getSeq(),
|
bindingVO.getSeq(),
|
||||||
bindingVO.getId(),
|
bindingVO.getId(),
|
||||||
bindingVO.getPassword(),
|
bindingVO.getPassword(),
|
||||||
bindingVO.getEmail(),
|
|
||||||
bindingVO.getRegionMainCode(),
|
bindingVO.getRegionMainCode(),
|
||||||
bindingVO.getAccountDisabled(),
|
bindingVO.getAccountDisabled(),
|
||||||
bindingVO.getAccountLocked(),
|
|
||||||
bindingVO.getRoleIds());
|
bindingVO.getRoleIds());
|
||||||
|
|
||||||
redirectAttributes.addFlashAttribute(
|
redirectAttributes.addFlashAttribute(
|
||||||
|
|||||||
@@ -53,12 +53,9 @@ class AdminUpdateGetController {
|
|||||||
output.getSeq(),
|
output.getSeq(),
|
||||||
output.getId(),
|
output.getId(),
|
||||||
null,
|
null,
|
||||||
output.getEmail(),
|
|
||||||
output.getRegionMainCode(),
|
output.getRegionMainCode(),
|
||||||
output.getPasswordUpdatedAt(),
|
output.getPasswordUpdatedAt(),
|
||||||
output.getAccountDisabled(),
|
output.getAccountDisabled(),
|
||||||
output.getLoginFailCnt(),
|
|
||||||
output.getAccountLocked(),
|
|
||||||
output.getRoles().stream().map(CoreRole::getId).collect(Collectors.toList()));
|
output.getRoles().stream().map(CoreRole::getId).collect(Collectors.toList()));
|
||||||
|
|
||||||
model.addAttribute("bindingVO", bindingVO);
|
model.addAttribute("bindingVO", bindingVO);
|
||||||
|
|||||||
@@ -44,10 +44,8 @@ class AdminUpdatePostController {
|
|||||||
bindingVO.getSeq(),
|
bindingVO.getSeq(),
|
||||||
bindingVO.getId(),
|
bindingVO.getId(),
|
||||||
bindingVO.getUpdatePassword(),
|
bindingVO.getUpdatePassword(),
|
||||||
bindingVO.getEmail(),
|
|
||||||
bindingVO.getRegionMainCode(),
|
bindingVO.getRegionMainCode(),
|
||||||
bindingVO.getAccountDisabled(),
|
bindingVO.getAccountDisabled(),
|
||||||
bindingVO.getAccountLocked(),
|
|
||||||
bindingVO.getRoleIds());
|
bindingVO.getRoleIds());
|
||||||
|
|
||||||
redirectAttributes.addFlashAttribute(
|
redirectAttributes.addFlashAttribute(
|
||||||
|
|||||||
@@ -15,15 +15,15 @@ public class AdminCreateBindingVO {
|
|||||||
private String id;
|
private String id;
|
||||||
private String password;
|
private String password;
|
||||||
|
|
||||||
@NotBlank(message = "{valid.common.required}")
|
/* @NotBlank(message = "{valid.common.required}")
|
||||||
@Pattern(
|
@Pattern(
|
||||||
regexp =
|
regexp =
|
||||||
"^[\\w!#$%&’*+/=?`{|}~^-]+(?:\\.[\\w!#$%&’*+/=?`{|}~^-]+)*@(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,6}$",
|
"^[\\w!#$%&’*+/=?`{|}~^-]+(?:\\.[\\w!#$%&’*+/=?`{|}~^-]+)*@(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,6}$",
|
||||||
message = "{valid.common.email.wrong}")
|
message = "{valid.common.email.wrong}")
|
||||||
private String email;
|
private String email;*/
|
||||||
|
|
||||||
private Boolean accountDisabled;
|
private Boolean accountDisabled;
|
||||||
private Boolean accountLocked;
|
/* private Boolean accountLocked;*/
|
||||||
private List<String> roleIds;
|
private List<String> roleIds;
|
||||||
private String regionMainCode;
|
private String regionMainCode;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,17 +26,17 @@ public class AdminUpdateBindingVO implements AuditOutput {
|
|||||||
private String id;
|
private String id;
|
||||||
private String updatePassword;
|
private String updatePassword;
|
||||||
|
|
||||||
@NotBlank(message = "{valid.common.required}")
|
/* @NotBlank(message = "{valid.common.required}")
|
||||||
@Pattern(
|
@Pattern(
|
||||||
regexp =
|
regexp =
|
||||||
"^[\\w!#$%&’*+/=?`{|}~^-]+(?:\\.[\\w!#$%&’*+/=?`{|}~^-]+)*@(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,6}$",
|
"^[\\w!#$%&’*+/=?`{|}~^-]+(?:\\.[\\w!#$%&’*+/=?`{|}~^-]+)*@(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,6}$",
|
||||||
message = "{valid.common.email.wrong}")
|
message = "{valid.common.email.wrong}")
|
||||||
private String email;
|
private String email;*/
|
||||||
private String regionMainCode;
|
private String regionMainCode;
|
||||||
|
|
||||||
private LocalDateTime passwordUpdatedAt;
|
private LocalDateTime passwordUpdatedAt;
|
||||||
private Boolean accountDisabled;
|
private Boolean accountDisabled;
|
||||||
private Integer loginFailCnt;
|
/* private Integer loginFailCnt;
|
||||||
private Boolean accountLocked;
|
private Boolean accountLocked;*/
|
||||||
private List<String> roleIds;
|
private List<String> roleIds;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,4 +45,8 @@ public class GetHouseholdsStatusCmd {
|
|||||||
// 로그인한 유저 실사 지역
|
// 로그인한 유저 실사 지역
|
||||||
private String userRegionMainCode;
|
private String userRegionMainCode;
|
||||||
|
|
||||||
|
public GetHouseholdsStatusCmd(String searchRegionMainCode) {
|
||||||
|
this.regionMainCode = searchRegionMainCode;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package app.module.admin.usecase.researcher.persistence.model;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class HouseholdDto {
|
||||||
|
private Long seq;
|
||||||
|
private String id;
|
||||||
|
private String name;
|
||||||
|
private String phone;
|
||||||
|
private String regionMainCodeName;
|
||||||
|
private Integer householdCount;
|
||||||
|
private String accountDisabledFlag;
|
||||||
|
}
|
||||||
@@ -1,8 +1,10 @@
|
|||||||
package app.module.admin.usecase.researcher.service;
|
package app.module.admin.usecase.researcher.service;
|
||||||
|
|
||||||
|
import app.module.admin.usecase.household.getHouseholdsStatus.ports.application.domain.GetHouseholdsStatus;
|
||||||
import app.module.admin.usecase.researcher.persistence.model.ResearchersDto;
|
import app.module.admin.usecase.researcher.persistence.model.ResearchersDto;
|
||||||
import app.module.admin.usecase.researcher.persistence.model.ResearchersHouseholdVisitDto;
|
import app.module.admin.usecase.researcher.persistence.model.ResearchersHouseholdVisitDto;
|
||||||
import app.module.admin.usecase.researcher.persistence.model.ResearchersMappingHouseholdDto;
|
import app.module.admin.usecase.researcher.persistence.model.ResearchersMappingHouseholdDto;
|
||||||
|
import app.module.admin.usecase.researcher.web.model.MappingHouseholdListUIReqVO;
|
||||||
import app.module.admin.usecase.researcher.web.model.ResearchersDetailReqVO;
|
import app.module.admin.usecase.researcher.web.model.ResearchersDetailReqVO;
|
||||||
import app.module.admin.usecase.researcher.web.model.ResearchersListReqVO;
|
import app.module.admin.usecase.researcher.web.model.ResearchersListReqVO;
|
||||||
import org.springframework.data.domain.Page;
|
import org.springframework.data.domain.Page;
|
||||||
@@ -16,4 +18,5 @@ public interface ResearcherService {
|
|||||||
Page<ResearchersMappingHouseholdDto> mappingHouseholdList(ResearchersDetailReqVO reqVO);
|
Page<ResearchersMappingHouseholdDto> mappingHouseholdList(ResearchersDetailReqVO reqVO);
|
||||||
Page<ResearchersHouseholdVisitDto> visitHouseholdList(ResearchersDetailReqVO reqVO);
|
Page<ResearchersHouseholdVisitDto> visitHouseholdList(ResearchersDetailReqVO reqVO);
|
||||||
Integer visitHouseholdDelete(List<Integer> selectIds);
|
Integer visitHouseholdDelete(List<Integer> selectIds);
|
||||||
|
Page<GetHouseholdsStatus> reginMainCodeHouseholdList(MappingHouseholdListUIReqVO reqVO);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,14 @@
|
|||||||
package app.module.admin.usecase.researcher.service;
|
package app.module.admin.usecase.researcher.service;
|
||||||
|
|
||||||
|
import app.module.admin.usecase.household.getHouseholdsStatus.adapters.persistence.GetHouseholdsStatusMapper;
|
||||||
|
import app.module.admin.usecase.household.getHouseholdsStatus.ports.application.domain.GetHouseholdsStatus;
|
||||||
|
import app.module.admin.usecase.household.getHouseholdsStatus.ports.application.domain.GetHouseholdsStatusCmd;
|
||||||
import app.module.admin.usecase.researcher.persistence.ResearcherMapper;
|
import app.module.admin.usecase.researcher.persistence.ResearcherMapper;
|
||||||
|
|
||||||
import app.module.admin.usecase.researcher.persistence.model.ResearchersDto;
|
import app.module.admin.usecase.researcher.persistence.model.ResearchersDto;
|
||||||
import app.module.admin.usecase.researcher.persistence.model.ResearchersHouseholdVisitDto;
|
import app.module.admin.usecase.researcher.persistence.model.ResearchersHouseholdVisitDto;
|
||||||
import app.module.admin.usecase.researcher.persistence.model.ResearchersMappingHouseholdDto;
|
import app.module.admin.usecase.researcher.persistence.model.ResearchersMappingHouseholdDto;
|
||||||
|
import app.module.admin.usecase.researcher.web.model.MappingHouseholdListUIReqVO;
|
||||||
import app.module.admin.usecase.researcher.web.model.ResearchersDetailReqVO;
|
import app.module.admin.usecase.researcher.web.model.ResearchersDetailReqVO;
|
||||||
import app.module.admin.usecase.researcher.web.model.ResearchersListReqVO;
|
import app.module.admin.usecase.researcher.web.model.ResearchersListReqVO;
|
||||||
import app.module.core.config.application.util.CommonUtil;
|
import app.module.core.config.application.util.CommonUtil;
|
||||||
@@ -23,6 +27,7 @@ import java.util.List;
|
|||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class ResearcherServiceImpl implements ResearcherService {
|
public class ResearcherServiceImpl implements ResearcherService {
|
||||||
private final ResearcherMapper researcherMapper;
|
private final ResearcherMapper researcherMapper;
|
||||||
|
private final GetHouseholdsStatusMapper householdsStatusMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Page<ResearchersDto> list(ResearchersListReqVO reqVO) {
|
public Page<ResearchersDto> list(ResearchersListReqVO reqVO) {
|
||||||
@@ -60,4 +65,15 @@ public class ResearcherServiceImpl implements ResearcherService {
|
|||||||
String deletedBy = CommonUtil.getLoginUsername();
|
String deletedBy = CommonUtil.getLoginUsername();
|
||||||
return researcherMapper.visitHouseholdDelete(selectIds,deletedBy);
|
return researcherMapper.visitHouseholdDelete(selectIds,deletedBy);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Page<GetHouseholdsStatus> reginMainCodeHouseholdList(MappingHouseholdListUIReqVO reqVO) {
|
||||||
|
Pageable pageable = PageRequest.of(reqVO.getPage() , reqVO.getSize());
|
||||||
|
|
||||||
|
List<GetHouseholdsStatus> householdsStatus = householdsStatusMapper.getHouseholdsStatus(pageable,
|
||||||
|
new GetHouseholdsStatusCmd(reqVO.getSearchRegionMainCode()));
|
||||||
|
|
||||||
|
return new PageImpl<>(householdsStatus, pageable,
|
||||||
|
householdsStatus.isEmpty() ? 0 : householdsStatus.get(0).getTotal());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,9 +2,7 @@ package app.module.admin.usecase.researcher.web;
|
|||||||
|
|
||||||
import app.module.admin.config.application.util.DateUiUtil;
|
import app.module.admin.config.application.util.DateUiUtil;
|
||||||
import app.module.admin.usecase.researcher.service.ResearcherService;
|
import app.module.admin.usecase.researcher.service.ResearcherService;
|
||||||
import app.module.admin.usecase.researcher.web.model.ResearchersDetailReqVO;
|
import app.module.admin.usecase.researcher.web.model.*;
|
||||||
import app.module.admin.usecase.researcher.web.model.ResearchersDetailUIReqVO;
|
|
||||||
import app.module.admin.usecase.researcher.web.model.ResearchersListReqVO;
|
|
||||||
import app.module.core.usecase.uicode.list.ports.UICodeListPortIn;
|
import app.module.core.usecase.uicode.list.ports.UICodeListPortIn;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
@@ -12,7 +10,6 @@ import org.springframework.http.ResponseEntity;
|
|||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.Model;
|
import org.springframework.ui.Model;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import app.module.admin.usecase.researcher.web.model.GetResearchersUIReqVO;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -48,6 +45,13 @@ class ResearcherController {
|
|||||||
return ResponseEntity.status(HttpStatus.OK).body(researcherService.mappingHouseholdList(reqVO));
|
return ResponseEntity.status(HttpStatus.OK).body(researcherService.mappingHouseholdList(reqVO));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping(path = "/mappingHousehold/list")
|
||||||
|
String mappingHouseholdResearcherList(Model model, @ModelAttribute("reqVO") MappingHouseholdListUIReqVO reqVO) {
|
||||||
|
model.addAttribute("householdDto", researcherService.reginMainCodeHouseholdList(reqVO));
|
||||||
|
return "researcher/mappingHouserhold";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@GetMapping(path = "/visitHouseholdList")
|
@GetMapping(path = "/visitHouseholdList")
|
||||||
ResponseEntity<?> visitHouseholdList( @ModelAttribute ResearchersDetailReqVO reqVO) {
|
ResponseEntity<?> visitHouseholdList( @ModelAttribute ResearchersDetailReqVO reqVO) {
|
||||||
return ResponseEntity.status(HttpStatus.OK).body(researcherService.visitHouseholdList(reqVO));
|
return ResponseEntity.status(HttpStatus.OK).body(researcherService.visitHouseholdList(reqVO));
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
package app.module.admin.usecase.researcher.web.model;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
public class MappingHouseholdListUIReqVO {
|
||||||
|
private Integer page;
|
||||||
|
private Integer size;
|
||||||
|
private String searchRegionMainCode;
|
||||||
|
|
||||||
|
public Integer getPage() {
|
||||||
|
// 요청 페이지 넘버 - 초기값 `0`
|
||||||
|
return page != null ? page : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getSize() {
|
||||||
|
// 페이지 당 아이템 수 - 초기값 `10`
|
||||||
|
return size != null ? size : 10;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -180,6 +180,54 @@ table tbody th {
|
|||||||
width: 16rem;
|
width: 16rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.summary-area ul {
|
||||||
|
padding: 1.8rem 6.4rem;
|
||||||
|
display: -webkit-box;
|
||||||
|
display: -webkit-flex;
|
||||||
|
display: flex;
|
||||||
|
-webkit-box-align: center;
|
||||||
|
-webkit-align-items: center;
|
||||||
|
align-items: center;
|
||||||
|
-webkit-box-pack: justify;
|
||||||
|
-webkit-justify-content: space-between;
|
||||||
|
justify-content: space-between;
|
||||||
|
background-color: #F1F3F5;
|
||||||
|
border-radius: 0.8rem;
|
||||||
|
}
|
||||||
|
.summary-area ul li {
|
||||||
|
display: -webkit-box;
|
||||||
|
display: -webkit-flex;
|
||||||
|
display: flex;
|
||||||
|
-webkit-box-align: center;
|
||||||
|
-webkit-align-items: center;
|
||||||
|
align-items: center;
|
||||||
|
-webkit-box-flex: 1;
|
||||||
|
-webkit-flex: 1;
|
||||||
|
flex: 1;
|
||||||
|
gap: 0.8rem;
|
||||||
|
color: #212529;
|
||||||
|
}
|
||||||
|
.summary-area ul li p {
|
||||||
|
font-size: 1.5rem;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
.summary-area ul li span {
|
||||||
|
font-size: 1.8rem;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
.summary-area ul li span strong {
|
||||||
|
font-weight: 700;
|
||||||
|
color: #262626;
|
||||||
|
}
|
||||||
|
.summary-area ul li:last-of-type {
|
||||||
|
-webkit-box-pack: end;
|
||||||
|
-webkit-justify-content: flex-end;
|
||||||
|
justify-content: flex-end;
|
||||||
|
}
|
||||||
|
.summary-area + table {
|
||||||
|
margin-top: 2.4rem;
|
||||||
|
}
|
||||||
|
|
||||||
.bottom-btn-group {
|
.bottom-btn-group {
|
||||||
margin-top: 2.4rem;
|
margin-top: 2.4rem;
|
||||||
}
|
}
|
||||||
@@ -335,4 +383,128 @@ table tbody th {
|
|||||||
.tree-wrap .list-threedepth li + li {
|
.tree-wrap .list-threedepth li + li {
|
||||||
margin-top: 0.2rem;
|
margin-top: 0.2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.info-bullet-list li {
|
||||||
|
position: relative;
|
||||||
|
padding-left: 1.1rem;
|
||||||
|
color: #495057;
|
||||||
|
font-size: 1.4rem;
|
||||||
|
line-height: 1.6;
|
||||||
|
}
|
||||||
|
.info-bullet-list li a {
|
||||||
|
color: #4980FB;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
.info-bullet-list li:before {
|
||||||
|
position: absolute;
|
||||||
|
content: "";
|
||||||
|
display: block;
|
||||||
|
width: 0.3rem;
|
||||||
|
height: 0.3rem;
|
||||||
|
background-color: #868E96;
|
||||||
|
top: 0.8rem;
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
.info-bullet-list li:before + li {
|
||||||
|
margin-top: 0.4rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-wrap {
|
||||||
|
display: -webkit-box;
|
||||||
|
display: -webkit-flex;
|
||||||
|
display: flex;
|
||||||
|
-webkit-box-align: center;
|
||||||
|
-webkit-align-items: center;
|
||||||
|
align-items: center;
|
||||||
|
-webkit-box-pack: center;
|
||||||
|
-webkit-justify-content: center;
|
||||||
|
justify-content: center;
|
||||||
|
background-color: #F1F3F5;
|
||||||
|
}
|
||||||
|
.login-wrap #content {
|
||||||
|
padding: 0;
|
||||||
|
width: 56rem;
|
||||||
|
}
|
||||||
|
.login-wrap #content .inner {
|
||||||
|
display: -webkit-box;
|
||||||
|
display: -webkit-flex;
|
||||||
|
display: flex;
|
||||||
|
-webkit-box-align: center;
|
||||||
|
-webkit-align-items: center;
|
||||||
|
align-items: center;
|
||||||
|
-webkit-box-pack: center;
|
||||||
|
-webkit-justify-content: center;
|
||||||
|
justify-content: center;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
-webkit-box-direction: normal;
|
||||||
|
-webkit-flex-direction: column;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
.login-wrap #content .content-inner {
|
||||||
|
margin-top: 4.8rem;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.login-wrap .logo {
|
||||||
|
display: -webkit-box;
|
||||||
|
display: -webkit-flex;
|
||||||
|
display: flex;
|
||||||
|
-webkit-box-align: center;
|
||||||
|
-webkit-align-items: center;
|
||||||
|
align-items: center;
|
||||||
|
-webkit-box-pack: center;
|
||||||
|
-webkit-justify-content: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
.login-wrap .logo img {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
object-fit: contain;
|
||||||
|
}
|
||||||
|
.login-wrap .form-area {
|
||||||
|
padding: 4.8rem 4rem 4rem;
|
||||||
|
background-color: #ffffff;
|
||||||
|
border-radius: 0.8rem;
|
||||||
|
}
|
||||||
|
.login-wrap .form-area .input-group + .input-group {
|
||||||
|
margin-top: 1.6rem;
|
||||||
|
}
|
||||||
|
.login-wrap .form-area .component-input .input-field {
|
||||||
|
height: 4.8rem;
|
||||||
|
}
|
||||||
|
.login-wrap .form-area .component-input .input-label {
|
||||||
|
margin-bottom: 0.8rem;
|
||||||
|
}
|
||||||
|
.login-wrap .form-area .component-btns {
|
||||||
|
margin-top: 3.2rem;
|
||||||
|
}
|
||||||
|
.login-wrap .logo-list {
|
||||||
|
display: -webkit-box;
|
||||||
|
display: -webkit-flex;
|
||||||
|
display: flex;
|
||||||
|
-webkit-box-pack: center;
|
||||||
|
-webkit-justify-content: center;
|
||||||
|
justify-content: center;
|
||||||
|
-webkit-box-align: center;
|
||||||
|
-webkit-align-items: center;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8rem;
|
||||||
|
margin-top: 4rem;
|
||||||
|
}
|
||||||
|
.login-wrap .logo-list li {
|
||||||
|
height: 4rem;
|
||||||
|
}
|
||||||
|
.login-wrap .logo-list li img {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
object-fit: contain;
|
||||||
|
}
|
||||||
|
.login-wrap .info-bullet-list {
|
||||||
|
margin-top: 3.2rem;
|
||||||
|
}
|
||||||
|
.login-wrap + .footer {
|
||||||
|
border-top: 0.1rem solid #E9ECEF;
|
||||||
|
background-color: #F1F3F5;
|
||||||
|
}
|
||||||
/*# sourceMappingURL=sample.css.map */
|
/*# sourceMappingURL=sample.css.map */
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -4012,6 +4012,13 @@ button.swiper-pagination-bullet {
|
|||||||
min-height: initial;
|
min-height: initial;
|
||||||
}
|
}
|
||||||
.btn .btn-txt {
|
.btn .btn-txt {
|
||||||
|
display: -webkit-box;
|
||||||
|
display: -webkit-flex;
|
||||||
|
display: flex;
|
||||||
|
-webkit-box-align: center;
|
||||||
|
-webkit-align-items: center;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.4rem;
|
||||||
font-size: 1.6rem;
|
font-size: 1.6rem;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
@@ -4731,7 +4738,7 @@ input[type=number] {
|
|||||||
-webkit-align-items: center;
|
-webkit-align-items: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
height: 3.6rem;
|
height: 3.6rem;
|
||||||
border: 1px solid gainsboro;
|
border: 1px solid #DEE2E6;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
border-radius: 0.2rem;
|
border-radius: 0.2rem;
|
||||||
@@ -4745,21 +4752,25 @@ input[type=number] {
|
|||||||
font-size: 1.4rem;
|
font-size: 1.4rem;
|
||||||
line-height: 1.6;
|
line-height: 1.6;
|
||||||
}
|
}
|
||||||
.component-input .input-field input ::-webkit-input-placeholder {
|
.component-input .input-field input::-webkit-input-placeholder {
|
||||||
font-size: 1.2rem;
|
font-size: 1.4rem;
|
||||||
line-height: 1.4;
|
line-height: 1.6;
|
||||||
|
color: #ADB5BD;
|
||||||
}
|
}
|
||||||
.component-input .input-field input ::-moz-placeholder {
|
.component-input .input-field input::-moz-placeholder {
|
||||||
font-size: 1.2rem;
|
font-size: 1.4rem;
|
||||||
line-height: 1.4;
|
line-height: 1.6;
|
||||||
|
color: #ADB5BD;
|
||||||
}
|
}
|
||||||
.component-input .input-field input :-ms-input-placeholder {
|
.component-input .input-field input:-ms-input-placeholder {
|
||||||
font-size: 1.2rem;
|
font-size: 1.4rem;
|
||||||
line-height: 1.4;
|
line-height: 1.6;
|
||||||
|
color: #ADB5BD;
|
||||||
}
|
}
|
||||||
.component-input .input-field input ::placeholder {
|
.component-input .input-field input::placeholder {
|
||||||
font-size: 1.2rem;
|
font-size: 1.4rem;
|
||||||
line-height: 1.4;
|
line-height: 1.6;
|
||||||
|
color: #ADB5BD;
|
||||||
}
|
}
|
||||||
.component-input .input-field input[type=search]::-webkit-search-cancel-button {
|
.component-input .input-field input[type=search]::-webkit-search-cancel-button {
|
||||||
-webkit-appearance: none;
|
-webkit-appearance: none;
|
||||||
@@ -5589,17 +5600,6 @@ input[type=number] {
|
|||||||
.component-tab .tab-content.show {
|
.component-tab .tab-content.show {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
.component-tab .tab-content .content-inner {
|
|
||||||
display: -webkit-box;
|
|
||||||
display: -webkit-flex;
|
|
||||||
display: flex;
|
|
||||||
-webkit-box-align: center;
|
|
||||||
-webkit-align-items: center;
|
|
||||||
align-items: center;
|
|
||||||
-webkit-box-pack: center;
|
|
||||||
-webkit-justify-content: center;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
.component-tab.tab-scroll .tab-head {
|
.component-tab.tab-scroll .tab-head {
|
||||||
overflow-x: scroll;
|
overflow-x: scroll;
|
||||||
}
|
}
|
||||||
@@ -6776,6 +6776,54 @@ table tbody th {
|
|||||||
width: 16rem;
|
width: 16rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.summary-area ul {
|
||||||
|
padding: 1.8rem 6.4rem;
|
||||||
|
display: -webkit-box;
|
||||||
|
display: -webkit-flex;
|
||||||
|
display: flex;
|
||||||
|
-webkit-box-align: center;
|
||||||
|
-webkit-align-items: center;
|
||||||
|
align-items: center;
|
||||||
|
-webkit-box-pack: justify;
|
||||||
|
-webkit-justify-content: space-between;
|
||||||
|
justify-content: space-between;
|
||||||
|
background-color: #F1F3F5;
|
||||||
|
border-radius: 0.8rem;
|
||||||
|
}
|
||||||
|
.summary-area ul li {
|
||||||
|
display: -webkit-box;
|
||||||
|
display: -webkit-flex;
|
||||||
|
display: flex;
|
||||||
|
-webkit-box-align: center;
|
||||||
|
-webkit-align-items: center;
|
||||||
|
align-items: center;
|
||||||
|
-webkit-box-flex: 1;
|
||||||
|
-webkit-flex: 1;
|
||||||
|
flex: 1;
|
||||||
|
gap: 0.8rem;
|
||||||
|
color: #212529;
|
||||||
|
}
|
||||||
|
.summary-area ul li p {
|
||||||
|
font-size: 1.5rem;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
.summary-area ul li span {
|
||||||
|
font-size: 1.8rem;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
.summary-area ul li span strong {
|
||||||
|
font-weight: 700;
|
||||||
|
color: #262626;
|
||||||
|
}
|
||||||
|
.summary-area ul li:last-of-type {
|
||||||
|
-webkit-box-pack: end;
|
||||||
|
-webkit-justify-content: flex-end;
|
||||||
|
justify-content: flex-end;
|
||||||
|
}
|
||||||
|
.summary-area + table {
|
||||||
|
margin-top: 2.4rem;
|
||||||
|
}
|
||||||
|
|
||||||
.bottom-btn-group {
|
.bottom-btn-group {
|
||||||
margin-top: 2.4rem;
|
margin-top: 2.4rem;
|
||||||
}
|
}
|
||||||
@@ -6931,4 +6979,128 @@ table tbody th {
|
|||||||
.tree-wrap .list-threedepth li + li {
|
.tree-wrap .list-threedepth li + li {
|
||||||
margin-top: 0.2rem;
|
margin-top: 0.2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.info-bullet-list li {
|
||||||
|
position: relative;
|
||||||
|
padding-left: 1.1rem;
|
||||||
|
color: #495057;
|
||||||
|
font-size: 1.4rem;
|
||||||
|
line-height: 1.6;
|
||||||
|
}
|
||||||
|
.info-bullet-list li a {
|
||||||
|
color: #4980FB;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
.info-bullet-list li:before {
|
||||||
|
position: absolute;
|
||||||
|
content: "";
|
||||||
|
display: block;
|
||||||
|
width: 0.3rem;
|
||||||
|
height: 0.3rem;
|
||||||
|
background-color: #868E96;
|
||||||
|
top: 0.8rem;
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
.info-bullet-list li:before + li {
|
||||||
|
margin-top: 0.4rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-wrap {
|
||||||
|
display: -webkit-box;
|
||||||
|
display: -webkit-flex;
|
||||||
|
display: flex;
|
||||||
|
-webkit-box-align: center;
|
||||||
|
-webkit-align-items: center;
|
||||||
|
align-items: center;
|
||||||
|
-webkit-box-pack: center;
|
||||||
|
-webkit-justify-content: center;
|
||||||
|
justify-content: center;
|
||||||
|
background-color: #F1F3F5;
|
||||||
|
}
|
||||||
|
.login-wrap #content {
|
||||||
|
padding: 0;
|
||||||
|
width: 56rem;
|
||||||
|
}
|
||||||
|
.login-wrap #content .inner {
|
||||||
|
display: -webkit-box;
|
||||||
|
display: -webkit-flex;
|
||||||
|
display: flex;
|
||||||
|
-webkit-box-align: center;
|
||||||
|
-webkit-align-items: center;
|
||||||
|
align-items: center;
|
||||||
|
-webkit-box-pack: center;
|
||||||
|
-webkit-justify-content: center;
|
||||||
|
justify-content: center;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
-webkit-box-direction: normal;
|
||||||
|
-webkit-flex-direction: column;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
.login-wrap #content .content-inner {
|
||||||
|
margin-top: 4.8rem;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.login-wrap .logo {
|
||||||
|
display: -webkit-box;
|
||||||
|
display: -webkit-flex;
|
||||||
|
display: flex;
|
||||||
|
-webkit-box-align: center;
|
||||||
|
-webkit-align-items: center;
|
||||||
|
align-items: center;
|
||||||
|
-webkit-box-pack: center;
|
||||||
|
-webkit-justify-content: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
.login-wrap .logo img {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
object-fit: contain;
|
||||||
|
}
|
||||||
|
.login-wrap .form-area {
|
||||||
|
padding: 4.8rem 4rem 4rem;
|
||||||
|
background-color: #ffffff;
|
||||||
|
border-radius: 0.8rem;
|
||||||
|
}
|
||||||
|
.login-wrap .form-area .input-group + .input-group {
|
||||||
|
margin-top: 1.6rem;
|
||||||
|
}
|
||||||
|
.login-wrap .form-area .component-input .input-field {
|
||||||
|
height: 4.8rem;
|
||||||
|
}
|
||||||
|
.login-wrap .form-area .component-input .input-label {
|
||||||
|
margin-bottom: 0.8rem;
|
||||||
|
}
|
||||||
|
.login-wrap .form-area .component-btns {
|
||||||
|
margin-top: 3.2rem;
|
||||||
|
}
|
||||||
|
.login-wrap .logo-list {
|
||||||
|
display: -webkit-box;
|
||||||
|
display: -webkit-flex;
|
||||||
|
display: flex;
|
||||||
|
-webkit-box-pack: center;
|
||||||
|
-webkit-justify-content: center;
|
||||||
|
justify-content: center;
|
||||||
|
-webkit-box-align: center;
|
||||||
|
-webkit-align-items: center;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8rem;
|
||||||
|
margin-top: 4rem;
|
||||||
|
}
|
||||||
|
.login-wrap .logo-list li {
|
||||||
|
height: 4rem;
|
||||||
|
}
|
||||||
|
.login-wrap .logo-list li img {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
object-fit: contain;
|
||||||
|
}
|
||||||
|
.login-wrap .info-bullet-list {
|
||||||
|
margin-top: 3.2rem;
|
||||||
|
}
|
||||||
|
.login-wrap + .footer {
|
||||||
|
border-top: 0.1rem solid #E9ECEF;
|
||||||
|
background-color: #F1F3F5;
|
||||||
|
}
|
||||||
/*# sourceMappingURL=style.css.map */
|
/*# sourceMappingURL=style.css.map */
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -2,146 +2,151 @@
|
|||||||
<html layout:decorate="~{layout/layout}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
<html layout:decorate="~{layout/layout}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||||
xmlns:th="http://www.thymeleaf.org">
|
xmlns:th="http://www.thymeleaf.org">
|
||||||
|
|
||||||
<section class="fw-bold" layout:fragment="content">
|
<section layout:fragment="content">
|
||||||
|
|
||||||
<form
|
<form
|
||||||
method="post"
|
method="post"
|
||||||
th:action="@{/settings/admins/create}"
|
th:action="@{/settings/admins/create}"
|
||||||
th:object="${bindingVO}">
|
th:object="${bindingVO}">
|
||||||
|
|
||||||
<div class="row mb-3">
|
<table class="type-form">
|
||||||
<label class="col-sm-2 col-form-label" for="id">ID *</label>
|
<tbody>
|
||||||
<div class="col-sm-4">
|
<tr>
|
||||||
<input class="form-control" id="id"
|
<th><label for="roleIds">권한<i class="ico-required-mark" role="img" aria-label="필수">*</i></label></th>
|
||||||
th:classappend="${#fields.hasErrors('id')} ? 'is-invalid'"
|
<td>
|
||||||
th:field="*{id}"/>
|
<div class="d-flex">
|
||||||
<div class="invalid-feedback fw-bold" th:errors="*{id}"
|
<div class="component-input">
|
||||||
th:if="${#fields.hasErrors('id')}">
|
<div class="component-select">
|
||||||
에러 메세지
|
<select class="select-list" id="roleIds"
|
||||||
</div>
|
th:classappend="${#fields.hasErrors('roleIds')} ? 'is-invalid'"
|
||||||
|
th:field="*{roleIds}"
|
||||||
|
onchange="onRoleChange(this);">
|
||||||
|
<option value="">선택</option>
|
||||||
|
<option th:each="role : ${roles}" th:text="${role.description}"
|
||||||
|
th:value="${role.id}"></option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="invalid-feedback fw-bold" th:errors="*{roleIds}"
|
||||||
|
th:if="${#fields.hasErrors('roleIds')}">
|
||||||
|
에러 메세지
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th><label for="id">ID<i class="ico-required-mark" role="img" aria-label="필수">*</i></label></th>
|
||||||
|
<td>
|
||||||
|
<div class="component-input">
|
||||||
|
<div class="input-field">
|
||||||
|
<input id="id"
|
||||||
|
th:classappend="${#fields.hasErrors('id')} ? 'is-invalid'"
|
||||||
|
th:field="*{id}"/>
|
||||||
|
<div class="invalid-feedback fw-bold" th:errors="*{id}"
|
||||||
|
th:if="${#fields.hasErrors('id')}">
|
||||||
|
에러 메세지
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<th><label for="password">Password<i class="ico-required-mark" role="img" aria-label="필수">*</i></label></th>
|
||||||
|
<td>
|
||||||
|
<div class="component-input">
|
||||||
|
<div class="input-field">
|
||||||
|
<input id="password" type="password"
|
||||||
|
th:classappend="${#fields.hasErrors('password')} ? 'is-invalid'"
|
||||||
|
th:field="*{password}"/>
|
||||||
|
<div class="invalid-feedback fw-bold" th:errors="*{password}"
|
||||||
|
th:if="${#fields.hasErrors('password')}">
|
||||||
|
에러 메세지
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="regionMainCodeArea"
|
||||||
|
th:classappend="${#lists.isEmpty(bindingVO.roleIds) or #lists.contains(bindingVO.roleIds, 'ROLE_ADMIN')} ? 'd-none'">
|
||||||
|
<th><label for="regionMainCode">실사<i class="ico-required-mark" role="img" aria-label="필수">*</i></label></th>
|
||||||
|
<td>
|
||||||
|
<div class="component-select">
|
||||||
|
<select class="select-list" id="regionMainCode" name="regionMainCode"
|
||||||
|
th:classappend="${#fields.hasErrors('regionMainCode')} ? 'is-invalid'"
|
||||||
|
th:field="*{regionMainCode}">
|
||||||
|
<option value="">선택</option>
|
||||||
|
<option th:each="code : ${regionMainCode}"
|
||||||
|
th:value="${code.id}"
|
||||||
|
th:text="${code.codeText}">
|
||||||
|
</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="invalid-feedback fw-bold" th:errors="*{regionMainCode}"
|
||||||
|
th:if="${#fields.hasErrors('regionMainCode')}">
|
||||||
|
에러 메세지
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th><label>사용 여부<i class="ico-required-mark" role="img" aria-label="필수">*</i></label></th>
|
||||||
|
<td class="radio-group">
|
||||||
|
<div class="component-input">
|
||||||
|
<label for="inlineRadio1" class="radio-inner">
|
||||||
|
<input id="inlineRadio1" th:field="*{accountDisabled}" type="radio" value="true">
|
||||||
|
<span class="radio-item">
|
||||||
|
<span class="radio-txt">미사용</span>
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="component-input">
|
||||||
|
<label for="inlineRadio2" class="radio-inner">
|
||||||
|
<input id="inlineRadio2" th:field="*{accountDisabled}" type="radio" value="false" checked>
|
||||||
|
<span class="radio-item">
|
||||||
|
<span class="radio-txt">사용</span>
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="invalid-feedback fw-bold" th:errors="*{accountDisabled}"
|
||||||
|
th:if="${#fields.hasErrors('accountDisabled')}">
|
||||||
|
에러 메세지
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div class="component-btns bottom-btn-group">
|
||||||
|
<div class="btns-row align-right">
|
||||||
|
<button type="button" class="btn btn-secondary" onclick="gotoList();return false;">
|
||||||
|
<span class="btn-txt">목록으로 이동</span>
|
||||||
|
</button>
|
||||||
|
<button type="submit" class="btn btn-primary">
|
||||||
|
<span class="btn-txt">저장</span>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row mb-3">
|
|
||||||
<label class="col-sm-2 col-form-label" for="password">Password *</label>
|
|
||||||
<div class="col-sm-4">
|
|
||||||
|
|
||||||
<input class="form-control" id="password"
|
|
||||||
th:classappend="${#fields.hasErrors('password')} ? 'is-invalid'"
|
|
||||||
th:field="*{password}"
|
|
||||||
type="password"/>
|
|
||||||
<div class="invalid-feedback fw-bold" th:errors="*{password}"
|
|
||||||
th:if="${#fields.hasErrors('password')}">
|
|
||||||
에러 메세지
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row mb-3">
|
|
||||||
<label class="col-sm-2 col-form-label" for="email">Email *</label>
|
|
||||||
<div class="col-sm-4">
|
|
||||||
<input class="form-control" id="email"
|
|
||||||
th:classappend="${#fields.hasErrors('email')} ? 'is-invalid'"
|
|
||||||
th:field="*{email}"
|
|
||||||
type="email"/>
|
|
||||||
<div class="invalid-feedback fw-bold" th:errors="*{email}"
|
|
||||||
th:if="${#fields.hasErrors('email')}">
|
|
||||||
에러 메세지
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row mb-3">
|
|
||||||
<label class="col-sm-2 col-form-label" for="roleIds">권한 *</label>
|
|
||||||
<div class="col-sm-4">
|
|
||||||
<select class="form-control" id="roleIds" multiple
|
|
||||||
th:classappend="${#fields.hasErrors('roleIds')} ? 'is-invalid'"
|
|
||||||
th:field="*{roleIds}"
|
|
||||||
onchange="onRoleChange(this);">
|
|
||||||
<option th:each="role : ${roles}" th:text="${role.id}"
|
|
||||||
th:value="${role.id}"></option>
|
|
||||||
</select>
|
|
||||||
<div class="invalid-feedback fw-bold" th:errors="*{roleIds}"
|
|
||||||
th:if="${#fields.hasErrors('roleIds')}">
|
|
||||||
에러 메세지
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row mb-3 regionMainCodeArea" style="display: none;">
|
|
||||||
<label class="col-sm-2 col-form-label" for="regionMainCode">실사 *</label>
|
|
||||||
<div class="col-sm-4">
|
|
||||||
<select class="form-select" id="regionMainCode" name="regionMainCode"
|
|
||||||
th:field="*{regionMainCode}">
|
|
||||||
<option value="">선택</option>
|
|
||||||
<option th:each="code : ${regionMainCode}"
|
|
||||||
th:value="${code.id}"
|
|
||||||
th:text="${code.codeText}">
|
|
||||||
</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 활성화 -->
|
|
||||||
<div class="row mb-3">
|
|
||||||
<label class="col-sm-2 col-form-label" for="inlineRadio1">비활성화 여부 *</label>
|
|
||||||
<div class="col-sm-4 pt-1">
|
|
||||||
<div class="form-check form-check-inline">
|
|
||||||
<input class="form-check-input" id="inlineRadio1" name="accountDisabled"
|
|
||||||
type="radio" value="true">
|
|
||||||
<label class="form-check-label" for="inlineRadio1">비활성화</label>
|
|
||||||
</div>
|
|
||||||
<div class="form-check form-check-inline">
|
|
||||||
<input checked class="form-check-input" id="inlineRadio2"
|
|
||||||
name="accountDisabled" type="radio" value="false">
|
|
||||||
<label class="form-check-label" for="inlineRadio2">활성화</label>
|
|
||||||
</div>
|
|
||||||
<div class="invalid-feedback fw-bold" th:errors="*{roleIds}"
|
|
||||||
th:if="${#fields.hasErrors('roleIds')}">
|
|
||||||
에러 메세지
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 계정잠김 -->
|
|
||||||
<div class="row mb-3">
|
|
||||||
<label class="col-sm-2 col-form-label" for="accountLocked1">계정잠김 여부*</label>
|
|
||||||
<div class="col-sm-4 pt-1">
|
|
||||||
<div class="form-check form-check-inline">
|
|
||||||
<input class="form-check-input" id="accountLocked1" name="accountLocked"
|
|
||||||
type="radio" value="true">
|
|
||||||
<label class="form-check-label" for="accountLocked1">Locked</label>
|
|
||||||
</div>
|
|
||||||
<div class="form-check form-check-inline">
|
|
||||||
<input checked class="form-check-input" id="accountLocked2"
|
|
||||||
name="accountLocked" type="radio" value="false">
|
|
||||||
<label class="form-check-label" for="accountLocked2">Unlocked</label>
|
|
||||||
</div>
|
|
||||||
<div class="invalid-feedback fw-bold" th:errors="*{roleIds}"
|
|
||||||
th:if="${#fields.hasErrors('roleIds')}">
|
|
||||||
에러 메세지
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<button class="btn btn-primary float-end" type="submit">저장</button>
|
|
||||||
<button class="btn btn-light" onclick="gotoList();return false;" type="button">목록으로 이동
|
|
||||||
</button>
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<script>
|
<th:block layout:fragment="script">
|
||||||
function gotoList() {
|
<script th:inline="javascript">
|
||||||
document.prevAdminParamForm ? document.prevAdminParamForm.submit()
|
function gotoList() {
|
||||||
: location.href = '/settings/admins';
|
if (document.prevAdminParamForm) {
|
||||||
}
|
const f = document.prevAdminParamForm;
|
||||||
</script>
|
f.submit();
|
||||||
|
} else {
|
||||||
|
location.href = '/settings/admins';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
<script>
|
$(document).ready(() => {
|
||||||
const onRoleChange = (el) => {
|
const roleSelect = document.getElementById('roleIds');
|
||||||
$('.regionMainCodeArea').toggle(el.value !== "ROLE_ADMIN");
|
onRoleChange(roleSelect);
|
||||||
}
|
});
|
||||||
</script>
|
const onRoleChange = (el) => {
|
||||||
|
const selectedValues = Array.from(el.selectedOptions).map(option => option.value);
|
||||||
|
const isAdmin = !selectedValues.length || selectedValues.includes('ROLE_ADMIN');
|
||||||
|
$('.regionMainCodeArea').toggle(!isAdmin);
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
</th:block>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|||||||
@@ -13,122 +13,113 @@
|
|||||||
<input name="sort" th:value="${listOutput.pageable.sort}" type="hidden"/>
|
<input name="sort" th:value="${listOutput.pageable.sort}" type="hidden"/>
|
||||||
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
|
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
|
||||||
|
|
||||||
<div class="row p-2 mb-2 border-secondary border-top border-bottom border-1">
|
<section class="filter-wrap">
|
||||||
<div class="col-5">
|
<div class="form-area">
|
||||||
<label class="col-sm-2 col-form-label" for="searchField">검색필드</label>
|
<div class="input-group">
|
||||||
<select class="form-select d-inline w-25" id="searchField"
|
<div class="input-label">
|
||||||
th:field="*{searchField}">
|
<p class="label-txt"><label for="searchField">검색필드</label></p>
|
||||||
<option selected value="">선택</option>
|
</div>
|
||||||
<option value="id">ID</option>
|
<div class="d-flex">
|
||||||
<option value="email">Email</option>
|
<div class="component-select">
|
||||||
</select>
|
<select class="select-list" id="searchField" th:field="*{searchField}">
|
||||||
<label>
|
<option selected value="">선택</option>
|
||||||
<input class="form-control d-inline" placeholder="검색어를 입력하세요."
|
<option value="id">ID</option>
|
||||||
style="width: 250px;"
|
<option value="email">Email</option>
|
||||||
th:field="*{searchValue}" type="text">
|
</select>
|
||||||
</label>
|
</div>
|
||||||
|
<div class="component-input">
|
||||||
|
<div class="input-field">
|
||||||
|
<input type="text" placeholder="검색어를 입력하세요."
|
||||||
|
style="width: 250px;"
|
||||||
|
th:field="*{searchValue}" >
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="input-label">
|
||||||
|
<p class="label-txt">권한</p>
|
||||||
|
</div>
|
||||||
|
<div class="component-select">
|
||||||
|
<select class="select-list" id="searchRole" th:field="*{searchRole}">
|
||||||
|
<option selected value="">전체</option>
|
||||||
|
<option th:each="role : ${roles}" th:text="${role.id}"
|
||||||
|
th:value="${role.id}"></option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="component-btns">
|
||||||
|
<div class="btns-row">
|
||||||
|
<button class="btn" onclick="goSearch();"
|
||||||
|
type="button">
|
||||||
|
검색
|
||||||
|
</button>
|
||||||
|
<button class="btn" onclick="goInit();"
|
||||||
|
type="button">초기화
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
</section>
|
||||||
<label class="col-sm-2 col-form-label" for="searchRole">권한</label>
|
|
||||||
<select class="form-select d-inline w-50" id="searchRole" th:field="*{searchRole}">
|
|
||||||
<option selected value="">전체</option>
|
|
||||||
<option th:each="role : ${roles}" th:text="${role.id}"
|
|
||||||
th:value="${role.id}"></option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div class="col text-end">
|
|
||||||
<button class="btn btn-outline-secondary" onclick="goSearch();"
|
|
||||||
type="button">
|
|
||||||
<i class="bi bi-search"></i>
|
|
||||||
</button>
|
|
||||||
<button class="btn btn-outline-secondary" onclick="goInit();"
|
|
||||||
type="button">초기화
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col text-start">
|
<div class="col text-start">
|
||||||
<div class="fw-bolder text-muted">Total: <span
|
<div class="fw-bolder text-muted">Total: <span
|
||||||
th:text="${listOutput.totalElements}"></span></div>
|
th:text="${listOutput.totalElements}"></span></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col text-end">
|
</div>
|
||||||
<i class="bi bi-list-ol"></i>
|
<section>
|
||||||
<label>
|
<table>
|
||||||
<select class="form-select form-select-sm" id="pageSize" name="pageSize"
|
<thead>
|
||||||
onchange="goSearch()">
|
<tr>
|
||||||
<option
|
<th >#</th>
|
||||||
th:each="item : ${pageRows}"
|
<th scope="col">
|
||||||
th:selected="${#strings.toString(listOutput.pageable.pageSize) eq item.codeValue}"
|
<label><input class="form-check-input" onchange="toggleCheckbox(this);"
|
||||||
th:text="${item.codeText}"
|
type="checkbox"/></label>
|
||||||
th:value="${item.codeValue}"></option>
|
</th>
|
||||||
</select>
|
<th scope="col"><a class="order-able" data-sort-field="id" href="#">ID</a></th>
|
||||||
</label>
|
<th class="text-secondary" scope="col">권한</th>
|
||||||
|
</th>
|
||||||
|
<th scope="col"><a class="order-able" data-sort-field="accountDisabled"
|
||||||
|
href="#">활성화</a>
|
||||||
|
</th>
|
||||||
|
<th scope="col"><a class="order-able" data-sort-field="createdAt" href="#">등록일</a>
|
||||||
|
</th>
|
||||||
|
<th scope="col"><a class="order-able" data-sort-field="updatedAt" href="#">수정일</a>
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr th:each="item, status : ${listOutput.content}">
|
||||||
|
<th th:text="${status.count + (listOutput.pageable.pageNumber * listOutput.pageable.pageSize)}">
|
||||||
|
게시물번호
|
||||||
|
</th>
|
||||||
|
<td><label><input class="form-check-input" name="checkedIds" th:value="${item.id}"
|
||||||
|
type="checkbox"/></label>
|
||||||
|
</td>
|
||||||
|
<td class="underline"><a th:href="|javascript:goUpdate('${item.id}')|" th:text="${item.id}">아이디</a>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<span th:each="role, status : ${item.roles}"
|
||||||
|
th:text="${role.getDescription()} + ${!status.last ? ', ': ''}"></span>
|
||||||
|
</td>
|
||||||
|
<td th:text="${item.accountDisabled == null || !item.accountDisabled ? 'Y' : 'N' }"></td>
|
||||||
|
<td th:text="${#temporals.format(item.createdAt, 'yyyy-MM-dd hh:mm')}">등록일</td>
|
||||||
|
<td th:text="${#temporals.format(item.updatedAt, 'yyyy-MM-dd hh:mm')}">수정일</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div th:replace="common/list-components :: pagination(${listOutput})"></div>
|
||||||
|
<div class="component-btns bottom-btn-group">
|
||||||
|
<div class="btns-row align-right">
|
||||||
|
<button class="btn btn-success" onclick="goExcel();" type="button">엑셀 다운로드</button>
|
||||||
|
<button class="btn" onclick="location.href='/settings/admins/create';" type="button">등록</button>
|
||||||
|
<button class="btn" onclick="goRemove();" type="button">삭제</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</section>
|
||||||
|
|
||||||
<table class="table">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th scope="col">#</th>
|
|
||||||
<th scope="col">
|
|
||||||
<label><input class="form-check-input" onchange="toggleCheckbox(this);"
|
|
||||||
type="checkbox"/></label>
|
|
||||||
</th>
|
|
||||||
<th scope="col"><a class="order-able" data-sort-field="id" href="#">ID</a></th>
|
|
||||||
<th class="text-secondary" scope="col">권한</th>
|
|
||||||
<th scope="col"><a class="order-able" data-sort-field="email" href="#">Email</a>
|
|
||||||
</th>
|
|
||||||
<th scope="col"><a class="order-able" data-sort-field="accountDisabled"
|
|
||||||
href="#">활성화</a>
|
|
||||||
</th>
|
|
||||||
<th scope="col"><a class="order-able" data-sort-field="accountLocked"
|
|
||||||
href="#">계정잠김</a></th>
|
|
||||||
<th scope="col"><a class="order-able" data-sort-field="createdAt" href="#">등록일</a>
|
|
||||||
</th>
|
|
||||||
<th scope="col"><a class="order-able" data-sort-field="updatedAt" href="#">수정일</a>
|
|
||||||
</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr th:each="item, status : ${listOutput.content}">
|
|
||||||
<th scope="row"
|
|
||||||
th:text="${status.count + (listOutput.pageable.pageNumber * listOutput.pageable.pageSize)}">
|
|
||||||
게시물번호
|
|
||||||
</th>
|
|
||||||
<td><label><input class="form-check-input" name="checkedIds" th:value="${item.id}"
|
|
||||||
type="checkbox"/></label>
|
|
||||||
</td>
|
|
||||||
<td><a th:href="|javascript:goUpdate('${item.id}')|" th:text="${item.id}">아이디</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<span th:each="role, status : ${item.roles}"
|
|
||||||
th:text="${role.getId()} + ${!status.last ? ', ': ''}"></span>
|
|
||||||
</td>
|
|
||||||
<td th:text="${item.email}">이메일</td>
|
|
||||||
<td th:text="${item.accountDisabled == null || !item.accountDisabled ? 'Y' : 'N' }"></td>
|
|
||||||
<td th:text="${item.accountLocked == null || !item.accountLocked ? 'N' : 'Y' }"></td>
|
|
||||||
<td th:text="${#temporals.format(item.createdAt, 'yyyy-MM-dd hh:mm')}">등록일</td>
|
|
||||||
<td th:text="${#temporals.format(item.updatedAt, 'yyyy-MM-dd hh:mm')}">수정일</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<div th:replace="common/list-components :: pagination(${listOutput})"></div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col text-start">
|
|
||||||
<button class="btn btn-success" onclick="goExcel();" type="button">엑셀 다운로드</button>
|
|
||||||
</div>
|
|
||||||
<div class="col text-end mb-2">
|
|
||||||
<button class="btn btn-primary" onclick="location.href='/settings/admins/create';"
|
|
||||||
type="button">등록
|
|
||||||
</button>
|
|
||||||
<button class="btn btn-danger" onclick="goRemove();" type="button">삭제</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section layout:fragment="script">
|
<section layout:fragment="script">
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<html layout:decorate="~{layout/layout}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
<html layout:decorate="~{layout/layout}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||||
xmlns:th="http://www.thymeleaf.org">
|
xmlns:th="http://www.thymeleaf.org">
|
||||||
|
|
||||||
<section class="fw-bold" layout:fragment="content">
|
<section layout:fragment="content">
|
||||||
|
|
||||||
<form
|
<form
|
||||||
method="post"
|
method="post"
|
||||||
@@ -11,170 +11,159 @@
|
|||||||
|
|
||||||
<input type="hidden" name="seq" th:field="*{seq}"/>
|
<input type="hidden" name="seq" th:field="*{seq}"/>
|
||||||
|
|
||||||
<div class="row mb-3">
|
<table class="type-form">
|
||||||
<label class="col-sm-2 col-form-label" for="id">ID *</label>
|
<tbody>
|
||||||
<div class="col-sm-4">
|
<tr>
|
||||||
<input class="form-control" id="id" readonly="readonly"
|
<th> <label for="roleIds">권한<i class="ico-required-mark" role="img" aria-label="필수">*</i></label></th>
|
||||||
th:field="*{id}"/>
|
<td>
|
||||||
|
<div class="component-select">
|
||||||
|
<select class="select-list" id="roleIds"
|
||||||
|
th:classappend="${#fields.hasErrors('roleIds')} ? 'is-invalid'"
|
||||||
|
th:field="*{roleIds}"
|
||||||
|
onchange="onRoleChange(this);">
|
||||||
|
<option value="">선택</option>
|
||||||
|
<option th:each="role : ${roles}" th:text="${role.description}"
|
||||||
|
th:value="${role.id}"></option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="invalid-feedback fw-bold" th:errors="*{roleIds}"
|
||||||
|
th:if="${#fields.hasErrors('roleIds')}">
|
||||||
|
에러 메세지
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th><label for="id">ID<i class="ico-required-mark" role="img" aria-label="필수">*</i></label></th>
|
||||||
|
<td>
|
||||||
|
<div class="component-input">
|
||||||
|
<div class="input-field">
|
||||||
|
<input id="id" readonly="readonly" th:field="*{id}"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<th><label for="password">비밀번호<i class="ico-required-mark" role="img" aria-label="필수">*</i></label></th>
|
||||||
|
<td>
|
||||||
|
<div class="component-input">
|
||||||
|
<div class="input-field">
|
||||||
|
<input id="password" placeholder="암호를 변경하고 싶다면 입력하세요"
|
||||||
|
th:classappend="${#fields.hasErrors('updatePassword')} ? 'is-invalid'"
|
||||||
|
th:field="*{updatePassword}"
|
||||||
|
type="password"/>
|
||||||
|
</div>
|
||||||
|
<div class="invalid-feedback fw-bold" th:errors="*{updatePassword}"
|
||||||
|
th:if="${#fields.hasErrors('updatePassword')}">
|
||||||
|
에러 메세지
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="regionMainCodeArea"
|
||||||
|
th:classappend="${#lists.isEmpty(bindingVO.roleIds) or #lists.contains(bindingVO.roleIds, 'ROLE_ADMIN')} ? 'd-none'">
|
||||||
|
<th><label for="regionMainCode">실사<i class="ico-required-mark" role="img" aria-label="필수">*</i></label></th>
|
||||||
|
<td>
|
||||||
|
<div class="component-select">
|
||||||
|
<select class="select-list" id="regionMainCode" name="regionMainCode"
|
||||||
|
th:classappend="${#fields.hasErrors('regionMainCode')} ? 'is-invalid'"
|
||||||
|
th:field="*{regionMainCode}">
|
||||||
|
<option value="">선택</option>
|
||||||
|
<option th:each="code : ${regionMainCode}"
|
||||||
|
th:value="${code.id}"
|
||||||
|
th:text="${code.codeText}">
|
||||||
|
</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="invalid-feedback fw-bold" th:errors="*{regionMainCode}"
|
||||||
|
th:if="${#fields.hasErrors('regionMainCode')}">
|
||||||
|
에러 메세지
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th> <label>사용 여부<i class="ico-required-mark" role="img" aria-label="필수">*</i></label></th>
|
||||||
|
<td class="radio-group">
|
||||||
|
<div class="component-input">
|
||||||
|
<label for="inlineRadio1" class="radio-inner">
|
||||||
|
<input id="inlineRadio1" th:field="*{accountDisabled}" type="radio" value="true">
|
||||||
|
<span class="radio-item">
|
||||||
|
<span class="radio-txt">미사용</span>
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="component-input">
|
||||||
|
<label for="inlineRadio2" class="radio-inner">
|
||||||
|
<input id="inlineRadio2" th:field="*{accountDisabled}" type="radio" value="false">
|
||||||
|
<span class="radio-item">
|
||||||
|
<span class="radio-txt">사용</span>
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="invalid-feedback fw-bold" th:errors="*{accountDisabled}"
|
||||||
|
th:if="${#fields.hasErrors('accountDisabled')}">
|
||||||
|
에러 메세지
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<!-- <div th:replace="common/components :: auditArea"></div>-->
|
||||||
|
|
||||||
|
<div class="component-btns bottom-btn-group">
|
||||||
|
<div class="btns-row align-right">
|
||||||
|
<button type="button" class="btn btn-secondary" onclick="gotoList();return false;">
|
||||||
|
<span class="btn-txt">목록</span>
|
||||||
|
</button>
|
||||||
|
<button type="submit" class="btn btn-primary">
|
||||||
|
<span class="btn-txt">저장</span>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row mb-3">
|
|
||||||
<label class="col-sm-2 col-form-label" for="password">Password *</label>
|
|
||||||
<div class="col-sm-4">
|
|
||||||
<input class="form-control" id="password" placeholder="암호를 변경하고 싶다면 입력하세요"
|
|
||||||
th:classappend="${#fields.hasErrors('updatePassword')} ? 'is-invalid'"
|
|
||||||
th:field="*{updatePassword}"
|
|
||||||
type="password"/>
|
|
||||||
<div class="invalid-feedback fw-bold" th:errors="*{updatePassword}"
|
|
||||||
th:if="${#fields.hasErrors('updatePassword')}">
|
|
||||||
에러 메세지
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row mb-3">
|
|
||||||
<label class="col-sm-2 col-form-label" for="email">Email *</label>
|
|
||||||
<div class="col-sm-4">
|
|
||||||
<input class="form-control" id="email"
|
|
||||||
th:classappend="${#fields.hasErrors('email')} ? 'is-invalid'"
|
|
||||||
th:field="*{email}"
|
|
||||||
type="email"/>
|
|
||||||
<div class="invalid-feedback fw-bold" th:errors="*{email}"
|
|
||||||
th:if="${#fields.hasErrors('email')}">
|
|
||||||
에러 메세지
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row mb-3">
|
|
||||||
<label class="col-sm-2 col-form-label" for="roleIds">권한 *</label>
|
|
||||||
<div class="col-sm-4">
|
|
||||||
<select class="form-control" id="roleIds" multiple
|
|
||||||
th:classappend="${#fields.hasErrors('roleIds')} ? 'is-invalid'"
|
|
||||||
th:field="*{roleIds}"
|
|
||||||
onchange="onRoleChange(this);">
|
|
||||||
<option th:each="role : ${roles}" th:text="${role.id}"
|
|
||||||
th:value="${role.id}"></option>
|
|
||||||
</select>
|
|
||||||
<div class="invalid-feedback fw-bold" th:errors="*{roleIds}"
|
|
||||||
th:if="${#fields.hasErrors('roleIds')}">
|
|
||||||
에러 메세지
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row mb-3 regionMainCodeArea"
|
|
||||||
th:style="${#lists.contains(bindingVO.roleIds, 'ROLE_ADMIN')} ? 'display: none;' : 'display: flex;'">
|
|
||||||
<label class="col-sm-2 col-form-label" for="regionMainCode">실사 *</label>
|
|
||||||
<div class="col-sm-4">
|
|
||||||
<select class="form-select" id="regionMainCode" name="regionMainCode"
|
|
||||||
th:classappend="${#fields.hasErrors('regionMainCode')} ? 'is-invalid'"
|
|
||||||
th:field="*{regionMainCode}">
|
|
||||||
<option value="">선택</option>
|
|
||||||
<option th:each="code : ${regionMainCode}"
|
|
||||||
th:value="${code.id}"
|
|
||||||
th:text="${code.codeText}">
|
|
||||||
</option>
|
|
||||||
</select>
|
|
||||||
<div class="invalid-feedback fw-bold" th:errors="*{regionMainCode}"
|
|
||||||
th:if="${#fields.hasErrors('regionMainCode')}">
|
|
||||||
에러 메세지
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 활성화 -->
|
|
||||||
<div class="row mb-3">
|
|
||||||
<label class="col-sm-2 col-form-label" for="inlineRadio1">비활성화 여부 *</label>
|
|
||||||
<div class="col-sm-4 pt-1">
|
|
||||||
<div class="form-check form-check-inline">
|
|
||||||
<input class="form-check-input" id="inlineRadio1" th:field="*{accountDisabled}"
|
|
||||||
type="radio" value="true">
|
|
||||||
<label class="form-check-label" for="inlineRadio1">비활성화</label>
|
|
||||||
</div>
|
|
||||||
<div class="form-check form-check-inline">
|
|
||||||
<input class="form-check-input" id="inlineRadio2" th:field="*{accountDisabled}"
|
|
||||||
type="radio" value="false">
|
|
||||||
<label class="form-check-label" for="inlineRadio2">활성화</label>
|
|
||||||
</div>
|
|
||||||
<div class="invalid-feedback fw-bold" th:errors="*{roleIds}"
|
|
||||||
th:if="${#fields.hasErrors('roleIds')}">
|
|
||||||
에러 메세지
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 계정잠김 -->
|
|
||||||
<div class="row mb-3">
|
|
||||||
<label class="col-sm-2 col-form-label" for="accountLocked1">계정잠김 여부*</label>
|
|
||||||
<div class="col-sm-4 pt-1">
|
|
||||||
<div class="form-check form-check-inline">
|
|
||||||
<input class="form-check-input" id="accountLocked1" th:field="*{accountLocked}"
|
|
||||||
type="radio" value="true">
|
|
||||||
<label class="form-check-label" for="accountLocked1">Locked</label>
|
|
||||||
</div>
|
|
||||||
<div class="form-check form-check-inline">
|
|
||||||
<input class="form-check-input" id="accountLocked2" th:field="*{accountLocked}"
|
|
||||||
type="radio" value="false">
|
|
||||||
<label class="form-check-label" for="accountLocked2">Unlocked</label>
|
|
||||||
</div>
|
|
||||||
<div class="invalid-feedback fw-bold" th:errors="*{roleIds}"
|
|
||||||
th:if="${#fields.hasErrors('roleIds')}">
|
|
||||||
에러 메세지
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row w-50">
|
|
||||||
<!-- audit area -->
|
|
||||||
<div th:replace="common/components :: auditArea"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<button class="btn btn-primary float-end" type="submit">저장</button>
|
|
||||||
<button class="btn btn-light" onclick="gotoList();return false;" type="button">목록으로 이동
|
|
||||||
</button>
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<!-- 이전 목록페이지의 검색 및 정렬조건 폼 -->
|
<!-- 이전 목록페이지의 검색 및 정렬조건 폼 -->
|
||||||
<th:block th:if="${listStatus != null}">
|
<th:block th:if="${listStatus != null}">
|
||||||
<form method="get" name="prevAdminParamForm"
|
<form method="get" name="prevAdminParamForm"
|
||||||
th:action="@{/settings/admins}"
|
th:action="@{/settings/admins}"
|
||||||
th:object="${listStatus}">
|
th:object="${listStatus}">
|
||||||
<input th:field="*{searchField}" type="hidden">
|
<input th:field="*{searchField}" type="hidden">
|
||||||
<input th:field="*{searchValue}" type="hidden">
|
<input th:field="*{searchValue}" type="hidden">
|
||||||
<input th:field="*{searchRole}" type="hidden">
|
<input th:field="*{searchRole}" type="hidden">
|
||||||
<th:block th:if="${pageable != null}">
|
<th:block th:if="${pageable != null}">
|
||||||
<input name="page" th:value="${pageable.page}" type="hidden"/>
|
<input name="page" th:value="${pageable.page}" type="hidden"/>
|
||||||
<input name="sort" th:value="${pageable.sort}" type="hidden"/>
|
<input name="sort" th:value="${pageable.sort}" type="hidden"/>
|
||||||
</th:block>
|
</th:block>
|
||||||
</form>
|
</form>
|
||||||
</th:block>
|
</th:block>
|
||||||
|
|
||||||
<script th:inline="javascript">
|
<th:block layout:fragment="script">
|
||||||
function gotoList() {
|
<script th:inline="javascript">
|
||||||
if (document.prevAdminParamForm) {
|
function gotoList() {
|
||||||
const f = document.prevAdminParamForm;
|
if (document.prevAdminParamForm) {
|
||||||
f.sort.value = convertToPageableSortValue(f.sort.value);
|
const f = document.prevAdminParamForm;
|
||||||
f.submit();
|
f.submit();
|
||||||
} else {
|
} else {
|
||||||
location.href = '/settings/admins';
|
location.href = '/settings/admins';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
$(document).ready(() => {
|
$(document).ready(() => {
|
||||||
showAudit([[${bindingVO.id}]], [[${bindingVO.createdBy}]],
|
showAudit([[${bindingVO.id}]], [[${bindingVO.createdBy}]],
|
||||||
[[${#temporals.format(bindingVO.createdAt, "yyyy-MM-dd'T'HH:mm:ss")}]],
|
[[${#temporals.format(bindingVO.createdAt, "yyyy-MM-dd'T'HH:mm:ss")}]],
|
||||||
[[${bindingVO.updatedBy}]],
|
[[${bindingVO.updatedBy}]],
|
||||||
[[${#temporals.format(bindingVO.updatedAt, "yyyy-MM-dd'T'HH:mm:ss")}]]);
|
[[${#temporals.format(bindingVO.updatedAt, "yyyy-MM-dd'T'HH:mm:ss")}]]);
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script>
|
// 초기 로드 시 roleIds에 따라 regionMainCodeArea 표시/숨김
|
||||||
const onRoleChange = (el) => {
|
const roleSelect = document.getElementById('roleIds');
|
||||||
$('.regionMainCodeArea').toggle(el.value !== "ROLE_ADMIN");
|
if (roleSelect) {
|
||||||
}
|
onRoleChange(roleSelect);
|
||||||
</script>
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const onRoleChange = (el) => {
|
||||||
|
const isAdmin = el.value === 'ROLE_ADMIN' || !el.value;
|
||||||
|
$('.regionMainCodeArea').toggle(!isAdmin);
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
</th:block>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|||||||
@@ -11,25 +11,20 @@
|
|||||||
-->
|
-->
|
||||||
<div th:fragment="pagination(items)">
|
<div th:fragment="pagination(items)">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<nav aria-label="Page navigation example">
|
<nav class="component-pagination" aria-label="페이지네이션">
|
||||||
<ul class="pagination justify-content-center">
|
<a class="pagination-item prev"
|
||||||
<li class="page-item" th:classappend="${!items.pageable.hasPrevious} ? 'disabled'">
|
th:classappend="${!items.pageable.hasPrevious} ? 'disabled'"
|
||||||
<a class="page-link"
|
th:href="${items.pageable.hasPrevious} ? 'javascript:goPageable(' + ${items.pageable.pageNumber - 1} + ', ' + ${items.pageable.pageSize} + ', \'' + ${items.pageable.sort ?: 'id,desc'} + '\')' : '#'"></a>
|
||||||
th:href="|javascript:goPageable(${items.pageable.pageNumber - 1}, ${items.pageable.pageSize}, '${items.pageable.sort}')|">이전</a>
|
|
||||||
</li>
|
<a class="pagination-item"
|
||||||
<li class="page-item"
|
th:classappend="${idx == items.pageable.pageNumber} ? 'disabled'"
|
||||||
th:classappend="${idx == items.pageable.pageNumber} ? 'disabled'"
|
th:each="idx : ${#numbers.sequence(0, items.totalPages == 0 ? 0 : items.totalPages - 1)}"
|
||||||
th:each="idx : ${#numbers.sequence(0, items.totalPages == 0 ? 0 : items.totalPages - 1)}">
|
th:href="${idx != items.pageable.pageNumber} ? 'javascript:goPageable(' + ${idx} + ', ' + ${items.pageable.pageSize} + ', \'' + ${items.pageable.sort ?: 'id,desc'} + '\')' : '#'"
|
||||||
<a class="page-link"
|
th:text="${idx + 1}">페이지넘버</a>
|
||||||
th:href="|javascript:goPageable(${idx}, ${items.pageable.pageSize}, '${items.pageable.sort}')|"
|
|
||||||
th:text="${idx+1}">페이지넘버</a>
|
<a class="pagination-item next"
|
||||||
</li>
|
th:classappend="${items.pageable.pageNumber >= items.totalPages - 1 or items.totalPages == 0} ? 'disabled'"
|
||||||
<li class="page-item"
|
th:href="${items.pageable.pageNumber < items.totalPages - 1 and items.totalPages > 0} ? 'javascript:goPageable(' + ${items.pageable.pageNumber + 1} + ', ' + ${items.pageable.pageSize} + ', \'' + ${items.pageable.sort ?: 'id,desc'} + '\')' : '#'"></a>
|
||||||
th:classappend="${items.pageable.pageNumber == items.totalPages - 1 or items.totalPages == 0} ? 'disabled'">
|
|
||||||
<a class="page-link"
|
|
||||||
th:href="|javascript:goPageable(${items.pageable.pageNumber + 1}, ${items.pageable.pageSize}, '${items.pageable.sort}')|">다음</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
<th layout:fragment="content">
|
<th layout:fragment="content">
|
||||||
<section>
|
<section>
|
||||||
<!-- 테이블 영역 -->
|
|
||||||
<table class="type-form confirm" th:object="${researcherDto}" >
|
<table class="type-form confirm" th:object="${researcherDto}" >
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -63,14 +62,17 @@
|
|||||||
TOTAL. <span id="household-totalElements"></span>
|
TOTAL. <span id="household-totalElements"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="researcher-tab1" style="display: none;">
|
||||||
|
<button type="button" class="btn" onclick="location.href='/researcher/researchers'">
|
||||||
|
<span class="btn-txt">임가매핑</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<!-- hidden parameters -->
|
<!-- hidden parameters -->
|
||||||
<input name="page" th:field="*{page}" type="hidden"/>
|
<input name="page" th:field="*{page}" type="hidden"/>
|
||||||
<input name="adminSeq" th:field="${researcherDto.seq}" type="hidden"/>
|
<input name="adminSeq" th:field="${researcherDto.seq}" type="hidden"/>
|
||||||
|
|
||||||
|
|
||||||
<div class="tab-body">
|
<div class="tab-body">
|
||||||
<div class="tab-content" data-tab-value="tab1">
|
<div class="tab-content" data-tab-value="tab1">
|
||||||
<div class="content-inner">
|
<div class="content-inner">
|
||||||
@@ -339,8 +341,6 @@
|
|||||||
'/researcher/visitHousehold/remove',
|
'/researcher/visitHousehold/remove',
|
||||||
JSON.stringify(selectIds),
|
JSON.stringify(selectIds),
|
||||||
function (response) {
|
function (response) {
|
||||||
console.log("여기있어요");
|
|
||||||
console.log(response);
|
|
||||||
if(response > 0){
|
if(response > 0){
|
||||||
alert('선택한 임가정보가 삭제되었습니다.');
|
alert('선택한 임가정보가 삭제되었습니다.');
|
||||||
getHouseholdVisitList(document.householdReqForm.page.value);
|
getHouseholdVisitList(document.householdReqForm.page.value);
|
||||||
|
|||||||
@@ -47,10 +47,8 @@ class AdminAuthFailHandlerTest {
|
|||||||
1L,
|
1L,
|
||||||
testUsername,
|
testUsername,
|
||||||
"test.1@#$",
|
"test.1@#$",
|
||||||
"xx4@test.com",
|
|
||||||
null,
|
null,
|
||||||
false,
|
false,
|
||||||
false,
|
|
||||||
Arrays.asList("ROLE_SUPER", "ROLE_STAFF"));
|
Arrays.asList("ROLE_SUPER", "ROLE_STAFF"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -42,10 +42,8 @@ class AdminDetailsServiceTest {
|
|||||||
1L,
|
1L,
|
||||||
username,
|
username,
|
||||||
password,
|
password,
|
||||||
"xx1@test.com",
|
|
||||||
null,
|
null,
|
||||||
false,
|
false,
|
||||||
false,
|
|
||||||
Arrays.asList("ROLE_SUPER", "ROLE_STAFF"));
|
Arrays.asList("ROLE_SUPER", "ROLE_STAFF"));
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -38,10 +38,8 @@ class AdminCreateUpdateDaoTest {
|
|||||||
1L,
|
1L,
|
||||||
"admin_for_createDao_test",
|
"admin_for_createDao_test",
|
||||||
"test.1@#$",
|
"test.1@#$",
|
||||||
"admin_for_createDao_test@test.com",
|
|
||||||
null,
|
null,
|
||||||
false,
|
false,
|
||||||
false,
|
|
||||||
Arrays.asList("ROLE_SUPER", "ROLE_STAFF"));
|
Arrays.asList("ROLE_SUPER", "ROLE_STAFF"));
|
||||||
|
|
||||||
adminViewPortIn
|
adminViewPortIn
|
||||||
@@ -56,10 +54,8 @@ class AdminCreateUpdateDaoTest {
|
|||||||
2L,
|
2L,
|
||||||
"admin_for_createDao_test",
|
"admin_for_createDao_test",
|
||||||
"test.1@#$",
|
"test.1@#$",
|
||||||
"admin_for_createDao_test@test.com",
|
|
||||||
null,
|
null,
|
||||||
false,
|
false,
|
||||||
false,
|
|
||||||
List.of("ROLE_STAFF"));
|
List.of("ROLE_STAFF"));
|
||||||
assertEquals(
|
assertEquals(
|
||||||
1,
|
1,
|
||||||
|
|||||||
@@ -32,10 +32,8 @@ public class InitAdminData implements ApplicationRunner {
|
|||||||
null,
|
null,
|
||||||
"test-admin",
|
"test-admin",
|
||||||
"admin1@#$",
|
"admin1@#$",
|
||||||
"admin@framework.org",
|
|
||||||
null,
|
null,
|
||||||
false,
|
false,
|
||||||
false,
|
|
||||||
List.of("ROLE_ADMIN"));
|
List.of("ROLE_ADMIN"));
|
||||||
|
|
||||||
// 지방실사
|
// 지방실사
|
||||||
@@ -43,10 +41,8 @@ public class InitAdminData implements ApplicationRunner {
|
|||||||
null,
|
null,
|
||||||
"test-local-inspection",
|
"test-local-inspection",
|
||||||
"local1@#$",
|
"local1@#$",
|
||||||
"local@framework.org",
|
|
||||||
"code.region.main.1",
|
"code.region.main.1",
|
||||||
false,
|
false,
|
||||||
false,
|
|
||||||
List.of("ROLE_LOCAL_INSPECTION"));
|
List.of("ROLE_LOCAL_INSPECTION"));
|
||||||
|
|
||||||
// 조사원
|
// 조사원
|
||||||
@@ -54,10 +50,8 @@ public class InitAdminData implements ApplicationRunner {
|
|||||||
null,
|
null,
|
||||||
"test-researcher",
|
"test-researcher",
|
||||||
"researcher1@#$",
|
"researcher1@#$",
|
||||||
"researcher@framework.org",
|
|
||||||
"code.region.main.1",
|
"code.region.main.1",
|
||||||
false,
|
false,
|
||||||
false,
|
|
||||||
List.of("ROLE_RESEARCHER"));
|
List.of("ROLE_RESEARCHER"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,9 +8,7 @@ public interface SaveAdminPortIn {
|
|||||||
Long seq,
|
Long seq,
|
||||||
String id,
|
String id,
|
||||||
String password,
|
String password,
|
||||||
String email,
|
|
||||||
String regionMainCode,
|
String regionMainCode,
|
||||||
Boolean accountDisabled,
|
Boolean accountDisabled,
|
||||||
Boolean accountLocked,
|
|
||||||
List<String> roleIds);
|
List<String> roleIds);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,10 +25,8 @@ public class SaveAdminService implements SaveAdminPortIn {
|
|||||||
Long seq,
|
Long seq,
|
||||||
String id,
|
String id,
|
||||||
String password,
|
String password,
|
||||||
String email,
|
|
||||||
String regionMainCode,
|
String regionMainCode,
|
||||||
Boolean accountDisabled,
|
Boolean accountDisabled,
|
||||||
Boolean accountLocked,
|
|
||||||
List<String> roleIds) {
|
List<String> roleIds) {
|
||||||
|
|
||||||
LocalDateTime passwordUpdatedAt;
|
LocalDateTime passwordUpdatedAt;
|
||||||
@@ -58,11 +56,9 @@ public class SaveAdminService implements SaveAdminPortIn {
|
|||||||
id,
|
id,
|
||||||
password,
|
password,
|
||||||
passwordUpdatedAt,
|
passwordUpdatedAt,
|
||||||
email,
|
|
||||||
regionMainCode,
|
regionMainCode,
|
||||||
accountDisabled,
|
accountDisabled,
|
||||||
loginFailCnt,
|
loginFailCnt,
|
||||||
accountLocked,
|
|
||||||
roleIds
|
roleIds
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,10 +15,10 @@ public class SaveAdminCmd extends AuditCommand {
|
|||||||
private String id;
|
private String id;
|
||||||
private String encodedPassword;
|
private String encodedPassword;
|
||||||
private LocalDateTime passwordUpdatedAt;
|
private LocalDateTime passwordUpdatedAt;
|
||||||
private String email;
|
/* private String email;*/
|
||||||
private String regionMainCode;
|
private String regionMainCode;
|
||||||
private Boolean accountDisabled;
|
private Boolean accountDisabled;
|
||||||
private Integer loginFailCnt;
|
private Integer loginFailCnt;
|
||||||
private Boolean accountLocked;
|
/* private Boolean accountLocked;*/
|
||||||
private List<String> roleIds;
|
private List<String> roleIds;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import lombok.Getter;
|
|||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@@ -18,7 +17,8 @@ public class GetMonthlyInputStatus {
|
|||||||
private Long householdSeq;
|
private Long householdSeq;
|
||||||
private String month;
|
private String month;
|
||||||
private MonthStatus forestProductStatus;
|
private MonthStatus forestProductStatus;
|
||||||
private MonthStatus bankAutoTransferStatus;
|
private MonthStatus bankAutoTransferInputStatus;
|
||||||
|
private MonthStatus bankAutoTransferOutputStatus;
|
||||||
|
|
||||||
private LocalDateTime createdAt;
|
private LocalDateTime createdAt;
|
||||||
private String createdBy;
|
private String createdBy;
|
||||||
|
|||||||
@@ -37,7 +37,8 @@ class GetMonthlyInputStatussDao implements GetMonthlyInputStatussPortOut {
|
|||||||
article.getHouseholdSeq(),
|
article.getHouseholdSeq(),
|
||||||
article.getMonth(),
|
article.getMonth(),
|
||||||
article.getForestProductStatus(),
|
article.getForestProductStatus(),
|
||||||
article.getBankAutoTransferStatus(),
|
article.getBankAutoTransferInputStatus(),
|
||||||
|
article.getBankAutoTransferOutputStatus(),
|
||||||
article.getCreatedAt(),
|
article.getCreatedAt(),
|
||||||
article.getCreatedBy(),
|
article.getCreatedBy(),
|
||||||
article.getUpdatedAt(),
|
article.getUpdatedAt(),
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import lombok.AllArgsConstructor;
|
|||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@@ -17,7 +16,8 @@ public class GetMonthlyInputStatussDto {
|
|||||||
private Long householdSeq;
|
private Long householdSeq;
|
||||||
private String month;
|
private String month;
|
||||||
private MonthStatus forestProductStatus;
|
private MonthStatus forestProductStatus;
|
||||||
private MonthStatus bankAutoTransferStatus;
|
private MonthStatus bankAutoTransferInputStatus;
|
||||||
|
private MonthStatus bankAutoTransferOutputStatus;
|
||||||
|
|
||||||
private LocalDateTime createdAt;
|
private LocalDateTime createdAt;
|
||||||
private String createdBy;
|
private String createdBy;
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import lombok.EqualsAndHashCode;
|
|||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@@ -19,7 +18,8 @@ public class GetMonthlyInputStatuss {
|
|||||||
private Long householdSeq;
|
private Long householdSeq;
|
||||||
private String month;
|
private String month;
|
||||||
private MonthStatus forestProductStatus;
|
private MonthStatus forestProductStatus;
|
||||||
private MonthStatus bankAutoTransferStatus;
|
private MonthStatus bankAutoTransferInputStatus;
|
||||||
|
private MonthStatus bankAutoTransferOutputStatus;
|
||||||
|
|
||||||
private LocalDateTime createdAt;
|
private LocalDateTime createdAt;
|
||||||
private String createdBy;
|
private String createdBy;
|
||||||
|
|||||||
@@ -17,7 +17,8 @@ public class GetPrevMonthlyInputStatus {
|
|||||||
private Long householdSeq;
|
private Long householdSeq;
|
||||||
private String month;
|
private String month;
|
||||||
private MonthStatus forestProductStatus;
|
private MonthStatus forestProductStatus;
|
||||||
private MonthStatus bankAutoTransferStatus;
|
private MonthStatus bankAutoTransferInputStatus;
|
||||||
|
private MonthStatus bankAutoTransferOutputStatus;
|
||||||
|
|
||||||
private LocalDateTime createdAt;
|
private LocalDateTime createdAt;
|
||||||
private String createdBy;
|
private String createdBy;
|
||||||
|
|||||||
@@ -23,7 +23,8 @@ class UpdateMonthlyInputStatusDao implements UpdateMonthlyInputStatusPortOut {
|
|||||||
command.getHouseholdSeq(),
|
command.getHouseholdSeq(),
|
||||||
command.getMonth(),
|
command.getMonth(),
|
||||||
command.getForestProductStatus(),
|
command.getForestProductStatus(),
|
||||||
command.getBankAutoTransferStatus(),
|
command.getBankAutoTransferInputStatus(),
|
||||||
|
command.getBankAutoTransferOutputStatus(),
|
||||||
LocalDateTime.now(),
|
LocalDateTime.now(),
|
||||||
CommonUtil.getLoginUsername()
|
CommonUtil.getLoginUsername()
|
||||||
));
|
));
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import lombok.Getter;
|
|||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@@ -19,7 +18,8 @@ public class UpdateMonthlyInputStatusDto {
|
|||||||
private Long householdSeq;
|
private Long householdSeq;
|
||||||
private String month;
|
private String month;
|
||||||
private MonthStatus forestProductStatus;
|
private MonthStatus forestProductStatus;
|
||||||
private MonthStatus bankAutoTransferStatus;
|
private MonthStatus bankAutoTransferInputStatus;
|
||||||
|
private MonthStatus bankAutoTransferOutputStatus;
|
||||||
|
|
||||||
private LocalDateTime updatedAt;
|
private LocalDateTime updatedAt;
|
||||||
private String updatedBy;
|
private String updatedBy;
|
||||||
|
|||||||
@@ -6,9 +6,6 @@ import lombok.EqualsAndHashCode;
|
|||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@@ -19,7 +16,8 @@ public class UpdateMonthlyInputStatusCmd {
|
|||||||
private Long householdSeq;
|
private Long householdSeq;
|
||||||
private String month;
|
private String month;
|
||||||
private MonthStatus forestProductStatus;
|
private MonthStatus forestProductStatus;
|
||||||
private MonthStatus bankAutoTransferStatus;
|
private MonthStatus bankAutoTransferInputStatus;
|
||||||
|
private MonthStatus bankAutoTransferOutputStatus;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,22 +12,18 @@
|
|||||||
INSERT INTO admin (seq,
|
INSERT INTO admin (seq,
|
||||||
id,
|
id,
|
||||||
password,
|
password,
|
||||||
email,
|
|
||||||
region_main_code,
|
region_main_code,
|
||||||
password_updated_at,
|
password_updated_at,
|
||||||
account_disabled,
|
account_disabled,
|
||||||
login_fail_cnt,
|
login_fail_cnt,
|
||||||
account_locked,
|
|
||||||
<include refid="common.fields.CreateUpdateBaseColumns"/>)
|
<include refid="common.fields.CreateUpdateBaseColumns"/>)
|
||||||
VALUES (#{seq},
|
VALUES (#{seq},
|
||||||
#{id},
|
#{id},
|
||||||
#{encodedPassword},
|
#{encodedPassword},
|
||||||
#{email},
|
|
||||||
#{regionMainCode},
|
#{regionMainCode},
|
||||||
#{passwordUpdatedAt},
|
#{passwordUpdatedAt},
|
||||||
#{accountDisabled},
|
#{accountDisabled},
|
||||||
#{loginFailCnt},
|
#{loginFailCnt},
|
||||||
#{accountLocked},
|
|
||||||
<include refid="common.fields.CreateUpdateBaseValues"/>)
|
<include refid="common.fields.CreateUpdateBaseValues"/>)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
@@ -36,12 +32,10 @@
|
|||||||
UPDATE admin
|
UPDATE admin
|
||||||
SET
|
SET
|
||||||
password = #{encodedPassword},
|
password = #{encodedPassword},
|
||||||
email = #{email},
|
|
||||||
region_main_code = #{regionMainCode},
|
region_main_code = #{regionMainCode},
|
||||||
password_updated_at = #{passwordUpdatedAt},
|
password_updated_at = #{passwordUpdatedAt},
|
||||||
account_disabled = #{accountDisabled},
|
account_disabled = #{accountDisabled},
|
||||||
login_fail_cnt = #{loginFailCnt},
|
login_fail_cnt = #{loginFailCnt},
|
||||||
account_locked = #{accountLocked},
|
|
||||||
<include refid="common.fields.UpdateBaseSet"/>
|
<include refid="common.fields.UpdateBaseSet"/>
|
||||||
WHERE seq = #{seq}
|
WHERE seq = #{seq}
|
||||||
</update>
|
</update>
|
||||||
|
|||||||
@@ -12,7 +12,8 @@
|
|||||||
a.household_seq AS householdSeq,
|
a.household_seq AS householdSeq,
|
||||||
a.month AS month,
|
a.month AS month,
|
||||||
a.forest_product_status AS forestProductStatus,
|
a.forest_product_status AS forestProductStatus,
|
||||||
a.bank_auto_transfer_status AS bankAutoTransferStatus,
|
a.bank_auto_transfer_input_status AS bankAutoTransferInputStatus,
|
||||||
|
a.bank_auto_transfer_output_status AS bankAutoTransferOutputStatus,
|
||||||
a.created_at AS createdAt,
|
a.created_at AS createdAt,
|
||||||
a.created_by AS createdBy,
|
a.created_by AS createdBy,
|
||||||
a.updated_at AS updatedAt,
|
a.updated_at AS updatedAt,
|
||||||
|
|||||||
@@ -13,7 +13,8 @@
|
|||||||
a.household_seq AS householdSeq,
|
a.household_seq AS householdSeq,
|
||||||
a.month AS month,
|
a.month AS month,
|
||||||
a.forest_product_status AS forestProductStatus,
|
a.forest_product_status AS forestProductStatus,
|
||||||
a.bank_auto_transfer_status AS bankAutoTransferStatus,
|
a.bank_auto_transfer_input_status AS bankAutoTransferInputStatus,
|
||||||
|
a.bank_auto_transfer_output_status AS bankAutoTransferOutputStatus,
|
||||||
a.created_at AS createdAt,
|
a.created_at AS createdAt,
|
||||||
a.created_by AS createdBy,
|
a.created_by AS createdBy,
|
||||||
a.updated_at AS updatedAt,
|
a.updated_at AS updatedAt,
|
||||||
|
|||||||
@@ -12,7 +12,8 @@
|
|||||||
a.household_seq AS householdSeq,
|
a.household_seq AS householdSeq,
|
||||||
a.month AS month,
|
a.month AS month,
|
||||||
a.forest_product_status AS forestProductStatus,
|
a.forest_product_status AS forestProductStatus,
|
||||||
a.bank_auto_transfer_status AS bankAutoTransferStatus,
|
a.bank_auto_transfer_input_status AS bankAutoTransferInputStatus,
|
||||||
|
a.bank_auto_transfer_output_status AS bankAutoTransferOutputStatus,
|
||||||
a.created_at AS createdAt,
|
a.created_at AS createdAt,
|
||||||
a.created_by AS createdBy,
|
a.created_by AS createdBy,
|
||||||
a.updated_at AS updatedAt,
|
a.updated_at AS updatedAt,
|
||||||
|
|||||||
@@ -13,7 +13,8 @@
|
|||||||
household_seq = #{householdSeq},
|
household_seq = #{householdSeq},
|
||||||
month = #{month},
|
month = #{month},
|
||||||
forest_product_status = #{forestProductStatus},
|
forest_product_status = #{forestProductStatus},
|
||||||
bank_auto_transfer_status = #{bankAutoTransferStatus},
|
bank_auto_transfer_input_status = #{bankAutoTransferInputStatus},
|
||||||
|
bank_auto_transfer_output_status = #{bankAutoTransferOutputStatus},
|
||||||
<include refid="common.fields.UpdateBaseSet"/>
|
<include refid="common.fields.UpdateBaseSet"/>
|
||||||
WHERE id = #{id}
|
WHERE id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|||||||
3
front/.gitignore
vendored
3
front/.gitignore
vendored
@@ -35,3 +35,6 @@ build/
|
|||||||
### Project
|
### Project
|
||||||
**/resources/static/pages/**
|
**/resources/static/pages/**
|
||||||
**/resources/static/guide/**
|
**/resources/static/guide/**
|
||||||
|
**/resources/static/*.md
|
||||||
|
**/resources/static/assets/**/**.map
|
||||||
|
**/resources/static/assets/scripts/**
|
||||||
|
|||||||
@@ -1,44 +1,23 @@
|
|||||||
package app.module.front.usecase.info.monthly.createMonthlyUI.adapters.web;
|
package app.module.front.usecase.info.monthly.createMonthlyUI.adapters.web;
|
||||||
|
|
||||||
import app.module.core.config.application.enums.MonthStatus;
|
import app.module.core.config.application.enums.MonthStatus;
|
||||||
import app.module.core.config.application.util.CommonUtil;
|
|
||||||
import app.module.core.config.application.util.CoreUtil;
|
import app.module.core.config.application.util.CoreUtil;
|
||||||
import app.module.core.usecase.household.getHousehold.ports.GetHouseholdPortIn;
|
|
||||||
import app.module.core.usecase.household.getHousehold.ports.application.domain.GetHousehold;
|
|
||||||
import app.module.core.usecase.household.getHousehold.ports.application.domain.GetHouseholdCmd;
|
|
||||||
import app.module.core.usecase.household.updateFrontHousehold.ports.UpdateFrontHouseholdPortIn;
|
|
||||||
import app.module.core.usecase.household.updateFrontHousehold.ports.application.domain.UpdateFrontHouseholdCmd;
|
|
||||||
import app.module.core.usecase.monthly.getMonthlyInputStatus.ports.GetMonthlyInputStatusPortIn;
|
import app.module.core.usecase.monthly.getMonthlyInputStatus.ports.GetMonthlyInputStatusPortIn;
|
||||||
import app.module.core.usecase.monthly.getMonthlyInputStatus.ports.application.domain.GetMonthlyInputStatus;
|
import app.module.core.usecase.monthly.getMonthlyInputStatus.ports.application.domain.GetMonthlyInputStatus;
|
||||||
import app.module.core.usecase.monthly.getMonthlyInputStatus.ports.application.domain.GetMonthlyInputStatusCmd;
|
import app.module.core.usecase.monthly.getMonthlyInputStatus.ports.application.domain.GetMonthlyInputStatusCmd;
|
||||||
import app.module.core.usecase.monthly.getPrevMonthlyInputStatus.ports.GetPrevMonthlyInputStatusPortIn;
|
|
||||||
import app.module.core.usecase.monthly.getPrevMonthlyInputStatus.ports.application.domain.GetPrevMonthlyInputStatus;
|
|
||||||
import app.module.core.usecase.monthly.getPrevMonthlyInputStatus.ports.application.domain.GetPrevMonthlyInputStatusCmd;
|
|
||||||
import app.module.core.usecase.monthly.updateMonthlyInputStatus.ports.UpdateMonthlyInputStatusPortIn;
|
import app.module.core.usecase.monthly.updateMonthlyInputStatus.ports.UpdateMonthlyInputStatusPortIn;
|
||||||
import app.module.core.usecase.monthly.updateMonthlyInputStatus.ports.application.domain.UpdateMonthlyInputStatusCmd;
|
import app.module.core.usecase.monthly.updateMonthlyInputStatus.ports.application.domain.UpdateMonthlyInputStatusCmd;
|
||||||
import app.module.core.usecase.product.createForestProduct.ports.CreateForestProductPortIn;
|
import app.module.core.usecase.product.createForestProduct.ports.CreateForestProductPortIn;
|
||||||
import app.module.core.usecase.product.createForestProduct.ports.application.domain.CreateForestProductCmd;
|
import app.module.core.usecase.product.createForestProduct.ports.application.domain.CreateForestProductCmd;
|
||||||
import app.module.core.usecase.product.getMonthlyForestProducts.ports.GetMonthlyForestProductsPortIn;
|
|
||||||
import app.module.core.usecase.product.getMonthlyForestProducts.ports.application.domain.GetMonthlyForestProducts;
|
|
||||||
import app.module.core.usecase.product.getMonthlyForestProducts.ports.application.domain.GetMonthlyForestProductsCmd;
|
|
||||||
import app.module.core.usecase.uicode.list.ports.UICodeListPortIn;
|
|
||||||
import app.module.front.config.application.response.ApiResponse;
|
import app.module.front.config.application.response.ApiResponse;
|
||||||
import app.module.front.config.application.util.AuthUtil;
|
import app.module.front.config.application.util.AuthUtil;
|
||||||
import app.module.front.usecase.info.monthly.createMonthlyUI.adapters.web.model.CreateMonthlyProductReqVO;
|
import app.module.front.usecase.info.monthly.createMonthlyUI.adapters.web.model.CreateMonthlyProductReqVO;
|
||||||
import app.module.front.usecase.info.monthly.createMonthlyUI.adapters.web.model.CreateMonthlyReqVO;
|
import app.module.front.usecase.info.monthly.createMonthlyUI.adapters.web.model.CreateMonthlyReqVO;
|
||||||
import app.module.front.usecase.info.user.updateUserUI.adapters.web.model.UpdateUserReqVO;
|
|
||||||
import jakarta.validation.Valid;
|
import jakarta.validation.Valid;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.data.domain.Page;
|
|
||||||
import org.springframework.data.domain.Pageable;
|
|
||||||
import org.springframework.data.domain.Sort;
|
|
||||||
import org.springframework.data.web.PageableDefault;
|
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.Model;
|
|
||||||
import org.springframework.validation.BindingResult;
|
import org.springframework.validation.BindingResult;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
|
||||||
@@ -90,7 +69,8 @@ class CreateMonthlyController {
|
|||||||
AuthUtil.getUserSeq(),
|
AuthUtil.getUserSeq(),
|
||||||
currentMonthlyInfo.getMonth(),
|
currentMonthlyInfo.getMonth(),
|
||||||
MonthStatus.REGISTERED,
|
MonthStatus.REGISTERED,
|
||||||
currentMonthlyInfo.getBankAutoTransferStatus()
|
currentMonthlyInfo.getBankAutoTransferInputStatus(),
|
||||||
|
currentMonthlyInfo.getBankAutoTransferOutputStatus()
|
||||||
));
|
));
|
||||||
} else {
|
} else {
|
||||||
updateMonthlyInputStatusPortIn.operate(new UpdateMonthlyInputStatusCmd(
|
updateMonthlyInputStatusPortIn.operate(new UpdateMonthlyInputStatusCmd(
|
||||||
@@ -98,7 +78,8 @@ class CreateMonthlyController {
|
|||||||
AuthUtil.getUserSeq(),
|
AuthUtil.getUserSeq(),
|
||||||
currentMonthlyInfo.getMonth(),
|
currentMonthlyInfo.getMonth(),
|
||||||
MonthStatus.NOTHING,
|
MonthStatus.NOTHING,
|
||||||
currentMonthlyInfo.getBankAutoTransferStatus()
|
currentMonthlyInfo.getBankAutoTransferInputStatus(),
|
||||||
|
currentMonthlyInfo.getBankAutoTransferOutputStatus()
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 56 KiB |
@@ -0,0 +1,8 @@
|
|||||||
|
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<mask id="path-1-inside-1_24355_18053" fill="white">
|
||||||
|
<path d="M48 24C48 37.2548 37.2548 48 24 48C10.7452 48 0 37.2548 0 24C0 10.7452 10.7452 0 24 0C37.2548 0 48 10.7452 48 24Z"/>
|
||||||
|
</mask>
|
||||||
|
<g clip-path="url(#paint0_angular_24355_18053_clip_path)" data-figma-skip-parse="true" mask="url(#path-1-inside-1_24355_18053)"><g transform="matrix(0 -0.024 0.024 0 24 24)"><foreignObject x="-1291.67" y="-1291.67" width="2583.33" height="2583.33"><div xmlns="http://www.w3.org/1999/xhtml" style="background:conic-gradient(from 90deg,rgba(75, 188, 67, 0) 0deg,rgba(75, 188, 67, 0.8462) 304.615deg,rgba(75, 188, 67, 1) 360deg);height:100%;width:100%;opacity:1"></div></foreignObject></g></g><path d="M48 24H41C41 33.3888 33.3888 41 24 41V48V55C41.1208 55 55 41.1208 55 24H48ZM24 48V41C14.6112 41 7 33.3888 7 24H0H-7C-7 41.1208 6.87917 55 24 55V48ZM0 24H7C7 14.6112 14.6112 7 24 7V0V-7C6.87917 -7 -7 6.87917 -7 24H0ZM24 0V7C33.3888 7 41 14.6112 41 24H48H55C55 6.87917 41.1208 -7 24 -7V0Z" data-figma-gradient-fill="{"type":"GRADIENT_ANGULAR","stops":[{"color":{"r":0.29411765933036804,"g":0.73725491762161255,"b":0.26274511218070984,"a":0.0},"position":0.0},{"color":{"r":0.29411765933036804,"g":0.73725491762161255,"b":0.26274511218070984,"a":0.84615385532379150},"position":0.84615385532379150},{"color":{"r":0.29411765933036804,"g":0.73725491762161255,"b":0.26274511218070984,"a":1.0},"position":1.0}],"stopsVar":[{"color":{"r":0.29411765933036804,"g":0.73725491762161255,"b":0.26274511218070984,"a":0.0},"position":0.0},{"color":{"r":0.29411765933036804,"g":0.73725491762161255,"b":0.26274511218070984,"a":0.84615385532379150},"position":0.84615385532379150},{"color":{"r":0.29411765933036804,"g":0.73725491762161255,"b":0.26274511218070984,"a":1.0},"position":1.0}],"transform":{"m00":-5.6229855298871312e-14,"m01":48.0,"m02":5.6229855298871312e-14,"m10":-48.0,"m11":-6.1558925817072063e-14,"m12":48.0},"opacity":1.0,"blendMode":"NORMAL","visible":true}" mask="url(#path-1-inside-1_24355_18053)"/>
|
||||||
|
<defs>
|
||||||
|
<clipPath id="paint0_angular_24355_18053_clip_path"><path d="M48 24H41C41 33.3888 33.3888 41 24 41V48V55C41.1208 55 55 41.1208 55 24H48ZM24 48V41C14.6112 41 7 33.3888 7 24H0H-7C-7 41.1208 6.87917 55 24 55V48ZM0 24H7C7 14.6112 14.6112 7 24 7V0V-7C6.87917 -7 -7 6.87917 -7 24H0ZM24 0V7C33.3888 7 41 14.6112 41 24H48H55C55 6.87917 41.1208 -7 24 -7V0Z" mask="url(#path-1-inside-1_24355_18053)"/></clipPath></defs>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 2.8 KiB |
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 67 KiB |
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 149 KiB |
@@ -195,15 +195,19 @@ etUI.utils.ready(function () {
|
|||||||
const options = select.querySelectorAll('.option');
|
const options = select.querySelectorAll('.option');
|
||||||
const inputs = group.querySelectorAll('.component-input');
|
const inputs = group.querySelectorAll('.component-input');
|
||||||
|
|
||||||
// 모든 input 기본 숨김
|
// 모든 input 기본 숨김 (show 클래스 제거)
|
||||||
inputs.forEach(input => {
|
inputs.forEach(input => {
|
||||||
input.style.display = 'none';
|
input.classList.remove('show');
|
||||||
});
|
});
|
||||||
|
|
||||||
const updateVisibility = (selectedText) => {
|
const updateVisibility = (selectedText) => {
|
||||||
inputs.forEach(input => {
|
inputs.forEach(input => {
|
||||||
const matchValue = input.getAttribute('data-option');
|
const matchValue = input.getAttribute('data-option');
|
||||||
input.style.display = matchValue === selectedText ? '' : 'none';
|
if (matchValue === selectedText) {
|
||||||
|
input.classList.add('show');
|
||||||
|
} else {
|
||||||
|
input.classList.remove('show');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -137,6 +137,46 @@
|
|||||||
-->
|
-->
|
||||||
<th:block th:fragment="bottom-bar">
|
<th:block th:fragment="bottom-bar">
|
||||||
<footer id="footer" class="footer">
|
<footer id="footer" class="footer">
|
||||||
|
<div class="footer-info">
|
||||||
|
<dl>
|
||||||
|
<dt>코리아리서치인터내셔널</dt>
|
||||||
|
<dd>
|
||||||
|
<p>대표자</p>
|
||||||
|
<span>박준빈, 조우철</span>
|
||||||
|
</dd>
|
||||||
|
<dd>
|
||||||
|
<p>개인정보보호책임자</p>
|
||||||
|
<span>
|
||||||
|
채주희
|
||||||
|
</span>
|
||||||
|
</dd>
|
||||||
|
<dd class="address">
|
||||||
|
<p>주소</p>
|
||||||
|
<span>
|
||||||
|
Office 1. (06652) 서울시 서초구 사임당로 18, 석오빌딩 8F
|
||||||
|
</span>
|
||||||
|
<span>
|
||||||
|
Office 2. (06651) 서울시 서초구 사임당로 32, 재우빌딩 9F
|
||||||
|
</span>
|
||||||
|
</dd>
|
||||||
|
<dd>
|
||||||
|
<p>이메일</p>
|
||||||
|
<span>info@kric.com</span>
|
||||||
|
</dd>
|
||||||
|
<dd>
|
||||||
|
<p>고객센터 전화번호</p>
|
||||||
|
<span>02-3415-5187</span>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
<p class="copyright">
|
||||||
|
Ⓒ 2025. KRi. All right reserved.
|
||||||
|
</p>
|
||||||
|
<ul class="logo-list">
|
||||||
|
<li><img th:src="@{/static/assets/images/common/logo_kri.svg}" class="profile-img" alt="kri 로고 이미지" /></li>
|
||||||
|
<li><img th:src="@{/static/assets/images/common/logo_forest.svg}" class="profile-img" alt="kri 로고 이미지" /></li>
|
||||||
|
<li><img th:src="@{/static/assets/images/common/logo_kofpi.svg}" class="profile-img" alt="kri 로고 이미지" /></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
<nav class="footer-menu">
|
<nav class="footer-menu">
|
||||||
<ul>
|
<ul>
|
||||||
<li class="menu-acco"
|
<li class="menu-acco"
|
||||||
|
|||||||
755
front/src/main/resources/templates/info/monthly/backup.html
Normal file
755
front/src/main/resources/templates/info/monthly/backup.html
Normal file
@@ -0,0 +1,755 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html layout:decorate="~{layout/layout-none}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||||
|
xmlns:th="http://www.thymeleaf.org">
|
||||||
|
|
||||||
|
<div layout:fragment="content" th:classappend="'mypage-wrap btm-fixbtn'">
|
||||||
|
<main id="content" role="main">
|
||||||
|
<div class="inner">
|
||||||
|
<hgroup class="tit-group">
|
||||||
|
<h3>
|
||||||
|
[[${currentMonthlyInfo.koreanMonth}]]의 <br>
|
||||||
|
<strong>임산물 현황 <span>[[${currentList.totalElements}]]</span>건 등록</strong> 되었습니다.
|
||||||
|
</h3>
|
||||||
|
<p>임산물 현황을 등록해 주세요.</p>
|
||||||
|
</hgroup>
|
||||||
|
|
||||||
|
<section class="regist-item-area">
|
||||||
|
<p class="total" th:style="${currentList.totalElements == 0 ? 'display:none':''}" id="listHeader">
|
||||||
|
<span>총 <strong id="listCount">1</strong>건</span>
|
||||||
|
<button type="button" class="btn-reset" onclick="formControl.removeAll()">
|
||||||
|
<i class="ico-reset ico-small" aria-hidden="true"></i>
|
||||||
|
<span>초기화</span>
|
||||||
|
</button>
|
||||||
|
</p>
|
||||||
|
<div class="item-list" th:style="${currentList.totalElements == 0 ? 'display:none':''}" id="listBody">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button type="button" class="btn btn-m btn-secondary btn-full" style="margin-bottom:1.2rem" id="addItemBtn" onclick="formControl.addOpen()">
|
||||||
|
<i class="ico-add ico-small" aria-hidden="true"></i>
|
||||||
|
<span class="btn-txt">추가 등록</span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button type="button" class="btn btn-m btn-link btn-full" th:if="${pastMonthlyInfo != null && currentList.totalElements == 0}" id="callPastInfoBtn">
|
||||||
|
<span class="btn-txt">이전 정보 불러오기</span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="component-input align-center" th:if="${currentList.totalElements == 0}" id="forestProductStatusDiv">
|
||||||
|
<label class="checkbox-inner">
|
||||||
|
<input type="checkbox" id="forestProductStatus" name="forestProductStatus" th:value="${MonthStatus.NOTHING}" onchange="formControl.handleCheckboxChange()">
|
||||||
|
<span class="checkbox-item">
|
||||||
|
<span class="checkbox-txt">이번달 등록내용 없음</span>
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<ul class="info-bullet-list">
|
||||||
|
<li>
|
||||||
|
임업과 관련하여 재배 및 채취된 모든 임산물(목재 포함)을 기록해주세요.
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<!-- 하단 고정 버튼 -->
|
||||||
|
<div class="component-btns fixed">
|
||||||
|
<div class="btns-row">
|
||||||
|
<!-- 비활성화 스타일/ 버튼 속성 disable 추가-->
|
||||||
|
<button type="button" class="btn btn-l btn-primary" id="complateBtn" disabled>
|
||||||
|
<span class="btn-txt">등록 완료</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 모달 팝업 -->
|
||||||
|
<div class="layer-wrap">
|
||||||
|
<div class="component-modal mypage-wrap addPopup" data-props-dimm-click="true">
|
||||||
|
<div class="modal-dimm"></div>
|
||||||
|
<div class="modal-frame">
|
||||||
|
<div class="modal-container">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h3 class="modal-tit">임산물 현황 등록</h3>
|
||||||
|
</div>
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-content-inner">
|
||||||
|
|
||||||
|
<form id="forestForm">
|
||||||
|
<input type="hidden" name="id" id="id">
|
||||||
|
<article class="alert-box full green">
|
||||||
|
<ul>
|
||||||
|
<li>임업과 관련하여 재배 및 채취된 모든 임산물(목재 포함)을 기록해주세요.</li>
|
||||||
|
</ul>
|
||||||
|
</article>
|
||||||
|
|
||||||
|
<p class="form-desc">필수입력</p>
|
||||||
|
|
||||||
|
<section class="form-group">
|
||||||
|
<!-- 읍면동 -->
|
||||||
|
<div class="component-input">
|
||||||
|
<div class="input-label">
|
||||||
|
<label for="town" class="label-txt">
|
||||||
|
읍면동
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="input-field">
|
||||||
|
<input type="text" id="town" placeholder="읍면동을 입력해 주세요" name="town" maxlength="10">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- 지번 -->
|
||||||
|
<div class="component-input">
|
||||||
|
<div class="input-label">
|
||||||
|
<label for="streetNum" class="label-txt">
|
||||||
|
지번
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="input-field">
|
||||||
|
<input type="text" id="streetNum" placeholder="지번을 입력해 주세요" name="streetNum" maxlength="10">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- 지목 -->
|
||||||
|
<div class="select-group">
|
||||||
|
<div class="select-label">
|
||||||
|
<p class="label-txt">
|
||||||
|
지목
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div id="landTypeSelect" class="component-select bottom-sheet" data-props-default="지목을 선택해 주세요" data-props-type="bottomSheet">
|
||||||
|
<input type="hidden" id="landType" name="landType" data-type="select">
|
||||||
|
<button type="button" class="select-box">
|
||||||
|
<span class="select-txt"></span>
|
||||||
|
</button>
|
||||||
|
<div class="select-options">
|
||||||
|
<div class="select-header">
|
||||||
|
<p>지목</p>
|
||||||
|
<button type="button" class="select-close">
|
||||||
|
<span class="hide-txt">닫기</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="select-scroll">
|
||||||
|
<ul class="">
|
||||||
|
<th:block th:each="item : ${purposeList}">
|
||||||
|
<li class="option" th:data-value="${item.id}" th:text="${item.codeText}" >option1</li>
|
||||||
|
</th:block>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- 가능 면적 -->
|
||||||
|
<div class="component-input">
|
||||||
|
<div class="input-label">
|
||||||
|
<label for="availableArea" class="label-txt">
|
||||||
|
가능 면적<span>(평)</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="input-field">
|
||||||
|
<input type="number" id="availableArea" placeholder="가능 면적을 입력해 주세요" name="availableArea" class="limitDecimalLength">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<section class="form-group">
|
||||||
|
<!-- 재배 작물명 -->
|
||||||
|
<div class="component-input">
|
||||||
|
<div class="input-label">
|
||||||
|
<label for="cropName" class="label-txt">
|
||||||
|
재배 작물명
|
||||||
|
<i class="ico-required-mark" role="img" aria-label="필수">*</i>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="input-field">
|
||||||
|
<input type="text" id="cropName" placeholder="재배 작물명을 입력해 주세요" name="cropName" maxlength="10">
|
||||||
|
</div>
|
||||||
|
<ul class="guide-info">
|
||||||
|
<li>예 : 수확</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<!-- 면적 -->
|
||||||
|
<div class="component-input">
|
||||||
|
<div class="input-label">
|
||||||
|
<label for="landArea" class="label-txt">
|
||||||
|
면적<span>(평)</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="input-field">
|
||||||
|
<input type="number" id="landArea" placeholder="작업 면적을 입력해 주세요" name="landArea" class="limitDecimalLength">
|
||||||
|
</div>
|
||||||
|
<ul class="guide-info">
|
||||||
|
<li>예 : 180, 6</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<section class="form-group">
|
||||||
|
<!-- 주생산물 수확량 -->
|
||||||
|
<div class="component-input">
|
||||||
|
<div class="input-label">
|
||||||
|
<label for="mainYield" class="label-txt">
|
||||||
|
주생산물 수확량
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="input-field">
|
||||||
|
<input type="number" id="mainYield" placeholder="수확량을 입력해 주세요" name="mainYield" class="limitDecimalLength">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 단위 -->
|
||||||
|
<div class="select-group">
|
||||||
|
<div class="select-label">
|
||||||
|
<p class="label-txt">
|
||||||
|
단위
|
||||||
|
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div id="mainYieldUnitCodeSelect" class="component-select bottom-sheet" data-props-default="단위를 선택해 주세요" data-props-type="bottomSheet">
|
||||||
|
<input type="hidden" name="mainYieldUnitCode" id="mainYieldUnitCode" data-type="select">
|
||||||
|
<button type="button" class="select-box">
|
||||||
|
<span class="select-txt"></span>
|
||||||
|
</button>
|
||||||
|
<div class="select-options">
|
||||||
|
<div class="select-header">
|
||||||
|
<p>단위</p>
|
||||||
|
<button type="button" class="select-close">
|
||||||
|
<span class="hide-txt">닫기</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="select-scroll">
|
||||||
|
<ul class="">
|
||||||
|
<th:block th:each="item : ${unitList}">
|
||||||
|
<li class="option" th:data-value="${item.id}" th:text="${item.codeText}" >option1</li>
|
||||||
|
</th:block>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<section class="form-group">
|
||||||
|
<!-- 주생산물 판매량 -->
|
||||||
|
<div class="component-input">
|
||||||
|
<div class="input-label">
|
||||||
|
<label for="mainSaleAmount" class="label-txt">
|
||||||
|
주생산물 판매량
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="input-field">
|
||||||
|
<input type="number" id="mainSaleAmount" placeholder="판매량을 입력해 주세요" name="mainSaleAmount" class="limitDecimalLength">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 단위 -->
|
||||||
|
<div class="select-group">
|
||||||
|
<div class="select-label">
|
||||||
|
<p class="label-txt">
|
||||||
|
단위
|
||||||
|
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div id="mainSaleUnitCodeSelect" class="component-select bottom-sheet" data-props-default="단위를 선택해 주세요" data-props-type="bottomSheet">
|
||||||
|
<input type="hidden" name="mainSaleUnitCode" id="mainSaleUnitCode" data-type="select">
|
||||||
|
<button type="button" class="select-box">
|
||||||
|
<span class="select-txt"></span>
|
||||||
|
</button>
|
||||||
|
<div class="select-options">
|
||||||
|
<div class="select-header">
|
||||||
|
<p>단위</p>
|
||||||
|
<button type="button" class="select-close">
|
||||||
|
<span class="hide-txt">닫기</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="select-scroll">
|
||||||
|
<ul class="">
|
||||||
|
<th:block th:each="item : ${unitList}">
|
||||||
|
<li class="option" th:data-value="${item.id}" th:text="${item.codeText}" >option1</li>
|
||||||
|
</th:block>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<section class="form-group">
|
||||||
|
<!-- 부생산물 수확량 -->
|
||||||
|
<div class="component-input">
|
||||||
|
<div class="input-label">
|
||||||
|
<label for="subYield" class="label-txt">
|
||||||
|
부생산물 수확량
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="input-field">
|
||||||
|
<input type="number" id="subYield" placeholder="수확량을 입력해 주세요" name="subYield" class="limitDecimalLength">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 단위 -->
|
||||||
|
<div class="select-group">
|
||||||
|
<div class="select-label">
|
||||||
|
<p class="label-txt">
|
||||||
|
단위
|
||||||
|
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div id="subYieldUnitCodeSelect" class="component-select bottom-sheet" data-props-default="단위를 선택해 주세요" data-props-type="bottomSheet">
|
||||||
|
<input type="hidden" name="subYieldUnitCode" id="subYieldUnitCode" data-type="select">
|
||||||
|
<button type="button" class="select-box">
|
||||||
|
<span class="select-txt"></span>
|
||||||
|
</button>
|
||||||
|
<div class="select-options">
|
||||||
|
<div class="select-header">
|
||||||
|
<p>단위</p>
|
||||||
|
<button type="button" class="select-close">
|
||||||
|
<span class="hide-txt">닫기</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="select-scroll">
|
||||||
|
<ul class="">
|
||||||
|
<th:block th:each="item : ${unitList}">
|
||||||
|
<li class="option" th:data-value="${item.id}" th:text="${item.codeText}" >option1</li>
|
||||||
|
</th:block>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<section class="form-group">
|
||||||
|
<!-- 부생산물 판매량 -->
|
||||||
|
<div class="component-input">
|
||||||
|
<div class="input-label">
|
||||||
|
<label for="subSaleAmount" class="label-txt">
|
||||||
|
부생산물 판매량
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="input-field">
|
||||||
|
<input type="number" id="subSaleAmount" placeholder="판매량을 입력해 주세요" name="subSaleAmount" class="limitDecimalLength">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 단위 -->
|
||||||
|
<div class="select-group">
|
||||||
|
<div class="select-label">
|
||||||
|
<p class="label-txt">
|
||||||
|
단위
|
||||||
|
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div id="subSaleUnitCodeSelect" class="component-select bottom-sheet" data-props-default="단위를 선택해 주세요" data-props-type="bottomSheet">
|
||||||
|
<input type="hidden" name="subSaleUnitCode" id="subSaleUnitCode" data-type="select">
|
||||||
|
<button type="button" class="select-box">
|
||||||
|
<span class="select-txt"></span>
|
||||||
|
</button>
|
||||||
|
<div class="select-options">
|
||||||
|
<div class="select-header">
|
||||||
|
<p>단위</p>
|
||||||
|
<button type="button" class="select-close">
|
||||||
|
<span class="hide-txt">닫기</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="select-scroll">
|
||||||
|
<ul class="">
|
||||||
|
<th:block th:each="item : ${unitList}">
|
||||||
|
<li class="option" th:data-value="${item.id}" th:text="${item.codeText}" >option1</li>
|
||||||
|
</th:block>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
<div class="component-btns">
|
||||||
|
<div class="btns-row">
|
||||||
|
<button type="button" class="btn btn-full btn-l btn-primary" onclick="formControl.addData()">
|
||||||
|
<span class="btn-txt">등록</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<button type="button" class="modal-close"></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- //모달 팝업 -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<section layout:fragment="script">
|
||||||
|
<script th:inline="javascript">
|
||||||
|
let ENV = {
|
||||||
|
httpUrl: {
|
||||||
|
root: /*[[#{uri.front.info.monthly.path}]]*/'rootUrl'
|
||||||
|
},
|
||||||
|
module:{
|
||||||
|
addPopup : null
|
||||||
|
},
|
||||||
|
data: {
|
||||||
|
purposeList : [[${purposeList}]],
|
||||||
|
unitList : [[${unitList}]],
|
||||||
|
addProducts: []
|
||||||
|
},
|
||||||
|
target:{
|
||||||
|
nothingCheck : document.getElementById("forestProductStatus"),
|
||||||
|
addBtn:{
|
||||||
|
button: null,
|
||||||
|
icon : null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
submitted: false,
|
||||||
|
};
|
||||||
|
let formControl = {
|
||||||
|
init(){
|
||||||
|
this._bindUI();
|
||||||
|
this._listener();
|
||||||
|
},
|
||||||
|
_bindUI(){
|
||||||
|
ENV.module.addPopup = document.querySelector(".addPopup").ui;
|
||||||
|
// ENV.target.addBtn.button = document.getElementById("addItemBtn");
|
||||||
|
// ENV.target.addBtn.icon = button.querySelector("i");
|
||||||
|
|
||||||
|
},
|
||||||
|
_listener(){
|
||||||
|
//소수점
|
||||||
|
document.addEventListener("DOMContentLoaded", () => {
|
||||||
|
const inputs = document.querySelectorAll(".limitDecimalLength");
|
||||||
|
|
||||||
|
inputs.forEach(input => {
|
||||||
|
input.addEventListener("input", () => {
|
||||||
|
let val = input.value;
|
||||||
|
|
||||||
|
val = val.replace(/[^0-9.]/g, '');
|
||||||
|
const parts = val.split('.');
|
||||||
|
if (parts.length > 2) {
|
||||||
|
val = parts[0] + '.' + parts.slice(1).join('');
|
||||||
|
}
|
||||||
|
if (parts.length === 2) {
|
||||||
|
parts[1] = parts[1].slice(0, 2);
|
||||||
|
val = parts[0] + '.' + parts[1];
|
||||||
|
}
|
||||||
|
if (val.length > 10) {
|
||||||
|
val = val.slice(0, 10);
|
||||||
|
}
|
||||||
|
|
||||||
|
input.value = val;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
checkNextBtn(){
|
||||||
|
|
||||||
|
},
|
||||||
|
// button
|
||||||
|
//TODO 하나로 바꿔야함
|
||||||
|
handleCheckboxChange(){
|
||||||
|
const isChecked = document.getElementById("forestProductStatus").checked;
|
||||||
|
this.addButtonOnOff(!isChecked);
|
||||||
|
},
|
||||||
|
addButtonOnOff(isEnabled){
|
||||||
|
const button = document.getElementById("addItemBtn");
|
||||||
|
const icon = button.querySelector("i");
|
||||||
|
|
||||||
|
if (isEnabled) {
|
||||||
|
button.disabled = false;
|
||||||
|
icon.classList.remove("ico-add-disabled");
|
||||||
|
icon.classList.add("ico-add");
|
||||||
|
} else {
|
||||||
|
button.disabled = true;
|
||||||
|
icon.classList.remove("ico-add");
|
||||||
|
icon.classList.add("ico-add-disabled");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// button
|
||||||
|
addOpen(){
|
||||||
|
const modalContent = document.querySelector('.modal-content');
|
||||||
|
setTimeout(() => {
|
||||||
|
modalContent.scrollTop = 0;
|
||||||
|
}, 0);
|
||||||
|
|
||||||
|
//TODO 초기화가...안됨..... 아놔...
|
||||||
|
|
||||||
|
etUI.components.SelectBox().core.init(document.getElementById('landTypeSelect'));
|
||||||
|
etUI.components.SelectBox().core.init(document.getElementById('mainYieldUnitCodeSelect'));
|
||||||
|
etUI.components.SelectBox().core.init(document.getElementById('mainSaleUnitCodeSelect'));
|
||||||
|
etUI.components.SelectBox().core.init(document.getElementById('subYieldUnitCodeSelect'));
|
||||||
|
etUI.components.SelectBox().core.init(document.getElementById('subSaleUnitCodeSelect'));
|
||||||
|
|
||||||
|
ENV.module.addPopup.open();
|
||||||
|
},
|
||||||
|
addData(){
|
||||||
|
const form = document.getElementById('forestForm');
|
||||||
|
|
||||||
|
const landTypeSelect = document.getElementById('landTypeSelect');
|
||||||
|
const mainYieldUnitCodeSelect = document.getElementById('mainYieldUnitCodeSelect');
|
||||||
|
const mainSaleUnitCodeSelect = document.getElementById('mainSaleUnitCodeSelect');
|
||||||
|
const subYieldUnitCodeSelect = document.getElementById('subYieldUnitCodeSelect');
|
||||||
|
const subSaleUnitCodeSelect = document.getElementById('subSaleUnitCodeSelect');
|
||||||
|
|
||||||
|
if (landTypeSelect && landTypeSelect.value) {
|
||||||
|
form.landType.value = landTypeSelect.value;
|
||||||
|
}
|
||||||
|
if (mainYieldUnitCodeSelect && mainYieldUnitCodeSelect.value) {
|
||||||
|
form.mainYieldUnitCode.value = mainYieldUnitCodeSelect.value;
|
||||||
|
}
|
||||||
|
if (mainSaleUnitCodeSelect && mainSaleUnitCodeSelect.value) {
|
||||||
|
form.mainSaleUnitCode.value = mainSaleUnitCodeSelect.value;
|
||||||
|
}
|
||||||
|
if (subYieldUnitCodeSelect && subYieldUnitCodeSelect.value) {
|
||||||
|
form.subYieldUnitCode.value = subYieldUnitCodeSelect.value;
|
||||||
|
}
|
||||||
|
if (subSaleUnitCodeSelect && subSaleUnitCodeSelect.value) {
|
||||||
|
form.subSaleUnitCode.value = subSaleUnitCodeSelect.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
const errorData = [];
|
||||||
|
|
||||||
|
if(!form.cropName.value) {
|
||||||
|
const data = {field:'cropName', message: '재배 작물명을 입력해주세요.'}
|
||||||
|
errorData.push(data);
|
||||||
|
}
|
||||||
|
if(form.mainYield.value && !form.mainYieldUnitCode.value) {
|
||||||
|
const data = {field:'mainYieldUnitCode', message: '단위를 선택해주세요.'}
|
||||||
|
errorData.push(data);
|
||||||
|
}
|
||||||
|
if(form.mainSaleAmount.value && !form.mainSaleUnitCode.value) {
|
||||||
|
const data = {field:'mainSaleUnitCode', message: '단위를 선택해주세요.'}
|
||||||
|
errorData.push(data);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(form.subYield.value && !form.subYieldUnitCode.value) {
|
||||||
|
const data = {field:'subYieldUnitCode', message: '단위를 선택해주세요.'}
|
||||||
|
errorData.push(data);
|
||||||
|
}
|
||||||
|
if(form.subSaleAmount.value && !form.subSaleUnitCode.value) {
|
||||||
|
const data = {field:'subSaleUnitCode', message: '단위를 선택해주세요.'}
|
||||||
|
errorData.push(data);
|
||||||
|
}
|
||||||
|
kri.form.error(errorData)
|
||||||
|
|
||||||
|
if(errorData.length === 0) {
|
||||||
|
const formData = new FormData(form);
|
||||||
|
|
||||||
|
const data = {};
|
||||||
|
formData.forEach((value, key) => {
|
||||||
|
data[key] = value;
|
||||||
|
});
|
||||||
|
//구분 키
|
||||||
|
if(!data['id']) {
|
||||||
|
data['id'] = Math.floor(Math.random() * 1000000) + 1;
|
||||||
|
} else {
|
||||||
|
data['id'] = Number(data['id']);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const existingIndex = ENV.data.addProducts.findIndex(item => item.id == data.id);
|
||||||
|
if (existingIndex !== -1) {
|
||||||
|
ENV.data.addProducts[existingIndex] = data;
|
||||||
|
} else {
|
||||||
|
ENV.data.addProducts.push(data);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ENV.module.addPopup.close();
|
||||||
|
|
||||||
|
|
||||||
|
setTimeout(function(){
|
||||||
|
renderControl.itemAdd(data);
|
||||||
|
},300)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getPurposeText(code){
|
||||||
|
const found = ENV.data.purposeList.find(item => item.id === code);
|
||||||
|
return found ? found.codeText : '-';
|
||||||
|
},
|
||||||
|
getUnitText(code){
|
||||||
|
const found = ENV.data.unitList.find(item => item.id === code);
|
||||||
|
return found ? found.codeText : '-';
|
||||||
|
},
|
||||||
|
|
||||||
|
deleteItem(id){
|
||||||
|
const listBody = document.getElementById('listBody');
|
||||||
|
const target = listBody.querySelector(`div[data-id="${id}"]`);
|
||||||
|
if (target) {
|
||||||
|
listBody.removeChild(target);
|
||||||
|
ENV.data.addProducts = ENV.data.addProducts.filter(p => p.id != id);
|
||||||
|
}
|
||||||
|
formControl.setListHeader();
|
||||||
|
},
|
||||||
|
removeAll(){
|
||||||
|
ENV.data.addProducts = [];
|
||||||
|
const listBody = document.getElementById('listBody');
|
||||||
|
listBody.innerHTML = '';
|
||||||
|
this.setListHeader();
|
||||||
|
},
|
||||||
|
editItem(id){
|
||||||
|
|
||||||
|
const item = ENV.data.addProducts.find(product => product.id == id);
|
||||||
|
|
||||||
|
if(item) {
|
||||||
|
|
||||||
|
const form = document.getElementById('forestForm'); // 폼 ID로 선택
|
||||||
|
|
||||||
|
Object.entries(item).forEach(([key, value]) => {
|
||||||
|
const field = form.elements.namedItem(key);
|
||||||
|
if (field) {
|
||||||
|
|
||||||
|
field.value = value;
|
||||||
|
if (field == 'landType' || field == 'mainYieldUnitCode' || field == 'mainSaleUnitCode' || field == 'subYieldUnitCode' || field == 'subSaleUnitCode') {
|
||||||
|
// TODO selectbox값 세팅
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
formControl.addOpen();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
setListHeader(){
|
||||||
|
const listBody = document.getElementById('listHeader');
|
||||||
|
const listCount = document.getElementById('listCount');
|
||||||
|
if(ENV.data.addProducts.length > 0){
|
||||||
|
|
||||||
|
listBody.style.display = '';
|
||||||
|
listCount.textContent = ENV.data.addProducts.length;
|
||||||
|
} else {
|
||||||
|
listBody.style.display = 'none';
|
||||||
|
listCount.textContent = '0';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
let renderControl={
|
||||||
|
itemAdd(item){
|
||||||
|
|
||||||
|
const form = document.getElementById('forestForm');
|
||||||
|
form.reset();
|
||||||
|
const modalContent = document.querySelector('.modal-content');
|
||||||
|
setTimeout(() => {
|
||||||
|
modalContent.scrollTop = 0;
|
||||||
|
}, 0);
|
||||||
|
|
||||||
|
|
||||||
|
const listBody = document.getElementById('listBody');
|
||||||
|
listBody.style.display = '';
|
||||||
|
|
||||||
|
|
||||||
|
let tag1 = '';
|
||||||
|
if(item.landArea) {
|
||||||
|
tag1 = `<span>${Number(item.landArea).toLocaleString() || '-'}평</span>`;
|
||||||
|
}
|
||||||
|
let tag2 = '';
|
||||||
|
if(item.town && !item.streetNum) {
|
||||||
|
tag2 = `<li><span>${item.town}</span></li>`;
|
||||||
|
} else if (!item.town && item.streetNum) {
|
||||||
|
tag2 = `<li><span>${item.streetNum}</span></li>`;
|
||||||
|
}else if (item.town && item.streetNum) {
|
||||||
|
tag2 = `<li><span>${item.town} ${item.streetNum}</span></li>`;
|
||||||
|
}
|
||||||
|
let tag3 = '';
|
||||||
|
if(item.landType ) {
|
||||||
|
tag3 = `<li><p>지목</p><span>${formControl.getPurposeText(item.landType)}</span></li>`;
|
||||||
|
}
|
||||||
|
|
||||||
|
let tag4 = '';
|
||||||
|
if(item.availableArea ) {
|
||||||
|
tag4 = `<li><p>가능면적</p><span>${Number(item.availableArea).toLocaleString() || '-'}평</span></li>`;
|
||||||
|
}
|
||||||
|
|
||||||
|
let tag5 = '';
|
||||||
|
if (item.mainYield && item.mainSaleAmount) {
|
||||||
|
tag5 = `<li><p>주생산물 수확량 / 판매량</p><span>${Number(item.mainYield).toLocaleString() || '-'}${formControl.getUnitText(item.mainYieldUnitCode)} / ${Number(item.mainSaleAmount).toLocaleString() || '-'}${formControl.getUnitText(item.mainSaleUnitCode)}</span></li>`;
|
||||||
|
} else if (item.mainYield && !item.mainSaleAmount) {
|
||||||
|
tag5 = `<li><p>주생산물 수확량</p><span>${Number(item.mainYield).toLocaleString() || '-'}${formControl.getUnitText(item.mainYieldUnitCode)}</span></li>`;
|
||||||
|
} else if (!item.mainYield && item.mainSaleAmount) {
|
||||||
|
tag5 = `<li><p>주생산물 판매량</p><span>${Number(item.mainSaleAmount).toLocaleString() || '-'}${formControl.getUnitText(item.mainSaleUnitCode)}</span></li>`;
|
||||||
|
}
|
||||||
|
let tag6 = '';
|
||||||
|
if (item.subYield && item.subSaleAmount) {
|
||||||
|
tag6 = `<li><p>주생산물 수확량 / 판매량</p><span>${Number(item.subYield).toLocaleString() || '-'}${formControl.getUnitText(item.subYieldUnitCode)} / ${Number(item.subSaleAmount).toLocaleString() || '-'}${formControl.getUnitText(item.subSaleUnitCode)}</span></li>`;
|
||||||
|
} else if (item.subYield && !item.subSaleAmount) {
|
||||||
|
tag6 = `<li><p>주생산물 수확량</p><span>${Number(item.subYield).toLocaleString() || '-'}${formControl.getUnitText(item.subYieldUnitCode)}</span></li>`;
|
||||||
|
} else if (!item.subYield && item.subSaleAmount) {
|
||||||
|
tag6 = `<li><p>주생산물 판매량</p><span>${Number(item.subSaleAmount).toLocaleString() || '-'}${formControl.getUnitText(item.subSaleUnitCode)}</span></li>`;
|
||||||
|
}
|
||||||
|
|
||||||
|
const div = document.createElement('div');
|
||||||
|
div.className = 'list-item';
|
||||||
|
div.dataset.id = item.id;
|
||||||
|
div.innerHTML = `
|
||||||
|
<div class="item-tit-group">
|
||||||
|
<p class="item-name">${item.cropName} ${tag1}</p>
|
||||||
|
<div class="btn-group">
|
||||||
|
<button type="button" class="delete" onclick="formControl.deleteItem(${item.id})"><span class="hide-txt">삭제</span></button>
|
||||||
|
<button type="button" class="edit" onclick="formControl.editItem(${item.id})"><span class="hide-txt">수정</span></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<ul class="detail-list">
|
||||||
|
${tag2}
|
||||||
|
${tag3}
|
||||||
|
${tag4}
|
||||||
|
${tag5}
|
||||||
|
${tag6}
|
||||||
|
</ul>
|
||||||
|
`;
|
||||||
|
|
||||||
|
|
||||||
|
const existingItem = listBody.querySelector(`[data-id="${item.id}"]`);
|
||||||
|
if(existingItem){
|
||||||
|
listBody.replaceChild(div,existingItem);
|
||||||
|
} else {
|
||||||
|
listBody.append(div);
|
||||||
|
}
|
||||||
|
|
||||||
|
formControl.setListHeader();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</html>
|
||||||
Reference in New Issue
Block a user