@undp/carbon-library 1.0.289-CARBON-347.1 → 1.0.289-CARBON-366.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. package/dist/cjs/index.js +556 -1477
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/types/Components/Common/CoBenifits/coBenifits.d.ts +1 -0
  4. package/dist/cjs/types/Components/Common/Models/programmeRetireForm.d.ts +1 -0
  5. package/dist/cjs/types/Components/Common/Models/programmeTransferForm.d.ts +1 -0
  6. package/dist/cjs/types/Components/Common/NdcActionBody/ndcActionBody.d.ts +2 -0
  7. package/dist/cjs/types/Components/Common/ProgrammeDocuments/programmeDocuments.d.ts +2 -0
  8. package/dist/cjs/types/Components/Common/StasticCard/stasticCard.d.ts +2 -0
  9. package/dist/cjs/types/Definitions/Definitions/connectionContext.definitions.d.ts +0 -3
  10. package/dist/cjs/types/Definitions/Enums/investment.enum.d.ts +0 -4
  11. package/dist/cjs/types/index.d.ts +0 -1
  12. package/dist/esm/index.js +558 -1471
  13. package/dist/esm/index.js.map +1 -1
  14. package/dist/esm/types/Components/Common/CoBenifits/coBenifits.d.ts +1 -0
  15. package/dist/esm/types/Components/Common/Models/programmeRetireForm.d.ts +1 -0
  16. package/dist/esm/types/Components/Common/Models/programmeTransferForm.d.ts +1 -0
  17. package/dist/esm/types/Components/Common/NdcActionBody/ndcActionBody.d.ts +2 -0
  18. package/dist/esm/types/Components/Common/ProgrammeDocuments/programmeDocuments.d.ts +2 -0
  19. package/dist/esm/types/Components/Common/StasticCard/stasticCard.d.ts +2 -0
  20. package/dist/esm/types/Definitions/Definitions/connectionContext.definitions.d.ts +0 -3
  21. package/dist/esm/types/Definitions/Enums/investment.enum.d.ts +0 -4
  22. package/dist/esm/types/index.d.ts +0 -1
  23. package/dist/index.d.ts +10 -27
  24. package/dist/locales/i18n/programme/en.json +3 -5
  25. package/package.json +2 -29
  26. package/dist/cjs/types/Context/ConnectionContext/connectionContext.d.ts +0 -8
  27. package/dist/cjs/types/Context/SettingsContext/settingsContext.d.ts +0 -10
  28. package/dist/cjs/types/Context/UserInformationContext/userInformationContext.d.ts +0 -6
  29. package/dist/cjs/types/Context/index.d.ts +0 -3
  30. package/dist/cjs/types/Storybook/AddNewCompanyComponent.stories.d.ts +0 -12
  31. package/dist/cjs/types/Storybook/AddNewUserComponent.stories.d.ts +0 -12
  32. package/dist/cjs/types/Storybook/Decorators/AddNewCompanyI18nDecorator.d.ts +0 -2
  33. package/dist/cjs/types/Storybook/Decorators/AddNewUserI18nDecorator.d.ts +0 -2
  34. package/dist/cjs/types/Storybook/Decorators/ConnectionContextDecorator.d.ts +0 -2
  35. package/dist/cjs/types/Storybook/Decorators/DashboardI18nDecorator.d.ts +0 -2
  36. package/dist/cjs/types/Storybook/Decorators/InvestmentCreationI18nDecorator.d.ts +0 -2
  37. package/dist/cjs/types/Storybook/Decorators/ProgrammeCreateI18nDecorator.d.ts +0 -2
  38. package/dist/cjs/types/Storybook/InvestmentCreationComponent.stories.d.ts +0 -12
  39. package/dist/cjs/types/Storybook/MRVDashboard.stories.d.ts +0 -12
  40. package/dist/cjs/types/Storybook/ProgrammeCreationComponent.stories.d.ts +0 -12
  41. package/dist/cjs/types/Storybook/RegistryDashboard.stories.d.ts +0 -12
  42. package/dist/esm/types/Context/ConnectionContext/connectionContext.d.ts +0 -8
  43. package/dist/esm/types/Context/SettingsContext/settingsContext.d.ts +0 -10
  44. package/dist/esm/types/Context/UserInformationContext/userInformationContext.d.ts +0 -6
  45. package/dist/esm/types/Context/index.d.ts +0 -3
  46. package/dist/esm/types/Storybook/AddNewCompanyComponent.stories.d.ts +0 -12
  47. package/dist/esm/types/Storybook/AddNewUserComponent.stories.d.ts +0 -12
  48. package/dist/esm/types/Storybook/Decorators/AddNewCompanyI18nDecorator.d.ts +0 -2
  49. package/dist/esm/types/Storybook/Decorators/AddNewUserI18nDecorator.d.ts +0 -2
  50. package/dist/esm/types/Storybook/Decorators/ConnectionContextDecorator.d.ts +0 -2
  51. package/dist/esm/types/Storybook/Decorators/DashboardI18nDecorator.d.ts +0 -2
  52. package/dist/esm/types/Storybook/Decorators/InvestmentCreationI18nDecorator.d.ts +0 -2
  53. package/dist/esm/types/Storybook/Decorators/ProgrammeCreateI18nDecorator.d.ts +0 -2
  54. package/dist/esm/types/Storybook/InvestmentCreationComponent.stories.d.ts +0 -12
  55. package/dist/esm/types/Storybook/MRVDashboard.stories.d.ts +0 -12
  56. package/dist/esm/types/Storybook/ProgrammeCreationComponent.stories.d.ts +0 -12
  57. package/dist/esm/types/Storybook/RegistryDashboard.stories.d.ts +0 -12
package/dist/cjs/index.js CHANGED
@@ -5,7 +5,6 @@ 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');
9
8
  var PhoneInput = require('react-phone-number-input');
10
9
  var validator = require('validator');
11
10
  var classTransformer = require('class-transformer');
@@ -15,6 +14,7 @@ var mapboxgl = require('mapbox-gl');
15
14
  require('mapbox-gl/dist/mapbox-gl.css');
16
15
  require('antd/dist/antd.css');
17
16
  var XLSX = require('xlsx');
17
+ var axios = require('axios');
18
18
 
