<template>
    <v-sheet
        :height="height"
        class="overflow-auto"
    >

        <team-customer-item 
            v-for="(customer, index) in orderedCustomers"
            :key="'customer-' + index"
            :recCount="1 + index"
            :customer="customer"
            :app="app"
            class="mb-2"
        />

    </v-sheet>
</template>

<script>
    export default {
        props: {
            app: {required: true},
            activeUser: {required: true},
            height: {default: null},
            width: {default: null},
        },

        computed: {
            orderedCustomers() {
                return _.orderBy(this.activeUser.customers, [item => item.name], ['asc'])
            }
        },
        
        name: 'TeamCustomersItem',
    }
</script>