update 1904160825

This commit is contained in:
vkservicesllc
2019-04-16 08:25:11 -04:00
parent d62d95628a
commit 7f87d7d286
2 changed files with 35 additions and 78 deletions

View File

@@ -17,25 +17,25 @@ var el = [], list = '',
user2 = '<span>Joyce</span>'; user2 = '<span>Joyce</span>';
// timers / decisions // timers / decisions
var wkEffDt = new Date('2019-04-13'), var wkEffDt = new Date('2019-04-20'),
mnEffDt = new Date('2019-03-31'), mnEffDt = new Date('2019-04-30'),
today = new Date(), today = new Date(),
weeklyTopKey = (today >= wkEffDt) ? '1HTM8uUixl0dmWEKr7yXNE9XfPhKMmHvqYhy14XZ64YY' : '#', weeklyTopKey = (today >= wkEffDt) ? '1fpCiHmQ13Npmn0Uv39nljnuiZ8_zOUdS31wBzpkGfqs' : '#',
mI = (today >= mnEffDt) ? 1 : 0; mI = (today >= mnEffDt) ? 1 : 0;
// weekly URLS // weekly URLs
var weeklyUrls = { var weeklyUrls = {
top: top:
{ {
header: 'Apr 14 — Apr 20', header: 'Apr 21 — Apr 27',
key: weeklyTopKey, key: weeklyTopKey,
collectorId: '914973738', collectorId: '914973738',
linkId: '978213208' linkId: '978213208'
}, },
bottom: bottom:
{ {
header: 'Apr 7 — Apr 13', header: 'Apr 14 — Apr 20',
key: '1LxHzTniRqi7r0uXvcPgcDmTRmrNotmhkk8NAV7KXbI0', key: '1HTM8uUixl0dmWEKr7yXNE9XfPhKMmHvqYhy14XZ64YY',
collectorId: '914973738', collectorId: '914973738',
linkId: '978213208' linkId: '978213208'
}, },
@@ -82,6 +82,11 @@ var historyList = [
key: '#', key: '#',
id: '1250765514' id: '1250765514'
}, },
{
header: 'Apr 7 — Apr 13',
key: '1LxHzTniRqi7r0uXvcPgcDmTRmrNotmhkk8NAV7KXbI0',
id: '1250765514'
},
{ {
header: 'Mar 31 — Apr 6', header: 'Mar 31 — Apr 6',
key: '1rHP9N-LzlkHzYNOmJsT5VBrP1Q-gTSQpv_CCrpTq4us', key: '1rHP9N-LzlkHzYNOmJsT5VBrP1Q-gTSQpv_CCrpTq4us',
@@ -291,24 +296,24 @@ var monthlyUrls = {
title: 'Carolina Logistic, Inc', title: 'Carolina Logistic, Inc',
name: '<th>CAROLINA LOGISTIC &nbsp<span>70830515178332</span></th>', name: '<th>CAROLINA LOGISTIC &nbsp<span>70830515178332</span></th>',
month1_cards: { month1_cards: {
user0: [0, '686342087'], user0: [1, '686342087'],
user1: [0, '1995296890'], user1: [1, '1995296890'],
user2: [0, '2117669368'], user2: [1, '2117669368'],
month_key: ['Mar', '1eIvtgzyGlKMODEJ5ZflevTYBCEJ-e56XCsGw5IyX7Io'] month_key: ['Apr', '1Mq_umJDjKDe2XENNA3p-GthocJ84iqhYf7tAROWHbSM']
}, },
month2_cards: { month2_cards: {
user0: [mI, '686342087'], user0: [mI, '686342087'],
user1: [mI, '1995296890'], user1: [mI, '1995296890'],
user2: [mI, '2117669368'], user2: [mI, '2117669368'],
month_key: ['Apr', '1Mq_umJDjKDe2XENNA3p-GthocJ84iqhYf7tAROWHbSM'] month_key: ['May', '-']
}, },
month1_codes: { month1_codes: {
user0: [0, '1165085359', '1782605551'], user0: [1, '1165085359', '1782605551'],
month_key: ['Mar', '1FlCloXREACBF9ehfbgYo-TTqguFI_Qs8AEVD7E06Wyg'] month_key: ['Apr', '1bNYXyCX7KaJQWWs4gT87tqMNnbwxs-fsKNjBWG32ZsI']
}, },
month2_codes: { month2_codes: {
user0: [mI, '1165085359', '1782605551'], user0: [mI, '1165085359', '1782605551'],
month_key: ['Apr', '1bNYXyCX7KaJQWWs4gT87tqMNnbwxs-fsKNjBWG32ZsI'] month_key: ['May', '-']
} }
}, },
CT: CT:
@@ -316,24 +321,24 @@ var monthlyUrls = {
title: 'Carolina Transportation, Inc', title: 'Carolina Transportation, Inc',
name: '<th>CAROLINA TRANSPORTATION &nbsp<span>70830515178290</span></th>', name: '<th>CAROLINA TRANSPORTATION &nbsp<span>70830515178290</span></th>',
month1_cards: { month1_cards: {
user0: [0, '686342087'], user0: [1, '686342087'],
user1: [0, '1995296890'], user1: [1, '1995296890'],
user2: [0, '2117669368'], user2: [1, '2117669368'],
month_key: ['Mar', '1-MGKiUd05GvqHb0XzBECMa98UAKLPx6sK0qZmFMt5Ic'] month_key: ['Apr', '1dPHIapaXV6mk4_SaSSeVD8ChAXqloHRxW1gHlLfIXuo']
}, },
month2_cards: { month2_cards: {
user0: [mI, '686342087'], user0: [mI, '686342087'],
user1: [mI, '1995296890'], user1: [mI, '1995296890'],
user2: [mI, '2117669368'], user2: [mI, '2117669368'],
month_key: ['Apr', '1dPHIapaXV6mk4_SaSSeVD8ChAXqloHRxW1gHlLfIXuo'] month_key: ['May', '-']
}, },
month1_codes: { month1_codes: {
user0: [0, '1165085359', '1782605551'], user0: [1, '1165085359', '1782605551'],
month_key: ['Mar', '1pgz9iPRML8Cfu0sIIYWyqzBExrPhcfdCqyDfwueEmiU'] month_key: ['Apr', '1_m3J9drOJfOBO82jyRpTNnwTISosTF-KuEBPULZ9ruQ']
}, },
month2_codes: { month2_codes: {
user0: [mI, '1165085359', '1782605551'], user0: [mI, '1165085359', '1782605551'],
month_key: ['Apr', '1_m3J9drOJfOBO82jyRpTNnwTISosTF-KuEBPULZ9ruQ'] month_key: ['May', '-']
} }
}, },
DE: DE:
@@ -341,16 +346,16 @@ var monthlyUrls = {
title: 'Delta Express, Inc', title: 'Delta Express, Inc',
name: '<th>DELTA EXPRESS &nbsp<span>70830515177576</span></th>', name: '<th>DELTA EXPRESS &nbsp<span>70830515177576</span></th>',
month1_cards: { month1_cards: {
user0: [0, '686342087'], user0: [1, '686342087'],
user1: [0, '1995296890'], user1: [1, '1995296890'],
user2: [0, '2117669368'], user2: [1, '2117669368'],
month_key: ['Mar', '1RmFRA0d7IF-i0jdP2S3awXX78VgFdv6qFPREzVnp5os'] month_key: ['Apr', '1gsAFom0r-az8OsXTWg68aJqWyw71Ljm5Ao3jCm0ngFw']
}, },
month2_cards: { month2_cards: {
user0: [mI, '686342087'], user0: [mI, '686342087'],
user1: [mI, '1995296890'], user1: [mI, '1995296890'],
user2: [mI, '2117669368'], user2: [mI, '2117669368'],
month_key: ['Apr', '1gsAFom0r-az8OsXTWg68aJqWyw71Ljm5Ao3jCm0ngFw'] month_key: ['May', '-']
}, },
month1_codes: { month1_codes: {
user0: [0, '1165085359', '1782605551'], user0: [0, '1165085359', '1782605551'],
@@ -364,8 +369,8 @@ var monthlyUrls = {
}; };
// reporting drivers // reporting drivers
var repIds = ['106260013', '505523817'], var repIds = ['505523817', '#'],
months = ['Mar', 'Apr'], months = ['Apr', 'May'],
i = 0; i = 0;
if (today > mnEffDt) i = 1; if (today > mnEffDt) i = 1;
var el_rd = '<a class="h" target="_blank" ' + var el_rd = '<a class="h" target="_blank" ' +

View File

@@ -1,48 +0,0 @@
/**
* Updated: 2019-04-14
*/
/** User Authorization **/
function authorizeActiveUser() {
var ui = SpreadsheetApp.getUi(),
ss = SpreadsheetApp.getActive();
var name = ss.getName(),
owner = ss.getOwner().getEmail(),
user = Session.getActiveUser().getEmail(),
id = ScriptApp.getScriptId(),
storage = DriveApp.getStorageLimit(),
qouta = MailApp.getRemainingDailyQuota(),
fetchCode = UrlFetchApp.fetch(
'https://vkservicesllc.github.io/projects/json/urlfetch-activation/activation.json'
).getResponseCode(),
triggerMessage = '<i style="color: red;">No</i>';
if (owner === user) {
installTriggers();
triggerMessage = '<b style="color: green">Yes</b>';
}
user = (!user) ? '<span style="color: red;">unknown</span>' : '<b style="color: blue;">' + user + '</b>';
var td = '<td style="padding: 2px 7px;">',
htmlBody = '<div style="font-family: Arial;"><table>';
htmlBody += '<tr>' + td + 'Spreadsheet Name:</td>' + td + '<b>' + name + '</b></td></tr>';
htmlBody += '<tr>' + td + 'Spreadsheet Owner:</td>' + td + '<b>' + owner + '</b></td></tr>';
htmlBody += '<tr>' + td + 'Authorized User:</td>' + td + user + '</td></tr>';
htmlBody += '<tr><td colspan="2"><span style="color: white;">---</span></td></tr>';
htmlBody += '<tr>' + td + 'Project Script ID:</td>' + td + id + '</td></tr>';
htmlBody += '<tr>' + td + 'Drive Storage:</td>' + td + storage + ' bytes</td></tr>';
htmlBody += '<tr>' + td + 'Mail Daily Remaining Quota:</td>' + td + qouta + ' emails</td></tr>';
htmlBody += '<tr>' + td + 'URL Fetch Response Code:</td>' + td + fetchCode + '</td></tr>';
htmlBody += '<tr>' + td + 'Triggers Reset:</td>' + td + triggerMessage + '</td></tr>';
ui.showModalDialog(
HtmlService.createHtmlOutput(htmlBody + '</table></div>').setWidth(880).setHeight(220),
'Authorization Confirmation'
);
}