ionic-vhframeworks 4.2.0 → 4.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12709,15 +12709,21 @@ export declare class VhQuerySales {
12709
12709
  updateCoupon(id_coupon: any, data: any): Promise<unknown>;
12710
12710
  /**
12711
12711
  * @example:
12712
- *
12713
- * this.vhQuerySales.deleteCoupon('FBHYWIBDNIUH1321687')
12714
- .then((bool)=>{
12715
- console.log('deleteCoupon', bool);
12712
+ * this.vhQuerySales.deleteCoupon("9841654DOIWSDYW235")
12713
+ .then((rsp)=>{
12714
+ console.log('deleteCoupon', rsp);
12715
+ if(rsp.vcode == 0){
12716
+ //phát thông báo xóa thành công
12717
+ }else if(rsp.vcode == 1){
12718
+ //phát thông báo lý do xóa ko thành công (dùng câu từ dễ hiểu với khách hàng)
12719
+ }
12716
12720
  }, error=>{
12717
12721
  console.log('error', error);
12718
12722
  })
12719
12723
  * @param id_coupon
12720
- * @return Promise => bool = true or false
12724
+ * @return Promise => rsp = {vcode, message} / error
12725
+ * vcode == 0 : xóa thành công
12726
+ * vcode == 1 : xóa không thành công, do coupon đã được phát hành, vui lòng xóa đợt phát hành liên quan
12721
12727
  */
12722
12728
  deleteCoupon(id_coupon: any): Promise<unknown>;
12723
12729
  /**
@@ -12771,14 +12777,21 @@ export declare class VhQuerySales {
12771
12777
  updateCouponRelease(id_coupon_release: any, data: any): Promise<unknown>;
12772
12778
  /**
12773
12779
  * @example:
12774
- * this.vhQuerySales.deleteCouponRelease('ANOFIEUPOIUJ49861')
12775
- .then((bool)=>{
12776
- console.log('deleteCouponRelease', bool);
12780
+ * this.vhQuerySales.deleteCouponRelease("9841654DOIWSDYW235")
12781
+ .then((rsp)=>{
12782
+ console.log('deleteCouponRelease', rsp);
12783
+ if(rsp.vcode == 0){
12784
+ //phát thông báo xóa thành công
12785
+ }else if(rsp.vcode == 1){
12786
+ //phát thông báo lý do xóa ko thành công (dùng câu từ dễ hiểu với khách hàng)
12787
+ }
12777
12788
  }, error=>{
12778
12789
  console.log('error', error);
12779
12790
  })
12780
12791
  * @param id_coupon_release
12781
- * @return Promise => bool = true or false
12792
+ * @return Promise => rsp = {vcode, message} / error
12793
+ * vcode == 0 : xóa thành công
12794
+ * vcode == 1 : xóa không thành công, do trong đợt phát hành đã có coupon cần phát hành, vui lòng xóa coupon khỏi đợt phát hành
12782
12795
  */
12783
12796
  deleteCouponRelease(id_coupon_release: any): Promise<unknown>;
12784
12797
  /**
@@ -12826,13 +12839,20 @@ export declare class VhQuerySales {
12826
12839
  /**
12827
12840
  * @example:
12828
12841
  * this.vhQuerySales.deleteCouponReleaseDetail("9841654DOIWSDYW235")
12829
- .then((bool)=>{
12830
- console.log('deleteCouponReleaseDetail', bool);
12842
+ .then((rsp)=>{
12843
+ console.log('deleteCouponReleaseDetail', rsp);
12844
+ if(rsp.vcode == 0){
12845
+ //phát thông báo xóa thành công
12846
+ }else if(rsp.vcode == 1){
12847
+ //phát thông báo lý do xóa ko thành công (dùng câu từ dễ hiểu với khách hàng)
12848
+ }
12831
12849
  }, error=>{
12832
12850
  console.log('error', error);
12833
12851
  })
12834
12852
  * @param id_coupon_release_detail
12835
- * @return Promise => bool = true or false
12853
+ * @return Promise => rsp = {vcode, message} / error
12854
+ * vcode == 0 : xóa thành công
12855
+ * vcode == 1 : xóa không thành công, do coupon_code của đợt phát hành chi tiết này có status !=1 (đã được đổi điểm, hoặc đã sử dụng)
12836
12856
  */
12837
12857
  deleteCouponReleaseDetail(id_coupon_release_detail: any): Promise<unknown>;
12838
12858
  /**
@@ -12864,6 +12884,7 @@ export declare class VhQuerySales {
12864
12884
  /**
12865
12885
  * hàm này để phát hành 1 coupon_code
12866
12886
  * @example:
12887
+ //truyền vào
12867
12888
  let data = {
12868
12889
  date_validity: new Date(),
12869
12890
  date_expire : new Date(),
@@ -12876,6 +12897,17 @@ export declare class VhQuerySales {
12876
12897
  }, error=>{
12877
12898
  console.log('error', error);
12878
12899
  })
12900
+ //trả về
12901
+ let data = {
12902
+ _id:'9841654DOIWSDYW235'
12903
+ status: 1,
12904
+ id_branch,
12905
+
12906
+ date_validity: new Date(),
12907
+ date_expire : new Date(),
12908
+ id_coupon_release_detail :"315KHIUHWNIUHCIYUW3187",
12909
+ id_coupon: '9841654DOIWSDYW235'
12910
+ }
12879
12911
  * @param data
12880
12912
  * @return Promise => Object
12881
12913
  */
@@ -12884,6 +12916,7 @@ export declare class VhQuerySales {
12884
12916
  * hàm này để phát hành nhiều coupon_code theo số lượng truyền vào, và tự động cập nhật trường số lượng đã phát hành (quantity_released) tăng lên
12885
12917
  * trong collection coupon_release_details
12886
12918
  * @example:
12919
+ //truyền vào
12887
12920
  let data = {
12888
12921
  date_validity: new Date(),
12889
12922
  date_expire : new Date(),
@@ -12896,7 +12929,19 @@ export declare class VhQuerySales {
12896
12929
  }, error=>{
12897
12930
  console.log('error', error);
12898
12931
  })
12932
+ //trả về
12933
+ let data = {
12934
+ _id:'9841654DOIWSDYW235'
12935
+ status: 1,
12936
+ id_branch,
12937
+
12938
+ date_validity: new Date(),
12939
+ date_expire : new Date(),
12940
+ id_coupon_release_detail :"315KHIUHWNIUHCIYUW3187",
12941
+ id_coupon: '9841654DOIWSDYW235'
12942
+ }
12899
12943
  * @param data
12944
+ * @param quantity <=20 : Dev kiểm tra trường quantity nhập vào không được lớn hơn 20
12900
12945
  * @return Promise => Array(object)
12901
12946
  */
12902
12947
  createCouponCodes(data: any, quantity: number): Promise<unknown>;
@@ -12916,7 +12961,7 @@ export declare class VhQuerySales {
12916
12961
  updateCouponCode(id_coupon_code: any, data: any): Promise<unknown>;
12917
12962
  /**
12918
12963
  * Hàm này chỉ cho phép xóa coupon_code đang ở trạng thái đã phát hành (status ==1),
12919
- * và cập nhật giảm trường số lượng quantity_released bớt một trong collection coupon_release_details
12964
+ * và cập nhật giảm trường số lượng quantity_released bớt 1 trong collection coupon_release_details
12920
12965
  * @example:
12921
12966
  * this.vhQuerySales.deleteCouponCode('OUHEOIWUYGHIQNIDOUW1359478'})
12922
12967
  .then((bool)=>{
@@ -13052,14 +13097,21 @@ export declare class VhQuerySales {
13052
13097
  updateVoucher(id_voucher: any, data: any): Promise<unknown>;
13053
13098
  /**
13054
13099
  * @example:
13055
- * this.vhQuerySales.deleteVoucher("fuMS21I6othUm34385WV")
13056
- .then((bool)=>{
13057
- console.log('deleteVoucher', bool);
13100
+ * this.vhQuerySales.deleteVoucher("9841654DOIWSDYW235")
13101
+ .then((rsp)=>{
13102
+ console.log('deleteVoucher', rsp);
13103
+ if(rsp.vcode == 0){
13104
+ //phát thông báo xóa thành công
13105
+ }else if(rsp.vcode == 1){
13106
+ //phát thông báo lý do xóa ko thành công (dùng câu từ dễ hiểu với khách hàng)
13107
+ }
13058
13108
  }, error=>{
13059
13109
  console.log('error', error);
13060
13110
  })
13061
13111
  * @param id_voucher
13062
- * @return Promise Boolean => true or false
13112
+ * @return Promise => rsp = {vcode, message} / error
13113
+ * vcode == 0 : xóa thành công
13114
+ * vcode == 1 : xóa không thành công, do voucher đã được phát hành, vui lòng xóa đợt phát hành liên quan
13063
13115
  */
13064
13116
  deleteVoucher(id_voucher: any): Promise<unknown>;
13065
13117
  /**
@@ -13119,14 +13171,21 @@ export declare class VhQuerySales {
13119
13171
  updateVoucherRelease(id_voucher_release: any, data: any): Promise<unknown>;
13120
13172
  /**
13121
13173
  * @example:
13122
- * this.vhQuerySales.deleteVoucherRelease("fuMS21I6othUm34385WV")
13123
- .then((bool)=>{
13124
- console.log('deleteVoucherRelease', bool);
13174
+ * this.vhQuerySales.deleteVoucherRelease("9841654DOIWSDYW235")
13175
+ .then((rsp)=>{
13176
+ console.log('deleteVoucherRelease', rsp);
13177
+ if(rsp.vcode == 0){
13178
+ //phát thông báo xóa thành công
13179
+ }else if(rsp.vcode == 1){
13180
+ //phát thông báo lý do xóa ko thành công (dùng câu từ dễ hiểu với khách hàng)
13181
+ }
13125
13182
  }, error=>{
13126
13183
  console.log('error', error);
13127
13184
  })
13128
13185
  * @param id_voucher_release
13129
- * @return Promise Boolean => true or false
13186
+ * @return Promise => rsp = {vcode, message} / error
13187
+ * vcode == 0 : xóa thành công
13188
+ * vcode == 1 : xóa không thành công, do trong đợt phát hành đã có voucher cần phát hành, vui lòng xóa voucher khỏi đợt phát hành
13130
13189
  */
13131
13190
  deleteVoucherRelease(id_voucher_release: any): Promise<unknown>;
13132
13191
  /**
@@ -13170,14 +13229,21 @@ export declare class VhQuerySales {
13170
13229
  addVoucherReleaseDetail(data: any): Promise<unknown>;
13171
13230
  /**
13172
13231
  * @example:
13173
- * this.vhQuerySales.deleteVoucherReleaseDetail("fuMS21I6othUm34385WV")
13174
- .then((bool)=>{
13175
- console.log('deleteVoucherReleaseDetail', bool);
13232
+ * this.vhQuerySales.deleteVoucherReleaseDetail("9841654DOIWSDYW235")
13233
+ .then((rsp)=>{
13234
+ console.log('deleteVoucherReleaseDetail', rsp);
13235
+ if(rsp.vcode == 0){
13236
+ //phát thông báo xóa thành công
13237
+ }else if(rsp.vcode == 1){
13238
+ //phát thông báo lý do xóa ko thành công (dùng câu từ dễ hiểu với khách hàng)
13239
+ }
13176
13240
  }, error=>{
13177
13241
  console.log('error', error);
13178
13242
  })
13179
13243
  * @param id_voucher_release_detail
13180
- * @return Promise Boolean => true or false
13244
+ * @return Promise => rsp = {vcode, message} / error
13245
+ * vcode == 0 : xóa thành công
13246
+ * vcode == 1 : xóa không thành công, do voucher_code của đợt phát hành chi tiết này có status !=1 (đã được đổi điểm, hoặc đã sử dụng)
13181
13247
  */
13182
13248
  deleteVoucherReleaseDetail(id_voucher_release_detail: any): Promise<unknown>;
13183
13249
  /**
@@ -13398,14 +13464,21 @@ export declare class VhQuerySales {
13398
13464
  updatePaymentCard(id_payment_card: any, data: any): Promise<unknown>;
13399
13465
  /**
13400
13466
  * @example:
13401
- * this.vhQuerySales.deletePaymentCard('FDNOIUWDHIWH21564DWQ')
13402
- .then((bool)=>{
13403
- console.log('deletePaymentCard', bool);
13467
+ * this.vhQuerySales.deletePaymentCard("9841654DOIWSDYW235")
13468
+ .then((rsp)=>{
13469
+ console.log('deletePaymentCard', rsp);
13470
+ if(rsp.vcode == 0){
13471
+ //phát thông báo xóa thành công
13472
+ }else if(rsp.vcode == 1){
13473
+ //phát thông báo lý do xóa ko thành công (dùng câu từ dễ hiểu với khách hàng)
13474
+ }
13404
13475
  }, error=>{
13405
13476
  console.log('error', error);
13406
13477
  })
13407
13478
  * @param id_payment_card
13408
- * @return Promise => bool = true or false
13479
+ * @return Promise => rsp = {vcode, message} / error
13480
+ * vcode == 0 : xóa thành công
13481
+ * vcode == 1 : xóa không thành công, do payment_card đã được phát hành, vui lòng xóa đợt phát hành liên quan
13409
13482
  */
13410
13483
  deletePaymentCard(id_payment_card: any): Promise<unknown>;
13411
13484
  /**
@@ -13458,15 +13531,21 @@ export declare class VhQuerySales {
13458
13531
  updatePaymentCardRelease(id_payment_card_release: any, data: any): Promise<unknown>;
13459
13532
  /**
13460
13533
  * @example:
13461
- * this.vhQuerySales.deletePaymentCardRelease("OIHIDUWNIDOLW123456")
13462
- .then((bool)=>{
13463
- console.log('deletePaymentCardRelease', bool);
13534
+ * this.vhQuerySales.deletePaymentCardRelease("9841654DOIWSDYW235")
13535
+ .then((rsp)=>{
13536
+ console.log('deletePaymentCardRelease', rsp);
13537
+ if(rsp.vcode == 0){
13538
+ //phát thông báo xóa thành công
13539
+ }else if(rsp.vcode == 1){
13540
+ //phát thông báo lý do xóa ko thành công (dùng câu từ dễ hiểu với khách hàng)
13541
+ }
13464
13542
  }, error=>{
13465
13543
  console.log('error', error);
13466
13544
  })
13467
13545
  * @param id_payment_card_release
13468
- * @param data
13469
- * @return Promise => boolean = true or false
13546
+ * @return Promise => rsp = {vcode, message} / error
13547
+ * vcode == 0 : xóa thành công
13548
+ * vcode == 1 : xóa không thành công, do trong đợt phát hành đã có payment_card cần phát hành, vui lòng xóa payment_card khỏi đợt phát hành
13470
13549
  */
13471
13550
  deletePaymentCardRelease(id_payment_card_release: any): Promise<unknown>;
13472
13551
  /**
@@ -13506,14 +13585,21 @@ export declare class VhQuerySales {
13506
13585
  addPaymentCardReleaseDetail(data: any): Promise<unknown>;
13507
13586
  /**
13508
13587
  * @example:
13509
- * this.vhQuerySales.deletePaymentCardReleaseDetail("OIUHFIUWHGGU41698496")
13510
- .then((bool)=>{
13511
- console.log('deletePaymentCardReleaseDetail', bool);
13588
+ * this.vhQuerySales.deletePaymentCardReleaseDetail("9841654DOIWSDYW235")
13589
+ .then((rsp)=>{
13590
+ console.log('deletePaymentCardReleaseDetail', rsp);
13591
+ if(rsp.vcode == 0){
13592
+ //phát thông báo xóa thành công
13593
+ }else if(rsp.vcode == 1){
13594
+ //phát thông báo lý do xóa ko thành công (dùng câu từ dễ hiểu với khách hàng)
13595
+ }
13512
13596
  }, error=>{
13513
13597
  console.log('error', error);
13514
13598
  })
13515
13599
  * @param id_payment_card_release_detail
13516
- * @return Promise => bool = true or false
13600
+ * @return Promise => rsp = {vcode, message} / error
13601
+ * vcode == 0 : xóa thành công
13602
+ * vcode == 1 : xóa không thành công, do payment_card_code của đợt phát hành chi tiết này có status !=1 (đã được đổi điểm, hoặc đã sử dụng)
13517
13603
  */
13518
13604
  deletePaymentCardReleaseDetail(id_payment_card_release_detail: any): Promise<unknown>;
13519
13605
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ionic-vhframeworks",
3
- "version": "4.2.0",
3
+ "version": "4.2.1",
4
4
  "peerDependencies": {},
5
5
  "dependencies": {
6
6
  "tslib": "^2.0.0"