<ol class="breadcrumb breadcrumb-arrow font-trirong">
  <li><a href="javascript://" [routerLink]="['/']">Home</a></li>
  <li><a href="javascript://">stepper</a></li>
</ol>

<div class="button-bar">

  <span class="spacer"></span>
  <button class="btn btn-sm btn-primary" (click)="reset()">Reset</button>

  <button class="btn btn-sm btn-primary" (click)="changeToHorizonTal()"
    *ngIf="layout.direction === 'vertical'">HorizonTal Layout</button>
  <button class="btn btn-sm btn-primary" (click)="changeToVertical()" *ngIf="layout.direction === 'horizontal'">Vertical
    Layout</button>

</div>

<div class="clr-row">
  <div [class]="layout.block1">
    <div class="card">
      <div class="card-header">
        <h3 style="text-align: center;"> Workflow</h3>
      </div>

      <div class=" card-block container">

        <clr-timeline [clrLayout]="layout.direction">
   <clr-timeline-step [clrState]="timelineStyle.step0.state">
            <clr-timeline-step-header>step 0</clr-timeline-step-header>
            <clr-timeline-step-title> <span *ngIf="!appToUpdate">Application</span><span *ngIf="appToUpdate"> Update
                Datagrid</span> </clr-timeline-step-title>
            <clr-timeline-step-description> <span>Create/Customer_information<br> Information Of
                Customer</span></clr-timeline-step-description>
          </clr-timeline-step>  

   <clr-timeline-step [clrState]="timelineStyle.step1.state">
            <clr-timeline-step-header>step 1</clr-timeline-step-header>
            <clr-timeline-step-title> <span *ngIf="!appToUpdate">Application</span><span *ngIf="appToUpdate"> Update
                Datagrid</span> </clr-timeline-step-title>
            <clr-timeline-step-description> <span>Create/Document_upload<br> Information Of
                Customer</span></clr-timeline-step-description>
          </clr-timeline-step>  

 <clr-timeline-step [clrState]="timelineStyle.step2.state">
            <clr-timeline-step-header>Step 2</clr-timeline-step-header>
            <clr-timeline-step-title>Review And <br>Confirmation</clr-timeline-step-title>
            <clr-timeline-step-description>
              Finish .
            </clr-timeline-step-description>
          </clr-timeline-step></clr-timeline>
      </div>
    </div>
  </div>
  <div [class]="layout.block2">
    <!--STEP 0-->
    <div class="card" *ngIf="timelineStyle.step0.open">
      <div class="card-header">
        <h3 style="text-align: center;" *ngIf="!appToUpdate">Customer_information</h3>
        <h3 style="text-align: center;" *ngIf="appToUpdate"> Update {{Customer_informationentryForm.name}}</h3>
        <div class="container">

          <br />

        
          <form [formGroup]="Customer_informationentryForm">

            <div class="container">

              <div class="clr-row"><div class="clr-col-sm-12">
 <label>  Name</label>
 <input class="clr-input"  type="text"  formControlName="name" />       
 </div>

<div class="clr-col-sm-12">             
 <label>  Description</label>             
 <textarea cols="10" rows="2" formControlName="description" placeholder="Textarea">  </textarea>
	            </div>

<div class="clr-col-sm-12">            
 <label> Active</label>            
  <input type="checkbox" formControlName="active" clrToggle/>            </div>

<div class="clr-col-sm-12">             
	 <label>Visa Entry Type</label>
							 <select formControlName="visa_entry_type">
							    <option [value]="null">Select  Visa Entry Type </option> 
								
 
								<option> a </option>
								 

 
								<option> b </option>
								 

						</select></div>

<div class="clr-col-sm-12">             
	 <label>Visa Duration</label>
							 <select formControlName="visa_duration">
							    <option [value]="null">Select  Visa Duration </option> 
								
 
								<option> 10_days </option>
								 

 
								<option> 20_days </option>
								 

						</select></div>

<div class="clr-col-sm-12">             
	 <label>Visa Processing</label>
							 <select formControlName="visa_processing">
							    <option [value]="null">Select  Visa Processing </option> 
								
 
								<option> test2 </option>
								 

 
								<option> test </option>
								 

						</select></div>

