本文整理匯總了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)
}
)
}))