diff --git a/app-new/mc-owners-func.js b/app-new/mc-owners-func.js new file mode 100644 index 0000000..32f1010 --- /dev/null +++ b/app-new/mc-owners-func.js @@ -0,0 +1,65 @@ +const companies = { + + 'CLs': 'CAROLINA LOGISTICS, Inc  70830516181943', + 'DE': 'DELTA EXPRESS, Inc  70830515177576', + 'DL': 'DELTA LOGISTICS, Inc  70830517302592', + 'OT': 'ONTRACK TRANSPORTATION, Inc  70830517305886', + 'PT': 'PRECISE TRANSPORTATION, Inc  70830517302433', + + 'DES': 'DELTA EXPRESS SERVICES, Inc  ', + 'RT': 'RAINIER TRANSPORTATION, Inc  70830517307425', + +}; + +const pad = 'style="padding: 12px 54px;">', + hPad = '' + hPad + 'Period 1' + hPad + 'Period 2'; + +let compKeys = Object.keys(companies), + mKeys = Object.keys(monthlySpreadsheets), + lastPeriod = mKeys[0], + lastMonth = lastPeriod.split('-')[1], + lastYear = lastPeriod.split('-')[0], + active = new Date >= new Date(lastMonth + ' 1, ' + lastYear), + period1 = monthlySpreadsheets[mKeys[1]], + period2 = monthlySpreadsheets[lastPeriod]; + +for (let i = 0; i < compKeys.length; i++) { + + let sideHeader = hPad + companies[compKeys[i]] + '', + data1 = period1[compKeys[i]], + data2 = period2[compKeys[i]]; + + let anchor1 = '', anchor2 = ''; + + let title = sideHeader.split('>')[1].split('<')[0].trim(); + + if (data1 && data1[0]) { + + let monYr = mKeys[1].split('-')[1] + ' ' + mKeys[1].split('-')[0]; + + anchor1 = dPad + ''; + anchor1 += (data1[1]) ? monYr + '' : '' + monYr; + anchor1 += ''; + + } + + if (data2 && data2[0]) { + + let monYr = lastMonth + ' ' + lastYear; + + anchor2 = dPad + ''; + anchor2 += (data2[1] && active) ? monYr + '' : '' + monYr; + anchor2 += ''; + + } + + if (anchor1 == '' && anchor2 == '') sideHeader = sideHeader.replace('' + +} + +document.getElementById('omcMon').innerHTML = table; diff --git a/app-new/mc-owners-ss.js b/app-new/mc-owners-ss.js new file mode 100644 index 0000000..5ab95ee --- /dev/null +++ b/app-new/mc-owners-ss.js @@ -0,0 +1,37 @@ +const monthlySpreadsheets = { + + /* + + 'yyyy-mmmm': { + + 'CLs': ['', 1], + 'DE': ['', 1], + 'DL': ['', 1], + 'OT': ['', 1], + 'PT': ['', 1], + + }, + + */ + + '2019-August': { + + 'CLs': ['1QNYGrVphn1D7Bajr9m2vuZSoC_G2Pu0yf_CBfahhplE', 1], + 'DE': ['1MpWH4hVVALr-W21pG8JJ0TXtQYaFjpFjYStjRnHeF2o', 1], + 'DL': ['17vjSYZt2iP7XcjJRAjDS2a9qUY4IMVfU-SX9RpTx-Yg', 1], + 'OT': ['11xLawls0LBEwRpp5lc130-nun2-Guh-7Gym7RSQ_-XU', 1], + 'PT': ['1EDk1za4PVYkUEgUVvjCH1CCEo1mtI5FXC-f7fhUMz8k', 1], + + }, + + '2019-July': { + + 'CLs': ['1r4kELYN33dsoxD6IGcivMsFGKSP5Qebci0iR8fMGOsI', 1], + 'DE': ['12GULr80IX1HED0_ccG7fkaT4YZb_nrZKfGGDd5Vjy1U', 1], + 'DL': ['1emjsj1mO4LqvKSBkWjWQQNmpQcrJQJauYsHW-0n7BT4', 1], + 'OT': ['1QyFoBuVNdVvXiCqsiRF9vAg4Wzph0q6NwhgrNpfcqA4', 1], + 'PT': ['11Hq6FpGAY8LTsdMgOiLjZJl2dwEa97A0eHpu1UNEEog', 1], + + }, + +}; diff --git a/rpm/linkboard-owners.html b/rpm/linkboard-owners.html index 9de5d17..7b1dea3 100644 --- a/rpm/linkboard-owners.html +++ b/rpm/linkboard-owners.html @@ -320,7 +320,8 @@
- + +