Employee Center Badges Color in My Request widget

Javier Tirado1
Tera Guru

Are you struggling with the color of the badges in Employee Center? Colors don't seem to match the state of the records?

I bring you the solution!

It seems it's a temporary issue as the widget is quite new, but SN Devs didn't seem to have had in count the states of Requests (Closed Complete / Incomplete / Skipped), thus rendering the badge of those state as blue and confusing My Requests users.

You can update the color scheme of your badges by modifying the Script Include RequestLabelColorConstants [sn_ex_sp.RequestLabelColorConstants] to include other states and customize the colors (although I recommend to modify colors from the theme record of your portal).

JavierTirado1_0-1778244440219.png

 

KEEP IN MIND! The state label must only have the first character in upper-case, and only the first one. If you write 'Closed Complete' it won't work, as the scripts fetch the reference flattening the string and then UpperCasing the first character.

JavierTirado1_1-1778244576458.png

 

1 ACCEPTED SOLUTION

Javier Tirado1
Tera Guru

Quick addition:

If colors in the Script Include reference CSS tags from the 'EC Request List Item' widget. These tags reference at the same time the theme variables, so it's definitely better to just update theme variables, don't modify the label-x-color on the script.

View solution in original post

1 REPLY 1

Javier Tirado1
Tera Guru

Quick addition:

If colors in the Script Include reference CSS tags from the 'EC Request List Item' widget. These tags reference at the same time the theme variables, so it's definitely better to just update theme variables, don't modify the label-x-color on the script.