Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
vitamui-pr-pastis
Manage
Activity
Members
Labels
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Operate
Environments
Terraform modules
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
dad
vitamui-pr-pastis
Commits
49f80413
Commit
49f80413
authored
4 years ago
by
Julien CORNILLE
Browse files
Options
Downloads
Patches
Plain Diff
[FIX FOX-363] Initialize tenantsList with data already retrieved
parent
4d573fc6
No related branches found
Branches containing commit
No related tags found
1 merge request
!1
Feature/design/1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ui/ui-frontend/projects/identity/src/app/customer/customer.data.service.ts
+13
-4
13 additions, 4 deletions
...ojects/identity/src/app/customer/customer.data.service.ts
with
13 additions
and
4 deletions
ui/ui-frontend/projects/identity/src/app/customer/customer.data.service.ts
+
13
−
4
View file @
49f80413
...
...
@@ -35,21 +35,30 @@
* knowledge of the CeCILL-C license and that you accept its terms.
*/
import
{
Injectable
}
from
'
@angular/core
'
;
import
{
Observable
,
Subject
}
from
'
rxjs
'
;
import
{
BehaviorSubject
,
Observable
}
from
'
rxjs
'
;
import
{
Tenant
}
from
'
ui-frontend-common
'
;
@
Injectable
()
export
class
CustomerDataService
{
private
tenantsUpdatedSource
=
new
Subject
<
Tenant
[]
>
();
private
tenantsUpdatedSource
=
new
Behavior
Subject
<
Tenant
[]
>
(
[]
);
tenants
:
Tenant
[]
=
[];
// tslint:disable-next-line: variable-name
private
_tenants
:
Tenant
[]
=
[];
get
tenants
():
Tenant
[]
{
return
this
.
_tenants
;
}
set
tenants
(
tenant
:
Tenant
[])
{
this
.
_tenants
=
tenant
;
}
constructor
()
{
}
addTenants
(
tenants
:
Tenant
[])
{
this
.
tenants
=
Array
.
from
(
new
Set
([...
this
.
tenants
,
...
tenants
]));
this
.
_
tenants
=
Array
.
from
(
new
Set
([...
this
.
tenants
,
...
tenants
]));
this
.
tenantsUpdatedSource
.
next
(
this
.
tenants
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
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!
Save comment
Cancel
Please
register
or
sign in
to comment