File

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

Description

This component is a work in progress.

Price Modal component can be used when pricing on cart fails for any reason. User can choose to clear the cart or reprice it, from the modal.

Usage

Example :
import { PriceModalModule } from '@congarevenuecloud/elements';
@NgModule({
imports: [PriceModalModule, ...]
})
export class AppModule {}
Example :
```typescript
<apt-price-modal></apt-price-modal>
Example :

Implements

OnInit

Metadata

Index

Properties
Methods

Constructor

constructor(cartService: CartService, modalService: BsModalService)
Parameters :
Name Type Optional
cartService CartService No
modalService BsModalService No

Methods

clearCart
clearCart()

Create new cart and set it active. After that close price error modal.

Returns : void
closeModal
closeModal()

Close price modal.

Returns : void
retryPrice
retryPrice()

Call price cart API of cart.service.

Returns : void
showPriceErrorModal
showPriceErrorModal()

Open price modal popup.

Returns : void

Properties

Public cartService
Type : CartService
modalRef
Type : BsModalRef

refrence for modal dialog

<ng-template #priceModal>
    <div>
        <div class="modal-header">
            <h4 class="modal-title d-flex align-items-center m-0 text-truncate">
                {{'COMMON.PRICING_FAILED' | translate}}
            </h4>
            <button type="button" class="close pull-right" aria-label="Close" (click)="closeModal()">
                <span aria-hidden="true">&times;</span>
            </button>
        </div>
        <div class="modal-body">
            <div class="row">
                <div class="col-md-10">
                    <div>
                        {{'COMMON.PRICE_ERROR' | translate}}
                    </div>
                </div>
            </div>
        </div>
        <div class="modal-footer">
            <button class="btn btn-outline-danger mr-2" [ladda]="btnLoader" [attr.data-style]="'zoom-in'"
                (click)="clearCart()">{{'COMMON.CLEAR_CART' | translate}}</button>
            <button class="btn btn-primary btn-raised" type="button" (click)="retryPrice()"
                data-style="zoom-in">{{'COMMON.REPRICE_CART' | translate}}</button>
        </div>
    </div>
</ng-template>

./price-modal.component.scss

Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""