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
aff8cf85
Commit
aff8cf85
authored
4 years ago
by
Jonas Zohren
Browse files
Options
Downloads
Patches
Plain Diff
Added formula rendering
parent
8baa1b6f
Branches
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#15655
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
+11
-1
11 additions, 1 deletion
src/App.svelte
src/FormulaE.svelte
+45
-0
45 additions, 0 deletions
src/FormulaE.svelte
src/FormulaS.svelte
+45
-0
45 additions, 0 deletions
src/FormulaS.svelte
with
101 additions
and
1 deletion
src/App.svelte
+
11
−
1
View file @
aff8cf85
<script
lang=
"ts"
>
<script
lang=
"ts"
>
import
{
element
}
from
"
svelte/internal
"
;
import
{
element
}
from
"
svelte/internal
"
;
import
type
{
WorkPackage
}
from
"
./estimator
"
;
import
type
{
WorkPackage
}
from
"
./estimator
"
;
import
FormulaE
from
"
./FormulaE.svelte
"
;
import
FormulaS
from
"
./FormulaS.svelte
"
;
import
RowWorkItem
from
"
./RowWorkItem.svelte
"
;
import
RowWorkItem
from
"
./RowWorkItem.svelte
"
;
import
SumRow
from
"
./SumRow.svelte
"
;
import
SumRow
from
"
./SumRow.svelte
"
;
...
@@ -14,6 +16,8 @@ import type { WorkPackage } from "./estimator";
...
@@ -14,6 +16,8 @@ import type { WorkPackage } from "./estimator";
}
}
$
:
dataJson
=
JSON
.
stringify
(
workPackages
,
null
,
2
)
$
:
dataJson
=
JSON
.
stringify
(
workPackages
,
null
,
2
)
let
jsonPasteArea
=
""
;
let
jsonPasteArea
=
""
;
</script>
</script>
<main>
<main>
...
@@ -46,6 +50,11 @@ import type { WorkPackage } from "./estimator";
...
@@ -46,6 +50,11 @@ import type { WorkPackage } from "./estimator";
<
SumRow
{
workPackages
}
u
=
{
u
}
r
=
{
r
}
><
/SumRow
>
<
SumRow
{
workPackages
}
u
=
{
u
}
r
=
{
r
}
><
/SumRow
>
<
/tbody
>
<
/tbody
>
<
/table
>
<
/table
>
<
FormulaE
workPackages
=
{
workPackages
}
r
=
{
r
}
/
>
<
br
>
<
FormulaS
workPackages
=
{
workPackages
}
u
=
{
u
}
/
>
<
details
>
<
details
>
<
summary
>
<
summary
>
Debug
:
Show
Input
as
JSON
Debug
:
Show
Input
as
JSON
...
@@ -83,3 +92,4 @@ import type { WorkPackage } from "./estimator";
...
@@ -83,3 +92,4 @@ import type { WorkPackage } from "./estimator";
<a
href=
"https://gitlab.fachschaften.org/jfowl/swk-project-effort-estimation"
<a
href=
"https://gitlab.fachschaften.org/jfowl/swk-project-effort-estimation"
>
SourceCode
</a
>
SourceCode
</a
>
>
This diff is collapsed.
Click to expand it.
src/FormulaE.svelte
0 → 100644
+
45
−
0
View file @
aff8cf85
<script
lang=
"ts"
>
import
type
{
WorkPackage
}
from
"
./estimator
"
;
export
let
workPackages
:
WorkPackage
[]
export
let
r
:
number
;
$
:
nonEmptyWorkPackages
=
workPackages
.
filter
(
wp
=>
wp
.
a
!==
null
&&
wp
.
b
!==
null
)
$
:
lastElementIndex
=
nonEmptyWorkPackages
.
length
-
1
;
</script>
<style>
div
.formula-e
{
padding-top
:
10px
;
}
</style>
<div
class=
"formula-e"
>
<math
xmlns=
"http://www.w3.org/1998/Math/MathML"
>
<mrow>
<mo>
E(x)
</mo>
<mo>
=
</mo>
{
#each
nonEmptyWorkPackages
as
workPackage
,
i
}
<mfrac>
<mrow>
<mo>
{
workPackage
.
b
}
</mo>
<mo>
+
</mo>
{
#if
typeof
workPackage
.
c
===
'
number
'
}
<mo>
{
r
}
</mo>
<mo>
⋅
</mo>
<mo>
{
workPackage
.
c
}
</mo>
<mo>
+
</mo>
{
/if
}
<mo>
{
workPackage
.
a
}
</mo>
</mrow>
<mrow>
<mo>
{
typeof
workPackage
.
c
===
'
number
'
?
'
6
'
:
'
2
'
}
</mo>
</mrow>
</mfrac>
{
#if
i
<
lastElementIndex
}
<mo>
+
</mo>
{
/if
}
{
/each
}
</mrow>
</math>
</div>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/FormulaS.svelte
0 → 100644
+
45
−
0
View file @
aff8cf85
<script
lang=
"ts"
>
import
type
{
WorkPackage
}
from
"
./estimator
"
;
export
let
workPackages
:
WorkPackage
[]
export
let
u
:
number
;
$
:
nonEmptyWorkPackages
=
workPackages
.
filter
(
wp
=>
wp
.
a
!==
null
&&
wp
.
b
!==
null
)
$
:
lastElementIndex
=
nonEmptyWorkPackages
.
length
-
1
;
</script>
<style>
div
.formula-s
{
padding-bottom
:
10px
;
}
</style>
<div
class=
"formula-s"
>
<math
xmlns=
"http://www.w3.org/1998/Math/MathML"
>
<mrow>
<mo>
S(x)
</mo>
<mo>
=
</mo>
<msqrt>
{
#each
nonEmptyWorkPackages
as
workPackage
,
i
}
<msup>
<mrow>
<mo>
(
</mo>
<mfrac>
<mrow>
<mo>
{
workPackage
.
b
}
</mo>
<mo>
-
</mo>
<mo>
{
workPackage
.
a
}
</mo>
</mrow>
<mo>
{
u
}
</mo>
</mfrac>
<mo>
)
</mo>
</mrow>
<mn>
2
</mn>
</msup>
{
#if
i
<
lastElementIndex
}
<mo>
+
</mo>
{
/if
}
{
/each
}
</msqrt>
</mrow>
</math>
</div>
\ No newline at end of file
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