<?php $__env->startSection('content'); ?>
    <link href="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/1.1.3/sweetalert.css" rel="stylesheet" />
    <style>
        form#ContactusForm input.submit_:hover {
            color: #ffffff !important;
            border-color: #00aec3 !important;
            background: #04A7D8;
            transition: .5s ease;
        }

        .footer_form_heading {
            margin: 0px;
        }

        span.mar-top {
            padding-top: 14px;
            display: table;
        }

        strong {
            margin-bottom: 20px;
            float: left;
            display: revert;
            width: 100%;
        }

        .profil-detail {
            text-align: left;
            margin: 0px 20px;
            border-bottom: 1px solid#e6e4e4;
            padding-bottom: 20px;
            margin-bottom: 20px;
        }

        label.mar-top {
            font-weight: 600;
            color: #000;
            padding: 0px 5px;
        }

        p.contact_field {
            border: none;
        }

        .profile-pic {
            background: #999;
            object-fit: cover;
        }

        .custom-file {
/*            height: auto;*/
        }

        label.ma-top {
            margin-top: 20px;
            color: #2f2f2f;
            font-weight: 600;
            font-size: 14px;
            padding: 0px 7px;
            margin-bottom: 13px;
        }

        a.forgot_login:before {
            content: "\f0a8";
            display: inline-block;
            font: normal normal normal 14px/1 FontAwesome;
            font-size: inherit;
            text-rendering: auto;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }

        span.admin img {
            height: 55px;
            margin: 10px;
        }

        p.contact_field input[type="number"] {
            border: none;
            border-bottom: 1px solid#c7c7c7;
        }

        p.contact_field input[type="text"] {
            border: none;
            border-bottom: 1px solid#c7c7c7;
        }

        p.contact_field input[type="email"] {
            border: none;
            border-bottom: 1px solid#c7c7c7;
        }

        p.contact_field textarea {
            border: none;
            line-height: 20px;
            border-bottom: 1px solid#a5a4a4;
        }

        .footer_form {
            padding: 0px;
        }

        .col-lg-7.col-md-7.col-sm-7.col-xs-12.form_details {
            margin-top: 50px;
            background: rgb(255, 255, 255);
            box-shadow: 0px 0px 20px #c1c1c1;
            border: 1px solid#bbb;
            margin-bottom: 60px;
        }

        input:focus,
        textarea:focus,
        keygen:focus,
        select:focus {
            outline-offset: 0px;
        }

        :focus {
            outline: -webkit-focus-ring-color auto 0px;
        }

        .form-inputs .form-group {
            margin-bottom: 5px;
            float: left;
            width: 100%;
        }

        .meddbot_title h3 {
            font-size: 30px;
            font-weight: 900;
            color: #09a64b;
        }

        .btn-primary {
            display: inline-block;
            transition: all 0.3s ease;
            -moz-transition: all 0.3s ease;
            -webkit-transition: all 0.3s ease;
            -ms-transition: all 0.3s ease;
            -o-transition: all 0.3s ease;
            position: relative;
            line-height: 24px;
            text-transform: uppercase;
            font-weight: 400;
            border: 2px solid #09a64b;
            transition: .5s ease;
            /* margin: 50px; */
            border-radius: 3px;
            padding: 10px 50px;
            background: #09a64b;
            color: #ffffff;
            font-size: 20px;
            left: 3vh;
            margin-top: 10px;
        }

        .btn-primary:hover {
            color: #09a64b !important;
            border-color: #09a64b;
            background: #ffffff;
            transition: .5s ease;
            cursor: pointer;
        }

        .menus>ul>li .sideIc img {
            margin: 4px 0 0;
        }

        .settings {
            background-color: #242336;
            display: -webkit-box;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-orient: vertical;
            -webkit-box-direction: normal;
            -ms-flex-direction: column;
            flex-direction: column;
            max-width: 425px;
            padding-top: 40px;
            padding-bottom: 40px;
            padding-left: 60px;
            padding-right: 60px;
            border-radius: 15px;
        }

        .settings h1 {
            margin: 0px;
            font-size: 24px;
            margin-bottom: 25px;
            font-weight: bold;
            color: white;
        }

        .settings form {
            display: -webkit-box;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-orient: vertical;
            -webkit-box-direction: normal;
            -ms-flex-direction: column;
            flex-direction: column;
        }

        .settings form>label {
            display: -webkit-box;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-align: center;
            -ms-flex-align: center;
            align-items: center;
            cursor: pointer;
        }

        .settings form>label input {
            width: 25px;
            height: 25px;
            margin-right: 10px;
            cursor: pointer;
        }

        .settings form>label input:checked {
            -webkit-appearance: none;
            -moz-appearance: none;
            appearance: none;
            background-color: #716af3;
            position: relative;
        }

        .settings form>label input:checked::after {
            content: "\2713";
            position: absolute;
            color: white;
            top: 50%;
            -webkit-transform: translateY(-50%);
            transform: translateY(-50%);
            left: 5px;
        }

        .settings form>label span {
            margin-top: 5px;
            margin-bottom: 5px;
            color: white;
            font-size: 16px;
        }

        .settings form>label+label {
            margin-top: 15px;
        }

        .settings form .settings__content {
            margin-left: -30px;
            background-color: #1e1d2e;
            margin-right: -30px;
            margin-top: 35px;
            margin-bottom: 35px;
        }

        .settings form .settings__content p {
            padding: 30px;
            color: #b3b2c5;
        }

        .settings form .settings__content p a {
            color: #716af3;
        }

        .settings form .settings__footer {
            display: -webkit-box;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-orient: vertical;
            -webkit-box-direction: normal;
            -ms-flex-direction: column;
            flex-direction: column;
        }

        .settings form .settings__footer h1 {
            margin-top: 0px;
            margin-bottom: 35px;
        }

        .settings form .settings__footer label {
            display: -webkit-box;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-align: center;
            -ms-flex-align: center;
            align-items: center;
            cursor: pointer;
        }

        .settings form .settings__footer label+label {
            margin-top: 15px;
        }

        .settings form .settings__footer label span {
            margin-top: 5px;
            margin-bottom: 5px;
            color: white;
        }

        .settings form .settings__footer label input {
            width: 30px;
            border-radius: 50%;
            margin-right: 10px;
            height: 30px;
            -webkit-appearance: none;
            -moz-appearance: none;
            appearance: none;
            background-color: white;
            cursor: pointer;
        }

        .settings form .settings__footer label input:checked {
            position: relative;
            background-color: #716af3;
        }

        .settings form .settings__footer label input:checked::after {
            background-color: white;
            content: "";
            border-radius: 50%;
            display: block;
            width: 15px;
            height: 15px;
            position: absolute;
            top: 50%;
            -webkit-transform: translateY(-50%);
            transform: translateY(-50%);
            left: 7px;
        }

        .settings form .settings__footer .send {
            margin-top: 50px;
        }

        .settings form .settings__footer .send input {
            line-height: 65px;
            border-radius: 5px;
            font-weight: bold;
            color: white;
            background-color: #716af3;
            border: none;
            cursor: pointer;
            width: 100%;
        }


        input[type="radio"] {
            width: 20px;
            height: 20px;
        }

        input[type="radio"]:checked+label.radio,
        input[type="radio"]:checked+label.radio::before {
            color: #142bff;
            border-color: #142bff
        }

        label.radio::before {
            content: "";
            width: 35px;
            height: 35px;
            border: 2px solid #00000066;
            border-radius: 50%;
            position: absolute;
            left: -2em;
        }

        label.radio::after {
            content: "";
            width: 10px;
            height: 20px;
            border: 5px solid #142bff;
            position: absolute;
            top: 16px;
            left: -47px;
            transform: translateY(-50%) rotate(45deg);
            border-left: none;
            border-top: none;
            visibility: hidden;
        }

        input[type="radio"]:checked+label.radio::after {
            visibility: visible;
        }

        input#myfile {
            display: block;
        }

        .profile-pic {
            border-radius: 50%;
            height: 150px;
            width: 150px;
            background-size: cover;
            background-position: center;
            background-blend-mode: multiply;
            vertical-align: middle;
            text-align: center;
            color: transparent;
            transition: all .3s ease;
            text-decoration: none;
            cursor: pointer;
        }

        .profile-pic:hover {
            background-color: rgba(0, 0, 0, .5);
            z-index: 10000;
            color: #fff;
            transition: all .3s ease;
            text-decoration: none;
        }

        .profile-pic span {
            display: inline-block;
            padding-top: 4.5em;
            padding-bottom: 4.5em;
        }

        #fileToUpload {
            cursor: pointer;
            display: none;
        }

        input#myfile {
            padding: 8px 14px;
        }

        .profil-detail h3 {
            font-size: 18px;
        }

        sup {
            color: red;
        }

        .incomplete {

            border-color: red !important;
        }

        .custom-file.newLeft {
            margin-top: -23px !important;
            margin-bottom: 0px !important;
        }

        .form-inputs .form-group {
            margin-bottom: 15px !importan;
        }

        .dropzone.dz-clickable.Dz-box.happy-box {
            font-size: 14px;
        }
        .bord{
            border-color: red !important;
        }
