Created
May 3, 2018 13:18
-
-
Save induprasad/e215f21a1bd1a0fcd5bfc8ddab85c218 to your computer and use it in GitHub Desktop.
Component used to pass values to the strike component
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,forceCommunity:availableForAllPageTypes" access="global" controller="LCC_CaseResults"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0" /> | |
<aura:attribute name="barData" type="Object[]" /> | |
<aura:attribute name="accountName" type="String" default="" /> | |
<aura:attribute name="divLength" type="String" default="4" /> | |
<aura:attribute name="opencases" type="String" default="Open Cases" /> | |
<aura:attribute name="closedcases" type="String" default="Closed cases" /> | |
<aura:attribute name="totalcases" type="String" default="{!$Label.c.CLR417CCCTotalCases}" /> | |
<aura:attribute name="isLoaded" type="Boolean" default="false" /> | |
<aura:attribute name="nocasesMsg" type="Boolean" default="false" /> | |
<!-- Handlers & Events --> | |
<aura:handler name="init" value="{!this}" action="{!c.getResponse}" /> | |
<!-- Container Div --> | |
<div class="slds" style="margin:36px 0;"> | |
<aura:if isTrue="{!v.showSpinner}"> | |
<lightning:spinner variant="brand" size="large" class="slds-spinner_container slds-is-fixed" alternativeText="spinner" /> | |
<div class="slds-backdrop"></div> | |
</aura:if> | |
<!-- Displays Error Message --> | |
<aura:if isTrue="{!v.isAlert}"> | |
<div aura:id="alert-id" > | |
<div class="slds-notify_alert slds-theme_alert-texture slds-theme_error" role="alert"> | |
<lightning:layout horizontalAlign="center" verticalAlign="center" multipleRows="false" class="error-messageDiv"> | |
<lightning:layoutItem flexibility="auto" smallDeviceSize="10" mediumDeviceSize="10" largeDeviceSize="10" size="10" class="error-contentDiv"> | |
<lightning:icon iconName="utility:ban" variant="inverse" alternativeText="error" /> | |
<h2>{!v.alertMessage}</h2> | |
</lightning:layoutItem> | |
</lightning:layout> | |
</div> | |
</div> | |
</aura:if> | |
<!-- Div to display if there are cases in the system to display the chart --> | |
<aura:if isTrue="{!v.isLoaded}"> | |
<lightning:layout horizontalAlign="spread" verticalAlign="center" multipleRows="true" class="slds-box"> | |
<lightning:layoutItem largeDeviceSize="1" size="12" class="slds-medium-show"> | |
</lightning:layoutItem> | |
<lightning:layoutItem flexibility="auto" smallDeviceSize="12" mediumDeviceSize="{!v.divLength}" largeDeviceSize="{!v.divLength}" size="12"> | |
<c:LCMP_StrikeChart type="bar" | |
data="{!v.barData}" | |
title="Type of Case" | |
orientation="vertical" | |
xAxisLabel="Accounts" | |
yAxisLabel="Total Cases" /> | |
</lightning:layoutItem> | |
<lightning:layoutItem largeDeviceSize="1" size="12" class="slds-medium-show"> | |
</lightning:layoutItem> | |
</lightning:layout> | |
</aura:if> | |
<!-- No cases error message div --> | |
<aura:if isTrue="{!v.nocasesMsg}"> | |
<h2 style="color:#000000;font-weight:bold;"> No Cases Found </h2> | |
</aura:if> | |
</div> | |
</aura:component> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment