mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-10 17:36:33 +08:00
Merge pull request #7336 from wandji20/wb-SCI-10455
Pre-select current user in new task designated user dropdown [SCI-10455]
This commit is contained in:
commit
ea22a3f23e
3 changed files with 7 additions and 1 deletions
|
@ -35,6 +35,7 @@
|
|||
:createUrl="createUrl"
|
||||
:projectTagsUrl="projectTagsUrl"
|
||||
:assignedUsersUrl="assignedUsersUrl"
|
||||
:currentUserId="currentUserId"
|
||||
@create="updateTable"
|
||||
@close="newModalOpen = false" />
|
||||
<EditModal v-if="editModalObject"
|
||||
|
@ -84,6 +85,7 @@ export default {
|
|||
activePageUrl: { type: String },
|
||||
archivedPageUrl: { type: String },
|
||||
currentViewMode: { type: String, required: true },
|
||||
currentUserId: { type: String, required: true },
|
||||
createUrl: { type: String, required: true },
|
||||
userRolesUrl: { type: String, required: true },
|
||||
canvasUrl: { type: String, required: true },
|
||||
|
|
|
@ -54,6 +54,7 @@
|
|||
:option-renderer="usersRenderer"
|
||||
:label-renderer="usersRenderer"
|
||||
:multiple="true"
|
||||
:value="users"
|
||||
:searchable="true"
|
||||
:placeholder="i18n.t('experiments.canvas.new_my_module_modal.assigned_users_placeholder')"
|
||||
:tagsView="true" ></SelectDropdown>
|
||||
|
@ -83,7 +84,8 @@ export default {
|
|||
props: {
|
||||
createUrl: String,
|
||||
projectTagsUrl: String,
|
||||
assignedUsersUrl: String
|
||||
assignedUsersUrl: String,
|
||||
currentUserId: { type: String, required: true }
|
||||
},
|
||||
components: {
|
||||
DateTimePicker,
|
||||
|
@ -171,6 +173,7 @@ export default {
|
|||
loadUsers() {
|
||||
axios.get(this.assignedUsersUrl).then((response) => {
|
||||
this.allUsers = response.data.data;
|
||||
this.users = [this.currentUserId];
|
||||
});
|
||||
},
|
||||
tagsRenderer(tag) {
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
active-page-url="<%= my_modules_path(experiment_id: @experiment, view_mode: :active) %>"
|
||||
archived-page-url="<%= my_modules_path(experiment_id: @experiment, view_mode: :archived) %>"
|
||||
current-view-mode="<%= view_mode %>"
|
||||
current-user-id="<%= current_user.id %>"
|
||||
assigned-users-url="<%= assigned_users_experiment_path(@experiment) %>"
|
||||
users-filter-url="<%= users_filter_projects_path %>"v
|
||||
user-roles-url="<%= user_roles_projects_path %>"
|
||||
|
|
Loading…
Reference in a new issue