Skip to content

Instantly share code, notes, and snippets.

View arun12209's full-sized avatar
🥑

Arun Kumar arun12209

🥑
View GitHub Profile
<aura:component controller="Covid19_IND_TrackerController" implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" access="global" >
<aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
<aura:attribute name="total" type="String"/>
<aura:attribute name="confirmed" type="String"/>
<aura:attribute name="active" type="String"/>
<aura:attribute name="recovered" type="String"/>
<aura:attribute name="deaths" type="String"/>
<!-- attributes -->
<aura:attribute name="sortDirection" type="String" default="asc" />
<aura:attribute name="defaultSortDirection" type="String" default="asc" />
@arun12209
arun12209 / LightningMapCntrl
Created February 21, 2020 18:05
LightningMapCntrl
public class LightningMapCntrl {
@AuraEnabled
public static List<Account> fetchAllAccounts(){
List<Account> accList = [Select Id,Name,Website,BillingCity,BillingStreet,BillingPostalCode,BillingState,BillingCountry from Account ];
return accList;
}
}
@arun12209
arun12209 / AccountsOnMapCSS
Created February 21, 2020 18:03
AccountsOnMapCSS
.THIS #container{
border: 1px solid rgb(221, 219, 218);
}
@arun12209
arun12209 / AccountOnMapHelper
Created February 21, 2020 18:02
AccountOnMapHelper
({
loadMap : function(component,event,helper,account) {
var mapsArray = [];
for(let index=0; index < account.length; index++){
var Mobj = {
location: {
Street: account[index].BillingStreet,
City: account[index].BillingCity,
PostalCode: account[index].BillingPostalCode,
@arun12209
arun12209 / AccountOnMapController
Created February 21, 2020 18:01
AccountOnMapController
({
doInit : function(component, event, helper) {
let action = component.get("c.fetchAllAccounts");
action.setCallback(this,function(response){
let state = response.getState();
if(state =='SUCCESS'){
let result = response.getReturnValue();
console.log('Result returned: ' +JSON.stringify(result));
component.set("v.accObj",result);
@arun12209
arun12209 / AccountsOnMap
Created February 21, 2020 18:00
AccountsOnMap
<aura:component controller="LightningMapCntrl" implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId" access="global" >
<!-- aura attributes -->
<aura:attribute name="mapMarkers" type="Object"/>
<aura:attribute name="centerObj" type="Object" />
<aura:attribute name="zoomLevel" type="Integer" />
<aura:attribute name="markersTitle" type="String" />
<aura:attribute name="showFooter" type="Boolean" />
<aura:attribute name="recordId" type="string"/>
<aura:attribute name="accObj" type="Account[]"/>
<!-- Init handlers-->
@arun12209
arun12209 / companyProfileCSS
Created December 28, 2019 16:45
companyProfileCSS
.THIS #overview{
word-wrap: break-word;
white-space: pre-wrap;
}
.THIS #Addresses{
word-wrap: break-word;
white-space: inherit;
@arun12209
arun12209 / FullContactAccountDetailsContrl
Created December 28, 2019 16:40
FullContactAccountDetailsContrl
public class FullContactAccountDetailsContrl {
@AuraEnabled
public static string getAccountDetails(string rec_id){
String msg = '';
try{
Account acc=[select Website from account where id=:rec_id ];
system.debug('domain : '+ acc.Website);
if(acc.Website != null && acc.Website != ''){
@arun12209
arun12209 / companyProfileHelper
Created December 28, 2019 16:38
companyProfileHelper
({
fetchCompanyProfile : function(component,event,helper) {
var action=component.get("c.getAccountDetails");
action.setParams({
"rec_id": component.get("v.recordId")
});
action.setCallback(this, function(response) {
var state = response.getState();
if (state === "SUCCESS") {
@arun12209
arun12209 / companyProfileController
Created December 28, 2019 16:37
companyProfileController
({
doInit : function(component, event, helper) {
helper.fetchCompanyProfile(component,event,helper);
}
})