ionic-vhframeworks 3.7.0 → 3.7.4
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 +466 -12
- 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();
|
|
@@ -6972,6 +6978,9 @@ export declare class VhQuerySales {
|
|
|
6972
6978
|
private categorys;
|
|
6973
6979
|
private inventorytimes;
|
|
6974
6980
|
private warrantys;
|
|
6981
|
+
private discount_bills;
|
|
6982
|
+
private discount_saless;
|
|
6983
|
+
private commissions;
|
|
6975
6984
|
private deliverys;
|
|
6976
6985
|
private addresss;
|
|
6977
6986
|
private incoming_groups;
|
|
@@ -6995,11 +7004,50 @@ export declare class VhQuerySales {
|
|
|
6995
7004
|
private subjectsuppliers;
|
|
6996
7005
|
private subjecttaxs;
|
|
6997
7006
|
private subjectwarrantys;
|
|
7007
|
+
private subjectdiscount_bills;
|
|
6998
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;
|
|
6999
7047
|
/**------------------------TIKI Ecommerce-------------------------- */
|
|
7000
7048
|
/**
|
|
7001
7049
|
* @example:
|
|
7002
|
-
* this.vhQuerySales.GetShippingStampForDropshipTiki(
|
|
7050
|
+
* this.vhQuerySales.GetShippingStampForDropshipTiki('243842207, 'B6', access_token).then((result)=>{
|
|
7003
7051
|
console.log('result', result);
|
|
7004
7052
|
},error=>{
|
|
7005
7053
|
console.log('error', error);
|
|
@@ -7008,7 +7056,7 @@ export declare class VhQuerySales {
|
|
|
7008
7056
|
* @param access_token :string
|
|
7009
7057
|
* @returns Promise
|
|
7010
7058
|
*/
|
|
7011
|
-
GetShippingStampForDropshipTiki(code: string, access_token: string): Promise<unknown>;
|
|
7059
|
+
GetShippingStampForDropshipTiki(code: string, size: string, access_token: string): Promise<unknown>;
|
|
7012
7060
|
/**
|
|
7013
7061
|
* @example:
|
|
7014
7062
|
* this.vhQuerySales.getSellerInventoriesForConfirmationTiki(access_token).then((result)=>{
|
|
@@ -8825,6 +8873,176 @@ export declare class VhQuerySales {
|
|
|
8825
8873
|
* @return Promise => array(object) = [{},{},..]
|
|
8826
8874
|
*/
|
|
8827
8875
|
getWarrantys(): Promise<unknown>;
|
|
8876
|
+
private publishObservableEventDiscount_bills;
|
|
8877
|
+
private observableLocalDiscount_bills;
|
|
8878
|
+
/**
|
|
8879
|
+
* @example:
|
|
8880
|
+
* this.observableDiscount_bills = this.vhQuerySales.getObservableLocalDiscount_bills().subscribe((localDiscount_bills:any) => {
|
|
8881
|
+
do something...
|
|
8882
|
+
})
|
|
8883
|
+
|
|
8884
|
+
ngOnDestroy(){
|
|
8885
|
+
this.observableDiscount_bills.unsubscribe();
|
|
8886
|
+
}
|
|
8887
|
+
* @returns Observerble (Array) => Array(object) => array = [{},{},...]
|
|
8888
|
+
*/
|
|
8889
|
+
private getObservableLocalDiscount_bills;
|
|
8890
|
+
/**
|
|
8891
|
+
* @example:
|
|
8892
|
+
* let discount_bill = this.vhQuerySales.getlocalDiscount_bill('5fb6780ca2148e09806c5b01');
|
|
8893
|
+
* @param id_discount_bill
|
|
8894
|
+
* @return Object => obj = {} or null
|
|
8895
|
+
*/
|
|
8896
|
+
getlocalDiscount_bill(id_discount_bill: any): any;
|
|
8897
|
+
/**
|
|
8898
|
+
* @example:
|
|
8899
|
+
* let discount_bills = this.vhQuerySales.getlocalDiscount_bills();
|
|
8900
|
+
* @return Array(object) => array = [{},{},...]
|
|
8901
|
+
*/
|
|
8902
|
+
getlocalDiscount_bills(): any;
|
|
8903
|
+
/**
|
|
8904
|
+
* @example:
|
|
8905
|
+
* this.vhQuerySales.addDiscount_bill({name:'camera 2', quantity:20, price:200000})
|
|
8906
|
+
.then((discount_bill)=>{
|
|
8907
|
+
console.log('addDiscount_bill', discount_bill);
|
|
8908
|
+
},error=>{
|
|
8909
|
+
console.log('error', error);
|
|
8910
|
+
})
|
|
8911
|
+
* @param colname
|
|
8912
|
+
* @param data
|
|
8913
|
+
* @return Promise => obj = {}
|
|
8914
|
+
* 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
|
|
8915
|
+
*/
|
|
8916
|
+
addDiscount_bill(data: object): Promise<unknown>;
|
|
8917
|
+
/**
|
|
8918
|
+
* @example:
|
|
8919
|
+
* this.vhQuerySales.updateDiscount_bill('5fb6780ca2148e09806c5b01', {quantity:400})
|
|
8920
|
+
.then((bool)=>{
|
|
8921
|
+
console.log('updateDiscount_bill', bool);
|
|
8922
|
+
})
|
|
8923
|
+
* @param id_discount_bill
|
|
8924
|
+
* @param data
|
|
8925
|
+
* @return Promise => bool = true or false
|
|
8926
|
+
*/
|
|
8927
|
+
updateDiscount_bill(id_discount_bill: string, data: object): Promise<unknown>;
|
|
8928
|
+
/**
|
|
8929
|
+
* @example:
|
|
8930
|
+
* this.vhQuerySales.deleteDiscount_bill('5fb67fda87c0f21d484cbdf3')
|
|
8931
|
+
.then((bool)=>{
|
|
8932
|
+
console.log('deleteDiscount_bill', bool);
|
|
8933
|
+
})
|
|
8934
|
+
* @param id_discount_bill
|
|
8935
|
+
* @return Promise => bool = true or false
|
|
8936
|
+
*/
|
|
8937
|
+
deleteDiscount_bill(id_discount_bill: string): Promise<unknown>;
|
|
8938
|
+
/**
|
|
8939
|
+
* @example:
|
|
8940
|
+
* this.vhQuerySales.addDiscount_sales({name:'camera 2', quantity:20, price:200000})
|
|
8941
|
+
.then((discount_saless)=>{
|
|
8942
|
+
console.log('addDiscount_sales', discount_sales);
|
|
8943
|
+
},error=>{
|
|
8944
|
+
console.log('error', error);
|
|
8945
|
+
})
|
|
8946
|
+
* @param colname
|
|
8947
|
+
* @param data
|
|
8948
|
+
* @return Promise => obj = {}
|
|
8949
|
+
* 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
|
|
8950
|
+
*/
|
|
8951
|
+
addDiscount_sales(data: object): Promise<unknown>;
|
|
8952
|
+
/**
|
|
8953
|
+
* @example:
|
|
8954
|
+
* this.vhQuerySales.updateDiscount_sales('5fb6780ca2148e09806c5b01', {quantity:400})
|
|
8955
|
+
.then((bool)=>{
|
|
8956
|
+
console.log('updateDiscount_sales', bool);
|
|
8957
|
+
})
|
|
8958
|
+
* @param id_discount_sales
|
|
8959
|
+
* @param data
|
|
8960
|
+
* @return Promise => bool = true or false
|
|
8961
|
+
*/
|
|
8962
|
+
updateDiscount_sales(id_discount_sales: string, data: object): Promise<unknown>;
|
|
8963
|
+
/**
|
|
8964
|
+
* @example:
|
|
8965
|
+
* this.vhQuerySales.deleteDiscount_sales('5fb67fda87c0f21d484cbdf3')
|
|
8966
|
+
.then((bool)=>{
|
|
8967
|
+
console.log('deleteDiscount_sales', bool);
|
|
8968
|
+
})
|
|
8969
|
+
* @param id_discount_saless
|
|
8970
|
+
* @return Promise => bool = true or false
|
|
8971
|
+
*/
|
|
8972
|
+
deleteDiscount_sales(id_discount_sales: string): Promise<unknown>;
|
|
8973
|
+
/**
|
|
8974
|
+
* @example
|
|
8975
|
+
* this.vhQuerySales.getDiscount_sales('5fb67fda87c0f21d484cbdf3')
|
|
8976
|
+
.then((discount_sales)=>{
|
|
8977
|
+
console.log('getDiscount_sales', discount_sales);
|
|
8978
|
+
})
|
|
8979
|
+
* @param id_discount_sales
|
|
8980
|
+
* @return Promise => obj ={} or null
|
|
8981
|
+
*/
|
|
8982
|
+
getDiscount_sales(id_discount_sales: string): Promise<unknown>;
|
|
8983
|
+
/**
|
|
8984
|
+
* @example
|
|
8985
|
+
* this.vhQuerySales.getDiscount_saless()
|
|
8986
|
+
.then((discount_saless)=>{
|
|
8987
|
+
console.log('getDiscount_saless', discount_saless);
|
|
8988
|
+
})
|
|
8989
|
+
* @return Promise => array(object) = [{},{},..]
|
|
8990
|
+
*/
|
|
8991
|
+
getDiscount_saless(): Promise<unknown>;
|
|
8992
|
+
/**
|
|
8993
|
+
* @example:
|
|
8994
|
+
* this.vhQuerySales.addCommission({name:'camera 2', quantity:20, price:200000})
|
|
8995
|
+
.then((commissions)=>{
|
|
8996
|
+
console.log('addCommission', commissions);
|
|
8997
|
+
},error=>{
|
|
8998
|
+
console.log('error', error);
|
|
8999
|
+
})
|
|
9000
|
+
* @param colname
|
|
9001
|
+
* @param data
|
|
9002
|
+
* @return Promise => obj = {}
|
|
9003
|
+
* 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
|
|
9004
|
+
*/
|
|
9005
|
+
addCommission(data: object): Promise<unknown>;
|
|
9006
|
+
/**
|
|
9007
|
+
* @example:
|
|
9008
|
+
* this.vhQuerySales.updateCommission('5fb6780ca2148e09806c5b01', {quantity:400})
|
|
9009
|
+
.then((bool)=>{
|
|
9010
|
+
console.log('updateCommission', bool);
|
|
9011
|
+
})
|
|
9012
|
+
* @param id_commission
|
|
9013
|
+
* @param data
|
|
9014
|
+
* @return Promise => bool = true or false
|
|
9015
|
+
*/
|
|
9016
|
+
updateCommission(id_commission: string, data: object): Promise<unknown>;
|
|
9017
|
+
/**
|
|
9018
|
+
* @example:
|
|
9019
|
+
* this.vhQuerySales.deleteCommission('5fb67fda87c0f21d484cbdf3')
|
|
9020
|
+
.then((bool)=>{
|
|
9021
|
+
console.log('deleteCommission', bool);
|
|
9022
|
+
})
|
|
9023
|
+
* @param id_commission
|
|
9024
|
+
* @return Promise => bool = true or false
|
|
9025
|
+
*/
|
|
9026
|
+
deleteCommission(id_commission: string): Promise<unknown>;
|
|
9027
|
+
/**
|
|
9028
|
+
* @example
|
|
9029
|
+
* this.vhQuerySales.getCommission('5fb67fda87c0f21d484cbdf3')
|
|
9030
|
+
.then((commission)=>{
|
|
9031
|
+
console.log('getCommission', commission);
|
|
9032
|
+
})
|
|
9033
|
+
* @param id_commission
|
|
9034
|
+
* @return Promise => obj ={} or null
|
|
9035
|
+
*/
|
|
9036
|
+
getCommission(id_commission: string): Promise<unknown>;
|
|
9037
|
+
/**
|
|
9038
|
+
* @example
|
|
9039
|
+
* this.vhQuerySales.getCommissions()
|
|
9040
|
+
.then((commissions)=>{
|
|
9041
|
+
console.log('getCommissions', commissions);
|
|
9042
|
+
})
|
|
9043
|
+
* @return Promise => array(object) = [{},{},..]
|
|
9044
|
+
*/
|
|
9045
|
+
getCommissions(): Promise<unknown>;
|
|
8828
9046
|
/**
|
|
8829
9047
|
* @example:
|
|
8830
9048
|
* let delivery = this.vhQuerySales.getlocalDelivery('5fb6780ca2148e09806c5b01');
|
|
@@ -8834,7 +9052,7 @@ export declare class VhQuerySales {
|
|
|
8834
9052
|
getlocalDelivery(id_delivery: any): any;
|
|
8835
9053
|
/**
|
|
8836
9054
|
* @example:
|
|
8837
|
-
* let deliverys = this.vhQuerySales.
|
|
9055
|
+
* let deliverys = this.vhQuerySales.getlocalDeliverys();
|
|
8838
9056
|
* @return Array(object) => array = [{},{},...]
|
|
8839
9057
|
*/
|
|
8840
9058
|
getlocalDeliverys(): any;
|
|
@@ -10115,12 +10333,13 @@ export declare class VhQuerySales {
|
|
|
10115
10333
|
/**
|
|
10116
10334
|
* @Usage : Hàm này lấy về tiền chiết khấu trên tổng giá trị hàng hóa bán ra của mỗi đơn hàng theo khách mua hàng
|
|
10117
10335
|
* @example :
|
|
10118
|
-
* let discount = this.vhQuerySales.
|
|
10336
|
+
* let discount = this.vhQuerySales.getDiscount_bill_byCustomer(43000000, '7YLcm0cFKLu2KaQQ8cyv');
|
|
10119
10337
|
* @param total_price : Tổng giá
|
|
10120
10338
|
* @param id_customer
|
|
10121
|
-
* @returns
|
|
10339
|
+
* @returns Object or null => obj = {discount}, discount là số tiền đc chiết khấu,
|
|
10340
|
+
* trả về null nghĩa là khách hàng này không có chiết khấu theo hóa đơn
|
|
10122
10341
|
*/
|
|
10123
|
-
|
|
10342
|
+
getDiscount_bill_byCustomer(total_price: number, id_customer: any): any;
|
|
10124
10343
|
/**
|
|
10125
10344
|
* @Usage :Hàm này dùng trong page CHIẾT KHẤU KHÁCH HÀNG -> Chọn TẤT CẢ hoặc MỘT khách hàng
|
|
10126
10345
|
* @notice : Mỗi công thức chiết khấu có 5 mức (level1, level2, level3, level4, level5), giá trị doanh số (sales) level sau phải lơn hơn level trước
|
|
@@ -10130,7 +10349,7 @@ export declare class VhQuerySales {
|
|
|
10130
10349
|
* @example :
|
|
10131
10350
|
* let endtime = new Date();
|
|
10132
10351
|
let starttime = new Date('2020-07-01T05:24:00');
|
|
10133
|
-
this.vhQuerySales.
|
|
10352
|
+
this.vhQuerySales.getReportDiscount_sales_Customers(starttime, endtime, '7YLcm0cFKLu2KaQQ8cyv')
|
|
10134
10353
|
.then((discounts)=>{
|
|
10135
10354
|
console.log('discounts', discounts);
|
|
10136
10355
|
console.log('discounts.docs[0]', discounts.docs[0]);
|
|
@@ -10141,7 +10360,7 @@ export declare class VhQuerySales {
|
|
|
10141
10360
|
* @param IDbranch : 'all' or id_branch
|
|
10142
10361
|
* @return Promise JSON(array) => json.docs = [obj, obj, obj....]; obj ={index, name, img, discount_name,sales_btax, discount_btax, sales_atax, discount_atax}
|
|
10143
10362
|
*/
|
|
10144
|
-
|
|
10363
|
+
getReportDiscount_sales_Customers(starttime: any, endtime: any, IDcustomer: any, IDbranch?: string): Promise<any>;
|
|
10145
10364
|
/**
|
|
10146
10365
|
* @Usage :Hàm này dùng trong page HOA HỒNG NHÂN VIÊN -> Chọn TẤT CẢ hoặc MỘT nhân viên
|
|
10147
10366
|
* @notice : Mỗi công thức chiết khấu có 5 mức (level1, level2, level3, level4, level5), giá trị doanh số (sales) level sau phải lơn hơn level trước
|
|
@@ -10666,7 +10885,7 @@ export declare class VhQuerySales {
|
|
|
10666
10885
|
*/
|
|
10667
10886
|
getDebtCustomers(starttime: any, endtime: any, IDcustomer: string, IDbranch?: string): Promise<any>;
|
|
10668
10887
|
/**
|
|
10669
|
-
* lấy về 1 bảng báo cáo (report) theo cấu trúc json ở dưới
|
|
10888
|
+
* lấy về 1 bảng báo cáo kiểm kho (report) theo cấu trúc json ở dưới
|
|
10670
10889
|
* @example:
|
|
10671
10890
|
* this.vhQuerySales.getReportInventoryTime_byTimes('hNCda0obCvrX6qC3PZ0N')
|
|
10672
10891
|
.then((reports)=>{
|
|
@@ -13897,6 +14116,241 @@ export declare class VhMqttService {
|
|
|
13897
14116
|
getConnectedSSID(): Promise<unknown>;
|
|
13898
14117
|
private getIotID;
|
|
13899
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
|
+
}
|
|
13900
14354
|
export declare class VhCurrencyPipe implements PipeTransform {
|
|
13901
14355
|
transform(value: number, currencyCode?: string, display?: 'code' | 'symbol' | 'symbol-narrow' | string | boolean, digitsInfo?: string, locale?: string): string | null;
|
|
13902
14356
|
}
|