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
feat: #413 Improving styles for project component
  • Loading branch information
Juan Gabriel Guzman committed Jul 2, 2020
commit 5e7b9e81002e8e1bfecee982089424da97426e65
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>

<div class="autocomplete">
<div class="form-control autocomplete">
<ng-autocomplete
formControlName="project_id"
[data]="listProjects"
Expand All @@ -19,16 +19,16 @@
</ng-autocomplete>

<ng-template #itemTemplate let-item>
<div class="container" style="cursor:none">
<div class="left-side">
<div class="d-flex container">
<div class="mr-auto p-2">
<span [innerHTML]="item.customer_name"></span> -
<strong><span [innerHTML]="item.name"></span></strong>
</div>
<div class="right-side">
<div class="p-2 pr-3">
<button *ngIf="showClockIn" class="btn btn-sm btn-primary btn-select" (click)="clockIn(item.id, item.customer_name, item.name)">Clock In</button>
<button *ngIf="!showClockIn" class="btn btn-sm btn-primary btn-select"
(click)="switch(item.id, item.customer_name, item.name)">Switch</button>&nbsp;
<button *ngIf="!showClockIn" class="btn btn-sm btn-warning btn-select" (click)="updateProject(item.id)">Update
<button *ngIf="!showClockIn" class="btn btn-sm btn-update btn-select" (click)="updateProject(item.id)">Update
project</button>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
width: 6rem;
background-color: $primary;
color: white;
height: 40px;
}

.btn-select {
Expand All @@ -13,20 +14,19 @@

.container {
font-size: small;
width: 100%;
min-height: 30px;
position: relative;
cursor: text;
}

.autocomplete {
width: 80%
width: 80%;
display: block;
background-clip: padding-box;
border: none;
margin: 0em;
padding: 0em;
}

.left-side {
position: absolute;
}

.right-side {
position: absolute;
right: 15px;
.btn-update {
background-color: #ff5e06;
color: white;
}
9 changes: 8 additions & 1 deletion src/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ body {
overflow-x: hidden;
}

.table.dataTable th, .table.dataTable td{
.table.dataTable th,
.table.dataTable td {
box-sizing: border-box;
}

.autocomplete-container {
@extend .autocomplete-container;
box-shadow: none;
border: $input-border-width solid $input-border-color;
}