ionic-vhframeworks 9.8.3 → 9.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.
|
@@ -310,6 +310,41 @@ export declare class VhAlgorithm {
|
|
|
310
310
|
* @alias: chuỗi có dấu và các ký tự đặc biệt
|
|
311
311
|
*/
|
|
312
312
|
changeAlias_withCharacter(alias: any): any;
|
|
313
|
+
/**
|
|
314
|
+
* Hàm trả về mảng gồm các phần tử là chuỗi con liên tiếp có m, m+1, m+2,... ký tự thỏa điều kiện m>-4 và m<=n
|
|
315
|
+
* let keywords = this.vhAlgorithm.getSequentialSubstrings('+84909925354, 6);
|
|
316
|
+
*/
|
|
317
|
+
getSequentialSubstrings(str: string, m: number): string[];
|
|
318
|
+
/**
|
|
319
|
+
* Hàm trả về số đt mã đã bỏ đi mã quốc gia (nếu có)
|
|
320
|
+
* console.log(removeCountryCode("+84901234567", "+84")); // "0901234567"
|
|
321
|
+
* console.log(removeCountryCode("0084901234567", "+84")); // "0901234567"
|
|
322
|
+
* console.log(removeCountryCode("84901234567", "+84")); // "0901234567"
|
|
323
|
+
* console.log(removeCountryCode("0901234567", "+84")); // "0901234567" (không đổi)
|
|
324
|
+
* @example:
|
|
325
|
+
* let phone = this.vhAlgorithm.removeCountryCode(phoneNumber, countryCode)
|
|
326
|
+
*/
|
|
327
|
+
removeCountryCode(phoneNumber: string, countryCode: string): string;
|
|
328
|
+
/**
|
|
329
|
+
* Kiểm tra 1 chuỗi str bất kỳ với tất cả các ký tự trong chuỗi đều phải là số
|
|
330
|
+
* @example:
|
|
331
|
+
* let bool = this.vhAlgorithm.isNumericString('123345083')
|
|
332
|
+
* @param str
|
|
333
|
+
* @returns true/false
|
|
334
|
+
*/
|
|
335
|
+
isNumericString(str: string): boolean;
|
|
336
|
+
/**
|
|
337
|
+
* Chuẩn hóa chuỗi str, nếu có nhiều hơn 1 khoảng trống liên tiếp thì chỉ giữ lại 1 khoảng trống, bỏ cả khoảng trống đầu và cuối chuỗi
|
|
338
|
+
* @example:
|
|
339
|
+
* str = this.vhAlgorithm.normalizeSpaces(str)
|
|
340
|
+
* @param str
|
|
341
|
+
* @returns string
|
|
342
|
+
*/
|
|
343
|
+
normalizeSpaces(str: string): string;
|
|
344
|
+
/**
|
|
345
|
+
* Hàm bỏ tất cả các ký tự trống trong chuỗi
|
|
346
|
+
*/
|
|
347
|
+
removeAllSpaces(str: string): string;
|
|
313
348
|
/**
|
|
314
349
|
* Hàm này lấy về 1 unit của sản phẩm theo ratio truyền vào
|
|
315
350
|
* @example
|
|
@@ -3639,7 +3674,7 @@ export declare class VhQueryCafe {
|
|
|
3639
3674
|
* @return Promise => object ={}
|
|
3640
3675
|
* 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
|
|
3641
3676
|
*/
|
|
3642
|
-
addCustomer(data:
|
|
3677
|
+
addCustomer(data: any): Promise<unknown>;
|
|
3643
3678
|
/**
|
|
3644
3679
|
* @example:
|
|
3645
3680
|
* this.vhQueryCafe.addCustomers([{name:'Khách hàng 1', address: 'HCM'},{},...])
|
|
@@ -3663,7 +3698,7 @@ export declare class VhQueryCafe {
|
|
|
3663
3698
|
* @param data
|
|
3664
3699
|
* @return Promise => bool = true or false
|
|
3665
3700
|
*/
|
|
3666
|
-
updateCustomer(_id: string,
|
|
3701
|
+
updateCustomer(_id: string, value: any): Promise<unknown>;
|
|
3667
3702
|
/**
|
|
3668
3703
|
* @example:
|
|
3669
3704
|
* this.vhQueryCafe.deleteCustomer('5fb67fda87c0f21d484cbdf3')
|
|
@@ -3726,6 +3761,21 @@ export declare class VhQueryCafe {
|
|
|
3726
3761
|
* @return Object => obj = {} or null
|
|
3727
3762
|
*/
|
|
3728
3763
|
getlocalCustomerPoints(id_customer: any): any;
|
|
3764
|
+
/**
|
|
3765
|
+
* Hàm tìm kiếm tên chủ sở hữu và số điện thoại, nghĩa là nhập 1 chuỗi tên (2 từ trở lên) hoặc chuỗi số (6 ký tự trở lên) hàm sẽ
|
|
3766
|
+
* trả về những chủ sở hữu có tên hoặc số điện thoại tương ứng với keyword tìm kiếm
|
|
3767
|
+
* @example:
|
|
3768
|
+
* this.vhQuerySales.searchKeyword_NamePhone({'customers, '925354'})
|
|
3769
|
+
.then((rsp)=>{
|
|
3770
|
+
console.log('searchKeyword_NamePhone', rsp);
|
|
3771
|
+
},(error:any)=>{
|
|
3772
|
+
console.log('error', error);
|
|
3773
|
+
})
|
|
3774
|
+
* @param name_or_phone
|
|
3775
|
+
* @param countryCode
|
|
3776
|
+
* @returns Promise = > {vcode, msg, data(array)}
|
|
3777
|
+
*/
|
|
3778
|
+
searchKeyword_NamePhone(colname: string, name_or_phone: string, countryCode?: string): Promise<unknown>;
|
|
3729
3779
|
private publishObservableEventSuppliers;
|
|
3730
3780
|
private observableLocalSuppliers;
|
|
3731
3781
|
/**
|
|
@@ -3775,7 +3825,7 @@ export declare class VhQueryCafe {
|
|
|
3775
3825
|
* @return Promise => obj = {}
|
|
3776
3826
|
* 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
|
|
3777
3827
|
*/
|
|
3778
|
-
addSupplier(data:
|
|
3828
|
+
addSupplier(data: any): Promise<unknown>;
|
|
3779
3829
|
/**
|
|
3780
3830
|
* @example:
|
|
3781
3831
|
* this.vhQueryCafe.addSuppliers([{name:'Nhà cung cấp 1', address: 'HCM'},{},...])
|
|
@@ -3796,10 +3846,10 @@ export declare class VhQueryCafe {
|
|
|
3796
3846
|
console.log('updateSupplier', bool);
|
|
3797
3847
|
})
|
|
3798
3848
|
* @param id_supplier
|
|
3799
|
-
* @param
|
|
3849
|
+
* @param value
|
|
3800
3850
|
* @return Promise => bool = true or false
|
|
3801
3851
|
*/
|
|
3802
|
-
updateSupplier(id_supplier: string,
|
|
3852
|
+
updateSupplier(id_supplier: string, value: any): Promise<unknown>;
|
|
3803
3853
|
/**
|
|
3804
3854
|
* @example:
|
|
3805
3855
|
* this.vhQueryCafe.deleteSupplier('5fb67fda87c0f21d484cbdf3')
|
|
@@ -13764,6 +13814,37 @@ export declare class VhQueryAutoWeb {
|
|
|
13764
13814
|
* @return Promise => page = {}
|
|
13765
13815
|
*/
|
|
13766
13816
|
getDetailFrame(id_frame: any): Promise<unknown>;
|
|
13817
|
+
/**
|
|
13818
|
+
* Hàm này lấy nội dụng file sitemap.xml về và hiển thị lên
|
|
13819
|
+
* @example:
|
|
13820
|
+
* this.vhQueryAutoWeb.getFileSitemap()
|
|
13821
|
+
.then((rsp)=>{
|
|
13822
|
+
console.log('getFileSitemap', rsp);
|
|
13823
|
+
},(error:any)=>{
|
|
13824
|
+
console.log('error', error);
|
|
13825
|
+
})
|
|
13826
|
+
* @return Promise => rsp ={vcode, msg, data(object)} / error
|
|
13827
|
+
* @notice : hàm này chỉ add được dữ liệu sau khi nhân viên quản trị đã đăng nhập
|
|
13828
|
+
* vcode == 0: success
|
|
13829
|
+
* vcode == 11: 'not logged in
|
|
13830
|
+
*/
|
|
13831
|
+
getFileSitemap(): Promise<unknown>;
|
|
13832
|
+
/**
|
|
13833
|
+
* Hàm này lấy nội dụng đang hiển thị xuống file sitemap.xml
|
|
13834
|
+
* @example:
|
|
13835
|
+
* this.vhQueryAutoWeb.saveFileSitemap()
|
|
13836
|
+
.then((rsp)=>{
|
|
13837
|
+
console.log('saveFileSitemap', rsp);
|
|
13838
|
+
},(error:any)=>{
|
|
13839
|
+
console.log('error', error);
|
|
13840
|
+
})
|
|
13841
|
+
* @param records: [{loc, lastmod, changefreq, priority},...]
|
|
13842
|
+
* @return Promise => rsp ={vcode, msg, data(object)} / error
|
|
13843
|
+
* @notice : hàm này chỉ add được dữ liệu sau khi nhân viên quản trị đã đăng nhập
|
|
13844
|
+
* vcode == 0: success
|
|
13845
|
+
* vcode == 11: 'not logged in
|
|
13846
|
+
*/
|
|
13847
|
+
saveFileSitemap(records: any): Promise<unknown>;
|
|
13767
13848
|
/**
|
|
13768
13849
|
* Hàm này dùng để thêm trường mới (trường động) cho bất kỳ ngành hàng nào
|
|
13769
13850
|
* @example:
|
|
@@ -15834,13 +15915,13 @@ export declare class VhQueryAutoWeb {
|
|
|
15834
15915
|
console.log('error', error);
|
|
15835
15916
|
})
|
|
15836
15917
|
* @param id_customers
|
|
15837
|
-
* @param
|
|
15918
|
+
* @param value
|
|
15838
15919
|
* @return Promise object => rsp ={vcode, msg, data(undefined)} / error
|
|
15839
15920
|
* @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
|
|
15840
15921
|
* vcode == 0: success
|
|
15841
15922
|
* vcode == 11: 'not logged in
|
|
15842
15923
|
*/
|
|
15843
|
-
updateCustomer(id_customers: string,
|
|
15924
|
+
updateCustomer(id_customers: string, value: any): Promise<unknown>;
|
|
15844
15925
|
/**
|
|
15845
15926
|
* @example:
|
|
15846
15927
|
* this.vhQueryAutoWeb.deleteCustomer('5fb67fda87c0f21d484cbdf3')
|
|
@@ -23688,7 +23769,7 @@ export declare class VhQuerySales {
|
|
|
23688
23769
|
* @param data
|
|
23689
23770
|
* @return Promise => bool = true or false
|
|
23690
23771
|
*/
|
|
23691
|
-
updateCustomer(_id: string,
|
|
23772
|
+
updateCustomer(_id: string, value: any): Promise<unknown>;
|
|
23692
23773
|
/**
|
|
23693
23774
|
* @example:
|
|
23694
23775
|
* this.vhQuerySales.deleteCustomer('5fb67fda87c0f21d484cbdf3')
|
|
@@ -23751,6 +23832,21 @@ export declare class VhQuerySales {
|
|
|
23751
23832
|
* @return Object => obj = {} or null
|
|
23752
23833
|
*/
|
|
23753
23834
|
getlocalCustomerPoints(id_customer: any): any;
|
|
23835
|
+
/**
|
|
23836
|
+
* Hàm tìm kiếm tên chủ sở hữu và số điện thoại, nghĩa là nhập 1 chuỗi tên (2 từ trở lên) hoặc chuỗi số (6 ký tự trở lên) hàm sẽ
|
|
23837
|
+
* trả về những chủ sở hữu có tên hoặc số điện thoại tương ứng với keyword tìm kiếm
|
|
23838
|
+
* @example:
|
|
23839
|
+
* this.vhQuerySales.searchKeyword_NamePhone({'customers, '925354'})
|
|
23840
|
+
.then((rsp)=>{
|
|
23841
|
+
console.log('searchKeyword_NamePhone', rsp);
|
|
23842
|
+
},(error:any)=>{
|
|
23843
|
+
console.log('error', error);
|
|
23844
|
+
})
|
|
23845
|
+
* @param name_or_phone
|
|
23846
|
+
* @param countryCode
|
|
23847
|
+
* @returns Promise = > {vcode, msg, data(array)}
|
|
23848
|
+
*/
|
|
23849
|
+
searchKeyword_NamePhone(colname: string, name_or_phone: string, countryCode?: string): Promise<unknown>;
|
|
23754
23850
|
private publishObservableEventSuppliers;
|
|
23755
23851
|
private observableLocalSuppliers;
|
|
23756
23852
|
/**
|
|
@@ -23821,10 +23917,10 @@ export declare class VhQuerySales {
|
|
|
23821
23917
|
console.log('updateSupplier', bool);
|
|
23822
23918
|
})
|
|
23823
23919
|
* @param id_supplier
|
|
23824
|
-
* @param
|
|
23920
|
+
* @param value
|
|
23825
23921
|
* @return Promise => bool = true or false
|
|
23826
23922
|
*/
|
|
23827
|
-
updateSupplier(id_supplier: string,
|
|
23923
|
+
updateSupplier(id_supplier: string, value: any): Promise<unknown>;
|
|
23828
23924
|
/**
|
|
23829
23925
|
* @example:
|
|
23830
23926
|
* this.vhQuerySales.deleteSupplier('5fb67fda87c0f21d484cbdf3')
|