there's lots of templates in the app that are awkward to work with because they're html embedded in javascript. have you ever tried handlebars? they're very nice because you can store your templates in a separate, non-javascript file, and you can add conditionals to them.
so this way you don't have to create a guest map template, and then re-create 99% that entire template but with 5 lines changed for an admin user, and then recreate that same template for a manager, etc. you can just do
I agree the templates are bit messy and not structured. So I am currently moving templates into React to make it more structured. And I will definitely look up handlebars. It looks really clean.
there's lots of templates in the app that are awkward to work with because they're html embedded in javascript. have you ever tried handlebars? they're very nice because you can store your templates in a separate, non-javascript file, and you can add conditionals to them.
so this way you don't have to create a guest map template, and then re-create 99% that entire template but with 5 lines changed for an admin user, and then recreate that same template for a manager, etc. you can just do
it's much cleaner, much easier to maintain, and much less work.