<x-form @submit.prevent="submit">
    <x-modal classModel="modal-xl">

        <div class="form-group col-8" v-if="action_update===''" >
            <x-label for="name"  > {{__('Name') }}</x-label>
            
            <div class="input-group">
                <div class="input-group-prepend">
                  <div class="input-group-text">{{date('ym').auth()->id().'_'}}</div>
                </div>
                <x-input type="text"  name="name"  v-model="fields.name" required />
            </div>
            <x-error v-if="errors && errors.name">@{{ errors.name[0] }}</x-error>
        </div>
        <div class="form-group">
            <x-label>{{ __('Permissions') }}</x-label>
            <div class="checkbox-inline">
                <label  class="checkbox col-3" v-for="permission in permissions" :key="permission.index">
                    <x-input type="checkbox"  v-bind:value="permission.id" v-model="fields.permissions" />
                    <span></span>@{{permission.name }}
                <label>
            </div>
        </div>
        <x-slot name="footer">
            <a @click="save" class="btn btn-success float-left mx-1 float-right link-submit">{{ __('Save') }}</a>
            <button type="submit" class="btn btn-primary float-right link-submit">{{ __('save and continue') }}</button>
        </x-slot>
    </x-modal>
</x-form>