79687276

Date: 2025-07-02 10:43:34
Score: 0.5
Natty:
Report link

Removed code from Model Subscription and added dependsOn column names in Column Initialization Javascript Function

function(options) {
  options.defaultGridColumnOptions = {
    cellTemplate: `&PRODUCT_NAME. {if WEIGHT/}|| @&WEIGHT.Kg {endif/}
{if PROMOTION_REF/}
  <button type="button" onClick="showPromotionInfo( &PROMOTION_REF. );" 
          title="Promotion Details" aria-label="Promotion Details" 
          class="t-Button t-Button--noLabel t-Button--icon t-Button--tiny t-Button--success t-Button--link">
    <span aria-hidden="true" class="t-Icon fa fa-bullhorn"></span>
  </button>
{endif/}`,
    dependsOn: ['WEIGHT','PROMOTION_REF']
  }

  return options;
}
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Abdullah