zcash-grant-system/frontend/types/milestone.ts

48 lines
970 B
TypeScript
Raw Permalink Normal View History

2018-12-27 09:41:26 -08:00
import { Zat } from 'utils/units';
2018-10-04 21:27:02 -07:00
export enum MILESTONE_STATE {
WAITING = 'WAITING',
ACTIVE = 'ACTIVE',
REJECTED = 'REJECTED',
PAID = 'PAID',
}
2019-02-11 13:22:40 -08:00
// NOTE: sync with /backend/grand/utils/enums.py MilestoneStage
export enum MILESTONE_STAGE {
IDLE = 'IDLE',
REQUESTED = 'REQUESTED',
REJECTED = 'REJECTED',
ACCEPTED = 'ACCEPTED',
PAID = 'PAID',
}
2018-10-04 21:27:02 -07:00
export interface Milestone {
index: number;
2019-02-11 13:22:40 -08:00
stage: MILESTONE_STAGE;
amount: Zat | string;
immediatePayout: boolean;
dateEstimated?: number;
daysEstimated?: string;
2019-02-11 13:22:40 -08:00
dateRequested?: number;
dateRejected?: number;
dateAccepted?: number;
datePaid?: number;
rejectReason?: string;
paidTxId?: string;
2018-10-04 21:27:02 -07:00
}
export interface ProposalMilestone extends Milestone {
id: number;
2018-10-04 21:27:02 -07:00
content: string;
payoutPercent: string;
title: string;
}
export interface CreateMilestone {
title: string;
content: string;
daysEstimated?: string;
payoutPercent: string;
2018-10-04 21:27:02 -07:00
immediatePayout: boolean;
}