refractor(df/locale):shares module (#1300)
This commit is contained in:
@@ -10,6 +10,7 @@ import { SharesAccountChargesStepComponent } from '../shares-account-stepper/sha
|
||||
|
||||
/** Custom Services */
|
||||
import { SharesService } from '../shares.service';
|
||||
import { SettingsService } from 'app/settings/settings.service';
|
||||
|
||||
/**
|
||||
* Edit Shares Account Component
|
||||
@@ -39,11 +40,13 @@ export class EditSharesAccountComponent {
|
||||
* @param {Router} router Router
|
||||
* @param {DatePipe} datePipe Date Pipe
|
||||
* @param {SharesService} sharesService Shares Service
|
||||
* @param {SettingsService} settingsService Settings Service
|
||||
*/
|
||||
constructor(private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private datePipe: DatePipe,
|
||||
private sharesService: SharesService) {
|
||||
private sharesService: SharesService,
|
||||
private settingsService: SettingsService) {
|
||||
this.route.data.subscribe((data: { sharesAccountAndTemplate: any }) => {
|
||||
this.sharesAccountAndTemplate = data.sharesAccountAndTemplate;
|
||||
});
|
||||
@@ -102,8 +105,8 @@ export class EditSharesAccountComponent {
|
||||
*/
|
||||
submit() {
|
||||
// TODO: Update once language and date settings are setup
|
||||
const locale = 'en';
|
||||
const dateFormat = 'dd MMMM yyyy';
|
||||
const locale = this.settingsService.language.code;
|
||||
const dateFormat = this.settingsService.dateFormat;
|
||||
const sharesAccount = {
|
||||
...this.sharesAccount,
|
||||
clientId: this.sharesAccountAndTemplate.clientId,
|
||||
|
||||
Reference in New Issue
Block a user