Skip to content
Snippets Groups Projects
Commit ca83320e authored by Janis Streib's avatar Janis Streib :owl: Committed by Janis Streib
Browse files

ADD: OU delete (fixes #417)

parent 80fbc8a3
No related branches found
No related tags found
No related merge requests found
......@@ -22,6 +22,14 @@
</b-col>
<b-col lg="2">
<b-button-group class="d-flex">
<b-button v-if="check_rights($store.state, 'org.rw_oe')" variant="outline-danger" :id="'delete-ou-' + ou.short_name"
@click="delete_ou(ou)" class="mt-3 shadow">
<font-awesome-icon icon="fa-regular fa-trash-can"></font-awesome-icon>
</b-button>
<b-tooltip :target="'delete-ou-' + ou.short_name" triggers="hover"
variant="danger" placement="bottom">
{{ $t('system.delete') }}
</b-tooltip>
<b-button variant="outline-primary" :id="'edit-ou-' + ou.short_name"
@click="edit_ou(ou)" class="mt-3 shadow">
<font-awesome-icon icon="fa-solid fa-pen-to-square"></font-awesome-icon>
......@@ -449,6 +457,7 @@ export default {
}
},
methods: {
check_rights: apiutil.checkRights,
async refresh() {
this.ou = null
this.mgrs_by_login_name = null
......@@ -537,6 +546,14 @@ export default {
this.bcd2ou_db_editor_non_optionals = ['ou_short_name', 'bcd_name']
this.$root.$emit('bv::show::modal', 'assign_bcd_to_oe')
},
delete_ou(item) {
const ta = transactionutil.generateDeleteElement('org.ou', NativeOUService.deleteParamsList(), item, item.name + ' (' + item.short_name + ')')
this.$store.commit('addTransactionElement', ta)
this.$emit('commited', ta)
if (!this.isMobile() && !this.$store.state.show_sidebar_right) {
this.$store.state.show_sidebar_right = true
}
},
delete_mgr_assignment(item) {
const ta = transactionutil.generateDeleteElement('cntl.mgr2ou', Mgr2OuService.deleteParamsList(), item, item.mgr_login_name + ' ' + this.$t('views.org.ou.from_ou') + ' ' + item.ou_short_name)
this.$store.commit('addTransactionElement', ta)
......
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