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 CalculoFinanciamentoTO { | |
| public class Oportunidade{ | |
| @AuraEnabled | |
| public String nome{get;set;} | |
| @AuraEnabled | |
| public Date dataDeFechamento{get;set;} | |
| @AuraEnabled |
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 CalculoFinanciamentoBO { | |
| public static void inserirOportunidade(CalculoFinanciamentoTO.Oportunidade calculoFinanciamentoWrapper){ | |
| Date dataDeFechamento = System.today(); | |
| Opportunity oportunidadeFinanciamento = new Opportunity(); | |
| oportunidadeFinanciamento.name = calculoFinanciamentoWrapper.nome; | |
| oportunidadeFinanciamento.StageName = 'Nova Oportunidade'; | |
| oportunidadeFinanciamento.CloseDate = dataDeFechamento.addDays(5); | |
| oportunidadeFinanciamento.Description = 'Valor do Carro: R$' + calculoFinanciamentoWrapper.valorCarro + ', Valor da Entrada: R$' + calculoFinanciamentoWrapper.valorEntrada + ', Número de Parcelas: ' + calculoFinanciamentoWrapper.parcelas + '.'; | |
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, track } from "lwc"; | |
| import tratarOportunidade from '@salesforce/apex/calculoFinanciamentoController.tratarOportunidade'; | |
| import UserPermissionsCallCenterAutoLogin from "@salesforce/schema/User.UserPermissionsCallCenterAutoLogin"; | |
| import {ShowToastEvent} from 'lightning/platformShowToastEvent'; | |
| export default class calcFinanciamento extends LightningElement { | |
| nomeOportunidade; | |
| valorCarro; | |
| valorEntrada; | |
| valorFinal; |
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-theme_default slds-var-p-around_medium"> | |
| <lightning-card> | |
| <h1 class='slds-text-heading_large'>Calcular Financiamento</h1> | |
| <lightning-input label="Nome:" class="nomeOportunidade"></lightning-input> | |
| <lightning-input class="valorCarroInput" type='number' label="Valor do Carro Preterido" name="num1"> | |
| </lightning-input> |
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
| HTML | |
| <template> | |
| <div class="app slds-p-around_x-large"> | |
| <h1 class="slds-text-heading_large">Exercício 2</h1> | |
| <lightning-input type="text" label="Primeiro Nome" name="primeiroNome" onchange={handleInputChange}> | |
| </lightning-input> |
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
| HTML | |
| <template> | |
| <lightning-record-edit-form object-api-name="Lead" onsuccess={handleSuccess}> | |
| <lightning-messages></lightning-messages> | |
| <div class="slds-m-around_medium"> | |
| <lightning-input-field field-name="FirstName"></lightning-input-field> | |
| <lightning-input-field field-name="LastName"></lightning-input-field> | |
| <lightning-input-field field-name="Company"></lightning-input-field> | |
| <lightning-input-field field-name="Status"></lightning-input-field> |
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
| HTML | |
| <template> | |
| <lightning-card title="Novo Lead" icon-name="standard:lead"> | |
| <div class="slds-m-around_medium"> | |
| <lightning-input label="Nome" name="name" onchange={handleInputChange} class="slds-m-bottom_x-small"> | |
| </lightning-input> | |
| <lightning-input label="Sobrenome" name="sobrenome" onchange={handleInputChange} class="slds-required"> | |
| </lightning-input> | |
| <lightning-input type="text" label="Empresa" name="empresa" onchange={handleInputChange} class="slds-required"> |
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
| ({ | |
| Somar : function(component, event, helper) { | |
| var a = component.get("v.n1"); | |
| var b = component.get("v.n2"); | |
| var total = parseInt(a) + parseInt(b); | |
| component.set("v.total",total); | |
| component.set("v.Somar",true); | |
| component.set("v.Subtrair",false); | |
| component.set("v.Multiplicar",false); | |
| component.set("v.Dividir",false); |
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
| <aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" access="global" > | |
| <aura:attribute name="n1" type="integer" /> | |
| <aura:attribute name="n2" type="integer" /> | |
| <aura:attribute name="total" type="integer" /> | |
| <aura:attribute name="Somar" type="boolean" default="false" /> | |
| <aura:attribute name="Subtrair" type="boolean" default="false" /> | |
| <aura:attribute name="Multiplicar" type="boolean" default="false" /> | |
| <aura:attribute name="Dividir" type="boolean" default="false" /> |
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Document</title> | |
| <style> | |