@undp/carbon-library 1.0.56 → 1.0.58

Sign up to get free protection for your applications and to get access to all the features.
package/dist/cjs/index.js CHANGED
@@ -985,16 +985,16 @@ var AddNewCompanyComponent = function (props) {
985
985
  }); };
986
986
  var onUpdateCompany = function () { return __awaiter(void 0, void 0, void 0, function () {
987
987
  var formOneValues, values, logoBase64, logoUrls, response, error_3;
988
- var _a, _b, _c, _d, _e, _f;
989
- return __generator(this, function (_g) {
990
- switch (_g.label) {
988
+ var _a, _b, _c, _d, _e, _f, _g, _h;
989
+ return __generator(this, function (_j) {
990
+ switch (_j.label) {
991
991
  case 0:
992
992
  setLoading(true);
993
993
  formOneValues = formOne.getFieldsValue();
994
994
  formOneValues.phoneNo = PhoneInput.formatPhoneNumberIntl(formOneValues.phoneNo);
995
- _g.label = 1;
995
+ _j.label = 1;
996
996
  case 1:
997
- _g.trys.push([1, 5, , 6]);
997
+ _j.trys.push([1, 5, , 6]);
998
998
  values = {};
999
999
  if (regionField) {
1000
1000
  values = {
@@ -1017,9 +1017,14 @@ var AddNewCompanyComponent = function (props) {
1017
1017
  companyRole: (_d = state === null || state === void 0 ? void 0 : state.record) === null || _d === void 0 ? void 0 : _d.companyRole,
1018
1018
  };
1019
1019
  }
1020
- if (((_e = state === null || state === void 0 ? void 0 : state.record) === null || _e === void 0 ? void 0 : _e.companyRole) !== exports.CompanyRole.GOVERNMENT) {
1020
+ if (((_e = state === null || state === void 0 ? void 0 : state.record) === null || _e === void 0 ? void 0 : _e.companyRole) !== exports.CompanyRole.GOVERNMENT &&
1021
+ ((_f = state === null || state === void 0 ? void 0 : state.record) === null || _f === void 0 ? void 0 : _f.companyRole) !== exports.CompanyRole.MINISTRY) {
1021
1022
  values.taxId = formOneValues.taxId;
1022
1023
  }
1024
+ if (((_g = state === null || state === void 0 ? void 0 : state.record) === null || _g === void 0 ? void 0 : _g.companyRole) === exports.CompanyRole.MINISTRY) {
1025
+ values.sectoralScope = formOneValues.sectoralScope;
1026
+ values.nameOfMinister = formOneValues.nameOfMinister;
1027
+ }
1023
1028
  if (formOneValues.website) {
1024
1029
  values.website = 'https://' + formOneValues.website;
1025
1030
  }
@@ -1028,15 +1033,15 @@ var AddNewCompanyComponent = function (props) {
1028
1033
  }
1029
1034
  if (!formOneValues.logo) return [3 /*break*/, 3];
1030
1035
  if (!(formOneValues.logo.length !== 0)) return [3 /*break*/, 3];
1031
- return [4 /*yield*/, getBase64((_f = formOneValues.logo[0]) === null || _f === void 0 ? void 0 : _f.originFileObj)];
1036
+ return [4 /*yield*/, getBase64((_h = formOneValues.logo[0]) === null || _h === void 0 ? void 0 : _h.originFileObj)];
1032
1037
  case 2:
1033
- logoBase64 = _g.sent();
1038
+ logoBase64 = _j.sent();
1034
1039
  logoUrls = logoBase64.split(',');
1035
1040
  values.logo = logoUrls[1];
1036
- _g.label = 3;
1041
+ _j.label = 3;
1037
1042
  case 3: return [4 /*yield*/, put('national/organisation/update', values)];
1038
1043
  case 4:
1039
- response = _g.sent();
1044
+ response = _j.sent();
1040
1045
  if (response.status === 200 || response.status === 201) {
1041
1046
  setUserInfo({
1042
1047
  companyLogo: response.data.logo,
@@ -1052,7 +1057,7 @@ var AddNewCompanyComponent = function (props) {
1052
1057
  setLoading(false);
1053
1058
  return [3 /*break*/, 6];
1054
1059
  case 5:
1055
- error_3 = _g.sent();
1060
+ error_3 = _j.sent();
1056
1061
  antd.message.open({
1057
1062
  type: 'error',
1058
1063
  content: "".concat(t('errorInUpdatingCompany'), " ").concat(error_3.message),
@@ -1515,6 +1520,75 @@ exports.ProgrammeManagementColumns = void 0;
1515
1520
  ProgrammeManagementColumns["emissionReductionAchieved"] = "emissionReductionAchieved";
1516
1521
  })(exports.ProgrammeManagementColumns || (exports.ProgrammeManagementColumns = {}));
1517
1522
 
1523
+ exports.MitigationTypes = void 0;
1524
+ (function (MitigationTypes) {
1525
+ MitigationTypes["AGRICULTURE"] = "Agriculture";
1526
+ MitigationTypes["BIOMASS_ENERGY"] = "BiomassEnergy";
1527
+ MitigationTypes["CCS"] = "CCS";
1528
+ MitigationTypes["CEMENT"] = "Cement";
1529
+ MitigationTypes["COAL_MINE"] = "Coal/Mine";
1530
+ MitigationTypes["EE_HOUSEHOLDS"] = "EEHouseholds";
1531
+ MitigationTypes["EE_INDUSTRY"] = "EEIndustry";
1532
+ MitigationTypes["EE_OWN_GENERATION"] = "EEOwnGeneration";
1533
+ MitigationTypes["EE_SERVICE"] = "EEService";
1534
+ MitigationTypes["EE_SUPPLY_SIDE"] = "EESupplySide";
1535
+ MitigationTypes["ENERGY_DISTRIBUTION"] = "EnergyDistribution";
1536
+ MitigationTypes["FORESTRY"] = "Forestry";
1537
+ MitigationTypes["FOSSIL_FUEL"] = "FossilFuel";
1538
+ MitigationTypes["FUGITIVE"] = "Fugitive";
1539
+ MitigationTypes["GEOTHERMAL"] = "Geothermal";
1540
+ MitigationTypes["HFC_PFCS_SF6"] = "HFC_PFCs_SF6";
1541
+ MitigationTypes["HYDRO"] = "Hydro";
1542
+ MitigationTypes["LANDFILLS"] = "Landfills";
1543
+ MitigationTypes["MARINE"] = "Marine";
1544
+ MitigationTypes["METHANE_AVOIDANCE"] = "MethaneAvoidance";
1545
+ MitigationTypes["N20"] = "N20";
1546
+ MitigationTypes["SOLAR"] = "Solar";
1547
+ MitigationTypes["TRANSPORT"] = "Transport";
1548
+ MitigationTypes["WIND"] = "Wind";
1549
+ })(exports.MitigationTypes || (exports.MitigationTypes = {}));
1550
+ var mitigationTypeList = [
1551
+ { value: exports.MitigationTypes.AGRICULTURE.valueOf(), label: "Agriculture" },
1552
+ { value: exports.MitigationTypes.SOLAR.valueOf(), label: "Solar" },
1553
+ { value: exports.MitigationTypes.BIOMASS_ENERGY.valueOf(), label: "Biomass energy" },
1554
+ { value: exports.MitigationTypes.CCS.valueOf(), label: "CCS" },
1555
+ { value: exports.MitigationTypes.CEMENT.valueOf(), label: "Cement" },
1556
+ {
1557
+ value: exports.MitigationTypes.COAL_MINE.valueOf(),
1558
+ label: "Coal bed/mine methane",
1559
+ },
1560
+ { value: exports.MitigationTypes.EE_HOUSEHOLDS.valueOf(), label: "EE households" },
1561
+ { value: exports.MitigationTypes.EE_INDUSTRY.valueOf(), label: "EE industry" },
1562
+ {
1563
+ value: exports.MitigationTypes.EE_OWN_GENERATION.valueOf(),
1564
+ label: "EE own generation",
1565
+ },
1566
+ { value: exports.MitigationTypes.EE_SERVICE.valueOf(), label: "EE service" },
1567
+ { value: exports.MitigationTypes.EE_SUPPLY_SIDE.valueOf(), label: "EE supply side" },
1568
+ {
1569
+ value: exports.MitigationTypes.ENERGY_DISTRIBUTION.valueOf(),
1570
+ label: "Energy distribution",
1571
+ },
1572
+ { value: exports.MitigationTypes.FORESTRY.valueOf(), label: "Forestry" },
1573
+ {
1574
+ value: exports.MitigationTypes.FOSSIL_FUEL.valueOf(),
1575
+ label: "Fossil fuel switch",
1576
+ },
1577
+ { value: exports.MitigationTypes.FUGITIVE.valueOf(), label: "Fugitive" },
1578
+ { value: exports.MitigationTypes.GEOTHERMAL.valueOf(), label: "Geothermal" },
1579
+ { value: exports.MitigationTypes.HFC_PFCS_SF6.valueOf(), label: "HFCs, PFCs, SF6" },
1580
+ { value: exports.MitigationTypes.HYDRO.valueOf(), label: "Hydro" },
1581
+ { value: exports.MitigationTypes.LANDFILLS.valueOf(), label: "Landfills" },
1582
+ { value: exports.MitigationTypes.MARINE.valueOf(), label: "Marine" },
1583
+ {
1584
+ value: exports.MitigationTypes.METHANE_AVOIDANCE.valueOf(),
1585
+ label: "Methane avoidance",
1586
+ },
1587
+ { value: exports.MitigationTypes.N20.valueOf(), label: "N2O" },
1588
+ { value: exports.MitigationTypes.TRANSPORT.valueOf(), label: "Transport" },
1589
+ { value: exports.MitigationTypes.WIND.valueOf(), label: "Wind" },
1590
+ ];
1591
+
1518
1592
  exports.ConfigurationSettingsType = void 0;
1519
1593
  (function (ConfigurationSettingsType) {
1520
1594
  ConfigurationSettingsType[ConfigurationSettingsType["isTransferFrozen"] = 0] = "isTransferFrozen";
@@ -2702,11 +2776,11 @@ var ProgrammeManagementComponent = function (props) {
2702
2776
  React.createElement(antd.Button, { type: "primary", size: "large", block: true, icon: React.createElement(icons.PlusOutlined, null), onClick: onClickAddProgramme }, t("programme:addProgramme")))))),
2703
2777
  React.createElement("div", { className: "content-card" },
2704
2778
  React.createElement(antd.Row, { className: "table-actions-section" },
2705
- React.createElement(antd.Col, { lg: { span: 16 }, md: { span: 16 } },
2779
+ React.createElement(antd.Col, { lg: { span: 15 }, md: { span: 14 } },
2706
2780
  React.createElement("div", { className: "action-bar" },
2707
2781
  React.createElement(antd.Checkbox, { className: "all-check", disabled: loading, indeterminate: indeterminate, onChange: onCheckAllChange, checked: checkAll, defaultChecked: true }, t("programme:all")),
2708
2782
  React.createElement(antd.Checkbox.Group, { disabled: loading, options: statusOptions, defaultValue: statusOptions.map(function (e) { return e.value; }), value: selectedStatus, onChange: onStatusQuery }))),
2709
- React.createElement(antd.Col, { lg: { span: 8 }, md: { span: 8 } },
2783
+ React.createElement(antd.Col, { lg: { span: 9 }, md: { span: 10 } },
2710
2784
  React.createElement("div", { className: "filter-section" },
2711
2785
  React.createElement("div", { className: "search-filter" },
2712
2786
  React.createElement(antd.Checkbox, { className: "label", onChange: function (v) {
@@ -5693,5 +5767,6 @@ exports.getStageTagTypeMRV = getStageTagTypeMRV;
5693
5767
  exports.getStageTransferEnumVal = getStageTransferEnumVal;
5694
5768
  exports.getTransferStageTagType = getTransferStageTagType;
5695
5769
  exports.isBase64 = isBase64;
5770
+ exports.mitigationTypeList = mitigationTypeList;
5696
5771
  exports.sumArray = sumArray;
5697
5772
  //# sourceMappingURL=index.js.map