@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/esm/index.js CHANGED
@@ -13472,20 +13472,27 @@ var maximumImageSize = process.env.REACT_APP_MAXIMUM_FILE_SIZE
13472
13472
  : 5000000;
13473
13473
  var sectoralScopes = {
13474
13474
  Energy: [
13475
- 'Energy Industries (Renewable – / Non-Renewable Sources)',
13476
- 'Energy Distribution',
13477
- 'Energy Demand',
13475
+ "Energy Industries (Renewable – / Non-Renewable Sources)",
13476
+ "Energy Distribution",
13477
+ "Energy Demand",
13478
13478
  ],
13479
- Transport: ['Transport'],
13480
- Manufacturing: ['Manufacturing Industries', 'Chemical Industries', 'Metal Production'],
13481
- Forestry: ['Afforestation and Reforestation'],
13482
- Waste: ['Waste Handling and Disposal', 'Fugitive Emissions From Fuels (Solid, Oil and Gas)'],
13483
- Agriculture: ['Agriculture'],
13479
+ Transport: ["Transport"],
13480
+ Manufacturing: [
13481
+ "Manufacturing Industries",
13482
+ "Chemical Industries",
13483
+ "Metal Production",
13484
+ ],
13485
+ Forestry: ["Afforestation and Reforestation"],
13486
+ Waste: [
13487
+ "Waste Handling and Disposal",
13488
+ "Fugitive Emissions From Fuels (Solid, Oil and Gas)",
13489
+ ],
13490
+ Agriculture: ["Agriculture"],
13484
13491
  Other: [
13485
- 'Mining/Mineral Production',
13486
- 'Construction',
13487
- 'Fugitive Emissions From Production and Consumption of Halocarbons and Sulphur Hexafluoride',
13488
- 'Solvent Use',
13492
+ "Mining/Mineral Production",
13493
+ "Construction",
13494
+ "Fugitive Emissions From Production and Consumption of Halocarbons and Sulphur Hexafluoride",
13495
+ "Solvent Use",
13489
13496
  ],
13490
13497
  };
