Advertisement
Guest User

Untitled

a guest
Mar 20th, 2019
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.09 KB | None | 0 0
  1. <aura:component controller="xx_CommunityController" implements="forceCommunity:availableForAllPageTypes" access="global" >
  2. <aura:attribute name="hideCheckbox" type="Boolean" default="false"/>
  3. <aura:attribute name="viewName" type="String" default="Accounts View"/>
  4. <aura:attribute name="isSummaryView" type="Boolean" default="false"/>
  5.  
  6. <aura:attribute name="logonContact" type="Contact" />
  7. <aura:attribute name="selectedContactId" type="String" />
  8. <aura:attribute name="selectedContactName" type="String" />
  9. <aura:attribute name="logonContactFirstName" type="String"/>
  10. <aura:attribute name="clientSince" type="String"/>
  11.  
  12. <aura:attribute name="investmentAccountId" type="String" />
  13.  
  14. <aura:registerEvent name="newInvestmentAccountId" type="c:xx_InvestmentAccountSelected" />
  15. <aura:registerEvent name="contactSelected" type="c:xx_ContactSelected" />
  16.  
  17. <aura:attribute name="mydata" type="Object"/>
  18. <aura:attribute name="mycolumns" type="List"/>
  19. <aura:handler name="init" value="{! this }" action="{! c.init }"/>
  20.  
  21. <aura:attribute name="rawData" type="Object" description="Stores the currently displayed rows of data"/>
  22. <aura:attribute name="activeFilter" type="string" default="all" description="The currently selected actions filter"/>
  23. <aura:attribute name="sortedDirection" type="string" default="asc" description="The currently selected actions filter"/>
  24.  
  25. <aura:attribute name="contactOptions" type="List" default="[]" />
  26. <aura:attribute name="targetContacts" type="Map" />
  27. <aura:attribute name="selectedRows" type="List" />
  28. <aura:attribute name="AccountTypeOptions" type="List" default="[]" />
  29. <!--
  30. <aura:attribute name="contacts" type="List" />
  31. -->
  32. <aura:if isTrue="{!v.isSummaryView}">
  33. {!$Label.c.xx_Client_Welcome_Message}&nbsp; {!v.logonContactFirstName}<aura:if isTrue="{!v.clientSince}">, {!$Label.c.xx_Client_Client_Since}&nbsp;<lightning:formattedDateTime value="{!v.clientSince}" year="numeric"/></aura:if>
  34. </aura:if>
  35.  
  36. <!-- PAGE HEADER -->
  37. <lightning:layout class="slds-page-header slds-page-header--object-home">
  38. <lightning:layoutItem >
  39. <lightning:icon iconName="standard:household" alternativeText="Relationship"/>
  40. </lightning:layoutItem>
  41. <lightning:layoutItem padding="horizontal-small">
  42. <div class="page-section page-header">
  43. <h1 class="slds-text-heading--label">{!$Label.c.xx_Client_Investor}</h1>
  44. <h2 class="slds-text-heading--medium">{!v.viewName} </h2>
  45. </div>
  46. </lightning:layoutItem>
  47. <!--
  48. <lightning:layoutItem padding="horizontal-small" flexibility="auto" size="3" smallDeviceSize="8">
  49. <lightning:combobox aura:id="selectContact" name="contact" label="Contact"
  50. placeholder="Select Contact"
  51. onchange="{!c.handleContactOptionSelected}"
  52. options="{!v.contactOptions}"/>
  53. </lightning:layoutItem>
  54. <lightning:layoutItem padding="horizontal-small" size="2">
  55. <lightning:button class="goButton" label="Go" onclick="{! c.handleGo }" />
  56. </lightning:layoutItem>
  57. -->
  58. </lightning:layout>
  59. <lightning:layout multipleRows="true">
  60. <lightning:layoutItem padding="horizontal-small" flexibility="auto, no-shrink" size="9" mediumDeviceSize="8" largeDeviceSize="3">
  61. <lightning:combobox aura:id="selectContact" name="contact" label="{!$Label.c.xx_Client_Contact}"
  62. placeholder="Select Contact"
  63. onchange="{!c.handleContactOptionSelected}"
  64. options="{!v.contactOptions}"/>
  65. </lightning:layoutItem>
  66. <lightning:layoutItem padding="horizontal-small" size="2">
  67. <lightning:button class="goButton" label="{!$Label.c.xx_Client_Go}" onclick="{! c.handleGo }" />
  68. </lightning:layoutItem>
  69. </lightning:layout>
  70. <br/>
  71.  
  72. <!-- / PAGE HEADER -->
  73.  
  74. <aura:if isTrue="{!v.hideCheckbox}">
  75. <lightning:datatable data="{! v.mydata }"
  76. columns="{! v.mycolumns }"
  77. keyField="id"
  78. hideCheckboxColumn="true"
  79. maxRowSelection="1"
  80. onheaderaction="{! c.handleHeaderAction }"
  81. onsort="{! c.updateColumnSorting }"
  82. />
  83. <aura:set attribute="else">
  84. <div class="slds-custom-table">
  85. <lightning:datatable data="{! v.mydata }"
  86. columns="{! v.mycolumns }"
  87. keyField="id"
  88. maxRowSelection="1"
  89. onrowselection="{! c.getSelectedName }"
  90. selectedRows="{! v.selectedRows }"
  91. onheaderaction="{! c.handleHeaderAction }"
  92. onsort="{! c.updateColumnSorting }"
  93. />
  94. </div>
  95. </aura:set>
  96. </aura:if>
  97. <br/>
  98. <aura:if isTrue="{!empty(v.mydata)}">
  99. <br/> {!$Label.c.xx_Client_No_Records}
  100. </aura:if>
  101.  
  102. </aura:component>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement