当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript interestUtils.getInterestDetails函数代码示例

本文整理汇总了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)
  })
开发者ID:hmcts,项目名称:cmc-citizen-frontend,代码行数:7,代码来源:interestUtils.ts

示例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
   })
 })
开发者ID:hmcts,项目名称:cmc-citizen-frontend,代码行数:7,代码来源:claim-summary.ts

示例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
   })
 })
开发者ID:hmcts,项目名称:cmc-citizen-frontend,代码行数:8,代码来源:claim-details.ts

示例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)
            }
          )
        }))
开发者ID:hmcts,项目名称:cmc-citizen-frontend,代码行数:15,代码来源:paid-amount-summary.ts


注:本文中的shared/interestUtils.getInterestDetails函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。