<template>
    <v-card
        tile
        flat
        :height="height"
        :width="width"
    >
        <v-card-title class="pa-1">
            {{__('Fișiere asociate cursului')}}
        </v-card-title>

        <cs-toolbar 
            :toolbar="toolbar"
        >
        </cs-toolbar>

        <v-card
            tile
            flat
            :height="height - 88"
            :width="width"
            class="overflow-y-auto"
        >
            <data-table 
                :app="app"
                :dataprovider="app.dataSession.Customercursurifiles"
                :datatable="app.datatables.Cursurifiles"
                :height="height - 88"
                :width="width"
                :dtWidth="app.datatables.Cursurifiles.datatableWidth"
            />
        </v-card>
    </v-card>
</template>

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

        computed: {
            toolbar() {
                return this.app.menus.Cursurifilestoolbar;
            }
        },

        created() {
            this.app.dataSession.Customercursurifiles.GetByCustomerCursId(this.app.payload.customer_curs_id);
        },

        components: {
            CsToolbar: require('@CsVueComp/menus/toolbar/CsToolbar').default,
        },

        name: 'AccesCursFiles',
    }
</script>