@extends('backend.app')
@section('title') Create Organization @endsection

@section('styles')
<style>
    label{
        text-transform: capitalize;
    }
</style>
@endsection

@section('content')

    <!-- start page title -->
    <div class="row">
        <div class="col-12">
            <div class="page-title-box d-sm-flex align-items-center justify-content-between">
                <h4 class="mb-sm-0 font-size-18">Create Organization</h4>

                <div class="page-title-right">
                    <ol class="breadcrumb m-0">
                        <li class="breadcrumb-item"><a href="{{route('super-admin.dashboard')}}">Dashboard</a></li>
                        <li class="breadcrumb-item"><a href="{{route('organizations.index')}}">All Organizations</a></li>
                        <li class="breadcrumb-item active">Create Organization</li>
                    </ol>
                </div>

            </div>
        </div>
    </div>
    <!-- end page title -->

    <div class="row">
        <div class="col-12">
            <div class="card">
                <div class="card-body">

                    <h4 class="card-title">Organization Information</h4>
                    <p class="card-title-desc">Fill all information below</p>

                    <form action="{{ route('organizations.store') }}" method="POST" role="form" id="form1"  enctype="multipart/form-data">
                        @csrf
                        <div class="row">
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label class="form-label">{{ __('messages.name')}} <span class="text-danger">*</span></label>

                                    <input type="text" class="form-control @error('name') is-invalid @enderror" name="name" placeholder="Enter organization name" />
                                </div>
                                @error('name') <span class="text-danger"><i class="entypo-info-circled"></i>  {{ $message }}</span> @enderror
                            </div>
                        </div>

                        <div class="row mt-2">
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label class="form-label">Owner {{ __('messages.name')}} <span class="text-danger">*</span></label>

                                    <input type="text" class="form-control @error('owner_name') is-invalid @enderror" name="owner_name"  placeholder="Enter owner name" />
                                    @error('owner_name') <span class="text-danger"><i class="entypo-info-circled"></i>  {{ $message }}</span> @enderror
                                </div>
                            </div>
                        </div>

                        <div class="row mt-2">
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label class="form-label">Address</label>

                                    <input type="text" class="form-control" name="address" placeholder="Enter address" />
                                </div>
                            </div>
                        </div>
                        <div class="row mt-2 mb-2">
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label class="form-label">Phone <span class="text-danger">*</span></label>

                                    <input type="text" class="form-control @error('phone') is-invalid @enderror" name="phone" placeholder="Enter phone number" />
                                    @error('phone') <span class="text-danger"><i class="entypo-info-circled"></i>  {{ $message }}</span> @enderror
                                </div>
                            </div>
                        </div>

                        @can('organization.create')
                        <div class="d-flex flex-wrap gap-2">
                            <button type="submit" class="btn btn-primary waves-effect waves-light">Save Organization</button>
                        </div>
                        @endcan
                    </form>

                </div>
            </div>


        </div>
    </div>
    <!-- end row -->


@endsection

@push('scripts')
    <script type="text/javascript">
        // Js Code Here..
        $(document).ready(function($)
        {


        });

    </script>

@endpush
