import { DurationTypes } from './projectSprintService.type'; export type ProjectSubModule = { _id: string; name: string; module: { _id: string; initialName: string; name: string; }; team: Record & { qc: { qcWeb: User; qcMobile: User; }; uiux: User; }; taskApiSpecId: string; repository: Record; isInclude: Record<'frontend' | 'mobile' | 'iot', boolean>; isHasTask: Record; hasSprintTask: Record; progress: string; apiSpec: boolean; isCiCdRun: boolean; leader: User; }; export type RepositoryItems = { backend: RepositoryItem[]; frontend: RepositoryItem[]; mobile: RepositoryItem[]; }; export type ShortProjectSubModule = { _id: string; name: string; repository: RepositoryItems; }; export type RepositoryItem = { _id: string; name: string; }; export type ExistingSubModule = Pick; export type ProcessSubModule = { isBe: boolean; isFe: boolean; isIot: boolean; isMobile: boolean; }; export type RepoTeams = 'backend' | 'frontend' | 'mobile'; export type RepoTeamInitials = 'BE' | 'FE' | 'MOB'; export type MultiMemberTeams = RepoTeams | 'iot'; export type AssignedMember = Pick & { progress: string; tasks?: { _id: string; status: string; }[]; }; export type User = { _id: string; key: number; fullName: string; nickName: string; email: string; division: string; position: string; imageUrl: string; progress: string; profilePictureBig?: string; }; type StatusSubModule = 'Backlog' | 'Sprint' | 'Reported Bug' | 'Selesai'; type StatusE2E = StatusSubModule | 'Pending E2E Testing Dev' | 'Pending E2E Testing Staging' | 'Selesai Dev'; export type TaskWeek = { intervalDate: string; totalFinishedTask: number; weekNumber: number; }; export type DeploymentSubModule = { _id: string; name: string; module: string; statusDeployment: 'Not Ready Yet' | 'Ready to Deploy' | 'On Deployment' | 'Finish Deployment'; status: { statusWeb: StatusE2E; statusMobile: StatusE2E; statusSubModule: StatusSubModule; }; totalTask: number; totalDuration: string; totalBugHistories: number; totalSprintPoint: number; priority: number; startDate: string; estimateFinishedDate: string; actualFinishedDate: string; label: string; }; export type DetailDeploymentSubModule = Omit & { taskWeeks: TaskWeek[]; totalBacklogTask: number; totalSprintTask: number; totalCompletedTask: number; }; export type TaskSubModule = { _id: string; taskName: string; process: string; priorityPoint: number; team: string; assignedTo: User; totalReportedBug: number; lastModifiedStatus: string; }; export interface PbiHistoryOptions { editedBy?: boolean; } export type DateRange = { start: number; end: number; }; export type SubModuleTimeline = { module: { name: string; subModule: { _id: string; name: string; process: [ { _id: string; name: string; dependentTo: string | null; assignedTo: SubModuleAssignedTimeline[]; } ]; }; }; }; export type SubModuleAssignedTimeline = { user: { _id: string; nickName: string; imageUrl: string; }; gapDays: DateRange[]; daysOff: DateRange[]; } & Record; export type Repository = { _id: string; name: string; subModules: Pick[]; sonarqubeName: string; team: RepoTeamInitials; repositoryLink: string; microLink?: string; accessMembers: AccessMember[]; updatedAt: string; updatedAtString: string; access: boolean; hasRequestedTicket: boolean; }; export type AccessMember = { _id: string; nickName: string; imageUrl: string; division: string; position: string; }; export type ExistingRepositories = { names: string[]; sonarqubeNames: string[]; }; export type RepositoryPost = Pick & { subModuleIds: string[]; team?: RepoTeamInitials; }; export interface SubModuleLeaderData { leader: Leader; subModules: SubModuleLeader[]; } interface Leader { _id: string; fullName: string; nickName: string; } export interface SubModuleLeader { _id: string; project: Project; module: Module; name: string; possibleLeader: PossibleLeader[]; } interface Project { _id: string; initialName: string; } interface Module { initialName: string; } export interface PossibleLeader { _id: string; nickName: string; } export {};