import { MultiSelectOption } from './options.type'; export interface ApprovalApproversListResponse { status: number; message: string; data: ApprovalApproversListData[]; } export interface ApprovalApproversListData { _id: number; level: number; approvalType: string; approvers: { user: User; status: ApprovalStatus; approvedAt: string; }[]; } export interface Approver { _id: string; key: number; fullName: string; nickName: string; isActive?: boolean; } interface User { _id: string; fullName: string; nickName: string; } export interface ApprovalFilterOptionResponse { status: number; message: string; data: ApprovalFilterOptionsData; } interface ApprovalFilterOptionsData { moduleOptions: MultiSelectOption[]; subModuleOptions: MultiSelectOption[]; processOptions: MultiSelectOption[]; taskOptions: MultiSelectOption[]; assignedToOptions: MultiSelectOption[]; checklistOptions: MultiSelectOption[]; } export interface ApprovalRequestsFilterOptionsResponse { status: number; message: string; data: ApprovalRequestsFilterOptionsData; } interface ApprovalRequestsFilterOptionsData { moduleOptions: MultiSelectOption[]; subModuleOptions: MultiSelectOption[]; processOptions: MultiSelectOption[]; taskOptions: MultiSelectOption[]; } export interface ApprovalRequestsListResponse { status: number; message: string; data: { totalRecords: number; data: ApprovalRequestsListData[]; }; } export interface ApprovalRequestsListData { _id: string; module: Module; subModule: SubModule; process: Process; checklistItem?: CheckList; reason: string; task: Task; duration: number; createdAt: string; status: string; checklist: string; approvedAt: string; } export interface AssignedUnassignedUserDataResponse { status: number; message: string; data: AssignedUnassignedUserData; } export interface AssignedUnassignedUserData { project: Project; team: Team; leader: Leader; totalRecords: number; data: Member[]; } export interface Project { _id: string; name: string; initialName: string; managersId: string[]; } export interface Team { _id: string; name: string; initial: string; } export interface Leader { _id: string; fullName: string; nickName: string; } export interface Member { _id: string; key: number; profilePicture: string; profilePictureBig: string; profilePictureMedium: string; profilePictureSmall: string; fullName: string; nickName: string; division: string; position: string; teams: string[]; email: string; totalProjects: number; task: { finished: number; total: number; percentage: number; }; } export interface CheckApproverResponse { status: number; message: string; data: CheckApproverData; } export interface CheckApproverData { newTask: boolean; deleteCheckList: boolean; uncheckCheckList: boolean; designAdjustment: boolean; sprint: boolean; } export interface ImprovementApprovalFilterOptionsResponse { status: number; message: string; data: ImprovementApprovalsFilterOptionsData; } interface ImprovementApprovalsFilterOptionsData { improvementOptions: MultiSelectOption[]; taskOptions: MultiSelectOption[]; memberOptions: MultiSelectOption[]; } export interface ImprovementApprovalListResponse { status: number; message: string; data: ImprovementListData; } interface ImprovementListData { totalRecords: number; data: ImprovementApprovalListData[]; } export interface ImprovementApprovalListData { _id: string; improvement: string; improvementName: string; task: string[]; member: Pick[]; createdAt: string; status: string; approvedAt: string; } export interface ImprovementApprovalRequestListResponse { status: number; message: string; data: { totalRecords: number; data: ImprovementApprovalRequestListData[]; }; } export interface ImprovementApprovalRequestListData { _id: string; improvement: string; improvementName: string; task: string[]; createdAt: string; status: string; approvedAt: string; } export interface ImprovementApprovalRequestsFilterOptionResponse { status: number; message: string; data: ImprovementApprovalRequestsFilterOptionData; } interface ImprovementApprovalRequestsFilterOptionData { improvementOptions: MultiSelectOption[]; taskOptions: MultiSelectOption[]; } export interface ProjectApprovalResponse { status: number; message: string; data: Approval; } export interface ApprovalLevel { process: string; level: number; users: Approver[]; type: 'and' | 'or'; } export interface Approval { newTask: ApprovalLevel[]; uncheckChecklist: ApprovalLevel[]; deleteChecklist: ApprovalLevel[]; designAdjustment: ApprovalLevel[]; sprint: ApprovalLevel[]; } export interface SprintApprovalFilterOptionResponse { status: number; message: string; data: SprintApprovalFilterOptionData; } export interface SprintApprovalFilterOptionData { sprintPeriodOptions: MultiSelectOption[]; } export interface SprintApprovalListResponse { status: number; message: string; data: { totalRecords: number; data: SprintApprovalListData[]; }; } export interface SprintApprovalListData { type: 'Waiting'; _id: string; sprint: Sprint; pbiAmount: number; taskAmount: number; sprintPeriod: string; status: string; startedAt: string; endedAt: string; sentAt: string; } export interface SprintApprovalRequestFilterOptionResponse { status: number; message: string; data: SprintApprovalRequestFilterOptionData; } interface SprintApprovalRequestFilterOptionData { sprintPeriodOptions: MultiSelectOption[]; } export interface SprintApprovalRequestsListResponse { status: number; message: string; data: { totalRecords: number; data: SprintApprovalRequestsListData[]; }; } export interface SprintApprovalRequestsListData { type: 'Request'; _id: string; sprint: Sprint; pbiAmount: number; taskAmount: number; sprintPeriod: string; status: string; startedAt: string; endedAt: string; sentAt: string; } interface Sprint { _id: string; name: string; } interface Module { _id: string; name: string; initial: string; } interface SubModule { _id: string; name: string; } interface CheckList { _id: string; name: string; } interface Process { _id: string; name: string; } interface Task { _id: string; name: string; } export interface ApprovalListResponse { _id: string; module: TaskAttributeWithInitialResponse; subModule?: SubModule; checklistItem?: CheckList; reason: string; process: TaskAttributeResponse; task: TaskAttributeResponse; assignedTo: UserResponse[]; team: string[]; duration?: number; createdAt: string; status: ApprovalStatus; approvedAt?: string; } interface TaskAttributeWithInitialResponse { _id: string; name: string; initial: string; } interface TaskAttributeResponse { _id: string; name: string; } interface UserResponse { _id: string; fullName: string; nickName: string; key: number; profilePictureBig?: string; profilePictureMedium?: string; profilePictureSmall?: string; } export type ApprovalStatus = 'Disetujui' | 'Ditolak' | 'Menunggu Persetujuan'; export interface CountNeedActionApprovalsResponse { status: number; message: string; data: { count: number; }; } export {};