HEX
Server: Apache/2.4.46 (Ubuntu)
System: Linux localhost 5.11.0-49-generic #55-Ubuntu SMP Wed Jan 12 17:36:34 UTC 2022 x86_64
User: root (0)
PHP: 7.4.16
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/html/hrms-production/resources/views/admin/add-employee.blade.php
@extends('admin.include.master')
<style>
  .wizard a,
  .tabcontrol a {
    outline: 0;
  }

  .wizard ul,
  .tabcontrol ul {
    list-style: none !important;
    padding: 0;
    margin: 0;
  }

  .wizard ul>li,
  .tabcontrol ul>li {
    display: block;
    padding: 0;
  }

  /* Accessibility */
  .wizard>.steps .current-info,
  .tabcontrol>.steps .current-info {
    position: absolute;
    left: -999em;
  }

  .wizard>.content>.title,
  .tabcontrol>.content>.title {
    position: absolute;
    left: -999em;
  }

  /*
    Wizard
  */

  .wizard>.steps {
    position: relative;
    display: block;
    width: 100%;
  }

  .wizard.vertical>.steps {
    display: inline;
    float: left;
    width: 30%;
  }

  .wizard>.steps .number {
    font-size: 1.429em;
  }

  .wizard>.steps>ul>li {
    width: 24%;
  }

  .wizard>.steps>ul>li,
  .wizard>.actions>ul>li {
    float: left;
  }

  .wizard.vertical>.steps>ul>li {
    float: none;
    width: 100%;
  }

  .wizard>.steps a,
  .wizard>.steps a:hover,
  .wizard>.steps a:active {
    display: block;
    width: auto;
    margin: 0 0.3em 0.3em;
    padding: 0.4em 0.8em;
    text-decoration: none;

    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    border-radius: 5px;
  }

  .wizard>.steps .disabled a,
  .wizard>.steps .disabled a:hover,
  .wizard>.steps .disabled a:active {
    background: #eee;
    color: #aaa;
    cursor: default;
  }

  .wizard>.steps .current a,
  .wizard>.steps .current a:hover,
  .wizard>.steps .current a:active {
    background: #fcfcfc;
    color: #111;
    cursor: default;
  }

  .wizard>.steps .done a,
  .wizard>.steps .done a:hover,
  .wizard>.steps .done a:active {
    background: #4CAF50;
    color: #fff;
  }

  .wizard>.steps .error a,
  .wizard>.steps .error a:hover,
  .wizard>.steps .error a:active {
    background: #ff3111;
    color: #fff;
  }

  .wizard>.content {
    background: #eee;
    display: block;
    margin: 0.5em;
    /* min-height: 35em; */
    /* overflow: hidden; */
    position: relative;
    width: auto;

    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    border-radius: 5px;
  }

  .wizard.vertical>.content {
    display: inline;
    float: left;
    margin: 0 2.5% 0.5em 2.5%;
    width: 65%;
  }

  .wizard>.content>.body {
    float: left;
    width: 100%;
    padding: 2.5%;
  }

  .wizard>.content>.body ul {
    list-style: disc !important;
  }

  .wizard>.content>.body ul>li {
    display: list-item;
  }

  .wizard>.content>.body>iframe {
    border: 0 none;
    width: 100%;
    height: 100%;
  }

  .wizard>.content>.body input {
    display: block;
    border: 1px solid #ccc;
  }

  .wizard>.content>.body input[type="checkbox"] {
    display: inline-block;
  }

  .wizard>.content>.body input.error {
    background: rgb(251, 227, 228);
    border: 1px solid #fbc2c4;
    color: #8a1f11;
  }

  .wizard>.content>.body label {
    display: inline-block;
    margin-bottom: 0.5em;
  }

  .wizard>.content>.body label.error {
    color: #8a1f11;
    display: initial;
    margin-left: 0.5em;
    font-size: 13px;
    font-weight: 400;
  }

  .wizard>.actions {
    position: relative;
    display: block;
    text-align: right;
    width: 100%;
  }

  .wizard.vertical>.actions {
    display: inline;
    float: right;
    margin: 0 2.5%;
    width: 95%;
  }

  .wizard>.actions>ul {
    display: inline-block;
    text-align: right;
  }

  .wizard>.actions>ul>li {
    margin: 0 0.5em;
  }

  .wizard.vertical>.actions>ul>li {
    margin: 0 0 0 1em;
  }

  .wizard>.actions a,
  .wizard>.actions a:hover,
  .wizard>.actions a:active {
    background: #2184be;
    color: #fff;
    display: block;
    padding: 0.5em 1em;
    text-decoration: none;

    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    border-radius: 5px;
  }

  .wizard>.actions .disabled a,
  .wizard>.actions .disabled a:hover,
  .wizard>.actions .disabled a:active {
    background: #eee;
    color: #aaa;
  }

  .wizard>.loading {}

  .wizard>.loading .spinner {}



  /*
    Tabcontrol
  */

  .tabcontrol>.steps {
    position: relative;
    display: block;
    width: 100%;
  }

  .tabcontrol>.steps>ul {
    position: relative;
    margin: 6px 0 0 0;
    top: 1px;
    z-index: 1;
  }

  .tabcontrol>.steps>ul>li {
    float: left;
    margin: 5px 2px 0 0;
    padding: 1px;

    -webkit-border-top-left-radius: 5px;
    -webkit-border-top-right-radius: 5px;
    -moz-border-radius-topleft: 5px;
    -moz-border-radius-topright: 5px;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
  }

  .tabcontrol>.steps>ul>li:hover {
    background: #edecec;
    border: 1px solid #bbb;
    padding: 0;
  }

  .tabcontrol>.steps>ul>li.current {
    background: #fff;
    border: 1px solid #bbb;
    border-bottom: 0 none;
    padding: 0 0 1px 0;
    margin-top: 0;
  }

  .tabcontrol>.steps>ul>li>a {
    color: #5f5f5f;
    display: inline-block;
    border: 0 none;
    margin: 0;
    padding: 10px 30px;
    text-decoration: none;
  }

  .tabcontrol>.steps>ul>li>a:hover {
    text-decoration: none;
  }

  .tabcontrol>.steps>ul>li.current>a {
    padding: 15px 30px 10px 30px;
  }

  .tabcontrol>.content {
    position: relative;
    display: inline-block;
    width: 100%;
    height: 35em;
    overflow: hidden;
    border-top: 1px solid #bbb;
    padding-top: 20px;
  }

  .tabcontrol>.content>.body {
    float: left;
    position: absolute;
    width: 95%;
    height: 95%;
    padding: 2.5%;
  }

  .tabcontrol>.content>.body ul {
    list-style: disc !important;
  }

  .tabcontrol>.content>.body ul>li {
    display: list-item;
  }



  #AddEmployeeProfileForm {
    /* background: #F9F9F9; */
    padding: 25px;
  }

  .steps>ul>li>a,
  .actions li a {
    padding: 10px;
    text-decoration: none;
    margin: 1px;
    display: block;
    color: #777;
  }

  .steps>ul>li,
  .actions li {
    list-style: none;
  }
</style>

