{{--Get the Page Format--}}
@extends('layouts.app')

{{--Set Page Title--}}
@section('title', 'Company Info Setup')

{{--Include any Internal JS Code--}}
@section('internal-js')
    <script>
        $(document).ready(function () {

            $("#table1").dataTable();

            /*SC EDITOR*/
            $("textarea").sceditor({
                plugins: "bbcode",
                emoticonsEnabled: false,
            }).sceditor({
                plugins: "xhtml"
            });
        });

    </script>

@endsection

{{--Include any Internal CSS Code--}}
@section('internal-css')

    <style>
        .inputDivider{
            border: 1px solid gray; border-radius: 5px;

        }
        .fields {
            margin: 10px;
        }



    </style>
@endsection

{{--Control Page Header/Links--}}
@section('headers')
    @include('headers.settings-header')
@endsection

{{--Set Page Heading--}}
@section('heading', 'Company Info - Setup')
@section('done-by', '')

{{--Page Content Goes here--}}
@section('content')

    <div class="tab">
        <button class="tablinks" onclick="openCity(event, 'general')" id="defaultOpen">General Company Details</button>
    </div>

    <div class="tabcontent" id="general">
        <span onclick="this.parentElement.style.display='none'" class="topright">&times</span>
        <h3 class="error">Customize General Company Settings</h3>
        <div class="guestDetails_inputDivider"></div>
        {!! Form::model($company_details,['route'=>'update-details'], ['method'=>'POST', 'files' => true]) !!}
        <div class="guestDetails_links">
            <div class="guestDetails_inputLabel">Company Name:</div>
            <div class="guestDetails_input">
                {!! Form::text("company-name", isset($company_details) ? $company_details->comp_name : NULL, ['class'=>'form-input', 'size'=>'40px']) !!}
            </div>
        </div>
        <div class="guestDetails_links">
            <div class="guestDetails_inputLabel">Company Code:</div>
            <div class="guestDetails_input">
                {!! Form::text("company-code", isset($company_details) ? $company_details->code : NULL, ['class'=>'form-input', 'size'=>'10px']) !!}
            </div>
        </div>
        <div class="guestDetails_links">
            <div class="guestDetails_inputLabel">Country:</div>
            <div class="guestDetails_input">
                {!! Form::text("country", isset($company_details) ? $company_details->country : NULL, ['class'=>'form-input', 'size'=>'10px']) !!}
            </div>
        </div>
        <div class="guestDetails_links">
            <div class="guestDetails_inputLabel">Country Code:</div>
            <div class="guestDetails_input">
                {!! Form::text("country-code", isset($company_details) ? $company_details->country_code : NULL, ['class'=>'form-input', 'size'=>'10px']) !!}
            </div>
        </div>
        <div class="guestDetails_links">
            <div class="guestDetails_inputLabel">City:</div>
            <div class="guestDetails_input">
                {!! Form::text("city", isset($company_details) ? $company_details->city : NULL, ['class'=>'form-input', 'size'=>'10px']) !!}
            </div>
        </div>
        <div class="guestDetails_links">
            <div class="guestDetails_inputLabel">Currency:</div>
            <div class="guestDetails_input">
                {!! Form::text("currency", isset($company_details) ? $company_details->currency : NULL, ['class'=>'form-input', 'size'=>'10px']) !!}
            </div>
        </div>

        <div class="guestDetails_inputDivider1"></div>
        <div class="guestDetails_links">
            <div class="guestDetails_inputLabel">Live Location PIN:</div>
            <div class="guestDetails_input">
                {!! Form::text("live-pin", isset($company_details) ? $company_details->live_pin : NULL, ['class'=>'form-input', 'size'=>'40px']) !!}
            </div>
        </div>
        <div class="guestDetails_links">
            <div class="guestDetails_inputLabel">ZIP Code:</div>
            <div class="guestDetails_input">
                {!! Form::text("zip-code", isset($company_details) ? $company_details->zip_code : NULL, ['class'=>'form-input', 'size'=>'10px']) !!}
            </div>
        </div>
        <div class="guestDetails_links">
            <div class="guestDetails_inputLabel">Address/P.O Box:</div>
            <div class="guestDetails_input">
                {!! Form::text("box", isset($company_details) ? $company_details->box : NULL, ['class'=>'form-input', 'size'=>'10px']) !!}
            </div>
        </div>
        <div class="guestDetails_links">
            <div class="guestDetails_inputLabel">CoI:</div>
            <div class="guestDetails_input">
                {!! Form::text("coi", isset($company_details) ? $company_details->cio : NULL, ['class'=>'form-input', 'size'=>'10px']) !!}
            </div>
        </div>
        <div class="guestDetails_links">
            <div class="guestDetails_inputLabel">IRA No:</div>
            <div class="guestDetails_input">
                {!! Form::text("ira-no", isset($company_details) ? $company_details->ira : NULL, ['class'=>'form-input', 'size'=>'10px']) !!}
            </div>
        </div>
        <div class="guestDetails_links">
            <div class="guestDetails_inputLabel">Tax Payer No:</div>
            <div class="guestDetails_input">
                {!! Form::text("tax-no", isset($company_details) ? $company_details->kra : NULL, ['class'=>'form-input', 'size'=>'10px']) !!}
            </div>
        </div>
        <div class="guestDetails_inputDivider"></div>
        <div class="guestDetails_links">
            <div class="guestDetails_inputLabel">Physical Location:</div>
            <div class="guestDetails_input">
                {!! Form::text("address", isset($company_details) ? $company_details->address : NULL, ['class'=>'form-input', 'size'=>'40px']) !!}
            </div>
        </div>
        <div class="guestDetails_links">
            <div class="guestDetails_inputLabel">Phone No:</div>
            <div class="guestDetails_input">
                {!! Form::text("phone", isset($company_details) ? $company_details->phone : NULL, ['class'=>'form-input', 'size'=>'20px']) !!}
            </div>
        </div>
        <div class="guestDetails_links">
            <div class="guestDetails_inputLabel">Telephone No:</div>
            <div class="guestDetails_input">
                {!! Form::text("tel", isset($company_details) ? $company_details->tel : NULL, ['class'=>'form-input', 'size'=>'20px']) !!}
            </div>
        </div>
        <div class="guestDetails_links">
            <div class="guestDetails_inputLabel">Company Logo:</div>
            <div class="guestDetails_input">
                {!! Form::file("logo", ['class'=>'form-input', 'size'=>'20px']) !!}
            </div>
        </div>
        <div class="guestDetails_inputDivider1"></div>
        <div class="guestDetails_links">
            <div class="guestDetails_inputLabel">Website:</div>
            <div class="guestDetails_input">
                {!! Form::text("website", isset($company_details) ? $company_details->website : NULL, ['class'=>'form-input', 'size'=>'40px']) !!}
            </div>
        </div>
        <div class="guestDetails_links">
            <div class="guestDetails_inputLabel">Email:</div>
            <div class="guestDetails_input">
                {!! Form::text("email", isset($company_details) ? $company_details->em : NULL, ['class'=>'form-input', 'size'=>'20px']) !!}
            </div>
        </div>
        <div class="guestDetails_links">
            <div class="guestDetails_inputLabel">Email 2:</div>
            <div class="guestDetails_input">
                {!! Form::text("email-2", isset($company_details) ? $company_details->em_two : NULL, ['class'=>'form-input', 'size'=>'20px']) !!}
            </div>
        </div>
        <div class="guestDetails_links">
            <div class="guestDetails_inputLabel">Company Stamp:</div>
            <div class="guestDetails_input">
                {!! Form::file("stamp", ['class'=>'form-input', 'size'=>'20px']) !!}

            </div>
        </div>
        <div class="guestDetails_inputDivider"></div>
        <div class="inputDivider fields" >
            <div class="fields">
                <a href="{{url('settings')}}" class="inner"><button type="button" name="cancel" class="cancelButton">Cancel</button></a>
                <button type="submit" name="save" class="continueButton" id="save" >Save Changes</button>

            </div>
        </div>
        {!! Form::close() !!}
    </div>
@endsection

{{--System Hints Page--}}
@section('modal_heading')
    <h1>Account Setup</h1>
@endsection
@section('modal_title')
    <h3><u>Dashboard Functionalities</u></h3>
    <b>
        <ol>
            <li>Manage System Functionalities</li>
            <li>Define System Parameters</li>
            <li>Block/Unblock</li>
            <li>Add Quotes/Policies to the System</li>
        </ol>
    </b>
@endsection







