ionic-vhframeworks 9.7.9 → 9.8.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.
@@ -2553,6 +2553,14 @@ export declare class VhQueryCafe {
2553
2553
  * @returns void
2554
2554
  */
2555
2555
  closeSyncCollections(): void;
2556
+ /**
2557
+ * 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
2558
+ * (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
2559
+ * @example:
2560
+ * this.syncRaw_Detail_ProductInsert(obj);
2561
+ * @param obj
2562
+ */
2563
+ private syncRaw_Detail_ProductInsert;
2556
2564
  /**
2557
2565
  * VhQueryCafe
2558
2566
  * @returns
@@ -3070,6 +3078,17 @@ export declare class VhQueryCafe {
3070
3078
  * @return array(object) = [{},{},..]
3071
3079
  */
3072
3080
  getProducts(): Promise<unknown>;
3081
+ /**
3082
+ * Hàm lấy chi tiết sản phẩm dựa vào id sản phẩm hoặc id sản phẩm con
3083
+ * @example
3084
+ * this.vhQueryCafe.getDetailProduct('5fb67fda87c0f21d484cbdf3')
3085
+ .then((product)=>{
3086
+ console.log('getDetailProduct', product);
3087
+ })
3088
+ * @param id_product
3089
+ * @return null or object
3090
+ */
3091
+ private getDetailProduct;
3073
3092
  /**
3074
3093
  * Hàm này thêm topping vào món ăn/ thức uống
3075
3094
  * @example:
@@ -3243,6 +3262,30 @@ export declare class VhQueryCafe {
3243
3262
  * @return Object => obj = {} hoặc null
3244
3263
  */
3245
3264
  getlocalDetailProduct(id_sub_or_product: string): any;
3265
+ /**
3266
+ * @example:
3267
+ * this.vhQueryCafe.getlocalDetailProduct_Async('ETxNu8exrvGtXFjkIhnc')
3268
+ .then((detailproduct)=>{
3269
+ }, error=>{
3270
+ console.log('error', error);
3271
+ })
3272
+ * @param data : object
3273
+ * @return Promise => object or null
3274
+ */
3275
+ private getlocalDetailProduct_Async;
3276
+ /**
3277
+ * Hàm kiểm tra và đồng bộ các sản phẩm trong bill_details (chi tiết hóa đơn)
3278
+ * @example:
3279
+ * this.vhQueryCafe.syncBillDetails_Products(array)
3280
+ .then(()=>{
3281
+ }, error=>{
3282
+ console.log('error', error);
3283
+ })
3284
+ * @param bill_details : Array
3285
+ * @return Promise => null
3286
+ * Luu ý: chỉ có 2 trường hợp, hoặc là sync thành công, hoặc là báo lỗi error
3287
+ */
3288
+ private syncBillDetails_Products;
3246
3289
  /**
3247
3290
  * Hàm này tìm, kiểm tra barcode bất kỳ có tồn tại không, nếu có thì trả về 1 detailproduct, nếu ko thì trả về null
3248
3291
  * Hàm này dùng trong 2 trường hợp:
@@ -7206,6 +7249,7 @@ export declare class VhQueryCafe {
7206
7249
  * @returns
7207
7250
  */
7208
7251
  private syncInventoryEveryDay_Stock1stDayOfMonth;
7252
+ private syncInventoryEveryDay_Stock1stDayOfMonth_old;
7209
7253
  /**
7210
7254
  * Hàm này dùng trong page Tồn kho, giá trị tồn kho NGUYÊN LIỆU (type=3), doanh số, chi phí nhập hàng tại một thời điểm endtime nào đó
7211
7255
  * @example:
@@ -14750,6 +14794,92 @@ export declare class VhQueryAutoWeb {
14750
14794
  * @return Promise object => response = {vcode, msg, data(array), limit, page, totalpages}
14751
14795
  */
14752
14796
  getWebApps_byFields(query: object, projection?: object, sort?: object, limit?: number, page?: number): Promise<unknown>;
14797
+ /**
14798
+ * Hàm này tạo webapp (type=11)
14799
+ * @example:
14800
+ let data = {
14801
+ id_branch: '0HqApj6sMu5VXCWdAyqz',
14802
+ date: new Date()
14803
+ }
14804
+ * this.vhQueryAutoWeb.addHosting_Package(data)
14805
+ .then((rsp:any)=>{
14806
+ if(rsp.vcode === 0){
14807
+ let branch = rsp.data;
14808
+ }
14809
+ }, error=>{ reject(error)
14810
+ })
14811
+ * @param data
14812
+ * @return Promise => rsp ={vcode, msg, data(object)} / error
14813
+ * @notice : hàm này chỉ add được dữ liệu sau khi khách hàng hoặc nhân viên đã đăng nhập
14814
+ * vcode == 0: success
14815
+ * vcode == 11: 'not logged in
14816
+ */
14817
+ addHosting_Package(data: any): Promise<unknown>;
14818
+ /**
14819
+ * @example:
14820
+ * this.vhQueryAutoWeb.updateHosting_Package('5fb6780ca2148e09806c5b01', {hidden:true})
14821
+ .then((rsp:any)=>{
14822
+ if(rsp.vcode === 0){
14823
+ console.log('updateHosting_Package succeed');
14824
+ }
14825
+ }, error=>{
14826
+ console.log('error', error);
14827
+ })
14828
+ * @param id_hosting_package
14829
+ * @param data
14830
+ * @return Promise object => rsp ={vcode, msg, data(undefined)} / error
14831
+ * @notice : hàm này chỉ add được dữ liệu sau khi khách hàng hoặc nhân viên đã đăng nhập
14832
+ * vcode == 0: success
14833
+ * vcode == 11: 'not logged in
14834
+ */
14835
+ updateHosting_Package(id_hosting_package: string, data: object): Promise<unknown>;
14836
+ /**
14837
+ * @example:
14838
+ * this.vhQueryAutoWeb.deleteHosting_Package('5fb67fda87c0f21d484cbdf3')
14839
+ .then((rsp:any)=>{
14840
+ if(rsp.vcode === 0){
14841
+ console.log('deleteHosting_Package succeed');
14842
+ }
14843
+ }, error=>{
14844
+ reject(error)
14845
+ })
14846
+ * @param id_hosting_package
14847
+ * @return Promise => rsp ={vcode, msg} / error
14848
+ * @notice : hàm này chỉ add được dữ liệu sau khi khách hàng hoặc nhân viên đã đăng nhập
14849
+ * vcode == 0: success
14850
+ * vcode == 11: 'not logged in
14851
+ */
14852
+ deleteHosting_Package(id_hosting_package: string): Promise<unknown>;
14853
+ /**
14854
+ * @example
14855
+ * this.vhQueryAutoWeb.getHosting_Package('5fb67fda87c0f21d484cbdf3')
14856
+ .then((webapp)=>{
14857
+ console.log('getHosting_Package', webapp);
14858
+ })
14859
+ * @param id_hosting_package
14860
+ * @return Promise => obj ={} or null
14861
+ */
14862
+ getHosting_Package(id_hosting_package: string): Promise<unknown>;
14863
+ /**
14864
+ * @example:
14865
+ * this.vhQueryAutoWeb.getHosting_Packages_byFields_byPages({name:{$eq:'name abc'}}, {},{},6,1)
14866
+ .then(response=>{
14867
+ console.log('response', response);
14868
+ if(response.vcode === 0){
14869
+ //-----------your code-----------
14870
+ let products = response.data;
14871
+ }
14872
+ },(error:any)=>{
14873
+ console.log('error', error)
14874
+ })
14875
+ * @param query
14876
+ * @param projection — đang tìm hiểu, tạm thời để giá trị là {}
14877
+ * @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
14878
+ * @param limit — null hoặc 0: không giới hạn record get về; 2: get về 2 record
14879
+ * @param page — null hoặc 0 hoặc 1: get về trang đầu tiên; 2: get về trang thứ 2
14880
+ * @return Promise object => response = {vcode, msg, data(array), limit, page, totalpages}
14881
+ */
14882
+ getHosting_Packages_byFields_byPages(query: object, projection?: object, sort?: object, limit?: number, page?: number): Promise<unknown>;
14753
14883
  /**
14754
14884
  * Hàm này tạo combos (type=1), blog (type=2),.....
14755
14885
  * @example:
@@ -22954,6 +23084,14 @@ export declare class VhQuerySales {
22954
23084
  * @returns void
22955
23085
  */
22956
23086
  closeSyncCollections(): void;
23087
+ /**
23088
+ * 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
23089
+ * (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
23090
+ * @example:
23091
+ * this.syncRaw_Detail_ProductInsert(obj);
23092
+ * @param obj
23093
+ */
23094
+ private syncRaw_Detail_ProductInsert;
22957
23095
  /**
22958
23096
  * vhQuerySales
22959
23097
  * @returns
@@ -23071,6 +23209,30 @@ export declare class VhQuerySales {
23071
23209
  * @return Object => obj = {} hoặc null
23072
23210
  */
23073
23211
  getlocalDetailProduct(id_sub_or_product: string): any;
23212
+ /**
23213
+ * @example:
23214
+ * this.vhQuerySales.getlocalDetailProduct_Async('ETxNu8exrvGtXFjkIhnc')
23215
+ .then((detailproduct)=>{
23216
+ }, error=>{
23217
+ console.log('error', error);
23218
+ })
23219
+ * @param data : object
23220
+ * @return Promise => object or null
23221
+ */
23222
+ private getlocalDetailProduct_Async;
23223
+ /**
23224
+ * Hàm kiểm tra và đồng bộ các sản phẩm trong bill_details (chi tiết hóa đơn)
23225
+ * @example:
23226
+ * this.vhQuerySales.syncBillDetails_Products(array)
23227
+ .then(()=>{
23228
+ }, error=>{
23229
+ console.log('error', error);
23230
+ })
23231
+ * @param bill_details : Array
23232
+ * @return Promise => null
23233
+ * Luu ý: chỉ có 2 trường hợp, hoặc là sync thành công, hoặc là báo lỗi error
23234
+ */
23235
+ private syncBillDetails_Products;
23074
23236
  /**
23075
23237
  * Hàm này tìm, kiểm tra barcode bất kỳ có tồn tại không, nếu có thì trả về 1 detailproduct, nếu ko thì trả về null
23076
23238
  * Hàm này dùng trong 2 trường hợp:
@@ -23161,7 +23323,7 @@ export declare class VhQuerySales {
23161
23323
  console.log('getProduct', product);
23162
23324
  })
23163
23325
  * @param id_product
23164
- * @return false or object
23326
+ * @return null or object
23165
23327
  */
23166
23328
  private getProduct;
23167
23329
  /**
@@ -23173,6 +23335,17 @@ export declare class VhQuerySales {
23173
23335
  * @return array(object) = [{},{},..]
23174
23336
  */
23175
23337
  private getProducts;
23338
+ /**
23339
+ * Hàm lấy chi tiết sản phẩm dựa vào id sản phẩm hoặc id sản phẩm con
23340
+ * @example
23341
+ * this.vhQuerySales.getDetailProduct('5fb67fda87c0f21d484cbdf3')
23342
+ .then((product)=>{
23343
+ console.log('getDetailProduct', product);
23344
+ })
23345
+ * @param id_product
23346
+ * @return null or object
23347
+ */
23348
+ private getDetailProduct;
23176
23349
  /**
23177
23350
  * @example:
23178
23351
  * this.vhQuerySales.addCombosProduct('5fb6780ca2148e',[{id_product:'rtw554b5634573456', id_subproduct: 'gty3456ygw454287', quantity:2, price: 20000, type: 1},{},..])
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ionic-vhframeworks",
3
- "version": "9.7.9",
3
+ "version": "9.8.1",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^12.2.0",
6
6
  "@angular/core": "^12.2.0"