@undp/carbon-library 1.0.59 → 1.0.61

Sign up to get free protection for your applications and to get access to all the features.
package/dist/esm/index.js CHANGED
@@ -789,13 +789,13 @@ var AddNewCompanyComponent = function (props) {
789
789
  var _d = useState(0), current = _d[0], setCurrent = _d[1];
790
790
  var _e = useState(false), isUpdate = _e[0], setIsUpdate = _e[1];
791
791
  var _f = useConnection(), put = _f.put, get = _f.get, post = _f.post;
792
- var setUserInfo = useUserContext().setUserInfo;
792
+ var _g = useUserContext(), setUserInfo = _g.setUserInfo, userInfoState = _g.userInfoState;
793
793
  var state = useLocation().state;
794
- var _g = useState([]), fileList = _g[0], setFileList = _g[1];
795
- var _h = useState([]), countries = _h[0], setCountries = _h[1];
796
- var _j = useState(false), loadingList = _j[0], setLoadingList = _j[1];
797
- var _k = useState([]), regionsList = _k[0], setRegionsList = _k[1];
798
- var _l = 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];
794
+ var _h = useState([]), fileList = _h[0], setFileList = _h[1];
795
+ var _j = useState([]), countries = _j[0], setCountries = _j[1];
796
+ var _k = useState(false), loadingList = _k[0], setLoadingList = _k[1];
797
+ var _l = useState([]), regionsList = _l[0], setRegionsList = _l[1];
798
+ var _m = 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];
799
799
  var getCountryList = function () { return __awaiter(void 0, void 0, void 0, function () {
800
800
  var response, alpha2Names;
801
801
  return __generator(this, function (_a) {
@@ -1236,21 +1236,32 @@ var AddNewCompanyComponent = function (props) {
1236
1236
  companyRole === CompanyRole$1.CERTIFIER ? (React.createElement(SafetyOutlined, { className: "role-icons" })) : companyRole ===
1237
1237
  CompanyRole$1.PROGRAMME_DEVELOPER ? (React.createElement(ExperimentOutlined, { className: "role-icons" })) : companyRole === CompanyRole$1.MINISTRY ? (React.createElement(AuditOutlined, { className: "role-icons" })) : (React.createElement(BankOutlined, { className: "role-icons" })),
1238
1238
  companyRole))) : (React.createElement(React.Fragment, null,
1239
- React.createElement("div", { className: "certifier-radio-container" },
1239
+ React.createElement("div", { className: "certifier-radio-container", style: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
1240
+ CompanyRole$1.MINISTRY
1241
+ ? {
1242
+ width: "45%",
1243
+ }
1244
+ : {} },
1240
1245
  React.createElement(Tooltip, { placement: "top", title: "Permitted to certify and revoke certifications of programmes" },
1241
1246
  React.createElement(Radio.Button, { className: "certifier", value: "Certifier" },
1242
1247
  React.createElement(SafetyOutlined, { className: "role-icons" }),
1243
1248
  "Certifier"))),
1244
- React.createElement("div", { className: "dev-radio-container" },
1249
+ React.createElement("div", { className: "dev-radio-container", style: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
1250
+ CompanyRole$1.MINISTRY
1251
+ ? {
1252
+ width: "45%",
1253
+ }
1254
+ : {} },
1245
1255
  React.createElement(Tooltip, { placement: "top", title: "Permitted to own programmes and transfer carbon credits" },
1246
1256
  React.createElement(Radio.Button, { className: "dev", value: "ProgrammeDeveloper" },
1247
1257
  React.createElement(ExperimentOutlined, { className: "role-icons" }),
1248
1258
  "Developer"))),
1249
- React.createElement("div", { className: "minister-radio-container" },
1259
+ (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) !==
1260
+ CompanyRole$1.MINISTRY && (React.createElement("div", { className: "minister-radio-container" },
1250
1261
  React.createElement(Tooltip, { placement: "top", title: "Permitted to perform all programme-related actions within the Ministry" },
1251
1262
  React.createElement(Radio.Button, { className: "minister", value: "Ministry" },
1252
1263
  React.createElement(AuditOutlined, { className: "role-icons" }),
1253
- "Ministry"))))))),
1264
+ "Ministry")))))))),
1254
1265
  companyRole === CompanyRole$1.MINISTRY && (React.createElement(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: [
1255
1266
  {
1256
1267
  required: true,