[feat] negodata: 소유권 게이팅 + 견적 낙찰 + 작성자명 표시 + 전화입력 + 카드 엑셀
- 소유권 게이팅(common/authz): 변경 액션 본인∪OWNER, 협력사 삭제 OWNER 전용 - 견적 수동 낙찰(award) + 작성자명(creatorName) 표시 + 전화번호 입력 컴포넌트 + 카드 엑셀 업로드 - supplier_type 은 이번 커밋 미변경(다음 커밋에서 코드부터 정리 예정) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
c32ee300e6
commit
c62b66e35b
56 files changed
+1900
-188
No files matched your search
@@ -5,6 +5,7 @@
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import type { CardDataUserId } from './cardDataUserId';
|
||||
import type { CardDataCreatorName } from './cardDataCreatorName';
|
||||
import type { CardDataName } from './cardDataName';
|
||||
import type { CardDataNumber } from './cardDataNumber';
|
||||
import type { CardDataScript } from './cardDataScript';
|
||||
@@ -20,6 +21,8 @@ export interface CardData {
|
||||
nego_card_id: string;
|
||||
user_id?: CardDataUserId;
|
||||
is_wildcard?: boolean;
|
||||
is_shared?: boolean;
|
||||
creator_name?: CardDataCreatorName;
|
||||
name?: CardDataName;
|
||||
number?: CardDataNumber;
|
||||
script?: CardDataScript;
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type CardDataCreatorName = string | null;
|
||||
@@ -4,6 +4,7 @@
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import type { ItemDataCreatorName } from './itemDataCreatorName';
|
||||
import type { ItemDataCode } from './itemDataCode';
|
||||
import type { ItemDataCategory } from './itemDataCategory';
|
||||
import type { ItemDataImageUrl } from './itemDataImageUrl';
|
||||
@@ -28,6 +29,7 @@ export interface ItemData {
|
||||
item_id: string;
|
||||
company_id: string;
|
||||
user_id: string;
|
||||
creator_name?: ItemDataCreatorName;
|
||||
name: string;
|
||||
code?: ItemDataCode;
|
||||
category?: ItemDataCategory;
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type ItemDataCreatorName = string | null;
|
||||
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export interface ReqAwardQuotation {
|
||||
winner_supplier_id: string;
|
||||
}
|
||||
@@ -13,6 +13,7 @@ import type { ReqCreateCardMemo } from './reqCreateCardMemo';
|
||||
|
||||
export interface ReqCreateCard {
|
||||
is_wildcard?: boolean;
|
||||
is_shared?: boolean;
|
||||
name?: ReqCreateCardName;
|
||||
number?: ReqCreateCardNumber;
|
||||
script?: ReqCreateCardScript;
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import type { SupplierDataCreatorName } from './supplierDataCreatorName';
|
||||
import type { SupplierDataCode } from './supplierDataCode';
|
||||
import type { SupplierDataManagerName } from './supplierDataManagerName';
|
||||
import type { SupplierDataManagerEmail } from './supplierDataManagerEmail';
|
||||
@@ -16,6 +17,7 @@ export interface SupplierData {
|
||||
supplier_id: string;
|
||||
company_id: string;
|
||||
user_id: string;
|
||||
creator_name?: SupplierDataCreatorName;
|
||||
name: string;
|
||||
code?: SupplierDataCode;
|
||||
manager_name?: SupplierDataManagerName;
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v7.21.0 🍺
|
||||
* Do not edit manually.
|
||||
* Negodata Api Server
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type SupplierDataCreatorName = string | null;
|
||||
@@ -26,6 +26,7 @@ import type {
|
||||
import type {
|
||||
HTTPValidationError,
|
||||
ListQuotationsParams,
|
||||
ReqAwardQuotation,
|
||||
ReqCreateQuotation,
|
||||
ReqRegenerateQuotation,
|
||||
ResCreateQuotation,
|
||||
@@ -269,6 +270,71 @@ export const useStopQuotation = <TError = void | HTTPValidationError,
|
||||
return useMutation(mutationOptions, queryClient);
|
||||
}
|
||||
/**
|
||||
* @summary 개찰 견적 직접 낙찰
|
||||
*/
|
||||
export const awardQuotation = (
|
||||
qtId: string,
|
||||
reqAwardQuotation: ReqAwardQuotation,
|
||||
options?: SecondParameter<typeof customFetch>,signal?: AbortSignal
|
||||
) => {
|
||||
|
||||
|
||||
return customFetch<ResQuotation>(
|
||||
{url: `/v1/quotation/award/${qtId}`, method: 'POST',
|
||||
headers: {'Content-Type': 'application/json', },
|
||||
data: reqAwardQuotation, signal
|
||||
},
|
||||
options);
|
||||
}
|
||||
|
||||
|
||||
|
||||
export const getAwardQuotationMutationOptions = <TError = void | HTTPValidationError,
|
||||
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof awardQuotation>>, TError,{qtId: string;data: ReqAwardQuotation}, TContext>, request?: SecondParameter<typeof customFetch>}
|
||||
): UseMutationOptions<Awaited<ReturnType<typeof awardQuotation>>, TError,{qtId: string;data: ReqAwardQuotation}, TContext> => {
|
||||
|
||||
const mutationKey = ['awardQuotation'];
|
||||
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 awardQuotation>>, {qtId: string;data: ReqAwardQuotation}> = (props) => {
|
||||
const {qtId,data} = props ?? {};
|
||||
|
||||
return awardQuotation(qtId,data,requestOptions)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return { mutationFn, ...mutationOptions }}
|
||||
|
||||
export type AwardQuotationMutationResult = NonNullable<Awaited<ReturnType<typeof awardQuotation>>>
|
||||
export type AwardQuotationMutationBody = ReqAwardQuotation
|
||||
export type AwardQuotationMutationError = void | HTTPValidationError
|
||||
|
||||
/**
|
||||
* @summary 개찰 견적 직접 낙찰
|
||||
*/
|
||||
export const useAwardQuotation = <TError = void | HTTPValidationError,
|
||||
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof awardQuotation>>, TError,{qtId: string;data: ReqAwardQuotation}, TContext>, request?: SecondParameter<typeof customFetch>}
|
||||
, queryClient?: QueryClient): UseMutationResult<
|
||||
Awaited<ReturnType<typeof awardQuotation>>,
|
||||
TError,
|
||||
{qtId: string;data: ReqAwardQuotation},
|
||||
TContext
|
||||
> => {
|
||||
|
||||
const mutationOptions = getAwardQuotationMutationOptions(options);
|
||||
|
||||
return useMutation(mutationOptions, queryClient);
|
||||
}
|
||||
/**
|
||||
* @summary 견적 재생성(다음 라운드)
|
||||
*/
|
||||
export const regenerateQuotation = (
|
||||
|
||||
Reference in new issue
Block a user