@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.
@@ -0,0 +1,30 @@
1
+ export declare enum MitigationTypes {
2
+ AGRICULTURE = "Agriculture",
3
+ BIOMASS_ENERGY = "BiomassEnergy",
4
+ CCS = "CCS",
5
+ CEMENT = "Cement",
6
+ COAL_MINE = "Coal/Mine",
7
+ EE_HOUSEHOLDS = "EEHouseholds",
8
+ EE_INDUSTRY = "EEIndustry",
9
+ EE_OWN_GENERATION = "EEOwnGeneration",
10
+ EE_SERVICE = "EEService",
11
+ EE_SUPPLY_SIDE = "EESupplySide",
12
+ ENERGY_DISTRIBUTION = "EnergyDistribution",
13
+ FORESTRY = "Forestry",
14
+ FOSSIL_FUEL = "FossilFuel",
15
+ FUGITIVE = "Fugitive",
16
+ GEOTHERMAL = "Geothermal",
17
+ HFC_PFCS_SF6 = "HFC_PFCs_SF6",
18
+ HYDRO = "Hydro",
19
+ LANDFILLS = "Landfills",
20
+ MARINE = "Marine",
21
+ METHANE_AVOIDANCE = "MethaneAvoidance",
22
+ N20 = "N20",
23
+ SOLAR = "Solar",
24
+ TRANSPORT = "Transport",
25
+ WIND = "Wind"
26
+ }
27
+ export declare const mitigationTypeList: {
28
+ value: string;
29
+ label: string;
30
+ }[];
@@ -1,6 +1,7 @@
1
1
  export * from "./Enums/company.management.columns.enum";
2
2
  export * from "./Enums/user.management.columns.enum";
3
3
  export * from "./Enums/programme.management.columns.enum";
4
+ export * from "./Enums/mitigation.types.enum";
4
5
  export * from "./Definitions/userLogin.definitions";
5
6
  export * from "./Definitions/userInformationContext.definitions";
6
7
  export * from "./Definitions/userForgotPassword.definitions";
package/dist/esm/index.js CHANGED
@@ -965,16 +965,16 @@ var AddNewCompanyComponent = function (props) {
965
965
  }); };
