그룹핑 시 논리연산자 표시 방식 수정
This commit is contained in:
parent
41f40ac216
commit
353d8d2bb0
|
|
@ -641,6 +641,7 @@ export const ConnectionSetupModal: React.FC<ConnectionSetupModalProps> = ({
|
|||
if (condition.type === "group-start") {
|
||||
return (
|
||||
<div key={condition.id} className="flex items-center gap-2">
|
||||
{/* 그룹 시작 앞의 논리 연산자 */}
|
||||
{condIndex > 0 && (
|
||||
<Select
|
||||
value={dataSaveSettings.actions[actionIndex].conditions![condIndex - 1]?.logicalOperator || "AND"}
|
||||
|
|
@ -716,7 +717,8 @@ export const ConnectionSetupModal: React.FC<ConnectionSetupModalProps> = ({
|
|||
// 일반 조건 렌더링 (기존 로직 간소화)
|
||||
return (
|
||||
<div key={condition.id} className="flex items-center gap-2">
|
||||
{condIndex > 0 && (
|
||||
{/* 그룹 내 첫 번째 조건이 아닐 때만 논리 연산자 표시 */}
|
||||
{condIndex > 0 && dataSaveSettings.actions[actionIndex].conditions![condIndex - 1]?.type !== "group-start" && (
|
||||
<Select
|
||||
value={dataSaveSettings.actions[actionIndex].conditions![condIndex - 1]?.logicalOperator || "AND"}
|
||||
onValueChange={(value: "AND" | "OR") => {
|
||||
|
|
@ -938,7 +940,7 @@ export const ConnectionSetupModal: React.FC<ConnectionSetupModalProps> = ({
|
|||
if (condition.type === "group-start") {
|
||||
return (
|
||||
<div key={condition.id} className="flex items-center gap-2">
|
||||
{/* 이전 조건과의 논리 연산자 */}
|
||||
{/* 그룹 시작 앞의 논리 연산자 */}
|
||||
{index > 0 && (
|
||||
<Select
|
||||
value={conditions[index - 1]?.logicalOperator || "AND"}
|
||||
|
|
@ -953,7 +955,6 @@ export const ConnectionSetupModal: React.FC<ConnectionSetupModalProps> = ({
|
|||
</SelectContent>
|
||||
</Select>
|
||||
)}
|
||||
|
||||
{/* 그룹 레벨에 따른 들여쓰기 */}
|
||||
<div
|
||||
className="flex items-center gap-2 rounded border-2 border-dashed border-blue-300 bg-blue-50/50 p-2"
|
||||
|
|
@ -1000,8 +1001,8 @@ export const ConnectionSetupModal: React.FC<ConnectionSetupModalProps> = ({
|
|||
// 일반 조건 렌더링
|
||||
return (
|
||||
<div key={condition.id} className="flex items-center gap-2">
|
||||
{/* 이전 조건과의 논리 연산자 */}
|
||||
{index > 0 && (
|
||||
{/* 그룹 내 첫 번째 조건이 아닐 때만 논리 연산자 표시 */}
|
||||
{index > 0 && conditions[index - 1]?.type !== "group-start" && (
|
||||
<Select
|
||||
value={conditions[index - 1]?.logicalOperator || "AND"}
|
||||
onValueChange={(value: "AND" | "OR") => updateCondition(index - 1, "logicalOperator", value)}
|
||||
|
|
|
|||
Loading…
Reference in New Issue