19
19
  function _interopNamespaceDefault(e) {
20
20
  var n = Object.create(null);
@@ -513,317 +513,9 @@ 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
-
824
516
  var Search$2 = antd.Input.Search;
825
517
  var CompanyManagementComponent = function (props) {
826
- var t = props.t, useAbilityContext = props.useAbilityContext, visibleColumns = props.visibleColumns, onNavigateToCompanyProfile = props.onNavigateToCompanyProfile, onClickAddCompany = props.onClickAddCompany;
518
+ var t = props.t, useAbilityContext = props.useAbilityContext, post = props.post, visibleColumns = props.visibleColumns, onNavigateToCompanyProfile = props.onNavigateToCompanyProfile, onClickAddCompany = props.onClickAddCompany;
827
519
  var _a = React.useState(), totalCompany = _a[0], setTotalCompany = _a[1];
828
520
  var _b = React.useState(false), loading = _b[0], setLoading = _b[1];
829
521
  var _c = React.useState([]), tableData = _c[0], setTableData = _c[1];
@@ -838,7 +530,6 @@ var CompanyManagementComponent = function (props) {
838
530
  var _l = React.useState(""), sortField = _l[0], setSortField = _l[1];
839
531
  var _m = React.useState(), dataQuery = _m[0], setDataQuery = _m[1];
840
532
  var ability = useAbilityContext();
841
- var post = useConnection().post;
842
533
  document.addEventListener("mousedown", function (event) {
843
534
  var organisationFilterArea1 = document.querySelector(".filter-bar");
844
535
  var organisationFilterArea2 = document.querySelector(".filter-dropdown");
@@ -1226,7 +917,7 @@ var CompanyManagementComponent = function (props) {
1226
917
  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";
1227
918
  styleInject(css_248z$w);
1228
919
 
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";
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";
1230
921
  styleInject(css_248z$v);
1231
922
 
1232
923
  exports.UserManagementColumns = void 0;
@@ -1298,11 +989,6 @@ exports.InvestmentCreationType = void 0;
1298
989
  InvestmentCreationType["EXISTING"] = "Existing";
1299
990
  InvestmentCreationType["NEW"] = "New";
1300
991
  })(exports.InvestmentCreationType || (exports.InvestmentCreationType = {}));
1301
- exports.InvestmentOwnershipType = void 0;
1302
- (function (InvestmentOwnershipType) {
1303
- InvestmentOwnershipType["PROJECT"] = "Project";
1304
- InvestmentOwnershipType["NATIONAL"] = "National";
1305
- })(exports.InvestmentOwnershipType || (exports.InvestmentOwnershipType = {}));
1306
992
  exports.InvestmentStream = void 0;
1307
993
  (function (InvestmentStream) {
1308
994
  InvestmentStream["CLIMATE_FINANCE"] = "ClimateFinance";
@@ -6200,7 +5886,7 @@ var Projection = /** @class */ (function () {
6200
5886
 
6201
5887
  var AddNewCompanyComponent = function (props) {
6202
5888
  var _a;
6203
- 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;
5889
+ var t = props.t, onNavigateToCompanyManagement = props.onNavigateToCompanyManagement, maximumImageSize = props.maximumImageSize, useConnection = props.useConnection, useUserContext = props.useUserContext, useLocation = props.useLocation, regionField = props.regionField, isGuest = props.isGuest, onNavigateToHome = props.onNavigateToHome, systemType = props.systemType;
6204
5890
  var formOne = antd.Form.useForm()[0];
6205
5891
  var formTwo = antd.Form.useForm()[0];
6206
5892
  var _b = React.useState(), stepOneData = _b[0], setStepOneData = _b[1];
@@ -7086,7 +6772,7 @@ var CompanyDetailsComponent = function (props) {
7086
6772
  };
7087
6773
 
7088
6774
  var CompanyProfileComponent = function (props) {
7089
- var t = props.t, useAbilityContext = props.useAbilityContext, useLocation = props.useLocation, onNavigateToCompanyManagement = props.onNavigateToCompanyManagement, onNavigateToCompanyEdit = props.onNavigateToCompanyEdit; props.regionField; var systemType = props.systemType;
6775
+ var t = props.t, useAbilityContext = props.useAbilityContext, useLocation = props.useLocation, useConnection = props.useConnection, onNavigateToCompanyManagement = props.onNavigateToCompanyManagement, onNavigateToCompanyEdit = props.onNavigateToCompanyEdit; props.regionField; var systemType = props.systemType;
7090
6776
  var _a = useConnection(), get = _a.get, put = _a.put, post = _a.post;
7091
6777
  var _b = React.useState(undefined), companyDetails = _b[0], setCompanyDetails = _b[1];
7092
6778
  var _c = React.useState(undefined), userDetails = _c[0], setUserDetails = _c[1];
@@ -7430,7 +7116,7 @@ styleInject(css_248z$s);
7430
7116
 
7431
7117
  var Search$1 = antd.Input.Search;
7432
7118
  var ProgrammeManagementComponent = function (props) {
7433
- var t = props.t, visibleColumns = props.visibleColumns, onNavigateToProgrammeView = props.onNavigateToProgrammeView, onClickAddProgramme = props.onClickAddProgramme, enableAddProgramme = props.enableAddProgramme, useAbilityContext = props.useAbilityContext;
7119
+ var t = props.t, visibleColumns = props.visibleColumns, useUserContext = props.useUserContext, useConnection = props.useConnection, onNavigateToProgrammeView = props.onNavigateToProgrammeView, onClickAddProgramme = props.onClickAddProgramme, enableAddProgramme = props.enableAddProgramme, useAbilityContext = props.useAbilityContext;
7434
7120
  var _a = useConnection(); _a.get; _a.delete; var post = _a.post;
7435
7121
  var _b = React.useState(), totalProgramme = _b[0], setTotalProgramme = _b[1];
7436
7122
  var _c = React.useState(false), loading = _c[0], setLoading = _c[1];
@@ -7865,7 +7551,7 @@ var ProgrammeManagementComponent = function (props) {
7865
7551
  React.createElement("div", { className: "filter-section" },
7866
7552
  React.createElement("div", { className: "search-filter" },
7867
7553
  React.createElement(antd.Checkbox, { className: "label", onChange: function (v) {
7868
- if ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.MINISTRY) {
7554
+ if (userInfoState.companyRole === exports.CompanyRole.MINISTRY) {
7869
7555
  if (v.target.checked) {
7870
7556
  setMinistryLevelFilter(true);
7871
7557
  }
@@ -7882,7 +7568,7 @@ var ProgrammeManagementComponent = function (props) {
7882
7568
  }
7883
7569
  : undefined);
7884
7570
  }
7885
- } }, (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.MINISTRY
7571
+ } }, userInfoState.companyRole === exports.CompanyRole.MINISTRY
7886
7572
  ? t("view:ministryLevel")
7887
7573
  : t("view:seeMine"))),
7888
7574
  React.createElement("div", { className: "search-bar" },
@@ -13669,7 +13355,7 @@ var sectoralScopes = {
13669
13355
  };
13670
13356
  var ProgrammeCreationComponent = function (props) {
13671
13357
  var _a, _b, _c;
13672
- var useLocation = props.useLocation, onNavigateToProgrammeView = props.onNavigateToProgrammeView, translator = props.translator;
13358
+ var useUserContext = props.useUserContext, useConnection = props.useConnection, useLocation = props.useLocation, onNavigateToProgrammeView = props.onNavigateToProgrammeView, translator = props.translator;
13673
13359
  var t = translator.t;
13674
13360
  var state = useLocation().state;
13675
13361
  var formOne = antd.Form.useForm()[0];
@@ -14734,7 +14420,7 @@ var ChangePasswordModel = function (props) {
14734
14420
 
14735
14421
  var AddNewUserComponent = function (props) {
14736
14422
  var _a, _b, _c, _d, _e, _f;
14737
- var t = props.t, onNavigateToUserManagement = props.onNavigateToUserManagement, onNavigateLogin = props.onNavigateLogin, useLocation = props.useLocation, useAbilityContext = props.useAbilityContext, themeColor = props.themeColor;
14423
+ var t = props.t, onNavigateToUserManagement = props.onNavigateToUserManagement, onNavigateLogin = props.onNavigateLogin, useConnection = props.useConnection, useUserContext = props.useUserContext, useLocation = props.useLocation, useAbilityContext = props.useAbilityContext, themeColor = props.themeColor;
14738
14424
  var _g = useConnection(), post = _g.post, put = _g.put, del = _g.delete, get = _g.get;
14739
14425
  var formOne = antd.Form.useForm()[0];
14740
14426
  var state = useLocation().state;
@@ -15152,7 +14838,7 @@ var LanguageSelection = function (props) {
15152
14838
  };
15153
14839
 
15154
14840
  var UserProfileComponent = function (props) {
15155
- var t = props.t, i18n = props.i18n, onNavigateUpdateUser = props.onNavigateUpdateUser, onNavigateLogin = props.onNavigateLogin;
14841
+ var t = props.t, i18n = props.i18n, useConnection = props.useConnection, onNavigateUpdateUser = props.onNavigateUpdateUser, onNavigateLogin = props.onNavigateLogin, useUserContext = props.useUserContext;
15156
14842
  var get = useConnection().get;
15157
14843
  var _a = React.useState(undefined), organisationDetails = _a[0], setOrganisationDetails = _a[1];
15158
14844
  var _b = React.useState(undefined), userDetails = _b[0], setUserDetails = _b[1];
@@ -15244,7 +14930,7 @@ styleInject(css_248z$n);
15244
14930
 
15245
14931
  var Search = antd.Input.Search;
15246
14932
  var UserManagementComponent = function (props) {
15247
- var t = props.t, useAbilityContext = props.useAbilityContext, visibleColumns = props.visibleColumns, onNavigateToUpdateUser = props.onNavigateToUpdateUser, onClickAddUser = props.onClickAddUser;
14933
+ var t = props.t, useAbilityContext = props.useAbilityContext, useConnection = props.useConnection, visibleColumns = props.visibleColumns, onNavigateToUpdateUser = props.onNavigateToUpdateUser, onClickAddUser = props.onClickAddUser, userInfoState = props.userInfoState;
15248
14934
  antd.Form.useForm()[0];
15249
14935
  var _a = useConnection(), post = _a.post, del = _a.delete;
15250
14936
  var _b = React.useState(), totalUser = _b[0], setTotalUser = _b[1];
@@ -15267,7 +14953,6 @@ var UserManagementComponent = function (props) {
15267
14953
  var _t = React.useState(false), openDeleteConfirmationModal = _t[0], setOpenDeleteConfirmationModal = _t[1];
15268
14954
  var _u = React.useState(), dataQuery = _u[0], setDataQuery = _u[1];
15269
14955
  var ability = useAbilityContext();
15270
- var userInfoState = useUserContext().userInfoState;
15271
14956
  document.addEventListener("mousedown", function (event) {
15272
14957
  var userFilterArea1 = document.querySelector(".filter-bar");
15273
14958
  var userFilterArea2 = document.querySelector(".filter-dropdown");
@@ -15835,7 +15520,7 @@ var UserManagementComponent = function (props) {
15835
15520
  React.createElement(UserActionConfirmationModel, { t: t, actionInfo: actionInfo, onActionConfirmed: handleOk, onActionCanceled: handleCancel, openModal: openDeleteConfirmationModal, errorMsg: errorMsg, loading: loading })));
15836
15521
  };
15837
15522
 
15838
- var css_248z$m = ".steps-actions {\n display: flex;\n flex-direction: row-reverse;\n margin-right: 1rem;\n justify-content: flex-start; }\n\n.details-part-two .ant-input-number {\n width: 50%;\n margin-left: 15px; }\n\n.investment-title-bar {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n padding: 0px 0px 30px 0px; }\n .investment-title-bar .title {\n display: flex;\n flex-direction: column;\n justify-content: space-between; }\n .investment-title-bar .actions {\n display: flex;\n align-items: center;\n justify-content: flex-end; }\n .investment-title-bar .flex-display {\n margin-left: 15px; }\n\n.ownership-container {\n padding: 15px 0px; }\n .ownership-container .label {\n color: rgba(58, 53, 65, 0.5); }\n\n.separator {\n padding: 5px;\n color: #d8d8d8; }\n\n.role-group .ant-col-13 {\n max-width: 320px; }\n\n.role-group .condition-radio-container {\n width: 48%;\n text-align: center; }\n .role-group .condition-radio-container .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled) {\n color: #ffffff !important;\n border-color: #9155fd !important;\n box-shadow: none;\n max-width: 200px; }\n\n.role-group .ant-radio-button-wrapper::before {\n background-color: transparent; }\n\n.role-group .anticon {\n margin-right: 0.5rem; }\n\n.role-group .ant-radio-button-wrapper {\n border: 1px solid #d9d9d9;\n color: rgba(140, 140, 140, 0.7) !important;\n width: 100% !important; }\n\n.role-group .condition-radio {\n width: 100%;\n text-transform: uppercase; }\n .role-group .condition-radio .ant-radio-button-checked {\n background: #9155fd;\n color: #ffffff; }\n\n.role-group .role-icons {\n margin-right: 5px; }\n\n.investment-management .role-icon {\n padding: 0.5rem 0.6rem; }\n\n.investment-management .ant-tag {\n border: none; }\n\n.investment-management .ant-checkbox-checked .ant-checkbox-input[value=\"Rejected\"] + .ant-checkbox-inner {\n background-color: rgba(237, 77, 71, 0.6);\n border: none; }\n\n.investment-management .ant-checkbox-checked .ant-checkbox-input[value=\"Cancelled\"] + .ant-checkbox-inner {\n background-color: rgba(58, 53, 65, 0.4);\n border: none; }\n\n.investment-management .ant-checkbox-checked .ant-checkbox-input[value=\"Accepted\"] + .ant-checkbox-inner {\n background-color: #16b1ff;\n border: none; }\n\n.investment-management .ant-checkbox-checked .ant-checkbox-input[value=\"Pending\"] + .ant-checkbox-inner {\n background-color: rgba(118, 195, 39, 0.6);\n border: none; }\n\n.investment-management .ant-checkbox-checked .ant-checkbox-input[value=\"Recognised\"] + .ant-checkbox-inner {\n background-color: #976ed7;\n border: none; }\n\n.investment-management .ant-checkbox-checked .ant-checkbox-input[value=\"NotRecognised\"] + .ant-checkbox-inner {\n background-color: #ffa070;\n border: none; }\n\n.add-programme-main-container .adding-section .form-section .investment-sought-form-container .investment-sought-form .investment-radio-button .ant-radio-group {\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n justify-content: space-between;\n width: fit-content; }\n\n.add-programme-main-container .adding-section .form-section .investment-sought-form-container .investment-sought-form .details-part-two .row .ant-picker-large {\n height: 40px !important;\n width: 100%; }\n";
15523
+ var css_248z$m = ".steps-actions {\n display: flex;\n flex-direction: row-reverse;\n margin-right: 1rem;\n justify-content: flex-start; }\n\n.investment-title-bar {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n padding: 0px 0px 30px 0px; }\n .investment-title-bar .title {\n display: flex;\n flex-direction: column;\n justify-content: space-between; }\n .investment-title-bar .actions {\n display: flex;\n align-items: center;\n justify-content: flex-end; }\n .investment-title-bar .flex-display {\n margin-left: 15px; }\n\n.ownership-container {\n padding: 15px 0px; }\n .ownership-container .label {\n color: rgba(58, 53, 65, 0.5); }\n\n.separator {\n padding: 5px;\n color: #d8d8d8; }\n\n.role-group .ant-col-13 {\n max-width: 320px; }\n\n.role-group .condition-radio-container {\n width: 48%;\n text-align: center; }\n .role-group .condition-radio-container .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled) {\n color: #ffffff !important;\n border-color: #9155fd !important;\n box-shadow: none;\n max-width: 200px; }\n\n.role-group .ant-radio-button-wrapper::before {\n background-color: transparent; }\n\n.role-group .anticon {\n margin-right: 0.5rem; }\n\n.role-group .ant-radio-button-wrapper {\n border: 1px solid #d9d9d9;\n color: rgba(140, 140, 140, 0.7) !important;\n width: 100% !important; }\n\n.role-group .condition-radio {\n width: 100%;\n text-transform: uppercase; }\n .role-group .condition-radio .ant-radio-button-checked {\n background: #9155fd;\n color: #ffffff; }\n\n.role-group .role-icons {\n margin-right: 5px; }\n\n.investment-management .role-icon {\n padding: 0.5rem 0.6rem; }\n\n.investment-management .ant-tag {\n border: none; }\n\n.investment-management .ant-checkbox-checked .ant-checkbox-input[value='Rejected'] + .ant-checkbox-inner {\n background-color: rgba(237, 77, 71, 0.6);\n border: none; }\n\n.investment-management .ant-checkbox-checked .ant-checkbox-input[value='Cancelled'] + .ant-checkbox-inner {\n background-color: rgba(58, 53, 65, 0.4);\n border: none; }\n\n.investment-management .ant-checkbox-checked .ant-checkbox-input[value='Accepted'] + .ant-checkbox-inner {\n background-color: #16b1ff;\n border: none; }\n\n.investment-management .ant-checkbox-checked .ant-checkbox-input[value='Pending'] + .ant-checkbox-inner {\n background-color: rgba(118, 195, 39, 0.6);\n border: none; }\n\n.investment-management .ant-checkbox-checked .ant-checkbox-input[value='Recognised'] + .ant-checkbox-inner {\n background-color: #976ed7;\n border: none; }\n\n.investment-management .ant-checkbox-checked .ant-checkbox-input[value='NotRecognised'] + .ant-checkbox-inner {\n background-color: #ffa070;\n border: none; }\n\n.add-programme-main-container .adding-section .form-section .investment-sought-form-container .investment-sought-form .investment-radio-button .ant-radio-group {\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n justify-content: space-between;\n width: fit-content; }\n\n.add-programme-main-container .adding-section .form-section .investment-sought-form-container .investment-sought-form .details-part-two .row .ant-picker-large {\n height: 40px !important;\n width: 100%; }\n";
15839
15524
  styleInject(css_248z$m);
15840
15525
 
15841
15526
  var Loading = function () {
@@ -15855,34 +15540,21 @@ var InsurancePayback;
15855
15540
 
15856
15541
  var RangePicker$3 = antd.DatePicker.RangePicker;
15857
15542
  var InvestmentCreationComponent = function (props) {
15858
- var t = props.t, useLocation = props.useLocation, onNavigateToProgrammeManagementView = props.onNavigateToProgrammeManagementView, onNavigateToProgrammeView = props.onNavigateToProgrammeView, onNavigateToInvestmentManagementView = props.onNavigateToInvestmentManagementView;
15543
+ var t = props.t, useConnection = props.useConnection, userInfoState = props.userInfoState, useLocation = props.useLocation, onNavigateToProgrammeManagementView = props.onNavigateToProgrammeManagementView, onNavigateToProgrammeView = props.onNavigateToProgrammeView;
15859
15544
  var state = useLocation().state;
15860
15545
  var _a = React.useState(), data = _a[0], setData = _a[1];
15861
- var _b = React.useState({}), companyNames = _b[0], setCompanyNames = _b[1];
15862
- var _c = React.useState({}); _c[0]; var setUserOrganization = _c[1];
15863
- var _d = React.useState({}), investmentNames = _d[0], setInvestmentNames = _d[1];
15864
- var _e = React.useState(), projectData = _e[0], setProjectData = _e[1];
15865
- var _f = React.useState(), investmentData = _f[0], setInvestmentData = _f[1];
15866
- var _g = React.useState([]), allProjectData = _g[0], setAllProjectData = _g[1];
15867
15546
  var formOne = antd.Form.useForm()[0];
15868
15547
  var formTwo = antd.Form.useForm()[0];
15869
15548
  var post = useConnection().post;
15870
- var _h = React.useState(false), loading = _h[0], setLoading = _h[1];
15871
- var _j = React.useState("New"), typeCreation = _j[0], setTypeCreation = _j[1];
15872
- var _k = React.useState(exports.InvestmentOwnershipType.PROJECT), investmentOwnershipType = _k[0], setInvestmentOwnershipType = _k[1];
15873
- var _l = React.useState(false), loadingList = _l[0], setLoadingList = _l[1];
15874
- var _m = React.useState(false), loadingInvestment = _m[0], setLoadingInvestment = _m[1];
15875
- var _o = React.useState(false), loadingProgData = _o[0], setLoadingProgData = _o[1];
15876
- var _p = React.useState(0), current = _p[0], setCurrent = _p[1];
15877
- var _q = React.useState(0), currentPercTotal = _q[0], setCurrentPercTotal = _q[1];
15878
- var _r = React.useState([]), organisationsList = _r[0], setOrganisationList = _r[1];
15879
- var _s = React.useState([]), nationalInvestmentList = _s[0], setNationalInvestmentList = _s[1];
15880
- var _t = React.useState([]), instrument = _t[0], setInstrument = _t[1];
15881
- var _u = React.useState(), stepOneData = _u[0], setStepOneData = _u[1];
15882
- var _v = React.useState(), govData = _v[0], setGovData = _v[1];
15883
- var userInfoState = useUserContext().userInfoState;
15884
- var _w = React.useState([]), ministrySectoralScope = _w[0], setMinistrySectoralScope = _w[1];
15885
- var _x = React.useState({}), prevInvestor = _x[0], setPrevInvestor = _x[1];
15549
+ var _b = React.useState(false), loading = _b[0], setLoading = _b[1];
15550
+ var _c = React.useState("New"), typeCreation = _c[0], setTypeCreation = _c[1];
15551
+ var _d = React.useState(false), loadingList = _d[0], setLoadingList = _d[1];
15552
+ var _e = React.useState(0), current = _e[0], setCurrent = _e[1];
15553
+ var _f = React.useState(0), currentPercTotal = _f[0], setCurrentPercTotal = _f[1];
15554
+ var _g = React.useState([]), organisationsList = _g[0], setOrganisationList = _g[1];
15555
+ var _h = React.useState([]), instrument = _h[0], setInstrument = _h[1];
15556
+ var _j = React.useState(), stepOneData = _j[0], setStepOneData = _j[1];
15557
+ var _k = React.useState(), govData = _k[0], setGovData = _k[1];
15886
15558
  var instrumentOptions = Object.keys(exports.Instrument).map(function (k, index) { return ({
15887
15559
  label: addSpaces(Object.values(exports.Instrument)[index]),
15888
15560
  value: Object.values(exports.Instrument)[index],
@@ -15934,225 +15606,52 @@ var InvestmentCreationComponent = function (props) {
15934
15606
  }
15935
15607
  });
15936
15608
  }); };
15937
- var getAllProjectData = function () { return __awaiter(void 0, void 0, void 0, function () {
15938
- var response, error_2;
15939
- return __generator(this, function (_a) {
15940
- switch (_a.label) {
15941
- case 0:
15942
- setLoadingProgData(true);
15943
- _a.label = 1;
15944
- case 1:
15945
- _a.trys.push([1, 5, 6, 7]);
15946
- if (!data) return [3 /*break*/, 4];
15947
- if (!!(data === null || data === void 0 ? void 0 : data.programmeId)) return [3 /*break*/, 3];
15948
- console.log("data non existing", data);
15949
- console.log("getting all Project data");
15950
- return [4 /*yield*/, post("national/programme/query", {
15951
- page: 1,
15952
- size: 100,
15953
- filterAnd: [
15954
- {
15955
- key: "currentStage",
15956
- operation: "!=",
15957
- value: exports.ProgrammeStageUnified.Rejected,
15958
- },
15959
- ],
15960
- })];
15961
- case 2:
15962
- response = _a.sent();
15963
- if (response.data) {
15964
- setAllProjectData(response === null || response === void 0 ? void 0 : response.data);
15965
- console.log("all Project data", response === null || response === void 0 ? void 0 : response.data);
15966
- }
15967
- return [3 /*break*/, 4];
15968
- case 3:
15969
- console.log("setting current Project data");
15970
- setAllProjectData([data]);
15971
- _a.label = 4;
15972
- case 4: return [3 /*break*/, 7];
15973
- case 5:
15974
- error_2 = _a.sent();
15975
- console.log("Error in getting all programme data", error_2);
15976
- return [3 /*break*/, 7];
15977
- case 6:
15978
- setLoadingProgData(false);
15979
- return [7 /*endfinally*/];
15980
- case 7: return [2 /*return*/];
15981
- }
15982
- });
15983
- }); };
15984
- var setSelectedProgramme = function (value) { return __awaiter(void 0, void 0, void 0, function () {
15985
- var _i, allProjectData_1, obj;
15986
- return __generator(this, function (_a) {
15987
- console.log("setSelectedProgramme", value);
15988
- for (_i = 0, allProjectData_1 = allProjectData; _i < allProjectData_1.length; _i++) {
15989
- obj = allProjectData_1[_i];
15990
- if (obj.programmeId == value) {
15991
- setProjectData(obj);
15992
- break;
15993
- }
15994
- }
15995
- return [2 /*return*/];
15996
- });
15997
- }); };
15998
- var setSelectedInvestment = function (value) { return __awaiter(void 0, void 0, void 0, function () {
15999
- return __generator(this, function (_a) {
16000
- console.log("setSelectedInvestment", value);
16001
- setInvestmentData(investmentNames[value]);
16002
- return [2 /*return*/];
16003
- });
16004
- }); };
16005
- var getNationalInvestmentDetails = function () { return __awaiter(void 0, void 0, void 0, function () {
16006
- var optionalFilters, filterAnd, filterOr_1, response, investmentData_1, _i, _a, investment, error_3;
15609
+ var getOrganisationsDetails = function () { return __awaiter(void 0, void 0, void 0, function () {
15610
+ var filterAnd, _i, _a, c, response, error_2;
16007
15611
  return __generator(this, function (_b) {
16008
15612
  switch (_b.label) {
16009
15613
  case 0:
16010
- setLoadingInvestment(true);
15614
+ setLoadingList(true);
16011
15615
  _b.label = 1;
16012
15616
  case 1:
16013
15617
  _b.trys.push([1, 3, 4, 5]);
16014
- optionalFilters = {};
16015
15618
  filterAnd = [];
16016
15619
  filterAnd = [
16017
15620
  {
16018
- key: "category",
15621
+ key: "companyRole",
16019
15622
  operation: "=",
16020
- value: exports.InvestmentOwnershipType.NATIONAL.toString(),
16021
- },
16022
- {
16023
- key: "amount",
16024
- operation: ">",
16025
- value: 0,
15623
+ value: exports.CompanyRole.PROGRAMME_DEVELOPER.toString(),
16026
15624
  },
16027
15625
  ];
16028
15626
  if ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.PROGRAMME_DEVELOPER) {
16029
15627
  filterAnd.push({
16030
- key: "toCompanyId",
16031
- operation: "=",
15628
+ key: "companyId",
15629
+ operation: "!=",
16032
15630
  value: userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyId,
16033
15631
  });
16034
15632
  }
16035
- else if (((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT ||
16036
- (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.MINISTRY) &&
16037
- (data === null || data === void 0 ? void 0 : data.programmeId)) {
16038
- filterOr_1 = [];
16039
- data.companyId.map(function (id) {
16040
- return filterOr_1.push({
16041
- key: "toCompanyId",
16042
- operation: "=",
16043
- value: id,
16044
- });
15633
+ for (_i = 0, _a = data === null || data === void 0 ? void 0 : data.companyId; _i < _a.length; _i++) {
15634
+ c = _a[_i];
15635
+ filterAnd.push({
15636
+ key: "companyId",
15637
+ operation: "!=",
15638
+ value: c,
16045
15639
  });
16046
- optionalFilters.filterOr = filterOr_1;
16047
15640
  }
16048
- return [4 /*yield*/, post("national/programme/investmentQuery", __assign({ page: 1, size: 100, filterAnd: filterAnd }, optionalFilters))];
16049
- case 2:
16050
- response = _b.sent();
16051
- if (response.data) {
16052
- setNationalInvestmentList(response === null || response === void 0 ? void 0 : response.data);
16053
- investmentData_1 = {};
16054
- for (_i = 0, _a = response === null || response === void 0 ? void 0 : response.data; _i < _a.length; _i++) {
16055
- investment = _a[_i];
16056
- investmentData_1[investment.requestId] = investment;
16057
- }
16058
- setInvestmentNames(investmentData_1);
16059
- console.log(investmentData_1);
16060
- }
16061
- return [3 /*break*/, 5];
16062
- case 3:
16063
- error_3 = _b.sent();
16064
- console.log("Error in getting national Investments list", error_3);
16065
- return [3 /*break*/, 5];
16066
- case 4:
16067
- setLoadingInvestment(false);
16068
- return [7 /*endfinally*/];
16069
- case 5: return [2 /*return*/];
16070
- }
16071
- });
16072
- }); };
16073
- var getUserOrganization = function () { return __awaiter(void 0, void 0, void 0, function () {
16074
- var response, error_4;
16075
- return __generator(this, function (_a) {
16076
- switch (_a.label) {
16077
- case 0:
16078
- _a.trys.push([0, 2, , 3]);
16079
- return [4 /*yield*/, post("national/organisation/query", {
15641
+ return [4 /*yield*/, post("national/organisation/queryNames", {
16080
15642
  page: 1,
16081
15643
  size: 100,
16082
- filterAnd: [
16083
- { key: "companyId", operation: "=", value: userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyId },
16084
- ],
15644
+ filterAnd: filterAnd,
16085
15645
  })];
16086
- case 1:
16087
- response = _a.sent();
16088
- console.log("getUserOrganization", response.data[0]);
16089
- setUserOrganization(response.data[0]);
16090
- setMinistrySectoralScope(response.data[0].sectoralScope);
16091
- return [3 /*break*/, 3];
16092
15646
  case 2:
16093
- error_4 = _a.sent();
16094
- console.log("Error in getting user organization", error_4);
16095
- return [3 /*break*/, 3];
16096
- case 3: return [2 /*return*/];
16097
- }
16098
- });
16099
- }); };
16100
- var getOrganisationsDetails = function () { return __awaiter(void 0, void 0, void 0, function () {
16101
- var filterAnd, filterOr, _i, _a, c, filters, response, companyName, _b, _c, company, error_5;
16102
- return __generator(this, function (_d) {
16103
- switch (_d.label) {
16104
- case 0:
16105
- setLoadingList(true);
16106
- _d.label = 1;
16107
- case 1:
16108
- _d.trys.push([1, 3, 4, 5]);
16109
- filterAnd = [];
16110
- filterOr = [];
16111
- filterAnd = [
16112
- {
16113
- key: "companyRole",
16114
- operation: "=",
16115
- value: exports.CompanyRole.PROGRAMME_DEVELOPER.toString(),
16116
- },
16117
- ];
16118
- // if (userInfoState?.companyRole === CompanyRole.PROGRAMME_DEVELOPER) {
16119
- // filterAnd.push({
16120
- // key: "companyId",
16121
- // operation: "!=",
16122
- // value: userInfoState?.companyId,
16123
- // });
16124
- // }
16125
- if (data === null || data === void 0 ? void 0 : data.companyId) {
16126
- for (_i = 0, _a = data === null || data === void 0 ? void 0 : data.companyId; _i < _a.length; _i++) {
16127
- c = _a[_i];
16128
- filterOr.push({
16129
- key: "companyId",
16130
- operation: "=",
16131
- value: c,
16132
- });
16133
- }
16134
- }
16135
- filters = void 0;
16136
- if (filterOr.length) {
16137
- filters.filterOr = filterOr;
16138
- }
16139
- return [4 /*yield*/, post("national/organisation/queryNames", __assign({ page: 1, size: 100, filterAnd: filterAnd }, filters))];
16140
- case 2:
16141
- response = _d.sent();
15647
+ response = _b.sent();
16142
15648
  if (response.data) {
16143
15649
  setOrganisationList(response === null || response === void 0 ? void 0 : response.data);
16144
- companyName = {};
16145
- for (_b = 0, _c = response === null || response === void 0 ? void 0 : response.data; _b < _c.length; _b++) {
16146
- company = _c[_b];
16147
- companyName[Number(company.companyId)] = company.name;
16148
- }
16149
- setCompanyNames(companyName);
16150
- console.log(companyName);
16151
15650
  }
16152
15651
  return [3 /*break*/, 5];
16153
15652
  case 3:
16154
- error_5 = _d.sent();
16155
- console.log("Error in getting organization list", error_5);
15653
+ error_2 = _b.sent();
15654
+ console.log("Error in getting organization list", error_2);
16156
15655
  return [3 /*break*/, 5];
16157
15656
  case 4:
16158
15657
  setLoadingList(false);
@@ -16167,72 +15666,52 @@ var InvestmentCreationComponent = function (props) {
16167
15666
  return;
16168
15667
  }
16169
15668
  if (state === null || state === void 0 ? void 0 : state.record) {
16170
- console.log("condition 1 data", state === null || state === void 0 ? void 0 : state.record);
16171
15669
  setData(state === null || state === void 0 ? void 0 : state.record);
16172
15670
  }
16173
15671
  else {
16174
- console.log("condition 2 data", { ownership: true });
16175
15672
  setData({ ownership: true });
16176
15673
  }
16177
15674
  }, []);
16178
15675
  React.useEffect(function () {
16179
- // if (data) {
16180
- // const keys = Object.keys(data);
16181
- // if (keys[0] !== "ownership") {
16182
- // getOrganisationsDetails();
16183
- // }
16184
- // }
16185
- getNationalInvestmentDetails();
16186
- getOrganisationsDetails();
15676
+ if (data) {
15677
+ var keys = Object.keys(data);
15678
+ if (keys[0] !== "ownership") {
15679
+ getOrganisationsDetails();
15680
+ }
15681
+ }
16187
15682
  getGovernmentDetails();
16188
- getAllProjectData();
16189
- getUserOrganization();
16190
15683
  }, [data]);
16191
- if (!data && allProjectData.length == 0) {
15684
+ if (!data) {
16192
15685
  return React.createElement(Loading, null);
16193
15686
  }
16194
15687
  console.log("data", data);
16195
- console.log("data", data);
15688
+ var companyName = {};
16196
15689
  if (data && Object.keys(data)[0] !== "ownership") {
16197
- // for (const company of data!?.company) {
16198
- // companyName[company?.companyId] = company;
16199
- // }
15690
+ for (var _i = 0, _l = data === null || data === void 0 ? void 0 : data.company; _i < _l.length; _i++) {
15691
+ var company = _l[_i];
15692
+ companyName[company === null || company === void 0 ? void 0 : company.companyId] = company;
15693
+ }
16200
15694
  if (!data.proponentPercentage) {
16201
15695
  data.proponentPercentage = [100];
16202
15696
  }
16203
15697
  }
16204
15698
  var nextOne = function (val) {
16205
- console.log("step 1 values", val);
16206
- if (val.typeCreation == exports.InvestmentCreationType.EXISTING) {
16207
- val.toCompanyId = investmentData.toCompanyId;
16208
- }
16209
15699
  setCurrent(current + 1);
16210
15700
  setStepOneData(val);
16211
- if (data === null || data === void 0 ? void 0 : data.programmeId)
16212
- setSelectedProgramme(data.programmeId);
16213
- if (prevInvestor && prevInvestor != val.toCompanyId && !(data === null || data === void 0 ? void 0 : data.programmeId)) {
16214
- formTwo.resetFields();
16215
- setCurrentPercTotal(0);
16216
- setProjectData(undefined);
16217
- }
16218
15701
  };
16219
15702
  var prevOne = function () {
16220
15703
  setCurrent(current - 1);
16221
- setPrevInvestor(stepOneData.toCompanyId);
16222
- // formTwo.resetFields();
16223
- // setCurrentPercTotal(0);
16224
- // setProjectData(undefined);
16225
15704
  };
16226
15705
  var submitInvestment = function (val) { return __awaiter(void 0, void 0, void 0, function () {
16227
- var payload, response, error_6;
15706
+ var payload, response, error_3;
16228
15707
  return __generator(this, function (_a) {
16229
15708
  switch (_a.label) {
16230
15709
  case 0:
16231
15710
  console.log(val);
16232
15711
  console.log(stepOneData);
16233
- console.log("OwnershipType", investmentOwnershipType);
16234
15712
  setLoading(true);
16235
15713
  payload = stepOneData;
15714
+ payload.programmeId = data.programmeId;
16236
15715
  payload.amount = parseFloat(payload.amount);
16237
15716
  if (payload.interestRate) {
16238
15717
  payload.interestRate = parseFloat(payload.interestRate);
@@ -16249,32 +15728,16 @@ var InvestmentCreationComponent = function (props) {
16249
15728
  .startOf("day")
16250
15729
  .unix();
16251
15730
  }
15731
+ payload.instrument = [payload.instrument];
15732
+ payload.fromCompanyIds = data.companyId.map(function (e) { return Number(e); });
15733
+ payload.percentage = val.percentage;
16252
15734
  payload.toCompanyId = Number(payload.toCompanyId);
16253
15735
  _a.label = 1;
16254
15736
  case 1:
16255
- _a.trys.push([1, 6, 7, 8]);
16256
- response = void 0;
16257
- if (!(investmentOwnershipType == exports.InvestmentOwnershipType.PROJECT)) return [3 /*break*/, 3];
16258
- if (typeCreation == exports.InvestmentCreationType.EXISTING) {
16259
- payload.nationalInvestmentId = investmentData.requestId;
16260
- }
16261
- else {
16262
- payload.instrument = [payload.instrument];
16263
- }
16264
- payload.programmeId = projectData === null || projectData === void 0 ? void 0 : projectData.programmeId;
16265
- payload.fromCompanyIds = projectData === null || projectData === void 0 ? void 0 : projectData.companyId.map(function (e) { return Number(e); });
16266
- payload.percentage = val.percentage;
15737
+ _a.trys.push([1, 3, 4, 5]);
16267
15738
  return [4 /*yield*/, post("national/programme/addInvestment", payload)];
16268
15739
  case 2:
16269
15740
  response = _a.sent();
16270
- return [3 /*break*/, 5];
16271
- case 3:
16272
- payload.instrument = [payload.instrument];
16273
- return [4 /*yield*/, post("national/organisation/addInvestment", payload)];
16274
- case 4:
16275
- response = _a.sent();
16276
- _a.label = 5;
16277
- case 5:
16278
15741
  console.log("investment creation -> ", response);
16279
15742
  if ((response === null || response === void 0 ? void 0 : response.statusText) === "SUCCESS") {
16280
15743
  antd.message.open({
@@ -16284,24 +15747,22 @@ var InvestmentCreationComponent = function (props) {
16284
15747
  style: { textAlign: "right", marginRight: 15, marginTop: 10 },
16285
15748
  });
16286
15749
  }
16287
- (data === null || data === void 0 ? void 0 : data.programmeId)
16288
- ? onNavigateToProgrammeView(data === null || data === void 0 ? void 0 : data.programmeId)
16289
- : onNavigateToInvestmentManagementView();
16290
- return [3 /*break*/, 8];
16291
- case 6:
16292
- error_6 = _a.sent();
16293
- console.log("Error in investment creation - ", error_6);
15750
+ onNavigateToProgrammeView(data.programmeId);
15751
+ return [3 /*break*/, 5];
15752
+ case 3:
15753
+ error_3 = _a.sent();
15754
+ console.log("Error in investment creation - ", error_3);
16294
15755
  antd.message.open({
16295
15756
  type: "error",
16296
- content: error_6 === null || error_6 === void 0 ? void 0 : error_6.message,
15757
+ content: error_3 === null || error_3 === void 0 ? void 0 : error_3.message,
16297
15758
  duration: 4,
16298
15759
  style: { textAlign: "right", marginRight: 15, marginTop: 10 },
16299
15760
  });
16300
- return [3 /*break*/, 8];
16301
- case 7:
15761
+ return [3 /*break*/, 5];
15762
+ case 4:
16302
15763
  setLoading(false);
16303
15764
  return [7 /*endfinally*/];
16304
- case 8: return [2 /*return*/];
15765
+ case 5: return [2 /*return*/];
16305
15766
  }
16306
15767
  });
16307
15768
  }); };
@@ -16315,14 +15776,6 @@ var InvestmentCreationComponent = function (props) {
16315
15776
  var onChangeTypeCreation = function (e) {
16316
15777
  console.log("radio checked", e.target.value);
16317
15778
  setTypeCreation(e.target.value);
16318
- formOne.resetFields();
16319
- formTwo.resetFields();
16320
- setCurrentPercTotal(0);
16321
- setProjectData(undefined);
16322
- };
16323
- var onChangeInvestmentOwnershipType = function (e) {
16324
- console.log("investment ownership type radio checked", e.target.value);
16325
- setInvestmentOwnershipType(e.target.value);
16326
15779
  };
16327
15780
  return (React.createElement("div", { className: "add-programme-main-container" },
16328
15781
  React.createElement("div", { className: "title-container" },
@@ -16347,60 +15800,106 @@ var InvestmentCreationComponent = function (props) {
16347
15800
  ] },
16348
15801
  React.createElement(antd.Radio.Group, { size: "large", defaultValue: typeCreation }, Object.values(exports.InvestmentCreationType).map(function (k, index) { return (React.createElement("div", { className: "condition-radio-container" },
16349
15802
  React.createElement(antd.Radio.Button, { className: "condition-radio", value: k, onChange: onChangeTypeCreation }, t("programme:" + k)))); }))))),
16350
- typeCreation == exports.InvestmentCreationType.NEW && (React.createElement("div", null,
16351
- React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
16352
- React.createElement(antd.Col, { xl: 12, md: 24 },
16353
- React.createElement("div", { className: "details-part-one" },
16354
- React.createElement(antd.Form.Item, { label: t("programme:investorName"), name: "toCompanyId", wrapperCol: { span: 24 }, className: "organisation", rules: [
16355
- {
16356
- required: true,
16357
- message: "".concat(t("programme:investorName"), " ").concat(t("isRequired")),
16358
- },
16359
- ] },
16360
- React.createElement(antd.Select, { size: "large", loading: loadingList }, organisationsList.map(function (organisation) {
16361
- if (data === null || data === void 0 ? void 0 : data.programmeId) {
16362
- if (data.companyId
16363
- .map(function (id) { return Number(id); })
16364
- .includes(Number(organisation.companyId))) {
16365
- return (React.createElement(antd.Select.Option, { key: organisation.companyId, value: organisation.companyId }, organisation.name));
15803
+ React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
15804
+ React.createElement(antd.Col, { xl: 12, md: 24 },
15805
+ React.createElement("div", { className: "details-part-one" },
15806
+ React.createElement(antd.Form.Item, { label: t("programme:investorName"), name: "toCompanyId", wrapperCol: { span: 24 }, className: "organisation", rules: [
15807
+ {
15808
+ required: true,
15809
+ message: "".concat(t("programme:investorName"), " ").concat(t("isRequired")),
15810
+ },
15811
+ ] },
15812
+ React.createElement(antd.Select, { size: "large", loading: loadingList }, organisationsList.map(function (organisation) { return (React.createElement(antd.Select.Option, { key: organisation.companyId, value: organisation.companyId }, organisation.name)); }))))),
15813
+ React.createElement(antd.Col, { xl: 12, md: 24 },
15814
+ React.createElement("div", { className: "details-part-two" },
15815
+ React.createElement(antd.Form.Item, { label: t("programme:amountInvested"), name: "amount", rules: [
15816
+ {
15817
+ required: true,
15818
+ message: "",
15819
+ },
15820
+ {
15821
+ validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
15822
+ return __generator(this, function (_a) {
15823
+ if (String(value).trim() === "" ||
15824
+ String(value).trim() === undefined ||
15825
+ value === null ||
15826
+ value === undefined) {
15827
+ throw new Error("".concat(t("programme:amountInvested"), " ").concat(t("isRequired")));
15828
+ }
15829
+ else if (!isNaN(value) &&
15830
+ Number(value) > 0) {
15831
+ return [2 /*return*/, Promise.resolve()];
15832
+ }
15833
+ else {
15834
+ throw new Error("".concat(t("programme:amountInvested"), " ").concat(t("isInvalid")));
15835
+ }
15836
+ });
15837
+ }); },
15838
+ },
15839
+ ] },
15840
+ React.createElement(antd.Input, { size: "large" }))))),
15841
+ React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
15842
+ React.createElement(antd.Col, { xl: 24, md: 24 },
15843
+ React.createElement(antd.Form.Item, { label: t("programme:instrument"), name: "instrument",
15844
+ //wrapperCol={{ span: 24 }}
15845
+ required: true, className: "investment-radio-button", rules: [
15846
+ {
15847
+ required: true,
15848
+ message: "",
15849
+ },
15850
+ {
15851
+ validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
15852
+ return __generator(this, function (_a) {
15853
+ if (String(value).trim() === "" ||
15854
+ String(value).trim() === undefined ||
15855
+ value === null ||
15856
+ value === undefined) {
15857
+ throw new Error("".concat(t("programme:instrument"), " ").concat(t("isRequired")));
16366
15858
  }
16367
- }
16368
- else {
16369
- return (React.createElement(antd.Select.Option, { key: organisation.companyId, value: organisation.companyId }, organisation.name));
16370
- }
16371
- }))))),
16372
- React.createElement(antd.Col, { xl: 12, md: 24 },
16373
- React.createElement("div", { className: "details-part-two" },
16374
- React.createElement(antd.Form.Item, { label: t("programme:amountInvested"), name: "amount", rules: [
16375
- {
16376
- required: true,
16377
- message: "",
16378
- },
16379
- {
16380
- validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
16381
- return __generator(this, function (_a) {
16382
- if (String(value).trim() === "" ||
16383
- String(value).trim() ===
16384
- undefined ||
16385
- value === null ||
16386
- value === undefined) {
16387
- throw new Error("".concat(t("programme:amountInvested"), " ").concat(t("isRequired")));
16388
- }
16389
- else if (!isNaN(value) &&
16390
- Number(value) > 0) {
16391
- return [2 /*return*/, Promise.resolve()];
16392
- }
16393
- else {
16394
- throw new Error("".concat(t("programme:amountInvested"), " ").concat(t("isInvalid")));
16395
- }
16396
- });
16397
- }); },
16398
- },
16399
- ] },
16400
- React.createElement(antd.Input, { size: "large" }))))),
15859
+ return [2 /*return*/];
15860
+ });
15861
+ }); },
15862
+ },
15863
+ ] },
15864
+ React.createElement(antd.Radio.Group, { onChange: onInstrumentChange, value: instrument[0] }, instrumentOptions.map(function (e) {
15865
+ return (React.createElement(antd.Radio, { value: e.value }, e.label));
15866
+ }))))),
15867
+ instrument &&
15868
+ instrument.indexOf(exports.Instrument.LOAN) >= 0 && (React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
15869
+ React.createElement(antd.Col, { xl: 8, md: 12 },
15870
+ React.createElement("div", { className: "details-part-two" },
15871
+ React.createElement(antd.Form.Item, { label: t("programme:interestRate"), name: "interestRate", rules: [
15872
+ {
15873
+ required: true,
15874
+ message: "",
15875
+ },
15876
+ {
15877
+ validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
15878
+ return __generator(this, function (_a) {
15879
+ if (String(value).trim() === "" ||
15880
+ String(value).trim() ===
15881
+ undefined ||
15882
+ value === null ||
15883
+ value === undefined) {
15884
+ throw new Error("".concat(t("programme:interestRate"), " ").concat(t("isRequired")));
15885
+ }
15886
+ else if (!isNaN(value)) {
15887
+ return [2 /*return*/, Promise.resolve()];
15888
+ }
15889
+ else {
15890
+ throw new Error("".concat(t("programme:interestRate"), " ").concat(t("isInvalid")));
15891
+ }
15892
+ });
15893
+ }); },
15894
+ },
15895
+ ] },
15896
+ React.createElement(antd.Input, { size: "large" })))))),
15897
+ instrument &&
15898
+ (instrument.indexOf(exports.Instrument.CONLOAN) >= 0 ||
15899
+ instrument.indexOf(exports.Instrument.NONCONLOAN) >= 0) && (React.createElement("div", { className: "details-part-two" },
16401
15900
  React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
16402
- React.createElement(antd.Col, { xl: 24, md: 24 },
16403
- React.createElement(antd.Form.Item, { label: t("programme:instrument"), name: "instrument", required: true, className: "investment-radio-button", rules: [
15901
+ React.createElement(antd.Col, { xl: 8, md: 12 },
15902
+ React.createElement(antd.Form.Item, { label: t("programme:interestRate"), name: "interestRate", rules: [
16404
15903
  {
16405
15904
  required: true,
16406
15905
  message: "",
@@ -16409,422 +15908,296 @@ var InvestmentCreationComponent = function (props) {
16409
15908
  validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
16410
15909
  return __generator(this, function (_a) {
16411
15910
  if (String(value).trim() === "" ||
16412
- String(value).trim() === undefined ||
15911
+ String(value).trim() ===
15912
+ undefined ||
16413
15913
  value === null ||
16414
15914
  value === undefined) {
16415
- throw new Error("".concat(t("programme:instrument"), " ").concat(t("isRequired")));
15915
+ throw new Error("".concat(t("programme:interestRate"), " ").concat(t("isRequired")));
15916
+ }
15917
+ else if (!isNaN(value)) {
15918
+ return [2 /*return*/, Promise.resolve()];
15919
+ }
15920
+ else {
15921
+ throw new Error("".concat(t("programme:interestRate"), " ").concat(t("isInvalid")));
16416
15922
  }
16417
- return [2 /*return*/];
16418
15923
  });
16419
15924
  }); },
16420
15925
  },
16421
15926
  ] },
16422
- React.createElement(antd.Radio.Group, { onChange: onInstrumentChange, value: instrument[0] }, instrumentOptions.map(function (e) {
16423
- return (React.createElement(antd.Radio, { value: e.value }, e.label));
16424
- }))))),
16425
- instrument &&
16426
- instrument.indexOf(exports.Instrument.LOAN) >= 0 && (React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
15927
+ React.createElement(antd.Input, { size: "large" })))),
15928
+ React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
16427
15929
  React.createElement(antd.Col, { xl: 8, md: 12 },
16428
- React.createElement("div", { className: "details-part-two" },
16429
- React.createElement(antd.Form.Item, { label: t("programme:interestRate"), name: "interestRate", rules: [
16430
- {
16431
- required: true,
16432
- message: "",
16433
- },
16434
- {
16435
- validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
16436
- return __generator(this, function (_a) {
16437
- if (String(value).trim() === "" ||
16438
- String(value).trim() ===
16439
- undefined ||
16440
- value === null ||
16441
- value === undefined) {
16442
- throw new Error("".concat(t("programme:interestRate"), " ").concat(t("isRequired")));
16443
- }
16444
- else if (!isNaN(value)) {
16445
- return [2 /*return*/, Promise.resolve()];
16446
- }
16447
- else {
16448
- throw new Error("".concat(t("programme:interestRate"), " ").concat(t("isInvalid")));
16449
- }
16450
- });
16451
- }); },
16452
- },
16453
- ] },
16454
- React.createElement(antd.Input, { size: "large" })))))),
16455
- instrument &&
16456
- (instrument.indexOf(exports.Instrument.CONLOAN) >= 0 ||
16457
- instrument.indexOf(exports.Instrument.NONCONLOAN) >=
16458
- 0) && (React.createElement("div", { className: "details-part-two" },
16459
- React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
16460
- React.createElement(antd.Col, { xl: 8, md: 12 },
16461
- React.createElement(antd.Form.Item, { label: t("programme:interestRate"), name: "interestRate", rules: [
16462
- {
16463
- required: true,
16464
- message: "",
16465
- },
16466
- {
16467
- validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
16468
- return __generator(this, function (_a) {
16469
- if (String(value).trim() === "" ||
16470
- String(value).trim() ===
16471
- undefined ||
16472
- value === null ||
16473
- value === undefined) {
16474
- throw new Error("".concat(t("programme:interestRate"), " ").concat(t("isRequired")));
16475
- }
16476
- else if (!isNaN(value)) {
16477
- return [2 /*return*/, Promise.resolve()];
16478
- }
16479
- else {
16480
- throw new Error("".concat(t("programme:interestRate"), " ").concat(t("isInvalid")));
16481
- }
16482
- });
16483
- }); },
16484
- },
16485
- ] },
16486
- React.createElement(antd.Input, { size: "large" })))),
16487
- React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
16488
- React.createElement(antd.Col, { xl: 8, md: 12 },
16489
- React.createElement(antd.Form.Item, { label: t("programme:loanPeriod"), name: "period", required: true, rules: [
16490
- {
16491
- required: true,
16492
- message: "",
16493
- },
16494
- {
16495
- validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
16496
- return __generator(this, function (_a) {
16497
- if (String(value).trim() === "" ||
16498
- String(value).trim() ===
16499
- undefined ||
16500
- value === null ||
16501
- value === undefined) {
16502
- throw new Error("".concat(t("programme:loanPeriod"), " ").concat(t("isRequired")));
16503
- }
16504
- return [2 /*return*/];
16505
- });
16506
- }); },
16507
- },
16508
- ] },
16509
- React.createElement(RangePicker$3, { showTime: true, allowClear: true, format: "DD:MM:YYYY", size: "large" }))),
16510
- React.createElement(antd.Col, { xl: 8, md: 12 },
16511
- React.createElement(antd.Form.Item, { label: t("programme:startOfPayback"), name: "startOfPayback", rules: [
16512
- {
16513
- required: true,
16514
- message: "",
16515
- },
16516
- {
16517
- validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
16518
- return __generator(this, function (_a) {
16519
- if (String(value).trim() === "" ||
16520
- String(value).trim() ===
16521
- undefined ||
16522
- value === null ||
16523
- value === undefined) {
16524
- throw new Error("".concat(t("programme:startOfPayback"), " ").concat(t("isRequired")));
16525
- }
16526
- return [2 /*return*/];
16527
- });
16528
- }); },
16529
- },
16530
- ] },
16531
- React.createElement(antd.DatePicker, { size: "large", disabledDate: function (currentDate) {
16532
- return currentDate <
16533
- moment().startOf("day");
16534
- } })))))),
16535
- instrument &&
16536
- instrument.indexOf(exports.Instrument.GUARANTEE) >= 0 && (React.createElement("div", { className: "details-part-two" },
16537
- React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
16538
- React.createElement(antd.Col, { xl: 8, md: 12 },
16539
- React.createElement(antd.Form.Item, { label: t("programme:interestRate"), name: "interestRate", rules: [
16540
- {
16541
- required: true,
16542
- message: "",
16543
- },
16544
- {
16545
- validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
16546
- return __generator(this, function (_a) {
16547
- if (String(value).trim() === "" ||
16548
- String(value).trim() ===
16549
- undefined ||
16550
- value === null ||
16551
- value === undefined) {
16552
- throw new Error("".concat(t("programme:interestRate"), " ").concat(t("isRequired")));
16553
- }
16554
- else if (!isNaN(value)) {
16555
- return [2 /*return*/, Promise.resolve()];
16556
- }
16557
- else {
16558
- throw new Error("".concat(t("programme:interestRate"), " ").concat(t("isInvalid")));
16559
- }
16560
- });
16561
- }); },
16562
- },
16563
- ] },
16564
- React.createElement(antd.Input, { size: "large" })))),
16565
- React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
16566
- React.createElement(antd.Col, { xl: 8, md: 12 },
16567
- React.createElement(antd.Form.Item, { label: t("programme:period"), name: "period", required: true, rules: [
16568
- {
16569
- required: true,
16570
- message: "",
16571
- },
16572
- {
16573
- validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
16574
- return __generator(this, function (_a) {
16575
- if (String(value).trim() === "" ||
16576
- String(value).trim() ===
16577
- undefined ||
16578
- value === null ||
16579
- value === undefined) {
16580
- throw new Error("".concat(t("programme:period"), " ").concat(t("isRequired")));
16581
- }
16582
- return [2 /*return*/];
16583
- });
16584
- }); },
16585
- },
16586
- ] },
16587
- React.createElement(RangePicker$3, { showTime: true, allowClear: true, format: "DD:MM:YYYY", size: "large" }))),
16588
- React.createElement(antd.Col, { xl: 8, md: 12 },
16589
- React.createElement(antd.Form.Item, { label: t("programme:payback"), wrapperCol: { span: 13 }, className: "role-group", name: "guaranteePayback", rules: [
16590
- {
16591
- required: true,
16592
- message: "",
16593
- },
16594
- {
16595
- validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
16596
- return __generator(this, function (_a) {
16597
- if (String(value).trim() === "" ||
16598
- String(value).trim() ===
16599
- undefined ||
16600
- value === null ||
16601
- value === undefined) {
16602
- throw new Error("".concat(t("programme:payback"), " ").concat(t("isRequired")));
16603
- }
16604
- return [2 /*return*/];
16605
- });
16606
- }); },
16607
- },
16608
- ] },
16609
- React.createElement(antd.Radio.Group, { size: "large" }, Object.values(GuaranteePayback).map(function (k, index) { return (React.createElement("div", { className: "condition-radio-container" },
16610
- React.createElement(antd.Radio.Button, { className: "condition-radio", value: k }, t("programme:" + k)))); }))))))),
16611
- instrument &&
16612
- instrument.indexOf(exports.Instrument.RESULT_BASED) >=
16613
- 0 && (React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
16614
- React.createElement(antd.Col, { xl: 12, md: 24 },
16615
- React.createElement("div", { className: "details-part-two" },
16616
- React.createElement(antd.Form.Item, { label: t("programme:resultMetric"), name: "resultMetric", rules: [
16617
- {
16618
- required: true,
16619
- message: "",
16620
- },
16621
- {
16622
- validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
16623
- return __generator(this, function (_a) {
16624
- if (String(value).trim() === "" ||
16625
- String(value).trim() ===
16626
- undefined ||
16627
- value === null ||
16628
- value === undefined) {
16629
- throw new Error("".concat(t("programme:resultMetric"), " ").concat(t("isRequired")));
16630
- }
16631
- return [2 /*return*/];
16632
- });
16633
- }); },
16634
- },
16635
- ] },
16636
- React.createElement(antd.Input, { size: "large" })))),
16637
- React.createElement(antd.Col, { xl: 12, md: 24 },
16638
- React.createElement("div", { className: "details-part-two" },
16639
- React.createElement(antd.Form.Item, { label: t("programme:paymentPerMetric"), name: "paymentPerMetric", rules: [
16640
- {
16641
- required: true,
16642
- message: "",
16643
- },
16644
- {
16645
- validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
16646
- return __generator(this, function (_a) {
16647
- if (String(value).trim() === "" ||
16648
- String(value).trim() ===
16649
- undefined ||
16650
- value === null ||
16651
- value === undefined) {
16652
- throw new Error("".concat(t("programme:paymentPerMetric"), " ").concat(t("isRequired")));
16653
- }
16654
- else if (!isNaN(value)) {
16655
- return [2 /*return*/, Promise.resolve()];
16656
- }
16657
- else {
16658
- throw new Error("".concat(t("programme:paymentPerMetric"), " ").concat(t("isInvalid")));
16659
- }
16660
- });
16661
- }); },
16662
- },
16663
- ] },
16664
- React.createElement(antd.Input, { size: "large" })))))),
16665
- instrument &&
16666
- instrument.indexOf(exports.Instrument.INKIND) >= 0 && (React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
16667
- React.createElement(antd.Col, { xl: 12, md: 24 },
16668
- React.createElement("div", { className: "details-part-two" },
16669
- React.createElement(antd.Form.Item, { label: t("programme:description"), name: "description", rules: [
16670
- {
16671
- required: false,
16672
- message: "",
16673
- },
16674
- ] },
16675
- React.createElement(antd.Input, { size: "large" })))))),
16676
- instrument &&
16677
- instrument.indexOf(exports.Instrument.INSURANCE) >= 0 && (React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
15930
+ React.createElement(antd.Form.Item, { label: t("programme:loanPeriod"), name: "period", required: true, rules: [
15931
+ {
15932
+ required: true,
15933
+ message: "",
15934
+ },
15935
+ {
15936
+ validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
15937
+ return __generator(this, function (_a) {
15938
+ if (String(value).trim() === "" ||
15939
+ String(value).trim() ===
15940
+ undefined ||
15941
+ value === null ||
15942
+ value === undefined) {
15943
+ throw new Error("".concat(t("programme:loanPeriod"), " ").concat(t("isRequired")));
15944
+ }
15945
+ return [2 /*return*/];
15946
+ });
15947
+ }); },
15948
+ },
15949
+ ] },
15950
+ React.createElement(RangePicker$3, { showTime: true, allowClear: true, format: "DD:MM:YYYY", size: "large" }))),
16678
15951
  React.createElement(antd.Col, { xl: 8, md: 12 },
16679
- React.createElement("div", { className: "details-part-two" },
16680
- React.createElement(antd.Form.Item, { label: t("programme:payback"), wrapperCol: { span: 13 }, className: "role-group", name: "insurancePayback", rules: [
16681
- {
16682
- required: true,
16683
- message: "",
16684
- },
16685
- {
16686
- validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
16687
- return __generator(this, function (_a) {
16688
- if (String(value).trim() === "" ||
16689
- String(value).trim() ===
16690
- undefined ||
16691
- value === null ||
16692
- value === undefined) {
16693
- throw new Error("".concat(t("programme:payback"), " ").concat(t("isRequired")));
16694
- }
16695
- return [2 /*return*/];
16696
- });
16697
- }); },
16698
- },
16699
- ] },
16700
- React.createElement(antd.Radio.Group, { size: "large" }, Object.values(InsurancePayback).map(function (k, index) { return (React.createElement("div", { className: "condition-radio-container" },
16701
- React.createElement(antd.Radio.Button, { className: "condition-radio", value: k }, t("programme:" + k)))); }))))))),
16702
- instrument &&
16703
- instrument.indexOf(exports.Instrument.OTHER) >= 0 && (React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
16704
- React.createElement(antd.Col, { xl: 12, md: 24 },
16705
- React.createElement("div", { className: "details-part-two" },
16706
- React.createElement(antd.Form.Item, { label: t("programme:comments"), name: "comments", rules: [
16707
- {
16708
- required: true,
16709
- message: "",
16710
- },
16711
- {
16712
- validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
16713
- return __generator(this, function (_a) {
16714
- if (String(value).trim() === "" ||
16715
- String(value).trim() ===
16716
- undefined ||
16717
- value === null ||
16718
- value === undefined) {
16719
- throw new Error("".concat(t("programme:comments"), " ").concat(t("isRequired")));
16720
- }
16721
- return [2 /*return*/];
16722
- });
16723
- }); },
16724
- },
16725
- ] },
16726
- React.createElement(antd.Input, { size: "large" })))))),
15952
+ React.createElement(antd.Form.Item, { label: t("programme:startOfPayback"), name: "startOfPayback", rules: [
15953
+ {
15954
+ required: true,
15955
+ message: "",
15956
+ },
15957
+ {
15958
+ validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
15959
+ return __generator(this, function (_a) {
15960
+ if (String(value).trim() === "" ||
15961
+ String(value).trim() ===
15962
+ undefined ||
15963
+ value === null ||
15964
+ value === undefined) {
15965
+ throw new Error("".concat(t("programme:startOfPayback"), " ").concat(t("isRequired")));
15966
+ }
15967
+ return [2 /*return*/];
15968
+ });
15969
+ }); },
15970
+ },
15971
+ ] },
15972
+ React.createElement(antd.DatePicker, { size: "large", disabledDate: function (currentDate) {
15973
+ return currentDate < moment().startOf("day");
15974
+ } })))))),
15975
+ instrument &&
15976
+ instrument.indexOf(exports.Instrument.GUARANTEE) >= 0 && (React.createElement("div", { className: "details-part-two" },
16727
15977
  React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
16728
15978
  React.createElement(antd.Col, { xl: 8, md: 12 },
16729
- React.createElement(antd.Form.Item, { label: t("programme:type"), wrapperCol: { span: 13 }, className: "role-group", name: "type", rules: [
15979
+ React.createElement(antd.Form.Item, { label: t("programme:interestRate"), name: "interestRate", rules: [
16730
15980
  {
16731
- required: false,
15981
+ required: true,
15982
+ message: "",
15983
+ },
15984
+ {
15985
+ validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
15986
+ return __generator(this, function (_a) {
15987
+ if (String(value).trim() === "" ||
15988
+ String(value).trim() ===
15989
+ undefined ||
15990
+ value === null ||
15991
+ value === undefined) {
15992
+ throw new Error("".concat(t("programme:interestRate"), " ").concat(t("isRequired")));
15993
+ }
15994
+ else if (!isNaN(value)) {
15995
+ return [2 /*return*/, Promise.resolve()];
15996
+ }
15997
+ else {
15998
+ throw new Error("".concat(t("programme:interestRate"), " ").concat(t("isInvalid")));
15999
+ }
16000
+ });
16001
+ }); },
16732
16002
  },
16733
16003
  ] },
16734
- React.createElement(antd.Radio.Group, { size: "large" }, Object.values(exports.InvestmentType).map(function (k, index) { return (React.createElement("div", { className: "condition-radio-container" },
16735
- React.createElement(antd.Radio.Button, { className: "condition-radio", value: k, onClick: function (e) {
16736
- return deselectOnClick(e, "type");
16737
- } }, t("programme:" + k)))); })))),
16004
+ React.createElement(antd.Input, { size: "large" })))),
16005
+ React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
16738
16006
  React.createElement(antd.Col, { xl: 8, md: 12 },
16739
- React.createElement(antd.Form.Item, { label: t("programme:level"), wrapperCol: { span: 13 }, className: "role-group", name: "level", rules: [
16007
+ React.createElement(antd.Form.Item, { label: t("programme:period"), name: "period", required: true, rules: [
16740
16008
  {
16741
- required: false,
16009
+ required: true,
16010
+ message: "",
16011
+ },
16012
+ {
16013
+ validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
16014
+ return __generator(this, function (_a) {
16015
+ if (String(value).trim() === "" ||
16016
+ String(value).trim() ===
16017
+ undefined ||
16018
+ value === null ||
16019
+ value === undefined) {
16020
+ throw new Error("".concat(t("programme:period"), " ").concat(t("isRequired")));
16021
+ }
16022
+ return [2 /*return*/];
16023
+ });
16024
+ }); },
16742
16025
  },
16743
16026
  ] },
16744
- React.createElement(antd.Radio.Group, { size: "large" }, Object.values(exports.InvestmentLevel).map(function (k, index) { return (React.createElement("div", { className: "condition-radio-container" },
16745
- React.createElement(antd.Radio.Button, { className: "condition-radio", value: k, onClick: function (e) {
16746
- return deselectOnClick(e, "level");
16747
- } }, t("programme:" + k)))); })))),
16027
+ React.createElement(RangePicker$3, { showTime: true, allowClear: true, format: "DD:MM:YYYY", size: "large" }))),
16748
16028
  React.createElement(antd.Col, { xl: 8, md: 12 },
16749
- React.createElement(antd.Form.Item, { label: t("programme:stream"), wrapperCol: { span: 13 }, className: "role-group", name: "stream", rules: [
16029
+ React.createElement(antd.Form.Item, { label: t("programme:payback"), wrapperCol: { span: 13 }, className: "role-group", name: "guaranteePayback", rules: [
16030
+ {
16031
+ required: true,
16032
+ message: "",
16033
+ },
16034
+ {
16035
+ validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
16036
+ return __generator(this, function (_a) {
16037
+ if (String(value).trim() === "" ||
16038
+ String(value).trim() ===
16039
+ undefined ||
16040
+ value === null ||
16041
+ value === undefined) {
16042
+ throw new Error("".concat(t("programme:payback"), " ").concat(t("isRequired")));
16043
+ }
16044
+ return [2 /*return*/];
16045
+ });
16046
+ }); },
16047
+ },
16048
+ ] },
16049
+ React.createElement(antd.Radio.Group, { size: "large" }, Object.values(GuaranteePayback).map(function (k, index) { return (React.createElement("div", { className: "condition-radio-container" },
16050
+ React.createElement(antd.Radio.Button, { className: "condition-radio", value: k }, t("programme:" + k)))); }))))))),
16051
+ instrument &&
16052
+ instrument.indexOf(exports.Instrument.RESULT_BASED) >= 0 && (React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
16053
+ React.createElement(antd.Col, { xl: 12, md: 24 },
16054
+ React.createElement("div", { className: "details-part-two" },
16055
+ React.createElement(antd.Form.Item, { label: t("programme:resultMetric"), name: "resultMetric", rules: [
16056
+ {
16057
+ required: true,
16058
+ message: "",
16059
+ },
16060
+ {
16061
+ validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
16062
+ return __generator(this, function (_a) {
16063
+ if (String(value).trim() === "" ||
16064
+ String(value).trim() ===
16065
+ undefined ||
16066
+ value === null ||
16067
+ value === undefined) {
16068
+ throw new Error("".concat(t("programme:resultMetric"), " ").concat(t("isRequired")));
16069
+ }
16070
+ return [2 /*return*/];
16071
+ });
16072
+ }); },
16073
+ },
16074
+ ] },
16075
+ React.createElement(antd.Input, { size: "large" })))),
16076
+ React.createElement(antd.Col, { xl: 12, md: 24 },
16077
+ React.createElement("div", { className: "details-part-two" },
16078
+ React.createElement(antd.Form.Item, { label: t("programme:paymentPerMetric"), name: "paymentPerMetric", rules: [
16079
+ {
16080
+ required: true,
16081
+ message: "",
16082
+ },
16083
+ {
16084
+ validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
16085
+ return __generator(this, function (_a) {
16086
+ if (String(value).trim() === "" ||
16087
+ String(value).trim() ===
16088
+ undefined ||
16089
+ value === null ||
16090
+ value === undefined) {
16091
+ throw new Error("".concat(t("programme:paymentPerMetric"), " ").concat(t("isRequired")));
16092
+ }
16093
+ else if (!isNaN(value)) {
16094
+ return [2 /*return*/, Promise.resolve()];
16095
+ }
16096
+ else {
16097
+ throw new Error("".concat(t("programme:paymentPerMetric"), " ").concat(t("isInvalid")));
16098
+ }
16099
+ });
16100
+ }); },
16101
+ },
16102
+ ] },
16103
+ React.createElement(antd.Input, { size: "large" })))))),
16104
+ instrument &&
16105
+ instrument.indexOf(exports.Instrument.INKIND) >= 0 && (React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
16106
+ React.createElement(antd.Col, { xl: 12, md: 24 },
16107
+ React.createElement("div", { className: "details-part-two" },
16108
+ React.createElement(antd.Form.Item, { label: t("programme:description"), name: "description", rules: [
16750
16109
  {
16751
16110
  required: false,
16111
+ message: "",
16752
16112
  },
16753
16113
  ] },
16754
- React.createElement(antd.Radio.Group, { size: "large" }, Object.values(exports.InvestmentStream).map(function (k, index) { return (React.createElement("div", { className: "condition-radio-container" },
16755
- React.createElement(antd.Radio.Button, { className: "condition-radio", value: k, onClick: function (e) {
16756
- return deselectOnClick(e, "stream");
16757
- } }, t("programme:" + k)))); }))))),
16758
- React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
16759
- React.createElement(antd.Col, { xl: 12, md: 24 },
16760
- React.createElement(antd.Form.Item, { label: t("programme:esgType"), name: "esgClassification" },
16761
- React.createElement(antd.Select, { size: "large" }, Object.values(exports.ESGType).map(function (esg) { return (React.createElement(antd.Select.Option, { value: esg }, esg)); }))))))),
16762
- typeCreation == exports.InvestmentCreationType.EXISTING && (React.createElement("div", null,
16763
- React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
16764
- React.createElement(antd.Col, { xl: 12, md: 24 },
16765
- React.createElement("div", { className: "details-part-one" },
16766
- React.createElement(antd.Form.Item, { label: t("programme:existingInvestmentSource"), name: "existinngInvestmentId", wrapperCol: { span: 24 }, rules: [
16767
- {
16768
- required: true,
16769
- message: "".concat(t("programme:existingInvestmentSource"), " ").concat(t("isRequired")),
16770
- },
16771
- ] },
16772
- React.createElement(antd.Select, { size: "large", loading: loadingInvestment, onChange: setSelectedInvestment }, nationalInvestmentList.map(function (investment) { return (React.createElement(antd.Select.Option, { key: investment.requestId, value: investment.requestId }, investment.investmentName)); })))))),
16773
- React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
16774
- React.createElement(antd.Col, { xl: 12, md: 24 },
16775
- React.createElement("div", { className: "details-part-two" },
16776
- React.createElement(antd.Form.Item, { label: t("programme:amountInvested"), name: "amount", rules: [
16777
- {
16778
- required: true,
16779
- message: "",
16780
- },
16781
- {
16782
- validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
16783
- return __generator(this, function (_a) {
16784
- if (String(value).trim() === "" ||
16785
- String(value).trim() ===
16786
- undefined ||
16787
- value === null ||
16788
- value === undefined) {
16789
- throw new Error("".concat(t("programme:amountInvested"), " ").concat(t("isRequired")));
16790
- }
16791
- else if (!isNaN(value) &&
16792
- Number(value) > 0) {
16793
- return [2 /*return*/, Promise.resolve()];
16794
- }
16795
- else {
16796
- throw new Error("".concat(t("programme:amountInvested"), " ").concat(t("isInvalid")));
16797
- }
16798
- });
16799
- }); },
16800
- },
16801
- function (_a) {
16802
- var getFieldValue = _a.getFieldValue;
16803
- return ({
16804
- validator: function (rule, v) {
16805
- if (getFieldValue("amount") &&
16806
- investmentData &&
16807
- investmentData.amount <
16808
- parseFloat(getFieldValue("amount"))) {
16809
- // eslint-disable-next-line prefer-promise-reject-errors
16810
- return Promise.reject("Amount > Available");
16811
- }
16812
- return Promise.resolve();
16813
- },
16114
+ React.createElement(antd.Input, { size: "large" })))))),
16115
+ instrument &&
16116
+ instrument.indexOf(exports.Instrument.INSURANCE) >= 0 && (React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
16117
+ React.createElement(antd.Col, { xl: 8, md: 12 },
16118
+ React.createElement("div", { className: "details-part-two" },
16119
+ React.createElement(antd.Form.Item, { label: t("programme:payback"), wrapperCol: { span: 13 }, className: "role-group", name: "insurancePayback", rules: [
16120
+ {
16121
+ required: true,
16122
+ message: "",
16123
+ },
16124
+ {
16125
+ validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
16126
+ return __generator(this, function (_a) {
16127
+ if (String(value).trim() === "" ||
16128
+ String(value).trim() ===
16129
+ undefined ||
16130
+ value === null ||
16131
+ value === undefined) {
16132
+ throw new Error("".concat(t("programme:payback"), " ").concat(t("isRequired")));
16133
+ }
16134
+ return [2 /*return*/];
16814
16135
  });
16815
- },
16816
- ] },
16817
- React.createElement(antd.Input, { size: "large" })))),
16818
- React.createElement(antd.Col, { xl: 12, md: 24 },
16819
- React.createElement("div", { className: "details-part-two" },
16820
- React.createElement(antd.Form.Item, { label: " ", name: "sourceAmount" },
16821
- React.createElement("div", null,
16822
- "/",
16823
- React.createElement(antd.InputNumber, { size: "large", width: "100%", formatter: function (value) {
16824
- return "$".concat(addCommSep(value));
16825
- }, disabled: true, value: investmentData
16826
- ? investmentData.amount
16827
- : 0 })))))))),
16136
+ }); },
16137
+ },
16138
+ ] },
16139
+ React.createElement(antd.Radio.Group, { size: "large" }, Object.values(InsurancePayback).map(function (k, index) { return (React.createElement("div", { className: "condition-radio-container" },
16140
+ React.createElement(antd.Radio.Button, { className: "condition-radio", value: k }, t("programme:" + k)))); }))))))),
16141
+ instrument &&
16142
+ instrument.indexOf(exports.Instrument.OTHER) >= 0 && (React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
16143
+ React.createElement(antd.Col, { xl: 12, md: 24 },
16144
+ React.createElement("div", { className: "details-part-two" },
16145
+ React.createElement(antd.Form.Item, { label: t("programme:comments"), name: "comments", rules: [
16146
+ {
16147
+ required: true,
16148
+ message: "",
16149
+ },
16150
+ {
16151
+ validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
16152
+ return __generator(this, function (_a) {
16153
+ if (String(value).trim() === "" ||
16154
+ String(value).trim() ===
16155
+ undefined ||
16156
+ value === null ||
16157
+ value === undefined) {
16158
+ throw new Error("".concat(t("programme:comments"), " ").concat(t("isRequired")));
16159
+ }
16160
+ return [2 /*return*/];
16161
+ });
16162
+ }); },
16163
+ },
16164
+ ] },
16165
+ React.createElement(antd.Input, { size: "large" })))))),
16166
+ React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
16167
+ React.createElement(antd.Col, { xl: 8, md: 12 },
16168
+ React.createElement(antd.Form.Item, { label: t("programme:type"), wrapperCol: { span: 13 }, className: "role-group", name: "type", rules: [
16169
+ {
16170
+ required: false,
16171
+ },
16172
+ ] },
16173
+ React.createElement(antd.Radio.Group, { size: "large" }, Object.values(exports.InvestmentType).map(function (k, index) { return (React.createElement("div", { className: "condition-radio-container" },
16174
+ React.createElement(antd.Radio.Button, { className: "condition-radio", value: k, onClick: function (e) {
16175
+ return deselectOnClick(e, "type");
16176
+ } }, t("programme:" + k)))); })))),
16177
+ React.createElement(antd.Col, { xl: 8, md: 12 },
16178
+ React.createElement(antd.Form.Item, { label: t("programme:level"), wrapperCol: { span: 13 }, className: "role-group", name: "level", rules: [
16179
+ {
16180
+ required: false,
16181
+ },
16182
+ ] },
16183
+ React.createElement(antd.Radio.Group, { size: "large" }, Object.values(exports.InvestmentLevel).map(function (k, index) { return (React.createElement("div", { className: "condition-radio-container" },
16184
+ React.createElement(antd.Radio.Button, { className: "condition-radio", value: k, onClick: function (e) {
16185
+ return deselectOnClick(e, "level");
16186
+ } }, t("programme:" + k)))); })))),
16187
+ React.createElement(antd.Col, { xl: 8, md: 12 },
16188
+ React.createElement(antd.Form.Item, { label: t("programme:stream"), wrapperCol: { span: 13 }, className: "role-group", name: "stream", rules: [
16189
+ {
16190
+ required: false,
16191
+ },
16192
+ ] },
16193
+ React.createElement(antd.Radio.Group, { size: "large" }, Object.values(exports.InvestmentStream).map(function (k, index) { return (React.createElement("div", { className: "condition-radio-container" },
16194
+ React.createElement(antd.Radio.Button, { className: "condition-radio", value: k, onClick: function (e) {
16195
+ return deselectOnClick(e, "stream");
16196
+ } }, t("programme:" + k)))); }))))),
16197
+ React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
16198
+ React.createElement(antd.Col, { xl: 12, md: 24 },
16199
+ React.createElement(antd.Form.Item, { label: t("programme:esgType"), name: "esgClassification" },
16200
+ React.createElement(antd.Select, { size: "large" }, Object.values(exports.ESGType).map(function (esg) { return (React.createElement(antd.Select.Option, { value: esg }, esg)); }))))),
16828
16201
  React.createElement(antd.Form.Item, null,
16829
16202
  React.createElement("div", { className: "steps-actions" },
16830
16203
  React.createElement(antd.Button, { type: "primary", htmlType: "submit", loading: loading, onSubmit: nextOne }, t("programme:next")))))))),
