@undp/carbon-library 1.0.29 → 1.0.31
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 +16 -8
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +17 -9
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
@@ -1364,7 +1364,7 @@ var OrganisationStatus = function (props) {
|
|
1364
1364
|
var CompanyProfileComponent = function (props) {
|
1365
1365
|
var t = props.t, useAbilityContext = props.useAbilityContext, useLocation = props.useLocation, useConnection = props.useConnection, onNavigateToCompanyManagement = props.onNavigateToCompanyManagement, onNavigateToCompanyEdit = props.onNavigateToCompanyEdit, regionField = props.regionField;
|
1366
1366
|
var _a = useConnection(), get = _a.get, put = _a.put;
|
1367
|
-
var _b = React.useState(
|
1367
|
+
var _b = React.useState(undefined), companyDetails = _b[0], setCompanyDetails = _b[1];
|
1368
1368
|
var state = useLocation().state;
|
1369
1369
|
var _c = React.useState(true), isLoading = _c[0], setIsLoading = _c[1];
|
1370
1370
|
var _d = React.useState({}), actionInfo = _d[0], setActionInfo = _d[1];
|
@@ -1512,8 +1512,11 @@ var CompanyProfileComponent = function (props) {
|
|
1512
1512
|
!isLoading &&
|
1513
1513
|
parseInt(companyDetails.state) !== 1 ? (React.createElement(antd.Button, { className: "btn-activate", onClick: onReActivateOrganisation }, t("companyProfile:reActivate"))) : (""),
|
1514
1514
|
ability.can(Action.Update, classTransformer.plainToClass(Company, companyDetails)) &&
|
1515
|
-
!isLoading &&
|
1516
|
-
|
1515
|
+
!isLoading &&
|
1516
|
+
companyDetails && (React.createElement(antd.Button, { className: "mg-left-1", type: "primary", onClick: function () { return onNavigateToCompanyEdit(companyDetails); } }, t("common:edit"))))),
|
1517
|
+
!companyDetails && (React.createElement("div", { className: "content-body" },
|
1518
|
+
React.createElement(antd.Skeleton, { active: true }))),
|
1519
|
+
companyDetails && (React.createElement("div", { className: "content-body" },
|
1517
1520
|
React.createElement(antd.Row, { gutter: 16 },
|
1518
1521
|
React.createElement(antd.Col, { md: 24, lg: 8 },
|
1519
1522
|
React.createElement(antd.Card, { className: "card-container" },
|
@@ -1571,7 +1574,9 @@ var CompanyProfileComponent = function (props) {
|
|
1571
1574
|
: "-")),
|
1572
1575
|
parseInt(companyDetails.state) === 0 ? (React.createElement(antd.Row, { className: "field" },
|
1573
1576
|
React.createElement(antd.Col, { span: 12, className: "field-key" }, t("companyProfile:remarks")),
|
1574
|
-
React.createElement(antd.Col, { span: 12, className: "field-value" }, companyDetails.remarks
|
1577
|
+
React.createElement(antd.Col, { span: 12, className: "field-value" }, companyDetails.remarks
|
1578
|
+
? companyDetails.remarks
|
1579
|
+
: "-"))) : ("")))))))),
|
1575
1580
|
React.createElement(UserActionConfirmationModel, { t: t, actionInfo: actionInfo, onActionConfirmed: onDeauthoriseOrgConfirmed, onActionCanceled: onDeauthoriseOrgCanceled, openModal: openDeauthorisationModal, errorMsg: errorMsg, loading: isLoading }),
|
1576
1581
|
React.createElement(UserActionConfirmationModel, { t: t, actionInfo: actionInfo, onActionConfirmed: onReactivateOrgConfirmed, onActionCanceled: onReactivateOrgCanceled, openModal: openReactivateModal, errorMsg: errorMsg, loading: isLoading })));
|
1577
1582
|
};
|
@@ -4937,8 +4942,8 @@ var LanguageSelection = function (props) {
|
|
4937
4942
|
var UserProfileComponent = function (props) {
|
4938
4943
|
var t = props.t, i18n = props.i18n, useConnection = props.useConnection, onNavigateUpdateUser = props.onNavigateUpdateUser, onNavigateLogin = props.onNavigateLogin, useUserContext = props.useUserContext;
|
4939
4944
|
var get = useConnection().get;
|
4940
|
-
var _a = React.useState(
|
4941
|
-
var _b = React.useState(
|
4945
|
+
var _a = React.useState(undefined), organisationDetails = _a[0], setOrganisationDetails = _a[1];
|
4946
|
+
var _b = React.useState(undefined), userDetails = _b[0], setUserDetails = _b[1];
|
4942
4947
|
var updateToken = useConnection().updateToken;
|
4943
4948
|
var removeUserInfo = useUserContext().removeUserInfo;
|
4944
4949
|
var _c = React.useState(false), isLoading = _c[0], setIsLoading = _c[1];
|
@@ -4987,7 +4992,10 @@ var UserProfileComponent = function (props) {
|
|
4987
4992
|
onNavigateUpdateUser(organisationDetails, userDetails);
|
4988
4993
|
} }, t("userProfile:edit"))),
|
4989
4994
|
React.createElement(LanguageSelection, { i18n: i18n })))),
|
4990
|
-
|
4995
|
+
!userDetails ||
|
4996
|
+
(!organisationDetails && (React.createElement("div", { className: "content-body" },
|
4997
|
+
React.createElement(antd.Skeleton, { active: true })))),
|
4998
|
+
userDetails && organisationDetails && (React.createElement("div", { className: "content-body" },
|
4991
4999
|
React.createElement(antd.Row, { gutter: 16 },
|
4992
5000
|
React.createElement(antd.Col, { md: 24, lg: 8 },
|
4993
5001
|
React.createElement(antd.Card, { className: "card-container" },
|
@@ -5065,7 +5073,7 @@ var UserProfileComponent = function (props) {
|
|
5065
5073
|
React.createElement(antd.Col, { span: 12, className: "field-key" }, t("userProfile:creditBalance")),
|
5066
5074
|
React.createElement(antd.Col, { span: 12, className: "field-value" }, organisationDetails.creditBalance
|
5067
5075
|
? organisationDetails.creditBalance
|
5068
|
-
: "-"))))))))));
|
5076
|
+
: "-")))))))))));
|
5069
5077
|
};
|
5070
5078
|
|
5071
5079
|
var css_248z$1 = ".legend-item-container {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n font-size: 14px;\n font-weight: 400;\n margin-left: 0.75rem; }\n .legend-item-container .text {\n margin-left: 0.2rem; }\n";
|