mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 12:17:08 +00:00
Add organisations configuration section to project settings UI
This commit is contained in:
@@ -0,0 +1,79 @@
|
||||
<template>
|
||||
<v-card>
|
||||
<v-card-text>
|
||||
<dougal-organisations
|
||||
:self="user"
|
||||
:organisations.sync="organisations_"
|
||||
>
|
||||
</dougal-organisations>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn
|
||||
color="secondary"
|
||||
@click="back"
|
||||
>Back</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapActions, mapGetters } from 'vuex'
|
||||
import DougalOrganisations from '../organisations'
|
||||
|
||||
|
||||
export default {
|
||||
name: "DougalProjectSettingsOrganisations",
|
||||
|
||||
components: {
|
||||
DougalOrganisations
|
||||
},
|
||||
|
||||
props: {
|
||||
organisations: Object,
|
||||
value: Object
|
||||
},
|
||||
|
||||
data () {
|
||||
return {
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
|
||||
organisations_: {
|
||||
get () {
|
||||
return this.organisations;
|
||||
},
|
||||
|
||||
set (v) {
|
||||
this.$emit("input", {
|
||||
...this.value,
|
||||
organisations: v.toJSON()
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
...mapGetters(['user', 'loading', 'serverEvent'])
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
reset () {
|
||||
},
|
||||
|
||||
save () {
|
||||
},
|
||||
|
||||
back () {
|
||||
this.$emit('close');
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
mounted () {
|
||||
this.reset();
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
@@ -228,6 +228,7 @@ import { deepSet } from '@/lib/utils';
|
||||
import DougalJsonBuilder from '@/components/json-builder/json-builder';
|
||||
|
||||
import DougalProjectSettingsNameId from '@/components/project-settings/name-id';
|
||||
import DougalProjectSettingsOrganisations from '@/components/project-settings/organisations';
|
||||
import DougalProjectSettingsGroups from '@/components/project-settings/groups';
|
||||
import DougalProjectSettingsGeodetics from '@/components/project-settings/geodetics';
|
||||
import DougalProjectSettingsBinning from '@/components/project-settings/binning';
|
||||
@@ -248,6 +249,7 @@ import DougalProjectSettingsNotImplemented from '@/components/project-settings/n
|
||||
|
||||
const components = {
|
||||
name_id: DougalProjectSettingsNameId,
|
||||
organisations: DougalProjectSettingsOrganisations,
|
||||
groups: DougalProjectSettingsGroups,
|
||||
geodetics: DougalProjectSettingsGeodetics,
|
||||
binning: DougalProjectSettingsBinning,
|
||||
@@ -304,6 +306,13 @@ export default {
|
||||
name: obj?.name
|
||||
})
|
||||
},
|
||||
{
|
||||
id: "organisations",
|
||||
name: "Organisations",
|
||||
values: (obj) => ({
|
||||
organisations: obj?.organisations
|
||||
})
|
||||
},
|
||||
{
|
||||
id: "groups",
|
||||
name: "Groups",
|
||||
|
||||
Reference in New Issue
Block a user