@undp/carbon-library 1.0.45 → 1.0.46
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/index.js +20 -12
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/Definitions/Definitions/programme.definitions.d.ts +2 -1
- package/dist/esm/index.js +20 -12
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/Definitions/Definitions/programme.definitions.d.ts +2 -1
- package/dist/index.d.ts +2 -1
- package/package.json +1 -1
@@ -66,7 +66,8 @@ export declare enum CompanyRole {
|
|
66
66
|
CERTIFIER = "Certifier",
|
67
67
|
PROGRAMME_DEVELOPER = "ProgrammeDeveloper",
|
68
68
|
MRV = "MRV",
|
69
|
-
GOVERNMENT = "Government"
|
69
|
+
GOVERNMENT = "Government",
|
70
|
+
API = "API"
|
70
71
|
}
|
71
72
|
export interface ProgrammeProperties {
|
72
73
|
maxInternationalTransferAmount: string;
|
package/dist/esm/index.js
CHANGED
@@ -304,6 +304,7 @@ var CompanyRole$1;
|
|
304
304
|
CompanyRole["PROGRAMME_DEVELOPER"] = "ProgrammeDeveloper";
|
305
305
|
CompanyRole["MRV"] = "MRV";
|
306
306
|
CompanyRole["GOVERNMENT"] = "Government";
|
307
|
+
CompanyRole["API"] = "API";
|
307
308
|
})(CompanyRole$1 || (CompanyRole$1 = {}));
|
308
309
|
var getGeneralFields = function (programme) {
|
309
310
|
return {
|
@@ -614,23 +615,27 @@ var CompanyManagementComponent = function (props) {
|
|
614
615
|
};
|
615
616
|
};
|
616
617
|
var getAllCompany = function () { return __awaiter(void 0, void 0, void 0, function () {
|
617
|
-
var response, error_1;
|
618
|
-
|
619
|
-
|
618
|
+
var response, availableCompanies, error_1;
|
619
|
+
var _a, _b;
|
620
|
+
return __generator(this, function (_c) {
|
621
|
+
switch (_c.label) {
|
620
622
|
case 0:
|
621
623
|
setLoading(true);
|
622
|
-
|
624
|
+
_c.label = 1;
|
623
625
|
case 1:
|
624
|
-
|
626
|
+
_c.trys.push([1, 3, , 4]);
|
625
627
|
return [4 /*yield*/, post("national/organisation/query", getAllOrganisationParams())];
|
626
628
|
case 2:
|
627
|
-
response =
|
628
|
-
|
629
|
-
|
629
|
+
response = _c.sent();
|
630
|
+
if (response && response.data) {
|
631
|
+
availableCompanies = response.data.filter(function (company) { return company.companyRole !== CompanyRole$1.API; });
|
632
|
+
setTableData(availableCompanies);
|
633
|
+
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);
|
634
|
+
}
|
630
635
|
setLoading(false);
|
631
636
|
return [3 /*break*/, 4];
|
632
637
|
case 3:
|
633
|
-
error_1 =
|
638
|
+
error_1 = _c.sent();
|
634
639
|
message.open({
|
635
640
|
type: "error",
|
636
641
|
content: error_1.message,
|
@@ -1985,7 +1990,7 @@ var UserManagementComponent = function (props) {
|
|
1985
1990
|
};
|
1986
1991
|
};
|
1987
1992
|
var getAllUser = function () { return __awaiter(void 0, void 0, void 0, function () {
|
1988
|
-
var response, error_2;
|
1993
|
+
var response, availableUsers, error_2;
|
1989
1994
|
var _a, _b;
|
1990
1995
|
return __generator(this, function (_c) {
|
1991
1996
|
switch (_c.label) {
|
@@ -1997,8 +2002,11 @@ var UserManagementComponent = function (props) {
|
|
1997
2002
|
return [4 /*yield*/, post("national/user/query", getAllUserParams())];
|
1998
2003
|
case 2:
|
1999
2004
|
response = _c.sent();
|
2000
|
-
|
2001
|
-
|
2005
|
+
if (response && response.data) {
|
2006
|
+
availableUsers = response.data.filter(function (user) { return user.companyRole !== CompanyRole$1.API; });
|
2007
|
+
setTableData(availableUsers);
|
2008
|
+
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);
|
2009
|
+
}
|
2002
2010
|
setLoading(false);
|
2003
2011
|
return [3 /*break*/, 4];
|
2004
2012
|
case 3:
|