@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.
- package/dist/cjs/index.js +556 -1477
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/Components/Common/CoBenifits/coBenifits.d.ts +1 -0
- package/dist/cjs/types/Components/Common/Models/programmeRetireForm.d.ts +1 -0
- package/dist/cjs/types/Components/Common/Models/programmeTransferForm.d.ts +1 -0
- package/dist/cjs/types/Components/Common/NdcActionBody/ndcActionBody.d.ts +2 -0
- package/dist/cjs/types/Components/Common/ProgrammeDocuments/programmeDocuments.d.ts +2 -0
- package/dist/cjs/types/Components/Common/StasticCard/stasticCard.d.ts +2 -0
- package/dist/cjs/types/Definitions/Definitions/connectionContext.definitions.d.ts +0 -3
- package/dist/cjs/types/Definitions/Enums/investment.enum.d.ts +0 -4
- package/dist/cjs/types/index.d.ts +0 -1
- package/dist/esm/index.js +558 -1471
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/Components/Common/CoBenifits/coBenifits.d.ts +1 -0
- package/dist/esm/types/Components/Common/Models/programmeRetireForm.d.ts +1 -0
- package/dist/esm/types/Components/Common/Models/programmeTransferForm.d.ts +1 -0
- package/dist/esm/types/Components/Common/NdcActionBody/ndcActionBody.d.ts +2 -0
- package/dist/esm/types/Components/Common/ProgrammeDocuments/programmeDocuments.d.ts +2 -0
- package/dist/esm/types/Components/Common/StasticCard/stasticCard.d.ts +2 -0
- package/dist/esm/types/Definitions/Definitions/connectionContext.definitions.d.ts +0 -3
- package/dist/esm/types/Definitions/Enums/investment.enum.d.ts +0 -4
- package/dist/esm/types/index.d.ts +0 -1
- package/dist/index.d.ts +10 -27
- package/dist/locales/i18n/programme/en.json +3 -5
- package/package.json +2 -29
- package/dist/cjs/types/Context/ConnectionContext/connectionContext.d.ts +0 -8
- package/dist/cjs/types/Context/SettingsContext/settingsContext.d.ts +0 -10
- package/dist/cjs/types/Context/UserInformationContext/userInformationContext.d.ts +0 -6
- package/dist/cjs/types/Context/index.d.ts +0 -3
- package/dist/cjs/types/Storybook/AddNewCompanyComponent.stories.d.ts +0 -12
- package/dist/cjs/types/Storybook/AddNewUserComponent.stories.d.ts +0 -12
- package/dist/cjs/types/Storybook/Decorators/AddNewCompanyI18nDecorator.d.ts +0 -2
- package/dist/cjs/types/Storybook/Decorators/AddNewUserI18nDecorator.d.ts +0 -2
- package/dist/cjs/types/Storybook/Decorators/ConnectionContextDecorator.d.ts +0 -2
- package/dist/cjs/types/Storybook/Decorators/DashboardI18nDecorator.d.ts +0 -2
- package/dist/cjs/types/Storybook/Decorators/InvestmentCreationI18nDecorator.d.ts +0 -2
- package/dist/cjs/types/Storybook/Decorators/ProgrammeCreateI18nDecorator.d.ts +0 -2
- package/dist/cjs/types/Storybook/InvestmentCreationComponent.stories.d.ts +0 -12
- package/dist/cjs/types/Storybook/MRVDashboard.stories.d.ts +0 -12
- package/dist/cjs/types/Storybook/ProgrammeCreationComponent.stories.d.ts +0 -12
- package/dist/cjs/types/Storybook/RegistryDashboard.stories.d.ts +0 -12
- package/dist/esm/types/Context/ConnectionContext/connectionContext.d.ts +0 -8
- package/dist/esm/types/Context/SettingsContext/settingsContext.d.ts +0 -10
- package/dist/esm/types/Context/UserInformationContext/userInformationContext.d.ts +0 -6
- package/dist/esm/types/Context/index.d.ts +0 -3
- package/dist/esm/types/Storybook/AddNewCompanyComponent.stories.d.ts +0 -12
- package/dist/esm/types/Storybook/AddNewUserComponent.stories.d.ts +0 -12
- package/dist/esm/types/Storybook/Decorators/AddNewCompanyI18nDecorator.d.ts +0 -2
- package/dist/esm/types/Storybook/Decorators/AddNewUserI18nDecorator.d.ts +0 -2
- package/dist/esm/types/Storybook/Decorators/ConnectionContextDecorator.d.ts +0 -2
- package/dist/esm/types/Storybook/Decorators/DashboardI18nDecorator.d.ts +0 -2
- package/dist/esm/types/Storybook/Decorators/InvestmentCreationI18nDecorator.d.ts +0 -2
- package/dist/esm/types/Storybook/Decorators/ProgrammeCreateI18nDecorator.d.ts +0 -2
- package/dist/esm/types/Storybook/InvestmentCreationComponent.stories.d.ts +0 -12
- package/dist/esm/types/Storybook/MRVDashboard.stories.d.ts +0 -12
- package/dist/esm/types/Storybook/ProgrammeCreationComponent.stories.d.ts +0 -12
- package/dist/esm/types/Storybook/RegistryDashboard.stories.d.ts +0 -12
package/dist/esm/index.js
CHANGED
@@ -1,9 +1,8 @@
|
|
1
1
|
import { PlusOutlined, FilterOutlined, DownloadOutlined, BankOutlined, SafetyOutlined, AuditOutlined, ExperimentOutlined, UploadOutlined, UserOutlined, MinusCircleOutlined, StarOutlined, ToolOutlined, EyeOutlined, SearchOutlined, EllipsisOutlined, EditOutlined, DeleteOutlined, FileAddOutlined, CheckCircleOutlined, ExclamationCircleOutlined, BookOutlined, CaretDownOutlined, LockOutlined, EyeInvisibleOutlined, GlobalOutlined, FlagOutlined, LineChartOutlined, LikeOutlined, DislikeOutlined, PlusCircleOutlined, LockFilled, CloseCircleOutlined } from '@ant-design/icons';
|
2
2
|
import { Input, Radio, Space, Row, Col, Button, Dropdown, Table, Empty, message, Form, Steps, Upload, InputNumber, Tooltip, Select, Modal, Alert, Card, Skeleton, Tag, Checkbox, DatePicker, Popover, List, Typography, Spin, Tabs, Progress, Collapse } from 'antd';
|
3
|
-
import React, {
|
3
|
+
import React, { useState, useEffect, useRef } from 'react';
|
4
4
|
import { DateTime } from 'luxon';
|
5
5
|
import { Buffer } from 'buffer';
|
6
|
-
import axios, { HttpStatusCode } from 'axios';
|
7
6
|
import PhoneInput, { formatPhoneNumberIntl, formatPhoneNumber } from 'react-phone-number-input';
|
8
7
|
import validator from 'validator';
|
9
8
|
import { plainToClass } from 'class-transformer';
|
@@ -14,6 +13,7 @@ import mapboxgl from 'mapbox-gl';
|
|
14
13
|
import 'mapbox-gl/dist/mapbox-gl.css';
|
15
14
|
import 'antd/dist/antd.css';
|
16
15
|
import * as XLSX from 'xlsx';
|
16
|
+
import { HttpStatusCode } from 'axios';
|
17
17
|
|
18
18
|
/******************************************************************************
|
19
19
|
Copyright (c) Microsoft Corporation.
|
@@ -492,317 +492,9 @@ var OrganisationStatus = function (props) {
|
|
492
492
|
return orgState;
|
493
493
|
};
|
494
494
|
|
495
|
-
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";
|
496
|
-
|
497
|
-
var ConnectionContext = createContext({});
|
498
|
-
var ConnectionContextProvider = function (props) {
|
499
|
-
var _a = useState(), token = _a[0], setToken = _a[1];
|
500
|
-
var serverURL = props.serverURL, t = props.t, statServerUrl = props.statServerUrl, children = props.children;
|
501
|
-
useEffect(function () {
|
502
|
-
var timer = setInterval(function () { return __awaiter(void 0, void 0, void 0, function () {
|
503
|
-
var newToken;
|
504
|
-
return __generator(this, function (_a) {
|
505
|
-
switch (_a.label) {
|
506
|
-
case 0: return [4 /*yield*/, localStorage.getItem('token')];
|
507
|
-
case 1:
|
508
|
-
newToken = _a.sent();
|
509
|
-
if (token !== newToken) {
|
510
|
-
setToken(newToken);
|
511
|
-
}
|
512
|
-
return [2 /*return*/];
|
513
|
-
}
|
514
|
-
});
|
515
|
-
}); }, 3000);
|
516
|
-
if (token) {
|
517
|
-
clearTimeout(timer);
|
518
|
-
}
|
519
|
-
return function () {
|
520
|
-
clearTimeout(timer);
|
521
|
-
};
|
522
|
-
}, [token]);
|
523
|
-
var send = useCallback(function (method, path, data, config, extraUrl) {
|
524
|
-
return new Promise(function (resolve, reject) {
|
525
|
-
var url = "".concat(extraUrl ? extraUrl : serverURL, "/").concat(path);
|
526
|
-
var headers;
|
527
|
-
if (token) {
|
528
|
-
headers = { authorization: "Bearer ".concat(token.toString()) };
|
529
|
-
}
|
530
|
-
else {
|
531
|
-
if (localStorage.getItem('token')) {
|
532
|
-
headers = {
|
533
|
-
authorization: "Bearer ".concat(localStorage.getItem('token')),
|
534
|
-
};
|
535
|
-
}
|
536
|
-
else {
|
537
|
-
headers = {
|
538
|
-
authorization: "Bearer ".concat(process.env.STORYBOOK_ACCESS_TOKEN),
|
539
|
-
};
|
540
|
-
}
|
541
|
-
}
|
542
|
-
axios(__assign({ method: method, url: url, data: data, headers: headers }, config))
|
543
|
-
.then(function (response) {
|
544
|
-
var _a, _b, _c;
|
545
|
-
if (response.status) {
|
546
|
-
if (response.status === 200 || response.status === 201) {
|
547
|
-
resolve({
|
548
|
-
status: response.status,
|
549
|
-
data: (_a = response.data.data) !== null && _a !== void 0 ? _a : response.data,
|
550
|
-
response: response,
|
551
|
-
statusText: 'SUCCESS',
|
552
|
-
message: response.data.message,
|
553
|
-
});
|
554
|
-
}
|
555
|
-
else if (response.status === 422) {
|
556
|
-
reject({
|
557
|
-
status: response.status,
|
558
|
-
data: (_b = response.data) === null || _b === void 0 ? void 0 : _b.data,
|
559
|
-
statusText: 'ERROR',
|
560
|
-
response: response,
|
561
|
-
message: response.data.message,
|
562
|
-
errors: (_c = response.data) === null || _c === void 0 ? void 0 : _c.errors,
|
563
|
-
});
|
564
|
-
}
|
565
|
-
}
|
566
|
-
else {
|
567
|
-
reject({
|
568
|
-
status: 500,
|
569
|
-
statusText: 'UNKNOWN',
|
570
|
-
message: t('common:systemError'),
|
571
|
-
});
|
572
|
-
}
|
573
|
-
})
|
574
|
-
.catch(function (e) {
|
575
|
-
var _a;
|
576
|
-
if (e.response) {
|
577
|
-
if (e.response.status) {
|
578
|
-
if (e.response.data.message === 'jwt expired') {
|
579
|
-
localStorage.removeItem('token');
|
580
|
-
window.location.reload();
|
581
|
-
}
|
582
|
-
reject({
|
583
|
-
status: e.response.status,
|
584
|
-
statusText: 'ERROR',
|
585
|
-
errors: (_a = e.response.data) === null || _a === void 0 ? void 0 : _a.errors,
|
586
|
-
message: e.response.data.message,
|
587
|
-
});
|
588
|
-
}
|
589
|
-
else {
|
590
|
-
reject({
|
591
|
-
statusText: 'ERROR',
|
592
|
-
message: t('common:systemError'),
|
593
|
-
});
|
594
|
-
}
|
595
|
-
}
|
596
|
-
else {
|
597
|
-
reject({
|
598
|
-
statusText: 'ERROR',
|
599
|
-
message: t('common:networkError'),
|
600
|
-
});
|
601
|
-
}
|
602
|
-
});
|
603
|
-
});
|
604
|
-
}, [token, serverURL]);
|
605
|
-
var post = useCallback(function (path, data, config, extraUrl) {
|
606
|
-
return send('post', path, data, config, extraUrl);
|
607
|
-
}, [send]);
|
608
|
-
var put = useCallback(function (path, data, config) {
|
609
|
-
return send('put', path, data, config);
|
610
|
-
}, [send]);
|
611
|
-
var get = useCallback(function (path, config) {
|
612
|
-
return send('get', path, undefined, config);
|
613
|
-
}, [send]);
|
614
|
-
var patch = useCallback(function (path, data, config) {
|
615
|
-
return send('patch', path, data, config);
|
616
|
-
}, [send]);
|
617
|
-
var del = useCallback(function (path, config) {
|
618
|
-
return send('delete', path, config);
|
619
|
-
}, [send]);
|
620
|
-
var updateToken = useCallback(function (newToken) { return __awaiter(void 0, void 0, void 0, function () {
|
621
|
-
return __generator(this, function (_a) {
|
622
|
-
if (newToken) {
|
623
|
-
localStorage.setItem('token', newToken);
|
624
|
-
setToken(newToken);
|
625
|
-
}
|
626
|
-
else {
|
627
|
-
localStorage.setItem('token', '');
|
628
|
-
setToken(undefined);
|
629
|
-
}
|
630
|
-
return [2 /*return*/];
|
631
|
-
});
|
632
|
-
}); }, []);
|
633
|
-
var removeToken = function (tkn) {
|
634
|
-
if (tkn) {
|
635
|
-
var exp = o(tkn).exp;
|
636
|
-
if (Date.now() > exp * 1000) {
|
637
|
-
localStorage.setItem('token', '');
|
638
|
-
localStorage.removeItem('userRole');
|
639
|
-
localStorage.removeItem('userId');
|
640
|
-
localStorage.removeItem('companyId');
|
641
|
-
localStorage.removeItem('companyRole');
|
642
|
-
}
|
643
|
-
else {
|
644
|
-
var diff = exp * 1000 - Date.now();
|
645
|
-
setTimeout(function () {
|
646
|
-
setToken(undefined);
|
647
|
-
localStorage.setItem('token', '');
|
648
|
-
localStorage.removeItem('userRole');
|
649
|
-
localStorage.removeItem('userId');
|
650
|
-
localStorage.removeItem('companyId');
|
651
|
-
localStorage.removeItem('companyRole');
|
652
|
-
}, diff);
|
653
|
-
console.log(diff, 'Remaining Token expire time');
|
654
|
-
}
|
655
|
-
}
|
656
|
-
};
|
657
|
-
useEffect(function () {
|
658
|
-
removeToken(token);
|
659
|
-
}, [token]);
|
660
|
-
return (React.createElement(ConnectionContext.Provider, { value: {
|
661
|
-
connection: { post: post, put: put, get: get, patch: patch, delete: del, updateToken: updateToken, token: token, removeToken: removeToken, statServerUrl: statServerUrl },
|
662
|
-
} }, children));
|
663
|
-
};
|
664
|
-
var useConnection = function () {
|
665
|
-
var context = useContext(ConnectionContext);
|
666
|
-
return context.connection;
|
667
|
-
};
|
668
|
-
|
669
|
-
var UserContext = createContext({
|
670
|
-
setUserInfo: function () { },
|
671
|
-
removeUserInfo: function () { },
|
672
|
-
IsAuthenticated: function (tkn) { return false; },
|
673
|
-
isTokenExpired: false,
|
674
|
-
setIsTokenExpired: function (val) { },
|
675
|
-
});
|
676
|
-
var UserInformationContextProvider = function (_a) {
|
677
|
-
var children = _a.children;
|
678
|
-
var token = useConnection().token;
|
679
|
-
var _b = useState(false), isTokenExpired = _b[0], setIsTokenExpired = _b[1];
|
680
|
-
var initialUserProps = {
|
681
|
-
id: localStorage.getItem('userId') ? localStorage.getItem('userId') : process.env.STORYBOOK_USER_ID ? process.env.STORYBOOK_USER_ID : '',
|
682
|
-
userRole: localStorage.getItem('userRole') ? localStorage.getItem('userRole') : process.env.STORYBOOK_USER_ROLE ? process.env.STORYBOOK_USER_ROLE : '',
|
683
|
-
companyRole: localStorage.getItem('companyRole')
|
684
|
-
? localStorage.getItem('companyRole')
|
685
|
-
: process.env.STORYBOOK_COMPANY_ROLE ? process.env.STORYBOOK_COMPANY_ROLE : '',
|
686
|
-
companyId: localStorage.getItem('companyId')
|
687
|
-
? parseInt(localStorage.getItem('companyId'))
|
688
|
-
: process.env.STORYBOOK_COMPANY_ID ? parseInt(process.env.STORYBOOK_COMPANY_ID) : -1,
|
689
|
-
companyLogo: localStorage.getItem('companyLogo')
|
690
|
-
? localStorage.getItem('companyLogo')
|
691
|
-
: process.env.STORYBOOK_COMPANY_LOGO ? process.env.STORYBOOK_COMPANY_LOGO : '',
|
692
|
-
companyName: localStorage.getItem('companyName')
|
693
|
-
? localStorage.getItem('companyName')
|
694
|
-
: process.env.STORYBOOK_COMPANY_NAME ? process.env.STORYBOOK_COMPANY_NAME : '',
|
695
|
-
companyState: localStorage.getItem('companyState')
|
696
|
-
? parseInt(localStorage.getItem('companyState'))
|
697
|
-
: process.env.STORYBOOK_COMPANY_STATE ? parseInt(process.env.STORYBOOK_COMPANY_STATE) : 0,
|
698
|
-
};
|
699
|
-
var _c = useState(initialUserProps), userInfoState = _c[0], setUserInfoState = _c[1];
|
700
|
-
var setUserInfo = function (value) {
|
701
|
-
var state = (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyState) === 1 ? userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyState : 0;
|
702
|
-
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;
|
703
|
-
if (id) {
|
704
|
-
setUserInfoState(function (prev) { return (__assign(__assign({}, prev), { id: id })); });
|
705
|
-
localStorage.setItem('userId', id);
|
706
|
-
}
|
707
|
-
if (userRole) {
|
708
|
-
setUserInfoState(function (prev) { return (__assign(__assign({}, prev), { userRole: userRole })); });
|
709
|
-
localStorage.setItem('userRole', userRole);
|
710
|
-
}
|
711
|
-
if (companyId) {
|
712
|
-
setUserInfoState(function (prev) { return (__assign(__assign({}, prev), { companyId: companyId })); });
|
713
|
-
localStorage.setItem('companyId', companyId + '');
|
714
|
-
}
|
715
|
-
if (companyLogo) {
|
716
|
-
setUserInfoState(function (prev) { return (__assign(__assign({}, prev), { companyLogo: companyLogo })); });
|
717
|
-
localStorage.setItem('companyLogo', companyLogo);
|
718
|
-
}
|
719
|
-
else {
|
720
|
-
setUserInfoState(function (prev) { return (__assign(__assign({}, prev), { companyLogo: '' })); });
|
721
|
-
localStorage.setItem('companyLogo', '');
|
722
|
-
}
|
723
|
-
if (companyName) {
|
724
|
-
setUserInfoState(function (prev) { return (__assign(__assign({}, prev), { companyName: companyName })); });
|
725
|
-
localStorage.setItem('companyName', companyName);
|
726
|
-
}
|
727
|
-
if (userRole) {
|
728
|
-
setUserInfoState(function (prev) { return (__assign(__assign({}, prev), { companyRole: companyRole })); });
|
729
|
-
localStorage.setItem('companyRole', companyRole);
|
730
|
-
}
|
731
|
-
setUserInfoState(function (prev) { return (__assign(__assign({}, prev), { companyState: companyState })); });
|
732
|
-
localStorage.setItem('companyState', companyState + '');
|
733
|
-
};
|
734
|
-
var IsAuthenticated = useCallback(function (tokenNew) {
|
735
|
-
var tokenVal;
|
736
|
-
if (tokenNew) {
|
737
|
-
tokenVal = tokenNew;
|
738
|
-
}
|
739
|
-
else if (token) {
|
740
|
-
tokenVal = token;
|
741
|
-
}
|
742
|
-
else {
|
743
|
-
tokenVal = localStorage.getItem('token');
|
744
|
-
if (tokenVal === '') {
|
745
|
-
if (history.length !== 1) {
|
746
|
-
setIsTokenExpired(true);
|
747
|
-
}
|
748
|
-
}
|
749
|
-
}
|
750
|
-
try {
|
751
|
-
if (tokenVal) {
|
752
|
-
var exp = o(tokenVal).exp;
|
753
|
-
return Date.now() < exp * 1000;
|
754
|
-
}
|
755
|
-
return false;
|
756
|
-
}
|
757
|
-
catch (err) {
|
758
|
-
return false;
|
759
|
-
}
|
760
|
-
}, [token]);
|
761
|
-
var removeUserInfo = function () {
|
762
|
-
localStorage.removeItem('userId');
|
763
|
-
localStorage.removeItem('userRole');
|
764
|
-
localStorage.removeItem('companyId');
|
765
|
-
localStorage.removeItem('companyRole');
|
766
|
-
localStorage.removeItem('companyName');
|
767
|
-
localStorage.removeItem('companyState');
|
768
|
-
localStorage.removeItem('companyLogo');
|
769
|
-
setUserInfoState(initialUserProps);
|
770
|
-
};
|
771
|
-
return (React.createElement(UserContext.Provider, { value: {
|
772
|
-
userInfoState: userInfoState,
|
773
|
-
setUserInfo: setUserInfo,
|
774
|
-
removeUserInfo: removeUserInfo,
|
775
|
-
IsAuthenticated: IsAuthenticated,
|
776
|
-
isTokenExpired: isTokenExpired,
|
777
|
-
setIsTokenExpired: setIsTokenExpired,
|
778
|
-
} }, children));
|
779
|
-
};
|
780
|
-
var useUserContext = function () {
|
781
|
-
return useContext(UserContext);
|
782
|
-
};
|
783
|
-
|
784
|
-
var SettingsContext = createContext({
|
785
|
-
isTransferFrozen: false,
|
786
|
-
setTransferFrozen: function (value) { },
|
787
|
-
});
|
788
|
-
var SettingsContextProvider = function (_a) {
|
789
|
-
var children = _a.children;
|
790
|
-
var _b = useState(false), isTransferFrozen = _b[0], setIsTransferFrozen = _b[1];
|
791
|
-
var setTransferFrozen = function (value) {
|
792
|
-
setIsTransferFrozen(value);
|
793
|
-
};
|
794
|
-
return (React.createElement(SettingsContext.Provider, { value: {
|
795
|
-
isTransferFrozen: isTransferFrozen,
|
796
|
-
setTransferFrozen: setTransferFrozen,
|
797
|
-
} }, children));
|
798
|
-
};
|
799
|
-
var useSettingsContext = function () {
|
800
|
-
return useContext(SettingsContext);
|
801
|
-
};
|
802
|
-
|
803
495
|
var Search$2 = Input.Search;
|
804
496
|
var CompanyManagementComponent = function (props) {
|
805
|
-
var t = props.t, useAbilityContext = props.useAbilityContext, visibleColumns = props.visibleColumns, onNavigateToCompanyProfile = props.onNavigateToCompanyProfile, onClickAddCompany = props.onClickAddCompany;
|
497
|
+
var t = props.t, useAbilityContext = props.useAbilityContext, post = props.post, visibleColumns = props.visibleColumns, onNavigateToCompanyProfile = props.onNavigateToCompanyProfile, onClickAddCompany = props.onClickAddCompany;
|
806
498
|
var _a = useState(), totalCompany = _a[0], setTotalCompany = _a[1];
|
807
499
|
var _b = useState(false), loading = _b[0], setLoading = _b[1];
|
808
500
|
var _c = useState([]), tableData = _c[0], setTableData = _c[1];
|
@@ -817,7 +509,6 @@ var CompanyManagementComponent = function (props) {
|
|
817
509
|
var _l = useState(""), sortField = _l[0], setSortField = _l[1];
|
818
510
|
var _m = useState(), dataQuery = _m[0], setDataQuery = _m[1];
|
819
511
|
var ability = useAbilityContext();
|
820
|
-
var post = useConnection().post;
|
821
512
|
document.addEventListener("mousedown", function (event) {
|
822
513
|
var organisationFilterArea1 = document.querySelector(".filter-bar");
|
823
514
|
var organisationFilterArea2 = document.querySelector(".filter-dropdown");
|
@@ -1205,7 +896,7 @@ var CompanyManagementComponent = function (props) {
|
|
1205
896
|
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";
|
1206
897
|
styleInject(css_248z$w);
|
1207
898
|
|
1208
|
-
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";
|
899
|
+
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";
|
1209
900
|
styleInject(css_248z$v);
|
1210
901
|
|
1211
902
|
var UserManagementColumns;
|
@@ -1277,11 +968,6 @@ var InvestmentCreationType;
|
|
1277
968
|
InvestmentCreationType["EXISTING"] = "Existing";
|
1278
969
|
InvestmentCreationType["NEW"] = "New";
|
1279
970
|
})(InvestmentCreationType || (InvestmentCreationType = {}));
|
1280
|
-
var InvestmentOwnershipType;
|
1281
|
-
(function (InvestmentOwnershipType) {
|
1282
|
-
InvestmentOwnershipType["PROJECT"] = "Project";
|
1283
|
-
InvestmentOwnershipType["NATIONAL"] = "National";
|
1284
|
-
})(InvestmentOwnershipType || (InvestmentOwnershipType = {}));
|
1285
971
|
var InvestmentStream;
|
1286
972
|
(function (InvestmentStream) {
|
1287
973
|
InvestmentStream["CLIMATE_FINANCE"] = "ClimateFinance";
|
@@ -6179,7 +5865,7 @@ var Projection = /** @class */ (function () {
|
|
6179
5865
|
|
6180
5866
|
var AddNewCompanyComponent = function (props) {
|
6181
5867
|
var _a;
|
6182
|
-
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;
|
5868
|
+
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;
|
6183
5869
|
var formOne = Form.useForm()[0];
|
6184
5870
|
var formTwo = Form.useForm()[0];
|
6185
5871
|
var _b = useState(), stepOneData = _b[0], setStepOneData = _b[1];
|
@@ -7065,7 +6751,7 @@ var CompanyDetailsComponent = function (props) {
|
|
7065
6751
|
};
|
7066
6752
|
|
7067
6753
|
var CompanyProfileComponent = function (props) {
|
7068
|
-
var t = props.t, useAbilityContext = props.useAbilityContext, useLocation = props.useLocation, onNavigateToCompanyManagement = props.onNavigateToCompanyManagement, onNavigateToCompanyEdit = props.onNavigateToCompanyEdit; props.regionField; var systemType = props.systemType;
|
6754
|
+
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;
|
7069
6755
|
var _a = useConnection(), get = _a.get, put = _a.put, post = _a.post;
|
7070
6756
|
var _b = useState(undefined), companyDetails = _b[0], setCompanyDetails = _b[1];
|
7071
6757
|
var _c = useState(undefined), userDetails = _c[0], setUserDetails = _c[1];
|
@@ -7409,7 +7095,7 @@ styleInject(css_248z$s);
|
|
7409
7095
|
|
7410
7096
|
var Search$1 = Input.Search;
|
7411
7097
|
var ProgrammeManagementComponent = function (props) {
|
7412
|
-
var t = props.t, visibleColumns = props.visibleColumns, onNavigateToProgrammeView = props.onNavigateToProgrammeView, onClickAddProgramme = props.onClickAddProgramme, enableAddProgramme = props.enableAddProgramme, useAbilityContext = props.useAbilityContext;
|
7098
|
+
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;
|
7413
7099
|
var _a = useConnection(); _a.get; _a.delete; var post = _a.post;
|
7414
7100
|
var _b = useState(), totalProgramme = _b[0], setTotalProgramme = _b[1];
|
7415
7101
|
var _c = useState(false), loading = _c[0], setLoading = _c[1];
|
@@ -7844,7 +7530,7 @@ var ProgrammeManagementComponent = function (props) {
|
|
7844
7530
|
React.createElement("div", { className: "filter-section" },
|
7845
7531
|
React.createElement("div", { className: "search-filter" },
|
7846
7532
|
React.createElement(Checkbox, { className: "label", onChange: function (v) {
|
7847
|
-
if (
|
7533
|
+
if (userInfoState.companyRole === CompanyRole.MINISTRY) {
|
7848
7534
|
if (v.target.checked) {
|
7849
7535
|
setMinistryLevelFilter(true);
|
7850
7536
|
}
|
@@ -7861,7 +7547,7 @@ var ProgrammeManagementComponent = function (props) {
|
|
7861
7547
|
}
|
7862
7548
|
: undefined);
|
7863
7549
|
}
|
7864
|
-
} },
|
7550
|
+
} }, userInfoState.companyRole === CompanyRole.MINISTRY
|
7865
7551
|
? t("view:ministryLevel")
|
7866
7552
|
: t("view:seeMine"))),
|
7867
7553
|
React.createElement("div", { className: "search-bar" },
|
@@ -13648,7 +13334,7 @@ var sectoralScopes = {
|
|
13648
13334
|
};
|
13649
13335
|
var ProgrammeCreationComponent = function (props) {
|
13650
13336
|
var _a, _b, _c;
|
13651
|
-
var useLocation = props.useLocation, onNavigateToProgrammeView = props.onNavigateToProgrammeView, translator = props.translator;
|
13337
|
+
var useUserContext = props.useUserContext, useConnection = props.useConnection, useLocation = props.useLocation, onNavigateToProgrammeView = props.onNavigateToProgrammeView, translator = props.translator;
|
13652
13338
|
var t = translator.t;
|
13653
13339
|
var state = useLocation().state;
|
13654
13340
|
var formOne = Form.useForm()[0];
|
@@ -14713,7 +14399,7 @@ var ChangePasswordModel = function (props) {
|
|
14713
14399
|
|
14714
14400
|
var AddNewUserComponent = function (props) {
|
14715
14401
|
var _a, _b, _c, _d, _e, _f;
|
14716
|
-
var t = props.t, onNavigateToUserManagement = props.onNavigateToUserManagement, onNavigateLogin = props.onNavigateLogin, useLocation = props.useLocation, useAbilityContext = props.useAbilityContext, themeColor = props.themeColor;
|
14402
|
+
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;
|
14717
14403
|
var _g = useConnection(), post = _g.post, put = _g.put, del = _g.delete, get = _g.get;
|
14718
14404
|
var formOne = Form.useForm()[0];
|
14719
14405
|
var state = useLocation().state;
|
@@ -15131,7 +14817,7 @@ var LanguageSelection = function (props) {
|
|
15131
14817
|
};
|
15132
14818
|
|
15133
14819
|
var UserProfileComponent = function (props) {
|
15134
|
-
var t = props.t, i18n = props.i18n, onNavigateUpdateUser = props.onNavigateUpdateUser, onNavigateLogin = props.onNavigateLogin;
|
14820
|
+
var t = props.t, i18n = props.i18n, useConnection = props.useConnection, onNavigateUpdateUser = props.onNavigateUpdateUser, onNavigateLogin = props.onNavigateLogin, useUserContext = props.useUserContext;
|
15135
14821
|
var get = useConnection().get;
|
15136
14822
|
var _a = useState(undefined), organisationDetails = _a[0], setOrganisationDetails = _a[1];
|
15137
14823
|
var _b = useState(undefined), userDetails = _b[0], setUserDetails = _b[1];
|
@@ -15223,7 +14909,7 @@ styleInject(css_248z$n);
|
|
15223
14909
|
|
15224
14910
|
var Search = Input.Search;
|
15225
14911
|
var UserManagementComponent = function (props) {
|
15226
|
-
var t = props.t, useAbilityContext = props.useAbilityContext, visibleColumns = props.visibleColumns, onNavigateToUpdateUser = props.onNavigateToUpdateUser, onClickAddUser = props.onClickAddUser;
|
14912
|
+
var t = props.t, useAbilityContext = props.useAbilityContext, useConnection = props.useConnection, visibleColumns = props.visibleColumns, onNavigateToUpdateUser = props.onNavigateToUpdateUser, onClickAddUser = props.onClickAddUser, userInfoState = props.userInfoState;
|
15227
14913
|
Form.useForm()[0];
|
15228
14914
|
var _a = useConnection(), post = _a.post, del = _a.delete;
|
15229
14915
|
var _b = useState(), totalUser = _b[0], setTotalUser = _b[1];
|
@@ -15246,7 +14932,6 @@ var UserManagementComponent = function (props) {
|
|
15246
14932
|
var _t = useState(false), openDeleteConfirmationModal = _t[0], setOpenDeleteConfirmationModal = _t[1];
|
15247
14933
|
var _u = useState(), dataQuery = _u[0], setDataQuery = _u[1];
|
15248
14934
|
var ability = useAbilityContext();
|
15249
|
-
var userInfoState = useUserContext().userInfoState;
|
15250
14935
|
document.addEventListener("mousedown", function (event) {
|
15251
14936
|
var userFilterArea1 = document.querySelector(".filter-bar");
|
15252
14937
|
var userFilterArea2 = document.querySelector(".filter-dropdown");
|
@@ -15814,7 +15499,7 @@ var UserManagementComponent = function (props) {
|
|
15814
15499
|
React.createElement(UserActionConfirmationModel, { t: t, actionInfo: actionInfo, onActionConfirmed: handleOk, onActionCanceled: handleCancel, openModal: openDeleteConfirmationModal, errorMsg: errorMsg, loading: loading })));
|
15815
15500
|
};
|
15816
15501
|
|
15817
|
-
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.
|
15502
|
+
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";
|
15818
15503
|
styleInject(css_248z$m);
|
15819
15504
|
|
15820
15505
|
var Loading = function () {
|
@@ -15834,34 +15519,21 @@ var InsurancePayback;
|
|
15834
15519
|
|
15835
15520
|
var RangePicker$3 = DatePicker.RangePicker;
|
15836
15521
|
var InvestmentCreationComponent = function (props) {
|
15837
|
-
var t = props.t,
|
15522
|
+
var t = props.t, useConnection = props.useConnection, userInfoState = props.userInfoState, useLocation = props.useLocation, onNavigateToProgrammeManagementView = props.onNavigateToProgrammeManagementView, onNavigateToProgrammeView = props.onNavigateToProgrammeView;
|
15838
15523
|
var state = useLocation().state;
|
15839
15524
|
var _a = useState(), data = _a[0], setData = _a[1];
|
15840
|
-
var _b = useState({}), companyNames = _b[0], setCompanyNames = _b[1];
|
15841
|
-
var _c = useState({}); _c[0]; var setUserOrganization = _c[1];
|
15842
|
-
var _d = useState({}), investmentNames = _d[0], setInvestmentNames = _d[1];
|
15843
|
-
var _e = useState(), projectData = _e[0], setProjectData = _e[1];
|
15844
|
-
var _f = useState(), investmentData = _f[0], setInvestmentData = _f[1];
|
15845
|
-
var _g = useState([]), allProjectData = _g[0], setAllProjectData = _g[1];
|
15846
15525
|
var formOne = Form.useForm()[0];
|
15847
15526
|
var formTwo = Form.useForm()[0];
|
15848
15527
|
var post = useConnection().post;
|
15849
|
-
var
|
15850
|
-
var
|
15851
|
-
var
|
15852
|
-
var
|
15853
|
-
var
|
15854
|
-
var
|
15855
|
-
var
|
15856
|
-
var
|
15857
|
-
var
|
15858
|
-
var _s = useState([]), nationalInvestmentList = _s[0], setNationalInvestmentList = _s[1];
|
15859
|
-
var _t = useState([]), instrument = _t[0], setInstrument = _t[1];
|
15860
|
-
var _u = useState(), stepOneData = _u[0], setStepOneData = _u[1];
|
15861
|
-
var _v = useState(), govData = _v[0], setGovData = _v[1];
|
15862
|
-
var userInfoState = useUserContext().userInfoState;
|
15863
|
-
var _w = useState([]), ministrySectoralScope = _w[0], setMinistrySectoralScope = _w[1];
|
15864
|
-
var _x = useState({}), prevInvestor = _x[0], setPrevInvestor = _x[1];
|
15528
|
+
var _b = useState(false), loading = _b[0], setLoading = _b[1];
|
15529
|
+
var _c = useState("New"), typeCreation = _c[0], setTypeCreation = _c[1];
|
15530
|
+
var _d = useState(false), loadingList = _d[0], setLoadingList = _d[1];
|
15531
|
+
var _e = useState(0), current = _e[0], setCurrent = _e[1];
|
15532
|
+
var _f = useState(0), currentPercTotal = _f[0], setCurrentPercTotal = _f[1];
|
15533
|
+
var _g = useState([]), organisationsList = _g[0], setOrganisationList = _g[1];
|
15534
|
+
var _h = useState([]), instrument = _h[0], setInstrument = _h[1];
|
15535
|
+
var _j = useState(), stepOneData = _j[0], setStepOneData = _j[1];
|
15536
|
+
var _k = useState(), govData = _k[0], setGovData = _k[1];
|
15865
15537
|
var instrumentOptions = Object.keys(Instrument).map(function (k, index) { return ({
|
15866
15538
|
label: addSpaces(Object.values(Instrument)[index]),
|
15867
15539
|
value: Object.values(Instrument)[index],
|
@@ -15913,225 +15585,52 @@ var InvestmentCreationComponent = function (props) {
|
|
15913
15585
|
}
|
15914
15586
|
});
|
15915
15587
|
}); };
|
15916
|
-
var
|
15917
|
-
var response, error_2;
|
15918
|
-
return __generator(this, function (_a) {
|
15919
|
-
switch (_a.label) {
|
15920
|
-
case 0:
|
15921
|
-
setLoadingProgData(true);
|
15922
|
-
_a.label = 1;
|
15923
|
-
case 1:
|
15924
|
-
_a.trys.push([1, 5, 6, 7]);
|
15925
|
-
if (!data) return [3 /*break*/, 4];
|
15926
|
-
if (!!(data === null || data === void 0 ? void 0 : data.programmeId)) return [3 /*break*/, 3];
|
15927
|
-
console.log("data non existing", data);
|
15928
|
-
console.log("getting all Project data");
|
15929
|
-
return [4 /*yield*/, post("national/programme/query", {
|
15930
|
-
page: 1,
|
15931
|
-
size: 100,
|
15932
|
-
filterAnd: [
|
15933
|
-
{
|
15934
|
-
key: "currentStage",
|
15935
|
-
operation: "!=",
|
15936
|
-
value: ProgrammeStageUnified.Rejected,
|
15937
|
-
},
|
15938
|
-
],
|
15939
|
-
})];
|
15940
|
-
case 2:
|
15941
|
-
response = _a.sent();
|
15942
|
-
if (response.data) {
|
15943
|
-
setAllProjectData(response === null || response === void 0 ? void 0 : response.data);
|
15944
|
-
console.log("all Project data", response === null || response === void 0 ? void 0 : response.data);
|
15945
|
-
}
|
15946
|
-
return [3 /*break*/, 4];
|
15947
|
-
case 3:
|
15948
|
-
console.log("setting current Project data");
|
15949
|
-
setAllProjectData([data]);
|
15950
|
-
_a.label = 4;
|
15951
|
-
case 4: return [3 /*break*/, 7];
|
15952
|
-
case 5:
|
15953
|
-
error_2 = _a.sent();
|
15954
|
-
console.log("Error in getting all programme data", error_2);
|
15955
|
-
return [3 /*break*/, 7];
|
15956
|
-
case 6:
|
15957
|
-
setLoadingProgData(false);
|
15958
|
-
return [7 /*endfinally*/];
|
15959
|
-
case 7: return [2 /*return*/];
|
15960
|
-
}
|
15961
|
-
});
|
15962
|
-
}); };
|
15963
|
-
var setSelectedProgramme = function (value) { return __awaiter(void 0, void 0, void 0, function () {
|
15964
|
-
var _i, allProjectData_1, obj;
|
15965
|
-
return __generator(this, function (_a) {
|
15966
|
-
console.log("setSelectedProgramme", value);
|
15967
|
-
for (_i = 0, allProjectData_1 = allProjectData; _i < allProjectData_1.length; _i++) {
|
15968
|
-
obj = allProjectData_1[_i];
|
15969
|
-
if (obj.programmeId == value) {
|
15970
|
-
setProjectData(obj);
|
15971
|
-
break;
|
15972
|
-
}
|
15973
|
-
}
|
15974
|
-
return [2 /*return*/];
|
15975
|
-
});
|
15976
|
-
}); };
|
15977
|
-
var setSelectedInvestment = function (value) { return __awaiter(void 0, void 0, void 0, function () {
|
15978
|
-
return __generator(this, function (_a) {
|
15979
|
-
console.log("setSelectedInvestment", value);
|
15980
|
-
setInvestmentData(investmentNames[value]);
|
15981
|
-
return [2 /*return*/];
|
15982
|
-
});
|
15983
|
-
}); };
|
15984
|
-
var getNationalInvestmentDetails = function () { return __awaiter(void 0, void 0, void 0, function () {
|
15985
|
-
var optionalFilters, filterAnd, filterOr_1, response, investmentData_1, _i, _a, investment, error_3;
|
15588
|
+
var getOrganisationsDetails = function () { return __awaiter(void 0, void 0, void 0, function () {
|
15589
|
+
var filterAnd, _i, _a, c, response, error_2;
|
15986
15590
|
return __generator(this, function (_b) {
|
15987
15591
|
switch (_b.label) {
|
15988
15592
|
case 0:
|
15989
|
-
|
15593
|
+
setLoadingList(true);
|
15990
15594
|
_b.label = 1;
|
15991
15595
|
case 1:
|
15992
15596
|
_b.trys.push([1, 3, 4, 5]);
|
15993
|
-
optionalFilters = {};
|
15994
15597
|
filterAnd = [];
|
15995
15598
|
filterAnd = [
|
15996
15599
|
{
|
15997
|
-
key: "
|
15600
|
+
key: "companyRole",
|
15998
15601
|
operation: "=",
|
15999
|
-
value:
|
16000
|
-
},
|
16001
|
-
{
|
16002
|
-
key: "amount",
|
16003
|
-
operation: ">",
|
16004
|
-
value: 0,
|
15602
|
+
value: CompanyRole.PROGRAMME_DEVELOPER.toString(),
|
16005
15603
|
},
|
16006
15604
|
];
|
16007
15605
|
if ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.PROGRAMME_DEVELOPER) {
|
16008
15606
|
filterAnd.push({
|
16009
|
-
key: "
|
16010
|
-
operation: "
|
15607
|
+
key: "companyId",
|
15608
|
+
operation: "!=",
|
16011
15609
|
value: userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyId,
|
16012
15610
|
});
|
16013
15611
|
}
|
16014
|
-
|
16015
|
-
|
16016
|
-
(
|
16017
|
-
|
16018
|
-
|
16019
|
-
|
16020
|
-
key: "toCompanyId",
|
16021
|
-
operation: "=",
|
16022
|
-
value: id,
|
16023
|
-
});
|
15612
|
+
for (_i = 0, _a = data === null || data === void 0 ? void 0 : data.companyId; _i < _a.length; _i++) {
|
15613
|
+
c = _a[_i];
|
15614
|
+
filterAnd.push({
|
15615
|
+
key: "companyId",
|
15616
|
+
operation: "!=",
|
15617
|
+
value: c,
|
16024
15618
|
});
|
16025
|
-
optionalFilters.filterOr = filterOr_1;
|
16026
15619
|
}
|
16027
|
-
return [4 /*yield*/, post("national/
|
16028
|
-
case 2:
|
16029
|
-
response = _b.sent();
|
16030
|
-
if (response.data) {
|
16031
|
-
setNationalInvestmentList(response === null || response === void 0 ? void 0 : response.data);
|
16032
|
-
investmentData_1 = {};
|
16033
|
-
for (_i = 0, _a = response === null || response === void 0 ? void 0 : response.data; _i < _a.length; _i++) {
|
16034
|
-
investment = _a[_i];
|
16035
|
-
investmentData_1[investment.requestId] = investment;
|
16036
|
-
}
|
16037
|
-
setInvestmentNames(investmentData_1);
|
16038
|
-
console.log(investmentData_1);
|
16039
|
-
}
|
16040
|
-
return [3 /*break*/, 5];
|
16041
|
-
case 3:
|
16042
|
-
error_3 = _b.sent();
|
16043
|
-
console.log("Error in getting national Investments list", error_3);
|
16044
|
-
return [3 /*break*/, 5];
|
16045
|
-
case 4:
|
16046
|
-
setLoadingInvestment(false);
|
16047
|
-
return [7 /*endfinally*/];
|
16048
|
-
case 5: return [2 /*return*/];
|
16049
|
-
}
|
16050
|
-
});
|
16051
|
-
}); };
|
16052
|
-
var getUserOrganization = function () { return __awaiter(void 0, void 0, void 0, function () {
|
16053
|
-
var response, error_4;
|
16054
|
-
return __generator(this, function (_a) {
|
16055
|
-
switch (_a.label) {
|
16056
|
-
case 0:
|
16057
|
-
_a.trys.push([0, 2, , 3]);
|
16058
|
-
return [4 /*yield*/, post("national/organisation/query", {
|
15620
|
+
return [4 /*yield*/, post("national/organisation/queryNames", {
|
16059
15621
|
page: 1,
|
16060
15622
|
size: 100,
|
16061
|
-
filterAnd:
|
16062
|
-
{ key: "companyId", operation: "=", value: userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyId },
|
16063
|
-
],
|
15623
|
+
filterAnd: filterAnd,
|
16064
15624
|
})];
|
16065
|
-
case 1:
|
16066
|
-
response = _a.sent();
|
16067
|
-
console.log("getUserOrganization", response.data[0]);
|
16068
|
-
setUserOrganization(response.data[0]);
|
16069
|
-
setMinistrySectoralScope(response.data[0].sectoralScope);
|
16070
|
-
return [3 /*break*/, 3];
|
16071
15625
|
case 2:
|
16072
|
-
|
16073
|
-
console.log("Error in getting user organization", error_4);
|
16074
|
-
return [3 /*break*/, 3];
|
16075
|
-
case 3: return [2 /*return*/];
|
16076
|
-
}
|
16077
|
-
});
|
16078
|
-
}); };
|
16079
|
-
var getOrganisationsDetails = function () { return __awaiter(void 0, void 0, void 0, function () {
|
16080
|
-
var filterAnd, filterOr, _i, _a, c, filters, response, companyName, _b, _c, company, error_5;
|
16081
|
-
return __generator(this, function (_d) {
|
16082
|
-
switch (_d.label) {
|
16083
|
-
case 0:
|
16084
|
-
setLoadingList(true);
|
16085
|
-
_d.label = 1;
|
16086
|
-
case 1:
|
16087
|
-
_d.trys.push([1, 3, 4, 5]);
|
16088
|
-
filterAnd = [];
|
16089
|
-
filterOr = [];
|
16090
|
-
filterAnd = [
|
16091
|
-
{
|
16092
|
-
key: "companyRole",
|
16093
|
-
operation: "=",
|
16094
|
-
value: CompanyRole.PROGRAMME_DEVELOPER.toString(),
|
16095
|
-
},
|
16096
|
-
];
|
16097
|
-
// if (userInfoState?.companyRole === CompanyRole.PROGRAMME_DEVELOPER) {
|
16098
|
-
// filterAnd.push({
|
16099
|
-
// key: "companyId",
|
16100
|
-
// operation: "!=",
|
16101
|
-
// value: userInfoState?.companyId,
|
16102
|
-
// });
|
16103
|
-
// }
|
16104
|
-
if (data === null || data === void 0 ? void 0 : data.companyId) {
|
16105
|
-
for (_i = 0, _a = data === null || data === void 0 ? void 0 : data.companyId; _i < _a.length; _i++) {
|
16106
|
-
c = _a[_i];
|
16107
|
-
filterOr.push({
|
16108
|
-
key: "companyId",
|
16109
|
-
operation: "=",
|
16110
|
-
value: c,
|
16111
|
-
});
|
16112
|
-
}
|
16113
|
-
}
|
16114
|
-
filters = void 0;
|
16115
|
-
if (filterOr.length) {
|
16116
|
-
filters.filterOr = filterOr;
|
16117
|
-
}
|
16118
|
-
return [4 /*yield*/, post("national/organisation/queryNames", __assign({ page: 1, size: 100, filterAnd: filterAnd }, filters))];
|
16119
|
-
case 2:
|
16120
|
-
response = _d.sent();
|
15626
|
+
response = _b.sent();
|
16121
15627
|
if (response.data) {
|
16122
15628
|
setOrganisationList(response === null || response === void 0 ? void 0 : response.data);
|
16123
|
-
companyName = {};
|
16124
|
-
for (_b = 0, _c = response === null || response === void 0 ? void 0 : response.data; _b < _c.length; _b++) {
|
16125
|
-
company = _c[_b];
|
16126
|
-
companyName[Number(company.companyId)] = company.name;
|
16127
|
-
}
|
16128
|
-
setCompanyNames(companyName);
|
16129
|
-
console.log(companyName);
|
16130
15629
|
}
|
16131
15630
|
return [3 /*break*/, 5];
|
16132
15631
|
case 3:
|
16133
|
-
|
16134
|
-
console.log("Error in getting organization list",
|
15632
|
+
error_2 = _b.sent();
|
15633
|
+
console.log("Error in getting organization list", error_2);
|
16135
15634
|
return [3 /*break*/, 5];
|
16136
15635
|
case 4:
|
16137
15636
|
setLoadingList(false);
|
@@ -16146,72 +15645,52 @@ var InvestmentCreationComponent = function (props) {
|
|
16146
15645
|
return;
|
16147
15646
|
}
|
16148
15647
|
if (state === null || state === void 0 ? void 0 : state.record) {
|
16149
|
-
console.log("condition 1 data", state === null || state === void 0 ? void 0 : state.record);
|
16150
15648
|
setData(state === null || state === void 0 ? void 0 : state.record);
|
16151
15649
|
}
|
16152
15650
|
else {
|
16153
|
-
console.log("condition 2 data", { ownership: true });
|
16154
15651
|
setData({ ownership: true });
|
16155
15652
|
}
|
16156
15653
|
}, []);
|
16157
15654
|
useEffect(function () {
|
16158
|
-
|
16159
|
-
|
16160
|
-
|
16161
|
-
|
16162
|
-
|
16163
|
-
|
16164
|
-
getNationalInvestmentDetails();
|
16165
|
-
getOrganisationsDetails();
|
15655
|
+
if (data) {
|
15656
|
+
var keys = Object.keys(data);
|
15657
|
+
if (keys[0] !== "ownership") {
|
15658
|
+
getOrganisationsDetails();
|
15659
|
+
}
|
15660
|
+
}
|
16166
15661
|
getGovernmentDetails();
|
16167
|
-
getAllProjectData();
|
16168
|
-
getUserOrganization();
|
16169
15662
|
}, [data]);
|
16170
|
-
if (!data
|
15663
|
+
if (!data) {
|
16171
15664
|
return React.createElement(Loading, null);
|
16172
15665
|
}
|
16173
15666
|
console.log("data", data);
|
16174
|
-
|
15667
|
+
var companyName = {};
|
16175
15668
|
if (data && Object.keys(data)[0] !== "ownership") {
|
16176
|
-
|
16177
|
-
|
16178
|
-
|
15669
|
+
for (var _i = 0, _l = data === null || data === void 0 ? void 0 : data.company; _i < _l.length; _i++) {
|
15670
|
+
var company = _l[_i];
|
15671
|
+
companyName[company === null || company === void 0 ? void 0 : company.companyId] = company;
|
15672
|
+
}
|
16179
15673
|
if (!data.proponentPercentage) {
|
16180
15674
|
data.proponentPercentage = [100];
|
16181
15675
|
}
|
16182
15676
|
}
|
16183
15677
|
var nextOne = function (val) {
|
16184
|
-
console.log("step 1 values", val);
|
16185
|
-
if (val.typeCreation == InvestmentCreationType.EXISTING) {
|
16186
|
-
val.toCompanyId = investmentData.toCompanyId;
|
16187
|
-
}
|
16188
15678
|
setCurrent(current + 1);
|
16189
15679
|
setStepOneData(val);
|
16190
|
-
if (data === null || data === void 0 ? void 0 : data.programmeId)
|
16191
|
-
setSelectedProgramme(data.programmeId);
|
16192
|
-
if (prevInvestor && prevInvestor != val.toCompanyId && !(data === null || data === void 0 ? void 0 : data.programmeId)) {
|
16193
|
-
formTwo.resetFields();
|
16194
|
-
setCurrentPercTotal(0);
|
16195
|
-
setProjectData(undefined);
|
16196
|
-
}
|
16197
15680
|
};
|
16198
15681
|
var prevOne = function () {
|
16199
15682
|
setCurrent(current - 1);
|
16200
|
-
setPrevInvestor(stepOneData.toCompanyId);
|
16201
|
-
// formTwo.resetFields();
|
16202
|
-
// setCurrentPercTotal(0);
|
16203
|
-
// setProjectData(undefined);
|
16204
15683
|
};
|
16205
15684
|
var submitInvestment = function (val) { return __awaiter(void 0, void 0, void 0, function () {
|
16206
|
-
var payload, response,
|
15685
|
+
var payload, response, error_3;
|
16207
15686
|
return __generator(this, function (_a) {
|
16208
15687
|
switch (_a.label) {
|
16209
15688
|
case 0:
|
16210
15689
|
console.log(val);
|
16211
15690
|
console.log(stepOneData);
|
16212
|
-
console.log("OwnershipType", investmentOwnershipType);
|
16213
15691
|
setLoading(true);
|
16214
15692
|
payload = stepOneData;
|
15693
|
+
payload.programmeId = data.programmeId;
|
16215
15694
|
payload.amount = parseFloat(payload.amount);
|
16216
15695
|
if (payload.interestRate) {
|
16217
15696
|
payload.interestRate = parseFloat(payload.interestRate);
|
@@ -16228,32 +15707,16 @@ var InvestmentCreationComponent = function (props) {
|
|
16228
15707
|
.startOf("day")
|
16229
15708
|
.unix();
|
16230
15709
|
}
|
15710
|
+
payload.instrument = [payload.instrument];
|
15711
|
+
payload.fromCompanyIds = data.companyId.map(function (e) { return Number(e); });
|
15712
|
+
payload.percentage = val.percentage;
|
16231
15713
|
payload.toCompanyId = Number(payload.toCompanyId);
|
16232
15714
|
_a.label = 1;
|
16233
15715
|
case 1:
|
16234
|
-
_a.trys.push([1,
|
16235
|
-
response = void 0;
|
16236
|
-
if (!(investmentOwnershipType == InvestmentOwnershipType.PROJECT)) return [3 /*break*/, 3];
|
16237
|
-
if (typeCreation == InvestmentCreationType.EXISTING) {
|
16238
|
-
payload.nationalInvestmentId = investmentData.requestId;
|
16239
|
-
}
|
16240
|
-
else {
|
16241
|
-
payload.instrument = [payload.instrument];
|
16242
|
-
}
|
16243
|
-
payload.programmeId = projectData === null || projectData === void 0 ? void 0 : projectData.programmeId;
|
16244
|
-
payload.fromCompanyIds = projectData === null || projectData === void 0 ? void 0 : projectData.companyId.map(function (e) { return Number(e); });
|
16245
|
-
payload.percentage = val.percentage;
|
15716
|
+
_a.trys.push([1, 3, 4, 5]);
|
16246
15717
|
return [4 /*yield*/, post("national/programme/addInvestment", payload)];
|
16247
15718
|
case 2:
|
16248
15719
|
response = _a.sent();
|
16249
|
-
return [3 /*break*/, 5];
|
16250
|
-
case 3:
|
16251
|
-
payload.instrument = [payload.instrument];
|
16252
|
-
return [4 /*yield*/, post("national/organisation/addInvestment", payload)];
|
16253
|
-
case 4:
|
16254
|
-
response = _a.sent();
|
16255
|
-
_a.label = 5;
|
16256
|
-
case 5:
|
16257
15720
|
console.log("investment creation -> ", response);
|
16258
15721
|
if ((response === null || response === void 0 ? void 0 : response.statusText) === "SUCCESS") {
|
16259
15722
|
message.open({
|
@@ -16263,24 +15726,22 @@ var InvestmentCreationComponent = function (props) {
|
|
16263
15726
|
style: { textAlign: "right", marginRight: 15, marginTop: 10 },
|
16264
15727
|
});
|
16265
15728
|
}
|
16266
|
-
(data
|
16267
|
-
|
16268
|
-
|
16269
|
-
|
16270
|
-
|
16271
|
-
error_6 = _a.sent();
|
16272
|
-
console.log("Error in investment creation - ", error_6);
|
15729
|
+
onNavigateToProgrammeView(data.programmeId);
|
15730
|
+
return [3 /*break*/, 5];
|
15731
|
+
case 3:
|
15732
|
+
error_3 = _a.sent();
|
15733
|
+
console.log("Error in investment creation - ", error_3);
|
16273
15734
|
message.open({
|
16274
15735
|
type: "error",
|
16275
|
-
content:
|
15736
|
+
content: error_3 === null || error_3 === void 0 ? void 0 : error_3.message,
|
16276
15737
|
duration: 4,
|
16277
15738
|
style: { textAlign: "right", marginRight: 15, marginTop: 10 },
|
16278
15739
|
});
|
16279
|
-
return [3 /*break*/,
|
16280
|
-
case
|
15740
|
+
return [3 /*break*/, 5];
|
15741
|
+
case 4:
|
16281
15742
|
setLoading(false);
|
16282
15743
|
return [7 /*endfinally*/];
|
16283
|
-
case
|
15744
|
+
case 5: return [2 /*return*/];
|
16284
15745
|
}
|
16285
15746
|
});
|
16286
15747
|
}); };
|
@@ -16294,14 +15755,6 @@ var InvestmentCreationComponent = function (props) {
|
|
16294
15755
|
var onChangeTypeCreation = function (e) {
|
16295
15756
|
console.log("radio checked", e.target.value);
|
16296
15757
|
setTypeCreation(e.target.value);
|
16297
|
-
formOne.resetFields();
|
16298
|
-
formTwo.resetFields();
|
16299
|
-
setCurrentPercTotal(0);
|
16300
|
-
setProjectData(undefined);
|
16301
|
-
};
|
16302
|
-
var onChangeInvestmentOwnershipType = function (e) {
|
16303
|
-
console.log("investment ownership type radio checked", e.target.value);
|
16304
|
-
setInvestmentOwnershipType(e.target.value);
|
16305
15758
|
};
|
16306
15759
|
return (React.createElement("div", { className: "add-programme-main-container" },
|
16307
15760
|
React.createElement("div", { className: "title-container" },
|
@@ -16326,60 +15779,106 @@ var InvestmentCreationComponent = function (props) {
|
|
16326
15779
|
] },
|
16327
15780
|
React.createElement(Radio.Group, { size: "large", defaultValue: typeCreation }, Object.values(InvestmentCreationType).map(function (k, index) { return (React.createElement("div", { className: "condition-radio-container" },
|
16328
15781
|
React.createElement(Radio.Button, { className: "condition-radio", value: k, onChange: onChangeTypeCreation }, t("programme:" + k)))); }))))),
|
16329
|
-
|
16330
|
-
React.createElement(
|
16331
|
-
React.createElement(
|
16332
|
-
React.createElement("
|
16333
|
-
|
16334
|
-
|
16335
|
-
|
16336
|
-
|
16337
|
-
|
16338
|
-
|
16339
|
-
|
16340
|
-
|
16341
|
-
|
16342
|
-
|
16343
|
-
|
16344
|
-
|
15782
|
+
React.createElement(Row, { className: "row", gutter: [16, 16] },
|
15783
|
+
React.createElement(Col, { xl: 12, md: 24 },
|
15784
|
+
React.createElement("div", { className: "details-part-one" },
|
15785
|
+
React.createElement(Form.Item, { label: t("programme:investorName"), name: "toCompanyId", wrapperCol: { span: 24 }, className: "organisation", rules: [
|
15786
|
+
{
|
15787
|
+
required: true,
|
15788
|
+
message: "".concat(t("programme:investorName"), " ").concat(t("isRequired")),
|
15789
|
+
},
|
15790
|
+
] },
|
15791
|
+
React.createElement(Select, { size: "large", loading: loadingList }, organisationsList.map(function (organisation) { return (React.createElement(Select.Option, { key: organisation.companyId, value: organisation.companyId }, organisation.name)); }))))),
|
15792
|
+
React.createElement(Col, { xl: 12, md: 24 },
|
15793
|
+
React.createElement("div", { className: "details-part-two" },
|
15794
|
+
React.createElement(Form.Item, { label: t("programme:amountInvested"), name: "amount", rules: [
|
15795
|
+
{
|
15796
|
+
required: true,
|
15797
|
+
message: "",
|
15798
|
+
},
|
15799
|
+
{
|
15800
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
15801
|
+
return __generator(this, function (_a) {
|
15802
|
+
if (String(value).trim() === "" ||
|
15803
|
+
String(value).trim() === undefined ||
|
15804
|
+
value === null ||
|
15805
|
+
value === undefined) {
|
15806
|
+
throw new Error("".concat(t("programme:amountInvested"), " ").concat(t("isRequired")));
|
15807
|
+
}
|
15808
|
+
else if (!isNaN(value) &&
|
15809
|
+
Number(value) > 0) {
|
15810
|
+
return [2 /*return*/, Promise.resolve()];
|
15811
|
+
}
|
15812
|
+
else {
|
15813
|
+
throw new Error("".concat(t("programme:amountInvested"), " ").concat(t("isInvalid")));
|
15814
|
+
}
|
15815
|
+
});
|
15816
|
+
}); },
|
15817
|
+
},
|
15818
|
+
] },
|
15819
|
+
React.createElement(Input, { size: "large" }))))),
|
15820
|
+
React.createElement(Row, { className: "row", gutter: [16, 16] },
|
15821
|
+
React.createElement(Col, { xl: 24, md: 24 },
|
15822
|
+
React.createElement(Form.Item, { label: t("programme:instrument"), name: "instrument",
|
15823
|
+
//wrapperCol={{ span: 24 }}
|
15824
|
+
required: true, className: "investment-radio-button", rules: [
|
15825
|
+
{
|
15826
|
+
required: true,
|
15827
|
+
message: "",
|
15828
|
+
},
|
15829
|
+
{
|
15830
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
15831
|
+
return __generator(this, function (_a) {
|
15832
|
+
if (String(value).trim() === "" ||
|
15833
|
+
String(value).trim() === undefined ||
|
15834
|
+
value === null ||
|
15835
|
+
value === undefined) {
|
15836
|
+
throw new Error("".concat(t("programme:instrument"), " ").concat(t("isRequired")));
|
16345
15837
|
}
|
16346
|
-
|
16347
|
-
|
16348
|
-
|
16349
|
-
|
16350
|
-
|
16351
|
-
|
16352
|
-
|
16353
|
-
|
16354
|
-
|
16355
|
-
|
16356
|
-
|
16357
|
-
|
16358
|
-
|
16359
|
-
|
16360
|
-
|
16361
|
-
|
16362
|
-
|
16363
|
-
|
16364
|
-
|
16365
|
-
|
16366
|
-
|
16367
|
-
|
16368
|
-
|
16369
|
-
|
16370
|
-
|
16371
|
-
|
16372
|
-
|
16373
|
-
|
16374
|
-
|
16375
|
-
}
|
16376
|
-
|
16377
|
-
|
16378
|
-
|
16379
|
-
|
15838
|
+
return [2 /*return*/];
|
15839
|
+
});
|
15840
|
+
}); },
|
15841
|
+
},
|
15842
|
+
] },
|
15843
|
+
React.createElement(Radio.Group, { onChange: onInstrumentChange, value: instrument[0] }, instrumentOptions.map(function (e) {
|
15844
|
+
return (React.createElement(Radio, { value: e.value }, e.label));
|
15845
|
+
}))))),
|
15846
|
+
instrument &&
|
15847
|
+
instrument.indexOf(Instrument.LOAN) >= 0 && (React.createElement(Row, { className: "row", gutter: [16, 16] },
|
15848
|
+
React.createElement(Col, { xl: 8, md: 12 },
|
15849
|
+
React.createElement("div", { className: "details-part-two" },
|
15850
|
+
React.createElement(Form.Item, { label: t("programme:interestRate"), name: "interestRate", rules: [
|
15851
|
+
{
|
15852
|
+
required: true,
|
15853
|
+
message: "",
|
15854
|
+
},
|
15855
|
+
{
|
15856
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
15857
|
+
return __generator(this, function (_a) {
|
15858
|
+
if (String(value).trim() === "" ||
|
15859
|
+
String(value).trim() ===
|
15860
|
+
undefined ||
|
15861
|
+
value === null ||
|
15862
|
+
value === undefined) {
|
15863
|
+
throw new Error("".concat(t("programme:interestRate"), " ").concat(t("isRequired")));
|
15864
|
+
}
|
15865
|
+
else if (!isNaN(value)) {
|
15866
|
+
return [2 /*return*/, Promise.resolve()];
|
15867
|
+
}
|
15868
|
+
else {
|
15869
|
+
throw new Error("".concat(t("programme:interestRate"), " ").concat(t("isInvalid")));
|
15870
|
+
}
|
15871
|
+
});
|
15872
|
+
}); },
|
15873
|
+
},
|
15874
|
+
] },
|
15875
|
+
React.createElement(Input, { size: "large" })))))),
|
15876
|
+
instrument &&
|
15877
|
+
(instrument.indexOf(Instrument.CONLOAN) >= 0 ||
|
15878
|
+
instrument.indexOf(Instrument.NONCONLOAN) >= 0) && (React.createElement("div", { className: "details-part-two" },
|
16380
15879
|
React.createElement(Row, { className: "row", gutter: [16, 16] },
|
16381
|
-
React.createElement(Col, { xl:
|
16382
|
-
React.createElement(Form.Item, { label: t("programme:
|
15880
|
+
React.createElement(Col, { xl: 8, md: 12 },
|
15881
|
+
React.createElement(Form.Item, { label: t("programme:interestRate"), name: "interestRate", rules: [
|
16383
15882
|
{
|
16384
15883
|
required: true,
|
16385
15884
|
message: "",
|
@@ -16388,422 +15887,296 @@ var InvestmentCreationComponent = function (props) {
|
|
16388
15887
|
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
16389
15888
|
return __generator(this, function (_a) {
|
16390
15889
|
if (String(value).trim() === "" ||
|
16391
|
-
String(value).trim() ===
|
15890
|
+
String(value).trim() ===
|
15891
|
+
undefined ||
|
16392
15892
|
value === null ||
|
16393
15893
|
value === undefined) {
|
16394
|
-
throw new Error("".concat(t("programme:
|
15894
|
+
throw new Error("".concat(t("programme:interestRate"), " ").concat(t("isRequired")));
|
15895
|
+
}
|
15896
|
+
else if (!isNaN(value)) {
|
15897
|
+
return [2 /*return*/, Promise.resolve()];
|
15898
|
+
}
|
15899
|
+
else {
|
15900
|
+
throw new Error("".concat(t("programme:interestRate"), " ").concat(t("isInvalid")));
|
16395
15901
|
}
|
16396
|
-
return [2 /*return*/];
|
16397
15902
|
});
|
16398
15903
|
}); },
|
16399
15904
|
},
|
16400
15905
|
] },
|
16401
|
-
React.createElement(
|
16402
|
-
|
16403
|
-
}))))),
|
16404
|
-
instrument &&
|
16405
|
-
instrument.indexOf(Instrument.LOAN) >= 0 && (React.createElement(Row, { className: "row", gutter: [16, 16] },
|
15906
|
+
React.createElement(Input, { size: "large" })))),
|
15907
|
+
React.createElement(Row, { className: "row", gutter: [16, 16] },
|
16406
15908
|
React.createElement(Col, { xl: 8, md: 12 },
|
16407
|
-
React.createElement(
|
16408
|
-
|
16409
|
-
|
16410
|
-
|
16411
|
-
|
16412
|
-
|
16413
|
-
{
|
16414
|
-
|
16415
|
-
|
16416
|
-
|
16417
|
-
|
16418
|
-
|
16419
|
-
|
16420
|
-
|
16421
|
-
|
16422
|
-
|
16423
|
-
|
16424
|
-
|
16425
|
-
|
16426
|
-
|
16427
|
-
|
16428
|
-
}
|
16429
|
-
});
|
16430
|
-
}); },
|
16431
|
-
},
|
16432
|
-
] },
|
16433
|
-
React.createElement(Input, { size: "large" })))))),
|
16434
|
-
instrument &&
|
16435
|
-
(instrument.indexOf(Instrument.CONLOAN) >= 0 ||
|
16436
|
-
instrument.indexOf(Instrument.NONCONLOAN) >=
|
16437
|
-
0) && (React.createElement("div", { className: "details-part-two" },
|
16438
|
-
React.createElement(Row, { className: "row", gutter: [16, 16] },
|
16439
|
-
React.createElement(Col, { xl: 8, md: 12 },
|
16440
|
-
React.createElement(Form.Item, { label: t("programme:interestRate"), name: "interestRate", rules: [
|
16441
|
-
{
|
16442
|
-
required: true,
|
16443
|
-
message: "",
|
16444
|
-
},
|
16445
|
-
{
|
16446
|
-
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
16447
|
-
return __generator(this, function (_a) {
|
16448
|
-
if (String(value).trim() === "" ||
|
16449
|
-
String(value).trim() ===
|
16450
|
-
undefined ||
|
16451
|
-
value === null ||
|
16452
|
-
value === undefined) {
|
16453
|
-
throw new Error("".concat(t("programme:interestRate"), " ").concat(t("isRequired")));
|
16454
|
-
}
|
16455
|
-
else if (!isNaN(value)) {
|
16456
|
-
return [2 /*return*/, Promise.resolve()];
|
16457
|
-
}
|
16458
|
-
else {
|
16459
|
-
throw new Error("".concat(t("programme:interestRate"), " ").concat(t("isInvalid")));
|
16460
|
-
}
|
16461
|
-
});
|
16462
|
-
}); },
|
16463
|
-
},
|
16464
|
-
] },
|
16465
|
-
React.createElement(Input, { size: "large" })))),
|
16466
|
-
React.createElement(Row, { className: "row", gutter: [16, 16] },
|
16467
|
-
React.createElement(Col, { xl: 8, md: 12 },
|
16468
|
-
React.createElement(Form.Item, { label: t("programme:loanPeriod"), name: "period", required: true, rules: [
|
16469
|
-
{
|
16470
|
-
required: true,
|
16471
|
-
message: "",
|
16472
|
-
},
|
16473
|
-
{
|
16474
|
-
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
16475
|
-
return __generator(this, function (_a) {
|
16476
|
-
if (String(value).trim() === "" ||
|
16477
|
-
String(value).trim() ===
|
16478
|
-
undefined ||
|
16479
|
-
value === null ||
|
16480
|
-
value === undefined) {
|
16481
|
-
throw new Error("".concat(t("programme:loanPeriod"), " ").concat(t("isRequired")));
|
16482
|
-
}
|
16483
|
-
return [2 /*return*/];
|
16484
|
-
});
|
16485
|
-
}); },
|
16486
|
-
},
|
16487
|
-
] },
|
16488
|
-
React.createElement(RangePicker$3, { showTime: true, allowClear: true, format: "DD:MM:YYYY", size: "large" }))),
|
16489
|
-
React.createElement(Col, { xl: 8, md: 12 },
|
16490
|
-
React.createElement(Form.Item, { label: t("programme:startOfPayback"), name: "startOfPayback", rules: [
|
16491
|
-
{
|
16492
|
-
required: true,
|
16493
|
-
message: "",
|
16494
|
-
},
|
16495
|
-
{
|
16496
|
-
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
16497
|
-
return __generator(this, function (_a) {
|
16498
|
-
if (String(value).trim() === "" ||
|
16499
|
-
String(value).trim() ===
|
16500
|
-
undefined ||
|
16501
|
-
value === null ||
|
16502
|
-
value === undefined) {
|
16503
|
-
throw new Error("".concat(t("programme:startOfPayback"), " ").concat(t("isRequired")));
|
16504
|
-
}
|
16505
|
-
return [2 /*return*/];
|
16506
|
-
});
|
16507
|
-
}); },
|
16508
|
-
},
|
16509
|
-
] },
|
16510
|
-
React.createElement(DatePicker, { size: "large", disabledDate: function (currentDate) {
|
16511
|
-
return currentDate <
|
16512
|
-
moment().startOf("day");
|
16513
|
-
} })))))),
|
16514
|
-
instrument &&
|
16515
|
-
instrument.indexOf(Instrument.GUARANTEE) >= 0 && (React.createElement("div", { className: "details-part-two" },
|
16516
|
-
React.createElement(Row, { className: "row", gutter: [16, 16] },
|
16517
|
-
React.createElement(Col, { xl: 8, md: 12 },
|
16518
|
-
React.createElement(Form.Item, { label: t("programme:interestRate"), name: "interestRate", rules: [
|
16519
|
-
{
|
16520
|
-
required: true,
|
16521
|
-
message: "",
|
16522
|
-
},
|
16523
|
-
{
|
16524
|
-
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
16525
|
-
return __generator(this, function (_a) {
|
16526
|
-
if (String(value).trim() === "" ||
|
16527
|
-
String(value).trim() ===
|
16528
|
-
undefined ||
|
16529
|
-
value === null ||
|
16530
|
-
value === undefined) {
|
16531
|
-
throw new Error("".concat(t("programme:interestRate"), " ").concat(t("isRequired")));
|
16532
|
-
}
|
16533
|
-
else if (!isNaN(value)) {
|
16534
|
-
return [2 /*return*/, Promise.resolve()];
|
16535
|
-
}
|
16536
|
-
else {
|
16537
|
-
throw new Error("".concat(t("programme:interestRate"), " ").concat(t("isInvalid")));
|
16538
|
-
}
|
16539
|
-
});
|
16540
|
-
}); },
|
16541
|
-
},
|
16542
|
-
] },
|
16543
|
-
React.createElement(Input, { size: "large" })))),
|
16544
|
-
React.createElement(Row, { className: "row", gutter: [16, 16] },
|
16545
|
-
React.createElement(Col, { xl: 8, md: 12 },
|
16546
|
-
React.createElement(Form.Item, { label: t("programme:period"), name: "period", required: true, rules: [
|
16547
|
-
{
|
16548
|
-
required: true,
|
16549
|
-
message: "",
|
16550
|
-
},
|
16551
|
-
{
|
16552
|
-
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
16553
|
-
return __generator(this, function (_a) {
|
16554
|
-
if (String(value).trim() === "" ||
|
16555
|
-
String(value).trim() ===
|
16556
|
-
undefined ||
|
16557
|
-
value === null ||
|
16558
|
-
value === undefined) {
|
16559
|
-
throw new Error("".concat(t("programme:period"), " ").concat(t("isRequired")));
|
16560
|
-
}
|
16561
|
-
return [2 /*return*/];
|
16562
|
-
});
|
16563
|
-
}); },
|
16564
|
-
},
|
16565
|
-
] },
|
16566
|
-
React.createElement(RangePicker$3, { showTime: true, allowClear: true, format: "DD:MM:YYYY", size: "large" }))),
|
16567
|
-
React.createElement(Col, { xl: 8, md: 12 },
|
16568
|
-
React.createElement(Form.Item, { label: t("programme:payback"), wrapperCol: { span: 13 }, className: "role-group", name: "guaranteePayback", rules: [
|
16569
|
-
{
|
16570
|
-
required: true,
|
16571
|
-
message: "",
|
16572
|
-
},
|
16573
|
-
{
|
16574
|
-
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
16575
|
-
return __generator(this, function (_a) {
|
16576
|
-
if (String(value).trim() === "" ||
|
16577
|
-
String(value).trim() ===
|
16578
|
-
undefined ||
|
16579
|
-
value === null ||
|
16580
|
-
value === undefined) {
|
16581
|
-
throw new Error("".concat(t("programme:payback"), " ").concat(t("isRequired")));
|
16582
|
-
}
|
16583
|
-
return [2 /*return*/];
|
16584
|
-
});
|
16585
|
-
}); },
|
16586
|
-
},
|
16587
|
-
] },
|
16588
|
-
React.createElement(Radio.Group, { size: "large" }, Object.values(GuaranteePayback).map(function (k, index) { return (React.createElement("div", { className: "condition-radio-container" },
|
16589
|
-
React.createElement(Radio.Button, { className: "condition-radio", value: k }, t("programme:" + k)))); }))))))),
|
16590
|
-
instrument &&
|
16591
|
-
instrument.indexOf(Instrument.RESULT_BASED) >=
|
16592
|
-
0 && (React.createElement(Row, { className: "row", gutter: [16, 16] },
|
16593
|
-
React.createElement(Col, { xl: 12, md: 24 },
|
16594
|
-
React.createElement("div", { className: "details-part-two" },
|
16595
|
-
React.createElement(Form.Item, { label: t("programme:resultMetric"), name: "resultMetric", rules: [
|
16596
|
-
{
|
16597
|
-
required: true,
|
16598
|
-
message: "",
|
16599
|
-
},
|
16600
|
-
{
|
16601
|
-
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
16602
|
-
return __generator(this, function (_a) {
|
16603
|
-
if (String(value).trim() === "" ||
|
16604
|
-
String(value).trim() ===
|
16605
|
-
undefined ||
|
16606
|
-
value === null ||
|
16607
|
-
value === undefined) {
|
16608
|
-
throw new Error("".concat(t("programme:resultMetric"), " ").concat(t("isRequired")));
|
16609
|
-
}
|
16610
|
-
return [2 /*return*/];
|
16611
|
-
});
|
16612
|
-
}); },
|
16613
|
-
},
|
16614
|
-
] },
|
16615
|
-
React.createElement(Input, { size: "large" })))),
|
16616
|
-
React.createElement(Col, { xl: 12, md: 24 },
|
16617
|
-
React.createElement("div", { className: "details-part-two" },
|
16618
|
-
React.createElement(Form.Item, { label: t("programme:paymentPerMetric"), name: "paymentPerMetric", rules: [
|
16619
|
-
{
|
16620
|
-
required: true,
|
16621
|
-
message: "",
|
16622
|
-
},
|
16623
|
-
{
|
16624
|
-
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
16625
|
-
return __generator(this, function (_a) {
|
16626
|
-
if (String(value).trim() === "" ||
|
16627
|
-
String(value).trim() ===
|
16628
|
-
undefined ||
|
16629
|
-
value === null ||
|
16630
|
-
value === undefined) {
|
16631
|
-
throw new Error("".concat(t("programme:paymentPerMetric"), " ").concat(t("isRequired")));
|
16632
|
-
}
|
16633
|
-
else if (!isNaN(value)) {
|
16634
|
-
return [2 /*return*/, Promise.resolve()];
|
16635
|
-
}
|
16636
|
-
else {
|
16637
|
-
throw new Error("".concat(t("programme:paymentPerMetric"), " ").concat(t("isInvalid")));
|
16638
|
-
}
|
16639
|
-
});
|
16640
|
-
}); },
|
16641
|
-
},
|
16642
|
-
] },
|
16643
|
-
React.createElement(Input, { size: "large" })))))),
|
16644
|
-
instrument &&
|
16645
|
-
instrument.indexOf(Instrument.INKIND) >= 0 && (React.createElement(Row, { className: "row", gutter: [16, 16] },
|
16646
|
-
React.createElement(Col, { xl: 12, md: 24 },
|
16647
|
-
React.createElement("div", { className: "details-part-two" },
|
16648
|
-
React.createElement(Form.Item, { label: t("programme:description"), name: "description", rules: [
|
16649
|
-
{
|
16650
|
-
required: false,
|
16651
|
-
message: "",
|
16652
|
-
},
|
16653
|
-
] },
|
16654
|
-
React.createElement(Input, { size: "large" })))))),
|
16655
|
-
instrument &&
|
16656
|
-
instrument.indexOf(Instrument.INSURANCE) >= 0 && (React.createElement(Row, { className: "row", gutter: [16, 16] },
|
15909
|
+
React.createElement(Form.Item, { label: t("programme:loanPeriod"), name: "period", required: true, rules: [
|
15910
|
+
{
|
15911
|
+
required: true,
|
15912
|
+
message: "",
|
15913
|
+
},
|
15914
|
+
{
|
15915
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
15916
|
+
return __generator(this, function (_a) {
|
15917
|
+
if (String(value).trim() === "" ||
|
15918
|
+
String(value).trim() ===
|
15919
|
+
undefined ||
|
15920
|
+
value === null ||
|
15921
|
+
value === undefined) {
|
15922
|
+
throw new Error("".concat(t("programme:loanPeriod"), " ").concat(t("isRequired")));
|
15923
|
+
}
|
15924
|
+
return [2 /*return*/];
|
15925
|
+
});
|
15926
|
+
}); },
|
15927
|
+
},
|
15928
|
+
] },
|
15929
|
+
React.createElement(RangePicker$3, { showTime: true, allowClear: true, format: "DD:MM:YYYY", size: "large" }))),
|
16657
15930
|
React.createElement(Col, { xl: 8, md: 12 },
|
16658
|
-
React.createElement(
|
16659
|
-
|
16660
|
-
|
16661
|
-
|
16662
|
-
|
16663
|
-
|
16664
|
-
{
|
16665
|
-
|
16666
|
-
|
16667
|
-
|
16668
|
-
|
16669
|
-
|
16670
|
-
|
16671
|
-
|
16672
|
-
|
16673
|
-
|
16674
|
-
|
16675
|
-
|
16676
|
-
|
16677
|
-
|
16678
|
-
|
16679
|
-
|
16680
|
-
|
16681
|
-
|
16682
|
-
|
16683
|
-
React.createElement(Col, { xl: 12, md: 24 },
|
16684
|
-
React.createElement("div", { className: "details-part-two" },
|
16685
|
-
React.createElement(Form.Item, { label: t("programme:comments"), name: "comments", rules: [
|
16686
|
-
{
|
16687
|
-
required: true,
|
16688
|
-
message: "",
|
16689
|
-
},
|
16690
|
-
{
|
16691
|
-
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
16692
|
-
return __generator(this, function (_a) {
|
16693
|
-
if (String(value).trim() === "" ||
|
16694
|
-
String(value).trim() ===
|
16695
|
-
undefined ||
|
16696
|
-
value === null ||
|
16697
|
-
value === undefined) {
|
16698
|
-
throw new Error("".concat(t("programme:comments"), " ").concat(t("isRequired")));
|
16699
|
-
}
|
16700
|
-
return [2 /*return*/];
|
16701
|
-
});
|
16702
|
-
}); },
|
16703
|
-
},
|
16704
|
-
] },
|
16705
|
-
React.createElement(Input, { size: "large" })))))),
|
15931
|
+
React.createElement(Form.Item, { label: t("programme:startOfPayback"), name: "startOfPayback", rules: [
|
15932
|
+
{
|
15933
|
+
required: true,
|
15934
|
+
message: "",
|
15935
|
+
},
|
15936
|
+
{
|
15937
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
15938
|
+
return __generator(this, function (_a) {
|
15939
|
+
if (String(value).trim() === "" ||
|
15940
|
+
String(value).trim() ===
|
15941
|
+
undefined ||
|
15942
|
+
value === null ||
|
15943
|
+
value === undefined) {
|
15944
|
+
throw new Error("".concat(t("programme:startOfPayback"), " ").concat(t("isRequired")));
|
15945
|
+
}
|
15946
|
+
return [2 /*return*/];
|
15947
|
+
});
|
15948
|
+
}); },
|
15949
|
+
},
|
15950
|
+
] },
|
15951
|
+
React.createElement(DatePicker, { size: "large", disabledDate: function (currentDate) {
|
15952
|
+
return currentDate < moment().startOf("day");
|
15953
|
+
} })))))),
|
15954
|
+
instrument &&
|
15955
|
+
instrument.indexOf(Instrument.GUARANTEE) >= 0 && (React.createElement("div", { className: "details-part-two" },
|
16706
15956
|
React.createElement(Row, { className: "row", gutter: [16, 16] },
|
16707
15957
|
React.createElement(Col, { xl: 8, md: 12 },
|
16708
|
-
React.createElement(Form.Item, { label: t("programme:
|
15958
|
+
React.createElement(Form.Item, { label: t("programme:interestRate"), name: "interestRate", rules: [
|
16709
15959
|
{
|
16710
|
-
required:
|
15960
|
+
required: true,
|
15961
|
+
message: "",
|
15962
|
+
},
|
15963
|
+
{
|
15964
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
15965
|
+
return __generator(this, function (_a) {
|
15966
|
+
if (String(value).trim() === "" ||
|
15967
|
+
String(value).trim() ===
|
15968
|
+
undefined ||
|
15969
|
+
value === null ||
|
15970
|
+
value === undefined) {
|
15971
|
+
throw new Error("".concat(t("programme:interestRate"), " ").concat(t("isRequired")));
|
15972
|
+
}
|
15973
|
+
else if (!isNaN(value)) {
|
15974
|
+
return [2 /*return*/, Promise.resolve()];
|
15975
|
+
}
|
15976
|
+
else {
|
15977
|
+
throw new Error("".concat(t("programme:interestRate"), " ").concat(t("isInvalid")));
|
15978
|
+
}
|
15979
|
+
});
|
15980
|
+
}); },
|
16711
15981
|
},
|
16712
15982
|
] },
|
16713
|
-
React.createElement(
|
16714
|
-
|
16715
|
-
return deselectOnClick(e, "type");
|
16716
|
-
} }, t("programme:" + k)))); })))),
|
15983
|
+
React.createElement(Input, { size: "large" })))),
|
15984
|
+
React.createElement(Row, { className: "row", gutter: [16, 16] },
|
16717
15985
|
React.createElement(Col, { xl: 8, md: 12 },
|
16718
|
-
React.createElement(Form.Item, { label: t("programme:
|
15986
|
+
React.createElement(Form.Item, { label: t("programme:period"), name: "period", required: true, rules: [
|
16719
15987
|
{
|
16720
|
-
required:
|
15988
|
+
required: true,
|
15989
|
+
message: "",
|
15990
|
+
},
|
15991
|
+
{
|
15992
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
15993
|
+
return __generator(this, function (_a) {
|
15994
|
+
if (String(value).trim() === "" ||
|
15995
|
+
String(value).trim() ===
|
15996
|
+
undefined ||
|
15997
|
+
value === null ||
|
15998
|
+
value === undefined) {
|
15999
|
+
throw new Error("".concat(t("programme:period"), " ").concat(t("isRequired")));
|
16000
|
+
}
|
16001
|
+
return [2 /*return*/];
|
16002
|
+
});
|
16003
|
+
}); },
|
16721
16004
|
},
|
16722
16005
|
] },
|
16723
|
-
React.createElement(
|
16724
|
-
React.createElement(Radio.Button, { className: "condition-radio", value: k, onClick: function (e) {
|
16725
|
-
return deselectOnClick(e, "level");
|
16726
|
-
} }, t("programme:" + k)))); })))),
|
16006
|
+
React.createElement(RangePicker$3, { showTime: true, allowClear: true, format: "DD:MM:YYYY", size: "large" }))),
|
16727
16007
|
React.createElement(Col, { xl: 8, md: 12 },
|
16728
|
-
React.createElement(Form.Item, { label: t("programme:
|
16008
|
+
React.createElement(Form.Item, { label: t("programme:payback"), wrapperCol: { span: 13 }, className: "role-group", name: "guaranteePayback", rules: [
|
16009
|
+
{
|
16010
|
+
required: true,
|
16011
|
+
message: "",
|
16012
|
+
},
|
16013
|
+
{
|
16014
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
16015
|
+
return __generator(this, function (_a) {
|
16016
|
+
if (String(value).trim() === "" ||
|
16017
|
+
String(value).trim() ===
|
16018
|
+
undefined ||
|
16019
|
+
value === null ||
|
16020
|
+
value === undefined) {
|
16021
|
+
throw new Error("".concat(t("programme:payback"), " ").concat(t("isRequired")));
|
16022
|
+
}
|
16023
|
+
return [2 /*return*/];
|
16024
|
+
});
|
16025
|
+
}); },
|
16026
|
+
},
|
16027
|
+
] },
|
16028
|
+
React.createElement(Radio.Group, { size: "large" }, Object.values(GuaranteePayback).map(function (k, index) { return (React.createElement("div", { className: "condition-radio-container" },
|
16029
|
+
React.createElement(Radio.Button, { className: "condition-radio", value: k }, t("programme:" + k)))); }))))))),
|
16030
|
+
instrument &&
|
16031
|
+
instrument.indexOf(Instrument.RESULT_BASED) >= 0 && (React.createElement(Row, { className: "row", gutter: [16, 16] },
|
16032
|
+
React.createElement(Col, { xl: 12, md: 24 },
|
16033
|
+
React.createElement("div", { className: "details-part-two" },
|
16034
|
+
React.createElement(Form.Item, { label: t("programme:resultMetric"), name: "resultMetric", rules: [
|
16035
|
+
{
|
16036
|
+
required: true,
|
16037
|
+
message: "",
|
16038
|
+
},
|
16039
|
+
{
|
16040
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
16041
|
+
return __generator(this, function (_a) {
|
16042
|
+
if (String(value).trim() === "" ||
|
16043
|
+
String(value).trim() ===
|
16044
|
+
undefined ||
|
16045
|
+
value === null ||
|
16046
|
+
value === undefined) {
|
16047
|
+
throw new Error("".concat(t("programme:resultMetric"), " ").concat(t("isRequired")));
|
16048
|
+
}
|
16049
|
+
return [2 /*return*/];
|
16050
|
+
});
|
16051
|
+
}); },
|
16052
|
+
},
|
16053
|
+
] },
|
16054
|
+
React.createElement(Input, { size: "large" })))),
|
16055
|
+
React.createElement(Col, { xl: 12, md: 24 },
|
16056
|
+
React.createElement("div", { className: "details-part-two" },
|
16057
|
+
React.createElement(Form.Item, { label: t("programme:paymentPerMetric"), name: "paymentPerMetric", rules: [
|
16058
|
+
{
|
16059
|
+
required: true,
|
16060
|
+
message: "",
|
16061
|
+
},
|
16062
|
+
{
|
16063
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
16064
|
+
return __generator(this, function (_a) {
|
16065
|
+
if (String(value).trim() === "" ||
|
16066
|
+
String(value).trim() ===
|
16067
|
+
undefined ||
|
16068
|
+
value === null ||
|
16069
|
+
value === undefined) {
|
16070
|
+
throw new Error("".concat(t("programme:paymentPerMetric"), " ").concat(t("isRequired")));
|
16071
|
+
}
|
16072
|
+
else if (!isNaN(value)) {
|
16073
|
+
return [2 /*return*/, Promise.resolve()];
|
16074
|
+
}
|
16075
|
+
else {
|
16076
|
+
throw new Error("".concat(t("programme:paymentPerMetric"), " ").concat(t("isInvalid")));
|
16077
|
+
}
|
16078
|
+
});
|
16079
|
+
}); },
|
16080
|
+
},
|
16081
|
+
] },
|
16082
|
+
React.createElement(Input, { size: "large" })))))),
|
16083
|
+
instrument &&
|
16084
|
+
instrument.indexOf(Instrument.INKIND) >= 0 && (React.createElement(Row, { className: "row", gutter: [16, 16] },
|
16085
|
+
React.createElement(Col, { xl: 12, md: 24 },
|
16086
|
+
React.createElement("div", { className: "details-part-two" },
|
16087
|
+
React.createElement(Form.Item, { label: t("programme:description"), name: "description", rules: [
|
16729
16088
|
{
|
16730
16089
|
required: false,
|
16090
|
+
message: "",
|
16731
16091
|
},
|
16732
16092
|
] },
|
16733
|
-
React.createElement(
|
16734
|
-
|
16735
|
-
|
16736
|
-
|
16737
|
-
|
16738
|
-
|
16739
|
-
|
16740
|
-
|
16741
|
-
|
16742
|
-
|
16743
|
-
|
16744
|
-
|
16745
|
-
|
16746
|
-
|
16747
|
-
|
16748
|
-
|
16749
|
-
|
16750
|
-
|
16751
|
-
|
16752
|
-
|
16753
|
-
|
16754
|
-
React.createElement("div", { className: "details-part-two" },
|
16755
|
-
React.createElement(Form.Item, { label: t("programme:amountInvested"), name: "amount", rules: [
|
16756
|
-
{
|
16757
|
-
required: true,
|
16758
|
-
message: "",
|
16759
|
-
},
|
16760
|
-
{
|
16761
|
-
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
16762
|
-
return __generator(this, function (_a) {
|
16763
|
-
if (String(value).trim() === "" ||
|
16764
|
-
String(value).trim() ===
|
16765
|
-
undefined ||
|
16766
|
-
value === null ||
|
16767
|
-
value === undefined) {
|
16768
|
-
throw new Error("".concat(t("programme:amountInvested"), " ").concat(t("isRequired")));
|
16769
|
-
}
|
16770
|
-
else if (!isNaN(value) &&
|
16771
|
-
Number(value) > 0) {
|
16772
|
-
return [2 /*return*/, Promise.resolve()];
|
16773
|
-
}
|
16774
|
-
else {
|
16775
|
-
throw new Error("".concat(t("programme:amountInvested"), " ").concat(t("isInvalid")));
|
16776
|
-
}
|
16777
|
-
});
|
16778
|
-
}); },
|
16779
|
-
},
|
16780
|
-
function (_a) {
|
16781
|
-
var getFieldValue = _a.getFieldValue;
|
16782
|
-
return ({
|
16783
|
-
validator: function (rule, v) {
|
16784
|
-
if (getFieldValue("amount") &&
|
16785
|
-
investmentData &&
|
16786
|
-
investmentData.amount <
|
16787
|
-
parseFloat(getFieldValue("amount"))) {
|
16788
|
-
// eslint-disable-next-line prefer-promise-reject-errors
|
16789
|
-
return Promise.reject("Amount > Available");
|
16790
|
-
}
|
16791
|
-
return Promise.resolve();
|
16792
|
-
},
|
16093
|
+
React.createElement(Input, { size: "large" })))))),
|
16094
|
+
instrument &&
|
16095
|
+
instrument.indexOf(Instrument.INSURANCE) >= 0 && (React.createElement(Row, { className: "row", gutter: [16, 16] },
|
16096
|
+
React.createElement(Col, { xl: 8, md: 12 },
|
16097
|
+
React.createElement("div", { className: "details-part-two" },
|
16098
|
+
React.createElement(Form.Item, { label: t("programme:payback"), wrapperCol: { span: 13 }, className: "role-group", name: "insurancePayback", rules: [
|
16099
|
+
{
|
16100
|
+
required: true,
|
16101
|
+
message: "",
|
16102
|
+
},
|
16103
|
+
{
|
16104
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
16105
|
+
return __generator(this, function (_a) {
|
16106
|
+
if (String(value).trim() === "" ||
|
16107
|
+
String(value).trim() ===
|
16108
|
+
undefined ||
|
16109
|
+
value === null ||
|
16110
|
+
value === undefined) {
|
16111
|
+
throw new Error("".concat(t("programme:payback"), " ").concat(t("isRequired")));
|
16112
|
+
}
|
16113
|
+
return [2 /*return*/];
|
16793
16114
|
});
|
16794
|
-
},
|
16795
|
-
|
16796
|
-
|
16797
|
-
|
16798
|
-
|
16799
|
-
|
16800
|
-
|
16801
|
-
|
16802
|
-
|
16803
|
-
|
16804
|
-
|
16805
|
-
|
16806
|
-
|
16115
|
+
}); },
|
16116
|
+
},
|
16117
|
+
] },
|
16118
|
+
React.createElement(Radio.Group, { size: "large" }, Object.values(InsurancePayback).map(function (k, index) { return (React.createElement("div", { className: "condition-radio-container" },
|
16119
|
+
React.createElement(Radio.Button, { className: "condition-radio", value: k }, t("programme:" + k)))); }))))))),
|
16120
|
+
instrument &&
|
16121
|
+
instrument.indexOf(Instrument.OTHER) >= 0 && (React.createElement(Row, { className: "row", gutter: [16, 16] },
|
16122
|
+
React.createElement(Col, { xl: 12, md: 24 },
|
16123
|
+
React.createElement("div", { className: "details-part-two" },
|
16124
|
+
React.createElement(Form.Item, { label: t("programme:comments"), name: "comments", rules: [
|
16125
|
+
{
|
16126
|
+
required: true,
|
16127
|
+
message: "",
|
16128
|
+
},
|
16129
|
+
{
|
16130
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
16131
|
+
return __generator(this, function (_a) {
|
16132
|
+
if (String(value).trim() === "" ||
|
16133
|
+
String(value).trim() ===
|
16134
|
+
undefined ||
|
16135
|
+
value === null ||
|
16136
|
+
value === undefined) {
|
16137
|
+
throw new Error("".concat(t("programme:comments"), " ").concat(t("isRequired")));
|
16138
|
+
}
|
16139
|
+
return [2 /*return*/];
|
16140
|
+
});
|
16141
|
+
}); },
|
16142
|
+
},
|
16143
|
+
] },
|
16144
|
+
React.createElement(Input, { size: "large" })))))),
|
16145
|
+
React.createElement(Row, { className: "row", gutter: [16, 16] },
|
16146
|
+
React.createElement(Col, { xl: 8, md: 12 },
|
16147
|
+
React.createElement(Form.Item, { label: t("programme:type"), wrapperCol: { span: 13 }, className: "role-group", name: "type", rules: [
|
16148
|
+
{
|
16149
|
+
required: false,
|
16150
|
+
},
|
16151
|
+
] },
|
16152
|
+
React.createElement(Radio.Group, { size: "large" }, Object.values(InvestmentType).map(function (k, index) { return (React.createElement("div", { className: "condition-radio-container" },
|
16153
|
+
React.createElement(Radio.Button, { className: "condition-radio", value: k, onClick: function (e) {
|
16154
|
+
return deselectOnClick(e, "type");
|
16155
|
+
} }, t("programme:" + k)))); })))),
|
16156
|
+
React.createElement(Col, { xl: 8, md: 12 },
|
16157
|
+
React.createElement(Form.Item, { label: t("programme:level"), wrapperCol: { span: 13 }, className: "role-group", name: "level", rules: [
|
16158
|
+
{
|
16159
|
+
required: false,
|
16160
|
+
},
|
16161
|
+
] },
|
16162
|
+
React.createElement(Radio.Group, { size: "large" }, Object.values(InvestmentLevel).map(function (k, index) { return (React.createElement("div", { className: "condition-radio-container" },
|
16163
|
+
React.createElement(Radio.Button, { className: "condition-radio", value: k, onClick: function (e) {
|
16164
|
+
return deselectOnClick(e, "level");
|
16165
|
+
} }, t("programme:" + k)))); })))),
|
16166
|
+
React.createElement(Col, { xl: 8, md: 12 },
|
16167
|
+
React.createElement(Form.Item, { label: t("programme:stream"), wrapperCol: { span: 13 }, className: "role-group", name: "stream", rules: [
|
16168
|
+
{
|
16169
|
+
required: false,
|
16170
|
+
},
|
16171
|
+
] },
|
16172
|
+
React.createElement(Radio.Group, { size: "large" }, Object.values(InvestmentStream).map(function (k, index) { return (React.createElement("div", { className: "condition-radio-container" },
|
16173
|
+
React.createElement(Radio.Button, { className: "condition-radio", value: k, onClick: function (e) {
|
16174
|
+
return deselectOnClick(e, "stream");
|
16175
|
+
} }, t("programme:" + k)))); }))))),
|
16176
|
+
React.createElement(Row, { className: "row", gutter: [16, 16] },
|
16177
|
+
React.createElement(Col, { xl: 12, md: 24 },
|
16178
|
+
React.createElement(Form.Item, { label: t("programme:esgType"), name: "esgClassification" },
|
16179
|
+
React.createElement(Select, { size: "large" }, Object.values(ESGType).map(function (esg) { return (React.createElement(Select.Option, { value: esg }, esg)); }))))),
|
16807
16180
|
React.createElement(Form.Item, null,
|
16808
16181
|
React.createElement("div", { className: "steps-actions" },
|
16809
16182
|
React.createElement(Button, { type: "primary", htmlType: "submit", loading: loading, onSubmit: nextOne }, t("programme:next")))))))),
|
@@ -16813,164 +16186,73 @@ var InvestmentCreationComponent = function (props) {
|
|
16813
16186
|
React.createElement("div", { className: "step-count" }, "02"),
|
16814
16187
|
React.createElement("div", { className: "title" }, t("programme:ownership")))),
|
16815
16188
|
description: current === 1 && (React.createElement("div", null,
|
16816
|
-
React.createElement("div", { className: "
|
16817
|
-
React.createElement("
|
16818
|
-
|
16819
|
-
React.createElement(Row, { className: "row", gutter: [
|
16820
|
-
React.createElement(Col, { xl: 8, md:
|
16821
|
-
React.createElement(
|
16189
|
+
React.createElement("div", { className: "programme-sought-form-container ownership-container" }, Object.keys(data).length > 0 && (React.createElement("div", { className: "programme-sought-form" },
|
16190
|
+
React.createElement(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 :
|
16191
|
+
data.companyId.map(function (companyId, index) {
|
16192
|
+
return (React.createElement(Row, { className: "row", gutter: [16, 16] },
|
16193
|
+
React.createElement(Col, { xl: 8, md: 15 },
|
16194
|
+
React.createElement("div", { className: "label" },
|
16195
|
+
companyName[companyId].name,
|
16196
|
+
React.createElement("span", { className: "required-mark" }, "*"))),
|
16197
|
+
React.createElement(Col, { xl: 8, md: 9 },
|
16198
|
+
React.createElement(Form.Item, { className: "inline", name: ["percentage", index], initialValue: 0, rules: [
|
16822
16199
|
{
|
16823
|
-
|
16200
|
+
pattern: new RegExp(/^[+]?([.]\d+|\d+[.]?\d*)$/g),
|
16201
|
+
message: "Percentage Should be a positive number",
|
16824
16202
|
},
|
16825
|
-
|
16826
|
-
|
16827
|
-
|
16828
|
-
|
16829
|
-
|
16830
|
-
|
16831
|
-
|
16832
|
-
|
16833
|
-
|
16834
|
-
|
16835
|
-
|
16836
|
-
|
16837
|
-
|
16838
|
-
|
16839
|
-
|
16840
|
-
|
16841
|
-
|
16842
|
-
|
16843
|
-
|
16844
|
-
: "", color: TooltipColor, key: TooltipColor },
|
16845
|
-
React.createElement(Radio.Button, { className: "condition-radio", value: k, onChange: onChangeInvestmentOwnershipType, disabled: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ==
|
16846
|
-
CompanyRole.PROGRAMME_DEVELOPER &&
|
16847
|
-
stepOneData.toCompanyId !=
|
16848
|
-
userInfoState.companyId &&
|
16849
|
-
k ==
|
16850
|
-
InvestmentOwnershipType.NATIONAL }, t("programme:" + k)))));
|
16851
|
-
}
|
16852
|
-
})))))))),
|
16853
|
-
React.createElement("div", { className: "programme-sought-form-container ownership-container" },
|
16854
|
-
React.createElement("div", { className: "programme-sought-form" },
|
16855
|
-
React.createElement(Form, { labelCol: { span: 20 }, wrapperCol: { span: 24 }, form: formTwo, name: "investment-sought", className: "investment-sought-form", layout: "vertical", requiredMark: true, onChange: onPercentageChange, onFinish: submitInvestment },
|
16856
|
-
allProjectData.length > 0 &&
|
16857
|
-
investmentOwnershipType ==
|
16858
|
-
InvestmentOwnershipType.PROJECT && (React.createElement("div", null,
|
16859
|
-
React.createElement(Row, { className: "row", gutter: [16, 16] },
|
16860
|
-
React.createElement(Col, { xl: 12, md: 24 },
|
16861
|
-
React.createElement("div", { className: "details-part-one" },
|
16862
|
-
React.createElement(Form.Item, { label: t("programme:title"), name: "projectId", wrapperCol: { span: 24 }, initialValue: (data === null || data === void 0 ? void 0 : data.programmeId) != undefined
|
16863
|
-
? allProjectData[0].programmeId
|
16864
|
-
: null, rules: [
|
16865
|
-
{
|
16866
|
-
required: true,
|
16867
|
-
message: "".concat(t("programme:title"), " ").concat(t("isRequired")),
|
16868
|
-
},
|
16869
|
-
] },
|
16870
|
-
React.createElement(Select, { size: "large", loading: loadingProgData,
|
16871
|
-
// defaultValue={
|
16872
|
-
// allProjectData.length == 1
|
16873
|
-
// ? allProjectData[0].programmeId
|
16874
|
-
// : null
|
16875
|
-
// }
|
16876
|
-
disabled: allProjectData.length == 1 &&
|
16877
|
-
(data === null || data === void 0 ? void 0 : data.programmeId) != undefined, onChange: setSelectedProgramme }, allProjectData.map(function (project) {
|
16878
|
-
if ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ==
|
16879
|
-
CompanyRole.PROGRAMME_DEVELOPER &&
|
16880
|
-
Number(stepOneData.toCompanyId) !=
|
16881
|
-
userInfoState.companyId) {
|
16882
|
-
if (project.companyId
|
16883
|
-
.map(function (id) { return Number(id); })
|
16884
|
-
.includes(userInfoState.companyId)) {
|
16885
|
-
return (React.createElement(Select.Option, { key: project.programmeId, value: project.programmeId }, project.title));
|
16886
|
-
}
|
16887
|
-
}
|
16888
|
-
else if ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
|
16889
|
-
CompanyRole.MINISTRY) {
|
16890
|
-
if (ministrySectoralScope.includes(project.sectoralScope)) {
|
16891
|
-
return (React.createElement(Select.Option, { key: project.programmeId, value: project.programmeId }, project.title));
|
16203
|
+
{
|
16204
|
+
required: true,
|
16205
|
+
message: "Required field",
|
16206
|
+
},
|
16207
|
+
function (_a) {
|
16208
|
+
var getFieldValue = _a.getFieldValue;
|
16209
|
+
return ({
|
16210
|
+
validator: function (rule, v) {
|
16211
|
+
if (getFieldValue([
|
16212
|
+
"percentage",
|
16213
|
+
index,
|
16214
|
+
]) &&
|
16215
|
+
parseFloat(getFieldValue([
|
16216
|
+
"percentage",
|
16217
|
+
index,
|
16218
|
+
])) >
|
16219
|
+
data.proponentPercentage[index]) {
|
16220
|
+
// eslint-disable-next-line prefer-promise-reject-errors
|
16221
|
+
return Promise.reject("Amount > Available");
|
16892
16222
|
}
|
16893
|
-
|
16894
|
-
else {
|
16895
|
-
return (React.createElement(Select.Option, { key: project.programmeId, value: project.programmeId }, project.title));
|
16896
|
-
}
|
16897
|
-
})))))), projectData === null || projectData === void 0 ? void 0 :
|
16898
|
-
projectData.companyId.map(function (companyId, index) {
|
16899
|
-
if (formTwo.getFieldValue("percentage") &&
|
16900
|
-
formTwo.getFieldValue("percentage")[index] &&
|
16901
|
-
companyId == stepOneData.toCompanyId) {
|
16902
|
-
formTwo.getFieldValue("percentage")[index] = 0;
|
16903
|
-
}
|
16904
|
-
return (React.createElement(Row, { className: "row", gutter: [16, 16] },
|
16905
|
-
React.createElement(Col, { xl: 8, md: 15 },
|
16906
|
-
React.createElement("div", { className: "label" },
|
16907
|
-
govData.companyId == companyId
|
16908
|
-
? govData.name
|
16909
|
-
: companyNames[Number(companyId)],
|
16910
|
-
React.createElement("span", { className: "required-mark" }, "*"))),
|
16911
|
-
React.createElement(Col, { xl: 8, md: 9 },
|
16912
|
-
React.createElement(Form.Item, { className: "inline", name: ["percentage", index], initialValue: 0, rules: [
|
16913
|
-
{
|
16914
|
-
pattern: new RegExp(/^[+]?([.]\d+|\d+[.]?\d*)$/g),
|
16915
|
-
message: "Percentage Should be a positive number",
|
16223
|
+
return Promise.resolve();
|
16916
16224
|
},
|
16917
|
-
|
16918
|
-
|
16919
|
-
|
16920
|
-
|
16921
|
-
|
16922
|
-
|
16923
|
-
|
16924
|
-
|
16925
|
-
|
16926
|
-
|
16927
|
-
|
16928
|
-
|
16929
|
-
|
16930
|
-
|
16931
|
-
|
16932
|
-
|
16933
|
-
|
16934
|
-
|
16935
|
-
|
16936
|
-
|
16937
|
-
|
16938
|
-
|
16939
|
-
|
16940
|
-
|
16941
|
-
|
16942
|
-
|
16943
|
-
|
16944
|
-
|
16945
|
-
|
16946
|
-
|
16947
|
-
|
16948
|
-
onKeyPress: function (event) {
|
16949
|
-
if (!/[0-9\.]/.test(event.key)) {
|
16950
|
-
event.preventDefault();
|
16951
|
-
}
|
16952
|
-
} })),
|
16953
|
-
React.createElement("div", { className: "inline separator" }, "/"),
|
16954
|
-
React.createElement(Form.Item, { className: "inline" },
|
16955
|
-
React.createElement(InputNumber, { placeholder: String(projectData === null || projectData === void 0 ? void 0 : projectData.proponentPercentage[index]), disabled: true })))));
|
16956
|
-
}),
|
16957
|
-
React.createElement(Row, { className: "row", gutter: [16, 16] },
|
16958
|
-
React.createElement(Col, { xl: 8, md: 15 },
|
16959
|
-
React.createElement("div", { className: "label" }, t("programme:total"))),
|
16960
|
-
React.createElement(Col, { xl: 8, md: 9 },
|
16961
|
-
React.createElement(Form.Item, { className: "inline", name: ["total"] },
|
16962
|
-
React.createElement(InputNumber, { placeholder: currentPercTotal + "", controls: false, disabled: true, onKeyPress: function (event) {
|
16963
|
-
if (!/[0-9\.]/.test(event.key)) {
|
16964
|
-
event.preventDefault();
|
16965
|
-
}
|
16966
|
-
} })),
|
16967
|
-
React.createElement("div", { className: "inline separator" }, "/"),
|
16968
|
-
React.createElement(Form.Item, { className: "inline" },
|
16969
|
-
React.createElement(InputNumber, { disabled: true, placeholder: "100" })))))),
|
16970
|
-
React.createElement(Form.Item, null,
|
16971
|
-
React.createElement("div", { className: "steps-actions" },
|
16972
|
-
React.createElement(Button, { type: "primary", htmlType: "submit", loading: loading, onSubmit: submitInvestment }, t("programme:submit")),
|
16973
|
-
React.createElement(Button, { className: "back-btn", onClick: function () { return prevOne(); }, loading: loading }, t("programme:back"))))))))),
|
16225
|
+
});
|
16226
|
+
},
|
16227
|
+
] },
|
16228
|
+
React.createElement(InputNumber, { placeholder: "", controls: false, disabled: govData.companyId == companyId,
|
16229
|
+
// disabled={userInfoState?.companyId === Number(companyId)}
|
16230
|
+
onKeyPress: function (event) {
|
16231
|
+
if (!/[0-9\.]/.test(event.key)) {
|
16232
|
+
event.preventDefault();
|
16233
|
+
}
|
16234
|
+
} })),
|
16235
|
+
React.createElement("div", { className: "inline separator" }, "/"),
|
16236
|
+
React.createElement(Form.Item, { className: "inline" },
|
16237
|
+
React.createElement(InputNumber, { placeholder: String(data === null || data === void 0 ? void 0 : data.proponentPercentage[index]), disabled: true })))));
|
16238
|
+
}),
|
16239
|
+
React.createElement(Row, { className: "row", gutter: [16, 16] },
|
16240
|
+
React.createElement(Col, { xl: 8, md: 15 },
|
16241
|
+
React.createElement("div", { className: "label" }, t("programme:total"))),
|
16242
|
+
React.createElement(Col, { xl: 8, md: 9 },
|
16243
|
+
React.createElement(Form.Item, { className: "inline", name: ["total"] },
|
16244
|
+
React.createElement(InputNumber, { placeholder: currentPercTotal + "", controls: false, disabled: true, onKeyPress: function (event) {
|
16245
|
+
if (!/[0-9\.]/.test(event.key)) {
|
16246
|
+
event.preventDefault();
|
16247
|
+
}
|
16248
|
+
} })),
|
16249
|
+
React.createElement("div", { className: "inline separator" }, "/"),
|
16250
|
+
React.createElement(Form.Item, { className: "inline" },
|
16251
|
+
React.createElement(InputNumber, { disabled: true, placeholder: "100" })))),
|
16252
|
+
React.createElement(Form.Item, null,
|
16253
|
+
React.createElement("div", { className: "steps-actions" },
|
16254
|
+
React.createElement(Button, { type: "primary", htmlType: "submit", loading: loading, onSubmit: submitInvestment }, t("programme:submit")),
|
16255
|
+
React.createElement(Button, { className: "back-btn", onClick: function () { return prevOne(); }, loading: loading }, t("programme:back")))))))))),
|
16974
16256
|
},
|
16975
16257
|
] })))));
|
16976
16258
|
};
|
@@ -17081,7 +16363,7 @@ var InvestmentActionModel = function (props) {
|
|
17081
16363
|
};
|
17082
16364
|
|
17083
16365
|
var InvestmentManagementComponent = function (props) {
|
17084
|
-
var translator = props.translator, onNavigateToProgrammeView = props.onNavigateToProgrammeView, onClickAddOwnership = props.onClickAddOwnership, enableAddOwnership = props.enableAddOwnership;
|
16366
|
+
var translator = props.translator, useConnection = props.useConnection, onNavigateToProgrammeView = props.onNavigateToProgrammeView, useUserContext = props.useUserContext, useSettingsContext = props.useSettingsContext, onClickAddOwnership = props.onClickAddOwnership, enableAddOwnership = props.enableAddOwnership;
|
17085
16367
|
var t = translator.t;
|
17086
16368
|
var statusOptions = Object.keys(InvestmentStatus).map(function (k, index) { return ({
|
17087
16369
|
label: addSpaces(Object.values(InvestmentStatus)[index]),
|
@@ -17471,10 +16753,7 @@ var InvestmentManagementComponent = function (props) {
|
|
17471
16753
|
sorter: true,
|
17472
16754
|
align: "left",
|
17473
16755
|
render: function (item) {
|
17474
|
-
|
17475
|
-
return React.createElement("span", { className: "clickable" }, item);
|
17476
|
-
}
|
17477
|
-
return React.createElement("span", null, "-");
|
16756
|
+
return React.createElement("span", { className: "clickable" }, item);
|
17478
16757
|
},
|
17479
16758
|
onCell: function (record, rowIndex) {
|
17480
16759
|
return {
|
@@ -17532,12 +16811,6 @@ var InvestmentManagementComponent = function (props) {
|
|
17532
16811
|
key: "programmeSector",
|
17533
16812
|
sorter: true,
|
17534
16813
|
align: "left",
|
17535
|
-
render: function (item) {
|
17536
|
-
if (item) {
|
17537
|
-
return React.createElement("span", null, item);
|
17538
|
-
}
|
17539
|
-
return React.createElement("span", null, "-");
|
17540
|
-
},
|
17541
16814
|
},
|
17542
16815
|
{
|
17543
16816
|
title: t("programme:investor"),
|
@@ -17621,11 +16894,7 @@ var InvestmentManagementComponent = function (props) {
|
|
17621
16894
|
React.createElement("div", { className: "title-bar" },
|
17622
16895
|
React.createElement("div", { className: "body-title" }, t("programme:investmentTitle")),
|
17623
16896
|
React.createElement("div", { className: "body-sub-title" }, t("programme:investmentDesc"))),
|
17624
|
-
React.createElement("div", { className: "actions" }, enableAddOwnership &&
|
17625
|
-
((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) == CompanyRole.MINISTRY ||
|
17626
|
-
(userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) == CompanyRole.GOVERNMENT ||
|
17627
|
-
(userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) == CompanyRole.PROGRAMME_DEVELOPER) &&
|
17628
|
-
userInfoState.userRole != Role.ViewOnly && (React.createElement("div", { className: "action-bar" },
|
16897
|
+
React.createElement("div", { className: "actions" }, enableAddOwnership && (React.createElement("div", { className: "action-bar" },
|
17629
16898
|
React.createElement(Button, { type: "primary", size: "large", block: true, icon: React.createElement(PlusOutlined, null), onClick: onClickAddOwnership }, t("programme:addOwnership")))))),
|
17630
16899
|
React.createElement("div", { className: "content-card" },
|
17631
16900
|
React.createElement(Row, null,
|
@@ -17672,7 +16941,7 @@ var InvestmentManagementComponent = function (props) {
|
|
17672
16941
|
return handleTableChange(val, sorter);
|
17673
16942
|
}, locale: {
|
17674
16943
|
emptyText: (React.createElement(Empty, { image: Empty.PRESENTED_IMAGE_SIMPLE, description: tableData.length === 0
|
17675
|
-
? t("
|
16944
|
+
? t("creditTransfer:noTransfer")
|
17676
16945
|
: null })),
|
17677
16946
|
} }))))),
|
17678
16947
|
popupInfo && selectedReq && (React.createElement(InvestmentActionModel, { investment: selectedReq, onCancel: function () {
|
@@ -17685,7 +16954,7 @@ var css_248z$l = ".steps-actions {\n display: flex;\n flex-direction: row-reve
|
|
17685
16954
|
styleInject(css_248z$l);
|
17686
16955
|
|
17687
16956
|
var SupportCreationComponent = function (props) {
|
17688
|
-
var t = props.t, useLocation = props.useLocation; props.onNavigateToProgrammeManagementView; props.onNavigateToProgrammeView;
|
16957
|
+
var t = props.t, useConnection = props.useConnection, userInfoState = props.userInfoState, useLocation = props.useLocation; props.onNavigateToProgrammeManagementView; props.onNavigateToProgrammeView;
|
17689
16958
|
useLocation().state;
|
17690
16959
|
var _a = useState(); _a[0]; _a[1];
|
17691
16960
|
var formOne = Form.useForm()[0];
|
@@ -17698,7 +16967,6 @@ var SupportCreationComponent = function (props) {
|
|
17698
16967
|
var _f = useState([]), organisationsList = _f[0], setOrganisationList = _f[1];
|
17699
16968
|
var _g = useState([]), instrument = _g[0], setInstrument = _g[1];
|
17700
16969
|
var _h = useState(); _h[0]; var setStepOneData = _h[1];
|
17701
|
-
var userInfoState = useUserContext().userInfoState;
|
17702
16970
|
var instrumentOptions = Object.keys(Instrument).map(function (k, index) { return ({
|
17703
16971
|
label: addSpaces(Object.values(Instrument)[index]),
|
17704
16972
|
value: Object.values(Instrument)[index],
|
@@ -18041,7 +17309,7 @@ var SupportCreationComponent = function (props) {
|
|
18041
17309
|
};
|
18042
17310
|
|
18043
17311
|
var SupportManagementComponent = function (props) {
|
18044
|
-
var translator = props.translator; props.onNavigateToProgrammeView; var enableAddSupport = props.enableAddSupport, onClickAddSupport = props.onClickAddSupport;
|
17312
|
+
var translator = props.translator, useConnection = props.useConnection; props.onNavigateToProgrammeView; var useUserContext = props.useUserContext, useSettingsContext = props.useSettingsContext, enableAddSupport = props.enableAddSupport, onClickAddSupport = props.onClickAddSupport;
|
18045
17313
|
var t = translator.t;
|
18046
17314
|
var statusOptions = Object.keys(InvestmentStatus).map(function (k, index) { return ({
|
18047
17315
|
label: addSpaces(Object.values(InvestmentStatus)[index]),
|
@@ -18543,7 +17811,7 @@ var css_248z$k = ".ndc-management .ant-checkbox-checked .ant-checkbox-input[valu
|
|
18543
17811
|
styleInject(css_248z$k);
|
18544
17812
|
|
18545
17813
|
var NdcActionManagementComponent = function (props) {
|
18546
|
-
var t = props.t, onNavigateToNdcManagementView = props.onNavigateToNdcManagementView, onNavigateToProgrammeManagementView = props.onNavigateToProgrammeManagementView;
|
17814
|
+
var t = props.t, useConnection = props.useConnection, useUserContext = props.useUserContext, onNavigateToNdcManagementView = props.onNavigateToNdcManagementView, onNavigateToProgrammeManagementView = props.onNavigateToProgrammeManagementView;
|
18547
17815
|
var _a = useState(true), checkAll = _a[0], setCheckAll = _a[1];
|
18548
17816
|
var _b = useState([]), tableData = _b[0], setTableData = _b[1];
|
18549
17817
|
var _c = useState(), totalProgramme = _c[0], setTotalProgramme = _c[1];
|
@@ -19957,7 +19225,7 @@ var GenderParity = function (props) {
|
|
19957
19225
|
};
|
19958
19226
|
|
19959
19227
|
var Assessment = function (props) {
|
19960
|
-
var onFormSubmit = props.onFormSubmit, assessmentViewData = props.assessmentViewData, viewOnly = props.viewOnly, translator = props.translator;
|
19228
|
+
var onFormSubmit = props.onFormSubmit, assessmentViewData = props.assessmentViewData, viewOnly = props.viewOnly, useConnection = props.useConnection, translator = props.translator;
|
19961
19229
|
translator.setDefaultNamespace("coBenifits");
|
19962
19230
|
var t = translator.t;
|
19963
19231
|
var form1 = Form.useForm()[0];
|
@@ -22362,7 +21630,7 @@ var SocialEnvironmentalRisk = function (props) {
|
|
22362
21630
|
};
|
22363
21631
|
|
22364
21632
|
var CoBenifitsComponent = function (props) {
|
22365
|
-
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;
|
21633
|
+
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;
|
22366
21634
|
var _b = useState(), coBenefitDetails = _b[0], setCoBenefitDetails = _b[1];
|
22367
21635
|
var _c = useState(true), isSocialFormValid = _c[0], setIsSocialFormValid = _c[1];
|
22368
21636
|
var _d = useState(true), isAssessmentFormValid = _d[0], setIsAssessmentFormValid = _d[1];
|
@@ -22436,7 +21704,7 @@ var CoBenifitsComponent = function (props) {
|
|
22436
21704
|
label: t("coBenifits:assessment"),
|
22437
21705
|
key: "7",
|
22438
21706
|
children: (React.createElement(Assessment, { onFormSubmit: onAssessmentFormSubmit, assessmentViewData: (viewOnly && (coBenifitsViewDetails === null || coBenifitsViewDetails === void 0 ? void 0 : coBenifitsViewDetails.assessmentDetails)) ||
|
22439
|
-
(!viewOnly && (coBenefitsDetails === null || coBenefitsDetails === void 0 ? void 0 : coBenefitsDetails.assessmentDetails)), viewOnly: viewOnly || false, translator: translator })),
|
21707
|
+
(!viewOnly && (coBenefitsDetails === null || coBenefitsDetails === void 0 ? void 0 : coBenefitsDetails.assessmentDetails)), viewOnly: viewOnly || false, useConnection: useConnection, translator: translator })),
|
22440
21708
|
},
|
22441
21709
|
{
|
22442
21710
|
label: t("coBenifits:socialEnvironmentalRisk"),
|
@@ -22605,7 +21873,7 @@ var CoBenifitsComponent = function (props) {
|
|
22605
21873
|
};
|
22606
21874
|
|
22607
21875
|
var AddNdcActionComponent = function (props) {
|
22608
|
-
var useLocation = props.useLocation, onNavigateToProgrammeManagementView = props.onNavigateToProgrammeManagementView, onNavigateToProgrammeView = props.onNavigateToProgrammeView, sdgGoalImages = props.sdgGoalImages, translator = props.translator;
|
21876
|
+
var useConnection = props.useConnection, useLocation = props.useLocation, onNavigateToProgrammeManagementView = props.onNavigateToProgrammeManagementView, onNavigateToProgrammeView = props.onNavigateToProgrammeView, sdgGoalImages = props.sdgGoalImages, translator = props.translator;
|
22609
21877
|
translator.setDefaultNamespace("ndcAction");
|
22610
21878
|
var t = translator.t;
|
22611
21879
|
var _a = useState(1), current = _a[0], setCurrent = _a[1];
|
@@ -22747,7 +22015,7 @@ var AddNdcActionComponent = function (props) {
|
|
22747
22015
|
description: (React.createElement("div", { className: current !== 2 ? "hide" : "" },
|
22748
22016
|
React.createElement(CoBenifitsComponent, { onClickedBackBtn: onClickBackCoBenefits, coBenefitsDetails: ndcActionDetails ? ndcActionDetails.coBenefitsProperties : {}, onFormSubmit: onCoBenefitsSubmit, submitButtonText: isProjectReportsVisible()
|
22749
22017
|
? t("ndcAction:next")
|
22750
|
-
: t("ndcAction:submit"), loading: loading, sdgGoalImages: sdgGoalImages, translator: translator }))),
|
22018
|
+
: t("ndcAction:submit"), loading: loading, sdgGoalImages: sdgGoalImages, useConnection: useConnection, translator: translator }))),
|
22751
22019
|
},
|
22752
22020
|
];
|
22753
22021
|
if (isProjectReportsVisible()) {
|
@@ -22884,7 +22152,7 @@ var uploadDocUserPermission = function (userInfoState, docType, programmeOwnerId
|
|
22884
22152
|
var NdcActionViewComponent = function (props) {
|
22885
22153
|
var _a;
|
22886
22154
|
var _b, _c;
|
22887
|
-
var useLocation = props.useLocation, onNavigateToNdcManagementView = props.onNavigateToNdcManagementView, translator = props.translator, sdgGoalImages = props.sdgGoalImages, Chart = props.Chart;
|
22155
|
+
var useUserContext = props.useUserContext, useConnection = props.useConnection, useLocation = props.useLocation, onNavigateToNdcManagementView = props.onNavigateToNdcManagementView, translator = props.translator, sdgGoalImages = props.sdgGoalImages, Chart = props.Chart;
|
22888
22156
|
translator.setDefaultNamespace("ndcAction");
|
22889
22157
|
var t = translator.t;
|
22890
22158
|
var userInfoState = useUserContext().userInfoState;
|
@@ -23383,7 +22651,7 @@ var NdcActionViewComponent = function (props) {
|
|
23383
22651
|
React.createElement(Card, { className: "card-container" },
|
23384
22652
|
React.createElement("div", { className: "co-benifits-view" },
|
23385
22653
|
React.createElement("div", { className: "title" }, t("ndcAction:coBenefitsSubTitle")),
|
23386
|
-
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 })))))))));
|
22654
|
+
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 })))))))));
|
23387
22655
|
};
|
23388
22656
|
|
23389
22657
|
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";
|
@@ -23536,7 +22804,7 @@ var TransferActionModel = function (props) {
|
|
23536
22804
|
};
|
23537
22805
|
|
23538
22806
|
var CreditTransferComponent = function (props) {
|
23539
|
-
var translator = props.translator, onNavigateToProgrammeView = props.onNavigateToProgrammeView;
|
22807
|
+
var useConnection = props.useConnection, useUserContext = props.useUserContext, useSettingsContext = props.useSettingsContext, translator = props.translator, onNavigateToProgrammeView = props.onNavigateToProgrammeView;
|
23540
22808
|
var userInfoState = useUserContext().userInfoState;
|
23541
22809
|
var t = translator.t;
|
23542
22810
|
var statusOptions = Object.keys(CreditTransferStage).map(function (k, index) { return ({
|
@@ -24529,8 +23797,8 @@ var MapStatsComponent = function (props) {
|
|
24529
23797
|
|
24530
23798
|
var RangePicker$2 = DatePicker.RangePicker;
|
24531
23799
|
var MrvDashboardComponent = function (props) {
|
24532
|
-
var Link = props.Link, Chart = props.Chart, t = props.t, ButtonGroup = props.ButtonGroup, _a = props.isMultipleDashboardsVisible, isMultipleDashboardsVisible = _a === void 0 ? false : _a;
|
24533
|
-
var _b = useConnection(); _b.get; var post = _b.post; _b.delete;
|
23800
|
+
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;
|
23801
|
+
var _b = useConnection(); _b.get; var post = _b.post; _b.delete;
|
24534
23802
|
var _c = useState({}), data = _c[0], setData = _c[1];
|
24535
23803
|
var _e = useState(false), loading = _e[0], setLoading = _e[1];
|
24536
23804
|
var userInfoState = useUserContext().userInfoState;
|
@@ -25013,7 +24281,7 @@ var MrvDashboardComponent = function (props) {
|
|
25013
24281
|
_e.label = 1;
|
25014
24282
|
case 1:
|
25015
24283
|
_e.trys.push([1, 3, 4, 5]);
|
25016
|
-
return [4 /*yield*/, post("stats/programme/agg", genPayload(), undefined,
|
24284
|
+
return [4 /*yield*/, post("stats/programme/agg", genPayload(), undefined, process.env.REACT_APP_STAT_URL)];
|
25017
24285
|
case 2:
|
25018
24286
|
response = _e.sent();
|
25019
24287
|
console.log("Response", response);
|
@@ -25954,215 +25222,19 @@ var optionDonutPieB = {
|
|
25954
25222
|
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";
|
25955
25223
|
styleInject(css_248z$8);
|
25956
25224
|
|
25957
|
-
var toolTipTextGen = function (companyRole, cardType, mine) {
|
25958
|
-
var text = '';
|
25959
|
-
if (companyRole === CompanyRole.GOVERNMENT) {
|
25960
|
-
if (cardType === StatsCardsTypes.PROGRAMMES_PENDING) {
|
25961
|
-
text = 'Pending state projects awaiting authorisation';
|
25962
|
-
}
|
25963
|
-
else if (cardType === StatsCardsTypes.TRANSFER_REQUEST_SENT) {
|
25964
|
-
text =
|
25965
|
-
'Pending credit transfer requests sent to project owners initiated by your organisation';
|
25966
|
-
}
|
25967
|
-
else if (cardType === StatsCardsTypes.CREDIT_BALANCE) {
|
25968
|
-
text = 'Total credit balance owned by your organisation';
|
25969
|
-
}
|
25970
|
-
else if (cardType === StatsCardsTypes.PROGRAMMES) {
|
25971
|
-
text =
|
25972
|
-
'Number of projects created during the specified period and their project state in the carbon registry at present';
|
25973
|
-
}
|
25974
|
-
else if (cardType === StatsCardsTypes.CREDITS) {
|
25975
|
-
text =
|
25976
|
-
'Number of credits of projects created during the specified period and their credit state in the carbon registry at present';
|
25977
|
-
}
|
25978
|
-
else if (cardType === StatsCardsTypes.CERTIFIED_CREDITS) {
|
25979
|
-
text =
|
25980
|
-
'Number of credits of projects created during the specified period, uncertified, certified and revoked in the carbon registry at present';
|
25981
|
-
}
|
25982
|
-
else if (cardType === StatsCardsTypes.TOTAL_PROGRAMMES) {
|
25983
|
-
text =
|
25984
|
-
'Graphical representation of the number of projects created during the specified period in each project state in the carbon registry at present';
|
25985
|
-
}
|
25986
|
-
else if (cardType === StatsCardsTypes.TOTAL_PROGRAMMES_SECTOR) {
|
25987
|
-
text =
|
25988
|
-
'Graphical representation of the number of projects in each project sector created during the specified time in the carbon registry';
|
25989
|
-
}
|
25990
|
-
else if (cardType === StatsCardsTypes.TOTAL_CREDITS) {
|
25991
|
-
text =
|
25992
|
-
'Graphical representation of the number of credits of projects created during the specified period in each credit state in the carbon registry at present';
|
25993
|
-
}
|
25994
|
-
else if (cardType === StatsCardsTypes.TOTAL_CREDITS_CERTIFIED) {
|
25995
|
-
text =
|
25996
|
-
'Graphical representation of the number of credits of projects created during the specified period certified, uncertified and revoked in the carbon registry at present';
|
25997
|
-
}
|
25998
|
-
else if (cardType === StatsCardsTypes.PROGRAMME_LOCATIONS) {
|
25999
|
-
text =
|
26000
|
-
'Locations of the projects created during the specified period and their project states in the carbon registry at present';
|
26001
|
-
}
|
26002
|
-
else if (cardType === StatsCardsTypes.TRANSFER_LOCATIONS_INTERNATIONAL) {
|
26003
|
-
text =
|
26004
|
-
'Locations of credits of international transfer requests recognised during the specified period';
|
26005
|
-
}
|
26006
|
-
}
|
26007
|
-
else if (companyRole === CompanyRole.PROGRAMME_DEVELOPER) {
|
26008
|
-
if (cardType === StatsCardsTypes.TRANSFER_REQUEST_RECEIVED) {
|
26009
|
-
text = 'Pending credit transfer requests received by your organisation';
|
26010
|
-
}
|
26011
|
-
else if (cardType === StatsCardsTypes.TRANSFER_REQUEST_SENT) {
|
26012
|
-
text = 'Pending local credit transfer requests initiated by your organisation';
|
26013
|
-
}
|
26014
|
-
else if (cardType === StatsCardsTypes.CREDIT_BALANCE) {
|
26015
|
-
text = 'Total credit balance owned by your organisation';
|
26016
|
-
}
|
26017
|
-
else if (cardType === StatsCardsTypes.PROGRAMMES) {
|
26018
|
-
text =
|
26019
|
-
'Number of projects created during the specified period and their project state in the carbon registry at present, owned by your organisation';
|
26020
|
-
}
|
26021
|
-
else if (cardType === StatsCardsTypes.CREDITS) {
|
26022
|
-
text =
|
26023
|
-
'Number of credits of projects created during the specified period and their credit state in the carbon registry at present, owned by your organisation';
|
26024
|
-
}
|
26025
|
-
else if (cardType === StatsCardsTypes.CERTIFIED_CREDITS) {
|
26026
|
-
text =
|
26027
|
-
'Number of credits of projects created during the specified period, uncertified, certified and revoked in the carbon registry at present, owned by your organisation';
|
26028
|
-
}
|
26029
|
-
else if (cardType === StatsCardsTypes.TOTAL_PROGRAMMES) {
|
26030
|
-
text =
|
26031
|
-
'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';
|
26032
|
-
}
|
26033
|
-
else if (cardType === StatsCardsTypes.TOTAL_PROGRAMMES_SECTOR) {
|
26034
|
-
text =
|
26035
|
-
'Graphical representation of the number of projects owned by your organisation, in each project sector created during the specified time in the carbon registry';
|
26036
|
-
}
|
26037
|
-
else if (cardType === StatsCardsTypes.TOTAL_CREDITS) {
|
26038
|
-
text =
|
26039
|
-
'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';
|
26040
|
-
}
|
26041
|
-
else if (cardType === StatsCardsTypes.TOTAL_CREDITS_CERTIFIED) {
|
26042
|
-
text =
|
26043
|
-
'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';
|
26044
|
-
}
|
26045
|
-
else if (cardType === StatsCardsTypes.PROGRAMME_LOCATIONS) {
|
26046
|
-
text =
|
26047
|
-
'Locations of the projects created during the specified period, owned by your organisation, and their project states in the carbon registry at present';
|
26048
|
-
}
|
26049
|
-
else if (cardType === StatsCardsTypes.TRANSFER_LOCATIONS_INTERNATIONAL) {
|
26050
|
-
text =
|
26051
|
-
'Locations of credits international transfer requests of projects owned by your organisation recognised during the specified period';
|
26052
|
-
}
|
26053
|
-
}
|
26054
|
-
else if (companyRole === CompanyRole.CERTIFIER && mine === true) {
|
26055
|
-
if (cardType === StatsCardsTypes.PROGRAMMES_UNCERTIFIED) {
|
26056
|
-
text =
|
26057
|
-
'Number of projects not yet certified including certificates revoked by your organisation';
|
26058
|
-
}
|
26059
|
-
else if (cardType === StatsCardsTypes.PROGRAMMES_CERTIFIED) {
|
26060
|
-
text = 'Number of projects certified by your organisation';
|
26061
|
-
}
|
26062
|
-
else if (cardType === StatsCardsTypes.CREDIT_CERTIFIED) {
|
26063
|
-
text = 'Number of credits certified by your organisation';
|
26064
|
-
}
|
26065
|
-
else if (cardType === StatsCardsTypes.PROGRAMMES) {
|
26066
|
-
text =
|
26067
|
-
'Number of projects created during the specified period, certified by your organisation, and their project state in the carbon registry at present';
|
26068
|
-
}
|
26069
|
-
else if (cardType === StatsCardsTypes.CREDITS) {
|
26070
|
-
text =
|
26071
|
-
'Number of credits of projects created during the specified period, certified by your organisation and their credit state in the carbon registry at present';
|
26072
|
-
}
|
26073
|
-
else if (cardType === StatsCardsTypes.CERTIFIED_CREDITS) {
|
26074
|
-
text =
|
26075
|
-
'Number of credits of projects created during the specified period, certified by your organisation, uncertified, certified and revoked in the carbon registry at present';
|
26076
|
-
}
|
26077
|
-
else if (cardType === StatsCardsTypes.TOTAL_PROGRAMMES) {
|
26078
|
-
text =
|
26079
|
-
'Graphical representation of the number of projects in each project sector created during the specified time, certified by your company, in the carbon registry';
|
26080
|
-
}
|
26081
|
-
else if (cardType === StatsCardsTypes.TOTAL_PROGRAMMES_SECTOR) {
|
26082
|
-
text =
|
26083
|
-
'Graphical representation of the number of projects in each project sector created during the specified time, certified by your company, in the carbon registry';
|
26084
|
-
}
|
26085
|
-
else if (cardType === StatsCardsTypes.TOTAL_CREDITS) {
|
26086
|
-
text =
|
26087
|
-
'Graphical representation of the number of credits of projects created during the specified period in each credit state in the carbon registry at present';
|
26088
|
-
}
|
26089
|
-
else if (cardType === StatsCardsTypes.TOTAL_CREDITS_CERTIFIED) {
|
26090
|
-
text =
|
26091
|
-
'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';
|
26092
|
-
}
|
26093
|
-
else if (cardType === StatsCardsTypes.PROGRAMME_LOCATIONS) {
|
26094
|
-
text =
|
26095
|
-
'Locations of the projects created during the specified period, certified by your organisation, and their project states in the carbon registry at present';
|
26096
|
-
}
|
26097
|
-
else if (cardType === StatsCardsTypes.TRANSFER_LOCATIONS_INTERNATIONAL) {
|
26098
|
-
text =
|
26099
|
-
'Locations of credits of international transfer requests of projects certified by your organisation recognised during the specified period';
|
26100
|
-
}
|
26101
|
-
}
|
26102
|
-
else if (companyRole === CompanyRole.CERTIFIER && !mine) {
|
26103
|
-
if (cardType === StatsCardsTypes.PROGRAMMES_UNCERTIFIED) {
|
26104
|
-
text =
|
26105
|
-
'Number of projects not yet certified including certificates revoked by your organisation';
|
26106
|
-
}
|
26107
|
-
else if (cardType === StatsCardsTypes.PROGRAMMES_CERTIFIED) {
|
26108
|
-
text = 'Number of projects certified by your organisation';
|
26109
|
-
}
|
26110
|
-
else if (cardType === StatsCardsTypes.CREDIT_CERTIFIED) {
|
26111
|
-
text = 'Number of credits certified by your organisation';
|
26112
|
-
}
|
26113
|
-
else if (cardType === StatsCardsTypes.PROGRAMMES) {
|
26114
|
-
text =
|
26115
|
-
'Number of projects created during the specified period and their project state in the carbon registry at present';
|
26116
|
-
}
|
26117
|
-
else if (cardType === StatsCardsTypes.CREDITS) {
|
26118
|
-
text =
|
26119
|
-
'Number of credits of projects created during the specified period and their credit state in the carbon registry at present';
|
26120
|
-
}
|
26121
|
-
else if (cardType === StatsCardsTypes.CERTIFIED_CREDITS) {
|
26122
|
-
text =
|
26123
|
-
'Number of credits of projects created during the specified period, uncertified, certified and revoked in the carbon registry at present';
|
26124
|
-
}
|
26125
|
-
else if (cardType === StatsCardsTypes.TOTAL_PROGRAMMES) {
|
26126
|
-
text =
|
26127
|
-
'Graphical representation of the number of projects created during the specified period in each project state in the carbon registry at present';
|
26128
|
-
}
|
26129
|
-
else if (cardType === StatsCardsTypes.TOTAL_PROGRAMMES_SECTOR) {
|
26130
|
-
text =
|
26131
|
-
'Graphical representation of the number of projects in each project sector created during the specified time in the carbon registry';
|
26132
|
-
}
|
26133
|
-
else if (cardType === StatsCardsTypes.TOTAL_CREDITS) {
|
26134
|
-
text =
|
26135
|
-
'Graphical representation of the number of credits of projects created during the specified period in each credit state in the carbon registry at present';
|
26136
|
-
}
|
26137
|
-
else if (cardType === StatsCardsTypes.TOTAL_CREDITS_CERTIFIED) {
|
26138
|
-
text =
|
26139
|
-
'Graphical representation of the number of credits of projects created during the specified period certified, uncertified and revoked in the carbon registry at present';
|
26140
|
-
}
|
26141
|
-
else if (cardType === StatsCardsTypes.PROGRAMME_LOCATIONS) {
|
26142
|
-
text =
|
26143
|
-
'Locations of the projects created during the specified period and their project states in the carbon registry at present';
|
26144
|
-
}
|
26145
|
-
else if (cardType === StatsCardsTypes.TRANSFER_LOCATIONS_INTERNATIONAL) {
|
26146
|
-
text =
|
26147
|
-
'Locations of credits of international transfer requests recognised during the specified period';
|
26148
|
-
}
|
26149
|
-
}
|
26150
|
-
return text;
|
26151
|
-
};
|
26152
|
-
|
26153
25225
|
var StasticCard = function (props) {
|
26154
|
-
var value = props.value, title = props.title, updatedDate = props.updatedDate, icon = props.icon, loading = props.loading
|
25226
|
+
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;
|
26155
25227
|
return (React.createElement("div", { className: "stastic-card-main-container" }, loading ? (React.createElement(Skeleton, { active: true })) : (React.createElement(React.Fragment, null,
|
26156
25228
|
React.createElement("div", { className: "title-section" },
|
26157
|
-
React.createElement("div", { className: "title" }, title),
|
25229
|
+
React.createElement("div", { className: "title" }, t(title)),
|
26158
25230
|
React.createElement("div", { className: "info-container" },
|
26159
|
-
React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "bottomRight", trigger: "hover", title:
|
25231
|
+
React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "bottomRight", trigger: "hover", title: tooltip },
|
26160
25232
|
React.createElement(InfoCircle, { color: "#000000", size: 17 })))),
|
26161
25233
|
React.createElement("div", { className: "values-section" },
|
26162
25234
|
React.createElement("div", { className: "values-and-unit" },
|
26163
|
-
title.includes(
|
26164
|
-
React.createElement("div", { className: "value" }, title.includes(
|
26165
|
-
? value === 0 || String(value) ===
|
25235
|
+
title.includes("credit") && React.createElement("div", { className: "unit" }, "ITMOs"),
|
25236
|
+
React.createElement("div", { className: "value" }, title.includes("credit")
|
25237
|
+
? value === 0 || String(value) === "NaN"
|
26166
25238
|
? 0
|
26167
25239
|
: addCommSep(value)
|
26168
25240
|
: value)),
|
@@ -26264,8 +25336,8 @@ var RegistryBarChartsStatComponent = function (props) {
|
|
26264
25336
|
|
26265
25337
|
var RangePicker$1 = DatePicker.RangePicker;
|
26266
25338
|
var RegistryDashboardComponent = function (props) {
|
26267
|
-
var Chart = props.Chart, t = props.t, ButtonGroup = props.ButtonGroup, Link = props.Link, _a = props.isMultipleDashboardsVisible, isMultipleDashboardsVisible = _a === void 0 ? false : _a;
|
26268
|
-
var _b = useConnection(); _b.get; var post = _b.post; _b.delete;
|
25339
|
+
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;
|
25340
|
+
var _b = useConnection(); _b.get; var post = _b.post; _b.delete;
|
26269
25341
|
var userInfoState = useUserContext().userInfoState;
|
26270
25342
|
var _c = useState(false), loadingWithoutTimeRange = _c[0], setLoadingWithoutTimeRange = _c[1];
|
26271
25343
|
var _e = useState(false), loading = _e[0], setLoading = _e[1];
|
@@ -26712,7 +25784,7 @@ var RegistryDashboardComponent = function (props) {
|
|
26712
25784
|
_253.label = 1;
|
26713
25785
|
case 1:
|
26714
25786
|
_253.trys.push([1, 3, 4, 5]);
|
26715
|
-
return [4 /*yield*/, post("stats/programme/agg", getAllChartsParams(), undefined,
|
25787
|
+
return [4 /*yield*/, post("stats/programme/agg", getAllChartsParams(), undefined, process.env.REACT_APP_STAT_URL)];
|
26716
25788
|
case 2:
|
26717
25789
|
response = _253.sent();
|
26718
25790
|
totalCreditsCertifiedStats = void 0;
|
@@ -26989,7 +26061,7 @@ var RegistryDashboardComponent = function (props) {
|
|
26989
26061
|
_77.label = 1;
|
26990
26062
|
case 1:
|
26991
26063
|
_77.trys.push([1, 3, 4, 5]);
|
26992
|
-
return [4 /*yield*/, post("stats/programme/agg", getAllProgrammeAnalyticsStatsParamsWithoutTimeRange(), undefined,
|
26064
|
+
return [4 /*yield*/, post("stats/programme/agg", getAllProgrammeAnalyticsStatsParamsWithoutTimeRange(), undefined, process.env.REACT_APP_STAT_URL)];
|
26993
26065
|
case 2:
|
26994
26066
|
response = _77.sent();
|
26995
26067
|
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;
|
@@ -27082,7 +26154,7 @@ var RegistryDashboardComponent = function (props) {
|
|
27082
26154
|
_188.label = 1;
|
27083
26155
|
case 1:
|
27084
26156
|
_188.trys.push([1, 3, 4, 5]);
|
27085
|
-
return [4 /*yield*/, post("stats/programme/agg", getAllProgrammeAnalyticsStatsParams(), undefined,
|
26157
|
+
return [4 /*yield*/, post("stats/programme/agg", getAllProgrammeAnalyticsStatsParams(), undefined, process.env.REACT_APP_STAT_URL)];
|
27086
26158
|
case 2:
|
27087
26159
|
response = _188.sent();
|
27088
26160
|
programmeByStatusAuthAggregationResponse = void 0;
|
@@ -27768,54 +26840,69 @@ var RegistryDashboardComponent = function (props) {
|
|
27768
26840
|
: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
|
27769
26841
|
CompanyRole.PROGRAMME_DEVELOPER
|
27770
26842
|
? transferRequestReceived
|
27771
|
-
: programmesUnCertifed, title:
|
26843
|
+
: programmesUnCertifed, title: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.GOVERNMENT
|
27772
26844
|
? "programmesPending"
|
27773
26845
|
: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
|
27774
26846
|
CompanyRole.PROGRAMME_DEVELOPER
|
27775
26847
|
? "trasnferReqReceived"
|
27776
|
-
: "programmesUnCertified"
|
26848
|
+
: "programmesUnCertified", updatedDate: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.GOVERNMENT
|
27777
26849
|
? lastUpdateProgrammesStats
|
27778
26850
|
: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
|
27779
26851
|
CompanyRole.PROGRAMME_DEVELOPER
|
27780
26852
|
? lastUpdatePendingTransferReceived
|
27781
26853
|
: lastUpdateProgrammesCertifiable, icon: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.GOVERNMENT ? (React.createElement(ClockHistory, { color: "#16B1FF", size: 80 })) : (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
|
27782
|
-
CompanyRole.PROGRAMME_DEVELOPER ? (React.createElement(BoxArrowInRight, { color: "#16B1FF", size: 80 })) : (React.createElement(ShieldX, { color: "#16B1FF", size: 80 })), loading: loadingWithoutTimeRange, companyRole: userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole
|
26854
|
+
CompanyRole.PROGRAMME_DEVELOPER ? (React.createElement(BoxArrowInRight, { color: "#16B1FF", size: 80 })) : (React.createElement(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) === CompanyRole.GOVERNMENT
|
26855
|
+
? "tTprogrammespendingGoverment"
|
26856
|
+
: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
|
26857
|
+
CompanyRole.PROGRAMME_DEVELOPER
|
26858
|
+
? "tTTransferReqRecProgrammeDev"
|
26859
|
+
: "tTProgrammesUnCertiCertifier"), t: t })),
|
27783
26860
|
React.createElement(Col, { xxl: 8, xl: 8, md: 12, className: "stastic-card-col" },
|
27784
26861
|
React.createElement(StasticCard, { value: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.GOVERNMENT
|
27785
26862
|
? transferRequestSent
|
27786
26863
|
: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
|
27787
26864
|
CompanyRole.PROGRAMME_DEVELOPER
|
27788
26865
|
? transferRequestSent
|
27789
|
-
: programmesCertifed, title:
|
26866
|
+
: programmesCertifed, title: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.GOVERNMENT
|
27790
26867
|
? "trasnferReqInit"
|
27791
26868
|
: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
|
27792
26869
|
CompanyRole.PROGRAMME_DEVELOPER
|
27793
26870
|
? "trasnferReqInit"
|
27794
|
-
: "programmesCertified"
|
26871
|
+
: "programmesCertified", updatedDate: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.GOVERNMENT
|
27795
26872
|
? lastUpdatePendingTransferSent
|
27796
26873
|
: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
|
27797
26874
|
CompanyRole.PROGRAMME_DEVELOPER
|
27798
26875
|
? lastUpdatePendingTransferSent
|
27799
26876
|
: lastUpdateProgrammesCertified, icon: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.GOVERNMENT ? (React.createElement(BoxArrowRight, { color: "#16B1FF", size: 80 })) : (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
|
27800
|
-
CompanyRole.PROGRAMME_DEVELOPER ? (React.createElement(BoxArrowRight, { color: "#16B1FF", size: 80 })) : (React.createElement(ShieldCheck, { color: "#16B1FF", size: 80 })), loading: loadingWithoutTimeRange, companyRole: userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole
|
26877
|
+
CompanyRole.PROGRAMME_DEVELOPER ? (React.createElement(BoxArrowRight, { color: "#16B1FF", size: 80 })) : (React.createElement(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) === CompanyRole.GOVERNMENT
|
26878
|
+
? "tTTransferReqSentGovernment"
|
26879
|
+
: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
|
26880
|
+
CompanyRole.PROGRAMME_DEVELOPER
|
26881
|
+
? "tTTransferReqInitProgrammeDev"
|
26882
|
+
: "tTProgrammesCertiCertifier"), t: t })),
|
27801
26883
|
React.createElement(Col, { xxl: 8, xl: 8, md: 12, className: "stastic-card-col" },
|
27802
26884
|
React.createElement(StasticCard, { value: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.GOVERNMENT
|
27803
26885
|
? creditBalanceWithoutTimeRange
|
27804
26886
|
: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
|
27805
26887
|
CompanyRole.PROGRAMME_DEVELOPER
|
27806
26888
|
? creditBalanceWithoutTimeRange
|
27807
|
-
: creditCertiedBalanceWithoutTimeRange, title:
|
26889
|
+
: creditCertiedBalanceWithoutTimeRange, title: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.GOVERNMENT
|
27808
26890
|
? "creditBal"
|
27809
26891
|
: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
|
27810
26892
|
CompanyRole.PROGRAMME_DEVELOPER
|
27811
26893
|
? "creditBal"
|
27812
|
-
: "creditCertified"
|
26894
|
+
: "creditCertified", updatedDate: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.GOVERNMENT
|
27813
26895
|
? lastUpdateCreditBalance
|
27814
26896
|
: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
|
27815
26897
|
CompanyRole.PROGRAMME_DEVELOPER
|
27816
26898
|
? lastUpdateCreditBalance
|
27817
26899
|
: lastUpdateProgrammesCertified, icon: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.GOVERNMENT ? (React.createElement(Gem, { color: "#16B1FF", size: 80 })) : (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
|
27818
|
-
CompanyRole.PROGRAMME_DEVELOPER ? (React.createElement(Gem, { color: "#16B1FF", size: 80 })) : (React.createElement(ShieldExclamation, { color: "#16B1FF", size: 80 })), loading: loadingWithoutTimeRange, companyRole: userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole
|
26900
|
+
CompanyRole.PROGRAMME_DEVELOPER ? (React.createElement(Gem, { color: "#16B1FF", size: 80 })) : (React.createElement(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) === CompanyRole.GOVERNMENT
|
26901
|
+
? "tTCreditBalanceGovernment"
|
26902
|
+
: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
|
26903
|
+
CompanyRole.PROGRAMME_DEVELOPER
|
26904
|
+
? "tTCreditBalanceProgrammeDev"
|
26905
|
+
: "tTCreditCertifiedCertifier"), t: t })))),
|
27819
26906
|
((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.GOVERNMENT ||
|
27820
26907
|
(userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.CERTIFIER ||
|
27821
26908
|
(userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.MINISTRY) &&
|
@@ -28063,7 +27150,7 @@ var getNdcActionStatusTagType = function (status) {
|
|
28063
27150
|
};
|
28064
27151
|
|
28065
27152
|
var NdcDetailsComponent = function (props) {
|
28066
|
-
var t = props.t;
|
27153
|
+
var t = props.t, useConnection = props.useConnection, useUserContext = props.useUserContext;
|
28067
27154
|
var RangePicker = DatePicker.RangePicker;
|
28068
27155
|
var _a = useState([]), ndcActionsList = _a[0], setNdcActionsList = _a[1];
|
28069
27156
|
var _b = useState(false), loading = _b[0], setLoading = _b[1];
|
@@ -29060,7 +28147,7 @@ var ProgrammeIssueForm = function (props) {
|
|
29060
28147
|
};
|
29061
28148
|
|
29062
28149
|
var ProgrammeRetireForm = function (props) {
|
29063
|
-
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;
|
28150
|
+
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;
|
29064
28151
|
var t = translator.t;
|
29065
28152
|
var _a = useState(undefined), popupError = _a[0], setPopupError = _a[1];
|
29066
28153
|
var _b = useState(false), loading = _b[0], setLoading = _b[1];
|
@@ -29436,7 +28523,7 @@ var ProgrammeRevokeForm = function (props) {
|
|
29436
28523
|
};
|
29437
28524
|
|
29438
28525
|
var ProgrammeTransferForm = function (props) {
|
29439
|
-
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;
|
28526
|
+
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;
|
29440
28527
|
var t = translator.t;
|
29441
28528
|
var _b = useState(undefined), popupError = _b[0], setPopupError = _b[1];
|
29442
28529
|
var _c = useState(false), loading = _c[0], setLoading = _c[1];
|
@@ -29667,7 +28754,7 @@ var css_248z$5 = ".ndc-action-body {\n display: flex;\n flex-direction: column
|
|
29667
28754
|
styleInject(css_248z$5);
|
29668
28755
|
|
29669
28756
|
var NdcActionBody = function (props) {
|
29670
|
-
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;
|
28757
|
+
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;
|
29671
28758
|
var t = translator.t;
|
29672
28759
|
var userInfoState = useUserContext().userInfoState;
|
29673
28760
|
var fileInputMonitoringRef = useRef(null);
|
@@ -30103,7 +29190,7 @@ var css_248z$4 = ".info-view .title-icon {\n padding-right: 10px; }\n\n.info-vi
|
|
30103
29190
|
styleInject(css_248z$4);
|
30104
29191
|
|
30105
29192
|
var ProgrammeDocuments = function (props) {
|
30106
|
-
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;
|
29193
|
+
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;
|
30107
29194
|
var t = translator.t;
|
30108
29195
|
var userInfoState = useUserContext().userInfoState;
|
30109
29196
|
var _a = useConnection(); _a.delete; var post = _a.post;
|
@@ -31054,7 +30141,7 @@ var GHGUserActionConfirmationModel = function (props) {
|
|
31054
30141
|
};
|
31055
30142
|
|
31056
30143
|
var GHGEmissionsComponent = function (props) {
|
31057
|
-
var t = props.t;
|
30144
|
+
var t = props.t, useUserContext = props.useUserContext, useConnection = props.useConnection;
|
31058
30145
|
var userInfoState = useUserContext().userInfoState;
|
31059
30146
|
var _a = useState([]), data = _a[0], setData = _a[1];
|
31060
30147
|
var _b = useConnection(), get = _b.get, post = _b.post;
|
@@ -32971,7 +32058,7 @@ var ProjectionTypes = {
|
|
32971
32058
|
};
|
32972
32059
|
|
32973
32060
|
var GHGProjectionsComponent = function (props) {
|
32974
|
-
var t = props.t;
|
32061
|
+
var t = props.t, useUserContext = props.useUserContext, useConnection = props.useConnection;
|
32975
32062
|
var userInfoState = useUserContext().userInfoState;
|
32976
32063
|
var _a = useState([]), data = _a[0], setData = _a[1];
|
32977
32064
|
var _b = useConnection(); _b.put; var get = _b.get, post = _b.post;
|
@@ -35152,7 +34239,7 @@ var emissionComparisonOptionsSub = function (labels, chartColors) {
|
|
35152
34239
|
|
35153
34240
|
var RangePicker = DatePicker.RangePicker;
|
35154
34241
|
var GHGDashboardComponent = function (props) {
|
35155
|
-
var t = props.t, Chart = props.Chart, ButtonGroup = props.ButtonGroup, Link = props.Link, isMultipleDashboardsVisible = props.isMultipleDashboardsVisible;
|
34242
|
+
var t = props.t, useUserContext = props.useUserContext, useConnection = props.useConnection, Chart = props.Chart, ButtonGroup = props.ButtonGroup, Link = props.Link, isMultipleDashboardsVisible = props.isMultipleDashboardsVisible;
|
35156
34243
|
var _a = useConnection(); _a.get; var post = _a.post; _a.delete;
|
35157
34244
|
var userInfoState = useUserContext().userInfoState;
|
35158
34245
|
var _b = useState(moment().year()), endYear = _b[0], setEndYear = _b[1];
|
@@ -35531,5 +34618,5 @@ var GHGDashboardComponent = function (props) {
|
|
35531
34618
|
React.createElement(Row, { gutter: [40, 40], className: "statics-card-row" }, row.map(function (item, j) { return getWidgetJSX(item); })))); }))));
|
35532
34619
|
};
|
35533
34620
|
|
35534
|
-
export { Action, AddNdcActionComponent, AddNewCompanyComponent, AddNewUserComponent, AdminBGColor, AdminColor, BaseEntity, CarbonSystemType, CertBGColor, CertColor, CoBenifitsComponent, Company, CompanyManagementColumns, CompanyManagementComponent, CompanyProfileComponent, CompanyRole, CompanyState, ConfigurationSettingsType,
|
34621
|
+
export { Action, AddNdcActionComponent, AddNewCompanyComponent, AddNewUserComponent, AdminBGColor, AdminColor, BaseEntity, CarbonSystemType, CertBGColor, CertColor, CoBenifitsComponent, Company, CompanyManagementColumns, CompanyManagementComponent, CompanyProfileComponent, CompanyRole, CompanyState, ConfigurationSettingsType, CreditTransferComponent, CreditTransferStage, DevBGColor, DevColor, DocType, DocumentStatus, ESGType, Emission, EmissionGas, EmissionSector, EmissionSubSectors, EnergyGenerationUnits, FormElementType, GHGDashboardComponent, GHGEmissionsComponent, GHGProjectionsComponent, GhgStatCardTypes, GovBGColor, GovColor, ImgWithFallback, InfoView, Instrument, InvestmentBGColor, InvestmentBody, InvestmentColor, InvestmentCreationComponent, InvestmentCreationType, InvestmentLevel, InvestmentManagementComponent, InvestmentStatus, InvestmentStream, InvestmentType, LandAreaUnits, LegendItem, Loading, ManagerBGColor, ManagerColor, MapComponent, MapTypes, MapboxComponent, MinBGColor, MinColor, MitigationSubTypes, MitigationTypes, MrvDashboardComponent, MrvStatsCardsTypes, NdcActionBody, NdcActionManagementComponent, NdcActionStatus, NdcActionTypes, NdcActionViewComponent, NdcDetailsComponent, OrganisationStatus, ProfileIcon, ProgrammeCertify, ProgrammeCreationComponent, ProgrammeDocuments, ProgrammeEntity, ProgrammeIssueForm, ProgrammeManagementColumns, ProgrammeManagementComponent, ProgrammeRetireForm, ProgrammeRevokeForm, ProgrammeStageLegend, ProgrammeStageMRV, ProgrammeStageR, ProgrammeStageUnified, ProgrammeTransfer, ProgrammeTransferForm, Projection, ProjectionTypes$1 as ProjectionTypes, RadioButtonStatus, RadioButtonStatus2, RegistryDashboardComponent, RejectDocumentationConfirmationModel, RetireType, Role, RoleIcon, RootBGColor, RootColor, SdgGoals$1 as SdgGoals, Sector, SectoralScope, StasticCard, StatsCardsTypes, SubTypeOfMitigation, SupportCreationComponent, SupportManagementComponent, SystemNames, TimelineBody, Titles, TooltipColor, TransferActionModel, TxType, TypeOfMitigation, UnitField, User, UserManagementColumns, UserManagementComponent, UserProfileComponent, UserRoleIcon, ViewBGColor, ViewColor, WidgetType, addCommSep, addCommSepRound$1 as addCommSepRound, addNdcDesc, addRoundNumber, addSpaces, consumerGroupList, creditUnit, dateFormat, dateTimeFormat, energyGenerationUnitList, getBase64, getCompanyBgColor, getCreditStageVal, getFinancialFields, getGeneralFields, getInvestmentStatusEnumVal, getNdcActionStatusEnumVal$1 as getNdcActionStatusEnumVal, getNdcStatusTagType, getRetirementTypeString, getStageEnumVal, getStageTagType, getStageTagTypeMRV, getStageTransferEnumVal, getStatusTagType, getTransferStageTagType, getValidNdcActions, isBase64, landAreaUnitList, methodologyOptions, mitigationSubTypeList, mitigationSubTypesListMapped, mitigationTypeList, ndcActionTypeList, sectorMitigationTypesListMapped, sumArray, titleList };
|
35535
34622
|
//# sourceMappingURL=index.js.map
|