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 237: Line 237:
         * @property {string[]} businessModel
         * @property {string[]} businessModel
         * @property {string[]} functions
         * @property {string[]} functions
        * @property {string} usedByDmo
         * @property {string} logo
         * @property {string} logo
         */
         */
Line 318: Line 319:


             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 => {
                 const dctResult = dctResponse.query.results[dctName];
                 const dctResult = dctResponse.query.results[dctName];
Line 329: Line 329:
                 dct.businessModel = dctResult.printouts[BUSINESS_PROP].map(bModel => bModel.fulltext);
                 dct.businessModel = dctResult.printouts[BUSINESS_PROP].map(bModel => bModel.fulltext);
                 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] ? dctResult.printouts[DMO_PROP][0].fulltext : 'Unknown';


                 dct.functions = [];
                 dct.functions = [];

Revision as of 10:54, 13 September 2022

Development verstion of the DCT List.
Not ready for production!