ionic-vhframeworks 3.7.6 → 3.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.
- 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 +360 -32
- package/package.json +1 -1
|
@@ -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)=>{
|
|
@@ -10551,6 +10555,7 @@ export declare class VhQuerySales {
|
|
|
10551
10555
|
* @Notice id_product = 'all' or id_product;
|
|
10552
10556
|
* @Notice bill_type = [1,10,15,30,2,3,9,31]
|
|
10553
10557
|
*/
|
|
10558
|
+
private getReportInputOutputInventory_byEndTime_byIDProduct_allRecords;
|
|
10554
10559
|
getReportInputOutputInventory_byEndTime_byIDProduct(endtime: any, IDproduct: any, IDbranch?: string): Promise<any>;
|
|
10555
10560
|
/**
|
|
10556
10561
|
* Hàm này dùng trong page Tồn kho, giá trị tồn kho, doanh số, chi phí nhập hàng tại một thời điểm endtime nào đó -> chi tiết của một sản phẩm nào đó
|
|
@@ -10634,6 +10639,21 @@ export declare class VhQuerySales {
|
|
|
10634
10639
|
*/
|
|
10635
10640
|
private syncInventoryEveryDay_Stock1stDayOfMonth;
|
|
10636
10641
|
private syncInventoryEveryDay1;
|
|
10642
|
+
/**
|
|
10643
|
+
* Hàm này dùng trong page XUẤT-NHẬP-TỒN -> Xuất nhập tồn
|
|
10644
|
+
* @example:
|
|
10645
|
+
* this.vhQuerySales.getReportInputOutputInventory_byTime_byIDProduct(starttime , endtime, 'all', 'tj1iYodbVoShwtEetACx')
|
|
10646
|
+
.then((json)=>{
|
|
10647
|
+
console.log('json', json);
|
|
10648
|
+
})
|
|
10649
|
+
* @param starttime
|
|
10650
|
+
* @param endtime
|
|
10651
|
+
* @param IDproduct: 'all' or id_product;
|
|
10652
|
+
* @param IDbranch: 'all' or id_branch;
|
|
10653
|
+
* @return Promise Array *
|
|
10654
|
+
* @Notice bill_type = [1,10,15,30,2,3,9,31]
|
|
10655
|
+
*/
|
|
10656
|
+
makeCorrectQuantityProducts_60days(): Promise<any>;
|
|
10637
10657
|
/**
|
|
10638
10658
|
* @example:
|
|
10639
10659
|
* this.vhQuerySales.makeCorrectQuantityProducts()
|
|
@@ -14124,7 +14144,7 @@ export declare class VhQuerySalesWebUser {
|
|
|
14124
14144
|
constructor(vhmongo_firebase: Vhmongo_firebase, vhQuery: VhQuery, vhAuth: VhAuth, vhAlgorithm: VhAlgorithm);
|
|
14125
14145
|
/**
|
|
14126
14146
|
* @example
|
|
14127
|
-
* this.
|
|
14147
|
+
* this.vhQuerySalesWebUser.getBranch('5fb67fda87c0f21d484cbdf3')
|
|
14128
14148
|
.then((branch)=>{
|
|
14129
14149
|
console.log('getBranch', branch);
|
|
14130
14150
|
},error=>{
|
|
@@ -14136,7 +14156,7 @@ export declare class VhQuerySalesWebUser {
|
|
|
14136
14156
|
getBranch(id_branch: string): Promise<unknown>;
|
|
14137
14157
|
/**
|
|
14138
14158
|
* @example
|
|
14139
|
-
* this.
|
|
14159
|
+
* this.vhQuerySalesWebUser.getBranchs()
|
|
14140
14160
|
.then((branchs)=>{
|
|
14141
14161
|
console.log('getBranchs', branchs);
|
|
14142
14162
|
},error=>{
|
|
@@ -14147,7 +14167,7 @@ export declare class VhQuerySalesWebUser {
|
|
|
14147
14167
|
getBranchs(): Promise<unknown>;
|
|
14148
14168
|
/**
|
|
14149
14169
|
* @example
|
|
14150
|
-
* this.
|
|
14170
|
+
* this.vhQuerySalesWebUser.getProduct('5fb67fda87c0f21d484cbdf3')
|
|
14151
14171
|
.then((product)=>{
|
|
14152
14172
|
console.log('getProduct', product);
|
|
14153
14173
|
}, error=>{
|
|
@@ -14159,7 +14179,7 @@ export declare class VhQuerySalesWebUser {
|
|
|
14159
14179
|
getProduct(id_product: string): Promise<unknown>;
|
|
14160
14180
|
/**
|
|
14161
14181
|
* @example:
|
|
14162
|
-
* this.
|
|
14182
|
+
* this.vhQuerySalesWebUser.getProductsByFields({name:{$eq:'name abc'}}, {},{},0)
|
|
14163
14183
|
.then((products)=>{
|
|
14164
14184
|
console.log('getProductsByFields', products);
|
|
14165
14185
|
},error=>{
|
|
@@ -14174,7 +14194,7 @@ export declare class VhQuerySalesWebUser {
|
|
|
14174
14194
|
getProductsByFields(query: object, projection?: object, sort?: object, limit?: number): Promise<unknown>;
|
|
14175
14195
|
/**
|
|
14176
14196
|
* @example
|
|
14177
|
-
* this.
|
|
14197
|
+
* this.vhQuerySalesWebUser.getCategory('5fb67fda87c0f21d484cbdf3')
|
|
14178
14198
|
.then((category)=>{
|
|
14179
14199
|
console.log('getCategory', category);
|
|
14180
14200
|
})
|
|
@@ -14184,7 +14204,7 @@ export declare class VhQuerySalesWebUser {
|
|
|
14184
14204
|
getCategory(id_category: string): Promise<unknown>;
|
|
14185
14205
|
/**
|
|
14186
14206
|
* @example
|
|
14187
|
-
* this.
|
|
14207
|
+
* this.vhQuerySalesWebUser.getCategorys()
|
|
14188
14208
|
.then((categorys)=>{
|
|
14189
14209
|
console.log('getCategorys', categorys);
|
|
14190
14210
|
})
|
|
@@ -14193,7 +14213,7 @@ export declare class VhQuerySalesWebUser {
|
|
|
14193
14213
|
getCategorys(): Promise<unknown>;
|
|
14194
14214
|
/**
|
|
14195
14215
|
* @example:
|
|
14196
|
-
* this.
|
|
14216
|
+
* this.vhQuerySalesWebUser.getCategorysByFields({name:{$eq:'name abc'}}, {},{},0)
|
|
14197
14217
|
.then((categorys)=>{
|
|
14198
14218
|
console.log('getCategorysByFields', categorys);
|
|
14199
14219
|
})
|
|
@@ -14213,7 +14233,7 @@ export declare class VhQuerySalesWebAdmin {
|
|
|
14213
14233
|
constructor(vhmongo_firebase: Vhmongo_firebase, vhQuery: VhQuery, vhAuth: VhAuth, vhAlgorithm: VhAlgorithm);
|
|
14214
14234
|
/**
|
|
14215
14235
|
* @example
|
|
14216
|
-
* this.
|
|
14236
|
+
* this.vhQuerySalesWebAdmin.getBranch('5fb67fda87c0f21d484cbdf3')
|
|
14217
14237
|
.then((branch)=>{
|
|
14218
14238
|
console.log('getBranch', branch);
|
|
14219
14239
|
},error=>{
|
|
@@ -14225,7 +14245,7 @@ export declare class VhQuerySalesWebAdmin {
|
|
|
14225
14245
|
getBranch(id_branch: string): Promise<unknown>;
|
|
14226
14246
|
/**
|
|
14227
14247
|
* @example
|
|
14228
|
-
* this.
|
|
14248
|
+
* this.vhQuerySalesWebAdmin.getBranchs()
|
|
14229
14249
|
.then((branchs)=>{
|
|
14230
14250
|
console.log('getBranchs', branchs);
|
|
14231
14251
|
},error=>{
|
|
@@ -14234,10 +14254,22 @@ export declare class VhQuerySalesWebAdmin {
|
|
|
14234
14254
|
* @return Promise => array(object) = [{},{},..]
|
|
14235
14255
|
*/
|
|
14236
14256
|
getBranchs(): Promise<unknown>;
|
|
14257
|
+
/**
|
|
14258
|
+
* @example:
|
|
14259
|
+
* this.vhQuerySalesWebAdmin.addProduct({name:'camera 2', quantity:20, price:200000})
|
|
14260
|
+
.then((product)=>{
|
|
14261
|
+
console.log('addProduct', product);
|
|
14262
|
+
}, error=>{
|
|
14263
|
+
console.log('error', error);
|
|
14264
|
+
})
|
|
14265
|
+
* @param data : object
|
|
14266
|
+
* @return Promise => object = {}
|
|
14267
|
+
* 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
|
|
14268
|
+
*/
|
|
14237
14269
|
addProduct(data: any): Promise<unknown>;
|
|
14238
14270
|
/**
|
|
14239
14271
|
* @example:
|
|
14240
|
-
* this.
|
|
14272
|
+
* this.vhQuerySalesWebAdmin.updateProduct('5fb6780ca2148e09806c5b01', {quantity:400})
|
|
14241
14273
|
.then((bool)=>{
|
|
14242
14274
|
console.log('updateProduct', bool);
|
|
14243
14275
|
}, error=>{
|
|
@@ -14250,7 +14282,7 @@ export declare class VhQuerySalesWebAdmin {
|
|
|
14250
14282
|
updateProduct(id_product: string, data: object): Promise<unknown>;
|
|
14251
14283
|
/**
|
|
14252
14284
|
* @example:
|
|
14253
|
-
* this.
|
|
14285
|
+
* this.vhQuerySalesWebAdmin.deleteProduct('5fb67fda87c0f21d484cbdf3')
|
|
14254
14286
|
.then((bool)=>{
|
|
14255
14287
|
console.log('deleteDoc', bool);
|
|
14256
14288
|
}, error=>{
|
|
@@ -14262,7 +14294,7 @@ export declare class VhQuerySalesWebAdmin {
|
|
|
14262
14294
|
deleteProduct(id_product: string): Promise<unknown>;
|
|
14263
14295
|
/**
|
|
14264
14296
|
* @example
|
|
14265
|
-
* this.
|
|
14297
|
+
* this.vhQuerySalesWebAdmin.getProduct('5fb67fda87c0f21d484cbdf3')
|
|
14266
14298
|
.then((product)=>{
|
|
14267
14299
|
console.log('getProduct', product);
|
|
14268
14300
|
})
|
|
@@ -14272,7 +14304,7 @@ export declare class VhQuerySalesWebAdmin {
|
|
|
14272
14304
|
getProduct(id_product: string): Promise<unknown>;
|
|
14273
14305
|
/**
|
|
14274
14306
|
* @example:
|
|
14275
|
-
* this.
|
|
14307
|
+
* this.vhQuerySalesWebAdmin.getProductsByFields({name:{$eq:'name abc'}}, {},{},0)
|
|
14276
14308
|
.then((products)=>{
|
|
14277
14309
|
console.log('getProductsByFields', products);
|
|
14278
14310
|
})
|
|
@@ -14285,7 +14317,7 @@ export declare class VhQuerySalesWebAdmin {
|
|
|
14285
14317
|
getProductsByFields(query: object, projection?: object, sort?: object, limit?: number): Promise<unknown>;
|
|
14286
14318
|
/**
|
|
14287
14319
|
* @example:
|
|
14288
|
-
* this.
|
|
14320
|
+
* this.vhQuerySalesWebAdmin.addCategory({name:'Danh mục 1'})
|
|
14289
14321
|
.then((category)=>{
|
|
14290
14322
|
console.log('addCategory', category);
|
|
14291
14323
|
},error=>{
|
|
@@ -14299,7 +14331,7 @@ export declare class VhQuerySalesWebAdmin {
|
|
|
14299
14331
|
addCategory(data: object): Promise<unknown>;
|
|
14300
14332
|
/**
|
|
14301
14333
|
* @example:
|
|
14302
|
-
* this.
|
|
14334
|
+
* this.vhQuerySalesWebAdmin.updateCategory('5fb6780ca2148e09806c5b01', {quantity:400})
|
|
14303
14335
|
.then((bool)=>{
|
|
14304
14336
|
console.log('updateCategory', bool);
|
|
14305
14337
|
})
|
|
@@ -14310,7 +14342,7 @@ export declare class VhQuerySalesWebAdmin {
|
|
|
14310
14342
|
updateCategory(id_category: string, data: object): Promise<unknown>;
|
|
14311
14343
|
/**
|
|
14312
14344
|
* @example:
|
|
14313
|
-
* this.
|
|
14345
|
+
* this.vhQuerySalesWebAdmin.deleteCategory('5fb67fda87c0f21d484cbdf3')
|
|
14314
14346
|
.then((bool)=>{
|
|
14315
14347
|
console.log('deleteCategory', bool);
|
|
14316
14348
|
})
|
|
@@ -14320,7 +14352,303 @@ export declare class VhQuerySalesWebAdmin {
|
|
|
14320
14352
|
deleteCategory(id_category: string): Promise<unknown>;
|
|
14321
14353
|
/**
|
|
14322
14354
|
* @example
|
|
14323
|
-
* this.
|
|
14355
|
+
* this.vhQuerySalesWebAdmin.getCategory('5fb67fda87c0f21d484cbdf3')
|
|
14356
|
+
.then((category)=>{
|
|
14357
|
+
console.log('getCategory', category);
|
|
14358
|
+
})
|
|
14359
|
+
* @param id_category
|
|
14360
|
+
* @return Promise => obj ={} or null
|
|
14361
|
+
*/
|
|
14362
|
+
getCategory(id_category: string): Promise<unknown>;
|
|
14363
|
+
/**
|
|
14364
|
+
* @example
|
|
14365
|
+
* this.vhQuerySalesWebAdmin.getCategorys()
|
|
14366
|
+
.then((categorys)=>{
|
|
14367
|
+
console.log('getCategorys', categorys);
|
|
14368
|
+
})
|
|
14369
|
+
* @return Promise => array(object) = [{},{},..]
|
|
14370
|
+
*/
|
|
14371
|
+
getCategorys(): Promise<unknown>;
|
|
14372
|
+
/**
|
|
14373
|
+
* @example:
|
|
14374
|
+
* this.vhQuerySalesWebAdmin.getCategorysByFields({name:{$eq:'name abc'}}, {},{},0)
|
|
14375
|
+
.then((categorys)=>{
|
|
14376
|
+
console.log('getCategorysByFields', categorys);
|
|
14377
|
+
})
|
|
14378
|
+
* @param query
|
|
14379
|
+
* @param projection — đang tìm hiểu, tạm thời để giá trị là {}
|
|
14380
|
+
* @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
|
|
14381
|
+
* @param limit — null hoặc 0: không giới hạn record get về; 2: get về 2 record
|
|
14382
|
+
* @return — Array -> array = [{},{},...]
|
|
14383
|
+
*/
|
|
14384
|
+
getCategorysByFields(query: object, projection?: object, sort?: object, limit?: number): Promise<unknown>;
|
|
14385
|
+
}
|
|
14386
|
+
export declare class VhQueryCafeWebUser {
|
|
14387
|
+
private vhmongo_firebase;
|
|
14388
|
+
private vhQuery;
|
|
14389
|
+
private vhAuth;
|
|
14390
|
+
private vhAlgorithm;
|
|
14391
|
+
constructor(vhmongo_firebase: Vhmongo_firebase, vhQuery: VhQuery, vhAuth: VhAuth, vhAlgorithm: VhAlgorithm);
|
|
14392
|
+
/**
|
|
14393
|
+
* @example
|
|
14394
|
+
* this.vhQueryCafeWebUser.getBranch('5fb67fda87c0f21d484cbdf3')
|
|
14395
|
+
.then((branch)=>{
|
|
14396
|
+
console.log('getBranch', branch);
|
|
14397
|
+
},error=>{
|
|
14398
|
+
reject(error);
|
|
14399
|
+
})
|
|
14400
|
+
* @param id_branch
|
|
14401
|
+
* @return Promise => obj ={} or null
|
|
14402
|
+
*/
|
|
14403
|
+
getBranch(id_branch: string): Promise<unknown>;
|
|
14404
|
+
/**
|
|
14405
|
+
* @example
|
|
14406
|
+
* this.vhQueryCafeWebUser.getBranchs()
|
|
14407
|
+
.then((branchs)=>{
|
|
14408
|
+
console.log('getBranchs', branchs);
|
|
14409
|
+
},error=>{
|
|
14410
|
+
reject(error);
|
|
14411
|
+
})
|
|
14412
|
+
* @return Promise => array(object) = [{},{},..]
|
|
14413
|
+
*/
|
|
14414
|
+
getBranchs(): Promise<unknown>;
|
|
14415
|
+
/**
|
|
14416
|
+
* @example
|
|
14417
|
+
* this.vhQueryCafeWebUser.getProduct('5fb67fda87c0f21d484cbdf3')
|
|
14418
|
+
.then((product)=>{
|
|
14419
|
+
console.log('getProduct', product);
|
|
14420
|
+
}, error=>{
|
|
14421
|
+
reject(error)
|
|
14422
|
+
})
|
|
14423
|
+
* @param id_product
|
|
14424
|
+
* @return false or object
|
|
14425
|
+
*/
|
|
14426
|
+
getProduct(id_product: string): Promise<unknown>;
|
|
14427
|
+
/**
|
|
14428
|
+
* @example:
|
|
14429
|
+
* this.vhQueryCafeWebUser.getProductsByFields({name:{$eq:'name abc'}}, {},{},0)
|
|
14430
|
+
.then((products)=>{
|
|
14431
|
+
console.log('getProductsByFields', products);
|
|
14432
|
+
},error=>{
|
|
14433
|
+
console.log('error', error);
|
|
14434
|
+
})
|
|
14435
|
+
* @param query
|
|
14436
|
+
* @param projection — đang tìm hiểu, tạm thời để giá trị là {}
|
|
14437
|
+
* @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
|
|
14438
|
+
* @param limit — null hoặc 0: không giới hạn record get về; 2: get về 2 record
|
|
14439
|
+
* @return — Array -> array = [{},{},...]
|
|
14440
|
+
*/
|
|
14441
|
+
getProductsByFields(query: object, projection?: object, sort?: object, limit?: number): Promise<unknown>;
|
|
14442
|
+
/**
|
|
14443
|
+
* @example
|
|
14444
|
+
* this.vhQueryCafeWebUser.getCategory('5fb67fda87c0f21d484cbdf3')
|
|
14445
|
+
.then((category)=>{
|
|
14446
|
+
console.log('getCategory', category);
|
|
14447
|
+
})
|
|
14448
|
+
* @param id_category
|
|
14449
|
+
* @return Promise => obj ={} or null
|
|
14450
|
+
*/
|
|
14451
|
+
getCategory(id_category: string): Promise<unknown>;
|
|
14452
|
+
/**
|
|
14453
|
+
* @example
|
|
14454
|
+
* this.vhQueryCafeWebUser.getCategorys()
|
|
14455
|
+
.then((categorys)=>{
|
|
14456
|
+
console.log('getCategorys', categorys);
|
|
14457
|
+
})
|
|
14458
|
+
* @return Promise => array(object) = [{},{},..]
|
|
14459
|
+
*/
|
|
14460
|
+
getCategorys(): Promise<unknown>;
|
|
14461
|
+
/**
|
|
14462
|
+
* @example:
|
|
14463
|
+
* this.vhQueryCafeWebUser.getCategorysByFields({name:{$eq:'name abc'}}, {},{},0)
|
|
14464
|
+
.then((categorys)=>{
|
|
14465
|
+
console.log('getCategorysByFields', categorys);
|
|
14466
|
+
})
|
|
14467
|
+
* @param query
|
|
14468
|
+
* @param projection — đang tìm hiểu, tạm thời để giá trị là {}
|
|
14469
|
+
* @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
|
|
14470
|
+
* @param limit — null hoặc 0: không giới hạn record get về; 2: get về 2 record
|
|
14471
|
+
* @return — Array -> array = [{},{},...]
|
|
14472
|
+
*/
|
|
14473
|
+
getCategorysByFields(query: object, projection?: object, sort?: object, limit?: number): Promise<unknown>;
|
|
14474
|
+
}
|
|
14475
|
+
export declare class VhQueryCafeWebAdmin {
|
|
14476
|
+
private vhmongo_firebase;
|
|
14477
|
+
private vhQuery;
|
|
14478
|
+
private vhAuth;
|
|
14479
|
+
private vhAlgorithm;
|
|
14480
|
+
private products;
|
|
14481
|
+
constructor(vhmongo_firebase: Vhmongo_firebase, vhQuery: VhQuery, vhAuth: VhAuth, vhAlgorithm: VhAlgorithm);
|
|
14482
|
+
private getlocalProductAndCombosAndToppings;
|
|
14483
|
+
/**
|
|
14484
|
+
* @example:
|
|
14485
|
+
* let product = this.vhQueryCafe.getlocalProduct('5fb6780ca2148e09806c5b01');
|
|
14486
|
+
* @param id_product
|
|
14487
|
+
* @return Object => obj = {} or null
|
|
14488
|
+
*/
|
|
14489
|
+
private getlocalProduct;
|
|
14490
|
+
/**
|
|
14491
|
+
* @example
|
|
14492
|
+
* this.vhQueryCafeWebAdmin.getBranch('5fb67fda87c0f21d484cbdf3')
|
|
14493
|
+
.then((branch)=>{
|
|
14494
|
+
console.log('getBranch', branch);
|
|
14495
|
+
},error=>{
|
|
14496
|
+
reject(error);
|
|
14497
|
+
})
|
|
14498
|
+
* @param id_branch
|
|
14499
|
+
* @return Promise => obj ={} or null
|
|
14500
|
+
*/
|
|
14501
|
+
getBranch(id_branch: string): Promise<unknown>;
|
|
14502
|
+
/**
|
|
14503
|
+
* @example
|
|
14504
|
+
* this.vhQueryCafeWebAdmin.getBranchs()
|
|
14505
|
+
.then((branchs)=>{
|
|
14506
|
+
console.log('getBranchs', branchs);
|
|
14507
|
+
},error=>{
|
|
14508
|
+
reject(error);
|
|
14509
|
+
})
|
|
14510
|
+
* @return Promise => array(object) = [{},{},..]
|
|
14511
|
+
*/
|
|
14512
|
+
getBranchs(): Promise<unknown>;
|
|
14513
|
+
/**
|
|
14514
|
+
* @example:
|
|
14515
|
+
* this.vhQueryCafeWebAdmin.addProduct({name:'camera 2', quantity:20, price:200000})
|
|
14516
|
+
.then((product)=>{
|
|
14517
|
+
console.log('addProduct', product);
|
|
14518
|
+
}, error=>{
|
|
14519
|
+
console.log('error', error);
|
|
14520
|
+
})
|
|
14521
|
+
* @param data
|
|
14522
|
+
* @return Promise => object = {}
|
|
14523
|
+
* 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
|
|
14524
|
+
*/
|
|
14525
|
+
addProduct(data: any): Promise<unknown>;
|
|
14526
|
+
/**
|
|
14527
|
+
* @example:
|
|
14528
|
+
* this.vhQueryCafeWebAdmin.addSubsProduct('5fb6780ca2148e09806c5b01',[{price:0, name:'small'},{},...])
|
|
14529
|
+
.then((subproducts)=>{
|
|
14530
|
+
console.log('addSubsProduct', subproducts);
|
|
14531
|
+
}, error=>{
|
|
14532
|
+
console.log('error', error);
|
|
14533
|
+
})
|
|
14534
|
+
* @param data
|
|
14535
|
+
* @return Promise => object = {} hoặc null
|
|
14536
|
+
* Luu ý: chỉ có 2 trường hợp, hoặc là thêm thành công, hoặc là null
|
|
14537
|
+
*/
|
|
14538
|
+
addSubsProduct(id_product: any, dataArray: any): Promise<unknown>;
|
|
14539
|
+
/**
|
|
14540
|
+
* @example:
|
|
14541
|
+
* this.vhQueryCafeWebAdmin.updateSubProduct('5fb6780ca2148e09806c5b01', {quantity:400})
|
|
14542
|
+
.then((bool)=>{
|
|
14543
|
+
console.log('updateSubProduct', bool);
|
|
14544
|
+
}, error=>{
|
|
14545
|
+
console.log('error', error);
|
|
14546
|
+
})
|
|
14547
|
+
* @param id_product
|
|
14548
|
+
* @param id_subproduct
|
|
14549
|
+
* @param data
|
|
14550
|
+
* @return Promise => bool = true or false
|
|
14551
|
+
*/
|
|
14552
|
+
updateSubProduct(id_product: string, id_subproduct: string, data: object): Promise<unknown>;
|
|
14553
|
+
/**
|
|
14554
|
+
* @example:
|
|
14555
|
+
* this.vhQueryCafeWebAdmin.deleteSubProduct('5fb67fda87c0f21d484cbdf3')
|
|
14556
|
+
.then((bool)=>{
|
|
14557
|
+
console.log('deleteDoc', bool);
|
|
14558
|
+
}, error=>{
|
|
14559
|
+
reject(error)
|
|
14560
|
+
})
|
|
14561
|
+
* @param id_product
|
|
14562
|
+
* @param id_subproduct
|
|
14563
|
+
* @return Promise => bool = true or false
|
|
14564
|
+
*/
|
|
14565
|
+
deleteSubProduct(id_product: string, id_subproduct: string): Promise<unknown>;
|
|
14566
|
+
/**
|
|
14567
|
+
* @example:
|
|
14568
|
+
* this.vhQueryCafeWebAdmin.updateProduct('5fb6780ca2148e09806c5b01', {quantity:400})
|
|
14569
|
+
.then((bool)=>{
|
|
14570
|
+
console.log('updateProduct', bool);
|
|
14571
|
+
}, error=>{
|
|
14572
|
+
console.log('error', error);
|
|
14573
|
+
})
|
|
14574
|
+
* @param id_product
|
|
14575
|
+
* @param data
|
|
14576
|
+
* @return Promise => bool = true or false
|
|
14577
|
+
*/
|
|
14578
|
+
updateProduct(id_product: string, data: object): Promise<unknown>;
|
|
14579
|
+
/**
|
|
14580
|
+
* @example:
|
|
14581
|
+
* this.vhQueryCafeWebAdmin.deleteProduct('5fb67fda87c0f21d484cbdf3')
|
|
14582
|
+
.then((bool)=>{
|
|
14583
|
+
console.log('deleteDoc', bool);
|
|
14584
|
+
}, error=>{
|
|
14585
|
+
reject(error)
|
|
14586
|
+
})
|
|
14587
|
+
* @param id_product
|
|
14588
|
+
* @return Promise => bool = true or false
|
|
14589
|
+
*/
|
|
14590
|
+
deleteProduct(id_product: string): Promise<unknown>;
|
|
14591
|
+
/**
|
|
14592
|
+
* @example
|
|
14593
|
+
* this.vhQueryCafeWebAdmin.getProduct('5fb67fda87c0f21d484cbdf3')
|
|
14594
|
+
.then((product)=>{
|
|
14595
|
+
console.log('getProduct', product);
|
|
14596
|
+
})
|
|
14597
|
+
* @param id_product
|
|
14598
|
+
* @return false or object
|
|
14599
|
+
*/
|
|
14600
|
+
getProduct(id_product: string): Promise<unknown>;
|
|
14601
|
+
/**
|
|
14602
|
+
* @example:
|
|
14603
|
+
* this.vhQueryCafeWebAdmin.getProductsByFields({name:{$eq:'name abc'}}, {},{},0)
|
|
14604
|
+
.then((products)=>{
|
|
14605
|
+
console.log('getProductsByFields', products);
|
|
14606
|
+
})
|
|
14607
|
+
* @param query
|
|
14608
|
+
* @param projection — đang tìm hiểu, tạm thời để giá trị là {}
|
|
14609
|
+
* @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
|
|
14610
|
+
* @param limit — null hoặc 0: không giới hạn record get về; 2: get về 2 record
|
|
14611
|
+
* @return — Array -> array = [{},{},...]
|
|
14612
|
+
*/
|
|
14613
|
+
getProductsByFields(query: object, projection?: object, sort?: object, limit?: number): Promise<unknown>;
|
|
14614
|
+
/**
|
|
14615
|
+
* @example:
|
|
14616
|
+
* this.vhQueryCafeWebAdmin.addCategory({name:'Danh mục 1'})
|
|
14617
|
+
.then((category)=>{
|
|
14618
|
+
console.log('addCategory', category);
|
|
14619
|
+
},error=>{
|
|
14620
|
+
console.log('error', error);
|
|
14621
|
+
})
|
|
14622
|
+
* @param colname
|
|
14623
|
+
* @param data
|
|
14624
|
+
* @return Promise => obj = {}
|
|
14625
|
+
* 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
|
|
14626
|
+
*/
|
|
14627
|
+
addCategory(data: object): Promise<unknown>;
|
|
14628
|
+
/**
|
|
14629
|
+
* @example:
|
|
14630
|
+
* this.vhQueryCafeWebAdmin.updateCategory('5fb6780ca2148e09806c5b01', {quantity:400})
|
|
14631
|
+
.then((bool)=>{
|
|
14632
|
+
console.log('updateCategory', bool);
|
|
14633
|
+
})
|
|
14634
|
+
* @param id_category
|
|
14635
|
+
* @param data
|
|
14636
|
+
* @return Promise => bool = true or false
|
|
14637
|
+
*/
|
|
14638
|
+
updateCategory(id_category: string, data: object): Promise<unknown>;
|
|
14639
|
+
/**
|
|
14640
|
+
* @example:
|
|
14641
|
+
* this.vhQueryCafeWebAdmin.deleteCategory('5fb67fda87c0f21d484cbdf3')
|
|
14642
|
+
.then((bool)=>{
|
|
14643
|
+
console.log('deleteCategory', bool);
|
|
14644
|
+
})
|
|
14645
|
+
* @param id_category
|
|
14646
|
+
* @return Promise => bool = true or false
|
|
14647
|
+
*/
|
|
14648
|
+
deleteCategory(id_category: string): Promise<unknown>;
|
|
14649
|
+
/**
|
|
14650
|
+
* @example
|
|
14651
|
+
* this.vhQueryCafeWebAdmin.getCategory('5fb67fda87c0f21d484cbdf3')
|
|
14324
14652
|
.then((category)=>{
|
|
14325
14653
|
console.log('getCategory', category);
|
|
14326
14654
|
})
|
|
@@ -14330,7 +14658,7 @@ export declare class VhQuerySalesWebAdmin {
|
|
|
14330
14658
|
getCategory(id_category: string): Promise<unknown>;
|
|
14331
14659
|
/**
|
|
14332
14660
|
* @example
|
|
14333
|
-
* this.
|
|
14661
|
+
* this.vhQueryCafeWebAdmin.getCategorys()
|
|
14334
14662
|
.then((categorys)=>{
|
|
14335
14663
|
console.log('getCategorys', categorys);
|
|
14336
14664
|
})
|
|
@@ -14339,7 +14667,7 @@ export declare class VhQuerySalesWebAdmin {
|
|
|
14339
14667
|
getCategorys(): Promise<unknown>;
|
|
14340
14668
|
/**
|
|
14341
14669
|
* @example:
|
|
14342
|
-
* this.
|
|
14670
|
+
* this.vhQueryCafeWebAdmin.getCategorysByFields({name:{$eq:'name abc'}}, {},{},0)
|
|
14343
14671
|
.then((categorys)=>{
|
|
14344
14672
|
console.log('getCategorysByFields', categorys);
|
|
14345
14673
|
})
|