WIP
This commit is contained in:
@@ -7,7 +7,6 @@ import { SessionService } from '../../services/session.service';
|
||||
import { LineService } from '../../services/line.service';
|
||||
import { HeaderService } from '../../services/header.service';
|
||||
import { StringUtils } from '../../utilities/string-utils';
|
||||
import { AuthService } from '../../services/auth.service';
|
||||
import { DateUtils } from '../../utilities/date-utils';
|
||||
import { NumberUtils } from '../../utilities/number-utils';
|
||||
import { CellGroupRoutineEventsService } from '../../services/crudServices/cell-group-routine-events.service';
|
||||
@@ -15,6 +14,7 @@ import { ActivatedRoute } from '@angular/router';
|
||||
import { PastoralDomainService } from '../../services/crudServices/pastoral-domain.service';
|
||||
import { MyAppBase } from '../MyAppBase';
|
||||
import { StateService } from '../../services/state.service';
|
||||
import { LoginUserService } from '../../services/login-user.service';
|
||||
|
||||
@Component({
|
||||
selector: 'ngx-dinner',
|
||||
@@ -29,7 +29,7 @@ export class DinnerComponent extends MyAppBase {
|
||||
private sessionService: SessionService,
|
||||
private lineService: LineService,
|
||||
private cdRef: ChangeDetectorRef,
|
||||
private authService: AuthService,
|
||||
private loginUserService: LoginUserService,
|
||||
protected stateService: StateService,
|
||||
protected route: ActivatedRoute,
|
||||
protected pastoralDomainService: PastoralDomainService
|
||||
@@ -57,10 +57,10 @@ export class DinnerComponent extends MyAppBase {
|
||||
this.cellGroupRoutineEventsService.getComingEvent().pipe(first()).subscribe(result => {
|
||||
this.cellGroupEvent = result;
|
||||
|
||||
this.data = this.cellGroupEvent.attendees.find(a => a.id == this.authService.userAccess.memberId);
|
||||
this.data = this.cellGroupEvent.attendees.find(a => a.id == this.loginUserService.userAccess.memberId);
|
||||
if (!this.data) {
|
||||
this.data = new CellGroupRoutineEventAttendee(this.cellGroupEvent.id, this.authService.userAccess.memberId);
|
||||
this.data.name = this.authService.userAccess.firstName;
|
||||
this.data = new CellGroupRoutineEventAttendee(this.cellGroupEvent.id, this.loginUserService.userAccess.memberId);
|
||||
this.data.name = this.loginUserService.userAccess.firstName;
|
||||
this.cellGroupEvent.attendees.push(this.data);
|
||||
} else {
|
||||
this.potluckItems = this.data.potluckItem.split("|").map(s => new DinnerInfo(s));
|
||||
@@ -95,9 +95,6 @@ export class DinnerComponent extends MyAppBase {
|
||||
this.potluckItems.push(new DinnerInfo(''));
|
||||
this.cdRef.detectChanges();
|
||||
}
|
||||
logout() {
|
||||
this.authService.logout();
|
||||
}
|
||||
}
|
||||
|
||||
export class DinnerInfo {
|
||||
|
||||
Reference in New Issue
Block a user