Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frontend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
Helmholtz Centre for Environmental Research – UFZ
IT
RDM
BioMe
tmd
frontend
Commits
4b43120f
Commit
4b43120f
authored
3 years ago
by
Chris Steinmann
Browse files
Options
Downloads
Patches
Plain Diff
#301
fix query errors
parent
53fde0eb
No related branches found
No related tags found
2 merge requests
!314
Merging for 0.8.1 Hotfix
,
!286
Resolve "Transektsteckbrief: Zuweisung/Änderungsmöglichkeit eines Nutzers zum Transekt und seine Rolle zum Transekt"
Pipeline
#421039
failed
3 years ago
Stage: build
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/src/helper/transect.service.ts
+2
-8
2 additions, 8 deletions
app/src/helper/transect.service.ts
app/src/views/TransectProfile.ts
+5
-5
5 additions, 5 deletions
app/src/views/TransectProfile.ts
with
7 additions
and
13 deletions
app/src/helper/transect.service.ts
+
2
−
8
View file @
4b43120f
...
...
@@ -302,10 +302,7 @@ export class TransectService {
* @param userIds ids of users that should be assigned to this transect (in a string array)
*/
public
updateUsersForTransect
=
async
(
transectId
:
string
,
userIds
:
string
[])
=>
{
let
userString
=
""
;
for
(
const
userId
of
userIds
)
{
userString
=
userString
+
userId
+
"
,
"
;
}
const
userString
=
userIds
.
join
(
'
","
'
);
const
query
=
`mutation {
updateTransect(
input: {
...
...
@@ -335,10 +332,7 @@ export class TransectService {
* @param userRoles roles that should be assigned to this user (in a string array)
*/
public
updateUserRolesForTransect
=
async
(
userId
:
string
,
userRoles
:
string
[])
=>
{
let
userRolesString
=
""
;
for
(
const
userId
of
userRoles
)
{
userRolesString
=
userRolesString
+
userId
+
"
,
"
;
}
let
userRolesString
=
userRoles
.
join
(
'
","
'
);
const
query
=
`mutation {
updateUser (
input: {
...
...
This diff is collapsed.
Click to expand it.
app/src/views/TransectProfile.ts
+
5
−
5
View file @
4b43120f
...
...
@@ -150,12 +150,12 @@ export default class TransectManagement extends Vue {
for
(
const
user
of
this
.
selectedUsers
)
{
userIds
.
push
(
user
.
toString
());
}
return
await
TransectService
.
getInstance
().
updateUsersForTransect
(
transectId
,
userIds
)
return
await
TransectService
.
getInstance
().
updateUsersForTransect
(
"
/transects/
"
+
transectId
,
userIds
)
.
then
((
response
:
AxiosResponse
)
=>
{
const
isValidReponse
=
response
&&
response
.
data
&&
response
.
data
.
data
;
if
(
isValidReponse
)
{
if
(
response
.
data
.
data
.
errors
)
{
this
.
showFailAlert
(
response
.
data
.
data
.
errors
[
0
]);
if
(
response
.
data
.
errors
)
{
this
.
showFailAlert
(
response
.
data
.
errors
[
0
]
.
message
);
}
else
{
this
.
showConfirmationAlert
();
this
.
requestTransectProfileData
();
...
...
@@ -176,8 +176,8 @@ export default class TransectManagement extends Vue {
.
then
((
response
:
AxiosResponse
)
=>
{
const
isValidReponse
=
response
&&
response
.
data
&&
response
.
data
.
data
;
if
(
isValidReponse
)
{
if
(
response
.
data
.
data
.
errors
)
{
this
.
showFailAlert
(
response
.
data
.
data
.
errors
[
0
]);
if
(
response
.
data
.
errors
)
{
this
.
showFailAlert
(
response
.
data
.
errors
[
0
]
.
message
);
}
else
{
this
.
showConfirmationAlert
();
this
.
requestTransectProfileData
();
...
...
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