코드 정리 및 변수 이름 변경: InteractiveScreenViewer 컴포넌트에서 변수 이름을 변경하여 가독성을 향상시키고, ButtonPrimaryComponent에서 선택된 데이터 변수를 업데이트했습니다. 또한, ScreenViewPage에서 불필요한 코드 충돌을 해결했습니다.
This commit is contained in:
parent
7ea49cfc9e
commit
3ce7691b0c
|
|
@ -23,11 +23,8 @@ import { TableSearchWidgetHeightProvider, useTableSearchWidgetHeight } from "@/c
|
||||||
import { ScreenContextProvider } from "@/contexts/ScreenContext"; // 컴포넌트 간 통신
|
import { ScreenContextProvider } from "@/contexts/ScreenContext"; // 컴포넌트 간 통신
|
||||||
import { SplitPanelProvider } from "@/lib/registry/components/split-panel-layout/SplitPanelContext"; // 분할 패널 리사이즈
|
import { SplitPanelProvider } from "@/lib/registry/components/split-panel-layout/SplitPanelContext"; // 분할 패널 리사이즈
|
||||||
import { ActiveTabProvider } from "@/contexts/ActiveTabContext"; // 활성 탭 관리
|
import { ActiveTabProvider } from "@/contexts/ActiveTabContext"; // 활성 탭 관리
|
||||||
<<<<<<< HEAD
|
|
||||||
import { evaluateConditional } from "@/lib/utils/conditionalEvaluator"; // 조건부 표시 평가
|
import { evaluateConditional } from "@/lib/utils/conditionalEvaluator"; // 조건부 표시 평가
|
||||||
=======
|
|
||||||
import { ScreenMultiLangProvider } from "@/contexts/ScreenMultiLangContext"; // 화면 다국어
|
import { ScreenMultiLangProvider } from "@/contexts/ScreenMultiLangContext"; // 화면 다국어
|
||||||
>>>>>>> 435eb90763a3f89b76d0d810d8b78c27c0bb6802
|
|
||||||
|
|
||||||
function ScreenViewPage() {
|
function ScreenViewPage() {
|
||||||
const params = useParams();
|
const params = useParams();
|
||||||
|
|
|
||||||
|
|
@ -568,7 +568,7 @@ export const InteractiveScreenViewer: React.FC<InteractiveScreenViewerProps> = (
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const { widgetType, label, placeholder, required, readonly, columnName } = comp;
|
const { widgetType, label: originalLabel, placeholder, required, readonly, columnName } = comp;
|
||||||
const fieldName = columnName || comp.id;
|
const fieldName = columnName || comp.id;
|
||||||
const currentValue = formData[fieldName] || "";
|
const currentValue = formData[fieldName] || "";
|
||||||
|
|
||||||
|
|
@ -580,7 +580,6 @@ export const InteractiveScreenViewer: React.FC<InteractiveScreenViewerProps> = (
|
||||||
const compLangKey = (comp as any).langKey;
|
const compLangKey = (comp as any).langKey;
|
||||||
const label = compLangKey && translations[compLangKey] ? translations[compLangKey] : originalLabel;
|
const label = compLangKey && translations[compLangKey] ? translations[compLangKey] : originalLabel;
|
||||||
|
|
||||||
=======
|
|
||||||
const applyStyles = (element: React.ReactElement) => {
|
const applyStyles = (element: React.ReactElement) => {
|
||||||
if (!comp.style) return element;
|
if (!comp.style) return element;
|
||||||
|
|
||||||
|
|
@ -1923,19 +1922,11 @@ export const InteractiveScreenViewer: React.FC<InteractiveScreenViewerProps> = (
|
||||||
return applyStyles(
|
return applyStyles(
|
||||||
<button
|
<button
|
||||||
onClick={handleButtonClick}
|
onClick={handleButtonClick}
|
||||||
<<<<<<< HEAD
|
|
||||||
disabled={isReadonly}
|
disabled={isReadonly}
|
||||||
className={`focus:ring-ring w-full rounded-md px-3 py-2 text-sm font-medium transition-colors focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none disabled:opacity-50 ${
|
className={`w-full rounded-md px-3 py-2 text-sm font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 ${
|
||||||
hasCustomColors
|
hasCustomColors
|
||||||
? ""
|
? ""
|
||||||
: "bg-background border-foreground text-foreground hover:bg-muted/50 border shadow-xs"
|
: "bg-background border border-foreground text-foreground shadow-xs hover:bg-muted/50"
|
||||||
=======
|
|
||||||
disabled={readonly}
|
|
||||||
className={`w-full rounded-md px-3 py-2 text-sm font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 ${
|
|
||||||
hasCustomColors
|
|
||||||
? ''
|
|
||||||
: 'bg-background border border-foreground text-foreground shadow-xs hover:bg-muted/50'
|
|
||||||
>>>>>>> ac0f4618321df78939e833f90768ae5404646fec
|
|
||||||
}`}
|
}`}
|
||||||
style={{
|
style={{
|
||||||
height: "100%",
|
height: "100%",
|
||||||
|
|
|
||||||
|
|
@ -397,7 +397,7 @@ export const ButtonPrimaryComponent: React.FC<ButtonPrimaryComponentProps> = ({
|
||||||
selectionCount,
|
selectionCount,
|
||||||
selectionSource,
|
selectionSource,
|
||||||
hasSplitPanelContext: !!splitPanelContext,
|
hasSplitPanelContext: !!splitPanelContext,
|
||||||
trackedSelectedLeftData: trackedSelectedLeftData,
|
selectedLeftData: splitPanelContext?.selectedLeftData,
|
||||||
selectedRowsData: selectedRowsData?.length,
|
selectedRowsData: selectedRowsData?.length,
|
||||||
selectedRows: selectedRows?.length,
|
selectedRows: selectedRows?.length,
|
||||||
flowSelectedData: flowSelectedData?.length,
|
flowSelectedData: flowSelectedData?.length,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue