Skip to content
Snippets Groups Projects
Commit fc9e578b authored by Chris Steinmann's avatar Chris Steinmann
Browse files

#301 move btn, fix compilation error

parent 4b43120f
No related branches found
No related tags found
2 merge requests!314Merging for 0.8.1 Hotfix,!286Resolve "Transektsteckbrief: Zuweisung/Änderungsmöglichkeit eines Nutzers zum Transekt und seine Rolle zum Transekt"
Pipeline #421040 passed
......@@ -332,7 +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 = userRoles.join('","');
const userRolesString = userRoles.join('","');
const query = `mutation {
updateUser (
input: {
......
......@@ -375,7 +375,8 @@
}
},
"transectProfile": {
"assignUsersOrRoles": "Nutzer oder Rollen zum Transekt zuweisen",
"assignUsers": "Nutzer zum Transekt zuweisen",
"assignRoles": "Rollen zum Transekt-Benutzern zuweisen",
"dialogTitle": "Zuweisung von Nutzern oder Rollen",
"chooseUser": "Nutzer zuweisen",
"chooseRole": "Rolle zuweisen",
......
......@@ -375,7 +375,8 @@
}
},
"transectProfile": {
"assignUsersOrRoles": "Assign users or roles",
"assignUsers": "Assign users to transect",
"assignRoles": "Assign roles to transect users",
"dialogTitle": "Assign users or roles",
"chooseUser": "Assign user",
"chooseRole": "Assign role",
......
......@@ -86,7 +86,7 @@ export default class TransectManagement extends Vue {
}
}
private assignUsersAndRolesToTransect() {
private assignUsersBtn() {
this.showAssignDialog = true;
this.isLoading = true;
this.allUsers = [];
......@@ -124,6 +124,11 @@ export default class TransectManagement extends Vue {
this.failAlert = true;
}
private hideAlerts() {
this.confirmationAlert = false;
this.failAlert = false;
}
private isValidUserHistoryData(response: AxiosResponse) {
return response && response.data && response.data.data &&
response.data.data.transectUserHistories && response.data.data.transectUserHistories.collection;
......@@ -163,6 +168,7 @@ export default class TransectManagement extends Vue {
}
this.delay(2000).then(() => {
this.showAssignDialog = false;
this.hideAlerts();
});
});
}
......@@ -185,6 +191,7 @@ export default class TransectManagement extends Vue {
}
this.delay(2000).then(() => {
this.showAssignDialog = false;
this.hideAlerts();
});
});
}
......
......@@ -4,6 +4,14 @@
<div class="text-center">
<v-progress-circular v-show="isLoading" color="primary" indeterminate/>
</div>
<v-row>
<v-col cols="8"/>
<v-col cols="4">
<v-btn @click="assignUsersBtn()" width="100%" :disabled="isLoading">
{{ $t('transectProfile.assignUsers') }}
</v-btn>
</v-col>
</v-row>
<v-row>
<v-container fluid>
<v-card width="100%" disabled>
......@@ -49,14 +57,6 @@
</v-card>
</v-container>
</v-row>
<v-row>
<v-col cols="7"/>
<v-col cols="5">
<v-btn @click="assignUsersAndRolesToTransect()" width="100%" :disabled="isLoading">
{{ $t('transectProfile.assignUsersOrRoles') }}
</v-btn>
</v-col>
</v-row>
<v-row>
<v-container fluid>
<v-card width="100%" disabled>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment