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


TypeScript ccjModelConverter.retrievePaymentOptionsFromClaim函数代码示例

本文整理汇总了TypeScript中claims/ccjModelConverter.retrievePaymentOptionsFromClaim函数的典型用法代码示例。如果您正苦于以下问题:TypeScript retrievePaymentOptionsFromClaim函数的具体用法?TypeScript retrievePaymentOptionsFromClaim怎么用?TypeScript retrievePaymentOptionsFromClaim使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了retrievePaymentOptionsFromClaim函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: retrieveAndSetValuesInDraft

function retrieveAndSetValuesInDraft (claim: Claim, draft: Draft<DraftCCJ>): Draft<DraftCCJ> {
  const paymentOption: CCJPaymentOption = retrievePaymentOptionsFromClaim(claim)
  if (paymentOption) {
    draft.document.paymentOption = paymentOption
    if (paymentOption && paymentOption.option.value === PaymentOption.INSTALMENTS) {
      draft.document.repaymentPlan = getRepaymentPlanForm(claim, draft)
    } else if (paymentOption && paymentOption.option.value === PaymentOption.BY_SPECIFIED_DATE) {
      draft.document.payBySetDate = new PaymentDate(LocalDate.fromMoment(claim.settlement.getLastOffer().paymentIntention.paymentDate))
    }
  }
  return draft
}
开发者ID:hmcts,项目名称:cmc-citizen-frontend,代码行数:12,代码来源:check-and-send.ts

示例2: buildRedirectUri

 buildRedirectUri (req: express.Request, res: express.Response): string {
   const { externalId } = req.params
   const claim: Claim = res.locals.claim
   const response = claim.response
   if (response) {
     const paymentOption: CCJPaymentOption = retrievePaymentOptionsFromClaim(claim)
     if ((paymentOption && paymentOption.option.value === PaymentOption.INSTALMENTS) || claim.isSettlementAgreementRejected) {
       return Paths.checkAndSendPage.evaluateUri({ externalId: externalId })
     } else {
       return Paths.paymentOptionsPage.evaluateUri({ externalId: externalId })
     }
   } else {
     return Paths.paymentOptionsPage.evaluateUri({ externalId: externalId })
   }
 }
开发者ID:hmcts,项目名称:cmc-citizen-frontend,代码行数:15,代码来源:paid-amount-summary.ts

示例3: it

 it('should get defined CCJPaymentOption when response is present', () => {
   const claim: Claim = new Claim().deserialize(sampleClaimWithInstalments)
   const ccjPaymentOption: CCJPaymentOption = retrievePaymentOptionsFromClaim(claim)
   expect(ccjPaymentOption.option.value).to.be.equal(PaymentType.INSTALMENTS.value)
 })
开发者ID:hmcts,项目名称:cmc-citizen-frontend,代码行数:5,代码来源:CCJModelConverter.ts


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