+6
-3
@@ -8,6 +8,7 @@ import { DatePipe } from '@angular/common';
|
||||
/** Custom Dialogs */
|
||||
import { FormDialogComponent } from 'app/shared/form-dialog/form-dialog.component';
|
||||
import { DeleteDialogComponent } from '../../../../shared/delete-dialog/delete-dialog.component';
|
||||
import { SettingsService } from 'app/settings/settings.service';
|
||||
|
||||
/** Custom Models */
|
||||
import { FormfieldBase } from 'app/shared/form-dialog/formfield/model/formfield-base';
|
||||
@@ -52,11 +53,13 @@ export class MultiRowComponent implements OnInit, OnChanges {
|
||||
* @param {DatePipe} datePipe Date Pipe.
|
||||
* @param {SavingsService} savingsService Savingss Service.
|
||||
* @param {MatDialog} dialog Mat Dialog.
|
||||
* @param {SettingsService} settingsService Setting service
|
||||
*/
|
||||
constructor(private route: ActivatedRoute,
|
||||
private datePipe: DatePipe,
|
||||
private savingsService: SavingsService,
|
||||
private dialog: MatDialog) {
|
||||
private dialog: MatDialog,
|
||||
private settingsService: SettingsService) {
|
||||
this.savingAccountId = this.route.parent.parent.snapshot.paramMap.get('savingAccountId');
|
||||
}
|
||||
|
||||
@@ -85,7 +88,7 @@ export class MultiRowComponent implements OnInit, OnChanges {
|
||||
* Adds a new row to the given multi row data table.
|
||||
*/
|
||||
add() {
|
||||
let dataTableEntryObject: any = { locale: 'en' };
|
||||
let dataTableEntryObject: any = { locale: this.settingsService.language.code };
|
||||
const dateTransformColumns: string[] = [];
|
||||
const columns = this.dataObject.columnHeaders.filter((column: any) => {
|
||||
return ((column.columnName !== 'id') && (column.columnName !== 'savings_account_id'));
|
||||
@@ -118,7 +121,7 @@ export class MultiRowComponent implements OnInit, OnChanges {
|
||||
});
|
||||
case 'DATE': {
|
||||
dateTransformColumns.push(column.columnName);
|
||||
dataTableEntryObject.dateFormat = 'yyyy-MM-dd';
|
||||
dataTableEntryObject.dateFormat = this.settingsService.dateFormat;
|
||||
return new DatepickerBase({
|
||||
controlName: column.columnName,
|
||||
label: column.columnName,
|
||||
|
||||
Reference in New Issue
Block a user