diff --git a/src/app/api/survey-sales/route.ts b/src/app/api/survey-sales/route.ts index 96cfce4..551ad0b 100644 --- a/src/app/api/survey-sales/route.ts +++ b/src/app/api/survey-sales/route.ts @@ -78,29 +78,6 @@ const createKeywordSearchCondition = (keyword: string, searchOption: string): Wh return where } -// 임시저장 데이터 필터링 - T01 만 적용 -const filterTempData = () => { - const requiredFields = [ - 'INSTALLATION_SYSTEM', - 'CONSTRUCTION_YEAR', - 'RAFTER_SIZE', - 'RAFTER_PITCH', - 'WATERPROOF_MATERIAL', - 'INSULATION_PRESENCE', - 'STRUCTURE_ORDER', - ] - - return { - DETAIL_INFO: { - is: { - AND: requiredFields.map((field: string) => ({ - OR: [{ [field]: { not: null } }, { [`${field}_ETC`]: { not: null } }], - })), - }, - }, - } -} - /** * 회원 역할별 검색 조건 생성 함수 * @param params 검색 파라미터 @@ -155,14 +132,20 @@ const createMemberRoleCondition = (params: SearchParams): WhereCondition => { break case 'T01': - // where.AND.push(filterTempData()) - where.AND?.push({ - NOT: { - SRL_NO: { - startsWith: '一時保存', + where.OR = [ + { + NOT: { + SRL_NO: { + startsWith: '一時保存', + }, }, }, - }) + { + STORE: { + equals: params.store, + }, + }, + ] break case 'User': // 모든 매물 조회 가능 (추가 조건 없음) diff --git a/src/components/survey-sale/detail/ButtonForm.tsx b/src/components/survey-sale/detail/ButtonForm.tsx index c179fb7..8f8e3dd 100644 --- a/src/components/survey-sale/detail/ButtonForm.tsx +++ b/src/components/survey-sale/detail/ButtonForm.tsx @@ -219,7 +219,7 @@ export default function ButtonForm(props: { - + {session?.role !== 'T01' && }{' '} )} diff --git a/src/components/survey-sale/detail/RoofForm.tsx b/src/components/survey-sale/detail/RoofForm.tsx index 26228dd..3018296 100644 --- a/src/components/survey-sale/detail/RoofForm.tsx +++ b/src/components/survey-sale/detail/RoofForm.tsx @@ -636,7 +636,7 @@ const RadioSelected = ({ )} - {showEtcOption && ( + {(showEtcOption || column === 'insulationPresence') && (