@undp/carbon-library 1.0.124-CARBON-315.2 → 1.0.124-CARBON-315.4

Sign up to get free protection for your applications and to get access to all the features.
package/dist/cjs/index.js CHANGED
@@ -24163,11 +24163,13 @@ var NdcActionBody = function (props) {
24163
24163
  var _a = useConnection(); _a.get; _a.put; var post = _a.post;
24164
24164
  var _b = React.useState(false), loading = _b[0], setLoading = _b[1];
24165
24165
  var _c = React.useState(), monitoringReportData = _c[0], setMonitoringReportData = _c[1];
24166
- var _d = React.useState(), verificationReportData = _d[0], setVerificationReportData = _d[1];
24167
- var _e = React.useState(), ndcActionId = _e[0], setNdcActionId = _e[1];
24168
- var _f = React.useState(false), openRejectDocConfirmationModal = _f[0], setOpenRejectDocConfirmationModal = _f[1];
24169
- var _g = React.useState({}), actionInfo = _g[0], setActionInfo = _g[1];
24170
- var _h = React.useState({}), rejectDocData = _h[0], setRejectDocData = _h[1];
24166
+ var _d = React.useState(""), monitoringReportversion = _d[0], setMonitoringReportversion = _d[1];
24167
+ var _e = React.useState(), verificationReportData = _e[0], setVerificationReportData = _e[1];
24168
+ var _f = React.useState(""), verificationReportVersion = _f[0], setVerificationReportversion = _f[1];
24169
+ var _g = React.useState(), ndcActionId = _g[0], setNdcActionId = _g[1];
24170
+ var _h = React.useState(false), openRejectDocConfirmationModal = _h[0], setOpenRejectDocConfirmationModal = _h[1];
24171
+ var _j = React.useState({}), actionInfo = _j[0], setActionInfo = _j[1];
24172
+ var _k = React.useState({}), rejectDocData = _k[0], setRejectDocData = _k[1];
24171
24173
  var maximumImageSize = process.env.REACT_APP_MAXIMUM_FILE_SIZE
24172
24174
  ? parseInt(process.env.REACT_APP_MAXIMUM_FILE_SIZE)
24173
24175
  : 5000000;
@@ -24308,9 +24310,15 @@ var NdcActionBody = function (props) {
24308
24310
  setNdcActionId(item === null || item === void 0 ? void 0 : item.id);
24309
24311
  if (item === null || item === void 0 ? void 0 : item.monitoringReport) {
24310
24312
  setMonitoringReportData(item === null || item === void 0 ? void 0 : item.monitoringReport);
24313
+ var versionfull = item === null || item === void 0 ? void 0 : item.monitoringReport.url.split("_")[(item === null || item === void 0 ? void 0 : item.monitoringReport.url.split("_").length) - 1];
24314
+ var version = versionfull ? versionfull.split(".")[0] : "V1";
24315
+ setMonitoringReportversion(version.startsWith("V") ? version : "V1");
24311
24316
  }
24312
24317
  if (item === null || item === void 0 ? void 0 : item.verificationReport) {
24313
24318
  setVerificationReportData(item === null || item === void 0 ? void 0 : item.verificationReport);
24319
+ var versionfull = item === null || item === void 0 ? void 0 : item.verificationReport.url.split("_")[(item === null || item === void 0 ? void 0 : item.verificationReport.url.split("_").length) - 1];
24320
+ var version = versionfull ? versionfull.split(".")[0] : "V1";
24321
+ setVerificationReportversion(version.startsWith("V") ? version : "V1");
24314
24322
  }
24315
24323
  });
24316
24324
  }, [data]);
