@undp/carbon-library 1.0.160 → 1.0.163

Sign up to get free protection for your applications and to get access to all the features.
package/dist/esm/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { PlusOutlined, FilterOutlined, BankOutlined, SafetyOutlined, AuditOutlined, ExperimentOutlined, UploadOutlined, UserOutlined, MinusCircleOutlined, StarOutlined, ToolOutlined, EyeOutlined, SearchOutlined, EllipsisOutlined, EditOutlined, DeleteOutlined, FileAddOutlined, CheckCircleOutlined, ExclamationCircleOutlined, BookOutlined, CaretDownOutlined, SaveOutlined, EyeInvisibleOutlined, GlobalOutlined, FlagOutlined, LineChartOutlined, LikeOutlined, DislikeOutlined } from '@ant-design/icons';
1
+ import { PlusOutlined, FilterOutlined, BankOutlined, SafetyOutlined, AuditOutlined, ExperimentOutlined, UploadOutlined, UserOutlined, MinusCircleOutlined, StarOutlined, ToolOutlined, EyeOutlined, SearchOutlined, EllipsisOutlined, EditOutlined, DeleteOutlined, FileAddOutlined, CheckCircleOutlined, ExclamationCircleOutlined, BookOutlined, CaretDownOutlined, EyeInvisibleOutlined, GlobalOutlined, FlagOutlined, LineChartOutlined, LikeOutlined, DislikeOutlined } from '@ant-design/icons';
2
2
  import { Input, Radio, Space, Row, Col, Button, Dropdown, Table, Empty, message, Form, Steps, Upload, Tooltip, Select, Modal, Alert, Skeleton, Card, Tag, Checkbox, DatePicker, InputNumber, Popover, List, Typography, Spin, Tabs, Progress } from 'antd';
3
- import React, { useState, useEffect, useRef } from 'react';
3
+ import React, { useState, useEffect, useRef, useContext } from 'react';
4
4
  import { DateTime } from 'luxon';
5
5
  import { Buffer } from 'buffer';
6
6
  import PhoneInput, { formatPhoneNumberIntl, formatPhoneNumber } from 'react-phone-number-input';
@@ -19444,7 +19444,7 @@ var AddNdcActionComponent = function (props) {
19444
19444
  React.createElement(Steps, { progressDot: true, direction: "vertical", current: current, items: stepItems })))));
19445
19445
  };
19446
19446
 
19447
- var css_248z$d = ".ndc-details-view .card-container {\n margin-bottom: 16px;\n width: 100%;\n border-radius: 10px; }\n .ndc-details-view .card-container .co-benifits-view .title {\n color: rgba(58, 53, 65, 0.8);\n font-weight: 600;\n margin-left: 0.5rem; }\n .ndc-details-view .card-container .action-btns {\n margin-top: 25px;\n margin-bottom: -15px;\n justify-content: end; }\n\n.ndc-details-view .fix-height {\n height: 350px; }\n";
19447
+ var css_248z$d = ".ndc-details-view .card-container {\n margin-bottom: 16px;\n width: 100%;\n border-radius: 10px; }\n .ndc-details-view .card-container .co-benifits-view .title {\n color: rgba(58, 53, 65, 0.8);\n font-weight: 600;\n margin-left: 0.5rem; }\n .ndc-details-view .card-container .action-btns {\n margin-top: 25px;\n margin-bottom: -15px;\n justify-content: end; }\n\n.ndc-details-view .fix-height {\n height: 350px; }\n\n.title-icon {\n padding-right: 10px; }\n\n.title-text {\n color: rgba(58, 53, 65, 0.8);\n font-weight: 600; }\n\n.title {\n margin-bottom: 5px; }\n\n.ndc-action-report-body {\n display: flex;\n flex-direction: column;\n width: 100%; }\n .ndc-action-report-body .report-details {\n display: flex;\n flex-direction: row;\n width: 100%;\n align-items: center;\n justify-content: space-between;\n margin: 5px 25px;\n font-size: 0.8rem; }\n .ndc-action-report-body .report-details .report-type {\n display: flex;\n flex-direction: row;\n width: 60%; }\n .ndc-action-report-body .report-details .report-type .name-time-container {\n display: flex;\n flex-direction: column;\n width: 70%;\n margin-bottom: 0.5rem; }\n .ndc-action-report-body .report-details .report-type .name {\n font-weight: 500;\n color: rgba(58, 53, 65, 0.6); }\n .ndc-action-report-body .report-details .report-type .time {\n color: rgba(58, 53, 65, 0.5);\n width: max-content; }\n .ndc-action-report-body .report-details .report-type .icon {\n display: flex;\n align-items: center;\n width: 30%;\n color: rgba(58, 53, 65, 0.6); }\n .ndc-action-report-body .report-details .report-type .empty {\n font-weight: 500;\n color: rgba(58, 53, 65, 0.6); }\n .ndc-action-report-body .report-details .ant-row {\n margin: 0px 30px auto; }\n .ndc-action-report-body .report-details .report-link {\n display: flex;\n flex-direction: row;\n width: 40%; }\n .ndc-action-report-body .report-details .report-link .version {\n font-weight: 600;\n color: #cacaca; }\n .ndc-action-report-body .report-details .report-link .link {\n margin-left: 1rem; }\n";
19448
19448
  styleInject(css_248z$d);
19449
19449
 
19450
19450
  var css_248z$c = ".info-view .title-icon {\n padding-right: 10px; }\n\n.info-view .title-text {\n color: rgba(58, 53, 65, 0.8);\n font-weight: 600; }\n\n.info-view .title {\n margin-bottom: 5px; }\n\n.info-view .field-key {\n color: rgba(58, 53, 65, 0.6);\n font-weight: 500;\n text-overflow: ellipsis;\n overflow: hidden; }\n\n.info-view .field-value {\n color: rgba(58, 53, 65, 0.6);\n text-overflow: ellipsis;\n overflow: hidden; }\n .info-view .field-value .row {\n display: flex;\n width: 40%;\n align-items: center;\n justify-content: space-between; }\n .info-view .field-value .row .key {\n display: flex;\n width: 50%;\n align-items: center;\n justify-content: flex-start; }\n .info-view .field-value .row .data {\n display: flex;\n width: 50%;\n align-items: center;\n justify-content: flex-start; }\n\n.info-view .field {\n margin: 15px 25px;\n font-size: 0.8rem; }\n";
