Remove header in activities component
Add Button in child (card) Add my schedules Add scheduler module Plus clean up architecture and code
This commit is contained in:
@ -1,5 +1,3 @@
|
||||
<app-header></app-header>
|
||||
|
||||
<h1> List of Activities</h1>
|
||||
<div *ngFor="let activity of activities">
|
||||
<h3>{{activity.data.name}}</h3>
|
||||
|
@ -1,15 +1,11 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import {ActivitiesService} from '@app/Services/activities.service';
|
||||
import {ScheduleService} from '@app/Services/schedule.service';
|
||||
import {ScheduleComponent} from '@app/schedule/schedule.component';
|
||||
import {MatDialog} from '@angular/material';
|
||||
import {NewScheduleComponent} from '@app/new-schedule/new-schedule.component';
|
||||
import { ActivitiesService } from '@app/core/services';
|
||||
|
||||
@Component({
|
||||
@Component( {
|
||||
selector: 'app-activities',
|
||||
templateUrl: './activities.component.html',
|
||||
styleUrls: ['./activities.component.css']
|
||||
})
|
||||
styleUrls: [ './activities.component.css' ]
|
||||
} )
|
||||
export class ActivitiesComponent implements OnInit {
|
||||
|
||||
activities: any[];
|
||||
@ -17,25 +13,20 @@ export class ActivitiesComponent implements OnInit {
|
||||
activitiesId: '',
|
||||
};
|
||||
|
||||
animal: string;
|
||||
name: string;
|
||||
|
||||
constructor(private activitiesService: ActivitiesService,
|
||||
private scheduleService: ScheduleService,
|
||||
public dialog: MatDialog) {
|
||||
constructor( private activitiesService: ActivitiesService ) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.activitiesService.getActivities().subscribe(data => {
|
||||
this.activities = data.map(e => {
|
||||
this.activitiesService.getActivities().subscribe( data => {
|
||||
this.activities = data.map( e => {
|
||||
return {
|
||||
id: e.payload.doc.id,
|
||||
data: e.payload.doc.data()
|
||||
} as any;
|
||||
});
|
||||
});
|
||||
} );
|
||||
} );
|
||||
}
|
||||
|
||||
addActivitiesIntoSchedule(id) {
|
||||
addActivitiesIntoSchedule( id ) {
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user