<ol class="breadcrumb breadcrumb-arrow font-trirong">
  <li><a href="javascript://"> Customer Information</a></li>
</ol>
<div class="dg-wrapper">
  <div class="clr-row">
    <div class="clr-col-8">
      <h3>Customer Information </h3>
    </div>
    <div class="clr-col-4" style="text-align: right;">
 <button *ngIf="cardButton" id="add" class="btn btn-primary btn-icon" (click)="changeView()" >
        <clr-icon *ngIf="!isCardview" shape="grid-view"></clr-icon>    <clr-icon *ngIf="isCardview" shape="bars"></clr-icon>
      </button>
        <!-- button -->
<!-- insert button -->
      <button id="insert"  class="btn btn-primary" (click)="goToInsertReset_btn()">
        <clr-icon shape="plus"></clr-icon>Insert Reset_btn
      </button>
      <!-- insert end -->

     <button id="add" class="btn btn-primary" (click)="goToAdd(product)" >
        <clr-icon shape="plus"></clr-icon>ADD
      </button>
    </div></div>
  <ng-container *ngIf="!isCardview">   <!-- GET ALL -->     <clr-datagrid [clrDgLoading]="loading" [(clrDgSelected)]="selected">
    <clr-dg-placeholder>
        <ng-template #loadingSpinner>
            <clr-spinner>Loading ... </clr-spinner>
        </ng-template>
        <div *ngIf="error;else loadingSpinner">{{error}}</div>
    </clr-dg-placeholder>

<clr-dg-column [clrDgField]="' customer_name'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Customer Name
						    </ng-container></clr-dg-column>


<clr-dg-column [clrDgField]="' contact_person'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Contact Person
						    </ng-container></clr-dg-column>


<clr-dg-column [clrDgField]="' email_address'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Email Address
						    </ng-container></clr-dg-column>


<clr-dg-column [clrDgField]="' phone_number'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Phone Number
						    </ng-container></clr-dg-column>


<clr-dg-column [clrDgField]="' customer_address'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Customer Address
						    </ng-container></clr-dg-column>


<clr-dg-column [clrDgField]="' deployment_type'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Deployment Type
						    </ng-container></clr-dg-column>

 
 
 
<clr-dg-column [clrDgField]="' apfc_panel_monitoring'"> <ng-container *clrDgHideableColumn="{hidden: false}"> apfc_panel_monitoring
						    </ng-container></clr-dg-column>
   

 
<clr-dg-column [clrDgField]="' active_energy'"> <ng-container *clrDgHideableColumn="{hidden: false}"> active_energy
						    </ng-container></clr-dg-column>
   

 
<clr-dg-column [clrDgField]="' dg_monitoring-with_fuel_'"> <ng-container *clrDgHideableColumn="{hidden: false}"> dg_monitoring-with_fuel_
						    </ng-container></clr-dg-column>
   

 
<clr-dg-column [clrDgField]="' dg_monitoring-without_fuel_'"> <ng-container *clrDgHideableColumn="{hidden: false}"> dg_monitoring-without_fuel_
						    </ng-container></clr-dg-column>
   

 
<clr-dg-column [clrDgField]="' ups_monitoring'"> <ng-container *clrDgHideableColumn="{hidden: false}"> ups_monitoring
						    </ng-container></clr-dg-column>
   

 
<clr-dg-column [clrDgField]="' busbar_monitoring'"> <ng-container *clrDgHideableColumn="{hidden: false}"> busbar_monitoring
						    </ng-container></clr-dg-column>
   

 
<clr-dg-column [clrDgField]="' lt_panel_monitoring'"> <ng-container *clrDgHideableColumn="{hidden: false}"> lt_panel_monitoring
						    </ng-container></clr-dg-column>
   

 
<clr-dg-column [clrDgField]="' ht_panel_monitoring'"> <ng-container *clrDgHideableColumn="{hidden: false}"> ht_panel_monitoring
						    </ng-container></clr-dg-column>
   

 
<clr-dg-column [clrDgField]="' water_management-stp/etp'"> <ng-container *clrDgHideableColumn="{hidden: false}"> water_management-stp/etp
						    </ng-container></clr-dg-column>
   

 
<clr-dg-column [clrDgField]="' compressed_air-_gas_monitoring'"> <ng-container *clrDgHideableColumn="{hidden: false}"> compressed_air-_gas_monitoring
						    </ng-container></clr-dg-column>
   

 
