오류 수정
This commit is contained in:
@@ -2,40 +2,46 @@
|
||||
|
||||
export const ITEMS_PER_PAGE = 20;
|
||||
|
||||
export const VISIBILITY_CONFIG = {
|
||||
showUnlisted: false,
|
||||
showSold: true,
|
||||
};
|
||||
// export const VISIBILITY_CONFIG = {
|
||||
// showUnlisted: false,
|
||||
// showSold: true,
|
||||
// };
|
||||
|
||||
export const STATUS_META = {
|
||||
미판매: {
|
||||
selectable: false,
|
||||
defaultVisible: false,
|
||||
selectable: false, // 체크박스 선택 불가
|
||||
isDefaultActive: false, // 초기 로드 시 미체크 상태
|
||||
isSystemVisible: false, // 아예 리스트/필터에서 제외 (완전 숨김)
|
||||
soldOut: false,
|
||||
},
|
||||
판매예정: {
|
||||
selectable: true,
|
||||
defaultVisible: true,
|
||||
selectable: false,
|
||||
isDefaultActive: true,
|
||||
isSystemVisible: true,
|
||||
soldOut: false,
|
||||
},
|
||||
판매중: {
|
||||
selectable: true,
|
||||
defaultVisible: true,
|
||||
isDefaultActive: true,
|
||||
isSystemVisible: true,
|
||||
soldOut: false,
|
||||
},
|
||||
판매완료: {
|
||||
selectable: true,
|
||||
defaultVisible: false,
|
||||
soldOut: true,
|
||||
selectable: false,
|
||||
isDefaultActive: false, // 초기에는 안 보이지만, 사용자가 필터 클릭하면 보임
|
||||
isSystemVisible: true,
|
||||
soldOut: true, // 이미지에 SOLD OUT 표시
|
||||
},
|
||||
};
|
||||
|
||||
export const STATUS_FILTERS = [
|
||||
{ key: '판매중', label: '판매중', defaultActive: true, visible: true },
|
||||
{ key: '판매예정', label: '판매 예정', defaultActive: true, visible: true },
|
||||
{ key: '미판매', label: '미판매', defaultActive: false, visible: VISIBILITY_CONFIG.showUnlisted },
|
||||
{ key: '판매완료', label: '판매완료', defaultActive: false, visible: VISIBILITY_CONFIG.showSold },
|
||||
];
|
||||
// STATUS_FILTERS를 수동으로 만들지 않고 META에서 자동으로 생성합니다.
|
||||
export const STATUS_FILTERS = Object.keys(STATUS_META)
|
||||
.filter(key => STATUS_META[key].isSystemVisible) // 시스템 가시성이 true인 것만 필터 칩 생성
|
||||
.map(key => ({
|
||||
key: key,
|
||||
label: key === '판매예정' ? '판매 예정' : key,
|
||||
defaultActive: STATUS_META[key].isDefaultActive
|
||||
}));
|
||||
|
||||
export const STATUS_ORDER = {
|
||||
판매중: 0,
|
||||
|
||||
Reference in New Issue
Block a user