ionic-vhframeworks 3.8.3 → 3.8.7

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.
@@ -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((res)=>{
206
- console.log('res', res);
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
- * @example:
9967
- * this.vhQuerySales.createBill_Detail({})
9968
- .then((vhbill_detail)=>{
9969
- console.log('vhQuerySales', vhbill_detail);
9970
- },error=>{
9971
- console.log('error', error);
9972
- })
9973
- * @param colname
9974
- * @param data
9975
- * @return Promise => obj = {}
9976
- * 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
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
- * @example:
9981
- * this.vhQuerySales.updateBill_Detail('5fb6780ca2148e09806c5b01', {name:'Khuyến mãi 12/12'})
9982
- .then((bool)=>{
9983
- console.log('updateBill_Detail', bool);
9984
- }, error=>{
9985
- console.log('error', error);
9986
- })
9987
- * @param id_bill
9988
- * @param data
9989
- * @return Promise => bool = true or false
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,194 @@ 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
+ id_branch: 'AEUWSWZXA4iHv8BmCNz2', //khách chọn
10288
+ id_payment: '5D4XGdZ2q5XLnOUa0mMx', //payment._id
10289
+ id_restriction: 'main_package_advanced', //package.id_restriction
10290
+ id_package: 'main_package_advanced_1month', //có được khi khách chọn gói để mua
10291
+ package_type: 1, //package.package_type,
10292
+ day: 31, //package.day,
10293
+ tax: 0, package.tax,
10294
+ price: 99000, package.price,
10295
+ quantity: 1, //khách chọn
10296
+ 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
10297
+ }
10298
+ this.vhQuerySales.createPayment_Detail({})
10299
+ .then((payment_detail)=>{
10300
+ console.log('createPayment_Detail', payment_detail);
10301
+ },error=>{
10302
+ console.log('error', error);
10303
+ })
10304
+ payment_detail = {
10305
+ _id,
10306
+ id_store,
10307
+ payment_type,
10308
+ activating,
10309
+ invalid,
10310
+ date,
10311
+
10312
+ id_branch,
10313
+ id_payment,
10314
+ id_restriction,
10315
+ id_package,
10316
+ package_type,
10317
+ payment_type,
10318
+ payment_detail_type,
10319
+ day,
10320
+ tax,
10321
+ price,
10322
+ quantity
10323
+ }
10324
+ * @param data
10325
+ * @return Promise => response = {} / error
10326
+ * 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
10327
+ */
10328
+ createPayment_Detail(data: any): any;
10329
+ /**
10330
+ * @example:
10331
+ * this.vhQuerySales.updatePayment_Detail('5fb6780ca2148e09806c5b01', {name:'Khuyến mãi 12/12'})
10332
+ .then((response)=>{
10333
+ console.log('updatePayment_Detail', response);
10334
+ },error=>{
10335
+ reject(error);
10336
+ })
10337
+ * @param id_payment_detail
10338
+ * @param value
10339
+ * @return Promise => response = undefined / error
10340
+ */
10341
+ updatePayment_Detail(id_payment_detail: string, value: object): Promise<unknown>;
10342
+ /**
10343
+ * @example:
10344
+ * let time = new Date();
10345
+ * time.setDate(time.getDate()-7);
10346
+ * this.vhQuerySales.getPayment_details({id_payment:{$eq:'5fb67fda87c0f21d484cbdf3'}}, {},{},0)
10347
+ .then((payment_details)=>{
10348
+ console.log('getPayment_details', payment_details);
10349
+ })
10350
+ * @param query
10351
+ * @param projection — đang tìm hiểu, tạm thời để giá trị là {}
10352
+ * @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
10353
+ * @param limit — null hoặc 0: không giới hạn record get về; 2: get về 2 record
10354
+ * @return Promise Array => array = [{},{},...] / error
10355
+ */
10356
+ getPayment_details(query: object, projection?: object, sort?: object, limit?: number): Promise<unknown>;
10357
+ /**
10358
+ * @example:
10359
+ * this.vhQuerySales.getPayment_detail('5fb67fda87c0f21d484cbdf3')
10360
+ .then((payment_detail)=>{
10361
+ console.log('getPayment_detail', payment_detail);
10362
+ })
10363
+ * @param id_payment_detail
10364
+ * @return Promise => payment_detail ={} or null / error
10365
+ */
10366
+ getPayment_detail(id_payment_detail: any): Promise<unknown>;
10367
+ /**
10368
+ * @example:
10369
+ * this.vhQuerySales.deletePayment_Detail('5fb67fda87c0f21d484cbdf3')
10370
+ .then((response)=>{
10371
+ console.log('deletePayment_Detail', response);
10372
+ },error=>{
10373
+ reject(error);
10374
+ })
10375
+ * @param id_payment_detail
10376
+ * @return Promise => Promise => response = undefined / error
10377
+ */
10378
+ deletePayment_Detail(id_payment_detail: string): Promise<unknown>;
10379
+ /**
10380
+ * @example:
10381
+ * this.vhQuerySales.getPackage('5fb67fda87c0f21d484cbdf3')
10382
+ .then((package)=>{
10383
+ console.log('getPackage', package);
10384
+ })
10385
+ * @param id_package
10386
+ * @return Promise => package ={} or null / error
10387
+ */
10388
+ getPackage(id_package: any): Promise<unknown>;
10107
10389
  private publishObservableEventPromotions;
10108
10390
  private observableLocalPromotions;
10109
10391
  /**
@@ -10644,6 +10926,7 @@ export declare class VhQuerySales {
10644
10926
  * @return Promise JSON(array) => json.docs = [obj, obj, obj....]; obj ={index, id_product, name, barcode, unit, img, id_customer, quantity, sales_btax, sales_atax}
10645
10927
  */
10646
10928
  getReportSales_Customers_byProducts(starttime: any, endtime: any, id_customer: any, IDbranch?: string): Promise<any>;
10929
+ getReportSales_Customers_byProducts_Analytics(starttime: any, endtime: any, id_customer: any, IDbranch?: string): Promise<any>;
10647
10930
  /**
10648
10931
  * @Usage Hàm này dùng trong page DOANH SỐ KHÁCH HÀNG (layer 3) -> Chọn TẤT CẢ hoặc MỘT khách hàng -> Chọn một khách hàng trong list hiện ra -> Chọn một sản phẩm trong list tiếp theo hiện ra
10649
10932
  * @example:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ionic-vhframeworks",
3
- "version": "3.8.3",
3
+ "version": "3.8.7",
4
4
  "peerDependencies": {},
5
5
  "dependencies": {
6
6
  "tslib": "^2.0.0"