@undp/carbon-library 1.0.117 → 1.0.119

Sign up to get free protection for your applications and to get access to all the features.
package/dist/cjs/index.js CHANGED
@@ -340,6 +340,7 @@ var getGeneralFields = function (programme, system) {
340
340
  startDate: luxon.DateTime.fromSeconds(Number(programme.startTime)),
341
341
  endDate: luxon.DateTime.fromSeconds(Number(programme.endTime)),
342
342
  buyerCountry: programme.programmeProperties.buyerCountryEligibility,
343
+ environmentalAssessmentRegistrationNo: programme.environmentalAssessmentRegistrationNo
343
344
  };
344
345
  if (system === exports.CarbonSystemType.UNIFIED || system === exports.CarbonSystemType.MRV) {
345
346
  var prog = programme;
@@ -11875,35 +11876,35 @@ var sectoralScopes = {
11875
11876
  ],
11876
11877
  };
11877
11878
  var ProgrammeCreationComponent = function (props) {
11878
- var _a, _b;
11879
+ var _a, _b, _c;
11879
11880
  var useUserContext = props.useUserContext, useConnection = props.useConnection, useLocation = props.useLocation, onNavigateToProgrammeView = props.onNavigateToProgrammeView, translator = props.translator;
11880
11881
  var t = translator.t;
11881
11882
  var state = useLocation().state;
11882
11883
  var formOne = antd.Form.useForm()[0];
11883
11884
  var formTwo = antd.Form.useForm()[0];
11884
11885
  antd.Form.useForm()[0];
11885
- var _c = useConnection(); _c.put; var get = _c.get, post = _c.post;
11886
+ var _d = useConnection(); _d.put; var get = _d.get, post = _d.post;
11886
11887
  var userInfoState = useUserContext().userInfoState;
11887
- var _d = React.useState(false), loading = _d[0], setLoading = _d[1];
11888
- var _e = React.useState(false), loadingList = _e[0], setLoadingList = _e[1];
11889
- var _f = React.useState(), ndcScopeChanged = _f[0], setNdcScopeChanged = _f[1];
11890
- var _g = React.useState(), ndcScopeValue = _g[0], setNdcScopeValue = _g[1];
11891
- var _h = React.useState(), stepOneData = _h[0], setStepOneData = _h[1];
11892
- var _j = React.useState(0), current = _j[0], setCurrent = _j[1];
11893
- var _k = React.useState(false), isUpdate = _k[0]; _k[1];
11894
- var _l = React.useState(), includedInNDC = _l[0], setIncludedInNDC = _l[1];
11895
- var _m = React.useState([]), countries = _m[0], setCountries = _m[1];
11896
- var _o = React.useState([]), organisationsList = _o[0], setOrganisationList = _o[1];
11897
- var _p = React.useState(""), userOrgTaxId = _p[0], setUserOrgTaxId = _p[1];
11898
- var _q = React.useState([]), regionsList = _q[0], setRegionsList = _q[1];
11899
- var _r = React.useState(); _r[0]; var setProgrammeDetailsObj = _r[1];
11900
- var _s = React.useState(), selectedOrgs = _s[0], setSelectedOrgs = _s[1];
11901
- var _t = React.useState(false), ownershipPercentageValidation = _t[0], setOwnershipPercentageValidation = _t[1];
11902
- var _u = React.useState(""), selectedSector = _u[0], setSelectedSector = _u[1];
11903
- var _v = React.useState([]); _v[0]; var setMinistrySectoralScope = _v[1];
11904
- var _w = React.useState([]), availableSecoralScope = _w[0], setAvailableSectoralScope = _w[1];
11905
- var _x = React.useState([]), selectableSectoralScope = _x[0], setSelectableSectoralScope = _x[1];
11906
- var _y = React.useState([]), availableSectar = _y[0], setAvailableSectar = _y[1];
11888
+ var _e = React.useState(false), loading = _e[0], setLoading = _e[1];
11889
+ var _f = React.useState(false), loadingList = _f[0], setLoadingList = _f[1];
11890
+ var _g = React.useState(), ndcScopeChanged = _g[0], setNdcScopeChanged = _g[1];
11891
+ var _h = React.useState(), ndcScopeValue = _h[0], setNdcScopeValue = _h[1];
11892
+ var _j = React.useState(), stepOneData = _j[0], setStepOneData = _j[1];
11893
+ var _k = React.useState(0), current = _k[0], setCurrent = _k[1];
11894
+ var _l = React.useState(false), isUpdate = _l[0]; _l[1];
11895
+ var _m = React.useState(), includedInNDC = _m[0], setIncludedInNDC = _m[1];
11896
+ var _o = React.useState([]), countries = _o[0], setCountries = _o[1];
11897
+ var _p = React.useState([]), organisationsList = _p[0], setOrganisationList = _p[1];
11898
+ var _q = React.useState(""), userOrgTaxId = _q[0], setUserOrgTaxId = _q[1];
11899
+ var _r = React.useState([]), regionsList = _r[0], setRegionsList = _r[1];
11900
+ var _s = React.useState(); _s[0]; var setProgrammeDetailsObj = _s[1];
11901
+ var _t = React.useState(), selectedOrgs = _t[0], setSelectedOrgs = _t[1];
11902
+ var _u = React.useState(false), ownershipPercentageValidation = _u[0], setOwnershipPercentageValidation = _u[1];
11903
+ var _v = React.useState(""), selectedSector = _v[0], setSelectedSector = _v[1];
11904
+ var _w = React.useState([]); _w[0]; var setMinistrySectoralScope = _w[1];
11905
+ var _x = React.useState([]), availableSecoralScope = _x[0], setAvailableSectoralScope = _x[1];
11906
+ var _y = React.useState([]), selectableSectoralScope = _y[0], setSelectableSectoralScope = _y[1];
11907
+ var _z = React.useState([]), availableSectar = _z[0], setAvailableSectar = _z[1];
11907
11908
  var initialOrganisationOwnershipValues = [
11908
11909
  {
11909
11910
  organisation: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) !== exports.CompanyRole.GOVERNMENT &&
@@ -12191,6 +12192,7 @@ var ProgrammeCreationComponent = function (props) {
12191
12192
  ndcScope: (values === null || values === void 0 ? void 0 : values.ndcScope) === "true" ? true : false,
12192
12193
  })), (includedInNDC !== undefined &&
12193
12194
  includedInNDC !== null && { includedInNdc: includedInNDC })),
