@undp/carbon-library 1.0.59 → 1.0.60

Sign up to get free protection for your applications and to get access to all the features.
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) {
@@ -1266,11 +1266,12 @@ var AddNewCompanyComponent = function (props) {
1266
1266
  React.createElement(antd.Radio.Button, { className: "dev", value: "ProgrammeDeveloper" },
1267
1267
  React.createElement(icons.ExperimentOutlined, { className: "role-icons" }),
1268
1268
  "Developer"))),
1269
- React.createElement("div", { className: "minister-radio-container" },
1269
+ (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) !==
1270
+ exports.CompanyRole.MINISTRY && (React.createElement("div", { className: "minister-radio-container" },
1270
1271
  React.createElement(antd.Tooltip, { placement: "top", title: "Permitted to perform all programme-related actions within the Ministry" },
1271
1272
  React.createElement(antd.Radio.Button, { className: "minister", value: "Ministry" },
1272
1273
  React.createElement(icons.AuditOutlined, { className: "role-icons" }),
1273
- "Ministry"))))))),
1274
+ "Ministry")))))))),
1274
1275
  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
1276
  {
1276
1277
  required: true,