<div class="clr-col-sm-12">
 <label>  Travel start date</label>
 <input class="clr-input"  type="date"  formControlName="travel_start_date" />       
 </div>

<div class="clr-col-sm-12">
 <label>  Travel end date</label>
 <input class="clr-input"  type="date"  formControlName="travel_end_date" />       
 </div>

<div class="clr-col-sm-12">
 <label>  passport Number</label>
 <input class="clr-input"  type="number"  formControlName="passport_number" />      
 <div *ngIf="submitted && entryForm.controls.passport_number.errors" class="error_mess">
  <div *ngIf="submitted && entryForm.controls.passport_number.errors.required" class="error_mess">*This field is Required</div>
</div>  
 </div>

<div class="clr-col-sm-12">
 <label>  Passport issue date</label>
 <input class="clr-input"  type="date"  formControlName="passport_issue_date" />       
 </div>

<div class="clr-col-sm-12">
 <label>  Passport expiry date</label>
 <input class="clr-input"  type="date"  formControlName="passport_expiry_date" />       
 </div>

<div class="clr-col-sm-12">
						<label> Email Field</label>
<input class="clr-input" type="email" formControlName="email_field" pattern="[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$">
<div *ngIf="entryForm.controls['email_field'].errors" class="error_mess">
						          <div *ngIf="entryForm.controls['email_field'].hasError('pattern')" class="error_mess">* Email must be a valid email address
						            </div>  </div>
</div>

<div class="clr-col-sm-12">        
<label>  Phone Number</label>        
<input class="clr-input" type="text" formControlName="phone_number" pattern="((\+)?([1-9]{2}))?[1-9]{1}[0-9]{9}$" />
	        <div *ngIf="submitted && entryForm.controls['phone_number'].errors" class="error_mess">
	          <div *ngIf="submitted && entryForm.controls['phone_number'].hasError('pattern')" class="error_mess">* Please Follow your pattern,+91 Enter 10 digit Mobile Number.
	          </div>      </div>      </div>

<div class="clr-col-sm-12">
 <label>  Birth Place</label>
 <input class="clr-input"  type="text"  formControlName="birth_place" />       
 </div>

<div class="clr-col-sm-12">
 <label>  Date of Birth</label>
 <input class="clr-input"  type="date"  formControlName="date_of_birth" />       
 </div>

<div class="clr-col-sm-12">
            <label>Gender</label>
            <clr-radio-container clrInline style="margin-top: 0;"> 

 
   <clr-radio-wrapper>
                <input type="radio" clrRadio formControlName="gender" (change)="updategender('Male')" [checked]="entryForm.get('gender').value === 'Male'" />
                <label> Male </label>
              </clr-radio-wrapper>     
 

 
   <clr-radio-wrapper>
                <input type="radio" clrRadio formControlName="gender" (change)="updategender('Female')" [checked]="entryForm.get('gender').value === 'Female'" />
                <label> Female </label>
              </clr-radio-wrapper>     
 

    
 </clr-radio-container>
          </div> 




<div class="clr-col-sm-12">
 <label>  Profession</label>
 <input class="clr-input"  type="text"  formControlName="profession" />       
 </div>

<!-- currency field start -->
      <div class="clr-col-sm-12">        
 <label> Visa cost</label>         
<input type="number"  class="clr-input"   formControlName="visa_cost"  [value]="entryForm.value.visa_cost | number:'1.2-2' | removeCommas">   
    </div> 
	      <!-- currency field end -->

<div class="clr-col-sm-12">             
	 <label>Referrer</label>
							 <select formControlName="referrer">
							    <option [value]="null">Select  Referrer </option> 
								
 
								<option> Ref1 </option>
								 

 
								<option> Ref2 </option>
								 

						</select></div>

<div class="clr-col-sm-12">             
	 <label>Nationality</label>
							 <select formControlName="nationality">
							    <option [value]="null">Select  Nationality </option> 
								
 
								<option> British </option>
								 

 
								<option> Indian </option>
								 

						</select></div>

<div class="clr-col-sm-12">             
	 <label>Supplier</label>
							 <select formControlName="supplier">
							    <option [value]="null">Select  Supplier </option> 
								
 
								<option> sup2 </option>
								 

 
								<option> sup1 </option>
								 

						</select></div>

