-
Notifications
You must be signed in to change notification settings - Fork 1
TT-664 fix bad UX #872
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
TT-664 fix bad UX #872
Changes from 6 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
dd90c81
TT-664 fix bad UX
ngalvare10 1874f43
TT-664 fix bad UX console log
ngalvare10 5a19ec4
TT-664 fix bad UX review
ngalvare10 4b9c606
TT-664 fix bad UX review
ngalvare10 ce73ef8
TT-664 fix bad UX review
ngalvare10 30e3d22
TT-664 fix bad UX review
ngalvare10 6550335
TT-664 fix bad UX QA
ngalvare10 4fe8fd8
TT-664 fix bad UX QA
ngalvare10 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
112 changes: 57 additions & 55 deletions
112
src/app/modules/reports/components/time-entries-table/time-entries-table.component.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,60 +1,62 @@ | ||
| <div class="row scroll-table mt-5 ml-0"> | ||
| <app-search-user [users]="users" (selectedUserId)="user($event)"></app-search-user> | ||
|
|
||
| <table class="table table-striped mb-0" datatable [dtTrigger]="dtTrigger" [dtOptions]="dtOptions" *ngIf="(reportDataSource$ | async) as dataSource"> | ||
| <thead class="thead-blue"> | ||
| <tr class="d-flex"> | ||
| <th class="hidden-col">ID</th> | ||
| <th class="col md-col">User email</th> | ||
| <th class="col sm-col">Date</th> | ||
| <th class="col sm-col" title="Duration (hours)">Duration</th> | ||
| <th class="col x-sm-col" title="Time in">Time in</th> | ||
| <th class="col x-sm-col" title="Time out">Time out</th> | ||
| <th class="col md-col">Project</th> | ||
| <th class="hidden-col">Project ID</th> | ||
| <th class="col md-col">Customer</th> | ||
| <th class="hidden-col">Customer ID</th> | ||
| <th class="col md-col">Activity</th> | ||
| <th class="col lg-col">Ticket</th> | ||
| <th class="col lg-col">Description</th> | ||
| <th class="col lg-col">Technologies</th> | ||
| </tr> | ||
| </thead> | ||
| <app-loading-bar *ngIf="dataSource.isLoading"></app-loading-bar> | ||
| <tbody *ngIf="!dataSource.isLoading"> | ||
| <tr class="d-flex col-height" *ngFor="let entry of dataSource.data"> | ||
| <td class="hidden-col">{{ entry.id }}</td> | ||
| <td class="col md-col">{{ entry.owner_email }}</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 x-sm-col">{{ dateTimeOffset.parseDateTimeOffset(entry.start_date,entry.timezone_offset) }}</td> | ||
| <td class="col x-sm-col">{{ dateTimeOffset.parseDateTimeOffset(entry.end_date , entry.timezone_offset) }}</td> | ||
| <td class="col md-col">{{ entry.project_name }}</td> | ||
| <td class="hidden-col">{{ entry.project_id }}</td> | ||
| <td class="col md-col">{{ entry.customer_name }}</td> | ||
| <td class="hidden-col">{{ entry.customer_id }}</td> | ||
| <td class="col md-col">{{ entry.activity_name }}</td> | ||
| <td class="col lg-col"> | ||
| <ng-container *ngIf="entry.uri !== null"> | ||
| <a [class.is-url]="isURL(entry.uri)" (click)="openURLInNewTab(entry.uri)"> | ||
| {{ entry.uri }} | ||
| </a> | ||
| </ng-container> | ||
| </td> | ||
| <td class="col lg-scroll">{{ entry.description }}</td> | ||
| <td class="col lg-scroll"> | ||
| <ng-container *ngIf="entry.technologies.length > 0"> | ||
| <div *ngFor="let technology of entry.technologies" class="badge bg-secondary text-wrap"> | ||
| {{ technology }} | ||
| </div> | ||
| </ng-container> | ||
| </td> | ||
| </tr> | ||
| </tbody> | ||
| </table> | ||
| <div class="table-responsive"> | ||
| <table class="table table-striped mb-0" datatable [dtTrigger]="dtTrigger" [dtOptions]="dtOptions" *ngIf="(reportDataSource$ | async) as dataSource"> | ||
| <thead class="thead-blue"> | ||
| <tr class="d-flex"> | ||
| <th class="hidden-col">ID</th> | ||
| <th class="col md-col">User email</th> | ||
| <th class="col sm-col">Date</th> | ||
| <th class="col sm-col" title="Duration (hours)">Duration</th> | ||
| <th class="col x-sm-col" title="Time in">Time in</th> | ||
| <th class="col x-sm-col" title="Time out">Time out</th> | ||
| <th class="col md-col">Project</th> | ||
| <th class="hidden-col">Project ID</th> | ||
| <th class="col md-col">Customer</th> | ||
| <th class="hidden-col">Customer ID</th> | ||
| <th class="col md-col">Activity</th> | ||
| <th class="col lg-col">Ticket</th> | ||
| <th class="col lg-col">Description</th> | ||
| <th class="col lg-col">Technologies</th> | ||
| </tr> | ||
| </thead> | ||
| <app-loading-bar *ngIf="dataSource.isLoading"></app-loading-bar> | ||
| <tbody *ngIf="!dataSource.isLoading"> | ||
| <tr class="d-flex col-height" *ngFor="let entry of dataSource.data"> | ||
| <td class="hidden-col">{{ entry.id }}</td> | ||
| <td class="col md-col">{{ entry.owner_email }}</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 x-sm-col">{{ dateTimeOffset.parseDateTimeOffset(entry.start_date,entry.timezone_offset) }}</td> | ||
| <td class="col x-sm-col">{{ dateTimeOffset.parseDateTimeOffset(entry.end_date , entry.timezone_offset) }}</td> | ||
| <td class="col md-col">{{ entry.project_name }}</td> | ||
| <td class="hidden-col">{{ entry.project_id }}</td> | ||
| <td class="col md-col">{{ entry.customer_name }}</td> | ||
| <td class="hidden-col">{{ entry.customer_id }}</td> | ||
| <td class="col md-col">{{ entry.activity_name }}</td> | ||
| <td class="col lg-col"> | ||
| <ng-container *ngIf="entry.uri !== null"> | ||
| <a [class.is-url]="isURL(entry.uri)" (click)="openURLInNewTab(entry.uri)"> | ||
| {{ entry.uri }} | ||
| </a> | ||
| </ng-container> | ||
| </td> | ||
| <td class="col lg-scroll">{{ entry.description }}</td> | ||
| <td class="col lg-scroll"> | ||
| <ng-container *ngIf="entry.technologies.length > 0"> | ||
| <div *ngFor="let technology of entry.technologies" class="badge bg-secondary text-wrap"> | ||
| {{ technology }} | ||
| </div> | ||
| </ng-container> | ||
| </td> | ||
| </tr> | ||
| </tbody> | ||
| </table> | ||
| </div> | ||
| </div> | ||
| <div class="alert alert-dark mt-3">Total: {{this.resultSum.hours}} hours, {{this.resultSum.minutes}} minutes</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,18 +1,16 @@ | ||
| <div> | ||
| <div> | ||
| <button type="button" (click)="newEntry()" data-toggle="modal" data-target="#editRecordsByDate" class="btn btn-primary"> | ||
| Add new entry | ||
| </button> | ||
| <button type="button" (click)="onDisplayModeChange()" class="btn btn-primary float-right" *ngIf="isFeatureToggleCalendarActive"> | ||
| <em class="fas fa-list" *ngIf="displayGridView"></em> | ||
| <em class="fas fa-th" *ngIf="!displayGridView"></em> | ||
| </button> | ||
| Add new entry | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Review the whitespaces and the indent |
||
| </button> | ||
| <button type="button" (click)="onDisplayModeChange()" class="btn btn-primary float-right" *ngIf="isFeatureToggleCalendarActive"> | ||
| <em class="fas fa-list" *ngIf="displayGridView"></em> | ||
| <em class="fas fa-th" *ngIf="!displayGridView"></em> | ||
| </button> | ||
| </div> | ||
| <div style="height: 15px"></div> | ||
| <app-month-picker [selectedDate]="selectedDate" (dateSelected)="dateSelected($event)"></app-month-picker> | ||
| <div style="height: 15px"></div> | ||
|
|
||
|
|
||
| <div id="gridView" [hidden]="!displayGridView"> | ||
| <div *ngIf="timeEntriesDataSource$ | async as dataSource"> | ||
| <app-loading-bar *ngIf="dataSource.isLoading"></app-loading-bar> | ||
|
|
@@ -21,56 +19,56 @@ | |
| </app-calendar> | ||
| </div> | ||
| </div> | ||
|
|
||
| <div id="listView" [hidden]="displayGridView"> | ||
| <table class="table table-sm table-striped mb-0" datatable [dtTrigger]="dtTrigger" [dtOptions]="dtOptions" *ngIf="(timeEntriesDataSource$ | async) as dataSource"> | ||
| <caption></caption> | ||
| <thead class="thead-blue"> | ||
| <tr class="d-flex"> | ||
| <th class="col">Date</th> | ||
| <th class="col">Time in - out</th> | ||
| <th class="col">Duration</th> | ||
| <th class="col">Customer</th> | ||
| <th class="col">Project</th> | ||
| <th class="col">Activity</th> | ||
| <th class="col"></th> | ||
| </tr> | ||
| </thead> | ||
| <app-loading-bar *ngIf="dataSource.isLoading"></app-loading-bar> | ||
| <tbody *ngIf="!dataSource.isLoading"> | ||
| <tr class="d-flex" *ngFor="let entry of dataSource.data"> | ||
| <td class="col">{{ entry.start_date | date: 'MM/dd/yyyy' }}</td> | ||
| <td class="col">{{ dateTimeOffset.parseDateTimeOffset(entry.start_date,entry.timezone_offset) }} - {{ dateTimeOffset.parseDateTimeOffset(entry.end_date,entry.timezone_offset) }}</td> | ||
| <td class="col">{{ entry.end_date | substractDate: entry.start_date }}</td> | ||
| <td class="col">{{ entry.customer_name }}</td> | ||
| <td class="col">{{ entry.project_name }}</td> | ||
| <td class="col">{{ entry.activity_name }}</td> | ||
| <td class="col"> | ||
| <button class="btn btn-sm btn-primary" data-toggle="modal" data-target="#editRecordsByDate" (click)="editEntry(entry.id)"> | ||
| <i class="fa fa-edit fa-xs"></i> | ||
| </button> | ||
| <button class="btn btn-sm btn-danger ml-2" data-toggle="modal" data-target="#deleteModal" (click)="openModal(entry)"> | ||
| <i class="fa fa-trash fa-xs"></i> | ||
| </button> | ||
| </td> | ||
| </tr> | ||
| </tbody> | ||
| </table> | ||
| <div class="table-responsive"> | ||
| <table class="table table-sm table-striped mb-0 " datatable [dtTrigger]="dtTrigger" [dtOptions]="dtOptions" *ngIf="(timeEntriesDataSource$ | async) as dataSource"> | ||
| <caption></caption> | ||
| <thead class="thead-blue"> | ||
| <tr class="d-flex"> | ||
| <th class="col">Date</th> | ||
| <th class="col">Time in - out</th> | ||
| <th class="col">Duration</th> | ||
| <th class="col">Customer</th> | ||
| <th class="col">Project</th> | ||
| <th class="col">Activity</th> | ||
| <th class="col"></th> | ||
| </tr> | ||
| </thead> | ||
| <app-loading-bar *ngIf="dataSource.isLoading"></app-loading-bar> | ||
| <tbody *ngIf="!dataSource.isLoading"> | ||
| <tr class="d-flex" *ngFor="let entry of dataSource.data"> | ||
| <td class="col">{{ entry.start_date | date: 'MM/dd/yyyy' }}</td> | ||
| <td class="col">{{ dateTimeOffset.parseDateTimeOffset(entry.start_date,entry.timezone_offset) }} - {{ dateTimeOffset.parseDateTimeOffset(entry.end_date,entry.timezone_offset) }}</td> | ||
| <td class="col">{{ entry.end_date | substractDate: entry.start_date }}</td> | ||
| <td class="col">{{ entry.customer_name }}</td> | ||
| <td class="col">{{ entry.project_name }}</td> | ||
| <td class="col">{{ entry.activity_name }}</td> | ||
| <td class="col"> | ||
| <button class="btn btn-sm btn-primary" data-toggle="modal" data-target="#editRecordsByDate" (click)="editEntry(entry.id)"> | ||
| <i class="fa fa-edit fa-xs"></i> | ||
| </button> | ||
| <button class="btn btn-sm btn-danger ml-2" data-toggle="modal" data-target="#deleteModal" (click)="openModal(entry)"> | ||
| <i class="fa fa-trash fa-xs"></i> | ||
| </button> | ||
| </td> | ||
| </tr> | ||
| </tbody> | ||
| </table> | ||
| </div> | ||
| </div> | ||
| </div> | ||
|
|
||
| <div class="modal fade" id="editRecordsByDate" tabindex="-1" role="dialog"> | ||
| <div class="modal-dialog modal-dialog-centered modal-lg" role="document"> | ||
| <div class="modal-content" cdkDrag (cdkDragEnded)="resetDraggablePosition($event)"> | ||
| <div class="modal-header"> | ||
| <h5 class="modal-title">{{ entryId ? 'Edit Entry' : 'New Entry' }}</h5> | ||
| <div> | ||
| <button class="btn shadow-none" data-bs-toggle="tooltip" title="Clean form values" (click)="detailsFields.cleanFieldsForm()"> | ||
| <em class="fa fa-eraser"> </em> | ||
| </button> | ||
| <em class="fa fa-eraser"> </em> | ||
| </button> | ||
| <button class="btn shadow-none" data-bs-toggle="tooltip" title="Drag modal" cdkDragHandle> | ||
| <em class="fa fa-grip-vertical"></em> | ||
| </button> | ||
| <em class="fa fa-grip-vertical"></em> | ||
| </button> | ||
| </div> | ||
| </div> | ||
| <div class="modal-body"> | ||
|
|
@@ -80,6 +78,5 @@ <h5 class="modal-title">{{ entryId ? 'Edit Entry' : 'New Entry' }}</h5> | |
| </div> | ||
| </div> | ||
| </div> | ||
|
|
||
| <app-dialog *ngIf="showModal" class="modal fade" id="deleteModal" tabindex="-1" role="dialog" aria-hidden="true" [body]="message" [title]="'Delete Entry'" (closeModalEvent)="removeEntry()"> | ||
| </app-dialog> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -255,4 +255,4 @@ export class TimeEntriesComponent implements OnInit, OnDestroy, AfterViewInit { | |
| }); | ||
| } | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.