.footer_form {
    display: flex;
    flex-direction: column;
}.upload-btn-wrapper {
    width: 100% !important;
}
    </style>
    <link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css" rel="stylesheet" />

   
    <div class="common-content">
        <div class="page-content">

            
            <div class="container height">
                <div class="row">
                    <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 form_details" style="padding: 0px;">
                        <div class="footer_forms">
                            <form class="feedback-form" id="updateProfile" action="<?php echo e(url('user_profile_update')); ?>"
                                method="post" enctype="multipart/form-data">
                                <?php echo csrf_field(); ?>

                                <div class="footer_form">
                                    <h3 class="box-head">My Profile Details</h3>

                                    <div class="boxings row">
                                        <div class="footer_form_heading col-lg-12">
                                            <!--<form action="" method="post" enctype="multipart/form-data">-->
                                            <label for="fileToUpload">
                                                <!--<div class="profile-pic" style="background-image: url('<?php echo e(url('assets/images/propic.png')); ?>')">-->
                                                <!--</div>-->
                                                <?php if(!empty($userdata->pro_pic)): ?>
                                                    <img id="blah" class="profile-pic"
                                                        src="<?php echo e(url('/user_files')); ?>/<?php echo e($userdata->pro_pic); ?>"
                                                        alt="your image" />
                                                <?php else: ?>
                                                    <img id="blah" class="profile-pic"
                                                        src="<?php echo e(url('assets/images/propic.png')); ?>" alt="your image" />
                                                <?php endif; ?>
                                                <span class="glyphicon glyphicon-camera"></span>

                                            </label>
                                            <input type="file"  accept=".jpeg,.jpg,.png"  name="pro_pic" value="<?php echo e($userdata->pro_pic); ?>"
                                                style="display:none" id="propicid" onchange="readURL(this);" />
                                            <!--<input type="File"  name="propic" id="fileToUpload">-->

                                            <!--</form>-->

                                           
                                            <?php

                                        if (!empty($userdata->location)) {
                                                $val13 = '1';
                                            } else {
                                                $val13 = '0';
                                            }
                                            
                                            if (!empty($userdata->name)) {
                                                $val2 = '1';
                                            } else {
                                                $val2 = '0';
                                            }
                                            
                                            if (!empty($userdata->email)) {
                                                $val3 = '1';
                                            } else {
                                                $val3 = '0';
                                            }
                                            
                                            if (!empty($userdata->phone_no)) {
                                                $val4 = '1';
                                            } else {
                                                $val4 = '0';
                                            }
                                            
                                            if (!empty($userdata->address)) {
                                                $val5 = '1';
                                            } else {
                                                $val5 = '0';
                                            }
                                            
                                            if (!empty($userdata->state)) {
                                                $val6 = '1';
                                            } else {
                                                $val6 = '0';
                                            }
                                            
                                            if (!empty($userdata->city)) {
                                                $val7 = '1';
                                            } else {
                                                $val7 = '0';
                                            }
                                            
                                            if (!empty($userdata->zipcode)) {
                                                $val8 = '1';
                                            } else {
                                                $val8 = '0';
                                            }
                                            
                                            if (!empty($userdata->contact_name)) {
                                                $val9 = '1';
                                            } else {
                                                $val9 = '0';
                                            }
                                            
                                            if (!empty($userdata->contact_phone_no)) {
                                                $val10 = '1';
                                            } else {
                                                $val10 = '0';
                                            }
                                            
                                            if (Auth::user()->user_type == '1') {
                                                if (!empty($userdata->buyer_type)) {
                                                    $val11 = '1';
                                                } else {
                                                    $val11 = '0';
                                                }
                                            } elseif (Auth::user()->user_type == '2') {
                                                if (!empty($userdata->vendor_type)) {
                                                    $val11 = '1';
                                                } else {
                                                    $val11 = '0';
                                                }
                                            } elseif (Auth::user()->user_type == '3') {
                                                $val11 = '1';
                                            } elseif (Auth::user()->user_type == '4') {
                                                $val11 = '1';
                                            }
                                            elseif (Auth::user()->user_type == '7') {
                                                $val11 = '1';
                                            }
                                            elseif (Auth::user()->user_type == '5') {
                                                $val11 = '1';
                                            }
                                            
                                            if (!empty($userdata->description)) {
                                                $val12 = '1';
                                            } else {
                                                $val12 = '0';
                                            }

                                            
                                            
      

                                            
                                            $total = round((($val2 + $val3 + $val4 + $val5 + $val6 + $val7 + $val8 + $val9 + $val10 + $val11 + $val12 +$val13) * 100) / 12);
                                            
                                          
                                            
                                            ?>

                                            <div class="prgArea">
                                               
                                                <div class="progress">
                                                    <div class="progress-bar progress-bar-striped progress-bar-animated"
                                                        style="width:<?php echo e($total); ?>%"><?php echo e($total); ?>% Completed
                                                    </div>
                                                </div>

                                           
                                        
                                        </div>

                                        <div class="col-md-12 col-12 white-boxx" style="padding: 20px 0 0;">
                                            <div class="newform p-nw">
                                                <div class="row">

                                                    <?php if((Auth::user()->user_type != '4')): ?>
                                                    <div class="col-lg-12 col-md-12 col-sm12- col-xs-12">

                                                        <div class="form-inputs">
                                                            <div class="form-group">
                                                                <span>GST Registered</span>
                                                                <span><input type="checkbox" name="sendType"
                                                                        onchange="valueChanged()" id="gstCheck"
                                                                        <?php if(!empty($userdata->gst_no)){ ?> checked
                                                                        <?php } ?>></span>

                                                                <?php $__errorArgs = ['name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                                    <span class="invalid-feedback" role="alert">
                                                                        <strong><?php echo e($message); ?></strong>
                                                                    </span>
                                                                <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <?php endif; ?>

                                                    <div class="col-lg-6 col-md-12 col-sm12- col-xs-12 gst_no">
                                                        <div class="form-inputs">
                                                            <div class="form-group">
                                                                <label>GST No<sup>*</sup></label>
                                                                <input id="gst_no" type="text" required
                                                                    class="form-control <?php $__errorArgs = ['gst_no'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"
                                                                    name="gst_no" value="<?php echo e($userdata->gst_no); ?>" 
                                                                    autocomplete="gst_no">
                                                                <?php $__errorArgs = ['gst_no'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                                    <span class="invalid-feedback" role="alert">
                                                                        <strong><?php echo e($message); ?></strong>
                                                                    </span>
                                                                <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                                            </div>
                                                        </div>
                                                    </div>

                                                    <div class="col-lg-6 col-md-12 col-sm12- col-xs-12">
                                                        <div class="form-inputs">
                                                            <div class="form-group">
                                                                <label>Establishment Name<sup>*</sup></label>
                                                                <input id="name" type="text"
                                                                    class="form-control  <?php $__errorArgs = ['name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"
                                                                    name="name" value="<?php echo e($userdata->name); ?>" 
                                                                    autocomplete="name" autofocus <?php if ($val2 == 0) {
                                                                        echo "style='border-color: red;'";
                                                                    } ?>>
                                                                <?php $__errorArgs = ['name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                                    <span class="invalid-feedback" role="alert">
                                                                        <strong><?php echo e($message); ?></strong>
                                                                    </span>
                                                                <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="col-lg-6 col-md-12 col-sm12- col-xs-12">
                                                        <div class="form-inputs">
                                                            <div class="form-group">
                                                                <label>Email Id</label>
                                                                <input id="email" type="email"
                                                                    class="form-control <?php $__errorArgs = ['email'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"
                                                                    value="<?php echo e($userdata->email); ?>" readonly
                                                                    autocomplete="email">
                                                                <?php $__errorArgs = ['email'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                                    <span class="invalid-feedback" role="alert">
                                                                        <strong><?php echo e($message); ?></strong>
                                                                    </span>
                                                                <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="col-lg-6 col-md-12 col-sm12- col-xs-12">
                                                        <div class="form-inputs">
                                                            <div class="form-group">
                                                                <label>Primary Mobile No</label>
                                                                <input type="number" id="phone_no"
                                                                    class="form-control  <?php $__errorArgs = ['phone_no'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"
                                                                    value="<?php echo e($userdata->phone_no); ?>" readonly
                                                                    autocomplete="phone_no" autofocus <?php if ($val4 == 0) {
                                                                        echo "style='border-color: red;'";
                                                                    } ?>>
                                                                <?php $__errorArgs = ['phone_no'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                                    <span class="invalid-feedback" role="alert">
                                                                        <strong><?php echo e($message); ?></strong>
                                                                    </span>
                                                                <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="col-lg-12 col-md-12 col-sm12- col-xs-12">
                                                        <div class="form-inputs">
                                                            <div class="form-group">
                                                                <label>Address Lane<sup>*</sup></label>
                                                               
                                                                <textarea id="address" class="form-control <?php if ($val5 == 0) {?>bord<?php }?><?php $__errorArgs = ['address'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" name="address"
                                                                    autocomplete="address"  autofocus><?php echo e($userdata->address); ?></textarea>
                                                                <?php $__errorArgs = ['address'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                                    <span class="invalid-feedback" role="alert">
                                                                        <strong><?php echo e($message); ?></strong>
                                                                    </span>
                                                                <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="col-lg-6 col-md-12 col-sm12- col-xs-12">
                                                        <div class="form-inputs">
                                                            <div class="form-group">
                                                                <label>Country<sup>*</sup></label>
                                                                <!--<input type="text" id="state" class="form-control <?php $__errorArgs = ['state'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" name="state" value="<?php echo e(old('state')); ?>"  autocomplete="state" autofocus>-->
                                                                <select
                                                                    class="form-control  <?php $__errorArgs = ['state'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"
                                                                    id="country" name="state" autocomplete="state"
                                                                    autofocus >
                                                                   
                                                                   
                                                                        <option value="101">India</option>
                                                                  
                                                                </select>
                                                                <?php $__errorArgs = ['state'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                                    <span class="invalid-feedback" role="alert">
                                                                        <strong><?php echo e($message); ?></strong>
                                                                    </span>
                                                                <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="col-lg-6 col-md-12 col-sm12- col-xs-12">
                                                        <div class="form-inputs">
                                                            <div class="form-group">
                                                                <label>State<sup>*</sup></label>
                                                                <!-- <input type="text" id="city" class="form-control <?php $__errorArgs = ['city'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" name="city" value="<?php echo e(old('city')); ?>"  autocomplete="city" autofocus>-->
                                                                <select class="form-control" id="state" required
                                                                    name="city"  <?php if ($val7 == 0) {
                                                                        echo "style='border-color: red !important;'";
                                                                    } ?>>
                                                                     <option value="">Select</option>
                                                                    <?php $__currentLoopData = $states; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $state): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                                        <option value="<?php echo e($state->id); ?>"
                                                                            <?php if($state->id == $userdata->city){ ?>Selected<?php } ?>>
                                                                            <?php echo e($state->name); ?></option>
                                                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                                </select>
                                                                <?php $__errorArgs = ['city'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                                    <span class="invalid-feedback" role="alert">
                                                                        <strong><?php echo e($message); ?></strong>
                                                                    </span>
                                                                <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="col-lg-6 col-md-12 col-sm12- col-xs-12" id='districtDiv'>
                                                        <div class="form-inputs">
                                                            <div class="form-group">
                                                                <label>District<sup>*</sup></label>
                                                                <select class="form-control" id="district"
                                                                    name="district" <?php if ($val7 == 0) {
                                                                        echo "style='border-color: red !important;'";
                                                                    } ?>>
                                                                    <option value="">Select</option>
                                                                    <?php $__currentLoopData = $districts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $district): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                                        <option value="<?php echo e($district->id); ?>"
                                                                            <?php if($district->id == $userdata->district){ ?>Selected<?php } ?>>
                                                                            <?php echo e($district->name); ?></option>
                                                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                                </select>
                                                                <?php $__errorArgs = ['district'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                                    <span class="invalid-feedback" role="alert">
                                                                        <strong><?php echo e($message); ?></strong>
                                                                    </span>
                                                                <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                                            </div>
                                                        </div>
                                                    </div>
                                                

                                                    <div class="col-lg-6 col-md-12 col-sm12- col-xs-12">
                                                        <div class="form-inputs">
                                                            <div class="form-group">
                                                                <label>Location<sup>*</sup></label>
                                                                <input id="searchTextField" type="text"  class="form-control custom-fields mt-0 <?php if ($val13 == 0) { ?> bord  
                                                                    <?php } ?>  <?php $__errorArgs = ['location'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" name="location" value="<?php echo e($userdata->location); ?>" placeholder="Location">
                                                                <input type="hidden" id="cityLat" name="cityLat">
                                                                <input type="hidden" id="cityLng" name="cityLng">
                                                            </div>
                                                        </div>
                                                    </div>

                                                    <div class="col-lg-6 col-md-12 col-sm12- col-xs-12">
                                                        <div class="form-inputs">
                                                            <div class="form-group">
                                                                <label>Zip Code<sup>*</sup></label>
                                                                <input type="number" id="zipcode"
                                                                    class="form-control<?php if ($val8 == 0) { ?> bord<?php }?><?php $__errorArgs = ['zipcode'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"
                                                                    name="zipcode" 
                                                                    value="<?php echo e($userdata->zipcode); ?>"
                                                                    autocomplete="zipcode" autofocus >
                                                                <?php $__errorArgs = ['zipcode'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                                    <span class="invalid-feedback" role="alert">
                                                                        <strong><?php echo e($message); ?></strong>
                                                                    </span>
                                                                <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                                            </div>
                                                        </div>
                                                    </div>

                                                    <div class="col-lg-6 col-md-12 col-sm12- col-xs-12">
                                                        <div class="form-inputs">
                                                            <div class="form-group">
                                                                <label>Contact Person Name<sup>*</sup></label>
                                                                <input type="text" id="contact_name"
                                                                    
                                                                    class="form-control <?php if ($val9 == 0) {?>bord<?php }?><?php $__errorArgs = ['contact_name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"
                                                                    name="contact_name" 
                                                                    value="<?php echo e($userdata->contact_name); ?>"
                                                                    autocomplete="contact_name" autofocus>
                                                                <?php $__errorArgs = ['contact_name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                                    <span class="invalid-feedback" role="alert">
                                                                        <strong><?php echo e($message); ?></strong>
                                                                    </span>
                                                                <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="col-lg-6 col-md-12 col-sm12- col-xs-12">
                                                        <div class="form-inputs">
                                                            <div class="form-group">
                                                                <label>Contact Person Mobile No<sup>*</sup></label>
                                                                <input type="number" id="contact_phone_no" minlength="10" maxlength="13"class="form-control <?php if ($val10 == 0) {?>bord<?php }?><?php $__errorArgs = ['contact_phone_no'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"
                                                                    name="contact_phone_no" 
                                                                    value="<?php echo e($userdata->contact_phone_no); ?>"
                                                                    autocomplete="contact_phone_no" autofocus>
                                                                <?php $__errorArgs = ['contact_phone_no'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                                    <span class="invalid-feedback" role="alert">
                                                                        <strong><?php echo e($message); ?></strong>
                                                                    </span>
                                                                <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                                            </div>
                                                        </div>
                                                    </div>
                                                   <?php if((Auth::user()->user_type == '1')||(Auth::user()->user_type == '5')): ?>
                                                    <div class="col-lg-6 col-md-12 col-sm12- col-xs-12">
                                                        <div class="form-inputs">
                                                            <div class="form-group">
                                                                <label>Facility</label>
                                                                <select class="form-control  <?php $__errorArgs = ['facility'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"
                                                                    id="facility" name="facility" autocomplete="facility" autofocus >
                                                                    <option value="PHC" <?php if($userdata->facility == 'PHC'): ?> selected <?php endif; ?>>PHC</option>
                                                                    <option value="MC" <?php if($userdata->facility == 'MC'): ?> selected <?php endif; ?>>MC</option>
                                                                    <option value="DH" <?php if($userdata->facility == 'DH'): ?> selected <?php endif; ?>>DH</option>
                                                                    <option value="CHC" <?php if($userdata->facility == 'CHC'): ?> selected <?php endif; ?>>CHC</option>
                                                                    
                                                                </select>
                                                                <?php $__errorArgs = ['facility'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                                    <span class="invalid-feedback" role="alert">
                                                                        <strong><?php echo e($message); ?></strong>
                                                                    </span>
                                                                <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="col-lg-6 col-md-12 col-sm12- col-xs-12">
                                                        <div class="form-inputs">
                                                            <div class="form-group">
                                                                <label>Zone</label>
                                                                <select class="form-control invoiceselect  <?php $__errorArgs = ['zone'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"
                                                                    id="zone" name="zone" autocomplete="zone" autofocus >
                                                                   
                                                                    <option value="C" <?php if($userdata->zone == 'C'): ?> selected <?php endif; ?>>Central</option>
                                                                    <option value="N" <?php if($userdata->zone == 'N'): ?> selected <?php endif; ?>>North</option>
                                                                    <option value="E" <?php if($userdata->zone == 'E'): ?> selected <?php endif; ?>>East</option>
                                                                    <option value="S" <?php if($userdata->zone == 'S'): ?> selected <?php endif; ?>>South</option>
                                                                    <option value="W" <?php if($userdata->zone == 'W'): ?> selected <?php endif; ?>>West</option>
                                                                    <option value="NE" <?php if($userdata->zone == 'NE'): ?> selected <?php endif; ?>>North East</option>
                                                                    <option value="SE" <?php if($userdata->zone == 'SE'): ?> selected <?php endif; ?>>South East</option>
                                                                    <option value="SW" <?php if($userdata->zone == 'SW'): ?> selected <?php endif; ?>>South West</option>
                                                                    <option value="NW" <?php if($userdata->zone == 'NW'): ?> selected <?php endif; ?>>North West</option>
                                                                </select>
                                                                <?php $__errorArgs = ['zone'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                                    <span class="invalid-feedback" role="alert">
                                                                        <strong><?php echo e($message); ?></strong>
                                                                    </span>
                                                                <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <?php endif; ?>
                                                    <div class="col-lg-6 col-md-12 col-sm12- col-xs-12">
                                                        <div class="form-inputs">
                                                            <div class="form-group">
                                                                <label>Signature(.jpeg, .png)</label>
                                                                <input type="file" id="signature" accept=".jpeg,.png" class="form-control <?php $__errorArgs = ['signature'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"
                                                                    name="signature">
                                                                <?php $__errorArgs = ['signature'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                                    <span class="invalid-feedback" role="alert">
                                                                        <strong><?php echo e($message); ?></strong>
                                                                    </span>
                                                                <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <?php if($userdata->signature != null): ?>
                                                    <div class="col-lg-6 col-md-12 col-sm12- col-xs-12">
                                                        <div class="form-inputs">
                                                            <div class="form-group">
                                                              <label>Existing Signature</label>
                                                              <img max-width="200px" height="150px" src="<?php echo e(url('assets/signatures/'.$userdata->signature)); ?>">
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <?php endif; ?>

                                                   
                                                    <?php if(Auth::user()->user_type == 1): ?>
                                                        <div class="col-lg-6 col-md-12 col-sm12- col-xs-12">
                                                            <div class="form-inputs">
                                                                <div class="form-group">
                                                                    <div class="d-flex justify-content-between">
                                                                        <label>Buyer Type<sup>*</sup></label><span
                                                                            class="add_new_buyer" id="addnew">Add
                                                                            New</span>
                                                                    </div>
                                                                    <select id="buyer_type" class="form-control  <?php if ($val11 == 0) {?> bord <?php } ?>  <?php $__errorArgs = ['buyer_type'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"
                                                                        id="sel1" name="buyer_type" required
                                                                        autocomplete="buyer_type" autofocus
                                                                        >

                                                                        <option value="">Select</option>
                                                                        <?php $__currentLoopData = $buyertypelist; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $buyerlist): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                                            <option value="<?php echo e($buyerlist->buyertype); ?>"
                                                                                <?php if( $userdata->buyer_type == $buyerlist->buyertype){?>Selected<?php } ?>>
                                                                                <?php echo e(ucfirst($buyerlist->buyertype)); ?>

                                                                            </option>
                                                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                                                                    </select>
                                                                    <?php $__errorArgs = ['buyer_type'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                                        <span class="invalid-feedback" role="alert">
                                                                            <strong><?php echo e($message); ?></strong>
                                                                        </span>
                                                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    <?php endif; ?>
                                   
          
                                                    <?php if((Auth::user()->user_type == 1)||(Auth::user()->user_type == 5)||(Auth::user()->user_type == 7)): ?>


                                                        <div class="col-lg-12 " id="Hospital_files" >
                                                            <div class="form-inputs gst_doc">
                                                                <div class="form-group">
                                                                    <label style="display: block;width: 100%;">
                                                                        GST</label>
                                                                    <?php if(!empty($userdata->certificate1)): ?>
                                                                        <div class="custom-file">
                                                                            <div class="dropzone dz-clickable Dz-box happy-box"
                                                                                style="width: 120px;">
                                                                                <a target="_blank" class="eye"
                                                                                    href="https://meddbot.com/uploaded_files/<?php echo e($userdata->certificate1); ?>"><i
                                                                                        class="fa fa-eye"
                                                                                        aria-hidden="true"></i> View</a>
                                                                            </div>
                                                                        </div>
                                                                    <?php endif; ?>
                                                                    <div class="upload-btn-wrapper">
                                                                        <div class="custom-file-upload">
                                                                            <input type="file" class="form-control"
                                                                                name="Hospital_files" 
                                                                                autocomplete="Hospital_files" accept=".docx,.doc,.pdf"
                                                                                >
                                                                                
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                            <div class="form-inputs reg_doc" >
                                                                <div class="form-group">
                                                                    <label style="display: block;width: 100%;">
                                                                        Registration Certificate</label>
                                                                    <?php if(!empty($userdata->certificate2)): ?>
                                                                     <div class="file-up">
                                                                            <div class="custom-file">
                                                                            <div class="dropzone dz-clickable Dz-box happy-box"
                                                                                style="width: 120px;">
                                                                                <a target="_blank" class="eye"
                                                                                    href="https://www.meddbot.com/uploaded_files/<?php echo e($userdata->certificate2); ?>"><i
                                                                                        class="fa fa-eye"
                                                                                        aria-hidden="true"></i> View</a>
                                                                            </div>
                                                                        </div>
                                                                    <?php endif; ?>
                                                                    <div class="upload-btn-wrapper">
                                                                        <div class="custom-file-upload">
                                                                            <input type="file" class="form-control" accept=".docx,.doc,.pdf"
                                                                                name="Hospital_files2"
                                                                                autocomplete="Hospital_files2">
                                                                              
                                                                        </div>
                                                                    </div>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <?php endif; ?>

                                                    <?php if(Auth::user()->user_type == 2): ?>
                                                        <div class="col-lg-6 col-md-12 col-sm12- col-xs-12">
                                                            <div class="form-inputs">
                                                                <div class="form-group">
                                                                    <label class="label">Vendor Type <sup>*</sup></label>
                                                                    <select id="vendor_type"
                                                                        class="form-control <?php $__errorArgs = ['vendor_type'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"
                                                                        id="sel1" name="vendor_type"
                                                                        autocomplete="vendor_type" autofocus
                                                                        <?php if ($val11 == 0) {
                                                                            echo "style='border-color: red;'";
                                                                        } ?>>

                                                                        <option value="Dealer"
                                                                            <?php if( $userdata->vendor_type == "Dealer"){?>Selected<?php } ?>>
                                                                            Dealer</option>
                                                                        <option value="Manufacturer"
                                                                            <?php if( $userdata->vendor_type == "Manufacturer"){?>Selected<?php } ?>>
                                                                            Manufacturer</option>
                                                                    </select>
                                                                    <?php $__errorArgs = ['vendor_type'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                                        <span class="invalid-feedback" role="alert">
                                                                            <strong><?php echo e($message); ?></strong>
                                                                        </span>
                                                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                                                </div>
                                                            </div>
                                                        </div>



                                                        <div class="col-lg-12" id="Dealer_files"
                                                            style="display: none;display: <?php if( $userdata->vendor_type == "Dealer"){?>block<?php } ?>">

                                                            <div class="form-inputs">
                                                                <div class="form-group">
                                                                    <label class="label">CIN number</label>
                                                                    <input type="text" id="CIN_number"
                                                                        class="form-control " name="CIN_number"
                                                                        autocomplete="CIN_number" autofocus
                                                                        value="<?php echo e($userdata->CIN_number); ?>">

                                                                </div>
                                                            </div>

                                                            <div class="form-inputs">
                                                                <div class="form-group gst_doc  upSeper">
                                                                    <label
                                                                        style="display: block; width: 100%;margin: 3px 0;">
                                                                        GST/VAT number and certificate </label>
                                                                    <?php if(!empty($userdata->certificate1)): ?>
                                                                        <div class="custom-file newLeft">
                                                                            <div
                                                                                class="dropzone dz-clickable Dz-box happy-box">
                                                                                <?php echo e($userdata->certificate1); ?><a
                                                                                    target="_blank" class="eye"
                                                                                    href="https://www.meddbot.com/uploaded_files/<?php echo e($userdata->certificate1); ?>"><i
                                                                                        class="fa fa-eye"
                                                                                        aria-hidden="true"></i> View</a>
                                                                            </div>
                                                                        </div>
                                                                    <?php endif; ?>
                                                                    <div class="upload-btn-wrapper">
                                                                        <div class="custom-file-upload">
                                                                            <input type="file" id="file"
                                                                                class="form-control" name="Dealer_file1" accept=".docx,.doc,.pdf"
                                                                                <?php if(empty($userdata->certificate1)) {?><?php } ?>
                                                                                autocomplete="Dealer_file1" autofocus>
                                                                        </div>
                                                                    </div>
                                                                    <?php $__errorArgs = ['Dealer_file1'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                                        <span class="invalid-feedback" role="alert">
                                                                            <strong><?php echo e($message); ?></strong>
                                                                        </span>
                                                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                                                </div>
                                                                <div class="form-group  upSeper">
                                                                    <label
                                                                        style="display: block; width: 100%;margin: 3px 0;">
                                                                        ISO</label>
                                                                    <?php if(!empty($userdata->certificate2)): ?>
                                                                        <div class="custom-file newLeft">
                                                                            <div
                                                                                class="dropzone dz-clickable Dz-box happy-box">
                                                                                <?php echo e($userdata->certificate2); ?><a
                                                                                    target="_blank" class="eye"
                                                                                    href="https://www.meddbot.com/uploaded_files/<?php echo e($userdata->certificate2); ?>"><i
                                                                                        class="fa fa-eye"
                                                                                        aria-hidden="true"></i> View</a>
                                                                            </div>
                                                                        </div>
                                                                    <?php endif; ?>
                                                                    <div class="upload-btn-wrapper">
                                                                        <div class="custom-file-upload">
                                                                            <input type="file" class="form-control"
                                                                                name="Dealer_file2"
                                                                                autocomplete="Dealer_file2" accept=".docx,.doc,.pdf" autofocus>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                                <div class="form-group  upSeper">
                                                                    <label
                                                                        style="display: block; width: 100%;margin: 3px 0;">
                                                                        Quality Management Certificates(.docx, .doc, .pdf)</label>
                                                                    <?php if(!empty($userdata->certificate3)): ?>
                                                                        <div class="custom-file newLeft">
                                                                            <div
                                                                                class="dropzone dz-clickable Dz-box happy-box">
                                                                                <?php echo e($userdata->certificate3); ?><a
                                                                                    target="_blank" class="eye"
                                                                                    href="https://www.meddbot.com/uploaded_files/<?php echo e($userdata->certificate3); ?>"><i
                                                                                        class="fa fa-eye"
                                                                                        aria-hidden="true"></i> View</a>
                                                                            </div>
                                                                        </div>
                                                                    <?php endif; ?>
                                                                    <div class="upload-btn-wrapper">
                                                                        <div class="custom-file-upload">
                                                                            <input type="file" class="form-control"
                                                                                name="Dealer_file3"
                                                                                autocomplete="Dealer_file3" accept=".docx,.doc,.pdf" autofocus>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                                <div class="form-group  upSeper">
                                                                        <label style="display: block;width: 100%;">
                                                                            Registration Certificate</label>
                                                                        <?php if(!empty($userdata->certificate4)): ?>
                                                                           <div class="custom-file newLeft">
                                                                                <div class="custom-file">
                                                                                <div class="dropzone dz-clickable Dz-box happy-box"
                                                                                    style="width: 120px;">
                                                                                    <?php echo e($userdata->certificate4); ?><a
                                                                                        target="_blank" class="eye"
                                                                                        href="https://www.meddbot.com/uploaded_files/<?php echo e($userdata->certificate4); ?>"><i
                                                                                            class="fa fa-eye"
                                                                                            aria-hidden="true"></i>
                                                                                        View</a>
                                                                                </div>
                                                                            </div>
                                                                        <?php endif; ?>
                                                                        
                                                                        </div>
                                                                        <div class="upload-btn-wrapper">
                                                                            <div class="custom-file-upload">
                                                                                <input type="file" accept=".docx,.doc,.pdf" class="form-control"
                                                                                    name="Dealer_file4"
                                                                                    autocomplete="Dealer_file4">
                                                                                    
                                                                                   
                                                                            </div>
                                                                        </div>
                                                                    
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <div class="col-lg-12" id="Manufacturer_files"
                                                            style="display: none;display: <?php if( $userdata->vendor_type == "Manufacturer"){?>block<?php } ?>">
                                                            <div class="form-inputs">
                                                                <div class="form-group gst_doc  upSeper">
                                                                    <label
                                                                        style="display: block; width: 100%;margin: 3px 0;">
                                                                        GST/VAT(.docx, .doc, .pdf)<sup>*</sup></label>
                                                                    <?php if(!empty($userdata->certificate1)): ?>
                                                                        <div class="custom-file newLeft">
                                                                            <div
                                                                                class="dropzone dz-clickable Dz-box happy-box">
                                                                                <?php echo e($userdata->certificate1); ?><a
                                                                                    target="_blank" class="eye"
                                                                                    href="https://www.meddbot.com/uploaded_files/<?php echo e($userdata->certificate1); ?>"><i
                                                                                        class="fa fa-eye"
                                                                                        aria-hidden="true"></i> View</a>
                                                                            </div>
                                                                        </div>
                                                                    <?php endif; ?>
                                                                    <div class="upload-btn-wrapper">
                                                                        <div class="custom-file-upload">
                                                                            <input type="file" class="form-control" accept=".docx,.doc,.pdf"
                                                                                name="Manufacturer_file1"
                                                                                autocomplete="Manufacturer_file1"
                                                                                <?php if(empty($userdata->certificate1)) {?>required<?php } ?>
                                                                                autofocus>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                                <div class="form-group  upSeper">
                                                                    <label
                                                                        style="display: block; width: 100%;margin: 3px 0;">
                                                                        Udyog Aadhar / Manufacturer registration
                                                                        certificate<sup>*</sup></label>
                                                                    <?php if(!empty($userdata->certificate2)): ?>
                                                                        <div class="custom-file newLeft">
                                                                            <div
                                                                                class="dropzone dz-clickable Dz-box happy-box">
                                                                                <?php echo e($userdata->certificate2); ?><a
                                                                                    target="_blank" class="eye"
                                                                                    href="https://www.meddbot.com/uploaded_files/<?php echo e($userdata->certificate2); ?>"><i
                                                                                        class="fa fa-eye"
                                                                                        aria-hidden="true"></i> View</a>
                                                                            </div>
                                                                        </div>
                                                                    <?php endif; ?>
                                                                    <div class="upload-btn-wrapper">
                                                                        <div class="custom-file-upload">
                                                                            <input type="file" class="form-control" accept=".docx,.doc,.pdf"
                                                                                name="Manufacturer_file2"
                                                                                autocomplete="Manufacturer_file2"
                                                                                <?php if(empty($userdata->certificate2)) {?>required<?php } ?>
                                                                                autofocus>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                                <div class="form-group  upSeper">
                                                                    <label
                                                                        style="display: block; width: 100%;margin: 3px 0;">
                                                                        If Indian Manufacturers SSI part 1 and part
                                                                        2</label>
                                                                    <?php //print_r($userdata->certificate3);
                                                                    ?>
                                                                    <?php if(!empty($userdata->certificate3)): ?>
                                                                        <div class="custom-file newLeft">
                                                                            <div
                                                                                class="dropzone dz-clickable Dz-box happy-box">
                                                                                <?php echo e($userdata->certificate3); ?><a
                                                                                    target="_blank" class="eye"
                                                                                    href="https://www.meddbot.com/uploaded_files/<?php echo e($userdata->certificate3); ?>"><i
                                                                                        class="fa fa-eye"
                                                                                        aria-hidden="true"></i> View</a>
                                                                            </div>
                                                                        </div>
                                                                    <?php endif; ?>
                                                                    <div class="upload-btn-wrapper">
                                                                        <div class="custom-file-upload">
                                                                            <input type="file" class="form-control"
                                                                                name="Manufacturer_file3"
                                                                                autocomplete="Manufacturer_file3"
                                                                                autofocus>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                                <div class="form-group  upSeper">
                                                                    <label
                                                                        style="display: block; width: 100%;margin:3px 0;">
                                                                        Quality certificates like CE, FDA, ISO etc</label>
                                                                    <?php if(!empty($userdata->certificate4)): ?>
                                                                        <div class="custom-file newLeft">
                                                                            <div
                                                                                class="dropzone dz-clickable Dz-box happy-box">
                                                                                <?php echo e($userdata->certificate4); ?><a
                                                                                    target="_blank" class="eye"
                                                                                    href="https://www.meddbot.com/uploaded_files/<?php echo e($userdata->certificate4); ?>"><i
                                                                                        class="fa fa-eye"
                                                                                        aria-hidden="true"></i> View</a>
                                                                            </div>
                                                                        </div>
                                                                    <?php endif; ?>
                                                                    <div class="upload-btn-wrapper">
                                                                        <div class="custom-file-upload">
                                                                            <input type="file" class="form-control"
                                                                                name="Manufacturer_file4"
                                                                                autocomplete="Manufacturer_file4"
                                                                                autofocus>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <?php endif; ?>
                                                    <?php if(Auth::user()->user_type == '3'): ?>
                                                        <div class="col-lg-12 " id="Manufacturer_files"
                                                            style="display:block;">
                                                            <div class="form-inputs">
                                                                <div class="form-group   upSeper">
                                                                    <div class="mm">
                                                                        <label
                                                                            style="display: block; width: 100%;margin: 3px 0;">
                                                                            GST/VAT</label>
                                                                        <?php if(!empty($userdata->certificate1)): ?>
                                                                            <div class="custom-file newLeft">
                                                                                <div
                                                                                    class="dropzone dz-clickable Dz-box happy-box">
                                                                                    <?php echo e($userdata->certificate1); ?><a
                                                                                        target="_blank" class="eye"
                                                                                        href="https://www.meddbot.com/uploaded_files/<?php echo e($userdata->certificate1); ?>"><i
                                                                                            class="fa fa-eye"
                                                                                            aria-hidden="true"></i>
                                                                                        View</a>
                                                                                </div>
                                                                            </div>
                                                                    </div>
                                                    <?php endif; ?>
                                                    <div class="upload-btn-wrapper">
                                                        <div class="custom-file-upload">
                                                            <input type="file" class="form-control"  accept=".docx,.doc,.pdf"
                                                                name="Manufacturer_file1"
                                                                autocomplete="Manufacturer_file1"
                                                                 autofocus>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="form-group  upSeper">
                                                    <label style="display: block; width: 100%;margin: 3px 0;">Udyog Aadhar /
                                                        Manufacturer registration certificate(.docx, .doc, .pdf)</label>
                                                    <?php if(!empty($userdata->certificate2)): ?>
                                                        <div class="custom-file newLeft">
                                                            <div class="dropzone dz-clickable Dz-box happy-box">
                                                                <?php echo e($userdata->certificate2); ?><a target="_blank"
                                                                    class="eye"
                                                                    href="https://www.meddbot.com/uploaded_files/<?php echo e($userdata->certificate2); ?>"><i
                                                                        class="fa fa-eye" aria-hidden="true"></i> View</a>
                                                            </div>
                                                        </div>
                                                    <?php endif; ?>
                                                    <div class="upload-btn-wrapper">
                                                        <div class="custom-file-upload">
                                                            <input type="file" class="form-control" accept=".docx,.doc,.pdf"
                                                                name="Manufacturer_file2"
                                                                autocomplete="Manufacturer_file2"
                                                                 autofocus>
                                                        </div>
                                                    </div>
                                                </div>

                                            </div>
                                        </div>
                                    
                                        <?php endif; ?>
                                        <div class="col-lg-12">
                                                <div class="form-group rs-form-group">
                                                    <label class="mb-0">About the Establishment<sup>*</sup></label>
                                                    <textarea rows="5" id="description" name="description"  class="<?php if ($val12 == 0) {?> bord <?php }?>"
                                                     ><?php echo e($userdata->description); ?></textarea>
                                                </div>
                                        </div>
                                        <div class="col-lg-12">
                                    <div class="reg-flex-x">
                                        <div class="green-button" style="padding: 15px 0;width: 100%;margin: 0">
                                            <button style="max-width: 130px;" type="submit"
                                                id="create">Update</button>
                                            
                                        </div>
                                    </div>
                                </div>                
                              
   
                                    </div>
                                </div>
                                
                        </div>
<!--                    </div>-->








                                                                                                                            <!--<div class="col-md-12 col-sm-12 col-xs-12" style="padding: 0;float:left;">		<button type="submit" -->

                                                                                                                                            <!--name="submit1"
                                                                                                                                                value="submit1"
                                                                                                                                                -->
                                                                                                                                                <!--									class="btn-primary">EDIT PROFILE</button><p></p>-->
                                                                                                                                                <!--								</div>					-->
                </div>
                </form>
            </div>
        </div>

        <?php if(Auth::user()->user_type == '2'): ?>
            <div id="accordion" style="display: none;  width: 100%;margin: 0 0 10px;">
                <!-- REGISTER NEW PRODUCT START -->
                <div class="boxings card">
                    <div class="card-header">
                        <h6 class="card-link" data-toggle="collapse" href="#collapseTwo">PAYMENT DETAILS</h6>
                    </div>
                    <div class="bxNew collapse " id="collapseTwo" data-parent="#accordion">
                        <form name="register_new" id="register_new" method="POST"
                            action="<?php echo e(url('/add_userpaymentdetails')); ?>">
                            <?php echo csrf_field(); ?>
                            <div class="row manufacturerlist">
                                <div class="col-lg-12">
                                    <div class="form-inputs">
                                        <div class="form-group">
                                            <label class="label">Card Number</label><sup>*</sup>
                                            <input type="number" id="card_no"
                                                class="form-control <?php $__errorArgs = ['card_no'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"
                                                name="card_no"
                                                <?php if(!empty($user_paymentdetails)): ?> value="<?php echo e($user_paymentdetails->card_no); ?>" <?php endif; ?>
                                                autocomplete="card_no" autofocus required>
                                            <?php $__errorArgs = ['card_no'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                <span class="invalid-feedback" role="alert">
                                                    <strong><?php echo e($message); ?></strong>
                                                </span>
                                            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-lg-6 col-md-12">
                                    <div class="form-inputs">
                                        <div class="form-group">
                                            <label class="label">Validity</label><sup>*</sup>
                                            <input type="text" id="datepicker" class="form-control"
                                                data-zdp_readonly_element="false" name="validity"
                                                <?php if(!empty($user_paymentdetails)): ?> value="<?php echo e($user_paymentdetails->validity); ?>" <?php endif; ?>
                                                autocomplete="validity" autofocus required>
                                            <?php $__errorArgs = ['validity'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                <span class="invalid-feedback" role="alert">
                                                    <strong><?php echo e($message); ?></strong>
                                                </span>
                                            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-lg-6 col-md-12">
                                    <div class="form-inputs">
                                        <div class="form-group">
                                            <label class="label">CVV</label><sup>*</sup>
                                            <input type="number" id="cvv"
                                                class="form-control <?php $__errorArgs = ['cvv'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" name="cvv"
                                                <?php if(!empty($user_paymentdetails)): ?> value="<?php echo e($user_paymentdetails->cvv); ?>" <?php endif; ?>
                                                autocomplete="cvv" autofocus required>
                                            <?php $__errorArgs = ['cvv'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                <span class="invalid-feedback" role="alert">
                                                    <strong><?php echo e($message); ?></strong>
                                                </span>
                                            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-lg-12">
                                    <div class="form-inputs">
                                        <div class="form-group">
                                            <label class="label">Billing Address</label><sup>*</sup>
                                            <input type="text" id="billing_address"
                                                class="form-control <?php $__errorArgs = ['billing_address'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"
                                                name="billing_address"
                                                <?php if(!empty($user_paymentdetails)): ?> value="<?php echo e($user_paymentdetails->billing_address); ?>" <?php endif; ?>
                                                required autocomplete="billing_address" autofocus>
                                            <?php $__errorArgs = ['billing_address'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                <span class="invalid-feedback" role="alert">
                                                    <strong><?php echo e($message); ?></strong>
                                                </span>
                                            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-lg-6 col-md-12">
                                    <div class="form-inputs">
                                        <div class="form-group">
                                            <label class="label">Country</label><sup>*</sup>
                                            <!--<input type="text" id="state" class="form-control <?php $__errorArgs = ['state'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" name="state" value="<?php echo e(old('state')); ?>"  autocomplete="state" autofocus>-->
                                            <select class="form-control <?php $__errorArgs = ['state1'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"
                                                id="country1" name="state1" required>

                                                
                                                <?php $__currentLoopData = $countries; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $country): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                    <option value="<?php echo e($country->id); ?>"
                                                        <?php if(!empty($user_paymentdetails)){ if($user_paymentdetails->state == $country->id){ ?>Selected<?php } } ?>>
                                                        <?php echo e($country->name); ?></option>
                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                            </select>
                                            <?php $__errorArgs = ['state1'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                <span class="invalid-feedback" role="alert">
                                                    <strong><?php echo e($message); ?></strong>
                                                </span>
                                            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-lg-6 col-md-12">
                                    <div class="form-inputs">
                                        <div class="form-group">
                                            <label class="label">State</label><sup>*</sup>
                                            <!-- <input type="text" id="city" class="form-control <?php $__errorArgs = ['city'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" name="city" value="<?php echo e(old('city')); ?>"  autocomplete="city" autofocus> -->
                                            <select class="form-control <?php $__errorArgs = ['city1'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"
                                                id="state1" name="city1" autocomplete="city1" autofocus required>
                                                <option value="">Select</option>
                                                <?php $__currentLoopData = $paymentstates; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $state): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                    <option value="<?php echo e($state->id); ?>"
                                                        <?php  if(!empty($user_paymentdetails)){ if($state->id == $user_paymentdetails->city){ ?>Selected<?php }} ?>>
                                                        <?php echo e($state->name); ?></option>
                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                            </select>
                                            <?php $__errorArgs = ['city1'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                <span class="invalid-feedback" role="alert">
                                                    <strong><?php echo e($message); ?></strong>
                                                </span>
                                            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                        </div>
                                    </div>
                                </div>

                                <div class="col-lg-12 col-md-12">
                                    <div class="form-inputs">
                                        <div class="form-group">
                                            <label class="label">Zipcode</label><sup>*</sup>
                                            <input type="number" id="zipcodepayment"
                                                class="form-control <?php $__errorArgs = ['zipcodepayment'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"
                                                name="zipcodepayment"
                                                <?php if(!empty($user_paymentdetails)): ?> value="<?php echo e($user_paymentdetails->zipcode); ?>" <?php endif; ?>
                                                required autocomplete="zipcodepayment" autofocus>
                                            <?php $__errorArgs = ['zipcodepayment'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                <span class="invalid-feedback" role="alert">
                                                    <strong><?php echo e($message); ?></strong>
                                                </span>
                                            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                        </div>
                                    </div>
                                </div>
                               
                            </div>
                            <div class="row">
                                <div class="col-12">
                                    <div class="green-button">
                                        <button type="submit" class="btn btn-primary" id="regnew">
                                            <?php echo e(__('Add')); ?>

                                        </button>
                                    </div>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        <?php endif; ?>

    </div>
    </div>
    </div>

    <!-- Modal Under observation -->
    <div class="modal fade" id="exampleModal_addnew" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
        aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title" id="exampleModalLabel">Add New Buyer Type</h5>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>

                <div class="modal-body imageArea" id="demo">
                    <input name="_token" type="hidden" id="token_user" value="<?php echo e(csrf_token()); ?>">
                    <form name="add_buyertype" id="add_buyertype" method="POST" action="#">
                        <?php echo csrf_field(); ?>
                        <div class="row manufacturerlist manufacturerlist-rs">
                            <div class="col-sm-12 col-xs-12">
                                <div class="form-inputs">
                                    <div class="form-group">
                                        <label>Buyer Type</label>
                                        <input id="buyer_type_add" name="buyer_type_add" value="" type="text"
                                            class="form-control">



                                    </div>
                                </div>
                            </div>
                        </div>
                </div>
                <div class="modal-footer">

                    <div class="d-flex align-items-center justify-content-center w-100">
                        <button type="submit" class="btn newGreenbtn" id="sendbuyertype">
                            <?php echo e(__('Send')); ?>

                        </button>
                    </div>
                </div>
                </form>

            </div>

        <?php $__env->stopSection(); ?>
    </div>



    <?php $__env->startSection('scripts'); ?>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/1.1.3/sweetalert.min.js"></script>
        <script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>

        <script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDMSKOGGZK0R6RuqpTTrdj3uTu_k2LOGiM&libraries=places"></script>
<script>
jQuery.validator.addMethod("nameval", function(value, element) {
    //test user value with the regex
    return this.optional(element) || /^[a-zA-Z\s]+$/.test(value);
  }, "Enter only Albhabets");


                $("#updateProfile").validate({
                    rules: {

                        "name": {
                            required: true,
                            nameval:true
                        },
                        "address": {
                            required: true
                           
                        },
                        "state": {
                            required: true
                           
                        },
                        "district": {
                            required: true
                           
                        },
                        "location": {
                            required: true
                           
                        },
                        "zipcode": {
                            required: true,
                            minlength:6,
                            maxlength:6
                           
                        },
                        "contact_name": {
                            required: true,
                            nameval:true
                           
                        },
                        "contact_phone_no": {
                            required: true,
                           
                           
                        },
                        "description": {
                            required: true
                           
                           
                        },
                       
                    },
                    submitHandler: function(form, e) {
                       form.submit();
                    }
                });
          
                


                $("#address").on('keyup keydown change', function (){
                    if($("#address").val()==''){
                        $("#address").addClass("bord");                    
                    }
                    else{
                        $("#address").removeClass("bord");
                    }

                 });

                 $("#searchTextField").on('keyup keydown change', function (){
                    if($("#searchTextField").val()==''){
                        $("#searchTextField").addClass("bord");
                    
                    }
                    else{
                        $("#searchTextField").removeClass("bord");
                    }

                 });

                 $("#buyer_type").on('keyup keydown change', function (){
                    if($("#buyer_type").val()==''){
                        $("#buyer_type").addClass("bord");
                    
                    }
                    else{
                        $("#buyer_type").removeClass("bord");
                    }

                 });

                 $("#description").on('keyup keydown change', function (){
                    if($("#description").val()==''){
                        $("#description").addClass("bord");
                    
                    }
                    else{
                        $("#description").removeClass("bord");
                    }

                 });
                 $("#contact_phone_no").on('keyup keydown change', function (){
                    if($("#contact_phone_no").val()==''){
                        $("#contact_phone_no").addClass("bord");
                    
                    }
                    else{
                        $("#contact_phone_no").removeClass("bord");
                    }

                 });

                 $("#contact_name").on('keyup keydown change', function (){
                    if($("#contact_name").val()==''){
                        $("#contact_name").addClass("bord");
                    
                    }
                    else{
                        $("#contact_name").removeClass("bord");
                    }

                 });

                $("#zipcode").on('keyup keydown change', function (){


                    if($("#zipcode").val()==''){
                        $("#zipcode").addClass("bord");

                    }
                    else{
                        $("#zipcode").removeClass("bord");
                    }

                    });




            $("#address").on('keyup keydown change', function (){


            if($("#address").val()==''){
                $("#address").addClass("bord");
               
            }
            else{
                $("#address").removeClass("bord");
            }

            });



            function initialize() {
      // var input = document.getElementById('searchTextField');
      // new google.maps.places.Autocomplete(input);
    
      var input = document.getElementById('searchTextField');
              var autocomplete = new google.maps.places.Autocomplete(input);
            //  alert(autocomplete);
                google.maps.event.addListener(autocomplete, 'place_changed', function () {
                    var place = autocomplete.getPlace();
                    // alert('sec');
                    // alert(place.name);
                    // alert(place.geometry.location.lat());
                    // alert(place.geometry.location.lng());
                    $("#cityLat").val(place.geometry.location.lat());
                    $("#cityLng").val(place.geometry.location.lng());
                   // document.getElementById('city2').value = place.name;
                   // document.getElementById('cityLat').value = place.geometry.location.lat();
                    //document.getElementById('cityLng').value = place.geometry.location.lng();
                });
    
    
    }
    
    google.maps.event.addDomListener(window, 'load', initialize);
    
            </script>
        <script>
          

            $("#state").change(function() {

                if ($("#state").val() != '') {
                    $("#state").css("border-color", "");
                } else {
                    $("#state").css("border-color", "red");
                }

            });


        $("#district").change(function() {

            if ($("#district").val() != '') {
                $("#district").css("border-color", "");
            } else {
                $("#district").css("border-color", "red");
            }

        });

        $(function() {
                $(".invoiceselect").select2();

            });


            $(document).on("click", "#addnew", function(event) {

                $('#exampleModal_addnew').modal({
                    backdrop: 'static',
                    keyboard: false
                });

            });

            $(document).ready(function() {
               
                if ($('#gstCheck').is(":checked")) {

                    $(".gst_no").show();
                    $('.gst_doc').show();
                   

                } else {
                    $(".gst_no").hide();
                    $('.gst_doc').hide();
                    
                }
            });

            $('#country').on('change', function() {
                var countryid = this.value;
                var APP_URL = <?php echo json_encode(url('/getstates1')); ?>;
                var saveData = $.ajax({
                    type: 'GET',
                    url: APP_URL + '/' + countryid,
                    data: {
                        countryid: countryid,
                        _token: '<?php echo e(csrf_token()); ?>'
                    },
                    dataType: "text",
                    success: function(resultData) {
                        $("#state").html(resultData);
                    }
                });

            });
        </script>



        <script>
            $(document).ready(function() {
                $('#gst_no').focusout(function() {

                    var gst_no = $('#gst_no').val();
                    if ($('#gst_no').val() != "") {
                        var gst_no = $('#gst_no').val();
                        var APP_URL = <?php echo json_encode(url('/getmanufacturedetails')); ?>;
                        var saveData = $.ajax({
                            type: 'GET',
                            url: APP_URL + '/' + gst_no,
                            data: {
                                gst_no: gst_no,
                                _token: '<?php echo e(csrf_token()); ?>'
                            },
                            dataType: "text",
                            success: function(resultData) {
                                console.log(resultData);
                                var res = JSON.parse(resultData);
                                if (res !== null && res !== '') {
                                    if (res.user_type == '1') {

                                        swal("", "This Gst No is already registered as a buyer");
                                        
                                    } else if (res.user_type == '2') {
                                        swal("", "This Gst No is already registered as a Vendor");
                                       
                                    } else if (res.user_type == '3') {
                                        swal("", "This Gst No is already registered as a Manufacturer");
                                        
                                    }
                                    else if (res.user_type == '7') {
                                        swal("", "This Gst No is already registered as a Group Buyer");
                                       
                                    }
                                    else if (res.user_type == '5') {

                                        swal("", "This Gst No is already registered as a Procurement");
                                        
                                    }

                                } else {

                                    $(".pageloader").show();
                       

                                  
                                    var gst = $('#gst_no').val();
                                    var APP_URL = <?php echo json_encode(url('/getgstdetails')); ?>;
                                    var saveData = $.ajax({
                                        type: 'GET',
                                        url: APP_URL + '/' + gst,
                                        data: {
                                            gst: gst,
                                            _token: '<?php echo e(csrf_token()); ?>'
                                        },
                                        dataType: "text",
                                        success: function(resultData) {
                                            console.log(resultData);
                                            var res = JSON.parse(resultData);
                                            if(res.error==true){
                                           
                                            swal("", "Invalid GST Number");
                                            $(".pageloader").hide();
                                            }else{
                                                var name = res.taxpayerInfo.lgnm;

                                            var dno = res.taxpayerInfo.pradr.addr.bno;
                                            var bnm = res.taxpayerInfo.pradr.addr.bnm;
                                            var st = res.taxpayerInfo.pradr.addr.st;
                                            var loc = res.taxpayerInfo.pradr.addr.loc;
                                            var dst = res.taxpayerInfo.pradr.addr.dst;
                                            var stcd = res.taxpayerInfo.pradr.addr.stcd;
                                            var pncd = res.taxpayerInfo.pradr.addr.pncd;
                                            var address = dno + ',' + bnm + ',' + st +
                                                ',' + loc + ',' + dst + ',' + stcd +
                                                ',' + pncd;

                                            var text1 = stcd;
                                           //$("#state option").filter(function() {
                                                //return this.text == text1;
                                           //}).attr('selected', true);

                                            $('#name').val(name);
                                            $('#address').val(address);

                                            $('label[for=name]').hide();
                                            $('label[for=address]').hide();
                                            $('label[for=zipcode]').hide();

                                            $('#zipcode').val(pncd);
                                            //$("#districtDiv").css("display","none");

                                            $("#address").css("border-color", "");
                                            $("#address").removeClass("bord");

                                            $("#zipcode").removeClass("bord");
                                           // $("#state").css("border-color", "");
                                            //$("#state").removeClass("bord");

                                            $(".pageloader").hide();

                                            }
                                           
                                            

                                        }
                                    });
                                }


                            }
                        });
                       
                    }
                    /*else{
                        $('#name').val('');
                        $('#address').val('');
                        $('#zipcode').val('');

                    }*/

                    


                });
            });
        </script>

        <script type="text/javascript">
            $("#vendor_type").change(function() {
                var vendor_type = $("#vendor_type").val();
                if (vendor_type == '') {
                    $("#Dealer_files").hide();
                    $("#Manufacturer_files").hide();
                }
                if (vendor_type == 'Dealer') {
                    $("#Dealer_files").show();
                    $("#Manufacturer_files").hide();
                }
                if (vendor_type == 'Manufacturer') {
                    $("#Manufacturer_files").show();
                    $("#Dealer_files").hide();
                }
            })
        </script>
        <script>
            $("#create").click(function() {
                // alert("bbbb");
                $("#updateProfilee").validate({
                    rules: {

                        "product_warranty": {
                            required: true

                        },
                        "quote_price": {
                            required: true

                        },
                        "quote_tax": {
                            required: true

                        },
                        "product_id": {
                            required: true

                        },

                        "product_description": {
                            required: true

                        },

                        "productcatalouge": {
                            required: true

                        },
                    },
                    submitHandler: function(form, e) {
                        $(".pageloader").show();
                        $(".pageloader").delay(5000).fadeOut("slow");
                        form.submit();
                    }
                });
            });




            $(function() {
                $('#add_bid').on('submit', function(event) {
                    event.preventDefault();
                });
            });
        </script>
        <script type="text/javascript">
            function readURL(input) {

                var extension = $(input).val().split('.').pop().toLowerCase();
                var validFileExtensions = ['jpeg', 'jpg', 'png', 'bmp'];
                if ($.inArray(extension, validFileExtensions) == -1) {
                    swal("", "Sorry!! Upload only jpg, jpeg, png, bmp image");

                } else {

                    if (input.files && input.files[0]) {
                        var reader = new FileReader();

                        reader.onload = function(e) {
                            $('#blah').attr('src', e.target.result);
                        }

                        reader.readAsDataURL(input.files[0]);
                    }

                }




            }

            $('#blah').click(function() {
                $('#propicid').trigger('click');
            });
        </script>

        <script>
            window.baseurl = 'https://www.meddbot.com/';

            $("#sendbuyertype").click(function() {

                $("#add_buyertype").validate({
                    rules: {

                        "buyer_type_add": {
                            required: true

                        },

                    },
                    submitHandler: function(form, e) {

                        var data = {
                            _token: $('#token_user').val(),
                            buyertype_new: $("#buyer_type_add").val()
                        }
                        $.ajax({
                            url: baseurl + 'buyer_type_add',
                            type: "POST",
                            data: data,
                            success: function(res) {

                                console.log(res);

                                var va = $("#buyer_type_add").val();

                                if (res == 0) {
                                    swal("", "Already added buyer type name", "warning");

                                }

                                if (res == 1) {
                                    swal({
                                        title: "",
                                        text: "New buyer type added to dropdown",
                                        type: "success",
                                    }, function() {
                                        var x = '<option value="' + va + '">' + va +
                                            '</option>';
                                        $("#buyer_type").append(x);
                                        $('#exampleModal_addnew').modal('hide');
                                        $("#buyer_type_add").val('');

                                    });


                                }

                            }

                        });

                    }
                });

            });


            $(function() {
                $('#register_new').on('submit', function(event) {
                    event.preventDefault();
                });
            });

            $('#state').on('change', function() {
                var stateid = this.value;
                $(".pageloader").show();
                
                var saveData = $.ajax({
                    type: 'POST',
                    url:'https://www.meddbot.com/getdistricts',
                    data: {
                        id: stateid,
                        _token: '<?php echo e(csrf_token()); ?>'
                    },
                    dataType: "text",
                    success: function(resultData) {
                        $("#district").html(resultData);
                        $(".pageloader").hide();
                    }
                });

            });

            $('#country1').on('change', function() {
                $(".pageloader").show();
                var countryid = this.value;
                var APP_URL = <?php echo json_encode(url('/getstates1')); ?>;
                var saveData = $.ajax({
                    type: 'GET',
                    url: APP_URL + '/' + countryid,
                    data: {
                        countryid: countryid,
                        _token: '<?php echo e(csrf_token()); ?>'
                    },
                    dataType: "text",
                    success: function(resultData) {
                        $("#state1").html(resultData);
                        $(".pageloader").hide();
                    }
                });

            });

         


            function valueChanged() {
                if ($('#gstCheck').is(":checked")) {
                    $(".gst_no").show();
                    $('.gst_doc').show();
                    

                } else {
                    $(".gst_no").hide();
                    $("#gst_no").val('');
                    $('.gst_doc').hide();
                   
                }
            }


            $(document).on("change","#buyer_type",function(){   


                if($(this).val()!=''){
                $('label[for=buyer_type]').hide();
                 }
                else{
                    $('label[for=buyer_type]').show();
                }
            

             });


            $("#country").change(function() {

                if ($("#country").val() != '101') {
                    $('#districtDiv').hide();
                    $('#district').val('');
                } else {
                    $('#districtDiv').show();
                }

            });
        </script>
    <?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.main', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/meddbot/public_html/resources/views/userprofile.blade.php ENDPATH**/ ?>