ionic-vhframeworks 9.9.1 → 9.9.3

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.
@@ -1189,17 +1189,23 @@ export declare class VhAuth {
1189
1189
  /**
1190
1190
  * @example:
1191
1191
  * this.vhAuth.signUpMember('huyleduc92', '123456',{})
1192
- .then(member=>{
1193
- console.log('signUpMember', member);
1194
- },(error:any)=>{
1195
- console.log('error', error);
1196
- })
1192
+ .then((rsp)=>{
1193
+ if(rsp.vcode == 0){
1194
+ //signUpMember thành công
1195
+ }else if(rsp.vcode == 0){
1196
+ //This phone number is already in use with another customer
1197
+ }
1198
+ },(error:any)=>{
1199
+ console.log('error', error);
1200
+ })
1197
1201
  * @param email
1198
1202
  * @param password
1199
- * @param info
1203
+ * @param info : Có cả 3 trường countryCode, phone và phoneNumber
1200
1204
  * @return Promise => member={}
1205
+ * vcode = 0: 'succes'
1206
+ * vcode = 1: 'This phone number is already in use with another employee'
1201
1207
  */
1202
- signUpMember(email: string, password: string, phoneNumber: string, info: object): Promise<unknown>;
1208
+ signUpMember(email: string, password: string, phoneNumber: string, info: any): Promise<unknown>;
1203
1209
  /**
1204
1210
  * @example:
1205
1211
  * this.vhAuth.signUpEndUser('huyleduc92', '123456',{})
@@ -1381,10 +1387,10 @@ export declare class VhAuth {
1381
1387
  console.log('updateEmployee', bool);
1382
1388
  })
1383
1389
  * @param id_employee
1384
- * @param data
1390
+ * @param value
1385
1391
  * @return Promise => bool = true or false
1386
1392
  */
1387
- updateEmployee(id_employee: string, data: object): Promise<unknown>;
1393
+ updateEmployee(id_employee: string, value: any): Promise<unknown>;
1388
1394
  /**
1389
1395
  * @example:
1390
1396
  * this.vhAuth.deleteEmployee('5fb67fda87c0f21d484cbdf3')
@@ -3729,41 +3735,58 @@ export declare class VhQueryCafe {
3729
3735
  /**
3730
3736
  * @example:
3731
3737
  * this.vhQueryCafe.addCustomer({name:'Khách hàng 1', address: 'HCM'})
3732
- .then((customer)=>{
3733
- console.log('addCustomer', customer);
3738
+ .then((rsp)=>{
3739
+ if(rsp.vcode == 0){
3740
+ //addCustomer thành công
3741
+ }else if(rsp.vcode == 0){
3742
+ //This phone number is already in use with another customer
3743
+ }
3734
3744
  },(error:any)=>{
3735
3745
  console.log('error', error);
3736
3746
  })
3737
- * @param colname
3738
- * @param data
3739
- * @return Promise => object ={}
3740
- * Luu ý: chỉ 2 trường hợp, hoặc thêm thành công, hoặc là báo lỗi error
3747
+ * @param data: Có cả 3 trường countryCode, phone và phoneNumber
3748
+ * @return Promise => rsp ={vcode, msg, data(obj)}
3749
+ * vcode = 0: 'success'
3750
+ * vcode = 1: 'This phone number is already in use with another customer'
3741
3751
  */
3742
3752
  addCustomer(data: any): Promise<unknown>;
3743
3753
  /**
3744
3754
  * @example:
3745
3755
  * this.vhQueryCafe.addCustomers([{name:'Khách hàng 1', address: 'HCM'},{},...])
3746
- .then((customers)=>{
3747
- console.log('addCustomers', customers);
3748
- }, error=>{
3756
+ .then((rsp)=>{
3757
+ if(rsp.vcode == 0){
3758
+ //addCustomers thành công
3759
+ }else if(rsp.vcode == 0){
3760
+ //Phone numbers in the list are duplicated
3761
+ }
3762
+ },(error:any)=>{
3749
3763
  console.log('error', error);
3750
3764
  })
3751
- * @param data : array(object)
3752
- * @return Promise => array = [{},{},...]
3753
- * 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
3754
- */
3755
- addCustomers(data_array: any): Promise<unknown>;
3765
+ * @param data : array(object), Có cả 3 trường countryCode, phone và phoneNumber
3766
+ * @return Promise => {vcode, msg, data(array)}
3767
+ * vcode = 0: 'success'
3768
+ * vcode = 1: 'Phone numbers in the list are duplicated'
3769
+ */
3770
+ addCustomers(arr_data: any): Promise<unknown>;
3756
3771
  /**
3757
- * @example:
3758
- * this.vhQueryCafe.updatePCustomer('5fb6780ca2148e09806c5b01', {quantity:400})
3759
- .then((bool:any)=>{
3760
- console.log('updatePCustomer', bool);
3761
- })
3762
- * @param _id
3763
- * @param data
3764
- * @return Promise => bool = true or false
3765
- */
3766
- updateCustomer(_id: string, value: any): Promise<unknown>;
3772
+ * @example:
3773
+ * this.vhQueryCafe.updatePCustomer('5fb6780ca2148e09806c5b01', {name: Nguyễn Thị Nở})
3774
+ .then((rsp)=>{
3775
+ if(rsp.vcode == 0){
3776
+ //updatePCustomer thành công
3777
+ }else if(rsp.vcode == 0){
3778
+ //This phone number is already in use with another customer
3779
+ }
3780
+ },(error:any)=>{
3781
+ console.log('error', error);
3782
+ })
3783
+ * @param id_customer
3784
+ * @param value : Nếu value hoặc có cả 3 trường countryCode, phone, phoneNumber hoặc ko có
3785
+ * @return Promise => {vcode, msg, data(true/false)}
3786
+ * vcode = 0: 'success'
3787
+ * vcode = 1: 'This phone number is already in use with another supplier'
3788
+ */
3789
+ updateCustomer(id_customer: string, value: any): Promise<unknown>;
3767
3790
  /**
3768
3791
  * @example:
3769
3792
  * this.vhQueryCafe.deleteCustomer('5fb67fda87c0f21d484cbdf3')
@@ -3900,43 +3923,42 @@ export declare class VhQueryCafe {
3900
3923
  * @return Promise => null
3901
3924
  */
3902
3925
  refreshLocalSuppliers_Delete_Hidden(): any;
3903
- /**
3904
- * @example:
3905
- * this.vhQueryCafe.addCustomer({name:'Nhà cung cấp 1', address: 'HCM'})
3906
- .then((supplier)=>{
3907
- console.log('addCustomer', supplier);
3908
- },(error:any)=>{
3909
- console.log('error', error);
3910
- })
3911
- * @param colname
3912
- * @param data
3913
- * @return Promise => obj = {}
3914
- * 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
3915
- */
3916
- addSupplier(data: any): Promise<unknown>;
3917
3926
  /**
3918
3927
  * @example:
3919
3928
  * this.vhQueryCafe.addSuppliers([{name:'Nhà cung cấp 1', address: 'HCM'},{},...])
3920
- .then((suppliers)=>{
3921
- console.log('addSuppliers', suppliers);
3922
- }, error=>{
3923
- console.log('error', error);
3924
- })
3925
- * @param data : array(object)
3926
- * @return Promise => array = [{},{},...]
3927
- * 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
3928
- */
3929
- addSuppliers(data_array: any): Promise<unknown>;
3929
+ .then((rsp)=>{
3930
+ if(rsp.vcode == 0){
3931
+ //addSuppliers thành công
3932
+ }else if(rsp.vcode == 0){
3933
+ //Phone numbers in the list are duplicated
3934
+ }
3935
+ },(error:any)=>{
3936
+ console.log('error', error);
3937
+ })
3938
+ * @param data: array(object), Có cả 3 trường countryCode, phone và phoneNumber
3939
+ * @return Promise => {vcode, msg, data(array)}
3940
+ * vcode = 0: 'success'
3941
+ * vcode = 1: 'Phone numbers in the list are duplicated'
3942
+ */
3943
+ addSuppliers(arr_data: any): Promise<unknown>;
3930
3944
  /**
3931
3945
  * @example:
3932
- * this.vhQueryCafe.updateSupplier('5fb6780ca2148e09806c5b01', {quantity:400})
3933
- .then((bool:any)=>{
3934
- console.log('updateSupplier', bool);
3946
+ * this.vhQueryCafe.updateSupplier('5fb6780ca2148e09806c5b01', {name: Nguyễn Thị Nở})
3947
+ .then((rsp)=>{
3948
+ if(rsp.vcode == 0){
3949
+ //updateSupplier thành công
3950
+ }else if(rsp.vcode == 0){
3951
+ //This phone number is already in use with another customer
3952
+ }
3953
+ },(error:any)=>{
3954
+ console.log('error', error);
3935
3955
  })
3936
- * @param id_supplier
3937
- * @param value
3938
- * @return Promise => bool = true or false
3939
- */
3956
+ * @param id_customer
3957
+ * @param value : Nếu value hoặc có cả 3 trường countryCode, phone, phoneNumber hoặc ko có
3958
+ * @return Promise => {vcode, msg, data(true/false)}
3959
+ * vcode = 0: 'success'
3960
+ * vcode = 1: 'This phone number is already in use with another supplier'
3961
+ */
3940
3962
  updateSupplier(id_supplier: string, value: any): Promise<unknown>;
3941
3963
  /**
3942
3964
  * @example:
@@ -23898,41 +23920,58 @@ export declare class VhQuerySales {
23898
23920
  /**
23899
23921
  * @example:
23900
23922
  * this.vhQuerySales.addCustomer({name:'Khách hàng 1', address: 'HCM'})
23901
- .then((customer)=>{
23902
- console.log('addCustomer', customer);
23923
+ .then((rsp)=>{
23924
+ if(rsp.vcode == 0){
23925
+ //addCustomer thành công
23926
+ }else if(rsp.vcode == 0){
23927
+ //This phone number is already in use with another customer
23928
+ }
23903
23929
  },(error:any)=>{
23904
23930
  console.log('error', error);
23905
23931
  })
23906
- * @param colname
23907
- * @param data
23908
- * @return Promise => object ={}
23909
- * Luu ý: chỉ 2 trường hợp, hoặc thêm thành công, hoặc là báo lỗi error
23932
+ * @param data: Có cả 3 trường countryCode, phone và phoneNumber
23933
+ * @return Promise => rsp ={vcode, msg, data(obj)}
23934
+ * vcode = 0: 'success'
23935
+ * vcode = 1: 'This phone number is already in use with another customer'
23910
23936
  */
23911
23937
  addCustomer(data: any): Promise<unknown>;
23912
23938
  /**
23913
23939
  * @example:
23914
23940
  * this.vhQuerySales.addCustomers([{name:'Khách hàng 1', address: 'HCM'},{},...])
23915
- .then((customers)=>{
23916
- console.log('addCustomers', customers);
23917
- }, error=>{
23918
- console.log('error', error);
23919
- })
23920
- * @param data : array(object)
23921
- * @return Promise => array = [{},{},...]
23922
- * 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
23923
- */
23924
- addCustomers(data_array: any): Promise<unknown>;
23941
+ .then((rsp)=>{
23942
+ if(rsp.vcode == 0){
23943
+ //addCustomers thành công
23944
+ }else if(rsp.vcode == 0){
23945
+ //Phone numbers in the list are duplicated
23946
+ }
23947
+ },(error:any)=>{
23948
+ console.log('error', error);
23949
+ })
23950
+ * @param data : array(object), Có cả 3 trường countryCode, phone và phoneNumber
23951
+ * @return Promise => {vcode, msg, data(array)}
23952
+ * vcode = 0: 'success'
23953
+ * vcode = 1: 'Phone numbers in the list are duplicated'
23954
+ */
23955
+ addCustomers(arr_data: any): Promise<unknown>;
23925
23956
  /**
23926
23957
  * @example:
23927
- * this.vhQuerySales.updatePCustomer('5fb6780ca2148e09806c5b01', {quantity:400})
23928
- .then((bool:any)=>{
23929
- console.log('updatePCustomer', bool);
23958
+ * this.vhQuerySales.updatePCustomer('5fb6780ca2148e09806c5b01', {name: Nguyễn Thị Nở})
23959
+ .then((rsp)=>{
23960
+ if(rsp.vcode == 0){
23961
+ //updatePCustomer thành công
23962
+ }else if(rsp.vcode == 0){
23963
+ //This phone number is already in use with another customer
23964
+ }
23965
+ },(error:any)=>{
23966
+ console.log('error', error);
23930
23967
  })
23931
- * @param _id
23932
- * @param data
23933
- * @return Promise => bool = true or false
23934
- */
23935
- updateCustomer(_id: string, value: any): Promise<unknown>;
23968
+ * @param id_customer
23969
+ * @param value : Nếu value hoặc có cả 3 trường countryCode, phone, phoneNumber hoặc ko có
23970
+ * @return Promise => {vcode, msg, data(true/false)}
23971
+ * vcode = 0: 'success'
23972
+ * vcode = 1: 'This phone number is already in use with another customer'
23973
+ */
23974
+ updateCustomer(id_customer: string, value: any): Promise<unknown>;
23936
23975
  /**
23937
23976
  * @example:
23938
23977
  * this.vhQuerySales.deleteCustomer('5fb67fda87c0f21d484cbdf3')
@@ -24071,41 +24110,58 @@ export declare class VhQuerySales {
24071
24110
  refreshLocalSuppliers_Delete_Hidden(): any;
24072
24111
  /**
24073
24112
  * @example:
24074
- * this.vhQuerySales.addCustomer({name:'Nhà cung cấp 1', address: 'HCM'})
24075
- .then((supplier)=>{
24076
- console.log('addCustomer', supplier);
24113
+ * this.vhQuerySales.addSupplier({name:'Nhà cung cấp 1', address: 'HCM'})
24114
+ .then((rsp)=>{
24115
+ if(rsp.vcode == 0){
24116
+ //addSupplier thành công
24117
+ }else if(rsp.vcode == 0){
24118
+ //This phone number is already in use with another customer
24119
+ }
24077
24120
  },(error:any)=>{
24078
24121
  console.log('error', error);
24079
24122
  })
24080
- * @param colname
24081
- * @param data
24082
- * @return Promise => obj = {}
24083
- * Luu ý: chỉ 2 trường hợp, hoặc thêm thành công, hoặc là báo lỗi error
24123
+ * @param data: Có cả 3 trường countryCode, phone và phoneNumber
24124
+ * @return Promise => rsp ={vcode, msg, data(obj)}
24125
+ * vcode = 0: 'success'
24126
+ * vcode = 1: 'This phone number is already in use with another supplier'
24084
24127
  */
24085
24128
  addSupplier(data: any): Promise<unknown>;
24086
24129
  /**
24087
24130
  * @example:
24088
24131
  * this.vhQuerySales.addSuppliers([{name:'Nhà cung cấp 1', address: 'HCM'},{},...])
24089
- .then((suppliers)=>{
24090
- console.log('addSuppliers', suppliers);
24091
- }, error=>{
24092
- console.log('error', error);
24093
- })
24094
- * @param data : array(object)
24095
- * @return Promise => array = [{},{},...]
24096
- * 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
24097
- */
24098
- addSuppliers(data_array: any): Promise<unknown>;
24132
+ .then((rsp)=>{
24133
+ if(rsp.vcode == 0){
24134
+ //addSuppliers thành công
24135
+ }else if(rsp.vcode == 0){
24136
+ //Phone numbers in the list are duplicated
24137
+ }
24138
+ },(error:any)=>{
24139
+ console.log('error', error);
24140
+ })
24141
+ * @param data: array(object), Có cả 3 trường countryCode, phone và phoneNumber
24142
+ * @return Promise => {vcode, msg, data(array)}
24143
+ * vcode = 0: 'success'
24144
+ * vcode = 1: 'Phone numbers in the list are duplicated'
24145
+ */
24146
+ addSuppliers(arr_data: any): Promise<unknown>;
24099
24147
  /**
24100
24148
  * @example:
24101
- * this.vhQuerySales.updateSupplier('5fb6780ca2148e09806c5b01', {quantity:400})
24102
- .then((bool:any)=>{
24103
- console.log('updateSupplier', bool);
24149
+ * this.vhQuerySales.updateSupplier('5fb6780ca2148e09806c5b01', {name: Nguyễn Thị Nở})
24150
+ .then((rsp)=>{
24151
+ if(rsp.vcode == 0){
24152
+ //updateSupplier thành công
24153
+ }else if(rsp.vcode == 0){
24154
+ //This phone number is already in use with another customer
24155
+ }
24156
+ },(error:any)=>{
24157
+ console.log('error', error);
24104
24158
  })
24105
- * @param id_supplier
24106
- * @param value
24107
- * @return Promise => bool = true or false
24108
- */
24159
+ * @param id_customer
24160
+ * @param value : Nếu value hoặc có cả 3 trường countryCode, phone, phoneNumber hoặc ko có
24161
+ * @return Promise => {vcode, msg, data(true/false)}
24162
+ * vcode = 0: 'success'
24163
+ * vcode = 1: 'This phone number is already in use with another supplier'
24164
+ */
24109
24165
  updateSupplier(id_supplier: string, value: any): Promise<unknown>;
24110
24166
  /**
24111
24167
  * @example:
@@ -24135,7 +24191,7 @@ export declare class VhQuerySales {
24135
24191
  })
24136
24192
  * @return Promise => array(object) = [{},{},..]
24137
24193
  */
24138
- getSuppliers(): Promise<unknown>;
24194
+ private getSuppliers;
24139
24195
  private publishObservableEventWallets;
24140
24196
  private observableLocalWallets;
24141
24197
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ionic-vhframeworks",
3
- "version": "9.9.1",
3
+ "version": "9.9.3",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^12.2.0",
6
6
  "@angular/core": "^12.2.0"