ionic-vhframeworks 3.7.2 → 3.7.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.
- 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 +286 -7
- package/package.json +1 -1
|
@@ -300,10 +300,16 @@ export declare class VhAuth {
|
|
|
300
300
|
private initializeDB;
|
|
301
301
|
/**
|
|
302
302
|
* @example:
|
|
303
|
-
* this.vhAuth.initializeProject('vhsales','firebase-mongo','research','research');
|
|
304
|
-
* @param
|
|
303
|
+
* this.vhAuth.initializeProject('vhsales','firebase-mongo','research','research', 394637, 'all');
|
|
304
|
+
* @param projectname
|
|
305
|
+
* @param dbstorage
|
|
306
|
+
* @param dbserverversion
|
|
307
|
+
* @param camserverversion
|
|
308
|
+
* @param fwcode
|
|
309
|
+
* @param database : tất cả database 'all' hoặc một database nào đó '4wk3JMSwSjh4kOLWOMbLbWt0Rdk2'
|
|
310
|
+
* @returns
|
|
305
311
|
*/
|
|
306
|
-
initializeProject(projectname: string, dbstorage: string, dbserverversion: string, camserverversion: string, fwcode: number): any;
|
|
312
|
+
initializeProject(projectname: string, dbstorage: string, dbserverversion: string, camserverversion: string, fwcode: number, database: string): any;
|
|
307
313
|
/**
|
|
308
314
|
* @example:
|
|
309
315
|
* this.vhAuth.runOnMGDBServerVersion();
|
|
@@ -1001,7 +1007,7 @@ export declare class VhQueryCafe {
|
|
|
1001
1007
|
/**
|
|
1002
1008
|
* @Nghiệp vụ tạo (bill_type 5->1), hủy đơn hàng bán món ăn (dùng hàm)
|
|
1003
1009
|
* {createBill, getBill} -> {createBill_detail, updateBill_detail, deleteBill_detail} -> {saveBill_Billdetail, deleteBill_Billdetail}
|
|
1004
|
-
* @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)
|
|
1005
1011
|
* {getBill, getBill_Billdetail} -> {updateBill_Billdetail}
|
|
1006
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)
|
|
1007
1013
|
* {createBill_Billdetail} -> {updateBill_Billdetail, deleteBill_Billdetail}
|
|
@@ -2911,7 +2917,7 @@ export declare class VhQueryCafe {
|
|
|
2911
2917
|
/**
|
|
2912
2918
|
* hàm này chỉ dùng cho trường hợp bill đã lưu rồi mà muốn sửa
|
|
2913
2919
|
* @example
|
|
2914
|
-
this.vhQueryCafe.
|
|
2920
|
+
this.vhQueryCafe.updateBill_Billdetail('SzyEYNN39Mq90NkzUFpz',{},[{},{},...])
|
|
2915
2921
|
.then(()=>{
|
|
2916
2922
|
console.log("success");
|
|
2917
2923
|
})
|
|
@@ -7000,6 +7006,44 @@ export declare class VhQuerySales {
|
|
|
7000
7006
|
private subjectwarrantys;
|
|
7001
7007
|
private subjectdiscount_bills;
|
|
7002
7008
|
constructor(vhmongo_firebase: Vhmongo_firebase, vhQuery: VhQuery, vhAuth: VhAuth, vhAlgorithm: VhAlgorithm, iap2: InAppPurchase2, platform: Platform);
|
|
7009
|
+
/**
|
|
7010
|
+
* Hàm callback BÌNH LUẬN trên fanpage có id là id_fanpage
|
|
7011
|
+
* @example:
|
|
7012
|
+
* this.vhQuerySales.observableWebhookFeedFacebook('102622138931525').subscribe((entry:any) => {
|
|
7013
|
+
console.log('entry', entry);
|
|
7014
|
+
})
|
|
7015
|
+
|
|
7016
|
+
ngOnDestroy(){
|
|
7017
|
+
this.vhQuerySales.unsubscribeWebhookFeedFacebook('102622138931525');
|
|
7018
|
+
}
|
|
7019
|
+
* @returns Observerble (Object) => obj = {id, time, changes}
|
|
7020
|
+
*/
|
|
7021
|
+
observableWebhookFeedFacebook(id_fanpage: string): Observable<unknown>;
|
|
7022
|
+
/**
|
|
7023
|
+
* hàm disable calback BÌNH LUẬN
|
|
7024
|
+
* @example:
|
|
7025
|
+
* this.vhQuerySales.unsubscribeWebhookFeedFacebook('102622138931525');
|
|
7026
|
+
*/
|
|
7027
|
+
unsubscribeWebhookFeedFacebook(id_fanpage: string): void;
|
|
7028
|
+
/**
|
|
7029
|
+
* Hàm callback TIN NHẮN trên fanpage có id là id_fanpage
|
|
7030
|
+
* @example:
|
|
7031
|
+
* this.vhQuerySales.observableWebhookMessagesFacebook('102622138931525').subscribe((entry:any) => {
|
|
7032
|
+
console.log('entry', entry);
|
|
7033
|
+
})
|
|
7034
|
+
|
|
7035
|
+
ngOnDestroy(){
|
|
7036
|
+
this.vhQuerySales.unsubscribeWebhookMessagesFacebook('102622138931525');
|
|
7037
|
+
}
|
|
7038
|
+
* @returns Observerble (Object) => obj = {id, time, messaging}
|
|
7039
|
+
*/
|
|
7040
|
+
observableWebhookMessagesFacebook(id_fanpage: string): Observable<unknown>;
|
|
7041
|
+
/**
|
|
7042
|
+
* hàm disable calback TÍN NHẮN
|
|
7043
|
+
* @example:
|
|
7044
|
+
* this.vhQuerySales.unsubscribeWebhookMessagesFacebook('102622138931525');
|
|
7045
|
+
*/
|
|
7046
|
+
unsubscribeWebhookMessagesFacebook(id_fanpage: string): void;
|
|
7003
7047
|
/**------------------------TIKI Ecommerce-------------------------- */
|
|
7004
7048
|
/**
|
|
7005
7049
|
* @example:
|
|
@@ -9739,7 +9783,7 @@ export declare class VhQuerySales {
|
|
|
9739
9783
|
/**
|
|
9740
9784
|
* hàm này chỉ dùng cho trường hợp bill đã lưu rồi mà muốn sửa
|
|
9741
9785
|
* @example
|
|
9742
|
-
this.vhQuerySales.
|
|
9786
|
+
this.vhQuerySales.updateBill_Billdetail('SzyEYNN39Mq90NkzUFpz',{},[{},{},...])
|
|
9743
9787
|
.then(()=>{
|
|
9744
9788
|
console.log("success");
|
|
9745
9789
|
})
|
|
@@ -10292,7 +10336,7 @@ export declare class VhQuerySales {
|
|
|
10292
10336
|
* let discount = this.vhQuerySales.getDiscount_bill_byCustomer(43000000, '7YLcm0cFKLu2KaQQ8cyv');
|
|
10293
10337
|
* @param total_price : Tổng giá
|
|
10294
10338
|
* @param id_customer
|
|
10295
|
-
* @returns Object or null => obj = {
|
|
10339
|
+
* @returns Object or null => obj = {discount}, discount là số tiền đc chiết khấu,
|
|
10296
10340
|
* trả về null nghĩa là khách hàng này không có chiết khấu theo hóa đơn
|
|
10297
10341
|
*/
|
|
10298
10342
|
getDiscount_bill_byCustomer(total_price: number, id_customer: any): any;
|
|
@@ -14072,6 +14116,241 @@ export declare class VhMqttService {
|
|
|
14072
14116
|
getConnectedSSID(): Promise<unknown>;
|
|
14073
14117
|
private getIotID;
|
|
14074
14118
|
}
|
|
14119
|
+
export declare class VhQuerySalesWebUser {
|
|
14120
|
+
private vhmongo_firebase;
|
|
14121
|
+
private vhQuery;
|
|
14122
|
+
private vhAuth;
|
|
14123
|
+
private vhAlgorithm;
|
|
14124
|
+
constructor(vhmongo_firebase: Vhmongo_firebase, vhQuery: VhQuery, vhAuth: VhAuth, vhAlgorithm: VhAlgorithm);
|
|
14125
|
+
/**
|
|
14126
|
+
* @example
|
|
14127
|
+
* this.vhQuerySales.getBranch('5fb67fda87c0f21d484cbdf3')
|
|
14128
|
+
.then((branch)=>{
|
|
14129
|
+
console.log('getBranch', branch);
|
|
14130
|
+
},error=>{
|
|
14131
|
+
reject(error);
|
|
14132
|
+
})
|
|
14133
|
+
* @param id_branch
|
|
14134
|
+
* @return Promise => obj ={} or null
|
|
14135
|
+
*/
|
|
14136
|
+
getBranch(id_branch: string): Promise<unknown>;
|
|
14137
|
+
/**
|
|
14138
|
+
* @example
|
|
14139
|
+
* this.vhQuerySales.getBranchs()
|
|
14140
|
+
.then((branchs)=>{
|
|
14141
|
+
console.log('getBranchs', branchs);
|
|
14142
|
+
},error=>{
|
|
14143
|
+
reject(error);
|
|
14144
|
+
})
|
|
14145
|
+
* @return Promise => array(object) = [{},{},..]
|
|
14146
|
+
*/
|
|
14147
|
+
getBranchs(): Promise<unknown>;
|
|
14148
|
+
/**
|
|
14149
|
+
* @example
|
|
14150
|
+
* this.vhQuerySales.getProduct('5fb67fda87c0f21d484cbdf3')
|
|
14151
|
+
.then((product)=>{
|
|
14152
|
+
console.log('getProduct', product);
|
|
14153
|
+
}, error=>{
|
|
14154
|
+
reject(error)
|
|
14155
|
+
})
|
|
14156
|
+
* @param id_product
|
|
14157
|
+
* @return false or object
|
|
14158
|
+
*/
|
|
14159
|
+
getProduct(id_product: string): Promise<unknown>;
|
|
14160
|
+
/**
|
|
14161
|
+
* @example:
|
|
14162
|
+
* this.vhQuery.getProductsByFields({name:{$eq:'name abc'}}, {},{},0)
|
|
14163
|
+
.then((products)=>{
|
|
14164
|
+
console.log('getProductsByFields', products);
|
|
14165
|
+
},error=>{
|
|
14166
|
+
console.log('error', error);
|
|
14167
|
+
})
|
|
14168
|
+
* @param query
|
|
14169
|
+
* @param projection — đang tìm hiểu, tạm thời để giá trị là {}
|
|
14170
|
+
* @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
|
|
14171
|
+
* @param limit — null hoặc 0: không giới hạn record get về; 2: get về 2 record
|
|
14172
|
+
* @return — Array -> array = [{},{},...]
|
|
14173
|
+
*/
|
|
14174
|
+
getProductsByFields(query: object, projection?: object, sort?: object, limit?: number): Promise<unknown>;
|
|
14175
|
+
/**
|
|
14176
|
+
* @example
|
|
14177
|
+
* this.vhQuerySales.getCategory('5fb67fda87c0f21d484cbdf3')
|
|
14178
|
+
.then((category)=>{
|
|
14179
|
+
console.log('getCategory', category);
|
|
14180
|
+
})
|
|
14181
|
+
* @param id_category
|
|
14182
|
+
* @return Promise => obj ={} or null
|
|
14183
|
+
*/
|
|
14184
|
+
getCategory(id_category: string): Promise<unknown>;
|
|
14185
|
+
/**
|
|
14186
|
+
* @example
|
|
14187
|
+
* this.vhQuerySales.getCategorys()
|
|
14188
|
+
.then((categorys)=>{
|
|
14189
|
+
console.log('getCategorys', categorys);
|
|
14190
|
+
})
|
|
14191
|
+
* @return Promise => array(object) = [{},{},..]
|
|
14192
|
+
*/
|
|
14193
|
+
getCategorys(): Promise<unknown>;
|
|
14194
|
+
/**
|
|
14195
|
+
* @example:
|
|
14196
|
+
* this.vhQuery.getCategorysByFields({name:{$eq:'name abc'}}, {},{},0)
|
|
14197
|
+
.then((categorys)=>{
|
|
14198
|
+
console.log('getCategorysByFields', categorys);
|
|
14199
|
+
})
|
|
14200
|
+
* @param query
|
|
14201
|
+
* @param projection — đang tìm hiểu, tạm thời để giá trị là {}
|
|
14202
|
+
* @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
|
|
14203
|
+
* @param limit — null hoặc 0: không giới hạn record get về; 2: get về 2 record
|
|
14204
|
+
* @return — Array -> array = [{},{},...]
|
|
14205
|
+
*/
|
|
14206
|
+
getCategorysByFields(query: object, projection?: object, sort?: object, limit?: number): Promise<unknown>;
|
|
14207
|
+
}
|
|
14208
|
+
export declare class VhQuerySalesWebAdmin {
|
|
14209
|
+
private vhmongo_firebase;
|
|
14210
|
+
private vhQuery;
|
|
14211
|
+
private vhAuth;
|
|
14212
|
+
private vhAlgorithm;
|
|
14213
|
+
constructor(vhmongo_firebase: Vhmongo_firebase, vhQuery: VhQuery, vhAuth: VhAuth, vhAlgorithm: VhAlgorithm);
|
|
14214
|
+
/**
|
|
14215
|
+
* @example
|
|
14216
|
+
* this.vhQuerySales.getBranch('5fb67fda87c0f21d484cbdf3')
|
|
14217
|
+
.then((branch)=>{
|
|
14218
|
+
console.log('getBranch', branch);
|
|
14219
|
+
},error=>{
|
|
14220
|
+
reject(error);
|
|
14221
|
+
})
|
|
14222
|
+
* @param id_branch
|
|
14223
|
+
* @return Promise => obj ={} or null
|
|
14224
|
+
*/
|
|
14225
|
+
getBranch(id_branch: string): Promise<unknown>;
|
|
14226
|
+
/**
|
|
14227
|
+
* @example
|
|
14228
|
+
* this.vhQuerySales.getBranchs()
|
|
14229
|
+
.then((branchs)=>{
|
|
14230
|
+
console.log('getBranchs', branchs);
|
|
14231
|
+
},error=>{
|
|
14232
|
+
reject(error);
|
|
14233
|
+
})
|
|
14234
|
+
* @return Promise => array(object) = [{},{},..]
|
|
14235
|
+
*/
|
|
14236
|
+
getBranchs(): Promise<unknown>;
|
|
14237
|
+
addProduct(data: any): Promise<unknown>;
|
|
14238
|
+
/**
|
|
14239
|
+
* @example:
|
|
14240
|
+
* this.vhQuerySales.updateProduct('5fb6780ca2148e09806c5b01', {quantity:400})
|
|
14241
|
+
.then((bool)=>{
|
|
14242
|
+
console.log('updateProduct', bool);
|
|
14243
|
+
}, error=>{
|
|
14244
|
+
console.log('error', error);
|
|
14245
|
+
})
|
|
14246
|
+
* @param id_product
|
|
14247
|
+
* @param data
|
|
14248
|
+
* @return Promise => bool = true or false
|
|
14249
|
+
*/
|
|
14250
|
+
updateProduct(id_product: string, data: object): Promise<unknown>;
|
|
14251
|
+
/**
|
|
14252
|
+
* @example:
|
|
14253
|
+
* this.vhQuerySales.deleteProduct('5fb67fda87c0f21d484cbdf3')
|
|
14254
|
+
.then((bool)=>{
|
|
14255
|
+
console.log('deleteDoc', bool);
|
|
14256
|
+
}, error=>{
|
|
14257
|
+
reject(error)
|
|
14258
|
+
})
|
|
14259
|
+
* @param id_product
|
|
14260
|
+
* @return Promise => bool = true or false
|
|
14261
|
+
*/
|
|
14262
|
+
deleteProduct(id_product: string): Promise<unknown>;
|
|
14263
|
+
/**
|
|
14264
|
+
* @example
|
|
14265
|
+
* this.vhQuerySales.getProduct('5fb67fda87c0f21d484cbdf3')
|
|
14266
|
+
.then((product)=>{
|
|
14267
|
+
console.log('getProduct', product);
|
|
14268
|
+
})
|
|
14269
|
+
* @param id_product
|
|
14270
|
+
* @return false or object
|
|
14271
|
+
*/
|
|
14272
|
+
getProduct(id_product: string): Promise<unknown>;
|
|
14273
|
+
/**
|
|
14274
|
+
* @example:
|
|
14275
|
+
* this.vhQuery.getProductsByFields({name:{$eq:'name abc'}}, {},{},0)
|
|
14276
|
+
.then((products)=>{
|
|
14277
|
+
console.log('getProductsByFields', products);
|
|
14278
|
+
})
|
|
14279
|
+
* @param query
|
|
14280
|
+
* @param projection — đang tìm hiểu, tạm thời để giá trị là {}
|
|
14281
|
+
* @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
|
|
14282
|
+
* @param limit — null hoặc 0: không giới hạn record get về; 2: get về 2 record
|
|
14283
|
+
* @return — Array -> array = [{},{},...]
|
|
14284
|
+
*/
|
|
14285
|
+
getProductsByFields(query: object, projection?: object, sort?: object, limit?: number): Promise<unknown>;
|
|
14286
|
+
/**
|
|
14287
|
+
* @example:
|
|
14288
|
+
* this.vhQuerySales.addCategory({name:'Danh mục 1'})
|
|
14289
|
+
.then((category)=>{
|
|
14290
|
+
console.log('addCategory', category);
|
|
14291
|
+
},error=>{
|
|
14292
|
+
console.log('error', error);
|
|
14293
|
+
})
|
|
14294
|
+
* @param colname
|
|
14295
|
+
* @param data
|
|
14296
|
+
* @return Promise => obj = {}
|
|
14297
|
+
* 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
|
|
14298
|
+
*/
|
|
14299
|
+
addCategory(data: object): Promise<unknown>;
|
|
14300
|
+
/**
|
|
14301
|
+
* @example:
|
|
14302
|
+
* this.vhQuerySales.updateCategory('5fb6780ca2148e09806c5b01', {quantity:400})
|
|
14303
|
+
.then((bool)=>{
|
|
14304
|
+
console.log('updateCategory', bool);
|
|
14305
|
+
})
|
|
14306
|
+
* @param id_category
|
|
14307
|
+
* @param data
|
|
14308
|
+
* @return Promise => bool = true or false
|
|
14309
|
+
*/
|
|
14310
|
+
updateCategory(id_category: string, data: object): Promise<unknown>;
|
|
14311
|
+
/**
|
|
14312
|
+
* @example:
|
|
14313
|
+
* this.vhQuerySales.deleteCategory('5fb67fda87c0f21d484cbdf3')
|
|
14314
|
+
.then((bool)=>{
|
|
14315
|
+
console.log('deleteCategory', bool);
|
|
14316
|
+
})
|
|
14317
|
+
* @param id_category
|
|
14318
|
+
* @return Promise => bool = true or false
|
|
14319
|
+
*/
|
|
14320
|
+
deleteCategory(id_category: string): Promise<unknown>;
|
|
14321
|
+
/**
|
|
14322
|
+
* @example
|
|
14323
|
+
* this.vhQuerySales.getCategory('5fb67fda87c0f21d484cbdf3')
|
|
14324
|
+
.then((category)=>{
|
|
14325
|
+
console.log('getCategory', category);
|
|
14326
|
+
})
|
|
14327
|
+
* @param id_category
|
|
14328
|
+
* @return Promise => obj ={} or null
|
|
14329
|
+
*/
|
|
14330
|
+
getCategory(id_category: string): Promise<unknown>;
|
|
14331
|
+
/**
|
|
14332
|
+
* @example
|
|
14333
|
+
* this.vhQuerySales.getCategorys()
|
|
14334
|
+
.then((categorys)=>{
|
|
14335
|
+
console.log('getCategorys', categorys);
|
|
14336
|
+
})
|
|
14337
|
+
* @return Promise => array(object) = [{},{},..]
|
|
14338
|
+
*/
|
|
14339
|
+
getCategorys(): Promise<unknown>;
|
|
14340
|
+
/**
|
|
14341
|
+
* @example:
|
|
14342
|
+
* this.vhQuery.getCategorysByFields({name:{$eq:'name abc'}}, {},{},0)
|
|
14343
|
+
.then((categorys)=>{
|
|
14344
|
+
console.log('getCategorysByFields', categorys);
|
|
14345
|
+
})
|
|
14346
|
+
* @param query
|
|
14347
|
+
* @param projection — đang tìm hiểu, tạm thời để giá trị là {}
|
|
14348
|
+
* @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
|
|
14349
|
+
* @param limit — null hoặc 0: không giới hạn record get về; 2: get về 2 record
|
|
14350
|
+
* @return — Array -> array = [{},{},...]
|
|
14351
|
+
*/
|
|
14352
|
+
getCategorysByFields(query: object, projection?: object, sort?: object, limit?: number): Promise<unknown>;
|
|
14353
|
+
}
|
|
14075
14354
|
export declare class VhCurrencyPipe implements PipeTransform {
|
|
14076
14355
|
transform(value: number, currencyCode?: string, display?: 'code' | 'symbol' | 'symbol-narrow' | string | boolean, digitsInfo?: string, locale?: string): string | null;
|
|
14077
14356
|
}
|