복사에러 수정
This commit is contained in:
parent
79b3c19c68
commit
1cadafea0e
|
|
@ -2449,10 +2449,19 @@ export class MenuCopyService {
|
|||
// menuIdMap에 없으면 원본 menu_objid가 복사된 메뉴 범위 밖이므로
|
||||
// scope_type을 'table'로 변경하거나, 매핑이 없으면 null 처리
|
||||
const finalMenuObjid = newMenuObjid !== undefined ? newMenuObjid : null;
|
||||
const finalScopeType =
|
||||
r.scope_type === "menu" && finalMenuObjid === null
|
||||
? "table" // 메뉴 매핑이 없으면 table 스코프로 변경
|
||||
: r.scope_type;
|
||||
// scope_type 결정 로직:
|
||||
// 1. menu 스코프인데 menu_objid 매핑이 없는 경우
|
||||
// - table_name이 있으면 'table' 스코프로 변경
|
||||
// - table_name이 없으면 'global' 스코프로 변경
|
||||
// 2. 그 외에는 원본 scope_type 유지
|
||||
let finalScopeType = r.scope_type;
|
||||
if (r.scope_type === "menu" && finalMenuObjid === null) {
|
||||
if (r.table_name) {
|
||||
finalScopeType = "table"; // table_name이 있으면 table 스코프
|
||||
} else {
|
||||
finalScopeType = "global"; // table_name도 없으면 global 스코프
|
||||
}
|
||||
}
|
||||
|
||||
return [
|
||||
r.newRuleId,
|
||||
|
|
|
|||
Loading…
Reference in New Issue