|
|
|
|
@ -6,6 +6,7 @@ import go.kr.project.common.notification.model.NotificationVO;
|
|
|
|
|
import go.kr.project.common.service.CommonHeaderService;
|
|
|
|
|
import go.kr.project.template.calendarSample.model.CalendarScheduleVO;
|
|
|
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
|
|
|
import io.swagger.v3.oas.annotations.Parameter;
|
|
|
|
|
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
|
|
|
|
import io.swagger.v3.oas.annotations.responses.ApiResponses;
|
|
|
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
|
|
@ -13,12 +14,12 @@ import lombok.RequiredArgsConstructor;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.springframework.http.ResponseEntity;
|
|
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
|
|
import org.springframework.web.bind.annotation.ModelAttribute;
|
|
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
|
|
import javax.servlet.http.HttpSession;
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping("/common/header")
|
|
|
|
|
@ -86,4 +87,33 @@ public class CommonHeaderController {
|
|
|
|
|
return ApiResponseUtil.error("알림 읽음 처리 중 오류가 발생했습니다: " + e.getMessage());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 사이드바 상태를 세션에 저장하는 API
|
|
|
|
|
*
|
|
|
|
|
* @param state 사이드바 상태 (collapsed, expanded, 또는 빈 문자열)
|
|
|
|
|
* @param session HTTP 세션 객체
|
|
|
|
|
* @return 응답 데이터
|
|
|
|
|
*/
|
|
|
|
|
@PostMapping("/sidebar/state.ajax")
|
|
|
|
|
@ResponseBody
|
|
|
|
|
@Operation(summary = "사이드바 상태 저장", description = "사이드바 상태를 세션에 저장합니다.")
|
|
|
|
|
public ResponseEntity<Map<String, Object>> saveSidebarState(
|
|
|
|
|
@Parameter(description = "사이드바 상태 (sidebar-collapse, 또는 빈 문자열)")
|
|
|
|
|
@RequestParam(value = "state", required = false, defaultValue = "") String state,
|
|
|
|
|
HttpSession session) {
|
|
|
|
|
|
|
|
|
|
// 세션에 사이드바 상태 저장
|
|
|
|
|
session.setAttribute("sidebarState", state);
|
|
|
|
|
|
|
|
|
|
log.debug("사이드바 상태 저장: {}", state);
|
|
|
|
|
|
|
|
|
|
// 응답 데이터 구성
|
|
|
|
|
Map<String, Object> response = new HashMap<>();
|
|
|
|
|
response.put("result", true);
|
|
|
|
|
response.put("message", "사이드바 상태가 저장되었습니다.");
|
|
|
|
|
|
|
|
|
|
return ResponseEntity.ok(response);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|