Skip to content

Commit 5e7b9e8

Browse files
author
Juan Gabriel Guzman
committed
feat: #413 Improving styles for project component
1 parent 263a1f1 commit 5e7b9e8

File tree

3 files changed

+24
-17
lines changed

3 files changed

+24
-17
lines changed

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

Lines changed: 5 additions & 5 deletions
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

7-
<div class="autocomplete">
7+
<div class="form-control autocomplete">
88
<ng-autocomplete
99
formControlName="project_id"
1010
[data]="listProjects"
@@ -19,16 +19,16 @@
1919
</ng-autocomplete>
2020

2121
<ng-template #itemTemplate let-item>
22-
<div class="container" style="cursor:none">
23-
<div class="left-side">
22+
<div class="d-flex container">
23+
<div class="mr-auto p-2">
2424
<span [innerHTML]="item.customer_name"></span> -
2525
<strong><span [innerHTML]="item.name"></span></strong>
2626
</div>
27-
<div class="right-side">
27+
<div class="p-2 pr-3">
2828
<button *ngIf="showClockIn" class="btn btn-sm btn-primary btn-select" (click)="clockIn(item.id, item.customer_name, item.name)">Clock In</button>
2929
<button *ngIf="!showClockIn" class="btn btn-sm btn-primary btn-select"
3030
(click)="switch(item.id, item.customer_name, item.name)">Switch</button>&nbsp;
31-
<button *ngIf="!showClockIn" class="btn btn-sm btn-warning btn-select" (click)="updateProject(item.id)">Update
31+
<button *ngIf="!showClockIn" class="btn btn-sm btn-update btn-select" (click)="updateProject(item.id)">Update
3232
project</button>
3333
</div>
3434
</div>

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

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
width: 6rem;
55
background-color: $primary;
66
color: white;
7+
height: 40px;
78
}
89

910
.btn-select {
@@ -13,20 +14,19 @@
1314

1415
.container {
1516
font-size: small;
16-
width: 100%;
17-
min-height: 30px;
18-
position: relative;
17+
cursor: text;
1918
}
2019

2120
.autocomplete {
22-
width: 80%
21+
width: 80%;
22+
display: block;
23+
background-clip: padding-box;
24+
border: none;
25+
margin: 0em;
26+
padding: 0em;
2327
}
2428

25-
.left-side {
26-
position: absolute;
27-
}
28-
29-
.right-side {
30-
position: absolute;
31-
right: 15px;
29+
.btn-update {
30+
background-color: #ff5e06;
31+
color: white;
3232
}

src/styles.scss

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ body {
1313
overflow-x: hidden;
1414
}
1515

16-
.table.dataTable th, .table.dataTable td{
16+
.table.dataTable th,
17+
.table.dataTable td {
1718
box-sizing: border-box;
1819
}
20+
21+
.autocomplete-container {
22+
@extend .autocomplete-container;
23+
box-shadow: none;
24+
border: $input-border-width solid $input-border-color;
25+
}

0 commit comments

Comments
 (0)