@@ -24330,7 +24338,9 @@ var NdcActionBody = function (props) {
24330
24338
  React.createElement("div", { className: "report-type" },
24331
24339
  React.createElement("div", { className: "name-time-container" },
24332
24340
  React.createElement("div", { className: canUploadMonitorReport ? "name" : "empty" }, t("programme:monitoringReport")),
24333
- (monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.txTime) && (React.createElement("div", { className: "time" }, moment(parseInt(monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.txTime)).format("DD MMMM YYYY @ HH:mm")))),
24341
+ (monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.txTime) && (React.createElement("div", { className: "time" },
24342
+ moment(parseInt(monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.txTime)).format("DD MMMM YYYY @ HH:mm"),
24343
+ " ~ " + monitoringReportversion))),
24334
24344
  React.createElement("div", { className: "icon" }, (monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.url) ? (monitoringReportPending ? ((companyRolePermission || ministryLevelPermission) && (React.createElement(React.Fragment, null,
24335
24345
  React.createElement(icons.LikeOutlined, { onClick: function () {
24336
24346
  return docAction(monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.id, exports.DocumentStatus.ACCEPTED, monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.actionId, monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.type);
@@ -24401,7 +24411,9 @@ var NdcActionBody = function (props) {
24401
24411
  React.createElement("div", { className: canUploadMonitorReport && monitoringReportAccepted
24402
24412
  ? "name"
24403
24413
  : "empty" }, t("programme:verificationReport")),
24404
- (verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.txTime) && (React.createElement("div", { className: "time" }, moment(parseInt(verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.txTime)).format("DD MMMM YYYY @ HH:mm")))),
24414
+ (verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.txTime) && (React.createElement("div", { className: "time" },
24415
+ moment(parseInt(verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.txTime)).format("DD MMMM YYYY @ HH:mm"),
24416
+ " ~ " + verificationReportVersion))),
24405
24417
  React.createElement("div", { className: "icon" }, (verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.url) ? (verifcationReportPending ? ((verficationCompanyRolePermission ||
24406
24418
  ministryLevelPermission) && (React.createElement(React.Fragment, null,
24407
24419
  React.createElement(icons.LikeOutlined, { onClick: function () {
@@ -24493,15 +24505,18 @@ var ProgrammeDocuments = function (props) {
24493
24505
  var _l = React.useState(""), designDocStatus = _l[0], setDesignDocStatus = _l[1];
24494
24506
  var _m = React.useState(""), methodDocStatus = _m[0], setMethodDocStatus = _m[1];
24495
24507
  var _o = React.useState(""), designDocId = _o[0], setDesignDocId = _o[1];
24496
- var _p = React.useState(""), methDocId = _p[0], setMethDocId = _p[1];
24497
- var _q = React.useState([]), docData = _q[0], setDocData = _q[1];
24498
- var _r = React.useState(false), openRejectDocConfirmationModal = _r[0], setOpenRejectDocConfirmationModal = _r[1];
24499
- var _s = React.useState({}), actionInfo = _s[0], setActionInfo = _s[1];
24500
- var _t = React.useState({}), rejectDocData = _t[0], setRejectDocData = _t[1];
24501
- var _u = React.useState(""), impactAssessmentUrl = _u[0], setImpactAssessmentUrl = _u[1];
24502
- var _v = React.useState(""), impactAssessmentDate = _v[0], setImpactAssessmentDate = _v[1];
24503
- var _w = React.useState(""), impactAssessmentStatus = _w[0], setImpactAssessmentStatus = _w[1];
24504
- var _x = React.useState(""), impactAssessmentId = _x[0], setImpactAssessmentId = _x[1];
24508
+ var _p = React.useState(""), designDocversion = _p[0], setDesignDocversion = _p[1];
24509
+ var _q = React.useState(""), methDocId = _q[0], setMethDocId = _q[1];
24510
+ var _r = React.useState(""), methDocversion = _r[0], setMethDocversion = _r[1];
24511
+ var _s = React.useState([]), docData = _s[0], setDocData = _s[1];
24512
+ var _t = React.useState(false), openRejectDocConfirmationModal = _t[0], setOpenRejectDocConfirmationModal = _t[1];
24513
+ var _u = React.useState({}), actionInfo = _u[0], setActionInfo = _u[1];
24514
+ var _v = React.useState({}), rejectDocData = _v[0], setRejectDocData = _v[1];
24515
+ var _w = React.useState(""), impactAssessmentUrl = _w[0], setImpactAssessmentUrl = _w[1];
24516
+ var _x = React.useState(""), impactAssessmentDate = _x[0], setImpactAssessmentDate = _x[1];
24517
+ var _y = React.useState(""), impactAssessmentStatus = _y[0], setImpactAssessmentStatus = _y[1];
24518
+ var _z = React.useState(""), impactAssessmentId = _z[0], setImpactAssessmentId = _z[1];
24519
+ var _0 = React.useState(""), impactAssessmentversion = _0[0], setImpactAssessmentversion = _0[1];
24505
24520
  var maximumImageSize = process.env.REACT_APP_MAXIMUM_FILE_SIZE
24506
24521
  ? parseInt(process.env.REACT_APP_MAXIMUM_FILE_SIZE)
24507
24522
  : 5000000;
@@ -24529,12 +24544,18 @@ var ProgrammeDocuments = function (props) {
24529
24544
  setDesignDocDate(item === null || item === void 0 ? void 0 : item.txTime);
24530
24545
  setDesignDocStatus(item === null || item === void 0 ? void 0 : item.status);
24531
24546
  setDesignDocId(item === null || item === void 0 ? void 0 : item.id);
24547
+ var versionfull = (item === null || item === void 0 ? void 0 : item.url).split("_")[(item === null || item === void 0 ? void 0 : item.url).split('_').length - 1];
24548
+ var version = versionfull ? versionfull.split('.')[0] : "1";
24549
+ setDesignDocversion(version.startsWith("V") ? version : "V1");
24532
24550
  }
24533
24551
  if ((_b = item === null || item === void 0 ? void 0 : item.url) === null || _b === void 0 ? void 0 : _b.includes("METHODOLOGY")) {
24534
24552
  setMethodologyDocUrl(item === null || item === void 0 ? void 0 : item.url);
24535
24553
  setMethodologyDate(item === null || item === void 0 ? void 0 : item.txTime);
24536
24554
  setMethodDocStatus(item === null || item === void 0 ? void 0 : item.status);
24537
24555
  setMethDocId(item === null || item === void 0 ? void 0 : item.id);
24556
+ var versionfull = (item === null || item === void 0 ? void 0 : item.url).split("_")[(item === null || item === void 0 ? void 0 : item.url).split('_').length - 1];
24557
+ var version = versionfull ? versionfull.split('.')[0] : "1";
24558
+ setMethDocversion(version.startsWith("V") ? version : "V1");
24538
24559
  }
24539
24560
  if ((_c = item === null || item === void 0 ? void 0 : item.url) === null || _c === void 0 ? void 0 : _c.includes("OBJECTION")) {
24540
24561
  setNoObjectionDocUrl(item === null || item === void 0 ? void 0 : item.url);
@@ -24549,6 +24570,9 @@ var ProgrammeDocuments = function (props) {
24549
24570
  setImpactAssessmentDate(item === null || item === void 0 ? void 0 : item.txTime);
24550
24571
  setImpactAssessmentStatus(item === null || item === void 0 ? void 0 : item.status);
24551
24572
  setImpactAssessmentId(item === null || item === void 0 ? void 0 : item.id);
24573
+ var versionfull = (item === null || item === void 0 ? void 0 : item.url).split("_")[(item === null || item === void 0 ? void 0 : item.url).split("_").length - 1];
24574
+ var version = versionfull ? versionfull.split('.')[0] : "1";
24575
+ setImpactAssessmentversion(version.startsWith("V") ? version : "V1");
24552
24576
  }
24553
24577
  });
24554
24578
  }
@@ -24713,7 +24737,9 @@ var ProgrammeDocuments = function (props) {
24713
24737
  designDocStatus === exports.DocumentStatus.ACCEPTED && (React.createElement(icons.CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380" } })),
24714
24738
  designDocStatus === exports.DocumentStatus.REJECTED && (React.createElement(antd.Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: t("programme:rejectTip"), overlayClassName: "custom-tooltip" },
24715
24739
  React.createElement(icons.ExclamationCircleOutlined, { className: "common-progress-icon", style: { color: "#FD6F70" } })))),
24716
- designDocUrl !== "" && (React.createElement("div", { className: "time" }, moment(parseInt(designDocDate)).format("DD MMMM YYYY @ HH:mm")))),
24740
+ designDocUrl !== "" && (React.createElement("div", { className: "time" },
24741
+ moment(parseInt(designDocDate)).format("DD MMMM YYYY @ HH:mm"),
24742
+ " ~ " + designDocversion))),
24717
24743
  React.createElement(antd.Col, { span: 6, className: "field-value" }, designDocUrl !== "" ? (React.createElement("div", { className: "link" },
24718
24744
  linkDocVisible(designDocStatus) && (React.createElement("a", { href: designDocUrl, target: "_blank", rel: "noopener noreferrer", download: true },
24719
24745
  React.createElement(icons.BookOutlined, { className: "common-progress-icon margin-right-1", style: { color: "#3F3A47" } }))),
@@ -24749,7 +24775,9 @@ var ProgrammeDocuments = function (props) {
24749
24775
  noObjectionDocUrl !== "" && (React.createElement(antd.Row, { className: "field", key: "Objection Document" },
24750
24776
  React.createElement(antd.Col, { span: 18, className: "field-key" },
24751
24777
  React.createElement("div", { className: "label-uploaded" }, t("programme:objectionLett")),
24752
- React.createElement("div", { className: "time" }, moment(parseInt(noObjectionDate)).format("DD MMMM YYYY @ HH:mm"))),
24778
+ React.createElement("div", { className: "time" },
24779
+ moment(parseInt(noObjectionDate)).format("DD MMMM YYYY @ HH:mm"),
24780
+ " ~ V1")),
24753
24781
  React.createElement(antd.Col, { span: 6, className: "field-value" },
24754
24782
  React.createElement("div", { className: "link" },
24755
24783
  React.createElement("a", { href: noObjectionDocUrl, target: "_blank", rel: "noopener noreferrer", download: true },
@@ -24777,7 +24805,9 @@ var ProgrammeDocuments = function (props) {
24777
24805
  methodDocStatus === exports.DocumentStatus.ACCEPTED && (React.createElement(icons.CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380" } })),
24778
24806
  methodDocStatus === exports.DocumentStatus.REJECTED && (React.createElement(antd.Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: t("programme:rejectTip"), overlayClassName: "custom-tooltip" },
24779
24807
  React.createElement(icons.ExclamationCircleOutlined, { className: "common-progress-icon", style: { color: "#FD6F70" } })))),
24780
- methodologyDocUrl !== "" && (React.createElement("div", { className: "time" }, moment(parseInt(methodologyDate)).format("DD MMMM YYYY @ HH:mm")))),
24808
+ methodologyDocUrl !== "" && (React.createElement("div", { className: "time" },
24809
+ moment(parseInt(methodologyDate)).format("DD MMMM YYYY @ HH:mm"),
24810
+ " ~ " + methDocversion))),
24781
24811
  React.createElement(antd.Col, { span: 6, className: "field-value" }, methodologyDocUrl !== "" ? (React.createElement("div", { className: "link" },
24782
24812
  linkDocVisible(methodDocStatus) && (React.createElement("a", { href: methodologyDocUrl, target: "_blank", rel: "noopener noreferrer", download: true },
24783
24813
  React.createElement(icons.BookOutlined, { className: "common-progress-icon margin-right-1", style: { color: "#3F3A47" } }))),
@@ -24822,7 +24852,9 @@ var ProgrammeDocuments = function (props) {
24822
24852
  authorisationDocUrl !== "" && (React.createElement(antd.Row, { className: "field", key: "Authorisation Document" },
24823
24853
  React.createElement(antd.Col, { span: 18, className: "field-key" },
24824
24854
  React.createElement("div", { className: "label-uploaded" }, t("programme:authLetterLabel")),
24825
- React.createElement("div", { className: "time" }, moment(parseInt(authorisationDocDate)).format("DD MMMM YYYY @ HH:mm"))),
24855
+ React.createElement("div", { className: "time" },
24856
+ moment(parseInt(authorisationDocDate)).format("DD MMMM YYYY @ HH:mm"),
24857
+ " ~ V1")),
24826
24858
  React.createElement(antd.Col, { span: 6, className: "field-value" },
24827
24859
  React.createElement("div", { className: "link" },
24828
24860
  React.createElement("a", { href: authorisationDocUrl, target: "_blank", rel: "noopener noreferrer", download: true },
@@ -24849,7 +24881,9 @@ var ProgrammeDocuments = function (props) {
24849
24881
  impactAssessmentStatus === exports.DocumentStatus.ACCEPTED && (React.createElement(icons.CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380" } })),
24850
24882
  impactAssessmentStatus === exports.DocumentStatus.REJECTED && (React.createElement(antd.Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: t("programme:rejectTip"), overlayClassName: "custom-tooltip" },
24851
24883
  React.createElement(icons.ExclamationCircleOutlined, { className: "common-progress-icon", style: { color: "#FD6F70" } })))),
24852
- impactAssessmentUrl !== "" && (React.createElement("div", { className: "time" }, moment(parseInt(impactAssessmentDate)).format("DD MMMM YYYY @ HH:mm")))),
24884
+ impactAssessmentUrl !== "" && (React.createElement("div", { className: "time" },
24885
+ moment(parseInt(impactAssessmentDate)).format("DD MMMM YYYY @ HH:mm"),
24886
+ " ~ " + impactAssessmentversion))),
24853
24887
  React.createElement(antd.Col, { span: 6, className: "field-value" }, impactAssessmentUrl !== "" ? (React.createElement("div", { className: "link" },
24854
24888
  linkDocVisible(impactAssessmentStatus) && (React.createElement("a", { href: impactAssessmentUrl, target: "_blank", rel: "noopener noreferrer", download: true },
24855
24889
  React.createElement(icons.BookOutlined, { className: "common-progress-icon margin-right-1", style: { color: "#3F3A47" } }))),