13491
13498
  var ProgrammeCreationComponent = function (props) {
@@ -13508,12 +13515,12 @@ var ProgrammeCreationComponent = function (props) {
13508
13515
  var _m = useState(), includedInNAP = _m[0], setIncludedInNAP = _m[1];
13509
13516
  var _o = useState([]), countries = _o[0], setCountries = _o[1];
13510
13517
  var _p = useState([]), organisationsList = _p[0], setOrganisationList = _p[1];
13511
- var _q = useState(''), userOrgTaxId = _q[0], setUserOrgTaxId = _q[1];
13518
+ var _q = useState(""), userOrgTaxId = _q[0], setUserOrgTaxId = _q[1];
13512
13519
  var _r = useState([]), regionsList = _r[0], setRegionsList = _r[1];
13513
13520
  var _s = useState(); _s[0]; var setProgrammeDetailsObj = _s[1];
13514
13521
  var _t = useState(), selectedOrgs = _t[0], setSelectedOrgs = _t[1];
13515
13522
  var _u = useState(false), ownershipPercentageValidation = _u[0], setOwnershipPercentageValidation = _u[1];
13516
- var _v = useState(''), selectedSector = _v[0], setSelectedSector = _v[1];
13523
+ var _v = useState(""), selectedSector = _v[0], setSelectedSector = _v[1];
13517
13524
  var _w = useState([]); _w[0]; var setMinistrySectoralScope = _w[1];
13518
13525
  var _x = useState([]), availableSecoralScope = _x[0], setAvailableSectoralScope = _x[1];
13519
13526
  var _y = useState([]), availableSectar = _y[0], setAvailableSectar = _y[1];
@@ -13552,7 +13559,7 @@ var ProgrammeCreationComponent = function (props) {
13552
13559
  _a.label = 1;
13553
13560
  case 1:
13554
13561
  _a.trys.push([1, 3, 4, 5]);
13555
- return [4 /*yield*/, get('national/organisation/countries')];
13562
+ return [4 /*yield*/, get("national/organisation/countries")];
13556
13563
  case 2:
13557
13564
  response = _a.sent();
13558
13565
  if (response.data) {
@@ -13561,7 +13568,7 @@ var ProgrammeCreationComponent = function (props) {
13561
13568
  return [3 /*break*/, 5];
13562
13569
  case 3:
13563
13570
  error_1 = _a.sent();
13564
- console.log('Error in getting country list', error_1);
13571
+ console.log("Error in getting country list", error_1);
13565
13572
  return [3 /*break*/, 5];
13566
13573
  case 4:
13567
13574
  setLoadingList(false);
@@ -13579,14 +13586,14 @@ var ProgrammeCreationComponent = function (props) {
13579
13586
  _a.label = 1;
13580
13587
  case 1:
13581
13588
  _a.trys.push([1, 3, 4, 5]);
13582
- return [4 /*yield*/, post('national/organisation/regions', {
13589
+ return [4 /*yield*/, post("national/organisation/regions", {
13583
13590
  page: 1,
13584
13591
  size: 100,
13585
13592
  filterAnd: [
13586
13593
  {
13587
- key: 'lang',
13588
- operation: '=',
13589
- value: 'en',
13594
+ key: "lang",
13595
+ operation: "=",
13596
+ value: "en",
13590
13597
  },
13591
13598
  ],
13592
13599
  })];
@@ -13594,12 +13601,12 @@ var ProgrammeCreationComponent = function (props) {
13594
13601
  response = _a.sent();
13595
13602
  if (response.data) {
13596
13603
  regionNames = response.data.map(function (item) { return item.regionName; });
13597
- setRegionsList(__spreadArray(['National'], regionNames, true));
13604
+ setRegionsList(__spreadArray(["National"], regionNames, true));
13598
13605
  }
13599
13606
  return [3 /*break*/, 5];
13600
13607
  case 3:
13601
13608
  error_2 = _a.sent();
13602
- console.log('Error in getting regions list', error_2);
13609
+ console.log("Error in getting regions list", error_2);
13603
13610
  return [3 /*break*/, 5];
13604
13611
  case 4:
13605
13612
  setLoadingList(false);
@@ -13617,13 +13624,13 @@ var ProgrammeCreationComponent = function (props) {
13617
13624
  _a.label = 1;
13618
13625
  case 1:
13619
13626
  _a.trys.push([1, 3, 4, 5]);
13620
- return [4 /*yield*/, post('national/organisation/queryNames', {
13627
+ return [4 /*yield*/, post("national/organisation/queryNames", {
13621
13628
  page: 1,
13622
13629
  size: 100,
13623
13630
  filterAnd: [
13624
13631
  {
13625
- key: 'companyRole',
13626
- operation: '=',
13632
+ key: "companyRole",
13633
+ operation: "=",
13627
13634
  value: CompanyRole.PROGRAMME_DEVELOPER,
13628
13635
  },
13629
13636
  ],
@@ -13639,7 +13646,7 @@ var ProgrammeCreationComponent = function (props) {
13639
13646
  return [3 /*break*/, 5];
13640
13647
  case 3:
13641
13648
  error_3 = _a.sent();
13642
- console.log('Error in getting organisation list', error_3);
13649
+ console.log("Error in getting organisation list", error_3);
13643
13650
  return [3 /*break*/, 5];
13644
13651
  case 4:
13645
13652
  setLoadingList(false);
@@ -13658,13 +13665,13 @@ var ProgrammeCreationComponent = function (props) {
13658
13665
  _k.label = 1;
13659
13666
  case 1:
13660
13667
  _k.trys.push([1, 3, , 4]);
13661
- return [4 /*yield*/, post('national/user/query', {
13668
+ return [4 /*yield*/, post("national/user/query", {
13662
13669
  page: 1,
13663
13670
  size: 10,
13664
13671
  filterAnd: [
13665
13672
  {
13666
- key: 'id',
13667
- operation: '=',
13673
+ key: "id",
13674
+ operation: "=",
13668
13675
  value: userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.id,
13669
13676
  },
13670
13677
  ],
@@ -13699,19 +13706,23 @@ var ProgrammeCreationComponent = function (props) {
13699
13706
  }
13700
13707
  });
13701
13708
  });
13702
- setAvailableSectar(__spreadArray(__spreadArray([], sectors_1, true), ['Health', 'Education', 'Hospitality'], false));
13709
+ setAvailableSectar(__spreadArray(__spreadArray([], sectors_1, true), [
13710
+ "Health",
13711
+ "Education",
13712
+ "Hospitality",
13713
+ ], false));
13703
13714
  }
13704
13715
  }
13705
13716
  setLoading(false);
13706
13717
  return [3 /*break*/, 4];
13707
13718
  case 3:
13708
13719
  error_4 = _k.sent();
13709
- console.log('Error in getting users', error_4);
13720
+ console.log("Error in getting users", error_4);
13710
13721
  message.open({
13711
- type: 'error',
13722
+ type: "error",
13712
13723
  content: error_4.message,
13713
13724
  duration: 3,
13714
- style: { textAlign: 'right', marginRight: 15, marginTop: 10 },
13725
+ style: { textAlign: "right", marginRight: 15, marginTop: 10 },
13715
13726
  });
13716
13727
  setLoading(false);
13717
13728
  return [3 /*break*/, 4];
@@ -13754,13 +13765,13 @@ var ProgrammeCreationComponent = function (props) {
13754
13765
  (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) !== CompanyRole.MINISTRY
13755
13766
  ? ownershipPercentage === null || ownershipPercentage === void 0 ? void 0 : ownershipPercentage.slice(1).map(function (item) { return item.organisation; })
13756
13767
  : ownershipPercentage === null || ownershipPercentage === void 0 ? void 0 : ownershipPercentage.map(function (item) { return item.organisation; });
13757
- logoBase64 = '';
13768
+ logoBase64 = "";
13758
13769
  logoUrls = [];
13759
13770
  if (!(((_a = values === null || values === void 0 ? void 0 : values.designDocument) === null || _a === void 0 ? void 0 : _a.length) > 0)) return [3 /*break*/, 2];
13760
13771
  return [4 /*yield*/, getBase64((_b = values === null || values === void 0 ? void 0 : values.designDocument[0]) === null || _b === void 0 ? void 0 : _b.originFileObj)];
13761
13772
  case 1:
13762
13773
  logoBase64 = _c.sent();
13763
- logoUrls = logoBase64 === null || logoBase64 === void 0 ? void 0 : logoBase64.split(',');
13774
+ logoUrls = logoBase64 === null || logoBase64 === void 0 ? void 0 : logoBase64.split(",");
13764
13775
  _c.label = 2;
13765
13776
  case 2:
13766
13777
  propTaxIds = (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) !== CompanyRole.GOVERNMENT &&
@@ -13769,19 +13780,19 @@ var ProgrammeCreationComponent = function (props) {
13769
13780
  duplicateIds = new Set(propTaxIds).size !== propTaxIds.length;
13770
13781
  if (totalPercentage !== 100) {
13771
13782
  message.open({
13772
- type: 'error',
13773
- content: t('addProgramme:proponentPercentValidation'),
13783
+ type: "error",
13784
+ content: t("addProgramme:proponentPercentValidation"),
13774
13785
  duration: 4,
13775
- style: { textAlign: 'right', marginRight: 15, marginTop: 10 },
13786
+ style: { textAlign: "right", marginRight: 15, marginTop: 10 },
13776
13787
  });
13777
13788
  setLoading(false);
13778
13789
  }
13779
13790
  else if (duplicateIds) {
13780
13791
  message.open({
13781
- type: 'error',
13782
- content: t('addProgramme:duplicateOrg'),
13792
+ type: "error",
13793
+ content: t("addProgramme:duplicateOrg"),
13783
13794
  duration: 4,
13784
- style: { textAlign: 'right', marginRight: 15, marginTop: 10 },
13795
+ style: { textAlign: "right", marginRight: 15, marginTop: 10 },
13785
13796
  });
13786
13797
  setLoading(false);
13787
13798
  }
@@ -13791,14 +13802,16 @@ var ProgrammeCreationComponent = function (props) {
13791
13802
  externalId: values === null || values === void 0 ? void 0 : values.externalId,
13792
13803
  sectoralScope: values === null || values === void 0 ? void 0 : values.sectoralScope,
13793
13804
  sector: values === null || values === void 0 ? void 0 : values.sector,
13794
- startTime: moment(values === null || values === void 0 ? void 0 : values.startTime).startOf('day').unix(),
13795
- endTime: moment(values === null || values === void 0 ? void 0 : values.endTime).endOf('day').unix(),
13805
+ startTime: moment(values === null || values === void 0 ? void 0 : values.startTime).startOf("day").unix(),
13806
+ endTime: moment(values === null || values === void 0 ? void 0 : values.endTime).endOf("day").unix(),
13796
13807
  proponentTaxVatId: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) !== CompanyRole.GOVERNMENT &&
13797
13808
  (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) !== CompanyRole.MINISTRY
13798
13809
  ? __spreadArray([userOrgTaxId], proponentTxIds, true) : proponentTxIds,
13799
13810
  proponentPercentage: proponentPercentages,
13800
13811
  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 &&
13801
- (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 &&
13812
+ (values === null || values === void 0 ? void 0 : values.ndcScope) !== null && {
13813
+ ndcScope: (values === null || values === void 0 ? void 0 : values.ndcScope) === "true" ? true : false,
13814
+ })), (includedInNDC !== undefined &&
13802
13815
  includedInNDC !== null && { includedInNdc: includedInNDC })), (includedInNAP !== undefined &&
13803
13816
  includedInNAP !== null && { includedInNap: includedInNAP })),
13804
13817
  };
@@ -13822,29 +13835,28 @@ var ProgrammeCreationComponent = function (props) {
13822
13835
  _a.label = 1;
13823
13836
  case 1:
13824
13837
  _a.trys.push([1, 3, 4, 5]);
13825
- return [4 /*yield*/, post('national/programme/create', payload)];
13838
+ return [4 /*yield*/, post("national/programme/create", payload)];
13826
13839
  case 2:
13827
13840
  response = _a.sent();
13828
- console.log('Programme creation -> ', response);
13829
- if ((response === null || response === void 0 ? void 0 : response.statusText) === 'SUCCESS') {
13841
+ console.log("Programme creation -> ", response);
13842
+ if ((response === null || response === void 0 ? void 0 : response.statusText) === "SUCCESS") {
13830
13843
  message.open({
13831
- type: 'success',
13832
- content: t('addProgramme:programmeCreationSuccess'),
13844
+ type: "success",
13845
+ content: t("addProgramme:programmeCreationSuccess"),
13833
13846
  duration: 4,
13834
- style: { textAlign: 'right', marginRight: 15, marginTop: 10 },
13847
+ style: { textAlign: "right", marginRight: 15, marginTop: 10 },
13835
13848
  });
13836
13849
  }
13837
- //navigate('/programmeManagement/view');
13838
13850
  onNavigateToProgrammeView();
13839
13851
  return [3 /*break*/, 5];
13840
13852
  case 3:
13841
13853
  error_5 = _a.sent();
13842
- console.log('Error in programme creation - ', error_5);
13854
+ console.log("Error in programme creation - ", error_5);
13843
13855
  message.open({
13844
- type: 'error',
13856
+ type: "error",
13845
13857
  content: error_5 === null || error_5 === void 0 ? void 0 : error_5.message,
13846
13858
  duration: 4,
13847
- style: { textAlign: 'right', marginRight: 15, marginTop: 10 },
13859
+ style: { textAlign: "right", marginRight: 15, marginTop: 10 },
13848
13860
  });
13849
13861
  return [3 /*break*/, 5];
13850
13862
  case 4:
@@ -13878,10 +13890,10 @@ var ProgrammeCreationComponent = function (props) {
13878
13890
  (allValues === null || allValues === void 0 ? void 0 : allValues.estimatedProgrammeCostUSD) !== null &&
13879
13891
  (allValues === null || allValues === void 0 ? void 0 : allValues.estimatedProgrammeCostUSD) > 0) {
13880
13892
  var minViableCarbonPrice = Number((allValues === null || allValues === void 0 ? void 0 : allValues.estimatedProgrammeCostUSD) / (allValues === null || allValues === void 0 ? void 0 : allValues.creditEst)).toFixed(2);
13881
- formTwo.setFieldValue('minViableCarbonPrice', addCommSepRound(minViableCarbonPrice));
13893
+ formTwo.setFieldValue("minViableCarbonPrice", addCommSepRound(minViableCarbonPrice));
13882
13894
  }
13883
13895
  else {
13884
- formTwo.setFieldValue('minViableCarbonPrice', '');
13896
+ formTwo.setFieldValue("minViableCarbonPrice", "");
13885
13897
  }
13886
13898
  };
13887
13899
  var onChangeNDCScope = function (event) {
@@ -13898,7 +13910,7 @@ var ProgrammeCreationComponent = function (props) {
13898
13910
  var onClickNDCScope = function (value) {
13899
13911
  if (value === ndcScopeValue) {
13900
13912
  setNdcScopeValue(null);
13901
- formOne.setFieldValue('ndcScope', null);
13913
+ formOne.setFieldValue("ndcScope", null);
13902
13914
  setNdcScopeChanged(undefined);
13903
13915
  setIncludedInNDC(undefined);
13904
13916
  }
@@ -13920,41 +13932,43 @@ var ProgrammeCreationComponent = function (props) {
13920
13932
  }
13921
13933
  };
13922
13934
  var onChangeGeoLocation = function (values) {
13923
- if (values.includes('National')) {
13935
+ if (values.includes("National")) {
13924
13936
  var buyerCountryValues = regionsList;
13925
- var newBuyerValues = buyerCountryValues === null || buyerCountryValues === void 0 ? void 0 : buyerCountryValues.filter(function (item) { return item !== 'National'; });
13926
- formOne.setFieldValue('geographicalLocation', __spreadArray([], newBuyerValues, true));
13937
+ var newBuyerValues = buyerCountryValues === null || buyerCountryValues === void 0 ? void 0 : buyerCountryValues.filter(function (item) { return item !== "National"; });
13938
+ formOne.setFieldValue("geographicalLocation", __spreadArray([], newBuyerValues, true));
13927
13939
  }
13928
13940
  };
13929
13941
  var onInCludedNAPChange = function (event) {
13930
13942
  var _a, _b;
13931
- if (((_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.value) === 'inNAP') {
13943
+ if (((_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.value) === "inNAP") {
13932
13944
  setIncludedInNAP(true);
13933
13945
  }
13934
- else if (((_b = event === null || event === void 0 ? void 0 : event.target) === null || _b === void 0 ? void 0 : _b.value) === 'notInNAP') {
13946
+ else if (((_b = event === null || event === void 0 ? void 0 : event.target) === null || _b === void 0 ? void 0 : _b.value) === "notInNAP") {
13935
13947
  setIncludedInNAP(false);
13936
13948
  }
13937
13949
  };
13938
13950
  var onInCludedNDCChange = function (event) {
13939
13951
  var _a, _b;
13940
- if (((_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.value) === 'inNDC') {
13952
+ if (((_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.value) === "inNDC") {
13941
13953
  setIncludedInNDC(true);
13942
13954
  }
13943
- else if (((_b = event === null || event === void 0 ? void 0 : event.target) === null || _b === void 0 ? void 0 : _b.value) === 'notInNDC') {
13955
+ else if (((_b = event === null || event === void 0 ? void 0 : event.target) === null || _b === void 0 ? void 0 : _b.value) === "notInNDC") {
13944
13956
  setIncludedInNDC(false);
13945
13957
  }
13946
13958
  };
13947
13959
  var onChangeStepOne = function (changedValues, allValues) {
13948
13960
  var _a, _b;
13949
13961
  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; });
13950
- var orgPercentValidation = ((_b = allValues === null || allValues === void 0 ? void 0 : allValues.ownershipPercentage[0]) === null || _b === void 0 ? void 0 : _b.proponentPercentage) === false ? true : false;
13962
+ var orgPercentValidation = ((_b = allValues === null || allValues === void 0 ? void 0 : allValues.ownershipPercentage[0]) === null || _b === void 0 ? void 0 : _b.proponentPercentage) === false
13963
+ ? true
13964
+ : false;
13951
13965
  setOwnershipPercentageValidation(orgPercentValidation);
13952
13966
  var uniqueOrgs = new Set(selectedCompanies);
13953
13967
  setSelectedOrgs(__spreadArray([], uniqueOrgs, true));
13954
13968
  };
13955
13969
  var checkOrgPercentageValidation = function () {
13956
13970
  var _a;
13957
- var orgPercentage = formOne.getFieldValue('ownershipPercentage');
13971
+ var orgPercentage = formOne.getFieldValue("ownershipPercentage");
13958
13972
  var orgPercentValidation = ((_a = orgPercentage[0]) === null || _a === void 0 ? void 0 : _a.proponentPercentage) === false ? true : false;
13959
13973
  setOwnershipPercentageValidation(orgPercentValidation);
13960
13974
  };
@@ -13966,34 +13980,38 @@ var ProgrammeCreationComponent = function (props) {
13966
13980
  }, []);
13967
13981
  return (React.createElement("div", { className: "add-programme-main-container" },
13968
13982
  React.createElement("div", { className: "title-container" },
13969
- React.createElement("div", { className: "main" }, isUpdate ? t('addProgramme:editProgramme') : t('addProgramme:addProgramme')),
13970
- React.createElement("div", { className: "sub" }, isUpdate ? t('addProgramme:editProgrammeSub') : t('addProgramme:addProgrammeSub'))),
13983
+ React.createElement("div", { className: "main" }, isUpdate
13984
+ ? t("addProgramme:editProgramme")
13985
+ : t("addProgramme:addProgramme")),
13986
+ React.createElement("div", { className: "sub" }, isUpdate
13987
+ ? t("addProgramme:editProgrammeSub")
13988
+ : t("addProgramme:addProgrammeSub"))),
13971
13989
  React.createElement("div", { className: "adding-section" },
13972
13990
  React.createElement("div", { className: "form-section" },
13973
13991
  React.createElement(Steps, { progressDot: true, direction: "vertical", current: current, items: [
13974
13992
  {
13975
13993
  title: (React.createElement("div", { className: "step-title-container" },
13976
13994
  React.createElement("div", { className: "step-count" }, "01"),
13977
- React.createElement("div", { className: "title" }, t('addProgramme:addProgramme1')))),
13995
+ React.createElement("div", { className: "title" }, t("addProgramme:addProgramme1")))),
13978
13996
  description: current === 0 && (React.createElement("div", { className: "programme-details-form-container" },
13979
13997
  React.createElement("div", { className: "programme-details-form" },
13980
13998
  React.createElement(Form, { labelCol: { span: 20 }, wrapperCol: { span: 24 }, name: "programme-details", className: "programme-details-form", layout: "vertical", requiredMark: true, form: formOne, onFinish: onFinishStepOne, onValuesChange: onChangeStepOne },
13981
13999
  React.createElement(Row, { className: "row", gutter: [16, 16] },
13982
14000
  React.createElement(Col, { xl: 12, md: 24 },
13983
14001
  React.createElement("div", { className: "details-part-one" },
13984
- React.createElement(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: [
14002
+ React.createElement(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: [
13985
14003
  {
13986
14004
  required: true,
13987
- message: '',
14005
+ message: "",
13988
14006
  },
13989
14007
  {
13990
14008
  validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
13991
14009
  return __generator(this, function (_a) {
13992
- if (String(value).trim() === '' ||
14010
+ if (String(value).trim() === "" ||
13993
14011
  String(value).trim() === undefined ||
13994
14012
  value === null ||
13995
14013
  value === undefined) {
13996
- throw new Error("".concat(t('addProgramme:title'), " ").concat(t('isRequired')));
14014
+ throw new Error("".concat(t("addProgramme:title"), " ").concat(t("isRequired")));
13997
14015
  }
13998
14016
  return [2 /*return*/];
13999
14017
  });
@@ -14001,34 +14019,35 @@ var ProgrammeCreationComponent = function (props) {
14001
14019
  },
14002
14020
  ] },
14003
14021
  React.createElement(Input, { size: "large" })),
14004
- React.createElement(Form.Item, { wrapperCol: { span: 13 }, label: t('addProgramme:sector'), name: "sector", rules: [
14022
+ React.createElement(Form.Item, { wrapperCol: { span: 13 }, label: t("addProgramme:sector"), name: "sector", rules: [
14005
14023
  {
14006
14024
  required: true,
14007
- message: "".concat(t('addProgramme:sector'), " ").concat(t('isRequired')),
14025
+ message: "".concat(t("addProgramme:sector"), " ").concat(t("isRequired")),
14008
14026
  },
14009
14027
  ] },
14010
- React.createElement(Select, { size: "large", onChange: onChangeSector }, (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.MINISTRY
14028
+ React.createElement(Select, { size: "large", onChange: onChangeSector }, (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
14029
+ CompanyRole.MINISTRY
14011
14030
  ? availableSectar === null || availableSectar === void 0 ? void 0 : availableSectar.map(function (sector) { return (React.createElement(Select.Option, { value: sector }, sector)); })
14012
14031
  : Object.values(Sector).map(function (sector) { return (React.createElement(Select.Option, { value: sector }, sector)); }))),
14013
- React.createElement(Form.Item, { wrapperCol: { span: 13 }, label: t('addProgramme:startTime'), name: "startTime", rules: [
14032
+ React.createElement(Form.Item, { wrapperCol: { span: 13 }, label: t("addProgramme:startTime"), name: "startTime", rules: [
14014
14033
  {
14015
14034
  required: true,
14016
- message: '',
14035
+ message: "",
14017
14036
  },
14018
14037
  {
14019
14038
  validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
14020
14039
  var endTime;
14021
14040
  return __generator(this, function (_a) {
14022
- if (String(value).trim() === '' ||
14041
+ if (String(value).trim() === "" ||
14023
14042
  String(value).trim() === undefined ||
14024
14043
  value === null ||
14025
14044
  value === undefined) {
14026
- throw new Error("".concat(t('addProgramme:startTime'), " ").concat(t('isRequired')));
14045
+ throw new Error("".concat(t("addProgramme:startTime"), " ").concat(t("isRequired")));
14027
14046
  }
14028
14047
  else {
14029
- endTime = formOne.getFieldValue('endTime');
14048
+ endTime = formOne.getFieldValue("endTime");
14030
14049
  if (endTime && value >= endTime) {
14031
- throw new Error("".concat(t('addProgramme:endTimeVal')));
14050
+ throw new Error("".concat(t("addProgramme:endTimeVal")));
14032
14051
  }
14033
14052
  }
14034
14053
  return [2 /*return*/];
@@ -14037,12 +14056,12 @@ var ProgrammeCreationComponent = function (props) {
14037
14056
  },
14038
14057
  ] },
14039
14058
  React.createElement(DatePicker, { size: "large", disabledDate: function (currentDate) {
14040
- return currentDate < moment().startOf('day');
14059
+ return currentDate < moment().startOf("day");
14041
14060
  } })),
14042
- React.createElement(Form.Item, { wrapperCol: { span: 13 }, label: t('addProgramme:ghgCovered'), name: "greenHouseGasses", rules: [
14061
+ React.createElement(Form.Item, { wrapperCol: { span: 13 }, label: t("addProgramme:ghgCovered"), name: "greenHouseGasses", rules: [
14043
14062
  {
14044
14063
  required: true,
14045
- message: "".concat(t('addProgramme:ghgCovered'), " ").concat(t('isRequired')),
14064
+ message: "".concat(t("addProgramme:ghgCovered"), " ").concat(t("isRequired")),
14046
14065
  },
14047
14066
  ] },
14048
14067
  React.createElement(Select, { size: "large", mode: "multiple", maxTagCount: 2, allowClear: true },
@@ -14065,10 +14084,10 @@ var ProgrammeCreationComponent = function (props) {
14065
14084
  React.createElement(Select.Option, { value: "SF6" },
14066
14085
  "SF",
14067
14086
  React.createElement("sub", null, "6")))),
14068
- React.createElement(Form.Item, { label: t('addProgramme:designDoc'), name: "designDocument", valuePropName: "fileList", getValueFromEvent: normFile, required: true, rules: [
14087
+ React.createElement(Form.Item, { label: t("addProgramme:designDoc"), name: "designDocument", valuePropName: "fileList", getValueFromEvent: normFile, required: true, rules: [
14069
14088
  {
14070
14089
  required: true,
14071
- message: "".concat(t('addProgramme:designDoc'), " ").concat(t('addProgramme:isRequired')),
14090
+ message: "".concat(t("addProgramme:designDoc"), " ").concat(t("addProgramme:isRequired")),
14072
14091
  },
14073
14092
  {
14074
14093
  validator: function (rule, file) { return __awaiter(void 0, void 0, void 0, function () {
@@ -14077,15 +14096,15 @@ var ProgrammeCreationComponent = function (props) {
14077
14096
  return __generator(this, function (_c) {
14078
14097
  if ((file === null || file === void 0 ? void 0 : file.length) > 0) {
14079
14098
  isCorrectFormat = false;
14080
- if (((_a = file[0]) === null || _a === void 0 ? void 0 : _a.type) === 'application/pdf') {
14099
+ if (((_a = file[0]) === null || _a === void 0 ? void 0 : _a.type) === "application/pdf") {
14081
14100
  isCorrectFormat = true;
14082
14101
  }
14083
14102
  if (!isCorrectFormat) {
14084
- throw new Error("".concat(t('addProgramme:invalidFileFormat')));
14103
+ throw new Error("".concat(t("addProgramme:invalidFileFormat")));
14085
14104
  }
14086
14105
  else if (((_b = file[0]) === null || _b === void 0 ? void 0 : _b.size) > maximumImageSize) {
14087
14106
  // default size format of files would be in bytes -> 1MB = 1000000bytes
14088
- throw new Error("".concat(t('common:maxSizeVal')));
14107
+ throw new Error("".concat(t("common:maxSizeVal")));
14089
14108
  }
14090
14109
  }
14091
14110
  return [2 /*return*/];
@@ -14099,7 +14118,7 @@ var ProgrammeCreationComponent = function (props) {
14099
14118
  // defaultFileList={fileList}
14100
14119
  maxCount: 1 },
14101
14120
  React.createElement(Button, { className: "upload-doc", size: "large", icon: React.createElement(UploadOutlined, null) }, "Upload"))),
14102
- React.createElement(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: [
14121
+ React.createElement(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: [
14103
14122
  {
14104
14123
  required: false,
14105
14124
  },
@@ -14107,16 +14126,19 @@ var ProgrammeCreationComponent = function (props) {
14107
14126
  React.createElement(Select, { size: "large", loading: loadingList }, countries.map(function (country) { return (React.createElement(Select.Option, { key: country.alpha2, value: country.alpha2 }, country.name)); }))),
14108
14127
  React.createElement(Form.List, { name: "ownershipPercentage", initialValue: initialOrganisationOwnershipValues }, function (fields, _a) {
14109
14128
  var add = _a.add, remove = _a.remove;
14110
- return (React.createElement("div", { className: "space-container", style: { width: '100%' } },
14129
+ return (React.createElement("div", { className: "space-container", style: { width: "100%" } },
14111
14130
  fields.map(function (_a) {
14112
14131
  var key = _a.key, name = _a.name, restField = __rest(_a, ["key", "name"]);
14113
- return (React.createElement(Space, { wrap: true, key: key, style: { display: 'flex', marginBottom: 8 }, align: "center", size: 'large' },
14132
+ return (React.createElement(Space, { wrap: true, key: key, style: {
14133
+ display: "flex",
14134
+ marginBottom: 8,
14135
+ }, align: "center", size: "large" },
14114
14136
  React.createElement("div", { className: "ownership-list-item" },
14115
- React.createElement(Form.Item, __assign({}, restField, { label: t('addProgramme:company'), name: [name, 'organisation'], wrapperCol: { span: 24 }, className: "organisation", rules: [
14137
+ React.createElement(Form.Item, __assign({}, restField, { label: t("addProgramme:company"), name: [name, "organisation"], wrapperCol: { span: 24 }, className: "organisation", rules: [
14116
14138
  {
14117
14139
  required: true,
14118
- message: "".concat(t('addProgramme:company'), " ").concat(t('isRequired')),
14119
- validateTrigger: 'onBlur',
14140
+ message: "".concat(t("addProgramme:company"), " ").concat(t("isRequired")),
14141
+ validateTrigger: "onBlur",
14120
14142
  },
14121
14143
  ], shouldUpdate: true }),
14122
14144
  React.createElement(Select, { size: "large", loading: loadingList, disabled: name === 0 &&
@@ -14128,30 +14150,39 @@ var ProgrammeCreationComponent = function (props) {
14128
14150
  CompanyRole.GOVERNMENT &&
14129
14151
  (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) !==
14130
14152
  CompanyRole.MINISTRY &&
14131
- userOrgTaxId === (organisation === null || organisation === void 0 ? void 0 : organisation.taxId)) }, organisation.name)); }))),
14132
- React.createElement(Form.Item, __assign({}, restField, { label: t('addProgramme:proponentPercentage'), className: "ownership-percent", name: [name, 'proponentPercentage'], labelCol: { span: 24 }, wrapperCol: { span: 24 }, required: true, rules: [
14153
+ userOrgTaxId ===
14154
+ (organisation === null || organisation === void 0 ? void 0 : organisation.taxId)) }, organisation.name)); }))),
14155
+ React.createElement(Form.Item, __assign({}, restField, { label: t("addProgramme:proponentPercentage"), className: "ownership-percent", name: [
14156
+ name,
14157
+ "proponentPercentage",
14158
+ ], labelCol: { span: 24 }, wrapperCol: { span: 24 }, required: true, rules: [
14133
14159
  {
14134
14160
  required: true,
14135
- message: "".concat(t('addProgramme:proponentPercentage'), " ").concat(t('isRequired')),
14161
+ message: "".concat(t("addProgramme:proponentPercentage"), " ").concat(t("isRequired")),
14136
14162
  },
14137
14163
  {
14138
14164
  validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
14139
14165
  return __generator(this, function (_a) {
14140
14166
  if (ownershipPercentageValidation &&
14141
14167
  name === 0) {
14142
- throw new Error("".concat(t('addProgramme:proponentPercentage'), " ").concat(t('isRequired')));
14168
+ throw new Error("".concat(t("addProgramme:proponentPercentage"), " ").concat(t("isRequired")));
14143
14169
  }
14144
14170
  return [2 /*return*/];
14145
14171
  });
14146
14172
  }); },
14147
14173
  },
14148
14174
  ], shouldUpdate: true }),
14149
- React.createElement(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 &&
14175
+ React.createElement(InputNumber, { size: "large", min: 1, max: 100, formatter: function (value) {
14176
+ return "".concat(value, "%");
14177
+ }, parser: function (value) {
14178
+ return value.replace("%", "");
14179
+ }, disabled: (fields === null || fields === void 0 ? void 0 : fields.length) < 2 &&
14150
14180
  (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) !==
14151
14181
  CompanyRole.GOVERNMENT &&
14152
14182
  (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) !==
14153
14183
  CompanyRole.MINISTRY })),
14154
- (fields === null || fields === void 0 ? void 0 : fields.length) > 1 && name !== 0 && (React.createElement(MinusCircleOutlined, { className: "dynamic-delete-button", onClick: function () {
14184
+ (fields === null || fields === void 0 ? void 0 : fields.length) > 1 &&
14185
+ name !== 0 && (React.createElement(MinusCircleOutlined, { className: "dynamic-delete-button", onClick: function () {
14155
14186
  remove(name);
14156
14187
  } })))));
14157
14188
  }),
@@ -14160,19 +14191,19 @@ var ProgrammeCreationComponent = function (props) {
14160
14191
  }))),
14161
14192
  React.createElement(Col, { xl: 12, md: 24 },
14162
14193
  React.createElement("div", { className: "details-part-two" },
14163
- React.createElement(Form.Item, { label: t('addProgramme:externalId'), name: "externalId", rules: [
14194
+ React.createElement(Form.Item, { label: t("addProgramme:externalId"), name: "externalId", rules: [
14164
14195
  {
14165
14196
  required: true,
14166
- message: '',
14197
+ message: "",
14167
14198
  },
14168
14199
  {
14169
14200
  validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
14170
14201
  return __generator(this, function (_a) {
14171
- if (String(value).trim() === '' ||
14202
+ if (String(value).trim() === "" ||
14172
14203
  String(value).trim() === undefined ||
14173
14204
  value === null ||
14174
14205
  value === undefined) {
14175
- throw new Error("".concat(t('addProgramme:externalId'), " ").concat(t('isRequired')));
14206
+ throw new Error("".concat(t("addProgramme:externalId"), " ").concat(t("isRequired")));
14176
14207
  }
14177
14208
  return [2 /*return*/];
14178
14209
  });
@@ -14180,13 +14211,14 @@ var ProgrammeCreationComponent = function (props) {
14180
14211
  },
14181
14212
  ] },
14182
14213
  React.createElement(Input, { size: "large" })),
14183
- React.createElement(Form.Item, { wrapperCol: { span: 13 }, label: t('addProgramme:sectoralScope'), name: "sectoralScope", rules: [
14214
+ React.createElement(Form.Item, { wrapperCol: { span: 13 }, label: t("addProgramme:sectoralScope"), name: "sectoralScope", rules: [
14184
14215
  {
14185
14216
  required: true,
14186
- message: "".concat(t('addProgramme:sectoralScope'), " ").concat(t('isRequired')),
14217
+ message: "".concat(t("addProgramme:sectoralScope"), " ").concat(t("isRequired")),
14187
14218
  },
14188
14219
  ] },
14189
- React.createElement(Select, { size: "large" }, (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.MINISTRY
14220
+ React.createElement(Select, { size: "large" }, (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
14221
+ CompanyRole.MINISTRY
14190
14222
  ? availableSecoralScope === null || availableSecoralScope === void 0 ? void 0 : availableSecoralScope.map(function (item) { return (React.createElement(Select.Option, { key: item.value, value: item.value }, item.key)); })
14191
14223
  : selectedSectoralScopes === null || selectedSectoralScopes === void 0 ? void 0 : selectedSectoralScopes.map(function (val) {
14192
14224
  if (val in SectoralScope) {
@@ -14195,25 +14227,25 @@ var ProgrammeCreationComponent = function (props) {
14195
14227
  }
14196
14228
  return null;
14197
14229
  }))),
14198
- React.createElement(Form.Item, { wrapperCol: { span: 13 }, label: t('addProgramme:endTime'), name: "endTime", rules: [
14230
+ React.createElement(Form.Item, { wrapperCol: { span: 13 }, label: t("addProgramme:endTime"), name: "endTime", rules: [
14199
14231
  {
14200
14232
  required: true,
14201
- message: '',
14233
+ message: "",
14202
14234
  },
14203
14235
  {
14204
14236
  validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
14205
14237
  var startTime;
14206
14238
  return __generator(this, function (_a) {
14207
- if (String(value).trim() === '' ||
14239
+ if (String(value).trim() === "" ||
14208
14240
  String(value).trim() === undefined ||
14209
14241
  value === null ||
14210
14242
  value === undefined) {
14211
- throw new Error("".concat(t('addProgramme:endTime'), " ").concat(t('isRequired')));
14243
+ throw new Error("".concat(t("addProgramme:endTime"), " ").concat(t("isRequired")));
14212
14244
  }
14213
14245
  else {
14214
- startTime = formOne.getFieldValue('startTime');
14246
+ startTime = formOne.getFieldValue("startTime");
14215
14247
  if (startTime && value <= startTime) {
14216
- throw new Error("".concat(t('addProgramme:endTimeVal')));
14248
+ throw new Error("".concat(t("addProgramme:endTimeVal")));
14217
14249
  }
14218
14250
  }
14219
14251
  return [2 /*return*/];
@@ -14222,22 +14254,22 @@ var ProgrammeCreationComponent = function (props) {
14222
14254
  },
14223
14255
  ] },
14224
14256
  React.createElement(DatePicker, { size: "large", disabledDate: function (currentDate) {
14225
- return currentDate < moment().endOf('day');
14257
+ return currentDate < moment().endOf("day");
14226
14258
  } })),
14227
- React.createElement(Form.Item, { label: t('addProgramme:ndcScope'), wrapperCol: { span: 13 }, className: "role-group", name: "ndcScope", initialValue: ndcScopeValue, rules: [
14259
+ React.createElement(Form.Item, { label: t("addProgramme:ndcScope"), wrapperCol: { span: 13 }, className: "role-group", name: "ndcScope", initialValue: ndcScopeValue, rules: [
14228
14260
  {
14229
14261
  required: false,
14230
14262
  },
14231
14263
  ] },
14232
14264
  React.createElement(Radio.Group, { size: "large", onChange: onChangeNDCScope, value: ndcScopeValue },
14233
14265
  React.createElement("div", { className: "condition-radio-container" },
14234
- React.createElement(Radio.Button, { className: "condition-radio", value: "true", onClick: function () { return onClickNDCScope('true'); } }, t('addProgramme:conditional'))),
14266
+ React.createElement(Radio.Button, { className: "condition-radio", value: "true", onClick: function () { return onClickNDCScope("true"); } }, t("addProgramme:conditional"))),
14235
14267
  React.createElement("div", { className: "condition-radio-container" },
14236
- React.createElement(Radio.Button, { className: "condition-radio", value: "false", onClick: function () { return onClickNDCScope('false'); } }, t('addProgramme:unConditional'))))),
14237
- React.createElement(Form.Item, { label: t('addProgramme:geographicalLocation'), name: "geographicalLocation", rules: [
14268
+ React.createElement(Radio.Button, { className: "condition-radio", value: "false", onClick: function () { return onClickNDCScope("false"); } }, t("addProgramme:unConditional"))))),
14269
+ React.createElement(Form.Item, { label: t("addProgramme:geographicalLocation"), name: "geographicalLocation", rules: [
14238
14270
  {
14239
14271
  required: true,
14240
- message: "".concat(t('addProgramme:geographicalLocation'), " ").concat(t('isRequired')),
14272
+ message: "".concat(t("addProgramme:geographicalLocation"), " ").concat(t("isRequired")),
14241
14273
  },
14242
14274
  ] },
14243
14275
  React.createElement(Select, { mode: "multiple", size: "large", maxTagCount: 2, onChange: onChangeGeoLocation, loading: loadingList, className: "custom-select", allowClear: true }, regionsList.map(function (region) { return (React.createElement(Select.Option, { value: region }, region)); })))))),
@@ -14246,100 +14278,110 @@ var ProgrammeCreationComponent = function (props) {
14246
14278
  React.createElement(Row, { className: "in-ndc-row" },
14247
14279
  React.createElement(Col, { md: 16, lg: 18, xl: 18 },
14248
14280
  React.createElement("div", { className: "included-label" },
14249
- React.createElement("div", null, t('addProgramme:inNDC')),
14281
+ React.createElement("div", null, t("addProgramme:inNDC")),
14250
14282
  React.createElement("div", { className: "info-container" },
14251
- React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "topLeft", trigger: "hover", title: t('addProgramme:inNDCToolTip'), overlayClassName: "custom-tooltip" },
14283
+ React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "topLeft", trigger: "hover", title: t("addProgramme:inNDCToolTip"), overlayClassName: "custom-tooltip" },
14252
14284
  React.createElement(InfoCircle, { color: "#000000", size: 17 }))))),
14253
14285
  React.createElement(Col, { md: 8, lg: 6, xl: 6, className: "included-val" },
14254
14286
  React.createElement(Radio.Group, { size: "middle", disabled: ndcScopeChanged, value: includedInNDC, onChange: onInCludedNDCChange },
14255
14287
  React.createElement("div", { className: "yes-no-radio-container" },
14256
- React.createElement(Radio.Button, { className: "yes-no-radio", value: true, onClick: function () { return onClickIncludedInNDCScope(true); } }, t('addProgramme:yes'))),
14288
+ React.createElement(Radio.Button, { className: "yes-no-radio", value: true, onClick: function () {
14289
+ return onClickIncludedInNDCScope(true);
14290
+ } }, t("addProgramme:yes"))),
14257
14291
  React.createElement("div", { className: "yes-no-radio-container" },
14258
- React.createElement(Radio.Button, { className: "yes-no-radio", value: false, onClick: function () { return onClickIncludedInNDCScope(false); } }, t('addProgramme:no'))))))),
14292
+ React.createElement(Radio.Button, { className: "yes-no-radio", value: false, onClick: function () {
14293
+ return onClickIncludedInNDCScope(false);
14294
+ } }, t("addProgramme:no"))))))),
14259
14295
  React.createElement(Col, { md: 24, xl: 12, className: "in-nap-col" },
14260
14296
  React.createElement(Row, { className: "in-nap-row" },
14261
14297
  React.createElement(Col, { md: 16, lg: 18, xl: 18 },
14262
14298
  React.createElement("div", { className: "included-label" },
14263
- React.createElement("div", null, t('addProgramme:inNAP')),
14299
+ React.createElement("div", null, t("addProgramme:inNAP")),
14264
14300
  React.createElement("div", { className: "info-container" },
14265
- React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "topLeft", trigger: "hover", title: t('addProgramme:inNAPToolTip'), overlayClassName: "custom-tooltip" },
14301
+ React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "topLeft", trigger: "hover", title: t("addProgramme:inNAPToolTip"), overlayClassName: "custom-tooltip" },
14266
14302
  React.createElement(InfoCircle, { color: "#000000", size: 17 }))))),
14267
14303
  React.createElement(Col, { md: 8, lg: 6, xl: 6, className: "included-val" },
14268
14304
  React.createElement(Radio.Group, { size: "middle", onChange: onInCludedNAPChange, value: includedInNAP },
14269
14305
  React.createElement("div", { className: "yes-no-radio-container" },
14270
- React.createElement(Radio.Button, { className: "yes-no-radio", value: true, onClick: function () { return onClickIncludedInNAPScope(true); } }, t('addProgramme:yes'))),
14306
+ React.createElement(Radio.Button, { className: "yes-no-radio", value: true, onClick: function () {
14307
+ return onClickIncludedInNAPScope(true);
14308
+ } }, t("addProgramme:yes"))),
14271
14309
  React.createElement("div", { className: "yes-no-radio-container" },
14272
- React.createElement(Radio.Button, { className: "yes-no-radio", value: false, onClick: function () { return onClickIncludedInNAPScope(false); } }, t('addProgramme:no')))))))),
14310
+ React.createElement(Radio.Button, { className: "yes-no-radio", value: false, onClick: function () {
14311
+ return onClickIncludedInNAPScope(false);
14312
+ } }, t("addProgramme:no")))))))),
14273
14313
  React.createElement("div", { className: "steps-actions" },
14274
- React.createElement(Button, { type: "primary", htmlType: "submit", loading: loading, onClick: checkOrgPercentageValidation }, t('addProgramme:next'))))))),
14314
+ React.createElement(Button, { type: "primary", htmlType: "submit", loading: loading, onClick: checkOrgPercentageValidation }, t("addProgramme:next"))))))),
14275
14315
  },
14276
14316
  {
14277
14317
  title: (React.createElement("div", { className: "step-title-container" },
14278
14318
  React.createElement("div", { className: "step-count" }, "02"),
14279
- React.createElement("div", { className: "title" }, t('addProgramme:addProgramme2')))),
14319
+ React.createElement("div", { className: "title" }, t("addProgramme:addProgramme2")))),
14280
14320
  description: current === 1 && (React.createElement("div", { className: "programme-sought-form-container" },
14281
14321
  React.createElement("div", { className: "programme-sought-form" },
14282
14322
  React.createElement(Form, { labelCol: { span: 20 }, wrapperCol: { span: 24 }, name: "programme-sought", className: "programme-sought-form", layout: "vertical", requiredMark: true, form: formTwo, onFinish: onFinishStepTwo, onValuesChange: onFormTwoValuesChane },
14283
14323
  React.createElement(Row, { className: "row", gutter: [16, 16] },
14284
14324
  React.createElement(Col, { xl: 12, md: 24 },
14285
14325
  React.createElement("div", { className: "details-part-one" },
14286
- React.createElement(Form.Item, { label: t('addProgramme:estimatedProgrammeCostUSD'), name: "estimatedProgrammeCostUSD", rules: [
14326
+ React.createElement(Form.Item, { label: t("addProgramme:estimatedProgrammeCostUSD"), name: "estimatedProgrammeCostUSD", rules: [
14287
14327
  {
14288
14328
  required: true,
14289
- message: '',
14329
+ message: "",
14290
14330
  },
14291
14331
  {
14292
14332
  validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
14293
14333
  return __generator(this, function (_a) {
14294
- if (String(value).trim() === '' ||
14334
+ if (String(value).trim() === "" ||
14295
14335
  String(value).trim() === undefined ||
14296
14336
  value === null ||
14297
14337
  value === undefined) {
14298
- throw new Error("".concat(t('addProgramme:estimatedProgrammeCostUSD'), " ").concat(t('isRequired')));
14338
+ throw new Error("".concat(t("addProgramme:estimatedProgrammeCostUSD"), " ").concat(t("isRequired")));
14299
14339
  }
14300
- else if (!isNaN(value) && Number(value) > 0) {
14340
+ else if (!isNaN(value) &&
14341
+ Number(value) > 0) {
14301
14342
  return [2 /*return*/, Promise.resolve()];
14302
14343
  }
14303
14344
  else {
14304
- throw new Error("".concat(t('addProgramme:estimatedProgrammeCostUSD'), " ").concat(t('isInvalid')));
14345
+ throw new Error("".concat(t("addProgramme:estimatedProgrammeCostUSD"), " ").concat(t("isInvalid")));
14305
14346
  }
14306
14347
  });
14307
14348
  }); },
14308
14349
  },
14309
14350
  ] },
14310
- React.createElement(InputNumber, { size: "large", style: { width: '100%', paddingRight: 12 } })),
14311
- React.createElement(Form.Item, { label: t('addProgramme:minViableCarbonPrice'), name: "minViableCarbonPrice" },
14312
- React.createElement(InputNumber, { disabled: true, size: "large", style: { width: '100%', paddingRight: 12 } })))),
14351
+ React.createElement(InputNumber, { size: "large", style: { width: "100%", paddingRight: 12 } })),
14352
+ React.createElement(Form.Item, { label: t("addProgramme:minViableCarbonPrice"), name: "minViableCarbonPrice" },
14353
+ React.createElement(InputNumber, { disabled: true, size: "large", style: { width: "100%", paddingRight: 12 } })))),
14313
14354
  React.createElement(Col, { xl: 12, md: 24 },
14314
14355
  React.createElement("div", { className: "details-part-two" },
14315
- React.createElement(Form.Item, { label: t('addProgramme:creditEst'), name: "creditEst", rules: [
14356
+ React.createElement(Form.Item, { label: t("addProgramme:creditEst"), name: "creditEst", rules: [
14316
14357
  {
14317
14358
  required: true,
14318
- message: '',
14359
+ message: "",
14319
14360
  },
14320
14361
  {
14321
14362
  validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
14322
14363
  return __generator(this, function (_a) {
14323
- if (String(value).trim() === '' ||
14364
+ if (String(value).trim() === "" ||
14324
14365
  String(value).trim() === undefined ||
14325
14366
  value === null ||
14326
14367
  value === undefined) {
14327
- throw new Error("".concat(t('addProgramme:creditEst'), " ").concat(t('isRequired')));
14368
+ throw new Error("".concat(t("addProgramme:creditEst"), " ").concat(t("isRequired")));
14328
14369
  }
14329
- else if (!isNaN(value) && Number(value) > 0) {
14370
+ else if (!isNaN(value) &&
14371
+ Number(value) > 0) {
14330
14372
  return [2 /*return*/, Promise.resolve()];
14331
14373
  }
14332
14374
  else {
14333
- throw new Error("".concat(t('addProgramme:creditEst'), " ").concat(t('isInvalid')));
14375
+ throw new Error("".concat(t("addProgramme:creditEst"), " ").concat(t("isInvalid")));
14334
14376
  }
14335
14377
  });
14336
14378
  }); },
14337
14379
  },
14338
14380
  ] },
14339
- React.createElement(InputNumber, { size: "large", style: { width: '100%', paddingRight: 12 } }))))),
14381
+ React.createElement(InputNumber, { size: "large", style: { width: "100%", paddingRight: 12 } }))))),
14340
14382
  React.createElement("div", { className: "steps-actions" },
14341
- React.createElement(Button, { type: "primary", htmlType: "submit", loading: loading }, t('addProgramme:submit')),
14342
- current === 1 && (React.createElement(Button, { className: "back-btn", onClick: function () { return prevOne(); }, loading: loading }, t('addProgramme:back')))))))),
14383
+ React.createElement(Button, { type: "primary", htmlType: "submit", loading: loading }, t("addProgramme:submit")),
14384
+ current === 1 && (React.createElement(Button, { className: "back-btn", onClick: function () { return prevOne(); }, loading: loading }, t("addProgramme:back")))))))),
14343
14385
  },
14344
14386
  ] })))));
14345
14387
  };
@@ -19445,7 +19487,7 @@ var Social = function (props) {
19445
19487
  };
19446
19488
 
19447
19489
  var CoBenifitsComponent = function (props) {
19448
- 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;
19490
+ 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;
19449
19491
  var _b = useState(), coBenefitDetails = _b[0], setCoBenefitDetails = _b[1];
19450
19492
  var _c = useState(true), isSocialFormValid = _c[0], setIsSocialFormValid = _c[1];
19451
19493
  var _d = useState(true), isAssessmentFormValid = _d[0], setIsAssessmentFormValid = _d[1];
@@ -19480,7 +19522,7 @@ var CoBenifitsComponent = function (props) {
19480
19522
  ? (coBenifitsViewDetails === null || coBenifitsViewDetails === void 0 ? void 0 : coBenifitsViewDetails.sdgGoals)
19481
19523
  ? coBenifitsViewDetails === null || coBenifitsViewDetails === void 0 ? void 0 : coBenifitsViewDetails.sdgGoals
19482
19524
  : []
19483
- : coBenefitsDetails === null || coBenefitsDetails === void 0 ? void 0 : coBenefitsDetails.sdgGoals, viewOnly: viewOnly || false })),
19525
+ : coBenefitsDetails === null || coBenefitsDetails === void 0 ? void 0 : coBenefitsDetails.sdgGoals, viewOnly: viewOnly || false, sdgGoalImages: sdgGoalImages })),
19484
19526
  },
19485
19527
  {
19486
19528
  label: t("coBenifits:genderPart"),
@@ -19682,7 +19724,7 @@ var CoBenifitsComponent = function (props) {
19682
19724
  };
19683
19725
 
19684
19726
  var AddNdcActionComponent = function (props) {
19685
- var useConnection = props.useConnection, useLocation = props.useLocation, onNavigateToProgrammeManagementView = props.onNavigateToProgrammeManagementView, onNavigateToProgrammeView = props.onNavigateToProgrammeView, t = props.t;
19727
+ var useConnection = props.useConnection, useLocation = props.useLocation, onNavigateToProgrammeManagementView = props.onNavigateToProgrammeManagementView, onNavigateToProgrammeView = props.onNavigateToProgrammeView, sdgGoalImages = props.sdgGoalImages, t = props.t;
19686
19728
  var _a = useState(1), current = _a[0], setCurrent = _a[1];
19687
19729
  var _b = useState(), programmeDetails = _b[0], setprogrammeDetails = _b[1];
19688
19730
  var _c = useState(), ndcActionDetails = _c[0], setNdcActionDetails = _c[1];
@@ -19823,7 +19865,7 @@ var AddNdcActionComponent = function (props) {
19823
19865
  description: (React.createElement("div", { className: current !== 2 ? "hide" : "" },
19824
19866
  React.createElement(CoBenifitsComponent, { onClickedBackBtn: onClickBackCoBenefits, coBenefitsDetails: ndcActionDetails ? ndcActionDetails.coBenefitsProperties : {}, onFormSubmit: onCoBenefitsSubmit, submitButtonText: isProjectReportsVisible()
19825
19867
  ? t("ndcAction:next")
19826
- : t("ndcAction:submit"), loading: loading, t: t }))),
19868
+ : t("ndcAction:submit"), loading: loading, sdgGoalImages: sdgGoalImages, t: t }))),
19827
19869
  },
19828
19870
  ];
19829
19871
  if (isProjectReportsVisible()) {