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
var CurrentSheet = SpreadsheetApp.getActiveSpreadsheet(); | |
var prazos = CurrentSheet.getSheetByName('Prazos'); | |
function doGet(e) { | |
var customerEmail = e.parameter.email; | |
var data = { data_entrega: `${doSearch(customerEmail)}` }; | |
return ContentService.createTextOutput(JSON.stringify(data)).setMimeType(ContentService.MimeType.JSON); | |
} | |
function doSearch(customerEmail) { |
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
/* Como utilizar: | |
- Antes de executar, garanta que: [1] As tabelas 'Contatos' e 'Log de exportações' foram criadas e estão vazias; [2] O Token da API V2 está preenchido na tabela 'Dados'. | |
- Para iniciar a exportação, execute a função start. | |
- A tabela 'Log de exportações' registrará alguns dados da exportação para referência. | |
OBS: Caso o script seja interrompido ou parado, execute novamente a função start, para a exportação continuar do ponto que parou. | |
*/ | |
var CurrentSheet = SpreadsheetApp.getActiveSpreadsheet(); | |
var contatosTab = CurrentSheet.getSheetByName('Contatos'); | |
var logExportacoesTab = CurrentSheet.getSheetByName('Log de exportações'); |
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
var CurrentSheet = SpreadsheetApp.getActiveSpreadsheet(); | |
function doPost(e) { | |
var params = JSON.parse(e.postData.contents); | |
if (params.messages.hasOwnProperty('agentChangedStatus')) { | |
sheetsManager(params); | |
} | |
} | |
// Trata dados e chama a função que gerencia a planilha |
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
<div> | |
<button onclick="Huggy.sendMessage('Quero falar com um especialista')"></button> | |
</div> |
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
var huggyChatLoaded = false | |
sendMessageInChat = (msg) => huggyChatLoaded === true && Huggy.sendMessage(msg) | |
var $_Huggy = { | |
defaultCountry: '+55', | |
uuid: '9d9b6f1b-0871-4705-a579-aeea63bd73cd', | |
company: '325836', | |
afterLoad: () => huggyChatLoaded = true | |
}; |
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
var $_Huggy = { | |
defaultCountry: '+55', | |
uuid: '---', // este campo foi ocultado por conter informação sigilosa. | |
company: '---', // este campo foi ocultado por conter informação sigilosa. | |
afterLoad: function () { | |
Huggy.subscribe('box-opened', () => chatOpened = true) | |
Huggy.subscribe('box-closed', () => chatOpened = false) | |
setTimeout(() => chatOpened == false && registredStudent(), delayTrigger * 1000) | |
} | |
}; |
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
// As informações ocultadas neste código podem ser encontradas na tela de configuração do Huggy Chat. | |
todayDate = () => new Date() | |
closingDate = () => new Date(2022, 7, 23) | |
daysUntilClosing = () => Math.floor(Math.abs(closingDate().getTime() - todayDate().getTime()) / (1000 * 3600 * 24)) | |
targetStudentBehavior = () => daysUntilClosing() <= 1 ? Huggy.startTrigger(20855) : Huggy.showTrigger(20855) |
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
<div class="card mt-3"> | |
<ul class="list-group list-group-flush"> | |
<li class="list-group-item d-flex justify-content-between align-items-center flex-wrap"> | |
<h6 class="mb-0">Média Geral</h6> | |
<span id="general-average" class="text-secondary">43,5</span> | |
</li> | |
</ul> | |
</div> | |
<div class="card mt-3"> | |
<div class="card-body"> |
NewerOlder