@undp/carbon-library 1.0.289-CARBON-366.1 → 1.0.289-CARBON-178.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +585 -84
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/Components/Common/CoBenifits/coBenifits.d.ts +0 -1
- package/dist/cjs/types/Components/Common/Models/programmeRetireForm.d.ts +0 -1
- package/dist/cjs/types/Components/Common/Models/programmeTransferForm.d.ts +0 -1
- package/dist/cjs/types/Components/Common/NdcActionBody/ndcActionBody.d.ts +0 -2
- package/dist/cjs/types/Components/Common/ProgrammeDocuments/programmeDocuments.d.ts +0 -2
- package/dist/cjs/types/Components/Common/StasticCard/stasticCard.d.ts +0 -2
- package/dist/cjs/types/Context/ConnectionContext/connectionContext.d.ts +8 -0
- package/dist/cjs/types/Context/SettingsContext/settingsContext.d.ts +10 -0
- package/dist/cjs/types/Context/UserInformationContext/userInformationContext.d.ts +6 -0
- package/dist/cjs/types/Context/index.d.ts +3 -0
- package/dist/cjs/types/Definitions/Definitions/connectionContext.definitions.d.ts +3 -0
- package/dist/cjs/types/Storybook/AddNewCompanyComponent.stories.d.ts +12 -0
- package/dist/cjs/types/Storybook/AddNewUserComponent.stories.d.ts +12 -0
- package/dist/cjs/types/Storybook/Decorators/AddNewCompanyI18nDecorator.d.ts +2 -0
- package/dist/cjs/types/Storybook/Decorators/AddNewUserI18nDecorator.d.ts +2 -0
- package/dist/cjs/types/Storybook/Decorators/ConnectionContextDecorator.d.ts +2 -0
- package/dist/cjs/types/Storybook/Decorators/DashboardI18nDecorator.d.ts +2 -0
- package/dist/cjs/types/Storybook/Decorators/InvestmentCreationI18nDecorator.d.ts +2 -0
- package/dist/cjs/types/Storybook/Decorators/ProgrammeCreateI18nDecorator.d.ts +2 -0
- package/dist/cjs/types/Storybook/InvestmentCreationComponent.stories.d.ts +12 -0
- package/dist/cjs/types/Storybook/MRVDashboard.stories.d.ts +12 -0
- package/dist/cjs/types/Storybook/ProgrammeCreationComponent.stories.d.ts +12 -0
- package/dist/cjs/types/Storybook/RegistryDashboard.stories.d.ts +12 -0
- package/dist/cjs/types/index.d.ts +1 -0
- package/dist/esm/index.js +579 -86
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/Components/Common/CoBenifits/coBenifits.d.ts +0 -1
- package/dist/esm/types/Components/Common/Models/programmeRetireForm.d.ts +0 -1
- package/dist/esm/types/Components/Common/Models/programmeTransferForm.d.ts +0 -1
- package/dist/esm/types/Components/Common/NdcActionBody/ndcActionBody.d.ts +0 -2
- package/dist/esm/types/Components/Common/ProgrammeDocuments/programmeDocuments.d.ts +0 -2
- package/dist/esm/types/Components/Common/StasticCard/stasticCard.d.ts +0 -2
- package/dist/esm/types/Context/ConnectionContext/connectionContext.d.ts +8 -0
- package/dist/esm/types/Context/SettingsContext/settingsContext.d.ts +10 -0
- package/dist/esm/types/Context/UserInformationContext/userInformationContext.d.ts +6 -0
- package/dist/esm/types/Context/index.d.ts +3 -0
- package/dist/esm/types/Definitions/Definitions/connectionContext.definitions.d.ts +3 -0
- package/dist/esm/types/Storybook/AddNewCompanyComponent.stories.d.ts +12 -0
- package/dist/esm/types/Storybook/AddNewUserComponent.stories.d.ts +12 -0
- package/dist/esm/types/Storybook/Decorators/AddNewCompanyI18nDecorator.d.ts +2 -0
- package/dist/esm/types/Storybook/Decorators/AddNewUserI18nDecorator.d.ts +2 -0
- package/dist/esm/types/Storybook/Decorators/ConnectionContextDecorator.d.ts +2 -0
- package/dist/esm/types/Storybook/Decorators/DashboardI18nDecorator.d.ts +2 -0
- package/dist/esm/types/Storybook/Decorators/InvestmentCreationI18nDecorator.d.ts +2 -0
- package/dist/esm/types/Storybook/Decorators/ProgrammeCreateI18nDecorator.d.ts +2 -0
- package/dist/esm/types/Storybook/InvestmentCreationComponent.stories.d.ts +12 -0
- package/dist/esm/types/Storybook/MRVDashboard.stories.d.ts +12 -0
- package/dist/esm/types/Storybook/ProgrammeCreationComponent.stories.d.ts +12 -0
- package/dist/esm/types/Storybook/RegistryDashboard.stories.d.ts +12 -0
- package/dist/esm/types/index.d.ts +1 -0
- package/dist/index.d.ts +23 -10
- package/package.json +29 -2
package/dist/esm/index.js
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
import { PlusOutlined, FilterOutlined, DownloadOutlined, BankOutlined, SafetyOutlined, AuditOutlined, ExperimentOutlined, UploadOutlined, UserOutlined, MinusCircleOutlined, StarOutlined, ToolOutlined, EyeOutlined, SearchOutlined, EllipsisOutlined, EditOutlined, DeleteOutlined, FileAddOutlined, CheckCircleOutlined, ExclamationCircleOutlined, BookOutlined, CaretDownOutlined, LockOutlined, EyeInvisibleOutlined, GlobalOutlined, FlagOutlined, LineChartOutlined, LikeOutlined, DislikeOutlined, PlusCircleOutlined, LockFilled, CloseCircleOutlined } from '@ant-design/icons';
|
2
2
|
import { Input, Radio, Space, Row, Col, Button, Dropdown, Table, Empty, message, Form, Steps, Upload, InputNumber, Tooltip, Select, Modal, Alert, Card, Skeleton, Tag, Checkbox, DatePicker, Popover, List, Typography, Spin, Tabs, Progress, Collapse } from 'antd';
|
3
|
-
import React, { useState, useEffect, useRef } from 'react';
|
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, { HttpStatusCode } 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';
|
@@ -13,7 +14,6 @@ import mapboxgl from 'mapbox-gl';
|
|
13
14
|
import 'mapbox-gl/dist/mapbox-gl.css';
|
14
15
|
import 'antd/dist/antd.css';
|
15
16
|
import * as XLSX from 'xlsx';
|
16
|
-
import { HttpStatusCode } from 'axios';
|
17
17
|
|
18
18
|
/******************************************************************************
|
19
19
|
Copyright (c) Microsoft Corporation.
|
@@ -492,9 +492,317 @@ var OrganisationStatus = function (props) {
|
|
492
492
|
return orgState;
|
493
493
|
};
|
494
494
|
|
495
|
+
function e$1(e){this.message=e;}e$1.prototype=new Error,e$1.prototype.name="InvalidCharacterError";var r="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(r){var t=String(r).replace(/=+$/,"");if(t.length%4==1)throw new e$1("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,o,a=0,i=0,c="";o=t.charAt(i++);~o&&(n=a%4?64*n+o:o,a++%4)?c+=String.fromCharCode(255&n>>(-2*a&6)):0)o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(o);return c};function t$1(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw "Illegal base64url string!"}try{return function(e){return decodeURIComponent(r(e).replace(/(.)/g,(function(e,r){var t=r.charCodeAt(0).toString(16).toUpperCase();return t.length<2&&(t="0"+t),"%"+t})))}(t)}catch(e){return r(t)}}function n$1(e){this.message=e;}function o(e,r){if("string"!=typeof e)throw new n$1("Invalid token specified");var o=!0===(r=r||{}).header?0:1;try{return JSON.parse(t$1(e.split(".")[o]))}catch(e){throw new n$1("Invalid token specified: "+e.message)}}n$1.prototype=new Error,n$1.prototype.name="InvalidTokenError";
|
496
|
+
|
497
|
+
var ConnectionContext = createContext({});
|
498
|
+
var ConnectionContextProvider = function (props) {
|
499
|
+
var _a = useState(), token = _a[0], setToken = _a[1];
|
500
|
+
var serverURL = props.serverURL, t = props.t, statServerUrl = props.statServerUrl, children = props.children;
|
501
|
+
useEffect(function () {
|
502
|
+
var timer = setInterval(function () { return __awaiter(void 0, void 0, void 0, function () {
|
503
|
+
var newToken;
|
504
|
+
return __generator(this, function (_a) {
|
505
|
+
switch (_a.label) {
|
506
|
+
case 0: return [4 /*yield*/, localStorage.getItem('token')];
|
507
|
+
case 1:
|
508
|
+
newToken = _a.sent();
|
509
|
+
if (token !== newToken) {
|
510
|
+
setToken(newToken);
|
511
|
+
}
|
512
|
+
return [2 /*return*/];
|
513
|
+
}
|
514
|
+
});
|
515
|
+
}); }, 3000);
|
516
|
+
if (token) {
|
517
|
+
clearTimeout(timer);
|
518
|
+
}
|
519
|
+
return function () {
|
520
|
+
clearTimeout(timer);
|
521
|
+
};
|
522
|
+
}, [token]);
|
523
|
+
var send = useCallback(function (method, path, data, config, extraUrl) {
|
524
|
+
return new Promise(function (resolve, reject) {
|
525
|
+
var url = "".concat(extraUrl ? extraUrl : serverURL, "/").concat(path);
|
526
|
+
var headers;
|
527
|
+
if (token) {
|
528
|
+
headers = { authorization: "Bearer ".concat(token.toString()) };
|
529
|
+
}
|
530
|
+
else {
|
531
|
+
if (localStorage.getItem('token')) {
|
532
|
+
headers = {
|
533
|
+
authorization: "Bearer ".concat(localStorage.getItem('token')),
|
534
|
+
};
|
535
|
+
}
|
536
|
+
else {
|
537
|
+
headers = {
|
538
|
+
authorization: "Bearer ".concat(process.env.STORYBOOK_ACCESS_TOKEN),
|
539
|
+
};
|
540
|
+
}
|
541
|
+
}
|
542
|
+
axios(__assign({ method: method, url: url, data: data, headers: headers }, config))
|
543
|
+
.then(function (response) {
|
544
|
+
var _a, _b, _c;
|
545
|
+
if (response.status) {
|
546
|
+
if (response.status === 200 || response.status === 201) {
|
547
|
+
resolve({
|
548
|
+
status: response.status,
|
549
|
+
data: (_a = response.data.data) !== null && _a !== void 0 ? _a : response.data,
|
550
|
+
response: response,
|
551
|
+
statusText: 'SUCCESS',
|
552
|
+
message: response.data.message,
|
553
|
+
});
|
554
|
+
}
|
555
|
+
else if (response.status === 422) {
|
556
|
+
reject({
|
557
|
+
status: response.status,
|
558
|
+
data: (_b = response.data) === null || _b === void 0 ? void 0 : _b.data,
|
559
|
+
statusText: 'ERROR',
|
560
|
+
response: response,
|
561
|
+
message: response.data.message,
|
562
|
+
errors: (_c = response.data) === null || _c === void 0 ? void 0 : _c.errors,
|
563
|
+
});
|
564
|
+
}
|
565
|
+
}
|
566
|
+
else {
|
567
|
+
reject({
|
568
|
+
status: 500,
|
569
|
+
statusText: 'UNKNOWN',
|
570
|
+
message: t('common:systemError'),
|
571
|
+
});
|
572
|
+
}
|
573
|
+
})
|
574
|
+
.catch(function (e) {
|
575
|
+
var _a;
|
576
|
+
if (e.response) {
|
577
|
+
if (e.response.status) {
|
578
|
+
if (e.response.data.message === 'jwt expired') {
|
579
|
+
localStorage.removeItem('token');
|
580
|
+
window.location.reload();
|
581
|
+
}
|
582
|
+
reject({
|
583
|
+
status: e.response.status,
|
584
|
+
statusText: 'ERROR',
|
585
|
+
errors: (_a = e.response.data) === null || _a === void 0 ? void 0 : _a.errors,
|
586
|
+
message: e.response.data.message,
|
587
|
+
});
|
588
|
+
}
|
589
|
+
else {
|
590
|
+
reject({
|
591
|
+
statusText: 'ERROR',
|
592
|
+
message: t('common:systemError'),
|
593
|
+
});
|
594
|
+
}
|
595
|
+
}
|
596
|
+
else {
|
597
|
+
reject({
|
598
|
+
statusText: 'ERROR',
|
599
|
+
message: t('common:networkError'),
|
600
|
+
});
|
601
|
+
}
|
602
|
+
});
|
603
|
+
});
|
604
|
+
}, [token, serverURL]);
|
605
|
+
var post = useCallback(function (path, data, config, extraUrl) {
|
606
|
+
return send('post', path, data, config, extraUrl);
|
607
|
+
}, [send]);
|
608
|
+
var put = useCallback(function (path, data, config) {
|
609
|
+
return send('put', path, data, config);
|
610
|
+
}, [send]);
|
611
|
+
var get = useCallback(function (path, config) {
|
612
|
+
return send('get', path, undefined, config);
|
613
|
+
}, [send]);
|
614
|
+
var patch = useCallback(function (path, data, config) {
|
615
|
+
return send('patch', path, data, config);
|
616
|
+
}, [send]);
|
617
|
+
var del = useCallback(function (path, config) {
|
618
|
+
return send('delete', path, config);
|
619
|
+
}, [send]);
|
620
|
+
var updateToken = useCallback(function (newToken) { return __awaiter(void 0, void 0, void 0, function () {
|
621
|
+
return __generator(this, function (_a) {
|
622
|
+
if (newToken) {
|
623
|
+
localStorage.setItem('token', newToken);
|
624
|
+
setToken(newToken);
|
625
|
+
}
|
626
|
+
else {
|
627
|
+
localStorage.setItem('token', '');
|
628
|
+
setToken(undefined);
|
629
|
+
}
|
630
|
+
return [2 /*return*/];
|
631
|
+
});
|
632
|
+
}); }, []);
|
633
|
+
var removeToken = function (tkn) {
|
634
|
+
if (tkn) {
|
635
|
+
var exp = o(tkn).exp;
|
636
|
+
if (Date.now() > exp * 1000) {
|
637
|
+
localStorage.setItem('token', '');
|
638
|
+
localStorage.removeItem('userRole');
|
639
|
+
localStorage.removeItem('userId');
|
640
|
+
localStorage.removeItem('companyId');
|
641
|
+
localStorage.removeItem('companyRole');
|
642
|
+
}
|
643
|
+
else {
|
644
|
+
var diff = exp * 1000 - Date.now();
|
645
|
+
setTimeout(function () {
|
646
|
+
setToken(undefined);
|
647
|
+
localStorage.setItem('token', '');
|
648
|
+
localStorage.removeItem('userRole');
|
649
|
+
localStorage.removeItem('userId');
|
650
|
+
localStorage.removeItem('companyId');
|
651
|
+
localStorage.removeItem('companyRole');
|
652
|
+
}, diff);
|
653
|
+
console.log(diff, 'Remaining Token expire time');
|
654
|
+
}
|
655
|
+
}
|
656
|
+
};
|
657
|
+
useEffect(function () {
|
658
|
+
removeToken(token);
|
659
|
+
}, [token]);
|
660
|
+
return (React.createElement(ConnectionContext.Provider, { value: {
|
661
|
+
connection: { post: post, put: put, get: get, patch: patch, delete: del, updateToken: updateToken, token: token, removeToken: removeToken, statServerUrl: statServerUrl },
|
662
|
+
} }, children));
|
663
|
+
};
|
664
|
+
var useConnection = function () {
|
665
|
+
var context = useContext(ConnectionContext);
|
666
|
+
return context.connection;
|
667
|
+
};
|
668
|
+
|
669
|
+
var UserContext = createContext({
|
670
|
+
setUserInfo: function () { },
|
671
|
+
removeUserInfo: function () { },
|
672
|
+
IsAuthenticated: function (tkn) { return false; },
|
673
|
+
isTokenExpired: false,
|
674
|
+
setIsTokenExpired: function (val) { },
|
675
|
+
});
|
676
|
+
var UserInformationContextProvider = function (_a) {
|
677
|
+
var children = _a.children;
|
678
|
+
var token = useConnection().token;
|
679
|
+
var _b = useState(false), isTokenExpired = _b[0], setIsTokenExpired = _b[1];
|
680
|
+
var initialUserProps = {
|
681
|
+
id: localStorage.getItem('userId') ? localStorage.getItem('userId') : process.env.STORYBOOK_USER_ID ? process.env.STORYBOOK_USER_ID : '',
|
682
|
+
userRole: localStorage.getItem('userRole') ? localStorage.getItem('userRole') : process.env.STORYBOOK_USER_ROLE ? process.env.STORYBOOK_USER_ROLE : '',
|
683
|
+
companyRole: localStorage.getItem('companyRole')
|
684
|
+
? localStorage.getItem('companyRole')
|
685
|
+
: process.env.STORYBOOK_COMPANY_ROLE ? process.env.STORYBOOK_COMPANY_ROLE : '',
|
686
|
+
companyId: localStorage.getItem('companyId')
|
687
|
+
? parseInt(localStorage.getItem('companyId'))
|
688
|
+
: process.env.STORYBOOK_COMPANY_ID ? parseInt(process.env.STORYBOOK_COMPANY_ID) : -1,
|
689
|
+
companyLogo: localStorage.getItem('companyLogo')
|
690
|
+
? localStorage.getItem('companyLogo')
|
691
|
+
: process.env.STORYBOOK_COMPANY_LOGO ? process.env.STORYBOOK_COMPANY_LOGO : '',
|
692
|
+
companyName: localStorage.getItem('companyName')
|
693
|
+
? localStorage.getItem('companyName')
|
694
|
+
: process.env.STORYBOOK_COMPANY_NAME ? process.env.STORYBOOK_COMPANY_NAME : '',
|
695
|
+
companyState: localStorage.getItem('companyState')
|
696
|
+
? parseInt(localStorage.getItem('companyState'))
|
697
|
+
: process.env.STORYBOOK_COMPANY_STATE ? parseInt(process.env.STORYBOOK_COMPANY_STATE) : 0,
|
698
|
+
};
|
699
|
+
var _c = useState(initialUserProps), userInfoState = _c[0], setUserInfoState = _c[1];
|
700
|
+
var setUserInfo = function (value) {
|
701
|
+
var state = (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyState) === 1 ? userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyState : 0;
|
702
|
+
var id = value.id, userRole = value.userRole, companyId = value.companyId, companyRole = value.companyRole, companyLogo = value.companyLogo, companyName = value.companyName, _a = value.companyState, companyState = _a === void 0 ? state : _a;
|
703
|
+
if (id) {
|
704
|
+
setUserInfoState(function (prev) { return (__assign(__assign({}, prev), { id: id })); });
|
705
|
+
localStorage.setItem('userId', id);
|
706
|
+
}
|
707
|
+
if (userRole) {
|
708
|
+
setUserInfoState(function (prev) { return (__assign(__assign({}, prev), { userRole: userRole })); });
|
709
|
+
localStorage.setItem('userRole', userRole);
|
710
|
+
}
|
711
|
+
if (companyId) {
|
712
|
+
setUserInfoState(function (prev) { return (__assign(__assign({}, prev), { companyId: companyId })); });
|
713
|
+
localStorage.setItem('companyId', companyId + '');
|
714
|
+
}
|
715
|
+
if (companyLogo) {
|
716
|
+
setUserInfoState(function (prev) { return (__assign(__assign({}, prev), { companyLogo: companyLogo })); });
|
717
|
+
localStorage.setItem('companyLogo', companyLogo);
|
718
|
+
}
|
719
|
+
else {
|
720
|
+
setUserInfoState(function (prev) { return (__assign(__assign({}, prev), { companyLogo: '' })); });
|
721
|
+
localStorage.setItem('companyLogo', '');
|
722
|
+
}
|
723
|
+
if (companyName) {
|
724
|
+
setUserInfoState(function (prev) { return (__assign(__assign({}, prev), { companyName: companyName })); });
|
725
|
+
localStorage.setItem('companyName', companyName);
|
726
|
+
}
|
727
|
+
if (userRole) {
|
728
|
+
setUserInfoState(function (prev) { return (__assign(__assign({}, prev), { companyRole: companyRole })); });
|
729
|
+
localStorage.setItem('companyRole', companyRole);
|
730
|
+
}
|
731
|
+
setUserInfoState(function (prev) { return (__assign(__assign({}, prev), { companyState: companyState })); });
|
732
|
+
localStorage.setItem('companyState', companyState + '');
|
733
|
+
};
|
734
|
+
var IsAuthenticated = useCallback(function (tokenNew) {
|
735
|
+
var tokenVal;
|
736
|
+
if (tokenNew) {
|
737
|
+
tokenVal = tokenNew;
|
738
|
+
}
|
739
|
+
else if (token) {
|
740
|
+
tokenVal = token;
|
741
|
+
}
|
742
|
+
else {
|
743
|
+
tokenVal = localStorage.getItem('token');
|
744
|
+
if (tokenVal === '') {
|
745
|
+
if (history.length !== 1) {
|
746
|
+
setIsTokenExpired(true);
|
747
|
+
}
|
748
|
+
}
|
749
|
+
}
|
750
|
+
try {
|
751
|
+
if (tokenVal) {
|
752
|
+
var exp = o(tokenVal).exp;
|
753
|
+
return Date.now() < exp * 1000;
|
754
|
+
}
|
755
|
+
return false;
|
756
|
+
}
|
757
|
+
catch (err) {
|
758
|
+
return false;
|
759
|
+
}
|
760
|
+
}, [token]);
|
761
|
+
var removeUserInfo = function () {
|
762
|
+
localStorage.removeItem('userId');
|
763
|
+
localStorage.removeItem('userRole');
|
764
|
+
localStorage.removeItem('companyId');
|
765
|
+
localStorage.removeItem('companyRole');
|
766
|
+
localStorage.removeItem('companyName');
|
767
|
+
localStorage.removeItem('companyState');
|
768
|
+
localStorage.removeItem('companyLogo');
|
769
|
+
setUserInfoState(initialUserProps);
|
770
|
+
};
|
771
|
+
return (React.createElement(UserContext.Provider, { value: {
|
772
|
+
userInfoState: userInfoState,
|
773
|
+
setUserInfo: setUserInfo,
|
774
|
+
removeUserInfo: removeUserInfo,
|
775
|
+
IsAuthenticated: IsAuthenticated,
|
776
|
+
isTokenExpired: isTokenExpired,
|
777
|
+
setIsTokenExpired: setIsTokenExpired,
|
778
|
+
} }, children));
|
779
|
+
};
|
780
|
+
var useUserContext = function () {
|
781
|
+
return useContext(UserContext);
|
782
|
+
};
|
783
|
+
|
784
|
+
var SettingsContext = createContext({
|
785
|
+
isTransferFrozen: false,
|
786
|
+
setTransferFrozen: function (value) { },
|
787
|
+
});
|
788
|
+
var SettingsContextProvider = function (_a) {
|
789
|
+
var children = _a.children;
|
790
|
+
var _b = useState(false), isTransferFrozen = _b[0], setIsTransferFrozen = _b[1];
|
791
|
+
var setTransferFrozen = function (value) {
|
792
|
+
setIsTransferFrozen(value);
|
793
|
+
};
|
794
|
+
return (React.createElement(SettingsContext.Provider, { value: {
|
795
|
+
isTransferFrozen: isTransferFrozen,
|
796
|
+
setTransferFrozen: setTransferFrozen,
|
797
|
+
} }, children));
|
798
|
+
};
|
799
|
+
var useSettingsContext = function () {
|
800
|
+
return useContext(SettingsContext);
|
801
|
+
};
|
802
|
+
|
495
803
|
var Search$2 = Input.Search;
|
496
804
|
var CompanyManagementComponent = function (props) {
|
497
|
-
var t = props.t, useAbilityContext = props.useAbilityContext,
|
805
|
+
var t = props.t, useAbilityContext = props.useAbilityContext, visibleColumns = props.visibleColumns, onNavigateToCompanyProfile = props.onNavigateToCompanyProfile, onClickAddCompany = props.onClickAddCompany;
|
498
806
|
var _a = useState(), totalCompany = _a[0], setTotalCompany = _a[1];
|
499
807
|
var _b = useState(false), loading = _b[0], setLoading = _b[1];
|
500
808
|
var _c = useState([]), tableData = _c[0], setTableData = _c[1];
|
@@ -509,6 +817,7 @@ var CompanyManagementComponent = function (props) {
|
|
509
817
|
var _l = useState(""), sortField = _l[0], setSortField = _l[1];
|
510
818
|
var _m = useState(), dataQuery = _m[0], setDataQuery = _m[1];
|
511
819
|
var ability = useAbilityContext();
|
820
|
+
var post = useConnection().post;
|
512
821
|
document.addEventListener("mousedown", function (event) {
|
513
822
|
var organisationFilterArea1 = document.querySelector(".filter-bar");
|
514
823
|
var organisationFilterArea2 = document.querySelector(".filter-dropdown");
|
@@ -634,7 +943,7 @@ var CompanyManagementComponent = function (props) {
|
|
634
943
|
{
|
635
944
|
key: searchByTermOrganisation,
|
636
945
|
operation: "like",
|
637
|
-
value: networksearchOrganisations + "%",
|
946
|
+
value: "%" + networksearchOrganisations + "%",
|
638
947
|
},
|
639
948
|
];
|
640
949
|
}
|
@@ -651,7 +960,7 @@ var CompanyManagementComponent = function (props) {
|
|
651
960
|
{
|
652
961
|
key: searchByTermOrganisation,
|
653
962
|
operation: "like",
|
654
|
-
value: networksearchOrganisations + "%",
|
963
|
+
value: "%" + networksearchOrganisations + "%",
|
655
964
|
},
|
656
965
|
{
|
657
966
|
key: "companyRole",
|
@@ -896,7 +1205,7 @@ var CompanyManagementComponent = function (props) {
|
|
896
1205
|
var css_248z$w = ".company-details-form-container {\n width: 100%; }\n .company-details-form-container .company-details-form .steps-actions {\n display: flex;\n flex-direction: row-reverse; }\n .company-details-form-container .company-details-form .steps-actions .mg-left-1 {\n margin-left: 1rem; }\n .company-details-form-container .company-details-form .row .website .ant-input {\n margin-left: 0.3rem; }\n .company-details-form-container .company-details-form .row .website .ant-input-group-addon {\n border: 1px solid #d9d9d9; }\n .company-details-form-container .company-details-form .row .logo-upload-section {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: start;\n width: 100%; }\n .company-details-form-container .company-details-form .row .logo-upload-section .ant-upload {\n width: 20%; }\n .company-details-form-container .company-details-form .row .logo-upload-section .ant-upload-list {\n align-items: center;\n justify-content: center;\n width: 75%; }\n .company-details-form-container .company-details-form .row .logo-upload-section .ant-upload-list .ant-upload-list-item {\n margin-top: 0; }\n .company-details-form-container .company-details-form .row .details-part-one .space-container {\n width: 100%; }\n .company-details-form-container .company-details-form .row .details-part-one .space-container .ant-space-item {\n width: 100%; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .certifier-radio-container {\n width: 30%; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .certifier-radio-container .ant-radio-button-wrapper-checked:not(\n .ant-radio-button-wrapper-disabled\n) {\n color: #519e4f !important;\n border-color: #519e4f !important;\n box-shadow: none; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .certifier-radio-container .anticon {\n background: #eeeeee;\n border-radius: 50px;\n padding: 0.2rem;\n color: #519e4f; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .dev-radio-container {\n width: 30%; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .dev-radio-container .ant-radio-button-wrapper-checked:not(\n .ant-radio-button-wrapper-disabled\n) {\n color: #ffa070 !important;\n border-color: #ffa070 !important;\n box-shadow: none; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .dev-radio-container .anticon {\n background: #eeeeee;\n border-radius: 50px;\n padding: 0.2rem;\n color: #ffa070; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .minister-radio-container {\n width: 30%; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .minister-radio-container .ant-radio-button-wrapper-checked:not(\n .ant-radio-button-wrapper-disabled\n) {\n color: #9155fd !important;\n border-color: #9155fd !important;\n box-shadow: none; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .minister-radio-container .anticon {\n background: #eeeeee;\n border-radius: 50px;\n padding: 0.2rem;\n color: #9155fd; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .gov-radio-container {\n width: 45%; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .gov-radio-container .ant-radio-button-wrapper-checked:not(\n .ant-radio-button-wrapper-disabled\n) {\n color: #16b1ff !important;\n border-color: #16b1ff !important;\n box-shadow: none; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .gov-radio-container .anticon {\n background: #eeeeee;\n border-radius: 50px;\n padding: 0.2rem;\n color: #16b1ff; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .observer-radio-container {\n width: 25%; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .observer-radio-container .ant-radio-button-wrapper-checked:not(\n .ant-radio-button-wrapper-disabled\n) {\n color: #707070 !important;\n border-color: #707070 !important;\n box-shadow: none; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .observer-radio-container .anticon {\n background: #eeeeee;\n border-radius: 50px;\n padding: 0.2rem;\n color: #707070; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .ant-radio-button-wrapper::before {\n background-color: transparent; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .ant-radio-button-wrapper {\n border: 1px solid #d9d9d9; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .anticon {\n margin-right: 0.5rem; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .certifier {\n width: 100%; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .certifier .ant-radio-button-checked {\n background: rgba(128, 255, 0, 0.12);\n color: #519e4f; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .dev {\n width: 100%; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .dev .ant-radio-button-checked {\n background: rgba(254, 241, 173, 0.5);\n color: #ffa070; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .gov {\n width: 100%; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .gov .ant-radio-button-checked {\n background: rgba(185, 226, 244, 0.56);\n color: #16b1ff; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .minister {\n width: 100%; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .minister .ant-radio-button-checked {\n background: rgba(198, 144, 251, 0.12);\n color: #9155fd; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .observer {\n width: 100%; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .observer .ant-radio-button-checked {\n background: rgba(176, 190, 197, 0.23);\n color: #707070; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .role-icons {\n margin-right: 5px; }\n .company-details-form-container .company-details-form .row .details-part-two .space-container {\n width: 100%; }\n .company-details-form-container .company-details-form .row .details-part-two .space-container .ant-space-item {\n width: 100%; }\n\n.step-title-container {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 1rem; }\n .step-title-container .step-count {\n font-size: 2.2rem;\n font-weight: 800;\n margin-right: 0.4rem;\n color: rgba(58, 53, 65, 0.8); }\n .step-title-container .title {\n font-size: 1rem;\n font-weight: 600;\n color: #3a3541; }\n\n.add-company-main-container {\n display: flex;\n flex-direction: column;\n border-radius: 5px;\n padding: 0 50px; }\n .add-company-main-container .title-container {\n display: flex;\n flex-direction: column;\n border-radius: 5px; }\n .add-company-main-container .title-container .main {\n font-size: 1.25rem;\n font-weight: 500;\n color: #16b1ff; }\n .add-company-main-container .title-container .sub {\n font-size: 0.8rem;\n color: #555657; }\n .add-company-main-container .adding-section {\n display: flex;\n flex-direction: column;\n background-color: #ffffff;\n margin: 1rem 0 1rem 0;\n border-radius: 10px;\n padding: 2.5rem 1.5rem 2.5rem 1.5rem; }\n .add-company-main-container .adding-section .form-section {\n display: flex;\n margin-bottom: 2rem; }\n .add-company-main-container .adding-section .form-section .form-one {\n width: 100%; }\n .add-company-main-container .adding-section .form-section .steps {\n width: 15%; }\n .add-company-main-container .adding-section .form-section .steps-content {\n width: 85%; }\n .add-company-main-container .adding-section .steps-action {\n display: flex;\n flex-direction: row-reverse; }\n\n.ant-upload-list-picture .ant-upload-list-item-error,\n.ant-upload-list-picture-card .ant-upload-list-item-error {\n height: auto;\n max-height: 200px; }\n\n.hide {\n display: none !important; }\n";
|
897
1206
|
styleInject(css_248z$w);
|
898
1207
|
|
899
|
-
var css_248z$v = "body {\n background-color: #f4f5fa;\n font-family: \"Inter\";\n font-weight: 400; }\n\n.ant-menu {\n background-color: #f4f5fa; }\n\n.ant-layout-header {\n background-color: #f4f5fa; }\n\n.ant-layout {\n background-color: #f4f5fa; }\n\n.ant-menu-submenu .ant-menu {\n background-color: #f4f5fa; }\n\n.ant-menu-item {\n background-color: #f4f5fa; }\n\n.ant-menu-sub {\n background-color: #f4f5fa; }\n\n.ant-table-content {\n font-family: \"Inter\"; }\n\n.ant-input {\n border-radius: 5px !important; }\n\n.ant-btn {\n border-radius: 5px !important; }\n\n.ant-input-group-addon:first-child {\n border-radius: 5px !important; }\n\n.ant-input-group .ant-input {\n width: 99% !important; }\n\n.ant-radio-group {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between; }\n\n.ant-radio-group-large .ant-radio-button-wrapper {\n font-size: 0.8rem;\n width: 25%;\n border-radius: 5px !important; }\n\n.ant-upload-list-picture .ant-upload-list-item-error,\n.ant-upload-list-picture-card .ant-upload-list-item-error {\n border-color: #40a9ff;\n border-radius: 5px;\n height: 40px; }\n .ant-upload-list-picture .ant-upload-list-item-error .ant-upload-list-item-name,\n .ant-upload-list-picture-card .ant-upload-list-item-error .ant-upload-list-item-name {\n color: #40a9ff !important; }\n\n.ant-upload-list-item-error .ant-upload-list-item-card-actions .anticon {\n color: #40a9ff; }\n\n.ant-input-status-error:not(.ant-input-disabled):not(.ant-input-borderless).ant-input,\n.ant-input-status-error:not(.ant-input-disabled):not(.ant-input-borderless).ant-input:hover {\n border-color: #d9d9d9 !important; }\n\n.ant-input-group-wrapper-status-error .ant-input-group-addon {\n border-color: #d9d9d9 !important; }\n\n.ant-form-item-explain-error {\n font-size: 13px;\n color: rgba(255, 77, 79, 0.8); }\n\n.ant-table-thead\n> tr\n> th:not(:last-child):not(.ant-table-selection-column):not(.ant-table-row-expand-icon-cell):not([colspan])::before {\n background-color: transparent !important; }\n\n.ant-form-item-label > label {\n flex-direction: row-reverse !important;\n color: rgba(58, 53, 65, 0.5); }\n\n.ant-form-item-label\n> label.ant-form-item-required:not(.ant-form-item-required-mark-optional)::before {\n margin-left: 0.2rem !important;\n color: rgba(255, 77, 79, 0.8) !important; }\n\n.ant-picker {\n border-radius: 5px !important;\n height: 35px !important; }\n\n.space-container {\n width: 100%; }\n .space-container .ant-space-item {\n width: 100%; }\n\n.PhoneInput .PhoneInputCountry {\n border: 1px solid #d9d9d9 !important;\n border-radius: 5px !important;\n padding: 0 1rem 0 1rem; }\n\n.PhoneInput .PhoneInputInput {\n flex: 1 1;\n min-width: 0;\n border-radius: 5px !important;\n height: 40px;\n border: 1px solid #d9d9d9 !important;\n outline: none; }\n\n.filter-title {\n color: rgba(58, 53, 65, 0.8);\n font-family: 'Inter';\n font-style: normal;\n font-weight: 600;\n font-size: 0.875rem; }\n\n.ant-radio-wrapper {\n font-family: 'Inter';\n font-style: normal;\n font-weight: 400;\n font-size: 0.875rem;\n line-height: 22px;\n color: rgba(58, 53, 65, 0.8); }\n\n.ant-list-item {\n color: rgba(58, 53, 65, 0.8); }\n\n.PhoneInput .PhoneInputInput:focus-visible,\n.PhoneInput .PhoneInputInput:hover {\n flex: 1 1;\n min-width: 0;\n border-radius: 5px !important;\n height: 40px;\n border-right: 1px solid #40a9ff !important;\n outline: 1px solid #40a9ff; }\n\n.layout-content-container {\n padding-bottom: 100px; }\n .layout-content-container .ant-btn-primary {\n background-color: #16b1ff;\n color: #ffffff;\n border: none; }\n .layout-content-container .ant-btn {\n height: 32px;\n font-weight: 500;\n font-size: 0.8rem;\n border-radius: 0.3rem;\n box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.25);\n min-width: 80px;\n box-shadow: none; }\n .layout-content-container .ant-btn span {\n text-transform: uppercase; }\n\n.content-container {\n padding: 0px 20px; }\n .content-container .title-bar {\n padding: 0px 0px 30px 0px; }\n .content-container .body-title {\n color: #16b1ff;\n font-weight: 500;\n font-size: 1.2rem; }\n .content-container .body-sub-title {\n color: rgba(58, 53, 65, 0.6);\n font-weight: 400;\n font-size: 0.8rem; }\n\n.content-card {\n background-color: #ffffff;\n border-radius: 10px;\n width: 100%; }\n .content-card .action-bar {\n padding: 1.6rem 1.3rem 1.6rem 1.3rem; }\n .content-card .action-bar button {\n width: fit-content; }\n .content-card .filter-section {\n padding: 1.4rem 1.3rem 1.6rem 1.3rem;\n display: flex;\n width: 100%;\n flex-direction: row;\n align-items: center;\n justify-content: end; }\n .content-card .filter-section .search-bar {\n display: flex;\n flex-direction: row-reverse; }\n .content-card .filter-section .filter-bar {\n display: flex;\n flex-direction: row-reverse;\n margin-top: 0.8rem;\n width: 5%; }\n .content-card .filter-section .ant-input-affix-wrapper {\n border-radius: 0.313rem 0 0 0.313rem !important; }\n .content-card .filter-section .ant-input-search\n> .ant-input-group\n> .ant-input-group-addon:last-child\n.ant-input-search-button {\n padding-top: 0;\n padding-bottom: 0;\n border-radius: 0 0.313rem 0.313rem 0 !important; }\n\n.layout-content-container .ant-btn {\n min-width: 50px !important; }\n\n.table-actions-section {\n width: 100%;\n margin-bottom: 1rem; }\n\n.action-menu {\n min-width: 120px;\n color: rgba(58, 53, 65, 0.6); }\n .action-menu .action-icon {\n margin-right: 12px;\n display: flex; }\n .action-menu .anticon-edit {\n color: #16b1ff; }\n .action-menu .anticon-delete {\n color: #f25a29; }\n\n.ant-dropdown-menu {\n padding: 1rem 2rem 1rem 1rem !important;\n border-radius: 5px; }\n\n.ant-dropdown-menu-item-active {\n background-color: transparent !important; }\n\n.ant-popover-inner-content .action-menu {\n margin: -12px -16px; }\n .ant-popover-inner-content .action-menu .ant-list-item {\n padding: 11px 16px;\n justify-content: flex-start;\n cursor: pointer; }\n\n.ant-tag {\n border-radius: 20px; }\n\n.clickable {\n cursor: pointer; }\n\n.text-center {\n text-align: center; }\n\n.float-left {\n float: left; }\n\n.float-right {\n float: right; }\n\n.apexcharts-canvas {\n font-family: \"Inter\" !important; }\n\n.apexcharts-legend-text {\n font-family: \"Inter\" !important; }\n\n.ant-tag {\n padding: 1px 10px; }\n\n.flex-display {\n display: flex; }\n\n.ant-modal-footer {\n border-top: none;\n text-align: center; }\n .ant-modal-footer button {\n margin: 10px 20px;\n text-transform: uppercase;\n font-size: 0.8rem; }\n\n.ant-modal-header {\n border-radius: 15px;\n border: none; }\n\n.ant-modal-content {\n border-radius: 15px;\n border: none; }\n\n.ant-modal-header {\n border: none; }\n\n.ant-modal-body {\n text-align: center;\n color: rgba(58, 53, 65, 0.6);\n font-size: 0.8rem; }\n .ant-modal-body .ant-select-selector {\n text-align: left;\n border-radius: 5px !important;\n height: 32px; }\n .ant-modal-body .form-label {\n text-align: left; }\n .ant-modal-body .form-label .req-ast {\n color: rgba(255, 77, 79, 0.8);\n padding-left: 5px; }\n .ant-modal-body .ant-form .ant-input-password {\n padding: 6.5px 11px;\n font-size: 16px; }\n .ant-modal-body .ant-form .ant-form-item-explain-error {\n text-align: start; }\n\n.popup-header {\n text-align: center;\n color: rgba(58, 53, 65, 0.8);\n font-weight: 600;\n font-family: \"Inter\";\n font-size: 0.9rem;\n margin: 25px 20px -20px 20px; }\n .popup-header .icon {\n font-size: 4rem;\n margin-bottom: 15px;\n font-weight: 400; }\n .popup-header img {\n height: 100px; }\n\n.popup-success .icon {\n color: #5dc380; }\n\n.popup-success .ant-btn-primary {\n background: #16b1ff;\n border-radius: #16b1ff;\n border: none; }\n\n.popup-success .ant-btn-default {\n color: rgba(58, 53, 65, 0.6);\n border-color: rgba(58, 53, 65, 0.6); }\n\n.popup-success .ant-btn-primary[disabled] {\n border-color: #d9d9d9;\n background: #f5f5f5; }\n\n.popup-primary .icon {\n color: #16b1ff; }\n\n.popup-primary .ant-btn-primary {\n background: #16b1ff;\n border-radius: #16b1ff;\n border: none; }\n\n.popup-primary .ant-btn-default {\n color: rgba(58, 53, 65, 0.6);\n border-color: rgba(58, 53, 65, 0.6); }\n\n.popup-primary .ant-btn-primary[disabled] {\n border-color: #d9d9d9;\n background: #f5f5f5; }\n\n.popup-danger .icon {\n color: rgba(255, 77, 79, 0.8); }\n\n.popup-danger .ant-btn-primary {\n background: rgba(255, 77, 79, 0.8);\n border-radius: rgba(255, 77, 79, 0.8);\n border: none; }\n\n.popup-danger .ant-btn-primary[disabled] {\n border-color: #d9d9d9;\n background: #f5f5f5; }\n\n.popup-danger .ant-btn-default {\n color: rgba(58, 53, 65, 0.6);\n border-color: rgba(58, 53, 65, 0.6); }\n\n.ant-modal-footer .ant-btn {\n height: 32px;\n border-radius: 4px;\n padding: 6px 16px;\n font-weight: 500; }\n\n.ant-modal-footer .ant-btn-default {\n color: rgba(140, 140, 140, 0.7) !important;\n border-color: rgba(140, 140, 140, 0.7) !important; }\n\n.ant-tag-processing {\n color: #16b1ff;\n background: rgba(185, 226, 244, 0.4); }\n\n.filter-section input {\n font-family: 'Inter';\n font-size: 0.8rem !important; }\n\n.pull-right {\n float: right; }\n\n.disabled {\n opacity: 0.5; }\n\n.mg-left-3 {\n margin-left: 3rem; }\n\n.mg-left-2 {\n margin-left: 2rem !important; }\n\n.mg-left-1 {\n margin-left: 1rem; }\n\n.mg-top-1 {\n margin-top: 1rem; }\n\n.mg-top-2 {\n margin-top: 2rem; }\n\n.mg-bottom-1 {\n margin-bottom: 1rem !important; }\n\n.transfer-form {\n padding: 0px 15px;\n color: rgba(58, 53, 65, 0.6); }\n .transfer-form .popup-credit-input .ant-form-item-explain-error {\n width: 200px; }\n .transfer-form .info-container {\n display: flex;\n flex-direction: row;\n width: 10%;\n height: 20px;\n align-items: center;\n justify-content: start;\n margin-left: 5px; }\n .transfer-form .ant-row {\n align-items: unset; }\n .transfer-form .sub-text {\n margin-bottom: 35px;\n font-size: 0.9rem;\n font-weight: 500; }\n .transfer-form .label {\n text-align: left;\n font-size: 0.9rem;\n color: rgba(58, 53, 65, 0.6); }\n .transfer-form .seperator {\n font-size: 1.2rem;\n color: #d9d9d9; }\n .transfer-form .footer {\n margin-bottom: 0px;\n margin-top: 15px; }\n .transfer-form label {\n font-size: 0.8rem; }\n .transfer-form .ant-radio-wrapper {\n font-size: 0.9rem; }\n .transfer-form input {\n color: rgba(58, 53, 65, 0.6); }\n .transfer-form button {\n text-transform: uppercase;\n font-weight: 500; }\n\n.color-error {\n color: rgba(255, 77, 79, 0.8); }\n\n.color-primary {\n color: #16b1ff; }\n\n.ant-input-number-input {\n text-align: right; }\n\n.text-left {\n text-align: left; }\n\n.ant-form-item .ant-radio-group {\n text-align: left; }\n\n.loading-center {\n margin: auto;\n text-align: center;\n position: absolute;\n top: 50%;\n left: 50%; }\n\n.ant-tag-purple {\n color: #976ed7; }\n\n.ant-tag-orange {\n color: #ff8f56; }\n\n.ant-tag-default {\n color: rgba(58, 53, 65, 0.5); }\n\n.ant-popover-inner {\n border-radius: 4px; }\n\n.ant-input-number {\n border-radius: 5px; }\n\n.ret-icon {\n background-color: rgba(254, 241, 173, 0.5);\n color: #ff8f56; }\n\n.flag-ret-icon {\n display: flex !important;\n background-color: #f4f5fa;\n font-size: 1.1rem !important;\n padding: 7px; }\n\n.b-icon {\n vertical-align: middle; }\n\n.ant-message-notice-content {\n padding: 0px;\n border-radius: 5px; }\n .ant-message-notice-content .ant-message-custom-content {\n font-size: 0.8rem;\n border-radius: 5px;\n padding: 17px 24px; }\n .ant-message-notice-content .ant-message-error {\n color: rgba(255, 77, 79, 0.8);\n border: 1px solid rgba(255, 77, 79, 0.8); }\n .ant-message-notice-content .ant-message-success {\n color: #5bce00;\n border: 1px solid #5bce00; }\n\n.ant-select-selection-item {\n color: rgba(58, 53, 65, 0.6); }\n\n.sub-text {\n font-size: 0.9rem;\n font-weight: 500; }\n\n.search-filter {\n margin-right: 15px; }\n\n.download-data-btn {\n margin-left: 15px; }\n\n.mg-bottom-0 {\n margin-bottom: 0px; }\n\n.padding-bottom-0 {\n padding-bottom: 0px; }\n\n.ellipsis-overflow {\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 1;\n -webkit-box-orient: vertical; }\n\n.nextline-overflow {\n overflow-wrap: break-word; }\n\n.ant-message {\n width: 50%;\n right: 0px;\n left: auto;\n min-width: 400px; }\n";
|
1208
|
+
var css_248z$v = "body {\n background-color: #f4f5fa;\n font-family: \"Inter\";\n font-weight: 400; }\n body .ant-menu {\n background-color: #f4f5fa; }\n body .ant-layout-header {\n background-color: #f4f5fa; }\n body .ant-layout {\n background-color: #f4f5fa; }\n body .ant-menu-submenu .ant-menu {\n background-color: #f4f5fa; }\n body .ant-menu-item {\n background-color: #f4f5fa; }\n body .ant-menu-sub {\n background-color: #f4f5fa; }\n body .ant-table-content {\n font-family: \"Inter\"; }\n body .ant-input {\n border-radius: 5px !important; }\n body .ant-btn {\n border-radius: 5px !important; }\n body .ant-input-group-addon:first-child {\n border-radius: 5px !important; }\n body .ant-input-group .ant-input {\n width: 99% !important; }\n body .ant-radio-group {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between; }\n body .ant-radio-group-large .ant-radio-button-wrapper {\n font-size: 0.8rem;\n width: 25%;\n border-radius: 5px !important; }\n body .ant-upload-list-picture .ant-upload-list-item-error,\n body .ant-upload-list-picture-card .ant-upload-list-item-error {\n border-color: #40a9ff;\n border-radius: 5px;\n height: 40px; }\n body .ant-upload-list-picture .ant-upload-list-item-error .ant-upload-list-item-name,\n body .ant-upload-list-picture-card .ant-upload-list-item-error .ant-upload-list-item-name {\n color: #40a9ff !important; }\n body .ant-upload-list-item-error .ant-upload-list-item-card-actions .anticon {\n color: #40a9ff; }\n body .ant-input-status-error:not(.ant-input-disabled):not(.ant-input-borderless).ant-input,\n body .ant-input-status-error:not(.ant-input-disabled):not(.ant-input-borderless).ant-input:hover {\n border-color: #d9d9d9 !important; }\n body .ant-input-group-wrapper-status-error .ant-input-group-addon {\n border-color: #d9d9d9 !important; }\n body .ant-form-item-explain-error {\n font-size: 13px;\n color: rgba(255, 77, 79, 0.8); }\n body .ant-table-thead\n> tr\n> th:not(:last-child):not(.ant-table-selection-column):not(.ant-table-row-expand-icon-cell):not([colspan])::before {\n background-color: transparent !important; }\n body .ant-form-item-label > label {\n flex-direction: row-reverse !important;\n color: rgba(58, 53, 65, 0.5); }\n body .ant-form-item-label\n> label.ant-form-item-required:not(.ant-form-item-required-mark-optional)::before {\n margin-left: 0.2rem !important;\n color: rgba(255, 77, 79, 0.8) !important; }\n body .ant-picker {\n border-radius: 5px !important;\n height: 35px !important; }\n body .space-container {\n width: 100%; }\n body .space-container .ant-space-item {\n width: 100%; }\n body .PhoneInput .PhoneInputCountry {\n border: 1px solid #d9d9d9 !important;\n border-radius: 5px !important;\n padding: 0 1rem 0 1rem; }\n body .PhoneInput .PhoneInputInput {\n flex: 1 1;\n min-width: 0;\n border-radius: 5px !important;\n height: 40px;\n border: 1px solid #d9d9d9 !important;\n outline: none; }\n body .filter-title {\n color: rgba(58, 53, 65, 0.8);\n font-family: 'Inter';\n font-style: normal;\n font-weight: 600;\n font-size: 0.875rem; }\n body .ant-radio-wrapper {\n font-family: 'Inter';\n font-style: normal;\n font-weight: 400;\n font-size: 0.875rem;\n line-height: 22px;\n color: rgba(58, 53, 65, 0.8); }\n body .ant-list-item {\n color: rgba(58, 53, 65, 0.8); }\n body .PhoneInput .PhoneInputInput:focus-visible,\n body .PhoneInput .PhoneInputInput:hover {\n flex: 1 1;\n min-width: 0;\n border-radius: 5px !important;\n height: 40px;\n border-right: 1px solid #40a9ff !important;\n outline: 1px solid #40a9ff; }\n body .layout-content-container {\n padding-bottom: 100px; }\n body .layout-content-container .ant-btn-primary {\n background-color: #16b1ff;\n color: #ffffff;\n border: none; }\n body .layout-content-container .ant-btn {\n height: 32px;\n font-weight: 500;\n font-size: 0.8rem;\n border-radius: 0.3rem;\n box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.25);\n min-width: 80px;\n box-shadow: none; }\n body .layout-content-container .ant-btn span {\n text-transform: uppercase; }\n body .content-container {\n padding: 0px 20px; }\n body .content-container .title-bar {\n padding: 0px 0px 30px 0px; }\n body .content-container .body-title {\n color: #16b1ff;\n font-weight: 500;\n font-size: 1.2rem; }\n body .content-container .body-sub-title {\n color: rgba(58, 53, 65, 0.6);\n font-weight: 400;\n font-size: 0.8rem; }\n body .content-card {\n background-color: #ffffff;\n border-radius: 10px;\n width: 100%; }\n body .content-card .action-bar {\n padding: 1.6rem 1.3rem 1.6rem 1.3rem; }\n body .content-card .action-bar button {\n width: fit-content; }\n body .content-card .filter-section {\n padding: 1.4rem 1.3rem 1.6rem 1.3rem;\n display: flex;\n width: 100%;\n flex-direction: row;\n align-items: center;\n justify-content: end; }\n body .content-card .filter-section .search-bar {\n display: flex;\n flex-direction: row-reverse; }\n body .content-card .filter-section .filter-bar {\n display: flex;\n flex-direction: row-reverse;\n margin-top: 0.8rem;\n width: 5%; }\n body .content-card .filter-section .ant-input-affix-wrapper {\n border-radius: 0.313rem 0 0 0.313rem !important; }\n body .content-card .filter-section .ant-input-search\n> .ant-input-group\n> .ant-input-group-addon:last-child\n.ant-input-search-button {\n padding-top: 0;\n padding-bottom: 0;\n border-radius: 0 0.313rem 0.313rem 0 !important; }\n body .layout-content-container .ant-btn {\n min-width: 50px !important; }\n body .table-actions-section {\n width: 100%;\n margin-bottom: 1rem; }\n body .action-menu {\n min-width: 120px;\n color: rgba(58, 53, 65, 0.6); }\n body .action-menu .action-icon {\n margin-right: 12px;\n display: flex; }\n body .action-menu .anticon-edit {\n color: #16b1ff; }\n body .action-menu .anticon-delete {\n color: #f25a29; }\n body .ant-dropdown-menu {\n padding: 1rem 2rem 1rem 1rem !important;\n border-radius: 5px; }\n body .ant-dropdown-menu-item-active {\n background-color: transparent !important; }\n body .ant-popover-inner-content .action-menu {\n margin: -12px -16px; }\n body .ant-popover-inner-content .action-menu .ant-list-item {\n padding: 11px 16px;\n justify-content: flex-start;\n cursor: pointer; }\n body .ant-tag {\n border-radius: 20px; }\n body .clickable {\n cursor: pointer; }\n body .text-center {\n text-align: center; }\n body .float-left {\n float: left; }\n body .float-right {\n float: right; }\n body .apexcharts-canvas {\n font-family: \"Inter\" !important; }\n body .apexcharts-legend-text {\n font-family: \"Inter\" !important; }\n body .ant-tag {\n padding: 1px 10px; }\n body .flex-display {\n display: flex; }\n body .ant-modal-footer {\n border-top: none;\n text-align: center; }\n body .ant-modal-footer button {\n margin: 10px 20px;\n text-transform: uppercase;\n font-size: 0.8rem; }\n body .ant-modal-header {\n border-radius: 15px;\n border: none; }\n body .ant-modal-content {\n border-radius: 15px;\n border: none; }\n body .ant-modal-header {\n border: none; }\n body .ant-modal-body {\n text-align: center;\n color: rgba(58, 53, 65, 0.6);\n font-size: 0.8rem; }\n body .ant-modal-body .ant-select-selector {\n text-align: left;\n border-radius: 5px !important;\n height: 32px; }\n body .ant-modal-body .form-label {\n text-align: left; }\n body .ant-modal-body .form-label .req-ast {\n color: rgba(255, 77, 79, 0.8);\n padding-left: 5px; }\n body .ant-modal-body .ant-form .ant-input-password {\n padding: 6.5px 11px;\n font-size: 16px; }\n body .ant-modal-body .ant-form .ant-form-item-explain-error {\n text-align: start; }\n body .popup-header {\n text-align: center;\n color: rgba(58, 53, 65, 0.8);\n font-weight: 600;\n font-family: \"Inter\";\n font-size: 0.9rem;\n margin: 25px 20px -20px 20px; }\n body .popup-header .icon {\n font-size: 4rem;\n margin-bottom: 15px;\n font-weight: 400; }\n body .popup-header img {\n height: 100px; }\n body .popup-success .icon {\n color: #5dc380; }\n body .popup-success .ant-btn-primary {\n background: #16b1ff;\n border-radius: #16b1ff;\n border: none; }\n body .popup-success .ant-btn-default {\n color: rgba(58, 53, 65, 0.6);\n border-color: rgba(58, 53, 65, 0.6); }\n body .popup-success .ant-btn-primary[disabled] {\n border-color: #d9d9d9;\n background: #f5f5f5; }\n body .popup-primary .icon {\n color: #16b1ff; }\n body .popup-primary .ant-btn-primary {\n background: #16b1ff;\n border-radius: #16b1ff;\n border: none; }\n body .popup-primary .ant-btn-default {\n color: rgba(58, 53, 65, 0.6);\n border-color: rgba(58, 53, 65, 0.6); }\n body .popup-primary .ant-btn-primary[disabled] {\n border-color: #d9d9d9;\n background: #f5f5f5; }\n body .popup-danger .icon {\n color: rgba(255, 77, 79, 0.8); }\n body .popup-danger .ant-btn-primary {\n background: rgba(255, 77, 79, 0.8);\n border-radius: rgba(255, 77, 79, 0.8);\n border: none; }\n body .popup-danger .ant-btn-primary[disabled] {\n border-color: #d9d9d9;\n background: #f5f5f5; }\n body .popup-danger .ant-btn-default {\n color: rgba(58, 53, 65, 0.6);\n border-color: rgba(58, 53, 65, 0.6); }\n body .ant-modal-footer .ant-btn {\n height: 32px;\n border-radius: 4px;\n padding: 6px 16px;\n font-weight: 500; }\n body .ant-modal-footer .ant-btn-default {\n color: rgba(140, 140, 140, 0.7) !important;\n border-color: rgba(140, 140, 140, 0.7) !important; }\n body .ant-tag-processing {\n color: #16b1ff;\n background: rgba(185, 226, 244, 0.4); }\n body .filter-section input {\n font-family: 'Inter';\n font-size: 0.8rem !important; }\n body .pull-right {\n float: right; }\n body .disabled {\n opacity: 0.5; }\n body .mg-left-3 {\n margin-left: 3rem; }\n body .mg-left-2 {\n margin-left: 2rem !important; }\n body .mg-left-1 {\n margin-left: 1rem; }\n body .mg-top-1 {\n margin-top: 1rem; }\n body .mg-top-2 {\n margin-top: 2rem; }\n body .mg-bottom-1 {\n margin-bottom: 1rem !important; }\n body .transfer-form {\n padding: 0px 15px;\n color: rgba(58, 53, 65, 0.6); }\n body .transfer-form .popup-credit-input .ant-form-item-explain-error {\n width: 200px; }\n body .transfer-form .info-container {\n display: flex;\n flex-direction: row;\n width: 10%;\n height: 20px;\n align-items: center;\n justify-content: start;\n margin-left: 5px; }\n body .transfer-form .ant-row {\n align-items: unset; }\n body .transfer-form .sub-text {\n margin-bottom: 35px;\n font-size: 0.9rem;\n font-weight: 500; }\n body .transfer-form .label {\n text-align: left;\n font-size: 0.9rem;\n color: rgba(58, 53, 65, 0.6); }\n body .transfer-form .seperator {\n font-size: 1.2rem;\n color: #d9d9d9; }\n body .transfer-form .footer {\n margin-bottom: 0px;\n margin-top: 15px; }\n body .transfer-form label {\n font-size: 0.8rem; }\n body .transfer-form .ant-radio-wrapper {\n font-size: 0.9rem; }\n body .transfer-form input {\n color: rgba(58, 53, 65, 0.6); }\n body .transfer-form button {\n text-transform: uppercase;\n font-weight: 500; }\n body .color-error {\n color: rgba(255, 77, 79, 0.8); }\n body .color-primary {\n color: #16b1ff; }\n body .ant-input-number-input {\n text-align: right; }\n body .text-left {\n text-align: left; }\n body .ant-form-item .ant-radio-group {\n text-align: left; }\n body .loading-center {\n margin: auto;\n text-align: center;\n position: absolute;\n top: 50%;\n left: 50%; }\n body .ant-tag-purple {\n color: #976ed7; }\n body .ant-tag-orange {\n color: #ff8f56; }\n body .ant-tag-default {\n color: rgba(58, 53, 65, 0.5); }\n body .ant-popover-inner {\n border-radius: 4px; }\n body .ant-input-number {\n border-radius: 5px; }\n body .ret-icon {\n background-color: rgba(254, 241, 173, 0.5);\n color: #ff8f56; }\n body .flag-ret-icon {\n display: flex !important;\n background-color: #f4f5fa;\n font-size: 1.1rem !important;\n padding: 7px; }\n body .b-icon {\n vertical-align: middle; }\n body .ant-message-notice-content {\n padding: 0px;\n border-radius: 5px; }\n body .ant-message-notice-content .ant-message-custom-content {\n font-size: 0.8rem;\n border-radius: 5px;\n padding: 17px 24px; }\n body .ant-message-notice-content .ant-message-error {\n color: rgba(255, 77, 79, 0.8);\n border: 1px solid rgba(255, 77, 79, 0.8); }\n body .ant-message-notice-content .ant-message-success {\n color: #5bce00;\n border: 1px solid #5bce00; }\n body .ant-select-selection-item {\n color: rgba(58, 53, 65, 0.6); }\n body .sub-text {\n font-size: 0.9rem;\n font-weight: 500; }\n body .search-filter {\n margin-right: 15px; }\n body .mg-bottom-0 {\n margin-bottom: 0px; }\n body .padding-bottom-0 {\n padding-bottom: 0px; }\n body .ellipsis-overflow {\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 1;\n -webkit-box-orient: vertical; }\n body .nextline-overflow {\n overflow-wrap: break-word; }\n body .ant-message {\n width: 50%;\n right: 0px;\n left: auto;\n min-width: 400px; }\n body .download-data-btn {\n margin-left: 15px; }\n";
|
900
1209
|
styleInject(css_248z$v);
|
901
1210
|
|
902
1211
|
var UserManagementColumns;
|
@@ -5865,7 +6174,7 @@ var Projection = /** @class */ (function () {
|
|
5865
6174
|
|
5866
6175
|
var AddNewCompanyComponent = function (props) {
|
5867
6176
|
var _a;
|
5868
|
-
var t = props.t, onNavigateToCompanyManagement = props.onNavigateToCompanyManagement, maximumImageSize = props.maximumImageSize,
|
6177
|
+
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;
|
5869
6178
|
var formOne = Form.useForm()[0];
|
5870
6179
|
var formTwo = Form.useForm()[0];
|
5871
6180
|
var _b = useState(), stepOneData = _b[0], setStepOneData = _b[1];
|
@@ -6751,7 +7060,7 @@ var CompanyDetailsComponent = function (props) {
|
|
6751
7060
|
};
|
6752
7061
|
|
6753
7062
|
var CompanyProfileComponent = function (props) {
|
6754
|
-
var t = props.t, useAbilityContext = props.useAbilityContext, useLocation = props.useLocation,
|
7063
|
+
var t = props.t, useAbilityContext = props.useAbilityContext, useLocation = props.useLocation, onNavigateToCompanyManagement = props.onNavigateToCompanyManagement, onNavigateToCompanyEdit = props.onNavigateToCompanyEdit; props.regionField; var systemType = props.systemType;
|
6755
7064
|
var _a = useConnection(), get = _a.get, put = _a.put, post = _a.post;
|
6756
7065
|
var _b = useState(undefined), companyDetails = _b[0], setCompanyDetails = _b[1];
|
6757
7066
|
var _c = useState(undefined), userDetails = _c[0], setUserDetails = _c[1];
|
@@ -7095,7 +7404,7 @@ styleInject(css_248z$s);
|
|
7095
7404
|
|
7096
7405
|
var Search$1 = Input.Search;
|
7097
7406
|
var ProgrammeManagementComponent = function (props) {
|
7098
|
-
var t = props.t, visibleColumns = props.visibleColumns,
|
7407
|
+
var t = props.t, visibleColumns = props.visibleColumns, onNavigateToProgrammeView = props.onNavigateToProgrammeView, onClickAddProgramme = props.onClickAddProgramme, enableAddProgramme = props.enableAddProgramme, useAbilityContext = props.useAbilityContext;
|
7099
7408
|
var _a = useConnection(); _a.get; _a.delete; var post = _a.post;
|
7100
7409
|
var _b = useState(), totalProgramme = _b[0], setTotalProgramme = _b[1];
|
7101
7410
|
var _c = useState(false), loading = _c[0], setLoading = _c[1];
|
@@ -7323,7 +7632,7 @@ var ProgrammeManagementComponent = function (props) {
|
|
7323
7632
|
filter.push({
|
7324
7633
|
key: "title",
|
7325
7634
|
operation: "like",
|
7326
|
-
value: "".concat(search, "%"),
|
7635
|
+
value: "%".concat(search, "%"),
|
7327
7636
|
});
|
7328
7637
|
}
|
7329
7638
|
if (ministryLevelFilter) {
|
@@ -7530,7 +7839,7 @@ var ProgrammeManagementComponent = function (props) {
|
|
7530
7839
|
React.createElement("div", { className: "filter-section" },
|
7531
7840
|
React.createElement("div", { className: "search-filter" },
|
7532
7841
|
React.createElement(Checkbox, { className: "label", onChange: function (v) {
|
7533
|
-
if (userInfoState.companyRole === CompanyRole.MINISTRY) {
|
7842
|
+
if ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.MINISTRY) {
|
7534
7843
|
if (v.target.checked) {
|
7535
7844
|
setMinistryLevelFilter(true);
|
7536
7845
|
}
|
@@ -7547,7 +7856,7 @@ var ProgrammeManagementComponent = function (props) {
|
|
7547
7856
|
}
|
7548
7857
|
: undefined);
|
7549
7858
|
}
|
7550
|
-
} }, userInfoState.companyRole === CompanyRole.MINISTRY
|
7859
|
+
} }, (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.MINISTRY
|
7551
7860
|
? t("view:ministryLevel")
|
7552
7861
|
: t("view:seeMine"))),
|
7553
7862
|
React.createElement("div", { className: "search-bar" },
|
@@ -13334,7 +13643,7 @@ var sectoralScopes = {
|
|
13334
13643
|
};
|
13335
13644
|
var ProgrammeCreationComponent = function (props) {
|
13336
13645
|
var _a, _b, _c;
|
13337
|
-
var
|
13646
|
+
var useLocation = props.useLocation, onNavigateToProgrammeView = props.onNavigateToProgrammeView, translator = props.translator;
|
13338
13647
|
var t = translator.t;
|
13339
13648
|
var state = useLocation().state;
|
13340
13649
|
var formOne = Form.useForm()[0];
|
@@ -14399,7 +14708,7 @@ var ChangePasswordModel = function (props) {
|
|
14399
14708
|
|
14400
14709
|
var AddNewUserComponent = function (props) {
|
14401
14710
|
var _a, _b, _c, _d, _e, _f;
|
14402
|
-
var t = props.t, onNavigateToUserManagement = props.onNavigateToUserManagement, onNavigateLogin = props.onNavigateLogin,
|
14711
|
+
var t = props.t, onNavigateToUserManagement = props.onNavigateToUserManagement, onNavigateLogin = props.onNavigateLogin, useLocation = props.useLocation, useAbilityContext = props.useAbilityContext, themeColor = props.themeColor;
|
14403
14712
|
var _g = useConnection(), post = _g.post, put = _g.put, del = _g.delete, get = _g.get;
|
14404
14713
|
var formOne = Form.useForm()[0];
|
14405
14714
|
var state = useLocation().state;
|
@@ -14817,7 +15126,7 @@ var LanguageSelection = function (props) {
|
|
14817
15126
|
};
|
14818
15127
|
|
14819
15128
|
var UserProfileComponent = function (props) {
|
14820
|
-
var t = props.t, i18n = props.i18n,
|
15129
|
+
var t = props.t, i18n = props.i18n, onNavigateUpdateUser = props.onNavigateUpdateUser, onNavigateLogin = props.onNavigateLogin;
|
14821
15130
|
var get = useConnection().get;
|
14822
15131
|
var _a = useState(undefined), organisationDetails = _a[0], setOrganisationDetails = _a[1];
|
14823
15132
|
var _b = useState(undefined), userDetails = _b[0], setUserDetails = _b[1];
|
@@ -14909,7 +15218,7 @@ styleInject(css_248z$n);
|
|
14909
15218
|
|
14910
15219
|
var Search = Input.Search;
|
14911
15220
|
var UserManagementComponent = function (props) {
|
14912
|
-
var t = props.t, useAbilityContext = props.useAbilityContext,
|
15221
|
+
var t = props.t, useAbilityContext = props.useAbilityContext, visibleColumns = props.visibleColumns, onNavigateToUpdateUser = props.onNavigateToUpdateUser, onClickAddUser = props.onClickAddUser;
|
14913
15222
|
Form.useForm()[0];
|
14914
15223
|
var _a = useConnection(), post = _a.post, del = _a.delete;
|
14915
15224
|
var _b = useState(), totalUser = _b[0], setTotalUser = _b[1];
|
@@ -14932,6 +15241,7 @@ var UserManagementComponent = function (props) {
|
|
14932
15241
|
var _t = useState(false), openDeleteConfirmationModal = _t[0], setOpenDeleteConfirmationModal = _t[1];
|
14933
15242
|
var _u = useState(), dataQuery = _u[0], setDataQuery = _u[1];
|
14934
15243
|
var ability = useAbilityContext();
|
15244
|
+
var userInfoState = useUserContext().userInfoState;
|
14935
15245
|
document.addEventListener("mousedown", function (event) {
|
14936
15246
|
var userFilterArea1 = document.querySelector(".filter-bar");
|
14937
15247
|
var userFilterArea2 = document.querySelector(".filter-dropdown");
|
@@ -15143,7 +15453,7 @@ var UserManagementComponent = function (props) {
|
|
15143
15453
|
{
|
15144
15454
|
key: searchByTermUser,
|
15145
15455
|
operation: "like",
|
15146
|
-
value: networksearchUsers + "%",
|
15456
|
+
value: "%" + networksearchUsers + "%",
|
15147
15457
|
},
|
15148
15458
|
];
|
15149
15459
|
}
|
@@ -15161,7 +15471,7 @@ var UserManagementComponent = function (props) {
|
|
15161
15471
|
{
|
15162
15472
|
key: searchByTermUser,
|
15163
15473
|
operation: "like",
|
15164
|
-
value: networksearchUsers + "%",
|
15474
|
+
value: "%" + networksearchUsers + "%",
|
15165
15475
|
},
|
15166
15476
|
{
|
15167
15477
|
key: "role",
|
@@ -15184,7 +15494,7 @@ var UserManagementComponent = function (props) {
|
|
15184
15494
|
{
|
15185
15495
|
key: searchByTermUser,
|
15186
15496
|
operation: "like",
|
15187
|
-
value: networksearchUsers + "%",
|
15497
|
+
value: "%" + networksearchUsers + "%",
|
15188
15498
|
},
|
15189
15499
|
{
|
15190
15500
|
key: "role",
|
@@ -15202,7 +15512,7 @@ var UserManagementComponent = function (props) {
|
|
15202
15512
|
{
|
15203
15513
|
key: searchByTermUser,
|
15204
15514
|
operation: "like",
|
15205
|
-
value: networksearchUsers + "%",
|
15515
|
+
value: "%" + networksearchUsers + "%",
|
15206
15516
|
},
|
15207
15517
|
{
|
15208
15518
|
key: "companyRole",
|
@@ -15519,7 +15829,7 @@ var InsurancePayback;
|
|
15519
15829
|
|
15520
15830
|
var RangePicker$3 = DatePicker.RangePicker;
|
15521
15831
|
var InvestmentCreationComponent = function (props) {
|
15522
|
-
var t = props.t,
|
15832
|
+
var t = props.t, useLocation = props.useLocation, onNavigateToProgrammeManagementView = props.onNavigateToProgrammeManagementView, onNavigateToProgrammeView = props.onNavigateToProgrammeView;
|
15523
15833
|
var state = useLocation().state;
|
15524
15834
|
var _a = useState(), data = _a[0], setData = _a[1];
|
15525
15835
|
var formOne = Form.useForm()[0];
|
@@ -15534,6 +15844,7 @@ var InvestmentCreationComponent = function (props) {
|
|
15534
15844
|
var _h = useState([]), instrument = _h[0], setInstrument = _h[1];
|
15535
15845
|
var _j = useState(), stepOneData = _j[0], setStepOneData = _j[1];
|
15536
15846
|
var _k = useState(), govData = _k[0], setGovData = _k[1];
|
15847
|
+
var userInfoState = useUserContext().userInfoState;
|
15537
15848
|
var instrumentOptions = Object.keys(Instrument).map(function (k, index) { return ({
|
15538
15849
|
label: addSpaces(Object.values(Instrument)[index]),
|
15539
15850
|
value: Object.values(Instrument)[index],
|
@@ -16363,7 +16674,7 @@ var InvestmentActionModel = function (props) {
|
|
16363
16674
|
};
|
16364
16675
|
|
16365
16676
|
var InvestmentManagementComponent = function (props) {
|
16366
|
-
var translator = props.translator,
|
16677
|
+
var translator = props.translator, onNavigateToProgrammeView = props.onNavigateToProgrammeView, onClickAddOwnership = props.onClickAddOwnership, enableAddOwnership = props.enableAddOwnership;
|
16367
16678
|
var t = translator.t;
|
16368
16679
|
var statusOptions = Object.keys(InvestmentStatus).map(function (k, index) { return ({
|
16369
16680
|
label: addSpaces(Object.values(InvestmentStatus)[index]),
|
@@ -16435,7 +16746,7 @@ var InvestmentManagementComponent = function (props) {
|
|
16435
16746
|
{
|
16436
16747
|
key: "programmeTitle",
|
16437
16748
|
operation: "like",
|
16438
|
-
value: "".concat(search, "%"),
|
16749
|
+
value: "%".concat(search, "%"),
|
16439
16750
|
},
|
16440
16751
|
];
|
16441
16752
|
if (!isNaN(Number(search))) {
|
@@ -16954,7 +17265,7 @@ var css_248z$l = ".steps-actions {\n display: flex;\n flex-direction: row-reve
|
|
16954
17265
|
styleInject(css_248z$l);
|
16955
17266
|
|
16956
17267
|
var SupportCreationComponent = function (props) {
|
16957
|
-
var t = props.t,
|
17268
|
+
var t = props.t, useLocation = props.useLocation; props.onNavigateToProgrammeManagementView; props.onNavigateToProgrammeView;
|
16958
17269
|
useLocation().state;
|
16959
17270
|
var _a = useState(); _a[0]; _a[1];
|
16960
17271
|
var formOne = Form.useForm()[0];
|
@@ -16967,6 +17278,7 @@ var SupportCreationComponent = function (props) {
|
|
16967
17278
|
var _f = useState([]), organisationsList = _f[0], setOrganisationList = _f[1];
|
16968
17279
|
var _g = useState([]), instrument = _g[0], setInstrument = _g[1];
|
16969
17280
|
var _h = useState(); _h[0]; var setStepOneData = _h[1];
|
17281
|
+
var userInfoState = useUserContext().userInfoState;
|
16970
17282
|
var instrumentOptions = Object.keys(Instrument).map(function (k, index) { return ({
|
16971
17283
|
label: addSpaces(Object.values(Instrument)[index]),
|
16972
17284
|
value: Object.values(Instrument)[index],
|
@@ -17309,7 +17621,7 @@ var SupportCreationComponent = function (props) {
|
|
17309
17621
|
};
|
17310
17622
|
|
17311
17623
|
var SupportManagementComponent = function (props) {
|
17312
|
-
var translator = props.translator
|
17624
|
+
var translator = props.translator; props.onNavigateToProgrammeView; var enableAddSupport = props.enableAddSupport, onClickAddSupport = props.onClickAddSupport;
|
17313
17625
|
var t = translator.t;
|
17314
17626
|
var statusOptions = Object.keys(InvestmentStatus).map(function (k, index) { return ({
|
17315
17627
|
label: addSpaces(Object.values(InvestmentStatus)[index]),
|
@@ -17380,7 +17692,7 @@ var SupportManagementComponent = function (props) {
|
|
17380
17692
|
{
|
17381
17693
|
key: "programmeTitle",
|
17382
17694
|
operation: "like",
|
17383
|
-
value: "".concat(search, "%"),
|
17695
|
+
value: "%".concat(search, "%"),
|
17384
17696
|
},
|
17385
17697
|
];
|
17386
17698
|
if (!isNaN(Number(search))) {
|
@@ -17811,7 +18123,7 @@ var css_248z$k = ".ndc-management .ant-checkbox-checked .ant-checkbox-input[valu
|
|
17811
18123
|
styleInject(css_248z$k);
|
17812
18124
|
|
17813
18125
|
var NdcActionManagementComponent = function (props) {
|
17814
|
-
var t = props.t,
|
18126
|
+
var t = props.t, onNavigateToNdcManagementView = props.onNavigateToNdcManagementView, onNavigateToProgrammeManagementView = props.onNavigateToProgrammeManagementView;
|
17815
18127
|
var _a = useState(true), checkAll = _a[0], setCheckAll = _a[1];
|
17816
18128
|
var _b = useState([]), tableData = _b[0], setTableData = _b[1];
|
17817
18129
|
var _c = useState(), totalProgramme = _c[0], setTotalProgramme = _c[1];
|
@@ -17965,14 +18277,14 @@ var NdcActionManagementComponent = function (props) {
|
|
17965
18277
|
{
|
17966
18278
|
key: "programmeName",
|
17967
18279
|
operation: "like",
|
17968
|
-
value: "".concat(search, "%"),
|
18280
|
+
value: "%".concat(search, "%"),
|
17969
18281
|
},
|
17970
18282
|
];
|
17971
18283
|
if (!isNaN(Number(search))) {
|
17972
18284
|
interFilterOr.push({
|
17973
18285
|
key: "id",
|
17974
18286
|
operation: "like",
|
17975
|
-
value: "".concat(search),
|
18287
|
+
value: "%".concat(search, "%"),
|
17976
18288
|
});
|
17977
18289
|
}
|
17978
18290
|
filter.push({
|
@@ -21630,7 +21942,7 @@ var SocialEnvironmentalRisk = function (props) {
|
|
21630
21942
|
};
|
21631
21943
|
|
21632
21944
|
var CoBenifitsComponent = function (props) {
|
21633
|
-
var onClickedBackBtn = props.onClickedBackBtn, onFormSubmit = props.onFormSubmit, coBenefitsDetails = props.coBenefitsDetails, submitButtonText = props.submitButtonText, viewOnly = props.viewOnly, coBenifitsViewDetails = props.coBenifitsViewDetails, _a = props.loading, loading = _a === void 0 ? false : _a, sdgGoalImages = props.sdgGoalImages, translator = props.translator
|
21945
|
+
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;
|
21634
21946
|
var _b = useState(), coBenefitDetails = _b[0], setCoBenefitDetails = _b[1];
|
21635
21947
|
var _c = useState(true), isSocialFormValid = _c[0], setIsSocialFormValid = _c[1];
|
21636
21948
|
var _d = useState(true), isAssessmentFormValid = _d[0], setIsAssessmentFormValid = _d[1];
|
@@ -21704,7 +22016,7 @@ var CoBenifitsComponent = function (props) {
|
|
21704
22016
|
label: t("coBenifits:assessment"),
|
21705
22017
|
key: "7",
|
21706
22018
|
children: (React.createElement(Assessment, { onFormSubmit: onAssessmentFormSubmit, assessmentViewData: (viewOnly && (coBenifitsViewDetails === null || coBenifitsViewDetails === void 0 ? void 0 : coBenifitsViewDetails.assessmentDetails)) ||
|
21707
|
-
(!viewOnly && (coBenefitsDetails === null || coBenefitsDetails === void 0 ? void 0 : coBenefitsDetails.assessmentDetails)), viewOnly: viewOnly || false,
|
22019
|
+
(!viewOnly && (coBenefitsDetails === null || coBenefitsDetails === void 0 ? void 0 : coBenefitsDetails.assessmentDetails)), viewOnly: viewOnly || false, translator: translator })),
|
21708
22020
|
},
|
21709
22021
|
{
|
21710
22022
|
label: t("coBenifits:socialEnvironmentalRisk"),
|
@@ -21873,7 +22185,7 @@ var CoBenifitsComponent = function (props) {
|
|
21873
22185
|
};
|
21874
22186
|
|
21875
22187
|
var AddNdcActionComponent = function (props) {
|
21876
|
-
var
|
22188
|
+
var useLocation = props.useLocation, onNavigateToProgrammeManagementView = props.onNavigateToProgrammeManagementView, onNavigateToProgrammeView = props.onNavigateToProgrammeView, sdgGoalImages = props.sdgGoalImages, translator = props.translator;
|
21877
22189
|
translator.setDefaultNamespace("ndcAction");
|
21878
22190
|
var t = translator.t;
|
21879
22191
|
var _a = useState(1), current = _a[0], setCurrent = _a[1];
|
@@ -22015,7 +22327,7 @@ var AddNdcActionComponent = function (props) {
|
|
22015
22327
|
description: (React.createElement("div", { className: current !== 2 ? "hide" : "" },
|
22016
22328
|
React.createElement(CoBenifitsComponent, { onClickedBackBtn: onClickBackCoBenefits, coBenefitsDetails: ndcActionDetails ? ndcActionDetails.coBenefitsProperties : {}, onFormSubmit: onCoBenefitsSubmit, submitButtonText: isProjectReportsVisible()
|
22017
22329
|
? t("ndcAction:next")
|
22018
|
-
: t("ndcAction:submit"), loading: loading, sdgGoalImages: sdgGoalImages,
|
22330
|
+
: t("ndcAction:submit"), loading: loading, sdgGoalImages: sdgGoalImages, translator: translator }))),
|
22019
22331
|
},
|
22020
22332
|
];
|
22021
22333
|
if (isProjectReportsVisible()) {
|
@@ -22152,7 +22464,7 @@ var uploadDocUserPermission = function (userInfoState, docType, programmeOwnerId
|
|
22152
22464
|
var NdcActionViewComponent = function (props) {
|
22153
22465
|
var _a;
|
22154
22466
|
var _b, _c;
|
22155
|
-
var
|
22467
|
+
var useLocation = props.useLocation, onNavigateToNdcManagementView = props.onNavigateToNdcManagementView, translator = props.translator, sdgGoalImages = props.sdgGoalImages, Chart = props.Chart;
|
22156
22468
|
translator.setDefaultNamespace("ndcAction");
|
22157
22469
|
var t = translator.t;
|
22158
22470
|
var userInfoState = useUserContext().userInfoState;
|
@@ -22651,7 +22963,7 @@ var NdcActionViewComponent = function (props) {
|
|
22651
22963
|
React.createElement(Card, { className: "card-container" },
|
22652
22964
|
React.createElement("div", { className: "co-benifits-view" },
|
22653
22965
|
React.createElement("div", { className: "title" }, t("ndcAction:coBenefitsSubTitle")),
|
22654
|
-
React.createElement(CoBenifitsComponent, { viewOnly: true, coBenifitsViewDetails: (_c = state === null || state === void 0 ? void 0 : state.record) === null || _c === void 0 ? void 0 : _c.coBenefitsProperties, sdgGoalImages: sdgGoalImages,
|
22966
|
+
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 })))))))));
|
22655
22967
|
};
|
22656
22968
|
|
22657
22969
|
var css_248z$e = ".credit-transfer-management .certify-list {\n width: 110px;\n display: flex;\n align-items: center;\n flex-wrap: wrap; }\n .credit-transfer-management .certify-list .profile-icon {\n margin-bottom: 4px; }\n\n.credit-transfer-management .table-actions-section {\n margin-bottom: 0px; }\n .credit-transfer-management .table-actions-section input {\n font-family: \"Inter\";\n font-size: 0.8rem; }\n\n.credit-transfer-management .all-check {\n margin-right: 10px; }\n .credit-transfer-management .all-check .ant-checkbox-inner::after {\n background-color: rgba(58, 53, 65, 0.5); }\n .credit-transfer-management .all-check .ant-checkbox-checked .ant-checkbox-inner::after {\n background-color: transparent; }\n .credit-transfer-management .all-check .ant-checkbox-checked .ant-checkbox-inner {\n background-color: rgba(58, 53, 65, 0.5);\n border: none; }\n\n.credit-transfer-management .ant-checkbox-checked .ant-checkbox-input[value='Retired'] + .ant-checkbox-inner {\n background-color: rgba(58, 53, 65, 0.4);\n border: none; }\n\n.credit-transfer-management .ant-checkbox-checked .ant-checkbox-input[value='AwaitingAuthorization'] + .ant-checkbox-inner {\n background-color: rgba(237, 77, 71, 0.6);\n border: none; }\n\n.credit-transfer-management .ant-checkbox-checked .ant-checkbox-input[value='Rejected'] + .ant-checkbox-inner {\n background-color: rgba(58, 53, 65, 0.4);\n border: none; }\n\n.credit-transfer-management .ant-checkbox-checked .ant-checkbox-input[value='Issued'] + .ant-checkbox-inner {\n background-color: #16b1ff;\n border: none; }\n\n.credit-transfer-management .ant-checkbox-checked .ant-checkbox-input[value='Transferred'] + .ant-checkbox-inner {\n background-color: rgba(118, 195, 39, 0.6);\n border: none; }\n\n.credit-transfer-modal-container {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n margin: 2rem 0 0 0;\n width: 100%; }\n .credit-transfer-modal-container .icon-credit {\n margin-bottom: 15px; }\n .credit-transfer-modal-container .credit-transfer-details {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n width: 100%;\n margin-bottom: 10px; }\n .credit-transfer-modal-container .credit-transfer-details .content-credit-transfer {\n font-family: 'Inter' !important;\n font-style: normal;\n font-weight: 600;\n font-size: 0.9rem;\n line-height: 1.3rem;\n padding: 0 1rem 0 1rem;\n text-align: center;\n color: rgba(58, 53, 65, 0.8) !important; }\n .credit-transfer-modal-container .credit-transfer-details .sub-content-credit-transfer {\n font-family: 'Inter';\n font-style: normal;\n font-weight: 600;\n font-size: 0.8rem;\n line-height: 1.375rem;\n text-align: center;\n color: rgba(58, 53, 65, 0.5); }\n .credit-transfer-modal-container .remarks-credit-transfer {\n flex-direction: row;\n width: 100%;\n padding: 0.5rem 1rem 0 1rem; }\n .credit-transfer-modal-container .remarks-credit-transfer .modal-form .ant-form-item-explain-error {\n display: flex;\n flex-direction: row; }\n .credit-transfer-modal-container .remarks-credit-transfer .modal-form .ant-form {\n width: 100%; }\n .credit-transfer-modal-container .remarks-credit-transfer .modal-form .ant-form .ant-form-item-label > label {\n font-size: 0.8rem; }\n .credit-transfer-modal-container .remarks-credit-transfer .modal-form .modal-credit-transfer-btns {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n width: 100%;\n margin-top: 1rem; }\n .credit-transfer-modal-container .remarks-credit-transfer .modal-form .modal-credit-transfer-btns .center {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between; }\n .credit-transfer-modal-container .remarks-credit-transfer .modal-form .modal-credit-transfer-btns .width-60 {\n width: 60%; }\n\n.common-table-class .ant-table .ant-table-thead .ant-table-cell {\n font-size: 0.75rem;\n font-weight: 600; }\n";
|
@@ -22804,7 +23116,7 @@ var TransferActionModel = function (props) {
|
|
22804
23116
|
};
|
22805
23117
|
|
22806
23118
|
var CreditTransferComponent = function (props) {
|
22807
|
-
var
|
23119
|
+
var translator = props.translator, onNavigateToProgrammeView = props.onNavigateToProgrammeView;
|
22808
23120
|
var userInfoState = useUserContext().userInfoState;
|
22809
23121
|
var t = translator.t;
|
22810
23122
|
var statusOptions = Object.keys(CreditTransferStage).map(function (k, index) { return ({
|
@@ -22885,7 +23197,7 @@ var CreditTransferComponent = function (props) {
|
|
22885
23197
|
{
|
22886
23198
|
key: "programmeTitle",
|
22887
23199
|
operation: "like",
|
22888
|
-
value: "".concat(search, "%"),
|
23200
|
+
value: "%".concat(search, "%"),
|
22889
23201
|
},
|
22890
23202
|
];
|
22891
23203
|
if (!isNaN(Number(search))) {
|
@@ -23797,8 +24109,8 @@ var MapStatsComponent = function (props) {
|
|
23797
24109
|
|
23798
24110
|
var RangePicker$2 = DatePicker.RangePicker;
|
23799
24111
|
var MrvDashboardComponent = function (props) {
|
23800
|
-
var
|
23801
|
-
var _b = useConnection(); _b.get; var post = _b.post; _b.delete;
|
24112
|
+
var Link = props.Link, Chart = props.Chart, t = props.t, ButtonGroup = props.ButtonGroup, _a = props.isMultipleDashboardsVisible, isMultipleDashboardsVisible = _a === void 0 ? false : _a;
|
24113
|
+
var _b = useConnection(); _b.get; var post = _b.post; _b.delete; var statServerUrl = _b.statServerUrl;
|
23802
24114
|
var _c = useState({}), data = _c[0], setData = _c[1];
|
23803
24115
|
var _e = useState(false), loading = _e[0], setLoading = _e[1];
|
23804
24116
|
var userInfoState = useUserContext().userInfoState;
|
@@ -24281,7 +24593,7 @@ var MrvDashboardComponent = function (props) {
|
|
24281
24593
|
_e.label = 1;
|
24282
24594
|
case 1:
|
24283
24595
|
_e.trys.push([1, 3, 4, 5]);
|
24284
|
-
return [4 /*yield*/, post("stats/programme/agg", genPayload(), undefined,
|
24596
|
+
return [4 /*yield*/, post("stats/programme/agg", genPayload(), undefined, statServerUrl)];
|
24285
24597
|
case 2:
|
24286
24598
|
response = _e.sent();
|
24287
24599
|
console.log("Response", response);
|
@@ -25222,19 +25534,215 @@ var optionDonutPieB = {
|
|
25222
25534
|
var css_248z$8 = ".stastic-card-main-container {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 11.2rem;\n background-color: white;\n border-radius: 0.625rem;\n padding: 1rem 1.875rem 0 1.875rem; }\n .stastic-card-main-container .title-section {\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n justify-content: space-between;\n height: 3.3rem; }\n .stastic-card-main-container .title-section .title {\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n justify-content: flex-start;\n font-family: 'Inter';\n font-size: 1.15rem;\n font-weight: 600;\n width: 95%;\n color: rgba(58, 53, 65, 0.8); }\n .stastic-card-main-container .title-section .info-container {\n display: flex;\n flex-direction: row;\n width: 5%;\n align-items: center;\n justify-content: flex-end; }\n .stastic-card-main-container .values-section {\n display: flex;\n flex-direction: row;\n width: 100%;\n align-items: flex-start;\n justify-content: space-between;\n height: 5rem; }\n .stastic-card-main-container .values-section .values-and-unit {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n justify-content: flex-start;\n width: 60%; }\n .stastic-card-main-container .values-section .values-and-unit .value {\n font-family: 'Inter';\n font-size: 2rem;\n font-weight: 600;\n width: 100%;\n color: #16b1ff;\n padding: 0; }\n .stastic-card-main-container .values-section .values-and-unit .unit {\n margin-bottom: -0.6rem;\n margin-left: 0.2rem;\n margin-top: -0.66rem;\n font-family: 'Inter';\n font-size: 0.875rem;\n font-weight: 500;\n width: 100%;\n color: rgba(58, 53, 65, 0.5); }\n .stastic-card-main-container .values-section .icon-section {\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n width: 40%;\n justify-content: flex-start; }\n .stastic-card-main-container .values-section .icon-section img {\n height: 80px; }\n .stastic-card-main-container .values-section .updated-on-null {\n display: flex;\n flex-direction: row;\n font-size: 0.813rem;\n border-radius: 3.125rem;\n padding: 0 0.5rem 0 0.5rem;\n margin-top: 1rem;\n color: transparent;\n background-color: transparent; }\n .stastic-card-main-container .updated-on {\n display: flex;\n flex-direction: row;\n font-size: 0.75rem;\n border-radius: 3.125rem;\n padding: 0.05rem 0.8rem 0.05rem 0.8rem;\n width: max-content;\n color: #16b1ff;\n background-color: rgba(185, 226, 244, 0.4); }\n\n.stastic-card-main-container:hover {\n box-shadow: rgba(0, 5, 18, 0.2) 0px 8px 24px; }\n";
|
25223
25535
|
styleInject(css_248z$8);
|
25224
25536
|
|
25537
|
+
var toolTipTextGen = function (companyRole, cardType, mine) {
|
25538
|
+
var text = '';
|
25539
|
+
if (companyRole === CompanyRole.GOVERNMENT) {
|
25540
|
+
if (cardType === StatsCardsTypes.PROGRAMMES_PENDING) {
|
25541
|
+
text = 'Pending state projects awaiting authorisation';
|
25542
|
+
}
|
25543
|
+
else if (cardType === StatsCardsTypes.TRANSFER_REQUEST_SENT) {
|
25544
|
+
text =
|
25545
|
+
'Pending credit transfer requests sent to project owners initiated by your organisation';
|
25546
|
+
}
|
25547
|
+
else if (cardType === StatsCardsTypes.CREDIT_BALANCE) {
|
25548
|
+
text = 'Total credit balance owned by your organisation';
|
25549
|
+
}
|
25550
|
+
else if (cardType === StatsCardsTypes.PROGRAMMES) {
|
25551
|
+
text =
|
25552
|
+
'Number of projects created during the specified period and their project state in the carbon registry at present';
|
25553
|
+
}
|
25554
|
+
else if (cardType === StatsCardsTypes.CREDITS) {
|
25555
|
+
text =
|
25556
|
+
'Number of credits of projects created during the specified period and their credit state in the carbon registry at present';
|
25557
|
+
}
|
25558
|
+
else if (cardType === StatsCardsTypes.CERTIFIED_CREDITS) {
|
25559
|
+
text =
|
25560
|
+
'Number of credits of projects created during the specified period, uncertified, certified and revoked in the carbon registry at present';
|
25561
|
+
}
|
25562
|
+
else if (cardType === StatsCardsTypes.TOTAL_PROGRAMMES) {
|
25563
|
+
text =
|
25564
|
+
'Graphical representation of the number of projects created during the specified period in each project state in the carbon registry at present';
|
25565
|
+
}
|
25566
|
+
else if (cardType === StatsCardsTypes.TOTAL_PROGRAMMES_SECTOR) {
|
25567
|
+
text =
|
25568
|
+
'Graphical representation of the number of projects in each project sector created during the specified time in the carbon registry';
|
25569
|
+
}
|
25570
|
+
else if (cardType === StatsCardsTypes.TOTAL_CREDITS) {
|
25571
|
+
text =
|
25572
|
+
'Graphical representation of the number of credits of projects created during the specified period in each credit state in the carbon registry at present';
|
25573
|
+
}
|
25574
|
+
else if (cardType === StatsCardsTypes.TOTAL_CREDITS_CERTIFIED) {
|
25575
|
+
text =
|
25576
|
+
'Graphical representation of the number of credits of projects created during the specified period certified, uncertified and revoked in the carbon registry at present';
|
25577
|
+
}
|
25578
|
+
else if (cardType === StatsCardsTypes.PROGRAMME_LOCATIONS) {
|
25579
|
+
text =
|
25580
|
+
'Locations of the projects created during the specified period and their project states in the carbon registry at present';
|
25581
|
+
}
|
25582
|
+
else if (cardType === StatsCardsTypes.TRANSFER_LOCATIONS_INTERNATIONAL) {
|
25583
|
+
text =
|
25584
|
+
'Locations of credits of international transfer requests recognised during the specified period';
|
25585
|
+
}
|
25586
|
+
}
|
25587
|
+
else if (companyRole === CompanyRole.PROGRAMME_DEVELOPER) {
|
25588
|
+
if (cardType === StatsCardsTypes.TRANSFER_REQUEST_RECEIVED) {
|
25589
|
+
text = 'Pending credit transfer requests received by your organisation';
|
25590
|
+
}
|
25591
|
+
else if (cardType === StatsCardsTypes.TRANSFER_REQUEST_SENT) {
|
25592
|
+
text = 'Pending local credit transfer requests initiated by your organisation';
|
25593
|
+
}
|
25594
|
+
else if (cardType === StatsCardsTypes.CREDIT_BALANCE) {
|
25595
|
+
text = 'Total credit balance owned by your organisation';
|
25596
|
+
}
|
25597
|
+
else if (cardType === StatsCardsTypes.PROGRAMMES) {
|
25598
|
+
text =
|
25599
|
+
'Number of projects created during the specified period and their project state in the carbon registry at present, owned by your organisation';
|
25600
|
+
}
|
25601
|
+
else if (cardType === StatsCardsTypes.CREDITS) {
|
25602
|
+
text =
|
25603
|
+
'Number of credits of projects created during the specified period and their credit state in the carbon registry at present, owned by your organisation';
|
25604
|
+
}
|
25605
|
+
else if (cardType === StatsCardsTypes.CERTIFIED_CREDITS) {
|
25606
|
+
text =
|
25607
|
+
'Number of credits of projects created during the specified period, uncertified, certified and revoked in the carbon registry at present, owned by your organisation';
|
25608
|
+
}
|
25609
|
+
else if (cardType === StatsCardsTypes.TOTAL_PROGRAMMES) {
|
25610
|
+
text =
|
25611
|
+
'Graphical representation of the number of projects created during the specified period, owned by your organisation, in each project state in the carbon registry at present';
|
25612
|
+
}
|
25613
|
+
else if (cardType === StatsCardsTypes.TOTAL_PROGRAMMES_SECTOR) {
|
25614
|
+
text =
|
25615
|
+
'Graphical representation of the number of projects owned by your organisation, in each project sector created during the specified time in the carbon registry';
|
25616
|
+
}
|
25617
|
+
else if (cardType === StatsCardsTypes.TOTAL_CREDITS) {
|
25618
|
+
text =
|
25619
|
+
'Graphical representation of the number of credits of projects created during the specified period, owned by your organisation, in each credit state in the carbon registry at present';
|
25620
|
+
}
|
25621
|
+
else if (cardType === StatsCardsTypes.TOTAL_CREDITS_CERTIFIED) {
|
25622
|
+
text =
|
25623
|
+
'Graphical representation of the number of credits of projects created during the specified period, owned by your organisation, certified, uncertified and revoked in the carbon registry at present';
|
25624
|
+
}
|
25625
|
+
else if (cardType === StatsCardsTypes.PROGRAMME_LOCATIONS) {
|
25626
|
+
text =
|
25627
|
+
'Locations of the projects created during the specified period, owned by your organisation, and their project states in the carbon registry at present';
|
25628
|
+
}
|
25629
|
+
else if (cardType === StatsCardsTypes.TRANSFER_LOCATIONS_INTERNATIONAL) {
|
25630
|
+
text =
|
25631
|
+
'Locations of credits international transfer requests of projects owned by your organisation recognised during the specified period';
|
25632
|
+
}
|
25633
|
+
}
|
25634
|
+
else if (companyRole === CompanyRole.CERTIFIER && mine === true) {
|
25635
|
+
if (cardType === StatsCardsTypes.PROGRAMMES_UNCERTIFIED) {
|
25636
|
+
text =
|
25637
|
+
'Number of projects not yet certified including certificates revoked by your organisation';
|
25638
|
+
}
|
25639
|
+
else if (cardType === StatsCardsTypes.PROGRAMMES_CERTIFIED) {
|
25640
|
+
text = 'Number of projects certified by your organisation';
|
25641
|
+
}
|
25642
|
+
else if (cardType === StatsCardsTypes.CREDIT_CERTIFIED) {
|
25643
|
+
text = 'Number of credits certified by your organisation';
|
25644
|
+
}
|
25645
|
+
else if (cardType === StatsCardsTypes.PROGRAMMES) {
|
25646
|
+
text =
|
25647
|
+
'Number of projects created during the specified period, certified by your organisation, and their project state in the carbon registry at present';
|
25648
|
+
}
|
25649
|
+
else if (cardType === StatsCardsTypes.CREDITS) {
|
25650
|
+
text =
|
25651
|
+
'Number of credits of projects created during the specified period, certified by your organisation and their credit state in the carbon registry at present';
|
25652
|
+
}
|
25653
|
+
else if (cardType === StatsCardsTypes.CERTIFIED_CREDITS) {
|
25654
|
+
text =
|
25655
|
+
'Number of credits of projects created during the specified period, certified by your organisation, uncertified, certified and revoked in the carbon registry at present';
|
25656
|
+
}
|
25657
|
+
else if (cardType === StatsCardsTypes.TOTAL_PROGRAMMES) {
|
25658
|
+
text =
|
25659
|
+
'Graphical representation of the number of projects in each project sector created during the specified time, certified by your company, in the carbon registry';
|
25660
|
+
}
|
25661
|
+
else if (cardType === StatsCardsTypes.TOTAL_PROGRAMMES_SECTOR) {
|
25662
|
+
text =
|
25663
|
+
'Graphical representation of the number of projects in each project sector created during the specified time, certified by your company, in the carbon registry';
|
25664
|
+
}
|
25665
|
+
else if (cardType === StatsCardsTypes.TOTAL_CREDITS) {
|
25666
|
+
text =
|
25667
|
+
'Graphical representation of the number of credits of projects created during the specified period in each credit state in the carbon registry at present';
|
25668
|
+
}
|
25669
|
+
else if (cardType === StatsCardsTypes.TOTAL_CREDITS_CERTIFIED) {
|
25670
|
+
text =
|
25671
|
+
'Graphical representation of the number of credits of projects certified, uncertified and revoked (refer above for states), by your organisation, spread over the specified time';
|
25672
|
+
}
|
25673
|
+
else if (cardType === StatsCardsTypes.PROGRAMME_LOCATIONS) {
|
25674
|
+
text =
|
25675
|
+
'Locations of the projects created during the specified period, certified by your organisation, and their project states in the carbon registry at present';
|
25676
|
+
}
|
25677
|
+
else if (cardType === StatsCardsTypes.TRANSFER_LOCATIONS_INTERNATIONAL) {
|
25678
|
+
text =
|
25679
|
+
'Locations of credits of international transfer requests of projects certified by your organisation recognised during the specified period';
|
25680
|
+
}
|
25681
|
+
}
|
25682
|
+
else if (companyRole === CompanyRole.CERTIFIER && !mine) {
|
25683
|
+
if (cardType === StatsCardsTypes.PROGRAMMES_UNCERTIFIED) {
|
25684
|
+
text =
|
25685
|
+
'Number of projects not yet certified including certificates revoked by your organisation';
|
25686
|
+
}
|
25687
|
+
else if (cardType === StatsCardsTypes.PROGRAMMES_CERTIFIED) {
|
25688
|
+
text = 'Number of projects certified by your organisation';
|
25689
|
+
}
|
25690
|
+
else if (cardType === StatsCardsTypes.CREDIT_CERTIFIED) {
|
25691
|
+
text = 'Number of credits certified by your organisation';
|
25692
|
+
}
|
25693
|
+
else if (cardType === StatsCardsTypes.PROGRAMMES) {
|
25694
|
+
text =
|
25695
|
+
'Number of projects created during the specified period and their project state in the carbon registry at present';
|
25696
|
+
}
|
25697
|
+
else if (cardType === StatsCardsTypes.CREDITS) {
|
25698
|
+
text =
|
25699
|
+
'Number of credits of projects created during the specified period and their credit state in the carbon registry at present';
|
25700
|
+
}
|
25701
|
+
else if (cardType === StatsCardsTypes.CERTIFIED_CREDITS) {
|
25702
|
+
text =
|
25703
|
+
'Number of credits of projects created during the specified period, uncertified, certified and revoked in the carbon registry at present';
|
25704
|
+
}
|
25705
|
+
else if (cardType === StatsCardsTypes.TOTAL_PROGRAMMES) {
|
25706
|
+
text =
|
25707
|
+
'Graphical representation of the number of projects created during the specified period in each project state in the carbon registry at present';
|
25708
|
+
}
|
25709
|
+
else if (cardType === StatsCardsTypes.TOTAL_PROGRAMMES_SECTOR) {
|
25710
|
+
text =
|
25711
|
+
'Graphical representation of the number of projects in each project sector created during the specified time in the carbon registry';
|
25712
|
+
}
|
25713
|
+
else if (cardType === StatsCardsTypes.TOTAL_CREDITS) {
|
25714
|
+
text =
|
25715
|
+
'Graphical representation of the number of credits of projects created during the specified period in each credit state in the carbon registry at present';
|
25716
|
+
}
|
25717
|
+
else if (cardType === StatsCardsTypes.TOTAL_CREDITS_CERTIFIED) {
|
25718
|
+
text =
|
25719
|
+
'Graphical representation of the number of credits of projects created during the specified period certified, uncertified and revoked in the carbon registry at present';
|
25720
|
+
}
|
25721
|
+
else if (cardType === StatsCardsTypes.PROGRAMME_LOCATIONS) {
|
25722
|
+
text =
|
25723
|
+
'Locations of the projects created during the specified period and their project states in the carbon registry at present';
|
25724
|
+
}
|
25725
|
+
else if (cardType === StatsCardsTypes.TRANSFER_LOCATIONS_INTERNATIONAL) {
|
25726
|
+
text =
|
25727
|
+
'Locations of credits of international transfer requests recognised during the specified period';
|
25728
|
+
}
|
25729
|
+
}
|
25730
|
+
return text;
|
25731
|
+
};
|
25732
|
+
|
25225
25733
|
var StasticCard = function (props) {
|
25226
|
-
var value = props.value, title = props.title, updatedDate = props.updatedDate, icon = props.icon, loading = props.loading
|
25734
|
+
var value = props.value, title = props.title, updatedDate = props.updatedDate, icon = props.icon, loading = props.loading, companyRole = props.companyRole;
|
25227
25735
|
return (React.createElement("div", { className: "stastic-card-main-container" }, loading ? (React.createElement(Skeleton, { active: true })) : (React.createElement(React.Fragment, null,
|
25228
25736
|
React.createElement("div", { className: "title-section" },
|
25229
|
-
React.createElement("div", { className: "title" },
|
25737
|
+
React.createElement("div", { className: "title" }, title),
|
25230
25738
|
React.createElement("div", { className: "info-container" },
|
25231
|
-
React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "bottomRight", trigger: "hover", title:
|
25739
|
+
React.createElement(Tooltip, { arrowPointAtCenter: true, placement: "bottomRight", trigger: "hover", title: toolTipTextGen(companyRole, title) },
|
25232
25740
|
React.createElement(InfoCircle, { color: "#000000", size: 17 })))),
|
25233
25741
|
React.createElement("div", { className: "values-section" },
|
25234
25742
|
React.createElement("div", { className: "values-and-unit" },
|
25235
|
-
title.includes(
|
25236
|
-
React.createElement("div", { className: "value" }, title.includes(
|
25237
|
-
? value === 0 || String(value) ===
|
25743
|
+
title.includes('Credit') && React.createElement("div", { className: "unit" }, "ITMOs"),
|
25744
|
+
React.createElement("div", { className: "value" }, title.includes('Credit')
|
25745
|
+
? value === 0 || String(value) === 'NaN'
|
25238
25746
|
? 0
|
25239
25747
|
: addCommSep(value)
|
25240
25748
|
: value)),
|
@@ -25336,8 +25844,8 @@ var RegistryBarChartsStatComponent = function (props) {
|
|
25336
25844
|
|
25337
25845
|
var RangePicker$1 = DatePicker.RangePicker;
|
25338
25846
|
var RegistryDashboardComponent = function (props) {
|
25339
|
-
var
|
25340
|
-
var _b = useConnection(); _b.get; var post = _b.post; _b.delete;
|
25847
|
+
var Chart = props.Chart, t = props.t, ButtonGroup = props.ButtonGroup, Link = props.Link, _a = props.isMultipleDashboardsVisible, isMultipleDashboardsVisible = _a === void 0 ? false : _a;
|
25848
|
+
var _b = useConnection(); _b.get; var post = _b.post; _b.delete; var statServerUrl = _b.statServerUrl;
|
25341
25849
|
var userInfoState = useUserContext().userInfoState;
|
25342
25850
|
var _c = useState(false), loadingWithoutTimeRange = _c[0], setLoadingWithoutTimeRange = _c[1];
|
25343
25851
|
var _e = useState(false), loading = _e[0], setLoading = _e[1];
|
@@ -25784,7 +26292,7 @@ var RegistryDashboardComponent = function (props) {
|
|
25784
26292
|
_253.label = 1;
|
25785
26293
|
case 1:
|
25786
26294
|
_253.trys.push([1, 3, 4, 5]);
|
25787
|
-
return [4 /*yield*/, post("stats/programme/agg", getAllChartsParams(), undefined,
|
26295
|
+
return [4 /*yield*/, post("stats/programme/agg", getAllChartsParams(), undefined, statServerUrl)];
|
25788
26296
|
case 2:
|
25789
26297
|
response = _253.sent();
|
25790
26298
|
totalCreditsCertifiedStats = void 0;
|
@@ -26061,7 +26569,7 @@ var RegistryDashboardComponent = function (props) {
|
|
26061
26569
|
_77.label = 1;
|
26062
26570
|
case 1:
|
26063
26571
|
_77.trys.push([1, 3, 4, 5]);
|
26064
|
-
return [4 /*yield*/, post("stats/programme/agg", getAllProgrammeAnalyticsStatsParamsWithoutTimeRange(), undefined,
|
26572
|
+
return [4 /*yield*/, post("stats/programme/agg", getAllProgrammeAnalyticsStatsParamsWithoutTimeRange(), undefined, statServerUrl)];
|
26065
26573
|
case 2:
|
26066
26574
|
response = _77.sent();
|
26067
26575
|
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;
|
@@ -26154,7 +26662,7 @@ var RegistryDashboardComponent = function (props) {
|
|
26154
26662
|
_188.label = 1;
|
26155
26663
|
case 1:
|
26156
26664
|
_188.trys.push([1, 3, 4, 5]);
|
26157
|
-
return [4 /*yield*/, post("stats/programme/agg", getAllProgrammeAnalyticsStatsParams(), undefined,
|
26665
|
+
return [4 /*yield*/, post("stats/programme/agg", getAllProgrammeAnalyticsStatsParams(), undefined, statServerUrl)];
|
26158
26666
|
case 2:
|
26159
26667
|
response = _188.sent();
|
26160
26668
|
programmeByStatusAuthAggregationResponse = void 0;
|
@@ -26840,69 +27348,54 @@ var RegistryDashboardComponent = function (props) {
|
|
26840
27348
|
: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
|
26841
27349
|
CompanyRole.PROGRAMME_DEVELOPER
|
26842
27350
|
? transferRequestReceived
|
26843
|
-
: programmesUnCertifed, title: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.GOVERNMENT
|
27351
|
+
: programmesUnCertifed, title: t((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.GOVERNMENT
|
26844
27352
|
? "programmesPending"
|
26845
27353
|
: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
|
26846
27354
|
CompanyRole.PROGRAMME_DEVELOPER
|
26847
27355
|
? "trasnferReqReceived"
|
26848
|
-
: "programmesUnCertified", updatedDate: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.GOVERNMENT
|
27356
|
+
: "programmesUnCertified"), updatedDate: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.GOVERNMENT
|
26849
27357
|
? lastUpdateProgrammesStats
|
26850
27358
|
: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
|
26851
27359
|
CompanyRole.PROGRAMME_DEVELOPER
|
26852
27360
|
? lastUpdatePendingTransferReceived
|
26853
27361
|
: lastUpdateProgrammesCertifiable, icon: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.GOVERNMENT ? (React.createElement(ClockHistory, { color: "#16B1FF", size: 80 })) : (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
|
26854
|
-
CompanyRole.PROGRAMME_DEVELOPER ? (React.createElement(BoxArrowInRight, { color: "#16B1FF", size: 80 })) : (React.createElement(ShieldX, { color: "#16B1FF", size: 80 })), loading: loadingWithoutTimeRange, companyRole: userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole
|
26855
|
-
? "tTprogrammespendingGoverment"
|
26856
|
-
: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
|
26857
|
-
CompanyRole.PROGRAMME_DEVELOPER
|
26858
|
-
? "tTTransferReqRecProgrammeDev"
|
26859
|
-
: "tTProgrammesUnCertiCertifier"), t: t })),
|
27362
|
+
CompanyRole.PROGRAMME_DEVELOPER ? (React.createElement(BoxArrowInRight, { color: "#16B1FF", size: 80 })) : (React.createElement(ShieldX, { color: "#16B1FF", size: 80 })), loading: loadingWithoutTimeRange, companyRole: userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole })),
|
26860
27363
|
React.createElement(Col, { xxl: 8, xl: 8, md: 12, className: "stastic-card-col" },
|
26861
27364
|
React.createElement(StasticCard, { value: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.GOVERNMENT
|
26862
27365
|
? transferRequestSent
|
26863
27366
|
: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
|
26864
27367
|
CompanyRole.PROGRAMME_DEVELOPER
|
26865
27368
|
? transferRequestSent
|
26866
|
-
: programmesCertifed, title: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.GOVERNMENT
|
27369
|
+
: programmesCertifed, title: t((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.GOVERNMENT
|
26867
27370
|
? "trasnferReqInit"
|
26868
27371
|
: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
|
26869
27372
|
CompanyRole.PROGRAMME_DEVELOPER
|
26870
27373
|
? "trasnferReqInit"
|
26871
|
-
: "programmesCertified", updatedDate: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.GOVERNMENT
|
27374
|
+
: "programmesCertified"), updatedDate: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.GOVERNMENT
|
26872
27375
|
? lastUpdatePendingTransferSent
|
26873
27376
|
: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
|
26874
27377
|
CompanyRole.PROGRAMME_DEVELOPER
|
26875
27378
|
? lastUpdatePendingTransferSent
|
26876
27379
|
: lastUpdateProgrammesCertified, icon: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.GOVERNMENT ? (React.createElement(BoxArrowRight, { color: "#16B1FF", size: 80 })) : (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
|
26877
|
-
CompanyRole.PROGRAMME_DEVELOPER ? (React.createElement(BoxArrowRight, { color: "#16B1FF", size: 80 })) : (React.createElement(ShieldCheck, { color: "#16B1FF", size: 80 })), loading: loadingWithoutTimeRange, companyRole: userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole
|
26878
|
-
? "tTTransferReqSentGovernment"
|
26879
|
-
: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
|
26880
|
-
CompanyRole.PROGRAMME_DEVELOPER
|
26881
|
-
? "tTTransferReqInitProgrammeDev"
|
26882
|
-
: "tTProgrammesCertiCertifier"), t: t })),
|
27380
|
+
CompanyRole.PROGRAMME_DEVELOPER ? (React.createElement(BoxArrowRight, { color: "#16B1FF", size: 80 })) : (React.createElement(ShieldCheck, { color: "#16B1FF", size: 80 })), loading: loadingWithoutTimeRange, companyRole: userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole })),
|
26883
27381
|
React.createElement(Col, { xxl: 8, xl: 8, md: 12, className: "stastic-card-col" },
|
26884
27382
|
React.createElement(StasticCard, { value: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.GOVERNMENT
|
26885
27383
|
? creditBalanceWithoutTimeRange
|
26886
27384
|
: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
|
26887
27385
|
CompanyRole.PROGRAMME_DEVELOPER
|
26888
27386
|
? creditBalanceWithoutTimeRange
|
26889
|
-
: creditCertiedBalanceWithoutTimeRange, title: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.GOVERNMENT
|
27387
|
+
: creditCertiedBalanceWithoutTimeRange, title: t((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.GOVERNMENT
|
26890
27388
|
? "creditBal"
|
26891
27389
|
: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
|
26892
27390
|
CompanyRole.PROGRAMME_DEVELOPER
|
26893
27391
|
? "creditBal"
|
26894
|
-
: "creditCertified", updatedDate: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.GOVERNMENT
|
27392
|
+
: "creditCertified"), updatedDate: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.GOVERNMENT
|
26895
27393
|
? lastUpdateCreditBalance
|
26896
27394
|
: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
|
26897
27395
|
CompanyRole.PROGRAMME_DEVELOPER
|
26898
27396
|
? lastUpdateCreditBalance
|
26899
27397
|
: lastUpdateProgrammesCertified, icon: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.GOVERNMENT ? (React.createElement(Gem, { color: "#16B1FF", size: 80 })) : (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
|
26900
|
-
CompanyRole.PROGRAMME_DEVELOPER ? (React.createElement(Gem, { color: "#16B1FF", size: 80 })) : (React.createElement(ShieldExclamation, { color: "#16B1FF", size: 80 })), loading: loadingWithoutTimeRange, companyRole: userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole
|
26901
|
-
? "tTCreditBalanceGovernment"
|
26902
|
-
: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) ===
|
26903
|
-
CompanyRole.PROGRAMME_DEVELOPER
|
26904
|
-
? "tTCreditBalanceProgrammeDev"
|
26905
|
-
: "tTCreditCertifiedCertifier"), t: t })))),
|
27398
|
+
CompanyRole.PROGRAMME_DEVELOPER ? (React.createElement(Gem, { color: "#16B1FF", size: 80 })) : (React.createElement(ShieldExclamation, { color: "#16B1FF", size: 80 })), loading: loadingWithoutTimeRange, companyRole: userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole })))),
|
26906
27399
|
((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.GOVERNMENT ||
|
26907
27400
|
(userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.CERTIFIER ||
|
26908
27401
|
(userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.MINISTRY) &&
|
@@ -27150,7 +27643,7 @@ var getNdcActionStatusTagType = function (status) {
|
|
27150
27643
|
};
|
27151
27644
|
|
27152
27645
|
var NdcDetailsComponent = function (props) {
|
27153
|
-
var t = props.t
|
27646
|
+
var t = props.t;
|
27154
27647
|
var RangePicker = DatePicker.RangePicker;
|
27155
27648
|
var _a = useState([]), ndcActionsList = _a[0], setNdcActionsList = _a[1];
|
27156
27649
|
var _b = useState(false), loading = _b[0], setLoading = _b[1];
|
@@ -28147,7 +28640,7 @@ var ProgrammeIssueForm = function (props) {
|
|
28147
28640
|
};
|
28148
28641
|
|
28149
28642
|
var ProgrammeRetireForm = function (props) {
|
28150
|
-
var programme = props.programme, onFinish = props.onFinish, onCancel = props.onCancel, actionBtnText = props.actionBtnText, subText = props.subText, hideType = props.hideType, myCompanyId = props.myCompanyId, translator = props.translator
|
28643
|
+
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;
|
28151
28644
|
var t = translator.t;
|
28152
28645
|
var _a = useState(undefined), popupError = _a[0], setPopupError = _a[1];
|
28153
28646
|
var _b = useState(false), loading = _b[0], setLoading = _b[1];
|
@@ -28212,7 +28705,7 @@ var ProgrammeRetireForm = function (props) {
|
|
28212
28705
|
{
|
28213
28706
|
key: "name",
|
28214
28707
|
operation: "like",
|
28215
|
-
value: newValue.charAt(0).toUpperCase() + newValue.slice(1) + "%",
|
28708
|
+
value: "%" + newValue.charAt(0).toUpperCase() + newValue.slice(1) + "%",
|
28216
28709
|
},
|
28217
28710
|
],
|
28218
28711
|
sort: {
|
@@ -28523,7 +29016,7 @@ var ProgrammeRevokeForm = function (props) {
|
|
28523
29016
|
};
|
28524
29017
|
|
28525
29018
|
var ProgrammeTransferForm = function (props) {
|
28526
|
-
var programme = props.programme, onFinish = props.onFinish, onCancel = props.onCancel, actionBtnText = props.actionBtnText; props.subText; var toCompanyDefault = props.toCompanyDefault, disableToCompany = props.disableToCompany, receiverLabelText = props.receiverLabelText, userCompanyId = props.userCompanyId, companyRole = props.companyRole, translator = props.translator,
|
29019
|
+
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;
|
28527
29020
|
var t = translator.t;
|
28528
29021
|
var _b = useState(undefined), popupError = _b[0], setPopupError = _b[1];
|
28529
29022
|
var _c = useState(false), loading = _c[0], setLoading = _c[1];
|
@@ -28544,7 +29037,7 @@ var ProgrammeTransferForm = function (props) {
|
|
28544
29037
|
{
|
28545
29038
|
key: "name",
|
28546
29039
|
operation: "like",
|
28547
|
-
value: newValue + "%",
|
29040
|
+
value: "%" + newValue + "%",
|
28548
29041
|
},
|
28549
29042
|
{
|
28550
29043
|
key: "companyRole",
|
@@ -28754,7 +29247,7 @@ var css_248z$5 = ".ndc-action-body {\n display: flex;\n flex-direction: column
|
|
28754
29247
|
styleInject(css_248z$5);
|
28755
29248
|
|
28756
29249
|
var NdcActionBody = function (props) {
|
28757
|
-
var data = props.data, programmeId = props.programmeId, canUploadMonitorReport = props.canUploadMonitorReport, programmeOwnerId = props.programmeOwnerId, getProgrammeDocs = props.getProgrammeDocs, ministryLevelPermission = props.ministryLevelPermission,
|
29250
|
+
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;
|
28758
29251
|
var t = translator.t;
|
28759
29252
|
var userInfoState = useUserContext().userInfoState;
|
28760
29253
|
var fileInputMonitoringRef = useRef(null);
|
@@ -29190,7 +29683,7 @@ var css_248z$4 = ".info-view .title-icon {\n padding-right: 10px; }\n\n.info-vi
|
|
29190
29683
|
styleInject(css_248z$4);
|
29191
29684
|
|
29192
29685
|
var ProgrammeDocuments = function (props) {
|
29193
|
-
var data = props.data, title = props.title, icon = props.icon, programmeId = props.programmeId, programmeOwnerId = props.programmeOwnerId, getDocumentDetails = props.getDocumentDetails, getProgrammeById = props.getProgrammeById, ministryLevelPermission = props.ministryLevelPermission,
|
29686
|
+
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;
|
29194
29687
|
var t = translator.t;
|
29195
29688
|
var userInfoState = useUserContext().userInfoState;
|
29196
29689
|
var _a = useConnection(); _a.delete; var post = _a.post;
|
@@ -30141,7 +30634,7 @@ var GHGUserActionConfirmationModel = function (props) {
|
|
30141
30634
|
};
|
30142
30635
|
|
30143
30636
|
var GHGEmissionsComponent = function (props) {
|
30144
|
-
var t = props.t
|
30637
|
+
var t = props.t;
|
30145
30638
|
var userInfoState = useUserContext().userInfoState;
|
30146
30639
|
var _a = useState([]), data = _a[0], setData = _a[1];
|
30147
30640
|
var _b = useConnection(), get = _b.get, post = _b.post;
|
@@ -32058,7 +32551,7 @@ var ProjectionTypes = {
|
|
32058
32551
|
};
|
32059
32552
|
|
32060
32553
|
var GHGProjectionsComponent = function (props) {
|
32061
|
-
var t = props.t
|
32554
|
+
var t = props.t;
|
32062
32555
|
var userInfoState = useUserContext().userInfoState;
|
32063
32556
|
var _a = useState([]), data = _a[0], setData = _a[1];
|
32064
32557
|
var _b = useConnection(); _b.put; var get = _b.get, post = _b.post;
|
@@ -34239,7 +34732,7 @@ var emissionComparisonOptionsSub = function (labels, chartColors) {
|
|
34239
34732
|
|
34240
34733
|
var RangePicker = DatePicker.RangePicker;
|
34241
34734
|
var GHGDashboardComponent = function (props) {
|
34242
|
-
var t = props.t,
|
34735
|
+
var t = props.t, Chart = props.Chart, ButtonGroup = props.ButtonGroup, Link = props.Link, isMultipleDashboardsVisible = props.isMultipleDashboardsVisible;
|
34243
34736
|
var _a = useConnection(); _a.get; var post = _a.post; _a.delete;
|
34244
34737
|
var userInfoState = useUserContext().userInfoState;
|
34245
34738
|
var _b = useState(moment().year()), endYear = _b[0], setEndYear = _b[1];
|
@@ -34618,5 +35111,5 @@ var GHGDashboardComponent = function (props) {
|
|
34618
35111
|
React.createElement(Row, { gutter: [40, 40], className: "statics-card-row" }, row.map(function (item, j) { return getWidgetJSX(item); })))); }))));
|
34619
35112
|
};
|
34620
35113
|
|
34621
|
-
export { Action, AddNdcActionComponent, AddNewCompanyComponent, AddNewUserComponent, AdminBGColor, AdminColor, BaseEntity, CarbonSystemType, CertBGColor, CertColor, CoBenifitsComponent, Company, CompanyManagementColumns, CompanyManagementComponent, CompanyProfileComponent, CompanyRole, CompanyState, ConfigurationSettingsType, CreditTransferComponent, CreditTransferStage, DevBGColor, DevColor, DocType, DocumentStatus, ESGType, Emission, EmissionGas, EmissionSector, EmissionSubSectors, EnergyGenerationUnits, FormElementType, GHGDashboardComponent, GHGEmissionsComponent, GHGProjectionsComponent, GhgStatCardTypes, GovBGColor, GovColor, ImgWithFallback, InfoView, Instrument, InvestmentBGColor, InvestmentBody, InvestmentColor, InvestmentCreationComponent, InvestmentCreationType, InvestmentLevel, InvestmentManagementComponent, InvestmentStatus, InvestmentStream, InvestmentType, LandAreaUnits, LegendItem, Loading, ManagerBGColor, ManagerColor, MapComponent, MapTypes, MapboxComponent, MinBGColor, MinColor, MitigationSubTypes, MitigationTypes, MrvDashboardComponent, MrvStatsCardsTypes, NdcActionBody, NdcActionManagementComponent, NdcActionStatus, NdcActionTypes, NdcActionViewComponent, NdcDetailsComponent, OrganisationStatus, ProfileIcon, ProgrammeCertify, ProgrammeCreationComponent, ProgrammeDocuments, ProgrammeEntity, ProgrammeIssueForm, ProgrammeManagementColumns, ProgrammeManagementComponent, ProgrammeRetireForm, ProgrammeRevokeForm, ProgrammeStageLegend, ProgrammeStageMRV, ProgrammeStageR, ProgrammeStageUnified, ProgrammeTransfer, ProgrammeTransferForm, Projection, ProjectionTypes$1 as ProjectionTypes, RadioButtonStatus, RadioButtonStatus2, RegistryDashboardComponent, RejectDocumentationConfirmationModel, RetireType, Role, RoleIcon, RootBGColor, RootColor, SdgGoals$1 as SdgGoals, Sector, SectoralScope, StasticCard, StatsCardsTypes, SubTypeOfMitigation, SupportCreationComponent, SupportManagementComponent, SystemNames, TimelineBody, Titles, TooltipColor, TransferActionModel, TxType, TypeOfMitigation, UnitField, User, UserManagementColumns, UserManagementComponent, UserProfileComponent, UserRoleIcon, ViewBGColor, ViewColor, WidgetType, addCommSep, addCommSepRound$1 as addCommSepRound, addNdcDesc, addRoundNumber, addSpaces, consumerGroupList, creditUnit, dateFormat, dateTimeFormat, energyGenerationUnitList, getBase64, getCompanyBgColor, getCreditStageVal, getFinancialFields, getGeneralFields, getInvestmentStatusEnumVal, getNdcActionStatusEnumVal$1 as getNdcActionStatusEnumVal, getNdcStatusTagType, getRetirementTypeString, getStageEnumVal, getStageTagType, getStageTagTypeMRV, getStageTransferEnumVal, getStatusTagType, getTransferStageTagType, getValidNdcActions, isBase64, landAreaUnitList, methodologyOptions, mitigationSubTypeList, mitigationSubTypesListMapped, mitigationTypeList, ndcActionTypeList, sectorMitigationTypesListMapped, sumArray, titleList };
|
35114
|
+
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, Emission, EmissionGas, EmissionSector, EmissionSubSectors, EnergyGenerationUnits, FormElementType, GHGDashboardComponent, GHGEmissionsComponent, GHGProjectionsComponent, GhgStatCardTypes, GovBGColor, GovColor, ImgWithFallback, InfoView, Instrument, InvestmentBGColor, InvestmentBody, InvestmentColor, InvestmentCreationComponent, InvestmentCreationType, InvestmentLevel, InvestmentManagementComponent, InvestmentStatus, InvestmentStream, InvestmentType, LandAreaUnits, LegendItem, Loading, ManagerBGColor, ManagerColor, MapComponent, MapTypes, MapboxComponent, MinBGColor, MinColor, MitigationSubTypes, MitigationTypes, MrvDashboardComponent, MrvStatsCardsTypes, NdcActionBody, NdcActionManagementComponent, NdcActionStatus, NdcActionTypes, NdcActionViewComponent, NdcDetailsComponent, OrganisationStatus, ProfileIcon, ProgrammeCertify, ProgrammeCreationComponent, ProgrammeDocuments, ProgrammeEntity, ProgrammeIssueForm, ProgrammeManagementColumns, ProgrammeManagementComponent, ProgrammeRetireForm, ProgrammeRevokeForm, ProgrammeStageLegend, ProgrammeStageMRV, ProgrammeStageR, ProgrammeStageUnified, ProgrammeTransfer, ProgrammeTransferForm, Projection, ProjectionTypes$1 as ProjectionTypes, RadioButtonStatus, RadioButtonStatus2, RegistryDashboardComponent, RejectDocumentationConfirmationModel, RetireType, Role, RoleIcon, RootBGColor, RootColor, SdgGoals$1 as SdgGoals, Sector, SectoralScope, 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$1 as addCommSepRound, addNdcDesc, addRoundNumber, addSpaces, consumerGroupList, creditUnit, dateFormat, dateTimeFormat, energyGenerationUnitList, getBase64, getCompanyBgColor, getCreditStageVal, getFinancialFields, getGeneralFields, getInvestmentStatusEnumVal, getNdcActionStatusEnumVal$1 as getNdcActionStatusEnumVal, getNdcStatusTagType, getRetirementTypeString, getStageEnumVal, getStageTagType, getStageTagTypeMRV, getStageTransferEnumVal, getStatusTagType, getTransferStageTagType, getValidNdcActions, isBase64, landAreaUnitList, methodologyOptions, mitigationSubTypeList, mitigationSubTypesListMapped, mitigationTypeList, ndcActionTypeList, sectorMitigationTypesListMapped, sumArray, titleList, useConnection, useSettingsContext, useUserContext };
|
34622
35115
|
//# sourceMappingURL=index.js.map
|