@extends('layouts.app') @section('content')

Manage Project

@if(isset($project)) {{ Form::model($project, ['route' => ['projects.update', $project->id], 'method' => 'patch']) }} @else {{ Form::open(['route' => 'projects.store']) }} @endif

{{ !empty($project) ? 'Update Project' : 'Create Project'}}

@include('layouts.flash.alert')
{{ Form::label('company_id', 'Company') }}* {{ Form::select('company_id', $companies, @$project->company_id, [ 'class' => "form-control select2-input", 'id' => "company_id", 'data-live-search'=>'true', ]) }} @if($errors->has('company_id')) {{ $errors->first('company_id') }} @endif
{{ Form::label('client', 'Client') }} {{ Form::text('client', @$project->client, [ 'class' => "form-control", 'id' => "client", ]) }} @if($errors->has('client')) {{ $errors->first('client') }} @endif
{{ Form::label('client_contacts', 'Client Contact') }} {{ Form::text('client_contacts',@$project->client_contacts, [ 'class' => "form-control", 'id' => "client_contacts", ]) }} @if($errors->has('client_contacts')) {{ $errors->first('client_contacts') }} @endif
{{ Form::label('unique_reference_no', 'Unique Reference No') }}* {{ Form::text('unique_reference_no',@$project->unique_reference_no, [ 'class' => "form-control", 'id' => "unique_reference_no", ]) }} @if($errors->has('unique_reference_no')) {{$errors->first('unique_reference_no')}} @endif
{{ Form::label('project_title', 'Project Title') }}* {{ Form::text('project_title',@$project->project_title, [ 'class' => "form-control", 'id' => "project_title", ]) }} @if($errors->has('project_title')) {{ $errors->first('project_title') }} @endif
{{ Form::label('project_address', 'Project Address') }} {{ Form::text('project_address',@$project->project_address, [ 'class' => "form-control", 'id' => "project_address", ]) }} @if($errors->has('project_address')) {{ $errors->first('project_address') }} @endif
{{ Form::label('location', 'Location')}} {{ Form::text('location',@$project->location, [ 'class' => "form-control", 'id' => "location", ]) }} @if($errors->has('location')) {{ $errors->first('location') }} @endif
{{ Form::label('sector', 'Sector')}} {{ Form::text('sector',@$project->current_value_of_project, [ 'class' => "form-control", 'id' => "sector", ]) }} @if($errors->has('sector')) {{ $errors->first('sector') }} @endif
{{ Form::label('region', 'Region') }} {{ Form::select('region', config('constants.REGIONS'),@$project->region, [ 'class' => "form-control", 'id' => "region", 'data-live-search'=>'true', ]) }} @if($errors->has('region')) {{$errors->first('region')}} @endif
{{ Form::label('type_of_contract', 'Type Of Contract') }} {{ Form::text('type_of_contract', old('type_of_contract') ? old('type_of_contract') : @$project->type_of_contract, [ 'class' => "form-control", 'id' => "type_of_contract" ]) }} @if($errors->has('type_of_contract')) {{ $errors->first('type_of_contract') }} @endif
{{ Form::label('shifts', 'Shifts') }} {{ Form::select('shifts', config('constants.SHIFTS'),@$project->shifts, [ 'class' => "form-control", 'id' => "shifts", 'data-live-search'=>'true', ]) }} @if($errors->has('shifts')) {{ $errors->first('shifts') }} @endif
{{ Form::label('project_manager', 'Project Manager')}} {{ Form::text('project_manager', @$project->project_manager, [ 'class' => "form-control", 'id' => "project_manager", ]) }} @if($errors->has('project_manager')) {{ $errors->first('project_manager') }} @endif
{{ Form::label('site_supervisor', 'Site Supervisor')}} {{ Form::text('site_supervisor', @$project->site_supervisor, [ 'class' => "form-control", 'id' => "site_supervisor", ]) }} @if($errors->has('site_supervisor')) {{ $errors->first('site_supervisor') }} @endif
{{ Form::label('current_start_date', 'Current Start Date') }}* {{ Form::date('current_start_date',@$project->current_start_date, [ 'class' => "form-control", 'id' => "current_start_date", 'data-live-search'=>'true', ]) }} @if($errors->has('current_start_date')) {{ $errors->first('current_start_date') }} @endif
{{ Form::label('current_completion_date', 'Current Completion Date') }} {{ Form::date('current_completion_date',@$project->current_completion_date, [ 'class' => "form-control", 'id' => "current_completion_date", 'data-live-search'=>'true', ]) }} @if($errors->has('current_completion_date')) {{ $errors->first('current_completion_date') }} @endif
{{ Form::label('current_value_of_project', 'Current Value of Project') }} {{ Form::text('current_value_of_project',@$project->current_value_of_project, [ 'class' => "form-control", 'id' => "current_value_of_project", ]) }} @if($errors->has('current_value_of_project')) {{ $errors->first('current_value_of_project') }} @endif
{{ Form::label('base_margin', 'Base Margin') }} {{ Form::text('base_margin',@$project->base_margin, [ 'class' => "form-control", 'id' => "base_margin", "min"=>"0" ,"step"=>"1" ]) }} @if($errors->has('base_margin')) {{ $errors->first('base_margin') }} @endif
{{ Form::label('change_management', 'Change Management') }} {{ Form::text('change_management',@$project->change_management, [ 'class' => "form-control", 'id' => "change_management", ]) }} @if($errors->has('change_management')) {{$errors->first('change_management')}} @endif
{{ Form::label('adjusted_contract_value', 'Adjusted Contract Value') }} {{ Form::text('adjusted_contract_value',@$project->adjusted_contract_value, [ 'class' => "form-control", 'id' => "adjusted_contract_value", "min"=>"0" ,"step"=>"1" ]) }} @if($errors->has('adjusted_contract_value')) {{$errors->first('adjusted_contract_value')}} @endif
{{ Form::label('labour_value', 'Labour Value') }} {{ Form::text('labour_value',@$project->labour_value, [ 'class' => "form-control", 'id' => "labour_value", "min"=>"0" ,"step"=>"1" ]) }} @if($errors->has('labour_value')) {{$errors->first('labour_value')}} @endif
{{ Form::label('tender_status', 'Tender Status') }} {{ Form::select('tender_status', config('constants.TENDER_STATUS'),@$project->tender_status, [ 'class' => "form-control", 'id' => "tender_status", 'data-live-search'=>'true', ]) }} @if($errors->has('tender_status')) {{$errors->first('tender_status')}} @endif
{{ Form::close() }}
@endsection @push('scripts') @endpush