Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix: #243 creating a place where messages are hold
  • Loading branch information
enriquezrene committed May 15, 2020
commit a637d555db1f66602f4b80b6293777b7a80eb1bd
3 changes: 3 additions & 0 deletions src/app/modules/shared/messages.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export const INFO_SAVED_SUCCESSFULLY = 'The data has been saved successfully';
export const INFO_DELETE_SUCCESSFULLY = 'The data has been deleted successfully';
export const UNEXPECTED_ERROR = 'An unexpected error happened, please try again later';
5 changes: 1 addition & 4 deletions src/app/modules/time-clock/pages/time-clock.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { Store, select } from '@ngrx/store';
import { Component, OnInit } from '@angular/core';
import { AzureAdB2CService } from '../../login/services/azure.ad.b2c.service';
import { Subscription } from 'rxjs';
import { ToastrService } from 'ngx-toastr';

@Component({
selector: 'app-time-clock',
Expand All @@ -18,8 +17,7 @@ export class TimeClockComponent implements OnInit {
activeTimeEntry: Entry;
actionsSubscription: Subscription;

constructor(private azureAdB2CService: AzureAdB2CService, private store: Store<Entry>,
private toastr: ToastrService) {
constructor(private azureAdB2CService: AzureAdB2CService, private store: Store<Entry>) {
}

ngOnInit() {
Expand All @@ -37,6 +35,5 @@ export class TimeClockComponent implements OnInit {
clockOut() {
this.store.dispatch(new StopTimeEntryRunning(this.activeTimeEntry.id));
this.areFieldsVisible = false;
this.toastr.success('You clocked-out successfully');
}
}