{!! Form::open(['route'=>['user.storeUpdatedUserModules', 'id'=>$id], 'method'=>'POST', 'id'=>'update-user-modules']) !!}
<div class="error" style="text-align: center;"><b>On this Window, You can Update Modules to be accessed by this User</b></div><br>

<div  style="text-align: center;">
    Update Accessible Modules for: <b class="error">{!! $user->firstName." ".$user->lastName !!}</b>
</div><br>
<button type="submit" disabled style="display: none" aria-hidden="true"></button>

<table style="width: 70%; border-collapse: collapse;">
    @if(app('CompanyModules')->admin == 1)
        <tr>
            <th>System Admin:</th>
            <td>
                @if($user->admin == 1)
                    <input type="checkbox" name="admin" value="1" checked>
                @else
                    <input type="checkbox" name="admin" value="1">
                @endif
            </td>
        </tr>
    @endif
    @if(app('CompanyModules')->dash == 1)
        <tr>
            <th>General Underwriting</th>
            <td>
                @if($user->dash == 1)
                    <input type="checkbox" name="dash" value="1" checked>
                @else
                    <input type="checkbox" name="dash" value="1">
                @endif
            </td>
        </tr>
    @endif
        @if(app('CompanyModules')->prospects == 1)
            <tr>
                <th>Prospects</th>
                <td>
                    @if($user->prospects == 1)
                        <input type="checkbox" name="prospects" value="1" checked>
                    @else
                        <input type="checkbox" name="prospects" value="1">
                    @endif
                </td>
            </tr>
        @endif
    @if(app('CompanyModules')->endowment == 1)
        <tr>
            <th>Life Endowment</th>
            <td>
                @if($user->endowment == 1)
                    <input type="checkbox" name="endowment" value="1" checked>
                @else
                    <input type="checkbox" name="endowment" value="1">
                @endif
            </td>
        </tr>
    @endif
    @if(app('CompanyModules')->medical == 1)
        <tr>
            <th>Medical Underwriting</th>
            <td>
                @if($user->medical == 1)
                    <input type="checkbox" name="medical" value="1" checked>
                @else
                    <input type="checkbox" name="medical" value="1">
                @endif
            </td>
        </tr>
    @endif
    @if(app('CompanyModules')->life == 1)
        <tr>
            <th> Life Underwriting</th>
            <td>
                @if($user->life == 1)
                    <input type="checkbox" name="life" value="1" checked>
                @else
                    <input type="checkbox" name="life" value="1">
                @endif
            </td>
        </tr>
    @endif
    @if(app('CompanyModules')->reports == 1)
        <tr>
            <th>Reports</th>
            <td>
                @if($user->reports == 1)
                    <input type="checkbox" name="reports" value="1" checked>
                @else
                    <input type="checkbox" name="reports" value="1">
                @endif
            </td>
        </tr>
    @endif
    @if(app('CompanyModules')->sms == 1)
        <tr>
            <th>SMS</th>
            <td>

                @if($user->sms == 1)
                    <input type="checkbox" name="sms" value="1" checked>
                @else
                    <input type="checkbox" name="sms" value="1">
                @endif
            </td>
        </tr>
    @endif

    @if(app('CompanyModules')->emails == 1)
        <tr>
            <th>Emails</th>
            <td>
                @if($user->emails == 1)
                    <input type="checkbox" name="emails" value="1" checked>
                @else
                    <input type="checkbox" name="emails" value="1">
                @endif
            </td>
        </tr>
    @endif
    @if(app('CompanyModules')->dms == 1)
        <tr>
            <th>EDMS</th>
            <td>
                @if($user->dms == 1)
                    <input type="checkbox" name="dms" value="1" checked>
                @else
                    <input type="checkbox" name="dms" value="1">
                @endif
            </td>
        </tr>
    @endif
    @if(app('CompanyModules')->reception == 1)
        <tr>
            <th>Reception</th>
            <td>
                @if($user->reception == 1)
                    <input type="checkbox" name="reception" value="1" checked>
                @else
                    <input type="checkbox" name="reception" value="1">
                @endif
            </td>
        </tr>
    @endif
    @if(app('CompanyModules')->crm == 1)
        <tr>
            <th>CRM</th>
            <td>
                @if($user->crm == 1)
                    <input type="checkbox" name="crm" value="1" checked>
                @else
                    <input type="checkbox" name="crm" value="1">
                @endif
            </td>
        </tr>
    @endif

    @if(app('CompanyModules')->bd == 1)
        <tr>
            <th>BD</th>
            <td>
                @if($user->bd == 1)
                    <input type="checkbox" name="bd" value="1" checked>
                @else
                    <input type="checkbox" name="bd" value="1">
                @endif
            </td>
        </tr>
    @endif
    @if(app('CompanyModules')->opm == 1)
        <tr>
            <th>Operation Manager(OPM)</th>
            <td>
                @if($user->opm == 1)
                    <input type="checkbox" name="opm" value="1" checked>
                @else
                    <input type="checkbox" name="opm" value="1">
                @endif
            </td>
        </tr>
    @endif

    @if(app('CompanyModules')->claims == 1)
        <tr>
            <th>Claims</th>
            <td>
                @if($user->claims == 1)
                    <input type="checkbox" name="claims" value="1" checked>
                @else
                    <input type="checkbox" name="claims" value="1">
                @endif
            </td>
        </tr>
    @endif
    @if(app('CompanyModules')->marketing == 1)
        <tr>
            <th>Marketing</th>
            <td>
                @if($user->marketing == 1)
                    <input type="checkbox" name="marketing" value="1" checked>
                @else
                    <input type="checkbox" name="marketing" value="1">
                @endif
            </td>
        </tr>
    @endif
    @if(app('CompanyModules')->m_fund == 1)
        <tr>
            <th>Medical Fund</th>
            <td>
                @if($user->m_fund == 1)
                    <input type="checkbox" name="m-fund" value="1" checked>
                @else
                    <input type="checkbox" name="m-fund" value="1">
                @endif
            </td>
        </tr>
    @endif
    @if(app('CompanyModules')->pension == 1)
        <tr>
            <th>Pension</th>
            <td>
                @if($user->pension == 1)
                    <input type="checkbox" name="pension" value="1" checked>
                @else
                    <input type="checkbox" name="pension" value="1">
                @endif
            </td>
        </tr>
    @endif
    @if(app('CompanyModules')->quotation == 1)
        <tr>
            <th>Quotation</th>
            <td>
                @if($user->quotation == 1)
                    <input type="checkbox" name="quotation" value="1" checked>
                @else
                    <input type="checkbox" name="quotation" value="1">
                @endif
            </td>
        </tr>
    @endif
    @if(app('CompanyModules')->re_insurance == 1)
        <tr>
            <th>Re-Insurance</th>
            <td>
                @if($user->re_insurance == 1)
                    <input type="checkbox" name="re-insurance" value="1" checked>
                @else
                    <input type="checkbox" name="re-insurance" value="1">
                @endif
            </td>
        </tr>
    @endif

    @if(app('CompanyModules')->hr == 1)
        <tr>
            <th>Human Resource(HR)</th>
            <td>
                @if($user->hr == 1)
                    <input type="checkbox" name="hr" value="1" checked>
                @else
                    <input type="checkbox" name="hr" value="1">
                @endif
            </td>
        </tr>
    @endif
    @if(app('CompanyModules')->finance == 1)
        <tr>
            <th>Finance</th>
            <td>
                @if($user->finance == 1)
                    <input type="checkbox" name="finance" value="1" checked>
                @else
                    <input type="checkbox" name="finance" value="1">
                @endif
            </td>
        </tr>
    @endif
    @if(app('CompanyModules')->it == 1)
        <tr>
            <th>Information Technology(IT)</th>
            <td>
                @if($user->it == 1)
                    <input type="checkbox" name="it" value="1" checked>
                @else
                    <input type="checkbox" name="it" value="1">
                @endif
            </td>
        </tr>
    @endif
        @if(app('CompanyModules')->stock == 1)
            <tr>
                <th>Inventory</th>
                <td>
                    @if($user->stock == 1)
                        <input type="checkbox" name="stock" value="1" checked>
                    @else
                        <input type="checkbox" name="stock" value="1">
                    @endif
                </td>
            </tr>
        @endif
    @if(app('CompanyModules')->settings == 1)
        <tr>
            <th>Settings</th>
            <td>
                @if($user->settings == 1)
                    <input type="checkbox" name="settings" value="1"  checked>
                @else
                    <input type="checkbox" name="settings" value="1" >
                @endif
            </td>
        </tr>
    @endif
</table>
{!! Form::close() !!}
