flexibelere-search #1
@@ -9,10 +9,10 @@ import axios from "axios";
|
|||||||
// axios conf
|
// axios conf
|
||||||
axios.defaults.headers.common["api-language"] = "nl";
|
axios.defaults.headers.common["api-language"] = "nl";
|
||||||
|
|
||||||
const localApiUrl = "https://bykhztyhjw.sharedwithexpose.com/api/zoek_bestelling";
|
const localApiUrl = "https://backoffice.sociale-controle.nl/api/zoek_bestelling";
|
||||||
const orderUrlEdit = "https://bykhztyhjw.sharedwithexpose.com/bestellingen/edit/";
|
const orderUrlEdit = "https://backoffice.sociale-controle.nl/bestellingen/edit/";
|
||||||
const orderUrlIndex = "https://bykhztyhjw.sharedwithexpose.com/bestellingen";
|
const orderUrlIndex = "https://backoffice.sociale-controle.nl/bestellingen";
|
||||||
const apiCredentialUrl = "https://bykhztyhjw.sharedwithexpose.com/api/api_credentials";
|
const apiCredentialUrl = "https://backoffice.sociale-controle.nl/api/api_credentials";
|
||||||
|
|
||||||
Office.onReady((info) => {
|
Office.onReady((info) => {
|
||||||
if (info.host === Office.HostType.Outlook) {
|
if (info.host === Office.HostType.Outlook) {
|
||||||
@@ -25,25 +25,20 @@ export async function run() {
|
|||||||
// Set load animation in button
|
// Set load animation in button
|
||||||
loadAnimation(true);
|
loadAnimation(true);
|
||||||
|
|
||||||
// btoa(getLastName(Office.context.mailbox.item.sender.displayName))
|
|
||||||
// btoa(getInitials(Office.context.mailbox.item.sender.displayName))
|
|
||||||
// btoa(Office.context.mailbox.item.sender.emailAddress)
|
|
||||||
//senderName: btoa(Office.context.mailbox.item.sender.displayName)
|
|
||||||
|
|
||||||
let searchInfo = {
|
let searchInfo = {
|
||||||
senderLastName: btoa("DIT BESTAAT SWS NIET"),
|
senderLastName: btoa(getLastName(Office.context.mailbox.item.sender.displayName)),
|
||||||
senderInitials: btoa("NAHH"),
|
senderInitials: btoa(getInitials(Office.context.mailbox.item.sender.displayName)),
|
||||||
senderName: btoa("NO WAY DAT DIT BESTAAT!"),
|
senderName: btoa(Office.context.mailbox.item.sender.displayName),
|
||||||
senderEmail: btoa("Anjameijer1958@outlook.com"),
|
senderEmail: btoa(Office.context.mailbox.item.sender.emailAddress),
|
||||||
senderSubject: btoa(Office.context.mailbox.item.subject),
|
senderSubject: btoa(Office.context.mailbox.item.subject),
|
||||||
postalCodes: btoa(["1234AA, 0910AA"]),
|
postalCodes: {},
|
||||||
};
|
};
|
||||||
|
|
||||||
// searchInfo.postalCodes = await new Promise((resolve) => {
|
searchInfo.postalCodes = await new Promise((resolve) => {
|
||||||
// Office.context.mailbox.item.body.getAsync("text", function (async) {
|
Office.context.mailbox.item.body.getAsync("text", function (async) {
|
||||||
// resolve(getPostalCodesFromText(async.value));
|
resolve(getPostalCodesFromText(async.value));
|
||||||
// });
|
});
|
||||||
// });
|
});
|
||||||
|
|
||||||
// Make API call to see if we can find an order for the e-mail.
|
// Make API call to see if we can find an order for the e-mail.
|
||||||
let results;
|
let results;
|
||||||
|
|||||||
Reference in New Issue
Block a user