本文整理汇总了TypeScript中shared/interestUtils.getInterestDetails函数的典型用法代码示例。如果您正苦于以下问题:TypeScript getInterestDetails函数的具体用法?TypeScript getInterestDetails怎么用?TypeScript getInterestDetails使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getInterestDetails函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: it
it('should return 0 for number of days when interest date starts from tomorrow (issue date in the future)', async () => {
const tomorrow = MomentFactory.currentDate().add(1, 'days')
const claim: Claim = new Claim().deserialize({ ...sampleClaimObj, issuedOn: tomorrow })
const { numberOfDays } = await getInterestDetails(claim) as any
expect(numberOfDays).to.deep.eq(0)
})
示例2: async
async (req: express.Request, res: express.Response, next: express.NextFunction): Promise<void> => {
const claim: Claim = res.locals.claim
const interestData = await getInterestDetails(claim)
res.render(Paths.claimSummaryPage.associatedView, {
interestData: interestData
})
})
示例3: getInterestDetails
ErrorHandling.apply(async (req: express.Request, res: express.Response, next: express.NextFunction) => {
const claim: Claim = res.locals.claim
const interestData = await getInterestDetails(claim)
res.render(Paths.claimDetailsPage.associatedView, {
interestData: interestData,
pdfUrl: isCurrentUserLinkedToClaim(res.locals.user, res.locals.claim) ? ClaimPaths.sealedClaimPdfReceiver : ClaimPaths.receiptReceiver
})
})
示例4: getInterestDetails
ErrorHandling.apply(async (req: express.Request, res: express.Response) => {
const claim: Claim = res.locals.claim
const model = this.paidAmount().get(res.locals.draft.document)
res.render(
this.getView(), {
claim: claim,
alreadyPaid: model.amount || 0,
interestDetails: await getInterestDetails(claim),
nextPageUrl: this.buildRedirectUri(req, res),
defaultJudgmentDate: MomentFactory.currentDate(),
amountSettledFor: this.amountSettledFor(claim, res.locals.draft.document)
}
)
}))