@undp/carbon-library 1.0.66 → 1.0.68

Sign up to get free protection for your applications and to get access to all the features.
package/dist/cjs/index.js CHANGED
@@ -4374,6 +4374,13 @@ exports.SdgGoals = void 0;
4374
4374
  SdgGoals["partnership"] = "Partnerships for the Goals";
4375
4375
  })(exports.SdgGoals || (exports.SdgGoals = {}));
4376
4376
 
4377
+ exports.CarbonSystemType = void 0;
4378
+ (function (CarbonSystemType) {
4379
+ CarbonSystemType[CarbonSystemType["REGISTRY"] = 0] = "REGISTRY";
4380
+ CarbonSystemType[CarbonSystemType["MRV"] = 1] = "MRV";
4381
+ CarbonSystemType[CarbonSystemType["UNIFIED"] = 2] = "UNIFIED";
4382
+ })(exports.CarbonSystemType || (exports.CarbonSystemType = {}));
4383
+
4377
4384
  exports.ConfigurationSettingsType = void 0;
4378
4385
  (function (ConfigurationSettingsType) {
4379
4386
  ConfigurationSettingsType[ConfigurationSettingsType["isTransferFrozen"] = 0] = "isTransferFrozen";
@@ -5356,9 +5363,18 @@ var CompanyProfileComponent = function (props) {
5356
5363
  var css_248z$g = ".programme-management .programme-title-bar {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n padding: 0px 0px 30px 0px; }\n .programme-management .programme-title-bar .title {\n display: flex;\n flex-direction: column;\n justify-content: space-between; }\n .programme-management .programme-title-bar .actions {\n display: flex;\n align-items: center;\n justify-content: flex-end; }\n .programme-management .programme-title-bar .flex-display {\n margin-left: 15px; }\n\n.programme-management .certify-list {\n width: 110px;\n display: flex;\n align-items: center;\n flex-wrap: wrap; }\n .programme-management .certify-list .profile-icon {\n margin-bottom: 4px; }\n\n.programme-management .table-actions-section {\n margin-bottom: 0px; }\n .programme-management .table-actions-section input {\n font-family: \"Inter\";\n font-size: 0.8rem; }\n\n.programme-management .all-check {\n margin-right: 10px; }\n .programme-management .all-check .ant-checkbox-inner::after {\n background-color: rgba(58, 53, 65, 0.5); }\n .programme-management .all-check .ant-checkbox-checked .ant-checkbox-inner::after {\n background-color: transparent; }\n .programme-management .all-check .ant-checkbox-checked .ant-checkbox-inner {\n background-color: rgba(58, 53, 65, 0.5);\n border: none; }\n\n.programme-management .ant-checkbox-checked .ant-checkbox-input[value=\"Retired\"] + .ant-checkbox-inner {\n background-color: rgba(58, 53, 65, 0.4);\n border: none; }\n\n.programme-management .ant-checkbox-checked .ant-checkbox-input[value=\"AwaitingAuthorization\"] + .ant-checkbox-inner {\n background-color: rgba(237, 77, 71, 0.6);\n border: none; }\n\n.programme-management .ant-checkbox-checked .ant-checkbox-input[value=\"Rejected\"] + .ant-checkbox-inner {\n background-color: rgba(58, 53, 65, 0.4);\n border: none; }\n\n.programme-management .ant-checkbox-checked .ant-checkbox-input[value=\"Authorised\"] + .ant-checkbox-inner {\n background-color: #16b1ff;\n border: none; }\n\n.programme-management .ant-checkbox-checked .ant-checkbox-input[value=\"Approved\"] + .ant-checkbox-inner {\n background-color: rgba(145, 85, 253, 0.6);\n border: none; }\n\n.programme-management .ant-checkbox-checked .ant-checkbox-input[value=\"Transferred\"] + .ant-checkbox-inner {\n background-color: rgba(118, 195, 39, 0.6);\n border: none; }\n";
5357
5364
  styleInject(css_248z$g);
5358
5365
 
5366
+ var ProgrammeStageUnified;
5367
+ (function (ProgrammeStageUnified) {
5368
+ ProgrammeStageUnified["New"] = "New";
5369
+ ProgrammeStageUnified["AwaitingAuthorization"] = "Pending";
5370
+ ProgrammeStageUnified["Authorised"] = "Authorised";
5371
+ ProgrammeStageUnified["Approved"] = "Approved";
5372
+ ProgrammeStageUnified["Rejected"] = "Rejected";
5373
+ })(ProgrammeStageUnified || (ProgrammeStageUnified = {}));
5374
+
5359
5375
  var Search$1 = antd.Input.Search;
5360
5376
  var ProgrammeManagementComponent = function (props) {
5361
- var t = props.t, visibleColumns = props.visibleColumns, useUserContext = props.useUserContext, useConnection = props.useConnection, onNavigateToProgrammeView = props.onNavigateToProgrammeView, onClickAddProgramme = props.onClickAddProgramme, enableAddProgramme = props.enableAddProgramme, useAbilityContext = props.useAbilityContext;
5377
+ var t = props.t, visibleColumns = props.visibleColumns, useUserContext = props.useUserContext, useConnection = props.useConnection, onNavigateToProgrammeView = props.onNavigateToProgrammeView, onClickAddProgramme = props.onClickAddProgramme, enableAddProgramme = props.enableAddProgramme, useAbilityContext = props.useAbilityContext, carbonSystemType = props.carbonSystemType;
5362
5378
  var _a = useConnection(); _a.get; _a.delete; var post = _a.post;
5363
5379
  var _b = React.useState(), totalProgramme = _b[0], setTotalProgramme = _b[1];
5364
5380
  var _c = React.useState(false), loading = _c[0], setLoading = _c[1];
@@ -5375,7 +5391,11 @@ var ProgrammeManagementComponent = function (props) {
5375
5391
  var _p = React.useState(false), ministryLevelFilter = _p[0], setMinistryLevelFilter = _p[1];
5376
5392
  var userInfoState = useUserContext().userInfoState;
5377
5393
  var ability = useAbilityContext();
5378
- var stageObject = enableAddProgramme ? exports.ProgrammeStageMRV : exports.ProgrammeStage;
5394
+ var stageObject = carbonSystemType === exports.CarbonSystemType.MRV
5395
+ ? exports.ProgrammeStageMRV
5396
+ : carbonSystemType === exports.CarbonSystemType.REGISTRY
5397
+ ? exports.ProgrammeStage
5398
+ : ProgrammeStageUnified;
5379
5399
  var statusOptions = Object.keys(stageObject).map(function (k, index) { return ({
5380
5400
  label: Object.values(stageObject)[index],
5381
5401
  value: k,
@@ -13492,20 +13512,27 @@ var maximumImageSize = process.env.REACT_APP_MAXIMUM_FILE_SIZE
13492
13512
  : 5000000;
13493
13513
  var sectoralScopes = {
13494
13514
  Energy: [
13495
- 'Energy Industries (Renewable – / Non-Renewable Sources)',
13496
- 'Energy Distribution',
13497
- 'Energy Demand',
13515
+ "Energy Industries (Renewable – / Non-Renewable Sources)",
13516
+ "Energy Distribution",
13517
+ "Energy Demand",
13518
+ ],
13519
+ Transport: ["Transport"],
13520
+ Manufacturing: [
13521
+ "Manufacturing Industries",
13522
+ "Chemical Industries",
13523
+ "Metal Production",
13524
+ ],
13525
+ Forestry: ["Afforestation and Reforestation"],
13526
+ Waste: [
13527
+ "Waste Handling and Disposal",
13528
+ "Fugitive Emissions From Fuels (Solid, Oil and Gas)",
13498
13529
  ],
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'],
13530
+ Agriculture: ["Agriculture"],
13504
13531
  Other: [
13505
- 'Mining/Mineral Production',
13506
- 'Construction',
13507
- 'Fugitive Emissions From Production and Consumption of Halocarbons and Sulphur Hexafluoride',
13508
- 'Solvent Use',
13532
+ "Mining/Mineral Production",
13533
+ "Construction",
13534
+ "Fugitive Emissions From Production and Consumption of Halocarbons and Sulphur Hexafluoride",
13535
+ "Solvent Use",
13509
13536
  ],
13510
13537
  };
13511
13538
  var ProgrammeCreationComponent = function (props) {
@@ -13528,12 +13555,12 @@ var ProgrammeCreationComponent = function (props) {
13528
13555
  var _m = React.useState(), includedInNAP = _m[0], setIncludedInNAP = _m[1];
13529
13556
  var _o = React.useState([]), countries = _o[0], setCountries = _o[1];
13530
13557
  var _p = React.useState([]), organisationsList = _p[0], setOrganisationList = _p[1];
13531
- var _q = React.useState(''), userOrgTaxId = _q[0], setUserOrgTaxId = _q[1];
13558
+ var _q = React.useState(""), userOrgTaxId = _q[0], setUserOrgTaxId = _q[1];
13532
13559
  var _r = React.useState([]), regionsList = _r[0], setRegionsList = _r[1];
13533
13560
  var _s = React.useState(); _s[0]; var setProgrammeDetailsObj = _s[1];
13534
13561
  var _t = React.useState(), selectedOrgs = _t[0], setSelectedOrgs = _t[1];
13535
13562
  var _u = React.useState(false), ownershipPercentageValidation = _u[0], setOwnershipPercentageValidation = _u[1];
13536
- var _v = React.useState(''), selectedSector = _v[0], setSelectedSector = _v[1];
13563
+ var _v = React.useState(""), selectedSector = _v[0], setSelectedSector = _v[1];
13537
13564
  var _w = React.useState([]); _w[0]; var setMinistrySectoralScope = _w[1];
13538
13565
  var _x = React.useState([]), availableSecoralScope = _x[0], setAvailableSectoralScope = _x[1];
13539
13566
  var _y = React.useState([]), availableSectar = _y[0], setAvailableSectar = _y[1];
@@ -13572,7 +13599,7 @@ var ProgrammeCreationComponent = function (props) {
13572
13599
  _a.label = 1;
13573
13600
  case 1:
13574
13601
  _a.trys.push([1, 3, 4, 5]);
13575
- return [4 /*yield*/, get('national/organisation/countries')];
13602
+ return [4 /*yield*/, get("national/organisation/countries")];
13576
13603
  case 2:
13577
13604
  response = _a.sent();
13578
13605
  if (response.data) {
@@ -13581,7 +13608,7 @@ var ProgrammeCreationComponent = function (props) {
13581
13608
  return [3 /*break*/, 5];
13582
13609
  case 3:
13583
13610
  error_1 = _a.sent();
13584
- console.log('Error in getting country list', error_1);
13611
+ console.log("Error in getting country list", error_1);
13585
13612
  return [3 /*break*/, 5];
13586
13613
  case 4:
13587
13614
  setLoadingList(false);
@@ -13599,14 +13626,14 @@ var ProgrammeCreationComponent = function (props) {
13599
13626
  _a.label = 1;
13600
13627
  case 1:
13601
13628
  _a.trys.push([1, 3, 4, 5]);
13602
- return [4 /*yield*/, post('national/organisation/regions', {
13629
+ return [4 /*yield*/, post("national/organisation/regions", {
13603
13630
  page: 1,
13604
13631
  size: 100,
13605
13632
  filterAnd: [
13606
13633
  {
13607
- key: 'lang',
13608
- operation: '=',
13609
- value: 'en',
13634
+ key: "lang",
13635
+ operation: "=",
13636
+ value: "en",
13610
13637
  },
13611
13638
  ],
13612
13639
  })];
@@ -13614,12 +13641,12 @@ var ProgrammeCreationComponent = function (props) {
13614
13641
  response = _a.sent();
13615
13642
  if (response.data) {
13616
13643
  regionNames = response.data.map(function (item) { return item.regionName; });
13617
- setRegionsList(__spreadArray(['National'], regionNames, true));
13644
+ setRegionsList(__spreadArray(["National"], regionNames, true));
13618
13645
  }
13619
13646
  return [3 /*break*/, 5];
13620
13647
  case 3:
13621
13648
  error_2 = _a.sent();
13622
- console.log('Error in getting regions list', error_2);
13649
+ console.log("Error in getting regions list", error_2);
13623
13650
  return [3 /*break*/, 5];
13624
13651
  case 4:
13625
13652
  setLoadingList(false);
@@ -13637,13 +13664,13 @@ var ProgrammeCreationComponent = function (props) {
13637
13664
  _a.label = 1;
13638
13665
  case 1:
13639
13666
  _a.trys.push([1, 3, 4, 5]);
13640
- return [4 /*yield*/, post('national/organisation/queryNames', {
13667
+ return [4 /*yield*/, post("national/organisation/queryNames", {
13641
13668
  page: 1,
13642
13669
  size: 100,
13643
13670
  filterAnd: [
13644
13671
  {
13645
- key: 'companyRole',
13646
- operation: '=',
13672
+ key: "companyRole",
13673
+ operation: "=",
13647
13674
  value: exports.CompanyRole.PROGRAMME_DEVELOPER,
13648
13675
  },
13649
13676
  ],
@@ -13659,7 +13686,7 @@ var ProgrammeCreationComponent = function (props) {
13659
13686
  return [3 /*break*/, 5];
13660
13687
  case 3:
13661
13688
  error_3 = _a.sent();
13662
- console.log('Error in getting organisation list', error_3);
13689
+ console.log("Error in getting organisation list", error_3);
13663
13690
  return [3 /*break*/, 5];
13664
13691
  case 4:
13665
13692
  setLoadingList(false);
@@ -13678,13 +13705,13 @@ var ProgrammeCreationComponent = function (props) {
13678
13705
  _k.label = 1;
13679
13706
  case 1:
13680
13707
  _k.trys.push([1, 3, , 4]);
13681
- return [4 /*yield*/, post('national/user/query', {
13708
+ return [4 /*yield*/, post("national/user/query", {
13682
13709
  page: 1,
13683
13710
  size: 10,
13684
13711
  filterAnd: [
13685
13712
  {
13686
- key: 'id',
13687
- operation: '=',
13713
+ key: "id",
13714
+ operation: "=",
13688
13715
  value: userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.id,
13689
13716
  },
13690
13717
  ],
@@ -13719,19 +13746,23 @@ var ProgrammeCreationComponent = function (props) {
13719
13746
  }
13720
13747
  });
13721
13748
  });
13722
- setAvailableSectar(__spreadArray(__spreadArray([], sectors_1, true), ['Health', 'Education', 'Hospitality'], false));
13749
+ setAvailableSectar(__spreadArray(__spreadArray([], sectors_1, true), [
13750
+ "Health",
13751
+ "Education",
13752
+ "Hospitality",
13753
+ ], false));
13723
13754
  }
13724
13755
  }
13725
13756
  setLoading(false);
13726
13757
  return [3 /*break*/, 4];
13727
13758
  case 3:
13728
13759
  error_4 = _k.sent();
13729
- console.log('Error in getting users', error_4);
13760
+ console.log("Error in getting users", error_4);
13730
13761
  antd.message.open({
13731
- type: 'error',
13762
+ type: "error",
13732
13763
  content: error_4.message,
13733
13764
  duration: 3,
13734
- style: { textAlign: 'right', marginRight: 15, marginTop: 10 },
13765
+ style: { textAlign: "right", marginRight: 15, marginTop: 10 },
13735
13766
  });
13736
13767
  setLoading(false);
13737
13768
  return [3 /*break*/, 4];
@@ -13774,13 +13805,13 @@ var ProgrammeCreationComponent = function (props) {
13774
13805
  (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) !== exports.CompanyRole.MINISTRY
13775
13806
  ? ownershipPercentage === null || ownershipPercentage === void 0 ? void 0 : ownershipPercentage.slice(1).map(function (item) { return item.organisation; })
13776
13807
  : ownershipPercentage === null || ownershipPercentage === void 0 ? void 0 : ownershipPercentage.map(function (item) { return item.organisation; });
13777
- logoBase64 = '';
13808
+ logoBase64 = "";
13778
13809
  logoUrls = [];
13779
13810
  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
13811
  return [4 /*yield*/, getBase64((_b = values === null || values === void 0 ? void 0 : values.designDocument[0]) === null || _b === void 0 ? void 0 : _b.originFileObj)];
13781
13812
  case 1:
13782
13813
  logoBase64 = _c.sent();
13783
- logoUrls = logoBase64 === null || logoBase64 === void 0 ? void 0 : logoBase64.split(',');
13814
+ logoUrls = logoBase64 === null || logoBase64 === void 0 ? void 0 : logoBase64.split(",");
13784
13815
  _c.label = 2;
13785
13816
  case 2:
13786
13817
  propTaxIds = (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) !== exports.CompanyRole.GOVERNMENT &&
@@ -13789,19 +13820,19 @@ var ProgrammeCreationComponent = function (props) {
13789
13820
  duplicateIds = new Set(propTaxIds).size !== propTaxIds.length;
13790
13821
  if (totalPercentage !== 100) {
13791
13822
  antd.message.open({
13792
- type: 'error',
13793
- content: t('addProgramme:proponentPercentValidation'),
13823
+ type: "error",
13824
+ content: t("addProgramme:proponentPercentValidation"),
13794
13825
  duration: 4,
13795
- style: { textAlign: 'right', marginRight: 15, marginTop: 10 },
13826
+ style: { textAlign: "right", marginRight: 15, marginTop: 10 },
13796
13827
  });
13797
13828
  setLoading(false);
13798
13829
  }
13799
13830
  else if (duplicateIds) {
13800
13831
  antd.message.open({
13801
- type: 'error',
13802
- content: t('addProgramme:duplicateOrg'),
13832
+ type: "error",
13833
+ content: t("addProgramme:duplicateOrg"),
13803
13834
  duration: 4,
13804
- style: { textAlign: 'right', marginRight: 15, marginTop: 10 },
13835
+ style: { textAlign: "right", marginRight: 15, marginTop: 10 },
13805
13836
  });
13806
13837
  setLoading(false);
13807
13838
  }
@@ -13811,14 +13842,16 @@ var ProgrammeCreationComponent = function (props) {
13811
13842
  externalId: values === null || values === void 0 ? void 0 : values.externalId,
13812
13843
  sectoralScope: values === null || values === void 0 ? void 0 : values.sectoralScope,
13813
13844
  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(),
13845
+ startTime: moment(values === null || values === void 0 ? void 0 : values.startTime).startOf("day").unix(),
13846
+ endTime: moment(values === null || values === void 0 ? void 0 : values.endTime).endOf("day").unix(),
13816
13847
  proponentTaxVatId: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) !== exports.CompanyRole.GOVERNMENT &&
13817
13848
  (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) !== exports.CompanyRole.MINISTRY
13818
13849
  ? __spreadArray([userOrgTaxId], proponentTxIds, true) : proponentTxIds,
13819
13850
  proponentPercentage: proponentPercentages,
13820
13851
  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 &&
13852
+ (values === null || values === void 0 ? void 0 : values.ndcScope) !== null && {
13853
+ ndcScope: (values === null || values === void 0 ? void 0 : values.ndcScope) === "true" ? true : false,
13854
+ })), (includedInNDC !== undefined &&
13822
13855
  includedInNDC !== null && { includedInNdc: includedInNDC })), (includedInNAP !== undefined &&
13823
13856
  includedInNAP !== null && { includedInNap: includedInNAP })),
13824
13857
  };
@@ -13842,29 +13875,28 @@ var ProgrammeCreationComponent = function (props) {
13842
13875
  _a.label = 1;
13843
13876
  case 1:
13844
13877
  _a.trys.push([1, 3, 4, 5]);
13845
- return [4 /*yield*/, post('national/programme/create', payload)];
13878
+ return [4 /*yield*/, post("national/programme/create", payload)];
13846
13879
  case 2:
13847
13880
  response = _a.sent();
13848
- console.log('Programme creation -> ', response);
13849
- if ((response === null || response === void 0 ? void 0 : response.statusText) === 'SUCCESS') {
13881
+ console.log("Programme creation -> ", response);
13882
+ if ((response === null || response === void 0 ? void 0 : response.statusText) === "SUCCESS") {
13850
13883
  antd.message.open({
13851
- type: 'success',
13852
- content: t('addProgramme:programmeCreationSuccess'),
13884
+ type: "success",
13885
+ content: t("addProgramme:programmeCreationSuccess"),
13853
13886
  duration: 4,
13854
- style: { textAlign: 'right', marginRight: 15, marginTop: 10 },
13887
+ style: { textAlign: "right", marginRight: 15, marginTop: 10 },
13855
13888
  });
13856
13889
  }
13857
- //navigate('/programmeManagement/view');
13858
13890
  onNavigateToProgrammeView();
13859
13891
  return [3 /*break*/, 5];
13860
13892
  case 3:
13861
13893
  error_5 = _a.sent();
13862
- console.log('Error in programme creation - ', error_5);
13894
+ console.log("Error in programme creation - ", error_5);
13863
13895
  antd.message.open({
13864
- type: 'error',
13896
+ type: "error",
13865
13897
  content: error_5 === null || error_5 === void 0 ? void 0 : error_5.message,
13866
13898
  duration: 4,
13867
- style: { textAlign: 'right', marginRight: 15, marginTop: 10 },
13899
+ style: { textAlign: "right", marginRight: 15, marginTop: 10 },
13868
13900
  });
13869
13901
  return [3 /*break*/, 5];
13870
13902
  case 4:
@@ -13898,10 +13930,10 @@ var ProgrammeCreationComponent = function (props) {
13898
13930
  (allValues === null || allValues === void 0 ? void 0 : allValues.estimatedProgrammeCostUSD) !== null &&
13899
13931
  (allValues === null || allValues === void 0 ? void 0 : allValues.estimatedProgrammeCostUSD) > 0) {
13900
13932
  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));
13933
+ formTwo.setFieldValue("minViableCarbonPrice", addCommSepRound(minViableCarbonPrice));
13902
13934
  }
13903
13935
  else {
13904
- formTwo.setFieldValue('minViableCarbonPrice', '');
13936
+ formTwo.setFieldValue("minViableCarbonPrice", "");
13905
13937
  }
13906
13938
  };
13907
13939
  var onChangeNDCScope = function (event) {
@@ -13918,7 +13950,7 @@ var ProgrammeCreationComponent = function (props) {
13918
13950
  var onClickNDCScope = function (value) {
13919
13951
  if (value === ndcScopeValue) {
13920
13952
  setNdcScopeValue(null);
13921
- formOne.setFieldValue('ndcScope', null);
13953
+ formOne.setFieldValue("ndcScope", null);
13922
13954
  setNdcScopeChanged(undefined);
13923
13955
  setIncludedInNDC(undefined);
13924
13956
  }
@@ -13940,41 +13972,43 @@ var ProgrammeCreationComponent = function (props) {
13940
13972
  }
13941
13973
  };
13942
13974
  var onChangeGeoLocation = function (values) {
13943
- if (values.includes('National')) {
13975
+ if (values.includes("National")) {
13944
13976
  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));
13977
+ var newBuyerValues = buyerCountryValues === null || buyerCountryValues === void 0 ? void 0 : buyerCountryValues.filter(function (item) { return item !== "National"; });
13978
+ formOne.setFieldValue("geographicalLocation", __spreadArray([], newBuyerValues, true));
13947
13979
  }
13948
13980
  };
13949
13981
  var onInCludedNAPChange = function (event) {
13950
13982
  var _a, _b;
13951
- if (((_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.value) === 'inNAP') {
13983
+ if (((_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.value) === "inNAP") {
13952
13984
  setIncludedInNAP(true);
13953
13985
  }
13954
- else if (((_b = event === null || event === void 0 ? void 0 : event.target) === null || _b === void 0 ? void 0 : _b.value) === 'notInNAP') {
13986
+ else if (((_b = event === null || event === void 0 ? void 0 : event.target) === null || _b === void 0 ? void 0 : _b.value) === "notInNAP") {
13955
13987
  setIncludedInNAP(false);
13956
13988
  }
13957
13989
  };
13958
13990
  var onInCludedNDCChange = function (event) {
13959
13991
  var _a, _b;
13960
- if (((_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.value) === 'inNDC') {
13992
+ if (((_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.value) === "inNDC") {
13961
13993
  setIncludedInNDC(true);
13962
13994
  }
13963
- else if (((_b = event === null || event === void 0 ? void 0 : event.target) === null || _b === void 0 ? void 0 : _b.value) === 'notInNDC') {
13995
+ else if (((_b = event === null || event === void 0 ? void 0 : event.target) === null || _b === void 0 ? void 0 : _b.value) === "notInNDC") {
13964
13996
  setIncludedInNDC(false);
13965
13997
  }
13966
13998
  };
13967
13999
  var onChangeStepOne = function (changedValues, allValues) {
13968
14000
  var _a, _b;
13969
14001
  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;
14002
+ var orgPercentValidation = ((_b = allValues === null || allValues === void 0 ? void 0 : allValues.ownershipPercentage[0]) === null || _b === void 0 ? void 0 : _b.proponentPercentage) === false
14003
+ ? true
14004
+ : false;
13971
14005
  setOwnershipPercentageValidation(orgPercentValidation);
13972
14006
  var uniqueOrgs = new Set(selectedCompanies);
13973
14007
  setSelectedOrgs(__spreadArray([], uniqueOrgs, true));
13974
14008
  };
13975
14009
  var checkOrgPercentageValidation = function () {
13976
14010
  var _a;
13977
- var orgPercentage = formOne.getFieldValue('ownershipPercentage');
14011
+ var orgPercentage = formOne.getFieldValue("ownershipPercentage");
13978
14012
  var orgPercentValidation = ((_a = orgPercentage[0]) === null || _a === void 0 ? void 0 : _a.proponentPercentage) === false ? true : false;
13979
14013
  setOwnershipPercentageValidation(orgPercentValidation);
13980
14014
  };
@@ -13986,34 +14020,38 @@ var ProgrammeCreationComponent = function (props) {
13986
14020
  }, []);
13987
14021
  return (React.createElement("div", { className: "add-programme-main-container" },
13988
14022
  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'))),
14023
+ React.createElement("div", { className: "main" }, isUpdate
14024
+ ? t("addProgramme:editProgramme")
14025
+ : t("addProgramme:addProgramme")),
14026
+ React.createElement("div", { className: "sub" }, isUpdate
14027
+ ? t("addProgramme:editProgrammeSub")
14028
+ : t("addProgramme:addProgrammeSub"))),
13991
14029
  React.createElement("div", { className: "adding-section" },
13992
14030
  React.createElement("div", { className: "form-section" },
13993
14031
  React.createElement(antd.Steps, { progressDot: true, direction: "vertical", current: current, items: [
13994
14032
  {
13995
14033
  title: (React.createElement("div", { className: "step-title-container" },
13996
14034
  React.createElement("div", { className: "step-count" }, "01"),
13997
- React.createElement("div", { className: "title" }, t('addProgramme:addProgramme1')))),
14035
+ React.createElement("div", { className: "title" }, t("addProgramme:addProgramme1")))),
13998
14036
  description: current === 0 && (React.createElement("div", { className: "programme-details-form-container" },
13999
14037
  React.createElement("div", { className: "programme-details-form" },
14000
14038
  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
14039
  React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
14002
14040
  React.createElement(antd.Col, { xl: 12, md: 24 },
14003
14041
  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: [
14042
+ 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
14043
  {
14006
14044
  required: true,
14007
- message: '',
14045
+ message: "",
14008
14046
  },
14009
14047
  {
14010
14048
  validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
14011
14049
  return __generator(this, function (_a) {
14012
- if (String(value).trim() === '' ||
14050
+ if (String(value).trim() === "" ||
14013
14051
  String(value).trim() === undefined ||
14014
14052
  value === null ||
14015
14053
  value === undefined) {
14016
- throw new Error("".concat(t('addProgramme:title'), " ").concat(t('isRequired')));
14054
+ throw new Error("".concat(t("addProgramme:title"), " ").concat(t("isRequired")));
14017
14055
  }
14018
14056
  return [2 /*return*/];
14019
14057
  });
@@ -14021,34 +14059,35 @@ var ProgrammeCreationComponent = function (props) {
14021
14059
  },
14022
14060
  ] },
14023
14061
  React.createElement(antd.Input, { size: "large" })),
14024
- React.createElement(antd.Form.Item, { wrapperCol: { span: 13 }, label: t('addProgramme:sector'), name: "sector", rules: [
14062
+ React.createElement(antd.Form.Item, { wrapperCol: { span: 13 }, label: t("addProgramme:sector"), name: "sector", rules: [
14025
14063
  {
14026
14064
  required: true,
14027
- message: "".concat(t('addProgramme:sector'), " ").concat(t('isRequired')),
14065
+ message: "".concat(t("addProgramme:sector"), " ").concat(t("isRequired")),
14028
14066
  },
14029
14067
  ] },
14030
- React.createElement(antd.Select, { size: "large", onChange: onChangeSector }, (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.MINISTRY
14068
+ React.createElement(antd.Select, { size: "large", onChange: onChangeSector }, (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
14069
+ exports.CompanyRole.MINISTRY
14031
14070
  ? availableSectar === null || availableSectar === void 0 ? void 0 : availableSectar.map(function (sector) { return (React.createElement(antd.Select.Option, { value: sector }, sector)); })
14032
14071
  : 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: [
14072
+ React.createElement(antd.Form.Item, { wrapperCol: { span: 13 }, label: t("addProgramme:startTime"), name: "startTime", rules: [
14034
14073
  {
14035
14074
  required: true,
14036
- message: '',
14075
+ message: "",
14037
14076
  },
14038
14077
  {
14039
14078
  validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
14040
14079
  var endTime;
14041
14080
  return __generator(this, function (_a) {
14042
- if (String(value).trim() === '' ||
14081
+ if (String(value).trim() === "" ||
14043
14082
  String(value).trim() === undefined ||
14044
14083
  value === null ||
14045
14084
  value === undefined) {
14046
- throw new Error("".concat(t('addProgramme:startTime'), " ").concat(t('isRequired')));
14085
+ throw new Error("".concat(t("addProgramme:startTime"), " ").concat(t("isRequired")));
14047
14086
  }
14048
14087
  else {
14049
- endTime = formOne.getFieldValue('endTime');
14088
+ endTime = formOne.getFieldValue("endTime");
14050
14089
  if (endTime && value >= endTime) {
14051
- throw new Error("".concat(t('addProgramme:endTimeVal')));
14090
+ throw new Error("".concat(t("addProgramme:endTimeVal")));
14052
14091
  }
14053
14092
  }
14054
14093
  return [2 /*return*/];
@@ -14057,12 +14096,12 @@ var ProgrammeCreationComponent = function (props) {
14057
14096
  },
14058
14097
  ] },
14059
14098
  React.createElement(antd.DatePicker, { size: "large", disabledDate: function (currentDate) {
14060
- return currentDate < moment().startOf('day');
14099
+ return currentDate < moment().startOf("day");
14061
14100
  } })),
14062
- React.createElement(antd.Form.Item, { wrapperCol: { span: 13 }, label: t('addProgramme:ghgCovered'), name: "greenHouseGasses", rules: [
14101
+ React.createElement(antd.Form.Item, { wrapperCol: { span: 13 }, label: t("addProgramme:ghgCovered"), name: "greenHouseGasses", rules: [
14063
14102
  {
14064
14103
  required: true,
14065
- message: "".concat(t('addProgramme:ghgCovered'), " ").concat(t('isRequired')),
14104
+ message: "".concat(t("addProgramme:ghgCovered"), " ").concat(t("isRequired")),
14066
14105
  },
14067
14106
  ] },
14068
14107
  React.createElement(antd.Select, { size: "large", mode: "multiple", maxTagCount: 2, allowClear: true },
@@ -14085,10 +14124,10 @@ var ProgrammeCreationComponent = function (props) {
14085
14124
  React.createElement(antd.Select.Option, { value: "SF6" },
14086
14125
  "SF",
14087
14126
  React.createElement("sub", null, "6")))),
14088
- React.createElement(antd.Form.Item, { label: t('addProgramme:designDoc'), name: "designDocument", valuePropName: "fileList", getValueFromEvent: normFile, required: true, rules: [
14127
+ React.createElement(antd.Form.Item, { label: t("addProgramme:designDoc"), name: "designDocument", valuePropName: "fileList", getValueFromEvent: normFile, required: true, rules: [
14089
14128
  {
14090
14129
  required: true,
14091
- message: "".concat(t('addProgramme:designDoc'), " ").concat(t('addProgramme:isRequired')),
14130
+ message: "".concat(t("addProgramme:designDoc"), " ").concat(t("addProgramme:isRequired")),
14092
14131
  },
14093
14132
  {
14094
14133
  validator: function (rule, file) { return __awaiter(void 0, void 0, void 0, function () {
@@ -14097,15 +14136,15 @@ var ProgrammeCreationComponent = function (props) {
14097
14136
  return __generator(this, function (_c) {
14098
14137
  if ((file === null || file === void 0 ? void 0 : file.length) > 0) {
14099
14138
  isCorrectFormat = false;
14100
- if (((_a = file[0]) === null || _a === void 0 ? void 0 : _a.type) === 'application/pdf') {
14139
+ if (((_a = file[0]) === null || _a === void 0 ? void 0 : _a.type) === "application/pdf") {
14101
14140
  isCorrectFormat = true;
14102
14141
  }
14103
14142
  if (!isCorrectFormat) {
14104
- throw new Error("".concat(t('addProgramme:invalidFileFormat')));
14143
+ throw new Error("".concat(t("addProgramme:invalidFileFormat")));
14105
14144
  }
14106
14145
  else if (((_b = file[0]) === null || _b === void 0 ? void 0 : _b.size) > maximumImageSize) {
14107
14146
  // default size format of files would be in bytes -> 1MB = 1000000bytes
14108
- throw new Error("".concat(t('common:maxSizeVal')));
14147
+ throw new Error("".concat(t("common:maxSizeVal")));
14109
14148
  }
14110
14149
  }
14111
14150
  return [2 /*return*/];
@@ -14119,7 +14158,7 @@ var ProgrammeCreationComponent = function (props) {
14119
14158
  // defaultFileList={fileList}
14120
14159
  maxCount: 1 },
14121
14160
  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: [
14161
+ 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
14162
  {
14124
14163
  required: false,
14125
14164
  },
@@ -14127,16 +14166,19 @@ var ProgrammeCreationComponent = function (props) {
14127
14166
  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
14167
  React.createElement(antd.Form.List, { name: "ownershipPercentage", initialValue: initialOrganisationOwnershipValues }, function (fields, _a) {
14129
14168
  var add = _a.add, remove = _a.remove;
14130
- return (React.createElement("div", { className: "space-container", style: { width: '100%' } },
14169
+ return (React.createElement("div", { className: "space-container", style: { width: "100%" } },
14131
14170
  fields.map(function (_a) {
14132
14171
  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' },
14172
+ return (React.createElement(antd.Space, { wrap: true, key: key, style: {
14173
+ display: "flex",
14174
+ marginBottom: 8,
14175
+ }, align: "center", size: "large" },
14134
14176
  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: [
14177
+ React.createElement(antd.Form.Item, __assign({}, restField, { label: t("addProgramme:company"), name: [name, "organisation"], wrapperCol: { span: 24 }, className: "organisation", rules: [
14136
14178
  {
14137
14179
  required: true,
14138
- message: "".concat(t('addProgramme:company'), " ").concat(t('isRequired')),
14139
- validateTrigger: 'onBlur',
14180
+ message: "".concat(t("addProgramme:company"), " ").concat(t("isRequired")),
14181
+ validateTrigger: "onBlur",
14140
14182
  },
14141
14183
  ], shouldUpdate: true }),
14142
14184
  React.createElement(antd.Select, { size: "large", loading: loadingList, disabled: name === 0 &&
@@ -14148,30 +14190,39 @@ var ProgrammeCreationComponent = function (props) {
14148
14190
  exports.CompanyRole.GOVERNMENT &&
14149
14191
  (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) !==
14150
14192
  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: [
14193
+ userOrgTaxId ===
14194
+ (organisation === null || organisation === void 0 ? void 0 : organisation.taxId)) }, organisation.name)); }))),
14195
+ React.createElement(antd.Form.Item, __assign({}, restField, { label: t("addProgramme:proponentPercentage"), className: "ownership-percent", name: [
14196
+ name,
14197
+ "proponentPercentage",
14198
+ ], labelCol: { span: 24 }, wrapperCol: { span: 24 }, required: true, rules: [
14153
14199
  {
14154
14200
  required: true,
14155
- message: "".concat(t('addProgramme:proponentPercentage'), " ").concat(t('isRequired')),
14201
+ message: "".concat(t("addProgramme:proponentPercentage"), " ").concat(t("isRequired")),
14156
14202
  },
14157
14203
  {
14158
14204
  validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
14159
14205
  return __generator(this, function (_a) {
14160
14206
  if (ownershipPercentageValidation &&
14161
14207
  name === 0) {
14162
- throw new Error("".concat(t('addProgramme:proponentPercentage'), " ").concat(t('isRequired')));
14208
+ throw new Error("".concat(t("addProgramme:proponentPercentage"), " ").concat(t("isRequired")));
14163
14209
  }
14164
14210
  return [2 /*return*/];
14165
14211
  });
14166
14212
  }); },
14167
14213
  },
14168
14214
  ], 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 &&
14215
+ React.createElement(antd.InputNumber, { size: "large", min: 1, max: 100, formatter: function (value) {
14216
+ return "".concat(value, "%");
14217
+ }, parser: function (value) {
14218
+ return value.replace("%", "");
14219
+ }, disabled: (fields === null || fields === void 0 ? void 0 : fields.length) < 2 &&
14170
14220
  (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) !==
14171
14221
  exports.CompanyRole.GOVERNMENT &&
14172
14222
  (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) !==
14173
14223
  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 () {
14224
+ (fields === null || fields === void 0 ? void 0 : fields.length) > 1 &&
14225
+ name !== 0 && (React.createElement(icons.MinusCircleOutlined, { className: "dynamic-delete-button", onClick: function () {
14175
14226
  remove(name);
14176
14227
  } })))));
14177
14228
  }),
@@ -14180,19 +14231,19 @@ var ProgrammeCreationComponent = function (props) {
14180
14231
  }))),
14181
14232
  React.createElement(antd.Col, { xl: 12, md: 24 },
14182
14233
  React.createElement("div", { className: "details-part-two" },
14183
- React.createElement(antd.Form.Item, { label: t('addProgramme:externalId'), name: "externalId", rules: [
14234
+ React.createElement(antd.Form.Item, { label: t("addProgramme:externalId"), name: "externalId", rules: [
14184
14235
  {
14185
14236
  required: true,
14186
- message: '',
14237
+ message: "",
14187
14238
  },
14188
14239
  {
14189
14240
  validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
14190
14241
  return __generator(this, function (_a) {
14191
- if (String(value).trim() === '' ||
14242
+ if (String(value).trim() === "" ||
14192
14243
  String(value).trim() === undefined ||
14193
14244
  value === null ||
14194
14245
  value === undefined) {
14195
- throw new Error("".concat(t('addProgramme:externalId'), " ").concat(t('isRequired')));
14246
+ throw new Error("".concat(t("addProgramme:externalId"), " ").concat(t("isRequired")));
14196
14247
  }
14197
14248
  return [2 /*return*/];
14198
14249
  });
@@ -14200,13 +14251,14 @@ var ProgrammeCreationComponent = function (props) {
14200
14251
  },
14201
14252
  ] },
14202
14253
  React.createElement(antd.Input, { size: "large" })),
14203
- React.createElement(antd.Form.Item, { wrapperCol: { span: 13 }, label: t('addProgramme:sectoralScope'), name: "sectoralScope", rules: [
14254
+ React.createElement(antd.Form.Item, { wrapperCol: { span: 13 }, label: t("addProgramme:sectoralScope"), name: "sectoralScope", rules: [
14204
14255
  {
14205
14256
  required: true,
14206
- message: "".concat(t('addProgramme:sectoralScope'), " ").concat(t('isRequired')),
14257
+ message: "".concat(t("addProgramme:sectoralScope"), " ").concat(t("isRequired")),
14207
14258
  },
14208
14259
  ] },
14209
- React.createElement(antd.Select, { size: "large" }, (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.MINISTRY
14260
+ React.createElement(antd.Select, { size: "large" }, (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
14261
+ exports.CompanyRole.MINISTRY
14210
14262
  ? 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
14263
  : selectedSectoralScopes === null || selectedSectoralScopes === void 0 ? void 0 : selectedSectoralScopes.map(function (val) {
14212
14264
  if (val in exports.SectoralScope) {
@@ -14215,25 +14267,25 @@ var ProgrammeCreationComponent = function (props) {
14215
14267
  }
14216
14268
  return null;
14217
14269
  }))),
14218
- React.createElement(antd.Form.Item, { wrapperCol: { span: 13 }, label: t('addProgramme:endTime'), name: "endTime", rules: [
14270
+ React.createElement(antd.Form.Item, { wrapperCol: { span: 13 }, label: t("addProgramme:endTime"), name: "endTime", rules: [
14219
14271
  {
14220
14272
  required: true,
14221
- message: '',
14273
+ message: "",
14222
14274
  },
14223
14275
  {
14224
14276
  validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
14225
14277
  var startTime;
14226
14278
  return __generator(this, function (_a) {
14227
- if (String(value).trim() === '' ||
14279
+ if (String(value).trim() === "" ||
14228
14280
  String(value).trim() === undefined ||
14229
14281
  value === null ||
14230
14282
  value === undefined) {
14231
- throw new Error("".concat(t('addProgramme:endTime'), " ").concat(t('isRequired')));
14283
+ throw new Error("".concat(t("addProgramme:endTime"), " ").concat(t("isRequired")));
14232
14284
  }
14233
14285
  else {
14234
- startTime = formOne.getFieldValue('startTime');
14286
+ startTime = formOne.getFieldValue("startTime");
14235
14287
  if (startTime && value <= startTime) {
14236
- throw new Error("".concat(t('addProgramme:endTimeVal')));
14288
+ throw new Error("".concat(t("addProgramme:endTimeVal")));
14237
14289
  }
14238
14290
  }
14239
14291
  return [2 /*return*/];
@@ -14242,22 +14294,22 @@ var ProgrammeCreationComponent = function (props) {
14242
14294
  },
14243
14295
  ] },
14244
14296
  React.createElement(antd.DatePicker, { size: "large", disabledDate: function (currentDate) {
14245
- return currentDate < moment().endOf('day');
14297
+ return currentDate < moment().endOf("day");
14246
14298
  } })),
14247
- React.createElement(antd.Form.Item, { label: t('addProgramme:ndcScope'), wrapperCol: { span: 13 }, className: "role-group", name: "ndcScope", initialValue: ndcScopeValue, rules: [
14299
+ React.createElement(antd.Form.Item, { label: t("addProgramme:ndcScope"), wrapperCol: { span: 13 }, className: "role-group", name: "ndcScope", initialValue: ndcScopeValue, rules: [
14248
14300
  {
14249
14301
  required: false,
14250
14302
  },
14251
14303
  ] },
14252
14304
  React.createElement(antd.Radio.Group, { size: "large", onChange: onChangeNDCScope, value: ndcScopeValue },
14253
14305
  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'))),
14306
+ React.createElement(antd.Radio.Button, { className: "condition-radio", value: "true", onClick: function () { return onClickNDCScope("true"); } }, t("addProgramme:conditional"))),
14255
14307
  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: [
14308
+ React.createElement(antd.Radio.Button, { className: "condition-radio", value: "false", onClick: function () { return onClickNDCScope("false"); } }, t("addProgramme:unConditional"))))),
14309
+ React.createElement(antd.Form.Item, { label: t("addProgramme:geographicalLocation"), name: "geographicalLocation", rules: [
14258
14310
  {
14259
14311
  required: true,
14260
- message: "".concat(t('addProgramme:geographicalLocation'), " ").concat(t('isRequired')),
14312
+ message: "".concat(t("addProgramme:geographicalLocation"), " ").concat(t("isRequired")),
14261
14313
  },
14262
14314
  ] },
14263
14315
  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 +14318,110 @@ var ProgrammeCreationComponent = function (props) {
14266
14318
  React.createElement(antd.Row, { className: "in-ndc-row" },
14267
14319
  React.createElement(antd.Col, { md: 16, lg: 18, xl: 18 },
14268
14320
  React.createElement("div", { className: "included-label" },
14269
- React.createElement("div", null, t('addProgramme:inNDC')),
14321
+ React.createElement("div", null, t("addProgramme:inNDC")),
14270
14322
  React.createElement("div", { className: "info-container" },
14271
- React.createElement(antd.Tooltip, { arrowPointAtCenter: true, placement: "topLeft", trigger: "hover", title: t('addProgramme:inNDCToolTip'), overlayClassName: "custom-tooltip" },
14323
+ React.createElement(antd.Tooltip, { arrowPointAtCenter: true, placement: "topLeft", trigger: "hover", title: t("addProgramme:inNDCToolTip"), overlayClassName: "custom-tooltip" },
14272
14324
  React.createElement(Icon.InfoCircle, { color: "#000000", size: 17 }))))),
14273
14325
  React.createElement(antd.Col, { md: 8, lg: 6, xl: 6, className: "included-val" },
14274
14326
  React.createElement(antd.Radio.Group, { size: "middle", disabled: ndcScopeChanged, value: includedInNDC, onChange: onInCludedNDCChange },
14275
14327
  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'))),
14328
+ React.createElement(antd.Radio.Button, { className: "yes-no-radio", value: true, onClick: function () {
14329
+ return onClickIncludedInNDCScope(true);
14330
+ } }, t("addProgramme:yes"))),
14277
14331
  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'))))))),
14332
+ React.createElement(antd.Radio.Button, { className: "yes-no-radio", value: false, onClick: function () {
14333
+ return onClickIncludedInNDCScope(false);
14334
+ } }, t("addProgramme:no"))))))),
14279
14335
  React.createElement(antd.Col, { md: 24, xl: 12, className: "in-nap-col" },
14280
14336
  React.createElement(antd.Row, { className: "in-nap-row" },
14281
14337
  React.createElement(antd.Col, { md: 16, lg: 18, xl: 18 },
14282
14338
  React.createElement("div", { className: "included-label" },
14283
- React.createElement("div", null, t('addProgramme:inNAP')),
14339
+ React.createElement("div", null, t("addProgramme:inNAP")),
14284
14340
  React.createElement("div", { className: "info-container" },
14285
- React.createElement(antd.Tooltip, { arrowPointAtCenter: true, placement: "topLeft", trigger: "hover", title: t('addProgramme:inNAPToolTip'), overlayClassName: "custom-tooltip" },
14341
+ React.createElement(antd.Tooltip, { arrowPointAtCenter: true, placement: "topLeft", trigger: "hover", title: t("addProgramme:inNAPToolTip"), overlayClassName: "custom-tooltip" },
14286
14342
  React.createElement(Icon.InfoCircle, { color: "#000000", size: 17 }))))),
14287
14343
  React.createElement(antd.Col, { md: 8, lg: 6, xl: 6, className: "included-val" },
14288
14344
  React.createElement(antd.Radio.Group, { size: "middle", onChange: onInCludedNAPChange, value: includedInNAP },
14289
14345
  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'))),
14346
+ React.createElement(antd.Radio.Button, { className: "yes-no-radio", value: true, onClick: function () {
14347
+ return onClickIncludedInNAPScope(true);
14348
+ } }, t("addProgramme:yes"))),
14291
14349
  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')))))))),
14350
+ React.createElement(antd.Radio.Button, { className: "yes-no-radio", value: false, onClick: function () {
14351
+ return onClickIncludedInNAPScope(false);
14352
+ } }, t("addProgramme:no")))))))),
14293
14353
  React.createElement("div", { className: "steps-actions" },
14294
- React.createElement(antd.Button, { type: "primary", htmlType: "submit", loading: loading, onClick: checkOrgPercentageValidation }, t('addProgramme:next'))))))),
14354
+ React.createElement(antd.Button, { type: "primary", htmlType: "submit", loading: loading, onClick: checkOrgPercentageValidation }, t("addProgramme:next"))))))),
14295
14355
  },
14296
14356
  {
14297
14357
  title: (React.createElement("div", { className: "step-title-container" },
14298
14358
  React.createElement("div", { className: "step-count" }, "02"),
14299
- React.createElement("div", { className: "title" }, t('addProgramme:addProgramme2')))),
14359
+ React.createElement("div", { className: "title" }, t("addProgramme:addProgramme2")))),
14300
14360
  description: current === 1 && (React.createElement("div", { className: "programme-sought-form-container" },
14301
14361
  React.createElement("div", { className: "programme-sought-form" },
14302
14362
  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
14363
  React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
14304
14364
  React.createElement(antd.Col, { xl: 12, md: 24 },
14305
14365
  React.createElement("div", { className: "details-part-one" },
14306
- React.createElement(antd.Form.Item, { label: t('addProgramme:estimatedProgrammeCostUSD'), name: "estimatedProgrammeCostUSD", rules: [
14366
+ React.createElement(antd.Form.Item, { label: t("addProgramme:estimatedProgrammeCostUSD"), name: "estimatedProgrammeCostUSD", rules: [
14307
14367
  {
14308
14368
  required: true,
14309
- message: '',
14369
+ message: "",
14310
14370
  },
14311
14371
  {
14312
14372
  validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
14313
14373
  return __generator(this, function (_a) {
14314
- if (String(value).trim() === '' ||
14374
+ if (String(value).trim() === "" ||
14315
14375
  String(value).trim() === undefined ||
14316
14376
  value === null ||
14317
14377
  value === undefined) {
14318
- throw new Error("".concat(t('addProgramme:estimatedProgrammeCostUSD'), " ").concat(t('isRequired')));
14378
+ throw new Error("".concat(t("addProgramme:estimatedProgrammeCostUSD"), " ").concat(t("isRequired")));
14319
14379
  }
14320
- else if (!isNaN(value) && Number(value) > 0) {
14380
+ else if (!isNaN(value) &&
14381
+ Number(value) > 0) {
14321
14382
  return [2 /*return*/, Promise.resolve()];
14322
14383
  }
14323
14384
  else {
14324
- throw new Error("".concat(t('addProgramme:estimatedProgrammeCostUSD'), " ").concat(t('isInvalid')));
14385
+ throw new Error("".concat(t("addProgramme:estimatedProgrammeCostUSD"), " ").concat(t("isInvalid")));
14325
14386
  }
14326
14387
  });
14327
14388
  }); },
14328
14389
  },
14329
14390
  ] },
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 } })))),
14391
+ React.createElement(antd.InputNumber, { size: "large", style: { width: "100%", paddingRight: 12 } })),
14392
+ React.createElement(antd.Form.Item, { label: t("addProgramme:minViableCarbonPrice"), name: "minViableCarbonPrice" },
14393
+ React.createElement(antd.InputNumber, { disabled: true, size: "large", style: { width: "100%", paddingRight: 12 } })))),
14333
14394
  React.createElement(antd.Col, { xl: 12, md: 24 },
14334
14395
  React.createElement("div", { className: "details-part-two" },
14335
- React.createElement(antd.Form.Item, { label: t('addProgramme:creditEst'), name: "creditEst", rules: [
14396
+ React.createElement(antd.Form.Item, { label: t("addProgramme:creditEst"), name: "creditEst", rules: [
14336
14397
  {
14337
14398
  required: true,
14338
- message: '',
14399
+ message: "",
14339
14400
  },
14340
14401
  {
14341
14402
  validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
14342
14403
  return __generator(this, function (_a) {
14343
- if (String(value).trim() === '' ||
14404
+ if (String(value).trim() === "" ||
14344
14405
  String(value).trim() === undefined ||
14345
14406
  value === null ||
14346
14407
  value === undefined) {
14347
- throw new Error("".concat(t('addProgramme:creditEst'), " ").concat(t('isRequired')));
14408
+ throw new Error("".concat(t("addProgramme:creditEst"), " ").concat(t("isRequired")));
14348
14409
  }
14349
- else if (!isNaN(value) && Number(value) > 0) {
14410
+ else if (!isNaN(value) &&
14411
+ Number(value) > 0) {
14350
14412
  return [2 /*return*/, Promise.resolve()];
14351
14413
  }
14352
14414
  else {
14353
- throw new Error("".concat(t('addProgramme:creditEst'), " ").concat(t('isInvalid')));
14415
+ throw new Error("".concat(t("addProgramme:creditEst"), " ").concat(t("isInvalid")));
14354
14416
  }
14355
14417
  });
14356
14418
  }); },
14357
14419
  },
14358
14420
  ] },
14359
- React.createElement(antd.InputNumber, { size: "large", style: { width: '100%', paddingRight: 12 } }))))),
14421
+ React.createElement(antd.InputNumber, { size: "large", style: { width: "100%", paddingRight: 12 } }))))),
14360
14422
  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')))))))),
14423
+ React.createElement(antd.Button, { type: "primary", htmlType: "submit", loading: loading }, t("addProgramme:submit")),
14424
+ current === 1 && (React.createElement(antd.Button, { className: "back-btn", onClick: function () { return prevOne(); }, loading: loading }, t("addProgramme:back")))))))),
14363
14425
  },
14364
14426
  ] })))));
14365
14427
  };
@@ -19465,7 +19527,7 @@ var Social = function (props) {
19465
19527
  };
19466
19528
 
19467
19529
  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;
19530
+ 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
19531
  var _b = React.useState(), coBenefitDetails = _b[0], setCoBenefitDetails = _b[1];
19470
19532
  var _c = React.useState(true), isSocialFormValid = _c[0], setIsSocialFormValid = _c[1];
19471
19533
  var _d = React.useState(true), isAssessmentFormValid = _d[0], setIsAssessmentFormValid = _d[1];
@@ -19500,7 +19562,7 @@ var CoBenifitsComponent = function (props) {
19500
19562
  ? (coBenifitsViewDetails === null || coBenifitsViewDetails === void 0 ? void 0 : coBenifitsViewDetails.sdgGoals)
19501
19563
  ? coBenifitsViewDetails === null || coBenifitsViewDetails === void 0 ? void 0 : coBenifitsViewDetails.sdgGoals
19502
19564
  : []
19503
- : coBenefitsDetails === null || coBenefitsDetails === void 0 ? void 0 : coBenefitsDetails.sdgGoals, viewOnly: viewOnly || false })),
19565
+ : coBenefitsDetails === null || coBenefitsDetails === void 0 ? void 0 : coBenefitsDetails.sdgGoals, viewOnly: viewOnly || false, sdgGoalImages: sdgGoalImages })),
19504
19566
  },
19505
19567
  {
19506
19568
  label: t("coBenifits:genderPart"),
@@ -19702,7 +19764,7 @@ var CoBenifitsComponent = function (props) {
19702
19764
  };
19703
19765
 
19704
19766
  var AddNdcActionComponent = function (props) {
19705
- var useConnection = props.useConnection, useLocation = props.useLocation, onNavigateToProgrammeManagementView = props.onNavigateToProgrammeManagementView, onNavigateToProgrammeView = props.onNavigateToProgrammeView, t = props.t;
19767
+ var useConnection = props.useConnection, useLocation = props.useLocation, onNavigateToProgrammeManagementView = props.onNavigateToProgrammeManagementView, onNavigateToProgrammeView = props.onNavigateToProgrammeView, sdgGoalImages = props.sdgGoalImages, t = props.t;
19706
19768
  var _a = React.useState(1), current = _a[0], setCurrent = _a[1];
19707
19769
  var _b = React.useState(), programmeDetails = _b[0], setprogrammeDetails = _b[1];
19708
19770
  var _c = React.useState(), ndcActionDetails = _c[0], setNdcActionDetails = _c[1];
@@ -19843,7 +19905,7 @@ var AddNdcActionComponent = function (props) {
19843
19905
  description: (React.createElement("div", { className: current !== 2 ? "hide" : "" },
19844
19906
  React.createElement(CoBenifitsComponent, { onClickedBackBtn: onClickBackCoBenefits, coBenefitsDetails: ndcActionDetails ? ndcActionDetails.coBenefitsProperties : {}, onFormSubmit: onCoBenefitsSubmit, submitButtonText: isProjectReportsVisible()
19845
19907
  ? t("ndcAction:next")
19846
- : t("ndcAction:submit"), loading: loading, t: t }))),
19908
+ : t("ndcAction:submit"), loading: loading, sdgGoalImages: sdgGoalImages, t: t }))),
19847
19909
  },
19848
19910
  ];
19849
19911
  if (isProjectReportsVisible()) {