Skip to content
Snippets Groups Projects
Commit 0f6c722d authored by !! Julian Keck (old Account; do not use) !!'s avatar !! Julian Keck (old Account; do not use) !! :ghost:
Browse files

UPD allow joining groups from cntl-tab

Closes #774
parent 8b0939ea
No related branches found
No related tags found
No related merge requests found
......@@ -40,6 +40,9 @@
variant="success">
{{ $t('system.member') }}
</b-badge>
<b-badge @click="join_group(grp.group_name)" v-if="grp.group_name in groups && groups[grp.group_name].is_admin && !groups[grp.group_name].is_own" class="ml-1">
<NetvsIcon icon="group_join" />
</b-badge>
<b-badge class="ml-1" v-if="groups[grp.group_name] && groups[grp.group_name].description"
variant="warning">
<span :title="$t('system.description')"><NetvsIcon icon="info" class="mr-1" />{{ groups[grp.group_name].description }}</span>
......@@ -96,6 +99,11 @@
</b-td>
</b-tr>
</b-table-simple>
<APIObjectDBEditor modal_id="grp_join_modal" object_function="create"
object_fq_name="cntl.mgr2group"
:presets="db_editor_presets"
:non_optionals_order="db_editor_non_optionals_order"
object_title="" />
</Loading>
</template>
......@@ -106,10 +114,11 @@ import OUMgrTreeEntry from '@/components/OUMgrTreeEntry.vue'
import Loading from '@/components/Loading.vue'
import NetvsIcon from '@/icons/NETVSIcon.vue'
import MgrLine from '@/components/MgrLine.vue'
import APIObjectDBEditor from '@/components/db-editor/APIObjectDBEditor.vue'
export default {
name: 'NetDocBCDDetails',
components: { MgrLine, NetvsIcon, OUMgrTreeEntry, Loading },
name: 'BCDRights',
components: { APIObjectDBEditor, MgrLine, NetvsIcon, OUMgrTreeEntry, Loading },
data() {
return {
bcd: null,
......@@ -125,6 +134,8 @@ export default {
groups: null,
parent_oe2mgr: null,
parent_oe_mgr: null,
db_editor_presets: {},
db_editor_non_optionals_order: ['group_name', 'mgr_login_name']
}
},
props: {
......@@ -177,6 +188,13 @@ export default {
},
mgrs_mail(user_name) {
return `${this.group_mgrs[user_name].first_name} ${this.group_mgrs[user_name].last_name}<${this.group_mgrs[user_name].email}>`
},
join_group(group_name) {
this.db_editor_presets = {
group_name: group_name,
mgr_login_name: this.$store.state.impersonate_user || this.$store.state.user.login_name
}
this.$root.$emit('bv::show::modal', 'grp_join_modal')
}
}
}
......
......@@ -141,6 +141,7 @@ export default {
geo_marker: 'fa-solid fa-location-dot',
defective: 'fa-regular fa-skull',
wire: 'fa-solid fa-hose',
group_join: 'fa-solid fa-user-plus',
}
}
},
......
......@@ -99,7 +99,8 @@ import {
faMinimize,
faMapLocationDot,
faLocationDot,
faHose
faHose,
faUserPlus
} from '@fortawesome/pro-solid-svg-icons'
library.add(
......@@ -202,5 +203,6 @@ library.add(
faMinimize,
faMapLocationDot,
faLocationDot,
faHose
faHose,
faUserPlus
)
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