Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Sebastian Gottschalk
bmdl-expert-modeler
Commits
3ccc53b2
Commit
3ccc53b2
authored
Nov 08, 2021
by
Alexander Philipp Nowosad
Browse files
Fix company model expert knowledge can not be selected
parent
5faa35a3
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/app/canvas/company-model/company-model-select-expert-knowledge/company-model-select-expert-knowledge.component.ts
View file @
3ccc53b2
...
...
@@ -38,7 +38,7 @@ export class CompanyModelSelectExpertKnowledgeComponent
private
router
:
Router
)
{}
ngOnInit
()
{
ngOnInit
()
:
void
{
this
.
querySubscription
=
this
.
route
.
queryParamMap
.
subscribe
((
paramMap
)
=>
{
void
this
.
loadBmProcess
(
paramMap
.
get
(
'
bmProcessId
'
));
});
...
...
@@ -47,7 +47,7 @@ export class CompanyModelSelectExpertKnowledgeComponent
});
}
ngOnDestroy
()
{
ngOnDestroy
()
:
void
{
if
(
this
.
querySubscription
)
{
this
.
querySubscription
.
unsubscribe
();
}
...
...
@@ -56,12 +56,12 @@ export class CompanyModelSelectExpertKnowledgeComponent
}
}
async
loadCompanyModel
(
companyModelId
:
string
)
{
async
loadCompanyModel
(
companyModelId
:
string
)
:
Promise
<
void
>
{
this
.
companyModel
=
await
this
.
companyModelService
.
get
(
companyModelId
);
await
this
.
loadExpertModels
(
companyModelId
);
}
async
loadBmProcess
(
bmProcessId
:
string
)
{
async
loadBmProcess
(
bmProcessId
:
string
)
:
Promise
<
void
>
{
this
.
bmProcess
=
await
this
.
bmProcessService
.
get
(
bmProcessId
);
}
...
...
@@ -73,7 +73,7 @@ export class CompanyModelSelectExpertKnowledgeComponent
]);
}
async
selectExpertModel
()
{
async
selectExpertModel
()
:
Promise
<
void
>
{
await
this
.
mergeService
.
selectExpertModel
(
this
.
companyModel
.
_id
,
this
.
selectedExpertModelForm
.
value
.
expertModelId
...
...
@@ -82,7 +82,7 @@ export class CompanyModelSelectExpertKnowledgeComponent
await
this
.
loadExpertModels
(
this
.
companyModel
.
_id
);
}
async
unselectExpertModel
(
expertModelId
:
string
)
{
async
unselectExpertModel
(
expertModelId
:
string
)
:
Promise
<
void
>
{
await
this
.
mergeService
.
unselectExpertModel
(
this
.
companyModel
.
_id
,
expertModelId
...
...
@@ -90,7 +90,7 @@ export class CompanyModelSelectExpertKnowledgeComponent
await
this
.
loadExpertModels
(
this
.
companyModel
.
_id
);
}
private
async
loadExpertModels
(
companyModelId
:
string
)
{
private
async
loadExpertModels
(
companyModelId
:
string
)
:
Promise
<
void
>
{
await
this
.
loadSelectedExpertModels
(
companyModelId
);
await
this
.
loadUnselectedExpertModels
(
companyModelId
);
}
...
...
@@ -112,7 +112,7 @@ export class CompanyModelSelectExpertKnowledgeComponent
this
.
unselectedExpertModelList
=
result
.
filter
((
model
)
=>
model
.
domains
?
model
.
domains
.
some
((
domain
)
=>
this
.
bmProcess
.
domains
.
includes
(
domain
)
this
.
bmProcess
.
domains
.
some
((
d
)
=>
d
.
_id
===
domain
.
_id
)
)
:
false
);
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment