Merge branch 'iipbs/st/dev' of https://www.onasys.co.kr:3000/ONAANDALL/frontend into iipbs/st/dev
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { client } from "@/shared/api";
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
|
||||
import type { CodeService, ICode } from "../model/code-interface";
|
||||
|
||||
export class CodeApiService implements CodeService {
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
import { client } from "@/shared/api";
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
|
||||
import {
|
||||
LwpoCodeFormSchema,
|
||||
type LwpoCodeService,
|
||||
type LwpoCodeList,
|
||||
type LwpoCodeDetail,
|
||||
type LwpoCodeParams,
|
||||
type LwpoCodeFormData,
|
||||
LwpoCodeFormSchema,
|
||||
type LwpoCodeList,
|
||||
type LwpoCodeParams,
|
||||
type LwpoCodeService,
|
||||
} from "../model/lwpocode-interface";
|
||||
|
||||
export class LwpoCodeApiService implements LwpoCodeService {
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
import { client } from "@/shared/api";
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
|
||||
import {
|
||||
upCodeFormSchema,
|
||||
type UpCodeService,
|
||||
type UpCodeList,
|
||||
type UpCodeDetail,
|
||||
type UpCodeParams,
|
||||
type UpCodeFormData,
|
||||
upCodeFormSchema,
|
||||
type UpCodeList,
|
||||
type UpCodeParams,
|
||||
type UpCodeService,
|
||||
} from "../model/upcode-interface";
|
||||
|
||||
export class UpCodeApiService implements UpCodeService {
|
||||
|
||||
@@ -1,20 +1,18 @@
|
||||
export { CodeApi } from "./api/code-service";
|
||||
export type { ICode } from "./model/code-interface";
|
||||
export { CodeSelect } from "./ui/code-select";
|
||||
export { CodeSelectWithAll } from "./ui/code-select-with-all";
|
||||
|
||||
export { UpCodeApi } from "./api/upcode-service";
|
||||
export {
|
||||
upCodeFormSchema,
|
||||
type UpCode,
|
||||
type UpCodeFormData,
|
||||
type UpCodeParams,
|
||||
} from "./model/upcode-interface";
|
||||
|
||||
export { LwpoCodeApi } from "./api/lwpocode-service";
|
||||
export { UpCodeApi } from "./api/upcode-service";
|
||||
export type { ICode } from "./model/code-interface";
|
||||
export {
|
||||
LwpoCodeFormSchema,
|
||||
type LwpoCode,
|
||||
type LwpoCodeFormData,
|
||||
LwpoCodeFormSchema,
|
||||
type LwpoCodeParams,
|
||||
} from "./model/lwpocode-interface";
|
||||
export {
|
||||
type UpCode,
|
||||
type UpCodeFormData,
|
||||
upCodeFormSchema,
|
||||
type UpCodeParams,
|
||||
} from "./model/upcode-interface";
|
||||
export { CodeSelect } from "./ui/code-select";
|
||||
export { CodeSelectWithAll } from "./ui/code-select-with-all";
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { z } from "zod";
|
||||
import type { PageableParams, PageableList } from "@/shared/model";
|
||||
|
||||
import type { PageableList,PageableParams } from "@/shared/model";
|
||||
|
||||
export interface LwpoCodeParams extends PageableParams {
|
||||
upCd?: string;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { z } from "zod";
|
||||
import type { PageableParams, PageableList } from "@/shared/model";
|
||||
|
||||
import type { PageableList,PageableParams } from "@/shared/model";
|
||||
|
||||
export interface UpCodeParams extends PageableParams {
|
||||
keyword?: string;
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import {
|
||||
cn,
|
||||
Select,
|
||||
@@ -7,7 +9,7 @@ import {
|
||||
SelectTrigger,
|
||||
SelectValue,
|
||||
} from "@common/components";
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
|
||||
import { CodeApi } from "../api/code-service";
|
||||
|
||||
type CodeSelectProps = {
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import {
|
||||
cn,
|
||||
Select,
|
||||
@@ -7,7 +9,7 @@ import {
|
||||
SelectTrigger,
|
||||
SelectValue,
|
||||
} from "@common/components";
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
|
||||
import { CodeApi } from "../api/code-service";
|
||||
|
||||
type CodeSelectProps = {
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
import { client } from "@/shared/api";
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
|
||||
import type {
|
||||
GroupUserService,
|
||||
GroupUserSearchParams,
|
||||
GroupUserListResponseDto,
|
||||
GroupUserDetailResponse,
|
||||
PageGroupUserList,
|
||||
GroupUserListResponseDto,
|
||||
GroupUserSaveData,
|
||||
GroupUserSearchParams,
|
||||
GroupUserService,
|
||||
GroupUserUpdateData,
|
||||
PageGroupUserList,
|
||||
} from "../model/group-user-interface";
|
||||
|
||||
export class GroupUsersApiService implements GroupUserService {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { client } from "@/shared/api";
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
|
||||
import type {
|
||||
MenuAuthorityList,
|
||||
MenuAuthorityParams,
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
export { MenuAuthorityApi } from "./api/menu-authority-service";
|
||||
export {
|
||||
menuAuthorityFormSchema,
|
||||
type MenuAuthority,
|
||||
type MenuAuthorityPayload,
|
||||
type MenuAuthorityFormData,
|
||||
menuAuthorityFormSchema,
|
||||
type MenuAuthorityPayload,
|
||||
} from "./model/menu-authority-interface";
|
||||
export { AuthorityButton } from "./ui/authority-button";
|
||||
export { ManagementAuthorityDialog } from "./ui/management-authority-dialog";
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { z } from "zod";
|
||||
|
||||
import type { PageableList, PageableParams } from "@/shared/model";
|
||||
|
||||
export interface MenuAuthorityParams extends PageableParams {
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
import type { ColumnDef } from "@tanstack/react-table";
|
||||
import type { UseFormReturn } from "react-hook-form";
|
||||
|
||||
import type { ColumnDef } from "@tanstack/react-table";
|
||||
|
||||
import { Checkbox } from "@common/components";
|
||||
|
||||
import type {
|
||||
MenuAuthority,
|
||||
MenuAuthorityFormData,
|
||||
|
||||
@@ -1,26 +1,27 @@
|
||||
import { useMenuStore } from "@/shared/lib";
|
||||
import { Button, cn, type ButtonProps } from "@common/components";
|
||||
import { Button, type ButtonProps, cn } from "@common/components";
|
||||
|
||||
import type { PageMenuAuthority } from "../model/menu-authority-interface";
|
||||
|
||||
type AuthorityButtonProps = {
|
||||
authority: keyof PageMenuAuthority;
|
||||
authority: keyof PageMenuAuthority;
|
||||
} & ButtonProps;
|
||||
|
||||
function AuthorityButton({
|
||||
authority,
|
||||
className,
|
||||
children,
|
||||
...props
|
||||
authority,
|
||||
className,
|
||||
children,
|
||||
...props
|
||||
}: AuthorityButtonProps) {
|
||||
const pageMenuAuthority = useMenuStore((state) => state.pageMenuAuthority);
|
||||
const pageMenuAuthority = useMenuStore((state) => state.pageMenuAuthority);
|
||||
|
||||
const isAuthority = pageMenuAuthority?.[authority] === "Y";
|
||||
const isAuthority = pageMenuAuthority?.[authority] === "Y";
|
||||
|
||||
return (
|
||||
<Button className={cn(className, !isAuthority && "hidden")} {...props}>
|
||||
{children}
|
||||
</Button>
|
||||
);
|
||||
return (
|
||||
<Button className={cn(className, !isAuthority && "hidden")} {...props}>
|
||||
{children}
|
||||
</Button>
|
||||
);
|
||||
}
|
||||
|
||||
export { AuthorityButton };
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
import { useState } from "react";
|
||||
import { useForm } from "react-hook-form";
|
||||
|
||||
import { useConfirm } from "@frontend-opensource/use-react-hooks";
|
||||
import { zodResolver } from "@hookform/resolvers/zod";
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import { getCoreRowModel } from "@tanstack/react-table";
|
||||
import { useConfirm } from "@frontend-opensource/use-react-hooks";
|
||||
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import { useAlertStore, useDataTable, useMutationWrapper } from "@/shared/lib";
|
||||
import {
|
||||
Button,
|
||||
Dialog,
|
||||
@@ -14,15 +18,14 @@ import {
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
} from "@common/components";
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import { useAlertStore, useDataTable, useMutationWrapper } from "@/shared/lib";
|
||||
|
||||
import { MenuAuthorityApi } from "../api/menu-authority-service";
|
||||
import {
|
||||
menuAuthorityFormSchema,
|
||||
type MenuAuthorityFormData,
|
||||
menuAuthorityFormSchema,
|
||||
type MenuAuthorityPayload,
|
||||
} from "../model/menu-authority-interface";
|
||||
import { createColumns } from "../model/menu-authority-table-columns";
|
||||
import { MenuAuthorityApi } from "../api/menu-authority-service";
|
||||
|
||||
type ManagementAuthorityDialogProps = {
|
||||
menuCd?: number;
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { client } from "@/shared/api";
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
|
||||
import type {
|
||||
MenuService,
|
||||
Menu,
|
||||
MenuItem,
|
||||
MenuFormData,
|
||||
MenuItem,
|
||||
MenuService,
|
||||
MenuTemporarilyStoredData,
|
||||
SiteMapFormData,
|
||||
} from "../model/menu-interface";
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
export { MenuApi } from "./api/menu-service";
|
||||
export { MenuWrapper } from "./lib/menu-wrapper";
|
||||
export {
|
||||
MENU_TYPE,
|
||||
menuFormSchema,
|
||||
siteMapFormSchema,
|
||||
type MenuType,
|
||||
type MenuItem,
|
||||
type MenuFormData,
|
||||
menuFormSchema,
|
||||
type MenuItem,
|
||||
type MenuType,
|
||||
type SiteMapFormData,
|
||||
siteMapFormSchema,
|
||||
type SiteMapPayloadData,
|
||||
} from "./model/menu-interface";
|
||||
export { MenuWrapper } from "./lib/menu-wrapper";
|
||||
|
||||
@@ -2,10 +2,13 @@
|
||||
|
||||
import { useEffect } from "react";
|
||||
import { usePathname, useRouter } from "next/navigation";
|
||||
import { MenuAuthorityApi } from "@/entities/menu-authority/@x/menu";
|
||||
import { getCookie, useAlertStore, useMenuStore } from "@/shared/lib";
|
||||
|
||||
import { SITE_ID } from "@/shared/config";
|
||||
import { getCookie, useAlertStore, useMenuStore } from "@/shared/lib";
|
||||
import { MenuAuthorityApi } from "@/entities/menu-authority/@x/menu";
|
||||
|
||||
import { MenuApi } from "../api/menu-service";
|
||||
|
||||
import { getCurrentMenu } from "./utils";
|
||||
|
||||
const MenuWrapper = ({ children }: { children: React.ReactNode }) => {
|
||||
|
||||
@@ -4,8 +4,8 @@ import { ENDPOINT } from "@/shared/config";
|
||||
import type {
|
||||
AnalysisRequestPayload,
|
||||
AnalysisResponseDto,
|
||||
JobStatusDto,
|
||||
AnalysisResultDto,
|
||||
JobStatusDto,
|
||||
} from "../model/analysis/analysis-interface";
|
||||
|
||||
export class AnalysisApiService {
|
||||
|
||||
@@ -4,6 +4,7 @@ import { ENDPOINT } from "@/shared/config";
|
||||
|
||||
import type { VerifyResultPageData } from "../model/general-verification-interface";
|
||||
import type { SewerStUserSearchParams } from "../model/sewer-st-user-interface";
|
||||
import type { SearchCondition } from "../model/statistics-interface";
|
||||
import type {
|
||||
StatisticsVerificationFilterState,
|
||||
StatisticsVerificationSubFilterState,
|
||||
@@ -14,9 +15,53 @@ import { generalverificationApiService } from "./general-verification-service";
|
||||
import { sewerStUserApi } from "./sewer-st-user-service";
|
||||
import { statisticsAnalysisMasterService } from "./statistics-analysis-master-service";
|
||||
import { stAnlsRsltApi } from "./statistics-analysis-result-api";
|
||||
import { statisticsApi } from "./statistics-service";
|
||||
|
||||
const DETAIL_PAGE_SIZE = 100;
|
||||
|
||||
const EMPTY_SEARCH_CONDITION: SearchCondition = {
|
||||
yearList: [],
|
||||
sidoList: [],
|
||||
};
|
||||
|
||||
export function useSidoList(params?: { instSeCd?: string }) {
|
||||
return useQuery({
|
||||
queryKey: [
|
||||
ENDPOINT.ST_SERVICE.COMMON,
|
||||
"search-condition",
|
||||
params?.instSeCd ?? "",
|
||||
],
|
||||
queryFn: async () => {
|
||||
const response = await statisticsApi.getSidoList(params);
|
||||
if (response.status !== "success")
|
||||
throw new Error(response.message);
|
||||
return response.data ?? EMPTY_SEARCH_CONDITION;
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
export function useSggList(
|
||||
sidoName: string,
|
||||
params?: { instSeCd?: string; gugunSkipYn?: "Y" | "N" },
|
||||
) {
|
||||
return useQuery({
|
||||
queryKey: [
|
||||
ENDPOINT.ST_SERVICE.COMMON,
|
||||
"sgg",
|
||||
sidoName,
|
||||
params?.instSeCd ?? "",
|
||||
params?.gugunSkipYn ?? "",
|
||||
],
|
||||
queryFn: async () => {
|
||||
const response = await statisticsApi.getSggList(sidoName, params);
|
||||
if (response.status !== "success")
|
||||
throw new Error(response.message);
|
||||
return response.data ?? [];
|
||||
},
|
||||
enabled: Boolean(sidoName) && sidoName !== "ALL",
|
||||
});
|
||||
}
|
||||
|
||||
export const useStAnlsSidoCombo = () => {
|
||||
return useQuery({
|
||||
queryKey: [ENDPOINT.STATVERIFY_SERVICE.ST_ANLS_MST, "sido"],
|
||||
|
||||
@@ -2,19 +2,19 @@ import { client } from "@/shared/api";
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
|
||||
import type {
|
||||
TableMetadataResponse,
|
||||
VerificationTargetCodeResponse,
|
||||
VerificationTargetManagementCheckColumnsParams,
|
||||
VerificationTargetManagementCheckColumnsResponse,
|
||||
VerificationTargetManagementService,
|
||||
VerificationTargetManagementSearchParams,
|
||||
VerificationTargetManagementListApiResponse,
|
||||
VerificationTargetManagementDetailApiResponse,
|
||||
VerificationTargetManagementSaveRequest,
|
||||
VerificationTargetManagementSaveApiResponse,
|
||||
VerificationTargetManagementUpdateRequest,
|
||||
VerificationTargetManagementUpdateApiResponse,
|
||||
VerificationTargetManagementDeleteApiResponse,
|
||||
TableMetadataResponse,
|
||||
VerificationTargetManagementDetailApiResponse,
|
||||
VerificationTargetManagementListApiResponse,
|
||||
VerificationTargetManagementSaveApiResponse,
|
||||
VerificationTargetManagementSaveRequest,
|
||||
VerificationTargetManagementSearchParams,
|
||||
VerificationTargetManagementService,
|
||||
VerificationTargetManagementUpdateApiResponse,
|
||||
VerificationTargetManagementUpdateRequest,
|
||||
} from "../model/verification-target-management-interface";
|
||||
|
||||
export class VerificationTargetManagementApiService implements VerificationTargetManagementService {
|
||||
|
||||
@@ -17,6 +17,8 @@ export {
|
||||
} from "./api/notice-talk/queries";
|
||||
export {
|
||||
useSewerStUserList,
|
||||
useSggList,
|
||||
useSidoList,
|
||||
useStAnlsSidoCombo,
|
||||
useStAnlsSigunguCombo,
|
||||
useStatsVrfcRptData,
|
||||
@@ -74,12 +76,6 @@ export {
|
||||
type ImrLogResponse,
|
||||
} from "./model/imr/imr-interface";
|
||||
export { imrVerificationHistoryColumns } from "./model/imr/imr-verification-history-columns";
|
||||
export {
|
||||
type StatsInputStatusApproveBatchRequest,
|
||||
type StatsInputStatusApproveItem,
|
||||
type StatsInputStatusApproveKind,
|
||||
type StatsInputStatusApproveResponse,
|
||||
} from "./model/statistics-interface";
|
||||
export { type StatsInputStatusList } from "./model/input/statistics-input-status-interface";
|
||||
export { userListColumns } from "./model/notice-talk/notice-talk-sending-columns";
|
||||
export {
|
||||
@@ -130,6 +126,12 @@ export {
|
||||
type ApproveRequest,
|
||||
type RejectRequest,
|
||||
} from "./model/statistics-approval-interface";
|
||||
export {
|
||||
type StatsInputStatusApproveBatchRequest,
|
||||
type StatsInputStatusApproveItem,
|
||||
type StatsInputStatusApproveKind,
|
||||
type StatsInputStatusApproveResponse,
|
||||
} from "./model/statistics-interface";
|
||||
export {
|
||||
statisticsVerificationReportColumnInfo,
|
||||
statisticsVerificationResultColumnInfo,
|
||||
|
||||
@@ -1,22 +1,23 @@
|
||||
import { client } from "@/shared/api";
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
|
||||
import type {
|
||||
UserService,
|
||||
UserSearchParams,
|
||||
UserList,
|
||||
AdminUserList,
|
||||
UserDetailResponse,
|
||||
UserEmailData,
|
||||
UserFindPasswordSaveData,
|
||||
UserFindPasswordUpdateData,
|
||||
UserIdData,
|
||||
UserList,
|
||||
UserPasswordMatchData,
|
||||
UserPasswordUpdateData,
|
||||
UserSaveData,
|
||||
UserSearchParams,
|
||||
UserService,
|
||||
UserSttsStatsList,
|
||||
UserUpdateData,
|
||||
UserPasswordUpdateData,
|
||||
UserFindPasswordUpdateData,
|
||||
UserPasswordMatchData,
|
||||
UserUpdateInfoData,
|
||||
UserSaveData,
|
||||
UserFindPasswordSaveData,
|
||||
UserVerifyData,
|
||||
UserEmailData,
|
||||
UserIdData,
|
||||
AdminUserList,
|
||||
} from "../model/user-interface";
|
||||
|
||||
export class UserApiService implements UserService {
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
export { UserApi } from "./api/user-service";
|
||||
export {
|
||||
USER_STATE_CODE,
|
||||
userSaveSchema,
|
||||
userPasswordUpdateSchema,
|
||||
userUpdateSchema,
|
||||
type UserStateCode,
|
||||
type UserSearchParams,
|
||||
type UserListResponse,
|
||||
type UserSaveData,
|
||||
type UserDetailResponse,
|
||||
type UserPasswordUpdateData,
|
||||
type UserUpdateData,
|
||||
type AdminUserList,
|
||||
type AdminUserListResponse,
|
||||
USER_STATE_CODE,
|
||||
type UserDetailResponse,
|
||||
type UserListResponse,
|
||||
type UserPasswordUpdateData,
|
||||
userPasswordUpdateSchema,
|
||||
type UserSaveData,
|
||||
userSaveSchema,
|
||||
type UserSearchParams,
|
||||
type UserStateCode,
|
||||
type UserUpdateData,
|
||||
userUpdateSchema,
|
||||
} from "./model/user-interface";
|
||||
export { PasswordResetDialog } from "./ui/password-reset-dialog";
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { z } from "zod";
|
||||
|
||||
import type { PageableList, PageableParams } from "@/shared/model";
|
||||
|
||||
export const USER_STATE_CODE = {
|
||||
|
||||
@@ -2,23 +2,10 @@
|
||||
|
||||
import { useState } from "react";
|
||||
import { useForm } from "react-hook-form";
|
||||
|
||||
import { zodResolver } from "@hookform/resolvers/zod";
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
DialogFooter,
|
||||
DialogClose,
|
||||
Button,
|
||||
Input,
|
||||
DialogTrigger,
|
||||
} from "@common/components";
|
||||
import {
|
||||
UserApi,
|
||||
userPasswordUpdateSchema,
|
||||
type UserPasswordUpdateData,
|
||||
} from "@/entities/user";
|
||||
|
||||
import { useAlertStore, useMutationWrapper } from "@/shared/lib";
|
||||
import {
|
||||
Form,
|
||||
FormControl,
|
||||
@@ -27,7 +14,22 @@ import {
|
||||
FormLabel,
|
||||
FormMessage,
|
||||
} from "@/shared/ui/form";
|
||||
import { useAlertStore, useMutationWrapper } from "@/shared/lib";
|
||||
import {
|
||||
UserApi,
|
||||
type UserPasswordUpdateData,
|
||||
userPasswordUpdateSchema,
|
||||
} from "@/entities/user";
|
||||
import {
|
||||
Button,
|
||||
Dialog,
|
||||
DialogClose,
|
||||
DialogContent,
|
||||
DialogFooter,
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
Input,
|
||||
} from "@common/components";
|
||||
|
||||
interface PasswordResetDialogProps {
|
||||
userUnqId: string;
|
||||
|
||||
Reference in New Issue
Block a user