Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
C3
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Emil Svevar
C3
Commits
de13e2c1
Commit
de13e2c1
authored
1 year ago
by
Erik Bertilsson
Browse files
Options
Downloads
Plain Diff
Merge branch 'dev' of
ssh://gitlab.liu.se/emisv011/c3
into dev
parents
07296c23
4b51b392
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
client/homePage.ts
+20
-2
20 additions, 2 deletions
client/homePage.ts
client/profilePage.ts
+1
-1
1 addition, 1 deletion
client/profilePage.ts
client/projectPage/projectPageA.ts
+2
-5
2 additions, 5 deletions
client/projectPage/projectPageA.ts
with
23 additions
and
8 deletions
client/homePage.ts
+
20
−
2
View file @
de13e2c1
...
...
@@ -37,6 +37,8 @@ interface Project {
let
myIdeaCards
:
{
[
key
:
number
]:
IdeaCard
}
=
{};
const
cache
:
{[
key
:
string
]:
any
[]}
=
{};
class
IdeaCard
{
private
header
:
string
;
private
department
:
string
;
...
...
@@ -323,7 +325,9 @@ export async function loadPage(listenersLoaded: boolean) {
}
const
projectContainer
=
document
.
getElementById
(
"
project-container
"
);
if
(
projectContainer
)
{
await
getProjects
(
projectContainer
,
listenersLoaded
,
user
.
id
);
const
startGetProjects
=
performance
.
now
();
getProjects
(
projectContainer
,
listenersLoaded
,
user
.
id
);
console
.
log
(
`getProjects duration:
${
performance
.
now
()
-
startGetProjects
}
ms`
)
}
console
.
log
(
"
innan
"
);
const
departmentContainer
=
document
.
getElementById
(
...
...
@@ -490,7 +494,19 @@ export async function getProjects(
listenersLoaded
:
boolean
,
userHsaId
:
string
)
{
const
data
=
await
getImprovementWorksForUser
(
userHsaId
);
let
data
:
any
[]
=
[];
if
(
cache
[
userHsaId
])
{
const
startGetCachedProjects
=
performance
.
now
();
data
=
cache
[
userHsaId
];
console
.
log
(
`getCachedProjects duration:
${
performance
.
now
()
-
startGetCachedProjects
}
ms`
);
}
else
{
const
startGetImprovementWorksForUser
=
performance
.
now
();
data
=
await
getImprovementWorksForUser
(
userHsaId
);
cache
[
userHsaId
]
=
data
;
console
.
log
(
`getImprovementWorksForUser duration:
${
performance
.
now
()
-
startGetImprovementWorksForUser
}
ms`
);
}
let
id
=
0
;
data
.
forEach
(
async
(
project
)
=>
{
let
title
=
project
.
name
;
...
...
@@ -511,7 +527,9 @@ export async function getProjects(
dateStarted
);
projectCards
[
i
]
=
card
;
const
startGenerateHTML
=
performance
.
now
();
let
cardHTML
=
card
.
generateHTML
();
console
.
log
(
`GenerateHTML duration
${
performance
.
now
()
-
startGenerateHTML
}
ms`
);
let
div
=
document
.
createElement
(
"
div
"
);
div
.
className
=
"
homePageProjectCardDiv
"
;
// Set the class name(s) here
div
.
innerHTML
=
cardHTML
;
...
...
This diff is collapsed.
Click to expand it.
client/profilePage.ts
+
1
−
1
View file @
de13e2c1
...
...
@@ -259,7 +259,7 @@ async function createNewIdeaCard(
}
const
projectContainer
=
document
.
getElementById
(
"
project-container
"
);
if
(
projectContainer
)
{
await
getProjects
(
projectContainer
,
listenersLoaded
,
user
.
id
);
getProjects
(
projectContainer
,
listenersLoaded
,
user
.
id
);
}
})
...
...
This diff is collapsed.
Click to expand it.
client/projectPage/projectPageA.ts
+
2
−
5
View file @
de13e2c1
...
...
@@ -187,20 +187,17 @@ async function checkInputFields(projectId: string, formId: string) {
}
function
loadInitiateAndFinalizeBtn
(
projectId
:
string
,
completed
:
boolean
)
{
alert
(
"
hej
"
);
if
(
!
completed
)
{
alert
(
"
not completed
"
);
const
nolanModelElement
=
document
.
getElementById
(
"
projectPageNolandsModel
"
)
as
HTMLElement
;
//Creates buttons with classname, id, attribute and text
const
finalizeButton
=
document
.
createElement
(
"
button
"
);
const
iterationButton
=
document
.
createElement
(
"
button
"
);
if
(
nolanModelElement
)
{
alert
(
"
finds element
"
);
finalizeButton
.
id
=
"
toCurrentProjects
"
;
iterationButton
.
id
=
"
toCurrentProjects
"
;
finalizeButton
.
classList
.
add
(
"
btn
"
,
"
btn-
prim
ary
"
);
iterationButton
.
classList
.
add
(
"
btn
"
,
"
btn-
prim
ary
"
);
finalizeButton
.
classList
.
add
(
"
btn
"
,
"
btn-
second
ary
"
);
iterationButton
.
classList
.
add
(
"
btn
"
,
"
btn-
second
ary
"
);
iterationButton
.
setAttribute
(
'
role
'
,
'
button
'
);
finalizeButton
.
setAttribute
(
'
role
'
,
'
button
'
);
finalizeButton
.
textContent
=
'
Avsluta Förbättringsarbete
'
;
...
...
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