Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*ngFor="let entry of data"
>
<td class="col md-col multiline-col"> {{ entry.owner_email }} </td>
<td class="col sm-col"> {{ entry.start_date | date: 'dd/MM/yyyy' }} </td>
<td class="col sm-col"> {{ entry.start_date | date: 'MM/dd/yyyy' }} </td>
<td class="col sm-col"> {{ entry.end_date | substractDate: entry.start_date }} </td>
<td class="col md-col"> {{ entry.project_name }} </td>
<td class="col md-col"> {{ entry.activity_name }} </td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ import {DataTableDirective} from 'angular-datatables';
styleUrls: ['./time-entries-table.component.scss']
})
export class TimeEntriesTableComponent implements OnInit, OnDestroy, AfterViewInit {

data = [];
const;
dtOptions: any = {
scrollY: '600px',
paging: false,
Expand All @@ -25,12 +23,12 @@ export class TimeEntriesTableComponent implements OnInit, OnDestroy, AfterViewIn
{
extend: 'excel',
text: 'Excel',
filename: `time-entries-${ formatDate(new Date(), 'yyyy_MM_dd-hh_mm', 'en') }`
filename: `time-entries-${ formatDate(new Date(), 'MM_dd_yyyy-HH_mm', 'en') }`
},
{
extend: 'csv',
text: 'CSV',
filename: `time-entries-${ formatDate(new Date(), 'yyyy_MM_dd-hh_mm', 'en') }`
filename: `time-entries-${formatDate(new Date(), 'MM_dd_yyyy-HH_mm', 'en') }`
}
]
};
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>

<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;
}