Skip to content

Commit 2ec30bf

Browse files
authored
Merge pull request #286 from ioet/189-display-customer-name
fix: #189 project and customer name displayed
2 parents 10a46cb + 7b44af0 commit 2ec30bf

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

src/app/modules/shared/components/details-fields/details-fields.component.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,7 @@ export class DetailsFieldsComponent implements OnChanges, OnInit {
150150
/* istanbul ignore next */
151151
closeEntryModal() {
152152
this.close();
153-
if (this.closeModal.nativeElement) {
154-
this.closeModal.nativeElement.click();
155-
}
153+
this.closeModal?.nativeElement?.click();
156154
}
157155

158156
close() {

src/app/modules/shared/models/project.model.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
export interface Project {
22
id?: string;
33
customer_id?: string;
4+
customer_name?: string;
45
name: string;
56
description?: string;
67
project_type_id?: string;

src/app/modules/time-clock/components/project-list-hover/project-list-hover.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<span class="input-group-text span-width" id="inputGroup-sizing-sm">Project</span>
55
</div>
66
<select (change)="clockIn()" formControlName="project_id" class="form-control">
7-
<option *ngFor="let project of listProjects" value="{{project.id}}">{{ project.name }}</option>
7+
<option *ngFor="let project of listProjects" value="{{project.id}}">{{project.customer_name}} - {{project.name}}</option>
88
</select>
99
</div>
1010
</form>

src/app/modules/time-clock/store/entry.effects.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export class EntryEffects {
2121
return new actions.LoadEntriesSummarySuccess(response);
2222
}),
2323
catchError((error) => {
24-
this.toastrService.success(error);
24+
this.toastrService.warning(`Your summary information could not be loaded`);
2525
return of(new actions.LoadEntriesSummaryFail());
2626
})
2727
)
@@ -50,7 +50,7 @@ export class EntryEffects {
5050
this.entryService.loadEntries().pipe(
5151
map((entries) => new actions.LoadEntriesSuccess(entries)),
5252
catchError((error) => {
53-
this.toastrService.success(error);
53+
this.toastrService.warning(`The data could not be loaded`);
5454
return of(new actions.LoadEntriesFail(error));
5555
})
5656
)

0 commit comments

Comments
 (0)