Subversion Repositories SmartDukaan

Rev

Rev 33931 | Rev 33933 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 33931 Rev 33932
Line 141... Line 141...
141
                        // Replace cell content with formatted values
141
                        // Replace cell content with formatted values
142
                        cell.innerHTML = `<span class="achieved-cell">${formattedAchieved}</span> / <span class="target-cell">${formattedTarget}</span>`;
142
                        cell.innerHTML = `<span class="achieved-cell">${formattedAchieved}</span> / <span class="target-cell">${formattedTarget}</span>`;
143
 
143
 
144
                        // Apply green background if achieved >= target
144
                        // Apply green background if achieved >= target
145
                        if (!isNaN(achievedValue) && !isNaN(targetValue) && achievedValue >= targetValue) {
145
                        if (!isNaN(achievedValue) && !isNaN(targetValue) && achievedValue >= targetValue) {
146
                            cell.querySelector('.achieved-cell').style.backgroundColor = '#abf2abd4';
146
                            cell.style.backgroundColor = '#abf2abd4';
147
                        }
147
                        }
148
                    }
148
                    }
149
                }
149
                }
150
            });
150
            });
151
        });
151
        });