@undp/carbon-library 1.0.66 → 1.0.67

Sign up to get free protection for your applications and to get access to all the features.
package/dist/cjs/index.js CHANGED
@@ -13492,20 +13492,27 @@ var maximumImageSize = process.env.REACT_APP_MAXIMUM_FILE_SIZE
13492
13492
  : 5000000;
13493
13493
  var sectoralScopes = {
13494
13494
  Energy: [
13495
- 'Energy Industries (Renewable – / Non-Renewable Sources)',
13496
- 'Energy Distribution',
13497
- 'Energy Demand',
13495
+ "Energy Industries (Renewable – / Non-Renewable Sources)",
13496
+ "Energy Distribution",
13497
+ "Energy Demand",
13498
13498
  ],
13499
- Transport: ['Transport'],
13500
- Manufacturing: ['Manufacturing Industries', 'Chemical Industries', 'Metal Production'],
13501
- Forestry: ['Afforestation and Reforestation'],
13502
- Waste: ['Waste Handling and Disposal', 'Fugitive Emissions From Fuels (Solid, Oil and Gas)'],
13503
- Agriculture: ['Agriculture'],
13499
+ Transport: ["Transport"],
13500
+ Manufacturing: [
13501
+ "Manufacturing Industries",
13502
+ "Chemical Industries",
13503
+ "Metal Production",
13504
+ ],
13505
+ Forestry: ["Afforestation and Reforestation"],
13506
+ Waste: [
13507
+ "Waste Handling and Disposal",
13508
+ "Fugitive Emissions From Fuels (Solid, Oil and Gas)",
13509
+ ],
13510
+ Agriculture: ["Agriculture"],
13504
13511
  Other: [
13505
- 'Mining/Mineral Production',
13506
- 'Construction',
13507
- 'Fugitive Emissions From Production and Consumption of Halocarbons and Sulphur Hexafluoride',
13508
- 'Solvent Use',
13512
+ "Mining/Mineral Production",
13513
+ "Construction",
13514
+ "Fugitive Emissions From Production and Consumption of Halocarbons and Sulphur Hexafluoride",
13515
+ "Solvent Use",
13509
13516
  ],
13510
13517
  };
