|
1 | | -import { getProjects } from './../../../customer-management/components/projects/components/store/project.selectors'; |
2 | | -import { Component, OnInit } from '@angular/core'; |
3 | | -import { Store, select } from '@ngrx/store'; |
| 1 | +import {getProjects} from './../../../customer-management/components/projects/components/store/project.selectors'; |
| 2 | +import {Component, OnInit} from '@angular/core'; |
| 3 | +import {Store, select} from '@ngrx/store'; |
4 | 4 |
|
5 | | -import { getActiveTimeEntry } from './../../store/entry.selectors'; |
6 | | -import { Project } from 'src/app/modules/shared/models'; |
7 | | -import { ProjectState } from '../../../customer-management/components/projects/components/store/project.reducer'; |
| 5 | +import {getActiveTimeEntry} from './../../store/entry.selectors'; |
| 6 | +import {Project} from 'src/app/modules/shared/models'; |
| 7 | +import {ProjectState} from '../../../customer-management/components/projects/components/store/project.reducer'; |
8 | 8 | import * as actions from '../../../customer-management/components/projects/components/store/project.actions'; |
9 | 9 | import * as entryActions from '../../store/entry.actions'; |
10 | | -import { ToastrService } from 'ngx-toastr'; |
| 10 | +import {ToastrService} from 'ngx-toastr'; |
11 | 11 |
|
12 | 12 | @Component({ |
13 | 13 | selector: 'app-project-list-hover', |
14 | 14 | templateUrl: './project-list-hover.component.html', |
15 | 15 | styleUrls: ['./project-list-hover.component.scss'], |
16 | 16 | }) |
17 | 17 | export class ProjectListHoverComponent implements OnInit { |
18 | | - |
19 | | - selectedId: string; |
20 | 18 | listProjects: Project[] = []; |
21 | | - filterProjects = ''; |
22 | 19 | showButton = ''; |
23 | 20 | keyword = 'name'; |
24 | 21 | nameActiveProject: string; |
25 | 22 | activeEntry; |
26 | 23 |
|
27 | | - constructor(private store: Store<ProjectState>, private toastr: ToastrService) { } |
| 24 | + constructor(private store: Store<ProjectState>, private toastr: ToastrService) { |
| 25 | + } |
28 | 26 |
|
29 | 27 | ngOnInit(): void { |
30 | 28 | this.store.dispatch(new actions.LoadProjects()); |
@@ -59,7 +57,7 @@ export class ProjectListHoverComponent implements OnInit { |
59 | 57 | const entry = {id: this.activeEntry.id, project_id: id}; |
60 | 58 | this.store.dispatch(new entryActions.UpdateActiveEntry(entry)); |
61 | 59 | } else { |
62 | | - const newEntry = { project_id: id, start_date: new Date().toISOString() }; |
| 60 | + const newEntry = {project_id: id, start_date: new Date().toISOString()}; |
63 | 61 | this.store.dispatch(new entryActions.CreateEntry(newEntry)); |
64 | 62 | this.toastr.success('You just clocked-in'); |
65 | 63 | } |
|
0 commit comments