summaryrefslogblamecommitdiffstats
path: root/webapp/src/components/GroupModule.vue
blob: 15ae7115a8e72c9e51f1cb5eed7a5255d89d851f (plain) (tree)
1
2
3
4
5
6
7
8
9
10









          



                                                        

                                                                                                                                 



                                                                                                           
                                                                                                                           



                         
                                                                                                        


                                                                                                         
                                                                                                            
                         


                         
                           
                


           
                                                                  
                                                                    
                                                                      
                                                              
                                                         


                      
               
                        
                         

                          
    

            

     
             
                                                                
                                                              
    
            
                                               

              
                                            
                                           





                                                                   
        
<i18n>
{
  "en": {
  },
  "de": {
  }
}
</i18n>

<template>
  <v-container fill-height>
    <v-layout>
      <v-flex class="tabs-wrapper" xl10 offset-xl1 lg12>
          <v-card>
            <v-tabs :value="activeTab" @input="setActiveTab" :dark="tabsDark" :color="tabsColor" :slider-color="tabsSliderColor">
              <template v-for="(item, index) in tabChain">
                <v-icon v-if="item.tabType !== 'home'" :key="'arrow' + index">keyboard_arrow_right</v-icon>
                <v-tab ripple  :key="'tab' + index">
                  <v-icon v-if="item.tabType === 'home'">home</v-icon>
                  <v-icon v-if="item.tabType === 'client'" style="margin-right: 10px">computer</v-icon>
                  <template v-if="item.tabType !== 'home'">{{ item.name || item.id || ' . . . . . . . . . . ' }}</template>
                </v-tab>
              </template>
            </v-tabs>
          </v-card>
          <v-tabs-items :value="activeTab" @input="setActiveTab" touchless style="padding-bottom: 20px">
            <v-tab-item v-for="(item, index) in tabChain" :key="index">
              <group-module-home-view v-if="item.tabType === 'home'" :home="item" />
              <group-module-group-view v-if="item.tabType === 'group'" :group="item" :tabIndex="index" />
              <group-module-client-view v-if="item.tabType === 'client'" :client="item" :tabIndex="index" />
            </v-tab-item>
          </v-tabs-items>
      </v-flex>
    </v-layout>
    <group-module-dialog />
  </v-container>
</template>

<script>
import GroupModuleHomeView from '@/components/GroupModuleHomeView'
import GroupModuleGroupView from '@/components/GroupModuleGroupView'
import GroupModuleClientView from '@/components/GroupModuleClientView'
import GroupModuleDialog from '@/components/GroupModuleDialog'
import { mapState, mapGetters, mapMutations } from 'vuex'

export default {
  name: 'GroupModule',
  components: {
    GroupModuleHomeView,
    GroupModuleGroupView,
    GroupModuleClientView,
    GroupModuleDialog
  },
  data () {
    return {
    }
  },
  computed: {
    ...mapGetters(['tabsDark', 'tabsColor', 'tabsSliderColor']),
    ...mapState('groups', ['tabChain', 'client', 'activeTab'])
  },
  methods: {
    ...mapMutations('groups', ['setActiveTab'])
  },
  created () {
    this.$store.dispatch('groups/loadLists')
    this.$store.dispatch('groups/loadHome')
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
</style>