-
Notifications
You must be signed in to change notification settings - Fork 1
fix: TTA-29 Selecting multiple time entries and show total of hours o… #896
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
fix: TTA-29 Selecting multiple time entries and show total of hours o… #896
Conversation
…f selected entries
Codecov Report
@@ Coverage Diff @@
## master #896 +/- ##
==========================================
+ Coverage 97.48% 97.65% +0.16%
==========================================
Files 107 112 +5
Lines 2430 2562 +132
Branches 203 213 +10
==========================================
+ Hits 2369 2502 +133
+ Misses 23 21 -2
- Partials 38 39 +1
Continue to review full report at Codecov.
|
[infrastructure/][stage] Terraform Plan 📖
|
[infrastructure/][prod] Terraform Plan 📖
|
[infrastructure/][stage] Terraform Plan 📖
|
[infrastructure/][prod] Terraform Plan 📖
|
[infrastructure/][stage] Terraform Plan 📖
|
[infrastructure/][prod] Terraform Plan 📖
|
this.totalTimeSelected = this.totalTimeSelected.subtract(duration); | ||
} | ||
let daysTotalInHours = this.totalTimeSelected.days() * 24; | ||
this.resultSumEntriesSelected.hours = this.totalTimeSelected.hours() + daysTotalInHours; |
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.
daysTotalInHours is never reassigned, use 'const' instead of 'let'.
sumHoursEntriesSelected(entry: Entry, checked: boolean){ | ||
this.resultSumEntriesSelected = new TotalHours(); | ||
const duration = moment.duration(moment(entry.end_date).diff(moment(entry.start_date))); | ||
if(checked){ |
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.
Can change this code section? , for example:
this.totalTimeSelected = checked ? this.totalTimeSelected.add(duration) : this.totalTimeSelected.subtract(duration);
[infrastructure/][stage] Terraform Plan 📖
|
[infrastructure/][prod] Terraform Plan 📖
|
[infrastructure/][stage] Terraform Plan 📖
|
[infrastructure/][prod] Terraform Plan 📖
|
Kudos, SonarCloud Quality Gate passed!
|
[infrastructure/][stage] Terraform Plan 📖
|
[infrastructure/][prod] Terraform Plan 📖
|
…f selected entries