966
966
  var onUpdateCompany = function () { return __awaiter(void 0, void 0, void 0, function () {
967
967
  var formOneValues, values, logoBase64, logoUrls, response, error_3;
968
- var _a, _b, _c, _d, _e, _f;
969
- return __generator(this, function (_g) {
970
- switch (_g.label) {
968
+ var _a, _b, _c, _d, _e, _f, _g, _h;
969
+ return __generator(this, function (_j) {
970
+ switch (_j.label) {
971
971
  case 0:
972
972
  setLoading(true);
973
973
  formOneValues = formOne.getFieldsValue();
974
974
  formOneValues.phoneNo = formatPhoneNumberIntl(formOneValues.phoneNo);
975
- _g.label = 1;
975
+ _j.label = 1;
976
976
  case 1:
977
- _g.trys.push([1, 5, , 6]);
977
+ _j.trys.push([1, 5, , 6]);
978
978
  values = {};
979
979
  if (regionField) {
980
980
  values = {
@@ -997,9 +997,14 @@ var AddNewCompanyComponent = function (props) {
997
997
  companyRole: (_d = state === null || state === void 0 ? void 0 : state.record) === null || _d === void 0 ? void 0 : _d.companyRole,
998
998
  };
999
999
  }
1000
- if (((_e = state === null || state === void 0 ? void 0 : state.record) === null || _e === void 0 ? void 0 : _e.companyRole) !== CompanyRole$1.GOVERNMENT) {
1000
+ if (((_e = state === null || state === void 0 ? void 0 : state.record) === null || _e === void 0 ? void 0 : _e.companyRole) !== CompanyRole$1.GOVERNMENT &&
1001
+ ((_f = state === null || state === void 0 ? void 0 : state.record) === null || _f === void 0 ? void 0 : _f.companyRole) !== CompanyRole$1.MINISTRY) {
1001
1002
  values.taxId = formOneValues.taxId;
1002
1003
  }
1004
+ if (((_g = state === null || state === void 0 ? void 0 : state.record) === null || _g === void 0 ? void 0 : _g.companyRole) === CompanyRole$1.MINISTRY) {
1005
+ values.sectoralScope = formOneValues.sectoralScope;
1006
+ values.nameOfMinister = formOneValues.nameOfMinister;
1007
+ }
1003
1008
  if (formOneValues.website) {
1004
1009
  values.website = 'https://' + formOneValues.website;
1005
1010
  }
@@ -1008,15 +1013,15 @@ var AddNewCompanyComponent = function (props) {
1008
1013
  }
1009
1014
  if (!formOneValues.logo) return [3 /*break*/, 3];
1010
1015
  if (!(formOneValues.logo.length !== 0)) return [3 /*break*/, 3];
1011
- return [4 /*yield*/, getBase64((_f = formOneValues.logo[0]) === null || _f === void 0 ? void 0 : _f.originFileObj)];
1016
+ return [4 /*yield*/, getBase64((_h = formOneValues.logo[0]) === null || _h === void 0 ? void 0 : _h.originFileObj)];
1012
1017
  case 2:
1013
- logoBase64 = _g.sent();
1018
+ logoBase64 = _j.sent();
1014
1019
  logoUrls = logoBase64.split(',');
1015
1020
  values.logo = logoUrls[1];
1016
- _g.label = 3;
1021
+ _j.label = 3;
1017
1022
  case 3: return [4 /*yield*/, put('national/organisation/update', values)];
1018
1023
  case 4:
1019
- response = _g.sent();
1024
+ response = _j.sent();
1020
1025
  if (response.status === 200 || response.status === 201) {
1021
1026
  setUserInfo({
1022
1027
  companyLogo: response.data.logo,
@@ -1032,7 +1037,7 @@ var AddNewCompanyComponent = function (props) {
1032
1037
  setLoading(false);
1033
1038
  return [3 /*break*/, 6];
1034
1039
  case 5:
1035
- error_3 = _g.sent();
1040
+ error_3 = _j.sent();
1036
1041
  message.open({
1037
1042
  type: 'error',
1038
1043
  content: "".concat(t('errorInUpdatingCompany'), " ").concat(error_3.message),
@@ -1495,6 +1500,75 @@ var ProgrammeManagementColumns;
1495
1500
  ProgrammeManagementColumns["emissionReductionAchieved"] = "emissionReductionAchieved";
1496
1501
  })(ProgrammeManagementColumns || (ProgrammeManagementColumns = {}));
1497
1502
 
1503
+ var MitigationTypes;
1504
+ (function (MitigationTypes) {
1505
+ MitigationTypes["AGRICULTURE"] = "Agriculture";
1506
+ MitigationTypes["BIOMASS_ENERGY"] = "BiomassEnergy";
1507
+ MitigationTypes["CCS"] = "CCS";
1508
+ MitigationTypes["CEMENT"] = "Cement";
1509
+ MitigationTypes["COAL_MINE"] = "Coal/Mine";
1510
+ MitigationTypes["EE_HOUSEHOLDS"] = "EEHouseholds";
1511
+ MitigationTypes["EE_INDUSTRY"] = "EEIndustry";
1512
+ MitigationTypes["EE_OWN_GENERATION"] = "EEOwnGeneration";
1513
+ MitigationTypes["EE_SERVICE"] = "EEService";
1514
+ MitigationTypes["EE_SUPPLY_SIDE"] = "EESupplySide";
1515
+ MitigationTypes["ENERGY_DISTRIBUTION"] = "EnergyDistribution";
1516
+ MitigationTypes["FORESTRY"] = "Forestry";
1517
+ MitigationTypes["FOSSIL_FUEL"] = "FossilFuel";
1518
+ MitigationTypes["FUGITIVE"] = "Fugitive";
1519
+ MitigationTypes["GEOTHERMAL"] = "Geothermal";
1520
+ MitigationTypes["HFC_PFCS_SF6"] = "HFC_PFCs_SF6";
1521
+ MitigationTypes["HYDRO"] = "Hydro";
1522
+ MitigationTypes["LANDFILLS"] = "Landfills";
1523
+ MitigationTypes["MARINE"] = "Marine";
1524
+ MitigationTypes["METHANE_AVOIDANCE"] = "MethaneAvoidance";
1525
+ MitigationTypes["N20"] = "N20";
1526
+ MitigationTypes["SOLAR"] = "Solar";
1527
+ MitigationTypes["TRANSPORT"] = "Transport";
1528
+ MitigationTypes["WIND"] = "Wind";
1529
+ })(MitigationTypes || (MitigationTypes = {}));
1530
+ var mitigationTypeList = [
1531
+ { value: MitigationTypes.AGRICULTURE.valueOf(), label: "Agriculture" },
1532
+ { value: MitigationTypes.SOLAR.valueOf(), label: "Solar" },
1533
+ { value: MitigationTypes.BIOMASS_ENERGY.valueOf(), label: "Biomass energy" },
1534
+ { value: MitigationTypes.CCS.valueOf(), label: "CCS" },
1535
+ { value: MitigationTypes.CEMENT.valueOf(), label: "Cement" },
1536
+ {
1537
+ value: MitigationTypes.COAL_MINE.valueOf(),
1538
+ label: "Coal bed/mine methane",
1539
+ },
1540
+ { value: MitigationTypes.EE_HOUSEHOLDS.valueOf(), label: "EE households" },
1541
+ { value: MitigationTypes.EE_INDUSTRY.valueOf(), label: "EE industry" },
1542
+ {
1543
+ value: MitigationTypes.EE_OWN_GENERATION.valueOf(),
1544
+ label: "EE own generation",
1545
+ },
1546
+ { value: MitigationTypes.EE_SERVICE.valueOf(), label: "EE service" },
1547
+ { value: MitigationTypes.EE_SUPPLY_SIDE.valueOf(), label: "EE supply side" },
1548
+ {
1549
+ value: MitigationTypes.ENERGY_DISTRIBUTION.valueOf(),
1550
+ label: "Energy distribution",
1551
+ },
1552
+ { value: MitigationTypes.FORESTRY.valueOf(), label: "Forestry" },
1553
+ {
1554
+ value: MitigationTypes.FOSSIL_FUEL.valueOf(),
1555
+ label: "Fossil fuel switch",
1556
+ },
1557
+ { value: MitigationTypes.FUGITIVE.valueOf(), label: "Fugitive" },
1558
+ { value: MitigationTypes.GEOTHERMAL.valueOf(), label: "Geothermal" },
1559
+ { value: MitigationTypes.HFC_PFCS_SF6.valueOf(), label: "HFCs, PFCs, SF6" },
1560
+ { value: MitigationTypes.HYDRO.valueOf(), label: "Hydro" },
1561
+ { value: MitigationTypes.LANDFILLS.valueOf(), label: "Landfills" },
1562
+ { value: MitigationTypes.MARINE.valueOf(), label: "Marine" },
1563
+ {
1564
+ value: MitigationTypes.METHANE_AVOIDANCE.valueOf(),
1565
+ label: "Methane avoidance",
1566
+ },
1567
+ { value: MitigationTypes.N20.valueOf(), label: "N2O" },
1568
+ { value: MitigationTypes.TRANSPORT.valueOf(), label: "Transport" },
1569
+ { value: MitigationTypes.WIND.valueOf(), label: "Wind" },
1570
+ ];
1571
+
1498
1572
  var ConfigurationSettingsType;
1499
1573
  (function (ConfigurationSettingsType) {
1500
1574
  ConfigurationSettingsType[ConfigurationSettingsType["isTransferFrozen"] = 0] = "isTransferFrozen";
@@ -2682,11 +2756,11 @@ var ProgrammeManagementComponent = function (props) {
2682
2756
  React.createElement(Button, { type: "primary", size: "large", block: true, icon: React.createElement(PlusOutlined, null), onClick: onClickAddProgramme }, t("programme:addProgramme")))))),
2683
2757
  React.createElement("div", { className: "content-card" },
2684
2758
  React.createElement(Row, { className: "table-actions-section" },
2685
- React.createElement(Col, { lg: { span: 16 }, md: { span: 16 } },
2759
+ React.createElement(Col, { lg: { span: 15 }, md: { span: 14 } },
2686
2760
  React.createElement("div", { className: "action-bar" },
2687
2761
  React.createElement(Checkbox, { className: "all-check", disabled: loading, indeterminate: indeterminate, onChange: onCheckAllChange, checked: checkAll, defaultChecked: true }, t("programme:all")),
2688
2762
  React.createElement(Checkbox.Group, { disabled: loading, options: statusOptions, defaultValue: statusOptions.map(function (e) { return e.value; }), value: selectedStatus, onChange: onStatusQuery }))),
2689
- React.createElement(Col, { lg: { span: 8 }, md: { span: 8 } },
2763
+ React.createElement(Col, { lg: { span: 9 }, md: { span: 10 } },
2690
2764
  React.createElement("div", { className: "filter-section" },
2691
2765
  React.createElement("div", { className: "search-filter" },
2692
2766
  React.createElement(Checkbox, { className: "label", onChange: function (v) {
@@ -5637,5 +5711,5 @@ var StasticCard = function (props) {
5637
5711
  updatedDate !== '0' && React.createElement("div", { className: "updated-on" }, updatedDate)))));
5638
5712
  };
5639
5713
 
5640
- export { AddNewCompanyComponent, AddNewUserComponent, BaseEntity, Company, CompanyManagementColumns, CompanyManagementComponent, CompanyProfileComponent, CompanyRole$1 as CompanyRole, ConfigurationSettingsType, CreditTransferStage, LegendItem, Loading, MapComponent, MapTypes, MapboxComponent, ProfileIcon, ProgrammeEntity, ProgrammeManagementColumns, ProgrammeManagementComponent, ProgrammeStage, ProgrammeStageMRV, ProgrammeTransfer, ProgrammeViewComponent, RetireType, Role, RoleIcon, SectoralScope, StasticCard, TxType, TypeOfMitigation, UnitField, User, UserManagementColumns, UserManagementComponent, UserProfileComponent, addCommSep, addCommSepRound, addRoundNumber, addSpaces, getCompanyBgColor, getCreditStageVal, getFinancialFields, getGeneralFields, getRetirementTypeString, getStageEnumVal, getStageTagType, getStageTagTypeMRV, getStageTransferEnumVal, getTransferStageTagType, isBase64, sumArray };
5714
+ export { AddNewCompanyComponent, AddNewUserComponent, BaseEntity, Company, CompanyManagementColumns, CompanyManagementComponent, CompanyProfileComponent, CompanyRole$1 as CompanyRole, ConfigurationSettingsType, CreditTransferStage, LegendItem, Loading, MapComponent, MapTypes, MapboxComponent, MitigationTypes, ProfileIcon, ProgrammeEntity, ProgrammeManagementColumns, ProgrammeManagementComponent, ProgrammeStage, ProgrammeStageMRV, ProgrammeTransfer, ProgrammeViewComponent, RetireType, Role, RoleIcon, SectoralScope, StasticCard, TxType, TypeOfMitigation, UnitField, User, UserManagementColumns, UserManagementComponent, UserProfileComponent, addCommSep, addCommSepRound, addRoundNumber, addSpaces, getCompanyBgColor, getCreditStageVal, getFinancialFields, getGeneralFields, getRetirementTypeString, getStageEnumVal, getStageTagType, getStageTagTypeMRV, getStageTransferEnumVal, getTransferStageTagType, isBase64, mitigationTypeList, sumArray };
5641
5715
  //# sourceMappingURL=index.js.map