260702_01_ENH: 리스트 작업 도중 공용 ui를 적용하기 위한 중간 커밋
This commit is contained in:
@@ -8,22 +8,3 @@ export type RouteContext = { params: Promise<{ slug?: string[] }> };
|
||||
|
||||
export type ErrorCode = "404" | "500";
|
||||
export type RedirectSlug = "complete" | "screen" | "quota";
|
||||
|
||||
export type PageRequest = {
|
||||
pageIndex: number;
|
||||
pageSize: number;
|
||||
sortBy: string;
|
||||
sortDir: "asc" | "desc";
|
||||
}
|
||||
|
||||
export type PageResponse<T> = {
|
||||
content: T[];
|
||||
totalElements: number;
|
||||
totalPages: number;
|
||||
pageIndex: number;
|
||||
pageSize: number;
|
||||
numberOfElements: number;
|
||||
first: boolean;
|
||||
last: boolean;
|
||||
empty: boolean;
|
||||
}
|
||||
35
src/types/external.ts
Normal file
35
src/types/external.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
import { ExternalActionCode } from "@/types/project";
|
||||
|
||||
export type ExternalEntryType = "redirect" | "api";
|
||||
|
||||
export const EXTERNAL_ACTION_CODE_BY_SLUG = {
|
||||
start: ExternalActionCode.START,
|
||||
complete: ExternalActionCode.COMPLETE,
|
||||
screen: ExternalActionCode.SCREEN,
|
||||
quota: ExternalActionCode.QUOTA,
|
||||
} as const;
|
||||
|
||||
export type ExternalAction = keyof typeof EXTERNAL_ACTION_CODE_BY_SLUG;
|
||||
|
||||
export type ExternalEventMeta = {
|
||||
entryType: ExternalEntryType;
|
||||
action: ExternalAction;
|
||||
actionCode: ExternalActionCode;
|
||||
pid: string;
|
||||
sid: string;
|
||||
remoteAddr: string | null;
|
||||
uri: string;
|
||||
url: string;
|
||||
userAgent: string | null;
|
||||
referer: string | null;
|
||||
origin: string | null;
|
||||
xForwardedFor: string | null;
|
||||
forwarded: string | null;
|
||||
};
|
||||
|
||||
export type ExternalEventBody = {
|
||||
actionCode: ExternalActionCode;
|
||||
prjctIdx: number;
|
||||
sid: number;
|
||||
meta: ExternalEventMeta;
|
||||
};
|
||||
6
src/types/internal.ts
Normal file
6
src/types/internal.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
export type InternalInfo = {
|
||||
clientId: string;
|
||||
internalNo: string;
|
||||
externalNo: string;
|
||||
clientIp: string;
|
||||
};
|
||||
@@ -1,6 +1,5 @@
|
||||
import {PageRequest} from "@/types/common";
|
||||
import {EnumLikeKey, EnumLikeValue} from "@/lib/utils";
|
||||
import {ListHeaderAssignConst, ListHeaderConst} from "@/const/listConst";
|
||||
import type { EnumLikeKey, EnumLikeValue, PageRequest } from "@kri/common";
|
||||
import { ListHeaderAssignConst, ListHeaderConst } from "@/const/listConst";
|
||||
|
||||
export enum ListHeaderGrade {
|
||||
IMMUTABLE = 0,
|
||||
@@ -14,37 +13,168 @@ export type ListHeaderType = EnumLikeValue<typeof ListHeaderConst>;
|
||||
export type ListHeaderAssignTypeKey = EnumLikeKey<typeof ListHeaderAssignConst>;
|
||||
export type ListHeaderAssignType = EnumLikeValue<typeof ListHeaderAssignConst>;
|
||||
|
||||
|
||||
export enum ListIsUse {
|
||||
UNUSABLE = 0, //0 : 사용 안함
|
||||
USABLE = 1, //1 : 사용
|
||||
TEST = 9, //9 : TEST
|
||||
UNUSABLE = 0,
|
||||
USABLE = 1,
|
||||
TEST = 9,
|
||||
}
|
||||
|
||||
export enum ListFilterOperator {
|
||||
POSITIVE = 1,
|
||||
NEGATIVE = 2,
|
||||
}
|
||||
|
||||
export enum ListFilterMatchType {
|
||||
EXACT = 1,
|
||||
CONTAINS = 2,
|
||||
EMPTY = 3,
|
||||
}
|
||||
|
||||
export enum ListUploadMode {
|
||||
CHANGE = 0,
|
||||
ADD = 1,
|
||||
}
|
||||
|
||||
export enum ListResetMode {
|
||||
ALL = 0,
|
||||
HIST = 1,
|
||||
}
|
||||
|
||||
export enum ListEventHistoryBase {
|
||||
ALL = 1,
|
||||
LATEST = 2,
|
||||
}
|
||||
|
||||
export type FilterOperator = 'eq' | 'neq' | 'contains' | 'notContains';
|
||||
|
||||
export type FilterHeaderOption = {
|
||||
id: number;
|
||||
label: string;
|
||||
values?: string[];
|
||||
};
|
||||
|
||||
export type FilterRow = {
|
||||
id: string;
|
||||
headerId: number;
|
||||
operator: FilterOperator;
|
||||
textValue: string;
|
||||
multiValues: string[];
|
||||
};
|
||||
|
||||
export type ListDownloadMode = 'list' | 'contact-history' | 'list-change-history' | 'upload-file';
|
||||
export type ContactHistoryDownloadType = 'all' | 'latest';
|
||||
export type ListFilterTarget = 'all' | 'filtered' | 'selected';
|
||||
|
||||
export type ListDownloadPayload = {
|
||||
mode: ListDownloadMode;
|
||||
target: ListFilterTarget;
|
||||
onlyFiltered: boolean;
|
||||
contactHistoryDateFrom?: string;
|
||||
contactHistoryDateTo?: string;
|
||||
contactHistoryType?: ContactHistoryDownloadType;
|
||||
};
|
||||
|
||||
export type ListResetScope = 'result-and-history' | 'list-only';
|
||||
|
||||
export type ListFilterCondition = {
|
||||
operator: ListFilterOperator;
|
||||
matchType: ListFilterMatchType;
|
||||
values: string[];
|
||||
};
|
||||
|
||||
export type ListOtherItemFilterCondition = ListFilterCondition & {
|
||||
listHderId: number;
|
||||
};
|
||||
|
||||
export type listHeader = {
|
||||
prjctIdx?: number;
|
||||
listHderId: number;
|
||||
listHderOrder: number;
|
||||
listHderGrad: ListHeaderGrade;
|
||||
listHderNm: string;
|
||||
listHderTy: ListHeaderType
|
||||
listHderTy: ListHeaderType;
|
||||
useFilter: boolean;
|
||||
useColView: boolean;
|
||||
useIntrvwerView: boolean;
|
||||
useIntrvwerEdit: boolean;
|
||||
}
|
||||
filterContents?: string[];
|
||||
};
|
||||
|
||||
export type ListFilter = {
|
||||
sidSet: string[];
|
||||
listUseSet: ListIsUse[];
|
||||
assignUserMap: Record<ListHeaderAssignType, string[]>;
|
||||
memo: string; // 또는 memo?: string | null
|
||||
otherItems: Record<number, string[]>;
|
||||
memoConditions: ListFilterCondition[];
|
||||
otherItemConditions: ListOtherItemFilterCondition[];
|
||||
};
|
||||
|
||||
export const createEmptyListFilter = (): ListFilter => ({
|
||||
sidSet: [],
|
||||
listUseSet: [],
|
||||
assignUserMap: {
|
||||
[ListHeaderAssignConst.OUTSOURCE]: [],
|
||||
[ListHeaderAssignConst.CONTACT_INTERVIEWER]: [],
|
||||
[ListHeaderAssignConst.FIELD_INTERVIEWER]: [],
|
||||
},
|
||||
memoConditions: [],
|
||||
otherItemConditions: [],
|
||||
});
|
||||
|
||||
export const createSidOnlyListFilter = (sid: string): ListFilter => ({
|
||||
...createEmptyListFilter(),
|
||||
sidSet: [sid],
|
||||
});
|
||||
|
||||
export type ListSearchRequest = {
|
||||
listFilter: ListFilter;
|
||||
pageRequest: PageRequest;
|
||||
}
|
||||
};
|
||||
|
||||
export type ListUploadRequest = {
|
||||
uploadMode: ListUploadMode;
|
||||
checkDuplicateEmail: boolean;
|
||||
checkDuplicatePhone: boolean;
|
||||
specificHeader?: Record<string, ListHeaderType>;
|
||||
};
|
||||
|
||||
export type ExcelUploadResult = {
|
||||
totalCount?: number;
|
||||
successCount?: number;
|
||||
failCount?: number;
|
||||
hasErrorFile?: boolean;
|
||||
errorFileName?: string;
|
||||
errorFileBase64?: string;
|
||||
};
|
||||
|
||||
export type ListUploadHistory = {
|
||||
listUploadLogId: string;
|
||||
wave: number;
|
||||
fileName: string;
|
||||
listCount: number;
|
||||
uploadMode: ListUploadMode;
|
||||
regUser: string;
|
||||
regDt: string;
|
||||
};
|
||||
|
||||
export type ListUpdateRequest = {
|
||||
updateContents: Record<string, string>;
|
||||
listFilter: ListFilter;
|
||||
};
|
||||
|
||||
export type ListResetRequest = {
|
||||
resetMode: ListResetMode;
|
||||
listFilter: ListFilter;
|
||||
};
|
||||
|
||||
export type ListEventHistDownloadRequest = {
|
||||
listFilter: ListFilter;
|
||||
resultCodeTypes: number[];
|
||||
searchBase: ListEventHistoryBase;
|
||||
dateRange?: {
|
||||
startDate?: string;
|
||||
endDate?: string;
|
||||
};
|
||||
};
|
||||
|
||||
export type ListResultBase = {
|
||||
lastResultCd: number;
|
||||
@@ -54,7 +184,7 @@ export type ListResultBase = {
|
||||
|
||||
export type ListSendResult = ListResultBase & {
|
||||
lastResultLabel: string;
|
||||
}
|
||||
};
|
||||
|
||||
export type ListContactResult = ListResultBase & {
|
||||
lastUser: string;
|
||||
@@ -79,4 +209,4 @@ export type ListSearchWithResult = ListSearchBase & {
|
||||
export type ListSearchWithFullResult = ListSearchWithResult & {
|
||||
mailSendResult: ListSendResult;
|
||||
smsSendResult?: ListSendResult;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {PageRequest} from "@/types/common";
|
||||
import type { PageRequest } from "@kri/common";
|
||||
import {ChannelType} from "@/types/messageTemplate";
|
||||
|
||||
export enum SurveyType {
|
||||
@@ -20,6 +20,13 @@ export enum ResultCodeType {
|
||||
SURVEY = 2,
|
||||
}
|
||||
|
||||
export enum ExternalActionCode {
|
||||
START = 1,
|
||||
COMPLETE = 10,
|
||||
SCREEN = 99,
|
||||
QUOTA = 98,
|
||||
}
|
||||
|
||||
export type ProjectInfo = {
|
||||
prjctIdx: number; // Long
|
||||
prjctCd: string;
|
||||
@@ -103,4 +110,4 @@ export type ProjectMainTemplateUpdateRequest = {
|
||||
prjctIdx:number;
|
||||
chnnlTy:ChannelType;
|
||||
tmplatIdx:number|null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user