@undp/carbon-library 1.0.62 → 1.0.63

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/index.js CHANGED
@@ -418,7 +418,7 @@ var ProfileIcon = function (props) {
418
418
  return (React.createElement("span", { className: "profile-icon", style: { backgroundColor: bg } }, isBase64(icon) ? (React.createElement("img", { alt: "profile-icon", src: 'data:image/jpeg;base64,' + icon })) : icon ? (React.createElement("img", { alt: "profile-icon", src: icon })) : name ? (name.charAt(0).toUpperCase()) : ('A')));
419
419
  };
420
420
 
421
- var CompanyRole;
421
+ exports.CompanyRole = void 0;
422
422
  (function (CompanyRole) {
423
423
  CompanyRole["ACADEMICS"] = "Academics";
424
424
  CompanyRole["SERVICE_PROVIDER"] = "ServiceProvider";
@@ -437,7 +437,7 @@ var CompanyRole;
437
437
  CompanyRole["GOVERNMENT"] = "Government";
438
438
  CompanyRole["MINISTRY"] = "Ministry";
439
439
  CompanyRole["API"] = "API";
440
- })(CompanyRole || (CompanyRole = {}));
440
+ })(exports.CompanyRole || (exports.CompanyRole = {}));
441
441
 
442
442
  var Search$2 = antd.Input.Search;
443
443
  var CompanyManagementComponent = function (props) {
@@ -479,8 +479,8 @@ var CompanyManagementComponent = function (props) {
479
479
  };
480
480
  var getCompanyRoleComponent = function (item) {
481
481
  return (React.createElement("div", { style: { display: "flex", alignItems: "center" } },
482
- item === CompanyRole.GOVERNMENT ? (React.createElement(RoleIcon, { icon: React.createElement(icons.BankOutlined, null), bg: GovBGColor, color: GovColor })) : item === CompanyRole.CERTIFIER ? (React.createElement(RoleIcon, { icon: React.createElement(icons.SafetyOutlined, null), bg: CertBGColor, color: CertColor })) : item === CompanyRole.MINISTRY ? (React.createElement(RoleIcon, { icon: React.createElement(icons.AuditOutlined, null), bg: MinBGColor, color: MinColor })) : (React.createElement(RoleIcon, { icon: React.createElement(icons.ExperimentOutlined, null), bg: DevBGColor, color: DevColor })),
483
- item === CompanyRole.PROGRAMME_DEVELOPER ? (React.createElement("div", null, t("company:developer"))) : (React.createElement("div", null, item))));
482
+ item === exports.CompanyRole.GOVERNMENT ? (React.createElement(RoleIcon, { icon: React.createElement(icons.BankOutlined, null), bg: GovBGColor, color: GovColor })) : item === exports.CompanyRole.CERTIFIER ? (React.createElement(RoleIcon, { icon: React.createElement(icons.SafetyOutlined, null), bg: CertBGColor, color: CertColor })) : item === exports.CompanyRole.MINISTRY ? (React.createElement(RoleIcon, { icon: React.createElement(icons.AuditOutlined, null), bg: MinBGColor, color: MinColor })) : (React.createElement(RoleIcon, { icon: React.createElement(icons.ExperimentOutlined, null), bg: DevBGColor, color: DevColor })),
483
+ item === exports.CompanyRole.PROGRAMME_DEVELOPER ? (React.createElement("div", null, t("company:developer"))) : (React.createElement("div", null, item))));
484
484
  };
