import { type ListFrontEndInterface } from './CommonType'

export interface TimesheetListstateInterface {
    TimeSheetList: TimesheetListDataTypeInterface[]
    TimeSheetListCount: number
    userList: ListFrontEndInterface[]
}

export interface TimesheetListDataTypeInterface
    extends TimeSheetFormDataInterface {
    key: React.Key
}
export interface TimeSheetFormDataInterface {
    timeSheetId: string
    dateTime: string
    duration: string
    description: string
    submissionStatus: number
    approvalStatus: number
    createdDate: string
    submitedDate: string
    approvalHistoryList: ApprovalHistory[]
    isWorkflowRequired: number
    firstLevelReportingTo: number
}

export interface ApprovalHistory {
    workFlowId: number
    workflowName: string
    workFlowDetailId: number
    levelName: string
    approverName: string
    approvedBy: string
    approvedByDepartment: string
    approvedByDesignation: string
    approvedDate: string
    approvalStatus: string
    remarks: string
    sequenceNo: number
}

export interface TimesheetPayloadInterface {
    data: TimeSheetFormDataInterface[]
    noOfRecords: number
}
export interface TimesheetDataTypeInterface extends TimeSheetFormDataInterface {
    key: React.Key
}
export interface TimesheetViewStateInterface {
    parentCategoryList: ListFrontEndInterface[]
}
export interface TimeSheetExpandViewInterface {
    TimesheetData: TimesheetDataTypeInterface
}
export interface TimesheetFormInterface
    extends TimesheetFormDataStateInterface {
    onSave: (
        data: TimeSheetFormDataInterface,
        callBack: CallableFunction
    ) => void
    editData: TimeSheetFormDataInterface
    resetdata: string
    setResetData: React.Dispatch<React.SetStateAction<string>>
    isLoadingModal: boolean
}
export interface TimesheetFormDataStateInterface {
    userList: ListFrontEndInterface[]
}

export interface TimeSheetDetilas {
    timeSheetId: string
    dateTime: string
    duration: string
    description: string
    submissionStatus: number
    approvalStatus: number
    createdDate: string
    submitedDate: string
    approvalHistoryList: ApprovalHistory[]
    isWorkflowRequired: number
    firstLevelReportingTo: number
}
