ionic-vhframeworks 3.7.9 → 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 +327 -19
- package/package.json +1 -1
|
@@ -14128,7 +14128,7 @@ export declare class VhQuerySalesWebUser {
|
|
|
14128
14128
|
constructor(vhmongo_firebase: Vhmongo_firebase, vhQuery: VhQuery, vhAuth: VhAuth, vhAlgorithm: VhAlgorithm);
|
|
14129
14129
|
/**
|
|
14130
14130
|
* @example
|
|
14131
|
-
* this.
|
|
14131
|
+
* this.vhQuerySalesWebUser.getBranch('5fb67fda87c0f21d484cbdf3')
|
|
14132
14132
|
.then((branch)=>{
|
|
14133
14133
|
console.log('getBranch', branch);
|
|
14134
14134
|
},error=>{
|
|
@@ -14140,7 +14140,7 @@ export declare class VhQuerySalesWebUser {
|
|
|
14140
14140
|
getBranch(id_branch: string): Promise<unknown>;
|
|
14141
14141
|
/**
|
|
14142
14142
|
* @example
|
|
14143
|
-
* this.
|
|
14143
|
+
* this.vhQuerySalesWebUser.getBranchs()
|
|
14144
14144
|
.then((branchs)=>{
|
|
14145
14145
|
console.log('getBranchs', branchs);
|
|
14146
14146
|
},error=>{
|
|
@@ -14151,7 +14151,7 @@ export declare class VhQuerySalesWebUser {
|
|
|
14151
14151
|
getBranchs(): Promise<unknown>;
|
|
14152
14152
|
/**
|
|
14153
14153
|
* @example
|
|
14154
|
-
* this.
|
|
14154
|
+
* this.vhQuerySalesWebUser.getProduct('5fb67fda87c0f21d484cbdf3')
|
|
14155
14155
|
.then((product)=>{
|
|
14156
14156
|
console.log('getProduct', product);
|
|
14157
14157
|
}, error=>{
|
|
@@ -14163,7 +14163,7 @@ export declare class VhQuerySalesWebUser {
|
|
|
14163
14163
|
getProduct(id_product: string): Promise<unknown>;
|
|
14164
14164
|
/**
|
|
14165
14165
|
* @example:
|
|
14166
|
-
* this.
|
|
14166
|
+
* this.vhQuerySalesWebUser.getProductsByFields({name:{$eq:'name abc'}}, {},{},0)
|
|
14167
14167
|
.then((products)=>{
|
|
14168
14168
|
console.log('getProductsByFields', products);
|
|
14169
14169
|
},error=>{
|
|
@@ -14178,7 +14178,7 @@ export declare class VhQuerySalesWebUser {
|
|
|
14178
14178
|
getProductsByFields(query: object, projection?: object, sort?: object, limit?: number): Promise<unknown>;
|
|
14179
14179
|
/**
|
|
14180
14180
|
* @example
|
|
14181
|
-
* this.
|
|
14181
|
+
* this.vhQuerySalesWebUser.getCategory('5fb67fda87c0f21d484cbdf3')
|
|
14182
14182
|
.then((category)=>{
|
|
14183
14183
|
console.log('getCategory', category);
|
|
14184
14184
|
})
|
|
@@ -14188,7 +14188,7 @@ export declare class VhQuerySalesWebUser {
|
|
|
14188
14188
|
getCategory(id_category: string): Promise<unknown>;
|
|
14189
14189
|
/**
|
|
14190
14190
|
* @example
|
|
14191
|
-
* this.
|
|
14191
|
+
* this.vhQuerySalesWebUser.getCategorys()
|
|
14192
14192
|
.then((categorys)=>{
|
|
14193
14193
|
console.log('getCategorys', categorys);
|
|
14194
14194
|
})
|
|
@@ -14197,7 +14197,7 @@ export declare class VhQuerySalesWebUser {
|
|
|
14197
14197
|
getCategorys(): Promise<unknown>;
|
|
14198
14198
|
/**
|
|
14199
14199
|
* @example:
|
|
14200
|
-
* this.
|
|
14200
|
+
* this.vhQuerySalesWebUser.getCategorysByFields({name:{$eq:'name abc'}}, {},{},0)
|
|
14201
14201
|
.then((categorys)=>{
|
|
14202
14202
|
console.log('getCategorysByFields', categorys);
|
|
14203
14203
|
})
|
|
@@ -14217,7 +14217,7 @@ export declare class VhQuerySalesWebAdmin {
|
|
|
14217
14217
|
constructor(vhmongo_firebase: Vhmongo_firebase, vhQuery: VhQuery, vhAuth: VhAuth, vhAlgorithm: VhAlgorithm);
|
|
14218
14218
|
/**
|
|
14219
14219
|
* @example
|
|
14220
|
-
* this.
|
|
14220
|
+
* this.vhQuerySalesWebAdmin.getBranch('5fb67fda87c0f21d484cbdf3')
|
|
14221
14221
|
.then((branch)=>{
|
|
14222
14222
|
console.log('getBranch', branch);
|
|
14223
14223
|
},error=>{
|
|
@@ -14229,7 +14229,7 @@ export declare class VhQuerySalesWebAdmin {
|
|
|
14229
14229
|
getBranch(id_branch: string): Promise<unknown>;
|
|
14230
14230
|
/**
|
|
14231
14231
|
* @example
|
|
14232
|
-
* this.
|
|
14232
|
+
* this.vhQuerySalesWebAdmin.getBranchs()
|
|
14233
14233
|
.then((branchs)=>{
|
|
14234
14234
|
console.log('getBranchs', branchs);
|
|
14235
14235
|
},error=>{
|
|
@@ -14238,10 +14238,22 @@ export declare class VhQuerySalesWebAdmin {
|
|
|
14238
14238
|
* @return Promise => array(object) = [{},{},..]
|
|
14239
14239
|
*/
|
|
14240
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
|
+
*/
|
|
14241
14253
|
addProduct(data: any): Promise<unknown>;
|
|
14242
14254
|
/**
|
|
14243
14255
|
* @example:
|
|
14244
|
-
* this.
|
|
14256
|
+
* this.vhQuerySalesWebAdmin.updateProduct('5fb6780ca2148e09806c5b01', {quantity:400})
|
|
14245
14257
|
.then((bool)=>{
|
|
14246
14258
|
console.log('updateProduct', bool);
|
|
14247
14259
|
}, error=>{
|
|
@@ -14254,7 +14266,7 @@ export declare class VhQuerySalesWebAdmin {
|
|
|
14254
14266
|
updateProduct(id_product: string, data: object): Promise<unknown>;
|
|
14255
14267
|
/**
|
|
14256
14268
|
* @example:
|
|
14257
|
-
* this.
|
|
14269
|
+
* this.vhQuerySalesWebAdmin.deleteProduct('5fb67fda87c0f21d484cbdf3')
|
|
14258
14270
|
.then((bool)=>{
|
|
14259
14271
|
console.log('deleteDoc', bool);
|
|
14260
14272
|
}, error=>{
|
|
@@ -14266,7 +14278,7 @@ export declare class VhQuerySalesWebAdmin {
|
|
|
14266
14278
|
deleteProduct(id_product: string): Promise<unknown>;
|
|
14267
14279
|
/**
|
|
14268
14280
|
* @example
|
|
14269
|
-
* this.
|
|
14281
|
+
* this.vhQuerySalesWebAdmin.getProduct('5fb67fda87c0f21d484cbdf3')
|
|
14270
14282
|
.then((product)=>{
|
|
14271
14283
|
console.log('getProduct', product);
|
|
14272
14284
|
})
|
|
@@ -14276,7 +14288,7 @@ export declare class VhQuerySalesWebAdmin {
|
|
|
14276
14288
|
getProduct(id_product: string): Promise<unknown>;
|
|
14277
14289
|
/**
|
|
14278
14290
|
* @example:
|
|
14279
|
-
* this.
|
|
14291
|
+
* this.vhQuerySalesWebAdmin.getProductsByFields({name:{$eq:'name abc'}}, {},{},0)
|
|
14280
14292
|
.then((products)=>{
|
|
14281
14293
|
console.log('getProductsByFields', products);
|
|
14282
14294
|
})
|
|
@@ -14289,7 +14301,7 @@ export declare class VhQuerySalesWebAdmin {
|
|
|
14289
14301
|
getProductsByFields(query: object, projection?: object, sort?: object, limit?: number): Promise<unknown>;
|
|
14290
14302
|
/**
|
|
14291
14303
|
* @example:
|
|
14292
|
-
* this.
|
|
14304
|
+
* this.vhQuerySalesWebAdmin.addCategory({name:'Danh mục 1'})
|
|
14293
14305
|
.then((category)=>{
|
|
14294
14306
|
console.log('addCategory', category);
|
|
14295
14307
|
},error=>{
|
|
@@ -14303,7 +14315,7 @@ export declare class VhQuerySalesWebAdmin {
|
|
|
14303
14315
|
addCategory(data: object): Promise<unknown>;
|
|
14304
14316
|
/**
|
|
14305
14317
|
* @example:
|
|
14306
|
-
* this.
|
|
14318
|
+
* this.vhQuerySalesWebAdmin.updateCategory('5fb6780ca2148e09806c5b01', {quantity:400})
|
|
14307
14319
|
.then((bool)=>{
|
|
14308
14320
|
console.log('updateCategory', bool);
|
|
14309
14321
|
})
|
|
@@ -14314,7 +14326,7 @@ export declare class VhQuerySalesWebAdmin {
|
|
|
14314
14326
|
updateCategory(id_category: string, data: object): Promise<unknown>;
|
|
14315
14327
|
/**
|
|
14316
14328
|
* @example:
|
|
14317
|
-
* this.
|
|
14329
|
+
* this.vhQuerySalesWebAdmin.deleteCategory('5fb67fda87c0f21d484cbdf3')
|
|
14318
14330
|
.then((bool)=>{
|
|
14319
14331
|
console.log('deleteCategory', bool);
|
|
14320
14332
|
})
|
|
@@ -14324,7 +14336,303 @@ export declare class VhQuerySalesWebAdmin {
|
|
|
14324
14336
|
deleteCategory(id_category: string): Promise<unknown>;
|
|
14325
14337
|
/**
|
|
14326
14338
|
* @example
|
|
14327
|
-
* 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')
|
|
14328
14636
|
.then((category)=>{
|
|
14329
14637
|
console.log('getCategory', category);
|
|
14330
14638
|
})
|
|
@@ -14334,7 +14642,7 @@ export declare class VhQuerySalesWebAdmin {
|
|
|
14334
14642
|
getCategory(id_category: string): Promise<unknown>;
|
|
14335
14643
|
/**
|
|
14336
14644
|
* @example
|
|
14337
|
-
* this.
|
|
14645
|
+
* this.vhQueryCafeWebAdmin.getCategorys()
|
|
14338
14646
|
.then((categorys)=>{
|
|
14339
14647
|
console.log('getCategorys', categorys);
|
|
14340
14648
|
})
|
|
@@ -14343,7 +14651,7 @@ export declare class VhQuerySalesWebAdmin {
|
|
|
14343
14651
|
getCategorys(): Promise<unknown>;
|
|
14344
14652
|
/**
|
|
14345
14653
|
* @example:
|
|
14346
|
-
* this.
|
|
14654
|
+
* this.vhQueryCafeWebAdmin.getCategorysByFields({name:{$eq:'name abc'}}, {},{},0)
|
|
14347
14655
|
.then((categorys)=>{
|
|
14348
14656
|
console.log('getCategorysByFields', categorys);
|
|
14349
14657
|
})
|