import { Amount } from '../../../../commonStateTypes/amount'; import { FetchState, FetchStateAndError, ID } from '../../../../commonStateTypes/common'; import { Recommendation } from '../../../../commonStateTypes/recommendationBase'; import { AccountBase, RecommendedAccountBase } from '../../../../entity/account/accountState'; import { MerchantBase } from '../../../../entity/merchant/merchant'; import { DistanceMilage, LineDetail, ReimbursementLine, ReimbursementTypeCode } from '../../../../entity/reimbursement/reimbursementState'; import { Attachment } from '../../../../entity/transaction/stateTypes/attachment'; import { ZeniDate } from '../../../../zeniDayJS'; export interface EditRemiDetail { addRemiAutoFieldsByLineId: Record; fetchStatus: FetchStateAndError; remiDetailLocalData: RemiDetailLocalData; saveStatus: FetchStateAndError; tentativeMerchantNameByLineId: Record; uploadFetchState: FetchState; reimbursementId?: ID; } export declare const initialRemiDetail: EditRemiDetail; export interface SegregatedReimbursementLine { homeCurrencyConversions: Amount; lineId: ID; mileage: Partial; outOfPocket: Partial; type: ReimbursementTypeCode; fileId?: ID; } export interface SegregatedReimbursementLineWithRecommendation extends SegregatedReimbursementLine { outOfPocket: OutofPocketReimbursementLineWithRecommendation; } export interface OutofPocketReimbursementLineWithRecommendation extends Partial { isCategoryFirstTimeAutofilled: boolean; isCategoryUpdateSelected: boolean; isRetainedCategorySelected: boolean; recommendations: Recommendation[]; recommendedAccount?: RecommendedAccountBase; retainedAccount?: AccountBase; } export type ReimbursementLineWithAttachment = ReimbursementLine & { file?: Attachment; }; export type SegregatedReimbursementLineWithAttachment = SegregatedReimbursementLine & { file?: Attachment; }; export type ReimbursementLineWithAttachmentAndRecommendation = SegregatedReimbursementLineWithRecommendation & { recommendationFetchState: FetchState; file?: Attachment; }; export interface OutofPocketLine extends ReimbursementBaseLineWithoutType { merchant: MerchantBase; } export interface MilageLine extends ReimbursementBaseLineWithoutType { distanceMileage: DistanceMilage; } interface ReimbursementBaseLineWithoutType extends Amount { description: string; lineDetail: LineDetail; transactionDate: ZeniDate; } export interface EditRemiDetailViewState { editRemiStateById: Record; newRemiState: EditRemiDetail; } export interface WhatForSection { reportTitle?: string; } export interface RemiDetailLocalData { currencyConversionStateByLineId: Record; updatesByLineId: Record; files?: Attachment[]; paymentTo?: ID; totalAmount?: Amount; whatForSection?: WhatForSection; } export type AutoFields = ('merchant' | 'transactionDate' | 'amount' | 'memo' | 'account' | 'class')[]; export {};