[as] chore: 하수도기본계획 게이트 코드 수정
This commit is contained in:
@@ -26,8 +26,8 @@ async function findPage(
|
||||
return response.data;
|
||||
}
|
||||
|
||||
async function findById(sewerBscPlanDocNo: string): Promise<SewerBscPlanResponseDto> {
|
||||
const response = await client.get<SewerBscPlanResponseDto>(`${BASE}/${sewerBscPlanDocNo}`);
|
||||
async function findById(sewerBscPlanDocNo: string): Promise<SewerBscPlanDetResponseDto> {
|
||||
const response = await client.get<SewerBscPlanDetResponseDto>(`${BASE}/${sewerBscPlanDocNo}`);
|
||||
return response.data;
|
||||
}
|
||||
|
||||
|
||||
@@ -207,7 +207,7 @@ export interface SewerBscPlanDetResponseDto {
|
||||
/** Controller public 메서드명·시그니처와 동일 */
|
||||
export interface SewerBscPlanService {
|
||||
findPage(params: SewerBscPlanSearchRequestDto): Promise<PageResponse<SewerBscPlanResponseDto>>;
|
||||
findById(sewerBscPlanDocNo: string): Promise<SewerBscPlanResponseDto>;
|
||||
findById(sewerBscPlanDocNo: string): Promise<SewerBscPlanDetResponseDto>;
|
||||
save(body: SewerBscPlanSaveRequestDto): Promise<SewerBscPlanResponseDto>;
|
||||
update(
|
||||
sewerBscPlanDocNo: string,
|
||||
|
||||
@@ -61,9 +61,11 @@ function NtiHstryList({ searchParams, pagination, onPaginationChange }: NtiHstry
|
||||
|
||||
const handleAction = useCallback(
|
||||
async (row: NotiAsUserResponseDto) => {
|
||||
await readNoti(row.notiId);
|
||||
if (row.notReadYn === "N") await readNoti(row.notiId);
|
||||
|
||||
const notiUrl = resolveNotiUrl(row);
|
||||
if (!notiUrl) return;
|
||||
|
||||
router.push(notiUrl);
|
||||
},
|
||||
[readNoti, router],
|
||||
|
||||
@@ -13,14 +13,14 @@ interface SewerBscPlanDetailGateProps {
|
||||
|
||||
function SewerBscPlanDetailGate({ id, propChgCycl }: SewerBscPlanDetailGateProps) {
|
||||
const userInfo = useUserStore((state) => state.userInfo);
|
||||
const chgCycl = propChgCycl ?? 1;
|
||||
const { data, isLoading, isError } = useSewerBscPlan(id);
|
||||
const shouldRedirectToEdit = canEditPbadmsDoc({
|
||||
docSeComCd: "SEWER",
|
||||
prgrsSttsComCd: data?.prgrsSttsComCd,
|
||||
rgtr: data?.rgtr,
|
||||
prgrsSttsComCd: data?.detDto?.prgrsSttsComCd,
|
||||
rgtr: data?.detDto?.rgtr,
|
||||
loggedInUserUnqId: userInfo?.userUnqId,
|
||||
});
|
||||
const chgCycl = propChgCycl ?? data?.activeDtlDto?.chgCycl;
|
||||
|
||||
return (
|
||||
<PbadmsDetailGate
|
||||
@@ -29,7 +29,7 @@ function SewerBscPlanDetailGate({ id, propChgCycl }: SewerBscPlanDetailGateProps
|
||||
shouldRedirectToEdit={Boolean(userInfo) && shouldRedirectToEdit}
|
||||
editHref={`/sewer-bsc-plan/${id}/edit?chgCycl=${chgCycl}`}
|
||||
>
|
||||
<SewerBscPlanViewPage id={id} propChgCycl={propChgCycl} />
|
||||
<SewerBscPlanViewPage id={id} propChgCycl={chgCycl} />
|
||||
</PbadmsDetailGate>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user