@@ -19539,15 +19539,19 @@ var NdcActionViewComponent = function (props) {
19539
19539
  var userInfoState = useUserContext().userInfoState;
19540
19540
  var post = useConnection().post;
19541
19541
  var state = useLocation().state;
19542
- var _d = useState({}), ndcActionReportDetails = _d[0], setNdcActionReportDetails = _d[1];
19542
+ var _d = useState({}); _d[0]; var setNdcActionReportDetails = _d[1];
19543
19543
  var _e = useState(false), isLoading = _e[0], setIsLoading = _e[1];
19544
- var _f = useState(), ndcActionDetails = _f[0], setNdcActionDetails = _f[1];
19545
- var _g = useState(); _g[0]; var setCoBenifitsComponentnDetails = _g[1];
19546
- var _h = useState(0), emissionsReductionExpected = _h[0], setEmissionsReductionExpected = _h[1];
19547
- var _j = useState(0), emissionsReductionAchieved = _j[0], setEmissionsReductionAchieved = _j[1];
19548
- var _k = useState([]), programmeOwnerId = _k[0], setProgrammeOwnerId = _k[1];
19549
- var _l = useState(false), canUploadMonitorReport = _l[0], setCanUploadMonitorReport = _l[1];
19550
- var _m = useState(false), monitoringReportAccepted = _m[0], setMonitoringReportAccepted = _m[1];
19544
+ var _f = useState(), monitoringReportData = _f[0], setMonitoringReportData = _f[1];
19545
+ var _g = useState(""), monitoringReportversion = _g[0], setMonitoringReportversion = _g[1];
19546
+ var _h = useState(), verificationReportData = _h[0], setVerificationReportData = _h[1];
19547
+ var _j = useState(""), verificationReportVersion = _j[0], setVerificationReportversion = _j[1];
19548
+ var _k = useState(), ndcActionDetails = _k[0], setNdcActionDetails = _k[1];
19549
+ var _l = useState(); _l[0]; var setCoBenifitsComponentnDetails = _l[1];
19550
+ var _m = useState(0), emissionsReductionExpected = _m[0], setEmissionsReductionExpected = _m[1];
19551
+ var _o = useState(0), emissionsReductionAchieved = _o[0], setEmissionsReductionAchieved = _o[1];
19552
+ var _p = useState([]), programmeOwnerId = _p[0], setProgrammeOwnerId = _p[1];
19553
+ var _q = useState(false), canUploadMonitorReport = _q[0], setCanUploadMonitorReport = _q[1];
19554
+ var _r = useState(false), monitoringReportAccepted = _r[0], setMonitoringReportAccepted = _r[1];
19551
19555
  var getProgrammeById = function (programmeId) { return __awaiter(void 0, void 0, void 0, function () {
19552
19556
  var response, error_1;
19553
19557
  var _a, _b, _c;
@@ -19589,13 +19593,16 @@ var NdcActionViewComponent = function (props) {
19589
19593
  }
19590
19594
  });
19591
19595
  }); };
19592
- var getProjectReportActions = function (reportData) {
19596
+ var getProjectReportActions = function (reportData, reportVersion) {
19593
19597
  return (React.createElement(Row, null,
19594
19598
  React.createElement("div", { className: "icon" },
19595
19599
  (reportData === null || reportData === void 0 ? void 0 : reportData.status) === DocumentStatus.ACCEPTED && (React.createElement(CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380" } })),
19596
19600
  (reportData === null || reportData === void 0 ? void 0 : reportData.status) === DocumentStatus.REJECTED && (React.createElement(ExclamationCircleOutlined, { className: "common-progress-icon", style: { color: "#FD6F70" } }))),
19597
19601
  React.createElement("div", { className: "link mg-left-1" }, (reportData === null || reportData === void 0 ? void 0 : reportData.url) && linkDocVisible(reportData === null || reportData === void 0 ? void 0 : reportData.status) && (React.createElement("a", { href: reportData === null || reportData === void 0 ? void 0 : reportData.url, target: "_blank", rel: "noopener noreferrer", download: true },
19598
- React.createElement(BookOutlined, { className: "common-progress-icon margin-right-1", style: { color: "#3F3A47" } }))))));
19602
+ React.createElement(BookOutlined, { className: "common-progress-icon margin-right-1", style: { color: "#3F3A47" } })))),
19603
+ (reportData === null || reportData === void 0 ? void 0 : reportData.txTime) && (React.createElement("div", { className: "time" },
19604
+ moment(parseInt(reportData === null || reportData === void 0 ? void 0 : reportData.txTime)).format("DD MMMM YYYY @ HH:mm"),
19605
+ " ~ " + reportVersion))));
19599
19606
  };
19600
19607
  var getProjectReports = function () { return __awaiter(void 0, void 0, void 0, function () {
19601
19608
  var reportDetails, response, exception_1;
@@ -19643,12 +19650,24 @@ var NdcActionViewComponent = function (props) {
19643
19650
  if ((item === null || item === void 0 ? void 0 : item.status) === DocumentStatus.ACCEPTED) {
19644
19651
  setMonitoringReportAccepted(true);
19645
19652
  }
19653
+ var versionfull = (item === null || item === void 0 ? void 0 : item.url).split("_")[(item === null || item === void 0 ? void 0 : item.url).split("_").length - 1];
19654
+ var version = versionfull ? versionfull.split(".")[0] : "1";
19655
+ var moniteringVersion = version.startsWith("V") ? version : "V1";
19646
19656
  reportDetails[t("ndcAction:viewMoniteringReport")] =
19647
- getProjectReportActions(item);
19657
+ getProjectReportActions(item, moniteringVersion);
19658
+ setMonitoringReportData(item);
19659
+ setMonitoringReportversion(moniteringVersion);
19648
19660
  }
19649
19661
  else if ((_b = item === null || item === void 0 ? void 0 : item.url) === null || _b === void 0 ? void 0 : _b.includes("VERIFICATION_REPORT")) {
19662
+ var versionfull = (item === null || item === void 0 ? void 0 : item.url).split("_")[(item === null || item === void 0 ? void 0 : item.url).split("_").length - 1];
19663
+ var version = versionfull ? versionfull.split(".")[0] : "1";
19664
+ var verificationVersion = version.startsWith("V")
19665
+ ? version
19666
+ : "V1";
19650
19667
  reportDetails[t("ndcAction:viewVerificationReport")] =
19651
- getProjectReportActions(item);
19668
+ getProjectReportActions(item, verificationVersion);
19669
+ setVerificationReportData(item);
19670
+ setVerificationReportversion(verificationVersion);
19652
19671
  }
19653
19672
  });
19654
19673
  }
