Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWK Project Effort Estimation
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
oh14.dev
SWK Project Effort Estimation
Commits
1da77325
Commit
1da77325
authored
4 years ago
by
Jonas Zohren
Browse files
Options
Downloads
Patches
Plain Diff
Pass s & u to sumrow
parent
f8eb6f42
Branches
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#15561
passed
4 years ago
Stage: test
Stage: deploy
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/App.svelte
+1
-1
1 addition, 1 deletion
src/App.svelte
src/SumRow.svelte
+2
-1
2 additions, 1 deletion
src/SumRow.svelte
src/estimator.ts
+8
-0
8 additions, 0 deletions
src/estimator.ts
with
11 additions
and
2 deletions
src/App.svelte
+
1
−
1
View file @
1da77325
...
...
@@ -36,7 +36,7 @@ import type { WorkPackage } from "./estimator";
{
#each
workPackages
as
workPackage
,
i
(
i
)
}
<RowWorkItem
bind:a=
{
workPackage
.
a
}
bind:b=
{
workPackage
.
b
}
bind:c=
{
workPackage
.
c
}
u=
{
u
}
r=
{
r
}
></RowWorkItem>
{
/each
}
<SumRow
{
workPackages
}
>
</SumRow>
<SumRow
{
workPackages
}
u=
{
u
}
r=
{
r
}
>
</SumRow>
</tbody>
</table>
<details>
...
...
This diff is collapsed.
Click to expand it.
src/SumRow.svelte
+
2
−
1
View file @
1da77325
<script
lang=
"ts"
>
import
type
{
WorkPackage
}
from
"
./estimator
"
;
import
{
calculateSSum
,
calculateESum
}
from
'
./estimator
'
;
import
{
calculateSSum
,
calculateESum
,
calculateVSum
}
from
'
./estimator
'
;
import
{
roundOne
,
sumIgnoreNonNumbers
}
from
"
./utils
"
;
export
let
workPackages
:
WorkPackage
[]
...
...
@@ -26,5 +26,6 @@
<td
class=
"tg-0lax"
>
</td>
<td
class=
"tg-0lax"
>
∑
{
roundOne
(
calculateVSum
(
workPackages
,
u
))
}
</td>
</tr>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/estimator.ts
+
8
−
0
View file @
1da77325
...
...
@@ -66,3 +66,11 @@ export function calculateESum(workPackages: WorkPackage[], r: number): number {
.
map
((
workPackage
)
=>
calculateE
(
workPackage
,
r
))
);
}
export
function
calculateVSum
(
workPackages
:
WorkPackage
[],
u
:
number
):
number
{
return
sumIgnoreNonNumbers
(
workPackages
.
filter
(({
a
,
b
})
=>
typeof
a
===
"
number
"
&&
typeof
b
===
"
number
"
)
.
map
((
workPackage
)
=>
calculateV
(
workPackage
,
u
))
);
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment