feat: 저장 테이블 제외 조건 추가 및 포커싱 개선
- 저장 테이블 쿼리에 table-list와 체크박스가 활성화된 화면, openModalWithData 버튼이 있는 화면을 제외하는 조건 추가 - 화면 그룹 클릭 시 새 그룹 진입 시 포커싱 없이 시작하도록 로직 개선 - 관련 문서에 제외 조건 및 SQL 예시 추가
This commit is contained in:
@@ -1901,6 +1901,9 @@ export const getScreenSubTables = async (req: Request, res: Response) => {
|
||||
// ============================================================
|
||||
// 저장 테이블 정보 추출
|
||||
// ============================================================
|
||||
// 제외 조건:
|
||||
// 1. table-list + 체크박스 활성화 + openModalWithData 버튼이 있는 화면
|
||||
// → 선택 후 다음 화면으로 넘기는 패턴 (실제 DB 저장 아님)
|
||||
const saveTableQuery = `
|
||||
SELECT DISTINCT
|
||||
sd.screen_id,
|
||||
@@ -1915,6 +1918,19 @@ export const getScreenSubTables = async (req: Request, res: Response) => {
|
||||
WHERE sd.screen_id = ANY($1)
|
||||
AND sl.properties->'componentConfig'->'action'->>'type' = 'save'
|
||||
AND sl.properties->'componentConfig'->'action'->>'targetScreenId' IS NULL
|
||||
-- 제외: table-list + 체크박스가 있는 화면
|
||||
AND NOT EXISTS (
|
||||
SELECT 1 FROM screen_layouts sl_list
|
||||
WHERE sl_list.screen_id = sd.screen_id
|
||||
AND sl_list.properties->>'componentType' = 'table-list'
|
||||
AND (sl_list.properties->'componentConfig'->'checkbox'->>'enabled')::boolean = true
|
||||
)
|
||||
-- 제외: openModalWithData 버튼이 있는 화면 (선택 → 다음 화면 패턴)
|
||||
AND NOT EXISTS (
|
||||
SELECT 1 FROM screen_layouts sl_modal
|
||||
WHERE sl_modal.screen_id = sd.screen_id
|
||||
AND sl_modal.properties->'componentConfig'->'action'->>'type' = 'openModalWithData'
|
||||
)
|
||||
ORDER BY sd.screen_id
|
||||
`;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user