@@ -19902,8 +19921,60 @@ var NdcActionViewComponent = function (props) {
19902
19921
  React.createElement(Col, { lg: 8, md: 24 },
19903
19922
  React.createElement(Skeleton, { loading: isLoading, active: true },
19904
19923
  React.createElement(Card, { className: "card-container fix-height" },
19905
- React.createElement("div", null,
19906
- React.createElement(InfoView, { data: ndcActionReportDetails, title: t("ndcAction:viewReportsTitle"), icon: React.createElement(Icon.FileEarmarkText, null) })))))),
19924
+ React.createElement("div", { className: "title" },
19925
+ React.createElement("span", { className: "title-icon" }, React.createElement(Icon.FileEarmarkText, null)),
19926
+ React.createElement("span", { className: "title-text" }, t("ndcAction:viewReportsTitle"))),
19927
+ React.createElement("div", { className: "ndc-action-report-body" },
19928
+ React.createElement("div", { className: "report-details" },
19929
+ React.createElement("div", { className: "report-type" },
19930
+ React.createElement("div", { className: "name-time-container" },
19931
+ React.createElement("div", { className: canUploadMonitorReport && monitoringReportAccepted
19932
+ ? "name"
19933
+ : "empty" }, t("programme:monitoringReport")),
19934
+ (monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.txTime) && (React.createElement("div", { className: "time" },
19935
+ moment(parseInt(monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.txTime)).format("DD MMMM YYYY @ HH:mm"),
19936
+ " ~ " + monitoringReportversion))),
19937
+ React.createElement("div", { className: "icon" }, !(monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.url) && (React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === Role.ViewOnly
19938
+ ? t("programme:notAuthToUploadDoc")
19939
+ : uploadDocUserPermission(userInfoState, DocType.MONITORING_REPORT, programmeOwnerId)
19940
+ ? !canUploadMonitorReport &&
19941
+ t("programme:programmeNotAuth")
19942
+ : t("programme:orgNotAuth"), overlayClassName: "custom-tooltip" },
19943
+ React.createElement(FileAddOutlined, null))))),
19944
+ (monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.url) && (React.createElement(Row, null,
19945
+ React.createElement("div", { className: "icon" },
19946
+ (monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.status) ===
19947
+ DocumentStatus.ACCEPTED && (React.createElement(CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380" } })),
19948
+ (monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.status) ===
19949
+ DocumentStatus.REJECTED && (React.createElement(ExclamationCircleOutlined, { className: "common-progress-icon", style: { color: "#FD6F70" } }))),
19950
+ React.createElement("div", { className: "link mg-left-1" }, (monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.url) &&
19951
+ linkDocVisible(monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.status) && (React.createElement("a", { href: monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.url, target: "_blank", rel: "noopener noreferrer", download: true },
19952
+ React.createElement(BookOutlined, { className: "common-progress-icon margin-right-1", style: { color: "#3F3A47" } }))))))),
19953
+ React.createElement("div", { className: "report-details" },
19954
+ React.createElement("div", { className: "report-type" },
19955
+ React.createElement("div", { className: "name-time-container" },
19956
+ React.createElement("div", { className: canUploadMonitorReport && monitoringReportAccepted
19957
+ ? "name"
19958
+ : "empty" }, t("programme:verificationReport")),
19959
+ (verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.txTime) && (React.createElement("div", { className: "time" },
19960
+ moment(parseInt(verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.txTime)).format("DD MMMM YYYY @ HH:mm"),
19961
+ " ~ " + verificationReportVersion))),
19962
+ React.createElement("div", { className: "icon" }, !(verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.url) && (React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === Role.ViewOnly
19963
+ ? t("programme:notAuthToUploadDoc")
19964
+ : uploadDocUserPermission(userInfoState, DocType.VERIFICATION_REPORT, programmeOwnerId)
19965
+ ? !monitoringReportAccepted &&
19966
+ t("programme:monitoringRepNotApproved")
19967
+ : t("programme:notAuthToUploadDoc"), overlayClassName: "custom-tooltip" },
19968
+ React.createElement(FileAddOutlined, null))))),
19969
+ (verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.url) && (React.createElement(Row, null,
19970
+ React.createElement("div", { className: "icon" },
19971
+ (verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.status) ===
19972
+ DocumentStatus.ACCEPTED && (React.createElement(CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380" } })),
19973
+ (verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.status) ===
19974
+ DocumentStatus.REJECTED && (React.createElement(ExclamationCircleOutlined, { className: "common-progress-icon", style: { color: "#FD6F70" } }))),
19975
+ React.createElement("div", { className: "link mg-left-1" }, (verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.url) &&
19976
+ linkDocVisible(verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.status) && (React.createElement("a", { href: verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.url, target: "_blank", rel: "noopener noreferrer", download: true },
19977
+ React.createElement(BookOutlined, { className: "common-progress-icon margin-right-1", style: { color: "#3F3A47" } })))))))))))),
19907
19978
  ((ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.action) === NdcActionTypes.Mitigation ||
19908
19979
  (ndcActionDetails === null || ndcActionDetails === void 0 ? void 0 : ndcActionDetails.action) === NdcActionTypes.CrossCutting) && (React.createElement(Row, null,
19909
19980
  React.createElement(Col, { lg: 24, className: "gutter-row" },
@@ -24435,16 +24506,60 @@ var RegistryDashboardComponent = function (props) {
24435
24506
  lastUpdateTransferLocations))))))))) : ("")));
24436
24507
  };
24437
24508
 
