Merge branch 'iipbs/common/main' into iipbs/fo/dev
This commit is contained in:
@@ -19,6 +19,7 @@ type MonthPickerProps = {
|
||||
readOnly?: boolean;
|
||||
startYear?: number; // 시작 연도 props 추가
|
||||
yearReadOnly?: boolean;
|
||||
enableMonth?: string[];
|
||||
};
|
||||
|
||||
// yyyyMM → Date 객체
|
||||
@@ -41,6 +42,7 @@ export const DateMonthPicker = ({
|
||||
readOnly = false,
|
||||
startYear,
|
||||
yearReadOnly = false,
|
||||
enableMonth,
|
||||
}: MonthPickerProps) => {
|
||||
const [open, setOpen] = useState(false);
|
||||
|
||||
@@ -81,6 +83,7 @@ export const DateMonthPicker = ({
|
||||
onMonthChange={handleSelect}
|
||||
startYear={startYear}
|
||||
yearReadOnly={yearReadOnly}
|
||||
enableMonth={enableMonth}
|
||||
/>
|
||||
</PopoverContent>
|
||||
</Popover>
|
||||
|
||||
@@ -30,9 +30,10 @@ export type MonthPickerProps = {
|
||||
) => void;
|
||||
startYear?: number;
|
||||
yearReadOnly?: boolean;
|
||||
enableMonth?: string[];
|
||||
};
|
||||
|
||||
export function MonthPicker({ currentMonth, onMonthChange, startYear, yearReadOnly }: MonthPickerProps) {
|
||||
export function MonthPicker({ currentMonth, onMonthChange, startYear, yearReadOnly, enableMonth }: MonthPickerProps) {
|
||||
|
||||
const today = startOfToday();
|
||||
const currentYear = today.getFullYear();
|
||||
@@ -61,9 +62,9 @@ const selectedYear = parseInt(yearFromProp);
|
||||
"inline-flex h-9 w-16 items-center justify-center rounded-md p-0 text-sm font-normal ring-offset-white transition-colors hover:bg-slate-100 hover:text-slate-900 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-400 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 aria-selected:opacity-100 dark:ring-offset-slate-950 dark:hover:bg-slate-800 dark:hover:text-slate-50 dark:focus-visible:ring-slate-800",
|
||||
isEqual(month, currentMonth) &&
|
||||
"bg-slate-900 text-slate-50 hover:bg-slate-900 hover:text-slate-50 focus:bg-slate-900 focus:text-slate-50 dark:bg-slate-50 dark:text-slate-900 dark:hover:bg-slate-50 dark:hover:text-slate-900 dark:focus:bg-slate-50 dark:focus:text-slate-900",
|
||||
!isEqual(month, currentMonth) &&
|
||||
isEqual(month, getStartOfCurrentMonth()) &&
|
||||
"bg-slate-100 text-slate-900 dark:bg-slate-800 dark:text-slate-50"
|
||||
// !isEqual(month, currentMonth) &&
|
||||
// isEqual(month, getStartOfCurrentMonth()) &&
|
||||
// "bg-slate-100 text-slate-900 dark:bg-slate-800 dark:text-slate-50"
|
||||
);
|
||||
|
||||
return (
|
||||
@@ -113,7 +114,7 @@ const selectedYear = parseInt(yearFromProp);
|
||||
<button
|
||||
name="month"
|
||||
className={getMonthButtonClass(month)}
|
||||
disabled={isFuture(month)}
|
||||
disabled={isFuture(month) || (enableMonth && !enableMonth?.includes(format(month, 'MMM', { locale: ko })))}
|
||||
role="gridcell"
|
||||
tabIndex={-1}
|
||||
type="button"
|
||||
|
||||
@@ -142,7 +142,24 @@ GisOlLayer.prototype = {
|
||||
let returnLayer = this.makeLayer(option);
|
||||
|
||||
//레이어 소스 생성
|
||||
<<<<<<< HEAD
|
||||
let source = this.getVectorSourceBbox(option);
|
||||
=======
|
||||
let source;
|
||||
|
||||
let lyrTyNm = option.lyrTyNm;
|
||||
if(lyrTyNm == 'tb_ms_flood_dngr_map'
|
||||
|| lyrTyNm == 'tb_ms_sbmrg_dngr_map'
|
||||
|| lyrTyNm == 'tb_ms_swage_mhl'
|
||||
|| lyrTyNm == 'tb_ms_swage_ppl'
|
||||
|| lyrTyNm == 'tb_ms_swage_pmstn'
|
||||
) {
|
||||
source = this.getVectorSourceBbox(option);
|
||||
}else {
|
||||
source = this.getVectorTileSource(option);
|
||||
}
|
||||
|
||||
>>>>>>> iipbs/common/main
|
||||
returnLayer.setSource(source);
|
||||
//스타일 추가
|
||||
returnLayer.setStyle(this.gisStyle.getLayerStyleFunction(returnLayer, option));
|
||||
|
||||
@@ -28,6 +28,7 @@ const SelectBox = React.forwardRef<
|
||||
value?: string | number;
|
||||
readOnly?: boolean; // readOnly 속성 추가
|
||||
selectContentClass?: string;
|
||||
labelClass?: string;
|
||||
}
|
||||
>(
|
||||
(
|
||||
@@ -40,6 +41,7 @@ const SelectBox = React.forwardRef<
|
||||
value,
|
||||
readOnly = false,
|
||||
selectContentClass,
|
||||
labelClass = "w-20 whitespace-nowrap text-xl text-gray-600",
|
||||
},
|
||||
ref,
|
||||
) => {
|
||||
@@ -66,7 +68,7 @@ const SelectBox = React.forwardRef<
|
||||
return (
|
||||
<div className={className + " flex items-center"} ref={ref}>
|
||||
{label && (
|
||||
<Label className="w-20 whitespace-nowrap text-xl text-gray-600">
|
||||
<Label className={labelClass}>
|
||||
{label}
|
||||
</Label>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user