Skip to content

Commit f786d03

Browse files
authored
Merge pull request #291 from ioet/273-no-default-project
fix: #273 no default project selected on time-clock
2 parents 62ea6c3 + df30962 commit f786d03

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +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 value="-1"></option>
78
<option *ngFor="let project of listProjects" value="{{project.id}}">{{project.customer_name}} - {{project.name}}</option>
89
</select>
910
</div>

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ export class ProjectListHoverComponent implements OnInit {
4444
this.projectsForm.setValue({
4545
project_id: activeEntry.project_id,
4646
});
47+
} else {
48+
this.projectsForm.setValue({
49+
project_id: '-1',
50+
});
4751
}
4852
});
4953
}

0 commit comments

Comments
 (0)