24438
- React.createContext(null);
24509
+ var EditableContext = React.createContext(null);
24510
+ var EditableRow = function (_a) {
24511
+ _a.index; var props = __rest(_a, ["index"]);
24512
+ var form = Form.useForm()[0];
24513
+ return (React.createElement(Form, { form: form, component: false },
24514
+ React.createElement(EditableContext.Provider, { value: form },
24515
+ React.createElement("tr", __assign({}, props)))));
24516
+ };
24439
24517
  var EditableCell = function (_a) {
24440
- var editing = _a.editing, dataIndex = _a.dataIndex, title = _a.title, inputType = _a.inputType; _a.record; _a.index; var children = _a.children, restProps = __rest(_a, ["editing", "dataIndex", "title", "inputType", "record", "index", "children"]);
24441
- var inputNode = inputType === "number" ? React.createElement(InputNumber, null) : React.createElement(Input, null);
24442
- return (React.createElement("td", __assign({}, restProps), editing ? (React.createElement(Form.Item, { name: dataIndex, style: { margin: 0 }, rules: [
24443
- {
24444
- required: true,
24445
- message: "Please Input ".concat(title, "!"),
24446
- },
24447
- ] }, inputNode)) : (children)));
24518
+ var title = _a.title, editable = _a.editable, children = _a.children, dataIndex = _a.dataIndex, record = _a.record, handleSave = _a.handleSave, restProps = __rest(_a, ["title", "editable", "children", "dataIndex", "record", "handleSave"]);
24519
+ var _b = useState(false), editing = _b[0], setEditing = _b[1];
24520
+ var inputRef = useRef(null);
24521
+ var form = useContext(EditableContext);
24522
+ useEffect(function () {
24523
+ if (editing) {
24524
+ inputRef.current.focus();
24525
+ }
24526
+ }, [editing]);
24527
+ var toggleEdit = function () {
24528
+ var _a;
24529
+ setEditing(!editing);
24530
+ form.setFieldsValue((_a = {}, _a[dataIndex] = record[dataIndex], _a));
24531
+ };
24532
+ var save = function () { return __awaiter(void 0, void 0, void 0, function () {
24533
+ var values, errInfo_1;
24534
+ return __generator(this, function (_a) {
24535
+ switch (_a.label) {
24536
+ case 0:
24537
+ _a.trys.push([0, 2, , 3]);
24538
+ return [4 /*yield*/, form.validateFields()];
24539
+ case 1:
24540
+ values = _a.sent();
24541
+ toggleEdit();
24542
+ handleSave(__assign(__assign({}, record), values));
24543
+ return [3 /*break*/, 3];
24544
+ case 2:
24545
+ errInfo_1 = _a.sent();
24546
+ console.log("Save failed:", errInfo_1);
24547
+ return [3 /*break*/, 3];
24548
+ case 3: return [2 /*return*/];
24549
+ }
24550
+ });
24551
+ }); };
24552
+ var childNode = children;
24553
+ if (editable) {
24554
+ childNode = editing ? (React.createElement(Form.Item, { style: { margin: 0 }, name: dataIndex, rules: [
24555
+ {
24556
+ required: true,
24557
+ message: "".concat(title, " is required."),
24558
+ },
24559
+ ] },
24560
+ React.createElement(Input, { ref: inputRef, onPressEnter: save, onBlur: save }))) : (React.createElement("div", { className: "editable-cell-value-wrap", style: { paddingRight: 24, minWidth: "100px", minHeight: "20px" }, onClick: toggleEdit }, children));
24561
+ }
24562
+ return React.createElement("td", __assign({}, restProps), childNode);
24448
24563
  };
24449
24564
 
24450
24565
  var css_248z$4 = ".ndc-steps-actions {\n display: flex;\n flex-direction: row-reverse;\n margin-right: 1rem;\n justify-content: center; }\n .ndc-steps-actions .action-btn {\n border: 1px solid #16b1ff;\n color: #16b1ff;\n margin-right: 1rem; }\n .ndc-steps-actions .back-btn {\n border: 1px solid rgba(140, 140, 140, 0.7);\n color: rgba(140, 140, 140, 0.7);\n margin-right: 1rem; }\n .ndc-steps-actions .mg-left-1 {\n margin-left: 1rem; }\n";