@section('content')
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
  <!-- Content Header (Page header) -->
  <section class="content-header">
    <div class="container-fluid">
      <div class="row mb-2">
        <div class="col-sm-12">
          <h2>Employee Profile</h2>
        </div>
      </div>
    </div><!-- /.container-fluid -->
  </section>

  <!-- Main content -->
  <section class="content">
    <div class="row justify-content-center">
      <div class="col-md-12">
        <div class="card card-default">
          <div class="card-body p-0">
            <form id="AddEmployeeProfileForm">
              <input type="hidden" name="_token" id="token_add_emp" value="{{ csrf_token() }}">
              <div>
                {{-- Primary Details --}}
                <h3>Primary Details</h3>
                <section>
                  <div class="row">
                    <div class="col-md-4">
                      <div class="form-group mb-2">
                        <label class="mb-0" for="Employees Name">Name of Employee</label>
                        <input type="text" id="EmployeeName" name="EmployeeName" class="form-control form-control-sm"
                          required>
                      </div>
                    </div>
                    <div class="col-md-4">
                      <div class="form-group mb-2">
                        <label class="mb-0" for="Appointment Order No">Appointment Order No.</label>
                        <input type="text" id="AppointmentOrderNo" name="AppointmentOrderNo"
                          class="form-control form-control-sm">
                      </div>
                    </div>
                    <div class="col-md-4">
                      <div class="form-group mb-2">
                        <label class="mb-0" for="AppointmentOrderDate">Appointment Order Date</label>
                        <div class="input-group date" id="OrderDate" data-target-input="nearest">
                          <input type="text" id="AppointmentOrderDate" name="AppointmentOrderDate"
                            class="form-control form-control-sm datetimepicker-input" data-target="#AppointmentOrderDate" />
                          <div class="input-group-append" data-target="#AppointmentOrderDate" data-toggle="datetimepicker">
                            <div class="input-group-text"><i class="fa fa-calendar"></i>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                    <div class="col-md-4">
                      <div class="form-group mb-2">
                        <label class="mb-0" for="DDO">DDO</label>
                        <select class="form-control form-control-sm select2" style="width: 100%;" aria-hidden="true"
                          name="DDO" id="DDO" data-placeholder="Select DDO">
                          <option value="" disabled selected>Select DDO</option>
                        </select>
                      </div>
                    </div>
                    <div class="col-md-4">
                      <div class="form-group mb-2">
                        <label class="mb-0" for="ControllingOfficer">Controlling Officer</label>
                        <select class="form-control form-control-sm select2" style="width: 100%;" aria-hidden="true"
                          name="ControllingOfficer" id="ControllingOfficer"
                          data-placeholder="Select Controlling Officer">
                          <option value="" disabled selected>Select Controlling Officer</option>
                        </select>
                      </div>
                    </div>
                    <div class="col-md-4">
                      <div class="form-group mb-2">
                        <label class="mb-0">Actual Work Place</label>
                        <select class="form-control form-control-sm select2" style="width: 100%;" aria-hidden="true"
                          name="WorkPlace" id="WorkPlace" data-placeholder="Place Name">
                          <option value="" selected disabled>Place Name</option>
                        </select>
                      </div>
                    </div>
                    <div class="col-md-4">
                      <div class="form-group mb-2">
                        <label class="mb-0" for="Department Name">Name of Department / Non Department</label>
                        <select class="form-control form-control-sm select2" style="width: 100%;" aria-hidden="true"
                          name="DepartmentName" id="DepartmentName" data-placeholder="Select Department">
                          <option value="" selected disabled>Select Department</option>
                        </select>
                      </div>
                    </div>
                    <div class="col-md-4">
                      <div class="form-group mb-2">
                        <label class="mb-0">Appointment by</label>
                        <select class="form-control form-control-sm select2" style="width: 100%;" aria-hidden="true" name="AppointmentBy" id="AppointmentBy" data-placeholder="Select One">
                          <option value="" selected disabled>Select One</option>
                        </select>
                      </div>
                    </div>
                    <div class="col-md-4">
                      <div class="form-group mb-2" id="MeritListNo_field">
                        <label class="mb-0" for="MeritListNo">Merit List No.</label>
                        <input type="text" id="MeritListNo" name="MeritListNo" class="form-control form-control-sm" />
                      </div>
                      <div class="form-group mb-2" style="display: none;" id="LowerCadreSeniority_field">
                        <label class="mb-0" for="Lower Cadre Seniority">Lower Cadre Seniority maintain</label>
                        <input type="text" id="LowerCadreSeniority" name="LowerCadreSeniority"
                          class="form-control form-control-sm" />
                      </div>
                    </div>
                    <div class="col-md-4">
                      <div class="form-group mb-2">
                        <label class="mb-0">Group (Class)</label>
                        <select class="form-control form-control-sm select2" style="width: 100%;" aria-hidden="true"
                          name="Group" id="Group" data-placeholder="Select Group">
                          <option value="" selected disabled>Select Group</option>
                        </select>
                      </div>
                    </div>
                    <div class="col-md-4">
                      <div class="form-group mb-2">
                        <label class="mb-0">Cadre</label>
                        <select class="form-control form-control-sm select2" style="width: 100%;" aria-hidden="true"
                          name="Cadre" id="Cadre" data-placeholder="Select Cadre">
                          <option value="" selected disabled>Select Cadre</option>
                        </select>
                      </div>
                    </div>
                    <div class="col-md-4">
                      <div class="form-group mb-2">
                        <label class="mb-0">Designation (Current Post)</label>
                        <select class="form-control form-control-sm select2" style="width: 100%;" aria-hidden="true"
                          name="EmployeeDesignation" id="EmployeeDesignation" data-placeholder="Select Designation">
                          <option value="" selected disabled>Select One</option>
                        </select>
                      </div>
                    </div>

                    <div class="col-md-4">
                      <div class="form-group mb-2">
                        <label class="mb-0">Religion</label>
                        <select class="form-control form-control-sm select2" style="width: 100%;" aria-hidden="true"
                          name="Religion" id="Religion" data-placeholder="Select Religion">
                          <option value="" selected disabled>Select Religion</option>
                        </select>
                      </div>
                    </div>
                    <div class="col-md-4">
                      <div class="form-group mb-2">
                        <label class="mb-0">Caste Category</label>
                        <select class="form-control form-control-sm select2" style="width: 100%;" aria-hidden="true"
                          name="Caste" id="Caste" data-placeholder="Select Caste">
                          <option value="" selected disabled>Select Caste</option>
                        </select>
                      </div>
                    </div>
                    <div class="col-md-4">
                      <div class="form-group mb-2">
                        <label class="mb-0">Caste Name</label>
                        <input type="text" name="OtherCasteName" id="OtherCasteName"
                          class="form-control form-control-sm" required>
                      </div>
                    </div>

                    <div class="col-md-4">
                      <div class="form-group mb-2">
                        <label class="mb-0" for="Caste Certificate No">Caste Certificate No. &amp; Date</label>
                        <div class="input-group">
                          <div class="custom-file">
                            <input type="file" name="CasteCertificate" class="custom-file-input form-control-sm"
                              id="CasteCertificate" accept="image/*, .pdf">
                            <label class="custom-file-label" for="CasteCertificate">Choose
                              Certificate</label>
                          </div>
                        </div>
                      </div>
                    </div>
                    <div class="col-md-4">
                      <div class="form-group mb-2">
                        <label class="mb-0">Caste Certificate Issuing Officer</label>
                        <input type="text" name="CasteCertificateIssuingOfficer" id="CasteCertificateIssuingOfficer"
                          class="form-control form-control-sm">
                      </div>
                    </div>
                    <div class="col-md-4">
                      <div class="form-group mb-2">
                        <label class="mb-0" for="Caste Validity">Caste Validity Certificate No. &amp; Date</label>
                        <div class="input-group">
                          <div class="custom-file">
                            <input type="file" name="CasteValidity" class="custom-file-input form-control-sm"
                              id="CasteValidity" accept="image/*, .pdf">
                            <label class="custom-file-label" for="CasteValidity">Choose
                              Certificate</label>
                          </div>
                        </div>
                      </div>
                    </div>
                    <div class="col-md-4">
                      <div class="form-group mb-2">
                        <label class="mb-0">Validity certificate issuing Committee</label>
                        <input type="text" name="CasteValidityCertificateIssuingCommittee"
                          id="CasteValidityCertificateIssuingCommittee" class="form-control form-control-sm">
                      </div>
                    </div>
                    <div class="col-md-4">
                      <div class="form-group mb-2">
                        <label class="mb-0">Category</label>
                        <select class="form-control form-control-sm select2" style="width: 100%;" aria-hidden="true"
                          name="BasicCategory" id="BasicCategory" data-placeholder="Select Category">
                          <option value="" selected disabled>Select Category</option>
                        </select>
                      </div>
                    </div>
                    <div class="col-md-4" style="display: none;" id="BasicSubCategory_field">
                      <div class="form-group mb-2">
                        <label class="mb-0">Sub Category</label>
                        <select class="form-control form-control-sm select2" style="width: 100%;" aria-hidden="true"
                          name="BasicSubCategory" id="BasicSubCategory" data-placeholder="Select Sub Category">
                          <option value="" disabled selected>Select Sub Category</option>
                          <option value="A">A</option>
                          <option value="B">B</option>
                          <option value="C">C</option>
                          <option value="D">D</option>
                        </select>
                      </div>
                    </div>
                    <div class="col-md-4">
                      <div class="form-group mb-2">
                        <label class="mb-0">Appointment Category</label>
                        <select class="form-control form-control-sm select2" style="width: 100%;" aria-hidden="true"
                          name="AppointmentCategory" id="AppointmentCategory"
                          data-placeholder="Select Appointment Category">
                          <option value="" selected disabled>Select Appointment Category</option>
                        </select>
                      </div>
                    </div>
                    <div class="col-md-4">
                      <div class="form-group mb-2">
                        <label class="mb-0">Parallel Reservation</label>
                        <select class="form-control form-control-sm select2" style="width: 100%;" aria-hidden="true"
                          name="ParallelReservation" id="ParallelReservation" data-placeholder="Select Reservation">
                          <option value="" selected disabled>Select Reservation</option>
                        </select>
                      </div>
                    </div>
                    <div class="col-md-4" style="display: none;" id="handicapped_field">
                      <div class="form-group mb-2">
                        <label class="mb-0">Type of Handicap</label>
                        <input type="text" name="TypeOfHandicap" id="TypeOfHandicap"
                          class="form-control form-control-sm">
                      </div>
                    </div>
                    <div class="col-md-4">
                      <div class="form-group mb-2">
                        <label class="mb-0">Faculty</label>
                        <select class="form-control form-control-sm select2" style="width: 100%;" aria-hidden="true"
                          name="Faculty" id="Faculty" data-placeholder="Select Faculty">
                          <option value="" selected disabled>Select Faculty</option>
                        </select>
                      </div>
                    </div>

                    <div class="col-md-4">
                      <div class="form-group mb-2">
                        <label class="mb-0">Sanction Post</label>
                        <select class="form-control form-control-sm select2" style="width: 100%;" aria-hidden="true"
                          name="SanctionPost" id="SanctionPost" data-placeholder="Select Sanction Post">
                          <option value="" selected disabled>Select Sanction Post</option>
                        </select>
                      </div>
                    </div>
                    <div class="col-md-4">
                      <div class="form-group mb-2">
                        <label class="mb-0" for="Pay Scale">Pay Scale/Pay Commission</label>
                        <select class="form-control form-control-sm select2" style="width: 100%;" aria-hidden="true"
                          name="PayScale" id="PayScale" data-placeholder="Select PayScale">
                          <option value="" disabled selected>Select PayScale</option>
                        </select>
                      </div>
                    </div>
                    <div class="col-md-4" id="PayBandId_field" style="display: none;">
                      <div class="form-group mb-2">
                        <label class="mb-0" for="PayBand">PayBand</label>
                        <select class="form-control form-control-sm select2" style="width: 100%;" aria-hidden="true"
                          name="PayBandId" id="PayBandId" data-placeholder="Select PayBand">
                          <option value="" disabled selected>Select PayBand</option>
                        </select>
                      </div>
                    </div>
                    <div class="col-md-4" id="GradePayId_field" style="display: none;">
                      <div class="form-group mb-2">
                        <label class="mb-0" for="GradePay">GradePay</label>
                        <select class="form-control form-control-sm select2" style="width: 100%;" aria-hidden="true"
                          name="GradePayId" id="GradePayId" data-placeholder="Select GradePay">
                          <option value="" disabled selected>Select GradePay</option>
                        </select>
                      </div>
                    </div>
                    <div class="col-md-4" id="PayLevelId_field" style="display: none;">
                      <div class="form-group mb-2">
                        <label class="mb-0" for="PayLevel">PayLevel</label>
                        <select class="form-control form-control-sm select2" style="width: 100%;" aria-hidden="true"
                          name="PayLevelId" id="PayLevelId" data-placeholder="Select PayLevel">
                          <option value="" disabled selected>Select PayLevel</option>
                        </select>
                      </div>
                    </div>
                    <div class="col-md-4" id="PayLevelAmount_field" style="display: none;">
                      <div class="form-group mb-2">
                        <label class="mb-0" for="PayLevelAmount">Basic Pay (Basic Pay + G.P.)</label>
                        <input type="text" id="PayLevelAmount" name="PayLevelAmount"
                          class="form-control form-control-sm">
                      </div>
                    </div>
                    <div class="col-md-4" id="PayLevelAmountId_field" style="display: none;">
                      <div class="form-group mb-2">
                        <label class="mb-0" for="PayLevelAmount">Basic Pay</label>
                        <select class="form-control form-control-sm select2" style="width: 100%;" aria-hidden="true" name="PayLevelAmount" id="PayLevelAmountId" data-placeholder="Select PayLevel">
                          <option value="" disabled selected>Select PayLevel Amount</option>
                        </select>
                      </div>
                    </div>
                    <div class="col-md-4">
                      <div class="form-group mb-2">
                        <label class="mb-0" for="Scheme Name">Name of Scheme</label>
                        <select class="form-control form-control-sm select2" style="width: 100%;" aria-hidden="true" name="SchemeNameId" id="SchemeNameId" data-placeholder="Select Scheme">
                          <option value="" disabled selected>Select Scheme</option>
                        </select>
                      </div>
                    </div>
                    <div class="col-md-4">
                      <div class="form-group mb-2">
                        <label class="mb-0" for="Mobile">Mobile No.</label>
                        <input type="tel" onkeyup="onlyNumbers(this)" id="MobileNo" name="MobileNo"
                          class="form-control form-control-sm">
                      </div>
                    </div>
                    <div class="col-md-4">
                      <div class="form-group mb-2">
                        <label class="mb-0" for="AlternateMobile">Alternate Mobile No.</label>
                        <input type="tel" onkeyup="onlyNumbers(this)" id="AlternateMobileNo" name="AlternateMobileNo"
                          class="form-control form-control-sm">
                      </div>
                    </div>
                    <div class="col-md-4">
                      <div class="form-group mb-2">
                        <label class="mb-0" for="Aadhar Card">Aadhar Card No.</label>
                        <input type="text" id="AadharCardNo" name="AadharCardNo" class="form-control form-control-sm">
                      </div>
                    </div>
                    <div class="col-md-4">
                      <div class="form-group mb-2">
                        <label class="mb-0" for="Pan Card">Pan Card No.</label>
                        <input type="text" id="PanCardNo" name="PanCardNo" class="form-control form-control-sm"
                          style="text-transform: uppercase">
                      </div>
                    </div>
                    <div class="col-md-4">
                      <div class="form-group mb-2">
                        <label class="mb-0" for="Email">Email ID</label>
                        <input type="email" id="EmailId" name="EmailId" class="form-control form-control-sm">
                      </div>
                    </div>
                    <div class="col-md-4">
                      <div class="form-group mb-2">
                        <label class="mb-0" for="EmployeePhoto">Employee Photo</label>
                        <div class="input-group">
                          <div class="custom-file">
                            <input type="file" name="EmployeePhoto" class="custom-file-input form-control-sm"
                              id="EmployeePhoto" accept="image/*" />
                            <label class="custom-file-label" for="EmployeePhoto">Choose
                              photo</label>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </section>
                {{-- General Information --}}
                <h3>General Information</h3>
                <section>
                  <div class="row">
                    <div class="col-md-4">
                      <div class="form-group mb-2">
                        <label class="mb-0" for="date">Date of Birth</label>
                        <div class="input-group date" id="BirthDate" data-target-input="nearest">
                          <input type="text" id="DateOfBirth" name="DateOfBirth"
                            class="form-control form-control-sm datetimepicker-input" data-target="#DateOfBirth" />
                          <div class="input-group-append" data-target="#DateOfBirth" data-toggle="datetimepicker">
                            <div class="input-group-text"><i class="fa fa-calendar"></i>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                    <div class="col-md-4">
                      <div class="form-group">
                        <div class="form-group clearfix">
                          <label class="mb-0" for="date">Joining Time: </label>
                          <div class="col-sm-12">
                            <div class="icheck-primary d-inline">
                              <input type="radio" id="forenoon" value="Forenoon" name="JoiningTime" checked="">
                              <label class="mb-0" for="forenoon">Forenoon</label>
                            </div>
                            <div class="icheck-primary d-inline">
                              <input type="radio" id="afternoon" value="Afternoon" name="JoiningTime">
                              <label class="mb-0" for="afternoon">Afternoon</label>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                    <div class="col-md-4">
                      <div class="form-group mb-2">
                        <label class="mb-0" for="date">Joining Date</label>
                        <div class="input-group date" id="ServiceJoiningDate" data-target-input="nearest">
                          <input type="text" id="JoiningDate" name="JoiningDate"
                            class="form-control form-control-sm datetimepicker-input" data-target="#JoiningDate" />
                          <div class="input-group-append" data-target="#JoiningDate" data-toggle="datetimepicker">
                            <div class="input-group-text"><i class="fa fa-calendar"></i>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="row">
                    <div class="col-md-4">
                      <div class="form-group mb-2">
                        <label class="mb-0" for="RetirementAge">Retirement Age</label>
                        <select class="form-control form-control-sm select2" style="width: 100%;" aria-hidden="true"
                          name="RetirementAge" id="RetirementAge" data-placeholder="Select Year">
                          <option value="" selected disabled>Select Year</option>
                          <option value="58 years">58 years</option>
                          <option value="60 years">60 years</option>
                          <option value="62 years">62 years</option>
                          <option value="65 years">65 years</option>
                        </select>
                      </div>
                    </div>
                    <div class="col-md-4">
                      <div class="form-group mb-2">
                        <label class="mb-0" for="date">Retirement Date</label>
                        <div class="input-group date" id="DateOfRetirement" data-target-input="nearest">
                          <input type="text" id="RetirementDate" name="RetirementDate"
                            class="form-control form-control-sm datetimepicker-input" data-target="#RetirementDate" />
                          <div class="input-group-append" data-target="#RetirementDate" data-toggle="datetimepicker">
                            <div class="input-group-text"><i class="fa fa-calendar"></i>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                    <div class="col-md-4">
                      <div class="form-group mb-2">
                        <label class="mb-0">Gender</label>
                        <select class="form-control form-control-sm select2" style="width: 100%;" aria-hidden="true"
                          name="Gender" id="Gender" data-placeholder="Select Gender">
                          <option value="" selected disabled>Select Gender</option>
                        </select>
                      </div>
                    </div>
                  </div>
                  <div class="row">
                    <div class="col-md-4">
                      <div class="form-group mb-2">
                        <label class="mb-0" for="MaritalStatus">Marital Status</label>
                        <select class="form-control form-control-sm select2" style="width: 100%;" aria-hidden="true"
                          name="MaritalStatus" id="MaritalStatus" data-placeholder="Select Marital Status">
                          <option value="" selected disabled>Select Marital Status</option>
                        </select>
                      </div>
                    </div>
                    <div class="col-md-4">
                      <div class="form-group mb-2" id="father_field">
                        <label class="mb-0" for="FatherName">Fathers's name and Residence</label>
                        <input type="text" id="FatherName" name="FatherName" class="form-control form-control-sm">
                      </div>
                      <div class="form-group mb-2" id="husband_field" style="display: none">
                        <label class="mb-0" for="HusbandName">Husband's name and Residence</label>
                        <input type="text" id="HusbandName" name="HusbandName" class="form-control form-control-sm">
                      </div>
                    </div>
                    <div class="col-md-4">
                      <div class="form-group mb-2">
                        <label class="mb-0" for="ChangeOfName">Change of Name After Marriage Registration</label>
                        <input type="text" id="NameChange" name="NameChange" class="form-control form-control-sm">
                      </div>
                    </div>
                    <div class="col-md-4">
                      <div class="form-group mb-2">
                        <label class="mb-0" for="GazetteUpload">Gazette Upload</label>
                        <div class="input-group">
                          <div class="custom-file">
                            <input type="file" name="NameChangeGazetteUpload" class="custom-file-input form-control-sm" id="NameChangeGazetteUpload" accept="image/*, .pdf">
                            <label class="custom-file-label" for="GazetteUpload">Choose
                              file</label>
                          </div>
                        </div>
                      </div>
                    </div>
                    <div class="col-md-4">
                      <div class="form-group mb-2">
                        <label class="mb-0" for="UniversityOrder">University Order</label>
                        <div class="input-group">
                          <div class="custom-file">
                            <input type="file" name="NameChangeUniversityOrder" class="custom-file-input form-control-sm" id="NameChangeUniversityOrder" accept="image/*, .pdf">
                            <label class="custom-file-label" for="UniversityOrder">Choose
                              file</label>
                          </div>
                        </div>
                      </div>
                    </div>
                    <div class="col-md-4" style="display: none;" id="MarriageCertificate_field">
                      <div class="form-group mb-2">
                        <label class="mb-0" for="MarriageCertificate">Marriage Certificate</label>
                        <div class="input-group">
                          <div class="custom-file">
                            <input type="file" name="MarriageCertificate" class="custom-file-input form-control-sm"
                              id="MarriageCertificate" accept="image/*, .pdf">
                            <label class="custom-file-label" for="MarriageCertificate">Choose
                              Certificate</label>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="row">
                    <div class="col-md-4">
                      <div class="form-group mb-2">
                        <label class="mb-0" for="Personal mark of Identification">Personal mark of
                          Identification</label>
                        <input type="text" id="MarkOfIdentification" name="MarkOfIdentification"
                          class="form-control form-control-sm">
                      </div>
                    </div>
                    <div class="col-md-4">
                      <div class="form-group mb-2">
                        <label class="mb-0" for="Exact height of measurement">Exact height of measurement</label>
                        <textarea id="ExactHeightOfMeasurement" name="ExactHeightOfMeasurement" rows="1"
                          class="form-control form-control-sm"></textarea>
                      </div>
                    </div>
                    <div class="col-md-4">
                      <div class="form-group mb-2">
                        <label class="mb-0" for="Character Certificate">Character Certificate/Police
                          Verification</label>
                        <div class="input-group">
                          <div class="custom-file">
                            <input type="file" name="CharacterCertificate" class="custom-file-input form-control-sm"
                              id="CharacterCertificate" accept="image/*, .pdf">
                            <label class="custom-file-label" for="CharacterCertificate">Choose
                              Certificate</label>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="row">
                    <div class="col-md-4">
                      <div class="form-group mb-2">
                        <label class="mb-0" for="Probation Period">Probation Period Clear Date</label>
                        <div class="input-group date" id="DateOfProbationPeriod" data-target-input="nearest">
                          <input type="text" id="ProbationPeriodDate" name="ProbationPeriodDate"
                            class="form-control form-control-sm datetimepicker-input"
                            data-target="#ProbationPeriodDate">
                          <div class="input-group-append" data-target="#ProbationPeriodDate"
                            data-toggle="datetimepicker">
                            <div class="input-group-text"><i class="fa fa-calendar"></i>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                    <div class="col-md-4">
                      <div class="form-group mb-2">
                        <label class="mb-0" for="PermanencyCertificate">Permanency Certificate</label>
                        <div class="input-group">
                          <div class="custom-file">
                            <input type="file" name="PermanencyCertificate" class="custom-file-input form-control-sm"
                              id="PermanencyCertificate" accept="image/*, .pdf">
                            <label class="custom-file-label" for="PermanencyCertificate">Choose
                              Certificate</label>
                          </div>
                        </div>
                      </div>
                    </div>
                    <div class="col-md-4">
                      <div class="form-group mb-2">
                        <label class="mb-0" for="Sign of the employees">Sign of the employees</label>
                        <div class="input-group">
                          <div class="custom-file">
                            <input type="file" name="EmployeeSign" class="custom-file-input form-control-sm"
                              id="EmployeeSign" accept="image/*, .pdf">
                            <label class="custom-file-label" for="Sign of the employees">Choose
                              file</label>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="row">
                    <div class="col-md-4">
                      <div class="form-group mb-2">
                        <label class="mb-0" for="PensionScheme">Pension Scheme</label>
                        <select class="form-control form-control-sm select2" style="width: 100%;" aria-hidden="true"
                          name="PensionScheme" id="PensionScheme" data-placeholder="Select Pension Scheme">
                          <option value="" selected disabled>Select Pension Scheme</option>
                        </select>
                      </div>
                    </div>
                    <div class="col-md-4">
                      <div class="form-group mb-2">
                        <label class="mb-0" for="PensionSchemeNumber">Pension Scheme No.</label>
                        <input type="text" id="PensionSchemeNumber" name="PensionSchemeNumber"
                          class="form-control form-control-sm">
                      </div>
                    </div>
                    <div class="col-md-4">
                      <div class="form-group mb-2">
                        <label class="mb-0" for="PensionScheme Certificate">Pension Scheme Certificate</label>
                        <div class="input-group">
                          <div class="custom-file">
                            <input type="file" name="PensionSchemeCertificate" class="custom-file-input form-control-sm" id="PensionSchemeCertificate" accept="image/*, .pdf">
                            <label class="custom-file-label" for="Pension Scheme Certificate">Choose
                              file</label>
                          </div>
                        </div>
                      </div>
                    </div>
                    <div class="col-md-4">
                      <div class="form-group mb-0">
                        <label for="GisScheme">GIS:</label>
                        <div class="col-sm-12 mt-0">
                          <div class="icheck-primary d-inline">
                            <input type="radio" id="GisSchemeNo" name="GisScheme" value="No" checked="">
                            <label for="GisSchemeNo">No</label>
                          </div>
                          <div class="icheck-primary d-inline">
                            <input type="radio" id="GisSchemeYes" name="GisScheme" value="Yes">
                            <label for="GisSchemeYes">Yes</label>
                          </div>
                        </div>
                      </div>
                    </div>
                    <div class="col-md-4" id="GISNo_field" style="display: none">
                      <div class="form-group mb-2">
                        <label class="mb-0" for="GISNo">GIS No.</label>
                        <input type="text" id="GISNo" name="GISNo" class="form-control form-control-sm">
                      </div>
                    </div>
                    <div class="col-md-4" id="GISCertificate_field" style="display: none">
                      <div class="form-group mb-2">
                        <label class="mb-0" for="GISCertificate">GIS Certificate</label>
                        <div class="input-group">
                          <div class="custom-file">
                            <input type="file" name="GISCertificate" class="custom-file-input form-control-sm" id="GISCertificate" accept="image/*, .pdf">
                            <label class="custom-file-label" for="GISCertificate">Choose file</label>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="row">
                    <div class="col-md-3">
                      <div class="form-group mb-2">
                        <label class="mb-0" for="Departmental Exam">Departmental Exam</label>
                        <input type="text" id="DepartmentalExam" name="DepartmentalExam"
                          class="form-control form-control-sm">
                      </div>
                    </div>
                    <div class="col-md-3">
                      <div class="form-group mb-2">
                        <label class="mb-0" for="HindiLanguage">Hindi Language passed</label>
                        <input type="text" id="HindiLanguage" name="HindiLanguage" class="form-control form-control-sm">
                      </div>
                    </div>
                    <div class="col-md-3">
                      <div class="form-group mb-2">
                        <label class="mb-0" for="MarathiLanguage">Marathi Language passed</label>
                        <input type="text" id="MarathiLanguage" name="MarathiLanguage"
                          class="form-control form-control-sm">
                      </div>
                    </div>
                    <div class="col-md-3">
                      <div class="form-group mb-2">
                        <label class="mb-0" for="Computer Exam">MSCIT/Computer Exam</label>
                        <input type="text" id="ComputerExam" name="ComputerExam" class="form-control form-control-sm">
                      </div>
                    </div>
                  </div>
                  <div class="row">
                    <div class="col-md-4">
                      <div class="form-group mb-0">
                        <label for="ConfidentialReport">Confidential Report:</label>
                        <div class="col-sm-12 mt-0">
                          <div class="icheck-primary d-inline">
                            <input type="radio" id="ConfidentialReportNo" name="ConfidentialReport" value="No"
                              checked="">
                            <label for="ConfidentialReportNo">No</label>
                          </div>
                          <div class="icheck-primary d-inline">
                            <input type="radio" id="ConfidentialReportYes" name="ConfidentialReport" value="Yes">
                            <label for="ConfidentialReportYes">Yes</label>
                          </div>
                        </div>
                      </div>
                      <div class="form-group mt-0" id="ConfidentialReport_year_field" style="display: none;">
                        <label class="mb-0" for="FinancialYear">Financial Year</label>
                          <select class="form-control form-control-sm select2" style="width: 100%;" aria-hidden="true" name="ConfidentialReportYear" id="ConfidentialReportYear" data-placeholder="Select Year">
                            <option value="" disabled selected>Select Year</option>
                          </select>
                      </div>
                    </div>
                    <div class="col-md-4">
                      <div class="form-group mb-0">
                        <label for="AssetsLiabilities">Assets Liabilities:</label>
                        <div class="col-sm-12 mt-0">
                          <div class="icheck-primary d-inline">
                            <input type="radio" id="AssetsLiabilitiesNo" name="AssetsLiabilities" value="No" checked="">
                            <label for="AssetsLiabilitiesNo">No</label>
                          </div>
                          <div class="icheck-primary d-inline">
                            <input type="radio" id="AssetsLiabilitiesYes" name="AssetsLiabilities" value="Yes">
                            <label for="AssetsLiabilitiesYes">Yes</label>
                          </div>
                        </div>
                      </div>
                      <div class="form-group mt-0" id="AssetsLiabilities_year_field" style="display: none;">
                        <label class="mb-0" for="AssetsLiabilities">Financial Year</label>
                          <select class="form-control form-control-sm select2" style="width: 100%;" aria-hidden="true" name="AssetsLiabilitiesYear" id="AssetsLiabilitiesYear" data-placeholder="Select Year">
                            <option value="" disabled selected>Select Year</option>
                          </select>
                      </div>
                    </div>
                  </div>
                </section>
                {{-- Address --}}
                <h3>Address</h3>
                <section>
                  <div class="row">
                    <div class="col-md-6">
                      <div class="card card-light">
                        <div class="card-header">
                          <h3 class="card-title">Permanent Address:</h3>
                        </div>
                        <div class="card-body">
                          <div class="row">
                            <div class="col-md-12">
                              <div class="form-group mb-2">
                                <label class="mb-0" for="Home town Decalration">Home town Decalration</label>
                                <textarea id="HomeTownDecalration" name="HomeTownDecalration" rows="1"
                                  class="form-control form-control-sm"></textarea>
                              </div>
                            </div>
                          </div>
                          <div class="form-group mb-2">
                            <label class="mb-0" for="PermanentStreetAddress">Street Address</label>
                            <input type="text" id="PermanentStreetAddress" name="PermanentStreetAddress"
                              class="form-control form-control-sm permanent-address">
                          </div>
                          <div class="row">
                            <div class="col-md-6">
                              <div class="form-group mb-2">
                                <label class="mb-0" for="PermanentCountry">Country</label>
                                <select class="form-control form-control-sm select2" style="width: 100%;"
                                  aria-hidden="true" data-placeholder="Select Country" name="PermanentCountry"
                                  id="PermanentCountry">
                                  <option value="" selected>Select Country</option>
                                </select>
                              </div>
                            </div>
                            <div class="col-md-6">
                              <div class="form-group mb-2">
                                <label class="mb-0" for="PermanentState">State</label>
                                <select id="PermanentState" name="PermanentState"
                                  class="form-control form-control-sm select2 permanent-address"
                                  data-placeholder="Select State" aria-hidden="true" style="width: 100%;">
                                  <option value="" selected disabled>Select State</option>
                                </select>
                              </div>
                            </div>
                          </div>
                          <div class="row">
                            <div class="col-md-6">
                              <div class="form-group mb-2">
                                <label class="mb-0" for="PermanentDistrict">District</label>
                                <select id="PermanentDistrict" name="PermanentDistrict"
                                  class="form-control form-control-sm select2 permanent-address"
                                  data-placeholder="Select District" aria-hidden="true" style="width: 100%;">
                                  <option value="" selected disabled>Select District</option>
                                </select>
                              </div>
                            </div>
                            <div class="col-md-6">
                              <div class="form-group mb-2">
                                <label class="mb-0">City</label>
                                <select id="PermanentCity" name="PermanentCity"
                                  class="form-control form-control-sm select2 permanent-address"
                                  data-placeholder="Select City" aria-hidden="true" style="width: 100%;">
                                  <option value="" selected disabled>Select City</option>
                                </select>
                              </div>
                            </div>
                          </div>
                          <div class="row">
                            <div class="col-md-6">
                              <div class="form-group mb-2">
                                <label class="mb-0" for="PermanentPinCode">Pin Code</label>
                                <input type="text" id="PermanentPinCode" name="PermanentPinCode"
                                  class="form-control form-control-sm permanent-address">
                              </div>
                            </div>
                          </div>
                          <!-- /.card-body -->
                        </div>
                        <!-- /.card -->
                      </div>
                    </div>
                    {{-- Current Address --}}
                    <div class="col-md-6">
                      <div class="card card-light">
                        <div class="card-header">
                          <h3 class="card-title">Current Address:</h3>
                        </div>
                        <div class="card-body">
                          <div class="clearfix">
                            <div class="icheck-primary">
                              <input type="checkbox" name="SameAsPermanent" id="SameAsPermanent">
                              <label class="mb-0" for="SameAsPermanent">Same as Permanent</label>
                            </div>
                          </div>
                          <div class="form-group mb-2">
                            <label class="mb-0" for="CurrentStreetAddress">Street Address</label>
                            <input type="text" id="CurrentStreetAddress" name="CurrentStreetAddress"
                              class="form-control form-control-sm current-address">
                          </div>
                          <div class="row">
                            <div class="col-md-6">
                              <div class="form-group mb-2">
                                <label class="mb-0">Country</label>
                                <select class="form-control form-control-sm current-address select2"
                                  style="width: 100%;" aria-hidden="true" data-placeholder="Select Country"
                                  name="CurrentCountry" id="CurrentCountry">
                                  <option value="" selected>Select Country</option>
                                </select>
                              </div>
                            </div>
                            <div class="col-md-6">
                              <div class="form-group mb-2">
                                <label class="mb-0">State</label>
                                <select id="CurrentState" name="CurrentState"
                                  class="form-control form-control-sm select2 current-address" style="width: 100%;"
                                  data-placeholder="Select State">
                                  <option value="" disabled selected>Select State</option>
                                </select>
                              </div>
                            </div>
                          </div>
                          <div class="row">
                            <div class="col-md-6">
                              <div class="form-group mb-2">
                                <label class="mb-0">District</label>
                                <select id="CurrentDistrict" name="CurrentDistrict"
                                  class="form-control form-control-sm select2 current-address" style="width: 100%;"
                                  data-placeholder="Select District">
                                  <option value="" disabled selected>Select District</option>
                                </select>
                              </div>
                            </div>
                            <div class="col-md-6">
                              <div class="form-group mb-2">
                                <label class="mb-0">City</label>
                                <select id="CurrentCity" name="CurrentCity"
                                  class="form-control form-control-sm select2 current-address" style="width: 100%;"
                                  data-placeholder="Select City">
                                  <option value="" disabled selected>Select City</option>
                                </select>
                              </div>
                            </div>
                          </div>
                          <div class="row">
                            <div class="col-md-6">
                              <div class="form-group mb-2">
                                <label class="mb-0" for="CurrentPinCode">Pin Code</label>
                                <input type="text" id="CurrentPinCode" name="CurrentPinCode"
                                  class="form-control form-control-sm current-address">
                              </div>
                            </div>
                          </div>
                          <!-- /.card-body -->
                        </div>
                        <!-- /.card -->
                      </div>
                    </div>
                  </div>
                </section>
                {{-- Deputation Detail --}}
                <h3>Deputation Detail</h3>
                <section>
                  <div class="row">
                    <div class="col-md-3">
                      <div class="form-group mb-">
                        <label class="mb-0" for="Name of University">University/Office/Department</label>
                        <input type="text" id="NameOfUniversity" name="NameOfUniversity"
                          class="form-control form-control-sm">
                      </div>
                    </div>
                    <div class="col-md-3">
                      <div class="form-group mb-2">
                        <label class="mb-0" for="Joining Date">Releave from University</label>
                        <div class="input-group date" id="DateOfJoining" data-target-input="nearest">
                          <input type="text" id="DeputationJoiningDate" name="DeputationJoiningDate"
                            class="form-control form-control-sm datetimepicker-input"
                            data-target="#DeputationJoiningDate" readonly />
                          <div class="input-group-append" data-target="#DeputationJoiningDate"
                            data-toggle="datetimepicker">
                            <div class="input-group-text"><i class="fa fa-calendar"></i>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                    <div class="col-md-3">
                      <div class="form-group mb-2">
                        <label class="mb-0" for="NameOfPost">Name of Post</label>
                        <input type="text" id="NameOfPost" name="NameOfPost" class="form-control form-control-sm">
                      </div>
                    </div>
                    <div class="col-md-3">
                      <div class="form-group mb-2">
                        <label class="mb-0" for="Deputation Order">Deputation Order</label>
                        <div class="input-group">
                          <div class="custom-file">
                            <input type="file" name="DeputationOrder" class="custom-file-input form-control-sm" id="DeputationOrder" accept="image/*, .pdf">
                            <label class="custom-file-label" for="DeputationOrder">Choose file</label>
                          </div>
                        </div>
                      </div>
                    </div>

                  </div>
                </section>
              </div>
            </form>
          </div>
        </div>

      </div>

    </div>
  </section><br />
  <!-- /.content -->