<div class="clr-col-sm-12">             
	 <label>Agent</label>
							 <select formControlName="agent">
							    <option [value]="null">Select  Agent </option> 
								
 
								<option> Agent1 </option>
								 

 
								<option> Agent2 </option>
								 

						</select></div>


              </div>













































              <div class="clr-row">

              </div>
              <!-- end row -->
              <br>
<div class="button">
  <button type="submit" class="btn btn-primary" (click)="onCustomer_informationSave()">Submit</button>
  <button type="button" class="btn btn-primary"
    (click)="this.timelineStyle.step0 = { state: 'success', open: false };
             this.timelineStyle.step1 = { state: 'current', open: true }; this.current()">Complete</button>
  <button type="button" class="btn btn-primary"
    (click)="this.timelineStyle.step0 = { state: 'current', open: false };
             this.timelineStyle.step1 = { state: 'not-started', open: true }">Next</button>
</div>  </div>
          </form>

        </div>

      </div>
    </div> 
    <!--STEP 1-->
    <div class="card" *ngIf="timelineStyle.step1.open">
      <div class="card-header">
        <h3 style="text-align: center;" *ngIf="!appToUpdate">Document_upload</h3>
        <h3 style="text-align: center;" *ngIf="appToUpdate"> Update {{Document_uploadentryForm.name}}</h3>
        <div class="container">

          <br />

        
          <form [formGroup]="Document_uploadentryForm">

            <div class="container">

              <div class="clr-row">




              </div>

<h6> List of imageupload_field</h6>

 <div  class="clr-row" style="margin-top: 10px;">
   <table class="table">
       <thead>
        <tr>
        <th>No</th>
         <th> File</th>
         <th>File Name</th>
          <th>Preview</th>
          <th>Cancel</th>
           </tr>
         </thead>
         <tbody >
           <tr *ngFor="let attach of FileDataimageupload_field; let i=index">
             <td style="width: 70px;"><input type="text" class="clr-input"  value={{i+1}} [readonly]="true">  </td>
             <td><input type="file" (change)="onFileChangedimageupload_field($event, i)"  accept="image/*" /><!--accept=".pdf,.doc,.docx,.jpg,.msg"-->
              </td>
         <td>{{attach.uploadedfile_name}}</td>
             <td >  <img [src]="attach.filePreview" alt="File Preview"  [ngModelOptions]="{standalone: true}" name="filePreview" width="100px" height="100px"></td>
             <td>
               <a  (click)="deleteRowimageupload_field(i)">
                 <clr-icon shape="trash" class="is-error"></clr-icon>
               </a>
             </td>
           </tr>


       </tbody>
         <button type="button" class="btn btn-primary button1" style="margin-left: 20px;" (click)="onAddLinesimageupload_field()">
           <clr-icon shape="plus"></clr-icon>
         </button>

       </table> </div>

<h6> List of fileupload_field</h6>

 <div  class="clr-row" style="margin-top: 10px;">
   <table class="table">
       <thead>
        <tr>
        <th>No</th>
         <th> File</th>
         <th>File Name</th>
          <th>Preview</th>
          <th>Cancel</th>
           </tr>
         </thead>
         <tbody >
           <tr *ngFor="let attach of FileDatafileupload_field; let i=index">
             <td style="width: 70px;"><input type="text" class="clr-input"  value={{i+1}} [readonly]="true">  </td>
             <td><input type="file" (change)="onFileChangedfileupload_field($event, i)"  accept = "application/pdf,.csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel" /><!--accept=".pdf,.doc,.docx,.jpg,.msg"-->
              </td>
         <td>{{attach.uploadedfile_name}}</td>
             <td >  <img [src]="attach.filePreview" alt="File Preview"  [ngModelOptions]="{standalone: true}" name="filePreview" width="100px" height="100px"></td>
             <td>
               <a  (click)="deleteRowfileupload_field(i)">
                 <clr-icon shape="trash" class="is-error"></clr-icon>
               </a>
             </td>
           </tr>


       </tbody>
         <button type="button" class="btn btn-primary button1" style="margin-left: 20px;" (click)="onAddLinesfileupload_field()">
           <clr-icon shape="plus"></clr-icon>
         </button>

       </table> </div>

              <div class="clr-row">

              </div>
              <!-- end row -->
              <br>