@@ -24467,17 +24582,7 @@ var NdcDetailsComponent = function (props) {
24467
24582
  var addedNdcDetailId = useRef(0);
24468
24583
  var selectedNdcDetail = useRef({});
24469
24584
  var _e = useState(0), tableKey = _e[0], setTableKey = _e[1];
24470
- var form = Form.useForm()[0];
24471
- var _f = useState(""), editingKey = _f[0], setEditingKey = _f[1];
24472
24585
  var userInfoState = useUserContext().userInfoState;
24473
- var isEditing = function (record) { return record.key === editingKey; };
24474
- var onEditRow = function (record) {
24475
- form.setFieldsValue(__assign({ nationalPlanObj: "", kpi: "", ministry: "" }, record));
24476
- setEditingKey(record.key);
24477
- };
24478
- var onEditCancel = function () {
24479
- setEditingKey("");
24480
- };
24481
24586
  var isAddRangeVisible = function () {
24482
24587
  return (((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.MINISTRY ||
24483
24588
  (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.GOVERNMENT) &&
@@ -24490,63 +24595,37 @@ var NdcDetailsComponent = function (props) {
24490
24595
  var inRange = function (num, min, max) {
24491
24596
  return num >= min && num <= max;
24492
24597
  };
24493
- var onHandleSave = function (record) { return __awaiter(void 0, void 0, void 0, function () {
24494
- var updatedNdcDetails, editedData, index, parentIndex, parentItem, itemIndex, errInfo_1;
24495
- return __generator(this, function (_a) {
24496
- switch (_a.label) {
24497
- case 0:
24498
- _a.trys.push([0, 2, , 3]);
24499
- updatedNdcDetails = __spreadArray([], ndcDetailsData, true);
24500
- return [4 /*yield*/, form.validateFields()];
24501
- case 1:
24502
- editedData = (_a.sent());
24503
- if (record) {
24504
- if (record.type === NdcActionType.main) {
24505
- index = updatedNdcDetails.findIndex(function (item) { return record.key === item.key; });
24506
- updatedNdcDetails.splice(index, 1, __assign(__assign({}, record), editedData));
24507
- setNdcDetailsData(updatedNdcDetails);
24508
- }
24509
- else {
24510
- parentIndex = updatedNdcDetails.findIndex(function (item) { return record.ndcActionId === item.key; });
24511
- parentItem = updatedNdcDetails[parentIndex];
24512
- if (parentItem) {
24513
- if (parentItem.subNdcDetails) {
24514
- itemIndex = parentItem.subNdcDetails.findIndex(function (item) { return record.key === item.key; });
24515
- if (itemIndex !== -1) {
24516
- parentItem.subNdcDetails.splice(itemIndex, 1, __assign(__assign({}, record), editedData));
24517
- }
24518
- if (itemIndex + 1 === parentItem.subNdcDetails.length) {
24519
- parentItem.subNdcDetails.push({
24520
- key: ++addedNdcDetailId.current,
24521
- ndcActionId: parentItem.key,
24522
- type: NdcActionType.sub,
24523
- startDate: new Date("2019-03-25"),
24524
- endDate: new Date("2020-03-25"),
24525
- nationalPlanObj: "",
24526
- kpi: "",
24527
- ministry: "",
24528
- });
24529
- }
24530
- }
24531
- updatedNdcDetails.splice(parentIndex, 1, __assign({}, parentItem));
24532
- setNdcDetailsData(updatedNdcDetails);
24533
- }
24534
- }
24535
- setEditingKey("");
24536
- setTableKey(function (key) { return key + 1; });
24598
+ var handleSave = function (row) {
24599
+ if (row.type === NdcActionType.main) {
24600
+ var newData = __spreadArray([], ndcDetailsData, true);
24601
+ var index = newData.findIndex(function (item) { return row.key === item.key; });
24602
+ var item = newData[index];
24603
+ newData.splice(index, 1, __assign(__assign({}, item), row));
24604
+ setNdcDetailsData(newData);
24605
+ }
24606
+ else {
24607
+ var newData = __spreadArray([], ndcDetailsData, true);
24608
+ var parentIndex = newData.findIndex(function (item) { return row.ndcActionId === item.key; });
24609
+ var parentItem = newData[parentIndex];
24610
+ if (parentItem) {
24611
+ if (parentItem.subNdcDetails) {
24612
+ var itemIndex = parentItem.subNdcDetails.findIndex(function (item) { return row.key === item.key; });
24613
+ if (itemIndex === -1) {
24614
+ parentItem.subNdcDetails.push(row);
24537
24615
  }
24538
24616
  else {
24539
- throw new Error("Save failed");
24617
+ parentItem.subNdcDetails.splice(itemIndex, 1, __assign({}, row));
24540
24618
  }
24541
- return [3 /*break*/, 3];
24542
- case 2:
24543
- errInfo_1 = _a.sent();
24544
- console.log("Validate Failed:", errInfo_1);
24545
- return [3 /*break*/, 3];
24546
- case 3: return [2 /*return*/];
24619
+ }
24620
+ else {
24621
+ parentItem.subNdcDetails = [row];
24622
+ }
24547
24623
  }
24548
- });
24549
- }); };
24624
+ newData.splice(parentIndex, 1, __assign({}, parentItem));
24625
+ setNdcDetailsData(newData);
24626
+ setTableKey(function (key) { return key + 1; });
24627
+ }
24628
+ };
24550
24629
  var getNdcDetailsForPeriod = function () {
24551
24630
  var range = selectedTab.split("-");
24552
24631
  if (range.length > 1) {
@@ -24595,27 +24674,10 @@ var NdcDetailsComponent = function (props) {
24595
24674
  key: "ministry",
24596
24675
  align: "left",
24597
24676
  editable: true,
24598
- width: "30%",
24677
+ width: "40%",
24599
24678
  render: function (_, record) { return (React.createElement(React.Fragment, null, record.nationalPlanObj ? (React.createElement(Space, { size: "middle" },
24600
24679
  React.createElement("span", null, record.ministry))) : (React.createElement("input", { placeholder: "Please add the Ministry name", className: "ant-input", disabled: true, type: "text" })))); },
24601
24680
  },
24602
- {
24603
- title: "Action",
24604
- dataIndex: "operation",
24605
- width: "10%",
24606
- render: function (_, record) {
24607
- var editable = isEditing(record);
24608
- return editable ? (React.createElement("span", null,
24609
- React.createElement(Tooltip, { title: "Save" },
24610
- React.createElement(Typography.Link, { onClick: function () { return onHandleSave(record); }, style: { marginRight: 20 } },
24611
- React.createElement(SaveOutlined, null))),
24612
- React.createElement(Tooltip, { title: "Cancel" },
24613
- React.createElement(Typography.Link, { onClick: onEditCancel, style: { marginRight: 8 } },
24614
- React.createElement(ExclamationCircleOutlined, null))))) : (React.createElement(Tooltip, { title: "Edit" },
24615
- React.createElement(Typography.Link, { disabled: editingKey !== "", onClick: function () { return onEditRow(record); } },
24616
- React.createElement(EditOutlined, null))));
24617
- },
24618
- },
24619
24681
  ];
24620
24682
  var columns = defaultColumns.map(function (col) {
24621
24683
  if (!col.editable) {
@@ -24626,7 +24688,7 @@ var NdcDetailsComponent = function (props) {
24626
24688
  editable: col.editable,
24627
24689
  dataIndex: col.dataIndex,
24628
24690
  title: col.title,
24629
- editing: isEditing(record),
24691
+ handleSave: handleSave,
24630
24692
  }); } });
24631
24693
  });
24632
24694
  function onAddNewNdcDetail() {
@@ -24657,11 +24719,32 @@ var NdcDetailsComponent = function (props) {
24657
24719
  }
24658
24720
  var components = {
24659
24721
  body: {
24722
+ row: EditableRow,
24660
24723
  cell: EditableCell,
24661
24724
  },
24662
24725
  };
24726
+ //commented because rendering issue
24663
24727
  function ndcDetailsTableContent() {
24664
- return React.createElement("div", null);
24728
+ return (React.createElement("div", null)
24729
+ // <div>
24730
+ // <Button
24731
+ // onClick={onAddNewNdcDetail}
24732
+ // type="primary"
24733
+ // style={{
24734
+ // marginBottom: 16,
24735
+ // }}
24736
+ // >
24737
+ // Add a row
24738
+ // </Button>
24739
+ // <Table
24740
+ // components={components}
24741
+ // rowClassName={() => 'editable-row'}
24742
+ // bordered
24743
+ // dataSource={ndcDetailsData}
24744
+ // columns={columns}
24745
+ // />
24746
+ // </div>
24747
+ );
24665
24748
  }
24666
24749
  var onCancelPeriod = function () { };
24667
24750
  var onAddNewPeriod = function () {
@@ -24718,7 +24801,6 @@ var NdcDetailsComponent = function (props) {
24718
24801
  }
24719
24802
  var onTabChange = function (key) {
24720
24803
  setSelectedTab(key);
24721
- setEditingKey("");
24722
24804
  };
24723
24805
  useEffect(function () {
24724
24806
  var defaultNdcDetails = [
@@ -24992,18 +25074,17 @@ var NdcDetailsComponent = function (props) {
24992
25074
  React.createElement(Tabs, { centered: false, defaultActiveKey: "1", items: periodItems, activeKey: selectedTab, onChange: onTabChange })),
24993
25075
  selectedTab !== "add_new" && (React.createElement("div", null,
24994
25076
  React.createElement("div", null,
24995
- React.createElement(Form, { form: form, component: false },
24996
- React.createElement(Table, { key: tableKey, components: components, rowClassName: function () { return "editable-row"; }, bordered: true, dataSource: getNdcDetailsForPeriod(), columns: columns, expandable: {
24997
- expandedRowRender: function (record) { return getSubNdcActionContent(record); },
24998
- indentSize: 0,
24999
- defaultExpandedRowKeys: [selectedNdcDetail.current.key],
25000
- }, footer: function () {
25001
- return isAddNdcActionVisible() && (React.createElement(Row, { justify: "center" },
25002
- React.createElement(Button, { onClick: onAddNewNdcDetail, type: "default", style: {
25003
- marginBottom: 16,
25004
- width: "100%",
25005
- } }, t("ndc:addNdcAction"))));
25006
- } })))))));
25077
+ React.createElement(Table, { key: tableKey, components: components, rowClassName: function () { return "editable-row"; }, bordered: true, dataSource: getNdcDetailsForPeriod(), columns: columns, expandable: {
25078
+ expandedRowRender: function (record) { return getSubNdcActionContent(record); },
25079
+ indentSize: 0,
25080
+ defaultExpandedRowKeys: [selectedNdcDetail.current.key],
25081
+ }, footer: function () {
25082
+ return isAddNdcActionVisible() && (React.createElement(Row, { justify: "center" },
25083
+ React.createElement(Button, { onClick: onAddNewNdcDetail, type: "default", style: {
25084
+ marginBottom: 16,
25085
+ width: "100%",
25086
+ } }, t("ndc:addNdcAction"))));
25087
+ } }))))));
25007
25088
  };
25008
25089
 
25009
25090
  var ImgWithFallback = function (_a) {
@@ -25659,7 +25740,7 @@ var RejectDocumentationConfirmationModel = function (props) {
25659
25740
  React.createElement(Button, { className: "mg-left-2", type: "primary", danger: true, htmlType: "submit", loading: loading, disabled: actionInfo.type === "reject" && comment === "" }, "REJECT")))));
25660
25741
  };