</div>
<!-- /.content-wrapper -->

{{-- JS Start Here --}}
{{-- Change Nomination / Promotion field Appointment by --}}
<script>
  $(document).ready(function() {
        $("#AppointmentBy").change(function() {
            //alert($(this).val())
            if ($(this).val() == "W8whXFgWakAvkHU6OTgvgXBVPZgmQNveI48YY") { // Promotion
                $("#MeritListNo_field").css('display', 'none');
                $("#MeritListNo").prop('required', false);
                $("#LowerCadreSeniority_field").css('display', 'block');
                $("#LowerCadreSeniority").prop('required', true);
            } else {
                $("#MeritListNo_field").css('display', 'block');
                $("#MeritListNo").prop('required', true);
                $("#LowerCadreSeniority_field").css('display', 'none');
                $("#LowerCadreSeniority").prop('required', false);
            }
        });
    });
</script>

{{-- Get VJNT Sub Category based (A, B, C, D) --}}
<script>
  $(document).ready(function() {
        $("#BasicCategory").change(function() {
            //alert($(this).val())
            if ($(this).val() == "AZykcEx8amzvxWRH2GuSfEDGXI26F9TALSwBb") { // VJ Category
                $("#BasicSubCategory_field").css('display', 'block');
                $("#BasicSubCategory").prop('required', true);
            } else {
                $("#BasicSubCategory_field").css('display', 'none');
                $("#BasicSubCategory").prop('required', false);
            }
        });
    });
