@undp/carbon-library 1.0.59 → 1.0.61

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
@@ -809,13 +809,13 @@ var AddNewCompanyComponent = function (props) {
809
809
  var _d = React.useState(0), current = _d[0], setCurrent = _d[1];
810
810
  var _e = React.useState(false), isUpdate = _e[0], setIsUpdate = _e[1];
811
811
  var _f = useConnection(), put = _f.put, get = _f.get, post = _f.post;
812
- var setUserInfo = useUserContext().setUserInfo;
812
+ var _g = useUserContext(), setUserInfo = _g.setUserInfo, userInfoState = _g.userInfoState;
813
813
  var state = useLocation().state;
814
- var _g = React.useState([]), fileList = _g[0], setFileList = _g[1];
815
- var _h = React.useState([]), countries = _h[0], setCountries = _h[1];
816
- var _j = React.useState(false), loadingList = _j[0], setLoadingList = _j[1];
817
- var _k = React.useState([]), regionsList = _k[0], setRegionsList = _k[1];
818
- var _l = React.useState((_a = state === null || state === void 0 ? void 0 : state.record) === null || _a === void 0 ? void 0 : _a.companyRole), companyRole = _l[0], setCompanyRole = _l[1];
814
+ var _h = React.useState([]), fileList = _h[0], setFileList = _h[1];
815
+ var _j = React.useState([]), countries = _j[0], setCountries = _j[1];
816
+ var _k = React.useState(false), loadingList = _k[0], setLoadingList = _k[1];
817
+ var _l = React.useState([]), regionsList = _l[0], setRegionsList = _l[1];
818
+ var _m = React.useState((_a = state === null || state === void 0 ? void 0 : state.record) === null || _a === void 0 ? void 0 : _a.companyRole), companyRole = _m[0], setCompanyRole = _m[1];
819
819
  var getCountryList = function () { return __awaiter(void 0, void 0, void 0, function () {
820
820
  var response, alpha2Names;
821
821
  return __generator(this, function (_a) {
@@ -1256,21 +1256,32 @@ var AddNewCompanyComponent = function (props) {
1256
1256
  companyRole === exports.CompanyRole.CERTIFIER ? (React.createElement(icons.SafetyOutlined, { className: "role-icons" })) : companyRole ===
1257
1257
  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" })),
1258
1258
  companyRole))) : (React.createElement(React.Fragment, null,
1259
- React.createElement("div", { className: "certifier-radio-container" },
1259
+ React.createElement("div", { className: "certifier-radio-container", style: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
1260
+ exports.CompanyRole.MINISTRY
1261
+ ? {
1262
+ width: "45%",
1263
+ }
1264
+ : {} },
1260
1265
  React.createElement(antd.Tooltip, { placement: "top", title: "Permitted to certify and revoke certifications of programmes" },
1261
1266
  React.createElement(antd.Radio.Button, { className: "certifier", value: "Certifier" },
1262
1267
  React.createElement(icons.SafetyOutlined, { className: "role-icons" }),
1263
1268
  "Certifier"))),
1264
- React.createElement("div", { className: "dev-radio-container" },
1269
+ React.createElement("div", { className: "dev-radio-container", style: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
1270
+ exports.CompanyRole.MINISTRY
1271
+ ? {
1272
+ width: "45%",
1273
+ }
1274
+ : {} },
1265
1275
  React.createElement(antd.Tooltip, { placement: "top", title: "Permitted to own programmes and transfer carbon credits" },
1266
1276
  React.createElement(antd.Radio.Button, { className: "dev", value: "ProgrammeDeveloper" },
1267
1277
  React.createElement(icons.ExperimentOutlined, { className: "role-icons" }),
1268
1278
  "Developer"))),
1269
- React.createElement("div", { className: "minister-radio-container" },
1279
+ (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) !==
1280
+ exports.CompanyRole.MINISTRY && (React.createElement("div", { className: "minister-radio-container" },
1270
1281
  React.createElement(antd.Tooltip, { placement: "top", title: "Permitted to perform all programme-related actions within the Ministry" },
1271
1282
  React.createElement(antd.Radio.Button, { className: "minister", value: "Ministry" },
1272
1283
  React.createElement(icons.AuditOutlined, { className: "role-icons" }),
1273
- "Ministry"))))))),
1284
+ "Ministry")))))))),
1274
1285
  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: [
1275
1286
  {
1276
1287
  required: true,