25661
25742
 
25662
- var css_248z$2 = ".ndc-action-body {\n display: flex;\n flex-direction: column;\n width: 100%; }\n .ndc-action-body .report-details {\n display: flex;\n flex-direction: row;\n width: 100%;\n align-items: center;\n justify-content: space-between; }\n .ndc-action-body .report-details .report-type {\n display: flex;\n flex-direction: row;\n width: 60%; }\n .ndc-action-body .report-details .report-type .name-time-container {\n display: flex;\n flex-direction: column;\n width: 70%;\n margin-bottom: 0.5rem; }\n .ndc-action-body .report-details .report-type .name {\n font-weight: 600;\n color: rgba(58, 53, 65, 0.8); }\n .ndc-action-body .report-details .report-type .icon {\n display: flex;\n align-items: center;\n width: 30%; }\n .ndc-action-body .report-details .report-type .empty {\n font-weight: 600;\n color: #cacaca; }\n .ndc-action-body .report-details .report-link {\n display: flex;\n flex-direction: row;\n width: 40%; }\n .ndc-action-body .report-details .report-link .version {\n font-weight: 600;\n color: #cacaca; }\n .ndc-action-body .report-details .report-link .link {\n margin-left: 1rem; }\n";
25743
+ var css_248z$2 = ".ndc-action-body {\n display: flex;\n flex-direction: column;\n width: 100%; }\n .ndc-action-body .report-details {\n display: flex;\n flex-direction: row;\n width: 100%;\n align-items: center;\n justify-content: space-between; }\n .ndc-action-body .report-details .report-type {\n display: flex;\n flex-direction: row;\n width: 60%; }\n .ndc-action-body .report-details .report-type .name-time-container {\n display: flex;\n flex-direction: column;\n width: 70%;\n margin-bottom: 0.5rem; }\n .ndc-action-body .report-details .report-type .name {\n font-weight: 600;\n color: rgba(58, 53, 65, 0.8); }\n .ndc-action-body .report-details .report-type .icon {\n display: flex;\n align-items: center;\n width: 30%; }\n .ndc-action-body .report-details .report-type .empty {\n font-weight: 600;\n color: #cacaca; }\n .ndc-action-body .report-details .report-link {\n display: flex;\n flex-direction: row;\n width: 40%;\n align-items: center;\n justify-content: flex-start;\n gap: 20px; }\n .ndc-action-body .report-details .report-link .version {\n font-weight: 600;\n color: #cacaca; }\n .ndc-action-body .report-details .report-link .link {\n margin-left: 1rem; }\n";
25663
25744
  styleInject(css_248z$2);
25664
25745
 
