ciyidogan commited on
Commit
71d27ac
·
verified ·
1 Parent(s): 5721a80

Update flare-ui/src/app/dialogs/project-edit-dialog/project-edit-dialog.component.ts

Browse files
flare-ui/src/app/dialogs/project-edit-dialog/project-edit-dialog.component.ts CHANGED
@@ -199,8 +199,8 @@ export default class ProjectEditDialogComponent implements OnInit, OnDestroy {
199
  caption: this.data.project.caption || '',
200
  icon: this.data.project.icon || 'folder',
201
  description: this.data.project.description || '',
202
- defaultLanguage: this.data.project.default_language || 'Türkçe',
203
- supportedLanguages: this.data.project.supported_languages || ['tr-TR'],
204
  timezone: this.data.project.timezone || 'Europe/Istanbul',
205
  region: this.data.project.region || 'tr-TR'
206
  } : {
@@ -208,12 +208,12 @@ export default class ProjectEditDialogComponent implements OnInit, OnDestroy {
208
  caption: '',
209
  icon: 'folder',
210
  description: '',
211
- defaultLanguage: 'Türkçe',
212
- supportedLanguages: ['tr-TR'],
213
  timezone: 'Europe/Istanbul',
214
  region: 'tr-TR'
215
  };
216
-
217
  this.form = this.fb.group({
218
  name: [defaultValues.name, [Validators.required, Validators.pattern(/^[a-z0-9_]+$/)]],
219
  caption: [defaultValues.caption, Validators.required],
@@ -224,7 +224,7 @@ export default class ProjectEditDialogComponent implements OnInit, OnDestroy {
224
  timezone: [defaultValues.timezone],
225
  region: [defaultValues.region]
226
  });
227
-
228
  // Disable name field in edit mode
229
  if (this.data.mode === 'edit') {
230
  this.form.get('name')?.disable();
@@ -377,8 +377,8 @@ export default class ProjectEditDialogComponent implements OnInit, OnDestroy {
377
  caption: formValue.caption,
378
  icon: formValue.icon,
379
  description: formValue.description,
380
- default_language: formValue.defaultLanguage,
381
- supported_languages: formValue.supportedLanguages,
382
  timezone: formValue.timezone,
383
  region: formValue.region
384
  };
@@ -389,7 +389,7 @@ export default class ProjectEditDialogComponent implements OnInit, OnDestroy {
389
  ...projectData,
390
  last_update_date: this.data.project.last_update_date || ''
391
  });
392
-
393
  saveOperation
394
  .pipe(takeUntil(this.destroyed$))
395
  .subscribe({
 
199
  caption: this.data.project.caption || '',
200
  icon: this.data.project.icon || 'folder',
201
  description: this.data.project.description || '',
202
+ defaultLanguage: this.data.project.default_locale || 'tr', // default_language yerine default_locale
203
+ supportedLanguages: this.data.project.supported_locales || ['tr'], // supported_languages yerine supported_locales
204
  timezone: this.data.project.timezone || 'Europe/Istanbul',
205
  region: this.data.project.region || 'tr-TR'
206
  } : {
 
208
  caption: '',
209
  icon: 'folder',
210
  description: '',
211
+ defaultLanguage: 'tr',
212
+ supportedLanguages: ['tr'],
213
  timezone: 'Europe/Istanbul',
214
  region: 'tr-TR'
215
  };
216
+
217
  this.form = this.fb.group({
218
  name: [defaultValues.name, [Validators.required, Validators.pattern(/^[a-z0-9_]+$/)]],
219
  caption: [defaultValues.caption, Validators.required],
 
224
  timezone: [defaultValues.timezone],
225
  region: [defaultValues.region]
226
  });
227
+
228
  // Disable name field in edit mode
229
  if (this.data.mode === 'edit') {
230
  this.form.get('name')?.disable();
 
377
  caption: formValue.caption,
378
  icon: formValue.icon,
379
  description: formValue.description,
380
+ default_locale: formValue.defaultLanguage, // default_language yerine default_locale
381
+ supported_locales: formValue.supportedLanguages, // supported_languages yerine supported_locales
382
  timezone: formValue.timezone,
383
  region: formValue.region
384
  };
 
389
  ...projectData,
390
  last_update_date: this.data.project.last_update_date || ''
391
  });
392
+
393
  saveOperation
394
  .pipe(takeUntil(this.destroyed$))
395
  .subscribe({