<clr-dg-column [clrDgField]="' compressed_air-lpg/o2/n2/co2'"> <ng-container *clrDgHideableColumn="{hidden: false}"> compressed_air-lpg/o2/n2/co2
						    </ng-container></clr-dg-column>
   

 
<clr-dg-column [clrDgField]="' water_management-water_monitoring'"> <ng-container *clrDgHideableColumn="{hidden: false}"> water_management-water_monitoring
						    </ng-container></clr-dg-column>
   





 
 <!-- who column -->
      <clr-dg-column> <ng-container *clrDgHideableColumn="{hidden: false}">
        <clr-icon shape="bars"></clr-icon> Action
      </ng-container></clr-dg-column>
      <!-- end --> 

 <clr-dg-row *clrDgItems="let user of product" [clrDgItem]="user">

<clr-dg-cell>{{user. customer_name }}</clr-dg-cell>


<clr-dg-cell>{{user. contact_person }}</clr-dg-cell>


<clr-dg-cell>{{user. email_address }}</clr-dg-cell>


<clr-dg-cell>{{user. phone_number }}</clr-dg-cell>


<clr-dg-cell (click)="goToReplaceStringcustomer_address(user.customer_address)" style="cursor: pointer; align-items: center;"><clr-icon shape="details"></clr-icon></clr-dg-cell>


<clr-dg-cell>{{user. deployment_type }}</clr-dg-cell>



 
<clr-dg-cell>{{user. active_energy}}</clr-dg-cell>
   

 
<clr-dg-cell>{{user. dg_monitoring-with_fuel_}}</clr-dg-cell>
   

 
<clr-dg-cell>{{user. dg_monitoring-without_fuel_}}</clr-dg-cell>
   

 
<clr-dg-cell>{{user. ups_monitoring}}</clr-dg-cell>
   

 
<clr-dg-cell>{{user. apfc_panel_monitoring}}</clr-dg-cell>
   

 
<clr-dg-cell>{{user. busbar_monitoring}}</clr-dg-cell>
   

 
<clr-dg-cell>{{user. water_management-stp/etp}}</clr-dg-cell>
   

 
<clr-dg-cell>{{user. lt_panel_monitoring}}</clr-dg-cell>
   

 
<clr-dg-cell>{{user. ht_panel_monitoring}}</clr-dg-cell>
   

 
<clr-dg-cell>{{user. compressed_air-_gas_monitoring}}</clr-dg-cell>
   

 
<clr-dg-cell>{{user. compressed_air-lpg/o2/n2/co2}}</clr-dg-cell>
   

 
<clr-dg-cell>{{user. water_management-water_monitoring}}</clr-dg-cell>
   





 
  <!-- who column -->
<clr-dg-cell>
  <clr-signpost>
   <span style="cursor: pointer;" clrSignpostTrigger><clr-icon shape="help" class="success" style="color: rgb(0, 130, 236);"></clr-icon></span>
   <clr-signpost-content [clrPosition]="'left-middle'" *clrIfOpen>
     <h5 style="margin-top: 0">Who Column</h5>
           <div>Account ID: <code class="clr-code">{{user.accountId}}</code></div>
           <div>Created At: <code class="clr-code">{{user.createdAt| date}}</code></div>
           <div>Created By: <code class="clr-code">{{user.createdBy}}</code></div>
           <div>Updated At: <code class="clr-code">{{user.updatedAt | date}}</code></div>
           <div>Updated By: <code class="clr-code">{{user.updatedBy}}</code></div>
   </clr-signpost-content>
 </clr-signpost>
 </clr-dg-cell>
 
 <!-- who colmn --> 
 
 <clr-dg-action-overflow>
        <button class="action-item" (click)="onEdit(user)">Edit</button>
        <button class="action-item" (click)="onDelete(user)">Delete</button>
      </clr-dg-action-overflow>
         </clr-dg-row>
    <clr-dg-footer>
      <clr-dg-pagination #pagination [clrDgPageSize]="10">
        <clr-dg-page-size [clrPageSizeOptions]="[10,20,50,100]">Users per page</clr-dg-page-size>
        {{pagination.firstItem + 1}} - {{pagination.lastItem + 1}}
        of {{pagination.totalItems}} users
      </clr-dg-pagination>
    </clr-dg-footer>
  </clr-datagrid> </ng-container>
