refractor(df/locale):shares module (#1300)
This commit is contained in:
@@ -10,6 +10,7 @@ import { SharesAccountChargesStepComponent } from '../shares-account-stepper/sha
|
|||||||
|
|
||||||
/** Custom Services */
|
/** Custom Services */
|
||||||
import { SharesService } from '../shares.service';
|
import { SharesService } from '../shares.service';
|
||||||
|
import { SettingsService } from 'app/settings/settings.service';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create Shares Account Component
|
* Create Shares Account Component
|
||||||
@@ -39,11 +40,13 @@ export class CreateSharesAccountComponent {
|
|||||||
* @param {Router} router Router
|
* @param {Router} router Router
|
||||||
* @param {DatePipe} datePipe Date Pipe
|
* @param {DatePipe} datePipe Date Pipe
|
||||||
* @param {SharesService} sharesService Shares Service
|
* @param {SharesService} sharesService Shares Service
|
||||||
|
* @param {SettingsService} settingsService Settings Service
|
||||||
*/
|
*/
|
||||||
constructor(private route: ActivatedRoute,
|
constructor(private route: ActivatedRoute,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private datePipe: DatePipe,
|
private datePipe: DatePipe,
|
||||||
private sharesService: SharesService) {
|
private sharesService: SharesService,
|
||||||
|
private settingsService: SettingsService) {
|
||||||
this.route.data.subscribe((data: { sharesAccountTemplate: any }) => {
|
this.route.data.subscribe((data: { sharesAccountTemplate: any }) => {
|
||||||
this.sharesAccountTemplate = data.sharesAccountTemplate;
|
this.sharesAccountTemplate = data.sharesAccountTemplate;
|
||||||
});
|
});
|
||||||
@@ -97,8 +100,8 @@ export class CreateSharesAccountComponent {
|
|||||||
*/
|
*/
|
||||||
submit() {
|
submit() {
|
||||||
// TODO: Update once language and date settings are setup
|
// TODO: Update once language and date settings are setup
|
||||||
const locale = 'en';
|
const locale = this.settingsService.language.code;
|
||||||
const dateFormat = 'dd MMMM yyyy';
|
const dateFormat = this.settingsService.dateFormat;
|
||||||
const sharesAccount = {
|
const sharesAccount = {
|
||||||
...this.sharesAccount,
|
...this.sharesAccount,
|
||||||
clientId: this.sharesAccountTemplate.clientId,
|
clientId: this.sharesAccountTemplate.clientId,
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import { SharesAccountChargesStepComponent } from '../shares-account-stepper/sha
|
|||||||
|
|
||||||
/** Custom Services */
|
/** Custom Services */
|
||||||
import { SharesService } from '../shares.service';
|
import { SharesService } from '../shares.service';
|
||||||
|
import { SettingsService } from 'app/settings/settings.service';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Edit Shares Account Component
|
* Edit Shares Account Component
|
||||||
@@ -39,11 +40,13 @@ export class EditSharesAccountComponent {
|
|||||||
* @param {Router} router Router
|
* @param {Router} router Router
|
||||||
* @param {DatePipe} datePipe Date Pipe
|
* @param {DatePipe} datePipe Date Pipe
|
||||||
* @param {SharesService} sharesService Shares Service
|
* @param {SharesService} sharesService Shares Service
|
||||||
|
* @param {SettingsService} settingsService Settings Service
|
||||||
*/
|
*/
|
||||||
constructor(private route: ActivatedRoute,
|
constructor(private route: ActivatedRoute,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private datePipe: DatePipe,
|
private datePipe: DatePipe,
|
||||||
private sharesService: SharesService) {
|
private sharesService: SharesService,
|
||||||
|
private settingsService: SettingsService) {
|
||||||
this.route.data.subscribe((data: { sharesAccountAndTemplate: any }) => {
|
this.route.data.subscribe((data: { sharesAccountAndTemplate: any }) => {
|
||||||
this.sharesAccountAndTemplate = data.sharesAccountAndTemplate;
|
this.sharesAccountAndTemplate = data.sharesAccountAndTemplate;
|
||||||
});
|
});
|
||||||
@@ -102,8 +105,8 @@ export class EditSharesAccountComponent {
|
|||||||
*/
|
*/
|
||||||
submit() {
|
submit() {
|
||||||
// TODO: Update once language and date settings are setup
|
// TODO: Update once language and date settings are setup
|
||||||
const locale = 'en';
|
const locale = this.settingsService.language.code;
|
||||||
const dateFormat = 'dd MMMM yyyy';
|
const dateFormat = this.settingsService.dateFormat;
|
||||||
const sharesAccount = {
|
const sharesAccount = {
|
||||||
...this.sharesAccount,
|
...this.sharesAccount,
|
||||||
clientId: this.sharesAccountAndTemplate.clientId,
|
clientId: this.sharesAccountAndTemplate.clientId,
|
||||||
|
|||||||
+6
-3
@@ -6,6 +6,7 @@ import { ActivatedRoute, Router } from '@angular/router';
|
|||||||
|
|
||||||
/** Custom Services */
|
/** Custom Services */
|
||||||
import { SharesService } from 'app/shares/shares.service';
|
import { SharesService } from 'app/shares/shares.service';
|
||||||
|
import { SettingsService } from 'app/settings/settings.service';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Activate Shares Account Component
|
* Activate Shares Account Component
|
||||||
@@ -32,12 +33,14 @@ export class ActivateSharesAccountComponent implements OnInit {
|
|||||||
* @param {DatePipe} datePipe Date Pipe
|
* @param {DatePipe} datePipe Date Pipe
|
||||||
* @param {ActivatedRoute} route Activated Route
|
* @param {ActivatedRoute} route Activated Route
|
||||||
* @param {Router} router Router
|
* @param {Router} router Router
|
||||||
|
* @param {SettingsService} settingsService Settings Service.
|
||||||
*/
|
*/
|
||||||
constructor(private formBuilder: FormBuilder,
|
constructor(private formBuilder: FormBuilder,
|
||||||
private sharesService: SharesService,
|
private sharesService: SharesService,
|
||||||
private datePipe: DatePipe,
|
private datePipe: DatePipe,
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private router: Router) {
|
private router: Router,
|
||||||
|
private settingsService: SettingsService) {
|
||||||
this.accountId = this.route.parent.snapshot.params['shareAccountId'];
|
this.accountId = this.route.parent.snapshot.params['shareAccountId'];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -63,8 +66,8 @@ export class ActivateSharesAccountComponent implements OnInit {
|
|||||||
*/
|
*/
|
||||||
submit() {
|
submit() {
|
||||||
// TODO: Update once language and date settings are setup
|
// TODO: Update once language and date settings are setup
|
||||||
const locale = 'en';
|
const locale = this.settingsService.language.code;
|
||||||
const dateFormat = 'dd MMMM yyyy';
|
const dateFormat = this.settingsService.dateFormat;
|
||||||
const prevActivatedDate: Date = this.activateSharesAccountForm.value.activatedDate;
|
const prevActivatedDate: Date = this.activateSharesAccountForm.value.activatedDate;
|
||||||
this.activateSharesAccountForm.patchValue({
|
this.activateSharesAccountForm.patchValue({
|
||||||
activatedDate: this.datePipe.transform(prevActivatedDate, dateFormat),
|
activatedDate: this.datePipe.transform(prevActivatedDate, dateFormat),
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import { ActivatedRoute, Router } from '@angular/router';
|
|||||||
|
|
||||||
/** Custom Services */
|
/** Custom Services */
|
||||||
import { SharesService } from 'app/shares/shares.service';
|
import { SharesService } from 'app/shares/shares.service';
|
||||||
|
import { SettingsService } from 'app/settings/settings.service';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Apply Shares Component
|
* Apply Shares Component
|
||||||
@@ -35,12 +36,14 @@ export class ApplySharesComponent implements OnInit {
|
|||||||
* @param {DatePipe} datePipe Date Pipe
|
* @param {DatePipe} datePipe Date Pipe
|
||||||
* @param {ActivatedRoute} route Activated Route
|
* @param {ActivatedRoute} route Activated Route
|
||||||
* @param {Router} router Router
|
* @param {Router} router Router
|
||||||
|
* @param {SettingsService} settingsService Settings Service
|
||||||
*/
|
*/
|
||||||
constructor(private formBuilder: FormBuilder,
|
constructor(private formBuilder: FormBuilder,
|
||||||
private sharesService: SharesService,
|
private sharesService: SharesService,
|
||||||
private datePipe: DatePipe,
|
private datePipe: DatePipe,
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private router: Router) {
|
private router: Router,
|
||||||
|
private settingsService: SettingsService) {
|
||||||
this.accountId = this.route.parent.snapshot.params['shareAccountId'];
|
this.accountId = this.route.parent.snapshot.params['shareAccountId'];
|
||||||
this.route.data.subscribe((data: { shareAccountActionData: any }) => {
|
this.route.data.subscribe((data: { shareAccountActionData: any }) => {
|
||||||
this.sharesAccountData = data.shareAccountActionData;
|
this.sharesAccountData = data.shareAccountActionData;
|
||||||
@@ -74,8 +77,8 @@ export class ApplySharesComponent implements OnInit {
|
|||||||
*/
|
*/
|
||||||
submit() {
|
submit() {
|
||||||
// TODO: Update once language and date settings are setup
|
// TODO: Update once language and date settings are setup
|
||||||
const locale = 'en';
|
const locale = this.settingsService.language.code;
|
||||||
const dateFormat = 'dd MMMM yyyy';
|
const dateFormat = this.settingsService.dateFormat;
|
||||||
const prevRequestedDate: Date = this.applySharesForm.value.requestedDate;
|
const prevRequestedDate: Date = this.applySharesForm.value.requestedDate;
|
||||||
this.applySharesForm.patchValue({
|
this.applySharesForm.patchValue({
|
||||||
requestedDate: this.datePipe.transform(prevRequestedDate, dateFormat),
|
requestedDate: this.datePipe.transform(prevRequestedDate, dateFormat),
|
||||||
|
|||||||
+6
-3
@@ -6,6 +6,7 @@ import { ActivatedRoute, Router } from '@angular/router';
|
|||||||
|
|
||||||
/** Custom Services */
|
/** Custom Services */
|
||||||
import { SharesService } from 'app/shares/shares.service';
|
import { SharesService } from 'app/shares/shares.service';
|
||||||
|
import { SettingsService } from 'app/settings/settings.service';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Approve Shares Account Component
|
* Approve Shares Account Component
|
||||||
@@ -32,12 +33,14 @@ export class ApproveSharesAccountComponent implements OnInit {
|
|||||||
* @param {DatePipe} datePipe Date Pipe
|
* @param {DatePipe} datePipe Date Pipe
|
||||||
* @param {ActivatedRoute} route Activated Route
|
* @param {ActivatedRoute} route Activated Route
|
||||||
* @param {Router} router Router
|
* @param {Router} router Router
|
||||||
|
* @param {SettingsService} settingsService Settings Service.
|
||||||
*/
|
*/
|
||||||
constructor(private formBuilder: FormBuilder,
|
constructor(private formBuilder: FormBuilder,
|
||||||
private sharesService: SharesService,
|
private sharesService: SharesService,
|
||||||
private datePipe: DatePipe,
|
private datePipe: DatePipe,
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private router: Router) {
|
private router: Router,
|
||||||
|
private settingsService: SettingsService) {
|
||||||
this.accountId = this.route.parent.snapshot.params['shareAccountId'];
|
this.accountId = this.route.parent.snapshot.params['shareAccountId'];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -64,8 +67,8 @@ export class ApproveSharesAccountComponent implements OnInit {
|
|||||||
*/
|
*/
|
||||||
submit() {
|
submit() {
|
||||||
// TODO: Update once language and date settings are setup
|
// TODO: Update once language and date settings are setup
|
||||||
const locale = 'en';
|
const locale = this.settingsService.language.code;
|
||||||
const dateFormat = 'dd MMMM yyyy';
|
const dateFormat = this.settingsService.dateFormat;
|
||||||
const prevApprovedDate: Date = this.approveSharesAccountForm.value.approvedDate;
|
const prevApprovedDate: Date = this.approveSharesAccountForm.value.approvedDate;
|
||||||
this.approveSharesAccountForm.patchValue({
|
this.approveSharesAccountForm.patchValue({
|
||||||
approvedDate: this.datePipe.transform(prevApprovedDate, dateFormat),
|
approvedDate: this.datePipe.transform(prevApprovedDate, dateFormat),
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import { ApproveShareDialogComponent } from './approve-share-dialog/approve-shar
|
|||||||
|
|
||||||
/** Custom Serices */
|
/** Custom Serices */
|
||||||
import { SharesService } from 'app/shares/shares.service';
|
import { SharesService } from 'app/shares/shares.service';
|
||||||
|
import { SettingsService } from 'app/settings/settings.service';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Approve shares component.
|
* Approve shares component.
|
||||||
@@ -44,10 +45,14 @@ export class ApproveSharesComponent implements OnInit {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {SharesService} sharesService Shares Service
|
* @param {SharesService} sharesService Shares Service
|
||||||
|
* @param {ActivatedRoute} route Activated Route
|
||||||
|
* @param {MatDialog} dialog Dialog reference.
|
||||||
|
* @param {SettingsService} settingsService Settings Service
|
||||||
*/
|
*/
|
||||||
constructor(private sharesService: SharesService,
|
constructor(private sharesService: SharesService,
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
public dialog: MatDialog) {
|
public dialog: MatDialog,
|
||||||
|
private settingsService: SettingsService) {
|
||||||
this.accountId = this.route.parent.snapshot.params['shareAccountId'];
|
this.accountId = this.route.parent.snapshot.params['shareAccountId'];
|
||||||
this.route.data.subscribe((data: { shareAccountActionData: any }) => {
|
this.route.data.subscribe((data: { shareAccountActionData: any }) => {
|
||||||
this.sharesAccountData = data.shareAccountActionData;
|
this.sharesAccountData = data.shareAccountActionData;
|
||||||
@@ -82,8 +87,8 @@ export class ApproveSharesComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
approveSharesDialogRef.afterClosed().subscribe((response: any) => {
|
approveSharesDialogRef.afterClosed().subscribe((response: any) => {
|
||||||
if (response.approve) {
|
if (response.approve) {
|
||||||
const locale = 'en';
|
const locale = this.settingsService.language.code;
|
||||||
const dateFormat = 'dd MMMM yyyy';
|
const dateFormat = this.settingsService.dateFormat;
|
||||||
const data = {
|
const data = {
|
||||||
requestedShares: [{id}],
|
requestedShares: [{id}],
|
||||||
dateFormat,
|
dateFormat,
|
||||||
|
|||||||
+6
-3
@@ -6,6 +6,7 @@ import { ActivatedRoute, Router } from '@angular/router';
|
|||||||
|
|
||||||
/** Custom Services */
|
/** Custom Services */
|
||||||
import { SharesService } from 'app/shares/shares.service';
|
import { SharesService } from 'app/shares/shares.service';
|
||||||
|
import { SettingsService } from 'app/settings/settings.service';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Close Shares Account Component
|
* Close Shares Account Component
|
||||||
@@ -32,12 +33,14 @@ export class CloseSharesAccountComponent implements OnInit {
|
|||||||
* @param {DatePipe} datePipe Date Pipe
|
* @param {DatePipe} datePipe Date Pipe
|
||||||
* @param {ActivatedRoute} route Activated Route
|
* @param {ActivatedRoute} route Activated Route
|
||||||
* @param {Router} router Router
|
* @param {Router} router Router
|
||||||
|
* @param {SettingsService} settingsService Settings Service.
|
||||||
*/
|
*/
|
||||||
constructor(private formBuilder: FormBuilder,
|
constructor(private formBuilder: FormBuilder,
|
||||||
private sharesService: SharesService,
|
private sharesService: SharesService,
|
||||||
private datePipe: DatePipe,
|
private datePipe: DatePipe,
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private router: Router) {
|
private router: Router,
|
||||||
|
private settingsService: SettingsService) {
|
||||||
this.accountId = this.route.parent.snapshot.params['shareAccountId'];
|
this.accountId = this.route.parent.snapshot.params['shareAccountId'];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -64,8 +67,8 @@ export class CloseSharesAccountComponent implements OnInit {
|
|||||||
*/
|
*/
|
||||||
submit() {
|
submit() {
|
||||||
// TODO: Update once language and date settings are setup
|
// TODO: Update once language and date settings are setup
|
||||||
const locale = 'en';
|
const locale = this.settingsService.language.code;
|
||||||
const dateFormat = 'dd MMMM yyyy';
|
const dateFormat = this.settingsService.dateFormat;
|
||||||
const prevClosedDate: Date = this.closeSharesAccountForm.value.closedDate;
|
const prevClosedDate: Date = this.closeSharesAccountForm.value.closedDate;
|
||||||
this.closeSharesAccountForm.patchValue({
|
this.closeSharesAccountForm.patchValue({
|
||||||
closedDate: this.datePipe.transform(prevClosedDate, dateFormat),
|
closedDate: this.datePipe.transform(prevClosedDate, dateFormat),
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import { ActivatedRoute, Router } from '@angular/router';
|
|||||||
|
|
||||||
/** Custom Services */
|
/** Custom Services */
|
||||||
import { SharesService } from 'app/shares/shares.service';
|
import { SharesService } from 'app/shares/shares.service';
|
||||||
|
import { SettingsService } from 'app/settings/settings.service';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Redeem Shares Component
|
* Redeem Shares Component
|
||||||
@@ -35,12 +36,14 @@ export class RedeemSharesComponent implements OnInit {
|
|||||||
* @param {DatePipe} datePipe Date Pipe
|
* @param {DatePipe} datePipe Date Pipe
|
||||||
* @param {ActivatedRoute} route Activated Route
|
* @param {ActivatedRoute} route Activated Route
|
||||||
* @param {Router} router Router
|
* @param {Router} router Router
|
||||||
|
* @param {SettingsService} settingsService Settings Service.
|
||||||
*/
|
*/
|
||||||
constructor(private formBuilder: FormBuilder,
|
constructor(private formBuilder: FormBuilder,
|
||||||
private sharesService: SharesService,
|
private sharesService: SharesService,
|
||||||
private datePipe: DatePipe,
|
private datePipe: DatePipe,
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private router: Router) {
|
private router: Router,
|
||||||
|
private settingsService: SettingsService) {
|
||||||
this.accountId = this.route.parent.snapshot.params['shareAccountId'];
|
this.accountId = this.route.parent.snapshot.params['shareAccountId'];
|
||||||
this.route.data.subscribe((data: { shareAccountActionData: any }) => {
|
this.route.data.subscribe((data: { shareAccountActionData: any }) => {
|
||||||
this.sharesAccountData = data.shareAccountActionData;
|
this.sharesAccountData = data.shareAccountActionData;
|
||||||
@@ -74,8 +77,8 @@ export class RedeemSharesComponent implements OnInit {
|
|||||||
*/
|
*/
|
||||||
submit() {
|
submit() {
|
||||||
// TODO: Update once language and date settings are setup
|
// TODO: Update once language and date settings are setup
|
||||||
const locale = 'en';
|
const locale = this.settingsService.language.code;
|
||||||
const dateFormat = 'dd MMMM yyyy';
|
const dateFormat = this.settingsService.dateFormat;
|
||||||
const prevRequestedDate: Date = this.redeemSharesForm.value.requestedDate;
|
const prevRequestedDate: Date = this.redeemSharesForm.value.requestedDate;
|
||||||
this.redeemSharesForm.patchValue({
|
this.redeemSharesForm.patchValue({
|
||||||
requestedDate: this.datePipe.transform(prevRequestedDate, dateFormat),
|
requestedDate: this.datePipe.transform(prevRequestedDate, dateFormat),
|
||||||
|
|||||||
+6
-3
@@ -6,6 +6,7 @@ import { ActivatedRoute, Router } from '@angular/router';
|
|||||||
|
|
||||||
/** Custom Services */
|
/** Custom Services */
|
||||||
import { SharesService } from 'app/shares/shares.service';
|
import { SharesService } from 'app/shares/shares.service';
|
||||||
|
import { SettingsService } from 'app/settings/settings.service';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reject Shares Account Component
|
* Reject Shares Account Component
|
||||||
@@ -32,12 +33,14 @@ export class RejectSharesAccountComponent implements OnInit {
|
|||||||
* @param {DatePipe} datePipe Date Pipe
|
* @param {DatePipe} datePipe Date Pipe
|
||||||
* @param {ActivatedRoute} route Activated Route
|
* @param {ActivatedRoute} route Activated Route
|
||||||
* @param {Router} router Router
|
* @param {Router} router Router
|
||||||
|
* @param {SettingsService} settingsService Settings Service
|
||||||
*/
|
*/
|
||||||
constructor(private formBuilder: FormBuilder,
|
constructor(private formBuilder: FormBuilder,
|
||||||
private sharesService: SharesService,
|
private sharesService: SharesService,
|
||||||
private datePipe: DatePipe,
|
private datePipe: DatePipe,
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private router: Router) {
|
private router: Router,
|
||||||
|
private settingsService: SettingsService) {
|
||||||
this.accountId = this.route.parent.snapshot.params['shareAccountId'];
|
this.accountId = this.route.parent.snapshot.params['shareAccountId'];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -64,8 +67,8 @@ export class RejectSharesAccountComponent implements OnInit {
|
|||||||
*/
|
*/
|
||||||
submit() {
|
submit() {
|
||||||
// TODO: Update once language and date settings are setup
|
// TODO: Update once language and date settings are setup
|
||||||
const locale = 'en';
|
const locale = this.settingsService.language.code;
|
||||||
const dateFormat = 'dd MMMM yyyy';
|
const dateFormat = this.settingsService.dateFormat;
|
||||||
const prevRejectedDate: Date = this.rejectSharesAccountForm.value.rejectedDate;
|
const prevRejectedDate: Date = this.rejectSharesAccountForm.value.rejectedDate;
|
||||||
this.rejectSharesAccountForm.patchValue({
|
this.rejectSharesAccountForm.patchValue({
|
||||||
rejectedDate: this.datePipe.transform(prevRejectedDate, dateFormat),
|
rejectedDate: this.datePipe.transform(prevRejectedDate, dateFormat),
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import { RejectShareDialogComponent } from './reject-share-dialog/reject-share-d
|
|||||||
|
|
||||||
/** Custom Serices */
|
/** Custom Serices */
|
||||||
import { SharesService } from 'app/shares/shares.service';
|
import { SharesService } from 'app/shares/shares.service';
|
||||||
|
import { SettingsService } from 'app/settings/settings.service';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reject shares component.
|
* Reject shares component.
|
||||||
@@ -46,10 +47,12 @@ export class RejectSharesComponent implements OnInit {
|
|||||||
* @param {SharesService} sharesService Shares Service
|
* @param {SharesService} sharesService Shares Service
|
||||||
* @param {ActivatedRoute} route Activated Route
|
* @param {ActivatedRoute} route Activated Route
|
||||||
* @param {MatDialog} dialog Mat Dialog
|
* @param {MatDialog} dialog Mat Dialog
|
||||||
|
* @param {SettingsService} settingsService Settings Service.
|
||||||
*/
|
*/
|
||||||
constructor(private sharesService: SharesService,
|
constructor(private sharesService: SharesService,
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
public dialog: MatDialog) {
|
public dialog: MatDialog,
|
||||||
|
private settingsService: SettingsService) {
|
||||||
this.accountId = this.route.parent.snapshot.params['shareAccountId'];
|
this.accountId = this.route.parent.snapshot.params['shareAccountId'];
|
||||||
this.route.data.subscribe((data: { shareAccountActionData: any }) => {
|
this.route.data.subscribe((data: { shareAccountActionData: any }) => {
|
||||||
this.sharesAccountData = data.shareAccountActionData;
|
this.sharesAccountData = data.shareAccountActionData;
|
||||||
@@ -84,8 +87,8 @@ export class RejectSharesComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
rejectSharesDialogRef.afterClosed().subscribe((response: any) => {
|
rejectSharesDialogRef.afterClosed().subscribe((response: any) => {
|
||||||
if (response.reject) {
|
if (response.reject) {
|
||||||
const locale = 'en';
|
const locale = this.settingsService.language.code;
|
||||||
const dateFormat = 'dd MMMM yyyy';
|
const dateFormat = this.settingsService.dateFormat;
|
||||||
const data = {
|
const data = {
|
||||||
requestedShares: [{id}],
|
requestedShares: [{id}],
|
||||||
dateFormat,
|
dateFormat,
|
||||||
|
|||||||
Reference in New Issue
Block a user