</script>
{{-- Display Handicap type field on select Handicapped --}}
<script>
  $(document).ready(function() {
        $("#ParallelReservation").change(function() {
            //alert($(this).val())
            if ($(this).val() == "xZSMXGzNukC4oVify77Q1ty5qBThTyF33ZYsf") { // Handicapped
              $("#handicapped_field").css('display', 'block');
                $("#TypeOfHandicap").prop('required', true);
            } else {
                $("#handicapped_field").css('display', 'none');
                $("#TypeOfHandicap").prop('required', false);
            }
        });
    });
</script>
{{-- Change Father / Husband field --}}
<script>
  $(document).ready(function() {
        $("#MaritalStatus, #Gender").change(function() {
            //alert($(this).val())
            if ($('#MaritalStatus').val() == "aS5kX3SrEoVsUbaKgjWoGDuRXfUaWHrV15qbW" && $('#Gender').val() == "08WMYIHgVlaDipwSoeCV7mDLylEhfjjxlVbaI") { // Married and Female
                $("#father_field").css('display', 'none');
                $("#FatherName").prop('required', false);
                $("#husband_field").css('display', 'block');
                $("#HusbandName").prop('required', true);
            } else {
                $("#father_field").css('display', 'block');
                $("#FatherName").prop('required', true);
                $("#husband_field").css('display', 'none');
                $("#HusbandName").prop('required', false);
            }
        });
    });
