From 86db6f2c1693c0ac65098bf79e5c8a58733310d3 Mon Sep 17 00:00:00 2001 From: Thierry Bugier Date: Wed, 8 Jul 2026 10:01:59 +0200 Subject: [PATCH 1/8] bump(1.3.0): 1.3.0 --- composer.json | 2 +- package.json | 2 +- setup.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index e9a9a0b1..4ed1059f 100644 --- a/composer.json +++ b/composer.json @@ -35,5 +35,5 @@ "license-headers": "vendor/bin/licence-headers-check --ansi --no-interaction", "build-schema": "tools/build-db-schema.php carbon | plantuml -p -tpng > docs/db-schema.png" }, - "version": "1.3.0-dev" + "version": "1.3.0" } diff --git a/package.json b/package.json index c2598b8a..e768a8cc 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "carbon", "description": "Measurement of carbon emissions of GLPI devices", "license": "GPL-3.0-or-later", - "version": "1.3.0-dev", + "version": "1.3.0", "dependencies": { "apexcharts": "^3.49.0" }, diff --git a/setup.php b/setup.php index f2aedb35..488f973d 100644 --- a/setup.php +++ b/setup.php @@ -47,7 +47,7 @@ use Profile as GlpiProfile; // Version of the plugin (major.minor.bugfix) -define('PLUGIN_CARBON_VERSION', '1.3.0-dev'); +define('PLUGIN_CARBON_VERSION', '1.3.0'); // Schema version of this version (major.minor.bugfix) define('PLUGIN_CARBON_SCHEMA_VERSION', '1.3.0'); From 70191f591ce34aa6ecc6025920d2e7ccb4e4b9b9 Mon Sep 17 00:00:00 2001 From: Thierry Bugier Date: Wed, 8 Jul 2026 10:15:46 +0200 Subject: [PATCH 2/8] fix(Datasource\Lca\Boaviztapi\Client): method type hinting --- src/DataSource/Lca/Boaviztapi/Client.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DataSource/Lca/Boaviztapi/Client.php b/src/DataSource/Lca/Boaviztapi/Client.php index 5eeb0f12..3acbc46b 100644 --- a/src/DataSource/Lca/Boaviztapi/Client.php +++ b/src/DataSource/Lca/Boaviztapi/Client.php @@ -273,7 +273,7 @@ public function parseResponse(array $response, string $scope): array return $impacts; } - protected function parseCriteria(string $name, $impact): ?TrackedFloat + protected function parseCriteria(string $name, array|string $impact): ?TrackedFloat { if ($impact === 'not implemented') { return null; From 34c79712e138019ef3bdcce3a172f81d9b9d340b Mon Sep 17 00:00:00 2001 From: Thierry Bugier Date: Wed, 8 Jul 2026 10:16:17 +0200 Subject: [PATCH 3/8] docs(changelog): update changelog --- CHANGELOG.md | 48 ++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 40 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 74730cd9..9b57bb9c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,31 +4,63 @@ All notable changes to this project will be documented in this file. -## [1.3.0](https://github.com/pluginsGLPI/carbon/compare/1.2.0...1.3.0) (2026-06-17) +## [1.3.0](https://github.com/pluginsGLPI/carbon/compare/1.2.0...1.3.0) (2026-07-09) ### Features +* Show state of decommission_date in history diagnosis ([106755](https://github.com/pluginsGLPI/carbon/commit/10675570de8c38180e37a8b14d15d510530242e6)) + +##### Carbon Emission + +* Show total carbon emission of an individual asset ([0f26d3](https://github.com/pluginsGLPI/carbon/commit/0f26d3d2adf595d1050c818c3ed7027f5a2b4b0f)) ##### Carbon Emission, Usage Impact, Embodied Impact -* Clear data ([7e30a5](https://github.com/pluginsGLPI/carbon/commit/7e30a5a6d0bf8834fd993c2be0dd77c4e6625dd0)) +* Clear data ([da46a4](https://github.com/pluginsGLPI/carbon/commit/da46a4f9d693012246e5ddd860a31da84c90543a)) + +##### Dashboard\ Grid + +* Dashboard reset ([47a1a8](https://github.com/pluginsGLPI/carbon/commit/47a1a85f4a4263eb8ff87a2b989d54f0dde188c4)) ##### Data Source\ Lca\ Boavistappi\ Config -* Change URL override method ([8c1702](https://github.com/pluginsGLPI/carbon/commit/8c1702d33fab0f266b362088e87dbc49b37b7402)) +* Change URL override method ([bc2d4c](https://github.com/pluginsGLPI/carbon/commit/bc2d4c52a1da650ab1b69c7370d41d399afc1db5)) ### Bug Fixes -* Invalid homepage URL in xml file ([9d219e](https://github.com/pluginsGLPI/carbon/commit/9d219eea0bcce70e3626c4e9610486fec7bc7c83)) -* Tests ([06bd09](https://github.com/pluginsGLPI/carbon/commit/06bd09ee9f9e8baa7a7cb15f290a9f23ba1f075d)) +* Bad handling of volume, may lead to huge numbers ([688990](https://github.com/pluginsGLPI/carbon/commit/6889900ee458d00992333c1e106840f3846d0230)) +* Check GLPI version before using new hook ([dcba1e](https://github.com/pluginsGLPI/carbon/commit/dcba1e0c004bd0567cb219ee52560da392a74659)) +* Invalid homepage URL in xml file ([6d22a1](https://github.com/pluginsGLPI/carbon/commit/6d22a12323d373b96a7440b246832cc0d866cb4c)) +* Tests ([080313](https://github.com/pluginsGLPI/carbon/commit/080313e3339f7cf1a3752e89e5596f8bb035b70a)) ##### Dashboard -* Merge cards and widget instead of redefine ([c396fc](https://github.com/pluginsGLPI/carbon/commit/c396fcc749a2b780946b275ef30ce79c3d5dc0ff)) +* Merge cards and widget instead of redefine ([14176d](https://github.com/pluginsGLPI/carbon/commit/14176d150a4055258ca47de256e9da2d88b43309)) -##### Dashboard\ Grid +##### Dashboard\ Provider + +* Embodied + usage count of impact criteria ([b8b7be](https://github.com/pluginsGLPI/carbon/commit/b8b7bed7f6e8592ad38d6742df00f40a21dd9116)) + +##### Datasource\ Lca\ Boaviztapi\ Client + +* Method type hinting ([116eaf](https://github.com/pluginsGLPI/carbon/commit/116eaf080515d78f1819971d2da97577e3e29db7)) + +##### Impact\ Embodied\ Internal\ Abstract Asset + +* Bad key used in SQL query ([d417b5](https://github.com/pluginsGLPI/carbon/commit/d417b5e6b6073e6001ee632890b3dabc7eaf079c)) + +##### Impact\ Type + +* Wrong unit for photochemical ozone formation ([d79733](https://github.com/pluginsGLPI/carbon/commit/d797332d7e6576b120945c94f0de612eb321260e)) + +##### Search Oprions + +* Better group title ([1c0f53](https://github.com/pluginsGLPI/carbon/commit/1c0f53d97a5fc1d0cfaed5e698c9ff8c6ea39ab9)) + +##### Toolbox -* Loss of other plugins cards for dashboard ([1abe09](https://github.com/pluginsGLPI/carbon/commit/1abe09d505b40cfe64ddee04ec3d33b1676a34ba)) +* Dynamically round numbers without dimension ([62b28b](https://github.com/pluginsGLPI/carbon/commit/62b28b43dcaeab231ba76d8f09fa026bbe1a8deb)) +* Round mol * dimensionned quantity ([83a7e2](https://github.com/pluginsGLPI/carbon/commit/83a7e2bf2e5b14b046b9fa00688f57d84054957c)) --- From 9ac34a551a4af4b5b29d17634c6a3efe3b032364 Mon Sep 17 00:00:00 2001 From: Thierry Bugier Date: Wed, 8 Jul 2026 10:40:33 +0200 Subject: [PATCH 4/8] chore: update dependencies --- package-lock.json | 97 +++++++++++++++++++---------------------------- package.json | 4 +- 2 files changed, 41 insertions(+), 60 deletions(-) diff --git a/package-lock.json b/package-lock.json index dc25e4c8..4f1b693a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,19 +1,19 @@ { "name": "carbon", - "version": "1.3.0-dev", + "version": "1.3.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "carbon", - "version": "1.3.0-dev", + "version": "1.3.0", "hasInstallScript": true, "license": "GPL-3.0-or-later", "dependencies": { "apexcharts": "^3.49.0" }, "devDependencies": { - "copy-webpack-plugin": "^13.0.0", + "copy-webpack-plugin": "^14.0.0", "css-loader": "^6.11.0", "file-loader": "^6.2.0", "glob": "^11.0.2", @@ -656,9 +656,9 @@ } }, "node_modules/brace-expansion": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.5.tgz", - "integrity": "sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ==", + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.7.tgz", + "integrity": "sha512-7oFy703dxfY3/NLxC1fh2SUCQ0H9rmAY+5EpDVfXjUTTs+HEwR2nYaqLv+GWcTsumwxPfiz6CzCNkwXwBUwqCA==", "dev": true, "dependencies": { "balanced-match": "^4.0.2" @@ -863,19 +863,19 @@ "peer": true }, "node_modules/copy-webpack-plugin": { - "version": "13.0.1", - "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-13.0.1.tgz", - "integrity": "sha512-J+YV3WfhY6W/Xf9h+J1znYuqTye2xkBUIGyTPWuBAT27qajBa5mR4f8WBmfDY3YjRftT2kqZZiLi1qf0H+UOFw==", + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-14.0.0.tgz", + "integrity": "sha512-3JLW90aBGeaTLpM7mYQKpnVdgsUZRExY55giiZgLuX/xTQRUs1dOCwbBnWnvY6Q6rfZoXMNwzOQJCSZPppfqXA==", "dev": true, "dependencies": { "glob-parent": "^6.0.1", "normalize-path": "^3.0.0", "schema-utils": "^4.2.0", - "serialize-javascript": "^6.0.2", + "serialize-javascript": "^7.0.3", "tinyglobby": "^0.2.12" }, "engines": { - "node": ">= 18.12.0" + "node": ">= 20.9.0" }, "funding": { "type": "opencollective", @@ -1245,9 +1245,9 @@ "dev": true }, "node_modules/fast-uri": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.0.tgz", - "integrity": "sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.3.tgz", + "integrity": "sha512-i70LwGWUduXqzicKXWshooq+sWL1K3WUU5rKZNG/0i3a1OSoX3HqhH5WbWwTmqWfor4urUakGPiRQcleRZTwOg==", "dev": true, "funding": [ { @@ -1927,10 +1927,20 @@ "peer": true }, "node_modules/js-yaml": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", - "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.0.tgz", + "integrity": "sha512-1td788aAnnZ5qs7V2QIRl1owjtYpbKt749Y3xauqQgwIIGF/xXWz1wMTEBx5O3LK3lXLVuqXPdPxj2BoFHaW9Q==", "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/puzrin" + }, + { + "type": "github", + "url": "https://github.com/sponsors/nodeca" + } + ], "peer": true, "dependencies": { "argparse": "^2.0.1" @@ -2238,9 +2248,9 @@ "peer": true }, "node_modules/nanoid": { - "version": "3.3.11", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", - "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", + "version": "3.3.15", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.15.tgz", + "integrity": "sha512-y7Wygv/7mEOvxTuEQDB8StXdMRBWf1kR/tlhAzBRUFkB2jfcLOAxO/SHmOO2zgz1pVgK29/kyupn059/bCHdjA==", "dev": true, "funding": [ { @@ -2525,9 +2535,9 @@ } }, "node_modules/postcss": { - "version": "8.5.9", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.9.tgz", - "integrity": "sha512-7a70Nsot+EMX9fFU3064K/kdHWZqGVY+BADLyXc8Dfv+mTLLVl6JzJpPaCZ2kQL9gIJvKXSLMHhqdRRjwQeFtw==", + "version": "8.5.16", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.16.tgz", + "integrity": "sha512-vuwillviilfKZsg0VGj5R/YwwcHx4SLsIOI/7K6mQkWx+l5cUHTjj5g0AasTBcyXsbfTgrwsUNmVUb5xVwyPwg==", "dev": true, "funding": [ { @@ -2544,7 +2554,7 @@ } ], "dependencies": { - "nanoid": "^3.3.11", + "nanoid": "^3.3.12", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" }, @@ -2728,15 +2738,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, "node_modules/read-pkg": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-6.0.0.tgz", @@ -2958,26 +2959,6 @@ "queue-microtask": "^1.2.2" } }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, "node_modules/schema-utils": { "version": "4.3.3", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.3.3.tgz", @@ -3010,12 +2991,12 @@ } }, "node_modules/serialize-javascript": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", - "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", + "version": "7.0.7", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-7.0.7.tgz", + "integrity": "sha512-YAy8Od6KV+uuwUuU50np8fGB/Aues6Y0nAhA9y/hId74PlKUcme4pXcBD46NWKr1Q4osN/iseZ17YqO1XfmI8g==", "dev": true, - "dependencies": { - "randombytes": "^2.1.0" + "engines": { + "node": ">=20.0.0" } }, "node_modules/shallow-clone": { diff --git a/package.json b/package.json index e768a8cc..36c715c7 100644 --- a/package.json +++ b/package.json @@ -11,14 +11,14 @@ "postinstall": "npm run-script build" }, "devDependencies": { + "copy-webpack-plugin": "^14.0.0", "css-loader": "^6.11.0", "file-loader": "^6.2.0", "glob": "^11.0.2", "mini-css-extract-plugin": "^2.9.0", - "copy-webpack-plugin": "^13.0.0", "style-loader": "^3.3.4", "stylelint-config-standard-scss": "^8.0.0", "webpack": "^5.90.3", "webpack-cli": "^5.1.4" } -} \ No newline at end of file +} From 84970b5188110e4d29645f06b80dc0c1bf077626 Mon Sep 17 00:00:00 2001 From: Thierry Bugier Date: Wed, 8 Jul 2026 10:54:54 +0200 Subject: [PATCH 5/8] refactor(Impact\Embodied\Boavizta\AbstractAsset): code cleanup --- src/Impact/Embodied/Boavizta/AbstractAsset.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/Impact/Embodied/Boavizta/AbstractAsset.php b/src/Impact/Embodied/Boavizta/AbstractAsset.php index 8cf253c0..a2776ddb 100644 --- a/src/Impact/Embodied/Boavizta/AbstractAsset.php +++ b/src/Impact/Embodied/Boavizta/AbstractAsset.php @@ -55,8 +55,6 @@ abstract class AbstractAsset extends AbstractEmbodiedImpact implements AssetInte /** @var Client instance of the HTTP client */ protected ?Client $client = null; - // abstract public static function getEngine(CommonDBTM $item): EngineInterface; - /** * Analyze the hardware of the asset to prepare the request to the backend * From a8092628a3f1c2de3173ed7af1f9ebcd37d43e3b Mon Sep 17 00:00:00 2001 From: Thierry Bugier Date: Wed, 8 Jul 2026 10:58:12 +0200 Subject: [PATCH 6/8] refactor(Dashboard\Provider): code cleanup --- src/Dashboard/Provider.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/Dashboard/Provider.php b/src/Dashboard/Provider.php index 6d928dc7..6ff66f04 100644 --- a/src/Dashboard/Provider.php +++ b/src/Dashboard/Provider.php @@ -1116,8 +1116,6 @@ public static function getUsageCarbonEmissionPerMonth(array $crit = [], array $p $data['series'][1]['data'] = $scaled['serie']; $data['series'][1]['unit'] = $scaled['unit']; // Not supported by apex charts - // $data = self::getCarbonEmissionPerMonth($params['args'], $crit); - $data['date_interval'] = [ $start_date->format($date_format), $end_date->format($date_format), From ebfebdb97ac684d55183b6650961c1c7e9336911 Mon Sep 17 00:00:00 2001 From: Thierry Bugier Date: Fri, 10 Jul 2026 09:49:39 +0200 Subject: [PATCH 7/8] fix(Impact\Type): missing unit for CTUe, fix missing space --- src/Impact/Type.php | 4 ++-- src/Toolbox.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Impact/Type.php b/src/Impact/Type.php index 3d6b6092..45e16adf 100644 --- a/src/Impact/Type.php +++ b/src/Impact/Type.php @@ -100,14 +100,14 @@ class Type 'ir' => ['g', 'U235 eq'], 'lu' => null, 'odp' => ['g', 'CFC-11 eq'], - 'pm' => null, + 'pm' => [null], 'pocp' => ['g', 'NMVOC eq'], 'wu' => ['m³', ''], 'mips' => ['g', ''], 'adpe' => ['g', 'SB eq'], 'adpf' => ['J', ''], 'ap' => ['mol', 'H+ eq'], - 'ctue' => null, + 'ctue' => ['', 'CTUe'], // 'ctuh_c' => [null, 'CTUh'], // 'ctuh_nc' => [null, 'CTUh'], 'epf' => ['g', 'P eq'], diff --git a/src/Toolbox.php b/src/Toolbox.php index f8c85078..8840ba9d 100644 --- a/src/Toolbox.php +++ b/src/Toolbox.php @@ -385,7 +385,7 @@ public static function getHumanReadableValue(float $value, array $unit): string return self::getVolume($value * 1000) . $unit[1]; } - return sprintf(__('%1$s %2$s', 'carbon'), self::dynamicRound($value), implode(' ', $unit)); + return self::dynamicRound($value) . ' ' . implode(' ', $unit); } /** From 575c68b540665ad1e5c65817b34e74e2c859c5ea Mon Sep 17 00:00:00 2001 From: Thierry Bugier Date: Fri, 10 Jul 2026 16:22:36 +0200 Subject: [PATCH 8/8] fix(Impact\Type): set unit for pm impact criteria --- src/Impact/Type.php | 57 +++++++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 31 deletions(-) diff --git a/src/Impact/Type.php b/src/Impact/Type.php index 45e16adf..ebdf4406 100644 --- a/src/Impact/Type.php +++ b/src/Impact/Type.php @@ -85,36 +85,6 @@ class Type self::IMPACT_EPT => 'ept', ]; - /** - * Unit of impact criterias - * - * @var array - */ - private static array $impact_units = [ - 'gwp' => ['g', 'CO₂ eq'], - 'adp' => ['g', 'SB eq'], - 'pe' => ['J', ''], - 'gwppb' => ['g', 'CO₂ eq'], - 'gwppf' => ['g', 'CO₂ eq'], - 'gwpplu' => ['g', 'CO₂ eq'], - 'ir' => ['g', 'U235 eq'], - 'lu' => null, - 'odp' => ['g', 'CFC-11 eq'], - 'pm' => [null], - 'pocp' => ['g', 'NMVOC eq'], - 'wu' => ['m³', ''], - 'mips' => ['g', ''], - 'adpe' => ['g', 'SB eq'], - 'adpf' => ['J', ''], - 'ap' => ['mol', 'H+ eq'], - 'ctue' => ['', 'CTUe'], - // 'ctuh_c' => [null, 'CTUh'], - // 'ctuh_nc' => [null, 'CTUh'], - 'epf' => ['g', 'P eq'], - 'epm' => ['g', 'N eq'], - 'ept' => ['mol', 'N eq'], - ]; - /** * get an array of impact types * @@ -144,7 +114,32 @@ public static function getImpactId(string $type) **/ public static function getImpactUnit(string $type): array { - return self::$impact_units[$type] ?? ['', '']; + $impact_units = [ + 'gwp' => ['g', 'CO₂ eq'], + 'adp' => ['g', 'SB eq'], + 'pe' => ['J', ''], + 'gwppb' => ['g', 'CO₂ eq'], + 'gwppf' => ['g', 'CO₂ eq'], + 'gwpplu' => ['g', 'CO₂ eq'], + 'ir' => ['g', 'U235 eq'], + 'lu' => null, + 'odp' => ['g', 'CFC-11 eq'], + 'pm' => [null, __('Disease incidence', 'carbon')], + 'pocp' => ['g', 'NMVOC eq'], + 'wu' => ['m³', ''], + 'mips' => ['g', ''], + 'adpe' => ['g', 'SB eq'], + 'adpf' => ['J', ''], + 'ap' => ['mol', 'H+ eq'], + 'ctue' => ['', 'CTUe'], + // 'ctuh_c' => [null, 'CTUh'], + // 'ctuh_nc' => [null, 'CTUh'], + 'epf' => ['g', 'P eq'], + 'epm' => ['g', 'N eq'], + 'ept' => ['mol', 'N eq'], + ]; + + return $impact_units[$type] ?? ['', '']; } /**