
<form action="<?php echo e(route('complaint_management.store')); ?>" method="post" class="mt-2" id="addComplaintForm" novalidate="novalidate">
    <?php echo e(csrf_field()); ?>

    <div class="row align-items-center justify-content-center">
        <div class="col-md-12">
            <div class="form-group">
                <label>Customer Name</label>

                <fieldset class="form-group">
                    <input type="text" class="form-control" name="customer_name" placeholder="Add Customer Name*" required data-rule-required="true" data-msg-required="This field is required">
                </fieldset>
            </div>
        </div>

        
        <div class="col-md-12">
            <div class="form-group">
                <label>Customer Address</label>

                <fieldset class="form-group">
                    <input type="text" class="form-control" name="customer_address" placeholder="Add Customer Address*" required data-rule-required="true" data-msg-required="This field is required">
                </fieldset>
            </div>
        </div>

        <div class="col-md-12">
            <div class="form-group">
                <label>Customer Contact</label>

                <fieldset class="form-group">
                    <input type="text" class="form-control" name="customer_contact" placeholder="Add Customer Contact*" required data-rule-required="true" data-msg-required="This field is required">
                </fieldset>
            </div>
        </div>


       

        <div class="col-md-12">
            <div class="form-group">
                <label>Complaint Type</label>

                <fieldset class="form-group">
                    <select class="form-control" name="complaint_type" placeholder="Select Complaint Type*" required data-rule-required="true" data-msg-required="This field is required">
                        <option value="">-Select-</option> 
                             <option value="1">Payments</option> 
                             <option value="2">Delay in Delivery</option> 
                             <option value="3">Delay in Pickup</option> 
                             <option value="4">Incorrect COD</option> 
                             <option value="5">Return</option> 
                             <option value="6">Courier Misbehavior</option> 
                             <option value="7">Wrong COD</option> 
                             <option value="8">Booking Portal Issue</option> 
                             <option value="9">Other</option> 
                             <option value="10">Fake Reason</option> 
                             <option value="15">Flyers </option> 
                             <option value="16">Product/Quality Issue</option> 
                             <option value="18">Short Contents</option> 
                             <option value="19">Wrong Delivery/Misroute</option> 
                             <option value="27">Open Parcel</option> 
                             <option value="28">Open Parcel Complaint</option> 
                             <option value="30">Issue with Sales Person</option> 
                             <option value="31">Sales Lead</option> 
                    </select>
                </fieldset>
            </div>
        </div>

        <div class="col-md-12">
            <div class="form-group">
                <label>Reported By</label>

                <fieldset class="form-group">
                    <input type="text" class="form-control" name="reported_by" placeholder="Add Reported By*" required data-rule-required="true" data-msg-required="This field is required">
                </fieldset>
            </div>
        </div>
        <div class="col-md-12">
            <div class="form-group">
                <label>Description</label>

                <fieldset class="form-group">
                    <textarea type="text" class="form-control" name="description" placeholder="Add Description*" required data-rule-required="true" data-msg-required="This field is required"></textarea>
                </fieldset>
            </div>
        </div>



        <div class="w-100"></div>

        

        <div class="col-auto">
            <div class="form-group text-right my-1">
                <button type="submit" name="upload" class="btn btn-dark">Submit</button>
            </div>
        </div>
    </div>
</form>



	<script>
		$(document).ready(function() {

          
			
			$('#addCityForm').validate({
				errorClass: 'danger',
				successClass: 'success',
				normalizer: function(value) {
					return $.trim(value);
				},
				errorPlacement: function(error, element) {
					error.addClass('w-100').appendTo(element.parent('.form-group'));
				},
				submitHandler: function(form) {
					$(form).find('button[type=submit]').attr('disabled', 'disabled');

					swal({
						title: 'Please Wait!',
						text: 'Your data will be converted shortly!',
						icon: 'info',
						buttons: false,
						closeOnClickOutside: false,
						closeOnEsc: false
					});

					form.submit();
				}
			});
            
        // $( "#addSourceDataForm" ).validate({



        //     errorClass:"danger",
        //     errorPlacement: function(error, element) {
        //         error.addClass('w-100').appendTo(element.parents('.form-group'));
        //     },
        //     submitHandler: function(form) {

               
        //         if(errors === 1){
        //             return false;
        //         }else{
        //             $(form).find('button[type=submit]').attr('disabled', 'disabled');
        //             swal({
        //                 title: 'Please Wait!',
        //                 text: 'City/Hub is being added!',
        //                 icon: 'info',
        //                 buttons: false,
        //                 closeOnClickOutside: false,
        //                 closeOnEsc: false
        //             });

        //             form.submit();
        //         }


        //     }
        // });
		});
	</script>

<?php /**PATH C:\laragon\www\catalyst\resources\views/complaint_management/add_complaint_form.blade.php ENDPATH**/ ?>