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
public class MCSubscribeUnsubscribeHelper { | |
@future(callout=true) // make callout in future method | |
//Future mehtod called by trigger to subscribe/unsubscribe the member from mailchimp list. | |
public static void doSubscribeUnsubscribe(Set<string> conEmail){ // | |
//Get member ids in MD5 format | |
map<string,string> emailMemberIdMap=new map<string,string>(); | |
map<string,boolean> emailBolMap = new map<string,boolean>(); | |
for(string str:conEmail){ // iterate over set of email ids. | |
String emailStr = str.substringBefore('|'); |
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
public class ReallocateTasksCntrl { | |
// fetch tasks record from database | |
@AuraEnabled | |
public static List<taskWrapperCls> fetchTasks(){ | |
List<taskWrapperCls> taskList = new List<taskWrapperCls>(); | |
for(Task t:[select Id,Subject,Status,owner.Name,OwnerId,ActivityDate,description,What.Name,What.Id,Priority from Task where Status!='Completed']){ | |
String firstChr = t.Subject.substring(0,1).toUpperCase(); | |
taskList.add(new taskWrapperCls(false,t,firstChr)); | |
} |
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 controller="ReallocateTasksCntrl" 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="tasks" type="Object"/> | |
<aura:handler event="aura:waiting" action="{!c.showSpinner}"/> | |
<aura:handler event="aura:doneWaiting" action="{!c.hideSpinner}"/> | |
<aura:attribute name="Spinner" type="Boolean"/> | |
<ltng:require styles="{! $Resource. JQDataTable + '/DataTables-1.10.16/media/css/jquery.dataTables.min.css'}" | |
scripts="{!join(',', | |
$Resource.JQueryNew , | |
$Resource.JQDataTable + '/DataTables-1.10.16/media/js/jquery.dataTables.min.js')}" afterScriptsLoaded="{!c.doInit}"/> |
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
({ | |
doInit : function(component, event, helper) { | |
var action = component.get("c.fetchTasks"); | |
action.setCallback(this,function(response){ | |
var state = response.getState(); | |
if(state == 'SUCCESS'){ | |
var result = response.getReturnValue(); | |
console.log('Result: ' +JSON.stringify(result)); | |
component.set("v.tasks",result); | |
helper.JqScriptsLoaded(component,event,helper); |
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
({ | |
JqScriptsLoaded : function(component,event,helper) { | |
setTimeout(function(){ | |
var ele = component.find('tableId').getElement(); | |
$(ele).DataTable(); | |
// add lightning class to search filter field with some bottom margin.. | |
$('div.dataTables_filter input').addClass('slds-input'); | |
$('div.dataTables_filter input').css("marginBottom", "10px"); | |
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
.THIS #table_container{ | |
background:white; | |
} | |
.THIS .changeMe{ | |
background-color:green; | |
color:white; | |
} | |
.THIS [data-letters]:before { | |
content:attr(data-letters); | |
display:inline-block; |
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 controller="ReallocateTasksCntrl"> | |
<aura:attribute name="taskList" type="string[]"/> | |
<aura:attribute name="userList" type="Object"/> | |
<aura:attribute name="row" type="Integer"/> | |
<aura:attribute name="selectedUserId" type="string"/> | |
<!--<aura:handler name="init" value="this" action="{!c.doInit}"/>--> | |
<ltng:require styles="{! $Resource. JQDataTable + '/DataTables-1.10.16/media/css/jquery.dataTables.min.css'}" | |
scripts="{!join(',', | |
$Resource.JQueryNew , | |
$Resource.JQDataTable + '/DataTables-1.10.16/media/js/jquery.dataTables.min.js')}" afterScriptsLoaded="{!c.doInit}"/> |
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
({ | |
doInit : function(component, event, helper) { | |
//alert('Insider'); | |
var action = component.get("c.fetchUsers"); | |
action.setCallback(this,function(response){ | |
var state = response.getState(); | |
if(state =='SUCCESS'){ | |
var result = response.getReturnValue(); |
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
({ | |
doTaskTransfer : function(component,event,helper,tasks,selectedUser) { | |
var action = component.get("c.TaskTransfer"); | |
action.setParams({ | |
"tasksRec" : tasks, | |
"userId" : selectedUser | |
}); | |
action.setCallback(this,function(response){ | |
var state = response.getState(); |
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
.THIS #table_container{ | |
background:white; | |
} | |
.THIS [data-letters]:before { | |
content:attr(data-letters); | |
display:inline-block; | |
font-size:1em; | |
font-weight:bold; | |
width:2.5em; | |
height:2.5em; |