E-commerce - Website Item limited roles

Hello everyone,

I want to try customizing the shop by category page (E-commerce module), but I’m encountering a few issues as follows.

I want to only display the product price when the user has the role of ‘Customer’.
This is my code to get_detail_item:

And this is my result:

My knowledge of JavaScript is not very strong, so I’m not sure if I’ve made any coding mistakes… I would appreciate any feedback from everyone

Edit1:
This is my is_long_term_customer function to check user has role “Customer”

My approach is to modify the JavaScript code, but if anyone has a low-code or client/server script solution, please feel free to share it below. Thank you, everyone.