485
485
  var handleFilterVisibleChange = function () {
486
486
  setFilterVisible(true);
@@ -641,7 +641,7 @@ var CompanyManagementComponent = function (props) {
641
641
  case 2:
642
642
  response = _c.sent();
643
643
  if (response && response.data) {
644
- availableCompanies = response.data.filter(function (company) { return company.companyRole !== CompanyRole.API; });
644
+ availableCompanies = response.data.filter(function (company) { return company.companyRole !== exports.CompanyRole.API; });
645
645
  setTableData(availableCompanies);
646
646
  setTotalCompany((_b = (_a = response === null || response === void 0 ? void 0 : response.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.total);
647
647
  }
@@ -1268,11 +1268,11 @@ var AddNewCompanyComponent = function (props) {
1268
1268
  companyRole: (_d = state === null || state === void 0 ? void 0 : state.record) === null || _d === void 0 ? void 0 : _d.companyRole,
1269
1269
  };
1270
1270
  }
1271
- if (((_e = state === null || state === void 0 ? void 0 : state.record) === null || _e === void 0 ? void 0 : _e.companyRole) !== CompanyRole.GOVERNMENT &&
1272
- ((_f = state === null || state === void 0 ? void 0 : state.record) === null || _f === void 0 ? void 0 : _f.companyRole) !== CompanyRole.MINISTRY) {
1271
+ if (((_e = state === null || state === void 0 ? void 0 : state.record) === null || _e === void 0 ? void 0 : _e.companyRole) !== exports.CompanyRole.GOVERNMENT &&
1272
+ ((_f = state === null || state === void 0 ? void 0 : state.record) === null || _f === void 0 ? void 0 : _f.companyRole) !== exports.CompanyRole.MINISTRY) {
1273
1273
  values.taxId = formOneValues.taxId;
1274
1274
  }
1275
- if (((_g = state === null || state === void 0 ? void 0 : state.record) === null || _g === void 0 ? void 0 : _g.companyRole) === CompanyRole.MINISTRY) {
1275
+ if (((_g = state === null || state === void 0 ? void 0 : state.record) === null || _g === void 0 ? void 0 : _g.companyRole) === exports.CompanyRole.MINISTRY) {
1276
1276
  values.sectoralScope = formOneValues.sectoralScope;
1277
1277
  values.nameOfMinister = formOneValues.nameOfMinister;
1278
1278
  }
@@ -1330,11 +1330,11 @@ var AddNewCompanyComponent = function (props) {
1330
1330
  };
1331
1331
  var CompanyDetailsForm = function () {
1332
1332
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
1333
- var companyRoleClassName = companyRole === CompanyRole.CERTIFIER
1333
+ var companyRoleClassName = companyRole === exports.CompanyRole.CERTIFIER
1334
1334
  ? "certifier"
1335
- : companyRole === CompanyRole.PROGRAMME_DEVELOPER
1335
+ : companyRole === exports.CompanyRole.PROGRAMME_DEVELOPER
1336
1336
  ? "dev"
1337
- : companyRole === CompanyRole.MINISTRY
1337
+ : companyRole === exports.CompanyRole.MINISTRY
1338
1338
  ? "minister"
1339
1339
  : "gov";
1340
1340
  return (React.createElement("div", { className: "company-details-form-container" },
@@ -1363,10 +1363,10 @@ var AddNewCompanyComponent = function (props) {
1363
1363
  },
1364
1364
  ] },
1365
1365
  React.createElement(antd.Input, { size: "large" })),
1366
- companyRole !== CompanyRole.MINISTRY
1366
+ companyRole !== exports.CompanyRole.MINISTRY
1367
1367
  ? (!isUpdate ||
1368
1368
  (isUpdate &&
1369
- companyRole !== CompanyRole.GOVERNMENT)) && (React.createElement(antd.Form.Item, { label: "Tax ID", initialValue: (_b = state === null || state === void 0 ? void 0 : state.record) === null || _b === void 0 ? void 0 : _b.taxId, name: "taxId", rules: [
1369
+ companyRole !== exports.CompanyRole.GOVERNMENT)) && (React.createElement(antd.Form.Item, { label: "Tax ID", initialValue: (_b = state === null || state === void 0 ? void 0 : state.record) === null || _b === void 0 ? void 0 : _b.taxId, name: "taxId", rules: [
1370
1370
  {
1371
1371
  required: true,
1372
1372
  message: "",
@@ -1479,7 +1479,7 @@ var AddNewCompanyComponent = function (props) {
1479
1479
  return false;
1480
1480
  }, className: "logo-upload-section", name: "logo", action: "/upload.do", listType: "picture", multiple: false, defaultFileList: fileList, maxCount: 1 },
1481
1481
  React.createElement(antd.Button, { size: "large", icon: React.createElement(icons.UploadOutlined, null) }, "Upload"))),
1482
- companyRole === CompanyRole.MINISTRY && (React.createElement(antd.Form.Item, { name: "address", label: "Address", initialValue: (_f = state === null || state === void 0 ? void 0 : state.record) === null || _f === void 0 ? void 0 : _f.address, rules: [
1482
+ companyRole === exports.CompanyRole.MINISTRY && (React.createElement(antd.Form.Item, { name: "address", label: "Address", initialValue: (_f = state === null || state === void 0 ? void 0 : state.record) === null || _f === void 0 ? void 0 : _f.address, rules: [
1483
1483
  { required: true, message: "" },
1484
1484
  {
1485
1485
  validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
@@ -1506,11 +1506,11 @@ var AddNewCompanyComponent = function (props) {
1506
1506
  ] },
1507
1507
  React.createElement(antd.Radio.Group, { size: "large", disabled: isUpdate, onChange: onChangeCompanyRole }, isUpdate ? (React.createElement("div", { className: "".concat(companyRoleClassName, "-radio-container") },
1508
1508
  React.createElement(antd.Radio.Button, { className: companyRoleClassName, value: companyRole },
1509
- companyRole === CompanyRole.CERTIFIER ? (React.createElement(icons.SafetyOutlined, { className: "role-icons" })) : companyRole ===
1510
- CompanyRole.PROGRAMME_DEVELOPER ? (React.createElement(icons.ExperimentOutlined, { className: "role-icons" })) : companyRole === CompanyRole.MINISTRY ? (React.createElement(icons.AuditOutlined, { className: "role-icons" })) : (React.createElement(icons.BankOutlined, { className: "role-icons" })),
1509
+ companyRole === exports.CompanyRole.CERTIFIER ? (React.createElement(icons.SafetyOutlined, { className: "role-icons" })) : companyRole ===
1510
+ exports.CompanyRole.PROGRAMME_DEVELOPER ? (React.createElement(icons.ExperimentOutlined, { className: "role-icons" })) : companyRole === exports.CompanyRole.MINISTRY ? (React.createElement(icons.AuditOutlined, { className: "role-icons" })) : (React.createElement(icons.BankOutlined, { className: "role-icons" })),
1511
1511
  companyRole))) : (React.createElement(React.Fragment, null,
1512
1512
  React.createElement("div", { className: "certifier-radio-container", style: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
1513
- CompanyRole.MINISTRY
1513
+ exports.CompanyRole.MINISTRY
1514
1514
  ? {
1515
1515
  width: "45%",
1516
1516
  }
@@ -1520,7 +1520,7 @@ var AddNewCompanyComponent = function (props) {
1520
1520
  React.createElement(icons.SafetyOutlined, { className: "role-icons" }),
1521
1521
  "Certifier"))),
1522
1522
  React.createElement("div", { className: "dev-radio-container", style: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
1523
- CompanyRole.MINISTRY
1523
+ exports.CompanyRole.MINISTRY
1524
1524
  ? {
1525
1525
  width: "45%",
1526
1526
  }
@@ -1530,12 +1530,12 @@ var AddNewCompanyComponent = function (props) {
1530
1530
  React.createElement(icons.ExperimentOutlined, { className: "role-icons" }),
1531
1531
  "Developer"))),
1532
1532
  (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) !==
1533
- CompanyRole.MINISTRY && (React.createElement("div", { className: "minister-radio-container" },
1533
+ exports.CompanyRole.MINISTRY && (React.createElement("div", { className: "minister-radio-container" },
1534
1534
  React.createElement(antd.Tooltip, { placement: "top", title: "Permitted to perform all programme-related actions within the Ministry" },
1535
1535
  React.createElement(antd.Radio.Button, { className: "minister", value: "Ministry" },
1536
1536
  React.createElement(icons.AuditOutlined, { className: "role-icons" }),
1537
1537
  "Ministry")))))))),
1538
- companyRole === CompanyRole.MINISTRY && (React.createElement(antd.Form.Item, { label: "Name of the Minister", name: "nameOfMinister", initialValue: (_g = state === null || state === void 0 ? void 0 : state.record) === null || _g === void 0 ? void 0 : _g.nameOfMinister, rules: [
1538
+ companyRole === exports.CompanyRole.MINISTRY && (React.createElement(antd.Form.Item, { label: "Name of the Minister", name: "nameOfMinister", initialValue: (_g = state === null || state === void 0 ? void 0 : state.record) === null || _g === void 0 ? void 0 : _g.nameOfMinister, rules: [
1539
1539
  {
1540
1540
  required: true,
1541
1541
  message: "",
@@ -1555,7 +1555,7 @@ var AddNewCompanyComponent = function (props) {
1555
1555
  },
1556
1556
  ] },
1557
1557
  React.createElement(antd.Input, { size: "large" }))),
1558
- companyRole === CompanyRole.MINISTRY && (React.createElement(antd.Form.Item, { label: "Sectoral Scope", name: "sectoralScope", rules: [
1558
+ companyRole === exports.CompanyRole.MINISTRY && (React.createElement(antd.Form.Item, { label: "Sectoral Scope", name: "sectoralScope", rules: [
1559
1559
  {
1560
1560
  required: true,
1561
1561
  message: "Sectoral Scope ".concat(t("isRequired")),
@@ -1603,7 +1603,7 @@ var AddNewCompanyComponent = function (props) {
1603
1603
  },
1604
1604
  ] },
1605
1605
  React.createElement(antd.Select, { mode: "multiple", size: "large", maxTagCount: 2, onChange: onChangeRegion, loading: loadingList, allowClear: true }, regionsList.map(function (region) { return (React.createElement(antd.Select.Option, { value: region }, region)); })))),
1606
- companyRole !== CompanyRole.MINISTRY && (React.createElement(antd.Form.Item, { name: "address", label: "Address", initialValue: (_l = state === null || state === void 0 ? void 0 : state.record) === null || _l === void 0 ? void 0 : _l.address, rules: [
1606
+ companyRole !== exports.CompanyRole.MINISTRY && (React.createElement(antd.Form.Item, { name: "address", label: "Address", initialValue: (_l = state === null || state === void 0 ? void 0 : state.record) === null || _l === void 0 ? void 0 : _l.address, rules: [
1607
1607
  { required: true, message: "" },
1608
1608
  {
1609
1609
  validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
@@ -1954,7 +1954,7 @@ var CompanyProfileComponent = function (props) {
1954
1954
  React.createElement(antd.Col, { span: 12, className: "field-key" }, t("companyProfile:companyRole")),
1955
1955
  React.createElement(antd.Col, { span: 12, className: "field-value" },
1956
1956
  React.createElement(CompanyRoleIcon, { role: companyDetails.companyRole }))),
1957
- (companyDetails === null || companyDetails === void 0 ? void 0 : companyDetails.companyRole) === CompanyRole.MINISTRY && (React.createElement(React.Fragment, null,
1957
+ (companyDetails === null || companyDetails === void 0 ? void 0 : companyDetails.companyRole) === exports.CompanyRole.MINISTRY && (React.createElement(React.Fragment, null,
1958
1958
  React.createElement(antd.Row, { className: "field" },
1959
1959
  React.createElement(antd.Col, { span: 12, className: "field-key" }, t("companyProfile:ministerName")),
1960
1960
  React.createElement(antd.Col, { span: 12, className: "field-value" }, companyDetails.nameOfMinister
@@ -2304,7 +2304,7 @@ var ProgrammeManagementComponent = function (props) {
2304
2304
  case 2:
2305
2305
  response = _g.sent();
2306
2306
  if (response && response.data) {
2307
- if (((_a = response === null || response === void 0 ? void 0 : response.data[0]) === null || _a === void 0 ? void 0 : _a.companyRole) === CompanyRole.MINISTRY &&
2307
+ if (((_a = response === null || response === void 0 ? void 0 : response.data[0]) === null || _a === void 0 ? void 0 : _a.companyRole) === exports.CompanyRole.MINISTRY &&
2308
2308
  ((_b = response === null || response === void 0 ? void 0 : response.data[0]) === null || _b === void 0 ? void 0 : _b.company) &&
2309
2309
  ((_d = (_c = response === null || response === void 0 ? void 0 : response.data[0]) === null || _c === void 0 ? void 0 : _c.company) === null || _d === void 0 ? void 0 : _d.sectoralScope)) {
2310
2310
  setMinistrySectoralScope((_f = (_e = response === null || response === void 0 ? void 0 : response.data[0]) === null || _e === void 0 ? void 0 : _e.company) === null || _f === void 0 ? void 0 : _f.sectoralScope);
@@ -2346,7 +2346,7 @@ var ProgrammeManagementComponent = function (props) {
2346
2346
  ministryLevelFilter,
2347
2347
  ]);
2348
2348
  React.useEffect(function () {
2349
- if ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.MINISTRY) {
2349
+ if ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.MINISTRY) {
2350
2350
  getUserDetails();
2351
2351
  }
2352
2352
  }, []);
@@ -2382,7 +2382,7 @@ var ProgrammeManagementComponent = function (props) {
2382
2382
  React.createElement("div", { className: "filter-section" },
2383
2383
  React.createElement("div", { className: "search-filter" },
2384
2384
  React.createElement(antd.Checkbox, { className: "label", onChange: function (v) {
2385
- if (userInfoState.companyRole === CompanyRole.MINISTRY) {
2385
+ if (userInfoState.companyRole === exports.CompanyRole.MINISTRY) {
2386
2386
  if (v.target.checked) {
2387
2387
  setMinistryLevelFilter(true);
2388
2388
  }
@@ -2399,7 +2399,7 @@ var ProgrammeManagementComponent = function (props) {
2399
2399
  }
2400
2400
  : undefined);
2401
2401
  }
2402
- } }, userInfoState.companyRole === CompanyRole.MINISTRY
2402
+ } }, userInfoState.companyRole === exports.CompanyRole.MINISTRY
2403
2403
  ? t("view:ministryLevel")
2404
2404
  : t("view:seeMine"))),
2405
2405
  React.createElement("div", { className: "search-bar" },
@@ -2632,7 +2632,7 @@ var ProgrammeTransferForm = function (props) {
2632
2632
  userCompanyId !== Number(programme.companyId[index])) ||
2633
2633
  (!toCompanyDefault &&
2634
2634
  (userCompanyId === Number(programme.companyId[index]) ||
2635
- companyRole === CompanyRole.GOVERNMENT))) &&
2635
+ companyRole === exports.CompanyRole.GOVERNMENT))) &&
2636
2636
  parseInt(companies[Number(programme.companyId[index])].state) ===
2637
2637
  CompanyState.ACTIVE.valueOf()) {
2638
2638
  var companyAvailableTotal = ((programme.creditBalance -
@@ -3975,7 +3975,7 @@ var ProgrammeViewComponent = function (props) {
3975
3975
  var actionBtns = [];
3976
3976
  if ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) !== "ViewOnly") {
3977
3977
  if (data.currentStage.toString() === "AwaitingAuthorization") {
3978
- if ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.GOVERNMENT) {
3978
+ if ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT) {
3979
3979
  actionBtns.push(React.createElement(antd.Button, { danger: true, onClick: function () {
3980
3980
  setActionInfo({
3981
3981
  action: "Reject",
@@ -4008,7 +4008,7 @@ var ProgrammeViewComponent = function (props) {
4008
4008
  }
4009
4009
  else if (data.currentStage.toString() !== exports.ProgrammeStage.Rejected &&
4010
4010
  Number(data.creditEst) > Number(data.creditIssued)) {
4011
- if ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.GOVERNMENT) {
4011
+ if ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT) {
4012
4012
  if (Number(data.creditEst) > Number(data.creditIssued)) {
4013
4013
  actionBtns.push(React.createElement(antd.Button, { type: "primary", onClick: function () {
4014
4014
  setActionInfo({
@@ -4068,7 +4068,7 @@ var ProgrammeViewComponent = function (props) {
4068
4068
  if (userInfoState &&
4069
4069
  userInfoState.companyState !== CompanyState.SUSPENDED.valueOf() &&
4070
4070
  data.certifier &&
4071
- (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.CERTIFIER &&
4071
+ (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.CERTIFIER &&
4072
4072
  !data.certifier.map(function (e) { return e.companyId; }).includes(userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyId)) {
4073
4073
  actionBtns.push(React.createElement(antd.Button, { type: "primary", onClick: function () {
4074
4074
  setActionInfo({
@@ -4086,11 +4086,11 @@ var ProgrammeViewComponent = function (props) {
4086
4086
  userInfoState.companyState !== CompanyState.SUSPENDED.valueOf() &&
4087
4087
  data.certifier &&
4088
4088
  data.certifier.length > 0 &&
4089
- (((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.CERTIFIER &&
4089
+ (((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.CERTIFIER &&
4090
4090
  data.certifier
4091
4091
  .map(function (e) { return e.companyId; })
4092
4092
  .includes(userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyId)) ||
4093
- (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.GOVERNMENT)) {
4093
+ (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT)) {
4094
4094
  actionBtns.push(React.createElement(antd.Button, { danger: true, onClick: function () {
4095
4095
  setActionInfo({
4096
4096
  action: "Revoke",
@@ -4104,7 +4104,7 @@ var ProgrammeViewComponent = function (props) {
4104
4104
  setComment(undefined);
4105
4105
  }, actionBtnText: t("view:revoke"), onFinish: function (body) {
4106
4106
  return onPopupAction(body, "revoke", t("view:successRevokeCertifcate"), put, updateProgrammeData);
4107
- }, showCertifiers: userInfoState.companyRole === CompanyRole.GOVERNMENT, t: t })),
4107
+ }, showCertifiers: userInfoState.companyRole === exports.CompanyRole.GOVERNMENT, t: t })),
4108
4108
  });
4109
4109
  showModal();
4110
4110
  } }, t("view:revoke")));
@@ -4302,7 +4302,7 @@ var ProgrammeViewComponent = function (props) {
4302
4302
  0 &&
4303
4303
  !isTransferFrozen && (React.createElement("div", null,
4304
4304
  (((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
4305
- CompanyRole.GOVERNMENT &&
4305
+ exports.CompanyRole.GOVERNMENT &&
4306
4306
  !isAllOwnersDeactivated) ||
4307
4307
  (data.companyId
4308
4308
  .map(function (e) { return Number(e); })
@@ -4318,7 +4318,7 @@ var ProgrammeViewComponent = function (props) {
4318
4318
  remark: true,
4319
4319
  icon: React.createElement(Icon__namespace.Save, null),
4320
4320
  contentComp: (React.createElement(ProgrammeRetireForm, { hideType: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) !==
4321
- CompanyRole.GOVERNMENT, myCompanyId: userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyId, programme: data, onCancel: function () {
4321
+ exports.CompanyRole.GOVERNMENT, myCompanyId: userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyId, programme: data, onCancel: function () {
4322
4322
  setOpenModal(false);
4323
4323
  setComment(undefined);
4324
4324
  }, actionBtnText: t("view:retire"), onFinish: function (body) {
@@ -5028,7 +5028,7 @@ var UserProfileComponent = function (props) {
5028
5028
  React.createElement(antd.Col, { span: 12, className: "field-value" },
5029
5029
  React.createElement(CompanyRoleIcon, { role: organisationDetails.companyRole }))),
5030
5030
  (organisationDetails === null || organisationDetails === void 0 ? void 0 : organisationDetails.companyRole) ===
5031
- CompanyRole.MINISTRY && (React.createElement(React.Fragment, null,
5031
+ exports.CompanyRole.MINISTRY && (React.createElement(React.Fragment, null,
5032
5032
  React.createElement(antd.Row, { className: "field" },
5033
5033
  React.createElement(antd.Col, { span: 12, className: "field-key" }, t("userProfile:ministerName")),
5034
5034
  React.createElement(antd.Col, { span: 12, className: "field-value" }, organisationDetails.nameOfMinister
@@ -5132,8 +5132,8 @@ var UserManagementComponent = function (props) {
5132
5132
  ? item === null || item === void 0 ? void 0 : item.companyRole
5133
5133
  : null;
5134
5134
  return (React.createElement("div", { style: { display: "flex", alignItems: "center" } },
5135
- role === CompanyRole.GOVERNMENT ? (React.createElement(RoleIcon, { icon: React.createElement(icons.BankOutlined, null), bg: GovBGColor, color: GovColor })) : role === CompanyRole.CERTIFIER ? (React.createElement(RoleIcon, { icon: React.createElement(icons.SafetyOutlined, null), bg: CertBGColor, color: CertColor })) : role === CompanyRole.MINISTRY ? (React.createElement(RoleIcon, { icon: React.createElement(icons.AuditOutlined, null), bg: MinBGColor, color: MinColor })) : (React.createElement(RoleIcon, { icon: React.createElement(icons.ExperimentOutlined, null), bg: DevBGColor, color: DevColor })),
5136
- role === CompanyRole.PROGRAMME_DEVELOPER ? (React.createElement("div", null, "Developer")) : (React.createElement("div", null, role))));
5135
+ role === exports.CompanyRole.GOVERNMENT ? (React.createElement(RoleIcon, { icon: React.createElement(icons.BankOutlined, null), bg: GovBGColor, color: GovColor })) : role === exports.CompanyRole.CERTIFIER ? (React.createElement(RoleIcon, { icon: React.createElement(icons.SafetyOutlined, null), bg: CertBGColor, color: CertColor })) : role === exports.CompanyRole.MINISTRY ? (React.createElement(RoleIcon, { icon: React.createElement(icons.AuditOutlined, null), bg: MinBGColor, color: MinColor })) : (React.createElement(RoleIcon, { icon: React.createElement(icons.ExperimentOutlined, null), bg: DevBGColor, color: DevColor })),
5136
+ role === exports.CompanyRole.PROGRAMME_DEVELOPER ? (React.createElement("div", null, "Developer")) : (React.createElement("div", null, role))));
5137
5137
  };
5138
5138
  var deleteUser = function (record) { return __awaiter(void 0, void 0, void 0, function () {
5139
5139
  var response, temp, index, error_1;
@@ -5446,7 +5446,7 @@ var UserManagementComponent = function (props) {
5446
5446
  case 2:
5447
5447
  response = _c.sent();
5448
5448
  if (response && response.data) {
5449
- availableUsers = response.data.filter(function (user) { return user.companyRole !== CompanyRole.API; });
5449
+ availableUsers = response.data.filter(function (user) { return user.companyRole !== exports.CompanyRole.API; });
5450
5450
  setTableData(availableUsers);
5451
5451
  setTotalUser((_b = (_a = response === null || response === void 0 ? void 0 : response.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.total);
5452
5452
  }
@@ -5649,10 +5649,10 @@ var InvestmentCreationComponent = function (props) {
5649
5649
  {
5650
5650
  key: "companyRole",
5651
5651
  operation: "=",
5652
- value: CompanyRole.PROGRAMME_DEVELOPER.toString(),
5652
+ value: exports.CompanyRole.PROGRAMME_DEVELOPER.toString(),
5653
5653
  },
5654
5654
  ];
5655
- if ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.PROGRAMME_DEVELOPER) {
5655
+ if ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.PROGRAMME_DEVELOPER) {
5656
5656
  filterAnd.push({
5657
5657
  key: "companyId",
5658
5658
  operation: "!=",
@@ -6326,7 +6326,7 @@ var InvestmentManagementComponent = function (props) {
6326
6326
  case 2:
6327
6327
  response = _g.sent();
6328
6328
  if (response && response.data) {
6329
- if (((_a = response === null || response === void 0 ? void 0 : response.data[0]) === null || _a === void 0 ? void 0 : _a.companyRole) === CompanyRole.MINISTRY &&
6329
+ if (((_a = response === null || response === void 0 ? void 0 : response.data[0]) === null || _a === void 0 ? void 0 : _a.companyRole) === exports.CompanyRole.MINISTRY &&
6330
6330
  ((_b = response === null || response === void 0 ? void 0 : response.data[0]) === null || _b === void 0 ? void 0 : _b.company) &&
6331
6331
  ((_d = (_c = response === null || response === void 0 ? void 0 : response.data[0]) === null || _c === void 0 ? void 0 : _c.company) === null || _d === void 0 ? void 0 : _d.sectoralScope)) {
6332
6332
  setMinistrySectoralScope((_f = (_e = response === null || response === void 0 ? void 0 : response.data[0]) === null || _e === void 0 ? void 0 : _e.company) === null || _f === void 0 ? void 0 : _f.sectoralScope);
@@ -6344,7 +6344,7 @@ var InvestmentManagementComponent = function (props) {
6344
6344
  });
6345
6345
  }); };
6346
6346
  React.useEffect(function () {
6347
- if ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.MINISTRY) {
6347
+ if ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.MINISTRY) {
6348
6348
  getUserDetails();
6349
6349
  }
6350
6350
  }, []);
@@ -6649,9 +6649,9 @@ var InvestmentManagementComponent = function (props) {
6649
6649
  React.createElement(antd.Checkbox.Group, { options: statusOptions, defaultValue: statusOptions.map(function (e) { return e.value; }), value: selectedStatus, onChange: onStatusQuery }))),
6650
6650
  React.createElement(antd.Col, { lg: { span: 9 }, md: { span: 10 } },
6651
6651
  React.createElement("div", { className: "filter-section" },
6652
- (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.MINISTRY && (React.createElement("div", { className: "search-filter" },
6652
+ (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.MINISTRY && (React.createElement("div", { className: "search-filter" },
6653
6653
  React.createElement(antd.Checkbox, { className: "label", onChange: function (v) {
6654
- if (userInfoState.companyRole === CompanyRole.MINISTRY) {
6654
+ if (userInfoState.companyRole === exports.CompanyRole.MINISTRY) {
6655
6655
  if (v.target.checked) {
6656
6656
  setMinistryLevelFilter(true);
6657
6657
  }
@@ -6938,7 +6938,7 @@ var NdcActionManagementComponent = function (props) {
6938
6938
  case 2:
6939
6939
  response = _g.sent();
6940
6940
  if (response && response.data) {
6941
- if (((_a = response === null || response === void 0 ? void 0 : response.data[0]) === null || _a === void 0 ? void 0 : _a.companyRole) === CompanyRole.MINISTRY &&
6941
+ if (((_a = response === null || response === void 0 ? void 0 : response.data[0]) === null || _a === void 0 ? void 0 : _a.companyRole) === exports.CompanyRole.MINISTRY &&
6942
6942
  ((_b = response === null || response === void 0 ? void 0 : response.data[0]) === null || _b === void 0 ? void 0 : _b.company) &&
6943
6943
  ((_d = (_c = response === null || response === void 0 ? void 0 : response.data[0]) === null || _c === void 0 ? void 0 : _c.company) === null || _d === void 0 ? void 0 : _d.sectoralScope)) {
6944
6944
  setMinistrySectoralScope((_f = (_e = response === null || response === void 0 ? void 0 : response.data[0]) === null || _e === void 0 ? void 0 : _e.company) === null || _f === void 0 ? void 0 : _f.sectoralScope);
@@ -6956,7 +6956,7 @@ var NdcActionManagementComponent = function (props) {
6956
6956
  });
6957
6957
  }); };
6958
6958
  React.useEffect(function () {
6959
- if ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.MINISTRY) {
6959
+ if ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.MINISTRY) {
6960
6960
  getUserDetails();
6961
6961
  }
6962
6962
  }, []);
@@ -7034,9 +7034,9 @@ var NdcActionManagementComponent = function (props) {
7034
7034
  React.createElement(antd.Checkbox.Group, { options: statusOptions, defaultValue: statusOptions.map(function (e) { return e.value; }), value: selectedStatus, onChange: onStatusQuery }))),
7035
7035
  React.createElement(antd.Col, { lg: { span: 9 }, md: { span: 10 } },
7036
7036
  React.createElement("div", { className: "filter-section" },
7037
- (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.MINISTRY && (React.createElement("div", { className: "search-filter" },
7037
+ (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.MINISTRY && (React.createElement("div", { className: "search-filter" },
7038
7038
  React.createElement(antd.Checkbox, { className: "label", onChange: function (v) {
7039
- if (userInfoState.companyRole === CompanyRole.MINISTRY) {
7039
+ if (userInfoState.companyRole === exports.CompanyRole.MINISTRY) {
7040
7040
  if (v.target.checked) {
7041
7041
  setMinistryLevelFilter(true);
7042
7042
  }
@@ -7105,7 +7105,7 @@ var StatsCardsTypes;
7105
7105
 
7106
7106
  var toolTipTextGen = function (companyRole, cardType, mine) {
7107
7107
  var text = '';
7108
- if (companyRole === CompanyRole.GOVERNMENT) {
7108
+ if (companyRole === exports.CompanyRole.GOVERNMENT) {
7109
7109
  if (cardType === StatsCardsTypes.PROGRAMMES_PENDING) {
7110
7110
  text = 'Pending state programmes awaiting authorisation';
7111
7111
  }
@@ -7153,7 +7153,7 @@ var toolTipTextGen = function (companyRole, cardType, mine) {
7153
7153
  'Locations of credits of international transfer requests recognised during the specified period';
7154
7154
  }
7155
7155
  }
7156
- else if (companyRole === CompanyRole.PROGRAMME_DEVELOPER) {
7156
+ else if (companyRole === exports.CompanyRole.PROGRAMME_DEVELOPER) {
7157
7157
  if (cardType === StatsCardsTypes.TRANSFER_REQUEST_RECEIVED) {
7158
7158
  text = 'Pending credit transfer requests received by your organisation';
7159
7159
  }
@@ -7200,7 +7200,7 @@ var toolTipTextGen = function (companyRole, cardType, mine) {
7200
7200
  'Locations of credits international transfer requests of programmes owned by your organisation recognised during the specified period';
7201
7201
  }
7202
7202
  }
7203
- else if (companyRole === CompanyRole.CERTIFIER && mine === true) {
7203
+ else if (companyRole === exports.CompanyRole.CERTIFIER && mine === true) {
7204
7204
  if (cardType === StatsCardsTypes.PROGRAMMES_UNCERTIFIED) {
7205
7205
  text =
7206
7206
  'Number of programmes not yet certified including certificates revoked by your organisation';
@@ -7248,7 +7248,7 @@ var toolTipTextGen = function (companyRole, cardType, mine) {
7248
7248
  'Locations of credits of international transfer requests of programmes certified by your organisation recognised during the specified period';
7249
7249
  }
7250
7250
  }
7251
- else if (companyRole === CompanyRole.CERTIFIER && !mine) {
7251
+ else if (companyRole === exports.CompanyRole.CERTIFIER && !mine) {
7252
7252
  if (cardType === StatsCardsTypes.PROGRAMMES_UNCERTIFIED) {
7253
7253
  text =
7254
7254
  'Number of programmes not yet certified including certificates revoked by your organisation';