ionic-vhframeworks 4.1.5 → 4.1.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.
- 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 +58 -1
- package/package.json +1 -1
|
@@ -29,6 +29,16 @@ export declare class VhAlgorithm {
|
|
|
29
29
|
private papa;
|
|
30
30
|
private dom;
|
|
31
31
|
constructor(platform: Platform, file: File, socialSharing: SocialSharing, papa: Papa, dom: DomSanitizer);
|
|
32
|
+
/**
|
|
33
|
+
* Hàm này kiểm tra ngày trên bill có phải là ngày hiện tại của thiết bị không
|
|
34
|
+
* @Example :
|
|
35
|
+
* if(this.vhAlgorithm.isToday(date)){
|
|
36
|
+
* //Your code
|
|
37
|
+
* }
|
|
38
|
+
* @param date : ngày trên bill
|
|
39
|
+
* @returns true: nếu ngày trên bill trùng với ngày của thiết bị; false: nếu ngày trên bill khác với ngày của thiết bị
|
|
40
|
+
*/
|
|
41
|
+
isToday(date: any): boolean;
|
|
32
42
|
/**
|
|
33
43
|
* Hàm này so sanh sâu 2 object bằng nhau
|
|
34
44
|
* @param object1
|
|
@@ -42,6 +52,11 @@ export declare class VhAlgorithm {
|
|
|
42
52
|
* @returns
|
|
43
53
|
*/
|
|
44
54
|
isObject(object: any): boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Hàm này tạo chuỗi số, ký tự ngẫy nhiên có chiều dài là length
|
|
57
|
+
* @param length
|
|
58
|
+
* @returns
|
|
59
|
+
*/
|
|
45
60
|
ObjectId(length?: number): string;
|
|
46
61
|
/**
|
|
47
62
|
* @example:
|
|
@@ -85,7 +100,17 @@ export declare class VhAlgorithm {
|
|
|
85
100
|
*/
|
|
86
101
|
exportCSV(headerRow: any, csvData: any, filename: any): void;
|
|
87
102
|
waitingStack(): Promise<unknown>;
|
|
103
|
+
/**
|
|
104
|
+
* Hàm trả về mảng có đối tượng trong array_list thỏa điều kiện tìm kiếm
|
|
105
|
+
* @param value : giá trị cần search
|
|
106
|
+
* @param array_list : mảng các đối tượng
|
|
107
|
+
* @param array_field : mảng các trường của đối tượng sẽ đc search
|
|
108
|
+
* @returns Array
|
|
109
|
+
*/
|
|
88
110
|
searchList(value: any, array_list: any, array_field: any): any[];
|
|
111
|
+
/**
|
|
112
|
+
* Ham đổi chuỗi alias có dấu thành không dấu
|
|
113
|
+
*/
|
|
89
114
|
changeAlias(alias: any): any;
|
|
90
115
|
/**
|
|
91
116
|
* @example
|
|
@@ -139,13 +164,14 @@ export declare class VhAlgorithm {
|
|
|
139
164
|
sortNumberbyASC(array: any, field: any): any;
|
|
140
165
|
sortNumberbyDESC(array: any, field: any): any;
|
|
141
166
|
/**
|
|
142
|
-
*
|
|
167
|
+
* Hàm trả về số ngày trong tháng của một thời gian
|
|
143
168
|
* @param year
|
|
144
169
|
* @param month
|
|
145
170
|
*/
|
|
146
171
|
getNumberOfDaysInMonth(year: number, month: number): 31 | 29 | 28 | 30;
|
|
147
172
|
Compare(field: any, condition: any, value: any): boolean;
|
|
148
173
|
/**
|
|
174
|
+
* Hàm đổi chuỗi sang object
|
|
149
175
|
* @example: data = "{"field":1, "field2": "val"}";
|
|
150
176
|
* => data = {
|
|
151
177
|
* field1: 1,
|
|
@@ -156,6 +182,7 @@ export declare class VhAlgorithm {
|
|
|
156
182
|
*/
|
|
157
183
|
convert_STRING2OBJECT(string: any): any;
|
|
158
184
|
/**
|
|
185
|
+
* Hàm đổi object sang chuỗi
|
|
159
186
|
* @example:
|
|
160
187
|
* data = {
|
|
161
188
|
* field1: 1,
|
|
@@ -3425,6 +3452,21 @@ export declare class VhQueryCafe {
|
|
|
3425
3452
|
* @return — Array -> array = [{},{},...]
|
|
3426
3453
|
*/
|
|
3427
3454
|
getBills(query: object, projection?: object, sort?: object, limit?: number): Promise<unknown>;
|
|
3455
|
+
/**
|
|
3456
|
+
* @example:
|
|
3457
|
+
* let time = new Date();
|
|
3458
|
+
* time.setDate(time.getDate()-7);
|
|
3459
|
+
* this.vhQueryCafe.getBills_byFields({date:{$gte:time}, {bill_type:{$eq:5}}, {},{date:1},0)
|
|
3460
|
+
.then((bills)=>{
|
|
3461
|
+
console.log('getBills', bills);
|
|
3462
|
+
})
|
|
3463
|
+
* @param query
|
|
3464
|
+
* @param projection — đang tìm hiểu, tạm thời để giá trị là {}
|
|
3465
|
+
* @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
|
|
3466
|
+
* @param limit — null hoặc 0: không giới hạn record get về; 2: get về 2 record
|
|
3467
|
+
* @return — Array -> array = [{},{},...]
|
|
3468
|
+
*/
|
|
3469
|
+
getBills_byFields(query: object, projection?: object, sort?: object, limit?: number): Promise<unknown>;
|
|
3428
3470
|
/**
|
|
3429
3471
|
* @example:
|
|
3430
3472
|
* this.vhQueryCafe.createBill({name:'Cuối tuần vui vẻ', type:2, active:true, date_start:new Date(), date_end: new Date()})
|
|
@@ -10884,6 +10926,21 @@ export declare class VhQuerySales {
|
|
|
10884
10926
|
* @return — Array -> array = [{},{},...]
|
|
10885
10927
|
*/
|
|
10886
10928
|
getBills(query: object, projection?: object, sort?: object, limit?: number): Promise<unknown>;
|
|
10929
|
+
/**
|
|
10930
|
+
* @example:
|
|
10931
|
+
* let time = new Date();
|
|
10932
|
+
* time.setDate(time.getDate()-7);
|
|
10933
|
+
* this.vhQuerySales.getBills_byFields({date:{$gte:time}, {bill_type:{$eq:5}}, {},{date:1},0)
|
|
10934
|
+
.then((bills)=>{
|
|
10935
|
+
console.log('getBills', bills);
|
|
10936
|
+
})
|
|
10937
|
+
* @param query
|
|
10938
|
+
* @param projection — đang tìm hiểu, tạm thời để giá trị là {}
|
|
10939
|
+
* @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
|
|
10940
|
+
* @param limit — null hoặc 0: không giới hạn record get về; 2: get về 2 record
|
|
10941
|
+
* @return — Array -> array = [{},{},...]
|
|
10942
|
+
*/
|
|
10943
|
+
getBills_byFields(query: object, projection?: object, sort?: object, limit?: number): Promise<unknown>;
|
|
10887
10944
|
/**
|
|
10888
10945
|
* @example:
|
|
10889
10946
|
* this.vhQuerySales.createBill({name:'Cuối tuần vui vẻ', type:2, active:true, date_start:new Date(), date_end: new Date()})
|