@@ -16834,164 +16207,73 @@ var InvestmentCreationComponent = function (props) {
16834
16207
  React.createElement("div", { className: "step-count" }, "02"),
16835
16208
  React.createElement("div", { className: "title" }, t("programme:ownership")))),
16836
16209
  description: current === 1 && (React.createElement("div", null,
16837
- React.createElement("div", { className: "investment-sought-form-container" },
16838
- React.createElement("div", { className: "investment-sought-form" },
16839
- React.createElement(antd.Form, { labelCol: { span: 20 }, wrapperCol: { span: 24 }, name: "investment-sought", className: "investment-sought-form", layout: "vertical", requiredMark: true },
16840
- React.createElement(antd.Row, { className: "row", gutter: [4, 4] },
16841
- React.createElement(antd.Col, { xl: 8, md: 12 },
16842
- React.createElement(antd.Form.Item, { label: t("programme:typeCreation"), wrapperCol: { span: 13 }, className: "role-group", name: "investmentOwnershipType", rules: [
16210
+ React.createElement("div", { className: "programme-sought-form-container ownership-container" }, Object.keys(data).length > 0 && (React.createElement("div", { className: "programme-sought-form" },
16211
+ React.createElement(antd.Form, { labelCol: { span: 20 }, wrapperCol: { span: 24 }, form: formTwo, name: "investment-sought", className: "investment-sought-form", layout: "vertical", requiredMark: true, onChange: onPercentageChange, onFinish: submitInvestment }, data === null || data === void 0 ? void 0 :
16212
+ data.companyId.map(function (companyId, index) {
16213
+ return (React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
16214
+ React.createElement(antd.Col, { xl: 8, md: 15 },
16215
+ React.createElement("div", { className: "label" },
16216
+ companyName[companyId].name,
16217
+ React.createElement("span", { className: "required-mark" }, "*"))),
16218
+ React.createElement(antd.Col, { xl: 8, md: 9 },
16219
+ React.createElement(antd.Form.Item, { className: "inline", name: ["percentage", index], initialValue: 0, rules: [
16843
16220
  {
16844
- required: false,
16221
+ pattern: new RegExp(/^[+]?([.]\d+|\d+[.]?\d*)$/g),
16222
+ message: "Percentage Should be a positive number",
16845
16223
  },
16846
- ] },
16847
- React.createElement(antd.Radio.Group, { size: "large", defaultValue: typeCreation ==
16848
- exports.InvestmentCreationType.EXISTING
16849
- ? exports.InvestmentOwnershipType.PROJECT
16850
- : investmentOwnershipType }, Object.values(exports.InvestmentOwnershipType).map(function (k, index) {
16851
- if (!(typeCreation ==
16852
- exports.InvestmentCreationType.EXISTING &&
16853
- k == exports.InvestmentOwnershipType.NATIONAL) &&
16854
- !(k ==
16855
- exports.InvestmentOwnershipType.NATIONAL &&
16856
- (data === null || data === void 0 ? void 0 : data.programmeId))) {
16857
- return (React.createElement("div", { className: "condition-radio-container" },
16858
- React.createElement(antd.Tooltip, { title: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ==
16859
- exports.CompanyRole.PROGRAMME_DEVELOPER &&
16860
- stepOneData.toCompanyId !=
16861
- userInfoState.companyId &&
16862
- k ==
16863
- exports.InvestmentOwnershipType.NATIONAL
16864
- ? "This action is unauthorized due to the selected investor name."
16865
- : "", color: TooltipColor, key: TooltipColor },
16866
- React.createElement(antd.Radio.Button, { className: "condition-radio", value: k, onChange: onChangeInvestmentOwnershipType, disabled: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ==
16867
- exports.CompanyRole.PROGRAMME_DEVELOPER &&
16868
- stepOneData.toCompanyId !=
16869
- userInfoState.companyId &&
16870
- k ==
16871
- exports.InvestmentOwnershipType.NATIONAL }, t("programme:" + k)))));
16872
- }
16873
- })))))))),
16874
- React.createElement("div", { className: "programme-sought-form-container ownership-container" },
16875
- React.createElement("div", { className: "programme-sought-form" },
16876
- React.createElement(antd.Form, { labelCol: { span: 20 }, wrapperCol: { span: 24 }, form: formTwo, name: "investment-sought", className: "investment-sought-form", layout: "vertical", requiredMark: true, onChange: onPercentageChange, onFinish: submitInvestment },
16877
- allProjectData.length > 0 &&
16878
- investmentOwnershipType ==
16879
- exports.InvestmentOwnershipType.PROJECT && (React.createElement("div", null,
16880
- React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
16881
- React.createElement(antd.Col, { xl: 12, md: 24 },
16882
- React.createElement("div", { className: "details-part-one" },
16883
- React.createElement(antd.Form.Item, { label: t("programme:title"), name: "projectId", wrapperCol: { span: 24 }, initialValue: (data === null || data === void 0 ? void 0 : data.programmeId) != undefined
16884
- ? allProjectData[0].programmeId
16885
- : null, rules: [
16886
- {
16887
- required: true,
16888
- message: "".concat(t("programme:title"), " ").concat(t("isRequired")),
16889
- },
16890
- ] },
16891
- React.createElement(antd.Select, { size: "large", loading: loadingProgData,
16892
- // defaultValue={
16893
- // allProjectData.length == 1
16894
- // ? allProjectData[0].programmeId
16895
- // : null
16896
- // }
16897
- disabled: allProjectData.length == 1 &&
16898
- (data === null || data === void 0 ? void 0 : data.programmeId) != undefined, onChange: setSelectedProgramme }, allProjectData.map(function (project) {
16899
- if ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ==
16900
- exports.CompanyRole.PROGRAMME_DEVELOPER &&
16901
- Number(stepOneData.toCompanyId) !=
16902
- userInfoState.companyId) {
16903
- if (project.companyId
16904
- .map(function (id) { return Number(id); })
16905
- .includes(userInfoState.companyId)) {
16906
- return (React.createElement(antd.Select.Option, { key: project.programmeId, value: project.programmeId }, project.title));
16907
- }
16908
- }
16909
- else if ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
16910
- exports.CompanyRole.MINISTRY) {
16911
- if (ministrySectoralScope.includes(project.sectoralScope)) {
16912
- return (React.createElement(antd.Select.Option, { key: project.programmeId, value: project.programmeId }, project.title));
16224
+ {
16225
+ required: true,
16226
+ message: "Required field",
16227
+ },
16228
+ function (_a) {
16229
+ var getFieldValue = _a.getFieldValue;
16230
+ return ({
16231
+ validator: function (rule, v) {
16232
+ if (getFieldValue([
16233
+ "percentage",
16234
+ index,
16235
+ ]) &&
16236
+ parseFloat(getFieldValue([
16237
+ "percentage",
16238
+ index,
16239
+ ])) >
16240
+ data.proponentPercentage[index]) {
16241
+ // eslint-disable-next-line prefer-promise-reject-errors
16242
+ return Promise.reject("Amount > Available");
16913
16243
  }
16914
- }
16915
- else {
16916
- return (React.createElement(antd.Select.Option, { key: project.programmeId, value: project.programmeId }, project.title));
16917
- }
16918
- })))))), projectData === null || projectData === void 0 ? void 0 :
16919
- projectData.companyId.map(function (companyId, index) {
16920
- if (formTwo.getFieldValue("percentage") &&
16921
- formTwo.getFieldValue("percentage")[index] &&
16922
- companyId == stepOneData.toCompanyId) {
16923
- formTwo.getFieldValue("percentage")[index] = 0;
16924
- }
16925
- return (React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
16926
- React.createElement(antd.Col, { xl: 8, md: 15 },
16927
- React.createElement("div", { className: "label" },
16928
- govData.companyId == companyId
16929
- ? govData.name
16930
- : companyNames[Number(companyId)],
16931
- React.createElement("span", { className: "required-mark" }, "*"))),
16932
- React.createElement(antd.Col, { xl: 8, md: 9 },
16933
- React.createElement(antd.Form.Item, { className: "inline", name: ["percentage", index], initialValue: 0, rules: [
16934
- {
16935
- pattern: new RegExp(/^[+]?([.]\d+|\d+[.]?\d*)$/g),
16936
- message: "Percentage Should be a positive number",
16244
+ return Promise.resolve();
16937
16245
  },
16938
- {
16939
- required: true,
16940
- message: "Required field",
16941
- },
16942
- function (_a) {
16943
- var getFieldValue = _a.getFieldValue;
16944
- return ({
16945
- validator: function (rule, v) {
16946
- if (getFieldValue([
16947
- "percentage",
16948
- index,
16949
- ]) &&
16950
- parseFloat(getFieldValue([
16951
- "percentage",
16952
- index,
16953
- ])) >
16954
- projectData
16955
- .proponentPercentage[index]) {
16956
- // eslint-disable-next-line prefer-promise-reject-errors
16957
- return Promise.reject("Amount > Available");
16958
- }
16959
- return Promise.resolve();
16960
- },
16961
- });
16962
- },
16963
- ] },
16964
- React.createElement(antd.InputNumber, { placeholder: "", controls: false, disabled: govData.companyId ==
16965
- companyId ||
16966
- companyId ==
16967
- stepOneData.toCompanyId, value: 0,
16968
- // disabled={userInfoState?.companyId === Number(companyId)}
16969
- onKeyPress: function (event) {
16970
- if (!/[0-9\.]/.test(event.key)) {
16971
- event.preventDefault();
16972
- }
16973
- } })),
16974
- React.createElement("div", { className: "inline separator" }, "/"),
16975
- React.createElement(antd.Form.Item, { className: "inline" },
16976
- React.createElement(antd.InputNumber, { placeholder: String(projectData === null || projectData === void 0 ? void 0 : projectData.proponentPercentage[index]), disabled: true })))));
16977
- }),
16978
- React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
16979
- React.createElement(antd.Col, { xl: 8, md: 15 },
16980
- React.createElement("div", { className: "label" }, t("programme:total"))),
16981
- React.createElement(antd.Col, { xl: 8, md: 9 },
16982
- React.createElement(antd.Form.Item, { className: "inline", name: ["total"] },
16983
- React.createElement(antd.InputNumber, { placeholder: currentPercTotal + "", controls: false, disabled: true, onKeyPress: function (event) {
16984
- if (!/[0-9\.]/.test(event.key)) {
16985
- event.preventDefault();
16986
- }
16987
- } })),
16988
- React.createElement("div", { className: "inline separator" }, "/"),
16989
- React.createElement(antd.Form.Item, { className: "inline" },
16990
- React.createElement(antd.InputNumber, { disabled: true, placeholder: "100" })))))),
16991
- React.createElement(antd.Form.Item, null,
16992
- React.createElement("div", { className: "steps-actions" },
16993
- React.createElement(antd.Button, { type: "primary", htmlType: "submit", loading: loading, onSubmit: submitInvestment }, t("programme:submit")),
16994
- React.createElement(antd.Button, { className: "back-btn", onClick: function () { return prevOne(); }, loading: loading }, t("programme:back"))))))))),
16246
+ });
16247
+ },
16248
+ ] },
16249
+ React.createElement(antd.InputNumber, { placeholder: "", controls: false, disabled: govData.companyId == companyId,
16250
+ // disabled={userInfoState?.companyId === Number(companyId)}
16251
+ onKeyPress: function (event) {
16252
+ if (!/[0-9\.]/.test(event.key)) {
16253
+ event.preventDefault();
16254
+ }
16255
+ } })),
16256
+ React.createElement("div", { className: "inline separator" }, "/"),
16257
+ React.createElement(antd.Form.Item, { className: "inline" },
16258
+ React.createElement(antd.InputNumber, { placeholder: String(data === null || data === void 0 ? void 0 : data.proponentPercentage[index]), disabled: true })))));
16259
+ }),
16260
+ React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
16261
+ React.createElement(antd.Col, { xl: 8, md: 15 },
16262
+ React.createElement("div", { className: "label" }, t("programme:total"))),
16263
+ React.createElement(antd.Col, { xl: 8, md: 9 },
16264
+ React.createElement(antd.Form.Item, { className: "inline", name: ["total"] },
16265
+ React.createElement(antd.InputNumber, { placeholder: currentPercTotal + "", controls: false, disabled: true, onKeyPress: function (event) {
16266
+ if (!/[0-9\.]/.test(event.key)) {
16267
+ event.preventDefault();
16268
+ }
16269
+ } })),
16270
+ React.createElement("div", { className: "inline separator" }, "/"),
16271
+ React.createElement(antd.Form.Item, { className: "inline" },
16272
+ React.createElement(antd.InputNumber, { disabled: true, placeholder: "100" })))),
16273
+ React.createElement(antd.Form.Item, null,
16274
+ React.createElement("div", { className: "steps-actions" },
16275
+ React.createElement(antd.Button, { type: "primary", htmlType: "submit", loading: loading, onSubmit: submitInvestment }, t("programme:submit")),
16276
+ React.createElement(antd.Button, { className: "back-btn", onClick: function () { return prevOne(); }, loading: loading }, t("programme:back")))))))))),
16995
16277
  },
