Subversion Repositories SmartDukaan

Rev

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

Rev 37573 Rev 37575
Line 2006... Line 2006...
2006
 
2006
 
2007
    /* Stacked cell content: partner count on top, PO in middle, Billed at bottom (primary) */
2007
    /* Stacked cell content: partner count on top, PO in middle, Billed at bottom (primary) */
2008
    #rdrrPmWrap .pm-partners {
2008
    #rdrrPmWrap .pm-partners {
2009
      font-size: 12px;
2009
      font-size: 12px;
2010
      font-weight: 700;
2010
      font-weight: 700;
2011
      color: #234425;
2011
      color: #177a3a;
2012
      line-height: 1.2;
2012
      line-height: 1.2;
2013
      margin-bottom: 4px;
2013
      margin-bottom: 4px;
2014
      white-space: nowrap
2014
      white-space: nowrap
2015
    }
2015
    }
2016
 
2016
 
2017
    #rdrrPmWrap .pm-po {
2017
    #rdrrPmWrap .pm-po {
2018
      font-size: 14px;
2018
      font-size: 14px;
2019
      font-weight: 600;
2019
      font-weight: 600;
2020
      color: var(--ink);
2020
      color: #4a55a8;
2021
      line-height: 1.2;
2021
      line-height: 1.2;
2022
      margin-bottom: 4px;
2022
      margin-bottom: 4px;
2023
      white-space: nowrap
2023
      white-space: nowrap
2024
    }
2024
    }
2025
 
2025
 
Line 3316... Line 3316...
3316
        model.brands.forEach(function (b) {
3316
        model.brands.forEach(function (b) {
3317
          var c = row.cells[b.name] || {po: 0, count: 0, billed: 0};
3317
          var c = row.cells[b.name] || {po: 0, count: 0, billed: 0};
3318
          var max = model.brandMax[b.name] || 0;
3318
          var max = model.brandMax[b.name] || 0;
3319
          var intensity = (!row.isTotal && max > 0) ? Math.min(1, c.billed / max) : 0;
3319
          var intensity = (!row.isTotal && max > 0) ? Math.min(1, c.billed / max) : 0;
3320
          var isZero = c.billed === 0 && c.po === 0 && c.count === 0;
3320
          var isZero = c.billed === 0 && c.po === 0 && c.count === 0;
3321
          // Soft red/pink heatmap: wider alpha range so top performers pop, but text stays readable.
3321
          // Softer blue heatmap: capped alpha keeps dark text readable at max intensity.
3322
          // Darker pink = bigger contribution within that brand column.
-
 
3323
          var bgAlpha = intensity > 0 ? (0.08 + intensity * 0.30).toFixed(2) : 0;
3322
          var bgAlpha = intensity > 0 ? (0.05 + intensity * 0.22).toFixed(2) : 0;
3324
          var style = (!row.isTotal && intensity > 0)
3323
          var style = (!row.isTotal && intensity > 0)
3325
                  ? ' style="background: rgba(232,74,74,' + bgAlpha + ')"' : '';
3324
                  ? ' style="background: rgba(59,130,246,' + bgAlpha + ')"' : '';
3326
          if (isZero) {
3325
          if (isZero) {
3327
            html.push('<td class="pm-cell pm-cell-zero">&mdash;</td>');
3326
            html.push('<td class="pm-cell pm-cell-zero">&mdash;</td>');
3328
          } else {
3327
          } else {
3329
            // Values formatted in Lakh (X.XL) — matches how the drill-down and other DRR sections display money.
3328
            // Values formatted in Lakh (X.XL) — matches how the drill-down and other DRR sections display money.
3330
            var billedTxt = pmLakh(c.billed);
3329
            var billedTxt = pmLakh(c.billed);