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
Next Next commit
fix: #189 project and customer name displayed
  • Loading branch information
enriquezrene committed May 21, 2020
commit e84992523943808bc20d0b6913d18bf31c9ffa70
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export class DetailsFieldsComponent implements OnChanges, OnInit {

closeEntryModal() {
this.close();
this.closeModal.nativeElement.click();
this.closeModal?.nativeElement?.click();
}

close() {
Expand Down
1 change: 1 addition & 0 deletions src/app/modules/shared/models/project.model.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export interface Project {
id?: string;
customer_id?: string;
customer_name?: string;
name: string;
description?: string;
project_type_id?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<span class="input-group-text span-width" id="inputGroup-sizing-sm">Project</span>
</div>
<select (change)="clockIn()" formControlName="project_id" class="form-control">
<option *ngFor="let project of listProjects" value="{{project.id}}">{{ project.name }}</option>
<option *ngFor="let project of listProjects" value="{{project.id}}">{{project.customer_name}} - {{project.name}}</option>
</select>
</div>
</form>
4 changes: 2 additions & 2 deletions src/app/modules/time-clock/store/entry.effects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export class EntryEffects {
return new actions.LoadEntriesSummarySuccess(response);
}),
catchError((error) => {
this.toastrService.success(error);
this.toastrService.warning(`Your summary information could not be loaded`);
return of(new actions.LoadEntriesSummaryFail());
})
)
Expand Down Expand Up @@ -50,7 +50,7 @@ export class EntryEffects {
this.entryService.loadEntries().pipe(
map((entries) => new actions.LoadEntriesSuccess(entries)),
catchError((error) => {
this.toastrService.success(error);
this.toastrService.warning(`The data could not be loaded`);
return of(new actions.LoadEntriesFail(error));
})
)
Expand Down