Widget: DCTList: Difference between revisions

From LINKS Community Center
Jump to: navigation, search
Eschmidt (talk | contribs)
No edit summary
Eschmidt (talk | contribs)
No edit summary
Line 446: Line 446:
                 ? filterState.usedByDmo === dct.usedByDmo
                 ? filterState.usedByDmo === dct.usedByDmo
                 : true;
                 : true;
             return sourcesCheck && functionsCheck && businessModelCheck && dmUseCheck;
            const ucCheck = filterState.hasUC
                ? filterState.hasUC === dct.hasUC
                : true;
             return sourcesCheck && functionsCheck && businessModelCheck && dmUseCheck && ucCheck;
         }
         }


Line 493: Line 496:


             filterState.usedByDmo = document.getElementById('used-by-practitioners').checked ? 'yes' : undefined;
             filterState.usedByDmo = document.getElementById('used-by-practitioners').checked ? 'yes' : undefined;
            filterState.hasUC = document.getElementById('has-use-case').checked ? 'yes' : undefined;
             // const dmUseOptions = Array.from(document.querySelectorAll('#dm-use-filter input[type="checkbox"]'));
             // const dmUseOptions = Array.from(document.querySelectorAll('#dm-use-filter input[type="checkbox"]'));
             // const selectedDmUseOptions = dmUseOptions.filter(checkbox => checkbox.checked).map(checkbox => checkbox.value);
             // const selectedDmUseOptions = dmUseOptions.filter(checkbox => checkbox.checked).map(checkbox => checkbox.value);
Line 603: Line 609:
                             if (dct.usedByDmo.toLowerCase() === 'yes') {
                             if (dct.usedByDmo.toLowerCase() === 'yes') {
                                 out += '<small><span class="badge badge-danger">Used by practitioners</span></small> ';
                                 out += '<small><span class="badge badge-danger">Used by practitioners</span></small> ';
                            }
                            if (dct.hasUC.toLowerCase() === 'yes') {
                                out += '<small><span class="badge badge-warning">Use case</span></small> ';
                             }
                             }



Revision as of 16:53, 7 December 2022

Current version of the DCT List.
Not ready for production!