ionic-vhframeworks 3.9.4 → 3.9.7

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.
@@ -404,6 +404,15 @@ export declare class VhAuth {
404
404
  * @returns
405
405
  */
406
406
  initializeProject(projectname: string, dbstorage: string, dbserverversion: string, camserverversion: string, fwcode: number, database: string): any;
407
+ /**
408
+ * @example:
409
+ * this.vhAuth.initializeWebAppProject('vhsales', 394637, 'all');
410
+ * @param projectname
411
+ * @param fwcode
412
+ * @param database : tất cả database 'all' hoặc một database nào đó '4wk3JMSwSjh4kOLWOMbLbWt0Rdk2'
413
+ * @returns
414
+ */
415
+ initializeWebAppProject(projectname: string, fwcode: number, database: string): any;
407
416
  /**
408
417
  * @example:
409
418
  * this.vhAuth.runOnMGDBServerVersion();
@@ -1100,7 +1109,7 @@ export declare class VhQueryCafe {
1100
1109
  /**
1101
1110
  * @description: hàm này lấy về những hạn chế của gói main_package (khách trả phí mua gói sử dụng các chức năng CHÍNH, mỗi gói sẽ có nhưng hạn chế khác nhau về user_number, show_report_duration)
1102
1111
  * @example
1103
- * this.refreshLocalRestrictionMainPackage()
1112
+ * this.vhQueryCafe.refreshLocalRestrictionMainPackage()
1104
1113
  .then((bool)=>{
1105
1114
  console.log('bool', bool);
1106
1115
  })
@@ -3316,11 +3325,208 @@ export declare class VhQueryCafe {
3316
3325
  * @notice : hàm này chỉ dùng xóa những bill_type(7,8,11,12) mà không có phát sinh bill_detail
3317
3326
  */
3318
3327
  deleteBill(id_bill: any): Promise<unknown>;
3328
+ /**
3329
+ * @example:
3330
+ * this.vhQueryCafe.createPaymentVnpay(10000, 'Thanh toan hoa don so A7TG2004, vao luc: 2021-11-19 13:11:27', 'o0wEpPDhR8QiGDkp2hLG', 'http://localhost:4200/')
3331
+ * @param amount
3332
+ * @param orderDescription (lưu ý chữ không dấu)
3333
+ * @param id_payment
3334
+ * @param backHref : lấy link mà chạy khởi động lại trang
3335
+ */
3336
+ createPaymentVnpay(amount: number, orderDescription: string, id_payment: string, backHref: string): any;
3337
+ /**
3338
+ * @example:
3339
+ * let data = {
3340
+ date: new Date(),
3341
+ payment_type: 5, //1 lưu (khách đã thanh toán cho vnpay); 5 lưu tạm (khách chưa thanh toán vnpay), hệ thống sẽ tự động xóa những payment này hoặc trên giao diện hiện ra cho khách tự xóa
3342
+ payment: 990.000,
3343
+ tax: 0,
3344
+ total: 990.000
3345
+ }
3346
+ * this.vhQueryCafe.createPayment(data)
3347
+ .then((payment)=>{
3348
+ console.log('createPayment', payment);
3349
+ },error=>{
3350
+ console.log('error', error);
3351
+ })
3352
+ * payment = {
3353
+ _id,
3354
+ payment_code,
3355
+ id_store,
3356
+ invalid,
3357
+
3358
+ date
3359
+ payment_type,
3360
+ payment,
3361
+ tax,
3362
+ total
3363
+ }
3364
+ * @param payment : object
3365
+ * @return Promise => payment = {} / error
3366
+ * Luu ý: chỉ có 2 trường hợp, hoặc là thêm thành công, hoặc là báo lỗi error
3367
+ * @notice : hàm này chỉ dùng tạo những bill_type mà không có phát sinh bill_detail
3368
+ */
3369
+ createPayment(data: any): Promise<unknown>;
3370
+ /**
3371
+ * @example:
3372
+ * this.vhQueryCafe.updatePayment('5fb6780ca2148e09806c5b01', {total:990000})
3373
+ .then((response)=>{
3374
+ console.log('updatePayment', response);
3375
+ }, error=>{
3376
+ console.log('error', error);
3377
+ })
3378
+ * @param id_payment
3379
+ * @param value
3380
+ * @return Promise => response = undefined / error
3381
+ */
3382
+ updatePayment(id_payment: string, value: any): Promise<unknown>;
3383
+ /**
3384
+ * @example:
3385
+ * this.vhQueryCafe.deletePayment('5fb67fda87c0f21d484cbdf3')
3386
+ .then((response)=>{
3387
+ console.log('deleteBill', response);
3388
+ }, error=>{
3389
+ console.log(error, error);
3390
+ })
3391
+ * @param id_payment
3392
+ * @return Promise => response = undefined / error
3393
+ */
3394
+ deletePayment(id_payment: any): Promise<unknown>;
3395
+ /**
3396
+ * @example:
3397
+ * let time = new Date();
3398
+ * time.setDate(time.getDate()-7);
3399
+ * this.vhQueryCafe.getPayments({id_store: {$eq: this.vhAuth.getUser()._id}, payment_type:{$eq:5}}, {},{},0)
3400
+ .then((payments)=>{
3401
+ console.log('getPayments', payments);
3402
+ })
3403
+ * @param query
3404
+ * @param projection — đang tìm hiểu, tạm thời để giá trị là {}
3405
+ * @param sort — null hoặc {}:không sắp xếp; {date:1}: sắp xếp theo ASC; {date:-1}: sắp xếp theo DESC
3406
+ * @param limit — null hoặc 0: không giới hạn record get về; 2: get về 2 record
3407
+ * @return — Array -> array = [{},{},...]
3408
+ */
3409
+ getPayments(query: object, projection?: object, sort?: object, limit?: number): Promise<unknown>;
3410
+ /**
3411
+ * @example:
3412
+ * this.vhQueryCafe.getPayment('5fb67fda87c0f21d484cbdf3')
3413
+ .then((payment)=>{
3414
+ console.log('getPayment', payment);
3415
+ })
3416
+ * @param id_payment
3417
+ * @return Promise => payment ={} or null / error
3418
+ */
3419
+ getPayment(id_payment: any): Promise<unknown>;
3420
+ /**
3421
+ * @example:
3422
+ let payment_detail_main = {
3423
+ id_branch: 'AEUWSWZXA4iHv8BmCNz2', //khách chọn
3424
+ id_payment: '5D4XGdZ2q5XLnOUa0mMx', //payment._id
3425
+ id_restriction: 'main_package_advanced', //package.id_restriction
3426
+ id_package: 'main_package_advanced_1month', //có được khi khách chọn gói để mua
3427
+ package_type: 1, //package.package_type,
3428
+ day: 31, //package.day,
3429
+ tax: 0, package.tax,
3430
+ price: 99000, package.price,
3431
+ quantity: 1, //khách chọn
3432
+ payment_detail_type: 1, //1: gói gia hạng mới, 2: gói nâng cấp, 3: gói kéo dài thêm thời gian
3433
+ }
3434
+ this.vhQueryCafe.createPayment_Detail({})
3435
+ .then((payment_detail)=>{
3436
+ console.log('createPayment_Detail', payment_detail);
3437
+ },error=>{
3438
+ console.log('error', error);
3439
+ })
3440
+ payment_detail = {
3441
+ _id,
3442
+ id_store,
3443
+ payment_type,
3444
+ activating,
3445
+ invalid,
3446
+ date,
3447
+
3448
+ id_branch,
3449
+ id_payment,
3450
+ id_restriction,
3451
+ id_package,
3452
+ package_type,
3453
+ payment_type,
3454
+ payment_detail_type,
3455
+ day,
3456
+ tax,
3457
+ price,
3458
+ quantity
3459
+ }
3460
+ * @param data
3461
+ * @return Promise => response = {} / error
3462
+ * Luu ý: chỉ có 2 trường hợp, hoặc là thêm thành công, hoặc là báo lỗi error
3463
+ */
3464
+ createPayment_Detail(data: any): any;
3465
+ /**
3466
+ * @example:
3467
+ * this.vhQueryCafe.updatePayment_Detail('5fb6780ca2148e09806c5b01', {name:'Khuyến mãi 12/12'})
3468
+ .then((response)=>{
3469
+ console.log('updatePayment_Detail', response);
3470
+ },error=>{
3471
+ reject(error);
3472
+ })
3473
+ * @param id_payment_detail
3474
+ * @param value
3475
+ * @return Promise => response = undefined / error
3476
+ */
3477
+ updatePayment_Detail(id_payment_detail: string, value: object): Promise<unknown>;
3478
+ /**
3479
+ * @example:
3480
+ * let time = new Date();
3481
+ * time.setDate(time.getDate()-7);
3482
+ * this.vhQueryCafe.getPayment_details({id_payment:{$eq:'5fb67fda87c0f21d484cbdf3'}}, {},{},0)
3483
+ .then((payment_details)=>{
3484
+ console.log('getPayment_details', payment_details);
3485
+ })
3486
+ * @param query
3487
+ * @param projection — đang tìm hiểu, tạm thời để giá trị là {}
3488
+ * @param sort — null hoặc {}:không sắp xếp; {date:1}: sắp xếp theo ASC; {date:-1}: sắp xếp theo DESC
3489
+ * @param limit — null hoặc 0: không giới hạn record get về; 2: get về 2 record
3490
+ * @return Promise Array => array = [{},{},...] / error
3491
+ */
3492
+ getPayment_details(query: object, projection?: object, sort?: object, limit?: number): Promise<unknown>;
3493
+ /**
3494
+ * @example:
3495
+ * this.vhQueryCafe.getPayment_detail('5fb67fda87c0f21d484cbdf3')
3496
+ .then((payment_detail)=>{
3497
+ console.log('getPayment_detail', payment_detail);
3498
+ })
3499
+ * @param id_payment_detail
3500
+ * @return Promise => payment_detail ={} or null / error
3501
+ */
3502
+ getPayment_detail(id_payment_detail: any): Promise<unknown>;
3503
+ /**
3504
+ * @example:
3505
+ * this.vhQueryCafe.deletePayment_Detail('5fb67fda87c0f21d484cbdf3')
3506
+ .then((response)=>{
3507
+ console.log('deletePayment_Detail', response);
3508
+ },error=>{
3509
+ reject(error);
3510
+ })
3511
+ * @param id_payment_detail
3512
+ * @return Promise => Promise => response = undefined / error
3513
+ */
3514
+ deletePayment_Detail(id_payment_detail: string): Promise<unknown>;
3515
+ /**
3516
+ * @example:
3517
+ * this.vhQueryCafe.getPackage('5fb67fda87c0f21d484cbdf3')
3518
+ .then((package)=>{
3519
+ console.log('getPackage', package);
3520
+ })
3521
+ * @param id_package
3522
+ * @return Promise => package ={} or null / error
3523
+ */
3524
+ getPackage(id_package: any): Promise<unknown>;
3319
3525
  private publishObservableEventPromotions;
3320
3526
  private observableLocalPromotions;
3321
3527
  /**
3322
3528
  * @example:
3323
- * this.observablePromotion = this.vhQuerySales.getObservableLocalPromotions().subscribe((localPromotions:any) => {
3529
+ * this.observablePromotion = this.vhQueryCafe.getObservableLocalPromotions().subscribe((localPromotions:any) => {
3324
3530
  do something...
3325
3531
  })
3326
3532
 
@@ -7351,9 +7557,9 @@ export declare class VhQuerySales {
7351
7557
  /**
7352
7558
  * @description: hàm này lấy về những hạn chế của gói main_package (khách trả phí mua gói sử dụng các chức năng CHÍNH, mỗi gói sẽ có nhưng hạn chế khác nhau về user_number, show_report_duration)
7353
7559
  * @example
7354
- * this.refreshLocalRestrictionMainPackage()
7355
- .then((bool)=>{
7356
- console.log('bool', bool);
7560
+ * this.vhQuerySales.refreshLocalRestrictionMainPackage()
7561
+ .then(()=>{
7562
+ let restriction_main_package = this.vhQuerySales.getLocalRestrictionMainPackage();
7357
7563
  })
7358
7564
  * @return Promise => null/error
7359
7565
  */
@@ -7368,7 +7574,7 @@ export declare class VhQuerySales {
7368
7574
  /**
7369
7575
  * @description: hàm này lấy về những hạn chế của gói ecommerce_package (khách trả phí mua gói sử dụng TMĐT, mỗi gói sẽ có nhưng hạn chế khác nhau về shop_number, show_report_duration)
7370
7576
  * @example
7371
- * this.refreshLocalRestrictionEcommercePackage()
7577
+ * this.vhQuerySales.refreshLocalRestrictionEcommercePackage()
7372
7578
  .then((bool)=>{
7373
7579
  console.log('bool', bool);
7374
7580
  })
@@ -7385,7 +7591,7 @@ export declare class VhQuerySales {
7385
7591
  /**
7386
7592
  * @description: hàm này lấy về những hạn chế của gói facebook_package (khách trả phí mua gói sử dụng facebook, mỗi gói sẽ có nhưng hạn chế khác nhau về fanpage_number, show_report_duration)
7387
7593
  * @example
7388
- * this.refreshLocalRestrictionFacebookPackage()
7594
+ * this.vhQuerySales.refreshLocalRestrictionFacebookPackage()
7389
7595
  .then((bool)=>{
7390
7596
  console.log('bool', bool);
7391
7597
  })
@@ -10289,6 +10495,15 @@ export declare class VhQuerySales {
10289
10495
  * @notice : hàm này chỉ dùng xóa những bill_type (7,8,11,12) mà không có phát sinh bill_detail
10290
10496
  */
10291
10497
  deleteBill(id_bill: any): Promise<unknown>;
10498
+ /**
10499
+ * @example:
10500
+ * this.vhQuerySales.createPaymentVnpay(10000, 'Thanh toan hoa don so A7TG2004, vao luc: 2021-11-19 13:11:27', 'o0wEpPDhR8QiGDkp2hLG', 'http://localhost:4200/')
10501
+ * @param amount
10502
+ * @param orderDescription (lưu ý chữ không dấu)
10503
+ * @param id_payment
10504
+ * @param backHref : lấy link mà chạy khởi động lại trang
10505
+ */
10506
+ createPaymentVnpay(amount: number, orderDescription: string, id_payment: string, backHref: string): any;
10292
10507
  /**
10293
10508
  * @example:
10294
10509
  * let data = {
@@ -14259,7 +14474,7 @@ export declare class VhQuerySmhome {
14259
14474
  addComponent(data: object): Promise<unknown>;
14260
14475
  /**
14261
14476
  * @example:
14262
- * this.VhQuerySmhome.updateComponent('5fb6780ca2148e09806c5b01', {quantity:400})
14477
+ * this.vhQuerySmhome.updateComponent('5fb6780ca2148e09806c5b01', {quantity:400})
14263
14478
  .then((bool)=>{
14264
14479
  console.log('updateComponent', bool);
14265
14480
  })
@@ -14270,7 +14485,7 @@ export declare class VhQuerySmhome {
14270
14485
  updateComponent(id_component: string, data: object): Promise<unknown>;
14271
14486
  /**
14272
14487
  * @example:
14273
- * this.VhQuerySmhome.deleteComponent('5fb67fda87c0f21d484cbdf3')
14488
+ * this.vhQuerySmhome.deleteComponent('5fb67fda87c0f21d484cbdf3')
14274
14489
  .then((bool)=>{
14275
14490
  console.log('deleteComponent', bool);
14276
14491
  })
@@ -14280,7 +14495,7 @@ export declare class VhQuerySmhome {
14280
14495
  deleteComponent(id_component: string): Promise<unknown>;
14281
14496
  /**
14282
14497
  * @example
14283
- * this.VhQuerySmhome.getComponent('5fb67fda87c0f21d484cbdf3')
14498
+ * this.vhQuerySmhome.getComponent('5fb67fda87c0f21d484cbdf3')
14284
14499
  .then((component)=>{
14285
14500
  console.log('getComponent', component);
14286
14501
  })
@@ -14290,13 +14505,78 @@ export declare class VhQuerySmhome {
14290
14505
  getComponent(id_component: string): Promise<unknown>;
14291
14506
  /**
14292
14507
  * @example
14293
- * this.VhQuerySmhome.getComponents()
14508
+ * this.vhQuerySmhome.getComponents()
14294
14509
  .then((components)=>{
14295
14510
  console.log('getComponents', components);
14296
14511
  })
14297
14512
  * @return Promise => array(object) = [{},{},..]
14298
14513
  */
14299
14514
  getComponents(): Promise<unknown>;
14515
+ /**
14516
+ * @example:
14517
+ * let data = {
14518
+ * name: 'TCL',
14519
+ * code_type: 10,
14520
+ * type: 1
14521
+ * }
14522
+ * this.vhQuerySmhome.addIRManufacturer_byID('5fb6780ca2148e09806c5b01', data)
14523
+ .then((IRmanufacturer)=>{
14524
+ console.log('addIRManufacturer', IRmanufacturer);
14525
+ },error=>{
14526
+ console.log('error', error);
14527
+ })
14528
+ * @param id_IRmanufacturer
14529
+ * @param data : {}
14530
+ * @return Promise => obj = {} /error
14531
+ * Luu ý: chỉ có 2 trường hợp, hoặc là thêm thành công, hoặc là báo lỗi error
14532
+ */
14533
+ addIRManufacturer_byID(id_IRmanufacturer: string, data: object): Promise<unknown>;
14534
+ /**
14535
+ * @example:
14536
+ * this.vhQuerySmhome.updateIRManufacturer('5fb6780ca2148e09806c5b01', {code_type: 9})
14537
+ .then(()=>{
14538
+ console.log('updateIRManufacturer');
14539
+ }, error=>{
14540
+ console.log('error');
14541
+ })
14542
+ * @param id_IRmanufacturer
14543
+ * @param value : {}
14544
+ * @return Promise => response = undefined / error
14545
+ */
14546
+ updateIRManufacturer(id_IRmanufacturer: string, value: object): Promise<unknown>;
14547
+ /**
14548
+ * @example:
14549
+ * this.vhQuerySmhome.deleteIRManufacturer('5fb67fda87c0f21d484cbdf3')
14550
+ .then(()=>{
14551
+ console.log('deleteIRManufacturer');
14552
+ })
14553
+ * @param id_IRmanufacturer
14554
+ * @return Promise => response = undefined / error
14555
+ */
14556
+ deleteIRManufacturer(id_IRmanufacturer: string): Promise<unknown>;
14557
+ /**
14558
+ * @example
14559
+ * this.vhQuerySmhome.getIRManufacturer('5fb67fda87c0f21d484cbdf3')
14560
+ .then((IRmanufacturer)=>{
14561
+ console.log('getIRManufacturer', IRmanufacturer);
14562
+ },error=>{
14563
+ console.log('error', error);
14564
+ })
14565
+ * @param id_IRmanufacturer
14566
+ * @return Promise => response ={} or null / error
14567
+ */
14568
+ getIRManufacturer(id_IRmanufacturer: string): Promise<unknown>;
14569
+ /**
14570
+ * @example
14571
+ * this.vhQuerySmhome.getIRManufacturers(1)
14572
+ .then((IRmanufacturers)=>{
14573
+ console.log('getIRManufacturers', IRmanufacturers);
14574
+ }, error=>{
14575
+ console.log(error, error);
14576
+ })
14577
+ * @return Promise => array(object) = [{},{},..]
14578
+ */
14579
+ getIRManufacturers(type: number): Promise<unknown>;
14300
14580
  private publishObservableEventIcons;
14301
14581
  private observableLocalIcons;
14302
14582
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ionic-vhframeworks",
3
- "version": "3.9.4",
3
+ "version": "3.9.7",
4
4
  "peerDependencies": {},
5
5
  "dependencies": {
6
6
  "tslib": "^2.0.0"