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.
@@ -143,7 +143,8 @@ class IPAFormService {
143
143
  const config = {
144
144
  required: isArabic ? 'هذا الحقل مطلوب' : 'this field required',
145
145
  pattern: `${validatorValue.message}`,
146
- Email: 'خطأ في البريد الالكتروني (example@ipa.edu.sa)',
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
- link: 'الرابط غير صحيح (http://google.com)',
162
- linkMP4: 'الرابط غير صحيح (http://example.com/a.mp4)',
163
- mobileNo: 'خطأ في رقم الجوال (05xxxxxxxx)',
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 message = response?.innerException + ' ' + response?.stackTrace;
1346
- const toastr = this.toastrService.error(message, response.message, toastrConfig);
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: