현금영수증 리스트

This commit is contained in:
focp212@naver.com
2025-10-21 16:21:57 +09:00
parent 81d977b97d
commit 841a9d8542
44 changed files with 1208 additions and 717 deletions

View File

@@ -0,0 +1,29 @@
import axios from 'axios';
import { API_URL_USER } from '@/shared/api/api-url-user';
import { resultify } from '@/shared/lib/resultify';
import { CBDCAxiosError } from '@/shared/@types/error';
import {
ShortcutDefaultParams,
ShortcutDefaultResponse
} from '../model/types';
import {
useMutation,
UseMutationOptions
} from '@tanstack/react-query';
export const shortcutDefault = (params: ShortcutDefaultParams) => {
return resultify(
axios.post<ShortcutDefaultResponse>(API_URL_USER.shortcutDefault(), params),
);
};
export const useShortcutDefaultMutation = (options?: UseMutationOptions<ShortcutDefaultResponse, CBDCAxiosError, ShortcutDefaultParams>) => {
const mutation = useMutation<ShortcutDefaultResponse, CBDCAxiosError, ShortcutDefaultParams>({
...options,
mutationFn: (params: ShortcutDefaultParams) => shortcutDefault(params),
});
return {
...mutation,
};
};

View File

@@ -0,0 +1,29 @@
import axios from 'axios';
import { API_URL_USER } from '@/shared/api/api-url-user';
import { resultify } from '@/shared/lib/resultify';
import { CBDCAxiosError } from '@/shared/@types/error';
import {
ShortcutSaveParams,
ShortcutSaveResponse
} from '../model/types';
import {
useMutation,
UseMutationOptions
} from '@tanstack/react-query';
export const shortcutSave = (params: ShortcutSaveParams) => {
return resultify(
axios.post<ShortcutSaveResponse>(API_URL_USER.shortcutSave(), params),
);
};
export const useShortcutSaveMutation = (options?: UseMutationOptions<ShortcutSaveResponse, CBDCAxiosError, ShortcutSaveParams>) => {
const mutation = useMutation<ShortcutSaveResponse, CBDCAxiosError, ShortcutSaveParams>({
...options,
mutationFn: (params: ShortcutSaveParams) => shortcutSave(params),
});
return {
...mutation,
};
};

View File

@@ -0,0 +1,29 @@
import axios from 'axios';
import { API_URL_USER } from '@/shared/api/api-url-user';
import { resultify } from '@/shared/lib/resultify';
import { CBDCAxiosError } from '@/shared/@types/error';
import {
ShortcutUserParams,
ShortcutUserResponse
} from '../model/types';
import {
useMutation,
UseMutationOptions
} from '@tanstack/react-query';
export const shortcutUser = (params: ShortcutUserParams) => {
return resultify(
axios.post<ShortcutUserResponse>(API_URL_USER.shortcutUser(), params),
);
};
export const useShortcutUserMutation = (options?: UseMutationOptions<ShortcutUserResponse, CBDCAxiosError, ShortcutUserParams>) => {
const mutation = useMutation<ShortcutUserResponse, CBDCAxiosError, ShortcutUserParams>({
...options,
mutationFn: (params: ShortcutUserParams) => shortcutUser(params),
});
return {
...mutation,
};
};

View File

@@ -29,10 +29,12 @@ export interface LoginResponse {
};
export interface UserFavorite {
title?: string;
img?: string;
path?: string;
menuId?: string;
seq?: number;
menuId?: number;
menuName?: string;
menuNameEng?: string;
iconFilePath?: string | null;
programPath?: string;
};
export interface UserInfo extends LoginResponse {
status: boolean;
@@ -221,9 +223,40 @@ export interface AuthMethodItem {
authMethodType: string;
sequence: number;
content: string;
}
};
export interface UserAuthMethodData {
emails: Array<AuthMethodItem>;
phones: Array<AuthMethodItem>;
}
};
export interface ShortcutDefaultParams {
usrid: string;
};
export interface ShortcutDefaultResponse {
shortcuts: Array<Shortcuts>;
usingDefault: boolean;
};
export interface Shortcuts {
seq: number;
menuId: number;
menuName: string;
menuNameEng: string;
iconFilePath: string;
programPath: string;
};
export interface ShortcutSaveParams {
usrid: string;
isDefault: boolean;
menuIds: Array<number | undefined>;
};
export interface ShortcutSaveResponse {
};
export interface ShortcutUserParams {
usrid: string;
};
export interface ShortcutUserResponse {
shortcuts: Array<Shortcuts>;
usingDefault: boolean;
};