@extends('admin.layouts.app') @section('title', 'Companies') @section('content') @include('admin.includes.alerts')
@if(\Illuminate\Support\Facades\Auth::user()->role == 1) Register Company @endif @foreach($companies as $i => $company) @endforeach
SN Name TIN Address Contacts Email Status Action
{{$i+1}} {{$company->name}} {{$company->TIN}} {{$company->address}} {{$company->contacts}} {{$company->email}} @if($company->status == 1) Active @elseif($company->status == 0) Inactive @else No Information @endif {!! Form::open(array( 'style' => 'display: inline-block;', 'method' => 'GET', 'route' => ['Company Users', $company->id])) !!} {!! Form::submit('Users', array('class' => 'mb-2 mr-2 btn-icon btn-sm btn-primary')) !!} {!! Form::close() !!} {!! Form::open(array( 'style' => 'display: inline-block;', 'method' => 'GET', 'route' => ['Edit Company', $company->id])) !!} {!! Form::submit('Edit', array('class' => 'mb-2 mr-2 btn-icon btn-sm btn-info ')) !!} {!! Form::close() !!} @if(\Illuminate\Support\Facades\Auth::user()->role == 1) @if($company->role == 2) {!! Form::open(array( 'style' => 'display: inline-block;', 'method' => 'POST', 'onsubmit' => "return confirm('".trans("Are sure you want to Delete")."');", 'route' => ['Delete Company', $company->id])) !!} {!! Form::submit('Delete', array('class' => 'mb-2 mr-2 btn-icon btn-sm btn-danger')) !!} {!! Form::close() !!} @endif @endif @if(\Illuminate\Support\Facades\Auth::user()->role == 3 || \Illuminate\Support\Facades\Auth::user()->role == 4) {!! Form::open(array( 'style' => 'display: inline-block;', 'method' => 'GET', 'route' => ['Bank Accounts', $company->id])) !!} {!! Form::submit('Bank A/c', array('class' => 'mb-2 mr-2 btn-icon btn-sm btn-dark')) !!} {!! Form::close() !!} @endif
@endsection