Jump to content

using switch/case in classes/overrides


MerseyRayUK

Recommended Posts

Hi,

I have managed to work out how to add an extra column into the AdminOrdersController and get it saving to the database.

Its the 18? colum in this image.

815093188_Screenshot_2018-11-15OrdersNo-Match.png.2a93afc33fd83c89a82295e25b6cf750.png

Basicall we have to verify the customer is 18 by using a 3rd party, so we then confirm this in the column by writing "Pass"

As you can see in the image, the badge css is applied to some of them, depending on the colum to the right of it.

How can I set the 18? column to have the green badge css if the value is "Pass"

Im guessing its something to do with the "Switch" and "case" in the controller but I cant work it out.

My code currently looks like this.

coding.jpg.df2df077b0548b6f69e31396f017056f.jpg

 

Thanks in advance

 

I would also like to display a red icon, or red badge if the value is blank.

 

Edited by MerseyRayUK (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...