+6
-3
@@ -6,6 +6,7 @@ import { ActivatedRoute, Router } from '@angular/router';
|
||||
|
||||
/** Custom Services */
|
||||
import { GroupsService } from 'app/groups/groups.service';
|
||||
import { SettingsService } from 'app/settings/settings.service';
|
||||
|
||||
/**
|
||||
* Edit Group Meetings Schedule Component
|
||||
@@ -39,12 +40,14 @@ export class EditGroupMeetingScheduleComponent implements OnInit {
|
||||
* @param {DatePipe} datePipe Date Pipe
|
||||
* @param {ActivatedRoute} route Activated Route
|
||||
* @param {Router} router Router
|
||||
* @param {SettingsService} settingsService SettingsService
|
||||
*/
|
||||
constructor(private formBuilder: FormBuilder,
|
||||
private groupsService: GroupsService,
|
||||
private datePipe: DatePipe,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router) {
|
||||
private router: Router,
|
||||
private settingsService: SettingsService) {
|
||||
this.route.data.subscribe((data: { groupActionData: any }) => {
|
||||
this.calendarTemplate = data.groupActionData;
|
||||
this.nextMeetingDates = this.calendarTemplate.nextTenRecurringDates;
|
||||
@@ -72,8 +75,8 @@ export class EditGroupMeetingScheduleComponent implements OnInit {
|
||||
*/
|
||||
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 reschedulebasedOnMeetingDates = true;
|
||||
const prevOldDate: Date = new Date(this.groupEditMeetingScheduleForm.value.presentMeetingDate);
|
||||
const prevNewDate: Date = this.groupEditMeetingScheduleForm.value.newMeetingDate;
|
||||
|
||||
Reference in New Issue
Block a user