|
@@ -11,6 +11,12 @@ async function getROI(cx: string) {
|
|
|
const lowVolume = document.querySelector('input#low-volume') as HTMLInputElement;
|
|
const lowVolume = document.querySelector('input#low-volume') as HTMLInputElement;
|
|
|
|
|
|
|
|
const cxSelect = document.querySelector('select#cx') as HTMLSelectElement;
|
|
const cxSelect = document.querySelector('select#cx') as HTMLSelectElement;
|
|
|
|
|
+{
|
|
|
|
|
+ const savedCx = localStorage.getItem('cx');
|
|
|
|
|
+ if (savedCx !== null)
|
|
|
|
|
+ cxSelect.value = savedCx;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
const expertise = {
|
|
const expertise = {
|
|
|
AGRICULTURE: 'agri',
|
|
AGRICULTURE: 'agri',
|
|
|
CHEMISTRY: 'chem',
|
|
CHEMISTRY: 'chem',
|
|
@@ -107,6 +113,7 @@ async function render() {
|
|
|
}
|
|
}
|
|
|
document.getElementById('last-updated')!.textContent =
|
|
document.getElementById('last-updated')!.textContent =
|
|
|
`last updated: ${lastModified.toLocaleString(undefined, {dateStyle: 'full', timeStyle: 'long', hour12: false})}`;
|
|
`last updated: ${lastModified.toLocaleString(undefined, {dateStyle: 'full', timeStyle: 'long', hour12: false})}`;
|
|
|
|
|
+ localStorage.setItem('cx', cx);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
function color(n: number, low: number, high: number): string {
|
|
function color(n: number, low: number, high: number): string {
|