</script>

{{-- Get Marriage certificate upload field on select option married --}}
<script>
  $(document).ready(function() {
        $("#MaritalStatus").change(function() {
            //alert($(this).val())
            if ($(this).val() == "aS5kX3SrEoVsUbaKgjWoGDuRXfUaWHrV15qbW") { // Married
                $("#MarriageCertificate_field").css('display', 'block');
                $("#MarriageCertificate").prop('required', true);
            } else {
                $("#MarriageCertificate_field").css('display', 'none');
                $("#OtherCasteName").prop('required', false);
            }
        });
    });
</script>

{{-- GIS Pension field hide/show --}}
<script>
  $(document).ready(function() {
    $("input[name=GisScheme]").change(function() {
            //alert($(this).val())
            if ($(this).val() == "Yes") { // Yes
                $("#GISNo_field, #GISCertificate_field").css('display', 'block');
                $("#GISNo, #GISCertificate").prop('required', true);
            } else {
                $("#GISNo_field, #GISCertificate_field").css('display', 'none');
                $("#GISNo, #GISCertificate").prop('required', false);
            }
        });
    });
</script>

{{-- Save Data Function --}}
<script>
  function saveEmpRecord() {
    event.preventDefault();
        // Get Form Data
        var token = $("#token_add_emp").val();
        var EmployeeName = $('#EmployeeName').val();
        var AppointmentOrderNo = $('#AppointmentOrderNo').val();
        var AppointmentOrderDate = $('#AppointmentOrderDate').val();
        var EmpDDO = $('#DDO :selected').val();
        var ControllingOfficer = $('#ControllingOfficer :selected').val();
        var WorkPlace = $('#WorkPlace :selected').val();
        var DepartmentName = $('#DepartmentName :selected').val();
        var AppointmentBy = $('#AppointmentBy :selected').val();
        var MeritListNo = $('#MeritListNo').val();
        var LowerCadreSeniority = $('#LowerCadreSeniority').val();
        var Group = $('#Group :selected').val();
        var Cadre = $('#Cadre :selected').val();
        var EmployeeDesignation = $('#EmployeeDesignation :selected').val();
        var Religion = $('#Religion :selected').val();
        var Caste = $('#Caste :selected').val();
        var OtherCasteName = $('#OtherCasteName').val();
        var CasteCertificateIssuingOfficer = $('#CasteCertificateIssuingOfficer').val();
        var CasteValidityCertificateIssuingCommittee = $('#CasteValidityCertificateIssuingCommittee').val();
        var BasicCategory = $('#BasicCategory :selected').val();
        var BasicSubCategory = $('#BasicSubCategory :selected').val();
        var AppointmentCategory = $('#AppointmentCategory :selected').val();
        var ParallelReservation = $('#ParallelReservation :selected').val();
        var TypeOfHandicap = $('#TypeOfHandicap').val();
        var Faculty = $('#Faculty :selected').val();
        var SanctionPost = $('#SanctionPost :selected').val();
        
        // Employee PayMatrix
        var PayScale = $("#PayScale :selected").val();
        var PayBandId = $("#PayBandId :selected").val();
        var GradePayId = $("#GradePayId :selected").val();
        
        var PayLevelAmount = $('#PayLevelAmount').val();
        var PayLevelId = '';
        var PayLevelAmountId = '';
        if(PayScale == "KmmsPcY7uGEnMyRYmSYlD66z6dwLsMtqG19Qs") // 7th Pay
        {
          var PayLevelId = $("#PayLevelId :selected").val();
          var PayLevelAmountId = $('#PayLevelAmountId :selected').val();
          var GetAmount = $('#PayLevelAmountId').find('option :selected').text();
          var PayLevelAmount = $('#PayLevelAmount').val(GetAmount);
        } 

        var SchemeNameId = $('#SchemeNameId :selected').val();
        var MobileNo = $('#MobileNo').val();
        var AlternateMobileNo = $('#AlternateMobileNo').val();
        var AadharCardNo = $('#AadharCardNo').val();
        var PanCardNo = $('#PanCardNo').val().toUpperCase();
        var EmailId = $('#EmailId').val();
        var DateOfBirth = $('#DateOfBirth').val();
        var JoiningTime = $('input[name=JoiningTime]:checked').val();
        var JoiningDate = $('#JoiningDate').val();
        var RetirementAge = $('#RetirementAge :selected').val();
        var RetirementDate = $('#RetirementDate').val();
        var Gender = $('#Gender :selected').val();
        var MaritalStatus = $('#MaritalStatus :selected').val();
        var FatherName = $('#FatherName').val();
        var HusbandName = $('#HusbandName').val();
        var NameChange = $("#NameChange").val();
        var MarkOfIdentification = $('#MarkOfIdentification').val();
        var ExactHeightOfMeasurement = $('#ExactHeightOfMeasurement').val();
        var ProbationPeriodDate = $("#ProbationPeriodDate").val();
        var PensionSchemeId = $('#PensionScheme :selected').val();
        var PensionSchemeNumber = $("#PensionSchemeNumber").val();
        var GisScheme = $("input[name='GisScheme']:checked").val();
        var GISNo = $("#GISNo").val();
        var DepartmentalExam = $('#DepartmentalExam').val();
        var HindiLanguage = $('#HindiLanguage').val();
        var MarathiLanguage = $('#MarathiLanguage').val();
        var ComputerExam = $('#ComputerExam').val();
        var ComputerExam = $('#ComputerExam').val();
        var ComputerExam = $('#ComputerExam').val();
        var ConfidentialReport = $("input[name='ConfidentialReport']:checked").val();
        var ConfidentialReportYear = $('#ConfidentialReportYear').val();
        var AssetsLiabilities = $("input[name='AssetsLiabilities']:checked").val();
        var AssetsLiabilitiesYear = $('#AssetsLiabilitiesYear').val();
        
        // Address
        var HomeTownDecalration = $('#HomeTownDecalration').val();
        var PermanentStreetAddress = $('#PermanentStreetAddress').val();
        var PermanentCountry = $('#PermanentCountry').val();
        var PermanentState = $('#PermanentState').val();
        var PermanentDistrict = $('#PermanentDistrict').val();
        var PermanentCity = $('#PermanentCity').val();
        var PermanentPinCode = $('#PermanentPinCode').val();

        var SameAsPermanent = '';
        if($('input[name="SameAsPermanent"]').is(':checked'))
            {
              SameAsPermanent = '1'
            } 
        else
            {
              SameAsPermanent = '0'
            }

        var CurrentStreetAddress = $('#CurrentStreetAddress').val();
        var CurrentCountry = $('#CurrentCountry').val();
        var CurrentState = $('#CurrentState').val();
        var CurrentDistrict = $('#CurrentDistrict').val();
        var CurrentCity = $('#CurrentCity').val();
        var CurrentPinCode = $('#CurrentPinCode').val();
        
        // Deputation Deatil
        var NameOfUniversity = $("#NameOfUniversity").val();
        var DeputationJoiningDate = $("#DeputationJoiningDate").val();
        var NameOfPost = $("#NameOfPost").val();

        //Get Files
        var EmployeePhoto = $('#EmployeePhoto')[0].files;
        var CasteCertificate = $('#CasteCertificate')[0].files;
        var CasteValidity = $('#CasteValidity')[0].files;
        var NameChangeGazetteUpload = $('#NameChangeGazetteUpload')[0].files;
        var NameChangeUniversityOrder = $('#NameChangeUniversityOrder')[0].files;
        var CharacterCertificate = $('#CharacterCertificate')[0].files;
        var PermanencyCertificate = $('#PermanencyCertificate')[0].files;
        var PensionSchemeCertificate = $('#PensionSchemeCertificate')[0].files;
        var GISCertificate = $('#GISCertificate')[0].files;
        var DeputationOrder = $('#DeputationOrder')[0].files;
        var EmployeeSign = $('#EmployeeSign')[0].files;
        var MarriageCertificate = $('#MarriageCertificate')[0].files;
       
        // Form Data Start
        var fd = new FormData();
            fd.append('_token',token);
            fd.append('EmployeeName',EmployeeName);
            fd.append('AppointmentOrderNo',AppointmentOrderNo);
            fd.append('AppointmentOrderDate',AppointmentOrderDate);
            fd.append('DDOId',EmpDDO);
            fd.append('ControllingOfficerId',ControllingOfficer);
            fd.append('ActualWorkPlaceId',WorkPlace);
            fd.append('DepartmentId',DepartmentName);
            fd.append('AppointmentBy',AppointmentBy);
            fd.append('MeritListNo',MeritListNo);
            fd.append('LowerCadreSeniority',LowerCadreSeniority);
            fd.append('Group',Group);
            fd.append('CadreId',Cadre);
            fd.append('DesignationId',EmployeeDesignation);
            fd.append('ReligionId',Religion);
            fd.append('CasteId',Caste);
            fd.append('OtherCasteName',OtherCasteName);
            fd.append('CasteCertificateIssuingOfficer',CasteCertificateIssuingOfficer);
            fd.append('CasteValidityCertificateIssuingCommittee',CasteValidityCertificateIssuingCommittee);
            fd.append('BasicCategoryId',BasicCategory);
            fd.append('BasicSubCategory',BasicSubCategory);
            fd.append('AppointmentCategoryId',AppointmentCategory);
            fd.append('ParallelReservationId',ParallelReservation);
            fd.append('TypeOfHandicap',TypeOfHandicap);
            fd.append('FacultyId',Faculty);
            fd.append('SanctionPostId',SanctionPost);
            fd.append('PayScalePayCommission',PayScale);
            fd.append('PayLevelId',PayLevelId);
            fd.append('PayBandId',PayBandId);
            fd.append('GradePayId',GradePayId);
            fd.append('PayLevelAmount',PayLevelAmount);
            fd.append('PayLevelAmountId',PayLevelAmountId);
            fd.append('SchemeNameId',SchemeNameId);
            fd.append('MobileNo',MobileNo);
            fd.append('AlternateMobileNo',AlternateMobileNo);
            fd.append('AadharCardNo',AadharCardNo);
            fd.append('PanCardNo',PanCardNo);
            fd.append('EmailId',EmailId);
            fd.append('BirthDate',DateOfBirth);
            fd.append('JoiningTime',JoiningTime);
            fd.append('DateOfJoining',JoiningDate);
            fd.append('RetirementAge',RetirementAge);
            fd.append('DateOfRetirement',RetirementDate);
            fd.append('GenderId',Gender);
            fd.append('MaritalStatusId',MaritalStatus);
            fd.append('FathersName',FatherName);
            fd.append('HusbandsName',HusbandName);
            fd.append('NameChangeAfterMarriage',NameChange);
            fd.append('PersonalMarkOfIdentification',MarkOfIdentification);
            fd.append('ExactHeightOfMeasurement',ExactHeightOfMeasurement);
            fd.append('ClearDateOfProbationPeriod',ProbationPeriodDate);
            fd.append('PensionSchemeId',PensionSchemeId);
            fd.append('PensionSchemeNumber',PensionSchemeNumber);
            fd.append('GisScheme',GisScheme);
            fd.append('GISNo',GISNo);
            fd.append('DepartmentalExam',DepartmentalExam);
            fd.append('HindiLanguage',HindiLanguage);
            fd.append('MarathiLanguage',MarathiLanguage);
            fd.append('MSCITComputerExam',ComputerExam);
            fd.append('ConfidentialReport',ConfidentialReport);
            fd.append('ConfidentialReportYear',ConfidentialReportYear);
            fd.append('AssetsLiabilities',AssetsLiabilities);
            fd.append('AssetsLiabilitiesYear',AssetsLiabilitiesYear);
            
            // Address
            fd.append('HomeTownDeclaration',HomeTownDecalration);
            fd.append('PmtStreetAddress',PermanentStreetAddress);
            fd.append('PmtCity',PermanentCity);
            fd.append('PmtDistrict',PermanentDistrict);
            fd.append('PmtCountry',PermanentCountry);
            fd.append('PmtState',PermanentState);
            fd.append('PmtPinCode',PermanentPinCode);
            fd.append('SameAsPmt',SameAsPermanent);
            fd.append('CntStreetAddress',CurrentStreetAddress);
            fd.append('CntCity',CurrentCity);
            fd.append('CntDistrict',CurrentDistrict);
            fd.append('CntCountry',CurrentCountry);
            fd.append('CntState',CurrentState);
            fd.append('CntPinCode',CurrentPinCode);
            
            // Deputation
            fd.append('DeputationDepartment',NameOfUniversity);
            fd.append('JoiningDateOfDeputation',DeputationJoiningDate);
            fd.append('NameOfDeputationPost',NameOfPost);

            // files data
            fd.append('EmployeePhoto',EmployeePhoto[0]);
            fd.append('CasteCertificate',CasteCertificate[0]);
            fd.append('CasteValidity',CasteValidity[0]);
            fd.append('CharacterCertificate',CharacterCertificate[0]);
            fd.append('PermanencyCertificate',PermanencyCertificate[0]);
            fd.append('PensionSchemeCertificate',PensionSchemeCertificate[0]);
            fd.append('GISCertificate',GISCertificate[0]);
            fd.append('DeputationOrder',DeputationOrder[0]);
            fd.append('EmployeeSign',EmployeeSign[0]);
            fd.append('MarriageCertificate',MarriageCertificate[0]);
            fd.append('NameChangeGazetteUpload',NameChangeGazetteUpload[0]);
            fd.append('NameChangeUniversityOrder',NameChangeUniversityOrder[0]);
            
            // Send Data
            $.ajax({
                type: "post",
                url: "{{ url('store-employee') }}",
                data: fd,
                contentType: false,
                processData: false,
                success: function(response) {
                  const Toast = Swal.mixin({
                      toast: true,
                      position: 'top-end',
                      showConfirmButton: false,
                      timer: 2000,
                      timerProgressBar: true,
                      didOpen: (toast) => {
                        toast.addEventListener('mouseenter', Swal.stopTimer)
                        toast.addEventListener('mouseleave', Swal.resumeTimer)
                      }
                    })
                    Toast.fire({
                      icon: 'success',
                      title: 'Employee added successfully!'
                    });
                      $('form#AddEmployeeProfileForm').each(function() {
                      this.reset();
                      $('.select2').val(null).trigger('change');
                  });
                  setTimeout(function(){
                    window.location.reload(1);
                  }, 2000);
                },
                error: function(data) {
                  const Toast = Swal.mixin({
                      toast: true,
                      position: 'top-end',
                      showConfirmButton: false,
                      timer: 2000,
                      timerProgressBar: true,
                      didOpen: (toast) => {
                        toast.addEventListener('mouseenter', Swal.stopTimer)
                        toast.addEventListener('mouseleave', Swal.resumeTimer)
                      }
                    })
                    Toast.fire({
                      icon: 'error',
                      title: 'Something went wrong!'
                    });
                }
            });
  }
