File

projects/congarevenuecloud/elements/src/lib/price/price.component.ts

Description

The component is work in progress.

Wrapper component for displaying the price of a record. Supports cart, product, cart item, product options and orders. This component is a work in progress. Change detection on this component has been tuned, so use this component in favor of using the price pipes directly.

Preview

Price component used to display prices on mini cart

Usage

Example :
import { PriceModule } from '@congarevenuecloud/elements';

@NgModule({
imports: [PriceModule, ...]
})
export class AppModule {}
Example :
// Basic Usage
```typescript
<apt-price [record]="product"></apt-price>
Example :
// All inputs and outputs.
```typescript
<apt-price
            [record]="product"
            [quantity]="1"
            [formatted]="false"
            [type]="total"
            [term]="term"
            [bundle]="true"
></apt-price>

Implements

OnChanges OnDestroy

Metadata

Index

Inputs

Constructor

constructor(priceService: PriceService, localCurrencyPipe: LocalCurrencyPipe)
Parameters :
Name Type Optional
priceService PriceService No
localCurrencyPipe LocalCurrencyPipe No

Inputs

bundle
Type : boolean
Default value : false

Flag to set this product type as a bundle

formatted
Type : boolean
Default value : true

Optional boolean argument to display the price as a formatted currency or as a raw number (defaults to true)

options
Type : Array<AssetLineItem | QuoteLineItem | OrderLineItem>

The input option to display the price for line items. option type Can be Array of asset line items or Array of quote line item or Array of order line items

quantity
Type : number
Default value : 1

The quantity of the record (defaults to 1)

record
Type : Cart | Product | CartItem | ProductOptionComponent | Order | OrderLineItem | Quote | QuoteLineItem | AssetLineItem | Array<CartItem | AssetLineItem | QuoteLineItem | CartItem>

The input record to display the price for the given business AObject.

term
Type : number

Term used to calculate price of bundle product.

type
Type : "net" | "base" | "discount" | "baseExtended" | "list" | "listExtended"
Default value : 'net'

The type of the output; net price, base price, discounted price or unit price (defaults to net)


    :host{
      display: block;
    }
  
Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""