13511
13518
  var ProgrammeCreationComponent = function (props) {
@@ -13528,12 +13535,12 @@ var ProgrammeCreationComponent = function (props) {
13528
13535
  var _m = React.useState(), includedInNAP = _m[0], setIncludedInNAP = _m[1];
13529
13536
  var _o = React.useState([]), countries = _o[0], setCountries = _o[1];
13530
13537
  var _p = React.useState([]), organisationsList = _p[0], setOrganisationList = _p[1];
13531
- var _q = React.useState(''), userOrgTaxId = _q[0], setUserOrgTaxId = _q[1];
13538
+ var _q = React.useState(""), userOrgTaxId = _q[0], setUserOrgTaxId = _q[1];
13532
13539
  var _r = React.useState([]), regionsList = _r[0], setRegionsList = _r[1];
13533
13540
  var _s = React.useState(); _s[0]; var setProgrammeDetailsObj = _s[1];
13534
13541
  var _t = React.useState(), selectedOrgs = _t[0], setSelectedOrgs = _t[1];
13535
13542
  var _u = React.useState(false), ownershipPercentageValidation = _u[0], setOwnershipPercentageValidation = _u[1];
13536
- var _v = React.useState(''), selectedSector = _v[0], setSelectedSector = _v[1];
13543
+ var _v = React.useState(""), selectedSector = _v[0], setSelectedSector = _v[1];
13537
13544
  var _w = React.useState([]); _w[0]; var setMinistrySectoralScope = _w[1];
13538
13545
  var _x = React.useState([]), availableSecoralScope = _x[0], setAvailableSectoralScope = _x[1];
13539
13546
  var _y = React.useState([]), availableSectar = _y[0], setAvailableSectar = _y[1];
@@ -13572,7 +13579,7 @@ var ProgrammeCreationComponent = function (props) {
13572
13579
  _a.label = 1;
13573
13580
  case 1:
13574
13581
  _a.trys.push([1, 3, 4, 5]);
13575
- return [4 /*yield*/, get('national/organisation/countries')];
13582
+ return [4 /*yield*/, get("national/organisation/countries")];
13576
13583
  case 2:
13577
13584
  response = _a.sent();
13578
13585
  if (response.data) {
@@ -13581,7 +13588,7 @@ var ProgrammeCreationComponent = function (props) {
13581
13588
  return [3 /*break*/, 5];
13582
13589
  case 3:
13583
13590
  error_1 = _a.sent();
13584
- console.log('Error in getting country list', error_1);
13591
+ console.log("Error in getting country list", error_1);
13585
13592
  return [3 /*break*/, 5];
13586
13593
  case 4:
13587
13594
  setLoadingList(false);
@@ -13599,14 +13606,14 @@ var ProgrammeCreationComponent = function (props) {
13599
13606
  _a.label = 1;
13600
13607
  case 1:
13601
13608
  _a.trys.push([1, 3, 4, 5]);
13602
- return [4 /*yield*/, post('national/organisation/regions', {
13609
+ return [4 /*yield*/, post("national/organisation/regions", {
13603
13610
  page: 1,
13604
13611
  size: 100,
13605
13612
  filterAnd: [
13606
13613
  {
13607
- key: 'lang',
13608
- operation: '=',
13609
- value: 'en',
13614
+ key: "lang",
13615
+ operation: "=",
13616
+ value: "en",
13610
13617
  },
13611
13618
  ],
13612
13619
  })];
@@ -13614,12 +13621,12 @@ var ProgrammeCreationComponent = function (props) {
13614
13621
  response = _a.sent();
13615
13622
  if (response.data) {
13616
13623
  regionNames = response.data.map(function (item) { return item.regionName; });
13617
- setRegionsList(__spreadArray(['National'], regionNames, true));
13624
+ setRegionsList(__spreadArray(["National"], regionNames, true));
13618
13625
  }
13619
13626
  return [3 /*break*/, 5];
13620
13627
  case 3:
13621
13628
  error_2 = _a.sent();
13622
- console.log('Error in getting regions list', error_2);
13629
+ console.log("Error in getting regions list", error_2);
13623
13630
  return [3 /*break*/, 5];
13624
13631
  case 4:
13625
13632
  setLoadingList(false);
@@ -13637,13 +13644,13 @@ var ProgrammeCreationComponent = function (props) {
13637
13644
  _a.label = 1;
13638
13645
  case 1:
13639
13646
  _a.trys.push([1, 3, 4, 5]);
13640
- return [4 /*yield*/, post('national/organisation/queryNames', {
13647
+ return [4 /*yield*/, post("national/organisation/queryNames", {
13641
13648
  page: 1,
13642
13649
  size: 100,
13643
13650
  filterAnd: [
13644
13651
  {
13645
- key: 'companyRole',
13646
- operation: '=',
13652
+ key: "companyRole",
13653
+ operation: "=",
13647
13654
  value: exports.CompanyRole.PROGRAMME_DEVELOPER,
13648
13655
  },
13649
13656
  ],
@@ -13659,7 +13666,7 @@ var ProgrammeCreationComponent = function (props) {
13659
13666
  return [3 /*break*/, 5];
13660
13667
  case 3:
13661
13668
  error_3 = _a.sent();
13662
- console.log('Error in getting organisation list', error_3);
13669
+ console.log("Error in getting organisation list", error_3);
13663
13670
  return [3 /*break*/, 5];
13664
13671
  case 4:
13665
13672
  setLoadingList(false);
@@ -13678,13 +13685,13 @@ var ProgrammeCreationComponent = function (props) {
13678
13685
  _k.label = 1;
13679
13686
  case 1:
13680
13687
  _k.trys.push([1, 3, , 4]);
13681
- return [4 /*yield*/, post('national/user/query', {
13688
+ return [4 /*yield*/, post("national/user/query", {
13682
13689
  page: 1,
13683
13690
  size: 10,
13684
13691
  filterAnd: [
13685
13692
  {
13686
- key: 'id',
13687
- operation: '=',
13693
+ key: "id",
13694
+ operation: "=",
13688
13695
  value: userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.id,
13689
13696
  },
13690
13697
  ],
@@ -13719,19 +13726,23 @@ var ProgrammeCreationComponent = function (props) {
13719
13726
  }
13720
13727
  });
13721
13728
  });
13722
- setAvailableSectar(__spreadArray(__spreadArray([], sectors_1, true), ['Health', 'Education', 'Hospitality'], false));
13729
+ setAvailableSectar(__spreadArray(__spreadArray([], sectors_1, true), [
13730
+ "Health",
13731
+ "Education",
13732
+ "Hospitality",
13733
+ ], false));
13723
13734
  }
13724
13735
  }
13725
13736
  setLoading(false);
13726
13737
  return [3 /*break*/, 4];
13727
13738
  case 3:
13728
13739
  error_4 = _k.sent();
13729
- console.log('Error in getting users', error_4);
13740
+ console.log("Error in getting users", error_4);
13730
13741
  antd.message.open({
13731
- type: 'error',
13742
+ type: "error",
13732
13743
  content: error_4.message,
13733
13744
  duration: 3,
13734
- style: { textAlign: 'right', marginRight: 15, marginTop: 10 },
13745
+ style: { textAlign: "right", marginRight: 15, marginTop: 10 },
13735
13746
  });
13736
13747
  setLoading(false);
13737
13748
  return [3 /*break*/, 4];
@@ -13774,13 +13785,13 @@ var ProgrammeCreationComponent = function (props) {
13774
13785
  (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) !== exports.CompanyRole.MINISTRY
13775
13786
  ? ownershipPercentage === null || ownershipPercentage === void 0 ? void 0 : ownershipPercentage.slice(1).map(function (item) { return item.organisation; })
13776
13787
  : ownershipPercentage === null || ownershipPercentage === void 0 ? void 0 : ownershipPercentage.map(function (item) { return item.organisation; });
13777
- logoBase64 = '';
13788
+ logoBase64 = "";
13778
13789
  logoUrls = [];
13779
13790
  if (!(((_a = values === null || values === void 0 ? void 0 : values.designDocument) === null || _a === void 0 ? void 0 : _a.length) > 0)) return [3 /*break*/, 2];
13780
13791
  return [4 /*yield*/, getBase64((_b = values === null || values === void 0 ? void 0 : values.designDocument[0]) === null || _b === void 0 ? void 0 : _b.originFileObj)];
13781
13792
  case 1:
13782
13793
  logoBase64 = _c.sent();
13783
- logoUrls = logoBase64 === null || logoBase64 === void 0 ? void 0 : logoBase64.split(',');
13794
+ logoUrls = logoBase64 === null || logoBase64 === void 0 ? void 0 : logoBase64.split(",");
13784
13795
  _c.label = 2;
13785
13796
  case 2:
13786
13797
  propTaxIds = (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) !== exports.CompanyRole.GOVERNMENT &&
@@ -13789,19 +13800,19 @@ var ProgrammeCreationComponent = function (props) {
13789
13800
  duplicateIds = new Set(propTaxIds).size !== propTaxIds.length;
13790
13801
  if (totalPercentage !== 100) {
13791
13802
  antd.message.open({
13792
- type: 'error',
13793
- content: t('addProgramme:proponentPercentValidation'),
13803
+ type: "error",
13804
+ content: t("addProgramme:proponentPercentValidation"),
13794
13805
  duration: 4,
13795
- style: { textAlign: 'right', marginRight: 15, marginTop: 10 },
13806
+ style: { textAlign: "right", marginRight: 15, marginTop: 10 },
13796
13807
  });
13797
13808
  setLoading(false);
13798
13809
  }
13799
13810
  else if (duplicateIds) {
13800
13811
  antd.message.open({
13801
- type: 'error',
13802
- content: t('addProgramme:duplicateOrg'),
13812
+ type: "error",
13813
+ content: t("addProgramme:duplicateOrg"),
13803
13814
  duration: 4,
13804
- style: { textAlign: 'right', marginRight: 15, marginTop: 10 },
13815
+ style: { textAlign: "right", marginRight: 15, marginTop: 10 },
13805
13816
  });
13806
13817
  setLoading(false);
13807
13818
  }
@@ -13811,14 +13822,16 @@ var ProgrammeCreationComponent = function (props) {
13811
13822
  externalId: values === null || values === void 0 ? void 0 : values.externalId,
13812
13823
  sectoralScope: values === null || values === void 0 ? void 0 : values.sectoralScope,
13813
13824
  sector: values === null || values === void 0 ? void 0 : values.sector,
13814
- startTime: moment(values === null || values === void 0 ? void 0 : values.startTime).startOf('day').unix(),
13815
- endTime: moment(values === null || values === void 0 ? void 0 : values.endTime).endOf('day').unix(),
13825
+ startTime: moment(values === null || values === void 0 ? void 0 : values.startTime).startOf("day").unix(),
13826
+ endTime: moment(values === null || values === void 0 ? void 0 : values.endTime).endOf("day").unix(),
13816
13827
  proponentTaxVatId: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) !== exports.CompanyRole.GOVERNMENT &&
13817
13828
  (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) !== exports.CompanyRole.MINISTRY
13818
13829
  ? __spreadArray([userOrgTaxId], proponentTxIds, true) : proponentTxIds,
13819
13830
  proponentPercentage: proponentPercentages,
13820
13831
  programmeProperties: __assign(__assign(__assign({ buyerCountryEligibility: values === null || values === void 0 ? void 0 : values.buyerCountryEligibility, geographicalLocation: values === null || values === void 0 ? void 0 : values.geographicalLocation, greenHouseGasses: values === null || values === void 0 ? void 0 : values.greenHouseGasses }, ((values === null || values === void 0 ? void 0 : values.ndcScope) !== undefined &&
13821
- (values === null || values === void 0 ? void 0 : values.ndcScope) !== null && { ndcScope: (values === null || values === void 0 ? void 0 : values.ndcScope) === 'true' ? true : false })), (includedInNDC !== undefined &&
13832
+ (values === null || values === void 0 ? void 0 : values.ndcScope) !== null && {
13833
+ ndcScope: (values === null || values === void 0 ? void 0 : values.ndcScope) === "true" ? true : false,
13834
+ })), (includedInNDC !== undefined &&
13822
13835
  includedInNDC !== null && { includedInNdc: includedInNDC })), (includedInNAP !== undefined &&
13823
13836
  includedInNAP !== null && { includedInNap: includedInNAP })),
13824
13837
  };
@@ -13842,29 +13855,28 @@ var ProgrammeCreationComponent = function (props) {
13842
13855
  _a.label = 1;
13843
13856
  case 1:
13844
13857
  _a.trys.push([1, 3, 4, 5]);
13845
- return [4 /*yield*/, post('national/programme/create', payload)];
13858
+ return [4 /*yield*/, post("national/programme/create", payload)];
13846
13859
  case 2:
13847
13860
  response = _a.sent();
13848
- console.log('Programme creation -> ', response);
13849
- if ((response === null || response === void 0 ? void 0 : response.statusText) === 'SUCCESS') {
13861
+ console.log("Programme creation -> ", response);
13862
+ if ((response === null || response === void 0 ? void 0 : response.statusText) === "SUCCESS") {
13850
13863
  antd.message.open({
13851
- type: 'success',
13852
- content: t('addProgramme:programmeCreationSuccess'),
13864
+ type: "success",
13865
+ content: t("addProgramme:programmeCreationSuccess"),
13853
13866
  duration: 4,
13854
- style: { textAlign: 'right', marginRight: 15, marginTop: 10 },
13867
+ style: { textAlign: "right", marginRight: 15, marginTop: 10 },
13855
13868
  });
13856
13869
  }
13857
- //navigate('/programmeManagement/view');
13858
13870
  onNavigateToProgrammeView();
13859
13871
  return [3 /*break*/, 5];
13860
13872
  case 3:
13861
13873
  error_5 = _a.sent();
13862
- console.log('Error in programme creation - ', error_5);
13874
+ console.log("Error in programme creation - ", error_5);
13863
13875
  antd.message.open({
13864
- type: 'error',
13876
+ type: "error",
13865
13877
  content: error_5 === null || error_5 === void 0 ? void 0 : error_5.message,
13866
13878
  duration: 4,
13867
- style: { textAlign: 'right', marginRight: 15, marginTop: 10 },
13879
+ style: { textAlign: "right", marginRight: 15, marginTop: 10 },
13868
13880
  });
13869
13881
  return [3 /*break*/, 5];
13870
13882
  case 4:
@@ -13898,10 +13910,10 @@ var ProgrammeCreationComponent = function (props) {
13898
13910
  (allValues === null || allValues === void 0 ? void 0 : allValues.estimatedProgrammeCostUSD) !== null &&
13899
13911
  (allValues === null || allValues === void 0 ? void 0 : allValues.estimatedProgrammeCostUSD) > 0) {
13900
13912
  var minViableCarbonPrice = Number((allValues === null || allValues === void 0 ? void 0 : allValues.estimatedProgrammeCostUSD) / (allValues === null || allValues === void 0 ? void 0 : allValues.creditEst)).toFixed(2);
13901
- formTwo.setFieldValue('minViableCarbonPrice', addCommSepRound(minViableCarbonPrice));
13913
+ formTwo.setFieldValue("minViableCarbonPrice", addCommSepRound(minViableCarbonPrice));
13902
13914
  }
13903
13915
  else {
13904
- formTwo.setFieldValue('minViableCarbonPrice', '');
13916
+ formTwo.setFieldValue("minViableCarbonPrice", "");
13905
13917
  }
13906
13918
  };
13907
13919
  var onChangeNDCScope = function (event) {
@@ -13918,7 +13930,7 @@ var ProgrammeCreationComponent = function (props) {
13918
13930
  var onClickNDCScope = function (value) {
13919
13931
  if (value === ndcScopeValue) {
13920
13932
  setNdcScopeValue(null);
13921
- formOne.setFieldValue('ndcScope', null);
13933
+ formOne.setFieldValue("ndcScope", null);
13922
13934
  setNdcScopeChanged(undefined);
13923
13935
  setIncludedInNDC(undefined);
13924
13936
  }
@@ -13940,41 +13952,43 @@ var ProgrammeCreationComponent = function (props) {
13940
13952
  }
13941
13953
  };
13942
13954
  var onChangeGeoLocation = function (values) {
13943
- if (values.includes('National')) {
13955
+ if (values.includes("National")) {
13944
13956
  var buyerCountryValues = regionsList;
13945
- var newBuyerValues = buyerCountryValues === null || buyerCountryValues === void 0 ? void 0 : buyerCountryValues.filter(function (item) { return item !== 'National'; });
13946
- formOne.setFieldValue('geographicalLocation', __spreadArray([], newBuyerValues, true));
13957
+ var newBuyerValues = buyerCountryValues === null || buyerCountryValues === void 0 ? void 0 : buyerCountryValues.filter(function (item) { return item !== "National"; });
13958
+ formOne.setFieldValue("geographicalLocation", __spreadArray([], newBuyerValues, true));
13947
13959
  }
13948
13960
  };
13949
13961
  var onInCludedNAPChange = function (event) {
13950
13962
  var _a, _b;
13951
- if (((_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.value) === 'inNAP') {
13963
+ if (((_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.value) === "inNAP") {
13952
13964
  setIncludedInNAP(true);
13953
13965
  }
13954
- else if (((_b = event === null || event === void 0 ? void 0 : event.target) === null || _b === void 0 ? void 0 : _b.value) === 'notInNAP') {
13966
+ else if (((_b = event === null || event === void 0 ? void 0 : event.target) === null || _b === void 0 ? void 0 : _b.value) === "notInNAP") {
13955
13967
  setIncludedInNAP(false);
13956
13968
  }
13957
13969
  };
13958
13970
  var onInCludedNDCChange = function (event) {
13959
13971
  var _a, _b;
13960
- if (((_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.value) === 'inNDC') {
13972
+ if (((_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.value) === "inNDC") {
13961
13973
  setIncludedInNDC(true);
13962
13974
  }
13963
- else if (((_b = event === null || event === void 0 ? void 0 : event.target) === null || _b === void 0 ? void 0 : _b.value) === 'notInNDC') {
13975
+ else if (((_b = event === null || event === void 0 ? void 0 : event.target) === null || _b === void 0 ? void 0 : _b.value) === "notInNDC") {
13964
13976
  setIncludedInNDC(false);
13965
13977
  }
13966
13978
  };
13967
13979
  var onChangeStepOne = function (changedValues, allValues) {
13968
13980
  var _a, _b;
13969
13981
  var selectedCompanies = (_a = allValues === null || allValues === void 0 ? void 0 : allValues.ownershipPercentage) === null || _a === void 0 ? void 0 : _a.map(function (org) { return org === null || org === void 0 ? void 0 : org.organisation; });
13970
- var orgPercentValidation = ((_b = allValues === null || allValues === void 0 ? void 0 : allValues.ownershipPercentage[0]) === null || _b === void 0 ? void 0 : _b.proponentPercentage) === false ? true : false;
13982
+ var orgPercentValidation = ((_b = allValues === null || allValues === void 0 ? void 0 : allValues.ownershipPercentage[0]) === null || _b === void 0 ? void 0 : _b.proponentPercentage) === false
13983
+ ? true
13984
+ : false;
13971
13985
  setOwnershipPercentageValidation(orgPercentValidation);
13972
13986
  var uniqueOrgs = new Set(selectedCompanies);
13973
13987
  setSelectedOrgs(__spreadArray([], uniqueOrgs, true));
13974
13988
  };
13975
13989
  var checkOrgPercentageValidation = function () {
13976
13990
  var _a;
13977
- var orgPercentage = formOne.getFieldValue('ownershipPercentage');
13991
+ var orgPercentage = formOne.getFieldValue("ownershipPercentage");
13978
13992
  var orgPercentValidation = ((_a = orgPercentage[0]) === null || _a === void 0 ? void 0 : _a.proponentPercentage) === false ? true : false;
13979
13993
  setOwnershipPercentageValidation(orgPercentValidation);
13980
13994
  };
@@ -13986,34 +14000,38 @@ var ProgrammeCreationComponent = function (props) {
13986
14000
  }, []);
13987
14001
  return (React.createElement("div", { className: "add-programme-main-container" },
13988
14002
  React.createElement("div", { className: "title-container" },
13989
- React.createElement("div", { className: "main" }, isUpdate ? t('addProgramme:editProgramme') : t('addProgramme:addProgramme')),
13990
- React.createElement("div", { className: "sub" }, isUpdate ? t('addProgramme:editProgrammeSub') : t('addProgramme:addProgrammeSub'))),
14003
+ React.createElement("div", { className: "main" }, isUpdate
14004
+ ? t("addProgramme:editProgramme")
14005
+ : t("addProgramme:addProgramme")),
14006
+ React.createElement("div", { className: "sub" }, isUpdate
14007
+ ? t("addProgramme:editProgrammeSub")
14008
+ : t("addProgramme:addProgrammeSub"))),
13991
14009
  React.createElement("div", { className: "adding-section" },
13992
14010
  React.createElement("div", { className: "form-section" },
13993
14011
  React.createElement(antd.Steps, { progressDot: true, direction: "vertical", current: current, items: [
13994
14012
  {
13995
14013
  title: (React.createElement("div", { className: "step-title-container" },
13996
14014
  React.createElement("div", { className: "step-count" }, "01"),
13997
- React.createElement("div", { className: "title" }, t('addProgramme:addProgramme1')))),
14015
+ React.createElement("div", { className: "title" }, t("addProgramme:addProgramme1")))),
13998
14016
  description: current === 0 && (React.createElement("div", { className: "programme-details-form-container" },
13999
14017
  React.createElement("div", { className: "programme-details-form" },
14000
14018
  React.createElement(antd.Form, { labelCol: { span: 20 }, wrapperCol: { span: 24 }, name: "programme-details", className: "programme-details-form", layout: "vertical", requiredMark: true, form: formOne, onFinish: onFinishStepOne, onValuesChange: onChangeStepOne },
14001
14019
  React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
14002
14020
  React.createElement(antd.Col, { xl: 12, md: 24 },
14003
14021
  React.createElement("div", { className: "details-part-one" },
14004
- React.createElement(antd.Form.Item, { label: t('addProgramme:title'), name: "title", initialValue: (_a = state === null || state === void 0 ? void 0 : state.record) === null || _a === void 0 ? void 0 : _a.name, rules: [
14022
+ React.createElement(antd.Form.Item, { label: t("addProgramme:title"), name: "title", initialValue: (_a = state === null || state === void 0 ? void 0 : state.record) === null || _a === void 0 ? void 0 : _a.name, rules: [
14005
14023
  {
14006
14024
  required: true,
14007
- message: '',
14025
+ message: "",
14008
14026
  },
14009
14027
  {
14010
14028
  validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
14011
14029
  return __generator(this, function (_a) {
14012
- if (String(value).trim() === '' ||
14030
+ if (String(value).trim() === "" ||
14013
14031
  String(value).trim() === undefined ||
14014
14032
  value === null ||
14015
14033
  value === undefined) {
14016
- throw new Error("".concat(t('addProgramme:title'), " ").concat(t('isRequired')));
14034
+ throw new Error("".concat(t("addProgramme:title"), " ").concat(t("isRequired")));
14017
14035
  }
14018
14036
  return [2 /*return*/];
14019
14037
  });
@@ -14021,34 +14039,35 @@ var ProgrammeCreationComponent = function (props) {
14021
14039
  },
14022
14040
  ] },
14023
14041
  React.createElement(antd.Input, { size: "large" })),
14024
- React.createElement(antd.Form.Item, { wrapperCol: { span: 13 }, label: t('addProgramme:sector'), name: "sector", rules: [
14042
+ React.createElement(antd.Form.Item, { wrapperCol: { span: 13 }, label: t("addProgramme:sector"), name: "sector", rules: [
14025
14043
  {
14026
14044
  required: true,
14027
- message: "".concat(t('addProgramme:sector'), " ").concat(t('isRequired')),
14045
+ message: "".concat(t("addProgramme:sector"), " ").concat(t("isRequired")),
14028
14046
  },
14029
14047
  ] },
14030
- React.createElement(antd.Select, { size: "large", onChange: onChangeSector }, (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.MINISTRY
14048
+ React.createElement(antd.Select, { size: "large", onChange: onChangeSector }, (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
14049
+ exports.CompanyRole.MINISTRY
14031
14050
  ? availableSectar === null || availableSectar === void 0 ? void 0 : availableSectar.map(function (sector) { return (React.createElement(antd.Select.Option, { value: sector }, sector)); })
14032
14051
  : Object.values(exports.Sector).map(function (sector) { return (React.createElement(antd.Select.Option, { value: sector }, sector)); }))),
14033
- React.createElement(antd.Form.Item, { wrapperCol: { span: 13 }, label: t('addProgramme:startTime'), name: "startTime", rules: [
14052
+ React.createElement(antd.Form.Item, { wrapperCol: { span: 13 }, label: t("addProgramme:startTime"), name: "startTime", rules: [
14034
14053
  {
14035
14054
  required: true,
14036
- message: '',
14055
+ message: "",
14037
14056
  },
14038
14057
  {
14039
14058
  validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
14040
14059
  var endTime;
14041
14060
  return __generator(this, function (_a) {
14042
- if (String(value).trim() === '' ||
14061
+ if (String(value).trim() === "" ||
14043
14062
  String(value).trim() === undefined ||
14044
14063
  value === null ||
14045
14064
  value === undefined) {
14046
- throw new Error("".concat(t('addProgramme:startTime'), " ").concat(t('isRequired')));
14065
+ throw new Error("".concat(t("addProgramme:startTime"), " ").concat(t("isRequired")));
14047
14066
  }
14048
14067
  else {
14049
- endTime = formOne.getFieldValue('endTime');
14068
+ endTime = formOne.getFieldValue("endTime");
14050
14069
  if (endTime && value >= endTime) {
14051
- throw new Error("".concat(t('addProgramme:endTimeVal')));
14070
+ throw new Error("".concat(t("addProgramme:endTimeVal")));
14052
14071
  }
14053
14072
  }
14054
14073
  return [2 /*return*/];
@@ -14057,12 +14076,12 @@ var ProgrammeCreationComponent = function (props) {
14057
14076
  },
14058
14077
  ] },
14059
14078
  React.createElement(antd.DatePicker, { size: "large", disabledDate: function (currentDate) {
14060
- return currentDate < moment().startOf('day');
14079
+ return currentDate < moment().startOf("day");
14061
14080
  } })),
14062
- React.createElement(antd.Form.Item, { wrapperCol: { span: 13 }, label: t('addProgramme:ghgCovered'), name: "greenHouseGasses", rules: [
14081
+ React.createElement(antd.Form.Item, { wrapperCol: { span: 13 }, label: t("addProgramme:ghgCovered"), name: "greenHouseGasses", rules: [
14063
14082
  {
14064
14083
  required: true,
14065
- message: "".concat(t('addProgramme:ghgCovered'), " ").concat(t('isRequired')),
14084
+ message: "".concat(t("addProgramme:ghgCovered"), " ").concat(t("isRequired")),
14066
14085
  },
14067
14086
  ] },
14068
14087
  React.createElement(antd.Select, { size: "large", mode: "multiple", maxTagCount: 2, allowClear: true },
@@ -14085,10 +14104,10 @@ var ProgrammeCreationComponent = function (props) {
14085
14104
  React.createElement(antd.Select.Option, { value: "SF6" },
14086
14105
  "SF",
14087
14106
  React.createElement("sub", null, "6")))),
14088
- React.createElement(antd.Form.Item, { label: t('addProgramme:designDoc'), name: "designDocument", valuePropName: "fileList", getValueFromEvent: normFile, required: true, rules: [
14107
+ React.createElement(antd.Form.Item, { label: t("addProgramme:designDoc"), name: "designDocument", valuePropName: "fileList", getValueFromEvent: normFile, required: true, rules: [
14089
14108
  {
14090
14109
  required: true,
14091
- message: "".concat(t('addProgramme:designDoc'), " ").concat(t('addProgramme:isRequired')),
14110
+ message: "".concat(t("addProgramme:designDoc"), " ").concat(t("addProgramme:isRequired")),
14092
14111
  },
14093
14112
  {
14094
14113
  validator: function (rule, file) { return __awaiter(void 0, void 0, void 0, function () {
@@ -14097,15 +14116,15 @@ var ProgrammeCreationComponent = function (props) {
14097
14116
  return __generator(this, function (_c) {
14098
14117
  if ((file === null || file === void 0 ? void 0 : file.length) > 0) {
14099
14118
  isCorrectFormat = false;
14100
- if (((_a = file[0]) === null || _a === void 0 ? void 0 : _a.type) === 'application/pdf') {
14119
+ if (((_a = file[0]) === null || _a === void 0 ? void 0 : _a.type) === "application/pdf") {
14101
14120
  isCorrectFormat = true;
14102
14121
  }
14103
14122
  if (!isCorrectFormat) {
14104
- throw new Error("".concat(t('addProgramme:invalidFileFormat')));
14123
+ throw new Error("".concat(t("addProgramme:invalidFileFormat")));
14105
14124
  }
14106
14125
  else if (((_b = file[0]) === null || _b === void 0 ? void 0 : _b.size) > maximumImageSize) {
14107
14126
  // default size format of files would be in bytes -> 1MB = 1000000bytes
14108
- throw new Error("".concat(t('common:maxSizeVal')));
14127
+ throw new Error("".concat(t("common:maxSizeVal")));
14109
14128
  }
14110
14129
  }
14111
14130
  return [2 /*return*/];
@@ -14119,7 +14138,7 @@ var ProgrammeCreationComponent = function (props) {
14119
14138
  // defaultFileList={fileList}
14120
14139
  maxCount: 1 },
14121
14140
  React.createElement(antd.Button, { className: "upload-doc", size: "large", icon: React.createElement(icons.UploadOutlined, null) }, "Upload"))),
14122
- React.createElement(antd.Form.Item, { label: t('addProgramme:buyerCountryEligibility'), name: "buyerCountryEligibility", initialValue: (_b = state === null || state === void 0 ? void 0 : state.record) === null || _b === void 0 ? void 0 : _b.name, rules: [
14141
+ React.createElement(antd.Form.Item, { label: t("addProgramme:buyerCountryEligibility"), name: "buyerCountryEligibility", initialValue: (_b = state === null || state === void 0 ? void 0 : state.record) === null || _b === void 0 ? void 0 : _b.name, rules: [
14123
14142
  {
14124
14143
  required: false,
14125
14144
  },
@@ -14127,16 +14146,19 @@ var ProgrammeCreationComponent = function (props) {
14127
14146
  React.createElement(antd.Select, { size: "large", loading: loadingList }, countries.map(function (country) { return (React.createElement(antd.Select.Option, { key: country.alpha2, value: country.alpha2 }, country.name)); }))),
14128
14147
  React.createElement(antd.Form.List, { name: "ownershipPercentage", initialValue: initialOrganisationOwnershipValues }, function (fields, _a) {
14129
14148
  var add = _a.add, remove = _a.remove;
14130
- return (React.createElement("div", { className: "space-container", style: { width: '100%' } },
14149
+ return (React.createElement("div", { className: "space-container", style: { width: "100%" } },
14131
14150
  fields.map(function (_a) {
14132
14151
  var key = _a.key, name = _a.name, restField = __rest(_a, ["key", "name"]);
14133
- return (React.createElement(antd.Space, { wrap: true, key: key, style: { display: 'flex', marginBottom: 8 }, align: "center", size: 'large' },
14152
+ return (React.createElement(antd.Space, { wrap: true, key: key, style: {
14153
+ display: "flex",
14154
+ marginBottom: 8,
14155
+ }, align: "center", size: "large" },
14134
14156
  React.createElement("div", { className: "ownership-list-item" },
14135
- React.createElement(antd.Form.Item, __assign({}, restField, { label: t('addProgramme:company'), name: [name, 'organisation'], wrapperCol: { span: 24 }, className: "organisation", rules: [
14157
+ React.createElement(antd.Form.Item, __assign({}, restField, { label: t("addProgramme:company"), name: [name, "organisation"], wrapperCol: { span: 24 }, className: "organisation", rules: [
14136
14158
  {
14137
14159
  required: true,
14138
- message: "".concat(t('addProgramme:company'), " ").concat(t('isRequired')),
14139
- validateTrigger: 'onBlur',
14160
+ message: "".concat(t("addProgramme:company"), " ").concat(t("isRequired")),
14161
+ validateTrigger: "onBlur",
14140
14162
  },
14141
14163
  ], shouldUpdate: true }),
14142
14164
  React.createElement(antd.Select, { size: "large", loading: loadingList, disabled: name === 0 &&
@@ -14148,30 +14170,39 @@ var ProgrammeCreationComponent = function (props) {
14148
14170
  exports.CompanyRole.GOVERNMENT &&
14149
14171
  (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) !==
14150
14172
  exports.CompanyRole.MINISTRY &&
14151
- userOrgTaxId === (organisation === null || organisation === void 0 ? void 0 : organisation.taxId)) }, organisation.name)); }))),
14152
- React.createElement(antd.Form.Item, __assign({}, restField, { label: t('addProgramme:proponentPercentage'), className: "ownership-percent", name: [name, 'proponentPercentage'], labelCol: { span: 24 }, wrapperCol: { span: 24 }, required: true, rules: [
14173
+ userOrgTaxId ===
14174
+ (organisation === null || organisation === void 0 ? void 0 : organisation.taxId)) }, organisation.name)); }))),
14175
+ React.createElement(antd.Form.Item, __assign({}, restField, { label: t("addProgramme:proponentPercentage"), className: "ownership-percent", name: [
14176
+ name,
14177
+ "proponentPercentage",
14178
+ ], labelCol: { span: 24 }, wrapperCol: { span: 24 }, required: true, rules: [
14153
14179
  {
14154
14180
  required: true,
14155
- message: "".concat(t('addProgramme:proponentPercentage'), " ").concat(t('isRequired')),
14181
+ message: "".concat(t("addProgramme:proponentPercentage"), " ").concat(t("isRequired")),
14156
14182
  },
14157
14183
  {
14158
14184
  validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
14159
14185
  return __generator(this, function (_a) {
14160
14186
  if (ownershipPercentageValidation &&
14161
14187
  name === 0) {
14162
- throw new Error("".concat(t('addProgramme:proponentPercentage'), " ").concat(t('isRequired')));
14188
+ throw new Error("".concat(t("addProgramme:proponentPercentage"), " ").concat(t("isRequired")));
14163
14189
  }
14164
14190
  return [2 /*return*/];
14165
14191
  });
14166
14192
  }); },
14167
14193
  },
14168
14194
  ], shouldUpdate: true }),
14169
- React.createElement(antd.InputNumber, { size: "large", min: 1, max: 100, formatter: function (value) { return "".concat(value, "%"); }, parser: function (value) { return value.replace('%', ''); }, disabled: (fields === null || fields === void 0 ? void 0 : fields.length) < 2 &&
14195
+ React.createElement(antd.InputNumber, { size: "large", min: 1, max: 100, formatter: function (value) {
14196
+ return "".concat(value, "%");
14197
+ }, parser: function (value) {
14198
+ return value.replace("%", "");
14199
+ }, disabled: (fields === null || fields === void 0 ? void 0 : fields.length) < 2 &&
14170
14200
  (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) !==
14171
14201
  exports.CompanyRole.GOVERNMENT &&
14172
14202
  (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) !==
14173
14203
  exports.CompanyRole.MINISTRY })),
14174
- (fields === null || fields === void 0 ? void 0 : fields.length) > 1 && name !== 0 && (React.createElement(icons.MinusCircleOutlined, { className: "dynamic-delete-button", onClick: function () {
14204
+ (fields === null || fields === void 0 ? void 0 : fields.length) > 1 &&
14205
+ name !== 0 && (React.createElement(icons.MinusCircleOutlined, { className: "dynamic-delete-button", onClick: function () {
14175
14206
  remove(name);
14176
14207
  } })))));
14177
14208
  }),
@@ -14180,19 +14211,19 @@ var ProgrammeCreationComponent = function (props) {
14180
14211
  }))),
14181
14212
  React.createElement(antd.Col, { xl: 12, md: 24 },
14182
14213
  React.createElement("div", { className: "details-part-two" },
14183
- React.createElement(antd.Form.Item, { label: t('addProgramme:externalId'), name: "externalId", rules: [
14214
+ React.createElement(antd.Form.Item, { label: t("addProgramme:externalId"), name: "externalId", rules: [
14184
14215
  {
14185
14216
  required: true,
14186
- message: '',
14217
+ message: "",
14187
14218
  },
14188
14219
  {
14189
14220
  validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
14190
14221
  return __generator(this, function (_a) {
14191
- if (String(value).trim() === '' ||
14222
+ if (String(value).trim() === "" ||
14192
14223
  String(value).trim() === undefined ||
14193
14224
  value === null ||
14194
14225
  value === undefined) {
14195
- throw new Error("".concat(t('addProgramme:externalId'), " ").concat(t('isRequired')));
14226
+ throw new Error("".concat(t("addProgramme:externalId"), " ").concat(t("isRequired")));
14196
14227
  }
14197
14228
  return [2 /*return*/];
14198
14229
  });
@@ -14200,13 +14231,14 @@ var ProgrammeCreationComponent = function (props) {
14200
14231
  },
14201
14232
  ] },
14202
14233
  React.createElement(antd.Input, { size: "large" })),
14203
- React.createElement(antd.Form.Item, { wrapperCol: { span: 13 }, label: t('addProgramme:sectoralScope'), name: "sectoralScope", rules: [
14234
+ React.createElement(antd.Form.Item, { wrapperCol: { span: 13 }, label: t("addProgramme:sectoralScope"), name: "sectoralScope", rules: [
14204
14235
  {
14205
14236
  required: true,
14206
- message: "".concat(t('addProgramme:sectoralScope'), " ").concat(t('isRequired')),
14237
+ message: "".concat(t("addProgramme:sectoralScope"), " ").concat(t("isRequired")),
14207
14238
  },
14208
14239
  ] },
14209
- React.createElement(antd.Select, { size: "large" }, (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.MINISTRY
14240
+ React.createElement(antd.Select, { size: "large" }, (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
14241
+ exports.CompanyRole.MINISTRY
14210
14242
  ? availableSecoralScope === null || availableSecoralScope === void 0 ? void 0 : availableSecoralScope.map(function (item) { return (React.createElement(antd.Select.Option, { key: item.value, value: item.value }, item.key)); })
14211
14243
  : selectedSectoralScopes === null || selectedSectoralScopes === void 0 ? void 0 : selectedSectoralScopes.map(function (val) {
14212
14244
  if (val in exports.SectoralScope) {
@@ -14215,25 +14247,25 @@ var ProgrammeCreationComponent = function (props) {
14215
14247
  }
14216
14248
  return null;
14217
14249
  }))),
14218
- React.createElement(antd.Form.Item, { wrapperCol: { span: 13 }, label: t('addProgramme:endTime'), name: "endTime", rules: [
14250
+ React.createElement(antd.Form.Item, { wrapperCol: { span: 13 }, label: t("addProgramme:endTime"), name: "endTime", rules: [
14219
14251
  {
14220
14252
  required: true,
14221
- message: '',
14253
+ message: "",
14222
14254
  },
14223
14255
  {
14224
14256
  validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
14225
14257
  var startTime;
14226
14258
  return __generator(this, function (_a) {
14227
- if (String(value).trim() === '' ||
14259
+ if (String(value).trim() === "" ||
14228
14260
  String(value).trim() === undefined ||
14229
14261
  value === null ||
14230
14262
  value === undefined) {
14231
- throw new Error("".concat(t('addProgramme:endTime'), " ").concat(t('isRequired')));
14263
+ throw new Error("".concat(t("addProgramme:endTime"), " ").concat(t("isRequired")));
14232
14264
  }
14233
14265
  else {
14234
- startTime = formOne.getFieldValue('startTime');
14266
+ startTime = formOne.getFieldValue("startTime");
14235
14267
  if (startTime && value <= startTime) {
14236
- throw new Error("".concat(t('addProgramme:endTimeVal')));
14268
+ throw new Error("".concat(t("addProgramme:endTimeVal")));
14237
14269
  }
14238
14270
  }
14239
14271
  return [2 /*return*/];
@@ -14242,22 +14274,22 @@ var ProgrammeCreationComponent = function (props) {
14242
14274
  },
14243
14275
  ] },
14244
14276
  React.createElement(antd.DatePicker, { size: "large", disabledDate: function (currentDate) {
14245
- return currentDate < moment().endOf('day');
14277
+ return currentDate < moment().endOf("day");
14246
14278
  } })),
14247
- React.createElement(antd.Form.Item, { label: t('addProgramme:ndcScope'), wrapperCol: { span: 13 }, className: "role-group", name: "ndcScope", initialValue: ndcScopeValue, rules: [
14279
+ React.createElement(antd.Form.Item, { label: t("addProgramme:ndcScope"), wrapperCol: { span: 13 }, className: "role-group", name: "ndcScope", initialValue: ndcScopeValue, rules: [
14248
14280
  {
14249
14281
  required: false,
14250
14282
  },
14251
14283
  ] },
14252
14284
  React.createElement(antd.Radio.Group, { size: "large", onChange: onChangeNDCScope, value: ndcScopeValue },
14253
14285
  React.createElement("div", { className: "condition-radio-container" },
14254
- React.createElement(antd.Radio.Button, { className: "condition-radio", value: "true", onClick: function () { return onClickNDCScope('true'); } }, t('addProgramme:conditional'))),
14286
+ React.createElement(antd.Radio.Button, { className: "condition-radio", value: "true", onClick: function () { return onClickNDCScope("true"); } }, t("addProgramme:conditional"))),
14255
14287
  React.createElement("div", { className: "condition-radio-container" },
14256
- React.createElement(antd.Radio.Button, { className: "condition-radio", value: "false", onClick: function () { return onClickNDCScope('false'); } }, t('addProgramme:unConditional'))))),
14257
- React.createElement(antd.Form.Item, { label: t('addProgramme:geographicalLocation'), name: "geographicalLocation", rules: [
14288
+ React.createElement(antd.Radio.Button, { className: "condition-radio", value: "false", onClick: function () { return onClickNDCScope("false"); } }, t("addProgramme:unConditional"))))),
14289
+ React.createElement(antd.Form.Item, { label: t("addProgramme:geographicalLocation"), name: "geographicalLocation", rules: [
14258
14290
  {
14259
14291
  required: true,
14260
- message: "".concat(t('addProgramme:geographicalLocation'), " ").concat(t('isRequired')),
14292
+ message: "".concat(t("addProgramme:geographicalLocation"), " ").concat(t("isRequired")),
14261
14293
  },
14262
14294
  ] },
14263
14295
  React.createElement(antd.Select, { mode: "multiple", size: "large", maxTagCount: 2, onChange: onChangeGeoLocation, loading: loadingList, className: "custom-select", allowClear: true }, regionsList.map(function (region) { return (React.createElement(antd.Select.Option, { value: region }, region)); })))))),
@@ -14266,100 +14298,110 @@ var ProgrammeCreationComponent = function (props) {
14266
14298
  React.createElement(antd.Row, { className: "in-ndc-row" },
14267
14299
  React.createElement(antd.Col, { md: 16, lg: 18, xl: 18 },
14268
14300
  React.createElement("div", { className: "included-label" },
14269
- React.createElement("div", null, t('addProgramme:inNDC')),
14301
+ React.createElement("div", null, t("addProgramme:inNDC")),
14270
14302
  React.createElement("div", { className: "info-container" },
14271
- React.createElement(antd.Tooltip, { arrowPointAtCenter: true, placement: "topLeft", trigger: "hover", title: t('addProgramme:inNDCToolTip'), overlayClassName: "custom-tooltip" },
14303
+ React.createElement(antd.Tooltip, { arrowPointAtCenter: true, placement: "topLeft", trigger: "hover", title: t("addProgramme:inNDCToolTip"), overlayClassName: "custom-tooltip" },
14272
14304
  React.createElement(Icon.InfoCircle, { color: "#000000", size: 17 }))))),
14273
14305
  React.createElement(antd.Col, { md: 8, lg: 6, xl: 6, className: "included-val" },
14274
14306
  React.createElement(antd.Radio.Group, { size: "middle", disabled: ndcScopeChanged, value: includedInNDC, onChange: onInCludedNDCChange },
14275
14307
  React.createElement("div", { className: "yes-no-radio-container" },
14276
- React.createElement(antd.Radio.Button, { className: "yes-no-radio", value: true, onClick: function () { return onClickIncludedInNDCScope(true); } }, t('addProgramme:yes'))),
14308
+ React.createElement(antd.Radio.Button, { className: "yes-no-radio", value: true, onClick: function () {
14309
+ return onClickIncludedInNDCScope(true);
14310
+ } }, t("addProgramme:yes"))),
14277
14311
  React.createElement("div", { className: "yes-no-radio-container" },
14278
- React.createElement(antd.Radio.Button, { className: "yes-no-radio", value: false, onClick: function () { return onClickIncludedInNDCScope(false); } }, t('addProgramme:no'))))))),
14312
+ React.createElement(antd.Radio.Button, { className: "yes-no-radio", value: false, onClick: function () {
14313
+ return onClickIncludedInNDCScope(false);
14314
+ } }, t("addProgramme:no"))))))),
14279
14315
  React.createElement(antd.Col, { md: 24, xl: 12, className: "in-nap-col" },
14280
14316
  React.createElement(antd.Row, { className: "in-nap-row" },
14281
14317
  React.createElement(antd.Col, { md: 16, lg: 18, xl: 18 },
14282
14318
  React.createElement("div", { className: "included-label" },
14283
- React.createElement("div", null, t('addProgramme:inNAP')),
14319
+ React.createElement("div", null, t("addProgramme:inNAP")),
14284
14320
  React.createElement("div", { className: "info-container" },
14285
- React.createElement(antd.Tooltip, { arrowPointAtCenter: true, placement: "topLeft", trigger: "hover", title: t('addProgramme:inNAPToolTip'), overlayClassName: "custom-tooltip" },
14321
+ React.createElement(antd.Tooltip, { arrowPointAtCenter: true, placement: "topLeft", trigger: "hover", title: t("addProgramme:inNAPToolTip"), overlayClassName: "custom-tooltip" },
14286
14322
  React.createElement(Icon.InfoCircle, { color: "#000000", size: 17 }))))),
14287
14323
  React.createElement(antd.Col, { md: 8, lg: 6, xl: 6, className: "included-val" },
14288
14324
  React.createElement(antd.Radio.Group, { size: "middle", onChange: onInCludedNAPChange, value: includedInNAP },
14289
14325
  React.createElement("div", { className: "yes-no-radio-container" },
14290
- React.createElement(antd.Radio.Button, { className: "yes-no-radio", value: true, onClick: function () { return onClickIncludedInNAPScope(true); } }, t('addProgramme:yes'))),
14326
+ React.createElement(antd.Radio.Button, { className: "yes-no-radio", value: true, onClick: function () {
14327
+ return onClickIncludedInNAPScope(true);
14328
+ } }, t("addProgramme:yes"))),
14291
14329
  React.createElement("div", { className: "yes-no-radio-container" },
14292
- React.createElement(antd.Radio.Button, { className: "yes-no-radio", value: false, onClick: function () { return onClickIncludedInNAPScope(false); } }, t('addProgramme:no')))))))),
14330
+ React.createElement(antd.Radio.Button, { className: "yes-no-radio", value: false, onClick: function () {
14331
+ return onClickIncludedInNAPScope(false);
14332
+ } }, t("addProgramme:no")))))))),
14293
14333
  React.createElement("div", { className: "steps-actions" },
14294
- React.createElement(antd.Button, { type: "primary", htmlType: "submit", loading: loading, onClick: checkOrgPercentageValidation }, t('addProgramme:next'))))))),
14334
+ React.createElement(antd.Button, { type: "primary", htmlType: "submit", loading: loading, onClick: checkOrgPercentageValidation }, t("addProgramme:next"))))))),
14295
14335
  },
14296
14336
  {
14297
14337
  title: (React.createElement("div", { className: "step-title-container" },
14298
14338
  React.createElement("div", { className: "step-count" }, "02"),
14299
- React.createElement("div", { className: "title" }, t('addProgramme:addProgramme2')))),
14339
+ React.createElement("div", { className: "title" }, t("addProgramme:addProgramme2")))),
14300
14340
  description: current === 1 && (React.createElement("div", { className: "programme-sought-form-container" },
14301
14341
  React.createElement("div", { className: "programme-sought-form" },
14302
14342
  React.createElement(antd.Form, { labelCol: { span: 20 }, wrapperCol: { span: 24 }, name: "programme-sought", className: "programme-sought-form", layout: "vertical", requiredMark: true, form: formTwo, onFinish: onFinishStepTwo, onValuesChange: onFormTwoValuesChane },
14303
14343
  React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
14304
14344
  React.createElement(antd.Col, { xl: 12, md: 24 },
14305
14345
  React.createElement("div", { className: "details-part-one" },
14306
- React.createElement(antd.Form.Item, { label: t('addProgramme:estimatedProgrammeCostUSD'), name: "estimatedProgrammeCostUSD", rules: [
14346
+ React.createElement(antd.Form.Item, { label: t("addProgramme:estimatedProgrammeCostUSD"), name: "estimatedProgrammeCostUSD", rules: [
14307
14347
  {
14308
14348
  required: true,
14309
- message: '',
14349
+ message: "",
14310
14350
  },
14311
14351
  {
14312
14352
  validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
14313
14353
  return __generator(this, function (_a) {
14314
- if (String(value).trim() === '' ||
14354
+ if (String(value).trim() === "" ||
14315
14355
  String(value).trim() === undefined ||
14316
14356
  value === null ||
14317
14357
  value === undefined) {
14318
- throw new Error("".concat(t('addProgramme:estimatedProgrammeCostUSD'), " ").concat(t('isRequired')));
14358
+ throw new Error("".concat(t("addProgramme:estimatedProgrammeCostUSD"), " ").concat(t("isRequired")));
14319
14359
  }
14320
- else if (!isNaN(value) && Number(value) > 0) {
14360
+ else if (!isNaN(value) &&
14361
+ Number(value) > 0) {
14321
14362
  return [2 /*return*/, Promise.resolve()];
14322
14363
  }
14323
14364
  else {
14324
- throw new Error("".concat(t('addProgramme:estimatedProgrammeCostUSD'), " ").concat(t('isInvalid')));
14365
+ throw new Error("".concat(t("addProgramme:estimatedProgrammeCostUSD"), " ").concat(t("isInvalid")));
14325
14366
  }
14326
14367
  });
14327
14368
  }); },
14328
14369
  },
14329
14370
  ] },
14330
- React.createElement(antd.InputNumber, { size: "large", style: { width: '100%', paddingRight: 12 } })),
14331
- React.createElement(antd.Form.Item, { label: t('addProgramme:minViableCarbonPrice'), name: "minViableCarbonPrice" },
14332
- React.createElement(antd.InputNumber, { disabled: true, size: "large", style: { width: '100%', paddingRight: 12 } })))),
14371
+ React.createElement(antd.InputNumber, { size: "large", style: { width: "100%", paddingRight: 12 } })),
14372
+ React.createElement(antd.Form.Item, { label: t("addProgramme:minViableCarbonPrice"), name: "minViableCarbonPrice" },
14373
+ React.createElement(antd.InputNumber, { disabled: true, size: "large", style: { width: "100%", paddingRight: 12 } })))),
14333
14374
  React.createElement(antd.Col, { xl: 12, md: 24 },
14334
14375
  React.createElement("div", { className: "details-part-two" },
14335
- React.createElement(antd.Form.Item, { label: t('addProgramme:creditEst'), name: "creditEst", rules: [
14376
+ React.createElement(antd.Form.Item, { label: t("addProgramme:creditEst"), name: "creditEst", rules: [
14336
14377
  {
14337
14378
  required: true,
14338
- message: '',
14379
+ message: "",
14339
14380
  },
14340
14381
  {
14341
14382
  validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
14342
14383
  return __generator(this, function (_a) {
14343
- if (String(value).trim() === '' ||
14384
+ if (String(value).trim() === "" ||
14344
14385
  String(value).trim() === undefined ||
14345
14386
  value === null ||
14346
14387
  value === undefined) {
14347
- throw new Error("".concat(t('addProgramme:creditEst'), " ").concat(t('isRequired')));
14388
+ throw new Error("".concat(t("addProgramme:creditEst"), " ").concat(t("isRequired")));
14348
14389
  }
14349
- else if (!isNaN(value) && Number(value) > 0) {
14390
+ else if (!isNaN(value) &&
14391
+ Number(value) > 0) {
14350
14392
  return [2 /*return*/, Promise.resolve()];
14351
14393
  }
14352
14394
  else {
14353
- throw new Error("".concat(t('addProgramme:creditEst'), " ").concat(t('isInvalid')));
14395
+ throw new Error("".concat(t("addProgramme:creditEst"), " ").concat(t("isInvalid")));
14354
14396
  }
14355
14397
  });
14356
14398
  }); },
14357
14399
  },
14358
14400
  ] },
14359
- React.createElement(antd.InputNumber, { size: "large", style: { width: '100%', paddingRight: 12 } }))))),
14401
+ React.createElement(antd.InputNumber, { size: "large", style: { width: "100%", paddingRight: 12 } }))))),
14360
14402
  React.createElement("div", { className: "steps-actions" },
14361
- React.createElement(antd.Button, { type: "primary", htmlType: "submit", loading: loading }, t('addProgramme:submit')),
14362
- current === 1 && (React.createElement(antd.Button, { className: "back-btn", onClick: function () { return prevOne(); }, loading: loading }, t('addProgramme:back')))))))),
14403
+ React.createElement(antd.Button, { type: "primary", htmlType: "submit", loading: loading }, t("addProgramme:submit")),
14404
+ current === 1 && (React.createElement(antd.Button, { className: "back-btn", onClick: function () { return prevOne(); }, loading: loading }, t("addProgramme:back")))))))),
14363
14405
  },
14364
14406
  ] })))));
14365
14407
  };
@@ -19465,7 +19507,7 @@ var Social = function (props) {
19465
19507
  };
19466
19508
 
19467
19509
  var CoBenifitsComponent = function (props) {
19468
- var onClickedBackBtn = props.onClickedBackBtn, onFormSubmit = props.onFormSubmit, coBenefitsDetails = props.coBenefitsDetails, submitButtonText = props.submitButtonText, viewOnly = props.viewOnly, coBenifitsViewDetails = props.coBenifitsViewDetails, _a = props.loading, loading = _a === void 0 ? false : _a, t = props.t;
19510
+ var onClickedBackBtn = props.onClickedBackBtn, onFormSubmit = props.onFormSubmit, coBenefitsDetails = props.coBenefitsDetails, submitButtonText = props.submitButtonText, viewOnly = props.viewOnly, coBenifitsViewDetails = props.coBenifitsViewDetails, _a = props.loading, loading = _a === void 0 ? false : _a, sdgGoalImages = props.sdgGoalImages, t = props.t;
19469
19511
  var _b = React.useState(), coBenefitDetails = _b[0], setCoBenefitDetails = _b[1];
19470
19512
  var _c = React.useState(true), isSocialFormValid = _c[0], setIsSocialFormValid = _c[1];
19471
19513
  var _d = React.useState(true), isAssessmentFormValid = _d[0], setIsAssessmentFormValid = _d[1];
@@ -19500,7 +19542,7 @@ var CoBenifitsComponent = function (props) {
19500
19542
  ? (coBenifitsViewDetails === null || coBenifitsViewDetails === void 0 ? void 0 : coBenifitsViewDetails.sdgGoals)
19501
19543
  ? coBenifitsViewDetails === null || coBenifitsViewDetails === void 0 ? void 0 : coBenifitsViewDetails.sdgGoals
19502
19544
  : []
19503
- : coBenefitsDetails === null || coBenefitsDetails === void 0 ? void 0 : coBenefitsDetails.sdgGoals, viewOnly: viewOnly || false })),
19545
+ : coBenefitsDetails === null || coBenefitsDetails === void 0 ? void 0 : coBenefitsDetails.sdgGoals, viewOnly: viewOnly || false, sdgGoalImages: sdgGoalImages })),
19504
19546
  },
19505
19547
  {
19506
19548
  label: t("coBenifits:genderPart"),
@@ -19702,7 +19744,7 @@ var CoBenifitsComponent = function (props) {
19702
19744
  };
19703
19745
 
19704
19746
  var AddNdcActionComponent = function (props) {
19705
- var useConnection = props.useConnection, useLocation = props.useLocation, onNavigateToProgrammeManagementView = props.onNavigateToProgrammeManagementView, onNavigateToProgrammeView = props.onNavigateToProgrammeView, t = props.t;
19747
+ var useConnection = props.useConnection, useLocation = props.useLocation, onNavigateToProgrammeManagementView = props.onNavigateToProgrammeManagementView, onNavigateToProgrammeView = props.onNavigateToProgrammeView, sdgGoalImages = props.sdgGoalImages, t = props.t;
19706
19748
  var _a = React.useState(1), current = _a[0], setCurrent = _a[1];
19707
19749
  var _b = React.useState(), programmeDetails = _b[0], setprogrammeDetails = _b[1];
19708
19750
  var _c = React.useState(), ndcActionDetails = _c[0], setNdcActionDetails = _c[1];
@@ -19843,7 +19885,7 @@ var AddNdcActionComponent = function (props) {
19843
19885
  description: (React.createElement("div", { className: current !== 2 ? "hide" : "" },
19844
19886
  React.createElement(CoBenifitsComponent, { onClickedBackBtn: onClickBackCoBenefits, coBenefitsDetails: ndcActionDetails ? ndcActionDetails.coBenefitsProperties : {}, onFormSubmit: onCoBenefitsSubmit, submitButtonText: isProjectReportsVisible()
19845
19887
  ? t("ndcAction:next")
19846
- : t("ndcAction:submit"), loading: loading, t: t }))),
19888
+ : t("ndcAction:submit"), loading: loading, sdgGoalImages: sdgGoalImages, t: t }))),
19847
19889
  },
19848
19890
  ];
19849
19891
  if (isProjectReportsVisible()) {