25665
25746
  var NdcActionBody = function (props) {
@@ -25877,8 +25958,8 @@ var NdcActionBody = function (props) {
25877
25958
  : t("programme:orgNotAuth"), overlayClassName: "custom-tooltip" },
25878
25959
  React.createElement(FileAddOutlined, { className: "common-progress-icon", style: canUploadMonitorReport &&
25879
25960
  uploadDocUserPermission(userInfoState, DocType.MONITORING_REPORT, programmeOwnerId, ministryLevelPermission)
25880
- ? { color: "#3F3A47", cursor: "pointer" }
25881
- : { color: "#cacaca", cursor: "default" }, onClick: function () {
25961
+ ? { color: "#3F3A47", cursor: "pointer", margin: "0px 0px 2.5px 0px" }
25962
+ : { color: "#cacaca", cursor: "default", margin: "0px 0px 2.5px 0px" }, onClick: function () {
25882
25963
  if (canUploadMonitorReport &&
25883
25964
  uploadDocUserPermission(userInfoState, DocType.MONITORING_REPORT, programmeOwnerId, ministryLevelPermission)) {
25884
25965
  handleFileUploadMonitor();
@@ -25901,8 +25982,8 @@ var NdcActionBody = function (props) {
25901
25982
  : t("programme:orgNotAuth"), overlayClassName: "custom-tooltip" },
25902
25983
  React.createElement(FileAddOutlined, { className: "common-progress-icon", style: canUploadMonitorReport &&
25903
25984
  uploadDocUserPermission(userInfoState, DocType.MONITORING_REPORT, programmeOwnerId, ministryLevelPermission)
25904
- ? { color: "#3F3A47", cursor: "pointer" }
25905
- : { color: "#cacaca", cursor: "default" }, onClick: function () {
25985
+ ? { color: "#3F3A47", cursor: "pointer", margin: "0px 0px 2.5px 0px" }
25986
+ : { color: "#cacaca", cursor: "default", margin: "0px 0px 2.5px 0px" }, onClick: function () {
25906
25987
  if (canUploadMonitorReport &&
25907
25988
  uploadDocUserPermission(userInfoState, DocType.MONITORING_REPORT, programmeOwnerId, ministryLevelPermission)) {
25908
25989
  handleFileUploadMonitor();
@@ -25951,8 +26032,8 @@ var NdcActionBody = function (props) {
25951
26032
  : t("programme:notAuthToUploadDoc"), overlayClassName: "custom-tooltip" },
25952
26033
  React.createElement(FileAddOutlined, { className: "common-progress-icon", style: monitoringReportAccepted &&
25953
26034
  uploadDocUserPermission(userInfoState, DocType.VERIFICATION_REPORT, programmeOwnerId, ministryLevelPermission)
25954
- ? { color: "#3F3A47", cursor: "pointer" }
25955
- : { color: "#cacaca", cursor: "default" }, onClick: function () {
26035
+ ? { color: "#3F3A47", cursor: "pointer", margin: "0px 0px 2.5px 0px" }
26036
+ : { color: "#cacaca", cursor: "default", margin: "0px 0px 2.5px 0px" }, onClick: function () {
25956
26037
  if (monitoringReportAccepted &&
25957
26038
  uploadDocUserPermission(userInfoState, DocType.VERIFICATION_REPORT, programmeOwnerId, ministryLevelPermission)) {
25958
26039
  handleFileUploadVerification();
@@ -25975,8 +26056,8 @@ var NdcActionBody = function (props) {
25975
26056
  : t("programme:notAuthToUploadDoc"), overlayClassName: "custom-tooltip" },
25976
26057
  React.createElement(FileAddOutlined, { className: "common-progress-icon", style: monitoringReportAccepted &&
25977
26058
  uploadDocUserPermission(userInfoState, DocType.VERIFICATION_REPORT, programmeOwnerId, ministryLevelPermission)
25978
- ? { color: "#3F3A47", cursor: "pointer" }
25979
- : { color: "#cacaca", cursor: "default" }, onClick: function () {
26059
+ ? { color: "#3F3A47", cursor: "pointer", margin: "0px 0px 2.5px 0px" }
26060
+ : { color: "#cacaca", cursor: "default", margin: "0px 0px 2.5px 0px" }, onClick: function () {
25980
26061
  if (monitoringReportAccepted &&
25981
26062
  uploadDocUserPermission(userInfoState, DocType.VERIFICATION_REPORT, programmeOwnerId, ministryLevelPermission)) {
25982
26063
  handleFileUploadVerification();
@@ -25990,7 +26071,7 @@ var NdcActionBody = function (props) {
25990
26071
  React.createElement(RejectDocumentationConfirmationModel, { actionInfo: actionInfo, onActionConfirmed: handleOk, onActionCanceled: handleCancel, openModal: openRejectDocConfirmationModal, errorMsg: "", loading: loading, translator: translator })));
25991
26072
  };
25992
26073
 
25993
- var css_248z$1 = ".info-view .title-icon {\n padding-right: 10px; }\n\n.info-view .title-text {\n color: rgba(58, 53, 65, 0.8);\n font-weight: 600; }\n\n.info-view .title {\n margin-bottom: 5px; }\n\n.info-view .field-key {\n color: rgba(58, 53, 65, 0.6);\n font-weight: 500;\n text-overflow: ellipsis;\n overflow: hidden; }\n .info-view .field-key .label-container {\n display: flex;\n flex-direction: row; }\n .info-view .field-key .label {\n width: 70%; }\n .info-view .field-key .label-uploaded {\n color: rgba(58, 53, 65, 0.8);\n width: 70%; }\n\n.info-view .field-value {\n color: rgba(58, 53, 65, 0.6);\n text-overflow: ellipsis;\n overflow: hidden; }\n .info-view .field-value .link {\n display: flex;\n flex-direction: row; }\n\n.info-view .field {\n margin: 15px 25px;\n font-size: 0.8rem; }\n";
26074
+ var css_248z$1 = ".info-view .title-icon {\n padding-right: 10px; }\n\n.info-view .title-text {\n color: rgba(58, 53, 65, 0.8);\n font-weight: 600; }\n\n.info-view .title {\n margin-bottom: 5px; }\n\n.info-view .field-key {\n color: rgba(58, 53, 65, 0.6);\n font-weight: 500;\n text-overflow: ellipsis;\n overflow: hidden; }\n .info-view .field-key .label-container {\n display: flex;\n flex-direction: row; }\n .info-view .field-key .label {\n width: 70%; }\n .info-view .field-key .label-uploaded {\n color: rgba(58, 53, 65, 0.8);\n width: 70%; }\n\n.info-view .field-value {\n color: rgba(58, 53, 65, 0.6);\n text-overflow: ellipsis;\n overflow: hidden; }\n .info-view .field-value .link {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: flex-start;\n gap: 20px; }\n\n.info-view .field {\n margin: 15px 25px;\n font-size: 0.8rem; }\n";
25994
26075
  styleInject(css_248z$1);
25995
26076
 
25996
26077
  var ProgrammeDocuments = function (props) {
@@ -26264,8 +26345,8 @@ var ProgrammeDocuments = function (props) {
26264
26345
  ? t("programme:notAuthToUploadDoc")
26265
26346
  : !uploadDocUserPermission(userInfoState, DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission) && t("programme:orgNotAuth"), overlayClassName: "custom-tooltip" },
26266
26347
  React.createElement(FileAddOutlined, { className: "common-progress-icon", style: uploadDocUserPermission(userInfoState, DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission)
26267
- ? { color: "#3F3A47", cursor: "pointer" }
26268
- : { color: "#cacaca", cursor: "default" }, onClick: function () {
26348
+ ? { color: "#3F3A47", cursor: "pointer", margin: "0px 0px 2.5px 0px" }
26349
+ : { color: "#cacaca", cursor: "default", margin: "0px 0px 2.5px 0px" }, onClick: function () {
26269
26350
  return uploadDocUserPermission(userInfoState, DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission) && handleDesignDocFileUpload();
26270
26351
  } })),
26271
26352
  React.createElement("input", { type: "file", ref: fileInputRef, style: { display: "none" }, accept: ".xls, .xlsx, .ppt, .pptx, .csv, .doc, .docx, .pdf, .png, .jpg", onChange: function (e) {
@@ -26278,8 +26359,8 @@ var ProgrammeDocuments = function (props) {
26278
26359
  ? t("programme:notAuthToUploadDoc")
26279
26360
  : !uploadDocUserPermission(userInfoState, DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission) && t("programme:orgNotAuth"), overlayClassName: "custom-tooltip" },
26280
26361
  React.createElement(FileAddOutlined, { className: "common-progress-icon", style: uploadDocUserPermission(userInfoState, DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission)
26281
- ? { color: "#3F3A47", cursor: "pointer" }
26282
- : { color: "#cacaca", cursor: "default" }, onClick: function () {
26362
+ ? { color: "#3F3A47", cursor: "pointer", margin: "0px 0px 2.5px 0px" }
26363
+ : { color: "#cacaca", cursor: "default", margin: "0px 0px 2.5px 0px" }, onClick: function () {
26283
26364
  return uploadDocUserPermission(userInfoState, DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission) && handleDesignDocFileUpload();
26284
26365
  } })),
26285
26366
  React.createElement("input", { type: "file", ref: fileInputRef, style: { display: "none" }, accept: ".xls, .xlsx, .ppt, .pptx, .csv, .doc, .docx, .pdf, .png, .jpg", onChange: function (e) {
@@ -26332,8 +26413,8 @@ var ProgrammeDocuments = function (props) {
26332
26413
  : !uploadDocUserPermission(userInfoState, DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission) && t("programme:orgNotAuth"), overlayClassName: "custom-tooltip" },
26333
26414
  React.createElement(FileAddOutlined, { className: "common-progress-icon", style: designDocStatus === DocumentStatus.ACCEPTED &&
26334
26415
  uploadDocUserPermission(userInfoState, DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission)
26335
- ? { color: "#3F3A47", cursor: "pointer" }
26336
- : { color: "#cacaca" }, onClick: function () {
26416
+ ? { color: "#3F3A47", cursor: "pointer", margin: "0px 0px 2.5px 0px" }
26417
+ : { color: "#cacaca", margin: "0px 0px 2.5px 0px" }, onClick: function () {
26337
26418
  return designDocStatus === DocumentStatus.ACCEPTED &&
26338
26419
  uploadDocUserPermission(userInfoState, DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission) &&
26339
26420
  handleMethodologyFileUpload();
@@ -26352,8 +26433,8 @@ var ProgrammeDocuments = function (props) {
26352
26433
  : t("programme:orgNotAuth"), overlayClassName: "custom-tooltip" },
26353
26434
  React.createElement(FileAddOutlined, { className: "common-progress-icon", style: designDocStatus === DocumentStatus.ACCEPTED &&
26354
26435
  uploadDocUserPermission(userInfoState, DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission)
26355
- ? { color: "#3F3A47", cursor: "pointer" }
26356
- : { color: "#cacaca", cursor: "default" }, onClick: function () {
26436
+ ? { color: "#3F3A47", cursor: "pointer", margin: "0px 0px 2.5px 0px" }
26437
+ : { color: "#cacaca", cursor: "default", margin: "0px 0px 2.5px 0px" }, onClick: function () {
26357
26438
  return designDocStatus === DocumentStatus.ACCEPTED &&
26358
26439
  uploadDocUserPermission(userInfoState, DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission) &&
26359
26440
  handleMethodologyFileUpload();
@@ -26407,8 +26488,8 @@ var ProgrammeDocuments = function (props) {
26407
26488
  React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: impactAssessmentToolTipTitle, overlayClassName: "custom-tooltip" },
26408
26489
  React.createElement(FileAddOutlined, { className: "common-progress-icon", style: uploadImpactAssessmentDocUserPermission &&
26409
26490
  !isProjectRejected
26410
- ? { color: "#3F3A47", cursor: "pointer" }
26411
- : { color: "#cacaca", cursor: "default" }, onClick: function () {
26491
+ ? { color: "#3F3A47", cursor: "pointer", margin: "0px 0px 2.5px 0px" }
26492
+ : { color: "#cacaca", cursor: "default", margin: "0px 0px 2.5px 0px" }, onClick: function () {
26412
26493
  return uploadImpactAssessmentDocUserPermission &&
26413
26494
  !isProjectRejected &&
26414
26495
  handleImpactAssessmentFileUpload();
@@ -26421,8 +26502,8 @@ var ProgrammeDocuments = function (props) {
26421
26502
  React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: impactAssessmentToolTipTitle, overlayClassName: "custom-tooltip" },
26422
26503
  React.createElement(FileAddOutlined, { className: "common-progress-icon", style: uploadImpactAssessmentDocUserPermission &&
26423
26504
  !isProjectRejected
26424
- ? { color: "#3F3A47", cursor: "pointer" }
26425
- : { color: "#cacaca", cursor: "default" }, onClick: function () {
26505
+ ? { color: "#3F3A47", cursor: "pointer", margin: "0px 0px 2.5px 0px" }
26506
+ : { color: "#cacaca", cursor: "default", margin: "0px 0px 2.5px 0px" }, onClick: function () {
26426
26507
  return uploadImpactAssessmentDocUserPermission &&
26427
26508
  !isProjectRejected &&
26428
26509
  handleImpactAssessmentFileUpload();