Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions tdx-enhanced.js
Original file line number Diff line number Diff line change
Expand Up @@ -908,6 +908,35 @@
}
}

let age = ['Age']
for (const dType of age) {
if (dType in item) {
let Age = item[dType]
const ageThreshold = 30

let days = Age.txt.slice(0,-1)

if (days > 30){
days = days - 30
let alpha = days / ageThreshold
alpha = alpha > 1 ? 1 : alpha
let cell = Age.cell
console.log(alpha)
handleHighlight("age",alpha,cell)
cell.classList.add(alpha > 0.5 ? "light" : "dark")
}
}
}

// let Status = ['Status']
// for (const dType of Status) {
// if (dType in item) {
// let CurrentStatus = item[dType]
// let cell = CurrentStatus.cell
// handleHighlight("status",CurrentStatus.txt,cell)
// }
// }

//find user replies & last modified by internal
if ('Requestor' in item && 'Modified By' in item && 'Prim Resp' in item) {
let fromUser = item["Requestor"]
Expand Down Expand Up @@ -1134,6 +1163,14 @@
if (type=="dateModified") {
element.style.backgroundColor = `rgba(255,0,0,${txt}`;
}
// if (type=="status"){
// if (txt=="In Process") {
// element.style.backgroundColor = "red"
// }
// }
if (type=="age") {
element.style.backgroundColor = `rgba(255,0,0,${txt}`;
}
}
}

Expand Down