Current File : //home/tradevaly/public_html/resources/views/user/pages/setting.blade.php |
@extends('user.ayaan.master')
@push('style')
<link href="{{ asset('/assets/libs/select2/select2.min.css') }}" rel="stylesheet" type="text/css" />
<style>
.my_select2_optgroup_selected {
background-color: #ddd;
}
.my_select2_optgroup_hovered {
color: #FFF;
background-color: #5897fb !important;
cursor: pointer;
}
strong.select2-results__group {
padding: 0 !important;
}
.my_select2_optgroup {
display: block;
padding: 6px;
}
</style>
@endpush
@section('title') Dashboard @endsection
@section('content')
@component('components.breadcrumb')
@slot('li_1') Dashboards @endslot
@slot('title') Dashboard @endslot
@endcomponent
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-header card-header-icon card-header-info">
<div class="card-icon">
<i class="fa fa-industry"></i>
</div>
<h4 class="card-title">Company Setting
</h4>
</div>
<div class="card-body">
<form action="{{route('user.setting')}}" method="POST" enctype="multipart/form-data">@csrf
<div class="row">
<div class="col-md-4">
<div class="form-group">
<label class="bmd-label-floating mt-3">Company Name </label>
<input type="text" name="name" class="form-control" value="{{$company->name}}" >
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label class="bmd-label-floating mt-3">Company type</label>
<select class="form-control" name="type[]" id="example" multiple>
@foreach(\App\Models\Item::where('parent_id', 0)->orderBy('name', 'asc')->get() as $currency)
@php
$data = explode (",", $company->type);
if(!is_array($data)){
$data = [];
}
@endphp
<option value="{{$currency->name}}" @if(in_array($currency->name, $data)) selected @endif>{{$currency->name}}</option>
@endforeach
</select>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label class="bmd-label-floating mt-3"> Category Product</label>
@php
$data = json_decode($company->main_products, true);
if(!is_array($data)){
$data = [];
}
@endphp
<select class="form-control" name="main_products[]" id="example1" multiple>
@foreach(\App\Models\Category::where('parent_id', $company->user->category_id)->get() as $currency)
<option value="{{$currency->name}}" @if(in_array($currency->name, $data)) selected @endif>{{$currency->name ?? ''}}</option>
@endforeach
</select>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label class="bmd-label-floating mt-3">Address</label>
<input type="text" name="address" class="form-control" value="{{$company->address}}" >
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label class="bmd-label-floating mt-3">Phone </label>
<input type="text" name="phone" class="form-control" value="{{ $company->phone }}" >
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label class="bmd-label-floating mt-3 ">Total Staff </label>
<input type="text" name="total_staff" class="form-control" value="{{$company->total_staff}}" >
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label class="bmd-label-floating mt-3">Employee Range</label>
<input type="text" name="employee" class="form-control" value="{{$company->employee}}" >
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label class="bmd-label-floating mt-3">Revenue </label>
<input type="text" name="revenue" class="form-control" value="{{$company->revenue}}" >
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label class="bmd-label-floating mt-3">Location </label>
<input type="text" name="location" class="form-control" value="{{$company->location}}" >
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label class="bmd-label-floating mt-3">Web Site Url</label>
<input type="text" name="web" class="form-control" value="{{$company->web}}" >
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label class="bmd-label-floating mt-3">Established Year </label>
<input type="text" name="year" class="form-control" value="{{$company->year}}" >
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label class="bmd-label-floating mt-3">Main Market </label>
<input type="text" name="main_market" class="form-control" value="{{$company->main_market}}" >
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label class="bmd-label-floating mt-3">Youtube Video ID</label>
<input type="text" name="youtube" class="form-control" value="{{$company->youtube}}" >
</div>
</div>
<div class="col-md-4">
</div>
<div class="col-md-6 my-5">
<div class="form-group">
<h3 class="mb-3">Enter Description</h3>
<textarea id="elm1" name="des" class="form-control mb-5" placeholder="Enter Details">{!! $company->des !!}</textarea>
</div>
</div>
<div class="col-md-6 my-5">
<div class="form-group">
<h3 class="mb-3">Enter Overview</h3>
<textarea id="elm2" name="overview" class="form-control" placeholder="Enter Overview"> {!! $company->overview !!}</textarea>
</div>
</div>
<div class="col-md-6 col-sm-12">
<div class="form-group">
<label class="bmd-label-floating">Company Logo </label>
<input class="form-control form-control-lg" type="file" name="image" id="files" class="form-control" >
</div>
</div>
<div class="col-md-6 col-sm-12">
<div class="form-group">
<label class="bmd-label-floating">Company story</label>
<textarea class="form-control form-control-lg" name="story" placeholder='Enter Your Story' class="form-control" >{{ $company->story }}</textarea>
</div>
</div>
<h4 class="card-title">Company Meta Information</h4>
<div class="col-md-6">
<div class="form-group">
<label class="bmd-label-floating mt-3">Meta Author</label>
<input type="text" name="meta_author" class="form-control" value="{{$company->meta_author}}" >
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="bmd-label-floating mt-3">Meta Title</label>
<input type="text" name="meta_title" class="form-control" value="{{$company->meta_title}}" >
</div>
</div>
<div class="col-md-6 my-2">
<div class="form-group">
<label class="bmd-label-floating">Meta Description</label>
<textarea id="elm1" name="meta_description" class="form-control mb-5" placeholder="Enter Details">{{ $company->meta_description }}</textarea>
</div>
</div>
<div class="col-md-6 my-2">
<div class="form-group">
<label class="bmd-label-floating">Meta Tages</label>
<input id="elm1" name="meta_tage" class="form-control mb-5" placeholder="Enter Details" value=" {{ $company->meta_tage }}"/>
</div>
</div>
</div>
<button type="submit" class="btn btn-info mt-5">Upload</button>
<div class="clearfix"></div>
</form>
</div>
</div>
</div>
</div>
@endsection
@section('script')
<!-- apexcharts -->
<script src="{{ asset('/assets/libs/select2/select2.min.js') }}"></script>
<!-- dropzone plugin -->
<script src="{{ asset('/assets/libs/dropzone/dropzone.min.js') }}"></script>
<script src="{{ asset('assets/libs/tinymce/tinymce.min.js') }}"></script>
<!-- init js -->
<script src="{{ asset('/assets/js/pages/ecommerce-select2.init.js') }}"></script>
<script src="{{ asset('assets/js/pages/form-editor.init.js') }}"></script>
<script>
$(function() {
$('#example').select2({
multiple: true,
maximumSelectionSize: 1,
placeholder: "Select Company Type"
});
});
$(function() {
$('#example1').select2({
multiple: true,
maximumSelectionSize: 1,
placeholder: "Select Main Product"
});
});
var FRUIT_GROUPS = [
{
id: '',
text: 'Citrus',
children: [
{ id: 'c1', text: 'Grapefruit' },
{ id: 'c2', text: 'Orange' },
{ id: 'c3', text: 'Lemon' },
{ id: 'c4', text: 'Lime' }
]
},
{
id: '',
text: 'Other',
children: [
{ id: 'o1', text: 'Apple' },
{ id: 'o2', text: 'Mango' },
{ id: 'o3', text: 'Banana' }
]
}
];
$('#fruitSelect').select2({
multiple: true,
placeholder: "Select fruits...",
data: FRUIT_GROUPS,
query: function(options) {
var selectedIds = options.element.select2('val');
var selectableGroups = $.map(this.data, function(group) {
var areChildrenAllSelected = true;
$.each(group.children, function(i, child) {
if (selectedIds.indexOf(child.id) < 0) {
areChildrenAllSelected = false;
return false; // Short-circuit $.each()
}
});
return !areChildrenAllSelected ? group : null;
});
options.callback({ results: selectableGroups });
}
}).on('select2-selecting', function(e) {
var $select = $(this);
if (e.val == '') { // Assume only groups have an empty id
e.preventDefault();
$select.select2('data', $select.select2('data').concat(e.choice.children));
$select.select2('close');
}
});
if ($("#elm2").length > 0) {
tinymce.init({
selector: "textarea#elm2",
height: 300,
plugins: ["advlist autolink link image lists charmap print preview hr anchor pagebreak spellchecker", "searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking", "save table contextmenu directionality emoticons template paste textcolor"],
toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | l ink image | print preview media fullpage | forecolor backcolor emoticons",
style_formats: [{
title: 'Bold text',
inline: 'b'
}, {
title: 'Red text',
inline: 'span',
styles: {
color: '#ff0000'
}
}, {
title: 'Red header',
block: 'h1',
styles: {
color: '#ff0000'
}
}, {
title: 'Example 1',
inline: 'span',
classes: 'example1'
}, {
title: 'Example 2',
inline: 'span',
classes: 'example2'
}, {
title: 'Table styles'
}, {
title: 'Table row 1',
selector: 'tr',
classes: 'tablerow1'
}]
});
}
</script>
@endsection
{{-- @extends('user.layouts.app')
@push('style')
@endpush
@section('content')
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-header card-header-icon card-header-info">
<div class="card-icon">
<i class="material-icons">add_task</i>
</div>
<h4 class="card-title">Company Setting
</h4>
</div>
<div class="card-body">
<form action="{{route('user.setting')}}" method="POST" enctype="multipart/form-data">@csrf
<div class="row">
<div class="col-md-4">
<div class="form-group">
<label class="bmd-label-floating mt-3">Company Name </label>
<input type="text" name="name" class="form-control" value="{{$company->name}}" >
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label class="bmd-label-floating mt-3"></label>
<select class="form-control" name="type" >
<option value="">Select Company Type</option>
@foreach(\App\Models\Category::where('parent_id', 0)->orderBy('name', 'asc')->get() as $currency)
<option value="{{$currency->name}}" @if($currency->name == $company->type) selected @endif>{{$currency->name}}</option>
@endforeach
</select>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label class="bmd-label-floating mt-3">Main Products </label>
<input type="text" name="main_products" class="form-control" value="{{$company->main_products}}" >
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label class="bmd-label-floating mt-3">Address</label>
<input type="text" name="address" class="form-control" value="{{$company->address}}" >
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label class="bmd-label-floating mt-3">Phone </label>
<input type="text" name="phone" class="form-control" value="@if(!empty($company->phone)) +{{Auth::user()->country->phonecode}} @else {{$company->phone}} @endif" >
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label class="bmd-label-floating mt-3">Total Staff </label>
<input type="text" name="total_staff" class="form-control" value="{{$company->total_staff}}" >
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label class="bmd-label-floating mt-3">Employee Range</label>
<input type="text" name="employee" class="form-control" value="{{$company->employee}}" >
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label class="bmd-label-floating mt-3">Revenue </label>
<input type="text" name="revenue" class="form-control" value="{{$company->revenue}}" >
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label class="bmd-label-floating mt-3">Location </label>
<input type="text" name="location" class="form-control" value="{{$company->location}}" >
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label class="bmd-label-floating mt-3">Web Site Url</label>
<input type="text" name="web" class="form-control" value="{{$company->web}}" >
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label class="bmd-label-floating mt-3">Established Year </label>
<input type="text" name="year" class="form-control" value="{{$company->year}}" >
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label class="bmd-label-floating mt-3">Main Market </label>
<input type="text" name="main_market" class="form-control" value="{{$company->main_market}}" >
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label class="bmd-label-floating mt-3">Youtube Video ID</label>
<input type="text" name="youtube" class="form-control" value="{{$company->youtube}}" >
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label class="bmd-label-floating mt-3">Code Of Conduct </label>
<input type="text" name="conduct" class="form-control" value="{{$company->contact}}" >
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label class="bmd-label-floating mt-3">Patent </label>
<input type="text" name="patent" class="form-control" value="{{$company->patent}}" >
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label class="bmd-label-floating mt-3">Awards </label>
<input type="text" name="awards" class="form-control" value="{{$company->awards}}" >
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label class="bmd-label-floating mt-3">Technical Equipment </label>
<input type="text" name="equipment" class="form-control" value="{{$company->equipment}}" >
</div>
</div>
<div class="col-md-6 mb-5">
<div class="form-group">
<h3 class="mb-3">Enter Description</h3>
<textarea id="elm1" name="des" class="form-control mb-5" placeholder="Enter Details">{!! $company->des !!}</textarea>
</div>
</div>
<div class="col-md-6 mb-5">
<div class="form-group">
<h3 class="mb-3">Enter Overview</h3>
<textarea id="elm1" name="overview" class="form-control mb-5" placeholder="Enter Overview"> {!! $company->overview !!}</textarea>
</div>
</div>
<div class="col-md-3 col-sm-4">
<h4 class="title">Logo Image</h4>
<div class="fileinput fileinput-new text-center" data-provides="fileinput">
<div class="fileinput-new thumbnail">
<img src="@if(empty($company->image)) {{asset('assets/backend/img/image_placeholder.jpg')}} @else {{asset('storage/images/user/avatar/'.$company->image.'')}} @endif" alt="NO image avialable">
</div>
<div class="fileinput-preview fileinput-exists thumbnail"></div>
<div>
<span class="btn btn-info btn-round btn-file">
<span class="fileinput-new">Select image</span>
<span class="fileinput-exists">Change</span>
<input type="file" name="image" />
</span>
<a href="#pablo" class="btn btn-danger btn-round fileinput-exists" data-dismiss="fileinput"><i class="fa fa-times"></i> Remove</a>
</div>
</div>
</div>
</div>
<button type="submit" class="btn btn-info mt-5">Upload</button>
<div class="clearfix"></div>
</form>
</div>
</div>
</div>
</div>
</div>
@stop
@section('script')
<script src="{{ asset('/assets/libs/select2/select2.min.js') }}"></script>
<!-- dropzone plugin -->
<script src="{{ asset('/assets/libs/dropzone/dropzone.min.js') }}"></script>
<script src="{{ asset('assets/libs/tinymce/tinymce.min.js') }}"></script>
<!-- init js -->
<script src="{{ asset('/assets/js/pages/ecommerce-select2.init.js') }}"></script>
<script src="{{ asset('assets/js/pages/form-editor.init.js') }}"></script>
<script>
$(function() {
$('#example').select2({
multiple: true,
maximumSelectionSize: 1
});
});
</script>
@endsection
--}}