<ng-template #showInfo>
  <div class="alert alert-info" role="alert">
      <div class="alert-items">
          <div class="alert-item static">
              <span class="alert-text">
                <clr-icon class="alert-icon" shape="info-circle"></clr-icon>
                    Data could be found. Loading..
                  <clr-spinner [clrMedium]="true">Loading ...</clr-spinner>
              </span>
          </div>
      </div>
  </div>
</ng-template><ng-container *ngIf="isCardview">
  <div *ngIf="product; else showInfo" class="clr-row clr-align-items-start clr-justify-content-start">
    <div *ngFor="let app of product| filter:search; let index = i" class="clr-col-auto" >
      <div class="clr-row">
        <div class="clr-col-lg-12 clr-col-md-4 clr-col-sm-4 clr-col-12" style="width: 410px;">
  <div class="card" style="padding: 10px; "[style.background-color]="cardmodal.cardColor !== '' ? cardmodal.cardColor : 'white'">
    <div class="card-body" style="display: grid; grid-template-columns: repeat(13, 1fr); grid-template-rows: repeat(7, 1fr); gap: 5px;">
      <ng-container *ngFor="let item of dashboardArray">
        <div [style.gridColumn]="item.x + 1" [style.gridRow]="item.y + 1" [style.gridColumnEnd]="item.x + item.cols + 1"
          [style.gridRowEnd]="item.y + item.rows + 1">
          <div *ngIf="item.name === 'textField'" class="title-card card-title"
          [style.text-align]="item.alignment !== '' ? item.alignment : 'left'"
          [style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'"
          [style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'"
          [style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'"
          [style.font-style]="item.italic == true ? 'Italic' : 'normal'"
          [style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' : 
          (item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))"
          [style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'"
          [style.color]="item.textcolor !== '' ? item.textcolor : 'black'"     	 [style.background-color]="item.conditionValue ==  app[transform(item.fieldtext) ] ? item.conditionbackgroundcolor : item.backgroundcolor"
          [style.color]="item.conditionValue ==  app[transform(item.fieldtext) ] ? item.conditiontextcolor : item.textcolor">
           {{beforeText(item.fieldtext)}}
          {{ app[transform(item.fieldtext) ] }}
          {{afterText(item.fieldtext)}}
          </div>

          <div *ngIf="item.name === 'dateField'" class="title-card card-title"
          [style.text-align]="item.alignment !== '' ? item.alignment : 'left'"
          [style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'"
          [style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'"
          [style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'"
          [style.font-style]="item.italic == true ? 'Italic' : 'normal'"
          [style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' : 
          (item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))"
          [style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'"
          [style.color]="item.textcolor !== '' ? item.textcolor : 'black'"			 [style.background-color]="item.conditionValue ==  app[transform(item.fieldtext) ] ? item.conditionbackgroundcolor : item.backgroundcolor"
          [style.color]="item.conditionValue ==  app[transform(item.fieldtext) ] ? item.conditiontextcolor : item.textcolor">
          {{beforeText(item.fieldtext)}}
          {{ app[transform(item.fieldtext) ] | date}}
          {{afterText(item.fieldtext)}}
          </div>
          <div *ngIf="item.name === 'numberField'" class="title-card card-title"
          [style.text-align]="item.alignment !== '' ? item.alignment : 'left'"
          [style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'"
          [style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'"
          [style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'"
          [style.font-style]="item.italic == true ? 'Italic' : 'normal'"
          [style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' : 
          (item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))"
          [style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'"
          [style.color]="item.textcolor !== '' ? item.textcolor : 'black'"			 [style.background-color]="item.conditionValue ==  app[transform(item.fieldtext) ] ? item.conditionbackgroundcolor : item.backgroundcolor"
          [style.color]="item.conditionValue ==  app[transform(item.fieldtext) ] ? item.conditiontextcolor : item.textcolor">
          {{beforeText(item.fieldtext)}}
          {{ app[transform(item.fieldtext) ]}}
          {{afterText(item.fieldtext)}}
          </div>

          <div *ngIf="item.name === 'Line'" class="title-card card-title"
          [style.text-align]="item.alignment !== '' ? item.alignment : 'left'"
          [style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'"
          [style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'"
          [style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'"
          [style.font-style]="item.italic == true ? 'Italic' : 'normal'"
          [style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' : 
          (item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))"
          [style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'"
          [style.color]="item.textcolor !== '' ? item.textcolor : 'black'">
          <hr>
          </div>

          
          <div *ngIf="item.name === 'Icon'" class="icon-card"
          [style.text-align]="item.alignment !== '' ? item.alignment : 'left'"
          [style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'"
          [style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'"
          [style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'"
          [style.font-style]="item.italic == true ? 'Italic' : 'normal'"
          [style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' : 
          (item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))"
          [style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'"
          [style.color]="item.textcolor !== '' ? item.textcolor : 'black'"
          >
            <clr-icon [attr.shape]="item.iconName"></clr-icon>
          </div>

          <div *ngIf="item.name == 'Image'"
          [style.text-align]="item.alignment !== '' ? item.alignment : 'left'"
          [style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'"
          [style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'"
          [style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'"
          [style.font-style]="item.italic == true ? 'Italic' : 'normal'"
          [style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' : 
          (item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))"
          [style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'"
          [style.color]="item.textcolor !== '' ? item.textcolor : 'black'"
          [style.background-color]="item.conditionValue ==  app[transform(item.fieldtext) ] ? item.conditionbackgroundcolor : item.backgroundcolor"
          [style.color]="item.conditionValue ==  app[transform(item.fieldtext) ] ? item.conditiontextcolor : item.textcolor">			 <img id="filePreview" [src]="item.imageURL" alt="File Preview"
            [style.width]="item.imagewidth !== '' ? item.imagewidth + 'px' : '100px'"
            [style.height]="item.imagewidth !== '' ? item.imagewidth + 'px' : '100px'"></div>
        </div>
      </ng-container>
    </div>
  </div>
  </div>
  </div>
  </div>
  </div>
  </ng-container>
</div>









<clr-modal [(clrModalOpen)]="rsModalcustomer_address" [clrModalSize]="'xl'" [clrModalStaticBackdrop]="true">
						  <div class="modal-body">
						    <textarea class="form-control" style="width:100%; height: 400px;" readonly>{{rowSelected}}</textarea>
						  </div></clr-modal>







<!-- //		EDIT DATA......... -->
<clr-modal [(clrModalOpen)]="modalEdit" [clrModalSize]="'lg'" [clrModalStaticBackdrop]="true">
  <h3 class="modal-title">Update Customer Information
 <!--update button -->















</h3>
  <div class="modal-body" *ngIf="rowSelected.id">
    <h2 class="heading">{{rowSelected.id}}</h2>
<!-- button -->
    <form >
<div class="clr-row"> 
<div class="clr-col-sm-12">       
<label>Customer Name</label>
	        <input class="clr-input"  type="text" [(ngModel)]="rowSelected.customer_name" name="customer_name" />
	      </div>

<div class="clr-col-sm-12">       
<label>Contact Person</label>
	        <input class="clr-input"  type="text" [(ngModel)]="rowSelected.contact_person" name="contact_person" />
	      </div>

<div class="clr-col-sm-12">     
<label> Email Address</label>
								  <input id="name" class="clr-input" type="email" 
						 [(ngModel)]="rowSelected.email_address " name="email_address" pattern="[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$">
								  <div *ngIf="rowSelected.email_address && !isValidemail_address(rowSelected.email_address )" class="error_mess">
	            * Email must be a valid email address.         
  </div> </div>

<div class="clr-col-sm-12">         
<label> Phone Number</label>
	        <input id="name" class="clr-input" type="Text" [(ngModel)]="rowSelected.phone_number " name="phone_number" pattern="((\\+)?([1-9]{2}))?[1-9]{1}[0-9]{9}$" />
	        <div *ngIf="rowSelected.phone_number  && !isValidPhone_number(rowSelected.phone_number)" class="error_mess">
	          * Please Follow your pattern,+91 Enter 10 digit Mobile Number.
	        </div>       </div> 

<div class="clr-col-sm-12">         
<label> Customer Address</label>
	        <input id="name"  type="Text" class="form-control" style="border: none; outline: none; height:33px !important;" [(ngModel)]="rowSelected.customer_address" name=" customer_address " />       </div>

<div class="clr-col-sm-12">
 <label> Deployment Type</label> 
<select name="deployment_type" [(ngModel)]="rowSelected.deployment_type">
    <option [value]="null">Selectdeployment_type
    </option>


    
 

    <option> demo_could </option>
     

 

    <option> on_premise </option>
     


  </select> </div>

<!-- multiselect checkbox field start -->
<div class="clr-col-sm-12">
 <label> Select Objective</label>
  <div class="clr-form-control" style="margin-top: 5px;margin-bottom: 10px;">
    <div class="clr-control-container">
      
 

      <div class="clr-checkbox-wrapper"> <input type="checkbox" id="dg_monitoring-without_fuel_" name="dg_monitoring-without_fuel_" [(ngModel)]="rowSelected.dg_monitoring-without_fuel_" class="clr-checkbox" /> 
<label for="dg_monitoring-without_fuel_" class="clr-control-label"> dg_monitoring-without_fuel_</label> </div>

       

 

      <div class="clr-checkbox-wrapper"> <input type="checkbox" id="active_energy" name="active_energy" [(ngModel)]="rowSelected.active_energy" class="clr-checkbox" /> 
<label for="active_energy" class="clr-control-label"> active_energy</label> </div>

       

 

      <div class="clr-checkbox-wrapper"> <input type="checkbox" id="dg_monitoring-with_fuel_" name="dg_monitoring-with_fuel_" [(ngModel)]="rowSelected.dg_monitoring-with_fuel_" class="clr-checkbox" /> 
<label for="dg_monitoring-with_fuel_" class="clr-control-label"> dg_monitoring-with_fuel_</label> </div>

       

 

      <div class="clr-checkbox-wrapper"> <input type="checkbox" id="ups_monitoring" name="ups_monitoring" [(ngModel)]="rowSelected.ups_monitoring" class="clr-checkbox" /> 
<label for="ups_monitoring" class="clr-control-label"> ups_monitoring</label> </div>

       

 

      <div class="clr-checkbox-wrapper"> <input type="checkbox" id="apfc_panel_monitoring" name="apfc_panel_monitoring" [(ngModel)]="rowSelected.apfc_panel_monitoring" class="clr-checkbox" /> 
<label for="apfc_panel_monitoring" class="clr-control-label"> apfc_panel_monitoring</label> </div>

       

 

      <div class="clr-checkbox-wrapper"> <input type="checkbox" id="busbar_monitoring" name="busbar_monitoring" [(ngModel)]="rowSelected.busbar_monitoring" class="clr-checkbox" /> 
<label for="busbar_monitoring" class="clr-control-label"> busbar_monitoring</label> </div>

       

 

      <div class="clr-checkbox-wrapper"> <input type="checkbox" id="lt_panel_monitoring" name="lt_panel_monitoring" [(ngModel)]="rowSelected.lt_panel_monitoring" class="clr-checkbox" /> 
<label for="lt_panel_monitoring" class="clr-control-label"> lt_panel_monitoring</label> </div>

       

 

      <div class="clr-checkbox-wrapper"> <input type="checkbox" id="ht_panel_monitoring" name="ht_panel_monitoring" [(ngModel)]="rowSelected.ht_panel_monitoring" class="clr-checkbox" /> 
<label for="ht_panel_monitoring" class="clr-control-label"> ht_panel_monitoring</label> </div>

       

 

      <div class="clr-checkbox-wrapper"> <input type="checkbox" id="compressed_air-_gas_monitoring" name="compressed_air-_gas_monitoring" [(ngModel)]="rowSelected.compressed_air-_gas_monitoring" class="clr-checkbox" /> 
<label for="compressed_air-_gas_monitoring" class="clr-control-label"> compressed_air-_gas_monitoring</label> </div>

       

 

      <div class="clr-checkbox-wrapper"> <input type="checkbox" id="compressed_air-lpg/o2/n2/co2" name="compressed_air-lpg/o2/n2/co2" [(ngModel)]="rowSelected.compressed_air-lpg/o2/n2/co2" class="clr-checkbox" /> 
<label for="compressed_air-lpg/o2/n2/co2" class="clr-control-label"> compressed_air-lpg/o2/n2/co2</label> </div>

       

 

      <div class="clr-checkbox-wrapper"> <input type="checkbox" id="water_management-water_monitoring" name="water_management-water_monitoring" [(ngModel)]="rowSelected.water_management-water_monitoring" class="clr-checkbox" /> 
<label for="water_management-water_monitoring" class="clr-control-label"> water_management-water_monitoring</label> </div>

       

 

      <div class="clr-checkbox-wrapper"> <input type="checkbox" id="water_management-stp/etp" name="water_management-stp/etp" [(ngModel)]="rowSelected.water_management-stp/etp" class="clr-checkbox" /> 
<label for="water_management-stp/etp" class="clr-control-label"> water_management-stp/etp</label> </div>

       


    </div>
  </div>
</div>
<!-- multiselect checkbox field end -->



  </div> 
















<!-- form code start -->
  <div *ngIf="checkFormCode">
    <h4 style="font-weight: 300;display: inline;">Extension</h4>
    <br>
    <hr>
    <div class="clr-row">
      <div class="clr-col-4" *ngFor="let field of additionalFieldsFromBackend">
        <ng-container *ngIf="field.formCode === formcode" [ngSwitch]="field.fieldType">
          <!-- Text Input -->    <label  *ngSwitchCase="'text'">{{ field.fieldName }}</label>
          <input *ngSwitchCase="'text'" [type]="field.fieldType"  name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]" class="clr-input" />
  
          <!-- Date Input -->    <label  *ngSwitchCase="'date'">{{ field.fieldName }}</label>
          <input *ngSwitchCase="'date'" [type]="field.fieldType"  name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]"  class="clr-input" />
  
          <!-- Textarea -->    <label  *ngSwitchCase="'textarea'">{{ field.fieldName }}</label>
          <textarea *ngSwitchCase="'textarea'"  name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]"  col="10" row="2"></textarea>
  
          <!-- Checkbox -->    <label  *ngSwitchCase="'checkbox'">{{ field.fieldName }}</label><br>
          <input *ngSwitchCase="'checkbox'" [type]="field.fieldType" name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]"  class="clr-checkbox" />
        </ng-container>
  </div>
  </div>
</div>

  <!-- form code end -->  <div class="modal-footer">
      <button type="button" class="btn btn-outline" (click)="modalEdit = false">Cancel</button>
      <button type="submit" class="btn btn-primary"  (click)="onUpdate(rowSelected.id)">Update</button>
      </div>
    </form>
  </div>
</clr-modal>
<clr-modal [(clrModalOpen)]="modaldelete" [clrModalSize]="'lg'" [clrModalStaticBackdrop]="true">
  <div class="modal-body" *ngIf="rowSelected.id">
    <h1 class="delete">Are You Sure Want to delete?</h1>
    <h2 class="heading">{{rowSelected.id}}</h2>
    <div class="modal-footer">
      <button type="button" class="btn btn-outline" (click)="modaldelete = false">Cancel</button>
    <button type="button" (click)="delete(rowSelected.id)" class="btn btn-primary" >Delete</button>
    </div>
  </div>
</clr-modal>
<!-- ADD FORM ..... -->
<clr-modal [(clrModalOpen)]="modalAdd" [clrModalSize]="'lg'" [clrModalStaticBackdrop]="true">
  <h3 class="modal-title">Add Customer Information 
















  <!-- aeroplane icon -->
    &nbsp; &nbsp; &nbsp; &nbsp;
    <a *ngIf="userrole?.includes('ADMIN')" style="float: right;" href="javascript:void(0)" role="tooltip" aria-haspopup="true"
      class="tooltip tooltip-sm tooltip-bottom-left">
      <a id="build_extension" [routerLink]="['../extension/all']" [queryParams]="{ formCode: 'Customer_information_formCode' }">
        <clr-icon shape="airplane" size="32"></clr-icon>
      </a>
      <span class="tooltip-content">Form Extension</span>
    </a> </h3>
  <div class="modal-body">
     <form [formGroup]="entryForm" >
   <div class="clr-row" style="height: fit-content;">

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

<div class="clr-col-sm-12">
 <label>  Contact Person</label>
 <input class="clr-input"  type="text"  formControlName="contact_person" />       
 </div>

<div class="clr-col-sm-12">
						<label> Email Address</label>
<input class="clr-input" type="email" formControlName="email_address" pattern="[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$">
<div *ngIf="entryForm.controls['email_address'].errors" class="error_mess">
						          <div *ngIf="entryForm.controls['email_address'].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>Customer Address</label>      
   <input class="form-control" type="Text" formControlName="customer_address" style="border: none; outline: none; height:33px !important;" />
	      </div>

<div class="clr-col-sm-12">             
	 <label>Deployment Type</label>
							 <select formControlName="deployment_type">
							    <option [value]="null">Select  Deployment Type </option> 
								
 
								<option> demo_could </option>
								 

 
								<option> on_premise </option>
								 

						</select></div>

<!-- multiselect checkbox field start -->
     <div class="clr-col-sm-12">       
		<label> Select Objective</label>
	    <div class="clr-form-control" style="margin-top: 5px;margin-bottom: 10px;">
	      <div class="clr-control-container">

                       
 
			<div class="clr-checkbox-wrapper">           
				<input type="checkbox" id="busbar_monitoring" formControlName="busbar_monitoring"  class="clr-checkbox" />       
				    <label for="busbar_monitoring" class="clr-control-label">busbar_monitoring</label>  </div>
	                            

 
			<div class="clr-checkbox-wrapper">           
				<input type="checkbox" id="active_energy" formControlName="active_energy"  class="clr-checkbox" />       
				    <label for="active_energy" class="clr-control-label">active_energy</label>  </div>
	                            

 
			<div class="clr-checkbox-wrapper">           
				<input type="checkbox" id="dg_monitoring-with_fuel_" formControlName="dg_monitoring-with_fuel_"  class="clr-checkbox" />       
				    <label for="dg_monitoring-with_fuel_" class="clr-control-label">dg_monitoring-with_fuel_</label>  </div>
	                            

 
			<div class="clr-checkbox-wrapper">           
				<input type="checkbox" id="dg_monitoring-without_fuel_" formControlName="dg_monitoring-without_fuel_"  class="clr-checkbox" />       
				    <label for="dg_monitoring-without_fuel_" class="clr-control-label">dg_monitoring-without_fuel_</label>  </div>
	                            

 
			<div class="clr-checkbox-wrapper">           
				<input type="checkbox" id="ups_monitoring" formControlName="ups_monitoring"  class="clr-checkbox" />       
				    <label for="ups_monitoring" class="clr-control-label">ups_monitoring</label>  </div>
	                            

 
			<div class="clr-checkbox-wrapper">           
				<input type="checkbox" id="apfc_panel_monitoring" formControlName="apfc_panel_monitoring"  class="clr-checkbox" />       
				    <label for="apfc_panel_monitoring" class="clr-control-label">apfc_panel_monitoring</label>  </div>
	                            

 
			<div class="clr-checkbox-wrapper">           
				<input type="checkbox" id="lt_panel_monitoring" formControlName="lt_panel_monitoring"  class="clr-checkbox" />       
				    <label for="lt_panel_monitoring" class="clr-control-label">lt_panel_monitoring</label>  </div>
	                            

 
			<div class="clr-checkbox-wrapper">           
				<input type="checkbox" id="ht_panel_monitoring" formControlName="ht_panel_monitoring"  class="clr-checkbox" />       
				    <label for="ht_panel_monitoring" class="clr-control-label">ht_panel_monitoring</label>  </div>
	                            

 
			<div class="clr-checkbox-wrapper">           
				<input type="checkbox" id="water_management-stp/etp" formControlName="water_management-stp/etp"  class="clr-checkbox" />       
				    <label for="water_management-stp/etp" class="clr-control-label">water_management-stp/etp</label>  </div>
	                            

 
			<div class="clr-checkbox-wrapper">           
				<input type="checkbox" id="compressed_air-_gas_monitoring" formControlName="compressed_air-_gas_monitoring"  class="clr-checkbox" />       
				    <label for="compressed_air-_gas_monitoring" class="clr-control-label">compressed_air-_gas_monitoring</label>  </div>
	                            

 
			<div class="clr-checkbox-wrapper">           
				<input type="checkbox" id="compressed_air-lpg/o2/n2/co2" formControlName="compressed_air-lpg/o2/n2/co2"  class="clr-checkbox" />       
				    <label for="compressed_air-lpg/o2/n2/co2" class="clr-control-label">compressed_air-lpg/o2/n2/co2</label>  </div>
	                            

 
			<div class="clr-checkbox-wrapper">           
				<input type="checkbox" id="water_management-water_monitoring" formControlName="water_management-water_monitoring"  class="clr-checkbox" />       
				    <label for="water_management-water_monitoring" class="clr-control-label">water_management-water_monitoring</label>  </div>
	                            

 </div>       </div>     </div>
	              <!-- multiselect checkbox field end -->



 
 </div> 


















      <!-- form code start -->
      <div *ngIf="checkFormCode">
        <h4 style="font-weight: 300;display: inline;">Extension</h4>
        <br>
        <hr>
        <div class="clr-row">
          <div class="clr-col-4" *ngFor="let field of additionalFieldsFromBackend">
            <ng-container *ngIf="field.formCode === formcode" [ngSwitch]="field.fieldType">
              <!-- Text Input --> <label *ngSwitchCase="'text'">{{ field.fieldName }}</label>
              <input *ngSwitchCase="'text'" [type]="field.fieldType" [formControlName]="field.extValue"
                class="clr-input" />
              <!-- Date Input --> <label *ngSwitchCase="'date'">{{ field.fieldName }}</label>
              <input *ngSwitchCase="'date'" [type]="field.fieldType" [formControlName]="field.extValue"
                class="clr-input" />
              <!-- Textarea --> <label *ngSwitchCase="'textarea'">{{ field.fieldName }}</label>
              <textarea *ngSwitchCase="'textarea'" [formControlName]="field.extValue" col="10" row="2"></textarea>
              <!-- Checkbox --> <label *ngSwitchCase="'checkbox'">{{ field.fieldName }}</label><br>
              <input *ngSwitchCase="'checkbox'" [type]="field.fieldType" [formControlName]="field.extValue"
                class="clr-checkbox" />
            </ng-container>
          </div>
        </div>
      </div>
      <!-- form code end --> <div class="modal-footer">
<button type="button" class="btn btn-outline" (click)="modalAdd = false">Cancel</button>
        <button type="submit" class="btn btn-primary" (click)="onSubmit()">ADD</button>
        </div>
</form>
  </div>
</clr-modal>
















  <!-- htmlpopup -->

  <clr-modal [(clrModalOpen)]="modalInsertReset_btn" [clrModalSize]="'xl'" [clrModalStaticBackdrop]="true">
    <h3 class="modal-title">Insert Reset_btn</h3>
    <div class="modal-body">
          <form [formGroup]="insertFormReset_btn" (ngSubmit)="onSubmitInsertReset_btn()">
        <div class="clr-row">
          <div class="clr-col-md-4 clr-col-sm-12">
            <label for="customer_name">Customer_Name:</label>
            <input type="text" id="customer_name" formControlName="customer_name" name="customer_name" readonly class="clr-input">
          </div>
          <div class="clr-col-md-4 clr-col-sm-12">
            <label for="email_address">Email_Address:</label>
            <input type="text" id="email_address" formControlName="email_address" name="email_address" readonly class="clr-input">
          </div>
          <div class="clr-col-md-4 clr-col-sm-12">
            <label for="contact_person">Contact_Person:</label>
            <input type="text" id="contact_person" formControlName="contact_person" name="contact_person" readonly class="clr-input">
          </div>
          <div class="clr-col-md-4 clr-col-sm-12">
            <label for="phone_number">Phone_Number:</label>
            <input type="text" id="phone_number" formControlName="phone_number" name="phone_number" readonly class="clr-input">
          </div>
          <div class="clr-col-md-4 clr-col-sm-12">
            <label for="select_objective">Select_Objective:</label>
            <input type="text" id="select_objective" formControlName="select_objective" name="select_objective" readonly class="clr-input">
          </div>
          <div class="clr-col-md-4 clr-col-sm-12">
            <label for="reset_btn">Reset_btn:</label>
            <input type="text" id="reset_btn" formControlName="reset_btn" name="reset_btn" readonly class="clr-input">
          </div>
          <div class="clr-col-md-4 clr-col-sm-12">
            <label for="customer_address">Customer_Address:</label>
            <input type="text" id="customer_address" formControlName="customer_address" name="customer_address" readonly class="clr-input">
          </div>
          <div class="clr-col-md-4 clr-col-sm-12">
            <label for="deployment_type">Deployment_Type:</label>
            <input type="text" id="deployment_type" formControlName="deployment_type" name="deployment_type" readonly class="clr-input">
          </div>
        </div>
        <br>
        <div class="modal-footer">
          <button type="button" class="btn btn-outline" (click)="modalInsertReset_btn = false">Cancel</button>
          <button type="submit" class="btn btn-primary" >Insert</button>
        </div>
  </form>
    </div>
  
  </clr-modal>

