Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Client
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
web-et-numerique
Factory
Resin
Client
Commits
5ae89245
Commit
5ae89245
authored
2 years ago
by
Bastien DUMONT
Browse files
Options
Downloads
Patches
Plain Diff
feat(pin-structures): pin already selected structures in search
parent
ce2cd3ea
No related branches found
Branches containing commit
No related tags found
Tags containing commit
4 merge requests
!418
V2.1.0
,
!400
V2.0
,
!276
sort structures
,
!230
V2.0
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
package-lock.json
+0
-19236
0 additions, 19236 deletions
package-lock.json
src/app/form/form-view/profile-form/profile-structure-choice/profile-structure-choice.component.ts
+8
-4
8 additions, 4 deletions
...le-structure-choice/profile-structure-choice.component.ts
with
8 additions
and
19240 deletions
package-lock.json
+
0
−
19236
View file @
5ae89245
This diff is collapsed.
Click to expand it.
src/app/form/form-view/profile-form/profile-structure-choice/profile-structure-choice.component.ts
+
8
−
4
View file @
5ae89245
...
@@ -72,15 +72,19 @@ export class ProfileStructureChoiceComponent implements OnInit {
...
@@ -72,15 +72,19 @@ export class ProfileStructureChoiceComponent implements OnInit {
structure
.
alreadySelected
=
true
;
structure
.
alreadySelected
=
true
;
}
}
});
});
if
(
this
.
searchString
===
''
)
{
structures
.
sort
((
a
,
b
)
=>
a
.
structureName
.
localeCompare
(
b
.
structureName
));
this
.
structures
=
this
.
sortStructures
(
structures
);
}
this
.
structures
=
structures
;
this
.
isAlreadySearching
=
false
;
this
.
isAlreadySearching
=
false
;
});
});
}
}
}
}
private
sortStructures
(
structures
:
Structure
[])
{
if
(
this
.
searchString
===
''
)
structures
.
sort
((
a
,
b
)
=>
a
.
structureName
.
localeCompare
(
b
.
structureName
));
structures
.
sort
((
a
,
b
)
=>
Number
(
b
.
alreadySelected
)
-
Number
(
a
.
alreadySelected
));
return
structures
;
}
public
addStructure
():
void
{
public
addStructure
():
void
{
this
.
createStructure
.
emit
(
this
.
searchString
);
this
.
createStructure
.
emit
(
this
.
searchString
);
}
}
...
...
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