ionic-vhframeworks 10.10.4 → 10.10.6

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.
@@ -2943,6 +2943,79 @@ export declare class VhQuery {
2943
2943
  static ɵfac: i0.ɵɵFactoryDeclaration<VhQuery, never>;
2944
2944
  static ɵprov: i0.ɵɵInjectableDeclaration<VhQuery>;
2945
2945
  }
2946
+ export declare class VhQueryCafeMenu {
2947
+ private vhMGDB_auth;
2948
+ private vhMGDB_database;
2949
+ private vhMGDB_rootdatabase;
2950
+ private vhMGDB_socketMongoDB;
2951
+ private vhMGDB_paymentVNPAY;
2952
+ private vhQuery;
2953
+ private vhAuth;
2954
+ private vhAlgorithm;
2955
+ private vhDisplayLEDService;
2956
+ private vhIDDB_database;
2957
+ private hwinfo;
2958
+ private branchs;
2959
+ private tables;
2960
+ private products;
2961
+ private detailproducts;
2962
+ private rawproducts;
2963
+ constructor(vhMGDB_auth: VhMGDB_auth, vhMGDB_database: VhMGDB_database, vhMGDB_rootdatabase: VhMGDB_rootdatabase, vhMGDB_socketMongoDB: VhMGDB_socketMongoDB, vhMGDB_paymentVNPAY: VhMGDB_paymentVNPAY, vhQuery: VhQuery, vhAuth: VhAuth, vhAlgorithm: VhAlgorithm, vhDisplayLEDService: VhDisplayLEDService, vhIDDB_database: VhIDDB_database);
2964
+ /**
2965
+ * @example:
2966
+ this.vhQueryCafeMenu.syncCollections_Sales365_Desktop().then((bool:any)=>{
2967
+ if(bool){
2968
+ do something...
2969
+ }
2970
+ })
2971
+ * @returns Promise bool = true or false
2972
+ */
2973
+ private syncCollections_Sales365_Web;
2974
+ private getLocalLiveIndexDB;
2975
+ /**
2976
+ * Khi lấy obj từ database về, hàm syncRaw_Detail_ProductInsert sẽ đồng bộ obj vào 3 loại local rawproducts, detailproducts và products
2977
+ * (3 loại dữ liệu local đc fw sử dụng để tính toán hoặc trả về cho frontend khi cần), dùng cho type =3
2978
+ * @example:
2979
+ * this.syncRaw_Detail_ProductInsert(obj);
2980
+ * @param obj
2981
+ */
2982
+ private syncRaw_Detail_ProductInsert;
2983
+ /**
2984
+ * vhQueryCafeMenu
2985
+ */
2986
+ private syncRaw_Detail_ProductUpdate;
2987
+ /**
2988
+ * Mỗi lần khách quét mã QR tại bàn để order món thì dùng hàm này để đăng nhập
2989
+ * @example:
2990
+ * this.vhQueryCafeMenu.signInWithEmailAndPassword_Sales365_byTokenTable('eyJ1aWQiOiJCVFozQ1d0UjB4WmpwVXBjWXBkOWZDV3VYOTczIiwiaWRfdGFibGUiOiJDY0NBdmwzMlV5MTc4R')
2991
+ .then((rsp)=>{
2992
+ if(rsp.vcode===0){
2993
+ let store = rsp.data
2994
+ }else if(rsp.vcode===1){
2995
+ console.log('Token không tồn tại trên hệ thống');
2996
+ }
2997
+ },(error:any)=>{
2998
+ console.log('error', error);
2999
+ })
3000
+ * @param token
3001
+ * @return Promise => rsp ={vcode, message, data(object or null)} / error
3002
+ * vcode === 0: Đăng nhập thành công
3003
+ * vcode === 1: Đăng nhập thất bại vì Token không tồn tại trên hệ thống
3004
+ */
3005
+ signInWithEmailAndPassword_Sales365_byTokenTable(token: string): Promise<any>;
3006
+ /**
3007
+ * @example:
3008
+ * let table = this.vhQueryCafeMenu.getlocalTable('5fb6780ca2148e09806c5b01');
3009
+ * @param id_table
3010
+ * @return Object => obj = {} or null
3011
+ */
3012
+ getlocalTable(): any;
3013
+ setDefaultBranch(id_branch: any): void;
3014
+ getDefaultBranch(): any;
3015
+ clearDefaultBranch(): void;
3016
+ static ɵfac: i0.ɵɵFactoryDeclaration<VhQueryCafeMenu, never>;
3017
+ static ɵprov: i0.ɵɵInjectableDeclaration<VhQueryCafeMenu>;
3018
+ }
2946
3019
  export declare class VhQueryCafe {
2947
3020
  private vhMGDB_auth;
2948
3021
  private vhMGDB_database;
@@ -3534,6 +3607,17 @@ export declare class VhQueryCafe {
3534
3607
  * @return array(object) = [{},{},..]
3535
3608
  */
3536
3609
  getTables(): Promise<unknown>;
3610
+ /**
3611
+ * Hàm tạo token cho mỗi bàn, mỗi lần tạo sinh ra một token mới, token cũ sẽ không còn giá trị
3612
+ * @example
3613
+ * this.vhQueryCafe.createTokenTable('5fb67fda87c0f21d484cbdf3')
3614
+ .then((table)=>{
3615
+ console.log('table', table);
3616
+ })
3617
+ * @param id_table
3618
+ * @return string
3619
+ */
3620
+ createTokenTable(id_table: string): Promise<unknown>;
3537
3621
  private publishObservableEventProducts;
3538
3622
  private observableLocalProducts;
3539
3623
  /**
@@ -18798,7 +18882,7 @@ export declare class VhQuerySales {
18798
18882
  * @return Promise Array
18799
18883
  * @Notice bill_type = [1,10,15,30,2,3,9,31]
18800
18884
  */
18801
- getReportInputOutputInventory_byEndTime_byIDProduct1(endtime: any, IDsub_or_product: any, IDbranch: string): Promise<any>;
18885
+ getReportInputOutputInventory_byEndTime_byIDProduct(endtime: any, IDsub_or_product: any, IDbranch: string): Promise<any>;
18802
18886
  /**
18803
18887
  * Hàm này dùng trong bán hàng cần xem tồn kho đầu tháng, đầu tuần, đầu ngày và cuối ngày của 1 sản phẩm
18804
18888
  * @example:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ionic-vhframeworks",
3
- "version": "10.10.4",
3
+ "version": "10.10.6",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^12.2.0",
6
6
  "@angular/core": "^12.2.0"