ionic-vhframeworks 4.1.6 → 4.1.9

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.
@@ -434,7 +434,7 @@ export declare class VhAuth {
434
434
  private initializeDB;
435
435
  /**
436
436
  * @example:
437
- * this.vhAuth.initializeProject('vhsales','firebase-mongo','research','research', 394637, 'all');
437
+ * this.vhAuth.initializeProject('vhsales','firebase-mongo','research','research', 324852, 'all');
438
438
  * @param projectname
439
439
  * @param dbstorage
440
440
  * @param dbserverversion
@@ -446,7 +446,7 @@ export declare class VhAuth {
446
446
  initializeProject(projectname: string, dbstorage: string, dbserverversion: string, camserverversion: string, fwcode: number, database: string): any;
447
447
  /**
448
448
  * @example:
449
- * this.vhAuth.initializeWebAppProject('vhsales', 394637, 'all');
449
+ * this.vhAuth.initializeWebAppProject('vhsales', 356842, 'all');
450
450
  * @param projectname
451
451
  * @param fwcode
452
452
  * @param database : tất cả database 'all' hoặc một database nào đó '4wk3JMSwSjh4kOLWOMbLbWt0Rdk2'
@@ -529,6 +529,8 @@ export declare class VhAuth {
529
529
  */
530
530
  refreshLocalMyPermission(): Promise<unknown>;
531
531
  /**
532
+ * Hàm này chỉ trả về kết quả chính xác khi mà các permission_name có giá trị trả về là kiểu boolean
533
+ * Hàm checkMyPermission tương đương hàm checkLocalMyPermissionName, sau này sẽ bỏ hàm checkMyPermission
532
534
  * @example:
533
535
  if(this.VhQuerySales.checkMyPermission('login_enable_login')){
534
536
  this.login();
@@ -557,6 +559,17 @@ export declare class VhAuth {
557
559
  * @return number/string/object
558
560
  */
559
561
  getLocalMyPermissionName(permission_name: any): any;
562
+ /**
563
+ * @example:
564
+ this.VhQuerySales.updatePermission('2rVieBQTubQ2hjUnpwU4w7qSlD83',{login_enable_login: false, default_display_page: 'admin_display_page'})
565
+ .then((result)=>{
566
+ console.log(result);
567
+ })
568
+ * @format value = {login_enable_login:true} or value = {login_reset_password:true}
569
+ * @param value
570
+ * @return Promise Boolean => true or false
571
+ */
572
+ updateMyPermission(value: object): Promise<unknown>;
560
573
  /**
561
574
  * @example:
562
575
  this.VhQuerySales.updatePermission('2rVieBQTubQ2hjUnpwU4w7qSlD83',{login_enable_login: false})
@@ -567,7 +580,7 @@ export declare class VhAuth {
567
580
  * @param value
568
581
  * @return Promise Boolean => true or false
569
582
  */
570
- updatePermission(id_employee: any, value: any): Promise<unknown>;
583
+ updatePermission(id_employee: string, value: object): Promise<unknown>;
571
584
  /**
572
585
  * Hàm này lấy về phân quyền của nhân viên
573
586
  * Lưu ý không dùng hàm này cho Boss, vì Boss không bị giới hạn phân quyền
@@ -7826,6 +7839,28 @@ export declare class VhQuerySales {
7826
7839
  private callbacksyncopeningbill;
7827
7840
  private sync_code;
7828
7841
  constructor(vhmongo_firebase: Vhmongo_firebase, vhQuery: VhQuery, vhAuth: VhAuth, vhAlgorithm: VhAlgorithm, iap2: InAppPurchase2, platform: Platform);
7842
+ /**
7843
+ * Hàm này lấy về các trường trong phạm vi quản lý bán hàng trong cài đặt
7844
+ * @example:
7845
+ * let branch_management_scope = this.vhQuerySales.getBranch_Management_Scope();
7846
+ * @return Object = {product_scope, employee_scope, customer_scope, supplier_scope, sales_program_scope}
7847
+ * => true áp dụng cho toàn chi nhánh, false áp dụng riêng cho từng chi nhánh
7848
+ */
7849
+ getBranch_Management_Scope(): any;
7850
+ /**
7851
+ * Hàm này cấp nhật lại các trường trong phạm vi quản lý bán hàng trong cài đặt
7852
+ * @example:
7853
+ * this.vhQuerySales.updateBranch_Management_Scope({product_scope:1, employee_scope:1, customer_scope:1, supplier_scope:1, sales_program_scope:2})
7854
+ .then(()=>{
7855
+ console.log('updateBranch_Management_Scope');
7856
+ }, error=>{
7857
+ reject(error);
7858
+ })
7859
+ * @param value = {product_scope, employee_scope, customer_scope, supplier_scope, sales_program_scope}
7860
+ * true áp dụng cho toàn chi nhánh, false áp dụng riêng cho từng chi nhánh
7861
+ * @return Promise => udefined/error
7862
+ */
7863
+ updateBranch_Management_Scope(value: any): Promise<unknown>;
7829
7864
  /**
7830
7865
  * @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)
7831
7866
  * @example
@@ -9205,6 +9240,39 @@ export declare class VhQuerySales {
9205
9240
  * @return Promise => array(object) = [{},{},..]
9206
9241
  */
9207
9242
  getCustomers(): Promise<unknown>;
9243
+ /**
9244
+ * Hàm này dùng để xóa hoặc đặt lại điểm mới cho khách hàng
9245
+ * @example:
9246
+ * this.vhQuerySales.updateCustomer_byEarnedPoints('5fb6780ca2148e09806c5b01', 1000)
9247
+ .then((bool)=>{
9248
+ console.log('updateCustomer_byEarnedPoints', bool);
9249
+ })
9250
+ * @param _id
9251
+ * @param points
9252
+ * @return Promise => bool = true or false
9253
+ */
9254
+ updateCustomer_byPoints(_id: string, points: number): Promise<unknown>;
9255
+ /**
9256
+ * Hàm này thêm điểm mới kiếm được vào quỹ điểm khách hàng đang có
9257
+ * points = points(tích được trên bill) - point (sử dụng thanh toán trên bill)
9258
+ * @example:
9259
+ * this.vhQuerySales.updateCustomer_byEarnedPoints('5fb6780ca2148e09806c5b01', 200)
9260
+ .then((bool)=>{
9261
+ console.log('updateCustomer_byEarnedPoints', bool);
9262
+ })
9263
+ * @param _id
9264
+ * @param points
9265
+ * @return Promise => bool = true or false
9266
+ */
9267
+ updateCustomer_byEarnedPoints(_id: string, points: number): Promise<unknown>;
9268
+ /**
9269
+ * Hàm này trả về điểm của khách hàng theo phạm vị chương trình bán hàng là toàn chi nhánh hay là từng chi nhánh
9270
+ * @example:
9271
+ * let customer = this.vhQuerySales.getlocalCustomer_byPoints('5fb6780ca2148e09806c5b01');
9272
+ * @param id_customer
9273
+ * @return Object => obj = {} or null
9274
+ */
9275
+ getlocalCustomerPoints(id_customer: any): any;
9208
9276
  private publishObservableEventSuppliers;
9209
9277
  private observableLocalSuppliers;
9210
9278
  /**
@@ -11486,7 +11554,7 @@ export declare class VhQuerySales {
11486
11554
  getLocalAppSettingNameStations(): any[];
11487
11555
  /**
11488
11556
  * @example:
11489
- let appsetting = this.vhQuerySales.getLocalAppSettingNameStation('info_header_footer_bill');
11557
+ let appsetting = this.vhQuerySales.getLocalAppSettingNameStation('info_header_footer_bill'); //printer_config_selling_page
11490
11558
  console.log(appsetting);
11491
11559
  * @param appsetting_name
11492
11560
  * @return object => {title:'title',name:'name', quantity: 10}
@@ -11538,17 +11606,17 @@ export declare class VhQuerySales {
11538
11606
  private publishObservableEventAppSettingNameBranchs;
11539
11607
  private observableLocalAppSettingNameBranchs;
11540
11608
  /**
11541
- * Các hàm AppSettingNameBranchs thêm, xóa, sửa thông tin (dạng object) riêng giữa các chi nhánh, như: thông tin cửa hang
11542
- * @example:
11543
- * this.observableAppSettingName = this.vhQuerySales.getObservableLocalAppSettingNameBranchs().subscribe(() => {
11544
- let store_info = this.vhQuerySales.getLocalAppSettingNameBranch('store_info');
11545
- console.log(store_info);
11546
- })
11547
- ngOnDestroy(){
11548
- this.observableAppSettingName.unsubscribe();
11549
- }
11550
- * @returns Observerble (Array) => Array(object) => array = [{},{},...]
11551
- */
11609
+ * Các hàm AppSettingNameBranchs thêm, xóa, sửa thông tin (dạng object) riêng giữa các chi nhánh, như: thông tin cửa hang
11610
+ * @example:
11611
+ * this.observableAppSettingName = this.vhQuerySales.getObservableLocalAppSettingNameBranchs().subscribe(() => {
11612
+ let store_info = this.vhQuerySales.getLocalAppSettingNameBranch('store_info');
11613
+ console.log(store_info);
11614
+ })
11615
+ ngOnDestroy(){
11616
+ this.observableAppSettingName.unsubscribe();
11617
+ }
11618
+ * @returns Observerble (Array) => Array(object) => array = [{},{},...]
11619
+ */
11552
11620
  getObservableLocalAppSettingNameBranchs(): Observable<unknown>;
11553
11621
  /**
11554
11622
  *@example:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ionic-vhframeworks",
3
- "version": "4.1.6",
3
+ "version": "4.1.9",
4
4
  "peerDependencies": {},
5
5
  "dependencies": {
6
6
  "tslib": "^2.0.0"