</script>

{{-- Master Data List assign to field --}}
<script>
  // Appointment By List
  $(document).ready(function() {
        $.ajax({
          type: "GET",
          url: "{{ url('/appointment-by-list') }}",
          dataType: "json",
          success: function(response) {
            var json = response.AppointmentBy;
            $.each(json, function(i, appointmentBy) {
              $("#AppointmentBy").append("<option value='" + appointmentBy.AppointmentId + "'>" + appointmentBy.AppointmentByName + "</option>");
              $('#AppointmentBy').trigger('change');
            });
          }
        });
    });

  // Religion List
  $(document).ready(function() {
        $.ajax({
          type: "GET",
          url: "{{ url('/religion-list') }}",
          dataType: "json",
          success: function(response) {
            var json = response.Religion;
            $.each(json, function(i, religion) {
              $("#Religion").append("<option value='" + religion.ReligionId + "'>" + religion.ReligionName + "</option>");
              $('#Religion').trigger('change');
            });
          }
        });
    });

  // Caste List
  $(document).ready(function() {
        $.ajax({
          type: "GET",
          url: "{{ url('/caste-list') }}",
          dataType: "json",
          success: function(response) {
            var json = response.Caste;
            $.each(json, function(i, caste) {
              $("#Caste").append("<option value='" + caste.CasteId + "'>" + caste.CasteName + "</option>");
              $('#Caste').trigger('change');
            });
          }
        });
    });
  // DDO List
  $(document).ready(function() {
        $.ajax({
          type: "GET",
          url: "{{ url('/ddo-list') }}",
          dataType: "json",
          success: function(response) {
            var json = response.DDOList;
            $.each(json, function(i, ddo) {
              $("#DDO").append("<option value='" + ddo.DDOId + "'>" + ddo.DDOName + "</option>");
              $('#DDO').trigger('change');
            });
          }
        });
    });
  // Controlling Officer List
  $(document).ready(function() {
        $.ajax({
          type: "GET",
          url: "{{ url('/controlling-officer-list') }}",
          dataType: "json",
          success: function(response) {
            var json = response.ControllingOfficerList;
            $.each(json, function(i, officer) {
              $("#ControllingOfficer").append("<option value='" + officer.ControllingOfficerId + "'>" + officer.ControllingOfficerName + "</option>");
              $('#ControllingOfficer').trigger('change');
            });
          }
        });
    });
  
  // Basic Category List
  $(document).ready(function() {
        $.ajax({
          type: "GET",
          url: "{{ url('/basic-category-list') }}",
          dataType: "json",
          success: function(response) {
            var json = response.BasicCategory;
            $.each(json, function(i, BasicCategory) {
              $("#BasicCategory").append("<option value='" + BasicCategory.BasicCategoryId + "'>" + BasicCategory.BasicCategoryName + "</option>");
              $('#BasicCategory').trigger('change');
            });
          }
        });
    });
  
  // Appointment Category List
  $(document).ready(function() {
        $.ajax({
          type: "GET",
          url: "{{ url('/appointment-category-list') }}",
          dataType: "json",
          success: function(response) {
            var json = response.AppointmentCategory;
            $.each(json, function(i, appointmentcategory) {
              $("#AppointmentCategory").append("<option value='" + appointmentcategory.AppointmentCategoryId + "'>" + appointmentcategory.AppointmentCategoryName + "</option>");
              $('#AppointmentCategory').trigger('change');
            });
          }
        });
    });

  // Parallel Reservation List
  $(document).ready(function() {
        $.ajax({
          type: "GET",
          url: "{{ url('/parallel-reservation-list') }}",
          dataType: "json",
          success: function(response) {
            var json = response.ParallelReservation;
            $.each(json, function(i, ParallelReservation) {
              $("#ParallelReservation").append("<option value='" + ParallelReservation.ParallelReservationId + "'>" + ParallelReservation.ParallelReservationName + "</option>");
              $('#ParallelReservation').trigger('change');
            });
          }
        });
    });
  
  // Sanction Post List
  $(document).ready(function() {
        $.ajax({
          type: "GET",
          url: "{{ url('/sanction-post-list') }}",
          dataType: "json",
          success: function(response) {
            var json = response.SanctionPost;
            $.each(json, function(i, SanctionPost) {
              $("#SanctionPost").append("<option value='" + SanctionPost.SanctionPostId + "'>" + SanctionPost.SanctionPostName + "</option>");
              $('#SanctionPost').trigger('change');
            });
          }
        });
    });

  // Faculty List
  $(document).ready(function() {
        $.ajax({
          type: "GET",
          url: "{{ url('/faculty-list') }}",
          dataType: "json",
          success: function(response) {
            var json = response.Faculty;
            $.each(json, function(i, faculty) {
              $("#Faculty").append("<option value='" + faculty.FacultyId + "'>" + faculty.FacultyName + "</option>");
              $('#Faculty').trigger('change');
            });
          }
        });
    });

  
  // Marital Status
  $(document).ready(function() {
        $.ajax({
          type: "GET",
          url: "{{ url('/marital-status-list') }}",
          dataType: "json",
          success: function(response) {
            var json = response.MaritalStatus;
            $.each(json, function(i, marital) {
              $("#MaritalStatus").append("<option value='" + marital.MaritalStatusId + "'>" + marital.MaritalStatusName + "</option>");
              $('#MaritalStatus').trigger('change');
            });
          }
        });
    });
  // Gender List
  $(document).ready(function() {
        $.ajax({
          type: "GET",
          url: "{{ url('/gender-list') }}",
          dataType: "json",
          success: function(response) {
            var json = response.Gender;
            $.each(json, function(i, gender) {
              $("#Gender").append("<option value='" + gender.GenderId + "'>" + gender.GenderName + "</option>");
              $('#Gender').trigger('change');
            });
          }
        });
    });

  // PayScale List
  $(document).ready(function() {
        $.ajax({
          type: "GET",
          url: "{{ url('/payscale-list') }}",
          dataType: "json",
          success: function(response) {
            var json = response.PayScale;
            $.each(json, function(i, payscale) {
              $("#PayScale").append("<option value='" + payscale.PayScaleId + "'>" + payscale.PayScaleName + "</option>");
              $('#PayScale').trigger('change');
            });
          }
        });
    });

  // PayBand List
  $(document).ready(function() {
        $.ajax({
          type: "GET",
          url: "{{ url('/payband-list') }}",
          dataType: "json",
          success: function(response) {
            var json = response.PayBand;
            $.each(json, function(i, payband) {
              $("#PayBandId").append("<option value='" + payband.PayBandId + "'>" + payband.PayBandName + "</option>");
              $('#PayBandId').trigger('change');
            });
          }
        });
    });
  // Pension Scheme List
  $(document).ready(function() {
        $.ajax({
          type: "GET",
          url: "{{ url('/pension-scheme-list') }}",
          dataType: "json",
          success: function(response) {
            var json = response.PensionScheme;
            $.each(json, function(i, pensionscheme) {
              $("#PensionScheme").append("<option value='" + pensionscheme.PensionSchemeId + "'>" + pensionscheme.PensionSchemeName + "</option>");
              $('#PensionScheme').trigger('change');
            });
          }
        });
    });
  // Name Of Scheme List
  $(document).ready(function() {
        $.ajax({
          type: "GET",
          url: "{{ url('/scheme-name-list') }}",
          dataType: "json",
          success: function(response) {
            var json = response.SchemeNameList;
            $.each(json, function(i, schemename) {
              $("#SchemeNameId").append("<option value='" + schemename.SchemeNameId + "'>" + schemename.NameOfScheme + "</option>");
              $('#SchemeNameId').trigger('change');
            });
          }
        });
    });
