ng-ipa-library 1.4.1 → 1.4.4
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/esm2020/lib/core/interceptors/error.interceptor.mjs +4 -4
- package/esm2020/lib/ipa-form/file-upload/file-upload.component.mjs +2 -2
- package/esm2020/lib/ipa-form/ipa-form.service.mjs +12 -6
- package/fesm2015/ng-ipa-library.mjs +16 -9
- package/fesm2015/ng-ipa-library.mjs.map +1 -1
- package/fesm2020/ng-ipa-library.mjs +15 -9
- package/fesm2020/ng-ipa-library.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -143,7 +143,8 @@ class IPAFormService {
|
|
|
143
143
|
const config = {
|
|
144
144
|
required: isArabic ? 'هذا الحقل مطلوب' : 'this field required',
|
|
145
145
|
pattern: `${validatorValue.message}`,
|
|
146
|
-
Email: 'خطأ في البريد الالكتروني
|
|
146
|
+
Email: (isArabic ? 'خطأ في البريد الالكتروني ' : 'Invalid email ') +
|
|
147
|
+
'(example@example.com)',
|
|
147
148
|
maxlength: isArabic
|
|
148
149
|
? `تجاوز عدد الحقل المسموح بها (${validatorValue.requiredLength}) حرف`
|
|
149
150
|
: `this field is more than (${validatorValue.requiredLength}) letter`,
|
|
@@ -157,10 +158,15 @@ class IPAFormService {
|
|
|
157
158
|
? `رقم اصغر من أو يساوي ${validatorValue.max}`
|
|
158
159
|
: `number less than or equal (${validatorValue.min})`,
|
|
159
160
|
ngbDate: this.getNgbDatepickerErrorMsg(validatorValue),
|
|
160
|
-
checkId:
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
161
|
+
checkId: isArabic
|
|
162
|
+
? 'رقم الهوية أو الاقامة غير صحيح'
|
|
163
|
+
: 'Wrong ID or Iqama number',
|
|
164
|
+
link: (isArabic ? 'الرابط غير صحيح ' : 'Wrong link ') +
|
|
165
|
+
'(http://example.com)',
|
|
166
|
+
linkMP4: (isArabic ? 'رابط MP4 غير صحيح ' : 'Wrong MP4 link ') +
|
|
167
|
+
'(http://example.com/example.mp4)',
|
|
168
|
+
mobileNo: (isArabic ? 'خطأ في رقم الجوال ' : 'Wrong mobile number ') +
|
|
169
|
+
'(05xxxxxxxx)',
|
|
164
170
|
};
|
|
165
171
|
return config[validatorName];
|
|
166
172
|
}
|
|
@@ -627,7 +633,7 @@ class FileUploadComponent {
|
|
|
627
633
|
this.currentFiles = [];
|
|
628
634
|
}
|
|
629
635
|
ngOnInit() {
|
|
630
|
-
this.label = this.isArabicForm ? 'رفع ' : 'Upload ' + this.label;
|
|
636
|
+
this.label = (this.isArabicForm ? 'رفع ' : 'Upload ') + this.label;
|
|
631
637
|
this.config = {
|
|
632
638
|
url: this.apiUrl,
|
|
633
639
|
method: this.method,
|
|
@@ -1342,10 +1348,10 @@ class ErrorInterceptor {
|
|
|
1342
1348
|
};
|
|
1343
1349
|
switch (response.statusCode) {
|
|
1344
1350
|
case 500:
|
|
1345
|
-
const
|
|
1346
|
-
const toastr = this.toastrService.error(
|
|
1351
|
+
const msg = response.innerException + ' ' + (response.stackTrace ?? '');
|
|
1352
|
+
const toastr = this.toastrService.error(msg, response.message, toastrConfig);
|
|
1347
1353
|
toastr.onShown.subscribe(() => {
|
|
1348
|
-
this.addCopyButton(message);
|
|
1354
|
+
this.addCopyButton(response.message + '\n' + msg);
|
|
1349
1355
|
});
|
|
1350
1356
|
break;
|
|
1351
1357
|
default:
|