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 283: Line 283:
         * @property {FuncData} functions
         * @property {FuncData} functions
         * @property {string} usedByDmo
         * @property {string} usedByDmo
        * @property {string} hasUC
         * @property {string} logo
         * @property {string} logo
         */
         */
Line 377: Line 378:


             const dctResponse = await fetch(getQueryUrl(dctQuery)).then(response => response.json());
             const dctResponse = await fetch(getQueryUrl(dctQuery)).then(response => response.json());
            console.log(dctResponse)


             const dctList = Object.keys(dctResponse.query.results).map(dctName => {
             const dctList = Object.keys(dctResponse.query.results).map(dctName => {
Line 391: Line 390:
                 dct.logo = dctResult.printouts[IMG_PROP][0] ? getFilePath(dctResult.printouts[IMG_PROP][0].fulltext) : undefined;
                 dct.logo = dctResult.printouts[IMG_PROP][0] ? getFilePath(dctResult.printouts[IMG_PROP][0].fulltext) : undefined;
                 dct.usedByDmo = dctResult.printouts[DMO_PROP][0] === 't' ? 'yes' : 'no';    // not quite, but we only care about yes
                 dct.usedByDmo = dctResult.printouts[DMO_PROP][0] === 't' ? 'yes' : 'no';    // not quite, but we only care about yes
 
                dct.hasUC = dctResult.printouts[UC_PROP][0] === 't' ? 'yes' : 'no';    // not quite, but we only care about yes


                 dct.functions = new Map();
                 dct.functions = new Map();
Line 445: Line 444:
                 : true;
                 : true;
             const dmUseCheck = filterState.usedByDmo
             const dmUseCheck = filterState.usedByDmo
                 ? filterState.usedByDmo.includes(dct.usedByDmo)
                 ? filterState.usedByDmo === dct.usedByDmo
                 : true;
                 : true;
             return sourcesCheck && functionsCheck && businessModelCheck && dmUseCheck;
             return sourcesCheck && functionsCheck && businessModelCheck && dmUseCheck;

Revision as of 16:47, 7 December 2022

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