16996
16278
  ] })))));
16997
16279
  };
@@ -17102,7 +16384,7 @@ var InvestmentActionModel = function (props) {
17102
16384
  };
17103
16385
 
17104
16386
  var InvestmentManagementComponent = function (props) {
17105
- var translator = props.translator, onNavigateToProgrammeView = props.onNavigateToProgrammeView, onClickAddOwnership = props.onClickAddOwnership, enableAddOwnership = props.enableAddOwnership;
16387
+ var translator = props.translator, useConnection = props.useConnection, onNavigateToProgrammeView = props.onNavigateToProgrammeView, useUserContext = props.useUserContext, useSettingsContext = props.useSettingsContext, onClickAddOwnership = props.onClickAddOwnership, enableAddOwnership = props.enableAddOwnership;
17106
16388
  var t = translator.t;
17107
16389
  var statusOptions = Object.keys(exports.InvestmentStatus).map(function (k, index) { return ({
17108
16390
  label: addSpaces(Object.values(exports.InvestmentStatus)[index]),
@@ -17492,10 +16774,7 @@ var InvestmentManagementComponent = function (props) {
17492
16774
  sorter: true,
17493
16775
  align: "left",
17494
16776
  render: function (item) {
17495
- if (item) {
17496
- return React.createElement("span", { className: "clickable" }, item);
17497
- }
17498
- return React.createElement("span", null, "-");
16777
+ return React.createElement("span", { className: "clickable" }, item);
17499
16778
  },
17500
16779
  onCell: function (record, rowIndex) {
17501
16780
  return {
@@ -17553,12 +16832,6 @@ var InvestmentManagementComponent = function (props) {
17553
16832
  key: "programmeSector",
17554
16833
  sorter: true,
17555
16834
  align: "left",
17556
- render: function (item) {
17557
- if (item) {
17558
- return React.createElement("span", null, item);
17559
- }
17560
- return React.createElement("span", null, "-");
17561
- },
17562
16835
  },
17563
16836
  {
17564
16837
  title: t("programme:investor"),
@@ -17642,11 +16915,7 @@ var InvestmentManagementComponent = function (props) {
17642
16915
  React.createElement("div", { className: "title-bar" },
17643
16916
  React.createElement("div", { className: "body-title" }, t("programme:investmentTitle")),
17644
16917
  React.createElement("div", { className: "body-sub-title" }, t("programme:investmentDesc"))),
17645
- React.createElement("div", { className: "actions" }, enableAddOwnership &&
17646
- ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) == exports.CompanyRole.MINISTRY ||
17647
- (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) == exports.CompanyRole.GOVERNMENT ||
17648
- (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) == exports.CompanyRole.PROGRAMME_DEVELOPER) &&
17649
- userInfoState.userRole != exports.Role.ViewOnly && (React.createElement("div", { className: "action-bar" },
16918
+ React.createElement("div", { className: "actions" }, enableAddOwnership && (React.createElement("div", { className: "action-bar" },
17650
16919
  React.createElement(antd.Button, { type: "primary", size: "large", block: true, icon: React.createElement(icons.PlusOutlined, null), onClick: onClickAddOwnership }, t("programme:addOwnership")))))),
17651
16920
  React.createElement("div", { className: "content-card" },
17652
16921
  React.createElement(antd.Row, null,
@@ -17693,7 +16962,7 @@ var InvestmentManagementComponent = function (props) {
17693
16962
  return handleTableChange(val, sorter);
17694
16963
  }, locale: {
17695
16964
  emptyText: (React.createElement(antd.Empty, { image: antd.Empty.PRESENTED_IMAGE_SIMPLE, description: tableData.length === 0
17696
- ? t("programme:noInvestmentData")
16965
+ ? t("creditTransfer:noTransfer")
17697
16966
  : null })),
17698
16967
  } }))))),
17699
16968
  popupInfo && selectedReq && (React.createElement(InvestmentActionModel, { investment: selectedReq, onCancel: function () {
@@ -17706,7 +16975,7 @@ var css_248z$l = ".steps-actions {\n display: flex;\n flex-direction: row-reve
17706
16975
  styleInject(css_248z$l);
17707
16976
 
17708
16977
  var SupportCreationComponent = function (props) {
17709
- var t = props.t, useLocation = props.useLocation; props.onNavigateToProgrammeManagementView; props.onNavigateToProgrammeView;
16978
+ var t = props.t, useConnection = props.useConnection, userInfoState = props.userInfoState, useLocation = props.useLocation; props.onNavigateToProgrammeManagementView; props.onNavigateToProgrammeView;
17710
16979
  useLocation().state;
17711
16980
  var _a = React.useState(); _a[0]; _a[1];
17712
16981
  var formOne = antd.Form.useForm()[0];
@@ -17719,7 +16988,6 @@ var SupportCreationComponent = function (props) {
17719
16988
  var _f = React.useState([]), organisationsList = _f[0], setOrganisationList = _f[1];
17720
16989
  var _g = React.useState([]), instrument = _g[0], setInstrument = _g[1];
17721
16990
  var _h = React.useState(); _h[0]; var setStepOneData = _h[1];
17722
- var userInfoState = useUserContext().userInfoState;
17723
16991
  var instrumentOptions = Object.keys(exports.Instrument).map(function (k, index) { return ({
17724
16992
  label: addSpaces(Object.values(exports.Instrument)[index]),
17725
16993
  value: Object.values(exports.Instrument)[index],
@@ -18062,7 +17330,7 @@ var SupportCreationComponent = function (props) {
18062
17330
  };
18063
17331
 
18064
17332
  var SupportManagementComponent = function (props) {
18065
- var translator = props.translator; props.onNavigateToProgrammeView; var enableAddSupport = props.enableAddSupport, onClickAddSupport = props.onClickAddSupport;
17333
+ var translator = props.translator, useConnection = props.useConnection; props.onNavigateToProgrammeView; var useUserContext = props.useUserContext, useSettingsContext = props.useSettingsContext, enableAddSupport = props.enableAddSupport, onClickAddSupport = props.onClickAddSupport;
18066
17334
  var t = translator.t;
18067
17335
  var statusOptions = Object.keys(exports.InvestmentStatus).map(function (k, index) { return ({
18068
17336
  label: addSpaces(Object.values(exports.InvestmentStatus)[index]),
@@ -18564,7 +17832,7 @@ var css_248z$k = ".ndc-management .ant-checkbox-checked .ant-checkbox-input[valu
18564
17832
  styleInject(css_248z$k);
18565
17833
 
18566
17834
  var NdcActionManagementComponent = function (props) {
18567
- var t = props.t, onNavigateToNdcManagementView = props.onNavigateToNdcManagementView, onNavigateToProgrammeManagementView = props.onNavigateToProgrammeManagementView;
17835
+ var t = props.t, useConnection = props.useConnection, useUserContext = props.useUserContext, onNavigateToNdcManagementView = props.onNavigateToNdcManagementView, onNavigateToProgrammeManagementView = props.onNavigateToProgrammeManagementView;
18568
17836
  var _a = React.useState(true), checkAll = _a[0], setCheckAll = _a[1];
18569
17837
  var _b = React.useState([]), tableData = _b[0], setTableData = _b[1];
18570
17838
  var _c = React.useState(), totalProgramme = _c[0], setTotalProgramme = _c[1];
@@ -19978,7 +19246,7 @@ var GenderParity = function (props) {
19978
19246
  };
19979
19247
 
19980
19248
  var Assessment = function (props) {
19981
- var onFormSubmit = props.onFormSubmit, assessmentViewData = props.assessmentViewData, viewOnly = props.viewOnly, translator = props.translator;
19249
+ var onFormSubmit = props.onFormSubmit, assessmentViewData = props.assessmentViewData, viewOnly = props.viewOnly, useConnection = props.useConnection, translator = props.translator;
19982
19250
  translator.setDefaultNamespace("coBenifits");
19983
19251
  var t = translator.t;
19984
19252
  var form1 = antd.Form.useForm()[0];
@@ -22383,7 +21651,7 @@ var SocialEnvironmentalRisk = function (props) {
22383
21651
  };
22384
21652
 
22385
21653
  var CoBenifitsComponent = function (props) {
22386
- 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;
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, useConnection = props.useConnection;
22387
21655
  var _b = React.useState(), coBenefitDetails = _b[0], setCoBenefitDetails = _b[1];
22388
21656
  var _c = React.useState(true), isSocialFormValid = _c[0], setIsSocialFormValid = _c[1];
22389
21657
  var _d = React.useState(true), isAssessmentFormValid = _d[0], setIsAssessmentFormValid = _d[1];
@@ -22457,7 +21725,7 @@ var CoBenifitsComponent = function (props) {
22457
21725
  label: t("coBenifits:assessment"),
22458
21726
  key: "7",
22459
21727
  children: (React.createElement(Assessment, { onFormSubmit: onAssessmentFormSubmit, assessmentViewData: (viewOnly && (coBenifitsViewDetails === null || coBenifitsViewDetails === void 0 ? void 0 : coBenifitsViewDetails.assessmentDetails)) ||
22460
- (!viewOnly && (coBenefitsDetails === null || coBenefitsDetails === void 0 ? void 0 : coBenefitsDetails.assessmentDetails)), viewOnly: viewOnly || false, translator: translator })),
21728
+ (!viewOnly && (coBenefitsDetails === null || coBenefitsDetails === void 0 ? void 0 : coBenefitsDetails.assessmentDetails)), viewOnly: viewOnly || false, useConnection: useConnection, translator: translator })),
22461
21729
  },
22462
21730
  {
22463
21731
  label: t("coBenifits:socialEnvironmentalRisk"),
@@ -22626,7 +21894,7 @@ var CoBenifitsComponent = function (props) {
22626
21894
  };
22627
21895
 
22628
21896
  var AddNdcActionComponent = function (props) {
22629
- var useLocation = props.useLocation, onNavigateToProgrammeManagementView = props.onNavigateToProgrammeManagementView, onNavigateToProgrammeView = props.onNavigateToProgrammeView, sdgGoalImages = props.sdgGoalImages, translator = props.translator;
21897
+ var useConnection = props.useConnection, useLocation = props.useLocation, onNavigateToProgrammeManagementView = props.onNavigateToProgrammeManagementView, onNavigateToProgrammeView = props.onNavigateToProgrammeView, sdgGoalImages = props.sdgGoalImages, translator = props.translator;
22630
21898
  translator.setDefaultNamespace("ndcAction");
22631
21899
  var t = translator.t;
22632
21900
  var _a = React.useState(1), current = _a[0], setCurrent = _a[1];
@@ -22768,7 +22036,7 @@ var AddNdcActionComponent = function (props) {
22768
22036
  description: (React.createElement("div", { className: current !== 2 ? "hide" : "" },
22769
22037
  React.createElement(CoBenifitsComponent, { onClickedBackBtn: onClickBackCoBenefits, coBenefitsDetails: ndcActionDetails ? ndcActionDetails.coBenefitsProperties : {}, onFormSubmit: onCoBenefitsSubmit, submitButtonText: isProjectReportsVisible()
22770
22038
  ? t("ndcAction:next")
22771
- : t("ndcAction:submit"), loading: loading, sdgGoalImages: sdgGoalImages, translator: translator }))),
22039
+ : t("ndcAction:submit"), loading: loading, sdgGoalImages: sdgGoalImages, useConnection: useConnection, translator: translator }))),
22772
22040
  },
22773
22041
  ];
22774
22042
  if (isProjectReportsVisible()) {
@@ -22905,7 +22173,7 @@ var uploadDocUserPermission = function (userInfoState, docType, programmeOwnerId
22905
22173
  var NdcActionViewComponent = function (props) {
22906
22174
  var _a;
22907
22175
  var _b, _c;
22908
- var useLocation = props.useLocation, onNavigateToNdcManagementView = props.onNavigateToNdcManagementView, translator = props.translator, sdgGoalImages = props.sdgGoalImages, Chart = props.Chart;
22176
+ var useUserContext = props.useUserContext, useConnection = props.useConnection, useLocation = props.useLocation, onNavigateToNdcManagementView = props.onNavigateToNdcManagementView, translator = props.translator, sdgGoalImages = props.sdgGoalImages, Chart = props.Chart;
22909
22177
  translator.setDefaultNamespace("ndcAction");
22910
22178
  var t = translator.t;
22911
22179
  var userInfoState = useUserContext().userInfoState;
@@ -23404,7 +22672,7 @@ var NdcActionViewComponent = function (props) {
23404
22672
  React.createElement(antd.Card, { className: "card-container" },
23405
22673
  React.createElement("div", { className: "co-benifits-view" },
23406
22674
  React.createElement("div", { className: "title" }, t("ndcAction:coBenefitsSubTitle")),
23407
- 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 })))))))));
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, useConnection: useConnection, translator: translator })))))))));
23408
22676
  };
23409
22677
 
23410
22678
  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";
@@ -23557,7 +22825,7 @@ var TransferActionModel = function (props) {
23557
22825
  };
23558
22826
 
23559
22827
  var CreditTransferComponent = function (props) {
23560
- var translator = props.translator, onNavigateToProgrammeView = props.onNavigateToProgrammeView;
22828
+ var useConnection = props.useConnection, useUserContext = props.useUserContext, useSettingsContext = props.useSettingsContext, translator = props.translator, onNavigateToProgrammeView = props.onNavigateToProgrammeView;
23561
22829
  var userInfoState = useUserContext().userInfoState;
23562
22830
  var t = translator.t;
23563
22831
  var statusOptions = Object.keys(exports.CreditTransferStage).map(function (k, index) { return ({
@@ -24550,8 +23818,8 @@ var MapStatsComponent = function (props) {
24550
23818
 
24551
23819
  var RangePicker$2 = antd.DatePicker.RangePicker;
24552
23820
  var MrvDashboardComponent = function (props) {
24553
- var Link = props.Link, Chart = props.Chart, t = props.t, ButtonGroup = props.ButtonGroup, _a = props.isMultipleDashboardsVisible, isMultipleDashboardsVisible = _a === void 0 ? false : _a;
24554
- var _b = useConnection(); _b.get; var post = _b.post; _b.delete; var statServerUrl = _b.statServerUrl;
23821
+ var useConnection = props.useConnection, useUserContext = props.useUserContext, Link = props.Link, Chart = props.Chart, t = props.t, ButtonGroup = props.ButtonGroup, _a = props.isMultipleDashboardsVisible, isMultipleDashboardsVisible = _a === void 0 ? false : _a;
23822
+ var _b = useConnection(); _b.get; var post = _b.post; _b.delete;
24555
23823
  var _c = React.useState({}), data = _c[0], setData = _c[1];
24556
23824
  var _e = React.useState(false), loading = _e[0], setLoading = _e[1];
24557
23825
  var userInfoState = useUserContext().userInfoState;
@@ -25034,7 +24302,7 @@ var MrvDashboardComponent = function (props) {
25034
24302
  _e.label = 1;
25035
24303
  case 1:
25036
24304
  _e.trys.push([1, 3, 4, 5]);
25037
- return [4 /*yield*/, post("stats/programme/agg", genPayload(), undefined, statServerUrl)];
24305
+ return [4 /*yield*/, post("stats/programme/agg", genPayload(), undefined, process.env.REACT_APP_STAT_URL)];
25038
24306
  case 2:
25039
24307
  response = _e.sent();
25040
24308
  console.log("Response", response);
@@ -25975,215 +25243,19 @@ var optionDonutPieB = {
25975
25243
  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";
25976
25244
  styleInject(css_248z$8);
25977
25245
 
25978
- var toolTipTextGen = function (companyRole, cardType, mine) {
25979
- var text = '';
25980
- if (companyRole === exports.CompanyRole.GOVERNMENT) {
25981
- if (cardType === exports.StatsCardsTypes.PROGRAMMES_PENDING) {
25982
- text = 'Pending state projects awaiting authorisation';
25983
- }
25984
- else if (cardType === exports.StatsCardsTypes.TRANSFER_REQUEST_SENT) {
25985
- text =
25986
- 'Pending credit transfer requests sent to project owners initiated by your organisation';
25987
- }
25988
- else if (cardType === exports.StatsCardsTypes.CREDIT_BALANCE) {
25989
- text = 'Total credit balance owned by your organisation';
25990
- }
25991
- else if (cardType === exports.StatsCardsTypes.PROGRAMMES) {
25992
- text =
25993
- 'Number of projects created during the specified period and their project state in the carbon registry at present';
25994
- }
25995
- else if (cardType === exports.StatsCardsTypes.CREDITS) {
25996
- text =
25997
- 'Number of credits of projects created during the specified period and their credit state in the carbon registry at present';
25998
- }
25999
- else if (cardType === exports.StatsCardsTypes.CERTIFIED_CREDITS) {
26000
- text =
26001
- 'Number of credits of projects created during the specified period, uncertified, certified and revoked in the carbon registry at present';
26002
- }
26003
- else if (cardType === exports.StatsCardsTypes.TOTAL_PROGRAMMES) {
26004
- text =
26005
- 'Graphical representation of the number of projects created during the specified period in each project state in the carbon registry at present';
26006
- }
26007
- else if (cardType === exports.StatsCardsTypes.TOTAL_PROGRAMMES_SECTOR) {
26008
- text =
26009
- 'Graphical representation of the number of projects in each project sector created during the specified time in the carbon registry';
26010
- }
26011
- else if (cardType === exports.StatsCardsTypes.TOTAL_CREDITS) {
26012
- text =
26013
- 'Graphical representation of the number of credits of projects created during the specified period in each credit state in the carbon registry at present';
26014
- }
26015
- else if (cardType === exports.StatsCardsTypes.TOTAL_CREDITS_CERTIFIED) {
26016
- text =
26017
- 'Graphical representation of the number of credits of projects created during the specified period certified, uncertified and revoked in the carbon registry at present';
26018
- }
26019
- else if (cardType === exports.StatsCardsTypes.PROGRAMME_LOCATIONS) {
26020
- text =
26021
- 'Locations of the projects created during the specified period and their project states in the carbon registry at present';
26022
- }
26023
- else if (cardType === exports.StatsCardsTypes.TRANSFER_LOCATIONS_INTERNATIONAL) {
26024
- text =
26025
- 'Locations of credits of international transfer requests recognised during the specified period';
26026
- }
26027
- }
26028
- else if (companyRole === exports.CompanyRole.PROGRAMME_DEVELOPER) {
26029
- if (cardType === exports.StatsCardsTypes.TRANSFER_REQUEST_RECEIVED) {
26030
- text = 'Pending credit transfer requests received by your organisation';
26031
- }
26032
- else if (cardType === exports.StatsCardsTypes.TRANSFER_REQUEST_SENT) {
26033
- text = 'Pending local credit transfer requests initiated by your organisation';
26034
- }
26035
- else if (cardType === exports.StatsCardsTypes.CREDIT_BALANCE) {
26036
- text = 'Total credit balance owned by your organisation';
26037
- }
26038
- else if (cardType === exports.StatsCardsTypes.PROGRAMMES) {
26039
- text =
26040
- 'Number of projects created during the specified period and their project state in the carbon registry at present, owned by your organisation';
26041
- }
26042
- else if (cardType === exports.StatsCardsTypes.CREDITS) {
26043
- text =
26044
- 'Number of credits of projects created during the specified period and their credit state in the carbon registry at present, owned by your organisation';
26045
- }
26046
- else if (cardType === exports.StatsCardsTypes.CERTIFIED_CREDITS) {
26047
- text =
26048
- 'Number of credits of projects created during the specified period, uncertified, certified and revoked in the carbon registry at present, owned by your organisation';
26049
- }
26050
- else if (cardType === exports.StatsCardsTypes.TOTAL_PROGRAMMES) {
26051
- text =
26052
- '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';
26053
- }
26054
- else if (cardType === exports.StatsCardsTypes.TOTAL_PROGRAMMES_SECTOR) {
26055
- text =
26056
- 'Graphical representation of the number of projects owned by your organisation, in each project sector created during the specified time in the carbon registry';
26057
- }
26058
- else if (cardType === exports.StatsCardsTypes.TOTAL_CREDITS) {
26059
- text =
26060
- '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';
26061
- }
26062
- else if (cardType === exports.StatsCardsTypes.TOTAL_CREDITS_CERTIFIED) {
26063
- text =
26064
- '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';
26065
- }
26066
- else if (cardType === exports.StatsCardsTypes.PROGRAMME_LOCATIONS) {
26067
- text =
26068
- 'Locations of the projects created during the specified period, owned by your organisation, and their project states in the carbon registry at present';
26069
- }
26070
- else if (cardType === exports.StatsCardsTypes.TRANSFER_LOCATIONS_INTERNATIONAL) {
26071
- text =
26072
- 'Locations of credits international transfer requests of projects owned by your organisation recognised during the specified period';
26073
- }
26074
- }
26075
- else if (companyRole === exports.CompanyRole.CERTIFIER && mine === true) {
26076
- if (cardType === exports.StatsCardsTypes.PROGRAMMES_UNCERTIFIED) {
26077
- text =
26078
- 'Number of projects not yet certified including certificates revoked by your organisation';
26079
- }
26080
- else if (cardType === exports.StatsCardsTypes.PROGRAMMES_CERTIFIED) {
26081
- text = 'Number of projects certified by your organisation';
26082
- }
26083
- else if (cardType === exports.StatsCardsTypes.CREDIT_CERTIFIED) {
26084
- text = 'Number of credits certified by your organisation';
26085
- }
26086
- else if (cardType === exports.StatsCardsTypes.PROGRAMMES) {
26087
- text =
26088
- 'Number of projects created during the specified period, certified by your organisation, and their project state in the carbon registry at present';
26089
- }
26090
- else if (cardType === exports.StatsCardsTypes.CREDITS) {
26091
- text =
26092
- 'Number of credits of projects created during the specified period, certified by your organisation and their credit state in the carbon registry at present';
26093
- }
26094
- else if (cardType === exports.StatsCardsTypes.CERTIFIED_CREDITS) {
26095
- text =
26096
- 'Number of credits of projects created during the specified period, certified by your organisation, uncertified, certified and revoked in the carbon registry at present';
26097
- }
26098
- else if (cardType === exports.StatsCardsTypes.TOTAL_PROGRAMMES) {
26099
- text =
26100
- 'Graphical representation of the number of projects in each project sector created during the specified time, certified by your company, in the carbon registry';
26101
- }
26102
- else if (cardType === exports.StatsCardsTypes.TOTAL_PROGRAMMES_SECTOR) {
26103
- text =
26104
- 'Graphical representation of the number of projects in each project sector created during the specified time, certified by your company, in the carbon registry';
26105
- }
26106
- else if (cardType === exports.StatsCardsTypes.TOTAL_CREDITS) {
26107
- text =
26108
- 'Graphical representation of the number of credits of projects created during the specified period in each credit state in the carbon registry at present';
26109
- }
26110
- else if (cardType === exports.StatsCardsTypes.TOTAL_CREDITS_CERTIFIED) {
26111
- text =
26112
- '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';
26113
- }
26114
- else if (cardType === exports.StatsCardsTypes.PROGRAMME_LOCATIONS) {
26115
- text =
26116
- 'Locations of the projects created during the specified period, certified by your organisation, and their project states in the carbon registry at present';
26117
- }
26118
- else if (cardType === exports.StatsCardsTypes.TRANSFER_LOCATIONS_INTERNATIONAL) {
26119
- text =
26120
- 'Locations of credits of international transfer requests of projects certified by your organisation recognised during the specified period';
26121
- }
26122
- }
26123
- else if (companyRole === exports.CompanyRole.CERTIFIER && !mine) {
26124
- if (cardType === exports.StatsCardsTypes.PROGRAMMES_UNCERTIFIED) {
26125
- text =
26126
- 'Number of projects not yet certified including certificates revoked by your organisation';
26127
- }
26128
- else if (cardType === exports.StatsCardsTypes.PROGRAMMES_CERTIFIED) {
26129
- text = 'Number of projects certified by your organisation';
26130
- }
26131
- else if (cardType === exports.StatsCardsTypes.CREDIT_CERTIFIED) {
26132
- text = 'Number of credits certified by your organisation';
26133
- }
26134
- else if (cardType === exports.StatsCardsTypes.PROGRAMMES) {
26135
- text =
26136
- 'Number of projects created during the specified period and their project state in the carbon registry at present';
26137
- }
26138
- else if (cardType === exports.StatsCardsTypes.CREDITS) {
26139
- text =
26140
- 'Number of credits of projects created during the specified period and their credit state in the carbon registry at present';
26141
- }
26142
- else if (cardType === exports.StatsCardsTypes.CERTIFIED_CREDITS) {
26143
- text =
26144
- 'Number of credits of projects created during the specified period, uncertified, certified and revoked in the carbon registry at present';
26145
- }
26146
- else if (cardType === exports.StatsCardsTypes.TOTAL_PROGRAMMES) {
26147
- text =
26148
- 'Graphical representation of the number of projects created during the specified period in each project state in the carbon registry at present';
26149
- }
26150
- else if (cardType === exports.StatsCardsTypes.TOTAL_PROGRAMMES_SECTOR) {
26151
- text =
26152
- 'Graphical representation of the number of projects in each project sector created during the specified time in the carbon registry';
26153
- }
26154
- else if (cardType === exports.StatsCardsTypes.TOTAL_CREDITS) {
26155
- text =
26156
- 'Graphical representation of the number of credits of projects created during the specified period in each credit state in the carbon registry at present';
26157
- }
26158
- else if (cardType === exports.StatsCardsTypes.TOTAL_CREDITS_CERTIFIED) {
26159
- text =
26160
- 'Graphical representation of the number of credits of projects created during the specified period certified, uncertified and revoked in the carbon registry at present';
26161
- }
26162
- else if (cardType === exports.StatsCardsTypes.PROGRAMME_LOCATIONS) {
26163
- text =
26164
- 'Locations of the projects created during the specified period and their project states in the carbon registry at present';
26165
- }
26166
- else if (cardType === exports.StatsCardsTypes.TRANSFER_LOCATIONS_INTERNATIONAL) {
26167
- text =
26168
- 'Locations of credits of international transfer requests recognised during the specified period';
26169
- }
26170
- }
26171
- return text;
26172
- };
26173
-
26174
25246
  var StasticCard = function (props) {
26175
- var value = props.value, title = props.title, updatedDate = props.updatedDate, icon = props.icon, loading = props.loading, companyRole = props.companyRole;
25247
+ var value = props.value, title = props.title, updatedDate = props.updatedDate, icon = props.icon, loading = props.loading; props.companyRole; var tooltip = props.tooltip, t = props.t;
26176
25248
  return (React.createElement("div", { className: "stastic-card-main-container" }, loading ? (React.createElement(antd.Skeleton, { active: true })) : (React.createElement(React.Fragment, null,
26177
25249
  React.createElement("div", { className: "title-section" },
26178
- React.createElement("div", { className: "title" }, title),
25250
+ React.createElement("div", { className: "title" }, t(title)),
26179
25251
  React.createElement("div", { className: "info-container" },
26180
- React.createElement(antd.Tooltip, { arrowPointAtCenter: true, placement: "bottomRight", trigger: "hover", title: toolTipTextGen(companyRole, title) },
25252
+ React.createElement(antd.Tooltip, { arrowPointAtCenter: true, placement: "bottomRight", trigger: "hover", title: tooltip },
26181
25253
  React.createElement(Icon.InfoCircle, { color: "#000000", size: 17 })))),
26182
25254
  React.createElement("div", { className: "values-section" },
26183
25255
  React.createElement("div", { className: "values-and-unit" },
26184
- title.includes('Credit') && React.createElement("div", { className: "unit" }, "ITMOs"),
26185
- React.createElement("div", { className: "value" }, title.includes('Credit')
26186
- ? value === 0 || String(value) === 'NaN'
25256
+ title.includes("credit") && React.createElement("div", { className: "unit" }, "ITMOs"),
25257
+ React.createElement("div", { className: "value" }, title.includes("credit")
25258
+ ? value === 0 || String(value) === "NaN"
26187
25259
  ? 0
26188
25260
  : addCommSep(value)
26189
25261
  : value)),
@@ -26285,8 +25357,8 @@ var RegistryBarChartsStatComponent = function (props) {
26285
25357
 
26286
25358
  var RangePicker$1 = antd.DatePicker.RangePicker;
26287
25359
  var RegistryDashboardComponent = function (props) {
26288
- var Chart = props.Chart, t = props.t, ButtonGroup = props.ButtonGroup, Link = props.Link, _a = props.isMultipleDashboardsVisible, isMultipleDashboardsVisible = _a === void 0 ? false : _a;
26289
- var _b = useConnection(); _b.get; var post = _b.post; _b.delete; var statServerUrl = _b.statServerUrl;
25360
+ var useUserContext = props.useUserContext, useConnection = props.useConnection, Chart = props.Chart, t = props.t, ButtonGroup = props.ButtonGroup, Link = props.Link, _a = props.isMultipleDashboardsVisible, isMultipleDashboardsVisible = _a === void 0 ? false : _a;
25361
+ var _b = useConnection(); _b.get; var post = _b.post; _b.delete;
26290
25362
  var userInfoState = useUserContext().userInfoState;
26291
25363
  var _c = React.useState(false), loadingWithoutTimeRange = _c[0], setLoadingWithoutTimeRange = _c[1];
26292
25364
  var _e = React.useState(false), loading = _e[0], setLoading = _e[1];
@@ -26733,7 +25805,7 @@ var RegistryDashboardComponent = function (props) {
26733
25805
  _253.label = 1;
26734
25806
  case 1:
26735
25807
  _253.trys.push([1, 3, 4, 5]);
26736
- return [4 /*yield*/, post("stats/programme/agg", getAllChartsParams(), undefined, statServerUrl)];
25808
+ return [4 /*yield*/, post("stats/programme/agg", getAllChartsParams(), undefined, process.env.REACT_APP_STAT_URL)];
26737
25809
  case 2:
26738
25810
  response = _253.sent();
26739
25811
  totalCreditsCertifiedStats = void 0;
@@ -27010,7 +26082,7 @@ var RegistryDashboardComponent = function (props) {
27010
26082
  _77.label = 1;
27011
26083
  case 1:
27012
26084
  _77.trys.push([1, 3, 4, 5]);
27013
- return [4 /*yield*/, post("stats/programme/agg", getAllProgrammeAnalyticsStatsParamsWithoutTimeRange(), undefined, statServerUrl)];
26085
+ return [4 /*yield*/, post("stats/programme/agg", getAllProgrammeAnalyticsStatsParamsWithoutTimeRange(), undefined, process.env.REACT_APP_STAT_URL)];
27014
26086
  case 2:
27015
26087
  response = _77.sent();
27016
26088
  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;
@@ -27103,7 +26175,7 @@ var RegistryDashboardComponent = function (props) {
27103
26175
  _188.label = 1;
27104
26176
  case 1:
27105
26177
  _188.trys.push([1, 3, 4, 5]);
27106
- return [4 /*yield*/, post("stats/programme/agg", getAllProgrammeAnalyticsStatsParams(), undefined, statServerUrl)];
26178
+ return [4 /*yield*/, post("stats/programme/agg", getAllProgrammeAnalyticsStatsParams(), undefined, process.env.REACT_APP_STAT_URL)];
27107
26179
  case 2:
27108
26180
  response = _188.sent();
27109
26181
  programmeByStatusAuthAggregationResponse = void 0;
@@ -27789,54 +26861,69 @@ var RegistryDashboardComponent = function (props) {
27789
26861
  : (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
27790
26862
  exports.CompanyRole.PROGRAMME_DEVELOPER
27791
26863
  ? transferRequestReceived
27792
- : programmesUnCertifed, title: t((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT
26864
+ : programmesUnCertifed, title: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT
27793
26865
  ? "programmesPending"
27794
26866
  : (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
27795
26867
  exports.CompanyRole.PROGRAMME_DEVELOPER
27796
26868
  ? "trasnferReqReceived"
27797
- : "programmesUnCertified"), updatedDate: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT
26869
+ : "programmesUnCertified", updatedDate: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT
27798
26870
  ? lastUpdateProgrammesStats
27799
26871
  : (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
27800
26872
  exports.CompanyRole.PROGRAMME_DEVELOPER
27801
26873
  ? lastUpdatePendingTransferReceived
27802
26874
  : 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) ===
27803
- 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 })),
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, tooltip: t((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT
26876
+ ? "tTprogrammespendingGoverment"
26877
+ : (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
26878
+ exports.CompanyRole.PROGRAMME_DEVELOPER
26879
+ ? "tTTransferReqRecProgrammeDev"
26880
+ : "tTProgrammesUnCertiCertifier"), t: t })),
27804
26881
  React.createElement(antd.Col, { xxl: 8, xl: 8, md: 12, className: "stastic-card-col" },
27805
26882
  React.createElement(StasticCard, { value: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT
27806
26883
  ? transferRequestSent
27807
26884
  : (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
27808
26885
  exports.CompanyRole.PROGRAMME_DEVELOPER
27809
26886
  ? transferRequestSent
27810
- : programmesCertifed, title: t((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT
26887
+ : programmesCertifed, title: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT
27811
26888
  ? "trasnferReqInit"
27812
26889
  : (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
27813
26890
  exports.CompanyRole.PROGRAMME_DEVELOPER
27814
26891
  ? "trasnferReqInit"
27815
- : "programmesCertified"), updatedDate: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT
26892
+ : "programmesCertified", updatedDate: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT
27816
26893
  ? lastUpdatePendingTransferSent
27817
26894
  : (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
27818
26895
  exports.CompanyRole.PROGRAMME_DEVELOPER
27819
26896
  ? lastUpdatePendingTransferSent
27820
26897
  : 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) ===
27821
- 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 })),
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, tooltip: t((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT
26899
+ ? "tTTransferReqSentGovernment"
26900
+ : (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
26901
+ exports.CompanyRole.PROGRAMME_DEVELOPER
26902
+ ? "tTTransferReqInitProgrammeDev"
26903
+ : "tTProgrammesCertiCertifier"), t: t })),
27822
26904
  React.createElement(antd.Col, { xxl: 8, xl: 8, md: 12, className: "stastic-card-col" },
27823
26905
  React.createElement(StasticCard, { value: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT
27824
26906
  ? creditBalanceWithoutTimeRange
27825
26907
  : (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
27826
26908
  exports.CompanyRole.PROGRAMME_DEVELOPER
27827
26909
  ? creditBalanceWithoutTimeRange
27828
- : creditCertiedBalanceWithoutTimeRange, title: t((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT
26910
+ : creditCertiedBalanceWithoutTimeRange, title: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT
27829
26911
  ? "creditBal"
27830
26912
  : (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
27831
26913
  exports.CompanyRole.PROGRAMME_DEVELOPER
27832
26914
  ? "creditBal"
27833
- : "creditCertified"), updatedDate: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT
26915
+ : "creditCertified", updatedDate: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT
27834
26916
  ? lastUpdateCreditBalance
27835
26917
  : (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
27836
26918
  exports.CompanyRole.PROGRAMME_DEVELOPER
27837
26919
  ? lastUpdateCreditBalance
27838
26920
  : 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) ===
27839
- 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 })))),
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, tooltip: t((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT
26922
+ ? "tTCreditBalanceGovernment"
26923
+ : (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
26924
+ exports.CompanyRole.PROGRAMME_DEVELOPER
26925
+ ? "tTCreditBalanceProgrammeDev"
26926
+ : "tTCreditCertifiedCertifier"), t: t })))),
27840
26927
  ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT ||
27841
26928
  (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.CERTIFIER ||
27842
26929
  (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.MINISTRY) &&
@@ -28084,7 +27171,7 @@ var getNdcActionStatusTagType = function (status) {
28084
27171
  };
28085
27172
 
28086
27173
  var NdcDetailsComponent = function (props) {
28087
- var t = props.t;
27174
+ var t = props.t, useConnection = props.useConnection, useUserContext = props.useUserContext;
28088
27175
  var RangePicker = antd.DatePicker.RangePicker;
28089
27176
  var _a = React.useState([]), ndcActionsList = _a[0], setNdcActionsList = _a[1];
28090
27177
  var _b = React.useState(false), loading = _b[0], setLoading = _b[1];
@@ -29081,7 +28168,7 @@ var ProgrammeIssueForm = function (props) {
29081
28168
  };
29082
28169
 
29083
28170
  var ProgrammeRetireForm = function (props) {
29084
- 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;
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, useConnection = props.useConnection;
29085
28172
  var t = translator.t;
29086
28173
  var _a = React.useState(undefined), popupError = _a[0], setPopupError = _a[1];
29087
28174
  var _b = React.useState(false), loading = _b[0], setLoading = _b[1];
@@ -29457,7 +28544,7 @@ var ProgrammeRevokeForm = function (props) {
29457
28544
  };
29458
28545
 
29459
28546
  var ProgrammeTransferForm = function (props) {
29460
- 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;
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, useConnection = props.useConnection, _a = props.ministryLevelPermission, ministryLevelPermission = _a === void 0 ? false : _a;
29461
28548
  var t = translator.t;
29462
28549
  var _b = React.useState(undefined), popupError = _b[0], setPopupError = _b[1];
29463
28550
  var _c = React.useState(false), loading = _c[0], setLoading = _c[1];
@@ -29688,7 +28775,7 @@ var css_248z$5 = ".ndc-action-body {\n display: flex;\n flex-direction: column
29688
28775
  styleInject(css_248z$5);
29689
28776
 
29690
28777
  var NdcActionBody = function (props) {
29691
- 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;
28778
+ var data = props.data, programmeId = props.programmeId, canUploadMonitorReport = props.canUploadMonitorReport, programmeOwnerId = props.programmeOwnerId, getProgrammeDocs = props.getProgrammeDocs, ministryLevelPermission = props.ministryLevelPermission, useConnection = props.useConnection, translator = props.translator, useUserContext = props.useUserContext, onFinish = props.onFinish, programme = props.programme;
29692
28779
  var t = translator.t;
29693
28780
  var userInfoState = useUserContext().userInfoState;
29694
28781
  var fileInputMonitoringRef = React.useRef(null);
@@ -30124,7 +29211,7 @@ var css_248z$4 = ".info-view .title-icon {\n padding-right: 10px; }\n\n.info-vi
30124
29211
  styleInject(css_248z$4);
30125
29212
 
30126
29213
  var ProgrammeDocuments = function (props) {
30127
- 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;
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, useConnection = props.useConnection, useUserContext = props.useUserContext, translator = props.translator, methodologyDocumentUpdated = props.methodologyDocumentUpdated, programmeStatus = props.programmeStatus;
30128
29215
  var t = translator.t;
30129
29216
  var userInfoState = useUserContext().userInfoState;
30130
29217
  var _a = useConnection(); _a.delete; var post = _a.post;
@@ -31075,7 +30162,7 @@ var GHGUserActionConfirmationModel = function (props) {
31075
30162
  };
31076
30163
 
31077
30164
  var GHGEmissionsComponent = function (props) {
31078
- var t = props.t;
30165
+ var t = props.t, useUserContext = props.useUserContext, useConnection = props.useConnection;
31079
30166
  var userInfoState = useUserContext().userInfoState;
31080
30167
  var _a = React.useState([]), data = _a[0], setData = _a[1];
31081
30168
  var _b = useConnection(), get = _b.get, post = _b.post;
@@ -32992,7 +32079,7 @@ var ProjectionTypes = {
32992
32079
  };
32993
32080
 
32994
32081
  var GHGProjectionsComponent = function (props) {
32995
- var t = props.t;
32082
+ var t = props.t, useUserContext = props.useUserContext, useConnection = props.useConnection;
32996
32083
  var userInfoState = useUserContext().userInfoState;
32997
32084
  var _a = React.useState([]), data = _a[0], setData = _a[1];
32998
32085
  var _b = useConnection(); _b.put; var get = _b.get, post = _b.post;
@@ -35173,7 +34260,7 @@ var emissionComparisonOptionsSub = function (labels, chartColors) {
35173
34260
 
35174
34261
  var RangePicker = antd.DatePicker.RangePicker;
35175
34262
  var GHGDashboardComponent = function (props) {
35176
- var t = props.t, Chart = props.Chart, ButtonGroup = props.ButtonGroup, Link = props.Link, isMultipleDashboardsVisible = props.isMultipleDashboardsVisible;
34263
+ var t = props.t, useUserContext = props.useUserContext, useConnection = props.useConnection, Chart = props.Chart, ButtonGroup = props.ButtonGroup, Link = props.Link, isMultipleDashboardsVisible = props.isMultipleDashboardsVisible;
35177
34264
  var _a = useConnection(); _a.get; var post = _a.post; _a.delete;
35178
34265
  var userInfoState = useUserContext().userInfoState;
35179
34266
  var _b = React.useState(moment().year()), endYear = _b[0], setEndYear = _b[1];
@@ -35564,7 +34651,6 @@ exports.CoBenifitsComponent = CoBenifitsComponent;
35564
34651
  exports.Company = Company;
35565
34652
  exports.CompanyManagementComponent = CompanyManagementComponent;
35566
34653
  exports.CompanyProfileComponent = CompanyProfileComponent;
35567
- exports.ConnectionContextProvider = ConnectionContextProvider;
35568
34654
  exports.CreditTransferComponent = CreditTransferComponent;
35569
34655
  exports.DevBGColor = DevBGColor;
35570
34656
  exports.DevColor = DevColor;
@@ -35612,8 +34698,6 @@ exports.RejectDocumentationConfirmationModel = RejectDocumentationConfirmationMo
35612
34698
  exports.RoleIcon = RoleIcon;
35613
34699
  exports.RootBGColor = RootBGColor;
35614
34700
  exports.RootColor = RootColor;
35615
- exports.SettingsContext = SettingsContext;
35616
- exports.SettingsContextProvider = SettingsContextProvider;
35617
34701
  exports.StasticCard = StasticCard;
35618
34702
  exports.SupportCreationComponent = SupportCreationComponent;
35619
34703
  exports.SupportManagementComponent = SupportManagementComponent;
@@ -35622,8 +34706,6 @@ exports.TooltipColor = TooltipColor;
35622
34706
  exports.TransferActionModel = TransferActionModel;
35623
34707
  exports.UnitField = UnitField;
35624
34708
  exports.User = User;
35625
- exports.UserContext = UserContext;
35626
- exports.UserInformationContextProvider = UserInformationContextProvider;
35627
34709
  exports.UserManagementComponent = UserManagementComponent;
35628
34710
  exports.UserProfileComponent = UserProfileComponent;
35629
34711
  exports.UserRoleIcon = UserRoleIcon;
@@ -35665,7 +34747,4 @@ exports.ndcActionTypeList = ndcActionTypeList;
35665
34747
  exports.sectorMitigationTypesListMapped = sectorMitigationTypesListMapped;
35666
34748
  exports.sumArray = sumArray;
35667
34749
  exports.titleList = titleList;
35668
- exports.useConnection = useConnection;
35669
- exports.useSettingsContext = useSettingsContext;
35670
- exports.useUserContext = useUserContext;
35671
34750
  //# sourceMappingURL=index.js.map