@innofulfill/coupon-components
TypeScript icon, indicating that this package has built-in type declarations

0.0.9 • Public • Published

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

  1. @Input() cityDataList: any; This input method can show data in the city select dropdown. Reference:[{ "state": "Gujarat","city": "Ahmedabad" },{ "state":"Chandigarh", "city": "Chandigarh" } ]
  2. @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;}].
  3. @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;}.
  4. @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;}]
  5. @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

  1. @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:''}

  2. @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}

  3. @Output() selectCityEvent = new EventEmitter(); This event emit is return the cityObejct. Return object: { "state": "Chandigarh", "city": "Chandigarh" }

Readme

Keywords

none

Package Sidebar

Install

npm i @innofulfill/coupon-components

Weekly Downloads

3

Version

0.0.9

License

none

Unpacked Size

550 kB

Total Files

24

Last publish

Collaborators

  • pavan_smile
  • sachin-smile
  • shankarsingh2025
  • smile-innofulfill