<div class="button">
  <button type="submit" class="btn btn-success" (click)="onDocument_uploadSave()">Document Upload</button>
  <button type="button" class="btn btn-primary"
    (click)="timelineStyle.step1 = { state: 'success', open: false };
             timelineStyle.step2 = { state: 'current', open: true }">Complete</button>
  <button class="btn btn-primary-outline"
    (click)="timelineStyle.step0 = { state: 'current', open: true };
             timelineStyle.step1 = { state: 'not-started', open: false }">Back</button>
</div>  </div>
          </form>

        </div>

      </div>
    </div> 
 <!--STEP 2-->  <div class="card" *ngIf="timelineStyle.step2.open">
      <div class="card-header">
        <h3 style="text-align: center;" *ngIf="!appToUpdate"> Review And Confirmation</h3>
        <div class="container">

          <!--  Info -->
   <div class="clr-row mb-3">
            <div class="clr-col-12">
              <h5>Customer_information Summary:</h5><p><strong>Name : </strong> {{ Customer_informationentryForm.get('name')?.value }}</p>

<p><strong>Description : </strong> {{ Customer_informationentryForm.get('description')?.value }}</p>

<p><strong>Active : </strong> {{ Customer_informationentryForm.get('active')?.value }}</p>

<p><strong>Visa Entry Type : </strong> {{ Customer_informationentryForm.get('visa_entry_type')?.value }}</p>

<p><strong>Visa Duration : </strong> {{ Customer_informationentryForm.get('visa_duration')?.value }}</p>

<p><strong>Visa Processing : </strong> {{ Customer_informationentryForm.get('visa_processing')?.value }}</p>

<p><strong>Travel start date : </strong> {{ Customer_informationentryForm.get('travel_start_date')?.value }}</p>

<p><strong>Travel end date : </strong> {{ Customer_informationentryForm.get('travel_end_date')?.value }}</p>

<p><strong>passport Number : </strong> {{ Customer_informationentryForm.get('passport_number')?.value }}</p>

<p><strong>Passport issue date : </strong> {{ Customer_informationentryForm.get('passport_issue_date')?.value }}</p>

<p><strong>Passport expiry date : </strong> {{ Customer_informationentryForm.get('passport_expiry_date')?.value }}</p>

<p><strong>Email Field : </strong> {{ Customer_informationentryForm.get('email_field')?.value }}</p>

<p><strong>Phone Number : </strong> {{ Customer_informationentryForm.get('phone_number')?.value }}</p>

<p><strong>Birth Place : </strong> {{ Customer_informationentryForm.get('birth_place')?.value }}</p>

<p><strong>Date of Birth : </strong> {{ Customer_informationentryForm.get('date_of_birth')?.value }}</p>

<p><strong>Gender : </strong> {{ Customer_informationentryForm.get('gender')?.value }}</p>

<p><strong>Profession : </strong> {{ Customer_informationentryForm.get('profession')?.value }}</p>

<p><strong>Visa cost : </strong> {{ Customer_informationentryForm.get('visa_cost')?.value }}</p>

<p><strong>Referrer : </strong> {{ Customer_informationentryForm.get('referrer')?.value }}</p>

<p><strong>Nationality : </strong> {{ Customer_informationentryForm.get('nationality')?.value }}</p>

<p><strong>Supplier : </strong> {{ Customer_informationentryForm.get('supplier')?.value }}</p>

<p><strong>Agent : </strong> {{ Customer_informationentryForm.get('agent')?.value }}</p>


            </div>
          </div>   <div class="clr-row mb-3">
            <div class="clr-col-12">
              <h5>Document_upload Summary:</h5><p><strong>Imageupload Field : </strong> {{ Document_uploadentryForm.get('imageupload_field')?.value }}</p>

<p><strong>Fileupload Field : </strong> {{ Document_uploadentryForm.get('fileupload_field')?.value }}</p>


            </div>
          </div><div class="button">
  <button class="btn btn-primary-outline"
    (click)="this.timelineStyle.step1 = { state: 'current', open: true };
             this.timelineStyle.step2 = { state: 'not-started', open: false }">Back</button>
  <button class="btn btn-primary"
    (click)="timelineStyle.step2 = { state: 'success', open: false }; current();
             alert('Process Finished Successfully!')">Finish</button>
</div></div>
      </div>
    </div>