aluo-x / 813_site

813 Animal shelter mockup
0 stars 0 forks source link

Roles should be multiselect like breeds but is currently single select. Also, Roles don't currently save on edit. #35

Closed ramimanna closed 6 years ago

nsylv commented 6 years ago

This comes from a hacky thing I did. Culprit:

if (type === 'checkbox') {
      value = $("input[name='" + f + "Input']").prop('checked');
      value = (f === 'fixed')
        ? (value) ? 'yes' : 'no'
        : value;

Need to go through and change the data stored in firestore to boolean, then update everywhere to render "True" as "Yes". This will need to be done in table.js (create a renderBoolean method) in addition to modal.js

ramimanna commented 6 years ago

Gotchu, was being confused about that block of code :p

Also, in terms of UI, I was thinking 3 checkboxes for the roles, because a select2 multiselect seems overkill

nsylv commented 6 years ago

Completely agree. Once I fix up my hacky thing then it should work fine!

nsylv commented 6 years ago

A little more complicated than I thought, but seems resolved :)

Feel free to re-open if you find bugs with the data saving!