Commit 2d7ed826 authored by janis.streib's avatar janis.streib 🦉
Browse files

ADD: delet macauth client

parent cda92742
......@@ -83,7 +83,7 @@
</b-tooltip>
<b-button variant="outline-danger"
:id="'button-delete-client-' + bcd.name + '-' + data.index"
@click="deleteClient">
@click="deleteClient(data.item)">
<font-awesome-icon :icon="['far', 'trash-alt']"/>
</b-button>
<b-tooltip :target="'button-delete-client-' + bcd.name + '-' + data.index"
......@@ -99,6 +99,7 @@
<DBEditor object_fq_name="macauth.client" :object_function="db_editor_object_function"
modal_id="dbeditor_macauth" :old_data="db_editor_old_data" :presets="db_editor_presets"
:non_optionals_order="['bcd_name', 'mac_addr', 'description']"
:object_title="db_editor_object_title"
></DBEditor>
</Loading>
</div>
......@@ -109,6 +110,8 @@ import Loading from "../../components/Loading"
import MACAuth from "@/api-services/macauth.service"
import ApiUtil from '@/util/apiutil'
import DBEditor from "@/components/DBEditor";
import transactionutil from "@/util/transactionutil";
import MACAuthService from "@/api-services.gen/macauth.client";
export default {
name: 'macauth',
......@@ -118,6 +121,7 @@ export default {
db_editor_object_function: 'create',
db_editor_old_data: {},
db_editor_presets: {},
db_editor_object_title: {},
bcds: null,
clients_by_bcd: null,
macauth_fields: [
......@@ -194,8 +198,13 @@ export default {
editClient() {
alert('TODO: DBEditor edit client')
},
deleteClient() {
alert('TODO: Delete client')
deleteClient(item) {
let ta = transactionutil.generateDeleteElement('macauth.client', MACAuthService.deleteParamsList(), item, item.mac_addr + ' in BCD ' + item.bcd_name)
this.$store.commit('addTransactionElement', ta)
this.$emit('commited', ta)
if (!this.isMobile() && !this.$store.state.show_sidebar) {
this.$store.state.show_sidebar = true
}
}
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment