@undp/carbon-library 1.0.289-CARBON-366.1 → 1.0.289-CARBON-178.2
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 +585 -84
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/Components/Common/CoBenifits/coBenifits.d.ts +0 -1
- package/dist/cjs/types/Components/Common/Models/programmeRetireForm.d.ts +0 -1
- package/dist/cjs/types/Components/Common/Models/programmeTransferForm.d.ts +0 -1
- package/dist/cjs/types/Components/Common/NdcActionBody/ndcActionBody.d.ts +0 -2
- package/dist/cjs/types/Components/Common/ProgrammeDocuments/programmeDocuments.d.ts +0 -2
- package/dist/cjs/types/Components/Common/StasticCard/stasticCard.d.ts +0 -2
- package/dist/cjs/types/Context/ConnectionContext/connectionContext.d.ts +8 -0
- package/dist/cjs/types/Context/SettingsContext/settingsContext.d.ts +10 -0
- package/dist/cjs/types/Context/UserInformationContext/userInformationContext.d.ts +6 -0
- package/dist/cjs/types/Context/index.d.ts +3 -0
- package/dist/cjs/types/Definitions/Definitions/connectionContext.definitions.d.ts +3 -0
- package/dist/cjs/types/Storybook/AddNewCompanyComponent.stories.d.ts +12 -0
- package/dist/cjs/types/Storybook/AddNewUserComponent.stories.d.ts +12 -0
- package/dist/cjs/types/Storybook/Decorators/AddNewCompanyI18nDecorator.d.ts +2 -0
- package/dist/cjs/types/Storybook/Decorators/AddNewUserI18nDecorator.d.ts +2 -0
- package/dist/cjs/types/Storybook/Decorators/ConnectionContextDecorator.d.ts +2 -0
- package/dist/cjs/types/Storybook/Decorators/DashboardI18nDecorator.d.ts +2 -0
- package/dist/cjs/types/Storybook/Decorators/InvestmentCreationI18nDecorator.d.ts +2 -0
- package/dist/cjs/types/Storybook/Decorators/ProgrammeCreateI18nDecorator.d.ts +2 -0
- package/dist/cjs/types/Storybook/InvestmentCreationComponent.stories.d.ts +12 -0
- package/dist/cjs/types/Storybook/MRVDashboard.stories.d.ts +12 -0
- package/dist/cjs/types/Storybook/ProgrammeCreationComponent.stories.d.ts +12 -0
- package/dist/cjs/types/Storybook/RegistryDashboard.stories.d.ts +12 -0
- package/dist/cjs/types/index.d.ts +1 -0
- package/dist/esm/index.js +579 -86
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/Components/Common/CoBenifits/coBenifits.d.ts +0 -1
- package/dist/esm/types/Components/Common/Models/programmeRetireForm.d.ts +0 -1
- package/dist/esm/types/Components/Common/Models/programmeTransferForm.d.ts +0 -1
- package/dist/esm/types/Components/Common/NdcActionBody/ndcActionBody.d.ts +0 -2
- package/dist/esm/types/Components/Common/ProgrammeDocuments/programmeDocuments.d.ts +0 -2
- package/dist/esm/types/Components/Common/StasticCard/stasticCard.d.ts +0 -2
- package/dist/esm/types/Context/ConnectionContext/connectionContext.d.ts +8 -0
- package/dist/esm/types/Context/SettingsContext/settingsContext.d.ts +10 -0
- package/dist/esm/types/Context/UserInformationContext/userInformationContext.d.ts +6 -0
- package/dist/esm/types/Context/index.d.ts +3 -0
- package/dist/esm/types/Definitions/Definitions/connectionContext.definitions.d.ts +3 -0
- package/dist/esm/types/Storybook/AddNewCompanyComponent.stories.d.ts +12 -0
- package/dist/esm/types/Storybook/AddNewUserComponent.stories.d.ts +12 -0
- package/dist/esm/types/Storybook/Decorators/AddNewCompanyI18nDecorator.d.ts +2 -0
- package/dist/esm/types/Storybook/Decorators/AddNewUserI18nDecorator.d.ts +2 -0
- package/dist/esm/types/Storybook/Decorators/ConnectionContextDecorator.d.ts +2 -0
- package/dist/esm/types/Storybook/Decorators/DashboardI18nDecorator.d.ts +2 -0
- package/dist/esm/types/Storybook/Decorators/InvestmentCreationI18nDecorator.d.ts +2 -0
- package/dist/esm/types/Storybook/Decorators/ProgrammeCreateI18nDecorator.d.ts +2 -0
- package/dist/esm/types/Storybook/InvestmentCreationComponent.stories.d.ts +12 -0
- package/dist/esm/types/Storybook/MRVDashboard.stories.d.ts +12 -0
- package/dist/esm/types/Storybook/ProgrammeCreationComponent.stories.d.ts +12 -0
- package/dist/esm/types/Storybook/RegistryDashboard.stories.d.ts +12 -0
- package/dist/esm/types/index.d.ts +1 -0
- package/dist/index.d.ts +23 -10
- package/package.json +29 -2
package/dist/cjs/index.js
CHANGED
@@ -5,6 +5,7 @@ var antd = require('antd');
|
|
5
5
|
var React = require('react');
|
6
6
|
var luxon = require('luxon');
|
7
7
|
var buffer = require('buffer');
|
8
|
+
var axios = require('axios');
|
8
9
|
var PhoneInput = require('react-phone-number-input');
|
9
10
|
var validator = require('validator');
|
10
11
|
var classTransformer = require('class-transformer');
|
@@ -14,7 +15,6 @@ var mapboxgl = require('mapbox-gl');
|
|
14
15
|
require('mapbox-gl/dist/mapbox-gl.css');
|
15
16
|
require('antd/dist/antd.css');
|
16
17
|
var XLSX = require('xlsx');
|
17
|
-
var axios = require('axios');
|
18
18
|
|
19
19
|
function _interopNamespaceDefault(e) {
|
20
20
|
var n = Object.create(null);
|
@@ -513,9 +513,317 @@ var OrganisationStatus = function (props) {
|
|
513
513
|
return orgState;
|
514
514
|
};
|
515
515
|
|
516
|
+
function e$1(e){this.message=e;}e$1.prototype=new Error,e$1.prototype.name="InvalidCharacterError";var r="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(r){var t=String(r).replace(/=+$/,"");if(t.length%4==1)throw new e$1("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,o,a=0,i=0,c="";o=t.charAt(i++);~o&&(n=a%4?64*n+o:o,a++%4)?c+=String.fromCharCode(255&n>>(-2*a&6)):0)o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(o);return c};function t$1(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw "Illegal base64url string!"}try{return function(e){return decodeURIComponent(r(e).replace(/(.)/g,(function(e,r){var t=r.charCodeAt(0).toString(16).toUpperCase();return t.length<2&&(t="0"+t),"%"+t})))}(t)}catch(e){return r(t)}}function n$1(e){this.message=e;}function o(e,r){if("string"!=typeof e)throw new n$1("Invalid token specified");var o=!0===(r=r||{}).header?0:1;try{return JSON.parse(t$1(e.split(".")[o]))}catch(e){throw new n$1("Invalid token specified: "+e.message)}}n$1.prototype=new Error,n$1.prototype.name="InvalidTokenError";
|
517
|
+
|
518
|
+
var ConnectionContext = React.createContext({});
|
519
|
+
var ConnectionContextProvider = function (props) {
|
520
|
+
var _a = React.useState(), token = _a[0], setToken = _a[1];
|
521
|
+
var serverURL = props.serverURL, t = props.t, statServerUrl = props.statServerUrl, children = props.children;
|
522
|
+
React.useEffect(function () {
|
523
|
+
var timer = setInterval(function () { return __awaiter(void 0, void 0, void 0, function () {
|
524
|
+
var newToken;
|
525
|
+
return __generator(this, function (_a) {
|
526
|
+
switch (_a.label) {
|
527
|
+
case 0: return [4 /*yield*/, localStorage.getItem('token')];
|
528
|
+
case 1:
|
529
|
+
newToken = _a.sent();
|
530
|
+
if (token !== newToken) {
|
531
|
+
setToken(newToken);
|
532
|
+
}
|
533
|
+
return [2 /*return*/];
|
534
|
+
}
|
535
|
+
});
|
536
|
+
}); }, 3000);
|
537
|
+
if (token) {
|
538
|
+
clearTimeout(timer);
|
539
|
+
}
|
540
|
+
return function () {
|
541
|
+
clearTimeout(timer);
|
542
|
+
};
|
543
|
+
}, [token]);
|
544
|
+
var send = React.useCallback(function (method, path, data, config, extraUrl) {
|
545
|
+
return new Promise(function (resolve, reject) {
|
546
|
+
var url = "".concat(extraUrl ? extraUrl : serverURL, "/").concat(path);
|
547
|
+
var headers;
|
548
|
+
if (token) {
|
549
|
+
headers = { authorization: "Bearer ".concat(token.toString()) };
|
550
|
+
}
|
551
|
+
else {
|
552
|
+
if (localStorage.getItem('token')) {
|
553
|
+
headers = {
|
554
|
+
authorization: "Bearer ".concat(localStorage.getItem('token')),
|
555
|
+
};
|
556
|
+
}
|
557
|
+
else {
|
558
|
+
headers = {
|
559
|
+
authorization: "Bearer ".concat(process.env.STORYBOOK_ACCESS_TOKEN),
|
560
|
+
};
|
561
|
+
}
|
562
|
+
}
|
563
|
+
axios(__assign({ method: method, url: url, data: data, headers: headers }, config))
|
564
|
+
.then(function (response) {
|
565
|
+
var _a, _b, _c;
|
566
|
+
if (response.status) {
|
567
|
+
if (response.status === 200 || response.status === 201) {
|
568
|
+
resolve({
|
569
|
+
status: response.status,
|
570
|
+
data: (_a = response.data.data) !== null && _a !== void 0 ? _a : response.data,
|
571
|
+
response: response,
|
572
|
+
statusText: 'SUCCESS',
|
573
|
+
message: response.data.message,
|
574
|
+
});
|
575
|
+
}
|
576
|
+
else if (response.status === 422) {
|
577
|
+
reject({
|
578
|
+
status: response.status,
|
579
|
+
data: (_b = response.data) === null || _b === void 0 ? void 0 : _b.data,
|
580
|
+
statusText: 'ERROR',
|
581
|
+
response: response,
|
582
|
+
message: response.data.message,
|
583
|
+
errors: (_c = response.data) === null || _c === void 0 ? void 0 : _c.errors,
|
584
|
+
});
|
585
|
+
}
|
586
|
+
}
|
587
|
+
else {
|
588
|
+
reject({
|
589
|
+
status: 500,
|
590
|
+
statusText: 'UNKNOWN',
|
591
|
+
message: t('common:systemError'),
|
592
|
+
});
|
593
|
+
}
|
594
|
+
})
|
595
|
+
.catch(function (e) {
|
596
|
+
var _a;
|
597
|
+
if (e.response) {
|
598
|
+
if (e.response.status) {
|
599
|
+
if (e.response.data.message === 'jwt expired') {
|
600
|
+
localStorage.removeItem('token');
|
601
|
+
window.location.reload();
|
602
|
+
}
|
603
|
+
reject({
|
604
|
+
status: e.response.status,
|
605
|
+
statusText: 'ERROR',
|
606
|
+
errors: (_a = e.response.data) === null || _a === void 0 ? void 0 : _a.errors,
|
607
|
+
message: e.response.data.message,
|
608
|
+
});
|
609
|
+
}
|
610
|
+
else {
|
611
|
+
reject({
|
612
|
+
statusText: 'ERROR',
|
613
|
+
message: t('common:systemError'),
|
614
|
+
});
|
615
|
+
}
|
616
|
+
}
|
617
|
+
else {
|
618
|
+
reject({
|
619
|
+
statusText: 'ERROR',
|
620
|
+
message: t('common:networkError'),
|
621
|
+
});
|
622
|
+
}
|
623
|
+
});
|
624
|
+
});
|
625
|
+
}, [token, serverURL]);
|
626
|
+
var post = React.useCallback(function (path, data, config, extraUrl) {
|
627
|
+
return send('post', path, data, config, extraUrl);
|
628
|
+
}, [send]);
|
629
|
+
var put = React.useCallback(function (path, data, config) {
|
630
|
+
return send('put', path, data, config);
|
631
|
+
}, [send]);
|
632
|
+
var get = React.useCallback(function (path, config) {
|
633
|
+
return send('get', path, undefined, config);
|
634
|
+
}, [send]);
|
635
|
+
var patch = React.useCallback(function (path, data, config) {
|
636
|
+
return send('patch', path, data, config);
|
637
|
+
}, [send]);
|
638
|
+
var del = React.useCallback(function (path, config) {
|
639
|
+
return send('delete', path, config);
|
640
|
+
}, [send]);
|
641
|
+
var updateToken = React.useCallback(function (newToken) { return __awaiter(void 0, void 0, void 0, function () {
|
642
|
+
return __generator(this, function (_a) {
|
643
|
+
if (newToken) {
|
644
|
+
localStorage.setItem('token', newToken);
|
645
|
+
setToken(newToken);
|
646
|
+
}
|
647
|
+
else {
|
648
|
+
localStorage.setItem('token', '');
|
649
|
+
setToken(undefined);
|
650
|
+
}
|
651
|
+
return [2 /*return*/];
|
652
|
+
});
|
653
|
+
}); }, []);
|
654
|
+
var removeToken = function (tkn) {
|
655
|
+
if (tkn) {
|
656
|
+
var exp = o(tkn).exp;
|
657
|
+
if (Date.now() > exp * 1000) {
|
658
|
+
localStorage.setItem('token', '');
|
659
|
+
localStorage.removeItem('userRole');
|
660
|
+
localStorage.removeItem('userId');
|
661
|
+
localStorage.removeItem('companyId');
|
662
|
+
localStorage.removeItem('companyRole');
|
663
|
+
}
|
664
|
+
else {
|
665
|
+
var diff = exp * 1000 - Date.now();
|
666
|
+
setTimeout(function () {
|
667
|
+
setToken(undefined);
|
668
|
+
localStorage.setItem('token', '');
|
669
|
+
localStorage.removeItem('userRole');
|
670
|
+
localStorage.removeItem('userId');
|
671
|
+
localStorage.removeItem('companyId');
|
672
|
+
localStorage.removeItem('companyRole');
|
673
|
+
}, diff);
|
674
|
+
console.log(diff, 'Remaining Token expire time');
|
675
|
+
}
|
676
|
+
}
|
677
|
+
};
|
678
|
+
React.useEffect(function () {
|
679
|
+
removeToken(token);
|
680
|
+
}, [token]);
|
681
|
+
return (React.createElement(ConnectionContext.Provider, { value: {
|
682
|
+
connection: { post: post, put: put, get: get, patch: patch, delete: del, updateToken: updateToken, token: token, removeToken: removeToken, statServerUrl: statServerUrl },
|
683
|
+
} }, children));
|
684
|
+
};
|
685
|
+
var useConnection = function () {
|
686
|
+
var context = React.useContext(ConnectionContext);
|
687
|
+
return context.connection;
|
688
|
+
};
|
689
|
+
|
690
|
+
var UserContext = React.createContext({
|
691
|
+
setUserInfo: function () { },
|
692
|
+
removeUserInfo: function () { },
|
693
|
+
IsAuthenticated: function (tkn) { return false; },
|
694
|
+
isTokenExpired: false,
|
695
|
+
setIsTokenExpired: function (val) { },
|
696
|
+
});
|
697
|
+
var UserInformationContextProvider = function (_a) {
|
698
|
+
var children = _a.children;
|
699
|
+
var token = useConnection().token;
|
700
|
+
var _b = React.useState(false), isTokenExpired = _b[0], setIsTokenExpired = _b[1];
|
701
|
+
var initialUserProps = {
|
702
|
+
id: localStorage.getItem('userId') ? localStorage.getItem('userId') : process.env.STORYBOOK_USER_ID ? process.env.STORYBOOK_USER_ID : '',
|
703
|
+
userRole: localStorage.getItem('userRole') ? localStorage.getItem('userRole') : process.env.STORYBOOK_USER_ROLE ? process.env.STORYBOOK_USER_ROLE : '',
|
704
|
+
companyRole: localStorage.getItem('companyRole')
|
705
|
+
? localStorage.getItem('companyRole')
|
706
|
+
: process.env.STORYBOOK_COMPANY_ROLE ? process.env.STORYBOOK_COMPANY_ROLE : '',
|
707
|
+
companyId: localStorage.getItem('companyId')
|
708
|
+
? parseInt(localStorage.getItem('companyId'))
|
709
|
+
: process.env.STORYBOOK_COMPANY_ID ? parseInt(process.env.STORYBOOK_COMPANY_ID) : -1,
|
710
|
+
companyLogo: localStorage.getItem('companyLogo')
|
711
|
+
? localStorage.getItem('companyLogo')
|
712
|
+
: process.env.STORYBOOK_COMPANY_LOGO ? process.env.STORYBOOK_COMPANY_LOGO : '',
|
713
|
+
companyName: localStorage.getItem('companyName')
|
714
|
+
? localStorage.getItem('companyName')
|
715
|
+
: process.env.STORYBOOK_COMPANY_NAME ? process.env.STORYBOOK_COMPANY_NAME : '',
|
716
|
+
companyState: localStorage.getItem('companyState')
|
717
|
+
? parseInt(localStorage.getItem('companyState'))
|
718
|
+
: process.env.STORYBOOK_COMPANY_STATE ? parseInt(process.env.STORYBOOK_COMPANY_STATE) : 0,
|
719
|
+
};
|
720
|
+
var _c = React.useState(initialUserProps), userInfoState = _c[0], setUserInfoState = _c[1];
|
721
|
+
var setUserInfo = function (value) {
|
722
|
+
var state = (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyState) === 1 ? userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyState : 0;
|
723
|
+
var id = value.id, userRole = value.userRole, companyId = value.companyId, companyRole = value.companyRole, companyLogo = value.companyLogo, companyName = value.companyName, _a = value.companyState, companyState = _a === void 0 ? state : _a;
|
724
|
+
if (id) {
|
725
|
+
setUserInfoState(function (prev) { return (__assign(__assign({}, prev), { id: id })); });
|
726
|
+
localStorage.setItem('userId', id);
|
727
|
+
}
|
728
|
+
if (userRole) {
|
729
|
+
setUserInfoState(function (prev) { return (__assign(__assign({}, prev), { userRole: userRole })); });
|
730
|
+
localStorage.setItem('userRole', userRole);
|
731
|
+
}
|
732
|
+
if (companyId) {
|
733
|
+
setUserInfoState(function (prev) { return (__assign(__assign({}, prev), { companyId: companyId })); });
|
734
|
+
localStorage.setItem('companyId', companyId + '');
|
735
|
+
}
|
736
|
+
if (companyLogo) {
|
737
|
+
setUserInfoState(function (prev) { return (__assign(__assign({}, prev), { companyLogo: companyLogo })); });
|
738
|
+
localStorage.setItem('companyLogo', companyLogo);
|
739
|
+
}
|
740
|
+
else {
|
741
|
+
setUserInfoState(function (prev) { return (__assign(__assign({}, prev), { companyLogo: '' })); });
|
742
|
+
localStorage.setItem('companyLogo', '');
|
743
|
+
}
|
744
|
+
if (companyName) {
|
745
|
+
setUserInfoState(function (prev) { return (__assign(__assign({}, prev), { companyName: companyName })); });
|
746
|
+
localStorage.setItem('companyName', companyName);
|
747
|
+
}
|
748
|
+
if (userRole) {
|
749
|
+
setUserInfoState(function (prev) { return (__assign(__assign({}, prev), { companyRole: companyRole })); });
|
750
|
+
localStorage.setItem('companyRole', companyRole);
|
751
|
+
}
|
752
|
+
setUserInfoState(function (prev) { return (__assign(__assign({}, prev), { companyState: companyState })); });
|
753
|
+
localStorage.setItem('companyState', companyState + '');
|
754
|
+
};
|
755
|
+
var IsAuthenticated = React.useCallback(function (tokenNew) {
|
756
|
+
var tokenVal;
|
757
|
+
if (tokenNew) {
|
758
|
+
tokenVal = tokenNew;
|
759
|
+
}
|
760
|
+
else if (token) {
|
761
|
+
tokenVal = token;
|
762
|
+
}
|
763
|
+
else {
|
764
|
+
tokenVal = localStorage.getItem('token');
|
765
|
+
if (tokenVal === '') {
|
766
|
+
if (history.length !== 1) {
|
767
|
+
setIsTokenExpired(true);
|
768
|
+
}
|
769
|
+
}
|
770
|
+
}
|
771
|
+
try {
|
772
|
+
if (tokenVal) {
|
773
|
+
var exp = o(tokenVal).exp;
|
774
|
+
return Date.now() < exp * 1000;
|
775
|
+
}
|
776
|
+
return false;
|
777
|
+
}
|
778
|
+
catch (err) {
|
779
|
+
return false;
|
780
|
+
}
|
781
|
+
}, [token]);
|
782
|
+
var removeUserInfo = function () {
|
783
|
+
localStorage.removeItem('userId');
|
784
|
+
localStorage.removeItem('userRole');
|
785
|
+
localStorage.removeItem('companyId');
|
786
|
+
localStorage.removeItem('companyRole');
|
787
|
+
localStorage.removeItem('companyName');
|
788
|
+
localStorage.removeItem('companyState');
|
789
|
+
localStorage.removeItem('companyLogo');
|
790
|
+
setUserInfoState(initialUserProps);
|
791
|
+
};
|
792
|
+
return (React.createElement(UserContext.Provider, { value: {
|
793
|
+
userInfoState: userInfoState,
|
794
|
+
setUserInfo: setUserInfo,
|
795
|
+
removeUserInfo: removeUserInfo,
|
796
|
+
IsAuthenticated: IsAuthenticated,
|
797
|
+
isTokenExpired: isTokenExpired,
|
798
|
+
setIsTokenExpired: setIsTokenExpired,
|
799
|
+
} }, children));
|
800
|
+
};
|
801
|
+
var useUserContext = function () {
|
802
|
+
return React.useContext(UserContext);
|
803
|
+
};
|
804
|
+
|
805
|
+
var SettingsContext = React.createContext({
|
806
|
+
isTransferFrozen: false,
|
807
|
+
setTransferFrozen: function (value) { },
|
808
|
+
});
|
809
|
+
var SettingsContextProvider = function (_a) {
|
810
|
+
var children = _a.children;
|
811
|
+
var _b = React.useState(false), isTransferFrozen = _b[0], setIsTransferFrozen = _b[1];
|
812
|
+
var setTransferFrozen = function (value) {
|
813
|
+
setIsTransferFrozen(value);
|
814
|
+
};
|
815
|
+
return (React.createElement(SettingsContext.Provider, { value: {
|
816
|
+
isTransferFrozen: isTransferFrozen,
|
817
|
+
setTransferFrozen: setTransferFrozen,
|
818
|
+
} }, children));
|
819
|
+
};
|
820
|
+
var useSettingsContext = function () {
|
821
|
+
return React.useContext(SettingsContext);
|
822
|
+
};
|
823
|
+
|
516
824
|
var Search$2 = antd.Input.Search;
|
517
825
|
var CompanyManagementComponent = function (props) {
|
518
|
-
var t = props.t, useAbilityContext = props.useAbilityContext,
|
826
|
+
var t = props.t, useAbilityContext = props.useAbilityContext, visibleColumns = props.visibleColumns, onNavigateToCompanyProfile = props.onNavigateToCompanyProfile, onClickAddCompany = props.onClickAddCompany;
|
519
827
|
var _a = React.useState(), totalCompany = _a[0], setTotalCompany = _a[1];
|
520
828
|
var _b = React.useState(false), loading = _b[0], setLoading = _b[1];
|
521
829
|
var _c = React.useState([]), tableData = _c[0], setTableData = _c[1];
|
@@ -530,6 +838,7 @@ var CompanyManagementComponent = function (props) {
|
|
530
838
|
var _l = React.useState(""), sortField = _l[0], setSortField = _l[1];
|
531
839
|
var _m = React.useState(), dataQuery = _m[0], setDataQuery = _m[1];
|
532
840
|
var ability = useAbilityContext();
|
841
|
+
var post = useConnection().post;
|
533
842
|
document.addEventListener("mousedown", function (event) {
|
534
843
|
var organisationFilterArea1 = document.querySelector(".filter-bar");
|
535
844
|
var organisationFilterArea2 = document.querySelector(".filter-dropdown");
|
@@ -655,7 +964,7 @@ var CompanyManagementComponent = function (props) {
|
|
655
964
|
{
|
656
965
|
key: searchByTermOrganisation,
|
657
966
|
operation: "like",
|
658
|
-
value: networksearchOrganisations + "%",
|
967
|
+
value: "%" + networksearchOrganisations + "%",
|
659
968
|
},
|
660
969
|
];
|
661
970
|
}
|
@@ -672,7 +981,7 @@ var CompanyManagementComponent = function (props) {
|
|
672
981
|
{
|
673
982
|
key: searchByTermOrganisation,
|
674
983
|
operation: "like",
|
675
|
-
value: networksearchOrganisations + "%",
|
984
|
+
value: "%" + networksearchOrganisations + "%",
|
676
985
|
},
|
677
986
|
{
|
678
987
|
key: "companyRole",
|
@@ -917,7 +1226,7 @@ var CompanyManagementComponent = function (props) {
|
|
917
1226
|
var css_248z$w = ".company-details-form-container {\n width: 100%; }\n .company-details-form-container .company-details-form .steps-actions {\n display: flex;\n flex-direction: row-reverse; }\n .company-details-form-container .company-details-form .steps-actions .mg-left-1 {\n margin-left: 1rem; }\n .company-details-form-container .company-details-form .row .website .ant-input {\n margin-left: 0.3rem; }\n .company-details-form-container .company-details-form .row .website .ant-input-group-addon {\n border: 1px solid #d9d9d9; }\n .company-details-form-container .company-details-form .row .logo-upload-section {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: start;\n width: 100%; }\n .company-details-form-container .company-details-form .row .logo-upload-section .ant-upload {\n width: 20%; }\n .company-details-form-container .company-details-form .row .logo-upload-section .ant-upload-list {\n align-items: center;\n justify-content: center;\n width: 75%; }\n .company-details-form-container .company-details-form .row .logo-upload-section .ant-upload-list .ant-upload-list-item {\n margin-top: 0; }\n .company-details-form-container .company-details-form .row .details-part-one .space-container {\n width: 100%; }\n .company-details-form-container .company-details-form .row .details-part-one .space-container .ant-space-item {\n width: 100%; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .certifier-radio-container {\n width: 30%; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .certifier-radio-container .ant-radio-button-wrapper-checked:not(\n .ant-radio-button-wrapper-disabled\n) {\n color: #519e4f !important;\n border-color: #519e4f !important;\n box-shadow: none; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .certifier-radio-container .anticon {\n background: #eeeeee;\n border-radius: 50px;\n padding: 0.2rem;\n color: #519e4f; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .dev-radio-container {\n width: 30%; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .dev-radio-container .ant-radio-button-wrapper-checked:not(\n .ant-radio-button-wrapper-disabled\n) {\n color: #ffa070 !important;\n border-color: #ffa070 !important;\n box-shadow: none; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .dev-radio-container .anticon {\n background: #eeeeee;\n border-radius: 50px;\n padding: 0.2rem;\n color: #ffa070; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .minister-radio-container {\n width: 30%; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .minister-radio-container .ant-radio-button-wrapper-checked:not(\n .ant-radio-button-wrapper-disabled\n) {\n color: #9155fd !important;\n border-color: #9155fd !important;\n box-shadow: none; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .minister-radio-container .anticon {\n background: #eeeeee;\n border-radius: 50px;\n padding: 0.2rem;\n color: #9155fd; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .gov-radio-container {\n width: 45%; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .gov-radio-container .ant-radio-button-wrapper-checked:not(\n .ant-radio-button-wrapper-disabled\n) {\n color: #16b1ff !important;\n border-color: #16b1ff !important;\n box-shadow: none; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .gov-radio-container .anticon {\n background: #eeeeee;\n border-radius: 50px;\n padding: 0.2rem;\n color: #16b1ff; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .observer-radio-container {\n width: 25%; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .observer-radio-container .ant-radio-button-wrapper-checked:not(\n .ant-radio-button-wrapper-disabled\n) {\n color: #707070 !important;\n border-color: #707070 !important;\n box-shadow: none; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .observer-radio-container .anticon {\n background: #eeeeee;\n border-radius: 50px;\n padding: 0.2rem;\n color: #707070; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .ant-radio-button-wrapper::before {\n background-color: transparent; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .ant-radio-button-wrapper {\n border: 1px solid #d9d9d9; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .anticon {\n margin-right: 0.5rem; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .certifier {\n width: 100%; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .certifier .ant-radio-button-checked {\n background: rgba(128, 255, 0, 0.12);\n color: #519e4f; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .dev {\n width: 100%; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .dev .ant-radio-button-checked {\n background: rgba(254, 241, 173, 0.5);\n color: #ffa070; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .gov {\n width: 100%; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .gov .ant-radio-button-checked {\n background: rgba(185, 226, 244, 0.56);\n color: #16b1ff; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .minister {\n width: 100%; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .minister .ant-radio-button-checked {\n background: rgba(198, 144, 251, 0.12);\n color: #9155fd; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .observer {\n width: 100%; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .observer .ant-radio-button-checked {\n background: rgba(176, 190, 197, 0.23);\n color: #707070; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .role-icons {\n margin-right: 5px; }\n .company-details-form-container .company-details-form .row .details-part-two .space-container {\n width: 100%; }\n .company-details-form-container .company-details-form .row .details-part-two .space-container .ant-space-item {\n width: 100%; }\n\n.step-title-container {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 1rem; }\n .step-title-container .step-count {\n font-size: 2.2rem;\n font-weight: 800;\n margin-right: 0.4rem;\n color: rgba(58, 53, 65, 0.8); }\n .step-title-container .title {\n font-size: 1rem;\n font-weight: 600;\n color: #3a3541; }\n\n.add-company-main-container {\n display: flex;\n flex-direction: column;\n border-radius: 5px;\n padding: 0 50px; }\n .add-company-main-container .title-container {\n display: flex;\n flex-direction: column;\n border-radius: 5px; }\n .add-company-main-container .title-container .main {\n font-size: 1.25rem;\n font-weight: 500;\n color: #16b1ff; }\n .add-company-main-container .title-container .sub {\n font-size: 0.8rem;\n color: #555657; }\n .add-company-main-container .adding-section {\n display: flex;\n flex-direction: column;\n background-color: #ffffff;\n margin: 1rem 0 1rem 0;\n border-radius: 10px;\n padding: 2.5rem 1.5rem 2.5rem 1.5rem; }\n .add-company-main-container .adding-section .form-section {\n display: flex;\n margin-bottom: 2rem; }\n .add-company-main-container .adding-section .form-section .form-one {\n width: 100%; }\n .add-company-main-container .adding-section .form-section .steps {\n width: 15%; }\n .add-company-main-container .adding-section .form-section .steps-content {\n width: 85%; }\n .add-company-main-container .adding-section .steps-action {\n display: flex;\n flex-direction: row-reverse; }\n\n.ant-upload-list-picture .ant-upload-list-item-error,\n.ant-upload-list-picture-card .ant-upload-list-item-error {\n height: auto;\n max-height: 200px; }\n\n.hide {\n display: none !important; }\n";
|
918
1227
|
styleInject(css_248z$w);
|
919
1228
|
|
920
|
-
var css_248z$v = "body {\n background-color: #f4f5fa;\n font-family: \"Inter\";\n font-weight: 400; }\n\n.ant-menu {\n background-color: #f4f5fa; }\n\n.ant-layout-header {\n background-color: #f4f5fa; }\n\n.ant-layout {\n background-color: #f4f5fa; }\n\n.ant-menu-submenu .ant-menu {\n background-color: #f4f5fa; }\n\n.ant-menu-item {\n background-color: #f4f5fa; }\n\n.ant-menu-sub {\n background-color: #f4f5fa; }\n\n.ant-table-content {\n font-family: \"Inter\"; }\n\n.ant-input {\n border-radius: 5px !important; }\n\n.ant-btn {\n border-radius: 5px !important; }\n\n.ant-input-group-addon:first-child {\n border-radius: 5px !important; }\n\n.ant-input-group .ant-input {\n width: 99% !important; }\n\n.ant-radio-group {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between; }\n\n.ant-radio-group-large .ant-radio-button-wrapper {\n font-size: 0.8rem;\n width: 25%;\n border-radius: 5px !important; }\n\n.ant-upload-list-picture .ant-upload-list-item-error,\n.ant-upload-list-picture-card .ant-upload-list-item-error {\n border-color: #40a9ff;\n border-radius: 5px;\n height: 40px; }\n .ant-upload-list-picture .ant-upload-list-item-error .ant-upload-list-item-name,\n .ant-upload-list-picture-card .ant-upload-list-item-error .ant-upload-list-item-name {\n color: #40a9ff !important; }\n\n.ant-upload-list-item-error .ant-upload-list-item-card-actions .anticon {\n color: #40a9ff; }\n\n.ant-input-status-error:not(.ant-input-disabled):not(.ant-input-borderless).ant-input,\n.ant-input-status-error:not(.ant-input-disabled):not(.ant-input-borderless).ant-input:hover {\n border-color: #d9d9d9 !important; }\n\n.ant-input-group-wrapper-status-error .ant-input-group-addon {\n border-color: #d9d9d9 !important; }\n\n.ant-form-item-explain-error {\n font-size: 13px;\n color: rgba(255, 77, 79, 0.8); }\n\n.ant-table-thead\n> tr\n> th:not(:last-child):not(.ant-table-selection-column):not(.ant-table-row-expand-icon-cell):not([colspan])::before {\n background-color: transparent !important; }\n\n.ant-form-item-label > label {\n flex-direction: row-reverse !important;\n color: rgba(58, 53, 65, 0.5); }\n\n.ant-form-item-label\n> label.ant-form-item-required:not(.ant-form-item-required-mark-optional)::before {\n margin-left: 0.2rem !important;\n color: rgba(255, 77, 79, 0.8) !important; }\n\n.ant-picker {\n border-radius: 5px !important;\n height: 35px !important; }\n\n.space-container {\n width: 100%; }\n .space-container .ant-space-item {\n width: 100%; }\n\n.PhoneInput .PhoneInputCountry {\n border: 1px solid #d9d9d9 !important;\n border-radius: 5px !important;\n padding: 0 1rem 0 1rem; }\n\n.PhoneInput .PhoneInputInput {\n flex: 1 1;\n min-width: 0;\n border-radius: 5px !important;\n height: 40px;\n border: 1px solid #d9d9d9 !important;\n outline: none; }\n\n.filter-title {\n color: rgba(58, 53, 65, 0.8);\n font-family: 'Inter';\n font-style: normal;\n font-weight: 600;\n font-size: 0.875rem; }\n\n.ant-radio-wrapper {\n font-family: 'Inter';\n font-style: normal;\n font-weight: 400;\n font-size: 0.875rem;\n line-height: 22px;\n color: rgba(58, 53, 65, 0.8); }\n\n.ant-list-item {\n color: rgba(58, 53, 65, 0.8); }\n\n.PhoneInput .PhoneInputInput:focus-visible,\n.PhoneInput .PhoneInputInput:hover {\n flex: 1 1;\n min-width: 0;\n border-radius: 5px !important;\n height: 40px;\n border-right: 1px solid #40a9ff !important;\n outline: 1px solid #40a9ff; }\n\n.layout-content-container {\n padding-bottom: 100px; }\n .layout-content-container .ant-btn-primary {\n background-color: #16b1ff;\n color: #ffffff;\n border: none; }\n .layout-content-container .ant-btn {\n height: 32px;\n font-weight: 500;\n font-size: 0.8rem;\n border-radius: 0.3rem;\n box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.25);\n min-width: 80px;\n box-shadow: none; }\n .layout-content-container .ant-btn span {\n text-transform: uppercase; }\n\n.content-container {\n padding: 0px 20px; }\n .content-container .title-bar {\n padding: 0px 0px 30px 0px; }\n .content-container .body-title {\n color: #16b1ff;\n font-weight: 500;\n font-size: 1.2rem; }\n .content-container .body-sub-title {\n color: rgba(58, 53, 65, 0.6);\n font-weight: 400;\n font-size: 0.8rem; }\n\n.content-card {\n background-color: #ffffff;\n border-radius: 10px;\n width: 100%; }\n .content-card .action-bar {\n padding: 1.6rem 1.3rem 1.6rem 1.3rem; }\n .content-card .action-bar button {\n width: fit-content; }\n .content-card .filter-section {\n padding: 1.4rem 1.3rem 1.6rem 1.3rem;\n display: flex;\n width: 100%;\n flex-direction: row;\n align-items: center;\n justify-content: end; }\n .content-card .filter-section .search-bar {\n display: flex;\n flex-direction: row-reverse; }\n .content-card .filter-section .filter-bar {\n display: flex;\n flex-direction: row-reverse;\n margin-top: 0.8rem;\n width: 5%; }\n .content-card .filter-section .ant-input-affix-wrapper {\n border-radius: 0.313rem 0 0 0.313rem !important; }\n .content-card .filter-section .ant-input-search\n> .ant-input-group\n> .ant-input-group-addon:last-child\n.ant-input-search-button {\n padding-top: 0;\n padding-bottom: 0;\n border-radius: 0 0.313rem 0.313rem 0 !important; }\n\n.layout-content-container .ant-btn {\n min-width: 50px !important; }\n\n.table-actions-section {\n width: 100%;\n margin-bottom: 1rem; }\n\n.action-menu {\n min-width: 120px;\n color: rgba(58, 53, 65, 0.6); }\n .action-menu .action-icon {\n margin-right: 12px;\n display: flex; }\n .action-menu .anticon-edit {\n color: #16b1ff; }\n .action-menu .anticon-delete {\n color: #f25a29; }\n\n.ant-dropdown-menu {\n padding: 1rem 2rem 1rem 1rem !important;\n border-radius: 5px; }\n\n.ant-dropdown-menu-item-active {\n background-color: transparent !important; }\n\n.ant-popover-inner-content .action-menu {\n margin: -12px -16px; }\n .ant-popover-inner-content .action-menu .ant-list-item {\n padding: 11px 16px;\n justify-content: flex-start;\n cursor: pointer; }\n\n.ant-tag {\n border-radius: 20px; }\n\n.clickable {\n cursor: pointer; }\n\n.text-center {\n text-align: center; }\n\n.float-left {\n float: left; }\n\n.float-right {\n float: right; }\n\n.apexcharts-canvas {\n font-family: \"Inter\" !important; }\n\n.apexcharts-legend-text {\n font-family: \"Inter\" !important; }\n\n.ant-tag {\n padding: 1px 10px; }\n\n.flex-display {\n display: flex; }\n\n.ant-modal-footer {\n border-top: none;\n text-align: center; }\n .ant-modal-footer button {\n margin: 10px 20px;\n text-transform: uppercase;\n font-size: 0.8rem; }\n\n.ant-modal-header {\n border-radius: 15px;\n border: none; }\n\n.ant-modal-content {\n border-radius: 15px;\n border: none; }\n\n.ant-modal-header {\n border: none; }\n\n.ant-modal-body {\n text-align: center;\n color: rgba(58, 53, 65, 0.6);\n font-size: 0.8rem; }\n .ant-modal-body .ant-select-selector {\n text-align: left;\n border-radius: 5px !important;\n height: 32px; }\n .ant-modal-body .form-label {\n text-align: left; }\n .ant-modal-body .form-label .req-ast {\n color: rgba(255, 77, 79, 0.8);\n padding-left: 5px; }\n .ant-modal-body .ant-form .ant-input-password {\n padding: 6.5px 11px;\n font-size: 16px; }\n .ant-modal-body .ant-form .ant-form-item-explain-error {\n text-align: start; }\n\n.popup-header {\n text-align: center;\n color: rgba(58, 53, 65, 0.8);\n font-weight: 600;\n font-family: \"Inter\";\n font-size: 0.9rem;\n margin: 25px 20px -20px 20px; }\n .popup-header .icon {\n font-size: 4rem;\n margin-bottom: 15px;\n font-weight: 400; }\n .popup-header img {\n height: 100px; }\n\n.popup-success .icon {\n color: #5dc380; }\n\n.popup-success .ant-btn-primary {\n background: #16b1ff;\n border-radius: #16b1ff;\n border: none; }\n\n.popup-success .ant-btn-default {\n color: rgba(58, 53, 65, 0.6);\n border-color: rgba(58, 53, 65, 0.6); }\n\n.popup-success .ant-btn-primary[disabled] {\n border-color: #d9d9d9;\n background: #f5f5f5; }\n\n.popup-primary .icon {\n color: #16b1ff; }\n\n.popup-primary .ant-btn-primary {\n background: #16b1ff;\n border-radius: #16b1ff;\n border: none; }\n\n.popup-primary .ant-btn-default {\n color: rgba(58, 53, 65, 0.6);\n border-color: rgba(58, 53, 65, 0.6); }\n\n.popup-primary .ant-btn-primary[disabled] {\n border-color: #d9d9d9;\n background: #f5f5f5; }\n\n.popup-danger .icon {\n color: rgba(255, 77, 79, 0.8); }\n\n.popup-danger .ant-btn-primary {\n background: rgba(255, 77, 79, 0.8);\n border-radius: rgba(255, 77, 79, 0.8);\n border: none; }\n\n.popup-danger .ant-btn-primary[disabled] {\n border-color: #d9d9d9;\n background: #f5f5f5; }\n\n.popup-danger .ant-btn-default {\n color: rgba(58, 53, 65, 0.6);\n border-color: rgba(58, 53, 65, 0.6); }\n\n.ant-modal-footer .ant-btn {\n height: 32px;\n border-radius: 4px;\n padding: 6px 16px;\n font-weight: 500; }\n\n.ant-modal-footer .ant-btn-default {\n color: rgba(140, 140, 140, 0.7) !important;\n border-color: rgba(140, 140, 140, 0.7) !important; }\n\n.ant-tag-processing {\n color: #16b1ff;\n background: rgba(185, 226, 244, 0.4); }\n\n.filter-section input {\n font-family: 'Inter';\n font-size: 0.8rem !important; }\n\n.pull-right {\n float: right; }\n\n.disabled {\n opacity: 0.5; }\n\n.mg-left-3 {\n margin-left: 3rem; }\n\n.mg-left-2 {\n margin-left: 2rem !important; }\n\n.mg-left-1 {\n margin-left: 1rem; }\n\n.mg-top-1 {\n margin-top: 1rem; }\n\n.mg-top-2 {\n margin-top: 2rem; }\n\n.mg-bottom-1 {\n margin-bottom: 1rem !important; }\n\n.transfer-form {\n padding: 0px 15px;\n color: rgba(58, 53, 65, 0.6); }\n .transfer-form .popup-credit-input .ant-form-item-explain-error {\n width: 200px; }\n .transfer-form .info-container {\n display: flex;\n flex-direction: row;\n width: 10%;\n height: 20px;\n align-items: center;\n justify-content: start;\n margin-left: 5px; }\n .transfer-form .ant-row {\n align-items: unset; }\n .transfer-form .sub-text {\n margin-bottom: 35px;\n font-size: 0.9rem;\n font-weight: 500; }\n .transfer-form .label {\n text-align: left;\n font-size: 0.9rem;\n color: rgba(58, 53, 65, 0.6); }\n .transfer-form .seperator {\n font-size: 1.2rem;\n color: #d9d9d9; }\n .transfer-form .footer {\n margin-bottom: 0px;\n margin-top: 15px; }\n .transfer-form label {\n font-size: 0.8rem; }\n .transfer-form .ant-radio-wrapper {\n font-size: 0.9rem; }\n .transfer-form input {\n color: rgba(58, 53, 65, 0.6); }\n .transfer-form button {\n text-transform: uppercase;\n font-weight: 500; }\n\n.color-error {\n color: rgba(255, 77, 79, 0.8); }\n\n.color-primary {\n color: #16b1ff; }\n\n.ant-input-number-input {\n text-align: right; }\n\n.text-left {\n text-align: left; }\n\n.ant-form-item .ant-radio-group {\n text-align: left; }\n\n.loading-center {\n margin: auto;\n text-align: center;\n position: absolute;\n top: 50%;\n left: 50%; }\n\n.ant-tag-purple {\n color: #976ed7; }\n\n.ant-tag-orange {\n color: #ff8f56; }\n\n.ant-tag-default {\n color: rgba(58, 53, 65, 0.5); }\n\n.ant-popover-inner {\n border-radius: 4px; }\n\n.ant-input-number {\n border-radius: 5px; }\n\n.ret-icon {\n background-color: rgba(254, 241, 173, 0.5);\n color: #ff8f56; }\n\n.flag-ret-icon {\n display: flex !important;\n background-color: #f4f5fa;\n font-size: 1.1rem !important;\n padding: 7px; }\n\n.b-icon {\n vertical-align: middle; }\n\n.ant-message-notice-content {\n padding: 0px;\n border-radius: 5px; }\n .ant-message-notice-content .ant-message-custom-content {\n font-size: 0.8rem;\n border-radius: 5px;\n padding: 17px 24px; }\n .ant-message-notice-content .ant-message-error {\n color: rgba(255, 77, 79, 0.8);\n border: 1px solid rgba(255, 77, 79, 0.8); }\n .ant-message-notice-content .ant-message-success {\n color: #5bce00;\n border: 1px solid #5bce00; }\n\n.ant-select-selection-item {\n color: rgba(58, 53, 65, 0.6); }\n\n.sub-text {\n font-size: 0.9rem;\n font-weight: 500; }\n\n.search-filter {\n margin-right: 15px; }\n\n.download-data-btn {\n margin-left: 15px; }\n\n.mg-bottom-0 {\n margin-bottom: 0px; }\n\n.padding-bottom-0 {\n padding-bottom: 0px; }\n\n.ellipsis-overflow {\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 1;\n -webkit-box-orient: vertical; }\n\n.nextline-overflow {\n overflow-wrap: break-word; }\n\n.ant-message {\n width: 50%;\n right: 0px;\n left: auto;\n min-width: 400px; }\n";
|
1229
|
+
var css_248z$v = "body {\n background-color: #f4f5fa;\n font-family: \"Inter\";\n font-weight: 400; }\n body .ant-menu {\n background-color: #f4f5fa; }\n body .ant-layout-header {\n background-color: #f4f5fa; }\n body .ant-layout {\n background-color: #f4f5fa; }\n body .ant-menu-submenu .ant-menu {\n background-color: #f4f5fa; }\n body .ant-menu-item {\n background-color: #f4f5fa; }\n body .ant-menu-sub {\n background-color: #f4f5fa; }\n body .ant-table-content {\n font-family: \"Inter\"; }\n body .ant-input {\n border-radius: 5px !important; }\n body .ant-btn {\n border-radius: 5px !important; }\n body .ant-input-group-addon:first-child {\n border-radius: 5px !important; }\n body .ant-input-group .ant-input {\n width: 99% !important; }\n body .ant-radio-group {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between; }\n body .ant-radio-group-large .ant-radio-button-wrapper {\n font-size: 0.8rem;\n width: 25%;\n border-radius: 5px !important; }\n body .ant-upload-list-picture .ant-upload-list-item-error,\n body .ant-upload-list-picture-card .ant-upload-list-item-error {\n border-color: #40a9ff;\n border-radius: 5px;\n height: 40px; }\n body .ant-upload-list-picture .ant-upload-list-item-error .ant-upload-list-item-name,\n body .ant-upload-list-picture-card .ant-upload-list-item-error .ant-upload-list-item-name {\n color: #40a9ff !important; }\n body .ant-upload-list-item-error .ant-upload-list-item-card-actions .anticon {\n color: #40a9ff; }\n body .ant-input-status-error:not(.ant-input-disabled):not(.ant-input-borderless).ant-input,\n body .ant-input-status-error:not(.ant-input-disabled):not(.ant-input-borderless).ant-input:hover {\n border-color: #d9d9d9 !important; }\n body .ant-input-group-wrapper-status-error .ant-input-group-addon {\n border-color: #d9d9d9 !important; }\n body .ant-form-item-explain-error {\n font-size: 13px;\n color: rgba(255, 77, 79, 0.8); }\n body .ant-table-thead\n> tr\n> th:not(:last-child):not(.ant-table-selection-column):not(.ant-table-row-expand-icon-cell):not([colspan])::before {\n background-color: transparent !important; }\n body .ant-form-item-label > label {\n flex-direction: row-reverse !important;\n color: rgba(58, 53, 65, 0.5); }\n body .ant-form-item-label\n> label.ant-form-item-required:not(.ant-form-item-required-mark-optional)::before {\n margin-left: 0.2rem !important;\n color: rgba(255, 77, 79, 0.8) !important; }\n body .ant-picker {\n border-radius: 5px !important;\n height: 35px !important; }\n body .space-container {\n width: 100%; }\n body .space-container .ant-space-item {\n width: 100%; }\n body .PhoneInput .PhoneInputCountry {\n border: 1px solid #d9d9d9 !important;\n border-radius: 5px !important;\n padding: 0 1rem 0 1rem; }\n body .PhoneInput .PhoneInputInput {\n flex: 1 1;\n min-width: 0;\n border-radius: 5px !important;\n height: 40px;\n border: 1px solid #d9d9d9 !important;\n outline: none; }\n body .filter-title {\n color: rgba(58, 53, 65, 0.8);\n font-family: 'Inter';\n font-style: normal;\n font-weight: 600;\n font-size: 0.875rem; }\n body .ant-radio-wrapper {\n font-family: 'Inter';\n font-style: normal;\n font-weight: 400;\n font-size: 0.875rem;\n line-height: 22px;\n color: rgba(58, 53, 65, 0.8); }\n body .ant-list-item {\n color: rgba(58, 53, 65, 0.8); }\n body .PhoneInput .PhoneInputInput:focus-visible,\n body .PhoneInput .PhoneInputInput:hover {\n flex: 1 1;\n min-width: 0;\n border-radius: 5px !important;\n height: 40px;\n border-right: 1px solid #40a9ff !important;\n outline: 1px solid #40a9ff; }\n body .layout-content-container {\n padding-bottom: 100px; }\n body .layout-content-container .ant-btn-primary {\n background-color: #16b1ff;\n color: #ffffff;\n border: none; }\n body .layout-content-container .ant-btn {\n height: 32px;\n font-weight: 500;\n font-size: 0.8rem;\n border-radius: 0.3rem;\n box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.25);\n min-width: 80px;\n box-shadow: none; }\n body .layout-content-container .ant-btn span {\n text-transform: uppercase; }\n body .content-container {\n padding: 0px 20px; }\n body .content-container .title-bar {\n padding: 0px 0px 30px 0px; }\n body .content-container .body-title {\n color: #16b1ff;\n font-weight: 500;\n font-size: 1.2rem; }\n body .content-container .body-sub-title {\n color: rgba(58, 53, 65, 0.6);\n font-weight: 400;\n font-size: 0.8rem; }\n body .content-card {\n background-color: #ffffff;\n border-radius: 10px;\n width: 100%; }\n body .content-card .action-bar {\n padding: 1.6rem 1.3rem 1.6rem 1.3rem; }\n body .content-card .action-bar button {\n width: fit-content; }\n body .content-card .filter-section {\n padding: 1.4rem 1.3rem 1.6rem 1.3rem;\n display: flex;\n width: 100%;\n flex-direction: row;\n align-items: center;\n justify-content: end; }\n body .content-card .filter-section .search-bar {\n display: flex;\n flex-direction: row-reverse; }\n body .content-card .filter-section .filter-bar {\n display: flex;\n flex-direction: row-reverse;\n margin-top: 0.8rem;\n width: 5%; }\n body .content-card .filter-section .ant-input-affix-wrapper {\n border-radius: 0.313rem 0 0 0.313rem !important; }\n body .content-card .filter-section .ant-input-search\n> .ant-input-group\n> .ant-input-group-addon:last-child\n.ant-input-search-button {\n padding-top: 0;\n padding-bottom: 0;\n border-radius: 0 0.313rem 0.313rem 0 !important; }\n body .layout-content-container .ant-btn {\n min-width: 50px !important; }\n body .table-actions-section {\n width: 100%;\n margin-bottom: 1rem; }\n body .action-menu {\n min-width: 120px;\n color: rgba(58, 53, 65, 0.6); }\n body .action-menu .action-icon {\n margin-right: 12px;\n display: flex; }\n body .action-menu .anticon-edit {\n color: #16b1ff; }\n body .action-menu .anticon-delete {\n color: #f25a29; }\n body .ant-dropdown-menu {\n padding: 1rem 2rem 1rem 1rem !important;\n border-radius: 5px; }\n body .ant-dropdown-menu-item-active {\n background-color: transparent !important; }\n body .ant-popover-inner-content .action-menu {\n margin: -12px -16px; }\n body .ant-popover-inner-content .action-menu .ant-list-item {\n padding: 11px 16px;\n justify-content: flex-start;\n cursor: pointer; }\n body .ant-tag {\n border-radius: 20px; }\n body .clickable {\n cursor: pointer; }\n body .text-center {\n text-align: center; }\n body .float-left {\n float: left; }\n body .float-right {\n float: right; }\n body .apexcharts-canvas {\n font-family: \"Inter\" !important; }\n body .apexcharts-legend-text {\n font-family: \"Inter\" !important; }\n body .ant-tag {\n padding: 1px 10px; }\n body .flex-display {\n display: flex; }\n body .ant-modal-footer {\n border-top: none;\n text-align: center; }\n body .ant-modal-footer button {\n margin: 10px 20px;\n text-transform: uppercase;\n font-size: 0.8rem; }\n body .ant-modal-header {\n border-radius: 15px;\n border: none; }\n body .ant-modal-content {\n border-radius: 15px;\n border: none; }\n body .ant-modal-header {\n border: none; }\n body .ant-modal-body {\n text-align: center;\n color: rgba(58, 53, 65, 0.6);\n font-size: 0.8rem; }\n body .ant-modal-body .ant-select-selector {\n text-align: left;\n border-radius: 5px !important;\n height: 32px; }\n body .ant-modal-body .form-label {\n text-align: left; }\n body .ant-modal-body .form-label .req-ast {\n color: rgba(255, 77, 79, 0.8);\n padding-left: 5px; }\n body .ant-modal-body .ant-form .ant-input-password {\n padding: 6.5px 11px;\n font-size: 16px; }\n body .ant-modal-body .ant-form .ant-form-item-explain-error {\n text-align: start; }\n body .popup-header {\n text-align: center;\n color: rgba(58, 53, 65, 0.8);\n font-weight: 600;\n font-family: \"Inter\";\n font-size: 0.9rem;\n margin: 25px 20px -20px 20px; }\n body .popup-header .icon {\n font-size: 4rem;\n margin-bottom: 15px;\n font-weight: 400; }\n body .popup-header img {\n height: 100px; }\n body .popup-success .icon {\n color: #5dc380; }\n body .popup-success .ant-btn-primary {\n background: #16b1ff;\n border-radius: #16b1ff;\n border: none; }\n body .popup-success .ant-btn-default {\n color: rgba(58, 53, 65, 0.6);\n border-color: rgba(58, 53, 65, 0.6); }\n body .popup-success .ant-btn-primary[disabled] {\n border-color: #d9d9d9;\n background: #f5f5f5; }\n body .popup-primary .icon {\n color: #16b1ff; }\n body .popup-primary .ant-btn-primary {\n background: #16b1ff;\n border-radius: #16b1ff;\n border: none; }\n body .popup-primary .ant-btn-default {\n color: rgba(58, 53, 65, 0.6);\n border-color: rgba(58, 53, 65, 0.6); }\n body .popup-primary .ant-btn-primary[disabled] {\n border-color: #d9d9d9;\n background: #f5f5f5; }\n body .popup-danger .icon {\n color: rgba(255, 77, 79, 0.8); }\n body .popup-danger .ant-btn-primary {\n background: rgba(255, 77, 79, 0.8);\n border-radius: rgba(255, 77, 79, 0.8);\n border: none; }\n body .popup-danger .ant-btn-primary[disabled] {\n border-color: #d9d9d9;\n background: #f5f5f5; }\n body .popup-danger .ant-btn-default {\n color: rgba(58, 53, 65, 0.6);\n border-color: rgba(58, 53, 65, 0.6); }\n body .ant-modal-footer .ant-btn {\n height: 32px;\n border-radius: 4px;\n padding: 6px 16px;\n font-weight: 500; }\n body .ant-modal-footer .ant-btn-default {\n color: rgba(140, 140, 140, 0.7) !important;\n border-color: rgba(140, 140, 140, 0.7) !important; }\n body .ant-tag-processing {\n color: #16b1ff;\n background: rgba(185, 226, 244, 0.4); }\n body .filter-section input {\n font-family: 'Inter';\n font-size: 0.8rem !important; }\n body .pull-right {\n float: right; }\n body .disabled {\n opacity: 0.5; }\n body .mg-left-3 {\n margin-left: 3rem; }\n body .mg-left-2 {\n margin-left: 2rem !important; }\n body .mg-left-1 {\n margin-left: 1rem; }\n body .mg-top-1 {\n margin-top: 1rem; }\n body .mg-top-2 {\n margin-top: 2rem; }\n body .mg-bottom-1 {\n margin-bottom: 1rem !important; }\n body .transfer-form {\n padding: 0px 15px;\n color: rgba(58, 53, 65, 0.6); }\n body .transfer-form .popup-credit-input .ant-form-item-explain-error {\n width: 200px; }\n body .transfer-form .info-container {\n display: flex;\n flex-direction: row;\n width: 10%;\n height: 20px;\n align-items: center;\n justify-content: start;\n margin-left: 5px; }\n body .transfer-form .ant-row {\n align-items: unset; }\n body .transfer-form .sub-text {\n margin-bottom: 35px;\n font-size: 0.9rem;\n font-weight: 500; }\n body .transfer-form .label {\n text-align: left;\n font-size: 0.9rem;\n color: rgba(58, 53, 65, 0.6); }\n body .transfer-form .seperator {\n font-size: 1.2rem;\n color: #d9d9d9; }\n body .transfer-form .footer {\n margin-bottom: 0px;\n margin-top: 15px; }\n body .transfer-form label {\n font-size: 0.8rem; }\n body .transfer-form .ant-radio-wrapper {\n font-size: 0.9rem; }\n body .transfer-form input {\n color: rgba(58, 53, 65, 0.6); }\n body .transfer-form button {\n text-transform: uppercase;\n font-weight: 500; }\n body .color-error {\n color: rgba(255, 77, 79, 0.8); }\n body .color-primary {\n color: #16b1ff; }\n body .ant-input-number-input {\n text-align: right; }\n body .text-left {\n text-align: left; }\n body .ant-form-item .ant-radio-group {\n text-align: left; }\n body .loading-center {\n margin: auto;\n text-align: center;\n position: absolute;\n top: 50%;\n left: 50%; }\n body .ant-tag-purple {\n color: #976ed7; }\n body .ant-tag-orange {\n color: #ff8f56; }\n body .ant-tag-default {\n color: rgba(58, 53, 65, 0.5); }\n body .ant-popover-inner {\n border-radius: 4px; }\n body .ant-input-number {\n border-radius: 5px; }\n body .ret-icon {\n background-color: rgba(254, 241, 173, 0.5);\n color: #ff8f56; }\n body .flag-ret-icon {\n display: flex !important;\n background-color: #f4f5fa;\n font-size: 1.1rem !important;\n padding: 7px; }\n body .b-icon {\n vertical-align: middle; }\n body .ant-message-notice-content {\n padding: 0px;\n border-radius: 5px; }\n body .ant-message-notice-content .ant-message-custom-content {\n font-size: 0.8rem;\n border-radius: 5px;\n padding: 17px 24px; }\n body .ant-message-notice-content .ant-message-error {\n color: rgba(255, 77, 79, 0.8);\n border: 1px solid rgba(255, 77, 79, 0.8); }\n body .ant-message-notice-content .ant-message-success {\n color: #5bce00;\n border: 1px solid #5bce00; }\n body .ant-select-selection-item {\n color: rgba(58, 53, 65, 0.6); }\n body .sub-text {\n font-size: 0.9rem;\n font-weight: 500; }\n body .search-filter {\n margin-right: 15px; }\n body .mg-bottom-0 {\n margin-bottom: 0px; }\n body .padding-bottom-0 {\n padding-bottom: 0px; }\n body .ellipsis-overflow {\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 1;\n -webkit-box-orient: vertical; }\n body .nextline-overflow {\n overflow-wrap: break-word; }\n body .ant-message {\n width: 50%;\n right: 0px;\n left: auto;\n min-width: 400px; }\n body .download-data-btn {\n margin-left: 15px; }\n";
|
921
1230
|
styleInject(css_248z$v);
|
922
1231
|
|
923
1232
|
exports.UserManagementColumns = void 0;
|
@@ -5886,7 +6195,7 @@ var Projection = /** @class */ (function () {
|
|
5886
6195
|
|
5887
6196
|
var AddNewCompanyComponent = function (props) {
|
5888
6197
|
var _a;
|
5889
|
-
var t = props.t, onNavigateToCompanyManagement = props.onNavigateToCompanyManagement, maximumImageSize = props.maximumImageSize,
|
6198
|
+
var t = props.t, onNavigateToCompanyManagement = props.onNavigateToCompanyManagement, maximumImageSize = props.maximumImageSize, useLocation = props.useLocation, regionField = props.regionField, isGuest = props.isGuest, onNavigateToHome = props.onNavigateToHome, systemType = props.systemType;
|
5890
6199
|
var formOne = antd.Form.useForm()[0];
|
5891
6200
|
var formTwo = antd.Form.useForm()[0];
|
5892
6201
|
var _b = React.useState(), stepOneData = _b[0], setStepOneData = _b[1];
|
@@ -6772,7 +7081,7 @@ var CompanyDetailsComponent = function (props) {
|
|
6772
7081
|
};
|
6773
7082
|
|
6774
7083
|
var CompanyProfileComponent = function (props) {
|
6775
|
-
var t = props.t, useAbilityContext = props.useAbilityContext, useLocation = props.useLocation,
|
7084
|
+
var t = props.t, useAbilityContext = props.useAbilityContext, useLocation = props.useLocation, onNavigateToCompanyManagement = props.onNavigateToCompanyManagement, onNavigateToCompanyEdit = props.onNavigateToCompanyEdit; props.regionField; var systemType = props.systemType;
|
6776
7085
|
var _a = useConnection(), get = _a.get, put = _a.put, post = _a.post;
|
6777
7086
|
var _b = React.useState(undefined), companyDetails = _b[0], setCompanyDetails = _b[1];
|
6778
7087
|
var _c = React.useState(undefined), userDetails = _c[0], setUserDetails = _c[1];
|
@@ -7116,7 +7425,7 @@ styleInject(css_248z$s);
|
|
7116
7425
|
|
7117
7426
|
var Search$1 = antd.Input.Search;
|
7118
7427
|
var ProgrammeManagementComponent = function (props) {
|
7119
|
-
var t = props.t, visibleColumns = props.visibleColumns,
|
7428
|
+
var t = props.t, visibleColumns = props.visibleColumns, onNavigateToProgrammeView = props.onNavigateToProgrammeView, onClickAddProgramme = props.onClickAddProgramme, enableAddProgramme = props.enableAddProgramme, useAbilityContext = props.useAbilityContext;
|
7120
7429
|
var _a = useConnection(); _a.get; _a.delete; var post = _a.post;
|
7121
7430
|
var _b = React.useState(), totalProgramme = _b[0], setTotalProgramme = _b[1];
|
7122
7431
|
var _c = React.useState(false), loading = _c[0], setLoading = _c[1];
|
@@ -7344,7 +7653,7 @@ var ProgrammeManagementComponent = function (props) {
|
|
7344
7653
|
filter.push({
|
7345
7654
|
key: "title",
|
7346
7655
|
operation: "like",
|
7347
|
-
value: "".concat(search, "%"),
|
7656
|
+
value: "%".concat(search, "%"),
|
7348
7657
|
});
|
7349
7658
|
}
|
7350
7659
|
if (ministryLevelFilter) {
|
@@ -7551,7 +7860,7 @@ var ProgrammeManagementComponent = function (props) {
|
|
7551
7860
|
React.createElement("div", { className: "filter-section" },
|
7552
7861
|
React.createElement("div", { className: "search-filter" },
|
7553
7862
|
React.createElement(antd.Checkbox, { className: "label", onChange: function (v) {
|
7554
|
-
if (userInfoState.companyRole === exports.CompanyRole.MINISTRY) {
|
7863
|
+
if ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.MINISTRY) {
|
7555
7864
|
if (v.target.checked) {
|
7556
7865
|
setMinistryLevelFilter(true);
|
7557
7866
|
}
|
@@ -7568,7 +7877,7 @@ var ProgrammeManagementComponent = function (props) {
|
|
7568
7877
|
}
|
7569
7878
|
: undefined);
|
7570
7879
|
}
|
7571
|
-
} }, userInfoState.companyRole === exports.CompanyRole.MINISTRY
|
7880
|
+
} }, (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.MINISTRY
|
7572
7881
|
? t("view:ministryLevel")
|
7573
7882
|
: t("view:seeMine"))),
|
7574
7883
|
React.createElement("div", { className: "search-bar" },
|
@@ -13355,7 +13664,7 @@ var sectoralScopes = {
|
|
13355
13664
|
};
|
13356
13665
|
var ProgrammeCreationComponent = function (props) {
|
13357
13666
|
var _a, _b, _c;
|
13358
|
-
var
|
13667
|
+
var useLocation = props.useLocation, onNavigateToProgrammeView = props.onNavigateToProgrammeView, translator = props.translator;
|
13359
13668
|
var t = translator.t;
|
13360
13669
|
var state = useLocation().state;
|
13361
13670
|
var formOne = antd.Form.useForm()[0];
|
@@ -14420,7 +14729,7 @@ var ChangePasswordModel = function (props) {
|
|
14420
14729
|
|
14421
14730
|
var AddNewUserComponent = function (props) {
|
14422
14731
|
var _a, _b, _c, _d, _e, _f;
|
14423
|
-
var t = props.t, onNavigateToUserManagement = props.onNavigateToUserManagement, onNavigateLogin = props.onNavigateLogin,
|
14732
|
+
var t = props.t, onNavigateToUserManagement = props.onNavigateToUserManagement, onNavigateLogin = props.onNavigateLogin, useLocation = props.useLocation, useAbilityContext = props.useAbilityContext, themeColor = props.themeColor;
|
14424
14733
|
var _g = useConnection(), post = _g.post, put = _g.put, del = _g.delete, get = _g.get;
|
14425
14734
|
var formOne = antd.Form.useForm()[0];
|
14426
14735
|
var state = useLocation().state;
|
@@ -14838,7 +15147,7 @@ var LanguageSelection = function (props) {
|
|
14838
15147
|
};
|
14839
15148
|
|
14840
15149
|
var UserProfileComponent = function (props) {
|
14841
|
-
var t = props.t, i18n = props.i18n,
|
15150
|
+
var t = props.t, i18n = props.i18n, onNavigateUpdateUser = props.onNavigateUpdateUser, onNavigateLogin = props.onNavigateLogin;
|
14842
15151
|
var get = useConnection().get;
|
14843
15152
|
var _a = React.useState(undefined), organisationDetails = _a[0], setOrganisationDetails = _a[1];
|
14844
15153
|
var _b = React.useState(undefined), userDetails = _b[0], setUserDetails = _b[1];
|
@@ -14930,7 +15239,7 @@ styleInject(css_248z$n);
|
|
14930
15239
|
|
14931
15240
|
var Search = antd.Input.Search;
|
14932
15241
|
var UserManagementComponent = function (props) {
|
14933
|
-
var t = props.t, useAbilityContext = props.useAbilityContext,
|
15242
|
+
var t = props.t, useAbilityContext = props.useAbilityContext, visibleColumns = props.visibleColumns, onNavigateToUpdateUser = props.onNavigateToUpdateUser, onClickAddUser = props.onClickAddUser;
|
14934
15243
|
antd.Form.useForm()[0];
|
14935
15244
|
var _a = useConnection(), post = _a.post, del = _a.delete;
|
14936
15245
|
var _b = React.useState(), totalUser = _b[0], setTotalUser = _b[1];
|
@@ -14953,6 +15262,7 @@ var UserManagementComponent = function (props) {
|
|
14953
15262
|
var _t = React.useState(false), openDeleteConfirmationModal = _t[0], setOpenDeleteConfirmationModal = _t[1];
|
14954
15263
|
var _u = React.useState(), dataQuery = _u[0], setDataQuery = _u[1];
|
14955
15264
|
var ability = useAbilityContext();
|
15265
|
+
var userInfoState = useUserContext().userInfoState;
|
14956
15266
|
document.addEventListener("mousedown", function (event) {
|
14957
15267
|
var userFilterArea1 = document.querySelector(".filter-bar");
|
14958
15268
|
var userFilterArea2 = document.querySelector(".filter-dropdown");
|
@@ -15164,7 +15474,7 @@ var UserManagementComponent = function (props) {
|
|
15164
15474
|
{
|
15165
15475
|
key: searchByTermUser,
|
15166
15476
|
operation: "like",
|
15167
|
-
value: networksearchUsers + "%",
|
15477
|
+
value: "%" + networksearchUsers + "%",
|
15168
15478
|
},
|
15169
15479
|
];
|
15170
15480
|
}
|
@@ -15182,7 +15492,7 @@ var UserManagementComponent = function (props) {
|
|
15182
15492
|
{
|
15183
15493
|
key: searchByTermUser,
|
15184
15494
|
operation: "like",
|
15185
|
-
value: networksearchUsers + "%",
|
15495
|
+
value: "%" + networksearchUsers + "%",
|
15186
15496
|
},
|
15187
15497
|
{
|
15188
15498
|
key: "role",
|
@@ -15205,7 +15515,7 @@ var UserManagementComponent = function (props) {
|
|
15205
15515
|
{
|
15206
15516
|
key: searchByTermUser,
|
15207
15517
|
operation: "like",
|
15208
|
-
value: networksearchUsers + "%",
|
15518
|
+
value: "%" + networksearchUsers + "%",
|
15209
15519
|
},
|
15210
15520
|
{
|
15211
15521
|
key: "role",
|
@@ -15223,7 +15533,7 @@ var UserManagementComponent = function (props) {
|
|
15223
15533
|
{
|
15224
15534
|
key: searchByTermUser,
|
15225
15535
|
operation: "like",
|
15226
|
-
value: networksearchUsers + "%",
|
15536
|
+
value: "%" + networksearchUsers + "%",
|
15227
15537
|
},
|
15228
15538
|
{
|
15229
15539
|
key: "companyRole",
|
@@ -15540,7 +15850,7 @@ var InsurancePayback;
|
|
15540
15850
|
|
15541
15851
|
var RangePicker$3 = antd.DatePicker.RangePicker;
|
15542
15852
|
var InvestmentCreationComponent = function (props) {
|
15543
|
-
var t = props.t,
|
15853
|
+
var t = props.t, useLocation = props.useLocation, onNavigateToProgrammeManagementView = props.onNavigateToProgrammeManagementView, onNavigateToProgrammeView = props.onNavigateToProgrammeView;
|
15544
15854
|
var state = useLocation().state;
|
15545
15855
|
var _a = React.useState(), data = _a[0], setData = _a[1];
|
15546
15856
|
var formOne = antd.Form.useForm()[0];
|
@@ -15555,6 +15865,7 @@ var InvestmentCreationComponent = function (props) {
|
|
15555
15865
|
var _h = React.useState([]), instrument = _h[0], setInstrument = _h[1];
|
15556
15866
|
var _j = React.useState(), stepOneData = _j[0], setStepOneData = _j[1];
|
15557
15867
|
var _k = React.useState(), govData = _k[0], setGovData = _k[1];
|
15868
|
+
var userInfoState = useUserContext().userInfoState;
|
15558
15869
|
var instrumentOptions = Object.keys(exports.Instrument).map(function (k, index) { return ({
|
15559
15870
|
label: addSpaces(Object.values(exports.Instrument)[index]),
|
15560
15871
|
value: Object.values(exports.Instrument)[index],
|
@@ -16384,7 +16695,7 @@ var InvestmentActionModel = function (props) {
|
|
16384
16695
|
};
|
16385
16696
|
|
16386
16697
|
var InvestmentManagementComponent = function (props) {
|
16387
|
-
var translator = props.translator,
|
16698
|
+
var translator = props.translator, onNavigateToProgrammeView = props.onNavigateToProgrammeView, onClickAddOwnership = props.onClickAddOwnership, enableAddOwnership = props.enableAddOwnership;
|
16388
16699
|
var t = translator.t;
|
16389
16700
|
var statusOptions = Object.keys(exports.InvestmentStatus).map(function (k, index) { return ({
|
16390
16701
|
label: addSpaces(Object.values(exports.InvestmentStatus)[index]),
|
@@ -16456,7 +16767,7 @@ var InvestmentManagementComponent = function (props) {
|
|
16456
16767
|
{
|
16457
16768
|
key: "programmeTitle",
|
16458
16769
|
operation: "like",
|
16459
|
-
value: "".concat(search, "%"),
|
16770
|
+
value: "%".concat(search, "%"),
|
16460
16771
|
},
|
16461
16772
|
];
|
16462
16773
|
if (!isNaN(Number(search))) {
|
@@ -16975,7 +17286,7 @@ var css_248z$l = ".steps-actions {\n display: flex;\n flex-direction: row-reve
|
|
16975
17286
|
styleInject(css_248z$l);
|
16976
17287
|
|
16977
17288
|
var SupportCreationComponent = function (props) {
|
16978
|
-
var t = props.t,
|
17289
|
+
var t = props.t, useLocation = props.useLocation; props.onNavigateToProgrammeManagementView; props.onNavigateToProgrammeView;
|
16979
17290
|
useLocation().state;
|
16980
17291
|
var _a = React.useState(); _a[0]; _a[1];
|
16981
17292
|
var formOne = antd.Form.useForm()[0];
|
@@ -16988,6 +17299,7 @@ var SupportCreationComponent = function (props) {
|
|
16988
17299
|
var _f = React.useState([]), organisationsList = _f[0], setOrganisationList = _f[1];
|
16989
17300
|
var _g = React.useState([]), instrument = _g[0], setInstrument = _g[1];
|
16990
17301
|
var _h = React.useState(); _h[0]; var setStepOneData = _h[1];
|
17302
|
+
var userInfoState = useUserContext().userInfoState;
|
16991
17303
|
var instrumentOptions = Object.keys(exports.Instrument).map(function (k, index) { return ({
|
16992
17304
|
label: addSpaces(Object.values(exports.Instrument)[index]),
|
16993
17305
|
value: Object.values(exports.Instrument)[index],
|
@@ -17330,7 +17642,7 @@ var SupportCreationComponent = function (props) {
|
|
17330
17642
|
};
|
17331
17643
|
|
17332
17644
|
var SupportManagementComponent = function (props) {
|
17333
|
-
var translator = props.translator
|
17645
|
+
var translator = props.translator; props.onNavigateToProgrammeView; var enableAddSupport = props.enableAddSupport, onClickAddSupport = props.onClickAddSupport;
|
17334
17646
|
var t = translator.t;
|
17335
17647
|
var statusOptions = Object.keys(exports.InvestmentStatus).map(function (k, index) { return ({
|
17336
17648
|
label: addSpaces(Object.values(exports.InvestmentStatus)[index]),
|
@@ -17401,7 +17713,7 @@ var SupportManagementComponent = function (props) {
|
|
17401
17713
|
{
|
17402
17714
|
key: "programmeTitle",
|
17403
17715
|
operation: "like",
|
17404
|
-
value: "".concat(search, "%"),
|
17716
|
+
value: "%".concat(search, "%"),
|
17405
17717
|
},
|
17406
17718
|
];
|
17407
17719
|
if (!isNaN(Number(search))) {
|
@@ -17832,7 +18144,7 @@ var css_248z$k = ".ndc-management .ant-checkbox-checked .ant-checkbox-input[valu
|
|
17832
18144
|
styleInject(css_248z$k);
|
17833
18145
|
|
17834
18146
|
var NdcActionManagementComponent = function (props) {
|
17835
|
-
var t = props.t,
|
18147
|
+
var t = props.t, onNavigateToNdcManagementView = props.onNavigateToNdcManagementView, onNavigateToProgrammeManagementView = props.onNavigateToProgrammeManagementView;
|
17836
18148
|
var _a = React.useState(true), checkAll = _a[0], setCheckAll = _a[1];
|
17837
18149
|
var _b = React.useState([]), tableData = _b[0], setTableData = _b[1];
|
17838
18150
|
var _c = React.useState(), totalProgramme = _c[0], setTotalProgramme = _c[1];
|
@@ -17986,14 +18298,14 @@ var NdcActionManagementComponent = function (props) {
|
|
17986
18298
|
{
|
17987
18299
|
key: "programmeName",
|
17988
18300
|
operation: "like",
|
17989
|
-
value: "".concat(search, "%"),
|
18301
|
+
value: "%".concat(search, "%"),
|
17990
18302
|
},
|
17991
18303
|
];
|
17992
18304
|
if (!isNaN(Number(search))) {
|
17993
18305
|
interFilterOr.push({
|
17994
18306
|
key: "id",
|
17995
18307
|
operation: "like",
|
17996
|
-
value: "".concat(search),
|
18308
|
+
value: "%".concat(search, "%"),
|
17997
18309
|
});
|
17998
18310
|
}
|
17999
18311
|
filter.push({
|
@@ -21651,7 +21963,7 @@ var SocialEnvironmentalRisk = function (props) {
|
|
21651
21963
|
};
|
21652
21964
|
|
21653
21965
|
var CoBenifitsComponent = function (props) {
|
21654
|
-
var onClickedBackBtn = props.onClickedBackBtn, onFormSubmit = props.onFormSubmit, coBenefitsDetails = props.coBenefitsDetails, submitButtonText = props.submitButtonText, viewOnly = props.viewOnly, coBenifitsViewDetails = props.coBenifitsViewDetails, _a = props.loading, loading = _a === void 0 ? false : _a, sdgGoalImages = props.sdgGoalImages, translator = props.translator
|
21966
|
+
var onClickedBackBtn = props.onClickedBackBtn, onFormSubmit = props.onFormSubmit, coBenefitsDetails = props.coBenefitsDetails, submitButtonText = props.submitButtonText, viewOnly = props.viewOnly, coBenifitsViewDetails = props.coBenifitsViewDetails, _a = props.loading, loading = _a === void 0 ? false : _a, sdgGoalImages = props.sdgGoalImages, translator = props.translator;
|
21655
21967
|
var _b = React.useState(), coBenefitDetails = _b[0], setCoBenefitDetails = _b[1];
|
21656
21968
|
var _c = React.useState(true), isSocialFormValid = _c[0], setIsSocialFormValid = _c[1];
|
21657
21969
|
var _d = React.useState(true), isAssessmentFormValid = _d[0], setIsAssessmentFormValid = _d[1];
|
@@ -21725,7 +22037,7 @@ var CoBenifitsComponent = function (props) {
|
|
21725
22037
|
label: t("coBenifits:assessment"),
|
21726
22038
|
key: "7",
|
21727
22039
|
children: (React.createElement(Assessment, { onFormSubmit: onAssessmentFormSubmit, assessmentViewData: (viewOnly && (coBenifitsViewDetails === null || coBenifitsViewDetails === void 0 ? void 0 : coBenifitsViewDetails.assessmentDetails)) ||
|
21728
|
-
(!viewOnly && (coBenefitsDetails === null || coBenefitsDetails === void 0 ? void 0 : coBenefitsDetails.assessmentDetails)), viewOnly: viewOnly || false,
|
22040
|
+
(!viewOnly && (coBenefitsDetails === null || coBenefitsDetails === void 0 ? void 0 : coBenefitsDetails.assessmentDetails)), viewOnly: viewOnly || false, translator: translator })),
|
21729
22041
|
},
|
21730
22042
|
{
|
21731
22043
|
label: t("coBenifits:socialEnvironmentalRisk"),
|
@@ -21894,7 +22206,7 @@ var CoBenifitsComponent = function (props) {
|
|
21894
22206
|
};
|
21895
22207
|
|
21896
22208
|
var AddNdcActionComponent = function (props) {
|
21897
|
-
var
|
22209
|
+
var useLocation = props.useLocation, onNavigateToProgrammeManagementView = props.onNavigateToProgrammeManagementView, onNavigateToProgrammeView = props.onNavigateToProgrammeView, sdgGoalImages = props.sdgGoalImages, translator = props.translator;
|
21898
22210
|
translator.setDefaultNamespace("ndcAction");
|
21899
22211
|
var t = translator.t;
|
21900
22212
|
var _a = React.useState(1), current = _a[0], setCurrent = _a[1];
|
@@ -22036,7 +22348,7 @@ var AddNdcActionComponent = function (props) {
|
|
22036
22348
|
description: (React.createElement("div", { className: current !== 2 ? "hide" : "" },
|
22037
22349
|
React.createElement(CoBenifitsComponent, { onClickedBackBtn: onClickBackCoBenefits, coBenefitsDetails: ndcActionDetails ? ndcActionDetails.coBenefitsProperties : {}, onFormSubmit: onCoBenefitsSubmit, submitButtonText: isProjectReportsVisible()
|
22038
22350
|
? t("ndcAction:next")
|
22039
|
-
: t("ndcAction:submit"), loading: loading, sdgGoalImages: sdgGoalImages,
|
22351
|
+
: t("ndcAction:submit"), loading: loading, sdgGoalImages: sdgGoalImages, translator: translator }))),
|
22040
22352
|
},
|
22041
22353
|
];
|
22042
22354
|
if (isProjectReportsVisible()) {
|
@@ -22173,7 +22485,7 @@ var uploadDocUserPermission = function (userInfoState, docType, programmeOwnerId
|
|
22173
22485
|
var NdcActionViewComponent = function (props) {
|
22174
22486
|
var _a;
|
22175
22487
|
var _b, _c;
|
22176
|
-
var
|
22488
|
+
var useLocation = props.useLocation, onNavigateToNdcManagementView = props.onNavigateToNdcManagementView, translator = props.translator, sdgGoalImages = props.sdgGoalImages, Chart = props.Chart;
|
22177
22489
|
translator.setDefaultNamespace("ndcAction");
|
22178
22490
|
var t = translator.t;
|
22179
22491
|
var userInfoState = useUserContext().userInfoState;
|
@@ -22672,7 +22984,7 @@ var NdcActionViewComponent = function (props) {
|
|
22672
22984
|
React.createElement(antd.Card, { className: "card-container" },
|
22673
22985
|
React.createElement("div", { className: "co-benifits-view" },
|
22674
22986
|
React.createElement("div", { className: "title" }, t("ndcAction:coBenefitsSubTitle")),
|
22675
|
-
React.createElement(CoBenifitsComponent, { viewOnly: true, coBenifitsViewDetails: (_c = state === null || state === void 0 ? void 0 : state.record) === null || _c === void 0 ? void 0 : _c.coBenefitsProperties, sdgGoalImages: sdgGoalImages,
|
22987
|
+
React.createElement(CoBenifitsComponent, { viewOnly: true, coBenifitsViewDetails: (_c = state === null || state === void 0 ? void 0 : state.record) === null || _c === void 0 ? void 0 : _c.coBenefitsProperties, sdgGoalImages: sdgGoalImages, translator: translator })))))))));
|
22676
22988
|
};
|
22677
22989
|
|
22678
22990
|
var css_248z$e = ".credit-transfer-management .certify-list {\n width: 110px;\n display: flex;\n align-items: center;\n flex-wrap: wrap; }\n .credit-transfer-management .certify-list .profile-icon {\n margin-bottom: 4px; }\n\n.credit-transfer-management .table-actions-section {\n margin-bottom: 0px; }\n .credit-transfer-management .table-actions-section input {\n font-family: \"Inter\";\n font-size: 0.8rem; }\n\n.credit-transfer-management .all-check {\n margin-right: 10px; }\n .credit-transfer-management .all-check .ant-checkbox-inner::after {\n background-color: rgba(58, 53, 65, 0.5); }\n .credit-transfer-management .all-check .ant-checkbox-checked .ant-checkbox-inner::after {\n background-color: transparent; }\n .credit-transfer-management .all-check .ant-checkbox-checked .ant-checkbox-inner {\n background-color: rgba(58, 53, 65, 0.5);\n border: none; }\n\n.credit-transfer-management .ant-checkbox-checked .ant-checkbox-input[value='Retired'] + .ant-checkbox-inner {\n background-color: rgba(58, 53, 65, 0.4);\n border: none; }\n\n.credit-transfer-management .ant-checkbox-checked .ant-checkbox-input[value='AwaitingAuthorization'] + .ant-checkbox-inner {\n background-color: rgba(237, 77, 71, 0.6);\n border: none; }\n\n.credit-transfer-management .ant-checkbox-checked .ant-checkbox-input[value='Rejected'] + .ant-checkbox-inner {\n background-color: rgba(58, 53, 65, 0.4);\n border: none; }\n\n.credit-transfer-management .ant-checkbox-checked .ant-checkbox-input[value='Issued'] + .ant-checkbox-inner {\n background-color: #16b1ff;\n border: none; }\n\n.credit-transfer-management .ant-checkbox-checked .ant-checkbox-input[value='Transferred'] + .ant-checkbox-inner {\n background-color: rgba(118, 195, 39, 0.6);\n border: none; }\n\n.credit-transfer-modal-container {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n margin: 2rem 0 0 0;\n width: 100%; }\n .credit-transfer-modal-container .icon-credit {\n margin-bottom: 15px; }\n .credit-transfer-modal-container .credit-transfer-details {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n width: 100%;\n margin-bottom: 10px; }\n .credit-transfer-modal-container .credit-transfer-details .content-credit-transfer {\n font-family: 'Inter' !important;\n font-style: normal;\n font-weight: 600;\n font-size: 0.9rem;\n line-height: 1.3rem;\n padding: 0 1rem 0 1rem;\n text-align: center;\n color: rgba(58, 53, 65, 0.8) !important; }\n .credit-transfer-modal-container .credit-transfer-details .sub-content-credit-transfer {\n font-family: 'Inter';\n font-style: normal;\n font-weight: 600;\n font-size: 0.8rem;\n line-height: 1.375rem;\n text-align: center;\n color: rgba(58, 53, 65, 0.5); }\n .credit-transfer-modal-container .remarks-credit-transfer {\n flex-direction: row;\n width: 100%;\n padding: 0.5rem 1rem 0 1rem; }\n .credit-transfer-modal-container .remarks-credit-transfer .modal-form .ant-form-item-explain-error {\n display: flex;\n flex-direction: row; }\n .credit-transfer-modal-container .remarks-credit-transfer .modal-form .ant-form {\n width: 100%; }\n .credit-transfer-modal-container .remarks-credit-transfer .modal-form .ant-form .ant-form-item-label > label {\n font-size: 0.8rem; }\n .credit-transfer-modal-container .remarks-credit-transfer .modal-form .modal-credit-transfer-btns {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n width: 100%;\n margin-top: 1rem; }\n .credit-transfer-modal-container .remarks-credit-transfer .modal-form .modal-credit-transfer-btns .center {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between; }\n .credit-transfer-modal-container .remarks-credit-transfer .modal-form .modal-credit-transfer-btns .width-60 {\n width: 60%; }\n\n.common-table-class .ant-table .ant-table-thead .ant-table-cell {\n font-size: 0.75rem;\n font-weight: 600; }\n";
|
@@ -22825,7 +23137,7 @@ var TransferActionModel = function (props) {
|
|
22825
23137
|
};
|
22826
23138
|
|
22827
23139
|
var CreditTransferComponent = function (props) {
|
22828
|
-
var
|
23140
|
+
var translator = props.translator, onNavigateToProgrammeView = props.onNavigateToProgrammeView;
|
22829
23141
|
var userInfoState = useUserContext().userInfoState;
|
22830
23142
|
var t = translator.t;
|
22831
23143
|
var statusOptions = Object.keys(exports.CreditTransferStage).map(function (k, index) { return ({
|
@@ -22906,7 +23218,7 @@ var CreditTransferComponent = function (props) {
|
|
22906
23218
|
{
|
22907
23219
|
key: "programmeTitle",
|
22908
23220
|
operation: "like",
|
22909
|
-
value: "".concat(search, "%"),
|
23221
|
+
value: "%".concat(search, "%"),
|
22910
23222
|
},
|
22911
23223
|
];
|
22912
23224
|
if (!isNaN(Number(search))) {
|
@@ -23818,8 +24130,8 @@ var MapStatsComponent = function (props) {
|
|
23818
24130
|
|
23819
24131
|
var RangePicker$2 = antd.DatePicker.RangePicker;
|
23820
24132
|
var MrvDashboardComponent = function (props) {
|
23821
|
-
var
|
23822
|
-
var _b = useConnection(); _b.get; var post = _b.post; _b.delete;
|
24133
|
+
var Link = props.Link, Chart = props.Chart, t = props.t, ButtonGroup = props.ButtonGroup, _a = props.isMultipleDashboardsVisible, isMultipleDashboardsVisible = _a === void 0 ? false : _a;
|
24134
|
+
var _b = useConnection(); _b.get; var post = _b.post; _b.delete; var statServerUrl = _b.statServerUrl;
|
23823
24135
|
var _c = React.useState({}), data = _c[0], setData = _c[1];
|
23824
24136
|
var _e = React.useState(false), loading = _e[0], setLoading = _e[1];
|
23825
24137
|
var userInfoState = useUserContext().userInfoState;
|
@@ -24302,7 +24614,7 @@ var MrvDashboardComponent = function (props) {
|
|
24302
24614
|
_e.label = 1;
|
24303
24615
|
case 1:
|
24304
24616
|
_e.trys.push([1, 3, 4, 5]);
|
24305
|
-
return [4 /*yield*/, post("stats/programme/agg", genPayload(), undefined,
|
24617
|
+
return [4 /*yield*/, post("stats/programme/agg", genPayload(), undefined, statServerUrl)];
|
24306
24618
|
case 2:
|
24307
24619
|
response = _e.sent();
|
24308
24620
|
console.log("Response", response);
|
@@ -25243,19 +25555,215 @@ var optionDonutPieB = {
|
|
25243
25555
|
var css_248z$8 = ".stastic-card-main-container {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 11.2rem;\n background-color: white;\n border-radius: 0.625rem;\n padding: 1rem 1.875rem 0 1.875rem; }\n .stastic-card-main-container .title-section {\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n justify-content: space-between;\n height: 3.3rem; }\n .stastic-card-main-container .title-section .title {\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n justify-content: flex-start;\n font-family: 'Inter';\n font-size: 1.15rem;\n font-weight: 600;\n width: 95%;\n color: rgba(58, 53, 65, 0.8); }\n .stastic-card-main-container .title-section .info-container {\n display: flex;\n flex-direction: row;\n width: 5%;\n align-items: center;\n justify-content: flex-end; }\n .stastic-card-main-container .values-section {\n display: flex;\n flex-direction: row;\n width: 100%;\n align-items: flex-start;\n justify-content: space-between;\n height: 5rem; }\n .stastic-card-main-container .values-section .values-and-unit {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n justify-content: flex-start;\n width: 60%; }\n .stastic-card-main-container .values-section .values-and-unit .value {\n font-family: 'Inter';\n font-size: 2rem;\n font-weight: 600;\n width: 100%;\n color: #16b1ff;\n padding: 0; }\n .stastic-card-main-container .values-section .values-and-unit .unit {\n margin-bottom: -0.6rem;\n margin-left: 0.2rem;\n margin-top: -0.66rem;\n font-family: 'Inter';\n font-size: 0.875rem;\n font-weight: 500;\n width: 100%;\n color: rgba(58, 53, 65, 0.5); }\n .stastic-card-main-container .values-section .icon-section {\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n width: 40%;\n justify-content: flex-start; }\n .stastic-card-main-container .values-section .icon-section img {\n height: 80px; }\n .stastic-card-main-container .values-section .updated-on-null {\n display: flex;\n flex-direction: row;\n font-size: 0.813rem;\n border-radius: 3.125rem;\n padding: 0 0.5rem 0 0.5rem;\n margin-top: 1rem;\n color: transparent;\n background-color: transparent; }\n .stastic-card-main-container .updated-on {\n display: flex;\n flex-direction: row;\n font-size: 0.75rem;\n border-radius: 3.125rem;\n padding: 0.05rem 0.8rem 0.05rem 0.8rem;\n width: max-content;\n color: #16b1ff;\n background-color: rgba(185, 226, 244, 0.4); }\n\n.stastic-card-main-container:hover {\n box-shadow: rgba(0, 5, 18, 0.2) 0px 8px 24px; }\n";
|
25244
25556
|
styleInject(css_248z$8);
|
25245
25557
|
|
25558
|
+
var toolTipTextGen = function (companyRole, cardType, mine) {
|
25559
|
+
var text = '';
|
25560
|
+
if (companyRole === exports.CompanyRole.GOVERNMENT) {
|
25561
|
+
if (cardType === exports.StatsCardsTypes.PROGRAMMES_PENDING) {
|
25562
|
+
text = 'Pending state projects awaiting authorisation';
|
25563
|
+
}
|
25564
|
+
else if (cardType === exports.StatsCardsTypes.TRANSFER_REQUEST_SENT) {
|
25565
|
+
text =
|
25566
|
+
'Pending credit transfer requests sent to project owners initiated by your organisation';
|
25567
|
+
}
|
25568
|
+
else if (cardType === exports.StatsCardsTypes.CREDIT_BALANCE) {
|
25569
|
+
text = 'Total credit balance owned by your organisation';
|
25570
|
+
}
|
25571
|
+
else if (cardType === exports.StatsCardsTypes.PROGRAMMES) {
|
25572
|
+
text =
|
25573
|
+
'Number of projects created during the specified period and their project state in the carbon registry at present';
|
25574
|
+
}
|
25575
|
+
else if (cardType === exports.StatsCardsTypes.CREDITS) {
|
25576
|
+
text =
|
25577
|
+
'Number of credits of projects created during the specified period and their credit state in the carbon registry at present';
|
25578
|
+
}
|
25579
|
+
else if (cardType === exports.StatsCardsTypes.CERTIFIED_CREDITS) {
|
25580
|
+
text =
|
25581
|
+
'Number of credits of projects created during the specified period, uncertified, certified and revoked in the carbon registry at present';
|
25582
|
+
}
|
25583
|
+
else if (cardType === exports.StatsCardsTypes.TOTAL_PROGRAMMES) {
|
25584
|
+
text =
|
25585
|
+
'Graphical representation of the number of projects created during the specified period in each project state in the carbon registry at present';
|
25586
|
+
}
|
25587
|
+
else if (cardType === exports.StatsCardsTypes.TOTAL_PROGRAMMES_SECTOR) {
|
25588
|
+
text =
|
25589
|
+
'Graphical representation of the number of projects in each project sector created during the specified time in the carbon registry';
|
25590
|
+
}
|
25591
|
+
else if (cardType === exports.StatsCardsTypes.TOTAL_CREDITS) {
|
25592
|
+
text =
|
25593
|
+
'Graphical representation of the number of credits of projects created during the specified period in each credit state in the carbon registry at present';
|
25594
|
+
}
|
25595
|
+
else if (cardType === exports.StatsCardsTypes.TOTAL_CREDITS_CERTIFIED) {
|
25596
|
+
text =
|
25597
|
+
'Graphical representation of the number of credits of projects created during the specified period certified, uncertified and revoked in the carbon registry at present';
|
25598
|
+
}
|
25599
|
+
else if (cardType === exports.StatsCardsTypes.PROGRAMME_LOCATIONS) {
|
25600
|
+
text =
|
25601
|
+
'Locations of the projects created during the specified period and their project states in the carbon registry at present';
|
25602
|
+
}
|
25603
|
+
else if (cardType === exports.StatsCardsTypes.TRANSFER_LOCATIONS_INTERNATIONAL) {
|
25604
|
+
text =
|
25605
|
+
'Locations of credits of international transfer requests recognised during the specified period';
|
25606
|
+
}
|
25607
|
+
}
|
25608
|
+
else if (companyRole === exports.CompanyRole.PROGRAMME_DEVELOPER) {
|
25609
|
+
if (cardType === exports.StatsCardsTypes.TRANSFER_REQUEST_RECEIVED) {
|
25610
|
+
text = 'Pending credit transfer requests received by your organisation';
|
25611
|
+
}
|
25612
|
+
else if (cardType === exports.StatsCardsTypes.TRANSFER_REQUEST_SENT) {
|
25613
|
+
text = 'Pending local credit transfer requests initiated by your organisation';
|
25614
|
+
}
|
25615
|
+
else if (cardType === exports.StatsCardsTypes.CREDIT_BALANCE) {
|
25616
|
+
text = 'Total credit balance owned by your organisation';
|
25617
|
+
}
|
25618
|
+
else if (cardType === exports.StatsCardsTypes.PROGRAMMES) {
|
25619
|
+
text =
|
25620
|
+
'Number of projects created during the specified period and their project state in the carbon registry at present, owned by your organisation';
|
25621
|
+
}
|
25622
|
+
else if (cardType === exports.StatsCardsTypes.CREDITS) {
|
25623
|
+
text =
|
25624
|
+
'Number of credits of projects created during the specified period and their credit state in the carbon registry at present, owned by your organisation';
|
25625
|
+
}
|
25626
|
+
else if (cardType === exports.StatsCardsTypes.CERTIFIED_CREDITS) {
|
25627
|
+
text =
|
25628
|
+
'Number of credits of projects created during the specified period, uncertified, certified and revoked in the carbon registry at present, owned by your organisation';
|
25629
|
+
}
|
25630
|
+
else if (cardType === exports.StatsCardsTypes.TOTAL_PROGRAMMES) {
|
25631
|
+
text =
|
25632
|
+
'Graphical representation of the number of projects created during the specified period, owned by your organisation, in each project state in the carbon registry at present';
|
25633
|
+
}
|
25634
|
+
else if (cardType === exports.StatsCardsTypes.TOTAL_PROGRAMMES_SECTOR) {
|
25635
|
+
text =
|
25636
|
+
'Graphical representation of the number of projects owned by your organisation, in each project sector created during the specified time in the carbon registry';
|
25637
|
+
}
|
25638
|
+
else if (cardType === exports.StatsCardsTypes.TOTAL_CREDITS) {
|
25639
|
+
text =
|
25640
|
+
'Graphical representation of the number of credits of projects created during the specified period, owned by your organisation, in each credit state in the carbon registry at present';
|
25641
|
+
}
|
25642
|
+
else if (cardType === exports.StatsCardsTypes.TOTAL_CREDITS_CERTIFIED) {
|
25643
|
+
text =
|
25644
|
+
'Graphical representation of the number of credits of projects created during the specified period, owned by your organisation, certified, uncertified and revoked in the carbon registry at present';
|
25645
|
+
}
|
25646
|
+
else if (cardType === exports.StatsCardsTypes.PROGRAMME_LOCATIONS) {
|
25647
|
+
text =
|
25648
|
+
'Locations of the projects created during the specified period, owned by your organisation, and their project states in the carbon registry at present';
|
25649
|
+
}
|
25650
|
+
else if (cardType === exports.StatsCardsTypes.TRANSFER_LOCATIONS_INTERNATIONAL) {
|
25651
|
+
text =
|
25652
|
+
'Locations of credits international transfer requests of projects owned by your organisation recognised during the specified period';
|
25653
|
+
}
|
25654
|
+
}
|
25655
|
+
else if (companyRole === exports.CompanyRole.CERTIFIER && mine === true) {
|
25656
|
+
if (cardType === exports.StatsCardsTypes.PROGRAMMES_UNCERTIFIED) {
|
25657
|
+
text =
|
25658
|
+
'Number of projects not yet certified including certificates revoked by your organisation';
|
25659
|
+
}
|
25660
|
+
else if (cardType === exports.StatsCardsTypes.PROGRAMMES_CERTIFIED) {
|
25661
|
+
text = 'Number of projects certified by your organisation';
|
25662
|
+
}
|
25663
|
+
else if (cardType === exports.StatsCardsTypes.CREDIT_CERTIFIED) {
|
25664
|
+
text = 'Number of credits certified by your organisation';
|
25665
|
+
}
|
25666
|
+
else if (cardType === exports.StatsCardsTypes.PROGRAMMES) {
|
25667
|
+
text =
|
25668
|
+
'Number of projects created during the specified period, certified by your organisation, and their project state in the carbon registry at present';
|
25669
|
+
}
|
25670
|
+
else if (cardType === exports.StatsCardsTypes.CREDITS) {
|
25671
|
+
text =
|
25672
|
+
'Number of credits of projects created during the specified period, certified by your organisation and their credit state in the carbon registry at present';
|
25673
|
+
}
|
25674
|
+
else if (cardType === exports.StatsCardsTypes.CERTIFIED_CREDITS) {
|
25675
|
+
text =
|
25676
|
+
'Number of credits of projects created during the specified period, certified by your organisation, uncertified, certified and revoked in the carbon registry at present';
|
25677
|
+
}
|
25678
|
+
else if (cardType === exports.StatsCardsTypes.TOTAL_PROGRAMMES) {
|
25679
|
+
text =
|
25680
|
+
'Graphical representation of the number of projects in each project sector created during the specified time, certified by your company, in the carbon registry';
|
25681
|
+
}
|
25682
|
+
else if (cardType === exports.StatsCardsTypes.TOTAL_PROGRAMMES_SECTOR) {
|
25683
|
+
text =
|
25684
|
+
'Graphical representation of the number of projects in each project sector created during the specified time, certified by your company, in the carbon registry';
|
25685
|
+
}
|
25686
|
+
else if (cardType === exports.StatsCardsTypes.TOTAL_CREDITS) {
|
25687
|
+
text =
|
25688
|
+
'Graphical representation of the number of credits of projects created during the specified period in each credit state in the carbon registry at present';
|
25689
|
+
}
|
25690
|
+
else if (cardType === exports.StatsCardsTypes.TOTAL_CREDITS_CERTIFIED) {
|
25691
|
+
text =
|
25692
|
+
'Graphical representation of the number of credits of projects certified, uncertified and revoked (refer above for states), by your organisation, spread over the specified time';
|
25693
|
+
}
|
25694
|
+
else if (cardType === exports.StatsCardsTypes.PROGRAMME_LOCATIONS) {
|
25695
|
+
text =
|
25696
|
+
'Locations of the projects created during the specified period, certified by your organisation, and their project states in the carbon registry at present';
|
25697
|
+
}
|
25698
|
+
else if (cardType === exports.StatsCardsTypes.TRANSFER_LOCATIONS_INTERNATIONAL) {
|
25699
|
+
text =
|
25700
|
+
'Locations of credits of international transfer requests of projects certified by your organisation recognised during the specified period';
|
25701
|
+
}
|
25702
|
+
}
|
25703
|
+
else if (companyRole === exports.CompanyRole.CERTIFIER && !mine) {
|
25704
|
+
if (cardType === exports.StatsCardsTypes.PROGRAMMES_UNCERTIFIED) {
|
25705
|
+
text =
|
25706
|
+
'Number of projects not yet certified including certificates revoked by your organisation';
|
25707
|
+
}
|
25708
|
+
else if (cardType === exports.StatsCardsTypes.PROGRAMMES_CERTIFIED) {
|
25709
|
+
text = 'Number of projects certified by your organisation';
|
25710
|
+
}
|
25711
|
+
else if (cardType === exports.StatsCardsTypes.CREDIT_CERTIFIED) {
|
25712
|
+
text = 'Number of credits certified by your organisation';
|
25713
|
+
}
|
25714
|
+
else if (cardType === exports.StatsCardsTypes.PROGRAMMES) {
|
25715
|
+
text =
|
25716
|
+
'Number of projects created during the specified period and their project state in the carbon registry at present';
|
25717
|
+
}
|
25718
|
+
else if (cardType === exports.StatsCardsTypes.CREDITS) {
|
25719
|
+
text =
|
25720
|
+
'Number of credits of projects created during the specified period and their credit state in the carbon registry at present';
|
25721
|
+
}
|
25722
|
+
else if (cardType === exports.StatsCardsTypes.CERTIFIED_CREDITS) {
|
25723
|
+
text =
|
25724
|
+
'Number of credits of projects created during the specified period, uncertified, certified and revoked in the carbon registry at present';
|
25725
|
+
}
|
25726
|
+
else if (cardType === exports.StatsCardsTypes.TOTAL_PROGRAMMES) {
|
25727
|
+
text =
|
25728
|
+
'Graphical representation of the number of projects created during the specified period in each project state in the carbon registry at present';
|
25729
|
+
}
|
25730
|
+
else if (cardType === exports.StatsCardsTypes.TOTAL_PROGRAMMES_SECTOR) {
|
25731
|
+
text =
|
25732
|
+
'Graphical representation of the number of projects in each project sector created during the specified time in the carbon registry';
|
25733
|
+
}
|
25734
|
+
else if (cardType === exports.StatsCardsTypes.TOTAL_CREDITS) {
|
25735
|
+
text =
|
25736
|
+
'Graphical representation of the number of credits of projects created during the specified period in each credit state in the carbon registry at present';
|
25737
|
+
}
|
25738
|
+
else if (cardType === exports.StatsCardsTypes.TOTAL_CREDITS_CERTIFIED) {
|
25739
|
+
text =
|
25740
|
+
'Graphical representation of the number of credits of projects created during the specified period certified, uncertified and revoked in the carbon registry at present';
|
25741
|
+
}
|
25742
|
+
else if (cardType === exports.StatsCardsTypes.PROGRAMME_LOCATIONS) {
|
25743
|
+
text =
|
25744
|
+
'Locations of the projects created during the specified period and their project states in the carbon registry at present';
|
25745
|
+
}
|
25746
|
+
else if (cardType === exports.StatsCardsTypes.TRANSFER_LOCATIONS_INTERNATIONAL) {
|
25747
|
+
text =
|
25748
|
+
'Locations of credits of international transfer requests recognised during the specified period';
|
25749
|
+
}
|
25750
|
+
}
|
25751
|
+
return text;
|
25752
|
+
};
|
25753
|
+
|
25246
25754
|
var StasticCard = function (props) {
|
25247
|
-
var value = props.value, title = props.title, updatedDate = props.updatedDate, icon = props.icon, loading = props.loading
|
25755
|
+
var value = props.value, title = props.title, updatedDate = props.updatedDate, icon = props.icon, loading = props.loading, companyRole = props.companyRole;
|
25248
25756
|
return (React.createElement("div", { className: "stastic-card-main-container" }, loading ? (React.createElement(antd.Skeleton, { active: true })) : (React.createElement(React.Fragment, null,
|
25249
25757
|
React.createElement("div", { className: "title-section" },
|
25250
|
-
React.createElement("div", { className: "title" },
|
25758
|
+
React.createElement("div", { className: "title" }, title),
|
25251
25759
|
React.createElement("div", { className: "info-container" },
|
25252
|
-
React.createElement(antd.Tooltip, { arrowPointAtCenter: true, placement: "bottomRight", trigger: "hover", title:
|
25760
|
+
React.createElement(antd.Tooltip, { arrowPointAtCenter: true, placement: "bottomRight", trigger: "hover", title: toolTipTextGen(companyRole, title) },
|
25253
25761
|
React.createElement(Icon.InfoCircle, { color: "#000000", size: 17 })))),
|
25254
25762
|
React.createElement("div", { className: "values-section" },
|
25255
25763
|
React.createElement("div", { className: "values-and-unit" },
|
25256
|
-
title.includes(
|
25257
|
-
React.createElement("div", { className: "value" }, title.includes(
|
25258
|
-
? value === 0 || String(value) ===
|
25764
|
+
title.includes('Credit') && React.createElement("div", { className: "unit" }, "ITMOs"),
|
25765
|
+
React.createElement("div", { className: "value" }, title.includes('Credit')
|
25766
|
+
? value === 0 || String(value) === 'NaN'
|
25259
25767
|
? 0
|
25260
25768
|
: addCommSep(value)
|
25261
25769
|
: value)),
|
@@ -25357,8 +25865,8 @@ var RegistryBarChartsStatComponent = function (props) {
|
|
25357
25865
|
|
25358
25866
|
var RangePicker$1 = antd.DatePicker.RangePicker;
|
25359
25867
|
var RegistryDashboardComponent = function (props) {
|
25360
|
-
var
|
25361
|
-
var _b = useConnection(); _b.get; var post = _b.post; _b.delete;
|
25868
|
+
var Chart = props.Chart, t = props.t, ButtonGroup = props.ButtonGroup, Link = props.Link, _a = props.isMultipleDashboardsVisible, isMultipleDashboardsVisible = _a === void 0 ? false : _a;
|
25869
|
+
var _b = useConnection(); _b.get; var post = _b.post; _b.delete; var statServerUrl = _b.statServerUrl;
|
25362
25870
|
var userInfoState = useUserContext().userInfoState;
|
25363
25871
|
var _c = React.useState(false), loadingWithoutTimeRange = _c[0], setLoadingWithoutTimeRange = _c[1];
|
25364
25872
|
var _e = React.useState(false), loading = _e[0], setLoading = _e[1];
|
@@ -25805,7 +26313,7 @@ var RegistryDashboardComponent = function (props) {
|
|
25805
26313
|
_253.label = 1;
|
25806
26314
|
case 1:
|
25807
26315
|
_253.trys.push([1, 3, 4, 5]);
|
25808
|
-
return [4 /*yield*/, post("stats/programme/agg", getAllChartsParams(), undefined,
|
26316
|
+
return [4 /*yield*/, post("stats/programme/agg", getAllChartsParams(), undefined, statServerUrl)];
|
25809
26317
|
case 2:
|
25810
26318
|
response = _253.sent();
|
25811
26319
|
totalCreditsCertifiedStats = void 0;
|
@@ -26082,7 +26590,7 @@ var RegistryDashboardComponent = function (props) {
|
|
26082
26590
|
_77.label = 1;
|
26083
26591
|
case 1:
|
26084
26592
|
_77.trys.push([1, 3, 4, 5]);
|
26085
|
-
return [4 /*yield*/, post("stats/programme/agg", getAllProgrammeAnalyticsStatsParamsWithoutTimeRange(), undefined,
|
26593
|
+
return [4 /*yield*/, post("stats/programme/agg", getAllProgrammeAnalyticsStatsParamsWithoutTimeRange(), undefined, statServerUrl)];
|
26086
26594
|
case 2:
|
26087
26595
|
response = _77.sent();
|
26088
26596
|
programmeByStatusAggregationResponse = (_c = (_b = (_a = response === null || response === void 0 ? void 0 : response.data) === null || _a === void 0 ? void 0 : _a.stats) === null || _b === void 0 ? void 0 : _b.AGG_PROGRAMME_BY_STATUS) === null || _c === void 0 ? void 0 : _c.data;
|
@@ -26175,7 +26683,7 @@ var RegistryDashboardComponent = function (props) {
|
|
26175
26683
|
_188.label = 1;
|
26176
26684
|
case 1:
|
26177
26685
|
_188.trys.push([1, 3, 4, 5]);
|
26178
|
-
return [4 /*yield*/, post("stats/programme/agg", getAllProgrammeAnalyticsStatsParams(), undefined,
|
26686
|
+
return [4 /*yield*/, post("stats/programme/agg", getAllProgrammeAnalyticsStatsParams(), undefined, statServerUrl)];
|
26179
26687
|
case 2:
|
26180
26688
|
response = _188.sent();
|
26181
26689
|
programmeByStatusAuthAggregationResponse = void 0;
|
@@ -26861,69 +27369,54 @@ var RegistryDashboardComponent = function (props) {
|
|
26861
27369
|
: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
|
26862
27370
|
exports.CompanyRole.PROGRAMME_DEVELOPER
|
26863
27371
|
? transferRequestReceived
|
26864
|
-
: programmesUnCertifed, title: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT
|
27372
|
+
: programmesUnCertifed, title: t((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT
|
26865
27373
|
? "programmesPending"
|
26866
27374
|
: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
|
26867
27375
|
exports.CompanyRole.PROGRAMME_DEVELOPER
|
26868
27376
|
? "trasnferReqReceived"
|
26869
|
-
: "programmesUnCertified", updatedDate: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT
|
27377
|
+
: "programmesUnCertified"), updatedDate: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT
|
26870
27378
|
? lastUpdateProgrammesStats
|
26871
27379
|
: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
|
26872
27380
|
exports.CompanyRole.PROGRAMME_DEVELOPER
|
26873
27381
|
? lastUpdatePendingTransferReceived
|
26874
27382
|
: lastUpdateProgrammesCertifiable, icon: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT ? (React.createElement(Icon.ClockHistory, { color: "#16B1FF", size: 80 })) : (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
|
26875
|
-
exports.CompanyRole.PROGRAMME_DEVELOPER ? (React.createElement(Icon.BoxArrowInRight, { color: "#16B1FF", size: 80 })) : (React.createElement(Icon.ShieldX, { color: "#16B1FF", size: 80 })), loading: loadingWithoutTimeRange, companyRole: userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole
|
26876
|
-
? "tTprogrammespendingGoverment"
|
26877
|
-
: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
|
26878
|
-
exports.CompanyRole.PROGRAMME_DEVELOPER
|
26879
|
-
? "tTTransferReqRecProgrammeDev"
|
26880
|
-
: "tTProgrammesUnCertiCertifier"), t: t })),
|
27383
|
+
exports.CompanyRole.PROGRAMME_DEVELOPER ? (React.createElement(Icon.BoxArrowInRight, { color: "#16B1FF", size: 80 })) : (React.createElement(Icon.ShieldX, { color: "#16B1FF", size: 80 })), loading: loadingWithoutTimeRange, companyRole: userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole })),
|
26881
27384
|
React.createElement(antd.Col, { xxl: 8, xl: 8, md: 12, className: "stastic-card-col" },
|
26882
27385
|
React.createElement(StasticCard, { value: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT
|
26883
27386
|
? transferRequestSent
|
26884
27387
|
: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
|
26885
27388
|
exports.CompanyRole.PROGRAMME_DEVELOPER
|
26886
27389
|
? transferRequestSent
|
26887
|
-
: programmesCertifed, title: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT
|
27390
|
+
: programmesCertifed, title: t((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT
|
26888
27391
|
? "trasnferReqInit"
|
26889
27392
|
: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
|
26890
27393
|
exports.CompanyRole.PROGRAMME_DEVELOPER
|
26891
27394
|
? "trasnferReqInit"
|
26892
|
-
: "programmesCertified", updatedDate: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT
|
27395
|
+
: "programmesCertified"), updatedDate: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT
|
26893
27396
|
? lastUpdatePendingTransferSent
|
26894
27397
|
: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
|
26895
27398
|
exports.CompanyRole.PROGRAMME_DEVELOPER
|
26896
27399
|
? lastUpdatePendingTransferSent
|
26897
27400
|
: lastUpdateProgrammesCertified, icon: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT ? (React.createElement(Icon.BoxArrowRight, { color: "#16B1FF", size: 80 })) : (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
|
26898
|
-
exports.CompanyRole.PROGRAMME_DEVELOPER ? (React.createElement(Icon.BoxArrowRight, { color: "#16B1FF", size: 80 })) : (React.createElement(Icon.ShieldCheck, { color: "#16B1FF", size: 80 })), loading: loadingWithoutTimeRange, companyRole: userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole
|
26899
|
-
? "tTTransferReqSentGovernment"
|
26900
|
-
: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
|
26901
|
-
exports.CompanyRole.PROGRAMME_DEVELOPER
|
26902
|
-
? "tTTransferReqInitProgrammeDev"
|
26903
|
-
: "tTProgrammesCertiCertifier"), t: t })),
|
27401
|
+
exports.CompanyRole.PROGRAMME_DEVELOPER ? (React.createElement(Icon.BoxArrowRight, { color: "#16B1FF", size: 80 })) : (React.createElement(Icon.ShieldCheck, { color: "#16B1FF", size: 80 })), loading: loadingWithoutTimeRange, companyRole: userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole })),
|
26904
27402
|
React.createElement(antd.Col, { xxl: 8, xl: 8, md: 12, className: "stastic-card-col" },
|
26905
27403
|
React.createElement(StasticCard, { value: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT
|
26906
27404
|
? creditBalanceWithoutTimeRange
|
26907
27405
|
: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
|
26908
27406
|
exports.CompanyRole.PROGRAMME_DEVELOPER
|
26909
27407
|
? creditBalanceWithoutTimeRange
|
26910
|
-
: creditCertiedBalanceWithoutTimeRange, title: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT
|
27408
|
+
: creditCertiedBalanceWithoutTimeRange, title: t((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT
|
26911
27409
|
? "creditBal"
|
26912
27410
|
: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
|
26913
27411
|
exports.CompanyRole.PROGRAMME_DEVELOPER
|
26914
27412
|
? "creditBal"
|
26915
|
-
: "creditCertified", updatedDate: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT
|
27413
|
+
: "creditCertified"), updatedDate: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT
|
26916
27414
|
? lastUpdateCreditBalance
|
26917
27415
|
: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
|
26918
27416
|
exports.CompanyRole.PROGRAMME_DEVELOPER
|
26919
27417
|
? lastUpdateCreditBalance
|
26920
27418
|
: lastUpdateProgrammesCertified, icon: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT ? (React.createElement(Icon.Gem, { color: "#16B1FF", size: 80 })) : (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
|
26921
|
-
exports.CompanyRole.PROGRAMME_DEVELOPER ? (React.createElement(Icon.Gem, { color: "#16B1FF", size: 80 })) : (React.createElement(Icon.ShieldExclamation, { color: "#16B1FF", size: 80 })), loading: loadingWithoutTimeRange, companyRole: userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole
|
26922
|
-
? "tTCreditBalanceGovernment"
|
26923
|
-
: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
|
26924
|
-
exports.CompanyRole.PROGRAMME_DEVELOPER
|
26925
|
-
? "tTCreditBalanceProgrammeDev"
|
26926
|
-
: "tTCreditCertifiedCertifier"), t: t })))),
|
27419
|
+
exports.CompanyRole.PROGRAMME_DEVELOPER ? (React.createElement(Icon.Gem, { color: "#16B1FF", size: 80 })) : (React.createElement(Icon.ShieldExclamation, { color: "#16B1FF", size: 80 })), loading: loadingWithoutTimeRange, companyRole: userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole })))),
|
26927
27420
|
((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT ||
|
26928
27421
|
(userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.CERTIFIER ||
|
26929
27422
|
(userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.MINISTRY) &&
|
@@ -27171,7 +27664,7 @@ var getNdcActionStatusTagType = function (status) {
|
|
27171
27664
|
};
|
27172
27665
|
|
27173
27666
|
var NdcDetailsComponent = function (props) {
|
27174
|
-
var t = props.t
|
27667
|
+
var t = props.t;
|
27175
27668
|
var RangePicker = antd.DatePicker.RangePicker;
|
27176
27669
|
var _a = React.useState([]), ndcActionsList = _a[0], setNdcActionsList = _a[1];
|
27177
27670
|
var _b = React.useState(false), loading = _b[0], setLoading = _b[1];
|
@@ -28168,7 +28661,7 @@ var ProgrammeIssueForm = function (props) {
|
|
28168
28661
|
};
|
28169
28662
|
|
28170
28663
|
var ProgrammeRetireForm = function (props) {
|
28171
|
-
var programme = props.programme, onFinish = props.onFinish, onCancel = props.onCancel, actionBtnText = props.actionBtnText, subText = props.subText, hideType = props.hideType, myCompanyId = props.myCompanyId, translator = props.translator
|
28664
|
+
var programme = props.programme, onFinish = props.onFinish, onCancel = props.onCancel, actionBtnText = props.actionBtnText, subText = props.subText, hideType = props.hideType, myCompanyId = props.myCompanyId, translator = props.translator;
|
28172
28665
|
var t = translator.t;
|
28173
28666
|
var _a = React.useState(undefined), popupError = _a[0], setPopupError = _a[1];
|
28174
28667
|
var _b = React.useState(false), loading = _b[0], setLoading = _b[1];
|
@@ -28233,7 +28726,7 @@ var ProgrammeRetireForm = function (props) {
|
|
28233
28726
|
{
|
28234
28727
|
key: "name",
|
28235
28728
|
operation: "like",
|
28236
|
-
value: newValue.charAt(0).toUpperCase() + newValue.slice(1) + "%",
|
28729
|
+
value: "%" + newValue.charAt(0).toUpperCase() + newValue.slice(1) + "%",
|
28237
28730
|
},
|
28238
28731
|
],
|
28239
28732
|
sort: {
|
@@ -28544,7 +29037,7 @@ var ProgrammeRevokeForm = function (props) {
|
|
28544
29037
|
};
|
28545
29038
|
|
28546
29039
|
var ProgrammeTransferForm = function (props) {
|
28547
|
-
var programme = props.programme, onFinish = props.onFinish, onCancel = props.onCancel, actionBtnText = props.actionBtnText; props.subText; var toCompanyDefault = props.toCompanyDefault, disableToCompany = props.disableToCompany, receiverLabelText = props.receiverLabelText, userCompanyId = props.userCompanyId, companyRole = props.companyRole, translator = props.translator,
|
29040
|
+
var programme = props.programme, onFinish = props.onFinish, onCancel = props.onCancel, actionBtnText = props.actionBtnText; props.subText; var toCompanyDefault = props.toCompanyDefault, disableToCompany = props.disableToCompany, receiverLabelText = props.receiverLabelText, userCompanyId = props.userCompanyId, companyRole = props.companyRole, translator = props.translator, _a = props.ministryLevelPermission, ministryLevelPermission = _a === void 0 ? false : _a;
|
28548
29041
|
var t = translator.t;
|
28549
29042
|
var _b = React.useState(undefined), popupError = _b[0], setPopupError = _b[1];
|
28550
29043
|
var _c = React.useState(false), loading = _c[0], setLoading = _c[1];
|
@@ -28565,7 +29058,7 @@ var ProgrammeTransferForm = function (props) {
|
|
28565
29058
|
{
|
28566
29059
|
key: "name",
|
28567
29060
|
operation: "like",
|
28568
|
-
value: newValue + "%",
|
29061
|
+
value: "%" + newValue + "%",
|
28569
29062
|
},
|
28570
29063
|
{
|
28571
29064
|
key: "companyRole",
|
@@ -28775,7 +29268,7 @@ var css_248z$5 = ".ndc-action-body {\n display: flex;\n flex-direction: column
|
|
28775
29268
|
styleInject(css_248z$5);
|
28776
29269
|
|
28777
29270
|
var NdcActionBody = function (props) {
|
28778
|
-
var data = props.data, programmeId = props.programmeId, canUploadMonitorReport = props.canUploadMonitorReport, programmeOwnerId = props.programmeOwnerId, getProgrammeDocs = props.getProgrammeDocs, ministryLevelPermission = props.ministryLevelPermission,
|
29271
|
+
var data = props.data, programmeId = props.programmeId, canUploadMonitorReport = props.canUploadMonitorReport, programmeOwnerId = props.programmeOwnerId, getProgrammeDocs = props.getProgrammeDocs, ministryLevelPermission = props.ministryLevelPermission, translator = props.translator, onFinish = props.onFinish, programme = props.programme;
|
28779
29272
|
var t = translator.t;
|
28780
29273
|
var userInfoState = useUserContext().userInfoState;
|
28781
29274
|
var fileInputMonitoringRef = React.useRef(null);
|
@@ -29211,7 +29704,7 @@ var css_248z$4 = ".info-view .title-icon {\n padding-right: 10px; }\n\n.info-vi
|
|
29211
29704
|
styleInject(css_248z$4);
|
29212
29705
|
|
29213
29706
|
var ProgrammeDocuments = function (props) {
|
29214
|
-
var data = props.data, title = props.title, icon = props.icon, programmeId = props.programmeId, programmeOwnerId = props.programmeOwnerId, getDocumentDetails = props.getDocumentDetails, getProgrammeById = props.getProgrammeById, ministryLevelPermission = props.ministryLevelPermission,
|
29707
|
+
var data = props.data, title = props.title, icon = props.icon, programmeId = props.programmeId, programmeOwnerId = props.programmeOwnerId, getDocumentDetails = props.getDocumentDetails, getProgrammeById = props.getProgrammeById, ministryLevelPermission = props.ministryLevelPermission, translator = props.translator, methodologyDocumentUpdated = props.methodologyDocumentUpdated, programmeStatus = props.programmeStatus;
|
29215
29708
|
var t = translator.t;
|
29216
29709
|
var userInfoState = useUserContext().userInfoState;
|
29217
29710
|
var _a = useConnection(); _a.delete; var post = _a.post;
|
@@ -30162,7 +30655,7 @@ var GHGUserActionConfirmationModel = function (props) {
|
|
30162
30655
|
};
|
30163
30656
|
|
30164
30657
|
var GHGEmissionsComponent = function (props) {
|
30165
|
-
var t = props.t
|
30658
|
+
var t = props.t;
|
30166
30659
|
var userInfoState = useUserContext().userInfoState;
|
30167
30660
|
var _a = React.useState([]), data = _a[0], setData = _a[1];
|
30168
30661
|
var _b = useConnection(), get = _b.get, post = _b.post;
|
@@ -32079,7 +32572,7 @@ var ProjectionTypes = {
|
|
32079
32572
|
};
|
32080
32573
|
|
32081
32574
|
var GHGProjectionsComponent = function (props) {
|
32082
|
-
var t = props.t
|
32575
|
+
var t = props.t;
|
32083
32576
|
var userInfoState = useUserContext().userInfoState;
|
32084
32577
|
var _a = React.useState([]), data = _a[0], setData = _a[1];
|
32085
32578
|
var _b = useConnection(); _b.put; var get = _b.get, post = _b.post;
|
@@ -34260,7 +34753,7 @@ var emissionComparisonOptionsSub = function (labels, chartColors) {
|
|
34260
34753
|
|
34261
34754
|
var RangePicker = antd.DatePicker.RangePicker;
|
34262
34755
|
var GHGDashboardComponent = function (props) {
|
34263
|
-
var t = props.t,
|
34756
|
+
var t = props.t, Chart = props.Chart, ButtonGroup = props.ButtonGroup, Link = props.Link, isMultipleDashboardsVisible = props.isMultipleDashboardsVisible;
|
34264
34757
|
var _a = useConnection(); _a.get; var post = _a.post; _a.delete;
|
34265
34758
|
var userInfoState = useUserContext().userInfoState;
|
34266
34759
|
var _b = React.useState(moment().year()), endYear = _b[0], setEndYear = _b[1];
|
@@ -34651,6 +35144,7 @@ exports.CoBenifitsComponent = CoBenifitsComponent;
|
|
34651
35144
|
exports.Company = Company;
|
34652
35145
|
exports.CompanyManagementComponent = CompanyManagementComponent;
|
34653
35146
|
exports.CompanyProfileComponent = CompanyProfileComponent;
|
35147
|
+
exports.ConnectionContextProvider = ConnectionContextProvider;
|
34654
35148
|
exports.CreditTransferComponent = CreditTransferComponent;
|
34655
35149
|
exports.DevBGColor = DevBGColor;
|
34656
35150
|
exports.DevColor = DevColor;
|
@@ -34698,6 +35192,8 @@ exports.RejectDocumentationConfirmationModel = RejectDocumentationConfirmationMo
|
|
34698
35192
|
exports.RoleIcon = RoleIcon;
|
34699
35193
|
exports.RootBGColor = RootBGColor;
|
34700
35194
|
exports.RootColor = RootColor;
|
35195
|
+
exports.SettingsContext = SettingsContext;
|
35196
|
+
exports.SettingsContextProvider = SettingsContextProvider;
|
34701
35197
|
exports.StasticCard = StasticCard;
|
34702
35198
|
exports.SupportCreationComponent = SupportCreationComponent;
|
34703
35199
|
exports.SupportManagementComponent = SupportManagementComponent;
|
@@ -34706,6 +35202,8 @@ exports.TooltipColor = TooltipColor;
|
|
34706
35202
|
exports.TransferActionModel = TransferActionModel;
|
34707
35203
|
exports.UnitField = UnitField;
|
34708
35204
|
exports.User = User;
|
35205
|
+
exports.UserContext = UserContext;
|
35206
|
+
exports.UserInformationContextProvider = UserInformationContextProvider;
|
34709
35207
|
exports.UserManagementComponent = UserManagementComponent;
|
34710
35208
|
exports.UserProfileComponent = UserProfileComponent;
|
34711
35209
|
exports.UserRoleIcon = UserRoleIcon;
|
@@ -34747,4 +35245,7 @@ exports.ndcActionTypeList = ndcActionTypeList;
|
|
34747
35245
|
exports.sectorMitigationTypesListMapped = sectorMitigationTypesListMapped;
|
34748
35246
|
exports.sumArray = sumArray;
|
34749
35247
|
exports.titleList = titleList;
|
35248
|
+
exports.useConnection = useConnection;
|
35249
|
+
exports.useSettingsContext = useSettingsContext;
|
35250
|
+
exports.useUserContext = useUserContext;
|
34750
35251
|
//# sourceMappingURL=index.js.map
|