@innofulfill/coupon-components
v0.0.16
Published
This coupon library is used in those applications that support npm packages. It works like creating, editing, viewing, deleting, and active Or inactive coupons. and view coupon redeem history and details view.
Downloads
8
Keywords
Readme
Description
This coupon library is used in those applications that support npm packages. It works like creating, editing, viewing, deleting, and active Or inactive coupons. and view coupon redeem history and details view.
CLI Command List
Install with npm
$npm install @innofulfill/coupon-components.
Uses Sample
import { CouponComponents } from ‘@innofulfill/coupon-components’
This library is used to mention the code example below and its all function input-output.
<couponComponents [cityDataList]="cityList" (selectCityEvent)="onSelectCity($event)"
(onSubmitEvent)="onCouponSave($event)" [couponList]="couponListData"
[couponDetailsList]="couponListDetails" [couponHistoryData]="couponHistoryList"
[couponHistoryDetailsData]="couponHistoryDetails" [isCreatedCoupon]="isCreatedCoupon"
(couponListAction)="onActionSelect($event)"
</couponComponents>
Properties
- @Input() cityDataList: any; This input method can show data in the city select dropdown. Reference:[{ "state": "Gujarat","city": "Ahmedabad" },{ "state":"Chandigarh", "city": "Chandigarh" } ]
- @Input() couponList: COUPON_DTO;
This input method is used to show the coupon list—data in ArrayOfObject. Reference Data: [{ _id?: string; cities?: []; title?: string; type?: string; redeemType?: string; discount?: number; maxDiscount?: number; minAmount?: number;startDate?: string; endDate?: string; isActive?: boolean; termAndCondition?: string;}]. - @Input() couponDetailsList: COUPON_DTO This input method is used to show the coupon details view.Pass data as an object. Reference Data:{ _id?: string; cities?: []; title?: string; type?: string; redeemType?: string; discount?: number; maxDiscount?: number; minAmount?: number; startDate?: string; endDate?: string; isActive?: boolean; termAndCondition?: string;}.
- @Input() couponHistoryData: COUPON_HISTORY_DTO; This input method is used to show the coupon History list. Reference Data:[{ _id?: string; couponCode?:string; couponTitle?: string; customerName?:string; orderId?: string; couponType?: string; redeemType?:string; createdDate?: string; termAndCondition?: string;}]
- @Input() couponHistoryDetailsData: COUPON_HISTORY_DTO; This input method is used to show the couponHistory in details view.Pass data as an object. Reference Data:[{ _id?: string; couponCode?:string; couponTitle?: string; customerName?: string; orderId?: string; couponType?: string; redeemType?:string; createdDate?: string; termAndCondition?: string;}]
Events
@Output() couponListAction= new EventEmitter() This function is used to get table row data and returns the mentioned event. Return object:{action:'view|edit|delete|Active|InActive ', data:''}
@Output() onSubmitEvent = new EventEmitter() This event returns the Coupon creation Object mentioned below object. Return object: {"cities": ["Ahmedabad","Rajkot"], "title": "Gift Coupon", "code": "GIFT013", "type": "FLAT_AMOUNT | PERCENTAGE", "redeemType": "FIRST_TIME| MULTI_TIME", "discount": 100, "maxDiscount": 100, "minAmount": 100, "startDate": "2024-02-11T15:57:53.485Z", "endDate": "2024-02-11T15:57:53.485Z", "termAndCondition": "Get a flat amount - 100 rupees of on minimum order delivery amount of 1000", "isActive": true | false}
@Output() selectCityEvent = new EventEmitter(); This event emit is return the cityObejct. Return object: { "state": "Chandigarh", "city": "Chandigarh" }