-
Notifications
You must be signed in to change notification settings - Fork 1
fix: TT-282 added conditions in method onSubmit and added array of activities in component project-list-hover #700
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #700 +/- ##
==========================================
+ Coverage 91.87% 95.28% +3.40%
==========================================
Files 50 104 +54
Lines 517 2098 +1581
Branches 32 157 +125
==========================================
+ Hits 475 1999 +1524
- Misses 33 56 +23
- Partials 9 43 +34
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good Job Kevin 💥 , just a couple of things to say:
The main bug is solved with this PR, however, I think that the transition of putting a default activity is not transparent, for example, once you do Clock in and if by default you assign the first activity of the list of activities, the element select activities can take the focus, it is something that Fanny mentioned in the review of this bug, analyze if it is possible or it is not too complicated to make that behavior so that it can be implemented.
And please check my comments in the code.
@@ -7,6 +7,7 @@ | |||
formControlName="activity_id" | |||
[class.is-invalid]="activity_id.invalid && activity_id.touched" | |||
required> | |||
<option value="" selected="selected"></option> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -88,6 +99,7 @@ export class ProjectListHoverComponent implements OnInit, OnDestroy { | |||
start_date: new Date().toISOString(), | |||
timezone_offset: new Date().getTimezoneOffset(), | |||
technologies: [], | |||
activity_id: this.activities[0].id, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this index you can use
import _ from 'lodash';
activity_id: _.head(this.activities.id)
OR activity_id: _.head(this.activities).id
Try with this options.
…tivities in component project-list-hover
f9e00fe
to
f2dfb96
Compare
Kudos, SonarCloud Quality Gate passed!
|
Problem
If somebody added a new time entry and if in the DB not existing register about of the information the attribute activity_id. The application can not show the information about time entry and the reports, and return: the data can not be loaded.
The solution
When the user selects a new project, in the panel time clock, to default send an activity_id, and the DB.