Skip to main content

Hello all,


I want to display some queue items differently based on their status (open, closed, in progress for example).


Can I change the format/ css of an individual queue item based on a value in the record. I am wondering if I can use a render snippet to assign a css class to the item?


Any help much appreciated.


Ben

Hello Ben,


Not sure if this is what you’re looking for, but the JS Snippet bellow implements a simple solution to assigns the style dynamically. You can amend the JS to assign a class.


Best,


Lukas


var params = argumentst0],


jQElement = params.element,

item = params.item,

list = params.list,

model = params.model,

template = params.template;

$ = skuid.$;


let itemColour = ‘black’;


switch(item.row.Status){


case 'open':

itemColour = 'blueviolet';

break;


case 'close

':

itemColour = ‘cornflowerblue’;

break;


}


//change style=“…” to class=“…”

jQElement.html(

’ +

item.row.Name +

’ +

’ - ’ + item.row.Owner.Name);



Reply