This file contains hidden or 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
<template> | |
<div class="slds-m-horizontal_xx-small slds-m-bottom_x-small"> | |
<lightning-icon icon-name={iconname} size="x-small"></lightning-icon> | |
<span class="slds-p-left_small">{label}</span> | |
</div> | |
</template> |
This file contains hidden or 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
let pivotFunction = function(list, startIndex, endIndex) { | |
let pivotIndex = Math.floor((startIndex + endIndex) / 2) | |
let pivot = list[pivotIndex] | |
console.log("pivotindex", pivotIndex) | |
let leftPointer = startIndex | |
let rightPointer = endIndex |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"> | |
<apiVersion>49.0</apiVersion> | |
<isExposed>true</isExposed> | |
<targets> | |
<target>lightning__AppPage</target> | |
<target>lightning__RecordPage</target> | |
<target>lightning__HomePage</target> | |
</targets> | |
</LightningComponentBundle> |
This file contains hidden or 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 with sharing class FollowUpManager { | |
@AuraEnabled (cacheable=true) | |
public static List<Clinic_Tracker__c> getFollowUps(){ | |
Date today = Date.today(); | |
Id userId = UserInfo.getUserId(); | |
List<Clinic_Tracker__c> cts = [SELECT Name, Next_Follow_Up_Date__c, Notes__c FROM | |
Clinic_Tracker__c WHERE Next_Follow_Up_Date__c <= :today AND OwnerId = :userId]; | |
return cts; |
This file contains hidden or 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
import { LightningElement, wire } from 'lwc'; | |
import getAllFollowUps from "@salesforce/apex/FollowUpManager.getFollowUps"; | |
export default class OverDueFollowUps extends LightningElement { | |
@wire(getAllFollowUps) followUps; | |
get responseReceived(){ | |
return this.followUps; |
This file contains hidden or 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
<template> | |
<lightning-card> | |
<div slot="title" class="slds-text-title_bold"> | |
Today's Clinic Follow Ups | |
</div> | |
<ul> | |
<template if:true={responseReceived}> | |
<template for:each={followUps.data} for:item="followUp"> | |
<li key={followUp.id}> | |
<div class="slds-p-around_medium"> |
This file contains hidden or 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
<apex:page standardController="Contact" docType="html-5.0" sidebar="false" standardStyleSheets="false"> | |
<head> | |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" | |
crossorigin="anonymous" /> | |
</head> | |
<div class="container"> | |
<apex:pageBlock> | |
<div class="jumbotron" style="background-color: #2c113e"> |
This file contains hidden or 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
@isTest | |
public class createCaseAndAttachVMTest { | |
@isTest static void testVMInsert(){ | |
//create and insert a contact with a phone number | |
Contact c = new Contact(FirstName='Eneida', | |
LastName='Revueltas', | |
MobilePhone = '650-555-5555'); | |
insert c; | |
This file contains hidden or 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
trigger ContentVersionTrigger on ContentVersion (before insert, after insert, after update, before update, before delete, after delete) { | |
switch on Trigger.operationType { | |
when BEFORE_INSERT { | |
System.debug('Before Insert'); | |
} | |
when AFTER_INSERT { | |
System.debug('After Insert'); | |
ContentVersionHandler.createCaseAndAttachVM(Trigger.new); | |
} |
This file contains hidden or 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 without sharing class ContentVersionHandler { | |
public static String getPhoneNumberFromTitle(String title){ | |
String p = title.substring(11,21); | |
String editedNumber = p.substring(0,3) + '-' + | |
p.substring(3,6) + '-' + | |
p.substring(6,10); | |
return editedNumber; | |
} | |
NewerOlder