當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。