@extends('adminlte::page') @section('content')
<?php Fun::lang() ?>
<style>
    .nowrap{
        white-space: nowrap;
    }
</style>
<div class="title-page">
    <div class="page-bar">
        <ul class="page-breadcrumb">
            <li><a href="#"><i class="fa fa-dashboard"></i> Dashboard</a></li>
            <li><a href="#">Construction</a></li>
            <li><a href="#">BOQ & Purchase Order</a></li>
            <li><a href="#">Request BOQ</a></li>
            <li><a href="#">Edit</a></li>
        </ul>
    </div>
</div>
<div class="page">
    <div class="top-content">
        <div class="row">
            <div class="col-sm-12 col-xs-12">
                <div class="title-page">
                    <div class="pull-left">
                        <h3>Edit BOQ</h3>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-sm-12 col-xs-12">

            <div class="form-wrapper">
                {!! Form::model($data, ['method' => 'PATCH','route' => ['construction-boq.update', $data->id],'enctype'=>'multipart/form-data']) !!}
                <div class="row">
                    <div class="form-group col-sm-4 col-xs-12">
                        <label class="required">Prepared By</label>
                        {!! Form::text('prepared_by', null, array('placeholder' => 'Name','class' => 'form-control','required')) !!}
                    </div>
                    <div class="form-group col-sm-4 col-xs-12">
                        <label class="required">Project Name </label>
                        {!! Form::select('project_id', $projects, null, ['class' => 'form-control select2','required','id'=>'category-id']) !!}
                    </div>
                    <div class="form-group col-sm-4 col-xs-12" style="display: none;">
                        <label class="required">Zone</label>
                        {!! Form::select('zone_id',$zones, null, ['class' => 'form-control select2']) !!}
                    </div>
                    <div class="form-group col-sm-4 col-xs-12">
                        <label>Category House</label>
                        {!! Form::select('sub_category_house_id', $house_categories, null, ['class' => 'form-control select2']) !!}
                    </div>
                    <div class="form-group col-sm-4 col-xs-12">
                        <label class="required">Amount of house used (units) </label>
                        {!! Form::text('amount_of_house_used', null, array('placeholder' => 'Number','class' => 'form-control number-only','required','id'=>'amount_all_house_used')) !!}
                    </div>
                    <div class="form-group col-sm-4 col-xs-12">
                        <label class="required">Date</label>
                        {!! Form::text('date', date('d-m-Y'), array('laceholder'=>'Date','class' => 'form-control date_picker','required')) !!}
                    </div>
                    <div class="form-group col-sm-4 col-xs-12">
                        <label class="required">Building Type</label>
                        {!! Form::text('building_type', null, array('placeholder' => 'Type','class' => 'form-control','required')) !!}
                    </div>
                    <div class="form-group col-sm-8 col-xs-12">
                        <label class="required">Title</label>
                        {!! Form::textarea('title_boq', $data->title, array('placeholder' => 'Title','class' => 'form-control','rows'=>'2','required')) !!}
                    </div>
                </div>
                <div class="row" >
                    <div style="border: 1px solid gray;padding: 15px;margin:15px;" id="boq-table-form">
                        <p style="color: #045FB4 !important;font-size: 90%;margin-top: -25px;background-color: white !important;
                        width: 90px !important;text-align: center;font-family: 'Khmer OS Muol Light'">
                            <a href="javascript:void(0)" onclick="add_table_boq(this)">ADD NEW</a>
                        </p>
                    </div>
                </div>
                <div class="row">
                    <div class="col-sm-12 col-xs-12">
                        <div class="form-group">
                            <button type="submit" class="button_sm button_primary pull-right"><span class="fa fa-save"></span> Save</button>
                            <button type="button" onClick="javascript:history.go(-1)" class="button_sm button_warning pull-right">
                                <span class=" fa fa-arrow-circle-left"></span> Back</button>
                        </div>
                    </div>
                </div>
                <br/>
                {!! Form::close() !!}
            </div>
        </div>
    </div>
</div>
@endsection @section('js')
@include('administrator.construction.boq.script-edit')
@endsection