SyncMadeEasy/force-app/main/default/aura/MatchingCriteriaParent/MatchingCriteriaParent.cmp

117 lines
6.8 KiB
Plaintext

<aura:component controller="AddDeleteController" >
<aura:handler name="init" value="{!this}" action="{!c.loadAccountFields}" />
<aura:handler name="init" value="{!this}" action="{!c.loadShopifyFields}" />
<aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
<aura:attribute name="AccountFields" type="List"/>
<aura:attribute name="shopifyFields" type="List"/>
<aura:attribute name="contactFields" type="List"/>
<aura:attribute name="contactshopifyFields" type="List"/>
<aura:attribute name="operatorOptions" type="List" default="[]"/>
<aura:attribute name="comboValue" type="List"/>
<aura:attribute name="AccountMatchingRule" type="String"/>
<aura:attribute name="numberOfRows" type="Integer" description="Number of Rows to add dynamically" access="private" default="1" />
<aura:attribute name="dynamicRowsList" type="List" description="List of Rows that are created dynamically" access="private" />
<aura:attribute name="message" type="String" default="" description="Success or error message" access="private" />
<aura:attribute name="messageType" type="String" description="Success or error message type" access="private" />
<div class="slds-grid slds-wrap">
<div class="slds-col slds-size_1-of-1 slds-large-size_2-of-12"></div>
<div class="slds-col slds-size_1-of-1 slds-large-size_8-of-12">
<div class="headerDiv slds-grid slds-wrap slds-p-around_x-large">
<div class="slds-align_absolute-center">
<div class="slds-text-heading_large" style="font-weight: bold;">ACCOUNT MATCHING CRITERIA</div>
</div>
</div>
<table class="outerTable slds-table_col-bordered slds-table_striped slds-table slds-table_cell-buffer " >
<thead >
<tr>
<th></th>
<th class="headerCol1 slds-text-heading_large" scope="col" style="width:30%" title="Salesforce">Salesforce</th>
<th class="headerCol2 slds-text-heading_large" scope="col" style="width:25%" title="Operator">Operator</th>
<th class="headerCol3 slds-text-heading_large" scope="col" style="width:30%" title="Shopify">Shopify</th>
<th ></th>
</tr>
</thead>
<tbody >
<td>
</td>
<td class = "comboBody1">
<aura:if isTrue="{!and(v.AccountFields != null,v.AccountFields.length>0)}" >
<lightning:combobox aura:id= "accField" name="account" label=""
placeholder=""
onchange="{!c.loadAccountFields}"
options="{!v.AccountFields}"/>
</aura:if>
</td>
<td class = "comboBody2">
<lightning:combobox aura:id="operatorField" name="status" label=""
placeholder=""
value="equals"
onchange="{!c.handleOptionSelected}"
options="{!v.operatorOptions}"/>
</td>
<td class = "comboBody3">
<aura:if isTrue="{!and(v.shopifyFields != null,v.shopifyFields.length>0)}" >
<lightning:combobox aura:id="shopifyField" name="shopify" label=""
placeholder=""
onchange="{!c.loadShopifyFields}"
options="{!v.shopifyFields}"/>
</aura:if>
</td>
<td>
<lightning:buttonIcon name="multipleRows" variant="container" alternativeText="add" class="addClass" iconName="utility:add" onclick="{!c.addRow}" />
</td>
<aura:iteration items="{!v.comboValue}" var="Row" indexVar="index" >
<tr>
<th scope="row">{! index + 1 }</th>
<td class ="accField" title="Account field">
<lightning:input aura:id="dynamiRowsForm" name="accField" value="{!Row.AccountField}" />
</td>
<td class ="opField" title="Operator">
<lightning:input aura:id="dynamiRowsForm" name="operator" value="{!Row.OperatorField}" />
</td>
<td class ="shopifyField" title="Shopify field">
<lightning:input aura:id="dynamiRowsForm" name="shopiyField" value="{!Row.ShopifyField}" />
</td>
<td>
<div class="slds-truncate" data-id="{!index}">
<lightning:buttonIcon name="multipleRows" alternativeText="delete" variant="container" class="errorClass" iconName="utility:delete" onclick="{!c.deleteRow}"/>
</div>
</td>
</tr>
</aura:iteration>
</tbody>
<br></br>
</table>
<aura:if isTrue="{!v.comboValue.length>1}" >
<Table class="slds-table_striped slds-table slds-table_cell-buffer">
<tbody>
<tr >
<td></td>
<td class="slds-text-heading_medium" text-align="center" scope="col" style="font-weight: bold; width:10%" title="Matching Rule">Matching Rule :</td>
<td><lightning:input aura:id="accMatchRule" name="matchRule" value="{!v.AccountMatchingRule}"/></td>
<td class="exampleTab slds-text-heading_medium" style="font-weight: bold; width:40%" title="Example">Example :{!v.AccountMatchingRule}</td>
</tr>
<br></br><br></br>
</tbody>
</Table>
</aura:if>
<!-- Contact Matching Code Start -->
<div class="headerDiv slds-grid slds-wrap slds-p-around_x-large">
<div class="slds-align_absolute-center">
<div class="slds-text-heading_large" style="font-weight: bold;">CONTACT MATCHING CRITERIA</div>
</div>
</div>
</div>
</div>
</aura:component>