</script>

{{-- Form Validation and Store Record --}}
<script>
  var form = $("#AddEmployeeProfileForm");
  form.validate({
      errorPlacement: function errorPlacement(error, element) { element.before(error); },
      rules: {
        EmployeeName: {
          required: true,
          pattern: '[a-z A-Z]+'
        },
        AppointmentOrderNo: {
         required: true,
         // minlength: 5
        },
        DDO: {
          required: true,
        },
        ControllingOfficer: {
          required: true,
        },
        WorkPlace: {
          required: true,
        },
        DepartmentName: {
          required: true,
        },
        AppointmentBy: {
          required: true,
        },
        Group: {
          required: true,
        },
        Cadre: {
          required: true,
        },
        EmployeeDesignation: {
          required: true,
        },
        Religion: {
          required: true,
        },
        Caste: {
          required: true,
        },
        OtherCasteName: {
          required: true,
        },
        CasteCertificate: {
          accept: "image/*, pdf"
        },
        BasicCategory: {
          required: true,
        },
        AppointmentCategory: {
          required: true,
        },
        ParallelReservation: {
          required: true,
        },
        Faculty: {
          required: true,
        },
        SanctionPost: {
          required: true,
        },
        PayScale: {
          required: true,
        },
        SchemeNameId: {
          required: true,
        },
        EmailId: {
          //required: true,
          email: true,
          remote: {
            type: "POST",
            url:'{{ url("/") }}/check-duplicate-email',
            data: {
              EmailId: function() {
                return $( "#EmailId" ).val();
              },
              '_token':$('meta[name="csrf-token"]').attr('content')
            }
          }
        },
        AadharCardNo: {
          required: true,
          pattern: '^([0-9]){12}$',
          remote: {
            type: "POST",
            url:'{{ url("/") }}/check-duplicate-adhar',
            data: {
              AadharCardNo: function() {
                return $( "#AadharCardNo" ).val();
              },
              '_token':$('meta[name="csrf-token"]').attr('content')
            }
          }
        },
        PanCardNo: {
          required: true,
          pattern: '[A-Za-z]{5}[0-9]{4}[A-Za-z]{1}$',
          remote: {
            type: "POST",
            url:'{{ url("/") }}/check-duplicate-pan',
            data: {
              PanCardNo: function() {
                return $( "#PanCardNo" ).val();
              },
              '_token':$('meta[name="csrf-token"]').attr('content')
            }
          }
        },
        MobileNo: {
          required: true,
          pattern: '^([0-9]){10}$',
          remote: {
            type: "POST",
            url:'{{ url("/") }}/check-duplicate-mobile',
            data: {
              MobileNo: function() {
                return $( "#MobileNo" ).val();
              },
              '_token':$('meta[name="csrf-token"]').attr('content')
            }
          }
        },
        AlternateMobileNo: {
          pattern: '^([0-9]){10}$',
        },
        CasteValidityCertificate: {
        //  required: true,
          accept: "image/*, pdf"
        },
        DateOfBirth: {
          required: true,
        },
        JoiningDate: {
          required: true,
        },
        RetirementAge: {
          required: true,
        },
        RetirementDate: {
          required: true,
        },
        Gender: {
          required: true,
        },
        MaritalStatus: {
          required: true,
        },
        NameChangeGazetteUpload: {
          accept: "image/*, pdf",
        },
        NameChangeUniversityOrder: {
          accept: "image/*, pdf",
        },
        MarriageCertificate: {
          accept: "image/*, pdf",
        },
        MarkOfIdentification: {
          required: true,
        },
        ExactHeightOfMeasurement: {
          required: true,
        },
        CharacterCertificate: {
          required: true,
          accept: "image/*, pdf",
        },
        ProbationPeriodDate: {
          required: true,
        },
        PermanencyCertificate: {
        //  required: true,
          accept: "image/*, pdf"
        },
        EmployeeSign: {
          required: true,
          accept: "image/*, pdf"
        },
        PermanentPinCode: {
          pattern: '^([0-9]){6}$'
        },
        CurrentPinCode: {
          pattern: '^([0-9]){6}$'
        },
        PensionScheme: {
          required: true,
        },
        DepartmentalExam: {
          required: true,
        },
        HindiLanguage: {
          required: true,
        },
        MarathiLanguage: {
          required: true,
        },
        ComputerExam: {
          required: true,
        },
        HomeTownDecalration: {
          required: true,
        },
        PermanentStreetAddress: {
          required: true,
        },
        PermanentCountry: {
          required: true,
        },
        PermanentState: {
          required: true,
        },
        PermanentDistrict: {
          required: true,
        },
        PermanentCity: {
          required: true,
        },
        PermanentPinCode: {
          required: true,
        },
        CurrentStreetAddress: {
          required: true,
        },
        CurrentCountry: {
          required: true,
        },
        CurrentState: {
          required: true,
        },
        CurrentDistrict: {
          required: true,
        },
        CurrentCity: {
          required: true,
        },
        CurrentPinCode: {
          required: true,
        },
        DeputationOrder: {
          accept: "image/*, pdf",
        },
      },
      messages: {
        EmployeeName: {
          required: "Please enter employee name",
        },
        EmployeeDesignation: {
          required: "Please select designation",
        },
        AppointmentOrderNo: {
          required: "Please provide Appointment order no. & date",
          minlength: "Your Order no. must be at least 5 characters long"
        },
        email: {
        required: "Please enter a email address",
        email: "Please enter a valid email address"
        },
        AadharCardNo: { 
          pattern: 'Please enter a valid Adhar No.',
          required:"Adhar no. is required",
          remote:"This Adhar no. is already exist"
        },
        PanCardNo: { 
          pattern: 'Please enter a valid PAN no.',
          required:"PAN no. is required",
          remote:"This PAN no. is already exist"
        },
        MobileNo: { 
          //pattern: 'Please enter without country code',
          required:"Mobile no. is required",
          remote:"This Mobile no. is already exist"
        },
      }
  });
  form.children("div").steps({
      headerTag: "h3",
      bodyTag: "section",
      transitionEffect: "slideLeft",
      onStepChanging: function (event, currentIndex, newIndex)
      {
          form.validate().settings.ignore = ":disabled,:hidden";
          return form.valid();
      },
      onFinishing: function (event, currentIndex)
      {
          form.validate().settings.ignore = ":disabled";
          return form.valid();
      },
      onFinished: function (event, currentIndex)
      {
        saveEmpRecord();
      }
  });
</script>
{{-- Actual Work Place List --}}
<script>
  $(document).ready(function() {
        $.ajax({
          type: "GET",
          url: "{{ url('/actual-work-place-list') }}",
          dataType: "json",
          success: function(response) {
            var json = response.AWPList;
            $.each(json, function(i, AWPList) {
              $("#WorkPlace").append("<option value='" + AWPList.ActualWorkPlaceId + "'>" + AWPList.ActualWorkPlaceName + "</option>");
              $('#WorkPlace').trigger('change');
            });
          }
        });
      });
</script>
{{-- Department List based on AWP --}}
<script>
  $('#WorkPlace').on('select2:select', function (e) {
      //alert(e.params.data);
        var data = e.params.data;
        var AwpId = data.id;
        getDepartmentList(AwpId);
    });
    function getDepartmentList(AwpId){
        var AwpId = AwpId;
        $('#DepartmentName').empty();
            $.ajax({
            type: "GET",
            url: "{{ url('/') }}/get-department-list/" +AwpId,
            dataType: "json",
            success: function(response) {
                var json = response.Department;
                $.each(json, function(i, department) {
                    $("#DepartmentName").append("<option value='" + department.DepartmentId + "'>" + department.DepartmentName + "</option>");
                    $('#DepartmentName').val(null).trigger('change');
                    
                });
            }
        });
    }
</script>
{{-- Group List --}}
<script>
  $(document).ready(function() {
        $.ajax({
          type: "GET",
          url: "{{ url('/group-list') }}",
          dataType: "json",
          success: function(response) {
            var json = response.Group;
            $.each(json, function(i, group) {
              $("#Group").append("<option value='" + group.GroupId + "'>" + group.GroupName + "</option>");
              $('#Group').trigger('change');
            });
          }
        });
  }); 
</script>
{{-- Cadre List based on Group --}}
<script>
  $('#Group').on('select2:select', function (e) {
      //alert(e.params.data);
        var data = e.params.data;
        var GroupID = data.id;
        getCadreList(GroupID);
    });
    function getCadreList(GroupID){
        var GroupID = GroupID;
        $('#Cadre').empty();
            $.ajax({
            type: "GET",
            url: "{{ url('/') }}/get-cadre-list/" +GroupID,
            dataType: "json",
            success: function(response) {
                var json = response.Cadre;
                $.each(json, function(i, cadre) {
                    $("#Cadre").append("<option value='" + cadre.CadreId + "'>" + cadre.CadreName + "</option>");
                    $('#Cadre').val(null).trigger('change');
                    
                });
            }
        });
    }
</script>

{{-- Designation List based on Cadre --}}
<script>
  $('#Cadre').on('select2:select', function (e) {
      //alert(e.params.data);
        var data = e.params.data;
        var CadreID = data.id;
        getDesignationList(CadreID);
    });
    function getDesignationList(CadreID){
        var CadreID = CadreID;
        $('#Designation').empty();
            $.ajax({
            type: "GET",
            url: "{{ url('/') }}/get-designation-list/" +CadreID,
            dataType: "json",
            success: function(response) {
                var json = response.Designation;
                $.each(json, function(i, designation) {
                    $("#EmployeeDesignation").append("<option value='" + designation.DesignationId + "'>" + designation.DesignationName + "</option>");
                    $('#EmployeeDesignation').val(null).trigger('change');
                    
                });
            }
        });
    }
</script>

