ionic-vhframeworks 8.7.4 → 8.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.
@@ -235,7 +235,7 @@ export declare class VhAlgorithm {
235
235
  <input type="file" class="form-control" (change)="addfile($event)" placeholder="Upload file" accept=".csv,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel">
236
236
  </div>
237
237
  const file = event.target.files[0];
238
- this.vhAlgorithmimportXLSX(file)
238
+ this.vhAlgorithm.importXLSX(file)
239
239
  .then(obj=>{
240
240
  console.log('obj', obj);
241
241
  })
@@ -245,7 +245,7 @@ export declare class VhAlgorithm {
245
245
  importXLSX(file: any): Promise<unknown>;
246
246
  /**
247
247
  * @example:
248
- * this.vhAlgorithmexportXLSX(arrayData, name).then(() => this.status = false).catch(err => this.status = false);
248
+ * this.vhAlgorithm.exportXLSX(arrayData, name).then(() => this.status = false).catch(err => this.status = false);
249
249
  * @param arrayData => format [{field_a1: val_a1, field_a2: val_a2, field_a3: val_a3}
250
250
  * {field_b1: val_b1, field_b2: val_b2, field_b3: val_b3}
251
251
  * {field_c1: val_c1, field_c2: val_c2, field_c3: val_c3}]
@@ -256,7 +256,7 @@ export declare class VhAlgorithm {
256
256
  /**
257
257
  * @example:
258
258
  const file = e.target.files[0];
259
- this.vhAlgorithmimportCSV(file)
259
+ this.vhAlgorithm.importCSV(file)
260
260
  .then(obj=>{
261
261
  console.log('obj', obj);
262
262
  })
@@ -271,15 +271,10 @@ export declare class VhAlgorithm {
271
271
  */
272
272
  exportCSV(headerRow: any, csvData: any, filename: any): void;
273
273
  waitingStack(): Promise<unknown>;
274
- /**
275
- * Hàm trả về mảng có đối tượng trong array_list thỏa điều kiện tìm kiếm
276
- * @param value : giá trị cần search
277
- * @param array_list : mảng các đối tượng
278
- * @param array_field : mảng các trường của đối tượng sẽ đc search
279
- * @returns Array
280
- */
281
274
  searchList(value: any, array_list: any, array_field: any): any[];
282
275
  /**
276
+ * @example:
277
+ * this.vhAlgorithm.changeAlias(alias);
283
278
  * Ham đổi chuỗi alias có dấu thành không dấu
284
279
  */
285
280
  changeAlias(alias: any): any;
@@ -12752,6 +12747,19 @@ export declare class VhQueryAutoWeb {
12752
12747
  * @return Promise => array(object) = [{},{},..]
12753
12748
  */
12754
12749
  getEWADocuments_byfields(query: object, projection?: object, sort?: object, limit?: number): Promise<unknown>;
12750
+ /**
12751
+ * @example:
12752
+ * this.vhQueryAutoWeb.createIndexes('atw_products', {name_textsearch:'text'})
12753
+ .then((obj:any)=>{
12754
+ console.log('createIndexes', obj);
12755
+ }, error=>{
12756
+ reject(error)
12757
+ })
12758
+ * @param colname
12759
+ * @param index
12760
+ * @return null or object
12761
+ */
12762
+ createIndexes(colname: string, index: any): Promise<unknown>;
12755
12763
  /**
12756
12764
  * @example:
12757
12765
  * this.vhQueryAutoWeb.addBranch({name:'Chi nhánh 2'})
@@ -13362,13 +13370,13 @@ export declare class VhQueryAutoWeb {
13362
13370
  console.log('error', error);
13363
13371
  })
13364
13372
  * @param id_product
13365
- * @param data
13373
+ * @param value
13366
13374
  * @return Promise object => rsp ={vcode, msg, data(undefined)} / error
13367
13375
  * @notice : hàm này chỉ add được dữ liệu sau khi khách hàng hoặc nhân viên đã đăng nhập
13368
13376
  * vcode == 0: success
13369
13377
  * vcode == 11: 'not logged in
13370
13378
  */
13371
- updateProduct(id_product: string, data: object): Promise<unknown>;
13379
+ updateProduct(id_product: string, value: any): Promise<unknown>;
13372
13380
  /**
13373
13381
  * @example:
13374
13382
  * this.vhQueryAutoWeb.deleteProduct('5fb67fda87c0f21d484cbdf3')
@@ -13399,6 +13407,16 @@ export declare class VhQueryAutoWeb {
13399
13407
  * @return Promise => obj ={} or null
13400
13408
  */
13401
13409
  getProduct(id_product: string): Promise<unknown>;
13410
+ /**
13411
+ * @example
13412
+ * this.vhQueryAutoWeb.getProduct_byIDsubproduct('5fb67fda87c0f21d484cbdf3')
13413
+ .then((product)=>{
13414
+ console.log('getProduct_byIDsubproduct', product);
13415
+ })
13416
+ * @param id_product
13417
+ * @return Promise => obj ={} or null
13418
+ */
13419
+ private getProduct_byIDsubproduct;
13402
13420
  /**
13403
13421
  * @example:
13404
13422
  * this.vhQueryAutoWeb.getProducts_byFields({name:{$eq:'name abc'}}, {},{},6,1)
@@ -13686,7 +13704,7 @@ export declare class VhQueryAutoWeb {
13686
13704
  * vcode == 0: success
13687
13705
  * vcode == 11: 'not logged in
13688
13706
  */
13689
- updateFood(id_food: string, data: object): Promise<unknown>;
13707
+ updateFood(id_food: string, value: any): Promise<unknown>;
13690
13708
  /**
13691
13709
  * @example:
13692
13710
  * this.vhQueryAutoWeb.deleteFood('5fb67fda87c0f21d484cbdf3')
@@ -13715,6 +13733,16 @@ export declare class VhQueryAutoWeb {
13715
13733
  */
13716
13734
  getFood(id_food: string): Promise<unknown>;
13717
13735
  /**
13736
+ * @example
13737
+ * this.vhQueryAutoWeb.getFood_byIDsubfood('5fb67fda87c0f21d484cbdf3')
13738
+ .then((food)=>{
13739
+ console.log('getFood_byIDsubfood', food);
13740
+ })
13741
+ * @param id_subfood
13742
+ * @return Promise => obj ={} or null
13743
+ */
13744
+ private getFood_byIDsubfood;
13745
+ /**
13718
13746
  * @example:
13719
13747
  * this.vhQueryAutoWeb.getFoods_byFields({name:{$eq:'name abc'}}, {},{},6,1)
13720
13748
  .then(response=>{
@@ -14007,6 +14035,26 @@ export declare class VhQueryAutoWeb {
14007
14035
  * @return Promise => obj ={} or null
14008
14036
  */
14009
14037
  getSNIMEI(id_snimei: string): Promise<unknown>;
14038
+ /**
14039
+ * @example:
14040
+ * this.vhQueryAutoWeb.getSNIMEIs_byFields({name:{$eq:'name abc'}}, {},{},6,1)
14041
+ .then(rsp=>{
14042
+ console.log('rsp', rsp);
14043
+ if(rsp.vcode === 0){
14044
+ //-----------your code-----------
14045
+ let products = rsp.data;
14046
+ }
14047
+ },(error:any)=>{
14048
+ console.log('error', error)
14049
+ })
14050
+ * @param query
14051
+ * @param projection — đang tìm hiểu, tạm thời để giá trị là {}
14052
+ * @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
14053
+ * @param limit — null hoặc 0: không giới hạn record get về; 2: get về 2 record
14054
+ * @param page — null hoặc 0 hoặc 1: get về trang đầu tiên; 2: get về trang thứ 2
14055
+ * @return Promise object => rsp = {vcode, msg, data(array), limit, page, totalpages}
14056
+ */
14057
+ getSNIMEIs_byFields(query: object, projection?: object, sort?: object, limit?: number): Promise<unknown>;
14010
14058
  /**
14011
14059
  * @example:
14012
14060
  * this.vhQueryAutoWeb.getSNIMEIs_byFields_byPages({name:{$eq:'name abc'}}, {},{},6,1)
@@ -14077,7 +14125,7 @@ export declare class VhQueryAutoWeb {
14077
14125
  * vcode == 0: success
14078
14126
  * vcode == 11: 'not logged in
14079
14127
  */
14080
- updateService(id_service: string, data: object): Promise<unknown>;
14128
+ updateService(id_service: string, value: any): Promise<unknown>;
14081
14129
  /**
14082
14130
  * @example:
14083
14131
  * this.vhQueryAutoWeb.deleteService('5fb67fda87c0f21d484cbdf3')
@@ -14619,8 +14667,13 @@ export declare class VhQueryAutoWeb {
14619
14667
  */
14620
14668
  getRecruitments_byFields(query: object, projection?: object, sort?: object, limit?: number, page?: number): Promise<unknown>;
14621
14669
  /**
14670
+ * Hàm tìm kiếm textsearch:
14671
+ + colname = 'products': value tìm trong trường 'name'
14672
+ + colname = 'foods': value tìm trong trường 'name'
14673
+ + colname = 'services': value tìm trong trường 'name'
14674
+ + colname = 'newss': value tìm trong trường 'title' và 'content'
14622
14675
  * @example
14623
- * this.vhQueryAutoWeb.searchList('atw_products',["name", "describe"], 'Điện Thoại', 20, 1)
14676
+ * this.vhQueryAutoWeb.searchList('products', 'Điện Thoại', {price: {$gte: 10000}}, {price:1}, 20, 1)
14624
14677
  .then(response=>{
14625
14678
  console.log('response', response);
14626
14679
  if(response.vcode === 0){
@@ -14631,14 +14684,14 @@ export declare class VhQueryAutoWeb {
14631
14684
  console.log('error', error)
14632
14685
  })
14633
14686
  * @param colname
14634
- * @param array_field
14687
+ * @param query
14635
14688
  * @param value
14636
14689
  * @param sort null hoặc {}:không sắp xếp; {date:1}: sắp xếp date theo ASC; {date:-1}: sắp xếp date theo DESC
14637
14690
  * @param limit — null hoặc 0: không giới hạn record get về; 2: get về 2 record
14638
14691
  * @param page — null hoặc 0 hoặc 1: get về trang đầu tiên; 2: get về trang thứ 2
14639
14692
  * @return Promise object => response = {vcode, msg, data(array), limit, page, totalpages}
14640
14693
  */
14641
- searchList(colname: string, array_field: any, value: string, sort: object, limit: number, page: number): Promise<unknown>;
14694
+ searchList(colname: string, value: any, query: any, sort: object, limit: number, page: number): Promise<unknown>;
14642
14695
  /**
14643
14696
  * @example
14644
14697
  * this.vhQueryAutoWeb.searchList_PatternBlock_Thumbnail('mùa xuân',["name", "describe"], 20, 1)
@@ -14861,7 +14914,7 @@ export declare class VhQueryAutoWeb {
14861
14914
  * vcode == 0: success
14862
14915
  * vcode == 11: 'not logged in
14863
14916
  */
14864
- updateNews(id_news: string, data: object): Promise<unknown>;
14917
+ updateNews(id_news: string, value: any): Promise<unknown>;
14865
14918
  /**
14866
14919
  * @example:
14867
14920
  * this.vhQueryAutoWeb.deleteNews('5fb67fda87c0f21d484cbdf3')
@@ -18250,6 +18303,19 @@ export declare class VhBuildAutoWeb {
18250
18303
  * @returns
18251
18304
  */
18252
18305
  localStorageGET(name: string): any;
18306
+ /**
18307
+ * @example:
18308
+ * this.vhBuildAutoWeb.createIndexes('atw_products', {name_textsearch:'text'})
18309
+ .then((obj:any)=>{
18310
+ console.log('createIndexes', obj);
18311
+ }, error=>{
18312
+ reject(error)
18313
+ })
18314
+ * @param colname
18315
+ * @param index
18316
+ * @return null or object
18317
+ */
18318
+ createIndexes(colname: string, index: any): Promise<unknown>;
18253
18319
  /**
18254
18320
  * @example:
18255
18321
  * this.vhBuildAutoWeb.addBranch({name:'Chi nhánh 2'})
@@ -18709,9 +18775,9 @@ export declare class VhBuildAutoWeb {
18709
18775
  */
18710
18776
  /**
18711
18777
  * @example
18712
- * this.vhBuildAutoWeb.dynamic_getDetailFood_fromService('categories', '5fb67fda87c0f21d484cbdf3')
18778
+ * this.vhBuildAutoWeb.dynamic_getDetailFood('categories', '5fb67fda87c0f21d484cbdf3')
18713
18779
  .then(response=>{
18714
- console.log('response', response);
18780
+ console.log('dynamic_getDetailFood', response);
18715
18781
  if(response.vcode === 0){
18716
18782
  //-----------your code-----------
18717
18783
  let product = response.data;
@@ -18722,7 +18788,7 @@ export declare class VhBuildAutoWeb {
18722
18788
  * @param id_sub_or_food
18723
18789
  * @return Promise object => response = {vcode, msg, data(object)}
18724
18790
  */
18725
- dynamic_getDetailFood_fromService(id_sub_or_food: any): Promise<unknown>;
18791
+ dynamic_getDetailFood(id_sub_or_food: any): Promise<unknown>;
18726
18792
  /**
18727
18793
  * @example
18728
18794
  * this.vhBuildAutoWeb.searchList('atw_products',["name", "describe"], 'Điện Thoại', 20, 1)
@@ -18743,7 +18809,7 @@ export declare class VhBuildAutoWeb {
18743
18809
  * @param page — null hoặc 0 hoặc 1: get về trang đầu tiên; 2: get về trang thứ 2
18744
18810
  * @return Promise object => response = {vcode, msg, data(array), limit, page, totalpages}
18745
18811
  */
18746
- searchList(colname: string, array_field: any, value: string, sort: object, limit: number, page: number): Promise<unknown>;
18812
+ searchList(colname: string, value: string, query: object, sort: object, limit: number, page: number): Promise<unknown>;
18747
18813
  static ɵfac: i0.ɵɵFactoryDeclaration<VhBuildAutoWeb, never>;
18748
18814
  static ɵprov: i0.ɵɵInjectableDeclaration<VhBuildAutoWeb>;
18749
18815
  }
@@ -19459,6 +19525,19 @@ export declare class VhDesignAutoWeb {
19459
19525
  * @returns
19460
19526
  */
19461
19527
  localStorageGET(name: string): any;
19528
+ /**
19529
+ * @example:
19530
+ * this.vhDesignAutoWeb.createIndexes('atw_products', {name_textsearch:'text'})
19531
+ .then((obj:any)=>{
19532
+ console.log('createIndexes', obj);
19533
+ }, error=>{
19534
+ reject(error)
19535
+ })
19536
+ * @param colname
19537
+ * @param index
19538
+ * @return null or object
19539
+ */
19540
+ createIndexes(colname: string, index: any): Promise<unknown>;
19462
19541
  /**
19463
19542
  * @example:
19464
19543
  * this.vhDesignAutoWeb.addBranch({name:'Chi nhánh 2'})
@@ -19797,9 +19876,9 @@ export declare class VhDesignAutoWeb {
19797
19876
  dynamic_getDetailProduct(id_sub_or_product: any): Promise<unknown>;
19798
19877
  /**
19799
19878
  * @example
19800
- * this.vhDesignAutoWeb.dynamic_getDetailFood_fromService('categories', '5fb67fda87c0f21d484cbdf3')
19879
+ * this.vhDesignAutoWeb.dynamic_getDetailFood('categories', '5fb67fda87c0f21d484cbdf3')
19801
19880
  .then((doc)=>{
19802
- console.log('dynamic_getDetailFood_fromService', doc);
19881
+ console.log('dynamic_getDetailFood', doc);
19803
19882
  },(error:any)=>{
19804
19883
  console.log('error', error)
19805
19884
  })
@@ -19982,7 +20061,7 @@ export declare class VhDesignAutoWeb {
19982
20061
  * @param page — null hoặc 0 hoặc 1: get về trang đầu tiên; 2: get về trang thứ 2
19983
20062
  * @return Promise object => response = {vcode, msg, data(array), limit, page, totalpages}
19984
20063
  */
19985
- searchList(colname: string, array_field: any, value: string, sort: object, limit: number, page: number): Promise<unknown>;
20064
+ searchList(colname: string, value: string, query: object, sort: object, limit: number, page: number): Promise<unknown>;
19986
20065
  /**
19987
20066
  * @example:
19988
20067
  * this.vhDesignAutoWeb.isCloneBlockOrObject(block_or_object)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ionic-vhframeworks",
3
- "version": "8.7.4",
3
+ "version": "8.7.6",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^12.2.0",
6
6
  "@angular/core": "^12.2.0"