12195
+ environmentalAssessmentRegistrationNo: values === null || values === void 0 ? void 0 : values.environmentalAssessmentRegistrationNo
12194
12196
  };
12195
12197
  if ((logoBase64 === null || logoBase64 === void 0 ? void 0 : logoBase64.length) > 0) {
12196
12198
  programmeDetails.designDocument = logoBase64;
@@ -12564,7 +12566,27 @@ var ProgrammeCreationComponent = function (props) {
12564
12566
  }),
12565
12567
  React.createElement(antd.Form.Item, null,
12566
12568
  React.createElement(antd.Button, { type: "dashed", onClick: function () { return add(); }, icon: React.createElement(icons.PlusOutlined, null) }))));
12567
- }))),
12569
+ }),
12570
+ React.createElement(antd.Form.Item, { label: t("addProgramme:environmentalAssessmentRegistrationNo"), name: "environmentalAssessmentRegistrationNo", initialValue: (_c = state === null || state === void 0 ? void 0 : state.record) === null || _c === void 0 ? void 0 : _c.environmentalAssessmentRegistrationNo, rules: [
12571
+ {
12572
+ required: true,
12573
+ message: "",
12574
+ },
12575
+ {
12576
+ validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
12577
+ return __generator(this, function (_a) {
12578
+ if (String(value).trim() === "" ||
12579
+ String(value).trim() === undefined ||
12580
+ value === null ||
12581
+ value === undefined) {
12582
+ throw new Error("".concat(t("addProgramme:environmentalAssessmentRegistrationNo"), " ").concat(t("isRequired")));
12583
+ }
12584
+ return [2 /*return*/];
12585
+ });
12586
+ }); },
12587
+ },
12588
+ ] },
12589
+ React.createElement(antd.Input, { size: "large" })))),
12568
12590
  React.createElement(antd.Col, { xl: 12, md: 24 },
12569
12591
  React.createElement("div", { className: "details-part-two" },
12570
12592
  React.createElement(antd.Form.Item, { label: t("addProgramme:externalId"), name: "externalId", rules: [
@@ -21804,7 +21826,7 @@ var RegistryDashboardComponent = function (props) {
21804
21826
  var _42 = React.useState(), programmeLocationsMapLayer = _42[0], setProgrammeLocationsMapLayer = _42[1];
21805
21827
  var _43 = React.useState([]), fileList = _43[0], setFileList = _43[1];
21806
21828
  var _44 = React.useState("-"), selectedFile = _44[0], setSelectedFile = _44[1];
21807
- var _45 = React.useState(" "), selectedurl = _45[0], setSelectedurl = _45[1];
21829
+ var _45 = React.useState(""), selectedurl = _45[0], setSelectedurl = _45[1];
21808
21830
  var mapType = process.env.REACT_APP_MAP_TYPE
21809
21831
  ? process.env.REACT_APP_MAP_TYPE
21810
21832
  : "None";
@@ -23284,10 +23306,13 @@ var RegistryDashboardComponent = function (props) {
23284
23306
  React.createElement(antd.Space, null,
23285
23307
  selectedFile,
23286
23308
  React.createElement(icons.CaretDownOutlined, null)))),
23287
- React.createElement(antd.Button, { className: "annual-report-downloadbutton" },
23309
+ selectedurl.trim().length === 0 && (React.createElement(antd.Button, { className: "annual-report-downloadbutton" },
23288
23310
  React.createElement(antd.Space, null,
23289
- React.createElement("a", { href: selectedurl, target: "_blank", rel: "noopener noreferrer", download: true },
23290
- React.createElement(icons.LinkOutlined, { className: "common-progress-icon", style: { color: "#3F3A47" } })))))),
23311
+ React.createElement(icons.LinkOutlined, { className: "common-progress-icon", style: { color: "#3F3A47" } })))),
23312
+ selectedurl.trim().length > 0 && (React.createElement("a", { href: selectedurl, target: "_blank", rel: "noopener noreferrer", download: true },
23313
+ React.createElement(antd.Button, { className: "annual-report-downloadbutton" },
23314
+ React.createElement(antd.Space, null,
23315
+ React.createElement(icons.LinkOutlined, { className: "common-progress-icon", style: { color: "#3F3A47" } }))))))),
23291
23316
  React.createElement("div", { className: "filter-container" },
23292
23317
  React.createElement("div", { className: "date-filter" },
23293
23318
  React.createElement(RangePicker, { ranges: {