|
Server : Apache/2.4.41 (Ubuntu) System : Linux vmi1525618.contaboserver.net 5.4.0-105-generic #119-Ubuntu SMP Mon Mar 7 18:49:24 UTC 2022 x86_64 User : www-data ( 33) PHP Version : 8.2.12 Disable Function : NONE Directory : /var/www/leadai/leadai.co.in/storage/framework/views/ |
Upload File : |
<?php $__env->startSection('content'); ?>
<!-- begin::main content -->
<style>
/* Styles for tabs */
.tab {
display: inline-block;
padding: 16px 26px;
cursor: pointer;
background-color: #E6EAED;
margin-right: -4px; /* Remove spacing between tabs */
}
/* Style for highlighted tab */
.tab.active {
background-color: white;
}
/* Content area style */
.tab-content {
padding: 20px;
border-radius: 0 0 5px 5px;
display: none; /* Hide all content areas by default */
}
/* Show active content area */
.tab-content.active {
display: block;
}
.form-group {
margin-bottom: 1rem;
margin-bottom: 30px !important;
}
.form-group input, .form-group select{
height:42px;
padding-top:10px 25px !important;
}
.form-group label, .tab{
font-size:14px !important;
}
.company-save-btn{
position:fixed;
bottom:0;left:250px;
background-color:white;
border-top:1px solid #ccc;
}
@media only screen and (max-width: 768px) {
.company-save-btn{
position:fixed;
bottom:0;left:0px;
background-color:white;
border-top:1px solid #ccc;
}
}
</style>
<main class="main-content">
<div class="container">
<!-- begin::page header -->
<div class="page-header">
<h3>Add Company</h3>
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<?php echo e(asset('dashboard')); ?>">Dashboard</a></li>
<li class="breadcrumb-item" aria-current="page"><a href="<?php echo e(asset('company-list')); ?>">Company</a></li>
<li class="breadcrumb-item active" aria-current="page">Add</li>
</ol>
</nav>
</div>
<!-- end::page header -->
<div class="row">
<div class="col-md-12">
<?php if (isset($component)) { $__componentOriginal8a5ba9c90b64d384232e9948b1023e746ba08e74 = $component; } ?>
<?php $component = $__env->getContainer()->make(App\View\Components\FlashMessage::class, []); ?>
<?php $component->withName('flashMessage'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal8a5ba9c90b64d384232e9948b1023e746ba08e74)): ?>
<?php $component = $__componentOriginal8a5ba9c90b64d384232e9948b1023e746ba08e74; ?>
<?php unset($__componentOriginal8a5ba9c90b64d384232e9948b1023e746ba08e74); ?>
<?php endif; ?>
<div class="card py-3">
<div class="card-body">
<form action="<?php echo e(asset('edit-company')); ?>" method="post">
<input type="hidden" value="<?php echo e($company->id); ?>" name="company_id">
<div class="row">
<div class="col-md-6">
<?php echo csrf_field(); ?>
<div class="form-group d-flex justify-content-between align-items-center ">
<label for="company_name">Company Name</label>
<input type="text" class="form-control w-75" value="<?php echo e($company->company_name); ?>" name="company_name" id="company_name" placeholder="Enter Company Name" required>
</div>
<?php if($errors->has('company_name')): ?>
<div class="error">
<?php echo e($errors->first('company_name')); ?>
</div>
<?php endif; ?>
<div class="form-group d-flex justify-content-between align-items-center">
<label for="email">Email <span class="text-danger">*</span></label>
<input type="email" value="<?php echo e($company->email); ?>" class="form-control w-75" name="email" placeholder="Enter the email">
<?php if($errors->has('email')): ?>
<div class="error">
<?php echo e($errors->first('email')); ?>
</div>
<?php endif; ?>
</div>
<div class="form-group d-flex justify-content-between align-items-center">
<label for="phone">Mobile/Phone </label>
<input type="number" value="<?php echo e($company->phone); ?>" class="form-control w-75" name="phone" id="phone" placeholder="Enter Phone">
<?php if($errors->has('phone')): ?>
<div class="error">
<?php echo e($errors->first('phone')); ?>
</div>
<?php endif; ?>
</div>
<div class="form-group d-flex justify-content-between align-items-center">
<label for="gst_treatment">GST Treatment </label>
<select class="form-control w-75" name="gst_treatment" id="gst_treatment">
<option value="registered" <?php echo e($company->gst_treatment=="registered" ? 'selected' : ''); ?>>Registered</option>
<option value="unregistered business" <?php echo e($company->gst_treatment=="unregistered business" ? 'selected' : ''); ?>>Unregistered Business</option>
<option value="exempt" <?php echo e($company->gst_treatment=="exempt" ? 'selected' : ''); ?>>Exempt</option>
</select>
<?php if($errors->has('gst_treatment')): ?>
<div class="error">
<?php echo e($errors->first('gst_treatment')); ?>
</div>
<?php endif; ?>
</div>
<div class="form-group d-flex justify-content-between align-items-center">
<label for="gstn">GSTN</label>
<input type="text" value="<?php echo e($company->gstn); ?>" class="form-control w-75" name="gstn" id="gstn" placeholder="Enter GSTN">
<?php if($errors->has('gstn')): ?>
<div class="error">
<?php echo e($errors->first('gstn')); ?>
</div>
<?php endif; ?>
</div>
<div class="form-group d-flex justify-content-between align-items-center">
<label for="website">Website (Optional)</label>
<input type="text" value="<?php echo e($company->website); ?>" class="form-control w-75" name="website" id="website" placeholder="Enter website url">
</div>
<div class="form-group d-flex justify-content-between align-items-center">
<label for="contact_person">Contact Person</label>
<input type="text" value="<?php echo e($company->contact_person); ?>" class="form-control w-75" name="contact_person" id="contact_person" placeholder="Enter Contact Person">
<?php if($errors->has('contact_person')): ?>
<div class="error">
<?php echo e($errors->first('contact_person')); ?>
</div>
<?php endif; ?>
</div>
<div class="form-group d-flex justify-content-between align-items-center">
<label for="designation">Designation</label>
<input type="text" value="<?php echo e($company->designation); ?>" class="form-control w-75" name="designation" id="designation" placeholder="Enter Designation">
<?php if($errors->has('designation')): ?>
<div class="error">
<?php echo e($errors->first('designation')); ?>
</div>
<?php endif; ?>
</div>
<div class="form-group d-flex justify-content-between align-items-center">
<label for="contact_phone">Contact Phone</label>
<input type="text" value="<?php echo e($company->contact_phone); ?>" class="form-control w-75" name="contact_phone" id="contact_phone" placeholder="Enter Phone">
<?php if($errors->has('contact_phone')): ?>
<div class="error">
<?php echo e($errors->first('contact_phone')); ?>
</div>
<?php endif; ?>
</div>
<div class="form-group d-flex justify-content-between align-items-center">
<label for="contact_email">Contact Email</label>
<input type="text" value="<?php echo e($company->contact_email); ?>" class="form-control w-75" name="contact_email" id="contact_email" placeholder="Enter Email">
<?php if($errors->has('contact_email')): ?>
<div class="error">
<?php echo e($errors->first('contact_email')); ?>
</div>
<?php endif; ?>
</div>
<div class="form-group d-flex justify-content-between align-items-center">
<label for="branch_limit">Branch Limit</label>
<input type="number" value="<?php echo e($company->branch_limit); ?>" class="form-control w-75" name="branch_limit" id="branch_limit" placeholder="0">
<?php if($errors->has('branch_limit')): ?>
<div class="error">
<?php echo e($errors->first('branch_limit')); ?>
</div>
<?php endif; ?>
</div>
</div>
<div class="col-md-6 border px-0">
<!-- Tabs -->
<div id="tabs">
<div class="tab active" onclick="openTab('tab1')">Location Address</div>
<div class="tab" onclick="openTab('tab2')">Other Info</div>
<div class="tab" onclick="openTab('tab3')">Notes</div>
</div>
<!-- Tab content -->
<div class="tab-content active" id="tab1">
<h5>Location Address</h5>
<div class="form-group d-flex justify-content-between align-items-center">
<label for="location_type">Location Type <span class="text-danger">*</span></label>
<select class="form-control w-75" name="location_type" id="location_type">
<option disabled selected>---Select---</option>
<option value="head office" <?php echo e($company->location_type=='head office' ? 'selected' : ''); ?>>Head Office</option>
<option value="branch" <?php echo e($company->location_type=='branch' ? 'selected' : ''); ?>>Branch</option>
<option value="warehouse" <?php echo e($company->location_type=='warehouse' ? 'selected' : ''); ?>>Warehorse</option>
<option value="showroom" <?php echo e($company->location_type=='showroom' ? 'selected' : ''); ?>>Showroom</option>
<option value="other" <?php echo e($company->location_type=='other' ? 'selected' : ''); ?>>Other</option>
</select>
<?php if($errors->has('location_type')): ?>
<div class="error">
<?php echo e($errors->first('location_type')); ?>
</div>
<?php endif; ?>
</div>
<div class="form-group d-flex justify-content-between align-items-center">
<label for="location_address">Address <span class="text-danger">*</span></label>
<input value="<?php echo e($company->location_address); ?>" class="form-control w-75" name="location_address" id="address">
<?php if($errors->has('location_address')): ?>
<div class="error">
<?php echo e($errors->first('location_address')); ?>
</div>
<?php endif; ?>
</div>
<div class="form-group row d-flex justify-content-between align-items-center">
<label for="location_city" class="col-2">City</label>
<div class="d-flex flex-column col-10 pl-5" style="position:relative;">
<input type="search" value="<?php echo e($company->location_city); ?>" readonly class="form-control text-capitalize location_city" name="location_city" id="location_city" placeholder="Select City" >
<div class="main-add-city-box bg-white border mb-2 d-none" style="width:85%;position:absolute;top:40px;">
<div class="add-search-city-box d-none mb-2"></div>
<div class="location_city_search_box d-none px-2 "></div>
</div>
</div>
<?php if($errors->has('location_city')): ?>
<div class="error">
<?php echo e($errors->first('location_city')); ?>
</div>
<?php endif; ?>
</div>
<div class="form-group d-flex justify-content-between align-items-center">
<label for="location_country">Country</label>
<select class="form-control w-75" name="location_country" id="location_country">
<option selected>--Select--</option>
<?php $__currentLoopData = $country; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $cnt): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option value="<?php echo e($cnt->id); ?>" <?php echo e($company->location_country==$cnt->id?'selected':''); ?>><?php echo e($cnt->name); ?></option>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</select>
<?php if($errors->has('location_country')): ?>
<div class="error">
<?php echo e($errors->first('location_country')); ?>
</div>
<?php endif; ?>
</div>
<div class="form-group d-flex justify-content-between align-items-center">
<label for="location_state">State</label>
<select class="form-control w-75" name="location_state" id="location_state">
<option selected value="<?php echo e($company->loc_state ?$company->loc_state->id: ''); ?>"><?php echo e($company->loc_state ?$company->loc_state->state_name: ''); ?></option>
</select>
<?php if($errors->has('location_state')): ?>
<div class="error">
<?php echo e($errors->first('location_state')); ?>
</div>
<?php endif; ?>
</div>
<div class="form-group d-flex justify-content-between align-items-center">
<label for="location_pincode">Pincode</label>
<input type="text" value="<?php echo e($company->location_pincode); ?>" class="form-control w-75" name="location_pincode" id="location_pincode" placeholder="Enter Pincode">
<?php if($errors->has('location_pincode')): ?>
<div class="error">
<?php echo e($errors->first('location_pincode')); ?>
</div>
<?php endif; ?>
</div>
<button class="btn btn-info billing-btn-toggle" type="button">
<i class="fa fa-plus"></i>  Add Billing Address
</button>
<div class="billing-address-main d-none" style="padding-top:20px;">
<h5>Billing Address</h5>
<div class="form-group d-flex justify-content-between align-items-center">
<label for="billing_address">Address <span class="text-danger">*</span></label>
<input value="<?php echo e($company->billing_address); ?>" type="text" class="form-control w-75" name="billing_address" id="billing_address">
<?php if($errors->has('billing_address')): ?>
<div class="error">
<?php echo e($errors->first('billing_address')); ?>
</div>
<?php endif; ?>
</div>
<div class="form-group row d-flex justify-content-between align-items-center">
<label for="billing_city" class="col-2">City</label>
<div class="d-flex flex-column col-10 pl-5" style="position:relative;">
<input type="search" value="<?php echo e($company->billing_city); ?>" readonly class="form-control text-capitalize billing_city" name="billing_city" id="billing_city" placeholder="Select City" >
<div class="billing-main-add-city-box bg-white border mb-2 d-none" style="width:85%;position:absolute;top:40px;">
<div class="billing-add-search-city-box d-none mb-2"></div>
<div class="billing_city_search_box d-none px-2 "></div>
</div>
</div>
<?php if($errors->has('location_city')): ?>
<div class="error">
<?php echo e($errors->first('location_city')); ?>
</div>
<?php endif; ?>
</div>
<div class="form-group d-flex justify-content-between align-items-center">
<label for="billing_country">Country</label>
<select class="form-control w-75" name="billing_country_id" id="billing_country" >
<option selected disabled>--Select--</option>
<?php $__currentLoopData = $country; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $cnt): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option value="<?php echo e($cnt->id); ?>" <?php echo e($company->billing_country_id==$cnt->id?'selected':''); ?>><?php echo e($cnt->name); ?></option>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</select>
<?php if($errors->has('billing_country_id')): ?>
<div class="error">
<?php echo e($errors->first('billing_country_id')); ?>
</div>
<?php endif; ?>
</div>
<div class="form-group d-flex justify-content-between align-items-center">
<label for="billing_state">State</label>
<select class="form-control w-75" name="billing_state_id" id="billing_state">
<option selected value="<?php echo e($company->state ?$company->state->id: ''); ?>"><?php echo e($company->state ?$company->state->state_name: ''); ?></option>
</select>
<?php if($errors->has('billing_state_id')): ?>
<div class="error">
<?php echo e($errors->first('billing_state_id')); ?>
</div>
<?php endif; ?>
</div>
<div class="form-group d-flex justify-content-between align-items-center">
<label for="billing_pincode">Pincode</label>
<input type="text" value="" class="form-control w-75" name="billing_pincode" id="tag" placeholder="Enter Pincode">
<?php if($errors->has('billing_pincode')): ?>
<div class="error">
<?php echo e($errors->first('billing_pincode')); ?>
</div>
<?php endif; ?>
</div>
</div>
</div>
<div class="tab-content" id="tab2">
<div class="form-group d-flex justify-content-between align-items-center">
<label for="youtube">YouTube</label>
<input value="<?php echo e($company->youtube==null ? '' : $company->youtube); ?>" class="form-control w-75" name="youtube" id="youtube">
<?php if($errors->has('youtube')): ?>
<div class="error">
<?php echo e($errors->first('youtube')); ?>
</div>
<?php endif; ?>
</div>
<div class="form-group d-flex justify-content-between align-items-center">
<label for="facebook">Facebook</label>
<input value="<?php echo e($company->facebook==null ? '' : $company->facebook); ?>" class="form-control w-75" name="facebook" id="facebook">
<?php if($errors->has('facebook')): ?>
<div class="error">
<?php echo e($errors->first('facebook')); ?>
</div>
<?php endif; ?>
</div>
<div class="form-group d-flex justify-content-between align-items-center">
<label for="instagram">Instagram</label>
<input value="<?php echo e($company->instagram==null ? '' : $company->instagram); ?>" class="form-control w-75" name="instagram" value="" id="instagram">
<?php if($errors->has('instagram')): ?>
<div class="error">
<?php echo e($errors->first('instagram')); ?>
</div>
<?php endif; ?>
</div>
</div>
<div class="tab-content" id="tab3">
<textarea rows="7" name="notes" class="form-control">
<?php echo e($company->notes==null ? '' : $company->notes); ?>
</textarea>
</div>
</div>
</div>
<div class="py-5" style="z-index:50;position:absolute" >
<div class="py-3 px-5 w-100 company-save-btn" >
<button type="submit" class="btn btn-success"><i class="fa fa-check"></i>  Save</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</main>
<!-- end::main content -->
<?php $__env->stopSection(); ?>
<?php $__env->startPush('footer-script'); ?>
<!-- begin::select2 -->
<link rel="stylesheet" href="<?php echo e(asset('public/admin/vendors/select2/css/select2.min.css')); ?>" type="text/css">
<script src="<?php echo e(asset('public/admin/vendors/select2/js/select2.min.js')); ?>"></script>
<!-- end::select2 -->
<script>
$(document).ready(function() {
$('#js-example-basic-roles').select2({});
});
$("#billing_country").on("change",function(){
var company_id = $(this).val();
stateFetch(company_id,"billing_state");
});
$("#location_country").on("change",function(){
var company_id = $(this).val();
stateFetch(company_id,"location_state");
});
function stateFetch(company_id,appendState)
{
$.ajax({
type: "post",
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
},
data: {
"id": company_id
},
url: "<?php echo e(asset('fetch-state')); ?>",
dataType: "html",
success: function(result)
{
$("#"+appendState).html("");
var allData = JSON.parse(result);
if(allData.message=="success")
{
var data = allData.data;
var i;
var dOption = "<option selected disabled>--Select--</option>";
$("#"+appendState).append(dOption);
for(i=0;i<data.length;i++)
{
var option = `<option value="${data[i].id}">
${data[i].state_name}
</option>
`;
$("#"+appendState).append(option);
}
}
else
{
console.log("failed");
}
},
error:function(xhr,error,status)
{
console.log(JSON.parse(xhr.responseText));
}
});
}
//location city code
$("#location_city").on("click",function(){
//var search = $(this).val();
$(".location_city_search_box").html("");
$(".main-add-city-box").removeClass("d-none");
$(".add-search-city-box").removeClass("d-none");
var typed_city = `
<input type="search" class='form-control border search-city-val'
style='list-style:none;cursor:pointer'>`;
$(".add-search-city-box").html(typed_city);
$(".search-city-val").on('input',function(){
$(".location_city_search_box").removeClass("d-none");
var search = $(this).val();
$.ajax({
type: "post",
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
},
data: {
"search": search
},
url: "<?php echo e(asset('search-city')); ?>",
dataType: "html",
success: function(result)
{
$(".location_city_search_box").html("");
var allData = JSON.parse(result);
if(allData.message=="success")
{
//$(".location_city_search_box").removeClass('d-none');
var data = allData.data;
console.log(data);
var i;
var new_li = `<li class='text-capitalize rounded new_city_add_btn bg-dark text-white p-2 mb-2' addcity="${search}" style='list-style:none;cursor:pointer'>
Add  "${search}"...</li>`;
$(".location_city_search_box").append(new_li);
for(i=0;i<data.length;i++)
{
var li = `<li class='text-capitalize rounded city_name_li bg-dark text-white p-2 mb-2' city='${data[i].city_name}' style='list-style:none;cursor:pointer'>
${data[i].city_name}</li>`;
$(".location_city_search_box").append(li);
}
$(".city_name_li").click(function(){
var city = $(this).attr('city');
console.log(city);
$("#location_city").val(city);
$(".location_city_search_box").addClass('d-none');
$(".main-add-city-box").addClass("d-none");
$(".add-search-city-box").addClass("d-none");
});
}
else
{
console.log("failed");
var new_li = `<li class='text-capitalize rounded new_city_add_btn bg-dark text-white p-2 mb-2' addcity="${search}" style='list-style:none;cursor:pointer'>
Add  "${search}"...</li>`;
$(".location_city_search_box").append(new_li);
}
$(".new_city_add_btn").click(function(){
var city = $(this).attr('addcity');
var loc_city = $("#location_city").val(city);
// alert(loc_city);
//var city_name = $("#b_city_name").val();
addCity(city,"main-add-city-box","location_city");
});
},
error:function(xhr,error,status)
{
console.log(JSON.parse(xhr.responseText));
var new_li = `<li class='text-capitalize rounded new_city_add_btn bg-dark text-white p-2 mb-2' addcity="${search}" style='list-style:none;cursor:pointer'>
Add  "${search}"...</li>`;
$(".location_city_search_box").append(new_li);
}
});
});
});
//city code
$("#billing_city").on("click",function(){
//var search = $(this).val();
$(".billing_city_search_box").html("");
$(".billing-main-add-city-box").removeClass("d-none");
$(".billing-add-search-city-box").removeClass("d-none");
var typed_city = `
<input type="search" class='form-control border search-city-val'
style='list-style:none;cursor:pointer'>`;
$(".billing-add-search-city-box").html(typed_city);
$(".search-city-val").on('input',function(){
$(".billing_city_search_box").removeClass("d-none");
var search = $(this).val();
$.ajax({
type: "post",
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
},
data: {
"search": search
},
url: "<?php echo e(asset('search-city')); ?>",
dataType: "html",
success: function(result)
{
$(".billing_city_search_box").html("");
var allData = JSON.parse(result);
if(allData.message=="success")
{
//$(".location_city_search_box").removeClass('d-none');
var data = allData.data;
console.log(data);
var i;
var new_li = `<li class='text-capitalize rounded new_city_add_btn bg-dark text-white p-2 mb-2' addcity="${search}" style='list-style:none;cursor:pointer'>
Add  "${search}"...</li>`;
$(".billing_city_search_box").append(new_li);
for(i=0;i<data.length;i++)
{
var li = `<li class='text-capitalize rounded city_name_li bg-dark text-white p-2 mb-2' city='${data[i].city_name}' style='list-style:none;cursor:pointer'>
${data[i].city_name}</li>`;
$(".billing_city_search_box").append(li);
}
$(".city_name_li").click(function(){
var city = $(this).attr('city');
console.log(city);
$("#billing_city").val(city);
$(".billing_city_search_box").addClass('d-none');
$(".billing-main-add-city-box").addClass("d-none");
$(".billing-add-search-city-box").addClass("d-none");
});
}
else
{
console.log("failed");
var new_li = `<li class='text-capitalize rounded new_city_add_btn bg-dark text-white p-2 mb-2' addcity="${search}" style='list-style:none;cursor:pointer'>
Add  "${search}"...</li>`;
$(".billing_city_search_box").append(new_li);
}
$(".new_city_add_btn").click(function(){
var city = $(this).attr('addcity');
var loc_city = $("#billing_city").val(city);
// alert(loc_city);
//var city_name = $("#b_city_name").val();
addCity(city,"billing-main-add-city-box","billing_city");
});
},
error:function(xhr,error,status)
{
console.log(JSON.parse(xhr.responseText));
var new_li = `<li class='text-capitalize rounded new_city_add_btn bg-dark text-white p-2 mb-2' addcity="${search}" style='list-style:none;cursor:pointer'>
Add  "${search}"...</li>`;
$(".location_city_search_box").append(new_li);
}
});
});
});
$(".location-add-city-btn").click(function(){
if($(".location-add-city-box").hasClass("d-none"))
{
$(".location-add-city-box").removeClass("d-none");
$(".location-add-city-box").removeClass("animate__animated animate__fadeOut");
$(".location-add-city-box").addClass("animate__animated animate__bounceInRight");
$(".location-add-city-box i").removeClass("fa-plus");
$(".location-add-city-box i").addClass("fa-minus");
}
else
{
$(".location-add-city-box").removeClass("animate__animated animate__bounceInRight")
$(".location-add-city-box").addClass("animate__animated animate__fadeOut");
$(".location-add-city-box").addClass("d-none");
$(".location-add-city-box i").removeClass("fa-minus");
$(".location-add-city-box i").addClass("fa-plus");
}
});
$(".l-city-form-btn").click(function(){
var city_name = $("#l_city_name").val();
addCity(city_name,"location-add-city-box","location_city");
});
function addCity(city_name,cityformBox,city_input)
{
$.ajax({
type: "post",
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
},
data: {
"city_name": city_name
},
url: "<?php echo e(asset('add-city')); ?>",
dataType: "html",
success: function(result)
{
console.log(result);
var allData = JSON.parse(result);
if(allData.message=="success")
{
$("."+cityformBox).addClass("d-none");
$("."+city_input).val(allData.data);
}
else
{
//console.log("failed");
}
},
error:function(xhr,error,status)
{
console.log(JSON.parse(xhr.responseText));
}
});
}
function openTab(tabId) {
// Get all tabs and hide them
var tabs = document.querySelectorAll('.tab-content');
tabs.forEach(function(tab) {
tab.classList.remove('active');
});
// Remove active class from all tabs
var tabButtons = document.querySelectorAll('.tab');
tabButtons.forEach(function(button) {
button.classList.remove('active');
});
// Show the clicked tab and add active class
document.getElementById(tabId).classList.add('active');
document.querySelector('[onclick="openTab(\'' + tabId + '\')"]').classList.add('active');
}
$(".billing-btn-toggle").click(function(){
if($(".billing-address-main").hasClass('d-none'))
{
$(".billing-address-main").removeClass("d-none");
}
else
{
$(".billing-address-main").addClass("d-none");
}
});
</script>
<?php $__env->stopPush(); ?>
<?php echo $__env->make('layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH F:\xampp\htdocs\visitor_management\resources\views/company/edit.blade.php ENDPATH**/ ?>