Commit 138856d6 authored by Lê Bảo Hồng Đức's avatar Lê Bảo Hồng Đức

let duck cook

parent e56c3a6b
...@@ -128,86 +128,6 @@ const {mutation: mutationOptions, request: requestOptions} = options ? ...@@ -128,86 +128,6 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
return useMutation(mutationOptions, queryClient); return useMutation(mutationOptions, queryClient);
} }
/** /**
* Create bulk approvals and send invitation emails with Word document attachments
*/
export type postApprovalResponse200 = {
data: Response
status: 200
}
export type postApprovalResponseSuccess = (postApprovalResponse200) & {
headers: Headers;
};
;
export type postApprovalResponse = (postApprovalResponseSuccess)
export const getPostApprovalUrl = () => {
return `/approval`
}
export const postApproval = async (approvalRequest: ApprovalRequest, options?: RequestInit): Promise<postApprovalResponse> => {
return useCustomClient<postApprovalResponse>(getPostApprovalUrl(),
{
...options,
method: 'POST',
headers: { 'Content-Type': 'application/json', ...options?.headers },
body: JSON.stringify(
approvalRequest,)
}
);}
export const getPostApprovalMutationOptions = <TError = ErrorType<unknown>,
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof postApproval>>, TError,{data: BodyType<ApprovalRequest>}, TContext>, request?: SecondParameter<typeof useCustomClient>}
): UseMutationOptions<Awaited<ReturnType<typeof postApproval>>, TError,{data: BodyType<ApprovalRequest>}, TContext> => {
const mutationKey = ['postApproval'];
const {mutation: mutationOptions, request: requestOptions} = options ?
options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
options
: {...options, mutation: {...options.mutation, mutationKey}}
: {mutation: { mutationKey, }, request: undefined};
const mutationFn: MutationFunction<Awaited<ReturnType<typeof postApproval>>, {data: BodyType<ApprovalRequest>}> = (props) => {
const {data} = props ?? {};
return postApproval(data,requestOptions)
}
return { mutationFn, ...mutationOptions }}
export type PostApprovalMutationResult = NonNullable<Awaited<ReturnType<typeof postApproval>>>
export type PostApprovalMutationBody = BodyType<ApprovalRequest>
export type PostApprovalMutationError = ErrorType<unknown>
export const usePostApproval = <TError = ErrorType<unknown>,
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof postApproval>>, TError,{data: BodyType<ApprovalRequest>}, TContext>, request?: SecondParameter<typeof useCustomClient>}
, queryClient?: QueryClient): UseMutationResult<
Awaited<ReturnType<typeof postApproval>>,
TError,
{data: BodyType<ApprovalRequest>},
TContext
> => {
const mutationOptions = getPostApprovalMutationOptions(options);
return useMutation(mutationOptions, queryClient);
}
/**
* Get * Get
*/ */
export type getApprovalResponse200 = { export type getApprovalResponse200 = {
...@@ -416,6 +336,86 @@ export const prefetchGetApprovalQuery = async <TData = Awaited<ReturnType<typeof ...@@ -416,6 +336,86 @@ export const prefetchGetApprovalQuery = async <TData = Awaited<ReturnType<typeof
/** /**
* Create bulk approvals and send invitation emails with Word document attachments
*/
export type postApprovalResponse200 = {
data: Response
status: 200
}
export type postApprovalResponseSuccess = (postApprovalResponse200) & {
headers: Headers;
};
;
export type postApprovalResponse = (postApprovalResponseSuccess)
export const getPostApprovalUrl = () => {
return `/approval`
}
export const postApproval = async (approvalRequest: ApprovalRequest, options?: RequestInit): Promise<postApprovalResponse> => {
return useCustomClient<postApprovalResponse>(getPostApprovalUrl(),
{
...options,
method: 'POST',
headers: { 'Content-Type': 'application/json', ...options?.headers },
body: JSON.stringify(
approvalRequest,)
}
);}
export const getPostApprovalMutationOptions = <TError = ErrorType<unknown>,
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof postApproval>>, TError,{data: BodyType<ApprovalRequest>}, TContext>, request?: SecondParameter<typeof useCustomClient>}
): UseMutationOptions<Awaited<ReturnType<typeof postApproval>>, TError,{data: BodyType<ApprovalRequest>}, TContext> => {
const mutationKey = ['postApproval'];
const {mutation: mutationOptions, request: requestOptions} = options ?
options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
options
: {...options, mutation: {...options.mutation, mutationKey}}
: {mutation: { mutationKey, }, request: undefined};
const mutationFn: MutationFunction<Awaited<ReturnType<typeof postApproval>>, {data: BodyType<ApprovalRequest>}> = (props) => {
const {data} = props ?? {};
return postApproval(data,requestOptions)
}
return { mutationFn, ...mutationOptions }}
export type PostApprovalMutationResult = NonNullable<Awaited<ReturnType<typeof postApproval>>>
export type PostApprovalMutationBody = BodyType<ApprovalRequest>
export type PostApprovalMutationError = ErrorType<unknown>
export const usePostApproval = <TError = ErrorType<unknown>,
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof postApproval>>, TError,{data: BodyType<ApprovalRequest>}, TContext>, request?: SecondParameter<typeof useCustomClient>}
, queryClient?: QueryClient): UseMutationResult<
Awaited<ReturnType<typeof postApproval>>,
TError,
{data: BodyType<ApprovalRequest>},
TContext
> => {
const mutationOptions = getPostApprovalMutationOptions(options);
return useMutation(mutationOptions, queryClient);
}
/**
* Delete * Delete
*/ */
export type deleteApprovalResponse200 = { export type deleteApprovalResponse200 = {
......
...@@ -36,6 +36,7 @@ import type { ...@@ -36,6 +36,7 @@ import type {
MembershipFee, MembershipFee,
MembershipFeeBody, MembershipFeeBody,
PostMembershipFeeCreateAccountsAndFeesBody, PostMembershipFeeCreateAccountsAndFeesBody,
PostMembershipFeeSendUpdateReminderBody,
PutMembershipFeeParams, PutMembershipFeeParams,
Response Response
} from '../models'; } from '../models';
...@@ -1361,3 +1362,84 @@ export const prefetchGetMembershipFeePrintQuery = async <TData = Awaited<ReturnT ...@@ -1361,3 +1362,84 @@ export const prefetchGetMembershipFeePrintQuery = async <TData = Awaited<ReturnT
/**
* Send email notification to PDN staff about organizations with incomplete documents
*/
export type postMembershipFeeSendUpdateReminderResponse200 = {
data: Response
status: 200
}
export type postMembershipFeeSendUpdateReminderResponseSuccess = (postMembershipFeeSendUpdateReminderResponse200) & {
headers: Headers;
};
;
export type postMembershipFeeSendUpdateReminderResponse = (postMembershipFeeSendUpdateReminderResponseSuccess)
export const getPostMembershipFeeSendUpdateReminderUrl = () => {
return `/membershipFee/send-update-reminder`
}
export const postMembershipFeeSendUpdateReminder = async (postMembershipFeeSendUpdateReminderBody: PostMembershipFeeSendUpdateReminderBody, options?: RequestInit): Promise<postMembershipFeeSendUpdateReminderResponse> => {
return useCustomClient<postMembershipFeeSendUpdateReminderResponse>(getPostMembershipFeeSendUpdateReminderUrl(),
{
...options,
method: 'POST',
headers: { 'Content-Type': 'application/json', ...options?.headers },
body: JSON.stringify(
postMembershipFeeSendUpdateReminderBody,)
}
);}
export const getPostMembershipFeeSendUpdateReminderMutationOptions = <TError = ErrorType<unknown>,
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof postMembershipFeeSendUpdateReminder>>, TError,{data: BodyType<PostMembershipFeeSendUpdateReminderBody>}, TContext>, request?: SecondParameter<typeof useCustomClient>}
): UseMutationOptions<Awaited<ReturnType<typeof postMembershipFeeSendUpdateReminder>>, TError,{data: BodyType<PostMembershipFeeSendUpdateReminderBody>}, TContext> => {
const mutationKey = ['postMembershipFeeSendUpdateReminder'];
const {mutation: mutationOptions, request: requestOptions} = options ?
options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
options
: {...options, mutation: {...options.mutation, mutationKey}}
: {mutation: { mutationKey, }, request: undefined};
const mutationFn: MutationFunction<Awaited<ReturnType<typeof postMembershipFeeSendUpdateReminder>>, {data: BodyType<PostMembershipFeeSendUpdateReminderBody>}> = (props) => {
const {data} = props ?? {};
return postMembershipFeeSendUpdateReminder(data,requestOptions)
}
return { mutationFn, ...mutationOptions }}
export type PostMembershipFeeSendUpdateReminderMutationResult = NonNullable<Awaited<ReturnType<typeof postMembershipFeeSendUpdateReminder>>>
export type PostMembershipFeeSendUpdateReminderMutationBody = BodyType<PostMembershipFeeSendUpdateReminderBody>
export type PostMembershipFeeSendUpdateReminderMutationError = ErrorType<unknown>
export const usePostMembershipFeeSendUpdateReminder = <TError = ErrorType<unknown>,
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof postMembershipFeeSendUpdateReminder>>, TError,{data: BodyType<PostMembershipFeeSendUpdateReminderBody>}, TContext>, request?: SecondParameter<typeof useCustomClient>}
, queryClient?: QueryClient): UseMutationResult<
Awaited<ReturnType<typeof postMembershipFeeSendUpdateReminder>>,
TError,
{data: BodyType<PostMembershipFeeSendUpdateReminderBody>},
TContext
> => {
const mutationOptions = getPostMembershipFeeSendUpdateReminderMutationOptions(options);
return useMutation(mutationOptions, queryClient);
}
\ No newline at end of file
...@@ -132,6 +132,9 @@ export * from './postEventsIdExportJoinedOrgsParams'; ...@@ -132,6 +132,9 @@ export * from './postEventsIdExportJoinedOrgsParams';
export * from './postFilesBody'; export * from './postFilesBody';
export * from './postMembershipFeeCreateAccountsAndFeesBody'; export * from './postMembershipFeeCreateAccountsAndFeesBody';
export * from './postMembershipFeeCreateAccountsAndFeesBodyOrganizationsItem'; export * from './postMembershipFeeCreateAccountsAndFeesBodyOrganizationsItem';
export * from './postMembershipFeeSendUpdateReminderBody';
export * from './postMembershipFeeSendUpdateReminderBodyLanguage';
export * from './postMembershipFeeSendUpdateReminderBodyOrganizationsItem';
export * from './postOrganizationsAddMembershipFeesBody'; export * from './postOrganizationsAddMembershipFeesBody';
export * from './postOrganizationsAddMembershipFeesBodyFeesItem'; export * from './postOrganizationsAddMembershipFeesBodyFeesItem';
export * from './postOrganizationsCheckAccountsBody'; export * from './postOrganizationsCheckAccountsBody';
......
...@@ -18,6 +18,7 @@ export interface MembershipFee { ...@@ -18,6 +18,7 @@ export interface MembershipFee {
is_approved?: boolean; is_approved?: boolean;
invoice_number?: string; invoice_number?: string;
invoice_date?: string; invoice_date?: string;
membership_year?: number;
updated_at?: string; updated_at?: string;
updated_by?: string; updated_by?: string;
} }
...@@ -14,4 +14,10 @@ export type PostMembershipFeeCreateAccountsAndFeesBodyOrganizationsItem = { ...@@ -14,4 +14,10 @@ export type PostMembershipFeeCreateAccountsAndFeesBodyOrganizationsItem = {
amount_paid?: number; amount_paid?: number;
invoice_number?: string; invoice_number?: string;
invoice_date?: string; invoice_date?: string;
/** Năm đóng hội phí */
membership_year?: number;
/** Tên cán bộ phụ trách */
assigned_user_name?: string;
/** Địa chỉ doanh nghiệp */
address?: string;
}; };
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VCCI
* Coded by Meu TEAM
* OpenAPI spec version: 1.0.0
*/
import type { PostMembershipFeeSendUpdateReminderBodyOrganizationsItem } from './postMembershipFeeSendUpdateReminderBodyOrganizationsItem';
import type { PostMembershipFeeSendUpdateReminderBodyLanguage } from './postMembershipFeeSendUpdateReminderBodyLanguage';
export type PostMembershipFeeSendUpdateReminderBody = {
/** Array of organizations that have not created accounts yet (no organization_ids) */
organizations?: PostMembershipFeeSendUpdateReminderBodyOrganizationsItem[];
/** Array of user IDs to notify */
pdn_user_ids?: string[];
/** Description of missing documents/information */
missing_fields?: string;
/** Email language */
language?: PostMembershipFeeSendUpdateReminderBodyLanguage;
};
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VCCI
* Coded by Meu TEAM
* OpenAPI spec version: 1.0.0
*/
/**
* Email language
*/
export type PostMembershipFeeSendUpdateReminderBodyLanguage = typeof PostMembershipFeeSendUpdateReminderBodyLanguage[keyof typeof PostMembershipFeeSendUpdateReminderBodyLanguage];
// eslint-disable-next-line @typescript-eslint/no-redeclare
export const PostMembershipFeeSendUpdateReminderBodyLanguage = {
vi: 'vi',
en: 'en',
} as const;
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VCCI
* Coded by Meu TEAM
* OpenAPI spec version: 1.0.0
*/
export type PostMembershipFeeSendUpdateReminderBodyOrganizationsItem = {
/** Organization name */
name?: string;
/** Organization tax code (optional) */
tax_code?: string;
};
...@@ -11,4 +11,10 @@ export type PostOrganizationsAddMembershipFeesBodyFeesItem = { ...@@ -11,4 +11,10 @@ export type PostOrganizationsAddMembershipFeesBodyFeesItem = {
amount_paid?: number; amount_paid?: number;
invoice_number?: string; invoice_number?: string;
invoice_date?: string; invoice_date?: string;
/** Năm đóng hội phí */
membership_year?: number;
/** Tên cán bộ phụ trách */
assigned_user_name?: string;
/** Địa chỉ doanh nghiệp */
address?: string;
}; };
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment