This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'rxjs/add/operator/map'; | |
import 'rxjs/add/operator/switchMap'; | |
import 'rxjs/add/operator/mergeMap'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
EffectsModule.forFeature([ ProjectEffects ]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { CommonModule } from '@angular/common'; | |
import { HttpClientModule } from '@angular/common/http'; | |
import { NgModule } from '@angular/core'; | |
import { BrowserModule } from '@angular/platform-browser'; | |
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; | |
import { EffectsModule } from '@ngrx/effects'; | |
import { StoreModule } from '@ngrx/store'; | |
import { StoreDevtoolsModule } from '@ngrx/store-devtools'; | |
import { environment } from '../environments/environment'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Action } from '@ngrx/store'; | |
import { ProjectsDetails } from '../../../shared/model/user-projects-details'; | |
export const LOAD_PROJECTS_DETAILS = '[Projects] Load Projects Details'; | |
export const LOAD_PROJECTS_DETAILS_SUCCESS = '[Projects] Load Projects Details Success'; | |
export const LOAD_PROJECTS_DETAILS_ERROR = '[Projects] Load Projects Details Error'; | |
export class LoadProjectsDetails implements Action { | |
readonly type = LOAD_PROJECTS_DETAILS; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { ProjectsDetails } from '../../../shared/model/user-projects-details'; | |
export interface State extends ProjectsDetails { } | |
export const initialState: State = { | |
projects: [], | |
projectsUsers: [], | |
timeEntries: [], | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { HttpClient } from '@angular/common/http'; | |
import { Injectable } from '@angular/core'; | |
import { Observable } from 'rxjs'; | |
import { ProjectsDetails } from '../../../shared/model/user-projects-details'; | |
import { createCommonHeaders } from '../../utils/httpHeaderUtils'; | |
import { ProjectsModule } from '../projects.module'; | |
@Injectable({ | |
providedIn: ProjectsModule, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ng generate service projects/services/projects |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"api-server": "./node_modules/.bin/ts-node ./src/server/server.ts" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="container"> | |
<h1>Projects</h1> | |
<week-picker | |
(onWeekSelectedChanged)="weekSelectedChanged($event)" | |
[currentlySelectedWeek]="selectedWeekInfo$ | async"> | |
</week-picker> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component } from '@angular/core'; | |
import { Store } from '@ngrx/store'; | |
import { Observable } from 'rxjs/Observable'; | |
import { ChangeSelectedWeek } from '../../actions/dates'; | |
import { WeekInfo } from '../../models/week-info.model'; | |
import * as fromProjects from '../../reducers'; | |
@Component({ | |
selector: 'projects-panel', |