{{-- Change Field based payscale --}}
<script>
  $(document).ready(function() {
        $("#PayScale").change(function() {
            //alert($(this).val())
                $('#PayBandId').val(null).trigger('change');
                $('#GradePayId').empty();
                $('#PayLevelId').val(null).trigger('change');
                $('#PayLevelAmount').val('');
                $('#PayLevelAmountId').empty();
            if ($(this).val() == "l7Is9HD8Yr2nMQKmSwm189AEr3yawtvPrZrn4") { // 6th payscale
                $("#PayLevelId_field").css('display', 'none');
                $("#PayLevelId").prop('required', false);
                $("#PayLevelAmountId_field").css('display', 'none');
                $("#PayLevelAmountId").prop('required', false);
                $("#PayBandId_field").css('display', 'block');
                $("#PayBandId").prop('required', true);
                $("#GradePayId_field").css('display', 'block');
                $("#GradePayId").prop('required', true);
                $("#PayLevelAmount_field").css('display', 'block');
                $("#PayLevelAmount").prop('required', true);
            } else if ($(this).val() == "KmmsPcY7uGEnMyRYmSYlD66z6dwLsMtqG19Qs") { // 7th payscale
                $("#PayLevelId_field").css('display', 'block');
                $("#PayLevelId").prop('required', true);
                $("#PayLevelAmountId_field").css('display', 'block');
                $("#PayLevelAmountId").prop('required', true);
                $("#PayBandId_field").css('display', 'none');
                $("#PayBandId").prop('required', false);
                $("#GradePayId_field").css('display', 'none');
                $("#GradePayId").prop('required', false);
                $("#PayLevelAmount_field").css('display', 'none');
                $("#PayLevelAmount").prop('required', false);
            } else if ($(this).val() == "jpWwVaivsVq9dys2kPocbd0kfmQeM7FM8DuRm" || $(this).val() == "aJd0V3oRX2YI5G8hVN6PTDU1WrSIjOE9oQmSU") {
                $("#PayLevelId_field").css('display', 'none');
                $("#PayLevelId").prop('required', false);
                $("#PayLevelAmountId_field").css('display', 'none');
                $("#PayLevelAmountId").prop('required', false);
                $("#PayBandId_field").css('display', 'none');
                $("#PayBandId").prop('required', false);
                $("#GradePayId_field").css('display', 'none');
                $("#GradePayId").prop('required', false);
                $("#PayLevelAmount_field").css('display', 'block');
                $("#PayLevelAmount").prop('required', true);
            }
        });
    });
</script>

{{-- PayScale / PayGrade / PayLevel / PayLevel Amount--}}
<script>
  $('#PayBandId').on('select2:select', function (e) {
      //alert(e.params.data);
        var data = e.params.data;
        var PayBandId = data.id;
        getGradePayList(PayBandId);
    });
    function getGradePayList(PayBandId){
        var PayBandId = PayBandId;
        $('#GradePayId').empty();
            $.ajax({
            type: "GET",
            url: "{{ url('/') }}/get-gradepay-list/" +PayBandId,
            dataType: "json",
            success: function(response) {
                var json = response.GradePay;
                $.each(json, function(i, gradepay) {
                    $("#GradePayId").append("<option value='" + gradepay.GradePayId + "'>" + gradepay.GradePayName + "</option>");
                    $('#GradePayId').val(null).trigger('change');
                });
            }
        });
    }
    // Get PayLevel List based on PayScale
    $('#PayScale').on('select2:select', function (e) {
      //alert(e.params.data);
        var data = e.params.data;
        var PayScaleId = data.id;
        getPayLevelList(PayScaleId);
    });
    function getPayLevelList(PayScaleId){
        var PayScaleId = PayScaleId;
        $('#PayLevelId').empty();
            $.ajax({
            type: "GET",
            url: "{{ url('/') }}/get-paylevel-list/" +PayScaleId,
            dataType: "json",
            success: function(response) {
                var json = response.PayLevel;
                $.each(json, function(i, paylevel) {
                    $("#PayLevelId").append("<option value='" + paylevel.PayLevelId + "'>" + paylevel.PayLevelName + " (" + paylevel.AmountRange + ")" +"</option>");
                    $('#PayLevelId').val(null).trigger('change');
                });
            }
        });
    }
    // PayLevel Amount on select PayLevel
    $('#PayLevelId').on('select2:select', function (e) {
      //alert(e.params.data);
        var data = e.params.data;
        var PayLevelId = data.id;
        getPayLevelAmountList(PayLevelId);
    });
    function getPayLevelAmountList(PayLevelId){
        var PayLevelId = PayLevelId;
        $('#PayLevelAmountId').empty();
            $.ajax({
            type: "GET",
            url: "{{ url('/') }}/get-paylevel-amount-list/" +PayLevelId,
            dataType: "json",
            success: function(response) {
                var json = response.PayLevelAmount;
                $.each(json, function(i, paylevelamount) {
                    $("#PayLevelAmountId").append("<option value='" + paylevelamount.PayLevelAmount + "'>" + paylevelamount.PayLevelAmount + "</option>");
                    $('#PayLevelAmountId').val(null).trigger('change');
                });
            }
        });
    }
    
</script>
{{-- Get Financial Fields --}}
<script>
  // Get Financial Year field
  $(document).ready(function() {
        $("input[name=ConfidentialReport]").change(function() {
            //alert($(this).val())
            if ($(this).val() == "Yes") { // Yes
                $("#ConfidentialReport_year_field").css('display', 'block');
                $("#ConfidentialReporYear").prop('required', true);
            } else {
                $("#ConfidentialReport_year_field").css('display', 'none');
                $("#ConfidentialReporYear").prop('required', false);
            }
        });
        $("input[name=AssetsLiabilities]").change(function() {
            //alert($(this).val())
            if ($(this).val() == "Yes") { // Yes
                $("#AssetsLiabilities_year_field").css('display', 'block');
                $("#ConfidentialReporYear").prop('required', true);
            } else {
                $("#AssetsLiabilities_year_field").css('display', 'none');
                $("#AssetsLiabilitiesYear").prop('required', false);
            }
        });
    });
</script>
{{-- Country List --}}
<script>
  $(document).ready(function() {
        $.ajax({
          type: "GET",
          url: "{{ url('/country-list') }}",
          dataType: "json",
          success: function(response) {
            var json = response.Country;
            $.each(json, function(i, country) {
              $("#PermanentCountry, #CurrentCountry").append("<option value='" + country.id + "'>" + country.country_name + "</option>");
              $('#PermanentCountry, #CurrentCountry').trigger('change');
            });
          }
        });
    }); 

    // State List
    $(document).ready(function() {
        $.ajax({
            type: "GET",
            url: "{{ url('/') }}/indian-state-list/",
            dataType: "json",
            success: function(response) {
                var json = response.IndianState;
                $.each(json, function(i, state) {
                    $("#PermanentState, #CurrentState").append("<option value='" + state.id + "'>" + state.state_name + "</option>");
                    $('#PermanentState, #CurrentState').val(null).trigger('change');
                });
            }
        });
    });    
</script>

{{-- District, City List --}}
<script>
      // District List
  $('#PermanentState').on('select2:select', function (e) {
      //alert(e.params.data);
        var data = e.params.data;
        var state_id = data.id;
        getPermanentDistrictList(state_id);
    });
    $('#CurrentState').on('select2:select', function (e) {
      //alert(e.params.data);
        var data = e.params.data;
        var state_id = data.id;
        getCurrentDistrictList(state_id);
    });

        // City List
  $('#PermanentDistrict').on('select2:select', function (e) {
      //alert(e.params.data);
        var data = e.params.data;
        var district_id = data.id;
        getPermanentCityList(district_id);
    });
    $('#CurrentDistrict').on('select2:select', function (e) {
      //alert(e.params.data);
        var data = e.params.data;
        var district_id = data.id;
        getCurrentCityList(district_id);
    });

    // Permanent District List
    function getPermanentDistrictList(state_id){
        var state_id = state_id;
        $("#PermanentDistrict").empty();
        $("#PermanentCity").empty();
            $.ajax({
            type: "GET",
            url: "{{ url('/') }}/get-district-list/" +state_id,
            dataType: "json",
            success: function(response) {
                var json = response.SelectedDistrict;
                $.each(json, function(i, district) {
                    $("#PermanentDistrict").append("<option value='" + district.id + "'>" + district.district_name + "</option>");
                    $('#PermanentDistrict').val(null).trigger('change');
                    
                });
            }
        });
    }

    // Permanent City List
    function getPermanentCityList(district_id){
        var district_id = district_id;
        $("#PermanentCity").empty();
            $.ajax({
            type: "GET",
            url: "{{ url('/') }}/get-city-list/" +district_id,
            dataType: "json",
            success: function(response) {
                var json = response.SelectedCity;
                $.each(json, function(i, city) {
                    $("#PermanentCity").append("<option value='" + city.id + "'>" + city.city_name + "</option>");
                    $('#PermanentCity').val(null).trigger('change');
                    
                });
            }
        });
    }
       
    // Current District List
    function getCurrentDistrictList(state_id){
        var state_id = state_id;
        $("#CurrentDistrict").empty();
        $("#CurrentCity").empty();
            $.ajax({
            type: "GET",
            url: "{{ url('/') }}/get-district-list/" +state_id,
            dataType: "json",
            success: function(response) {
                var json = response.SelectedDistrict;
                $.each(json, function(i, district) {
                    $("#CurrentDistrict").append("<option value='" + district.id + "'>" + district.district_name + "</option>");
                    $('#CurrentDistrict').val(null).trigger('change');
                    
                });
            }
        });
    }
  
    // Current City List
    function getCurrentCityList(district_id){
        var district_id = district_id;
        $("#CurrentCity").empty();
            $.ajax({
            type: "GET",
            url: "{{ url('/') }}/get-city-list/" +district_id,
            dataType: "json",
            success: function(response) {
                var json = response.SelectedCity;
                $.each(json, function(i, city) {
                    $("#CurrentCity").append("<option value='" + city.id + "'>" + city.city_name + "</option>");
                    $('#CurrentCity').val(null).trigger('change');
                    
                });
            }
        });
    }
</script>

{{-- Copy Address --}}
<script>
  $("#SameAsPermanent").click(function() {
      if ($(this).is(":checked")) {
          var country_id = $("#PermanentCountry :selected").val();
          var state_id = $("#PermanentState :selected").val();
          var district_id = $("#PermanentDistrict :selected").val();
          getCurrentDistrictList(state_id);
          getCurrentCityList(district_id);
          addressCopy();
          
      } else {
          $("#CurrentStreetAddress").val("");
          $("#CurrentCountry").val("");
          $("#CurrentState").val("");
          $("#CurrentDistrict").val("");
          $("#CurrentCity").val("");
          $("#CurrentPinCode").val("");
      }
  });

  function addressCopy() {
      $("#CurrentStreetAddress").val($("#PermanentStreetAddress").val());
      $("#CurrentCountry").val($("#PermanentCountry").val()).trigger("change");
      $("#CurrentState").val($("#PermanentState :selected").val()).trigger("change");
      $("#CurrentDistrict").val($("#PermanentDistrict :selected").val());
      $("#CurrentCity").val($("#PermanentCity :selected").val());
      $("#CurrentPinCode").val($("#PermanentPinCode").val());
  }
  $(document).on("blur keyup", ".permanent-address", function() {
      if ($("#SameAsPermanent").is(":checked")) {
          var country_id = $("#PermanentCountry :selected").val();
          var state_id = $("#PermanentState :selected").val();
          var district_id = $("#PermanentDistrict :selected").val();
          getCurrentDistrictList(state_id);
          getCurrentCityList(district_id);
          addressCopy();
      }
  });
</script>

@endsection