@undp/carbon-library 1.0.274-CARBON-359.0 → 1.0.274-CARBON-347.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +1089 -413
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/Components/Common/CoBenifits/coBenifits.d.ts +0 -1
- package/dist/cjs/types/Components/Common/Models/programmeRetireForm.d.ts +0 -1
- package/dist/cjs/types/Components/Common/Models/programmeTransferForm.d.ts +0 -1
- package/dist/cjs/types/Components/Common/NdcActionBody/ndcActionBody.d.ts +0 -2
- package/dist/cjs/types/Components/Common/ProgrammeDocuments/programmeDocuments.d.ts +0 -2
- package/dist/cjs/types/Context/ConnectionContext/connectionContext.d.ts +8 -0
- package/dist/cjs/types/Context/SettingsContext/settingsContext.d.ts +10 -0
- package/dist/cjs/types/Context/UserInformationContext/userInformationContext.d.ts +6 -0
- package/dist/cjs/types/Context/index.d.ts +3 -0
- package/dist/cjs/types/Definitions/Definitions/connectionContext.definitions.d.ts +3 -0
- package/dist/cjs/types/Definitions/Enums/investment.enum.d.ts +4 -0
- package/dist/cjs/types/Storybook/AddNewCompanyComponent.stories.d.ts +12 -0
- package/dist/cjs/types/Storybook/AddNewUserComponent.stories.d.ts +12 -0
- package/dist/cjs/types/Storybook/Decorators/AddNewCompanyI18nDecorator.d.ts +2 -0
- package/dist/cjs/types/Storybook/Decorators/AddNewUserI18nDecorator.d.ts +2 -0
- package/dist/cjs/types/Storybook/Decorators/ConnectionContextDecorator.d.ts +2 -0
- package/dist/cjs/types/Storybook/Decorators/DashboardI18nDecorator.d.ts +2 -0
- package/dist/cjs/types/Storybook/Decorators/InvestmentCreationI18nDecorator.d.ts +2 -0
- package/dist/cjs/types/Storybook/Decorators/ProgrammeCreateI18nDecorator.d.ts +2 -0
- package/dist/cjs/types/Storybook/InvestmentCreationComponent.stories.d.ts +12 -0
- package/dist/cjs/types/Storybook/MRVDashboard.stories.d.ts +12 -0
- package/dist/cjs/types/Storybook/ProgrammeCreationComponent.stories.d.ts +12 -0
- package/dist/cjs/types/Storybook/RegistryDashboard.stories.d.ts +12 -0
- package/dist/cjs/types/index.d.ts +1 -0
- package/dist/esm/index.js +1083 -415
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/Components/Common/CoBenifits/coBenifits.d.ts +0 -1
- package/dist/esm/types/Components/Common/Models/programmeRetireForm.d.ts +0 -1
- package/dist/esm/types/Components/Common/Models/programmeTransferForm.d.ts +0 -1
- package/dist/esm/types/Components/Common/NdcActionBody/ndcActionBody.d.ts +0 -2
- package/dist/esm/types/Components/Common/ProgrammeDocuments/programmeDocuments.d.ts +0 -2
- package/dist/esm/types/Context/ConnectionContext/connectionContext.d.ts +8 -0
- package/dist/esm/types/Context/SettingsContext/settingsContext.d.ts +10 -0
- package/dist/esm/types/Context/UserInformationContext/userInformationContext.d.ts +6 -0
- package/dist/esm/types/Context/index.d.ts +3 -0
- package/dist/esm/types/Definitions/Definitions/connectionContext.definitions.d.ts +3 -0
- package/dist/esm/types/Definitions/Enums/investment.enum.d.ts +4 -0
- package/dist/esm/types/Storybook/AddNewCompanyComponent.stories.d.ts +12 -0
- package/dist/esm/types/Storybook/AddNewUserComponent.stories.d.ts +12 -0
- package/dist/esm/types/Storybook/Decorators/AddNewCompanyI18nDecorator.d.ts +2 -0
- package/dist/esm/types/Storybook/Decorators/AddNewUserI18nDecorator.d.ts +2 -0
- package/dist/esm/types/Storybook/Decorators/ConnectionContextDecorator.d.ts +2 -0
- package/dist/esm/types/Storybook/Decorators/DashboardI18nDecorator.d.ts +2 -0
- package/dist/esm/types/Storybook/Decorators/InvestmentCreationI18nDecorator.d.ts +2 -0
- package/dist/esm/types/Storybook/Decorators/ProgrammeCreateI18nDecorator.d.ts +2 -0
- package/dist/esm/types/Storybook/InvestmentCreationComponent.stories.d.ts +12 -0
- package/dist/esm/types/Storybook/MRVDashboard.stories.d.ts +12 -0
- package/dist/esm/types/Storybook/ProgrammeCreationComponent.stories.d.ts +12 -0
- package/dist/esm/types/Storybook/RegistryDashboard.stories.d.ts +12 -0
- package/dist/esm/types/index.d.ts +1 -0
- package/dist/index.d.ts +27 -8
- package/dist/locales/i18n/programme/en.json +3 -1
- package/package.json +29 -2
package/dist/esm/index.js
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
import { PlusOutlined, FilterOutlined, BankOutlined, SafetyOutlined, AuditOutlined, ExperimentOutlined, UploadOutlined, UserOutlined, MinusCircleOutlined, StarOutlined, ToolOutlined, EyeOutlined, SearchOutlined, EllipsisOutlined, EditOutlined, DeleteOutlined, FileAddOutlined, CheckCircleOutlined, ExclamationCircleOutlined, BookOutlined, CaretDownOutlined, EyeInvisibleOutlined, GlobalOutlined, FlagOutlined, LineChartOutlined, LikeOutlined, DislikeOutlined } 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, Skeleton, Card, Tag, Checkbox, DatePicker, Popover, List, Typography, Spin, Tabs, Progress } from 'antd';
|
3
|
-
import React, { useState, useEffect,
|
3
|
+
import React, { createContext, useState, useEffect, useCallback, useContext, useRef } from 'react';
|
4
4
|
import { DateTime } from 'luxon';
|
5
5
|
import { Buffer } from 'buffer';
|
6
|
+
import axios from 'axios';
|
6
7
|
import PhoneInput, { formatPhoneNumberIntl, formatPhoneNumber } from 'react-phone-number-input';
|
7
8
|
import validator from 'validator';
|
8
9
|
import { plainToClass } from 'class-transformer';
|
@@ -489,9 +490,317 @@ var OrganisationStatus = function (props) {
|
|
489
490
|
return orgState;
|
490
491
|
};
|
491
492
|
|
493
|
+
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";
|
494
|
+
|
495
|
+
var ConnectionContext = createContext({});
|
496
|
+
var ConnectionContextProvider = function (props) {
|
497
|
+
var _a = useState(), token = _a[0], setToken = _a[1];
|
498
|
+
var serverURL = props.serverURL, t = props.t, children = props.children, statServerUrl = props.statServerUrl;
|
499
|
+
useEffect(function () {
|
500
|
+
var timer = setInterval(function () { return __awaiter(void 0, void 0, void 0, function () {
|
501
|
+
var newToken;
|
502
|
+
return __generator(this, function (_a) {
|
503
|
+
switch (_a.label) {
|
504
|
+
case 0: return [4 /*yield*/, localStorage.getItem('token')];
|
505
|
+
case 1:
|
506
|
+
newToken = _a.sent();
|
507
|
+
if (token !== newToken) {
|
508
|
+
setToken(newToken);
|
509
|
+
}
|
510
|
+
return [2 /*return*/];
|
511
|
+
}
|
512
|
+
});
|
513
|
+
}); }, 3000);
|
514
|
+
if (token) {
|
515
|
+
clearTimeout(timer);
|
516
|
+
}
|
517
|
+
return function () {
|
518
|
+
clearTimeout(timer);
|
519
|
+
};
|
520
|
+
}, [token]);
|
521
|
+
var send = useCallback(function (method, path, data, config, extraUrl) {
|
522
|
+
return new Promise(function (resolve, reject) {
|
523
|
+
var url = "".concat(extraUrl ? extraUrl : serverURL, "/").concat(path);
|
524
|
+
var headers;
|
525
|
+
if (token) {
|
526
|
+
headers = { authorization: "Bearer ".concat(token.toString()) };
|
527
|
+
}
|
528
|
+
else {
|
529
|
+
if (localStorage.getItem('token')) {
|
530
|
+
headers = {
|
531
|
+
authorization: "Bearer ".concat(localStorage.getItem('token')),
|
532
|
+
};
|
533
|
+
}
|
534
|
+
else {
|
535
|
+
headers = {
|
536
|
+
authorization: "Bearer ".concat(process.env.STORYBOOK_ACCESS_TOKEN),
|
537
|
+
};
|
538
|
+
}
|
539
|
+
}
|
540
|
+
axios(__assign({ method: method, url: url, data: data, headers: headers }, config))
|
541
|
+
.then(function (response) {
|
542
|
+
var _a, _b, _c;
|
543
|
+
if (response.status) {
|
544
|
+
if (response.status === 200 || response.status === 201) {
|
545
|
+
resolve({
|
546
|
+
status: response.status,
|
547
|
+
data: (_a = response.data.data) !== null && _a !== void 0 ? _a : response.data,
|
548
|
+
response: response,
|
549
|
+
statusText: 'SUCCESS',
|
550
|
+
message: response.data.message,
|
551
|
+
});
|
552
|
+
}
|
553
|
+
else if (response.status === 422) {
|
554
|
+
reject({
|
555
|
+
status: response.status,
|
556
|
+
data: (_b = response.data) === null || _b === void 0 ? void 0 : _b.data,
|
557
|
+
statusText: 'ERROR',
|
558
|
+
response: response,
|
559
|
+
message: response.data.message,
|
560
|
+
errors: (_c = response.data) === null || _c === void 0 ? void 0 : _c.errors,
|
561
|
+
});
|
562
|
+
}
|
563
|
+
}
|
564
|
+
else {
|
565
|
+
reject({
|
566
|
+
status: 500,
|
567
|
+
statusText: 'UNKNOWN',
|
568
|
+
message: t('common:systemError'),
|
569
|
+
});
|
570
|
+
}
|
571
|
+
})
|
572
|
+
.catch(function (e) {
|
573
|
+
var _a;
|
574
|
+
if (e.response) {
|
575
|
+
if (e.response.status) {
|
576
|
+
if (e.response.data.message === 'jwt expired') {
|
577
|
+
localStorage.removeItem('token');
|
578
|
+
window.location.reload();
|
579
|
+
}
|
580
|
+
reject({
|
581
|
+
status: e.response.status,
|
582
|
+
statusText: 'ERROR',
|
583
|
+
errors: (_a = e.response.data) === null || _a === void 0 ? void 0 : _a.errors,
|
584
|
+
message: e.response.data.message,
|
585
|
+
});
|
586
|
+
}
|
587
|
+
else {
|
588
|
+
reject({
|
589
|
+
statusText: 'ERROR',
|
590
|
+
message: t('common:systemError'),
|
591
|
+
});
|
592
|
+
}
|
593
|
+
}
|
594
|
+
else {
|
595
|
+
reject({
|
596
|
+
statusText: 'ERROR',
|
597
|
+
message: t('common:networkError'),
|
598
|
+
});
|
599
|
+
}
|
600
|
+
});
|
601
|
+
});
|
602
|
+
}, [token, serverURL]);
|
603
|
+
var post = useCallback(function (path, data, config, extraUrl) {
|
604
|
+
return send('post', path, data, config, extraUrl);
|
605
|
+
}, [send]);
|
606
|
+
var put = useCallback(function (path, data, config) {
|
607
|
+
return send('put', path, data, config);
|
608
|
+
}, [send]);
|
609
|
+
var get = useCallback(function (path, config) {
|
610
|
+
return send('get', path, undefined, config);
|
611
|
+
}, [send]);
|
612
|
+
var patch = useCallback(function (path, data, config) {
|
613
|
+
return send('patch', path, data, config);
|
614
|
+
}, [send]);
|
615
|
+
var del = useCallback(function (path, config) {
|
616
|
+
return send('delete', path, config);
|
617
|
+
}, [send]);
|
618
|
+
var updateToken = useCallback(function (newToken) { return __awaiter(void 0, void 0, void 0, function () {
|
619
|
+
return __generator(this, function (_a) {
|
620
|
+
if (newToken) {
|
621
|
+
localStorage.setItem('token', newToken);
|
622
|
+
setToken(newToken);
|
623
|
+
}
|
624
|
+
else {
|
625
|
+
localStorage.setItem('token', '');
|
626
|
+
setToken(undefined);
|
627
|
+
}
|
628
|
+
return [2 /*return*/];
|
629
|
+
});
|
630
|
+
}); }, []);
|
631
|
+
var removeToken = function (tkn) {
|
632
|
+
if (tkn) {
|
633
|
+
var exp = o(tkn).exp;
|
634
|
+
if (Date.now() > exp * 1000) {
|
635
|
+
localStorage.setItem('token', '');
|
636
|
+
localStorage.removeItem('userRole');
|
637
|
+
localStorage.removeItem('userId');
|
638
|
+
localStorage.removeItem('companyId');
|
639
|
+
localStorage.removeItem('companyRole');
|
640
|
+
}
|
641
|
+
else {
|
642
|
+
var diff = exp * 1000 - Date.now();
|
643
|
+
setTimeout(function () {
|
644
|
+
setToken(undefined);
|
645
|
+
localStorage.setItem('token', '');
|
646
|
+
localStorage.removeItem('userRole');
|
647
|
+
localStorage.removeItem('userId');
|
648
|
+
localStorage.removeItem('companyId');
|
649
|
+
localStorage.removeItem('companyRole');
|
650
|
+
}, diff);
|
651
|
+
console.log(diff, 'Remaining Token expire time');
|
652
|
+
}
|
653
|
+
}
|
654
|
+
};
|
655
|
+
useEffect(function () {
|
656
|
+
removeToken(token);
|
657
|
+
}, [token]);
|
658
|
+
return (React.createElement(ConnectionContext.Provider, { value: {
|
659
|
+
connection: { post: post, put: put, get: get, patch: patch, delete: del, updateToken: updateToken, token: token, removeToken: removeToken, statServerUrl: statServerUrl },
|
660
|
+
} }, children));
|
661
|
+
};
|
662
|
+
var useConnection = function () {
|
663
|
+
var context = useContext(ConnectionContext);
|
664
|
+
return context.connection;
|
665
|
+
};
|
666
|
+
|
667
|
+
var UserContext = createContext({
|
668
|
+
setUserInfo: function () { },
|
669
|
+
removeUserInfo: function () { },
|
670
|
+
IsAuthenticated: function (tkn) { return false; },
|
671
|
+
isTokenExpired: false,
|
672
|
+
setIsTokenExpired: function (val) { },
|
673
|
+
});
|
674
|
+
var UserInformationContextProvider = function (_a) {
|
675
|
+
var children = _a.children;
|
676
|
+
var token = useConnection().token;
|
677
|
+
var _b = useState(false), isTokenExpired = _b[0], setIsTokenExpired = _b[1];
|
678
|
+
var initialUserProps = {
|
679
|
+
id: localStorage.getItem('userId') ? localStorage.getItem('userId') : process.env.STORYBOOK_USER_ID ? process.env.STORYBOOK_USER_ID : '',
|
680
|
+
userRole: localStorage.getItem('userRole') ? localStorage.getItem('userRole') : process.env.STORYBOOK_USER_ROLE ? process.env.STORYBOOK_USER_ROLE : '',
|
681
|
+
companyRole: localStorage.getItem('companyRole')
|
682
|
+
? localStorage.getItem('companyRole')
|
683
|
+
: process.env.STORYBOOK_COMPANY_ROLE ? process.env.STORYBOOK_COMPANY_ROLE : '',
|
684
|
+
companyId: localStorage.getItem('companyId')
|
685
|
+
? parseInt(localStorage.getItem('companyId'))
|
686
|
+
: process.env.STORYBOOK_COMPANY_ID ? parseInt(process.env.STORYBOOK_COMPANY_ID) : -1,
|
687
|
+
companyLogo: localStorage.getItem('companyLogo')
|
688
|
+
? localStorage.getItem('companyLogo')
|
689
|
+
: process.env.STORYBOOK_COMPANY_LOGO ? process.env.STORYBOOK_COMPANY_LOGO : '',
|
690
|
+
companyName: localStorage.getItem('companyName')
|
691
|
+
? localStorage.getItem('companyName')
|
692
|
+
: process.env.STORYBOOK_COMPANY_NAME ? process.env.STORYBOOK_COMPANY_NAME : '',
|
693
|
+
companyState: localStorage.getItem('companyState')
|
694
|
+
? parseInt(localStorage.getItem('companyState'))
|
695
|
+
: process.env.STORYBOOK_COMPANY_STATE ? parseInt(process.env.STORYBOOK_COMPANY_STATE) : 0,
|
696
|
+
};
|
697
|
+
var _c = useState(initialUserProps), userInfoState = _c[0], setUserInfoState = _c[1];
|
698
|
+
var setUserInfo = function (value) {
|
699
|
+
var state = (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyState) === 1 ? userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyState : 0;
|
700
|
+
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;
|
701
|
+
if (id) {
|
702
|
+
setUserInfoState(function (prev) { return (__assign(__assign({}, prev), { id: id })); });
|
703
|
+
localStorage.setItem('userId', id);
|
704
|
+
}
|
705
|
+
if (userRole) {
|
706
|
+
setUserInfoState(function (prev) { return (__assign(__assign({}, prev), { userRole: userRole })); });
|
707
|
+
localStorage.setItem('userRole', userRole);
|
708
|
+
}
|
709
|
+
if (companyId) {
|
710
|
+
setUserInfoState(function (prev) { return (__assign(__assign({}, prev), { companyId: companyId })); });
|
711
|
+
localStorage.setItem('companyId', companyId + '');
|
712
|
+
}
|
713
|
+
if (companyLogo) {
|
714
|
+
setUserInfoState(function (prev) { return (__assign(__assign({}, prev), { companyLogo: companyLogo })); });
|
715
|
+
localStorage.setItem('companyLogo', companyLogo);
|
716
|
+
}
|
717
|
+
else {
|
718
|
+
setUserInfoState(function (prev) { return (__assign(__assign({}, prev), { companyLogo: '' })); });
|
719
|
+
localStorage.setItem('companyLogo', '');
|
720
|
+
}
|
721
|
+
if (companyName) {
|
722
|
+
setUserInfoState(function (prev) { return (__assign(__assign({}, prev), { companyName: companyName })); });
|
723
|
+
localStorage.setItem('companyName', companyName);
|
724
|
+
}
|
725
|
+
if (userRole) {
|
726
|
+
setUserInfoState(function (prev) { return (__assign(__assign({}, prev), { companyRole: companyRole })); });
|
727
|
+
localStorage.setItem('companyRole', companyRole);
|
728
|
+
}
|
729
|
+
setUserInfoState(function (prev) { return (__assign(__assign({}, prev), { companyState: companyState })); });
|
730
|
+
localStorage.setItem('companyState', companyState + '');
|
731
|
+
};
|
732
|
+
var IsAuthenticated = useCallback(function (tokenNew) {
|
733
|
+
var tokenVal;
|
734
|
+
if (tokenNew) {
|
735
|
+
tokenVal = tokenNew;
|
736
|
+
}
|
737
|
+
else if (token) {
|
738
|
+
tokenVal = token;
|
739
|
+
}
|
740
|
+
else {
|
741
|
+
tokenVal = localStorage.getItem('token');
|
742
|
+
if (tokenVal === '') {
|
743
|
+
if (history.length !== 1) {
|
744
|
+
setIsTokenExpired(true);
|
745
|
+
}
|
746
|
+
}
|
747
|
+
}
|
748
|
+
try {
|
749
|
+
if (tokenVal) {
|
750
|
+
var exp = o(tokenVal).exp;
|
751
|
+
return Date.now() < exp * 1000;
|
752
|
+
}
|
753
|
+
return false;
|
754
|
+
}
|
755
|
+
catch (err) {
|
756
|
+
return false;
|
757
|
+
}
|
758
|
+
}, [token]);
|
759
|
+
var removeUserInfo = function () {
|
760
|
+
localStorage.removeItem('userId');
|
761
|
+
localStorage.removeItem('userRole');
|
762
|
+
localStorage.removeItem('companyId');
|
763
|
+
localStorage.removeItem('companyRole');
|
764
|
+
localStorage.removeItem('companyName');
|
765
|
+
localStorage.removeItem('companyState');
|
766
|
+
localStorage.removeItem('companyLogo');
|
767
|
+
setUserInfoState(initialUserProps);
|
768
|
+
};
|
769
|
+
return (React.createElement(UserContext.Provider, { value: {
|
770
|
+
userInfoState: userInfoState,
|
771
|
+
setUserInfo: setUserInfo,
|
772
|
+
removeUserInfo: removeUserInfo,
|
773
|
+
IsAuthenticated: IsAuthenticated,
|
774
|
+
isTokenExpired: isTokenExpired,
|
775
|
+
setIsTokenExpired: setIsTokenExpired,
|
776
|
+
} }, children));
|
777
|
+
};
|
778
|
+
var useUserContext = function () {
|
779
|
+
return useContext(UserContext);
|
780
|
+
};
|
781
|
+
|
782
|
+
var SettingsContext = createContext({
|
783
|
+
isTransferFrozen: false,
|
784
|
+
setTransferFrozen: function (value) { },
|
785
|
+
});
|
786
|
+
var SettingsContextProvider = function (_a) {
|
787
|
+
var children = _a.children;
|
788
|
+
var _b = useState(false), isTransferFrozen = _b[0], setIsTransferFrozen = _b[1];
|
789
|
+
var setTransferFrozen = function (value) {
|
790
|
+
setIsTransferFrozen(value);
|
791
|
+
};
|
792
|
+
return (React.createElement(SettingsContext.Provider, { value: {
|
793
|
+
isTransferFrozen: isTransferFrozen,
|
794
|
+
setTransferFrozen: setTransferFrozen,
|
795
|
+
} }, children));
|
796
|
+
};
|
797
|
+
var useSettingsContext = function () {
|
798
|
+
return useContext(SettingsContext);
|
799
|
+
};
|
800
|
+
|
492
801
|
var Search$2 = Input.Search;
|
493
802
|
var CompanyManagementComponent = function (props) {
|
494
|
-
var t = props.t, useAbilityContext = props.useAbilityContext,
|
803
|
+
var t = props.t, useAbilityContext = props.useAbilityContext, visibleColumns = props.visibleColumns, onNavigateToCompanyProfile = props.onNavigateToCompanyProfile, onClickAddCompany = props.onClickAddCompany;
|
495
804
|
var _a = useState(), totalCompany = _a[0], setTotalCompany = _a[1];
|
496
805
|
var _b = useState(false), loading = _b[0], setLoading = _b[1];
|
497
806
|
var _c = useState([]), tableData = _c[0], setTableData = _c[1];
|
@@ -505,6 +814,7 @@ var CompanyManagementComponent = function (props) {
|
|
505
814
|
var _k = useState(""), sortOrder = _k[0], setSortOrder = _k[1];
|
506
815
|
var _l = useState(""), sortField = _l[0], setSortField = _l[1];
|
507
816
|
var ability = useAbilityContext();
|
817
|
+
var post = useConnection().post;
|
508
818
|
document.addEventListener("mousedown", function (event) {
|
509
819
|
var organisationFilterArea1 = document.querySelector(".filter-bar");
|
510
820
|
var organisationFilterArea2 = document.querySelector(".filter-dropdown");
|
@@ -837,7 +1147,7 @@ var CompanyManagementComponent = function (props) {
|
|
837
1147
|
var css_248z$s = ".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";
|
838
1148
|
styleInject(css_248z$s);
|
839
1149
|
|
840
|
-
var css_248z$r = "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.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";
|
1150
|
+
var css_248z$r = "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 .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 .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 .ant-row {\n align-items: unset; }\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";
|
841
1151
|
styleInject(css_248z$r);
|
842
1152
|
|
843
1153
|
var UserManagementColumns;
|
@@ -909,6 +1219,11 @@ var InvestmentCreationType;
|
|
909
1219
|
InvestmentCreationType["EXISTING"] = "Existing";
|
910
1220
|
InvestmentCreationType["NEW"] = "New";
|
911
1221
|
})(InvestmentCreationType || (InvestmentCreationType = {}));
|
1222
|
+
var InvestmentOwnershipType;
|
1223
|
+
(function (InvestmentOwnershipType) {
|
1224
|
+
InvestmentOwnershipType["PROJECT"] = "Project";
|
1225
|
+
InvestmentOwnershipType["NATIONAL"] = "National";
|
1226
|
+
})(InvestmentOwnershipType || (InvestmentOwnershipType = {}));
|
912
1227
|
var InvestmentStream;
|
913
1228
|
(function (InvestmentStream) {
|
914
1229
|
InvestmentStream["CLIMATE_FINANCE"] = "ClimateFinance";
|
@@ -5734,7 +6049,7 @@ var ProgrammeCertify = /** @class */ (function () {
|
|
5734
6049
|
|
5735
6050
|
var AddNewCompanyComponent = function (props) {
|
5736
6051
|
var _a;
|
5737
|
-
var t = props.t, onNavigateToCompanyManagement = props.onNavigateToCompanyManagement, maximumImageSize = props.maximumImageSize,
|
6052
|
+
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;
|
5738
6053
|
var formOne = Form.useForm()[0];
|
5739
6054
|
var formTwo = Form.useForm()[0];
|
5740
6055
|
var _b = useState(), stepOneData = _b[0], setStepOneData = _b[1];
|
@@ -6523,7 +6838,7 @@ var css_248z$q = ".company-profile {\n padding: 0px 50px; }\n .company-profile
|
|
6523
6838
|
styleInject(css_248z$q);
|
6524
6839
|
|
6525
6840
|
var CompanyProfileComponent = function (props) {
|
6526
|
-
var t = props.t, useAbilityContext = props.useAbilityContext, useLocation = props.useLocation,
|
6841
|
+
var t = props.t, useAbilityContext = props.useAbilityContext, useLocation = props.useLocation, onNavigateToCompanyManagement = props.onNavigateToCompanyManagement, onNavigateToCompanyEdit = props.onNavigateToCompanyEdit, regionField = props.regionField, systemType = props.systemType;
|
6527
6842
|
var _a = useConnection(), get = _a.get, put = _a.put, post = _a.post;
|
6528
6843
|
var _b = useState(undefined), companyDetails = _b[0], setCompanyDetails = _b[1];
|
6529
6844
|
var _c = useState(undefined), userDetails = _c[0], setUserDetails = _c[1];
|
@@ -6956,7 +7271,7 @@ styleInject(css_248z$p);
|
|
6956
7271
|
|
6957
7272
|
var Search$1 = Input.Search;
|
6958
7273
|
var ProgrammeManagementComponent = function (props) {
|
6959
|
-
var t = props.t, visibleColumns = props.visibleColumns,
|
7274
|
+
var t = props.t, visibleColumns = props.visibleColumns, onNavigateToProgrammeView = props.onNavigateToProgrammeView, onClickAddProgramme = props.onClickAddProgramme, enableAddProgramme = props.enableAddProgramme, useAbilityContext = props.useAbilityContext;
|
6960
7275
|
var _a = useConnection(); _a.get; _a.delete; var post = _a.post;
|
6961
7276
|
var _b = useState(), totalProgramme = _b[0], setTotalProgramme = _b[1];
|
6962
7277
|
var _c = useState(false), loading = _c[0], setLoading = _c[1];
|
@@ -7341,7 +7656,7 @@ var ProgrammeManagementComponent = function (props) {
|
|
7341
7656
|
React.createElement("div", { className: "filter-section" },
|
7342
7657
|
React.createElement("div", { className: "search-filter" },
|
7343
7658
|
React.createElement(Checkbox, { className: "label", onChange: function (v) {
|
7344
|
-
if (userInfoState.companyRole === CompanyRole.MINISTRY) {
|
7659
|
+
if ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.MINISTRY) {
|
7345
7660
|
if (v.target.checked) {
|
7346
7661
|
setMinistryLevelFilter(true);
|
7347
7662
|
}
|
@@ -7358,7 +7673,7 @@ var ProgrammeManagementComponent = function (props) {
|
|
7358
7673
|
}
|
7359
7674
|
: undefined);
|
7360
7675
|
}
|
7361
|
-
} }, userInfoState.companyRole === CompanyRole.MINISTRY
|
7676
|
+
} }, (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.MINISTRY
|
7362
7677
|
? t("view:ministryLevel")
|
7363
7678
|
: t("view:seeMine"))),
|
7364
7679
|
React.createElement("div", { className: "search-bar" },
|
@@ -13139,7 +13454,7 @@ var sectoralScopes = {
|
|
13139
13454
|
};
|
13140
13455
|
var ProgrammeCreationComponent = function (props) {
|
13141
13456
|
var _a, _b, _c;
|
13142
|
-
var
|
13457
|
+
var useLocation = props.useLocation, onNavigateToProgrammeView = props.onNavigateToProgrammeView, translator = props.translator;
|
13143
13458
|
var t = translator.t;
|
13144
13459
|
var state = useLocation().state;
|
13145
13460
|
var formOne = Form.useForm()[0];
|
@@ -14204,7 +14519,7 @@ var ChangePasswordModel = function (props) {
|
|
14204
14519
|
|
14205
14520
|
var AddNewUserComponent = function (props) {
|
14206
14521
|
var _a, _b, _c, _d, _e, _f;
|
14207
|
-
var t = props.t, onNavigateToUserManagement = props.onNavigateToUserManagement, onNavigateLogin = props.onNavigateLogin,
|
14522
|
+
var t = props.t, onNavigateToUserManagement = props.onNavigateToUserManagement, onNavigateLogin = props.onNavigateLogin, useLocation = props.useLocation, useAbilityContext = props.useAbilityContext, themeColor = props.themeColor;
|
14208
14523
|
var _g = useConnection(), post = _g.post, put = _g.put, del = _g.delete, get = _g.get;
|
14209
14524
|
var formOne = Form.useForm()[0];
|
14210
14525
|
var state = useLocation().state;
|
@@ -14622,7 +14937,7 @@ var LanguageSelection = function (props) {
|
|
14622
14937
|
};
|
14623
14938
|
|
14624
14939
|
var UserProfileComponent = function (props) {
|
14625
|
-
var t = props.t, i18n = props.i18n,
|
14940
|
+
var t = props.t, i18n = props.i18n, onNavigateUpdateUser = props.onNavigateUpdateUser, onNavigateLogin = props.onNavigateLogin;
|
14626
14941
|
var get = useConnection().get;
|
14627
14942
|
var _a = useState(undefined), organisationDetails = _a[0], setOrganisationDetails = _a[1];
|
14628
14943
|
var _b = useState(undefined), userDetails = _b[0], setUserDetails = _b[1];
|
@@ -14790,7 +15105,7 @@ styleInject(css_248z$k);
|
|
14790
15105
|
|
14791
15106
|
var Search = Input.Search;
|
14792
15107
|
var UserManagementComponent = function (props) {
|
14793
|
-
var t = props.t, useAbilityContext = props.useAbilityContext,
|
15108
|
+
var t = props.t, useAbilityContext = props.useAbilityContext, visibleColumns = props.visibleColumns, onNavigateToUpdateUser = props.onNavigateToUpdateUser, onClickAddUser = props.onClickAddUser;
|
14794
15109
|
Form.useForm()[0];
|
14795
15110
|
var _a = useConnection(), post = _a.post, del = _a.delete;
|
14796
15111
|
var _b = useState(), totalUser = _b[0], setTotalUser = _b[1];
|
@@ -14812,6 +15127,7 @@ var UserManagementComponent = function (props) {
|
|
14812
15127
|
var _s = useState(""), errorMsg = _s[0], setErrorMsg = _s[1];
|
14813
15128
|
var _t = useState(false), openDeleteConfirmationModal = _t[0], setOpenDeleteConfirmationModal = _t[1];
|
14814
15129
|
var ability = useAbilityContext();
|
15130
|
+
var userInfoState = useUserContext().userInfoState;
|
14815
15131
|
document.addEventListener("mousedown", function (event) {
|
14816
15132
|
var userFilterArea1 = document.querySelector(".filter-bar");
|
14817
15133
|
var userFilterArea2 = document.querySelector(".filter-dropdown");
|
@@ -15324,7 +15640,7 @@ var UserManagementComponent = function (props) {
|
|
15324
15640
|
React.createElement(UserActionConfirmationModel, { t: t, actionInfo: actionInfo, onActionConfirmed: handleOk, onActionCanceled: handleCancel, openModal: openDeleteConfirmationModal, errorMsg: errorMsg, loading: loading })));
|
15325
15641
|
};
|
15326
15642
|
|
15327
|
-
var css_248z$j = ".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
|
15643
|
+
var css_248z$j = ".steps-actions {\n display: flex;\n flex-direction: row-reverse;\n margin-right: 1rem;\n justify-content: flex-start; }\n\n.details-part-two .ant-input-number {\n width: 50%;\n margin-left: 15px; }\n\n.investment-title-bar {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n padding: 0px 0px 30px 0px; }\n .investment-title-bar .title {\n display: flex;\n flex-direction: column;\n justify-content: space-between; }\n .investment-title-bar .actions {\n display: flex;\n align-items: center;\n justify-content: flex-end; }\n .investment-title-bar .flex-display {\n margin-left: 15px; }\n\n.ownership-container {\n padding: 15px 0px; }\n .ownership-container .label {\n color: rgba(58, 53, 65, 0.5); }\n\n.separator {\n padding: 5px;\n color: #d8d8d8; }\n\n.role-group .ant-col-13 {\n max-width: 320px; }\n\n.role-group .condition-radio-container {\n width: 48%;\n text-align: center; }\n .role-group .condition-radio-container .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled) {\n color: #ffffff !important;\n border-color: #9155fd !important;\n box-shadow: none;\n max-width: 200px; }\n\n.role-group .ant-radio-button-wrapper::before {\n background-color: transparent; }\n\n.role-group .anticon {\n margin-right: 0.5rem; }\n\n.role-group .ant-radio-button-wrapper {\n border: 1px solid #d9d9d9;\n color: rgba(140, 140, 140, 0.7) !important;\n width: 100% !important; }\n\n.role-group .condition-radio {\n width: 100%;\n text-transform: uppercase; }\n .role-group .condition-radio .ant-radio-button-checked {\n background: #9155fd;\n color: #ffffff; }\n\n.role-group .role-icons {\n margin-right: 5px; }\n\n.investment-management .role-icon {\n padding: 0.5rem 0.6rem; }\n\n.investment-management .ant-tag {\n border: none; }\n\n.investment-management .ant-checkbox-checked .ant-checkbox-input[value=\"Rejected\"] + .ant-checkbox-inner {\n background-color: rgba(237, 77, 71, 0.6);\n border: none; }\n\n.investment-management .ant-checkbox-checked .ant-checkbox-input[value=\"Cancelled\"] + .ant-checkbox-inner {\n background-color: rgba(58, 53, 65, 0.4);\n border: none; }\n\n.investment-management .ant-checkbox-checked .ant-checkbox-input[value=\"Accepted\"] + .ant-checkbox-inner {\n background-color: #16b1ff;\n border: none; }\n\n.investment-management .ant-checkbox-checked .ant-checkbox-input[value=\"Pending\"] + .ant-checkbox-inner {\n background-color: rgba(118, 195, 39, 0.6);\n border: none; }\n\n.investment-management .ant-checkbox-checked .ant-checkbox-input[value=\"Recognised\"] + .ant-checkbox-inner {\n background-color: #976ed7;\n border: none; }\n\n.investment-management .ant-checkbox-checked .ant-checkbox-input[value=\"NotRecognised\"] + .ant-checkbox-inner {\n background-color: #ffa070;\n border: none; }\n";
|
15328
15644
|
styleInject(css_248z$j);
|
15329
15645
|
|
15330
15646
|
var Loading = function () {
|
@@ -15332,21 +15648,34 @@ var Loading = function () {
|
|
15332
15648
|
};
|
15333
15649
|
|
15334
15650
|
var InvestmentCreationComponent = function (props) {
|
15335
|
-
var t = props.t,
|
15651
|
+
var t = props.t, useLocation = props.useLocation, onNavigateToProgrammeManagementView = props.onNavigateToProgrammeManagementView, onNavigateToProgrammeView = props.onNavigateToProgrammeView, onNavigateToInvestmentManagementView = props.onNavigateToInvestmentManagementView;
|
15336
15652
|
var state = useLocation().state;
|
15337
15653
|
var _a = useState(), data = _a[0], setData = _a[1];
|
15654
|
+
var _b = useState({}), companyNames = _b[0], setCompanyNames = _b[1];
|
15655
|
+
var _c = useState({}); _c[0]; var setUserOrganization = _c[1];
|
15656
|
+
var _d = useState({}), investmentNames = _d[0], setInvestmentNames = _d[1];
|
15657
|
+
var _e = useState(), projectData = _e[0], setProjectData = _e[1];
|
15658
|
+
var _f = useState(), investmentData = _f[0], setInvestmentData = _f[1];
|
15659
|
+
var _g = useState([]), allProjectData = _g[0], setAllProjectData = _g[1];
|
15338
15660
|
var formOne = Form.useForm()[0];
|
15339
15661
|
var formTwo = Form.useForm()[0];
|
15340
15662
|
var post = useConnection().post;
|
15341
|
-
var
|
15342
|
-
var
|
15343
|
-
var
|
15344
|
-
var
|
15345
|
-
var
|
15346
|
-
var
|
15347
|
-
var
|
15348
|
-
var
|
15349
|
-
var
|
15663
|
+
var _h = useState(false), loading = _h[0], setLoading = _h[1];
|
15664
|
+
var _j = useState("New"), typeCreation = _j[0], setTypeCreation = _j[1];
|
15665
|
+
var _k = useState(InvestmentOwnershipType.PROJECT), investmentOwnershipType = _k[0], setInvestmentOwnershipType = _k[1];
|
15666
|
+
var _l = useState(false), loadingList = _l[0], setLoadingList = _l[1];
|
15667
|
+
var _m = useState(false), loadingInvestment = _m[0], setLoadingInvestment = _m[1];
|
15668
|
+
var _o = useState(false), loadingProgData = _o[0], setLoadingProgData = _o[1];
|
15669
|
+
var _p = useState(0), current = _p[0], setCurrent = _p[1];
|
15670
|
+
var _q = useState(0), currentPercTotal = _q[0], setCurrentPercTotal = _q[1];
|
15671
|
+
var _r = useState([]), organisationsList = _r[0], setOrganisationList = _r[1];
|
15672
|
+
var _s = useState([]), nationalInvestmentList = _s[0], setNationalInvestmentList = _s[1];
|
15673
|
+
var _t = useState([]), instrument = _t[0], setInstrument = _t[1];
|
15674
|
+
var _u = useState(), stepOneData = _u[0], setStepOneData = _u[1];
|
15675
|
+
var _v = useState(), govData = _v[0], setGovData = _v[1];
|
15676
|
+
var userInfoState = useUserContext().userInfoState;
|
15677
|
+
var _w = useState([]), ministrySectoralScope = _w[0], setMinistrySectoralScope = _w[1];
|
15678
|
+
var _x = useState({}), prevInvestor = _x[0], setPrevInvestor = _x[1];
|
15350
15679
|
var instrumentOptions = Object.keys(Instrument).map(function (k, index) { return ({
|
15351
15680
|
label: addSpaces(Object.values(Instrument)[index]),
|
15352
15681
|
value: Object.values(Instrument)[index],
|
@@ -15397,52 +15726,215 @@ var InvestmentCreationComponent = function (props) {
|
|
15397
15726
|
}
|
15398
15727
|
});
|
15399
15728
|
}); };
|
15400
|
-
var
|
15401
|
-
var
|
15729
|
+
var getAllProjectData = function () { return __awaiter(void 0, void 0, void 0, function () {
|
15730
|
+
var response, error_2;
|
15731
|
+
return __generator(this, function (_a) {
|
15732
|
+
switch (_a.label) {
|
15733
|
+
case 0:
|
15734
|
+
setLoadingProgData(true);
|
15735
|
+
_a.label = 1;
|
15736
|
+
case 1:
|
15737
|
+
_a.trys.push([1, 5, 6, 7]);
|
15738
|
+
if (!data) return [3 /*break*/, 4];
|
15739
|
+
if (!!(data === null || data === void 0 ? void 0 : data.programmeId)) return [3 /*break*/, 3];
|
15740
|
+
console.log("data non existing", data);
|
15741
|
+
console.log("getting all Project data");
|
15742
|
+
return [4 /*yield*/, post("national/programme/query", {
|
15743
|
+
page: 1,
|
15744
|
+
size: 100,
|
15745
|
+
filterAnd: [
|
15746
|
+
{
|
15747
|
+
key: "currentStage",
|
15748
|
+
operation: "!=",
|
15749
|
+
value: ProgrammeStageUnified.Rejected,
|
15750
|
+
},
|
15751
|
+
],
|
15752
|
+
})];
|
15753
|
+
case 2:
|
15754
|
+
response = _a.sent();
|
15755
|
+
if (response.data) {
|
15756
|
+
setAllProjectData(response === null || response === void 0 ? void 0 : response.data);
|
15757
|
+
console.log("all Project data", response === null || response === void 0 ? void 0 : response.data);
|
15758
|
+
}
|
15759
|
+
return [3 /*break*/, 4];
|
15760
|
+
case 3:
|
15761
|
+
console.log("setting current Project data");
|
15762
|
+
setAllProjectData([data]);
|
15763
|
+
_a.label = 4;
|
15764
|
+
case 4: return [3 /*break*/, 7];
|
15765
|
+
case 5:
|
15766
|
+
error_2 = _a.sent();
|
15767
|
+
console.log("Error in getting all programme data", error_2);
|
15768
|
+
return [3 /*break*/, 7];
|
15769
|
+
case 6:
|
15770
|
+
setLoadingProgData(false);
|
15771
|
+
return [7 /*endfinally*/];
|
15772
|
+
case 7: return [2 /*return*/];
|
15773
|
+
}
|
15774
|
+
});
|
15775
|
+
}); };
|
15776
|
+
var setSelectedProgramme = function (value) { return __awaiter(void 0, void 0, void 0, function () {
|
15777
|
+
var _i, allProjectData_1, obj;
|
15778
|
+
return __generator(this, function (_a) {
|
15779
|
+
console.log("setSelectedProgramme", value);
|
15780
|
+
for (_i = 0, allProjectData_1 = allProjectData; _i < allProjectData_1.length; _i++) {
|
15781
|
+
obj = allProjectData_1[_i];
|
15782
|
+
if (obj.programmeId == value) {
|
15783
|
+
setProjectData(obj);
|
15784
|
+
break;
|
15785
|
+
}
|
15786
|
+
}
|
15787
|
+
return [2 /*return*/];
|
15788
|
+
});
|
15789
|
+
}); };
|
15790
|
+
var setSelectedInvestment = function (value) { return __awaiter(void 0, void 0, void 0, function () {
|
15791
|
+
return __generator(this, function (_a) {
|
15792
|
+
console.log("setSelectedInvestment", value);
|
15793
|
+
setInvestmentData(investmentNames[value]);
|
15794
|
+
return [2 /*return*/];
|
15795
|
+
});
|
15796
|
+
}); };
|
15797
|
+
var getNationalInvestmentDetails = function () { return __awaiter(void 0, void 0, void 0, function () {
|
15798
|
+
var filterAnd, response, investmentData_1, _i, _a, investment, error_3;
|
15402
15799
|
return __generator(this, function (_b) {
|
15403
15800
|
switch (_b.label) {
|
15404
15801
|
case 0:
|
15405
|
-
|
15802
|
+
setLoadingInvestment(true);
|
15406
15803
|
_b.label = 1;
|
15407
15804
|
case 1:
|
15408
15805
|
_b.trys.push([1, 3, 4, 5]);
|
15409
15806
|
filterAnd = [];
|
15410
15807
|
filterAnd = [
|
15411
15808
|
{
|
15412
|
-
key: "
|
15809
|
+
key: "category",
|
15413
15810
|
operation: "=",
|
15414
|
-
value:
|
15811
|
+
value: InvestmentOwnershipType.NATIONAL.toString(),
|
15812
|
+
},
|
15813
|
+
{
|
15814
|
+
key: "amount",
|
15815
|
+
operation: ">",
|
15816
|
+
value: 0,
|
15415
15817
|
},
|
15416
15818
|
];
|
15417
15819
|
if ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.PROGRAMME_DEVELOPER) {
|
15418
15820
|
filterAnd.push({
|
15419
|
-
key: "
|
15420
|
-
operation: "
|
15821
|
+
key: "toCompanyId",
|
15822
|
+
operation: "=",
|
15421
15823
|
value: userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyId,
|
15422
15824
|
});
|
15423
15825
|
}
|
15424
|
-
|
15425
|
-
c = _a[_i];
|
15426
|
-
filterAnd.push({
|
15427
|
-
key: "companyId",
|
15428
|
-
operation: "!=",
|
15429
|
-
value: c,
|
15430
|
-
});
|
15431
|
-
}
|
15432
|
-
return [4 /*yield*/, post("national/organisation/queryNames", {
|
15826
|
+
return [4 /*yield*/, post("national/programme/investmentQuery", {
|
15433
15827
|
page: 1,
|
15434
15828
|
size: 100,
|
15435
15829
|
filterAnd: filterAnd,
|
15436
15830
|
})];
|
15437
15831
|
case 2:
|
15438
15832
|
response = _b.sent();
|
15833
|
+
if (response.data) {
|
15834
|
+
setNationalInvestmentList(response === null || response === void 0 ? void 0 : response.data);
|
15835
|
+
investmentData_1 = {};
|
15836
|
+
for (_i = 0, _a = response === null || response === void 0 ? void 0 : response.data; _i < _a.length; _i++) {
|
15837
|
+
investment = _a[_i];
|
15838
|
+
investmentData_1[investment.requestId] = investment;
|
15839
|
+
}
|
15840
|
+
setInvestmentNames(investmentData_1);
|
15841
|
+
console.log(investmentData_1);
|
15842
|
+
}
|
15843
|
+
return [3 /*break*/, 5];
|
15844
|
+
case 3:
|
15845
|
+
error_3 = _b.sent();
|
15846
|
+
console.log("Error in getting national Investments list", error_3);
|
15847
|
+
return [3 /*break*/, 5];
|
15848
|
+
case 4:
|
15849
|
+
setLoadingInvestment(false);
|
15850
|
+
return [7 /*endfinally*/];
|
15851
|
+
case 5: return [2 /*return*/];
|
15852
|
+
}
|
15853
|
+
});
|
15854
|
+
}); };
|
15855
|
+
var getUserOrganization = function () { return __awaiter(void 0, void 0, void 0, function () {
|
15856
|
+
var response, error_4;
|
15857
|
+
return __generator(this, function (_a) {
|
15858
|
+
switch (_a.label) {
|
15859
|
+
case 0:
|
15860
|
+
_a.trys.push([0, 2, , 3]);
|
15861
|
+
return [4 /*yield*/, post("national/organisation/query", {
|
15862
|
+
page: 1,
|
15863
|
+
size: 100,
|
15864
|
+
filterAnd: [
|
15865
|
+
{ key: "companyId", operation: "=", value: userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyId },
|
15866
|
+
],
|
15867
|
+
})];
|
15868
|
+
case 1:
|
15869
|
+
response = _a.sent();
|
15870
|
+
console.log("getUserOrganization", response.data[0]);
|
15871
|
+
setUserOrganization(response.data[0]);
|
15872
|
+
setMinistrySectoralScope(response.data[0].sectoralScope);
|
15873
|
+
return [3 /*break*/, 3];
|
15874
|
+
case 2:
|
15875
|
+
error_4 = _a.sent();
|
15876
|
+
console.log("Error in getting user organization", error_4);
|
15877
|
+
return [3 /*break*/, 3];
|
15878
|
+
case 3: return [2 /*return*/];
|
15879
|
+
}
|
15880
|
+
});
|
15881
|
+
}); };
|
15882
|
+
var getOrganisationsDetails = function () { return __awaiter(void 0, void 0, void 0, function () {
|
15883
|
+
var filterAnd, filterOr, _i, _a, c, filters, response, companyName, _b, _c, company, error_5;
|
15884
|
+
return __generator(this, function (_d) {
|
15885
|
+
switch (_d.label) {
|
15886
|
+
case 0:
|
15887
|
+
setLoadingList(true);
|
15888
|
+
_d.label = 1;
|
15889
|
+
case 1:
|
15890
|
+
_d.trys.push([1, 3, 4, 5]);
|
15891
|
+
filterAnd = [];
|
15892
|
+
filterOr = [];
|
15893
|
+
filterAnd = [
|
15894
|
+
{
|
15895
|
+
key: "companyRole",
|
15896
|
+
operation: "=",
|
15897
|
+
value: CompanyRole.PROGRAMME_DEVELOPER.toString(),
|
15898
|
+
},
|
15899
|
+
];
|
15900
|
+
// if (userInfoState?.companyRole === CompanyRole.PROGRAMME_DEVELOPER) {
|
15901
|
+
// filterAnd.push({
|
15902
|
+
// key: "companyId",
|
15903
|
+
// operation: "!=",
|
15904
|
+
// value: userInfoState?.companyId,
|
15905
|
+
// });
|
15906
|
+
// }
|
15907
|
+
if (data === null || data === void 0 ? void 0 : data.companyId) {
|
15908
|
+
for (_i = 0, _a = data === null || data === void 0 ? void 0 : data.companyId; _i < _a.length; _i++) {
|
15909
|
+
c = _a[_i];
|
15910
|
+
filterOr.push({
|
15911
|
+
key: "companyId",
|
15912
|
+
operation: "=",
|
15913
|
+
value: c,
|
15914
|
+
});
|
15915
|
+
}
|
15916
|
+
}
|
15917
|
+
filters = void 0;
|
15918
|
+
if (filterOr.length) {
|
15919
|
+
filters.filterOr = filterOr;
|
15920
|
+
}
|
15921
|
+
return [4 /*yield*/, post("national/organisation/queryNames", __assign({ page: 1, size: 100, filterAnd: filterAnd }, filters))];
|
15922
|
+
case 2:
|
15923
|
+
response = _d.sent();
|
15439
15924
|
if (response.data) {
|
15440
15925
|
setOrganisationList(response === null || response === void 0 ? void 0 : response.data);
|
15926
|
+
companyName = {};
|
15927
|
+
for (_b = 0, _c = response === null || response === void 0 ? void 0 : response.data; _b < _c.length; _b++) {
|
15928
|
+
company = _c[_b];
|
15929
|
+
companyName[Number(company.companyId)] = company.name;
|
15930
|
+
}
|
15931
|
+
setCompanyNames(companyName);
|
15932
|
+
console.log(companyName);
|
15441
15933
|
}
|
15442
15934
|
return [3 /*break*/, 5];
|
15443
15935
|
case 3:
|
15444
|
-
|
15445
|
-
console.log("Error in getting organization list",
|
15936
|
+
error_5 = _d.sent();
|
15937
|
+
console.log("Error in getting organization list", error_5);
|
15446
15938
|
return [3 /*break*/, 5];
|
15447
15939
|
case 4:
|
15448
15940
|
setLoadingList(false);
|
@@ -15457,52 +15949,71 @@ var InvestmentCreationComponent = function (props) {
|
|
15457
15949
|
return;
|
15458
15950
|
}
|
15459
15951
|
if (state === null || state === void 0 ? void 0 : state.record) {
|
15952
|
+
console.log("condition 1 data", state === null || state === void 0 ? void 0 : state.record);
|
15460
15953
|
setData(state === null || state === void 0 ? void 0 : state.record);
|
15461
15954
|
}
|
15462
15955
|
else {
|
15956
|
+
console.log("condition 2 data", { ownership: true });
|
15463
15957
|
setData({ ownership: true });
|
15464
15958
|
}
|
15465
15959
|
}, []);
|
15466
15960
|
useEffect(function () {
|
15467
|
-
if (data) {
|
15468
|
-
|
15469
|
-
|
15470
|
-
|
15471
|
-
|
15472
|
-
}
|
15961
|
+
// if (data) {
|
15962
|
+
// const keys = Object.keys(data);
|
15963
|
+
// if (keys[0] !== "ownership") {
|
15964
|
+
// getOrganisationsDetails();
|
15965
|
+
// }
|
15966
|
+
// }
|
15967
|
+
getNationalInvestmentDetails();
|
15968
|
+
getOrganisationsDetails();
|
15473
15969
|
getGovernmentDetails();
|
15970
|
+
getAllProjectData();
|
15971
|
+
getUserOrganization();
|
15474
15972
|
}, [data]);
|
15475
|
-
if (!data) {
|
15973
|
+
if (!data && allProjectData.length == 0) {
|
15476
15974
|
return React.createElement(Loading, null);
|
15477
15975
|
}
|
15478
|
-
console.log(
|
15479
|
-
var companyName = {};
|
15976
|
+
console.log("data", data);
|
15480
15977
|
if (data && Object.keys(data)[0] !== "ownership") {
|
15481
|
-
for (
|
15482
|
-
|
15483
|
-
|
15484
|
-
}
|
15978
|
+
// for (const company of data!?.company) {
|
15979
|
+
// companyName[company?.companyId] = company;
|
15980
|
+
// }
|
15485
15981
|
if (!data.proponentPercentage) {
|
15486
15982
|
data.proponentPercentage = [100];
|
15487
15983
|
}
|
15488
15984
|
}
|
15489
15985
|
var nextOne = function (val) {
|
15986
|
+
console.log("step 1 values", val);
|
15987
|
+
if (val.typeCreation == InvestmentCreationType.EXISTING) {
|
15988
|
+
val.toCompanyId = investmentData.toCompanyId;
|
15989
|
+
}
|
15490
15990
|
setCurrent(current + 1);
|
15491
15991
|
setStepOneData(val);
|
15992
|
+
if (data === null || data === void 0 ? void 0 : data.programmeId)
|
15993
|
+
setSelectedProgramme(data.programmeId);
|
15994
|
+
if (prevInvestor && prevInvestor != val.toCompanyId && !(data === null || data === void 0 ? void 0 : data.programmeId)) {
|
15995
|
+
formTwo.resetFields();
|
15996
|
+
setCurrentPercTotal(0);
|
15997
|
+
setProjectData(undefined);
|
15998
|
+
}
|
15492
15999
|
};
|
15493
16000
|
var prevOne = function () {
|
15494
16001
|
setCurrent(current - 1);
|
16002
|
+
setPrevInvestor(stepOneData.toCompanyId);
|
16003
|
+
// formTwo.resetFields();
|
16004
|
+
// setCurrentPercTotal(0);
|
16005
|
+
// setProjectData(undefined);
|
15495
16006
|
};
|
15496
16007
|
var submitInvestment = function (val) { return __awaiter(void 0, void 0, void 0, function () {
|
15497
|
-
var payload, response,
|
16008
|
+
var payload, response, error_6;
|
15498
16009
|
return __generator(this, function (_a) {
|
15499
16010
|
switch (_a.label) {
|
15500
16011
|
case 0:
|
15501
16012
|
console.log(val);
|
15502
16013
|
console.log(stepOneData);
|
16014
|
+
console.log("OwnershipType", investmentOwnershipType);
|
15503
16015
|
setLoading(true);
|
15504
16016
|
payload = stepOneData;
|
15505
|
-
payload.programmeId = data.programmeId;
|
15506
16017
|
payload.amount = parseFloat(payload.amount);
|
15507
16018
|
if (payload.interestRate) {
|
15508
16019
|
payload.interestRate = parseFloat(payload.interestRate);
|
@@ -15510,15 +16021,27 @@ var InvestmentCreationComponent = function (props) {
|
|
15510
16021
|
if (payload.paymentPerMetric) {
|
15511
16022
|
payload.paymentPerMetric = parseFloat(payload.paymentPerMetric);
|
15512
16023
|
}
|
15513
|
-
payload.fromCompanyIds = data.companyId.map(function (e) { return Number(e); });
|
15514
|
-
payload.percentage = val.percentage;
|
15515
16024
|
payload.toCompanyId = Number(payload.toCompanyId);
|
15516
16025
|
_a.label = 1;
|
15517
16026
|
case 1:
|
15518
|
-
_a.trys.push([1,
|
16027
|
+
_a.trys.push([1, 6, 7, 8]);
|
16028
|
+
response = void 0;
|
16029
|
+
if (!(investmentOwnershipType == InvestmentOwnershipType.PROJECT)) return [3 /*break*/, 3];
|
16030
|
+
if (typeCreation == InvestmentCreationType.EXISTING) {
|
16031
|
+
payload.nationalInvestmentId = investmentData.requestId;
|
16032
|
+
}
|
16033
|
+
payload.programmeId = projectData === null || projectData === void 0 ? void 0 : projectData.programmeId;
|
16034
|
+
payload.fromCompanyIds = projectData === null || projectData === void 0 ? void 0 : projectData.companyId.map(function (e) { return Number(e); });
|
16035
|
+
payload.percentage = val.percentage;
|
15519
16036
|
return [4 /*yield*/, post("national/programme/addInvestment", payload)];
|
15520
16037
|
case 2:
|
15521
16038
|
response = _a.sent();
|
16039
|
+
return [3 /*break*/, 5];
|
16040
|
+
case 3: return [4 /*yield*/, post("national/organisation/addInvestment", payload)];
|
16041
|
+
case 4:
|
16042
|
+
response = _a.sent();
|
16043
|
+
_a.label = 5;
|
16044
|
+
case 5:
|
15522
16045
|
console.log("investment creation -> ", response);
|
15523
16046
|
if ((response === null || response === void 0 ? void 0 : response.statusText) === "SUCCESS") {
|
15524
16047
|
message.open({
|
@@ -15528,22 +16051,24 @@ var InvestmentCreationComponent = function (props) {
|
|
15528
16051
|
style: { textAlign: "right", marginRight: 15, marginTop: 10 },
|
15529
16052
|
});
|
15530
16053
|
}
|
15531
|
-
|
15532
|
-
|
15533
|
-
|
15534
|
-
|
15535
|
-
|
16054
|
+
(data === null || data === void 0 ? void 0 : data.programmeId)
|
16055
|
+
? onNavigateToProgrammeView(data === null || data === void 0 ? void 0 : data.programmeId)
|
16056
|
+
: onNavigateToInvestmentManagementView();
|
16057
|
+
return [3 /*break*/, 8];
|
16058
|
+
case 6:
|
16059
|
+
error_6 = _a.sent();
|
16060
|
+
console.log("Error in investment creation - ", error_6);
|
15536
16061
|
message.open({
|
15537
16062
|
type: "error",
|
15538
|
-
content:
|
16063
|
+
content: error_6 === null || error_6 === void 0 ? void 0 : error_6.message,
|
15539
16064
|
duration: 4,
|
15540
16065
|
style: { textAlign: "right", marginRight: 15, marginTop: 10 },
|
15541
16066
|
});
|
15542
|
-
return [3 /*break*/,
|
15543
|
-
case
|
16067
|
+
return [3 /*break*/, 8];
|
16068
|
+
case 7:
|
15544
16069
|
setLoading(false);
|
15545
16070
|
return [7 /*endfinally*/];
|
15546
|
-
case
|
16071
|
+
case 8: return [2 /*return*/];
|
15547
16072
|
}
|
15548
16073
|
});
|
15549
16074
|
}); };
|
@@ -15555,8 +16080,16 @@ var InvestmentCreationComponent = function (props) {
|
|
15555
16080
|
}
|
15556
16081
|
};
|
15557
16082
|
var onChangeTypeCreation = function (e) {
|
15558
|
-
console.log(
|
16083
|
+
console.log("radio checked", e.target.value);
|
15559
16084
|
setTypeCreation(e.target.value);
|
16085
|
+
formOne.resetFields();
|
16086
|
+
formTwo.resetFields();
|
16087
|
+
setCurrentPercTotal(0);
|
16088
|
+
setProjectData(undefined);
|
16089
|
+
};
|
16090
|
+
var onChangeInvestmentOwnershipType = function (e) {
|
16091
|
+
console.log("investment ownership type radio checked", e.target.value);
|
16092
|
+
setInvestmentOwnershipType(e.target.value);
|
15560
16093
|
};
|
15561
16094
|
return (React.createElement("div", { className: "add-programme-main-container" },
|
15562
16095
|
React.createElement("div", { className: "title-container" },
|
@@ -15581,242 +16114,263 @@ var InvestmentCreationComponent = function (props) {
|
|
15581
16114
|
] },
|
15582
16115
|
React.createElement(Radio.Group, { size: "large", defaultValue: typeCreation }, Object.values(InvestmentCreationType).map(function (k, index) { return (React.createElement("div", { className: "condition-radio-container" },
|
15583
16116
|
React.createElement(Radio.Button, { className: "condition-radio", value: k, onChange: onChangeTypeCreation }, t("programme:" + k)))); }))))),
|
15584
|
-
React.createElement(
|
15585
|
-
React.createElement(
|
15586
|
-
React.createElement(
|
15587
|
-
React.createElement(
|
15588
|
-
|
15589
|
-
|
15590
|
-
|
15591
|
-
|
15592
|
-
|
15593
|
-
|
15594
|
-
|
15595
|
-
|
15596
|
-
|
15597
|
-
|
15598
|
-
|
15599
|
-
|
15600
|
-
|
15601
|
-
|
15602
|
-
|
15603
|
-
return
|
15604
|
-
|
15605
|
-
|
15606
|
-
|
15607
|
-
|
15608
|
-
|
15609
|
-
|
15610
|
-
|
15611
|
-
|
15612
|
-
|
15613
|
-
|
15614
|
-
|
15615
|
-
|
15616
|
-
|
15617
|
-
|
15618
|
-
|
15619
|
-
|
15620
|
-
|
15621
|
-
|
15622
|
-
|
15623
|
-
|
15624
|
-
|
15625
|
-
|
15626
|
-
|
15627
|
-
|
15628
|
-
|
15629
|
-
|
15630
|
-
|
15631
|
-
|
15632
|
-
|
15633
|
-
|
15634
|
-
},
|
15635
|
-
|
15636
|
-
|
15637
|
-
|
15638
|
-
|
15639
|
-
|
15640
|
-
|
15641
|
-
|
15642
|
-
|
15643
|
-
|
15644
|
-
|
15645
|
-
|
15646
|
-
|
15647
|
-
|
15648
|
-
|
15649
|
-
|
15650
|
-
|
15651
|
-
|
15652
|
-
|
15653
|
-
|
15654
|
-
|
15655
|
-
|
15656
|
-
|
15657
|
-
|
15658
|
-
|
15659
|
-
|
15660
|
-
|
15661
|
-
|
15662
|
-
|
15663
|
-
|
15664
|
-
|
16117
|
+
typeCreation == InvestmentCreationType.NEW && (React.createElement("div", null,
|
16118
|
+
React.createElement(Row, { className: "row", gutter: [16, 16] },
|
16119
|
+
React.createElement(Col, { xl: 12, md: 24 },
|
16120
|
+
React.createElement("div", { className: "details-part-one" },
|
16121
|
+
React.createElement(Form.Item, { label: t("programme:investorName"), name: "toCompanyId", wrapperCol: { span: 24 }, className: "organisation", rules: [
|
16122
|
+
{
|
16123
|
+
required: true,
|
16124
|
+
message: "".concat(t("programme:investorName"), " ").concat(t("isRequired")),
|
16125
|
+
},
|
16126
|
+
] },
|
16127
|
+
React.createElement(Select, { size: "large", loading: loadingList }, organisationsList.map(function (organisation) {
|
16128
|
+
if (data === null || data === void 0 ? void 0 : data.programmeId) {
|
16129
|
+
if (data.companyId
|
16130
|
+
.map(function (id) { return Number(id); })
|
16131
|
+
.includes(Number(organisation.companyId))) {
|
16132
|
+
return (React.createElement(Select.Option, { key: organisation.companyId, value: organisation.companyId }, organisation.name));
|
16133
|
+
}
|
16134
|
+
}
|
16135
|
+
else {
|
16136
|
+
return (React.createElement(Select.Option, { key: organisation.companyId, value: organisation.companyId }, organisation.name));
|
16137
|
+
}
|
16138
|
+
}))))),
|
16139
|
+
React.createElement(Col, { xl: 12, md: 24 },
|
16140
|
+
React.createElement("div", { className: "details-part-two" },
|
16141
|
+
React.createElement(Form.Item, { label: t("programme:amountInvested"), name: "amount", rules: [
|
16142
|
+
{
|
16143
|
+
required: true,
|
16144
|
+
message: "",
|
16145
|
+
},
|
16146
|
+
{
|
16147
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
16148
|
+
return __generator(this, function (_a) {
|
16149
|
+
if (String(value).trim() === "" ||
|
16150
|
+
String(value).trim() ===
|
16151
|
+
undefined ||
|
16152
|
+
value === null ||
|
16153
|
+
value === undefined) {
|
16154
|
+
throw new Error("".concat(t("programme:amountInvested"), " ").concat(t("isRequired")));
|
16155
|
+
}
|
16156
|
+
else if (!isNaN(value) &&
|
16157
|
+
Number(value) > 0) {
|
16158
|
+
return [2 /*return*/, Promise.resolve()];
|
16159
|
+
}
|
16160
|
+
else {
|
16161
|
+
throw new Error("".concat(t("programme:amountInvested"), " ").concat(t("isInvalid")));
|
16162
|
+
}
|
16163
|
+
});
|
16164
|
+
}); },
|
16165
|
+
},
|
16166
|
+
] },
|
16167
|
+
React.createElement(Input, { size: "large" }))))),
|
16168
|
+
React.createElement(Row, { className: "row", gutter: [16, 16] },
|
16169
|
+
React.createElement(Col, { xl: 24, md: 24 },
|
16170
|
+
React.createElement(Form.Item, { label: t("programme:instrument"), name: "instrument", wrapperCol: { span: 24 }, className: "" },
|
16171
|
+
React.createElement(Checkbox.Group, { options: instrumentOptions, defaultValue: instrumentOptions.map(function (e) { return e.value; }), onChange: onInstrumentChange })))),
|
16172
|
+
instrument &&
|
16173
|
+
instrument.indexOf(Instrument.LOAN) >= 0 && (React.createElement(Row, { className: "row", gutter: [16, 16] },
|
16174
|
+
React.createElement(Col, { xl: 8, md: 12 },
|
16175
|
+
React.createElement("div", { className: "details-part-two" },
|
16176
|
+
React.createElement(Form.Item, { label: t("programme:interestRate"), name: "interestRate", rules: [
|
16177
|
+
{
|
16178
|
+
required: true,
|
16179
|
+
message: "",
|
16180
|
+
},
|
16181
|
+
{
|
16182
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
16183
|
+
return __generator(this, function (_a) {
|
16184
|
+
if (String(value).trim() === "" ||
|
16185
|
+
String(value).trim() ===
|
16186
|
+
undefined ||
|
16187
|
+
value === null ||
|
16188
|
+
value === undefined) {
|
16189
|
+
throw new Error("".concat(t("programme:interestRate"), " ").concat(t("isRequired")));
|
16190
|
+
}
|
16191
|
+
else if (!isNaN(value)) {
|
16192
|
+
return [2 /*return*/, Promise.resolve()];
|
16193
|
+
}
|
16194
|
+
else {
|
16195
|
+
throw new Error("".concat(t("programme:interestRate"), " ").concat(t("isInvalid")));
|
16196
|
+
}
|
16197
|
+
});
|
16198
|
+
}); },
|
16199
|
+
},
|
16200
|
+
] },
|
16201
|
+
React.createElement(Input, { size: "large" })))))),
|
16202
|
+
instrument &&
|
16203
|
+
instrument.indexOf(Instrument.RESULT_BASED) >=
|
16204
|
+
0 && (React.createElement(Row, { className: "row", gutter: [16, 16] },
|
16205
|
+
React.createElement(Col, { xl: 12, md: 24 },
|
16206
|
+
React.createElement("div", { className: "details-part-two" },
|
16207
|
+
React.createElement(Form.Item, { label: t("programme:resultMetric"), name: "resultMetric", rules: [
|
16208
|
+
{
|
16209
|
+
required: true,
|
16210
|
+
message: "",
|
16211
|
+
},
|
16212
|
+
{
|
16213
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
16214
|
+
return __generator(this, function (_a) {
|
16215
|
+
if (String(value).trim() === "" ||
|
16216
|
+
String(value).trim() ===
|
16217
|
+
undefined ||
|
16218
|
+
value === null ||
|
16219
|
+
value === undefined) {
|
16220
|
+
throw new Error("".concat(t("programme:resultMetric"), " ").concat(t("isRequired")));
|
16221
|
+
}
|
16222
|
+
return [2 /*return*/];
|
16223
|
+
});
|
16224
|
+
}); },
|
16225
|
+
},
|
16226
|
+
] },
|
16227
|
+
React.createElement(Input, { size: "large" })))),
|
16228
|
+
React.createElement(Col, { xl: 12, md: 24 },
|
16229
|
+
React.createElement("div", { className: "details-part-two" },
|
16230
|
+
React.createElement(Form.Item, { label: t("programme:paymentPerMetric"), name: "paymentPerMetric", rules: [
|
16231
|
+
{
|
16232
|
+
required: true,
|
16233
|
+
message: "",
|
16234
|
+
},
|
16235
|
+
{
|
16236
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
16237
|
+
return __generator(this, function (_a) {
|
16238
|
+
if (String(value).trim() === "" ||
|
16239
|
+
String(value).trim() ===
|
16240
|
+
undefined ||
|
16241
|
+
value === null ||
|
16242
|
+
value === undefined) {
|
16243
|
+
throw new Error("".concat(t("programme:paymentPerMetric"), " ").concat(t("isRequired")));
|
16244
|
+
}
|
16245
|
+
else if (!isNaN(value)) {
|
16246
|
+
return [2 /*return*/, Promise.resolve()];
|
16247
|
+
}
|
16248
|
+
else {
|
16249
|
+
throw new Error("".concat(t("programme:paymentPerMetric"), " ").concat(t("isInvalid")));
|
16250
|
+
}
|
16251
|
+
});
|
16252
|
+
}); },
|
16253
|
+
},
|
16254
|
+
] },
|
16255
|
+
React.createElement(Input, { size: "large" })))))),
|
16256
|
+
instrument &&
|
16257
|
+
instrument.indexOf(Instrument.INKIND) >= 0 && (React.createElement(Row, { className: "row", gutter: [16, 16] },
|
16258
|
+
React.createElement(Col, { xl: 12, md: 24 },
|
16259
|
+
React.createElement("div", { className: "details-part-two" },
|
16260
|
+
React.createElement(Form.Item, { label: t("programme:description"), name: "description", rules: [
|
16261
|
+
{
|
16262
|
+
required: false,
|
16263
|
+
message: "",
|
16264
|
+
},
|
16265
|
+
] },
|
16266
|
+
React.createElement(Input, { size: "large" })))))),
|
16267
|
+
instrument &&
|
16268
|
+
instrument.indexOf(Instrument.OTHER) >= 0 && (React.createElement(Row, { className: "row", gutter: [16, 16] },
|
16269
|
+
React.createElement(Col, { xl: 12, md: 24 },
|
16270
|
+
React.createElement("div", { className: "details-part-two" },
|
16271
|
+
React.createElement(Form.Item, { label: t("programme:comments"), name: "comments", rules: [
|
16272
|
+
{
|
16273
|
+
required: true,
|
16274
|
+
message: "",
|
16275
|
+
},
|
16276
|
+
{
|
16277
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
16278
|
+
return __generator(this, function (_a) {
|
16279
|
+
if (String(value).trim() === "" ||
|
16280
|
+
String(value).trim() ===
|
16281
|
+
undefined ||
|
16282
|
+
value === null ||
|
16283
|
+
value === undefined) {
|
16284
|
+
throw new Error("".concat(t("programme:comments"), " ").concat(t("isRequired")));
|
16285
|
+
}
|
16286
|
+
return [2 /*return*/];
|
16287
|
+
});
|
16288
|
+
}); },
|
16289
|
+
},
|
16290
|
+
] },
|
16291
|
+
React.createElement(Input, { size: "large" })))))),
|
16292
|
+
React.createElement(Row, { className: "row", gutter: [4, 4] },
|
16293
|
+
React.createElement(Col, { xl: 8, md: 12 },
|
16294
|
+
React.createElement(Form.Item, { label: t("programme:type"), wrapperCol: { span: 13 }, className: "role-group", name: "type", rules: [
|
15665
16295
|
{
|
15666
|
-
|
15667
|
-
return __generator(this, function (_a) {
|
15668
|
-
if (String(value).trim() === "" ||
|
15669
|
-
String(value).trim() ===
|
15670
|
-
undefined ||
|
15671
|
-
value === null ||
|
15672
|
-
value === undefined) {
|
15673
|
-
throw new Error("".concat(t("programme:resultMetric"), " ").concat(t("isRequired")));
|
15674
|
-
}
|
15675
|
-
return [2 /*return*/];
|
15676
|
-
});
|
15677
|
-
}); },
|
16296
|
+
required: false,
|
15678
16297
|
},
|
15679
16298
|
] },
|
15680
|
-
React.createElement(
|
15681
|
-
|
15682
|
-
|
15683
|
-
|
15684
|
-
|
15685
|
-
|
15686
|
-
message: "",
|
15687
|
-
},
|
15688
|
-
{
|
15689
|
-
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
15690
|
-
return __generator(this, function (_a) {
|
15691
|
-
if (String(value).trim() === "" ||
|
15692
|
-
String(value).trim() ===
|
15693
|
-
undefined ||
|
15694
|
-
value === null ||
|
15695
|
-
value === undefined) {
|
15696
|
-
throw new Error("".concat(t("programme:paymentPerMetric"), " ").concat(t("isRequired")));
|
15697
|
-
}
|
15698
|
-
else if (!isNaN(value)) {
|
15699
|
-
return [2 /*return*/, Promise.resolve()];
|
15700
|
-
}
|
15701
|
-
else {
|
15702
|
-
throw new Error("".concat(t("programme:paymentPerMetric"), " ").concat(t("isInvalid")));
|
15703
|
-
}
|
15704
|
-
});
|
15705
|
-
}); },
|
15706
|
-
},
|
15707
|
-
] },
|
15708
|
-
React.createElement(Input, { size: "large" })))))),
|
15709
|
-
instrument &&
|
15710
|
-
instrument.indexOf(Instrument.INKIND) >= 0 && (React.createElement(Row, { className: "row", gutter: [16, 16] },
|
15711
|
-
React.createElement(Col, { xl: 12, md: 24 },
|
15712
|
-
React.createElement("div", { className: "details-part-two" },
|
15713
|
-
React.createElement(Form.Item, { label: t("programme:description"), name: "description", rules: [
|
16299
|
+
React.createElement(Radio.Group, { size: "large" }, Object.values(InvestmentType).map(function (k, index) { return (React.createElement("div", { className: "condition-radio-container" },
|
16300
|
+
React.createElement(Radio.Button, { className: "condition-radio", value: k, onClick: function (e) {
|
16301
|
+
return deselectOnClick(e, "type");
|
16302
|
+
} }, t("programme:" + k)))); })))),
|
16303
|
+
React.createElement(Col, { xl: 8, md: 12 },
|
16304
|
+
React.createElement(Form.Item, { label: t("programme:level"), wrapperCol: { span: 13 }, className: "role-group", name: "level", rules: [
|
15714
16305
|
{
|
15715
16306
|
required: false,
|
15716
|
-
message: "",
|
15717
16307
|
},
|
15718
16308
|
] },
|
15719
|
-
React.createElement(
|
15720
|
-
|
15721
|
-
|
15722
|
-
|
15723
|
-
React.createElement(
|
15724
|
-
React.createElement(Form.Item, { label: t("programme:
|
15725
|
-
{
|
15726
|
-
required: true,
|
15727
|
-
message: "",
|
15728
|
-
},
|
16309
|
+
React.createElement(Radio.Group, { size: "large" }, Object.values(InvestmentLevel).map(function (k, index) { return (React.createElement("div", { className: "condition-radio-container" },
|
16310
|
+
React.createElement(Radio.Button, { className: "condition-radio", value: k, onClick: function (e) {
|
16311
|
+
return deselectOnClick(e, "level");
|
16312
|
+
} }, t("programme:" + k)))); })))),
|
16313
|
+
React.createElement(Col, { xl: 8, md: 12 },
|
16314
|
+
React.createElement(Form.Item, { label: t("programme:stream"), wrapperCol: { span: 13 }, className: "role-group", name: "stream", rules: [
|
15729
16315
|
{
|
15730
|
-
|
15731
|
-
return __generator(this, function (_a) {
|
15732
|
-
if (String(value).trim() === "" ||
|
15733
|
-
String(value).trim() ===
|
15734
|
-
undefined ||
|
15735
|
-
value === null ||
|
15736
|
-
value === undefined) {
|
15737
|
-
throw new Error("".concat(t("programme:comments"), " ").concat(t("isRequired")));
|
15738
|
-
}
|
15739
|
-
return [2 /*return*/];
|
15740
|
-
});
|
15741
|
-
}); },
|
16316
|
+
required: false,
|
15742
16317
|
},
|
15743
16318
|
] },
|
15744
|
-
React.createElement(
|
15745
|
-
|
15746
|
-
|
15747
|
-
|
15748
|
-
|
15749
|
-
|
15750
|
-
|
15751
|
-
|
15752
|
-
|
15753
|
-
|
15754
|
-
|
15755
|
-
|
15756
|
-
|
15757
|
-
React.createElement(Form.Item, { label: t("programme:level"), wrapperCol: { span: 13 }, className: "role-group", name: "level", rules: [
|
15758
|
-
{
|
15759
|
-
required: false,
|
15760
|
-
},
|
15761
|
-
] },
|
15762
|
-
React.createElement(Radio.Group, { size: "large" }, Object.values(InvestmentLevel).map(function (k, index) { return (React.createElement("div", { className: "condition-radio-container" },
|
15763
|
-
React.createElement(Radio.Button, { className: "condition-radio", value: k, onClick: function (e) {
|
15764
|
-
return deselectOnClick(e, "level");
|
15765
|
-
} }, t("programme:" + k)))); })))),
|
15766
|
-
React.createElement(Col, { xl: 8, md: 12 },
|
15767
|
-
React.createElement(Form.Item, { label: t("programme:stream"), wrapperCol: { span: 13 }, className: "role-group", name: "stream", rules: [
|
15768
|
-
{
|
15769
|
-
required: false,
|
15770
|
-
},
|
15771
|
-
] },
|
15772
|
-
React.createElement(Radio.Group, { size: "large" }, Object.values(InvestmentStream).map(function (k, index) { return (React.createElement("div", { className: "condition-radio-container" },
|
15773
|
-
React.createElement(Radio.Button, { className: "condition-radio", value: k, onClick: function (e) {
|
15774
|
-
return deselectOnClick(e, "stream");
|
15775
|
-
} }, t("programme:" + k)))); }))))),
|
15776
|
-
React.createElement(Row, { className: "row", gutter: [16, 16] },
|
15777
|
-
React.createElement(Col, { xl: 12, md: 24 },
|
15778
|
-
React.createElement(Form.Item, { label: t("programme:esgType"), name: "esgClassification" },
|
15779
|
-
React.createElement(Select, { size: "large" }, Object.values(ESGType).map(function (esg) { return (React.createElement(Select.Option, { value: esg }, esg)); }))))),
|
15780
|
-
React.createElement(Form.Item, null,
|
15781
|
-
React.createElement("div", { className: "steps-actions" },
|
15782
|
-
React.createElement(Button, { type: "primary", htmlType: "submit", loading: loading, onSubmit: nextOne }, t("programme:next")))))))),
|
15783
|
-
},
|
15784
|
-
{
|
15785
|
-
title: (React.createElement("div", { className: "step-title-container" },
|
15786
|
-
React.createElement("div", { className: "step-count" }, "02"),
|
15787
|
-
React.createElement("div", { className: "title" }, t("programme:ownership")))),
|
15788
|
-
description: current === 1 && (React.createElement("div", null,
|
15789
|
-
React.createElement("div", { className: "programme-sought-form-container ownership-container" }, Object.keys(data).length > 0 &&
|
15790
|
-
React.createElement("div", { className: "programme-sought-form" },
|
15791
|
-
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 :
|
15792
|
-
data.companyId.map(function (companyId, index) {
|
15793
|
-
return (React.createElement(Row, { className: "row", gutter: [16, 16] },
|
15794
|
-
React.createElement(Col, { xl: 8, md: 15 },
|
15795
|
-
React.createElement("div", { className: "label" },
|
15796
|
-
companyName[companyId].name,
|
15797
|
-
React.createElement("span", { className: "required-mark" }, "*"))),
|
15798
|
-
React.createElement(Col, { xl: 8, md: 9 },
|
15799
|
-
React.createElement(Form.Item, { className: "inline", name: ["percentage", index], initialValue: 0, rules: [
|
16319
|
+
React.createElement(Radio.Group, { size: "large" }, Object.values(InvestmentStream).map(function (k, index) { return (React.createElement("div", { className: "condition-radio-container" },
|
16320
|
+
React.createElement(Radio.Button, { className: "condition-radio", value: k, onClick: function (e) {
|
16321
|
+
return deselectOnClick(e, "stream");
|
16322
|
+
} }, t("programme:" + k)))); }))))),
|
16323
|
+
React.createElement(Row, { className: "row", gutter: [16, 16] },
|
16324
|
+
React.createElement(Col, { xl: 12, md: 24 },
|
16325
|
+
React.createElement(Form.Item, { label: t("programme:esgType"), name: "esgClassification" },
|
16326
|
+
React.createElement(Select, { size: "large" }, Object.values(ESGType).map(function (esg) { return (React.createElement(Select.Option, { value: esg }, esg)); }))))))),
|
16327
|
+
typeCreation == InvestmentCreationType.EXISTING && (React.createElement("div", null,
|
16328
|
+
React.createElement(Row, { className: "row", gutter: [16, 16] },
|
16329
|
+
React.createElement(Col, { xl: 12, md: 24 },
|
16330
|
+
React.createElement("div", { className: "details-part-one" },
|
16331
|
+
React.createElement(Form.Item, { label: t("programme:existingInvestmentSource"), name: "existinngInvestmentId", wrapperCol: { span: 24 }, rules: [
|
15800
16332
|
{
|
15801
|
-
|
15802
|
-
message: "
|
16333
|
+
required: true,
|
16334
|
+
message: "".concat(t("programme:existingInvestmentSource"), " ").concat(t("isRequired")),
|
15803
16335
|
},
|
16336
|
+
] },
|
16337
|
+
React.createElement(Select, { size: "large", loading: loadingInvestment, onChange: setSelectedInvestment }, nationalInvestmentList.map(function (investment) { return (React.createElement(Select.Option, { key: investment.requestId, value: investment.requestId }, investment.investmentName)); })))))),
|
16338
|
+
React.createElement(Row, { className: "row", gutter: [16, 16] },
|
16339
|
+
React.createElement(Col, { xl: 12, md: 24 },
|
16340
|
+
React.createElement("div", { className: "details-part-two" },
|
16341
|
+
React.createElement(Form.Item, { label: t("programme:amountInvested"), name: "amount", rules: [
|
15804
16342
|
{
|
15805
16343
|
required: true,
|
15806
|
-
message: "
|
16344
|
+
message: "",
|
16345
|
+
},
|
16346
|
+
{
|
16347
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
16348
|
+
return __generator(this, function (_a) {
|
16349
|
+
if (String(value).trim() === "" ||
|
16350
|
+
String(value).trim() ===
|
16351
|
+
undefined ||
|
16352
|
+
value === null ||
|
16353
|
+
value === undefined) {
|
16354
|
+
throw new Error("".concat(t("programme:amountInvested"), " ").concat(t("isRequired")));
|
16355
|
+
}
|
16356
|
+
else if (!isNaN(value) &&
|
16357
|
+
Number(value) > 0) {
|
16358
|
+
return [2 /*return*/, Promise.resolve()];
|
16359
|
+
}
|
16360
|
+
else {
|
16361
|
+
throw new Error("".concat(t("programme:amountInvested"), " ").concat(t("isInvalid")));
|
16362
|
+
}
|
16363
|
+
});
|
16364
|
+
}); },
|
15807
16365
|
},
|
15808
16366
|
function (_a) {
|
15809
16367
|
var getFieldValue = _a.getFieldValue;
|
15810
16368
|
return ({
|
15811
16369
|
validator: function (rule, v) {
|
15812
|
-
if (getFieldValue(
|
15813
|
-
|
15814
|
-
|
15815
|
-
|
15816
|
-
parseFloat(getFieldValue([
|
15817
|
-
"percentage",
|
15818
|
-
index,
|
15819
|
-
])) > data.proponentPercentage[index]) {
|
16370
|
+
if (getFieldValue("amount") &&
|
16371
|
+
investmentData &&
|
16372
|
+
investmentData.amount <
|
16373
|
+
parseFloat(getFieldValue("amount"))) {
|
15820
16374
|
// eslint-disable-next-line prefer-promise-reject-errors
|
15821
16375
|
return Promise.reject("Amount > Available");
|
15822
16376
|
}
|
@@ -15825,30 +16379,178 @@ var InvestmentCreationComponent = function (props) {
|
|
15825
16379
|
});
|
15826
16380
|
},
|
15827
16381
|
] },
|
15828
|
-
React.createElement(
|
15829
|
-
|
15830
|
-
|
16382
|
+
React.createElement(Input, { size: "large" })))),
|
16383
|
+
React.createElement(Col, { xl: 12, md: 24 },
|
16384
|
+
React.createElement("div", { className: "details-part-two" },
|
16385
|
+
React.createElement(Form.Item, { label: " ", name: "sourceAmount" },
|
16386
|
+
React.createElement("div", null,
|
16387
|
+
"/",
|
16388
|
+
React.createElement(InputNumber, { size: "large", width: "100%", formatter: function (value) {
|
16389
|
+
return "$".concat(addCommSep(value));
|
16390
|
+
}, disabled: true, value: investmentData
|
16391
|
+
? investmentData.amount
|
16392
|
+
: 0 })))))))),
|
16393
|
+
React.createElement(Form.Item, null,
|
16394
|
+
React.createElement("div", { className: "steps-actions" },
|
16395
|
+
React.createElement(Button, { type: "primary", htmlType: "submit", loading: loading, onSubmit: nextOne }, t("programme:next")))))))),
|
16396
|
+
},
|
16397
|
+
{
|
16398
|
+
title: (React.createElement("div", { className: "step-title-container" },
|
16399
|
+
React.createElement("div", { className: "step-count" }, "02"),
|
16400
|
+
React.createElement("div", { className: "title" }, t("programme:ownership")))),
|
16401
|
+
description: current === 1 && (React.createElement("div", null,
|
16402
|
+
React.createElement("div", { className: "investment-sought-form-container" },
|
16403
|
+
React.createElement("div", { className: "investment-sought-form" },
|
16404
|
+
React.createElement(Form, { labelCol: { span: 20 }, wrapperCol: { span: 24 }, name: "investment-sought", className: "investment-sought-form", layout: "vertical", requiredMark: true },
|
16405
|
+
React.createElement(Row, { className: "row", gutter: [4, 4] },
|
16406
|
+
React.createElement(Col, { xl: 8, md: 12 },
|
16407
|
+
React.createElement(Form.Item, { label: t("programme:typeCreation"), wrapperCol: { span: 13 }, className: "role-group", name: "investmentOwnershipType", rules: [
|
16408
|
+
{
|
16409
|
+
required: false,
|
16410
|
+
},
|
16411
|
+
] },
|
16412
|
+
React.createElement(Radio.Group, { size: "large", defaultValue: typeCreation ==
|
16413
|
+
InvestmentCreationType.EXISTING
|
16414
|
+
? InvestmentOwnershipType.PROJECT
|
16415
|
+
: investmentOwnershipType }, Object.values(InvestmentOwnershipType).map(function (k, index) {
|
16416
|
+
if (!(typeCreation ==
|
16417
|
+
InvestmentCreationType.EXISTING &&
|
16418
|
+
k == InvestmentOwnershipType.NATIONAL) &&
|
16419
|
+
!(k ==
|
16420
|
+
InvestmentOwnershipType.NATIONAL &&
|
16421
|
+
(data === null || data === void 0 ? void 0 : data.programmeId))) {
|
16422
|
+
return (React.createElement("div", { className: "condition-radio-container" },
|
16423
|
+
React.createElement(Tooltip, { title: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ==
|
16424
|
+
CompanyRole.PROGRAMME_DEVELOPER &&
|
16425
|
+
stepOneData.toCompanyId !=
|
16426
|
+
userInfoState.companyId &&
|
16427
|
+
k ==
|
16428
|
+
InvestmentOwnershipType.NATIONAL
|
16429
|
+
? "This action is unauthorized due to the selected investor name."
|
16430
|
+
: "", color: TooltipColor, key: TooltipColor },
|
16431
|
+
React.createElement(Radio.Button, { className: "condition-radio", value: k, onChange: onChangeInvestmentOwnershipType, disabled: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ==
|
16432
|
+
CompanyRole.PROGRAMME_DEVELOPER &&
|
16433
|
+
stepOneData.toCompanyId !=
|
16434
|
+
userInfoState.companyId &&
|
16435
|
+
k ==
|
16436
|
+
InvestmentOwnershipType.NATIONAL }, t("programme:" + k)))));
|
16437
|
+
}
|
16438
|
+
})))))))),
|
16439
|
+
React.createElement("div", { className: "programme-sought-form-container ownership-container" },
|
16440
|
+
React.createElement("div", { className: "programme-sought-form" },
|
16441
|
+
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 },
|
16442
|
+
allProjectData.length > 0 &&
|
16443
|
+
investmentOwnershipType ==
|
16444
|
+
InvestmentOwnershipType.PROJECT && (React.createElement("div", null,
|
16445
|
+
React.createElement(Row, { className: "row", gutter: [16, 16] },
|
16446
|
+
React.createElement(Col, { xl: 12, md: 24 },
|
16447
|
+
React.createElement("div", { className: "details-part-one" },
|
16448
|
+
React.createElement(Form.Item, { label: t("programme:title"), name: "projectId", wrapperCol: { span: 24 }, initialValue: (data === null || data === void 0 ? void 0 : data.programmeId) != undefined
|
16449
|
+
? allProjectData[0].programmeId
|
16450
|
+
: null, rules: [
|
16451
|
+
{
|
16452
|
+
required: true,
|
16453
|
+
message: "".concat(t("programme:title"), " ").concat(t("isRequired")),
|
16454
|
+
},
|
16455
|
+
] },
|
16456
|
+
React.createElement(Select, { size: "large", loading: loadingProgData,
|
16457
|
+
// defaultValue={
|
16458
|
+
// allProjectData.length == 1
|
16459
|
+
// ? allProjectData[0].programmeId
|
16460
|
+
// : null
|
16461
|
+
// }
|
16462
|
+
disabled: allProjectData.length == 1 &&
|
16463
|
+
(data === null || data === void 0 ? void 0 : data.programmeId) != undefined, onChange: setSelectedProgramme }, allProjectData.map(function (project) {
|
16464
|
+
if ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ==
|
16465
|
+
CompanyRole.PROGRAMME_DEVELOPER &&
|
16466
|
+
Number(stepOneData.toCompanyId) !=
|
16467
|
+
userInfoState.companyId) {
|
16468
|
+
if (project.companyId
|
16469
|
+
.map(function (id) { return Number(id); })
|
16470
|
+
.includes(userInfoState.companyId)) {
|
16471
|
+
return (React.createElement(Select.Option, { key: project.programmeId, value: project.programmeId }, project.title));
|
16472
|
+
}
|
16473
|
+
}
|
16474
|
+
else if ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
|
16475
|
+
CompanyRole.MINISTRY) {
|
16476
|
+
if (ministrySectoralScope.includes(project.sectoralScope)) {
|
16477
|
+
return (React.createElement(Select.Option, { key: project.programmeId, value: project.programmeId }, project.title));
|
16478
|
+
}
|
16479
|
+
}
|
16480
|
+
else {
|
16481
|
+
return (React.createElement(Select.Option, { key: project.programmeId, value: project.programmeId }, project.title));
|
16482
|
+
}
|
16483
|
+
})))))), projectData === null || projectData === void 0 ? void 0 :
|
16484
|
+
projectData.companyId.map(function (companyId, index) {
|
16485
|
+
if (formTwo.getFieldValue("percentage") &&
|
16486
|
+
formTwo.getFieldValue("percentage")[index] &&
|
16487
|
+
companyId == stepOneData.toCompanyId) {
|
16488
|
+
formTwo.getFieldValue("percentage")[index] = 0;
|
16489
|
+
}
|
16490
|
+
return (React.createElement(Row, { className: "row", gutter: [16, 16] },
|
16491
|
+
React.createElement(Col, { xl: 8, md: 15 },
|
16492
|
+
React.createElement("div", { className: "label" },
|
16493
|
+
companyNames[Number(companyId)],
|
16494
|
+
React.createElement("span", { className: "required-mark" }, "*"))),
|
16495
|
+
React.createElement(Col, { xl: 8, md: 9 },
|
16496
|
+
React.createElement(Form.Item, { className: "inline", name: ["percentage", index], initialValue: 0, rules: [
|
16497
|
+
{
|
16498
|
+
pattern: new RegExp(/^[+]?([.]\d+|\d+[.]?\d*)$/g),
|
16499
|
+
message: "Percentage Should be a positive number",
|
16500
|
+
},
|
16501
|
+
{
|
16502
|
+
required: true,
|
16503
|
+
message: "Required field",
|
16504
|
+
},
|
16505
|
+
function (_a) {
|
16506
|
+
var getFieldValue = _a.getFieldValue;
|
16507
|
+
return ({
|
16508
|
+
validator: function (rule, v) {
|
16509
|
+
if (getFieldValue([
|
16510
|
+
"percentage",
|
16511
|
+
index,
|
16512
|
+
]) &&
|
16513
|
+
parseFloat(getFieldValue([
|
16514
|
+
"percentage",
|
16515
|
+
index,
|
16516
|
+
])) >
|
16517
|
+
projectData
|
16518
|
+
.proponentPercentage[index]) {
|
16519
|
+
// eslint-disable-next-line prefer-promise-reject-errors
|
16520
|
+
return Promise.reject("Amount > Available");
|
16521
|
+
}
|
16522
|
+
return Promise.resolve();
|
16523
|
+
},
|
16524
|
+
});
|
16525
|
+
},
|
16526
|
+
] },
|
16527
|
+
React.createElement(InputNumber, { placeholder: "", controls: false, disabled: govData.companyId ==
|
16528
|
+
companyId ||
|
16529
|
+
companyId ==
|
16530
|
+
stepOneData.toCompanyId, value: 0,
|
16531
|
+
// disabled={userInfoState?.companyId === Number(companyId)}
|
16532
|
+
onKeyPress: function (event) {
|
16533
|
+
if (!/[0-9\.]/.test(event.key)) {
|
16534
|
+
event.preventDefault();
|
16535
|
+
}
|
16536
|
+
} })),
|
16537
|
+
React.createElement("div", { className: "inline separator" }, "/"),
|
16538
|
+
React.createElement(Form.Item, { className: "inline" },
|
16539
|
+
React.createElement(InputNumber, { placeholder: String(projectData === null || projectData === void 0 ? void 0 : projectData.proponentPercentage[index]), disabled: true })))));
|
16540
|
+
}),
|
16541
|
+
React.createElement(Row, { className: "row", gutter: [16, 16] },
|
16542
|
+
React.createElement(Col, { xl: 8, md: 15 },
|
16543
|
+
React.createElement("div", { className: "label" }, t("programme:total"))),
|
16544
|
+
React.createElement(Col, { xl: 8, md: 9 },
|
16545
|
+
React.createElement(Form.Item, { className: "inline", name: ["total"] },
|
16546
|
+
React.createElement(InputNumber, { placeholder: currentPercTotal + "", controls: false, disabled: true, onKeyPress: function (event) {
|
15831
16547
|
if (!/[0-9\.]/.test(event.key)) {
|
15832
16548
|
event.preventDefault();
|
15833
16549
|
}
|
15834
16550
|
} })),
|
15835
16551
|
React.createElement("div", { className: "inline separator" }, "/"),
|
15836
16552
|
React.createElement(Form.Item, { className: "inline" },
|
15837
|
-
React.createElement(InputNumber, {
|
15838
|
-
}),
|
15839
|
-
React.createElement(Row, { className: "row", gutter: [16, 16] },
|
15840
|
-
React.createElement(Col, { xl: 8, md: 15 },
|
15841
|
-
React.createElement("div", { className: "label" }, t("programme:total"))),
|
15842
|
-
React.createElement(Col, { xl: 8, md: 9 },
|
15843
|
-
React.createElement(Form.Item, { className: "inline", name: ["total"] },
|
15844
|
-
React.createElement(InputNumber, { placeholder: currentPercTotal + "", controls: false, disabled: true, onKeyPress: function (event) {
|
15845
|
-
if (!/[0-9\.]/.test(event.key)) {
|
15846
|
-
event.preventDefault();
|
15847
|
-
}
|
15848
|
-
} })),
|
15849
|
-
React.createElement("div", { className: "inline separator" }, "/"),
|
15850
|
-
React.createElement(Form.Item, { className: "inline" },
|
15851
|
-
React.createElement(InputNumber, { disabled: true, placeholder: "100" })))),
|
16553
|
+
React.createElement(InputNumber, { disabled: true, placeholder: "100" })))))),
|
15852
16554
|
React.createElement(Form.Item, null,
|
15853
16555
|
React.createElement("div", { className: "steps-actions" },
|
15854
16556
|
React.createElement(Button, { type: "primary", htmlType: "submit", loading: loading, onSubmit: submitInvestment }, t("programme:submit")),
|
@@ -15963,7 +16665,7 @@ var InvestmentActionModel = function (props) {
|
|
15963
16665
|
};
|
15964
16666
|
|
15965
16667
|
var InvestmentManagementComponent = function (props) {
|
15966
|
-
var translator = props.translator,
|
16668
|
+
var translator = props.translator, onNavigateToProgrammeView = props.onNavigateToProgrammeView, onClickAddOwnership = props.onClickAddOwnership, enableAddOwnership = props.enableAddOwnership;
|
15967
16669
|
var t = translator.t;
|
15968
16670
|
var statusOptions = Object.keys(InvestmentStatus).map(function (k, index) { return ({
|
15969
16671
|
label: addSpaces(Object.values(InvestmentStatus)[index]),
|
@@ -16301,7 +17003,10 @@ var InvestmentManagementComponent = function (props) {
|
|
16301
17003
|
sorter: true,
|
16302
17004
|
align: "left",
|
16303
17005
|
render: function (item) {
|
16304
|
-
|
17006
|
+
if (item) {
|
17007
|
+
return React.createElement("span", { className: "clickable" }, item);
|
17008
|
+
}
|
17009
|
+
return React.createElement("span", null, "-");
|
16305
17010
|
},
|
16306
17011
|
onCell: function (record, rowIndex) {
|
16307
17012
|
return {
|
@@ -16359,6 +17064,12 @@ var InvestmentManagementComponent = function (props) {
|
|
16359
17064
|
key: "programmeSector",
|
16360
17065
|
sorter: true,
|
16361
17066
|
align: "left",
|
17067
|
+
render: function (item) {
|
17068
|
+
if (item) {
|
17069
|
+
return React.createElement("span", null, item);
|
17070
|
+
}
|
17071
|
+
return React.createElement("span", null, "-");
|
17072
|
+
},
|
16362
17073
|
},
|
16363
17074
|
{
|
16364
17075
|
title: t("programme:investor"),
|
@@ -16442,7 +17153,11 @@ var InvestmentManagementComponent = function (props) {
|
|
16442
17153
|
React.createElement("div", { className: "title-bar" },
|
16443
17154
|
React.createElement("div", { className: "body-title" }, t("programme:investmentTitle")),
|
16444
17155
|
React.createElement("div", { className: "body-sub-title" }, t("programme:investmentDesc"))),
|
16445
|
-
React.createElement("div", { className: "actions" }, enableAddOwnership &&
|
17156
|
+
React.createElement("div", { className: "actions" }, enableAddOwnership &&
|
17157
|
+
((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) == CompanyRole.MINISTRY ||
|
17158
|
+
(userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) == CompanyRole.GOVERNMENT ||
|
17159
|
+
(userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) == CompanyRole.PROGRAMME_DEVELOPER) &&
|
17160
|
+
userInfoState.userRole != Role.ViewOnly && (React.createElement("div", { className: "action-bar" },
|
16446
17161
|
React.createElement(Button, { type: "primary", size: "large", block: true, icon: React.createElement(PlusOutlined, null), onClick: onClickAddOwnership }, t("programme:addOwnership")))))),
|
16447
17162
|
React.createElement("div", { className: "content-card" },
|
16448
17163
|
React.createElement(Row, null,
|
@@ -16483,7 +17198,7 @@ var InvestmentManagementComponent = function (props) {
|
|
16483
17198
|
return handleTableChange(val, sorter);
|
16484
17199
|
}, locale: {
|
16485
17200
|
emptyText: (React.createElement(Empty, { image: Empty.PRESENTED_IMAGE_SIMPLE, description: tableData.length === 0
|
16486
|
-
? t("
|
17201
|
+
? t("programme:noInvestmentData")
|
16487
17202
|
: null })),
|
16488
17203
|
} }))))),
|
16489
17204
|
popupInfo && selectedReq && (React.createElement(InvestmentActionModel, { investment: selectedReq, onCancel: function () {
|
@@ -16496,7 +17211,7 @@ var css_248z$i = ".steps-actions {\n display: flex;\n flex-direction: row-reve
|
|
16496
17211
|
styleInject(css_248z$i);
|
16497
17212
|
|
16498
17213
|
var SupportCreationComponent = function (props) {
|
16499
|
-
var t = props.t,
|
17214
|
+
var t = props.t, useLocation = props.useLocation; props.onNavigateToProgrammeManagementView; props.onNavigateToProgrammeView;
|
16500
17215
|
useLocation().state;
|
16501
17216
|
var _a = useState(); _a[0]; _a[1];
|
16502
17217
|
var formOne = Form.useForm()[0];
|
@@ -16509,6 +17224,7 @@ var SupportCreationComponent = function (props) {
|
|
16509
17224
|
var _f = useState([]), organisationsList = _f[0], setOrganisationList = _f[1];
|
16510
17225
|
var _g = useState([]), instrument = _g[0], setInstrument = _g[1];
|
16511
17226
|
var _h = useState(); _h[0]; var setStepOneData = _h[1];
|
17227
|
+
var userInfoState = useUserContext().userInfoState;
|
16512
17228
|
var instrumentOptions = Object.keys(Instrument).map(function (k, index) { return ({
|
16513
17229
|
label: addSpaces(Object.values(Instrument)[index]),
|
16514
17230
|
value: Object.values(Instrument)[index],
|
@@ -16851,7 +17567,7 @@ var SupportCreationComponent = function (props) {
|
|
16851
17567
|
};
|
16852
17568
|
|
16853
17569
|
var SupportManagementComponent = function (props) {
|
16854
|
-
var translator = props.translator
|
17570
|
+
var translator = props.translator; props.onNavigateToProgrammeView; var enableAddSupport = props.enableAddSupport, onClickAddSupport = props.onClickAddSupport;
|
16855
17571
|
var t = translator.t;
|
16856
17572
|
var statusOptions = Object.keys(InvestmentStatus).map(function (k, index) { return ({
|
16857
17573
|
label: addSpaces(Object.values(InvestmentStatus)[index]),
|
@@ -17353,7 +18069,7 @@ var css_248z$h = ".ndc-management .ant-checkbox-checked .ant-checkbox-input[valu
|
|
17353
18069
|
styleInject(css_248z$h);
|
17354
18070
|
|
17355
18071
|
var NdcActionManagementComponent = function (props) {
|
17356
|
-
var t = props.t,
|
18072
|
+
var t = props.t, onNavigateToNdcManagementView = props.onNavigateToNdcManagementView, onNavigateToProgrammeManagementView = props.onNavigateToProgrammeManagementView;
|
17357
18073
|
var _a = useState(true), checkAll = _a[0], setCheckAll = _a[1];
|
17358
18074
|
var _b = useState([]), tableData = _b[0], setTableData = _b[1];
|
17359
18075
|
var _c = useState(), totalProgramme = _c[0], setTotalProgramme = _c[1];
|
@@ -18712,7 +19428,7 @@ var GenderParity = function (props) {
|
|
18712
19428
|
};
|
18713
19429
|
|
18714
19430
|
var Assessment = function (props) {
|
18715
|
-
var onFormSubmit = props.onFormSubmit, assessmentViewData = props.assessmentViewData, viewOnly = props.viewOnly,
|
19431
|
+
var onFormSubmit = props.onFormSubmit, assessmentViewData = props.assessmentViewData, viewOnly = props.viewOnly, translator = props.translator;
|
18716
19432
|
translator.setDefaultNamespace("coBenifits");
|
18717
19433
|
var t = translator.t;
|
18718
19434
|
var form1 = Form.useForm()[0];
|
@@ -21117,7 +21833,7 @@ var SocialEnvironmentalRisk = function (props) {
|
|
21117
21833
|
};
|
21118
21834
|
|
21119
21835
|
var CoBenifitsComponent = function (props) {
|
21120
|
-
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
|
21836
|
+
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;
|
21121
21837
|
var _b = useState(), coBenefitDetails = _b[0], setCoBenefitDetails = _b[1];
|
21122
21838
|
var _c = useState(true), isSocialFormValid = _c[0], setIsSocialFormValid = _c[1];
|
21123
21839
|
var _d = useState(true), isAssessmentFormValid = _d[0], setIsAssessmentFormValid = _d[1];
|
@@ -21191,7 +21907,7 @@ var CoBenifitsComponent = function (props) {
|
|
21191
21907
|
label: t("coBenifits:assessment"),
|
21192
21908
|
key: "7",
|
21193
21909
|
children: (React.createElement(Assessment, { onFormSubmit: onAssessmentFormSubmit, assessmentViewData: (viewOnly && (coBenifitsViewDetails === null || coBenifitsViewDetails === void 0 ? void 0 : coBenifitsViewDetails.assessmentDetails)) ||
|
21194
|
-
(!viewOnly && (coBenefitsDetails === null || coBenefitsDetails === void 0 ? void 0 : coBenefitsDetails.assessmentDetails)), viewOnly: viewOnly || false,
|
21910
|
+
(!viewOnly && (coBenefitsDetails === null || coBenefitsDetails === void 0 ? void 0 : coBenefitsDetails.assessmentDetails)), viewOnly: viewOnly || false, translator: translator })),
|
21195
21911
|
},
|
21196
21912
|
{
|
21197
21913
|
label: t("coBenifits:socialEnvironmentalRisk"),
|
@@ -21360,7 +22076,7 @@ var CoBenifitsComponent = function (props) {
|
|
21360
22076
|
};
|
21361
22077
|
|
21362
22078
|
var AddNdcActionComponent = function (props) {
|
21363
|
-
var
|
22079
|
+
var useLocation = props.useLocation, onNavigateToProgrammeManagementView = props.onNavigateToProgrammeManagementView, onNavigateToProgrammeView = props.onNavigateToProgrammeView, sdgGoalImages = props.sdgGoalImages, translator = props.translator;
|
21364
22080
|
translator.setDefaultNamespace("ndcAction");
|
21365
22081
|
var t = translator.t;
|
21366
22082
|
var _a = useState(1), current = _a[0], setCurrent = _a[1];
|
@@ -21502,7 +22218,7 @@ var AddNdcActionComponent = function (props) {
|
|
21502
22218
|
description: (React.createElement("div", { className: current !== 2 ? "hide" : "" },
|
21503
22219
|
React.createElement(CoBenifitsComponent, { onClickedBackBtn: onClickBackCoBenefits, coBenefitsDetails: ndcActionDetails ? ndcActionDetails.coBenefitsProperties : {}, onFormSubmit: onCoBenefitsSubmit, submitButtonText: isProjectReportsVisible()
|
21504
22220
|
? t("ndcAction:next")
|
21505
|
-
: t("ndcAction:submit"), loading: loading, sdgGoalImages: sdgGoalImages,
|
22221
|
+
: t("ndcAction:submit"), loading: loading, sdgGoalImages: sdgGoalImages, translator: translator }))),
|
21506
22222
|
},
|
21507
22223
|
];
|
21508
22224
|
if (isProjectReportsVisible()) {
|
@@ -21639,7 +22355,7 @@ var uploadDocUserPermission = function (userInfoState, docType, programmeOwnerId
|
|
21639
22355
|
var NdcActionViewComponent = function (props) {
|
21640
22356
|
var _a;
|
21641
22357
|
var _b, _c;
|
21642
|
-
var
|
22358
|
+
var useLocation = props.useLocation, onNavigateToNdcManagementView = props.onNavigateToNdcManagementView, translator = props.translator, sdgGoalImages = props.sdgGoalImages, Chart = props.Chart;
|
21643
22359
|
translator.setDefaultNamespace("ndcAction");
|
21644
22360
|
var t = translator.t;
|
21645
22361
|
var userInfoState = useUserContext().userInfoState;
|
@@ -22132,7 +22848,7 @@ var NdcActionViewComponent = function (props) {
|
|
22132
22848
|
React.createElement(Card, { className: "card-container" },
|
22133
22849
|
React.createElement("div", { className: "co-benifits-view" },
|
22134
22850
|
React.createElement("div", { className: "title" }, t("ndcAction:coBenefitsSubTitle")),
|
22135
|
-
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,
|
22851
|
+
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 })))))))));
|
22136
22852
|
};
|
22137
22853
|
|
22138
22854
|
var css_248z$b = ".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";
|
@@ -22285,7 +23001,7 @@ var TransferActionModel = function (props) {
|
|
22285
23001
|
};
|
22286
23002
|
|
22287
23003
|
var CreditTransferComponent = function (props) {
|
22288
|
-
var
|
23004
|
+
var translator = props.translator, onNavigateToProgrammeView = props.onNavigateToProgrammeView;
|
22289
23005
|
var userInfoState = useUserContext().userInfoState;
|
22290
23006
|
var t = translator.t;
|
22291
23007
|
var statusOptions = Object.keys(CreditTransferStage).map(function (k, index) { return ({
|
@@ -23220,8 +23936,8 @@ var MapStatsComponent = function (props) {
|
|
23220
23936
|
|
23221
23937
|
var RangePicker$1 = DatePicker.RangePicker;
|
23222
23938
|
var MrvDashboardComponent = function (props) {
|
23223
|
-
var
|
23224
|
-
var _b = useConnection(); _b.get; var post = _b.post; _b.delete;
|
23939
|
+
var Link = props.Link, Chart = props.Chart, t = props.t, ButtonGroup = props.ButtonGroup, _a = props.isMultipleDashboardsVisible, isMultipleDashboardsVisible = _a === void 0 ? false : _a;
|
23940
|
+
var _b = useConnection(); _b.get; var post = _b.post; _b.delete; var statServerUrl = _b.statServerUrl;
|
23225
23941
|
var _c = useState({}), data = _c[0], setData = _c[1];
|
23226
23942
|
var _e = useState(false), loading = _e[0], setLoading = _e[1];
|
23227
23943
|
var userInfoState = useUserContext().userInfoState;
|
@@ -23704,7 +24420,7 @@ var MrvDashboardComponent = function (props) {
|
|
23704
24420
|
_e.label = 1;
|
23705
24421
|
case 1:
|
23706
24422
|
_e.trys.push([1, 3, 4, 5]);
|
23707
|
-
return [4 /*yield*/, post("stats/programme/agg", genPayload(), undefined,
|
24423
|
+
return [4 /*yield*/, post("stats/programme/agg", genPayload(), undefined, statServerUrl)];
|
23708
24424
|
case 2:
|
23709
24425
|
response = _e.sent();
|
23710
24426
|
console.log("Response", response);
|
@@ -24953,8 +25669,8 @@ var RegistryBarChartsStatComponent = function (props) {
|
|
24953
25669
|
|
24954
25670
|
var RangePicker = DatePicker.RangePicker;
|
24955
25671
|
var RegistryDashboardComponent = function (props) {
|
24956
|
-
var
|
24957
|
-
var _b = useConnection(); _b.get; var post = _b.post; _b.delete;
|
25672
|
+
var Chart = props.Chart, t = props.t, ButtonGroup = props.ButtonGroup, Link = props.Link, _a = props.isMultipleDashboardsVisible, isMultipleDashboardsVisible = _a === void 0 ? false : _a;
|
25673
|
+
var _b = useConnection(); _b.get; var post = _b.post; _b.delete; var statServerUrl = _b.statServerUrl;
|
24958
25674
|
var userInfoState = useUserContext().userInfoState;
|
24959
25675
|
var _c = useState(false), loadingWithoutTimeRange = _c[0], setLoadingWithoutTimeRange = _c[1];
|
24960
25676
|
var _e = useState(false), loading = _e[0], setLoading = _e[1];
|
@@ -25401,7 +26117,7 @@ var RegistryDashboardComponent = function (props) {
|
|
25401
26117
|
_253.label = 1;
|
25402
26118
|
case 1:
|
25403
26119
|
_253.trys.push([1, 3, 4, 5]);
|
25404
|
-
return [4 /*yield*/, post("stats/programme/agg", getAllChartsParams(), undefined,
|
26120
|
+
return [4 /*yield*/, post("stats/programme/agg", getAllChartsParams(), undefined, statServerUrl)];
|
25405
26121
|
case 2:
|
25406
26122
|
response = _253.sent();
|
25407
26123
|
totalCreditsCertifiedStats = void 0;
|
@@ -25678,7 +26394,7 @@ var RegistryDashboardComponent = function (props) {
|
|
25678
26394
|
_77.label = 1;
|
25679
26395
|
case 1:
|
25680
26396
|
_77.trys.push([1, 3, 4, 5]);
|
25681
|
-
return [4 /*yield*/, post("stats/programme/agg", getAllProgrammeAnalyticsStatsParamsWithoutTimeRange(), undefined,
|
26397
|
+
return [4 /*yield*/, post("stats/programme/agg", getAllProgrammeAnalyticsStatsParamsWithoutTimeRange(), undefined, statServerUrl)];
|
25682
26398
|
case 2:
|
25683
26399
|
response = _77.sent();
|
25684
26400
|
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;
|
@@ -25771,7 +26487,7 @@ var RegistryDashboardComponent = function (props) {
|
|
25771
26487
|
_188.label = 1;
|
25772
26488
|
case 1:
|
25773
26489
|
_188.trys.push([1, 3, 4, 5]);
|
25774
|
-
return [4 /*yield*/, post("stats/programme/agg", getAllProgrammeAnalyticsStatsParams(), undefined,
|
26490
|
+
return [4 /*yield*/, post("stats/programme/agg", getAllProgrammeAnalyticsStatsParams(), undefined, statServerUrl)];
|
25775
26491
|
case 2:
|
25776
26492
|
response = _188.sent();
|
25777
26493
|
programmeByStatusAuthAggregationResponse = void 0;
|
@@ -26720,7 +27436,7 @@ var NdcActionType;
|
|
26720
27436
|
NdcActionType[NdcActionType["sub"] = 1] = "sub";
|
26721
27437
|
})(NdcActionType || (NdcActionType = {}));
|
26722
27438
|
var NdcDetailsComponent = function (props) {
|
26723
|
-
var t = props.t;
|
27439
|
+
var t = props.t;
|
26724
27440
|
var RangePicker = DatePicker.RangePicker;
|
26725
27441
|
var _a = useState([]), ndcDetailsData = _a[0], setNdcDetailsData = _a[1];
|
26726
27442
|
var _b = useState(false), loading = _b[0]; _b[1];
|
@@ -27442,7 +28158,7 @@ var ProgrammeIssueForm = function (props) {
|
|
27442
28158
|
};
|
27443
28159
|
|
27444
28160
|
var ProgrammeRetireForm = function (props) {
|
27445
|
-
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
|
28161
|
+
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;
|
27446
28162
|
var t = translator.t;
|
27447
28163
|
var _a = useState(undefined), popupError = _a[0], setPopupError = _a[1];
|
27448
28164
|
var _b = useState(false), loading = _b[0], setLoading = _b[1];
|
@@ -27818,7 +28534,7 @@ var ProgrammeRevokeForm = function (props) {
|
|
27818
28534
|
};
|
27819
28535
|
|
27820
28536
|
var ProgrammeTransferForm = function (props) {
|
27821
|
-
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,
|
28537
|
+
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;
|
27822
28538
|
var t = translator.t;
|
27823
28539
|
var _b = useState(undefined), popupError = _b[0], setPopupError = _b[1];
|
27824
28540
|
var _c = useState(false), loading = _c[0], setLoading = _c[1];
|
@@ -28045,11 +28761,11 @@ var RejectDocumentationConfirmationModel = function (props) {
|
|
28045
28761
|
React.createElement(Button, { className: "mg-left-2", type: "primary", danger: true, htmlType: "submit", loading: loading, disabled: actionInfo.type === "reject" && comment === "" }, "REJECT")))));
|
28046
28762
|
};
|
28047
28763
|
|
28048
|
-
var css_248z$2 = ".ndc-action-body {\n display: flex;\n flex-direction: column;\n width: 100%; }\n .ndc-action-body .report-details {\n display: flex;\n flex-direction: row;\n width: 100%;\n align-items: flex-start;\n justify-content: space-between; }\n .ndc-action-body .report-details .report-type {\n display: flex;\n flex-direction: row;\n width: 60%;\n align-items: flex-start; }\n .ndc-action-body .report-details .report-type .name-time-container {\n display: flex;\n flex-direction: column;\n width: 70%;\n margin-bottom: 0.5rem; }\n .ndc-action-body .report-details .report-type .name {\n font-weight: 600;\n color: rgba(58, 53, 65, 0.8); }\n .ndc-action-body .report-details .report-type .icon {\n display: flex;\n width: 30%; }\n .ndc-action-body .report-details .report-type .empty {\n font-weight: 600;\n color: #cacaca; }\n .ndc-action-body .report-details .report-link {\n display: flex;\n flex-direction: row;\n width: 40%;\n justify-content: flex-start;\n gap: 20px
|
28764
|
+
var css_248z$2 = ".ndc-action-body {\n display: flex;\n flex-direction: column;\n width: 100%; }\n .ndc-action-body .report-details {\n display: flex;\n flex-direction: row;\n width: 100%;\n align-items: flex-start;\n justify-content: space-between; }\n .ndc-action-body .report-details .report-type {\n display: flex;\n flex-direction: row;\n width: 60%;\n align-items: flex-start; }\n .ndc-action-body .report-details .report-type .name-time-container {\n display: flex;\n flex-direction: column;\n width: 70%;\n margin-bottom: 0.5rem; }\n .ndc-action-body .report-details .report-type .name {\n font-weight: 600;\n color: rgba(58, 53, 65, 0.8); }\n .ndc-action-body .report-details .report-type .icon {\n display: flex;\n align-items: center;\n width: 30%; }\n .ndc-action-body .report-details .report-type .empty {\n font-weight: 600;\n color: #cacaca; }\n .ndc-action-body .report-details .report-link {\n display: flex;\n flex-direction: row;\n width: 40%;\n align-items: center;\n justify-content: flex-start;\n gap: 20px; }\n .ndc-action-body .report-details .report-link .version {\n font-weight: 600;\n color: #cacaca; }\n .ndc-action-body .report-details .report-link .link {\n margin-left: 1rem; }\n";
|
28049
28765
|
styleInject(css_248z$2);
|
28050
28766
|
|
28051
28767
|
var NdcActionBody = function (props) {
|
28052
|
-
var data = props.data, programmeId = props.programmeId, canUploadMonitorReport = props.canUploadMonitorReport, programmeOwnerId = props.programmeOwnerId, getProgrammeDocs = props.getProgrammeDocs, ministryLevelPermission = props.ministryLevelPermission,
|
28768
|
+
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;
|
28053
28769
|
var t = translator.t;
|
28054
28770
|
var userInfoState = useUserContext().userInfoState;
|
28055
28771
|
var fileInputMonitoringRef = useRef(null);
|
@@ -28311,7 +29027,7 @@ var NdcActionBody = function (props) {
|
|
28311
29027
|
React.createElement("div", { className: "icon" }, (monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.url) ? (monitoringReportPending ? ((companyRolePermission || ministryLevelPermission) && (React.createElement(React.Fragment, null,
|
28312
29028
|
React.createElement(LikeOutlined, { onClick: function () {
|
28313
29029
|
return docAction(monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.id, DocumentStatus.ACCEPTED, monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.actionId, monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.type);
|
28314
|
-
}, className: "common-progress-icon", style: { color: "#976ED7"
|
29030
|
+
}, className: "common-progress-icon", style: { color: "#976ED7" } }),
|
28315
29031
|
React.createElement(DislikeOutlined, { onClick: function () {
|
28316
29032
|
setRejectDocData({
|
28317
29033
|
id: monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.id,
|
@@ -28326,8 +29042,8 @@ var NdcActionBody = function (props) {
|
|
28326
29042
|
icon: React.createElement(DislikeOutlined, null),
|
28327
29043
|
});
|
28328
29044
|
setOpenRejectDocConfirmationModal(true);
|
28329
|
-
}, className: "common-progress-icon margin-left-1", style: { color: "#FD6F70"
|
28330
|
-
React.createElement(ExclamationCircleOutlined, { className: "common-progress-icon", style: { color: "#FD6F70"
|
29045
|
+
}, className: "common-progress-icon margin-left-1", style: { color: "#FD6F70" } })))) : monitoringReportAccepted ? (React.createElement(CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380" } })) : (monitoringReportRejected && (React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: t("programme:rejectTip"), overlayClassName: "custom-tooltip" },
|
29046
|
+
React.createElement(ExclamationCircleOutlined, { className: "common-progress-icon", style: { color: "#FD6F70" } }))))) : (React.createElement(React.Fragment, null,
|
28331
29047
|
React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === Role.ViewOnly
|
28332
29048
|
? t("programme:notAuthToUploadDoc")
|
28333
29049
|
: uploadDocUserPermission(userInfoState, DocType.MONITORING_REPORT, programmeOwnerId, ministryLevelPermission)
|
@@ -28358,7 +29074,7 @@ var NdcActionBody = function (props) {
|
|
28358
29074
|
} }))))),
|
28359
29075
|
(monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.url) && (React.createElement("div", { className: "report-link" },
|
28360
29076
|
React.createElement("div", { className: "link" }, linkDocVisible(monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.status) && (React.createElement("a", { href: monitoringReportData === null || monitoringReportData === void 0 ? void 0 : monitoringReportData.url, target: "_blank", rel: "noopener noreferrer", download: true },
|
28361
|
-
React.createElement(BookOutlined, { className: "common-progress-icon margin-right-1", style: { color: "#3F3A47"
|
29077
|
+
React.createElement(BookOutlined, { className: "common-progress-icon margin-right-1", style: { color: "#3F3A47" } })))),
|
28362
29078
|
!monitoringReportAccepted && (React.createElement(React.Fragment, null,
|
28363
29079
|
React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === Role.ViewOnly
|
28364
29080
|
? t("programme:notAuthToUploadDoc")
|
@@ -28401,7 +29117,7 @@ var NdcActionBody = function (props) {
|
|
28401
29117
|
ministryLevelPermission) && (React.createElement(React.Fragment, null,
|
28402
29118
|
React.createElement(LikeOutlined, { onClick: function () {
|
28403
29119
|
return docAction(verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.id, DocumentStatus.ACCEPTED, verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.actionId, verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.type);
|
28404
|
-
}, className: "common-progress-icon", style: { color: "#976ED7"
|
29120
|
+
}, className: "common-progress-icon", style: { color: "#976ED7" } }),
|
28405
29121
|
React.createElement(DislikeOutlined, { onClick: function () {
|
28406
29122
|
setRejectDocData({
|
28407
29123
|
id: verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.id,
|
@@ -28416,8 +29132,8 @@ var NdcActionBody = function (props) {
|
|
28416
29132
|
icon: React.createElement(DislikeOutlined, null),
|
28417
29133
|
});
|
28418
29134
|
setOpenRejectDocConfirmationModal(true);
|
28419
|
-
}, className: "common-progress-icon margin-left-1", style: { color: "#FD6F70"
|
28420
|
-
React.createElement(ExclamationCircleOutlined, { className: "common-progress-icon", style: { color: "#FD6F70"
|
29135
|
+
}, className: "common-progress-icon margin-left-1", style: { color: "#FD6F70" } })))) : verificationReportAccepted ? (React.createElement(CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380" } })) : (verifcationReportRejected && (React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: t("programme:rejectTip"), overlayClassName: "custom-tooltip" },
|
29136
|
+
React.createElement(ExclamationCircleOutlined, { className: "common-progress-icon", style: { color: "#FD6F70" } }))))) : (React.createElement(React.Fragment, null,
|
28421
29137
|
React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === Role.ViewOnly
|
28422
29138
|
? t("programme:notAuthToUploadDoc")
|
28423
29139
|
: uploadDocUserPermission(userInfoState, DocType.VERIFICATION_REPORT, programmeOwnerId, ministryLevelPermission)
|
@@ -28448,7 +29164,7 @@ var NdcActionBody = function (props) {
|
|
28448
29164
|
} })))))),
|
28449
29165
|
(verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.url) && (React.createElement("div", { className: "report-link" },
|
28450
29166
|
React.createElement("div", { className: "link" }, linkDocVisible(verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.status) && (React.createElement("a", { href: verificationReportData === null || verificationReportData === void 0 ? void 0 : verificationReportData.url, target: "_blank", rel: "noopener noreferrer", download: true },
|
28451
|
-
React.createElement(BookOutlined, { className: "common-progress-icon margin-right-1", style: { color: "#3F3A47"
|
29167
|
+
React.createElement(BookOutlined, { className: "common-progress-icon margin-right-1", style: { color: "#3F3A47" } })))),
|
28452
29168
|
!verificationReportAccepted && monitoringReportAccepted && (React.createElement(React.Fragment, null,
|
28453
29169
|
React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === Role.ViewOnly
|
28454
29170
|
? t("programme:notAuthToUploadDoc")
|
@@ -28481,11 +29197,11 @@ var NdcActionBody = function (props) {
|
|
28481
29197
|
React.createElement(RejectDocumentationConfirmationModel, { actionInfo: actionInfo, onActionConfirmed: handleOk, onActionCanceled: handleCancel, openModal: openRejectDocConfirmationModal, errorMsg: "", loading: loading, translator: translator })));
|
28482
29198
|
};
|
28483
29199
|
|
28484
|
-
var css_248z$1 = ".info-view .title-icon {\n padding-right: 10px; }\n\n.info-view .title-text {\n color: rgba(58, 53, 65, 0.8);\n font-weight: 600; }\n\n.info-view .title {\n margin-bottom: 5px; }\n\n.info-view .field-key {\n color: rgba(58, 53, 65, 0.6);\n font-weight: 500;\n text-overflow: ellipsis;\n overflow: hidden; }\n .info-view .field-key .label-container {\n display: flex;\n flex-direction: row
|
29200
|
+
var css_248z$1 = ".info-view .title-icon {\n padding-right: 10px; }\n\n.info-view .title-text {\n color: rgba(58, 53, 65, 0.8);\n font-weight: 600; }\n\n.info-view .title {\n margin-bottom: 5px; }\n\n.info-view .field-key {\n color: rgba(58, 53, 65, 0.6);\n font-weight: 500;\n text-overflow: ellipsis;\n overflow: hidden; }\n .info-view .field-key .label-container {\n display: flex;\n flex-direction: row; }\n .info-view .field-key .label {\n width: 70%; }\n .info-view .field-key .label-uploaded {\n color: rgba(58, 53, 65, 0.8);\n width: 70%; }\n\n.info-view .field-value {\n color: rgba(58, 53, 65, 0.6);\n text-overflow: ellipsis;\n overflow: hidden; }\n .info-view .field-value .link {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: flex-start;\n gap: 20px; }\n\n.info-view .field {\n margin: 15px 25px;\n font-size: 0.8rem; }\n";
|
28485
29201
|
styleInject(css_248z$1);
|
28486
29202
|
|
28487
29203
|
var ProgrammeDocuments = function (props) {
|
28488
|
-
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,
|
29204
|
+
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;
|
28489
29205
|
var t = translator.t;
|
28490
29206
|
var userInfoState = useUserContext().userInfoState;
|
28491
29207
|
var _a = useConnection(); _a.delete; var post = _a.post;
|
@@ -28728,7 +29444,7 @@ var ProgrammeDocuments = function (props) {
|
|
28728
29444
|
(designDocActionPermission || ministryLevelPermission) && (React.createElement(React.Fragment, null,
|
28729
29445
|
React.createElement(LikeOutlined, { onClick: function () {
|
28730
29446
|
return docAction(designDocId, DocumentStatus.ACCEPTED);
|
28731
|
-
}, className: "common-progress-icon", style: { color: "#976ED7"
|
29447
|
+
}, className: "common-progress-icon", style: { color: "#976ED7" } }),
|
28732
29448
|
React.createElement(DislikeOutlined, { onClick: function () {
|
28733
29449
|
setRejectDocData({ id: designDocId });
|
28734
29450
|
setActionInfo({
|
@@ -28739,8 +29455,8 @@ var ProgrammeDocuments = function (props) {
|
|
28739
29455
|
icon: React.createElement(DislikeOutlined, null),
|
28740
29456
|
});
|
28741
29457
|
setOpenRejectDocConfirmationModal(true);
|
28742
|
-
}, className: "common-progress-icon margin-left-1", style: { color: "#FD6F70"
|
28743
|
-
designDocStatus === DocumentStatus.ACCEPTED && (React.createElement(CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380"
|
29458
|
+
}, className: "common-progress-icon margin-left-1", style: { color: "#FD6F70" } }))),
|
29459
|
+
designDocStatus === DocumentStatus.ACCEPTED && (React.createElement(CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380" } })),
|
28744
29460
|
designDocStatus === DocumentStatus.REJECTED && (React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: t("programme:rejectTip"), overlayClassName: "custom-tooltip" },
|
28745
29461
|
React.createElement(ExclamationCircleOutlined, { className: "common-progress-icon", style: { color: "#FD6F70" } })))),
|
28746
29462
|
designDocUrl !== "" && (React.createElement("div", { className: "time" },
|
@@ -28748,23 +29464,15 @@ var ProgrammeDocuments = function (props) {
|
|
28748
29464
|
" ~ " + designDocversion))),
|
28749
29465
|
React.createElement(Col, { span: 6, className: "field-value" }, designDocUrl !== "" ? (React.createElement("div", { className: "link" },
|
28750
29466
|
linkDocVisible(designDocStatus) && (React.createElement("a", { href: designDocUrl, target: "_blank", rel: "noopener noreferrer", download: true },
|
28751
|
-
React.createElement(BookOutlined, { className: "common-progress-icon", style: { color: "#3F3A47" } }))),
|
29467
|
+
React.createElement(BookOutlined, { className: "common-progress-icon margin-right-1", style: { color: "#3F3A47" } }))),
|
28752
29468
|
designDocStatus !== DocumentStatus.ACCEPTED && (React.createElement(React.Fragment, null,
|
28753
29469
|
React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === Role.ViewOnly ||
|
28754
29470
|
(userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.CERTIFIER
|
28755
29471
|
? t("programme:notAuthToUploadDoc")
|
28756
29472
|
: !uploadDocUserPermission(userInfoState, DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission) && t("programme:orgNotAuth"), overlayClassName: "custom-tooltip" },
|
28757
29473
|
React.createElement(FileAddOutlined, { className: "common-progress-icon", style: uploadDocUserPermission(userInfoState, DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission)
|
28758
|
-
? {
|
28759
|
-
|
28760
|
-
cursor: "pointer",
|
28761
|
-
margin: "0px 0px 1.5px 0px",
|
28762
|
-
}
|
28763
|
-
: {
|
28764
|
-
color: "#cacaca",
|
28765
|
-
cursor: "default",
|
28766
|
-
margin: "0px 0px 1.5px 0px",
|
28767
|
-
}, onClick: function () {
|
29474
|
+
? { color: "#3F3A47", cursor: "pointer", margin: "0px 0px 2.5px 0px" }
|
29475
|
+
: { color: "#cacaca", cursor: "default", margin: "0px 0px 2.5px 0px" }, onClick: function () {
|
28768
29476
|
return uploadDocUserPermission(userInfoState, DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission) && handleDesignDocFileUpload();
|
28769
29477
|
} })),
|
28770
29478
|
React.createElement("input", { type: "file", ref: fileInputRef, style: { display: "none" }, accept: ".xls, .xlsx, .ppt, .pptx, .csv, .doc, .docx, .pdf, .png, .jpg", onChange: function (e) {
|
@@ -28777,16 +29485,8 @@ var ProgrammeDocuments = function (props) {
|
|
28777
29485
|
? t("programme:notAuthToUploadDoc")
|
28778
29486
|
: !uploadDocUserPermission(userInfoState, DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission) && t("programme:orgNotAuth"), overlayClassName: "custom-tooltip" },
|
28779
29487
|
React.createElement(FileAddOutlined, { className: "common-progress-icon", style: uploadDocUserPermission(userInfoState, DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission)
|
28780
|
-
? {
|
28781
|
-
|
28782
|
-
cursor: "pointer",
|
28783
|
-
margin: "0px 0px 1.5px 0px",
|
28784
|
-
}
|
28785
|
-
: {
|
28786
|
-
color: "#cacaca",
|
28787
|
-
cursor: "default",
|
28788
|
-
margin: "0px 0px 1.5px 0px",
|
28789
|
-
}, onClick: function () {
|
29488
|
+
? { color: "#3F3A47", cursor: "pointer", margin: "0px 0px 2.5px 0px" }
|
29489
|
+
: { color: "#cacaca", cursor: "default", margin: "0px 0px 2.5px 0px" }, onClick: function () {
|
28790
29490
|
return uploadDocUserPermission(userInfoState, DocType.DESIGN_DOCUMENT, programmeOwnerId, ministryLevelPermission) && handleDesignDocFileUpload();
|
28791
29491
|
} })),
|
28792
29492
|
React.createElement("input", { type: "file", ref: fileInputRef, style: { display: "none" }, accept: ".xls, .xlsx, .ppt, .pptx, .csv, .doc, .docx, .pdf, .png, .jpg", onChange: function (e) {
|
@@ -28812,7 +29512,7 @@ var ProgrammeDocuments = function (props) {
|
|
28812
29512
|
(companyRolePermission || ministryLevelPermission) && (React.createElement(React.Fragment, null,
|
28813
29513
|
React.createElement(LikeOutlined, { onClick: function () {
|
28814
29514
|
return docAction(methDocId, DocumentStatus.ACCEPTED);
|
28815
|
-
}, className: "common-progress-icon", style: { color: "#976ED7"
|
29515
|
+
}, className: "common-progress-icon", style: { color: "#976ED7" } }),
|
28816
29516
|
React.createElement(DislikeOutlined, { onClick: function () {
|
28817
29517
|
setRejectDocData({ id: methDocId });
|
28818
29518
|
setActionInfo({
|
@@ -28823,8 +29523,8 @@ var ProgrammeDocuments = function (props) {
|
|
28823
29523
|
icon: React.createElement(DislikeOutlined, null),
|
28824
29524
|
});
|
28825
29525
|
setOpenRejectDocConfirmationModal(true);
|
28826
|
-
}, className: "common-progress-icon margin-left-1", style: { color: "#FD6F70"
|
28827
|
-
methodDocStatus === DocumentStatus.ACCEPTED && (React.createElement(CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380"
|
29526
|
+
}, className: "common-progress-icon margin-left-1", style: { color: "#FD6F70" } }))),
|
29527
|
+
methodDocStatus === DocumentStatus.ACCEPTED && (React.createElement(CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380" } })),
|
28828
29528
|
methodDocStatus === DocumentStatus.REJECTED && (React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: t("programme:rejectTip"), overlayClassName: "custom-tooltip" },
|
28829
29529
|
React.createElement(ExclamationCircleOutlined, { className: "common-progress-icon", style: { color: "#FD6F70" } })))),
|
28830
29530
|
methodologyDocUrl !== "" && (React.createElement("div", { className: "time" },
|
@@ -28832,22 +29532,15 @@ var ProgrammeDocuments = function (props) {
|
|
28832
29532
|
" ~ " + methDocversion))),
|
28833
29533
|
React.createElement(Col, { span: 6, className: "field-value" }, methodologyDocUrl !== "" ? (React.createElement("div", { className: "link" },
|
28834
29534
|
linkDocVisible(methodDocStatus) && (React.createElement("a", { href: methodologyDocUrl, target: "_blank", rel: "noopener noreferrer", download: true },
|
28835
|
-
React.createElement(BookOutlined, { className: "common-progress-icon", style: { color: "#3F3A47" } }))),
|
29535
|
+
React.createElement(BookOutlined, { className: "common-progress-icon margin-right-1", style: { color: "#3F3A47" } }))),
|
28836
29536
|
methodDocStatus !== DocumentStatus.ACCEPTED && (React.createElement(React.Fragment, null,
|
28837
29537
|
React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === Role.ViewOnly
|
28838
29538
|
? t("programme:notAuthToUploadDoc")
|
28839
29539
|
: !uploadDocUserPermission(userInfoState, DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission) && t("programme:orgNotAuth"), overlayClassName: "custom-tooltip" },
|
28840
29540
|
React.createElement(FileAddOutlined, { className: "common-progress-icon", style: designDocStatus === DocumentStatus.ACCEPTED &&
|
28841
29541
|
uploadDocUserPermission(userInfoState, DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission)
|
28842
|
-
? {
|
28843
|
-
|
28844
|
-
cursor: "pointer",
|
28845
|
-
margin: "0px 0px 1.5px 0px",
|
28846
|
-
}
|
28847
|
-
: {
|
28848
|
-
color: "#cacaca",
|
28849
|
-
margin: "0px 0px 1.5px 0px",
|
28850
|
-
}, onClick: function () {
|
29542
|
+
? { color: "#3F3A47", cursor: "pointer", margin: "0px 0px 2.5px 0px" }
|
29543
|
+
: { color: "#cacaca", margin: "0px 0px 2.5px 0px" }, onClick: function () {
|
28851
29544
|
return designDocStatus === DocumentStatus.ACCEPTED &&
|
28852
29545
|
uploadDocUserPermission(userInfoState, DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission) &&
|
28853
29546
|
handleMethodologyFileUpload();
|
@@ -28866,16 +29559,8 @@ var ProgrammeDocuments = function (props) {
|
|
28866
29559
|
: t("programme:orgNotAuth"), overlayClassName: "custom-tooltip" },
|
28867
29560
|
React.createElement(FileAddOutlined, { className: "common-progress-icon", style: designDocStatus === DocumentStatus.ACCEPTED &&
|
28868
29561
|
uploadDocUserPermission(userInfoState, DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission)
|
28869
|
-
? {
|
28870
|
-
|
28871
|
-
cursor: "pointer",
|
28872
|
-
margin: "0px 0px 1.5px 0px",
|
28873
|
-
}
|
28874
|
-
: {
|
28875
|
-
color: "#cacaca",
|
28876
|
-
cursor: "default",
|
28877
|
-
margin: "0px 0px 1.5px 0px",
|
28878
|
-
}, onClick: function () {
|
29562
|
+
? { color: "#3F3A47", cursor: "pointer", margin: "0px 0px 2.5px 0px" }
|
29563
|
+
: { color: "#cacaca", cursor: "default", margin: "0px 0px 2.5px 0px" }, onClick: function () {
|
28879
29564
|
return designDocStatus === DocumentStatus.ACCEPTED &&
|
28880
29565
|
uploadDocUserPermission(userInfoState, DocType.METHODOLOGY_DOCUMENT, programmeOwnerId, ministryLevelPermission) &&
|
28881
29566
|
handleMethodologyFileUpload();
|
@@ -28904,7 +29589,7 @@ var ProgrammeDocuments = function (props) {
|
|
28904
29589
|
(ministryLevelPermission || companyRolePermission) && (React.createElement(React.Fragment, null,
|
28905
29590
|
React.createElement(LikeOutlined, { onClick: function () {
|
28906
29591
|
return docAction(impactAssessmentId, DocumentStatus.ACCEPTED);
|
28907
|
-
}, className: "common-progress-icon", style: { color: "#976ED7"
|
29592
|
+
}, className: "common-progress-icon", style: { color: "#976ED7" } }),
|
28908
29593
|
React.createElement(DislikeOutlined, { onClick: function () {
|
28909
29594
|
setRejectDocData({ id: impactAssessmentId });
|
28910
29595
|
setActionInfo({
|
@@ -28915,8 +29600,8 @@ var ProgrammeDocuments = function (props) {
|
|
28915
29600
|
icon: React.createElement(DislikeOutlined, null),
|
28916
29601
|
});
|
28917
29602
|
setOpenRejectDocConfirmationModal(true);
|
28918
|
-
}, className: "common-progress-icon margin-left-1", style: { color: "#FD6F70"
|
28919
|
-
impactAssessmentStatus === DocumentStatus.ACCEPTED && (React.createElement(CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380"
|
29603
|
+
}, className: "common-progress-icon margin-left-1", style: { color: "#FD6F70" } }))),
|
29604
|
+
impactAssessmentStatus === DocumentStatus.ACCEPTED && (React.createElement(CheckCircleOutlined, { className: "common-progress-icon", style: { color: "#5DC380" } })),
|
28920
29605
|
impactAssessmentStatus === DocumentStatus.REJECTED && (React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: t("programme:rejectTip"), overlayClassName: "custom-tooltip" },
|
28921
29606
|
React.createElement(ExclamationCircleOutlined, { className: "common-progress-icon", style: { color: "#FD6F70" } })))),
|
28922
29607
|
impactAssessmentUrl !== "" && (React.createElement("div", { className: "time" },
|
@@ -28924,22 +29609,13 @@ var ProgrammeDocuments = function (props) {
|
|
28924
29609
|
" ~ " + impactAssessmentversion))),
|
28925
29610
|
React.createElement(Col, { span: 6, className: "field-value" }, impactAssessmentUrl !== "" ? (React.createElement("div", { className: "link" },
|
28926
29611
|
linkDocVisible(impactAssessmentStatus) && (React.createElement("a", { href: impactAssessmentUrl, target: "_blank", rel: "noopener noreferrer", download: true },
|
28927
|
-
React.createElement("
|
28928
|
-
React.createElement(BookOutlined, { className: "common-progress-icon", style: { color: "#3F3A47" } })))),
|
29612
|
+
React.createElement(BookOutlined, { className: "common-progress-icon margin-right-1", style: { color: "#3F3A47" } }))),
|
28929
29613
|
impactAssessmentStatus !== DocumentStatus.ACCEPTED && (React.createElement(React.Fragment, null,
|
28930
29614
|
React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: impactAssessmentToolTipTitle, overlayClassName: "custom-tooltip" },
|
28931
29615
|
React.createElement(FileAddOutlined, { className: "common-progress-icon", style: uploadImpactAssessmentDocUserPermission &&
|
28932
29616
|
!isProjectRejected
|
28933
|
-
? {
|
28934
|
-
|
28935
|
-
cursor: "pointer",
|
28936
|
-
margin: "0px 0px 1.5px 0px",
|
28937
|
-
}
|
28938
|
-
: {
|
28939
|
-
color: "#cacaca",
|
28940
|
-
cursor: "default",
|
28941
|
-
margin: "0px 0px 1.5px 0px",
|
28942
|
-
}, onClick: function () {
|
29617
|
+
? { color: "#3F3A47", cursor: "pointer", margin: "0px 0px 2.5px 0px" }
|
29618
|
+
: { color: "#cacaca", cursor: "default", margin: "0px 0px 2.5px 0px" }, onClick: function () {
|
28943
29619
|
return uploadImpactAssessmentDocUserPermission &&
|
28944
29620
|
!isProjectRejected &&
|
28945
29621
|
handleImpactAssessmentFileUpload();
|
@@ -28952,16 +29628,8 @@ var ProgrammeDocuments = function (props) {
|
|
28952
29628
|
React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "top", trigger: "hover", title: impactAssessmentToolTipTitle, overlayClassName: "custom-tooltip" },
|
28953
29629
|
React.createElement(FileAddOutlined, { className: "common-progress-icon", style: uploadImpactAssessmentDocUserPermission &&
|
28954
29630
|
!isProjectRejected
|
28955
|
-
? {
|
28956
|
-
|
28957
|
-
cursor: "pointer",
|
28958
|
-
margin: "0px 0px 1.5px 0px",
|
28959
|
-
}
|
28960
|
-
: {
|
28961
|
-
color: "#cacaca",
|
28962
|
-
cursor: "default",
|
28963
|
-
margin: "0px 0px 1.5px 0px",
|
28964
|
-
}, onClick: function () {
|
29631
|
+
? { color: "#3F3A47", cursor: "pointer", margin: "0px 0px 2.5px 0px" }
|
29632
|
+
: { color: "#cacaca", cursor: "default", margin: "0px 0px 2.5px 0px" }, onClick: function () {
|
28965
29633
|
return uploadImpactAssessmentDocUserPermission &&
|
28966
29634
|
!isProjectRejected &&
|
28967
29635
|
handleImpactAssessmentFileUpload();
|
@@ -29028,5 +29696,5 @@ var TimelineBody = function (props) {
|
|
29028
29696
|
React.createElement("div", { className: "remark-body" }, remark)))));
|
29029
29697
|
};
|
29030
29698
|
|
29031
|
-
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, EnergyGenerationUnits, FormElementType, 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, 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, addNdcDesc, addRoundNumber, addSpaces, consumerGroupList, creditUnit, dateFormat, dateTimeFormat, energyGenerationUnitList, getBase64, getCompanyBgColor, getCreditStageVal, getFinancialFields, getGeneralFields, getInvestmentStatusEnumVal, getNdcActionStatusEnumVal, getNdcStatusTagType, getRetirementTypeString, getStageEnumVal, getStageTagType, getStageTagTypeMRV, getStageTransferEnumVal, getStatusTagType, getTransferStageTagType, getValidNdcActions, isBase64, landAreaUnitList, methodologyOptions, mitigationSubTypeList, mitigationSubTypesListMapped, mitigationTypeList, ndcActionTypeList, sectorMitigationTypesListMapped, sumArray, titleList };
|
29699
|
+
export { Action, AddNdcActionComponent, AddNewCompanyComponent, AddNewUserComponent, AdminBGColor, AdminColor, BaseEntity, CarbonSystemType, CertBGColor, CertColor, CoBenifitsComponent, Company, CompanyManagementColumns, CompanyManagementComponent, CompanyProfileComponent, CompanyRole, CompanyState, ConfigurationSettingsType, ConnectionContextProvider, CreditTransferComponent, CreditTransferStage, DevBGColor, DevColor, DocType, DocumentStatus, ESGType, EnergyGenerationUnits, FormElementType, GovBGColor, GovColor, ImgWithFallback, InfoView, Instrument, InvestmentBGColor, InvestmentBody, InvestmentColor, InvestmentCreationComponent, InvestmentCreationType, InvestmentLevel, InvestmentManagementComponent, InvestmentOwnershipType, 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, RadioButtonStatus, RadioButtonStatus2, RegistryDashboardComponent, RejectDocumentationConfirmationModel, RetireType, Role, RoleIcon, RootBGColor, RootColor, SdgGoals$1 as SdgGoals, Sector, SectoralScope, SettingsContext, SettingsContextProvider, StasticCard, StatsCardsTypes, SubTypeOfMitigation, SupportCreationComponent, SupportManagementComponent, SystemNames, TimelineBody, Titles, TooltipColor, TransferActionModel, TxType, TypeOfMitigation, UnitField, User, UserContext, UserInformationContextProvider, UserManagementColumns, UserManagementComponent, UserProfileComponent, UserRoleIcon, ViewBGColor, ViewColor, WidgetType, addCommSep, addCommSepRound, addNdcDesc, addRoundNumber, addSpaces, consumerGroupList, creditUnit, dateFormat, dateTimeFormat, energyGenerationUnitList, getBase64, getCompanyBgColor, getCreditStageVal, getFinancialFields, getGeneralFields, getInvestmentStatusEnumVal, getNdcActionStatusEnumVal, getNdcStatusTagType, getRetirementTypeString, getStageEnumVal, getStageTagType, getStageTagTypeMRV, getStageTransferEnumVal, getStatusTagType, getTransferStageTagType, getValidNdcActions, isBase64, landAreaUnitList, methodologyOptions, mitigationSubTypeList, mitigationSubTypesListMapped, mitigationTypeList, ndcActionTypeList, sectorMitigationTypesListMapped, sumArray, titleList, useConnection, useSettingsContext, useUserContext };
|
29032
29700
|
//# sourceMappingURL=index.js.map
|