Merge branch 'master' of http://192.168.0.25:9001/r/owl-kisa
| | |
| | | List<Map<String, Object>> find(FaqCondition faqCondition); |
| | | |
| | | Long count(FaqCondition faqCondition); |
| | | |
| | | List<Map<String, Object>> findNotActivation(FaqCondition faqCondition); |
| | | |
| | | Long countNotActivation(FaqCondition faqCondition); |
| | | } |
| | |
| | | List<Map<String, Object>> find(GuideCondition guideCondition); |
| | | |
| | | Long count(GuideCondition guideCondition); |
| | | |
| | | List<Map<String, Object>> findNotActivation(GuideCondition guideCondition); |
| | | |
| | | Long countNotActivation(GuideCondition guideCondition); |
| | | } |
| | |
| | | import kr.wisestone.owl.web.form.GuideForm; |
| | | import org.springframework.data.domain.Pageable; |
| | | import org.springframework.data.jpa.repository.JpaRepository; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | Faq activeFaq(FaqForm faqForm); |
| | | |
| | | void detailFaq(Map<String, Object> resJsonData, FaqCondition faqCondition); |
| | | |
| | | ModelAndView downloadExcel(HttpServletRequest request, Model model); |
| | | |
| | | void remove(FaqForm make); |
| | | } |
| | |
| | | import kr.wisestone.owl.web.form.GuideForm; |
| | | import org.springframework.data.domain.Pageable; |
| | | import org.springframework.data.jpa.repository.JpaRepository; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | Guide activeGuide(GuideForm guideForm); |
| | | |
| | | void detailGuide(Map<String, Object> resJsonData, GuideCondition guideCondition); |
| | | |
| | | ModelAndView downloadExcel(HttpServletRequest request, Model model); |
| | | |
| | | void remove(GuideForm make); |
| | | } |
| | |
| | | void sendNotice(NoticeForm noticeForm); |
| | | |
| | | ModelAndView downloadExcel(HttpServletRequest request, Model model); |
| | | |
| | | void remove(NoticeForm make); |
| | | } |
| | |
| | | import kr.wisestone.owl.web.form.QnaForm; |
| | | import org.springframework.data.domain.Pageable; |
| | | import org.springframework.data.jpa.repository.JpaRepository; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | Qna modifyQna(QnaForm qnaForm); |
| | | |
| | | void detailQna(Map<String, Object> resJsonData, QnaCondition qnaCondition); |
| | | |
| | | ModelAndView downloadExcel(HttpServletRequest request, Model model); |
| | | |
| | | void remove(QnaForm make); |
| | | } |
| | |
| | | package kr.wisestone.owl.service.impl; |
| | | |
| | | import com.google.common.collect.Lists; |
| | | import kr.wisestone.owl.common.ExcelConditionCheck; |
| | | import kr.wisestone.owl.config.kafka.KafkaSender; |
| | | import kr.wisestone.owl.constant.Constants; |
| | | import kr.wisestone.owl.constant.MngPermission; |
| | | import kr.wisestone.owl.constant.MsgConstants; |
| | | import kr.wisestone.owl.domain.Faq; |
| | | import kr.wisestone.owl.domain.Guide; |
| | | import kr.wisestone.owl.domain.User; |
| | | import kr.wisestone.owl.domain.UserLevel; |
| | | import kr.wisestone.owl.exception.OwlRuntimeException; |
| | | import kr.wisestone.owl.mapper.FaqMapper; |
| | | import kr.wisestone.owl.mapper.NoticeMapper; |
| | | import kr.wisestone.owl.repository.FaqRepository; |
| | | import kr.wisestone.owl.service.FaqService; |
| | | import kr.wisestone.owl.service.UserService; |
| | | import kr.wisestone.owl.service.*; |
| | | import kr.wisestone.owl.util.ConvertUtil; |
| | | import kr.wisestone.owl.vo.FaqVo; |
| | | import kr.wisestone.owl.vo.ResPage; |
| | | import kr.wisestone.owl.vo.*; |
| | | import kr.wisestone.owl.web.condition.FaqCondition; |
| | | import kr.wisestone.owl.web.condition.NoticeCondition; |
| | | import kr.wisestone.owl.web.form.FaqForm; |
| | | import kr.wisestone.owl.web.form.GuideForm; |
| | | import kr.wisestone.owl.web.form.NoticeForm; |
| | | import kr.wisestone.owl.web.view.ExcelView; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.domain.Pageable; |
| | | import org.springframework.data.jpa.repository.JpaRepository; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | |
| | | @Autowired |
| | | private FaqMapper faqMapper; |
| | | |
| | | @Autowired |
| | | private WorkspaceService workspaceService; |
| | | |
| | | @Autowired |
| | | private UserLevelService userLevelService; |
| | | |
| | | @Autowired |
| | | private UserWorkspaceService userWorkspaceService; |
| | | |
| | | @Autowired |
| | | private ExcelView excelView; |
| | | |
| | | @Autowired |
| | | private ExcelConditionCheck excelConditionCheck; |
| | | |
| | | @Override |
| | | protected JpaRepository<Faq, Long> getRepository() { |
| | |
| | | faqCondition.setPageSize(pageable.getPageSize()); |
| | | faqCondition.setTitle(faqCondition.getTitle()); |
| | | |
| | | List<Map<String, Object>> results = this.faqMapper.find(faqCondition); |
| | | Long totalCount = this.faqMapper.count(faqCondition); |
| | | User user = this.webAppUtil.getLoginUserObject(); |
| | | UserLevel userLevel = this.userLevelService.getUserLevel(user.getUserLevel().getId()); |
| | | |
| | | List<Map<String, Object>> results = Lists.newArrayList(); |
| | | Long totalCount = 0L; |
| | | if (this.userWorkspaceService.checkWorkspaceManager(user) |
| | | || MngPermission.checkMngPermission(userLevel.getPermission(), MngPermission.USER_PERMISSION_MNG_FAQ)) { |
| | | results = this.faqMapper.find(faqCondition); |
| | | totalCount = this.faqMapper.count(faqCondition); |
| | | } else { |
| | | results = this.faqMapper.findNotActivation(faqCondition); |
| | | totalCount = this.faqMapper.countNotActivation(faqCondition); |
| | | } |
| | | int totalPage = (int) Math.ceil((totalCount - 1) / pageable.getPageSize()) + 1; |
| | | List<FaqVo> faqVos = ConvertUtil.convertListToListClass(results, FaqVo.class); |
| | | |
| | |
| | | |
| | | resJsonData.put(Constants.RES_KEY_CONTENTS, faqVo); |
| | | } |
| | | |
| | | @Override |
| | | public void remove(FaqForm faqForm) { |
| | | if (faqForm.getRemoveIds().size() < 1) { |
| | | throw new OwlRuntimeException( |
| | | this.messageAccessor.getMessage(MsgConstants.COMPANY_REMOVE_NOT_SELECT)); |
| | | } |
| | | for (Long id : faqForm.getRemoveIds()) { |
| | | this.faqRepository.deleteById(id); |
| | | this.faqRepository.flush(); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public ModelAndView downloadExcel(HttpServletRequest request, Model model) { |
| | | ModelAndView modelAndView = this.workspaceService.checkUseExcelDownload(model); |
| | | if (modelAndView != null) { |
| | | return modelAndView; |
| | | } |
| | | |
| | | Map<String, Object> conditions = new HashMap<>(); |
| | | // 엑셀 다운로드에 필요한 검색 조건 정보를 추출하고 검색 조건 추출에 오류가 발생하면 경고를 표시해준다. |
| | | modelAndView = this.excelConditionCheck.checkCondition(conditions, request, model); |
| | | if (modelAndView != null) { |
| | | return modelAndView; |
| | | } |
| | | |
| | | FaqCondition faqCondition = FaqCondition.make(conditions); |
| | | List<Map<String, Object>> results = this.faqMapper.find(faqCondition); |
| | | List<FaqVo> faqVos = ConvertUtil.convertListToListClass(results, FaqVo.class); |
| | | |
| | | // code_ko_KR 에 code명 설정 |
| | | ExportExcelVo excelInfo = new ExportExcelVo(); |
| | | excelInfo.setFileName(this.messageAccessor.message("FAQ 목록")); |
| | | excelInfo.addAttrInfos(new ExportExcelAttrVo("title", this.messageAccessor.message("faq.title"), 6, ExportExcelAttrVo.ALIGN_CENTER)); |
| | | excelInfo.addAttrInfos(new ExportExcelAttrVo("registerDate", this.messageAccessor.message("faq.registerDate"), 10, ExportExcelAttrVo.ALIGN_CENTER)); |
| | | excelInfo.addAttrInfos(new ExportExcelAttrVo("writer", this.messageAccessor.message("faq.registerId"), 10, ExportExcelAttrVo.ALIGN_CENTER)); |
| | | |
| | | excelInfo.setDatas(faqVos); |
| | | |
| | | model.addAttribute(Constants.EXCEL, excelInfo); |
| | | return new ModelAndView(this.excelView); |
| | | } |
| | | } |
| | |
| | | package kr.wisestone.owl.service.impl; |
| | | |
| | | import com.google.common.collect.Lists; |
| | | import kr.wisestone.owl.common.ExcelConditionCheck; |
| | | import kr.wisestone.owl.constant.Constants; |
| | | import kr.wisestone.owl.constant.MngPermission; |
| | | import kr.wisestone.owl.constant.MsgConstants; |
| | | import kr.wisestone.owl.domain.Guide; |
| | | import kr.wisestone.owl.domain.User; |
| | | import kr.wisestone.owl.domain.UserLevel; |
| | | import kr.wisestone.owl.exception.OwlRuntimeException; |
| | | import kr.wisestone.owl.mapper.GuideMapper; |
| | | import kr.wisestone.owl.repository.GuideRepository; |
| | | import kr.wisestone.owl.service.GuideService; |
| | | import kr.wisestone.owl.service.UserLevelService; |
| | | import kr.wisestone.owl.service.UserWorkspaceService; |
| | | import kr.wisestone.owl.service.WorkspaceService; |
| | | import kr.wisestone.owl.util.CommonUtil; |
| | | import kr.wisestone.owl.util.ConvertUtil; |
| | | import kr.wisestone.owl.vo.GuideVo; |
| | | import kr.wisestone.owl.vo.ManageUserVo; |
| | | import kr.wisestone.owl.vo.ResPage; |
| | | import kr.wisestone.owl.vo.*; |
| | | import kr.wisestone.owl.web.condition.GuideCondition; |
| | | import kr.wisestone.owl.web.condition.NoticeCondition; |
| | | import kr.wisestone.owl.web.form.GuideForm; |
| | | import kr.wisestone.owl.web.form.NoticeForm; |
| | | import kr.wisestone.owl.web.view.ExcelView; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.domain.Pageable; |
| | | import org.springframework.data.jpa.repository.JpaRepository; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | |
| | | @Autowired |
| | | private GuideMapper guideMapper; |
| | | |
| | | @Autowired |
| | | private WorkspaceService workspaceService; |
| | | |
| | | @Autowired |
| | | private ExcelView excelView; |
| | | |
| | | @Autowired |
| | | private ExcelConditionCheck excelConditionCheck; |
| | | |
| | | @Autowired |
| | | private UserLevelService userLevelService; |
| | | |
| | | @Autowired |
| | | private UserWorkspaceService userWorkspaceService; |
| | | |
| | | @Override |
| | | protected JpaRepository<Guide, Long> getRepository() { |
| | |
| | | guideCondition.setPageSize(pageable.getPageSize()); |
| | | guideCondition.setTitle(guideCondition.getTitle()); |
| | | |
| | | List<Map<String, Object>> results = this.guideMapper.find(guideCondition); |
| | | Long totalCount = this.guideMapper.count(guideCondition); |
| | | User user = this.webAppUtil.getLoginUserObject(); |
| | | UserLevel userLevel = this.userLevelService.getUserLevel(user.getUserLevel().getId()); |
| | | |
| | | List<Map<String, Object>> results = Lists.newArrayList(); |
| | | Long totalCount = 0L; |
| | | if (this.userWorkspaceService.checkWorkspaceManager(user) |
| | | || MngPermission.checkMngPermission(userLevel.getPermission(), MngPermission.USER_PERMISSION_MNG_GUIDE)) { |
| | | results = this.guideMapper.find(guideCondition); |
| | | totalCount = this.guideMapper.count(guideCondition); |
| | | } else { |
| | | results = this.guideMapper.findNotActivation(guideCondition); |
| | | totalCount = this.guideMapper.countNotActivation(guideCondition); |
| | | } |
| | | int totalPage = (int) Math.ceil((totalCount - 1) / pageable.getPageSize()) + 1; |
| | | List<GuideVo> guideVos = ConvertUtil.convertListToListClass(results, GuideVo.class); |
| | | |
| | |
| | | |
| | | resJsonData.put(Constants.RES_KEY_CONTENTS, guideVo); |
| | | } |
| | | |
| | | @Override |
| | | public void remove(GuideForm guideForm) { |
| | | if (guideForm.getRemoveIds().size() < 1) { |
| | | throw new OwlRuntimeException( |
| | | this.messageAccessor.getMessage(MsgConstants.COMPANY_REMOVE_NOT_SELECT)); |
| | | } |
| | | for (Long id : guideForm.getRemoveIds()) { |
| | | this.guideRepository.deleteById(id); |
| | | this.guideRepository.flush(); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public ModelAndView downloadExcel(HttpServletRequest request, Model model) { |
| | | ModelAndView modelAndView = this.workspaceService.checkUseExcelDownload(model); |
| | | if (modelAndView != null) { |
| | | return modelAndView; |
| | | } |
| | | |
| | | Map<String, Object> conditions = new HashMap<>(); |
| | | // 엑셀 다운로드에 필요한 검색 조건 정보를 추출하고 검색 조건 추출에 오류가 발생하면 경고를 표시해준다. |
| | | modelAndView = this.excelConditionCheck.checkCondition(conditions, request, model); |
| | | if (modelAndView != null) { |
| | | return modelAndView; |
| | | } |
| | | |
| | | GuideCondition guideCondition = GuideCondition.make(conditions); |
| | | List<Map<String, Object>> results = this.guideMapper.find(guideCondition); |
| | | List<GuideVo> guideVos = ConvertUtil.convertListToListClass(results, GuideVo.class); |
| | | |
| | | // code_ko_KR 에 code명 설정 |
| | | ExportExcelVo excelInfo = new ExportExcelVo(); |
| | | excelInfo.setFileName(this.messageAccessor.message("가이드 목록")); |
| | | excelInfo.addAttrInfos(new ExportExcelAttrVo("title", this.messageAccessor.message("guide.title"), 6, ExportExcelAttrVo.ALIGN_CENTER)); |
| | | excelInfo.addAttrInfos(new ExportExcelAttrVo("registerDate", this.messageAccessor.message("guide.registerDate"), 10, ExportExcelAttrVo.ALIGN_CENTER)); |
| | | excelInfo.addAttrInfos(new ExportExcelAttrVo("writer", this.messageAccessor.message("guide.registerId"), 10, ExportExcelAttrVo.ALIGN_CENTER)); |
| | | |
| | | excelInfo.setDatas(guideVos); |
| | | |
| | | model.addAttribute(Constants.EXCEL, excelInfo); |
| | | return new ModelAndView(this.excelView); |
| | | } |
| | | } |
| | |
| | | public void recordRemoveWorkflowToIssueStatus(String oldIssueStatusName, String newIssueStatusName, StringBuilder description) { |
| | | description.append("<ul class=\"activity-list\">"); |
| | | |
| | | String title = "<span translate=\"common.upddetectReservationIssueStatusateWorkflowNotExist\">변경된 워크플로우에서 상태가 존재하지 않아 이슈의 상태가 변경되었습니다.</span>"; |
| | | String title = "<span translate=\"common.updateWorkflowNotExist\">변경된 워크플로우에서 상태가 존재하지 않아 이슈의 상태가 변경되었습니다.</span>"; |
| | | // 이력 정보를 html 태그로 만들어 준다. |
| | | this.makeIssueHistoryHtml(description, title, oldIssueStatusName, newIssueStatusName); |
| | | |
| | |
| | | import kr.wisestone.owl.vo.*; |
| | | import kr.wisestone.owl.web.condition.CompanyFieldCondition; |
| | | import kr.wisestone.owl.web.condition.NoticeCondition; |
| | | import kr.wisestone.owl.web.form.CompanyFieldForm; |
| | | import kr.wisestone.owl.web.form.NoticeForm; |
| | | import kr.wisestone.owl.web.view.ExcelView; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public void remove(NoticeForm noticeForm) { |
| | | if (noticeForm.getRemoveIds().size() < 1) { |
| | | throw new OwlRuntimeException( |
| | | this.messageAccessor.getMessage(MsgConstants.COMPANY_REMOVE_NOT_SELECT)); |
| | | } |
| | | for (Long id : noticeForm.getRemoveIds()) { |
| | | this.noticeRepository.deleteById(id); |
| | | this.noticeRepository.flush(); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public ModelAndView downloadExcel(HttpServletRequest request, Model model) { |
| | | ModelAndView modelAndView = this.workspaceService.checkUseExcelDownload(model); |
| | | if (modelAndView != null) { |
| | |
| | | excelInfo.setFileName(this.messageAccessor.message("공지사항 목록")); |
| | | excelInfo.addAttrInfos(new ExportExcelAttrVo("title", this.messageAccessor.message("notice.title"), 6, ExportExcelAttrVo.ALIGN_CENTER)); |
| | | excelInfo.addAttrInfos(new ExportExcelAttrVo("registerDate", this.messageAccessor.message("notice.registerDate"), 10, ExportExcelAttrVo.ALIGN_CENTER)); |
| | | excelInfo.addAttrInfos(new ExportExcelAttrVo("registerId", this.messageAccessor.message("notice.registerId"), 10, ExportExcelAttrVo.ALIGN_CENTER)); |
| | | excelInfo.addAttrInfos(new ExportExcelAttrVo("writer", this.messageAccessor.message("notice.registerId"), 10, ExportExcelAttrVo.ALIGN_CENTER)); |
| | | |
| | | excelInfo.setDatas(noticeVos); |
| | | |
| | |
| | | package kr.wisestone.owl.service.impl; |
| | | |
| | | import kr.wisestone.owl.common.ExcelConditionCheck; |
| | | import kr.wisestone.owl.config.kafka.KafkaSender; |
| | | import kr.wisestone.owl.constant.Constants; |
| | | import kr.wisestone.owl.constant.MsgConstants; |
| | |
| | | import kr.wisestone.owl.repository.QnaRepository; |
| | | import kr.wisestone.owl.service.QnaService; |
| | | import kr.wisestone.owl.service.UserService; |
| | | import kr.wisestone.owl.service.WorkspaceService; |
| | | import kr.wisestone.owl.util.ConvertUtil; |
| | | import kr.wisestone.owl.vo.QnaVo; |
| | | import kr.wisestone.owl.vo.ResPage; |
| | | import kr.wisestone.owl.vo.*; |
| | | import kr.wisestone.owl.web.condition.NoticeCondition; |
| | | import kr.wisestone.owl.web.condition.QnaCondition; |
| | | import kr.wisestone.owl.web.form.NoticeForm; |
| | | import kr.wisestone.owl.web.form.QnaForm; |
| | | import kr.wisestone.owl.web.view.ExcelView; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.domain.Pageable; |
| | | import org.springframework.data.jpa.repository.JpaRepository; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | |
| | | @Autowired |
| | | private QnaMapper qnaMapper; |
| | | |
| | | @Autowired |
| | | private WorkspaceService workspaceService; |
| | | |
| | | @Autowired |
| | | private ExcelView excelView; |
| | | |
| | | @Autowired |
| | | private ExcelConditionCheck excelConditionCheck; |
| | | |
| | | @Override |
| | | protected JpaRepository<Qna, Long> getRepository() { |
| | |
| | | |
| | | resJsonData.put(Constants.RES_KEY_CONTENTS, qnaVo); |
| | | } |
| | | |
| | | @Override |
| | | public void remove(QnaForm qnaForm) { |
| | | if (qnaForm.getRemoveIds().size() < 1) { |
| | | throw new OwlRuntimeException( |
| | | this.messageAccessor.getMessage(MsgConstants.COMPANY_REMOVE_NOT_SELECT)); |
| | | } |
| | | for (Long id : qnaForm.getRemoveIds()) { |
| | | this.qnaRepository.deleteById(id); |
| | | this.qnaRepository.flush(); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public ModelAndView downloadExcel(HttpServletRequest request, Model model) { |
| | | ModelAndView modelAndView = this.workspaceService.checkUseExcelDownload(model); |
| | | if (modelAndView != null) { |
| | | return modelAndView; |
| | | } |
| | | |
| | | Map<String, Object> conditions = new HashMap<>(); |
| | | // 엑셀 다운로드에 필요한 검색 조건 정보를 추출하고 검색 조건 추출에 오류가 발생하면 경고를 표시해준다. |
| | | modelAndView = this.excelConditionCheck.checkCondition(conditions, request, model); |
| | | if (modelAndView != null) { |
| | | return modelAndView; |
| | | } |
| | | |
| | | QnaCondition qnaCondition = QnaCondition.make(conditions); |
| | | List<Map<String, Object>> results = this.qnaMapper.find(qnaCondition); |
| | | List<QnaVo> qnaVos = ConvertUtil.convertListToListClass(results, QnaVo.class); |
| | | |
| | | // code_ko_KR 에 code명 설정 |
| | | ExportExcelVo excelInfo = new ExportExcelVo(); |
| | | excelInfo.setFileName(this.messageAccessor.message("QNA 목록")); |
| | | excelInfo.addAttrInfos(new ExportExcelAttrVo("title", this.messageAccessor.message("qna.title"), 6, ExportExcelAttrVo.ALIGN_CENTER)); |
| | | excelInfo.addAttrInfos(new ExportExcelAttrVo("registerDate", this.messageAccessor.message("qna.registerDate"), 10, ExportExcelAttrVo.ALIGN_CENTER)); |
| | | excelInfo.addAttrInfos(new ExportExcelAttrVo("writer", this.messageAccessor.message("qna.registerId"), 10, ExportExcelAttrVo.ALIGN_CENTER)); |
| | | |
| | | excelInfo.setDatas(qnaVos); |
| | | |
| | | model.addAttribute(Constants.EXCEL, excelInfo); |
| | | return new ModelAndView(this.excelView); |
| | | } |
| | | } |
| | |
| | | private Long id; |
| | | private String title; |
| | | private String description; |
| | | private String writer; |
| | | private Boolean modifyPermissionCheck = Boolean.FALSE; // 공지 사항 수정은 관리자만 가능 |
| | | |
| | | public NoticeVo(){} |
| | |
| | | this.description = description; |
| | | } |
| | | |
| | | public String getWriter() { |
| | | return writer; |
| | | } |
| | | |
| | | public void setWriter(String writer) { |
| | | this.writer = writer; |
| | | } |
| | | |
| | | public Boolean getModifyPermissionCheck() { |
| | | return modifyPermissionCheck; |
| | | } |
| | |
| | | import kr.wisestone.owl.web.condition.FaqCondition; |
| | | import kr.wisestone.owl.web.form.EventForm; |
| | | import kr.wisestone.owl.web.form.FaqForm; |
| | | import kr.wisestone.owl.web.form.NoticeForm; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.domain.Pageable; |
| | | import org.springframework.http.MediaType; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | |
| | | |
| | | return this.setSuccessMessage(resJsonData); |
| | | } |
| | | |
| | | @RequestMapping(value = "/faq/remove", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) |
| | | public |
| | | @ResponseBody |
| | | Map<String, Object> remove(@RequestBody Map<String, Map<String, Object>> params) { |
| | | Map<String, Object> resJsonData = new HashMap<>(); |
| | | Map<String, Object> content = params.get(Constants.REQ_KEY_CONTENT); |
| | | |
| | | this.faqService.remove(FaqForm.make(content)); |
| | | |
| | | return this.setSuccessMessage(resJsonData); |
| | | } |
| | | |
| | | @RequestMapping(value = "/faq/downloadExcel", method = RequestMethod.POST) |
| | | public ModelAndView downloadExcel(HttpServletRequest request, Model model) { |
| | | return this.faqService.downloadExcel(request, model); |
| | | } |
| | | } |
| | | |
| | |
| | | import kr.wisestone.owl.web.condition.GuideCondition; |
| | | import kr.wisestone.owl.web.form.GuideForm; |
| | | import kr.wisestone.owl.web.form.GuideForm; |
| | | import kr.wisestone.owl.web.form.NoticeForm; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.domain.Pageable; |
| | | import org.springframework.http.MediaType; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | |
| | | |
| | | return this.setSuccessMessage(resJsonData); |
| | | } |
| | | |
| | | @RequestMapping(value = "/guide/remove", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) |
| | | public |
| | | @ResponseBody |
| | | Map<String, Object> remove(@RequestBody Map<String, Map<String, Object>> params) { |
| | | Map<String, Object> resJsonData = new HashMap<>(); |
| | | Map<String, Object> content = params.get(Constants.REQ_KEY_CONTENT); |
| | | |
| | | this.guideService.remove(GuideForm.make(content)); |
| | | |
| | | return this.setSuccessMessage(resJsonData); |
| | | } |
| | | |
| | | @RequestMapping(value = "/guide/downloadExcel", method = RequestMethod.POST) |
| | | public ModelAndView downloadExcel(HttpServletRequest request, Model model) { |
| | | return this.guideService.downloadExcel(request, model); |
| | | } |
| | | } |
| | | |
| | |
| | | import kr.wisestone.owl.constant.Constants; |
| | | import kr.wisestone.owl.service.NoticeService; |
| | | import kr.wisestone.owl.web.condition.NoticeCondition; |
| | | import kr.wisestone.owl.web.form.CompanyFieldForm; |
| | | import kr.wisestone.owl.web.form.NoticeForm; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.domain.Pageable; |
| | |
| | | return this.setSuccessMessage(resJsonData); |
| | | } |
| | | |
| | | // 공지 삭제 |
| | | @RequestMapping(value = "/notice/remove", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) |
| | | public |
| | | @ResponseBody |
| | | Map<String, Object> remove(@RequestBody Map<String, Map<String, Object>> params) { |
| | | Map<String, Object> resJsonData = new HashMap<>(); |
| | | Map<String, Object> content = params.get(Constants.REQ_KEY_CONTENT); |
| | | |
| | | this.noticeService.remove(NoticeForm.make(content)); |
| | | |
| | | return this.setSuccessMessage(resJsonData); |
| | | } |
| | | |
| | | @RequestMapping(value = "/notice/downloadExcel", method = RequestMethod.POST) |
| | | public ModelAndView downloadExcel(HttpServletRequest request, Model model) { |
| | |
| | | import kr.wisestone.owl.constant.Constants; |
| | | import kr.wisestone.owl.service.QnaService; |
| | | import kr.wisestone.owl.web.condition.QnaCondition; |
| | | import kr.wisestone.owl.web.form.NoticeForm; |
| | | import kr.wisestone.owl.web.form.QnaForm; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.domain.Pageable; |
| | | import org.springframework.http.MediaType; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | |
| | | |
| | | return this.setSuccessMessage(resJsonData); |
| | | } |
| | | |
| | | @RequestMapping(value = "/qna/remove", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) |
| | | public |
| | | @ResponseBody |
| | | Map<String, Object> remove(@RequestBody Map<String, Map<String, Object>> params) { |
| | | Map<String, Object> resJsonData = new HashMap<>(); |
| | | Map<String, Object> content = params.get(Constants.REQ_KEY_CONTENT); |
| | | |
| | | this.qnaService.remove(QnaForm.make(content)); |
| | | |
| | | return this.setSuccessMessage(resJsonData); |
| | | } |
| | | |
| | | @RequestMapping(value = "/qna/downloadExcel", method = RequestMethod.POST) |
| | | public ModelAndView downloadExcel(HttpServletRequest request, Model model) { |
| | | return this.qnaService.downloadExcel(request, model); |
| | | } |
| | | } |
| | | |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="findNotActivation" resultType="java.util.HashMap" parameterType="kr.wisestone.owl.web.condition.FaqCondition"> |
| | | SELECT |
| | | DISTINCT n.id as id, |
| | | n.title as title, |
| | | n.description as description, |
| | | n.register_id as registerId, |
| | | n.status as status, |
| | | u.name as writer, |
| | | SUBSTRING (n.register_date, 1, 10) as registerDate |
| | | FROM faq n |
| | | INNER JOIN user u on u.id = n.register_id |
| | | WHERE 1=1 |
| | | AND n.status > 0 |
| | | <if test="title != '' and title != null"> |
| | | AND n.title like CONCAT('%',#{title},'%') |
| | | </if> |
| | | ORDER BY ID DESC |
| | | <if test="page != null and !page.equals('')"> |
| | | limit #{pageSize} offset #{page}; |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="countNotActivation" resultType="java.lang.Long" parameterType="kr.wisestone.owl.web.condition.FaqCondition"> |
| | | SELECT |
| | | count(DISTINCT n.id) |
| | | FROM faq n |
| | | WHERE 1=1 |
| | | AND n.status > 0 |
| | | <if test="title != '' and title != null"> |
| | | AND n.title like CONCAT('%',#{title},'%') |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="findNotActivation" resultType="java.util.HashMap" parameterType="kr.wisestone.owl.web.condition.GuideCondition"> |
| | | SELECT |
| | | DISTINCT n.id as id, |
| | | n.title as title, |
| | | n.description as description, |
| | | n.register_id as registerId, |
| | | n.status as status, |
| | | u.name as writer, |
| | | SUBSTRING (n.register_date, 1, 10) as registerDate |
| | | FROM guide n |
| | | INNER JOIN user u on u.id = n.register_id |
| | | WHERE 1=1 |
| | | AND n.status > 0 |
| | | <if test="title != '' and title != null"> |
| | | AND n.title like CONCAT('%',#{title},'%') |
| | | </if> |
| | | ORDER BY ID DESC |
| | | <if test="page != null and !page.equals('')"> |
| | | limit #{pageSize} offset #{page}; |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="countNotActivation" resultType="java.lang.Long" parameterType="kr.wisestone.owl.web.condition.GuideCondition"> |
| | | SELECT |
| | | count(DISTINCT n.id) |
| | | FROM guide n |
| | | WHERE 1=1 |
| | | AND n.status > 0 |
| | | <if test="title != '' and title != null"> |
| | | AND n.title like CONCAT('%',#{title},'%') |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | n.title as title, |
| | | n.description as description, |
| | | n.register_id as registerId, |
| | | u.name as writer, |
| | | SUBSTRING (n.register_date, 1, 10) as registerDate |
| | | FROM notice n |
| | | INNER JOIN user u on u.id = n.register_id |
| | | WHERE 1=1 |
| | | <if test="title != '' and title != null"> |
| | | AND n.title like CONCAT('%',#{title},'%') |
| | |
| | | # added by zenith at 20200623 |
| | | use.aws=false |
| | | |
| | | use.scheduler=false |
| | | use.scheduler=true |
| | | |
| | | # upload path |
| | | attached.file.path=/dev-upload/ |
| | | profile.file.path=/dev-profile |
| | | |
| | | # aws bucket name |
| | | aws.bucket.name=wisestone-test |
| | | aws.bucket.name=files |
| | | # aws bucket access key |
| | | aws.access.key=AKIARX6BJQMZKUYEEJVD |
| | | aws.access.password=eAQvouvSJJFl47h2dkMJji/6OtzsGBGF4h9Df3qH |
| | |
| | | notice.title=\uC81C\uBAA9 |
| | | notice.registerDate=\uB4F1\uB85D\uC77C |
| | | notice.registerId=\uB4F1\uB85D\uC790 |
| | | faq.title=\uC81C\uBAA9 |
| | | faq.registerDate=\uB4F1\uB85D\uC77C |
| | | faq.registerId=\uB4F1\uB85D\uC790 |
| | | guide.title=\uC81C\uBAA9 |
| | | guide.registerDate=\uB4F1\uB85D\uC77C |
| | | guide.registerId=\uB4F1\uB85D\uC790 |
| | | qna.title=\uC81C\uBAA9 |
| | | qna.registerDate=\uB4F1\uB85D\uC77C |
| | | qna.registerId=\uB4F1\uB85D\uC790 |
| | | department.departmentName=\uBD80\uC11C\uBA85 |
| | | department.departmentDescription=\uBD80\uC11C\uC124\uBA85 |
| | | department.departmentCount=\uBD80\uC11C\uC778\uC6D0 |
| | |
| | | break; |
| | | |
| | | case "NOTICE_REGISTER": |
| | | makeTag += '<img src="/assets/images/logineyes.png" style="width:30px;"> <span class="fc-blue bold">OWL ITS TEAM</span>'; |
| | | //makeTag += '<img src="/assets/images/logineyes.png" style="width:30px;"> <span class="fc-blue bold">OWL ITS TEAM</span>'; |
| | | makeTag += '<img src="/assets/images/logineyes.png" style="width:30px;"> <span class="fc-blue bold">' + scope.data.writer+ '</span>'; |
| | | break; |
| | | case "GUIDE_MODIFY": |
| | | if ($rootScope.checkMngPermission('USER_PERMISSION_MNG_GUIDE')) { |
| | |
| | | makeTag += '<img src="/assets/images/logineyes.png" style="width:30px;"> <span class="fc-blue bold">' + scope.data.writer + '</span>'; |
| | | break; |
| | | case "FAQ_ACTIVE" : |
| | | makeTag += "<label class='switch'><input type='checkbox' ng-model='data.activation' ng-click='event.activation(data)'><span class='slider round'></span></label>"; |
| | | if ($rootScope.checkMngPermission('USER_PERMISSION_MNG_FAQ')) { |
| | | makeTag += "<label class='switch'><input type='checkbox' ng-model='data.activation' ng-click='event.activation(data)'><span class='slider round'></span></label>"; |
| | | } |
| | | break; |
| | | |
| | | case "QNA_MODIFY": |
| | | if ($rootScope.checkMngPermission('USER_PERMISSION_MNG_QNA')) { |
| | | if ($rootScope.checkMngPermission('USER_PERMISSION_MNG_QNA') || $rootScope.user.id === scope.data.registerId) { |
| | | makeTag += "<span class='titlename cursor table-word-break-all' ng-click='event.modify(data.id)'>" + scope.data.title.replace(/</gi, '<') + "</span>"; |
| | | } |
| | | else { |
| | |
| | | "failedNoticeRegistration": "공지사항 등록 실패", |
| | | "failedToLookupNotificationList": "공지 사항 목록 조회 실패", |
| | | "failedToModifyNotice": "공지 사항 수정 실패", |
| | | "failedToLookupNotificationDetails": "공지사항 상세 정보 조회 실패" |
| | | "failedToLookupNotificationDetails": "공지사항 상세 정보 조회 실패", |
| | | "delete": "공지사항 삭제", |
| | | "wantToDeleteSelectNotice": "선택한 공지사항을 삭제하겠습니까? 삭제된 공지사항은 복구할 수 없습니다.", |
| | | "notHaveDeletePermissionExists": "삭제 권한이 없는 공지사항이 존재합니다." |
| | | }, |
| | | "manageUser": { |
| | | "manageUser": "사용자 권한 관리", |
| | |
| | | "failedToModifyFAQ": "FAQ 수정 실패", |
| | | "failedToLookupFAQDetails": "FAQ 상세 정보 조회 실패", |
| | | "failedToActivation": "FAQ 활성 실패", |
| | | "activation": "활성화" |
| | | "activation": "활성화", |
| | | "delete": "FAQ 삭제", |
| | | "wantToDeleteSelect": "선택한 FAQ를 삭제하겠습니까? 삭제된 FAQ는 복구할 수 없습니다.", |
| | | "notHaveDeletePermissionExists": "삭제 권한이 없는 FAQ가 존재합니다." |
| | | }, |
| | | "QNA": { |
| | | "QNA": "QnA", |
| | |
| | | "failedQNARegistration": "QnA 등록 실패.", |
| | | "failedToLookupQNAList": "QnA 목록 조회 실패", |
| | | "failedToModifyQNA": "QnA 수정 실패", |
| | | "failedToLookupQNADetails": "QnA 상세 정보 조회 실패" |
| | | "failedToLookupQNADetails": "QnA 상세 정보 조회 실패", |
| | | "delete": "QnA 삭제", |
| | | "wantToDeleteSelect": "선택한 QnA를 삭제하겠습니까? 삭제된 QnA는 복구할 수 없습니다.", |
| | | "notHaveDeletePermissionExists": "삭제 권한이 없는 QnA가 존재합니다." |
| | | }, |
| | | "event": { |
| | | "event": "이벤트", |
| | |
| | | "failedToModifyGuide": "가이드 수정 실패", |
| | | "failedToLookupGuideDetails": "가이드 상세 정보 조회 실패", |
| | | "failedToActivation": "가이드 활설 실패", |
| | | "activation": "활성화" |
| | | "activation": "활성화", |
| | | "delete": "가이드 삭제", |
| | | "wantToDeleteSelect": "선택한 가이드를 삭제하겠습니까? 삭제된 가이드는 복구할 수 없습니다.", |
| | | "notHaveDeletePermissionExists": "삭제 권한이 없는 가이드가 존재합니다." |
| | | }, |
| | | "inquiry": { |
| | | "toInquiry": "문의하기", |
| | |
| | | "disableParticipationWorkspace": "참여 업무 공간 비활성화 알림", |
| | | "disableParticipationWorkspaceMessage": "현재 이용하고 있는 업무 공간에서 제외되었습니다.", |
| | | "alertsAboutSystem": "시스템 알림 정보", |
| | | "alertSystem": "시스템 알림", |
| | | "newAlert": "새로운 알림이 왔습니다.", |
| | | "pleaseWait": "잠시만 기다려주세요...", |
| | | "createIssue": "이슈 생성", |
| | |
| | | |
| | | // 메인 상단 검색 |
| | | function searchAll() { |
| | | $rootScope.setCookie("searchKeyword", $scope.vm.searchAll.keyWord, 60000); |
| | | moveMenu("issues.list"); |
| | | if ($rootScope.isDefined($scope.vm.searchAll.keyWord)) { |
| | | $rootScope.setCookie("searchKeyword", $scope.vm.searchAll.keyWord, 60000); |
| | | moveMenu("issues.list"); |
| | | } else { |
| | | SweetAlert.warning($filter("translate")("common.alertSystem"), $filter("translate")("issue.pleaseEnterIssueKeyWord")); |
| | | } |
| | | } |
| | | |
| | | function setLastIssueType() { |
| | |
| | | makeTableConfigs : makeTableConfigs, // 테이블 설정 |
| | | makeSearchConditions : makeSearchConditions, |
| | | add : add, // faq 등록 |
| | | removes : removes |
| | | }; |
| | | |
| | | // 변수 |
| | |
| | | $scope.vm.tableConfigs = []; |
| | | |
| | | $scope.vm.tableConfigs.push($tableProvider.config() |
| | | .setDType("checkbox") |
| | | .setHWidth("width-20-p") |
| | | .setDAlign("text-center")); |
| | | $scope.vm.tableConfigs.push($tableProvider.config() |
| | | .setHName("common.number") |
| | | .setHWidth("width-60-p bold") |
| | | .setDAlign("text-center") |
| | |
| | | .setDAlign("text-center") |
| | | .setDType("renderer") |
| | | .setDRenderer("FAQ_REGISTER")); |
| | | $scope.vm.tableConfigs.push($tableProvider.config() |
| | | .setHName("guide.activation") |
| | | .setHWidth("width-80-p bold") |
| | | .setDType("renderer") |
| | | .setDAlign("text-center pdr0 pdt0 pdl0 pdb0") |
| | | .setDRenderer("FAQ_ACTIVE")); |
| | | if ($rootScope.checkMngPermission('USER_PERMISSION_MNG_FAQ')) { |
| | | $scope.vm.tableConfigs.push($tableProvider.config() |
| | | .setHName("guide.activation") |
| | | .setHWidth("width-80-p bold") |
| | | .setDType("renderer") |
| | | .setDAlign("text-center pdr0 pdt0 pdl0 pdb0") |
| | | .setDRenderer("FAQ_ACTIVE")); |
| | | } |
| | | } |
| | | |
| | | // 목록 조회 |
| | |
| | | }); |
| | | } |
| | | |
| | | function removes() { |
| | | var removeIds = []; |
| | | var removePermission = true; |
| | | |
| | | angular.forEach($scope.vm.responseData.data, function (data) { |
| | | if (data.checked && $rootScope.checkMngPermission('USER_PERMISSION_MNG_FAQ')) { |
| | | removeIds.push(data.id); |
| | | } |
| | | |
| | | if (data.checked && !$rootScope.checkMngPermission('USER_PERMISSION_MNG_FAQ')) { |
| | | removePermission = false; |
| | | } |
| | | }); |
| | | |
| | | if (!removePermission) { |
| | | SweetAlert.swal({ |
| | | html : true, |
| | | title : $filter("translate")("common.deleteFailed"), // 삭제 실패 |
| | | text : $filter("translate")("FAQ.notHaveDeletePermissionExists"), |
| | | type : "error" |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | if (removeIds.length < 1) { |
| | | SweetAlert.swal({ |
| | | title : $filter("translate")("common.checkPurgingTargets"), // 삭제 대상 확인 |
| | | text : $filter("translate")("common.selectDestinationDeletion"), // 삭제 대상을 선택하세요. |
| | | type : "warning" |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | // 삭제 알림 |
| | | SweetAlert.swal({ |
| | | title : $filter("translate")("FAQ.delete"), |
| | | text : $filter("translate")("FAQ.wantToDeleteSelect"), |
| | | type : "warning", |
| | | showCancelButton : true, |
| | | confirmButtonColor : "#DD6B55", |
| | | confirmButtonText : $filter("translate")("common.delete"), // 삭제 |
| | | cancelButtonText : $filter("translate")("common.cancel"), // 취소 |
| | | closeOnConfirm : false, |
| | | closeOnCancel : true |
| | | }, |
| | | function (isConfirm) { |
| | | SweetAlert.close(); |
| | | |
| | | if (isConfirm) { |
| | | $rootScope.spinner = true; |
| | | |
| | | Faq.remove($resourceProvider.getContent( |
| | | { removeIds : removeIds }, |
| | | $resourceProvider.getPageContent(0, 0))).then(function (result) { |
| | | |
| | | if (result.data.message.status === "success") { |
| | | $timeout(function () { |
| | | SweetAlert.success($filter("translate")("common.deleteSucceeded"), result.data.message.message); // 삭제 성공 |
| | | }, 100); |
| | | |
| | | $scope.fn.getPageList(0); |
| | | } |
| | | else { |
| | | $timeout(function () { |
| | | SweetAlert.error($filter("translate")("common.deleteFailed"), result.data.message.message); // 삭제 실패 |
| | | }, 100); |
| | | } |
| | | |
| | | $rootScope.spinner = false; |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | // 테이블 설정 |
| | | $scope.fn.makeTableConfigs(); |
| | | // 목록 조회 |
| | |
| | | makeTableConfigs : makeTableConfigs, // 테이블 설정 |
| | | makeSearchConditions : makeSearchConditions, |
| | | add : add, // guide 등록 |
| | | removes : removes |
| | | }; |
| | | |
| | | // 변수 |
| | |
| | | $scope.vm.tableConfigs = []; |
| | | |
| | | $scope.vm.tableConfigs.push($tableProvider.config() |
| | | .setDType("checkbox") |
| | | .setHWidth("width-20-p") |
| | | .setDAlign("text-center")); |
| | | $scope.vm.tableConfigs.push($tableProvider.config() |
| | | .setHName("common.number") |
| | | .setHWidth("width-60-p bold") |
| | | .setDAlign("text-center") |
| | |
| | | .setDAlign("text-center") |
| | | .setDType("renderer") |
| | | .setDRenderer("GUIDE_REGISTER")); |
| | | $scope.vm.tableConfigs.push($tableProvider.config() |
| | | .setHName("guide.activation") |
| | | .setHWidth("width-80-p bold") |
| | | .setDType("renderer") |
| | | .setDAlign("text-center pdr0 pdt0 pdl0 pdb0") |
| | | .setDRenderer("GUIDE_ACTIVE")); |
| | | if ($rootScope.checkMngPermission('USER_PERMISSION_MNG_GUIDE')) { |
| | | $scope.vm.tableConfigs.push($tableProvider.config() |
| | | .setHName("guide.activation") |
| | | .setHWidth("width-80-p bold") |
| | | .setDType("renderer") |
| | | .setDAlign("text-center pdr0 pdt0 pdl0 pdb0") |
| | | .setDRenderer("GUIDE_ACTIVE")); |
| | | } |
| | | } |
| | | |
| | | // 목록 조회 |
| | |
| | | }); |
| | | } |
| | | |
| | | function removes() { |
| | | var removeIds = []; |
| | | var removePermission = true; |
| | | |
| | | angular.forEach($scope.vm.responseData.data, function (data) { |
| | | if (data.checked && $rootScope.checkMngPermission('USER_PERMISSION_MNG_GUIDE')) { |
| | | removeIds.push(data.id); |
| | | } |
| | | |
| | | if (data.checked && !$rootScope.checkMngPermission('USER_PERMISSION_MNG_GUIDE')) { |
| | | removePermission = false; |
| | | } |
| | | }); |
| | | |
| | | if (!removePermission) { |
| | | SweetAlert.swal({ |
| | | html : true, |
| | | title : $filter("translate")("common.deleteFailed"), // 삭제 실패 |
| | | text : $filter("translate")("guide.notHaveDeletePermissionExists"), |
| | | type : "error" |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | if (removeIds.length < 1) { |
| | | SweetAlert.swal({ |
| | | title : $filter("translate")("common.checkPurgingTargets"), // 삭제 대상 확인 |
| | | text : $filter("translate")("common.selectDestinationDeletion"), // 삭제 대상을 선택하세요. |
| | | type : "warning" |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | // 삭제 알림 |
| | | SweetAlert.swal({ |
| | | title : $filter("translate")("guide.delete"), |
| | | text : $filter("translate")("guide.wantToDeleteSelect"), |
| | | type : "warning", |
| | | showCancelButton : true, |
| | | confirmButtonColor : "#DD6B55", |
| | | confirmButtonText : $filter("translate")("common.delete"), // 삭제 |
| | | cancelButtonText : $filter("translate")("common.cancel"), // 취소 |
| | | closeOnConfirm : false, |
| | | closeOnCancel : true |
| | | }, |
| | | function (isConfirm) { |
| | | SweetAlert.close(); |
| | | |
| | | if (isConfirm) { |
| | | $rootScope.spinner = true; |
| | | |
| | | Guide.remove($resourceProvider.getContent( |
| | | { removeIds : removeIds }, |
| | | $resourceProvider.getPageContent(0, 0))).then(function (result) { |
| | | |
| | | if (result.data.message.status === "success") { |
| | | $timeout(function () { |
| | | SweetAlert.success($filter("translate")("common.deleteSucceeded"), result.data.message.message); // 삭제 성공 |
| | | }, 100); |
| | | |
| | | $scope.fn.getPageList(0); |
| | | } |
| | | else { |
| | | $timeout(function () { |
| | | SweetAlert.error($filter("translate")("common.deleteFailed"), result.data.message.message); // 삭제 실패 |
| | | }, 100); |
| | | } |
| | | |
| | | $rootScope.spinner = false; |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | // 테이블 설정 |
| | | $scope.fn.makeTableConfigs(); |
| | | // 목록 조회 |
| | |
| | | makeTableConfigs : makeTableConfigs, // 테이블 설정 |
| | | makeSearchConditions : makeSearchConditions, |
| | | add : add, // 공지사항 등록 |
| | | removes : removes |
| | | }; |
| | | |
| | | // 변수 |
| | |
| | | function makeTableConfigs() { |
| | | $scope.vm.tableConfigs = []; |
| | | |
| | | $scope.vm.tableConfigs.push($tableProvider.config() |
| | | .setDType("checkbox") |
| | | .setHWidth("width-20-p") |
| | | .setDAlign("text-center")); |
| | | $scope.vm.tableConfigs.push($tableProvider.config() |
| | | .setHName("common.number") |
| | | .setHWidth("width-60-p bold") |
| | |
| | | }); |
| | | } |
| | | |
| | | function removes() { |
| | | var removeIds = []; |
| | | var removePermission = true; |
| | | |
| | | angular.forEach($scope.vm.responseData.data, function (data) { |
| | | if (data.checked && $rootScope.checkMngPermission('USER_PERMISSION_MNG_NOTICE') || $rootScope.user.id === data.registerId) { |
| | | removeIds.push(data.id); |
| | | } |
| | | |
| | | if (data.checked && !$rootScope.checkMngPermission('USER_PERMISSION_MNG_NOTICE')) { |
| | | removePermission = false; |
| | | } |
| | | }); |
| | | |
| | | if (!removePermission) { |
| | | SweetAlert.swal({ |
| | | html : true, |
| | | title : $filter("translate")("common.deleteFailed"), // 삭제 실패 |
| | | text : $filter("translate")("notice.notHaveDeletePermissionExists"), |
| | | type : "error" |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | if (removeIds.length < 1) { |
| | | SweetAlert.swal({ |
| | | title : $filter("translate")("common.checkPurgingTargets"), // 삭제 대상 확인 |
| | | text : $filter("translate")("common.selectDestinationDeletion"), // 삭제 대상을 선택하세요. |
| | | type : "warning" |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | // 삭제 알림 |
| | | SweetAlert.swal({ |
| | | title : $filter("translate")("notice.delete"), // "업체 삭제" |
| | | text : $filter("translate")("notice.wantToDeleteSelectNotice"), // "선택한 공지사항을 삭제하겠습니까? 삭제된 공지사항은 복구할 수 없습니다." |
| | | type : "warning", |
| | | showCancelButton : true, |
| | | confirmButtonColor : "#DD6B55", |
| | | confirmButtonText : $filter("translate")("common.delete"), // 삭제 |
| | | cancelButtonText : $filter("translate")("common.cancel"), // 취소 |
| | | closeOnConfirm : false, |
| | | closeOnCancel : true |
| | | }, |
| | | function (isConfirm) { |
| | | SweetAlert.close(); |
| | | |
| | | if (isConfirm) { |
| | | $rootScope.spinner = true; |
| | | |
| | | Notice.remove($resourceProvider.getContent( |
| | | { removeIds : removeIds }, |
| | | $resourceProvider.getPageContent(0, 0))).then(function (result) { |
| | | |
| | | if (result.data.message.status === "success") { |
| | | $timeout(function () { |
| | | SweetAlert.success($filter("translate")("common.deleteSucceeded"), result.data.message.message); // 삭제 성공 |
| | | }, 100); |
| | | |
| | | $scope.fn.getPageList(0); |
| | | } |
| | | else { |
| | | $timeout(function () { |
| | | SweetAlert.error($filter("translate")("common.deleteFailed"), result.data.message.message); // 삭제 실패 |
| | | }, 100); |
| | | } |
| | | |
| | | $rootScope.spinner = false; |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | // 테이블 설정 |
| | | $scope.fn.makeTableConfigs(); |
| | | // 목록 조회 |
| | |
| | | makeTableConfigs : makeTableConfigs, // 테이블 설정 |
| | | makeSearchConditions : makeSearchConditions, |
| | | add : add, // qna 등록 |
| | | removes : removes |
| | | }; |
| | | |
| | | // 변수 |
| | |
| | | function makeTableConfigs() { |
| | | $scope.vm.tableConfigs = []; |
| | | |
| | | $scope.vm.tableConfigs.push($tableProvider.config() |
| | | .setDType("checkbox") |
| | | .setHWidth("width-20-p") |
| | | .setDAlign("text-center")); |
| | | $scope.vm.tableConfigs.push($tableProvider.config() |
| | | .setHName("common.number") |
| | | .setHWidth("width-60-p bold") |
| | |
| | | }); |
| | | } |
| | | |
| | | function removes() { |
| | | var removeIds = []; |
| | | var removePermission = true; |
| | | |
| | | angular.forEach($scope.vm.responseData.data, function (data) { |
| | | if (data.checked && ($rootScope.checkMngPermission('USER_PERMISSION_MNG_QNA') || $rootScope.user.id === data.registerId)) { |
| | | removeIds.push(data.id); |
| | | } |
| | | |
| | | if (data.checked && $rootScope.user.id !== data.registerId && !$rootScope.checkMngPermission('USER_PERMISSION_MNG_QNA')) { |
| | | removePermission = false; |
| | | } |
| | | }); |
| | | |
| | | if (!removePermission) { |
| | | SweetAlert.swal({ |
| | | html : true, |
| | | title : $filter("translate")("common.deleteFailed"), // 삭제 실패 |
| | | text : $filter("translate")("QNA.notHaveDeletePermissionExists"), |
| | | type : "error" |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | if (removeIds.length < 1) { |
| | | SweetAlert.swal({ |
| | | title : $filter("translate")("common.checkPurgingTargets"), // 삭제 대상 확인 |
| | | text : $filter("translate")("common.selectDestinationDeletion"), // 삭제 대상을 선택하세요. |
| | | type : "warning" |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | // 삭제 알림 |
| | | SweetAlert.swal({ |
| | | title : $filter("translate")("QNA.delete"), |
| | | text : $filter("translate")("QNA.wantToDeleteSelect"), |
| | | type : "warning", |
| | | showCancelButton : true, |
| | | confirmButtonColor : "#DD6B55", |
| | | confirmButtonText : $filter("translate")("common.delete"), // 삭제 |
| | | cancelButtonText : $filter("translate")("common.cancel"), // 취소 |
| | | closeOnConfirm : false, |
| | | closeOnCancel : true |
| | | }, |
| | | function (isConfirm) { |
| | | SweetAlert.close(); |
| | | |
| | | if (isConfirm) { |
| | | $rootScope.spinner = true; |
| | | |
| | | Qna.remove($resourceProvider.getContent( |
| | | { removeIds : removeIds }, |
| | | $resourceProvider.getPageContent(0, 0))).then(function (result) { |
| | | |
| | | if (result.data.message.status === "success") { |
| | | $timeout(function () { |
| | | SweetAlert.success($filter("translate")("common.deleteSucceeded"), result.data.message.message); // 삭제 성공 |
| | | }, 100); |
| | | |
| | | $scope.fn.getPageList(0); |
| | | } |
| | | else { |
| | | $timeout(function () { |
| | | SweetAlert.error($filter("translate")("common.deleteFailed"), result.data.message.message); // 삭제 실패 |
| | | }, 100); |
| | | } |
| | | |
| | | $rootScope.spinner = false; |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | // 테이블 설정 |
| | | $scope.fn.makeTableConfigs(); |
| | | // 목록 조회 |
| | |
| | | --> |
| | | <div class="messages-notifications os-dropdown-trigger os-dropdown-position-left" ui-sref="notices.list" |
| | | style="padding-top:5px;"> |
| | | <span class="new-messages-push"></span> |
| | | <!-- <span class="new-messages-push"></span>--> |
| | | <i class="dripicons-broadcast"></i> |
| | | </div> |
| | | |
| | |
| | | </div> |
| | | <span translate="notice.notice">공지사항</span></a> |
| | | </li> |
| | | <li class="" ng-if="$root.checkMngPermission('USER_PERMISSION_MNG_FAQ')"> |
| | | <li class=""> |
| | | <a ui-sref="faqs.list" tabindex="-1"> |
| | | <div class="icon-w"> |
| | | <div class="os-icon os-icon-ui-92"></div> |
| | | </div> |
| | | <span translate="FAQ.manageFAQ">FAQ 관리</span></a> |
| | | </li> |
| | | <li class="" ng-if="$root.checkMngPermission('USER_PERMISSION_MNG_QNA')"> |
| | | <li class=""> |
| | | <a ui-sref="qna.list" tabindex="-1"> |
| | | <div class="icon-w"> |
| | | <div class="os-icon os-icon-phone-21"></div> |
| | | </div> |
| | | <span translate="QNA.manageQNA">QnA 관리</span></a> |
| | | </li> |
| | | <li class="" ng-if="$root.checkMngPermission('USER_PERMISSION_MNG_GUIDE')"> |
| | | <li class=""> |
| | | <a ui-sref="guide.list" tabindex="-1"> |
| | | <div class="icon-w"> |
| | | <div class="os-icon os-icon-phone-21"></div> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-6 text-right"> |
| | | |
| | | <form class="form-inline justify-content-sm-end pull-right ng-pristine ng-valid" method="post" action="/faq/downloadExcel" name="faqListForm"> |
| | | <input type="hidden" name="conditions" autocomplete="off"> |
| | | <div class="btn-group"> |
| | | <button aria-expanded="false" aria-haspopup="true" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" type="button"><span translate="common.addFunction" class="ng-scope">추가기능</span> |
| | | </button> |
| | | <div aria-labelledby="dropdownMenuButton2" class="dropdown-menu left-menu" x-placement="bottom-start"> |
| | | <a class="dropdown-item cursor ng-isolate-scope" form-submit="faqListForm" make-search-conditions="fn.makeSearchConditions()"><span translate="common.allDownloadExcel" class="ng-scope">엑셀 다운로드</span></a> |
| | | <a class="dropdown-item cursor" ng-click="fn.removes()"> <span translate="common.selectDelete" class="ng-scope">삭제</span></a> |
| | | |
| | | </div> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-6 text-right"> |
| | | |
| | | <form class="form-inline justify-content-sm-end pull-right ng-pristine ng-valid" method="post" action="/guide/downloadExcel" name="guideListForm"> |
| | | <input type="hidden" name="conditions" autocomplete="off"> |
| | | <div class="btn-group"> |
| | | <button aria-expanded="false" aria-haspopup="true" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" type="button"><span translate="common.addFunction" class="ng-scope">추가기능</span> |
| | | </button> |
| | | <div aria-labelledby="dropdownMenuButton2" class="dropdown-menu left-menu" x-placement="bottom-start"> |
| | | <a class="dropdown-item cursor ng-isolate-scope" form-submit="guideListForm" make-search-conditions="fn.makeSearchConditions()"><span translate="common.allDownloadExcel" class="ng-scope">엑셀 다운로드</span></a> |
| | | <a class="dropdown-item cursor" ng-click="fn.removes()"> <span translate="common.selectDelete" class="ng-scope">삭제</span></a> |
| | | |
| | | </div> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-6 text-right"> |
| | | |
| | | <form class="form-inline justify-content-sm-end pull-right ng-pristine ng-valid" method="post" action="/qna/downloadExcel" name="qnaListForm"> |
| | | <input type="hidden" name="conditions" autocomplete="off"> |
| | | <div class="btn-group"> |
| | | <button aria-expanded="false" aria-haspopup="true" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" type="button"><span translate="common.addFunction" class="ng-scope">추가기능</span> |
| | | </button> |
| | | <div aria-labelledby="dropdownMenuButton2" class="dropdown-menu left-menu" x-placement="bottom-start"> |
| | | <a class="dropdown-item cursor ng-isolate-scope" form-submit="qnaListForm" make-search-conditions="fn.makeSearchConditions()"><span translate="common.allDownloadExcel" class="ng-scope">엑셀 다운로드</span></a> |
| | | <a class="dropdown-item cursor" ng-click="fn.removes()"> <span translate="common.selectDelete" class="ng-scope">삭제</span></a> |
| | | |
| | | </div> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | date-time-picker |
| | | option="Y" |
| | | ng-disabled="vm.form.realtimeNotify" |
| | | ng-required="!vm.form.realtimeNotify" |
| | | placeholder="이메일 알림 시간을 설정해주세요." |
| | | ng-model="vm.form.reservationNotifyTime"> |
| | | </div> |