ionic-vhframeworks 3.8.3 → 3.8.5
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 +308 -25
- package/package.json +1 -1
|
@@ -81,6 +81,20 @@ export declare class VhAlgorithm {
|
|
|
81
81
|
* @return String -----> "3YU0409"
|
|
82
82
|
*/
|
|
83
83
|
createBillCode(billdate?: any): any;
|
|
84
|
+
/**
|
|
85
|
+
* @example
|
|
86
|
+
let payment_code = this.ordinaryAlgorithm.createPaymentCode();
|
|
87
|
+
console.log(payment_code);
|
|
88
|
+
* @return String -----> "R3YU0409"
|
|
89
|
+
*/
|
|
90
|
+
createPaymentCode(paymentdate?: any): any;
|
|
91
|
+
/**
|
|
92
|
+
* @example
|
|
93
|
+
let card_code = this.ordinaryAlgorithm.createCardCode();
|
|
94
|
+
console.log(card_code);
|
|
95
|
+
* @return String -----> "1KR3YU0409"
|
|
96
|
+
*/
|
|
97
|
+
createCardCode(carddate?: any): any;
|
|
84
98
|
/**
|
|
85
99
|
* @example:
|
|
86
100
|
* 0 -> 0
|
|
@@ -202,13 +216,14 @@ export declare class VhAuth {
|
|
|
202
216
|
/**
|
|
203
217
|
* @example:
|
|
204
218
|
* this.vhAuth.signInWithEmailAndPassword('emp11@gmail.com', '123456')
|
|
205
|
-
.then((
|
|
206
|
-
console.log('
|
|
219
|
+
.then((user)=>{
|
|
220
|
+
console.log('user', user);
|
|
207
221
|
},error=>{
|
|
208
222
|
console.log('error', error);
|
|
209
223
|
})
|
|
210
224
|
* @param email
|
|
211
225
|
* @param password
|
|
226
|
+
* @return Promise => user = {}
|
|
212
227
|
*/
|
|
213
228
|
signInWithEmailAndPassword(email: string, password: string): Promise<unknown>;
|
|
214
229
|
/**
|
|
@@ -222,6 +237,30 @@ export declare class VhAuth {
|
|
|
222
237
|
* @return Promise => user = {}
|
|
223
238
|
*/
|
|
224
239
|
onAuthStateChanged(): Promise<unknown>;
|
|
240
|
+
/**
|
|
241
|
+
* @example:
|
|
242
|
+
* this.vhAuth.signInWithEmailAndPassword_Sales('emp11@gmail.com', '123456')
|
|
243
|
+
.then((user)=>{
|
|
244
|
+
console.log('user', user);
|
|
245
|
+
},error=>{
|
|
246
|
+
console.log('error', error);
|
|
247
|
+
})
|
|
248
|
+
* @param email
|
|
249
|
+
* @param password
|
|
250
|
+
* @return Promise => user = {}
|
|
251
|
+
*/
|
|
252
|
+
signInWithEmailAndPassword_Sales(email: string, password: string): Promise<unknown>;
|
|
253
|
+
/**
|
|
254
|
+
* @example:
|
|
255
|
+
* this.vhAuth.onAuthStateChanged_Sales()
|
|
256
|
+
.then((user)=>{
|
|
257
|
+
console.log('onAuthStateChanged_Sales', user);
|
|
258
|
+
},error=>{
|
|
259
|
+
console.log('onAuthStateChanged_Sales', error);
|
|
260
|
+
})
|
|
261
|
+
* @return Promise => user = {}
|
|
262
|
+
*/
|
|
263
|
+
onAuthStateChanged_Sales(): Promise<unknown>;
|
|
225
264
|
/**
|
|
226
265
|
* @example:
|
|
227
266
|
* this.vhAuth.signOut()
|
|
@@ -7190,6 +7229,9 @@ export declare class VhQuerySales {
|
|
|
7190
7229
|
private vhAlgorithm;
|
|
7191
7230
|
private iap2;
|
|
7192
7231
|
private platform;
|
|
7232
|
+
private restriction_main_package;
|
|
7233
|
+
private restriction_ecommerce_package;
|
|
7234
|
+
private restriction_facebook_package;
|
|
7193
7235
|
private productlistsendo;
|
|
7194
7236
|
private shoplistsendo;
|
|
7195
7237
|
private productlistlazada;
|
|
@@ -7232,6 +7274,57 @@ export declare class VhQuerySales {
|
|
|
7232
7274
|
private subjectwarrantys;
|
|
7233
7275
|
private subjectdiscount_bills;
|
|
7234
7276
|
constructor(vhmongo_firebase: Vhmongo_firebase, vhQuery: VhQuery, vhAuth: VhAuth, vhAlgorithm: VhAlgorithm, iap2: InAppPurchase2, platform: Platform);
|
|
7277
|
+
/**
|
|
7278
|
+
* @description: hàm này lấy về những hạn chế của gói main_package (khách trả phí mua gói sử dụng các chức năng CHÍNH, mỗi gói sẽ có nhưng hạn chế khác nhau về user_number, show_report_duration)
|
|
7279
|
+
* @example
|
|
7280
|
+
* this.refreshRestrictionMainPackage()
|
|
7281
|
+
.then((bool)=>{
|
|
7282
|
+
console.log('bool', bool);
|
|
7283
|
+
})
|
|
7284
|
+
* @return Promise => null
|
|
7285
|
+
*/
|
|
7286
|
+
private refreshRestrictionMainPackage;
|
|
7287
|
+
/**
|
|
7288
|
+
* @description: hàm này lấy về những hạn chế của gói main_package trong localstorage
|
|
7289
|
+
* @example
|
|
7290
|
+
* let restriction_main_package = this.vhQuerySales.getLocalRestrictionMainPackage();
|
|
7291
|
+
* @return Object => obj ={} or null
|
|
7292
|
+
*/
|
|
7293
|
+
getLocalRestrictionMainPackage(): any;
|
|
7294
|
+
/**
|
|
7295
|
+
* @description: hàm này lấy về những hạn chế của gói ecommerce_package (khách trả phí mua gói sử dụng TMĐT, mỗi gói sẽ có nhưng hạn chế khác nhau về shop_number, show_report_duration)
|
|
7296
|
+
* @example
|
|
7297
|
+
* this.refreshRestrictionEcommercePackage()
|
|
7298
|
+
.then((bool)=>{
|
|
7299
|
+
console.log('bool', bool);
|
|
7300
|
+
})
|
|
7301
|
+
* @return Promise => null
|
|
7302
|
+
*/
|
|
7303
|
+
private refreshRestrictionEcommercePackage;
|
|
7304
|
+
/**
|
|
7305
|
+
* @description: hàm này lấy về những hạn chế của gói ecommerce_package trong localstorage
|
|
7306
|
+
* @example
|
|
7307
|
+
* let restriction_ecommerce_package = this.vhQuerySales.getLocalRestrictionEcommercePackage();
|
|
7308
|
+
* @return Object => obj ={} or null
|
|
7309
|
+
*/
|
|
7310
|
+
getLocalRestrictionEcommercePackage(): any;
|
|
7311
|
+
/**
|
|
7312
|
+
* @description: hàm này lấy về những hạn chế của gói facebook_package (khách trả phí mua gói sử dụng facebook, mỗi gói sẽ có nhưng hạn chế khác nhau về fanpage_number, show_report_duration)
|
|
7313
|
+
* @example
|
|
7314
|
+
* this.refreshRestrictionFacebookPackage()
|
|
7315
|
+
.then((bool)=>{
|
|
7316
|
+
console.log('bool', bool);
|
|
7317
|
+
})
|
|
7318
|
+
* @return Promise => null
|
|
7319
|
+
*/
|
|
7320
|
+
private refreshRestrictionFacebookPackage;
|
|
7321
|
+
/**
|
|
7322
|
+
* @description: hàm này lấy về những hạn chế của gói facebook_package trong localstorage
|
|
7323
|
+
* @example
|
|
7324
|
+
* let restriction_facebook_package = this.vhQuerySales.getLocalRestrictionFacebookPackage();
|
|
7325
|
+
* @return Object => obj ={} or null
|
|
7326
|
+
*/
|
|
7327
|
+
getLocalRestrictionFacebookPackage(): any;
|
|
7235
7328
|
/**
|
|
7236
7329
|
* Hàm callback BÌNH LUẬN trên fanpage có id là id_fanpage
|
|
7237
7330
|
* @example:
|
|
@@ -8237,6 +8330,7 @@ export declare class VhQuerySales {
|
|
|
8237
8330
|
* @returns Promise bool = true or false
|
|
8238
8331
|
*/
|
|
8239
8332
|
syncCollections_Desktop(): Promise<unknown>;
|
|
8333
|
+
private checkExpireBranch_Sales;
|
|
8240
8334
|
private fixBill;
|
|
8241
8335
|
private initSyncCollections;
|
|
8242
8336
|
/**
|
|
@@ -9963,31 +10057,31 @@ export declare class VhQuerySales {
|
|
|
9963
10057
|
*/
|
|
9964
10058
|
createBill_Billdetail(bill: any, bill_details: any): any;
|
|
9965
10059
|
/**
|
|
9966
|
-
|
|
9967
|
-
|
|
9968
|
-
|
|
9969
|
-
|
|
9970
|
-
|
|
9971
|
-
|
|
9972
|
-
|
|
9973
|
-
|
|
9974
|
-
|
|
9975
|
-
|
|
9976
|
-
|
|
9977
|
-
|
|
10060
|
+
* @example:
|
|
10061
|
+
* this.vhQuerySales.createBill_Detail({})
|
|
10062
|
+
.then((vhbill_detail)=>{
|
|
10063
|
+
console.log('vhQuerySales', vhbill_detail);
|
|
10064
|
+
},error=>{
|
|
10065
|
+
console.log('error', error);
|
|
10066
|
+
})
|
|
10067
|
+
* @param colname
|
|
10068
|
+
* @param data
|
|
10069
|
+
* @return Promise => obj = {}
|
|
10070
|
+
* 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
|
|
10071
|
+
*/
|
|
9978
10072
|
createBill_Detail(data: any): any;
|
|
9979
10073
|
/**
|
|
9980
|
-
|
|
9981
|
-
|
|
9982
|
-
|
|
9983
|
-
|
|
9984
|
-
|
|
9985
|
-
|
|
9986
|
-
|
|
9987
|
-
|
|
9988
|
-
|
|
9989
|
-
|
|
9990
|
-
|
|
10074
|
+
* @example:
|
|
10075
|
+
* this.vhQuerySales.updateBill_Detail('5fb6780ca2148e09806c5b01', {name:'Khuyến mãi 12/12'})
|
|
10076
|
+
.then((bool)=>{
|
|
10077
|
+
console.log('updateBill_Detail', bool);
|
|
10078
|
+
}, error=>{
|
|
10079
|
+
console.log('error', error);
|
|
10080
|
+
})
|
|
10081
|
+
* @param id_bill
|
|
10082
|
+
* @param data
|
|
10083
|
+
* @return Promise => bool = true or false
|
|
10084
|
+
*/
|
|
9991
10085
|
updateBill_Detail(id_bill_detail: string, value: object): Promise<unknown>;
|
|
9992
10086
|
/**
|
|
9993
10087
|
* @example:
|
|
@@ -10104,6 +10198,195 @@ export declare class VhQuerySales {
|
|
|
10104
10198
|
* @notice : hàm này chỉ dùng xóa những bill_type (7,8,11,12) mà không có phát sinh bill_detail
|
|
10105
10199
|
*/
|
|
10106
10200
|
deleteBill(id_bill: any): Promise<unknown>;
|
|
10201
|
+
/**
|
|
10202
|
+
* @example:
|
|
10203
|
+
* let data = {
|
|
10204
|
+
date: new Date(),
|
|
10205
|
+
payment_type: 5, //1 lưu (khách đã thanh toán cho vnpay); 5 lưu tạm (khách chưa thanh toán vnpay), hệ thống sẽ tự động xóa những payment này hoặc trên giao diện hiện ra cho khách tự xóa
|
|
10206
|
+
payment: 990.000,
|
|
10207
|
+
tax: 0,
|
|
10208
|
+
total: 990.000
|
|
10209
|
+
}
|
|
10210
|
+
* this.vhQuerySales.createPayment(data)
|
|
10211
|
+
.then((payment)=>{
|
|
10212
|
+
console.log('createPayment', payment);
|
|
10213
|
+
},error=>{
|
|
10214
|
+
console.log('error', error);
|
|
10215
|
+
})
|
|
10216
|
+
* payment = {
|
|
10217
|
+
_id,
|
|
10218
|
+
payment_code,
|
|
10219
|
+
id_store,
|
|
10220
|
+
invalid,
|
|
10221
|
+
|
|
10222
|
+
date
|
|
10223
|
+
payment_type,
|
|
10224
|
+
payment,
|
|
10225
|
+
tax,
|
|
10226
|
+
total
|
|
10227
|
+
}
|
|
10228
|
+
* @param payment : object
|
|
10229
|
+
* @return Promise => payment = {} / error
|
|
10230
|
+
* 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
|
|
10231
|
+
* @notice : hàm này chỉ dùng tạo những bill_type mà không có phát sinh bill_detail
|
|
10232
|
+
*/
|
|
10233
|
+
createPayment(data: any): Promise<unknown>;
|
|
10234
|
+
/**
|
|
10235
|
+
* @example:
|
|
10236
|
+
* this.vhQuerySales.updatePayment('5fb6780ca2148e09806c5b01', {total:990000})
|
|
10237
|
+
.then((response)=>{
|
|
10238
|
+
console.log('updatePayment', response);
|
|
10239
|
+
}, error=>{
|
|
10240
|
+
console.log('error', error);
|
|
10241
|
+
})
|
|
10242
|
+
* @param id_payment
|
|
10243
|
+
* @param value
|
|
10244
|
+
* @return Promise => response = undefined / error
|
|
10245
|
+
*/
|
|
10246
|
+
updatePayment(id_payment: string, value: any): Promise<unknown>;
|
|
10247
|
+
/**
|
|
10248
|
+
* @example:
|
|
10249
|
+
* this.vhQuerySales.deletePayment('5fb67fda87c0f21d484cbdf3')
|
|
10250
|
+
.then((response)=>{
|
|
10251
|
+
console.log('deleteBill', response);
|
|
10252
|
+
}, error=>{
|
|
10253
|
+
console.log(error, error);
|
|
10254
|
+
})
|
|
10255
|
+
* @param id_payment
|
|
10256
|
+
* @return Promise => response = undefined / error
|
|
10257
|
+
*/
|
|
10258
|
+
deletePayment(id_payment: any): Promise<unknown>;
|
|
10259
|
+
/**
|
|
10260
|
+
* @example:
|
|
10261
|
+
* let time = new Date();
|
|
10262
|
+
* time.setDate(time.getDate()-7);
|
|
10263
|
+
* this.vhQuerySales.getPayments({id_store:{$eq:'5fb67fda87c0f21d484cbdf3'}}, {},{},0)
|
|
10264
|
+
.then((payments)=>{
|
|
10265
|
+
console.log('getPayments', payments);
|
|
10266
|
+
})
|
|
10267
|
+
* @param query
|
|
10268
|
+
* @param projection — đang tìm hiểu, tạm thời để giá trị là {}
|
|
10269
|
+
* @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
|
|
10270
|
+
* @param limit — null hoặc 0: không giới hạn record get về; 2: get về 2 record
|
|
10271
|
+
* @return — Array -> array = [{},{},...]
|
|
10272
|
+
*/
|
|
10273
|
+
getPayments(query: object, projection?: object, sort?: object, limit?: number): Promise<unknown>;
|
|
10274
|
+
/**
|
|
10275
|
+
* @example:
|
|
10276
|
+
* this.vhQuerySales.getPayment('5fb67fda87c0f21d484cbdf3')
|
|
10277
|
+
.then((payment)=>{
|
|
10278
|
+
console.log('getPayment', payment);
|
|
10279
|
+
})
|
|
10280
|
+
* @param id_payment
|
|
10281
|
+
* @return Promise => payment ={} or null / error
|
|
10282
|
+
*/
|
|
10283
|
+
getPayment(id_payment: any): Promise<unknown>;
|
|
10284
|
+
/**
|
|
10285
|
+
* @example:
|
|
10286
|
+
let payment_detail_main = {
|
|
10287
|
+
date: new Date(),
|
|
10288
|
+
id_branch: 'AEUWSWZXA4iHv8BmCNz2', //khách chọn
|
|
10289
|
+
id_payment: '5D4XGdZ2q5XLnOUa0mMx', //payment._id
|
|
10290
|
+
id_restriction: 'main_package_advanced', //package.id_restriction
|
|
10291
|
+
id_package: 'main_package_advanced_1month', //có được khi khách chọn gói để mua
|
|
10292
|
+
package_type: 1, //package.package_type,
|
|
10293
|
+
day: 31, //package.day,
|
|
10294
|
+
tax: 0, package.tax,
|
|
10295
|
+
price: 99000, package.price,
|
|
10296
|
+
quantity: 1, //khách chọn
|
|
10297
|
+
payment_detail_type: 1, //1: gói gia hạng mới, 2: gói nâng cấp, 3: gói kéo dài thêm thời gian
|
|
10298
|
+
}
|
|
10299
|
+
this.vhQuerySales.createPayment_Detail({})
|
|
10300
|
+
.then((payment_detail)=>{
|
|
10301
|
+
console.log('createPayment_Detail', payment_detail);
|
|
10302
|
+
},error=>{
|
|
10303
|
+
console.log('error', error);
|
|
10304
|
+
})
|
|
10305
|
+
payment_detail = {
|
|
10306
|
+
_id,
|
|
10307
|
+
id_store,
|
|
10308
|
+
payment_type,
|
|
10309
|
+
activating,
|
|
10310
|
+
invalid,
|
|
10311
|
+
|
|
10312
|
+
date,
|
|
10313
|
+
id_branch,
|
|
10314
|
+
id_payment,
|
|
10315
|
+
id_restriction,
|
|
10316
|
+
id_package,
|
|
10317
|
+
package_type,
|
|
10318
|
+
payment_type,
|
|
10319
|
+
payment_detail_type,
|
|
10320
|
+
day,
|
|
10321
|
+
tax,
|
|
10322
|
+
price,
|
|
10323
|
+
quantity
|
|
10324
|
+
}
|
|
10325
|
+
* @param data
|
|
10326
|
+
* @return Promise => response = {} / error
|
|
10327
|
+
* 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
|
|
10328
|
+
*/
|
|
10329
|
+
createPayment_Detail(data: any): any;
|
|
10330
|
+
/**
|
|
10331
|
+
* @example:
|
|
10332
|
+
* this.vhQuerySales.updatePayment_Detail('5fb6780ca2148e09806c5b01', {name:'Khuyến mãi 12/12'})
|
|
10333
|
+
.then((response)=>{
|
|
10334
|
+
console.log('updatePayment_Detail', response);
|
|
10335
|
+
},error=>{
|
|
10336
|
+
reject(error);
|
|
10337
|
+
})
|
|
10338
|
+
* @param id_payment_detail
|
|
10339
|
+
* @param value
|
|
10340
|
+
* @return Promise => response = undefined / error
|
|
10341
|
+
*/
|
|
10342
|
+
updatePayment_Detail(id_payment_detail: string, value: object): Promise<unknown>;
|
|
10343
|
+
/**
|
|
10344
|
+
* @example:
|
|
10345
|
+
* let time = new Date();
|
|
10346
|
+
* time.setDate(time.getDate()-7);
|
|
10347
|
+
* this.vhQuerySales.getPayment_details({id_store:{$eq:'5fb67fda87c0f21d484cbdf3'}}, {},{},0)
|
|
10348
|
+
.then((payment_details)=>{
|
|
10349
|
+
console.log('getPayment_details', payment_details);
|
|
10350
|
+
})
|
|
10351
|
+
* @param query
|
|
10352
|
+
* @param projection — đang tìm hiểu, tạm thời để giá trị là {}
|
|
10353
|
+
* @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
|
|
10354
|
+
* @param limit — null hoặc 0: không giới hạn record get về; 2: get về 2 record
|
|
10355
|
+
* @return Promise Array => array = [{},{},...] / error
|
|
10356
|
+
*/
|
|
10357
|
+
getPayment_details(query: object, projection?: object, sort?: object, limit?: number): Promise<unknown>;
|
|
10358
|
+
/**
|
|
10359
|
+
* @example:
|
|
10360
|
+
* this.vhQuerySales.getPayment_detail('5fb67fda87c0f21d484cbdf3')
|
|
10361
|
+
.then((payment_detail)=>{
|
|
10362
|
+
console.log('getPayment_detail', payment_detail);
|
|
10363
|
+
})
|
|
10364
|
+
* @param id_payment_detail
|
|
10365
|
+
* @return Promise => payment_detail ={} or null / error
|
|
10366
|
+
*/
|
|
10367
|
+
getPayment_detail(id_payment_detail: any): Promise<unknown>;
|
|
10368
|
+
/**
|
|
10369
|
+
* @example:
|
|
10370
|
+
* this.vhQuerySales.deletePayment_Detail('5fb67fda87c0f21d484cbdf3')
|
|
10371
|
+
.then((bool)=>{
|
|
10372
|
+
console.log('deletePayment_Detail', bool);
|
|
10373
|
+
},error=>{
|
|
10374
|
+
reject(error);
|
|
10375
|
+
})
|
|
10376
|
+
* @param id_payment_detail
|
|
10377
|
+
* @return Promise => Promise => response = undefined / error
|
|
10378
|
+
*/
|
|
10379
|
+
deletePayment_Detail(id_payment_detail: string): Promise<unknown>;
|
|
10380
|
+
/**
|
|
10381
|
+
* @example:
|
|
10382
|
+
* this.vhQuerySales.getPackage('5fb67fda87c0f21d484cbdf3')
|
|
10383
|
+
.then((package)=>{
|
|
10384
|
+
console.log('getPackage', package);
|
|
10385
|
+
})
|
|
10386
|
+
* @param id_package
|
|
10387
|
+
* @return Promise => package ={} or null / error
|
|
10388
|
+
*/
|
|
10389
|
+
getPackage(id_package: any): Promise<unknown>;
|
|
10107
10390
|
private publishObservableEventPromotions;
|
|
10108
10391
|
private observableLocalPromotions;
|
|
10109
10392
|
/**
|