ionic-vhframeworks 3.7.5 → 3.8.0
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.
- package/bundles/ionic-vhframeworks.umd.js +1 -1
- package/bundles/ionic-vhframeworks.umd.js.map +1 -1
- package/bundles/ionic-vhframeworks.umd.min.js +1 -1
- package/bundles/ionic-vhframeworks.umd.min.js.map +1 -1
- package/fesm2015/ionic-vhframeworks.js.map +1 -1
- package/ionic-vhframeworks.metadata.json +1 -1
- package/lib/ionic-vhframeworks.service.d.ts +347 -35
- package/package.json +1 -1
|
@@ -1007,7 +1007,7 @@ export declare class VhQueryCafe {
|
|
|
1007
1007
|
/**
|
|
1008
1008
|
* @Nghiệp vụ tạo (bill_type 5->1), hủy đơn hàng bán món ăn (dùng hàm)
|
|
1009
1009
|
* {createBill, getBill} -> {createBill_detail, updateBill_detail, deleteBill_detail} -> {saveBill_Billdetail, deleteBill_Billdetail}
|
|
1010
|
-
* @Nghiệp cập nhật hóa đơn bán hàng món ăn (dùng hàm)
|
|
1010
|
+
* @Nghiệp vụ cập nhật hóa đơn bán hàng món ăn (dùng hàm)
|
|
1011
1011
|
* {getBill, getBill_Billdetail} -> {updateBill_Billdetail}
|
|
1012
1012
|
* @Nghiệp vụ tạo, cập nhật, hủy đơn xuất nhập nguyên liệu (dùng hàm)
|
|
1013
1013
|
* {createBill_Billdetail} -> {updateBill_Billdetail, deleteBill_Billdetail}
|
|
@@ -2917,7 +2917,7 @@ export declare class VhQueryCafe {
|
|
|
2917
2917
|
/**
|
|
2918
2918
|
* hàm này chỉ dùng cho trường hợp bill đã lưu rồi mà muốn sửa
|
|
2919
2919
|
* @example
|
|
2920
|
-
this.vhQueryCafe.
|
|
2920
|
+
this.vhQueryCafe.updateBill_Billdetail('SzyEYNN39Mq90NkzUFpz',{},[{},{},...])
|
|
2921
2921
|
.then(()=>{
|
|
2922
2922
|
console.log("success");
|
|
2923
2923
|
})
|
|
@@ -6685,16 +6685,16 @@ export declare class VhEcommerce {
|
|
|
6685
6685
|
*/
|
|
6686
6686
|
signOutShopee(id_shop: string): Promise<unknown>;
|
|
6687
6687
|
/**
|
|
6688
|
-
|
|
6689
|
-
|
|
6690
|
-
|
|
6691
|
-
|
|
6692
|
-
|
|
6693
|
-
|
|
6694
|
-
|
|
6695
|
-
|
|
6696
|
-
|
|
6697
|
-
refreshLocalProductListShopee(id_branch: string): any;
|
|
6688
|
+
* @example:
|
|
6689
|
+
* let id_branch = this.vhQuerySales.getDefaultBranch()._id;
|
|
6690
|
+
* this.vhEcommerce.refreshLocalProductListShopee(id_branch)
|
|
6691
|
+
.then(()=>{
|
|
6692
|
+
do something.....
|
|
6693
|
+
})
|
|
6694
|
+
* Hàm này refresh giá trị mới nhất cho hàm getProductListSendo() trong localstorage
|
|
6695
|
+
* @return Promise => null
|
|
6696
|
+
*/
|
|
6697
|
+
refreshLocalProductListShopee(id_branch: string, shop_id?: string): any;
|
|
6698
6698
|
/**
|
|
6699
6699
|
* let localshoplistshopee = this.vhEcommerce.getlocalShopListShopee();
|
|
6700
6700
|
* @returns
|
|
@@ -6710,6 +6710,7 @@ export declare class VhEcommerce {
|
|
|
6710
6710
|
* @returns
|
|
6711
6711
|
*/
|
|
6712
6712
|
private getProductListShopee;
|
|
6713
|
+
private getProductListShopees;
|
|
6713
6714
|
/**
|
|
6714
6715
|
* @example:
|
|
6715
6716
|
* let productlistlazada = this.vhEcommerce.getlocalProductListShopee('ư0e4tuiwe98rhvqw9vtqw9t7rq987r9qvwn98et98');
|
|
@@ -7237,7 +7238,7 @@ export declare class VhQuerySales {
|
|
|
7237
7238
|
* Hàm này refresh giá trị mới nhất cho hàm getlocalProductListTiki() trong localstorage
|
|
7238
7239
|
* @return Promise => null
|
|
7239
7240
|
*/
|
|
7240
|
-
refreshLocalProductListTikis(): any;
|
|
7241
|
+
refreshLocalProductListTikis(shop_id?: string): any;
|
|
7241
7242
|
/**
|
|
7242
7243
|
* @example:
|
|
7243
7244
|
this.vhQuerySales.getProductListTikis().then((list)=>{
|
|
@@ -7245,6 +7246,7 @@ export declare class VhQuerySales {
|
|
|
7245
7246
|
})
|
|
7246
7247
|
* @returns Promise => array =[{},{},...]
|
|
7247
7248
|
*/
|
|
7249
|
+
private getProductListTiki;
|
|
7248
7250
|
private getProductListTikis;
|
|
7249
7251
|
/**
|
|
7250
7252
|
* @example:
|
|
@@ -7414,7 +7416,7 @@ export declare class VhQuerySales {
|
|
|
7414
7416
|
* Hàm này refresh giá trị mới nhất cho hàm getlocalProductListLazada() trong localstorage
|
|
7415
7417
|
* @return Promise => null
|
|
7416
7418
|
*/
|
|
7417
|
-
refreshLocalProductListLazadas(): any;
|
|
7419
|
+
refreshLocalProductListLazadas(shop_id?: string): any;
|
|
7418
7420
|
/**
|
|
7419
7421
|
* @example:
|
|
7420
7422
|
this.vhQuerySales.getProductListLazadas().then((list)=>{
|
|
@@ -7422,6 +7424,7 @@ export declare class VhQuerySales {
|
|
|
7422
7424
|
})
|
|
7423
7425
|
* @returns Promise => array =[{},{},...]
|
|
7424
7426
|
*/
|
|
7427
|
+
private getProductListLazada;
|
|
7425
7428
|
private getProductListLazadas;
|
|
7426
7429
|
/**
|
|
7427
7430
|
* @example:
|
|
@@ -7813,7 +7816,7 @@ export declare class VhQuerySales {
|
|
|
7813
7816
|
* Hàm này refresh giá trị mới nhất cho hàm getProductListSendo() trong localstorage
|
|
7814
7817
|
* @return Promise => null
|
|
7815
7818
|
*/
|
|
7816
|
-
refreshLocalProductListSendo(): any;
|
|
7819
|
+
refreshLocalProductListSendo(shop_id?: string): any;
|
|
7817
7820
|
/**
|
|
7818
7821
|
* @example:
|
|
7819
7822
|
* this.vhQuerySales.getProductListSendo().then(()=>{
|
|
@@ -7823,6 +7826,7 @@ export declare class VhQuerySales {
|
|
|
7823
7826
|
* @returns
|
|
7824
7827
|
*/
|
|
7825
7828
|
private getProductListSendo;
|
|
7829
|
+
private getProductListSendos;
|
|
7826
7830
|
/**
|
|
7827
7831
|
* @example:
|
|
7828
7832
|
* this.vhQuerySales.getProductDetailSendo(['13857630'], 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJTdG9yZUlkIjoiNTczNjciLCJVc2VyTmFtZSI6IiIsIlN0b3JlU3RhdHVzIjoiMiIsIlNob3BUeXBlIjoiMCIsIlN0b3JlTGV2ZWwiOiIzIiwiZXhwIjoxNjMzNjU1ODMxLCJpc3MiOiI1NzM2NyIsImF1ZCI6IjU3MzY3In0.qM6gqpf3758JrSsTL2JlDOoD-TFS1VVaGkL6ixaI_lw', '403754acaafc4564a16c19faa32d73c8').then((productdetail)=>{
|
|
@@ -9783,7 +9787,7 @@ export declare class VhQuerySales {
|
|
|
9783
9787
|
/**
|
|
9784
9788
|
* hàm này chỉ dùng cho trường hợp bill đã lưu rồi mà muốn sửa
|
|
9785
9789
|
* @example
|
|
9786
|
-
this.vhQuerySales.
|
|
9790
|
+
this.vhQuerySales.updateBill_Billdetail('SzyEYNN39Mq90NkzUFpz',{},[{},{},...])
|
|
9787
9791
|
.then(()=>{
|
|
9788
9792
|
console.log("success");
|
|
9789
9793
|
})
|
|
@@ -14124,7 +14128,7 @@ export declare class VhQuerySalesWebUser {
|
|
|
14124
14128
|
constructor(vhmongo_firebase: Vhmongo_firebase, vhQuery: VhQuery, vhAuth: VhAuth, vhAlgorithm: VhAlgorithm);
|
|
14125
14129
|
/**
|
|
14126
14130
|
* @example
|
|
14127
|
-
* this.
|
|
14131
|
+
* this.vhQuerySalesWebUser.getBranch('5fb67fda87c0f21d484cbdf3')
|
|
14128
14132
|
.then((branch)=>{
|
|
14129
14133
|
console.log('getBranch', branch);
|
|
14130
14134
|
},error=>{
|
|
@@ -14136,7 +14140,7 @@ export declare class VhQuerySalesWebUser {
|
|
|
14136
14140
|
getBranch(id_branch: string): Promise<unknown>;
|
|
14137
14141
|
/**
|
|
14138
14142
|
* @example
|
|
14139
|
-
* this.
|
|
14143
|
+
* this.vhQuerySalesWebUser.getBranchs()
|
|
14140
14144
|
.then((branchs)=>{
|
|
14141
14145
|
console.log('getBranchs', branchs);
|
|
14142
14146
|
},error=>{
|
|
@@ -14147,7 +14151,7 @@ export declare class VhQuerySalesWebUser {
|
|
|
14147
14151
|
getBranchs(): Promise<unknown>;
|
|
14148
14152
|
/**
|
|
14149
14153
|
* @example
|
|
14150
|
-
* this.
|
|
14154
|
+
* this.vhQuerySalesWebUser.getProduct('5fb67fda87c0f21d484cbdf3')
|
|
14151
14155
|
.then((product)=>{
|
|
14152
14156
|
console.log('getProduct', product);
|
|
14153
14157
|
}, error=>{
|
|
@@ -14159,7 +14163,7 @@ export declare class VhQuerySalesWebUser {
|
|
|
14159
14163
|
getProduct(id_product: string): Promise<unknown>;
|
|
14160
14164
|
/**
|
|
14161
14165
|
* @example:
|
|
14162
|
-
* this.
|
|
14166
|
+
* this.vhQuerySalesWebUser.getProductsByFields({name:{$eq:'name abc'}}, {},{},0)
|
|
14163
14167
|
.then((products)=>{
|
|
14164
14168
|
console.log('getProductsByFields', products);
|
|
14165
14169
|
},error=>{
|
|
@@ -14174,7 +14178,7 @@ export declare class VhQuerySalesWebUser {
|
|
|
14174
14178
|
getProductsByFields(query: object, projection?: object, sort?: object, limit?: number): Promise<unknown>;
|
|
14175
14179
|
/**
|
|
14176
14180
|
* @example
|
|
14177
|
-
* this.
|
|
14181
|
+
* this.vhQuerySalesWebUser.getCategory('5fb67fda87c0f21d484cbdf3')
|
|
14178
14182
|
.then((category)=>{
|
|
14179
14183
|
console.log('getCategory', category);
|
|
14180
14184
|
})
|
|
@@ -14184,7 +14188,7 @@ export declare class VhQuerySalesWebUser {
|
|
|
14184
14188
|
getCategory(id_category: string): Promise<unknown>;
|
|
14185
14189
|
/**
|
|
14186
14190
|
* @example
|
|
14187
|
-
* this.
|
|
14191
|
+
* this.vhQuerySalesWebUser.getCategorys()
|
|
14188
14192
|
.then((categorys)=>{
|
|
14189
14193
|
console.log('getCategorys', categorys);
|
|
14190
14194
|
})
|
|
@@ -14193,7 +14197,7 @@ export declare class VhQuerySalesWebUser {
|
|
|
14193
14197
|
getCategorys(): Promise<unknown>;
|
|
14194
14198
|
/**
|
|
14195
14199
|
* @example:
|
|
14196
|
-
* this.
|
|
14200
|
+
* this.vhQuerySalesWebUser.getCategorysByFields({name:{$eq:'name abc'}}, {},{},0)
|
|
14197
14201
|
.then((categorys)=>{
|
|
14198
14202
|
console.log('getCategorysByFields', categorys);
|
|
14199
14203
|
})
|
|
@@ -14213,7 +14217,7 @@ export declare class VhQuerySalesWebAdmin {
|
|
|
14213
14217
|
constructor(vhmongo_firebase: Vhmongo_firebase, vhQuery: VhQuery, vhAuth: VhAuth, vhAlgorithm: VhAlgorithm);
|
|
14214
14218
|
/**
|
|
14215
14219
|
* @example
|
|
14216
|
-
* this.
|
|
14220
|
+
* this.vhQuerySalesWebAdmin.getBranch('5fb67fda87c0f21d484cbdf3')
|
|
14217
14221
|
.then((branch)=>{
|
|
14218
14222
|
console.log('getBranch', branch);
|
|
14219
14223
|
},error=>{
|
|
@@ -14225,7 +14229,7 @@ export declare class VhQuerySalesWebAdmin {
|
|
|
14225
14229
|
getBranch(id_branch: string): Promise<unknown>;
|
|
14226
14230
|
/**
|
|
14227
14231
|
* @example
|
|
14228
|
-
* this.
|
|
14232
|
+
* this.vhQuerySalesWebAdmin.getBranchs()
|
|
14229
14233
|
.then((branchs)=>{
|
|
14230
14234
|
console.log('getBranchs', branchs);
|
|
14231
14235
|
},error=>{
|
|
@@ -14234,10 +14238,22 @@ export declare class VhQuerySalesWebAdmin {
|
|
|
14234
14238
|
* @return Promise => array(object) = [{},{},..]
|
|
14235
14239
|
*/
|
|
14236
14240
|
getBranchs(): Promise<unknown>;
|
|
14241
|
+
/**
|
|
14242
|
+
* @example:
|
|
14243
|
+
* this.vhQuerySalesWebAdmin.addProduct({name:'camera 2', quantity:20, price:200000})
|
|
14244
|
+
.then((product)=>{
|
|
14245
|
+
console.log('addProduct', product);
|
|
14246
|
+
}, error=>{
|
|
14247
|
+
console.log('error', error);
|
|
14248
|
+
})
|
|
14249
|
+
* @param data : object
|
|
14250
|
+
* @return Promise => object = {}
|
|
14251
|
+
* 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
|
|
14252
|
+
*/
|
|
14237
14253
|
addProduct(data: any): Promise<unknown>;
|
|
14238
14254
|
/**
|
|
14239
14255
|
* @example:
|
|
14240
|
-
* this.
|
|
14256
|
+
* this.vhQuerySalesWebAdmin.updateProduct('5fb6780ca2148e09806c5b01', {quantity:400})
|
|
14241
14257
|
.then((bool)=>{
|
|
14242
14258
|
console.log('updateProduct', bool);
|
|
14243
14259
|
}, error=>{
|
|
@@ -14250,7 +14266,7 @@ export declare class VhQuerySalesWebAdmin {
|
|
|
14250
14266
|
updateProduct(id_product: string, data: object): Promise<unknown>;
|
|
14251
14267
|
/**
|
|
14252
14268
|
* @example:
|
|
14253
|
-
* this.
|
|
14269
|
+
* this.vhQuerySalesWebAdmin.deleteProduct('5fb67fda87c0f21d484cbdf3')
|
|
14254
14270
|
.then((bool)=>{
|
|
14255
14271
|
console.log('deleteDoc', bool);
|
|
14256
14272
|
}, error=>{
|
|
@@ -14262,7 +14278,7 @@ export declare class VhQuerySalesWebAdmin {
|
|
|
14262
14278
|
deleteProduct(id_product: string): Promise<unknown>;
|
|
14263
14279
|
/**
|
|
14264
14280
|
* @example
|
|
14265
|
-
* this.
|
|
14281
|
+
* this.vhQuerySalesWebAdmin.getProduct('5fb67fda87c0f21d484cbdf3')
|
|
14266
14282
|
.then((product)=>{
|
|
14267
14283
|
console.log('getProduct', product);
|
|
14268
14284
|
})
|
|
@@ -14272,7 +14288,7 @@ export declare class VhQuerySalesWebAdmin {
|
|
|
14272
14288
|
getProduct(id_product: string): Promise<unknown>;
|
|
14273
14289
|
/**
|
|
14274
14290
|
* @example:
|
|
14275
|
-
* this.
|
|
14291
|
+
* this.vhQuerySalesWebAdmin.getProductsByFields({name:{$eq:'name abc'}}, {},{},0)
|
|
14276
14292
|
.then((products)=>{
|
|
14277
14293
|
console.log('getProductsByFields', products);
|
|
14278
14294
|
})
|
|
@@ -14285,7 +14301,7 @@ export declare class VhQuerySalesWebAdmin {
|
|
|
14285
14301
|
getProductsByFields(query: object, projection?: object, sort?: object, limit?: number): Promise<unknown>;
|
|
14286
14302
|
/**
|
|
14287
14303
|
* @example:
|
|
14288
|
-
* this.
|
|
14304
|
+
* this.vhQuerySalesWebAdmin.addCategory({name:'Danh mục 1'})
|
|
14289
14305
|
.then((category)=>{
|
|
14290
14306
|
console.log('addCategory', category);
|
|
14291
14307
|
},error=>{
|
|
@@ -14299,7 +14315,7 @@ export declare class VhQuerySalesWebAdmin {
|
|
|
14299
14315
|
addCategory(data: object): Promise<unknown>;
|
|
14300
14316
|
/**
|
|
14301
14317
|
* @example:
|
|
14302
|
-
* this.
|
|
14318
|
+
* this.vhQuerySalesWebAdmin.updateCategory('5fb6780ca2148e09806c5b01', {quantity:400})
|
|
14303
14319
|
.then((bool)=>{
|
|
14304
14320
|
console.log('updateCategory', bool);
|
|
14305
14321
|
})
|
|
@@ -14310,7 +14326,7 @@ export declare class VhQuerySalesWebAdmin {
|
|
|
14310
14326
|
updateCategory(id_category: string, data: object): Promise<unknown>;
|
|
14311
14327
|
/**
|
|
14312
14328
|
* @example:
|
|
14313
|
-
* this.
|
|
14329
|
+
* this.vhQuerySalesWebAdmin.deleteCategory('5fb67fda87c0f21d484cbdf3')
|
|
14314
14330
|
.then((bool)=>{
|
|
14315
14331
|
console.log('deleteCategory', bool);
|
|
14316
14332
|
})
|
|
@@ -14320,7 +14336,303 @@ export declare class VhQuerySalesWebAdmin {
|
|
|
14320
14336
|
deleteCategory(id_category: string): Promise<unknown>;
|
|
14321
14337
|
/**
|
|
14322
14338
|
* @example
|
|
14323
|
-
* this.
|
|
14339
|
+
* this.vhQuerySalesWebAdmin.getCategory('5fb67fda87c0f21d484cbdf3')
|
|
14340
|
+
.then((category)=>{
|
|
14341
|
+
console.log('getCategory', category);
|
|
14342
|
+
})
|
|
14343
|
+
* @param id_category
|
|
14344
|
+
* @return Promise => obj ={} or null
|
|
14345
|
+
*/
|
|
14346
|
+
getCategory(id_category: string): Promise<unknown>;
|
|
14347
|
+
/**
|
|
14348
|
+
* @example
|
|
14349
|
+
* this.vhQuerySalesWebAdmin.getCategorys()
|
|
14350
|
+
.then((categorys)=>{
|
|
14351
|
+
console.log('getCategorys', categorys);
|
|
14352
|
+
})
|
|
14353
|
+
* @return Promise => array(object) = [{},{},..]
|
|
14354
|
+
*/
|
|
14355
|
+
getCategorys(): Promise<unknown>;
|
|
14356
|
+
/**
|
|
14357
|
+
* @example:
|
|
14358
|
+
* this.vhQuerySalesWebAdmin.getCategorysByFields({name:{$eq:'name abc'}}, {},{},0)
|
|
14359
|
+
.then((categorys)=>{
|
|
14360
|
+
console.log('getCategorysByFields', categorys);
|
|
14361
|
+
})
|
|
14362
|
+
* @param query
|
|
14363
|
+
* @param projection — đang tìm hiểu, tạm thời để giá trị là {}
|
|
14364
|
+
* @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
|
|
14365
|
+
* @param limit — null hoặc 0: không giới hạn record get về; 2: get về 2 record
|
|
14366
|
+
* @return — Array -> array = [{},{},...]
|
|
14367
|
+
*/
|
|
14368
|
+
getCategorysByFields(query: object, projection?: object, sort?: object, limit?: number): Promise<unknown>;
|
|
14369
|
+
}
|
|
14370
|
+
export declare class VhQueryCafeWebUser {
|
|
14371
|
+
private vhmongo_firebase;
|
|
14372
|
+
private vhQuery;
|
|
14373
|
+
private vhAuth;
|
|
14374
|
+
private vhAlgorithm;
|
|
14375
|
+
constructor(vhmongo_firebase: Vhmongo_firebase, vhQuery: VhQuery, vhAuth: VhAuth, vhAlgorithm: VhAlgorithm);
|
|
14376
|
+
/**
|
|
14377
|
+
* @example
|
|
14378
|
+
* this.vhQueryCafeWebUser.getBranch('5fb67fda87c0f21d484cbdf3')
|
|
14379
|
+
.then((branch)=>{
|
|
14380
|
+
console.log('getBranch', branch);
|
|
14381
|
+
},error=>{
|
|
14382
|
+
reject(error);
|
|
14383
|
+
})
|
|
14384
|
+
* @param id_branch
|
|
14385
|
+
* @return Promise => obj ={} or null
|
|
14386
|
+
*/
|
|
14387
|
+
getBranch(id_branch: string): Promise<unknown>;
|
|
14388
|
+
/**
|
|
14389
|
+
* @example
|
|
14390
|
+
* this.vhQueryCafeWebUser.getBranchs()
|
|
14391
|
+
.then((branchs)=>{
|
|
14392
|
+
console.log('getBranchs', branchs);
|
|
14393
|
+
},error=>{
|
|
14394
|
+
reject(error);
|
|
14395
|
+
})
|
|
14396
|
+
* @return Promise => array(object) = [{},{},..]
|
|
14397
|
+
*/
|
|
14398
|
+
getBranchs(): Promise<unknown>;
|
|
14399
|
+
/**
|
|
14400
|
+
* @example
|
|
14401
|
+
* this.vhQueryCafeWebUser.getProduct('5fb67fda87c0f21d484cbdf3')
|
|
14402
|
+
.then((product)=>{
|
|
14403
|
+
console.log('getProduct', product);
|
|
14404
|
+
}, error=>{
|
|
14405
|
+
reject(error)
|
|
14406
|
+
})
|
|
14407
|
+
* @param id_product
|
|
14408
|
+
* @return false or object
|
|
14409
|
+
*/
|
|
14410
|
+
getProduct(id_product: string): Promise<unknown>;
|
|
14411
|
+
/**
|
|
14412
|
+
* @example:
|
|
14413
|
+
* this.vhQueryCafeWebUser.getProductsByFields({name:{$eq:'name abc'}}, {},{},0)
|
|
14414
|
+
.then((products)=>{
|
|
14415
|
+
console.log('getProductsByFields', products);
|
|
14416
|
+
},error=>{
|
|
14417
|
+
console.log('error', error);
|
|
14418
|
+
})
|
|
14419
|
+
* @param query
|
|
14420
|
+
* @param projection — đang tìm hiểu, tạm thời để giá trị là {}
|
|
14421
|
+
* @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
|
|
14422
|
+
* @param limit — null hoặc 0: không giới hạn record get về; 2: get về 2 record
|
|
14423
|
+
* @return — Array -> array = [{},{},...]
|
|
14424
|
+
*/
|
|
14425
|
+
getProductsByFields(query: object, projection?: object, sort?: object, limit?: number): Promise<unknown>;
|
|
14426
|
+
/**
|
|
14427
|
+
* @example
|
|
14428
|
+
* this.vhQueryCafeWebUser.getCategory('5fb67fda87c0f21d484cbdf3')
|
|
14429
|
+
.then((category)=>{
|
|
14430
|
+
console.log('getCategory', category);
|
|
14431
|
+
})
|
|
14432
|
+
* @param id_category
|
|
14433
|
+
* @return Promise => obj ={} or null
|
|
14434
|
+
*/
|
|
14435
|
+
getCategory(id_category: string): Promise<unknown>;
|
|
14436
|
+
/**
|
|
14437
|
+
* @example
|
|
14438
|
+
* this.vhQueryCafeWebUser.getCategorys()
|
|
14439
|
+
.then((categorys)=>{
|
|
14440
|
+
console.log('getCategorys', categorys);
|
|
14441
|
+
})
|
|
14442
|
+
* @return Promise => array(object) = [{},{},..]
|
|
14443
|
+
*/
|
|
14444
|
+
getCategorys(): Promise<unknown>;
|
|
14445
|
+
/**
|
|
14446
|
+
* @example:
|
|
14447
|
+
* this.vhQueryCafeWebUser.getCategorysByFields({name:{$eq:'name abc'}}, {},{},0)
|
|
14448
|
+
.then((categorys)=>{
|
|
14449
|
+
console.log('getCategorysByFields', categorys);
|
|
14450
|
+
})
|
|
14451
|
+
* @param query
|
|
14452
|
+
* @param projection — đang tìm hiểu, tạm thời để giá trị là {}
|
|
14453
|
+
* @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
|
|
14454
|
+
* @param limit — null hoặc 0: không giới hạn record get về; 2: get về 2 record
|
|
14455
|
+
* @return — Array -> array = [{},{},...]
|
|
14456
|
+
*/
|
|
14457
|
+
getCategorysByFields(query: object, projection?: object, sort?: object, limit?: number): Promise<unknown>;
|
|
14458
|
+
}
|
|
14459
|
+
export declare class VhQueryCafeWebAdmin {
|
|
14460
|
+
private vhmongo_firebase;
|
|
14461
|
+
private vhQuery;
|
|
14462
|
+
private vhAuth;
|
|
14463
|
+
private vhAlgorithm;
|
|
14464
|
+
private products;
|
|
14465
|
+
constructor(vhmongo_firebase: Vhmongo_firebase, vhQuery: VhQuery, vhAuth: VhAuth, vhAlgorithm: VhAlgorithm);
|
|
14466
|
+
private getlocalProductAndCombosAndToppings;
|
|
14467
|
+
/**
|
|
14468
|
+
* @example:
|
|
14469
|
+
* let product = this.vhQueryCafe.getlocalProduct('5fb6780ca2148e09806c5b01');
|
|
14470
|
+
* @param id_product
|
|
14471
|
+
* @return Object => obj = {} or null
|
|
14472
|
+
*/
|
|
14473
|
+
private getlocalProduct;
|
|
14474
|
+
/**
|
|
14475
|
+
* @example
|
|
14476
|
+
* this.vhQueryCafeWebAdmin.getBranch('5fb67fda87c0f21d484cbdf3')
|
|
14477
|
+
.then((branch)=>{
|
|
14478
|
+
console.log('getBranch', branch);
|
|
14479
|
+
},error=>{
|
|
14480
|
+
reject(error);
|
|
14481
|
+
})
|
|
14482
|
+
* @param id_branch
|
|
14483
|
+
* @return Promise => obj ={} or null
|
|
14484
|
+
*/
|
|
14485
|
+
getBranch(id_branch: string): Promise<unknown>;
|
|
14486
|
+
/**
|
|
14487
|
+
* @example
|
|
14488
|
+
* this.vhQueryCafeWebAdmin.getBranchs()
|
|
14489
|
+
.then((branchs)=>{
|
|
14490
|
+
console.log('getBranchs', branchs);
|
|
14491
|
+
},error=>{
|
|
14492
|
+
reject(error);
|
|
14493
|
+
})
|
|
14494
|
+
* @return Promise => array(object) = [{},{},..]
|
|
14495
|
+
*/
|
|
14496
|
+
getBranchs(): Promise<unknown>;
|
|
14497
|
+
/**
|
|
14498
|
+
* @example:
|
|
14499
|
+
* this.vhQueryCafeWebAdmin.addProduct({name:'camera 2', quantity:20, price:200000})
|
|
14500
|
+
.then((product)=>{
|
|
14501
|
+
console.log('addProduct', product);
|
|
14502
|
+
}, error=>{
|
|
14503
|
+
console.log('error', error);
|
|
14504
|
+
})
|
|
14505
|
+
* @param data
|
|
14506
|
+
* @return Promise => object = {}
|
|
14507
|
+
* 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
|
|
14508
|
+
*/
|
|
14509
|
+
addProduct(data: any): Promise<unknown>;
|
|
14510
|
+
/**
|
|
14511
|
+
* @example:
|
|
14512
|
+
* this.vhQueryCafeWebAdmin.addSubsProduct('5fb6780ca2148e09806c5b01',[{price:0, name:'small'},{},...])
|
|
14513
|
+
.then((subproducts)=>{
|
|
14514
|
+
console.log('addSubsProduct', subproducts);
|
|
14515
|
+
}, error=>{
|
|
14516
|
+
console.log('error', error);
|
|
14517
|
+
})
|
|
14518
|
+
* @param data
|
|
14519
|
+
* @return Promise => object = {} hoặc null
|
|
14520
|
+
* Luu ý: chỉ có 2 trường hợp, hoặc là thêm thành công, hoặc là null
|
|
14521
|
+
*/
|
|
14522
|
+
addSubsProduct(id_product: any, dataArray: any): Promise<unknown>;
|
|
14523
|
+
/**
|
|
14524
|
+
* @example:
|
|
14525
|
+
* this.vhQueryCafeWebAdmin.updateSubProduct('5fb6780ca2148e09806c5b01', {quantity:400})
|
|
14526
|
+
.then((bool)=>{
|
|
14527
|
+
console.log('updateSubProduct', bool);
|
|
14528
|
+
}, error=>{
|
|
14529
|
+
console.log('error', error);
|
|
14530
|
+
})
|
|
14531
|
+
* @param id_product
|
|
14532
|
+
* @param id_subproduct
|
|
14533
|
+
* @param data
|
|
14534
|
+
* @return Promise => bool = true or false
|
|
14535
|
+
*/
|
|
14536
|
+
updateSubProduct(id_product: string, id_subproduct: string, data: object): Promise<unknown>;
|
|
14537
|
+
/**
|
|
14538
|
+
* @example:
|
|
14539
|
+
* this.vhQueryCafeWebAdmin.deleteSubProduct('5fb67fda87c0f21d484cbdf3')
|
|
14540
|
+
.then((bool)=>{
|
|
14541
|
+
console.log('deleteDoc', bool);
|
|
14542
|
+
}, error=>{
|
|
14543
|
+
reject(error)
|
|
14544
|
+
})
|
|
14545
|
+
* @param id_product
|
|
14546
|
+
* @param id_subproduct
|
|
14547
|
+
* @return Promise => bool = true or false
|
|
14548
|
+
*/
|
|
14549
|
+
deleteSubProduct(id_product: string, id_subproduct: string): Promise<unknown>;
|
|
14550
|
+
/**
|
|
14551
|
+
* @example:
|
|
14552
|
+
* this.vhQueryCafeWebAdmin.updateProduct('5fb6780ca2148e09806c5b01', {quantity:400})
|
|
14553
|
+
.then((bool)=>{
|
|
14554
|
+
console.log('updateProduct', bool);
|
|
14555
|
+
}, error=>{
|
|
14556
|
+
console.log('error', error);
|
|
14557
|
+
})
|
|
14558
|
+
* @param id_product
|
|
14559
|
+
* @param data
|
|
14560
|
+
* @return Promise => bool = true or false
|
|
14561
|
+
*/
|
|
14562
|
+
updateProduct(id_product: string, data: object): Promise<unknown>;
|
|
14563
|
+
/**
|
|
14564
|
+
* @example:
|
|
14565
|
+
* this.vhQueryCafeWebAdmin.deleteProduct('5fb67fda87c0f21d484cbdf3')
|
|
14566
|
+
.then((bool)=>{
|
|
14567
|
+
console.log('deleteDoc', bool);
|
|
14568
|
+
}, error=>{
|
|
14569
|
+
reject(error)
|
|
14570
|
+
})
|
|
14571
|
+
* @param id_product
|
|
14572
|
+
* @return Promise => bool = true or false
|
|
14573
|
+
*/
|
|
14574
|
+
deleteProduct(id_product: string): Promise<unknown>;
|
|
14575
|
+
/**
|
|
14576
|
+
* @example
|
|
14577
|
+
* this.vhQueryCafeWebAdmin.getProduct('5fb67fda87c0f21d484cbdf3')
|
|
14578
|
+
.then((product)=>{
|
|
14579
|
+
console.log('getProduct', product);
|
|
14580
|
+
})
|
|
14581
|
+
* @param id_product
|
|
14582
|
+
* @return false or object
|
|
14583
|
+
*/
|
|
14584
|
+
getProduct(id_product: string): Promise<unknown>;
|
|
14585
|
+
/**
|
|
14586
|
+
* @example:
|
|
14587
|
+
* this.vhQueryCafeWebAdmin.getProductsByFields({name:{$eq:'name abc'}}, {},{},0)
|
|
14588
|
+
.then((products)=>{
|
|
14589
|
+
console.log('getProductsByFields', products);
|
|
14590
|
+
})
|
|
14591
|
+
* @param query
|
|
14592
|
+
* @param projection — đang tìm hiểu, tạm thời để giá trị là {}
|
|
14593
|
+
* @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
|
|
14594
|
+
* @param limit — null hoặc 0: không giới hạn record get về; 2: get về 2 record
|
|
14595
|
+
* @return — Array -> array = [{},{},...]
|
|
14596
|
+
*/
|
|
14597
|
+
getProductsByFields(query: object, projection?: object, sort?: object, limit?: number): Promise<unknown>;
|
|
14598
|
+
/**
|
|
14599
|
+
* @example:
|
|
14600
|
+
* this.vhQueryCafeWebAdmin.addCategory({name:'Danh mục 1'})
|
|
14601
|
+
.then((category)=>{
|
|
14602
|
+
console.log('addCategory', category);
|
|
14603
|
+
},error=>{
|
|
14604
|
+
console.log('error', error);
|
|
14605
|
+
})
|
|
14606
|
+
* @param colname
|
|
14607
|
+
* @param data
|
|
14608
|
+
* @return Promise => obj = {}
|
|
14609
|
+
* 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
|
|
14610
|
+
*/
|
|
14611
|
+
addCategory(data: object): Promise<unknown>;
|
|
14612
|
+
/**
|
|
14613
|
+
* @example:
|
|
14614
|
+
* this.vhQueryCafeWebAdmin.updateCategory('5fb6780ca2148e09806c5b01', {quantity:400})
|
|
14615
|
+
.then((bool)=>{
|
|
14616
|
+
console.log('updateCategory', bool);
|
|
14617
|
+
})
|
|
14618
|
+
* @param id_category
|
|
14619
|
+
* @param data
|
|
14620
|
+
* @return Promise => bool = true or false
|
|
14621
|
+
*/
|
|
14622
|
+
updateCategory(id_category: string, data: object): Promise<unknown>;
|
|
14623
|
+
/**
|
|
14624
|
+
* @example:
|
|
14625
|
+
* this.vhQueryCafeWebAdmin.deleteCategory('5fb67fda87c0f21d484cbdf3')
|
|
14626
|
+
.then((bool)=>{
|
|
14627
|
+
console.log('deleteCategory', bool);
|
|
14628
|
+
})
|
|
14629
|
+
* @param id_category
|
|
14630
|
+
* @return Promise => bool = true or false
|
|
14631
|
+
*/
|
|
14632
|
+
deleteCategory(id_category: string): Promise<unknown>;
|
|
14633
|
+
/**
|
|
14634
|
+
* @example
|
|
14635
|
+
* this.vhQueryCafeWebAdmin.getCategory('5fb67fda87c0f21d484cbdf3')
|
|
14324
14636
|
.then((category)=>{
|
|
14325
14637
|
console.log('getCategory', category);
|
|
14326
14638
|
})
|
|
@@ -14330,7 +14642,7 @@ export declare class VhQuerySalesWebAdmin {
|
|
|
14330
14642
|
getCategory(id_category: string): Promise<unknown>;
|
|
14331
14643
|
/**
|
|
14332
14644
|
* @example
|
|
14333
|
-
* this.
|
|
14645
|
+
* this.vhQueryCafeWebAdmin.getCategorys()
|
|
14334
14646
|
.then((categorys)=>{
|
|
14335
14647
|
console.log('getCategorys', categorys);
|
|
14336
14648
|
})
|
|
@@ -14339,7 +14651,7 @@ export declare class VhQuerySalesWebAdmin {
|
|
|
14339
14651
|
getCategorys(): Promise<unknown>;
|
|
14340
14652
|
/**
|
|
14341
14653
|
* @example:
|
|
14342
|
-
* this.
|
|
14654
|
+
* this.vhQueryCafeWebAdmin.getCategorysByFields({name:{$eq:'name abc'}}, {},{},0)
|
|
14343
14655
|
.then((categorys)=>{
|
|
14344
14656
|
console.log('getCategorysByFields', categorys);
|
|
14345
14657
|
})
|