Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
fd57fe64
Commit
fd57fe64
authored
2 years ago
by
piotr.kupczyk@id.ethz.ch
Browse files
Options
Downloads
Patches
Plain Diff
SSDM-13282 : Admin UI - improve error handling
parent
9b9a1c07
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!40
SSDM-13578 : 2PT : Database and V3 Implementation - include the new AFS "free"...
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
openbis_ng_ui/src/js/components/types/form/entitytype/EntityTypeFormControllerChange.js
+24
-19
24 additions, 19 deletions
...s/types/form/entitytype/EntityTypeFormControllerChange.js
with
24 additions
and
19 deletions
openbis_ng_ui/src/js/components/types/form/entitytype/EntityTypeFormControllerChange.js
+
24
−
19
View file @
fd57fe64
...
@@ -243,27 +243,32 @@ export default class EntityTypeFormControllerChange extends PageControllerChange
...
@@ -243,27 +243,32 @@ export default class EntityTypeFormControllerChange extends PageControllerChange
)
{
)
{
const
{
object
,
facade
}
=
this
.
controller
const
{
object
,
facade
}
=
this
.
controller
facade
.
loadTypeUsages
(
object
).
then
(
typeUsages
=>
{
facade
this
.
context
.
setState
(
state
=>
{
.
loadTypeUsages
(
object
)
const
index
=
state
.
properties
.
findIndex
(
.
then
(
typeUsages
=>
{
property
=>
property
.
id
===
newProperty
.
id
this
.
context
.
setState
(
state
=>
{
)
const
index
=
state
.
properties
.
findIndex
(
if
(
index
===
-
1
)
{
property
=>
property
.
id
===
newProperty
.
id
return
{}
)
}
if
(
index
===
-
1
)
{
const
newProperties
=
Array
.
from
(
state
.
properties
)
return
{}
newProperties
[
index
]
=
{
...
newProperties
[
index
],
initialValueForExistingEntities
:
{
...
newProperties
[
index
].
initialValueForExistingEntities
,
visible
:
typeUsages
>
0
}
}
}
const
newProperties
=
Array
.
from
(
state
.
properties
)
return
{
newProperties
[
index
]
=
{
properties
:
newProperties
...
newProperties
[
index
],
}
initialValueForExistingEntities
:
{
...
newProperties
[
index
].
initialValueForExistingEntities
,
visible
:
typeUsages
>
0
}
}
return
{
properties
:
newProperties
}
})
})
.
catch
(
error
=>
{
AppController
.
getInstance
().
errorChange
(
error
)
})
})
})
}
else
{
}
else
{
_
.
assign
(
newProperty
,
{
_
.
assign
(
newProperty
,
{
initialValueForExistingEntities
:
{
initialValueForExistingEntities
:
{
...
...
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