205 lines
9.6 KiB
Plaintext
205 lines
9.6 KiB
Plaintext
<aura:component controller="AddDeleteController" access="global">
|
|
|
|
|
|
|
|
<aura:attribute name="enableInfiniteLoading" type="Boolean" default="true"/>
|
|
<aura:attribute name="initialRows" type="Integer" default="10"/>
|
|
<aura:attribute name="currentCount" type="Integer" default="10"/>
|
|
<aura:attribute name="totalRows" type="Integer" default="0"/>
|
|
<aura:attribute name="loadOffset" type="Integer" default="1"/>
|
|
|
|
|
|
<aura:attribute name="addfilter" type="Boolean" default="false"/>
|
|
<aura:attribute name="usertimezonevalue" type="String" default="optionalDefault" />
|
|
<aura:attribute name="disablecsv" type="Boolean" default="true"/>
|
|
<aura:attribute name="lisoflogs" type="Shopify_Log__c[]" />
|
|
<aura:attribute name="filteredData" type="Shopify_Log__c[]" />
|
|
<aura:attribute name="searchdatalist" type="Shopify_Log__c[]" />
|
|
<aura:attribute name="mapoftime" type="Map"/>
|
|
<aura:handler name="init" value="{!this}" action="{!c.doInit}" />
|
|
<aura:attribute name="listofobjects" type="list" default="All" />
|
|
<aura:attribute name="isLoading" type="Boolean" default="false" />
|
|
<aura:attribute name="columns" type="List"/>
|
|
<aura:attribute name="selectedobject" type="string" />
|
|
<aura:attribute name="startdate" type="date" />
|
|
<aura:attribute name="enddate" type="date" />
|
|
<aura:attribute name="Store" type="String" />
|
|
<aura:attribute name="iswebhook" type="String" default="All"/>
|
|
<aura:attribute name="sortedBy" type="String" />
|
|
<aura:attribute name="sortedDirection" type="String" />
|
|
<aura:attribute name="Iscreateddate" type="String" default="false" />
|
|
<aura:attribute name="data" type="Boolean" default="true" />
|
|
<aura:attribute name="OpenModel" type="Boolean" default="false" />
|
|
<div class=" slds-theme_default slds-p-around_small" style="width: 95vw">
|
|
<c:ShopifyHeader/>
|
|
|
|
<!--c:FieldTable/-->
|
|
|
|
<ltng:require styles="{! $Resource. datatable + '/DataTables-1.10.16/media/css/jquery.dataTables.min.css'}"
|
|
scripts="{!join(',',
|
|
$Resource.jquery224 ,
|
|
$Resource.datatable + '/DataTables-1.10.16/media/js/jquery.dataTables.min.js',
|
|
$Resource.ellipsis )
|
|
}" afterScriptsLoaded="{!c.scriptsLoaded}"/>
|
|
|
|
<aura:if isTrue="{!v.OpenModel}">
|
|
<div class="slds-m-around_xx-large">
|
|
<!--Use aura:if tag to display/hide popup based on isModalOpen value-->
|
|
|
|
<section role="dialog" tabindex="-1" aria-labelledby="modal-heading-01" aria-modal="true" aria-describedby="modal-content-id-1" class="slds-modal slds-fade-in-open">
|
|
<div class="slds-modal__container">
|
|
<header class="slds-modal__header">
|
|
|
|
<h2 id="modal-heading-01" class="slds-text-heading_medium slds-hyphenate"><b style="color:#008000">Creating CSV..</b></h2>
|
|
</header>
|
|
<!--Modal/Popup Box Body Starts here-->
|
|
<div class="slds-modal__content slds-p-around_medium" id="modal-content-id-1">
|
|
<div id = "jsonid" aura:id="jsonid" style="color:darkred" >
|
|
<center>
|
|
<img src="{!$Resource.Excelloadinggif}" style="width:30%;"></img>
|
|
</center>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</section>
|
|
<div class="slds-backdrop slds-backdrop_open"></div>
|
|
</div>
|
|
</aura:if>
|
|
|
|
|
|
|
|
|
|
<div id="divparent" >
|
|
<aura:if isTrue="{!v.isLoading}">
|
|
<div aura:id="spinnerId" class="slds-spinner_container">
|
|
<div class="slds-spinner--brand slds-spinner slds-spinner--large slds-is-relative" role="alert">
|
|
<span class="slds-assistive-text">Loading...</span>
|
|
<div class="slds-spinner__dot-a"></div>
|
|
<div class="slds-spinner__dot-b"></div>
|
|
</div>
|
|
</div>
|
|
</aura:if>
|
|
|
|
<aura:if isTrue="{!v.addfilter}">
|
|
<div class="slds-m-around_large" >
|
|
<lightning:card title="Filters" iconName="action:filter" >
|
|
<div class="slds-p-vertical_large" >
|
|
<div class="slds-grid slds-grid_align-space">
|
|
<div class="slds-col">
|
|
<span>
|
|
<lightning:select name="select object" label="Select Object:" onchange="{!c.handlefiter}" value="{!v.selectedobject}">
|
|
<option text="All" value="All"/>
|
|
<aura:iteration items="{!v.listofobjects}" var="option">
|
|
<option text="{!option}" value="{!option}"/>
|
|
</aura:iteration>
|
|
</lightning:select>
|
|
</span>
|
|
</div>
|
|
|
|
<div class="slds-col">
|
|
<span>
|
|
<lightning:select name="Select Type:" onchange="{!c.handlefiter}" label="Select Type:" value="{!v.iswebhook}">
|
|
<option text="All" value="All"/>
|
|
<option text="Webhooks" value="true"/>
|
|
<option text="Batches" value="false"/>
|
|
<option text="All Deleted" value="Delete"/>
|
|
</lightning:select>
|
|
</span>
|
|
</div>
|
|
|
|
<div class="slds-col">
|
|
<span>
|
|
|
|
<lightning:select name="Select Date Type:" label="Date Type" onchange="{!c.handlefiter}" value="{!v.Iscreateddate}">
|
|
<option text="Created Date" value="true"/>
|
|
<option text="Modified Date" value="false"/>
|
|
</lightning:select>
|
|
|
|
</span>
|
|
</div>
|
|
<div class="slds-col">
|
|
<span>
|
|
<lightning:input type="date" timezone="gmt" onchange="{!c.handlefiter}" label="Start Date" aura:id="startdate" required = "true" name="input1" value="{!v.startdate}"/>
|
|
</span>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</lightning:card>
|
|
</div>
|
|
</aura:if>
|
|
|
|
<div class="slds-m-around_large " >
|
|
<lightning:card >
|
|
|
|
<div class="slds-m-horizontal_xx-small" >
|
|
<div class="slds-grid">
|
|
<div>
|
|
<span>
|
|
<div class="slds-m-around_small">
|
|
<lightning:buttonIcon iconName="utility:refresh" class="rotateicon" onclick="{!c.refreshlist}" title="Refresh" alternativeText="Close modal"/>
|
|
</div>
|
|
</span>
|
|
</div>
|
|
<div>
|
|
<span>
|
|
<div class="slds-m-around_small">
|
|
<lightning:icon iconName="standard:picklist_type" alternativeText="Event" /><Strong class="pagetitle">List of Logs updated</Strong>
|
|
</div>
|
|
</span>
|
|
</div>
|
|
<div class="slds-col_bump-left " >
|
|
<span>
|
|
<div class="slds-m-around_small">
|
|
<lightning:button disabled="{!v.disablecsv}" aura:id="csv" variant="success" class="buttoncss" onclick="{!c.downloadCsv}" label="Download As CSV" title="Download As CSV" />
|
|
</div>
|
|
</span>
|
|
</div>
|
|
<div>
|
|
<span>
|
|
<div class="slds-m-around_small">
|
|
<lightning:input type="toggle" messageToggleActive="Filter Added" onchange="{!c.handleaddfilter}" messageToggleInactive ="All Records" name="Type" checked="{!v.addfilter}"/>
|
|
</div>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<aura:if isTrue="{!or(v.data,v.filteredData.lenght > 0)}">
|
|
<div class="slds-grid slds-gutters">
|
|
<div class="slds-col slds-size_12-of-12">
|
|
<span>
|
|
|
|
<table id="tableId" >
|
|
|
|
|
|
</table>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
|
|
<aura:set attribute="else">
|
|
<center>
|
|
<div class="slds-m-around_large">
|
|
<img src="{!$Resource.NorecordFound}" />
|
|
</div>
|
|
</center>
|
|
</aura:set>
|
|
</aura:if>
|
|
</div>
|
|
|
|
</lightning:card>
|
|
</div>
|
|
</div>
|
|
<c:AppFooter/>
|
|
</div>
|
|
|
|
<aura:html tag="style">
|
|
th, td {
|
|
white-space: nowrap;
|
|
|
|
}
|
|
</aura:html>
|
|
|
|
</aura:component> |