@undp/carbon-library 1.0.287-carbon-lib-test.0 → 1.0.287
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/index.js +1449 -1044
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/Components/Common/CoBenifits/coBenifits.d.ts +1 -0
- package/dist/cjs/types/Components/Common/Models/programmeRetireForm.d.ts +1 -0
- package/dist/cjs/types/Components/Common/Models/programmeTransferForm.d.ts +1 -0
- package/dist/cjs/types/Components/Common/NdcActionBody/ndcActionBody.d.ts +2 -0
- package/dist/cjs/types/Components/Common/ProgrammeDocuments/programmeDocuments.d.ts +2 -0
- package/dist/cjs/types/Components/Company/CompanyDetails/companyDetailsComponent.d.ts +3 -0
- package/dist/cjs/types/Definitions/Definitions/connectionContext.definitions.d.ts +0 -3
- package/dist/cjs/types/Definitions/Definitions/ndcDetails.definitions.d.ts +1 -0
- package/dist/cjs/types/Definitions/Enums/instrument.enum.d.ts +3 -0
- package/dist/cjs/types/Definitions/Enums/payback.enum.d.ts +8 -0
- package/dist/cjs/types/index.d.ts +0 -1
- package/dist/esm/index.js +1453 -1040
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/Components/Common/CoBenifits/coBenifits.d.ts +1 -0
- package/dist/esm/types/Components/Common/Models/programmeRetireForm.d.ts +1 -0
- package/dist/esm/types/Components/Common/Models/programmeTransferForm.d.ts +1 -0
- package/dist/esm/types/Components/Common/NdcActionBody/ndcActionBody.d.ts +2 -0
- package/dist/esm/types/Components/Common/ProgrammeDocuments/programmeDocuments.d.ts +2 -0
- package/dist/esm/types/Components/Company/CompanyDetails/companyDetailsComponent.d.ts +3 -0
- package/dist/esm/types/Definitions/Definitions/connectionContext.definitions.d.ts +0 -3
- package/dist/esm/types/Definitions/Definitions/ndcDetails.definitions.d.ts +1 -0
- package/dist/esm/types/Definitions/Enums/instrument.enum.d.ts +3 -0
- package/dist/esm/types/Definitions/Enums/payback.enum.d.ts +8 -0
- package/dist/esm/types/index.d.ts +0 -1
- package/dist/index.d.ts +11 -23
- package/dist/locales/i18n/companyDetails/en.json +19 -0
- package/dist/locales/i18n/companyDetails/es.json +16 -0
- package/dist/locales/i18n/companyDetails/fr.json +16 -0
- package/dist/locales/i18n/companyProfile/en.json +1 -18
- package/dist/locales/i18n/companyProfile/es.json +0 -14
- package/dist/locales/i18n/companyProfile/fr.json +0 -13
- package/dist/locales/i18n/ghgInventory/en.json +3 -1
- package/dist/locales/i18n/login/en.json +1 -0
- package/dist/locales/i18n/ndc/en.json +2 -0
- package/dist/locales/i18n/programme/en.json +9 -1
- package/package.json +2 -29
- package/dist/cjs/types/Context/ConnectionContext/connectionContext.d.ts +0 -8
- package/dist/cjs/types/Context/SettingsContext/settingsContext.d.ts +0 -10
- package/dist/cjs/types/Context/UserInformationContext/userInformationContext.d.ts +0 -6
- package/dist/cjs/types/Context/index.d.ts +0 -3
- package/dist/cjs/types/Storybook/AddNewCompanyComponent.stories.d.ts +0 -12
- package/dist/cjs/types/Storybook/AddNewUserComponent.stories.d.ts +0 -12
- package/dist/cjs/types/Storybook/Decorators/AddNewCompanyI18nDecorator.d.ts +0 -2
- package/dist/cjs/types/Storybook/Decorators/AddNewUserI18nDecorator.d.ts +0 -2
- package/dist/cjs/types/Storybook/Decorators/ConnectionContextDecorator.d.ts +0 -2
- package/dist/cjs/types/Storybook/Decorators/DashboardI18nDecorator.d.ts +0 -2
- package/dist/cjs/types/Storybook/Decorators/InvestmentCreationI18nDecorator.d.ts +0 -2
- package/dist/cjs/types/Storybook/Decorators/ProgrammeCreateI18nDecorator.d.ts +0 -2
- package/dist/cjs/types/Storybook/InvestmentCreationComponent.stories.d.ts +0 -12
- package/dist/cjs/types/Storybook/MRVDashboard.stories.d.ts +0 -12
- package/dist/cjs/types/Storybook/ProgrammeCreationComponent.stories.d.ts +0 -12
- package/dist/cjs/types/Storybook/RegistryDashboard.stories.d.ts +0 -12
- package/dist/esm/types/Context/ConnectionContext/connectionContext.d.ts +0 -8
- package/dist/esm/types/Context/SettingsContext/settingsContext.d.ts +0 -10
- package/dist/esm/types/Context/UserInformationContext/userInformationContext.d.ts +0 -6
- package/dist/esm/types/Context/index.d.ts +0 -3
- package/dist/esm/types/Storybook/AddNewCompanyComponent.stories.d.ts +0 -12
- package/dist/esm/types/Storybook/AddNewUserComponent.stories.d.ts +0 -12
- package/dist/esm/types/Storybook/Decorators/AddNewCompanyI18nDecorator.d.ts +0 -2
- package/dist/esm/types/Storybook/Decorators/AddNewUserI18nDecorator.d.ts +0 -2
- package/dist/esm/types/Storybook/Decorators/ConnectionContextDecorator.d.ts +0 -2
- package/dist/esm/types/Storybook/Decorators/DashboardI18nDecorator.d.ts +0 -2
- package/dist/esm/types/Storybook/Decorators/InvestmentCreationI18nDecorator.d.ts +0 -2
- package/dist/esm/types/Storybook/Decorators/ProgrammeCreateI18nDecorator.d.ts +0 -2
- package/dist/esm/types/Storybook/InvestmentCreationComponent.stories.d.ts +0 -12
- package/dist/esm/types/Storybook/MRVDashboard.stories.d.ts +0 -12
- package/dist/esm/types/Storybook/ProgrammeCreationComponent.stories.d.ts +0 -12
- package/dist/esm/types/Storybook/RegistryDashboard.stories.d.ts +0 -12
package/dist/cjs/index.js
CHANGED
@@ -5,7 +5,6 @@ var antd = require('antd');
|
|
5
5
|
var React = require('react');
|
6
6
|
var luxon = require('luxon');
|
7
7
|
var buffer = require('buffer');
|
8
|
-
var axios = require('axios');
|
9
8
|
var PhoneInput = require('react-phone-number-input');
|
10
9
|
var validator = require('validator');
|
11
10
|
var classTransformer = require('class-transformer');
|
@@ -15,6 +14,7 @@ var mapboxgl = require('mapbox-gl');
|
|
15
14
|
require('mapbox-gl/dist/mapbox-gl.css');
|
16
15
|
require('antd/dist/antd.css');
|
17
16
|
var XLSX = require('xlsx');
|
17
|
+
var axios = require('axios');
|
18
18
|
|
19
19
|
function _interopNamespaceDefault(e) {
|
20
20
|
var n = Object.create(null);
|
@@ -151,15 +151,15 @@ function styleInject(css, ref) {
|
|
151
151
|
}
|
152
152
|
}
|
153
153
|
|
154
|
-
var css_248z$
|
154
|
+
var css_248z$B = ".filter-menu-item .filter-title {\n margin-bottom: 0.5rem;\n font-weight: 600; }\n\n.table-row-gray {\n background-color: #F0F0F0; }\n\n.company-data-download {\n margin-left: 15px;\n margin-top: 0.8rem; }\n";
|
155
|
+
styleInject(css_248z$B);
|
156
|
+
|
157
|
+
var css_248z$A = ".common-table-class .ant-table {\n border-radius: 1rem; }\n .common-table-class .ant-table .ant-table-thead {\n justify-content: center; }\n .common-table-class .ant-table .ant-table-thead .ant-table-cell {\n color: rgba(58, 53, 65, 0.8);\n font-weight: 600;\n font-size: 0.8rem;\n text-align: center; }\n .common-table-class .ant-table .ant-table-tbody {\n font-size: 0.8rem;\n text-align: center;\n color: rgba(58, 53, 65, 0.8); }\n .common-table-class .ant-table .ant-table-cell {\n padding: 14px 12px; }\n .common-table-class .ant-table .ant-table-thead .ant-table-cell {\n text-transform: uppercase; }\n\n.ant-table-pagination.ant-pagination {\n margin: 16px 24px; }\n\n.ant-select-item-option-content {\n font-family: \"Inter\";\n color: rgba(58, 53, 65, 0.8); }\n\n.ant-pagination-prev, .ant-pagination-next, .ant-pagination-jump-prev, .ant-pagination-jump-next, .ant-pagination-item {\n height: 28px;\n border-radius: 4px;\n line-height: 26px;\n font-size: 0.8rem;\n font-family: \"Inter\"; }\n\n.ant-pagination-item-active:focus-visible {\n border-color: #16b1ff; }\n\n.ant-pagination-options-quick-jumper {\n font-size: 0.8rem;\n font-family: \"Inter\";\n color: rgba(58, 53, 65, 0.8);\n height: 30px;\n line-height: 30px; }\n .ant-pagination-options-quick-jumper input {\n height: 28px;\n border-radius: 4px;\n line-height: 26px;\n color: rgba(58, 53, 65, 0.8); }\n\n.ant-pagination-options .ant-select-single:not(.ant-select-customize-input) .ant-select-selector {\n height: 28px;\n border-radius: 4px;\n line-height: 26px;\n font-size: 0.8rem;\n font-family: \"Inter\";\n color: rgba(58, 53, 65, 0.8); }\n\n.ant-pagination-options .ant-select-selection-item {\n height: 28px;\n color: rgba(58, 53, 65, 0.8);\n line-height: 26px !important; }\n\n.ant-pagination-options .ant-select-dropdown {\n font-family: \"Inter\";\n color: rgba(58, 53, 65, 0.8);\n font-size: 0.8rem; }\n";
|
155
158
|
styleInject(css_248z$A);
|
156
159
|
|
157
|
-
var css_248z$z = ".
|
160
|
+
var css_248z$z = ".role-icon {\n border-radius: 100%;\n margin-right: 10px;\n padding: 0.30rem 0.5rem;\n font-size: 0.7rem; }\n";
|
158
161
|
styleInject(css_248z$z);
|
159
162
|
|
160
|
-
var css_248z$y = ".role-icon {\n border-radius: 100%;\n margin-right: 10px;\n padding: 0.30rem 0.5rem;\n font-size: 0.7rem; }\n";
|
161
|
-
styleInject(css_248z$y);
|
162
|
-
|
163
163
|
var RoleIcon = function (props) {
|
164
164
|
var icon = props.icon, bg = props.bg, color = props.color;
|
165
165
|
return (React.createElement("span", { className: "role-icon", style: { backgroundColor: bg, color: color } }, icon));
|
@@ -452,8 +452,8 @@ exports.CompanyManagementColumns = void 0;
|
|
452
452
|
CompanyManagementColumns["companyState"] = "status";
|
453
453
|
})(exports.CompanyManagementColumns || (exports.CompanyManagementColumns = {}));
|
454
454
|
|
455
|
-
var css_248z$
|
456
|
-
styleInject(css_248z$
|
455
|
+
var css_248z$y = ".profile-icon {\n border-radius: 100%;\n margin-right: 15px;\n font-size: 15px;\n width: 40px;\n height: 40px;\n display: flex;\n justify-content: center;\n align-items: center; }\n .profile-icon img {\n width: 26px; }\n";
|
456
|
+
styleInject(css_248z$y);
|
457
457
|
|
458
458
|
var isBase64 = function (str) {
|
459
459
|
if (!str || str === '' || str.trim() === '') {
|
@@ -493,8 +493,8 @@ exports.CompanyRole = void 0;
|
|
493
493
|
CompanyRole["API"] = "API";
|
494
494
|
})(exports.CompanyRole || (exports.CompanyRole = {}));
|
495
495
|
|
496
|
-
var css_248z$
|
497
|
-
styleInject(css_248z$
|
496
|
+
var css_248z$x = ".organisation-status-active {\n border-radius: 20px;\n background-color: rgba(185, 226, 244, 0.4);\n padding: 4px 15px;\n height: 28px;\n color: #16b1ff;\n margin-left: auto;\n margin-right: auto;\n width: 90px;\n text-align: center; }\n\n.organisation-status-deauthorised {\n border-radius: 20px;\n background-color: rgba(255, 166, 166, 0.4);\n padding: 4px 15px;\n height: 28px;\n color: #ff4d4f;\n margin-left: auto;\n margin-right: auto;\n width: 110px;\n text-align: center; }\n\n.organisation-status-pending {\n border-radius: 20px;\n background-color: rgba(176, 137, 244, 0.4);\n padding: 4px 15px;\n height: 28px;\n color: #976ed7;\n margin-left: auto;\n margin-right: auto;\n width: 90px;\n text-align: center; }\n\n.organisation-status-rejected {\n border-radius: 20px;\n background-color: rgba(255, 247, 230, 0.4);\n padding: 4px 15px;\n height: 28px;\n color: #ff8f56;\n margin-left: auto;\n margin-right: auto;\n width: 90px;\n text-align: center;\n background: #fff7e6;\n border-color: #ffd591; }\n";
|
497
|
+
styleInject(css_248z$x);
|
498
498
|
|
499
499
|
var OrganisationStatus = function (props) {
|
500
500
|
var organisationStatus = props.organisationStatus, t = props.t;
|
@@ -513,317 +513,9 @@ var OrganisationStatus = function (props) {
|
|
513
513
|
return orgState;
|
514
514
|
};
|
515
515
|
|
516
|
-
function e$1(e){this.message=e;}e$1.prototype=new Error,e$1.prototype.name="InvalidCharacterError";var r="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(r){var t=String(r).replace(/=+$/,"");if(t.length%4==1)throw new e$1("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,o,a=0,i=0,c="";o=t.charAt(i++);~o&&(n=a%4?64*n+o:o,a++%4)?c+=String.fromCharCode(255&n>>(-2*a&6)):0)o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(o);return c};function t$1(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw "Illegal base64url string!"}try{return function(e){return decodeURIComponent(r(e).replace(/(.)/g,(function(e,r){var t=r.charCodeAt(0).toString(16).toUpperCase();return t.length<2&&(t="0"+t),"%"+t})))}(t)}catch(e){return r(t)}}function n$1(e){this.message=e;}function o(e,r){if("string"!=typeof e)throw new n$1("Invalid token specified");var o=!0===(r=r||{}).header?0:1;try{return JSON.parse(t$1(e.split(".")[o]))}catch(e){throw new n$1("Invalid token specified: "+e.message)}}n$1.prototype=new Error,n$1.prototype.name="InvalidTokenError";
|
517
|
-
|
518
|
-
var ConnectionContext = React.createContext({});
|
519
|
-
var ConnectionContextProvider = function (props) {
|
520
|
-
var _a = React.useState(), token = _a[0], setToken = _a[1];
|
521
|
-
var serverURL = props.serverURL, t = props.t, statServerUrl = props.statServerUrl, children = props.children;
|
522
|
-
React.useEffect(function () {
|
523
|
-
var timer = setInterval(function () { return __awaiter(void 0, void 0, void 0, function () {
|
524
|
-
var newToken;
|
525
|
-
return __generator(this, function (_a) {
|
526
|
-
switch (_a.label) {
|
527
|
-
case 0: return [4 /*yield*/, localStorage.getItem('token')];
|
528
|
-
case 1:
|
529
|
-
newToken = _a.sent();
|
530
|
-
if (token !== newToken) {
|
531
|
-
setToken(newToken);
|
532
|
-
}
|
533
|
-
return [2 /*return*/];
|
534
|
-
}
|
535
|
-
});
|
536
|
-
}); }, 3000);
|
537
|
-
if (token) {
|
538
|
-
clearTimeout(timer);
|
539
|
-
}
|
540
|
-
return function () {
|
541
|
-
clearTimeout(timer);
|
542
|
-
};
|
543
|
-
}, [token]);
|
544
|
-
var send = React.useCallback(function (method, path, data, config, extraUrl) {
|
545
|
-
return new Promise(function (resolve, reject) {
|
546
|
-
var url = "".concat(extraUrl ? extraUrl : serverURL, "/").concat(path);
|
547
|
-
var headers;
|
548
|
-
if (token) {
|
549
|
-
headers = { authorization: "Bearer ".concat(token.toString()) };
|
550
|
-
}
|
551
|
-
else {
|
552
|
-
if (localStorage.getItem('token')) {
|
553
|
-
headers = {
|
554
|
-
authorization: "Bearer ".concat(localStorage.getItem('token')),
|
555
|
-
};
|
556
|
-
}
|
557
|
-
else {
|
558
|
-
headers = {
|
559
|
-
authorization: "Bearer ".concat(process.env.STORYBOOK_ACCESS_TOKEN),
|
560
|
-
};
|
561
|
-
}
|
562
|
-
}
|
563
|
-
axios(__assign({ method: method, url: url, data: data, headers: headers }, config))
|
564
|
-
.then(function (response) {
|
565
|
-
var _a, _b, _c;
|
566
|
-
if (response.status) {
|
567
|
-
if (response.status === 200 || response.status === 201) {
|
568
|
-
resolve({
|
569
|
-
status: response.status,
|
570
|
-
data: (_a = response.data.data) !== null && _a !== void 0 ? _a : response.data,
|
571
|
-
response: response,
|
572
|
-
statusText: 'SUCCESS',
|
573
|
-
message: response.data.message,
|
574
|
-
});
|
575
|
-
}
|
576
|
-
else if (response.status === 422) {
|
577
|
-
reject({
|
578
|
-
status: response.status,
|
579
|
-
data: (_b = response.data) === null || _b === void 0 ? void 0 : _b.data,
|
580
|
-
statusText: 'ERROR',
|
581
|
-
response: response,
|
582
|
-
message: response.data.message,
|
583
|
-
errors: (_c = response.data) === null || _c === void 0 ? void 0 : _c.errors,
|
584
|
-
});
|
585
|
-
}
|
586
|
-
}
|
587
|
-
else {
|
588
|
-
reject({
|
589
|
-
status: 500,
|
590
|
-
statusText: 'UNKNOWN',
|
591
|
-
message: t('common:systemError'),
|
592
|
-
});
|
593
|
-
}
|
594
|
-
})
|
595
|
-
.catch(function (e) {
|
596
|
-
var _a;
|
597
|
-
if (e.response) {
|
598
|
-
if (e.response.status) {
|
599
|
-
if (e.response.data.message === 'jwt expired') {
|
600
|
-
localStorage.removeItem('token');
|
601
|
-
window.location.reload();
|
602
|
-
}
|
603
|
-
reject({
|
604
|
-
status: e.response.status,
|
605
|
-
statusText: 'ERROR',
|
606
|
-
errors: (_a = e.response.data) === null || _a === void 0 ? void 0 : _a.errors,
|
607
|
-
message: e.response.data.message,
|
608
|
-
});
|
609
|
-
}
|
610
|
-
else {
|
611
|
-
reject({
|
612
|
-
statusText: 'ERROR',
|
613
|
-
message: t('common:systemError'),
|
614
|
-
});
|
615
|
-
}
|
616
|
-
}
|
617
|
-
else {
|
618
|
-
reject({
|
619
|
-
statusText: 'ERROR',
|
620
|
-
message: t('common:networkError'),
|
621
|
-
});
|
622
|
-
}
|
623
|
-
});
|
624
|
-
});
|
625
|
-
}, [token, serverURL]);
|
626
|
-
var post = React.useCallback(function (path, data, config, extraUrl) {
|
627
|
-
return send('post', path, data, config, extraUrl);
|
628
|
-
}, [send]);
|
629
|
-
var put = React.useCallback(function (path, data, config) {
|
630
|
-
return send('put', path, data, config);
|
631
|
-
}, [send]);
|
632
|
-
var get = React.useCallback(function (path, config) {
|
633
|
-
return send('get', path, undefined, config);
|
634
|
-
}, [send]);
|
635
|
-
var patch = React.useCallback(function (path, data, config) {
|
636
|
-
return send('patch', path, data, config);
|
637
|
-
}, [send]);
|
638
|
-
var del = React.useCallback(function (path, config) {
|
639
|
-
return send('delete', path, config);
|
640
|
-
}, [send]);
|
641
|
-
var updateToken = React.useCallback(function (newToken) { return __awaiter(void 0, void 0, void 0, function () {
|
642
|
-
return __generator(this, function (_a) {
|
643
|
-
if (newToken) {
|
644
|
-
localStorage.setItem('token', newToken);
|
645
|
-
setToken(newToken);
|
646
|
-
}
|
647
|
-
else {
|
648
|
-
localStorage.setItem('token', '');
|
649
|
-
setToken(undefined);
|
650
|
-
}
|
651
|
-
return [2 /*return*/];
|
652
|
-
});
|
653
|
-
}); }, []);
|
654
|
-
var removeToken = function (tkn) {
|
655
|
-
if (tkn) {
|
656
|
-
var exp = o(tkn).exp;
|
657
|
-
if (Date.now() > exp * 1000) {
|
658
|
-
localStorage.setItem('token', '');
|
659
|
-
localStorage.removeItem('userRole');
|
660
|
-
localStorage.removeItem('userId');
|
661
|
-
localStorage.removeItem('companyId');
|
662
|
-
localStorage.removeItem('companyRole');
|
663
|
-
}
|
664
|
-
else {
|
665
|
-
var diff = exp * 1000 - Date.now();
|
666
|
-
setTimeout(function () {
|
667
|
-
setToken(undefined);
|
668
|
-
localStorage.setItem('token', '');
|
669
|
-
localStorage.removeItem('userRole');
|
670
|
-
localStorage.removeItem('userId');
|
671
|
-
localStorage.removeItem('companyId');
|
672
|
-
localStorage.removeItem('companyRole');
|
673
|
-
}, diff);
|
674
|
-
console.log(diff, 'Remaining Token expire time');
|
675
|
-
}
|
676
|
-
}
|
677
|
-
};
|
678
|
-
React.useEffect(function () {
|
679
|
-
removeToken(token);
|
680
|
-
}, [token]);
|
681
|
-
return (React.createElement(ConnectionContext.Provider, { value: {
|
682
|
-
connection: { post: post, put: put, get: get, patch: patch, delete: del, updateToken: updateToken, token: token, removeToken: removeToken, statServerUrl: statServerUrl },
|
683
|
-
} }, children));
|
684
|
-
};
|
685
|
-
var useConnection = function () {
|
686
|
-
var context = React.useContext(ConnectionContext);
|
687
|
-
return context.connection;
|
688
|
-
};
|
689
|
-
|
690
|
-
var UserContext = React.createContext({
|
691
|
-
setUserInfo: function () { },
|
692
|
-
removeUserInfo: function () { },
|
693
|
-
IsAuthenticated: function (tkn) { return false; },
|
694
|
-
isTokenExpired: false,
|
695
|
-
setIsTokenExpired: function (val) { },
|
696
|
-
});
|
697
|
-
var UserInformationContextProvider = function (_a) {
|
698
|
-
var children = _a.children;
|
699
|
-
var token = useConnection().token;
|
700
|
-
var _b = React.useState(false), isTokenExpired = _b[0], setIsTokenExpired = _b[1];
|
701
|
-
var initialUserProps = {
|
702
|
-
id: localStorage.getItem('userId') ? localStorage.getItem('userId') : process.env.STORYBOOK_USER_ID ? process.env.STORYBOOK_USER_ID : '',
|
703
|
-
userRole: localStorage.getItem('userRole') ? localStorage.getItem('userRole') : process.env.STORYBOOK_USER_ROLE ? process.env.STORYBOOK_USER_ROLE : '',
|
704
|
-
companyRole: localStorage.getItem('companyRole')
|
705
|
-
? localStorage.getItem('companyRole')
|
706
|
-
: process.env.STORYBOOK_COMPANY_ROLE ? process.env.STORYBOOK_COMPANY_ROLE : '',
|
707
|
-
companyId: localStorage.getItem('companyId')
|
708
|
-
? parseInt(localStorage.getItem('companyId'))
|
709
|
-
: process.env.STORYBOOK_COMPANY_ID ? parseInt(process.env.STORYBOOK_COMPANY_ID) : -1,
|
710
|
-
companyLogo: localStorage.getItem('companyLogo')
|
711
|
-
? localStorage.getItem('companyLogo')
|
712
|
-
: process.env.STORYBOOK_COMPANY_LOGO ? process.env.STORYBOOK_COMPANY_LOGO : '',
|
713
|
-
companyName: localStorage.getItem('companyName')
|
714
|
-
? localStorage.getItem('companyName')
|
715
|
-
: process.env.STORYBOOK_COMPANY_NAME ? process.env.STORYBOOK_COMPANY_NAME : '',
|
716
|
-
companyState: localStorage.getItem('companyState')
|
717
|
-
? parseInt(localStorage.getItem('companyState'))
|
718
|
-
: process.env.STORYBOOK_COMPANY_STATE ? parseInt(process.env.STORYBOOK_COMPANY_STATE) : 0,
|
719
|
-
};
|
720
|
-
var _c = React.useState(initialUserProps), userInfoState = _c[0], setUserInfoState = _c[1];
|
721
|
-
var setUserInfo = function (value) {
|
722
|
-
var state = (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyState) === 1 ? userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyState : 0;
|
723
|
-
var id = value.id, userRole = value.userRole, companyId = value.companyId, companyRole = value.companyRole, companyLogo = value.companyLogo, companyName = value.companyName, _a = value.companyState, companyState = _a === void 0 ? state : _a;
|
724
|
-
if (id) {
|
725
|
-
setUserInfoState(function (prev) { return (__assign(__assign({}, prev), { id: id })); });
|
726
|
-
localStorage.setItem('userId', id);
|
727
|
-
}
|
728
|
-
if (userRole) {
|
729
|
-
setUserInfoState(function (prev) { return (__assign(__assign({}, prev), { userRole: userRole })); });
|
730
|
-
localStorage.setItem('userRole', userRole);
|
731
|
-
}
|
732
|
-
if (companyId) {
|
733
|
-
setUserInfoState(function (prev) { return (__assign(__assign({}, prev), { companyId: companyId })); });
|
734
|
-
localStorage.setItem('companyId', companyId + '');
|
735
|
-
}
|
736
|
-
if (companyLogo) {
|
737
|
-
setUserInfoState(function (prev) { return (__assign(__assign({}, prev), { companyLogo: companyLogo })); });
|
738
|
-
localStorage.setItem('companyLogo', companyLogo);
|
739
|
-
}
|
740
|
-
else {
|
741
|
-
setUserInfoState(function (prev) { return (__assign(__assign({}, prev), { companyLogo: '' })); });
|
742
|
-
localStorage.setItem('companyLogo', '');
|
743
|
-
}
|
744
|
-
if (companyName) {
|
745
|
-
setUserInfoState(function (prev) { return (__assign(__assign({}, prev), { companyName: companyName })); });
|
746
|
-
localStorage.setItem('companyName', companyName);
|
747
|
-
}
|
748
|
-
if (userRole) {
|
749
|
-
setUserInfoState(function (prev) { return (__assign(__assign({}, prev), { companyRole: companyRole })); });
|
750
|
-
localStorage.setItem('companyRole', companyRole);
|
751
|
-
}
|
752
|
-
setUserInfoState(function (prev) { return (__assign(__assign({}, prev), { companyState: companyState })); });
|
753
|
-
localStorage.setItem('companyState', companyState + '');
|
754
|
-
};
|
755
|
-
var IsAuthenticated = React.useCallback(function (tokenNew) {
|
756
|
-
var tokenVal;
|
757
|
-
if (tokenNew) {
|
758
|
-
tokenVal = tokenNew;
|
759
|
-
}
|
760
|
-
else if (token) {
|
761
|
-
tokenVal = token;
|
762
|
-
}
|
763
|
-
else {
|
764
|
-
tokenVal = localStorage.getItem('token');
|
765
|
-
if (tokenVal === '') {
|
766
|
-
if (history.length !== 1) {
|
767
|
-
setIsTokenExpired(true);
|
768
|
-
}
|
769
|
-
}
|
770
|
-
}
|
771
|
-
try {
|
772
|
-
if (tokenVal) {
|
773
|
-
var exp = o(tokenVal).exp;
|
774
|
-
return Date.now() < exp * 1000;
|
775
|
-
}
|
776
|
-
return false;
|
777
|
-
}
|
778
|
-
catch (err) {
|
779
|
-
return false;
|
780
|
-
}
|
781
|
-
}, [token]);
|
782
|
-
var removeUserInfo = function () {
|
783
|
-
localStorage.removeItem('userId');
|
784
|
-
localStorage.removeItem('userRole');
|
785
|
-
localStorage.removeItem('companyId');
|
786
|
-
localStorage.removeItem('companyRole');
|
787
|
-
localStorage.removeItem('companyName');
|
788
|
-
localStorage.removeItem('companyState');
|
789
|
-
localStorage.removeItem('companyLogo');
|
790
|
-
setUserInfoState(initialUserProps);
|
791
|
-
};
|
792
|
-
return (React.createElement(UserContext.Provider, { value: {
|
793
|
-
userInfoState: userInfoState,
|
794
|
-
setUserInfo: setUserInfo,
|
795
|
-
removeUserInfo: removeUserInfo,
|
796
|
-
IsAuthenticated: IsAuthenticated,
|
797
|
-
isTokenExpired: isTokenExpired,
|
798
|
-
setIsTokenExpired: setIsTokenExpired,
|
799
|
-
} }, children));
|
800
|
-
};
|
801
|
-
var useUserContext = function () {
|
802
|
-
return React.useContext(UserContext);
|
803
|
-
};
|
804
|
-
|
805
|
-
var SettingsContext = React.createContext({
|
806
|
-
isTransferFrozen: false,
|
807
|
-
setTransferFrozen: function (value) { },
|
808
|
-
});
|
809
|
-
var SettingsContextProvider = function (_a) {
|
810
|
-
var children = _a.children;
|
811
|
-
var _b = React.useState(false), isTransferFrozen = _b[0], setIsTransferFrozen = _b[1];
|
812
|
-
var setTransferFrozen = function (value) {
|
813
|
-
setIsTransferFrozen(value);
|
814
|
-
};
|
815
|
-
return (React.createElement(SettingsContext.Provider, { value: {
|
816
|
-
isTransferFrozen: isTransferFrozen,
|
817
|
-
setTransferFrozen: setTransferFrozen,
|
818
|
-
} }, children));
|
819
|
-
};
|
820
|
-
var useSettingsContext = function () {
|
821
|
-
return React.useContext(SettingsContext);
|
822
|
-
};
|
823
|
-
|
824
516
|
var Search$2 = antd.Input.Search;
|
825
517
|
var CompanyManagementComponent = function (props) {
|
826
|
-
var t = props.t, useAbilityContext = props.useAbilityContext, visibleColumns = props.visibleColumns, onNavigateToCompanyProfile = props.onNavigateToCompanyProfile, onClickAddCompany = props.onClickAddCompany;
|
518
|
+
var t = props.t, useAbilityContext = props.useAbilityContext, post = props.post, visibleColumns = props.visibleColumns, onNavigateToCompanyProfile = props.onNavigateToCompanyProfile, onClickAddCompany = props.onClickAddCompany;
|
827
519
|
var _a = React.useState(), totalCompany = _a[0], setTotalCompany = _a[1];
|
828
520
|
var _b = React.useState(false), loading = _b[0], setLoading = _b[1];
|
829
521
|
var _c = React.useState([]), tableData = _c[0], setTableData = _c[1];
|
@@ -836,8 +528,8 @@ var CompanyManagementComponent = function (props) {
|
|
836
528
|
var _j = React.useState("All"), filterByOrganisationType = _j[0], setFilterByOrganisationType = _j[1];
|
837
529
|
var _k = React.useState(""), sortOrder = _k[0], setSortOrder = _k[1];
|
838
530
|
var _l = React.useState(""), sortField = _l[0], setSortField = _l[1];
|
531
|
+
var _m = React.useState(), dataQuery = _m[0], setDataQuery = _m[1];
|
839
532
|
var ability = useAbilityContext();
|
840
|
-
var post = useConnection().post;
|
841
533
|
document.addEventListener("mousedown", function (event) {
|
842
534
|
var organisationFilterArea1 = document.querySelector(".filter-bar");
|
843
535
|
var organisationFilterArea2 = document.querySelector(".filter-dropdown");
|
@@ -1042,6 +734,11 @@ var CompanyManagementComponent = function (props) {
|
|
1042
734
|
setTableData(availableCompanies);
|
1043
735
|
setTotalCompany((_b = (_a = response === null || response === void 0 ? void 0 : response.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.total);
|
1044
736
|
}
|
737
|
+
setDataQuery({
|
738
|
+
filterAnd: filterAnd(),
|
739
|
+
filterOr: filterOr(),
|
740
|
+
sort: sort(),
|
741
|
+
});
|
1045
742
|
setLoading(false);
|
1046
743
|
return [3 /*break*/, 4];
|
1047
744
|
case 3:
|
@@ -1058,6 +755,50 @@ var CompanyManagementComponent = function (props) {
|
|
1058
755
|
}
|
1059
756
|
});
|
1060
757
|
}); };
|
758
|
+
var downloadCompanyData = function () { return __awaiter(void 0, void 0, void 0, function () {
|
759
|
+
var response, url, a, error_2;
|
760
|
+
var _a;
|
761
|
+
return __generator(this, function (_b) {
|
762
|
+
switch (_b.label) {
|
763
|
+
case 0:
|
764
|
+
setLoading(true);
|
765
|
+
_b.label = 1;
|
766
|
+
case 1:
|
767
|
+
_b.trys.push([1, 3, , 4]);
|
768
|
+
return [4 /*yield*/, post("national/organisation/download", {
|
769
|
+
filterAnd: dataQuery.filterAnd,
|
770
|
+
filterOr: ((_a = dataQuery.filterOr) === null || _a === void 0 ? void 0 : _a.length) > 0 ? dataQuery.filterOr : undefined,
|
771
|
+
sort: dataQuery.sort,
|
772
|
+
})];
|
773
|
+
case 2:
|
774
|
+
response = _b.sent();
|
775
|
+
if (response && response.data) {
|
776
|
+
url = response.data.url;
|
777
|
+
a = document.createElement('a');
|
778
|
+
a.href = url;
|
779
|
+
a.download = response.data.csvFile; // Specify the filename for the downloaded file
|
780
|
+
document.body.appendChild(a);
|
781
|
+
a.click();
|
782
|
+
document.body.removeChild(a); // Clean up the created <a> element
|
783
|
+
window.URL.revokeObjectURL(url);
|
784
|
+
}
|
785
|
+
setLoading(false);
|
786
|
+
return [3 /*break*/, 4];
|
787
|
+
case 3:
|
788
|
+
error_2 = _b.sent();
|
789
|
+
console.log("Error in exporting organisations", error_2);
|
790
|
+
antd.message.open({
|
791
|
+
type: "error",
|
792
|
+
content: error_2.message,
|
793
|
+
duration: 3,
|
794
|
+
style: { textAlign: "right", marginRight: 15, marginTop: 10 },
|
795
|
+
});
|
796
|
+
setLoading(false);
|
797
|
+
return [3 /*break*/, 4];
|
798
|
+
case 4: return [2 /*return*/];
|
799
|
+
}
|
800
|
+
});
|
801
|
+
}); };
|
1061
802
|
React.useEffect(function () {
|
1062
803
|
getAllCompany();
|
1063
804
|
}, [
|
@@ -1145,7 +886,13 @@ var CompanyManagementComponent = function (props) {
|
|
1145
886
|
React.createElement(icons.FilterOutlined, { style: {
|
1146
887
|
color: "rgba(58, 53, 65, 0.3)",
|
1147
888
|
fontSize: "20px",
|
1148
|
-
} }))))
|
889
|
+
} })))),
|
890
|
+
React.createElement("div", { className: "download-data-btn company-data-download" },
|
891
|
+
React.createElement("a", { onClick: downloadCompanyData },
|
892
|
+
React.createElement(icons.DownloadOutlined, { style: {
|
893
|
+
color: "rgba(58, 53, 65, 0.3)",
|
894
|
+
fontSize: "20px",
|
895
|
+
} })))))),
|
1149
896
|
React.createElement(antd.Row, null,
|
1150
897
|
React.createElement(antd.Col, { span: 24 },
|
1151
898
|
React.createElement("div", { className: "userManagement-table-container" },
|
@@ -1167,11 +914,11 @@ var CompanyManagementComponent = function (props) {
|
|
1167
914
|
} })))))));
|
1168
915
|
};
|
1169
916
|
|
1170
|
-
var css_248z$
|
1171
|
-
styleInject(css_248z$
|
917
|
+
var css_248z$w = ".company-details-form-container {\n width: 100%; }\n .company-details-form-container .company-details-form .steps-actions {\n display: flex;\n flex-direction: row-reverse; }\n .company-details-form-container .company-details-form .steps-actions .mg-left-1 {\n margin-left: 1rem; }\n .company-details-form-container .company-details-form .row .website .ant-input {\n margin-left: 0.3rem; }\n .company-details-form-container .company-details-form .row .website .ant-input-group-addon {\n border: 1px solid #d9d9d9; }\n .company-details-form-container .company-details-form .row .logo-upload-section {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: start;\n width: 100%; }\n .company-details-form-container .company-details-form .row .logo-upload-section .ant-upload {\n width: 20%; }\n .company-details-form-container .company-details-form .row .logo-upload-section .ant-upload-list {\n align-items: center;\n justify-content: center;\n width: 75%; }\n .company-details-form-container .company-details-form .row .logo-upload-section .ant-upload-list .ant-upload-list-item {\n margin-top: 0; }\n .company-details-form-container .company-details-form .row .details-part-one .space-container {\n width: 100%; }\n .company-details-form-container .company-details-form .row .details-part-one .space-container .ant-space-item {\n width: 100%; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .certifier-radio-container {\n width: 30%; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .certifier-radio-container .ant-radio-button-wrapper-checked:not(\n .ant-radio-button-wrapper-disabled\n) {\n color: #519e4f !important;\n border-color: #519e4f !important;\n box-shadow: none; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .certifier-radio-container .anticon {\n background: #eeeeee;\n border-radius: 50px;\n padding: 0.2rem;\n color: #519e4f; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .dev-radio-container {\n width: 30%; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .dev-radio-container .ant-radio-button-wrapper-checked:not(\n .ant-radio-button-wrapper-disabled\n) {\n color: #ffa070 !important;\n border-color: #ffa070 !important;\n box-shadow: none; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .dev-radio-container .anticon {\n background: #eeeeee;\n border-radius: 50px;\n padding: 0.2rem;\n color: #ffa070; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .minister-radio-container {\n width: 30%; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .minister-radio-container .ant-radio-button-wrapper-checked:not(\n .ant-radio-button-wrapper-disabled\n) {\n color: #9155fd !important;\n border-color: #9155fd !important;\n box-shadow: none; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .minister-radio-container .anticon {\n background: #eeeeee;\n border-radius: 50px;\n padding: 0.2rem;\n color: #9155fd; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .gov-radio-container {\n width: 45%; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .gov-radio-container .ant-radio-button-wrapper-checked:not(\n .ant-radio-button-wrapper-disabled\n) {\n color: #16b1ff !important;\n border-color: #16b1ff !important;\n box-shadow: none; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .gov-radio-container .anticon {\n background: #eeeeee;\n border-radius: 50px;\n padding: 0.2rem;\n color: #16b1ff; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .observer-radio-container {\n width: 25%; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .observer-radio-container .ant-radio-button-wrapper-checked:not(\n .ant-radio-button-wrapper-disabled\n) {\n color: #707070 !important;\n border-color: #707070 !important;\n box-shadow: none; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .observer-radio-container .anticon {\n background: #eeeeee;\n border-radius: 50px;\n padding: 0.2rem;\n color: #707070; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .ant-radio-button-wrapper::before {\n background-color: transparent; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .ant-radio-button-wrapper {\n border: 1px solid #d9d9d9; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .anticon {\n margin-right: 0.5rem; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .certifier {\n width: 100%; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .certifier .ant-radio-button-checked {\n background: rgba(128, 255, 0, 0.12);\n color: #519e4f; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .dev {\n width: 100%; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .dev .ant-radio-button-checked {\n background: rgba(254, 241, 173, 0.5);\n color: #ffa070; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .gov {\n width: 100%; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .gov .ant-radio-button-checked {\n background: rgba(185, 226, 244, 0.56);\n color: #16b1ff; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .minister {\n width: 100%; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .minister .ant-radio-button-checked {\n background: rgba(198, 144, 251, 0.12);\n color: #9155fd; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .observer {\n width: 100%; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .observer .ant-radio-button-checked {\n background: rgba(176, 190, 197, 0.23);\n color: #707070; }\n .company-details-form-container .company-details-form .row .details-part-two .role-group .role-icons {\n margin-right: 5px; }\n .company-details-form-container .company-details-form .row .details-part-two .space-container {\n width: 100%; }\n .company-details-form-container .company-details-form .row .details-part-two .space-container .ant-space-item {\n width: 100%; }\n\n.step-title-container {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 1rem; }\n .step-title-container .step-count {\n font-size: 2.2rem;\n font-weight: 800;\n margin-right: 0.4rem;\n color: rgba(58, 53, 65, 0.8); }\n .step-title-container .title {\n font-size: 1rem;\n font-weight: 600;\n color: #3a3541; }\n\n.add-company-main-container {\n display: flex;\n flex-direction: column;\n border-radius: 5px;\n padding: 0 50px; }\n .add-company-main-container .title-container {\n display: flex;\n flex-direction: column;\n border-radius: 5px; }\n .add-company-main-container .title-container .main {\n font-size: 1.25rem;\n font-weight: 500;\n color: #16b1ff; }\n .add-company-main-container .title-container .sub {\n font-size: 0.8rem;\n color: #555657; }\n .add-company-main-container .adding-section {\n display: flex;\n flex-direction: column;\n background-color: #ffffff;\n margin: 1rem 0 1rem 0;\n border-radius: 10px;\n padding: 2.5rem 1.5rem 2.5rem 1.5rem; }\n .add-company-main-container .adding-section .form-section {\n display: flex;\n margin-bottom: 2rem; }\n .add-company-main-container .adding-section .form-section .form-one {\n width: 100%; }\n .add-company-main-container .adding-section .form-section .steps {\n width: 15%; }\n .add-company-main-container .adding-section .form-section .steps-content {\n width: 85%; }\n .add-company-main-container .adding-section .steps-action {\n display: flex;\n flex-direction: row-reverse; }\n\n.ant-upload-list-picture .ant-upload-list-item-error,\n.ant-upload-list-picture-card .ant-upload-list-item-error {\n height: auto;\n max-height: 200px; }\n\n.hide {\n display: none !important; }\n";
|
918
|
+
styleInject(css_248z$w);
|
1172
919
|
|
1173
|
-
var css_248z$u = "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";
|
1174
|
-
styleInject(css_248z$
|
920
|
+
var css_248z$v = "body {\n background-color: #f4f5fa;\n font-family: \"Inter\";\n font-weight: 400; }\n\n.ant-menu {\n background-color: #f4f5fa; }\n\n.ant-layout-header {\n background-color: #f4f5fa; }\n\n.ant-layout {\n background-color: #f4f5fa; }\n\n.ant-menu-submenu .ant-menu {\n background-color: #f4f5fa; }\n\n.ant-menu-item {\n background-color: #f4f5fa; }\n\n.ant-menu-sub {\n background-color: #f4f5fa; }\n\n.ant-table-content {\n font-family: \"Inter\"; }\n\n.ant-input {\n border-radius: 5px !important; }\n\n.ant-btn {\n border-radius: 5px !important; }\n\n.ant-input-group-addon:first-child {\n border-radius: 5px !important; }\n\n.ant-input-group .ant-input {\n width: 99% !important; }\n\n.ant-radio-group {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between; }\n\n.ant-radio-group-large .ant-radio-button-wrapper {\n font-size: 0.8rem;\n width: 25%;\n border-radius: 5px !important; }\n\n.ant-upload-list-picture .ant-upload-list-item-error,\n.ant-upload-list-picture-card .ant-upload-list-item-error {\n border-color: #40a9ff;\n border-radius: 5px;\n height: 40px; }\n .ant-upload-list-picture .ant-upload-list-item-error .ant-upload-list-item-name,\n .ant-upload-list-picture-card .ant-upload-list-item-error .ant-upload-list-item-name {\n color: #40a9ff !important; }\n\n.ant-upload-list-item-error .ant-upload-list-item-card-actions .anticon {\n color: #40a9ff; }\n\n.ant-input-status-error:not(.ant-input-disabled):not(.ant-input-borderless).ant-input,\n.ant-input-status-error:not(.ant-input-disabled):not(.ant-input-borderless).ant-input:hover {\n border-color: #d9d9d9 !important; }\n\n.ant-input-group-wrapper-status-error .ant-input-group-addon {\n border-color: #d9d9d9 !important; }\n\n.ant-form-item-explain-error {\n font-size: 13px;\n color: rgba(255, 77, 79, 0.8); }\n\n.ant-table-thead\n> tr\n> th:not(:last-child):not(.ant-table-selection-column):not(.ant-table-row-expand-icon-cell):not([colspan])::before {\n background-color: transparent !important; }\n\n.ant-form-item-label > label {\n flex-direction: row-reverse !important;\n color: rgba(58, 53, 65, 0.5); }\n\n.ant-form-item-label\n> label.ant-form-item-required:not(.ant-form-item-required-mark-optional)::before {\n margin-left: 0.2rem !important;\n color: rgba(255, 77, 79, 0.8) !important; }\n\n.ant-picker {\n border-radius: 5px !important;\n height: 35px !important; }\n\n.space-container {\n width: 100%; }\n .space-container .ant-space-item {\n width: 100%; }\n\n.PhoneInput .PhoneInputCountry {\n border: 1px solid #d9d9d9 !important;\n border-radius: 5px !important;\n padding: 0 1rem 0 1rem; }\n\n.PhoneInput .PhoneInputInput {\n flex: 1 1;\n min-width: 0;\n border-radius: 5px !important;\n height: 40px;\n border: 1px solid #d9d9d9 !important;\n outline: none; }\n\n.filter-title {\n color: rgba(58, 53, 65, 0.8);\n font-family: 'Inter';\n font-style: normal;\n font-weight: 600;\n font-size: 0.875rem; }\n\n.ant-radio-wrapper {\n font-family: 'Inter';\n font-style: normal;\n font-weight: 400;\n font-size: 0.875rem;\n line-height: 22px;\n color: rgba(58, 53, 65, 0.8); }\n\n.ant-list-item {\n color: rgba(58, 53, 65, 0.8); }\n\n.PhoneInput .PhoneInputInput:focus-visible,\n.PhoneInput .PhoneInputInput:hover {\n flex: 1 1;\n min-width: 0;\n border-radius: 5px !important;\n height: 40px;\n border-right: 1px solid #40a9ff !important;\n outline: 1px solid #40a9ff; }\n\n.layout-content-container {\n padding-bottom: 100px; }\n .layout-content-container .ant-btn-primary {\n background-color: #16b1ff;\n color: #ffffff;\n border: none; }\n .layout-content-container .ant-btn {\n height: 32px;\n font-weight: 500;\n font-size: 0.8rem;\n border-radius: 0.3rem;\n box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.25);\n min-width: 80px;\n box-shadow: none; }\n .layout-content-container .ant-btn span {\n text-transform: uppercase; }\n\n.content-container {\n padding: 0px 20px; }\n .content-container .title-bar {\n padding: 0px 0px 30px 0px; }\n .content-container .body-title {\n color: #16b1ff;\n font-weight: 500;\n font-size: 1.2rem; }\n .content-container .body-sub-title {\n color: rgba(58, 53, 65, 0.6);\n font-weight: 400;\n font-size: 0.8rem; }\n\n.content-card {\n background-color: #ffffff;\n border-radius: 10px;\n width: 100%; }\n .content-card .action-bar {\n padding: 1.6rem 1.3rem 1.6rem 1.3rem; }\n .content-card .action-bar button {\n width: fit-content; }\n .content-card .filter-section {\n padding: 1.4rem 1.3rem 1.6rem 1.3rem;\n display: flex;\n width: 100%;\n flex-direction: row;\n align-items: center;\n justify-content: end; }\n .content-card .filter-section .search-bar {\n display: flex;\n flex-direction: row-reverse; }\n .content-card .filter-section .filter-bar {\n display: flex;\n flex-direction: row-reverse;\n margin-top: 0.8rem;\n width: 5%; }\n .content-card .filter-section .ant-input-affix-wrapper {\n border-radius: 0.313rem 0 0 0.313rem !important; }\n .content-card .filter-section .ant-input-search\n> .ant-input-group\n> .ant-input-group-addon:last-child\n.ant-input-search-button {\n padding-top: 0;\n padding-bottom: 0;\n border-radius: 0 0.313rem 0.313rem 0 !important; }\n\n.layout-content-container .ant-btn {\n min-width: 50px !important; }\n\n.table-actions-section {\n width: 100%;\n margin-bottom: 1rem; }\n\n.action-menu {\n min-width: 120px;\n color: rgba(58, 53, 65, 0.6); }\n .action-menu .action-icon {\n margin-right: 12px;\n display: flex; }\n .action-menu .anticon-edit {\n color: #16b1ff; }\n .action-menu .anticon-delete {\n color: #f25a29; }\n\n.ant-dropdown-menu {\n padding: 1rem 2rem 1rem 1rem !important;\n border-radius: 5px; }\n\n.ant-dropdown-menu-item-active {\n background-color: transparent !important; }\n\n.ant-popover-inner-content .action-menu {\n margin: -12px -16px; }\n .ant-popover-inner-content .action-menu .ant-list-item {\n padding: 11px 16px;\n justify-content: flex-start;\n cursor: pointer; }\n\n.ant-tag {\n border-radius: 20px; }\n\n.clickable {\n cursor: pointer; }\n\n.text-center {\n text-align: center; }\n\n.float-left {\n float: left; }\n\n.float-right {\n float: right; }\n\n.apexcharts-canvas {\n font-family: \"Inter\" !important; }\n\n.apexcharts-legend-text {\n font-family: \"Inter\" !important; }\n\n.ant-tag {\n padding: 1px 10px; }\n\n.flex-display {\n display: flex; }\n\n.ant-modal-footer {\n border-top: none;\n text-align: center; }\n .ant-modal-footer button {\n margin: 10px 20px;\n text-transform: uppercase;\n font-size: 0.8rem; }\n\n.ant-modal-header {\n border-radius: 15px;\n border: none; }\n\n.ant-modal-content {\n border-radius: 15px;\n border: none; }\n\n.ant-modal-header {\n border: none; }\n\n.ant-modal-body {\n text-align: center;\n color: rgba(58, 53, 65, 0.6);\n font-size: 0.8rem; }\n .ant-modal-body .ant-select-selector {\n text-align: left;\n border-radius: 5px !important;\n height: 32px; }\n .ant-modal-body .form-label {\n text-align: left; }\n .ant-modal-body .form-label .req-ast {\n color: rgba(255, 77, 79, 0.8);\n padding-left: 5px; }\n .ant-modal-body .ant-form .ant-input-password {\n padding: 6.5px 11px;\n font-size: 16px; }\n .ant-modal-body .ant-form .ant-form-item-explain-error {\n text-align: start; }\n\n.popup-header {\n text-align: center;\n color: rgba(58, 53, 65, 0.8);\n font-weight: 600;\n font-family: \"Inter\";\n font-size: 0.9rem;\n margin: 25px 20px -20px 20px; }\n .popup-header .icon {\n font-size: 4rem;\n margin-bottom: 15px;\n font-weight: 400; }\n .popup-header img {\n height: 100px; }\n\n.popup-success .icon {\n color: #5dc380; }\n\n.popup-success .ant-btn-primary {\n background: #16b1ff;\n border-radius: #16b1ff;\n border: none; }\n\n.popup-success .ant-btn-default {\n color: rgba(58, 53, 65, 0.6);\n border-color: rgba(58, 53, 65, 0.6); }\n\n.popup-success .ant-btn-primary[disabled] {\n border-color: #d9d9d9;\n background: #f5f5f5; }\n\n.popup-primary .icon {\n color: #16b1ff; }\n\n.popup-primary .ant-btn-primary {\n background: #16b1ff;\n border-radius: #16b1ff;\n border: none; }\n\n.popup-primary .ant-btn-default {\n color: rgba(58, 53, 65, 0.6);\n border-color: rgba(58, 53, 65, 0.6); }\n\n.popup-primary .ant-btn-primary[disabled] {\n border-color: #d9d9d9;\n background: #f5f5f5; }\n\n.popup-danger .icon {\n color: rgba(255, 77, 79, 0.8); }\n\n.popup-danger .ant-btn-primary {\n background: rgba(255, 77, 79, 0.8);\n border-radius: rgba(255, 77, 79, 0.8);\n border: none; }\n\n.popup-danger .ant-btn-primary[disabled] {\n border-color: #d9d9d9;\n background: #f5f5f5; }\n\n.popup-danger .ant-btn-default {\n color: rgba(58, 53, 65, 0.6);\n border-color: rgba(58, 53, 65, 0.6); }\n\n.ant-modal-footer .ant-btn {\n height: 32px;\n border-radius: 4px;\n padding: 6px 16px;\n font-weight: 500; }\n\n.ant-modal-footer .ant-btn-default {\n color: rgba(140, 140, 140, 0.7) !important;\n border-color: rgba(140, 140, 140, 0.7) !important; }\n\n.ant-tag-processing {\n color: #16b1ff;\n background: rgba(185, 226, 244, 0.4); }\n\n.filter-section input {\n font-family: 'Inter';\n font-size: 0.8rem !important; }\n\n.pull-right {\n float: right; }\n\n.disabled {\n opacity: 0.5; }\n\n.mg-left-3 {\n margin-left: 3rem; }\n\n.mg-left-2 {\n margin-left: 2rem !important; }\n\n.mg-left-1 {\n margin-left: 1rem; }\n\n.mg-top-1 {\n margin-top: 1rem; }\n\n.mg-top-2 {\n margin-top: 2rem; }\n\n.mg-bottom-1 {\n margin-bottom: 1rem !important; }\n\n.transfer-form {\n padding: 0px 15px;\n color: rgba(58, 53, 65, 0.6); }\n .transfer-form .popup-credit-input .ant-form-item-explain-error {\n width: 200px; }\n .transfer-form .info-container {\n display: flex;\n flex-direction: row;\n width: 10%;\n height: 20px;\n align-items: center;\n justify-content: start;\n margin-left: 5px; }\n .transfer-form .ant-row {\n align-items: unset; }\n .transfer-form .sub-text {\n margin-bottom: 35px;\n font-size: 0.9rem;\n font-weight: 500; }\n .transfer-form .label {\n text-align: left;\n font-size: 0.9rem;\n color: rgba(58, 53, 65, 0.6); }\n .transfer-form .seperator {\n font-size: 1.2rem;\n color: #d9d9d9; }\n .transfer-form .footer {\n margin-bottom: 0px;\n margin-top: 15px; }\n .transfer-form label {\n font-size: 0.8rem; }\n .transfer-form .ant-radio-wrapper {\n font-size: 0.9rem; }\n .transfer-form input {\n color: rgba(58, 53, 65, 0.6); }\n .transfer-form button {\n text-transform: uppercase;\n font-weight: 500; }\n\n.color-error {\n color: rgba(255, 77, 79, 0.8); }\n\n.color-primary {\n color: #16b1ff; }\n\n.ant-input-number-input {\n text-align: right; }\n\n.text-left {\n text-align: left; }\n\n.ant-form-item .ant-radio-group {\n text-align: left; }\n\n.loading-center {\n margin: auto;\n text-align: center;\n position: absolute;\n top: 50%;\n left: 50%; }\n\n.ant-tag-purple {\n color: #976ed7; }\n\n.ant-tag-orange {\n color: #ff8f56; }\n\n.ant-tag-default {\n color: rgba(58, 53, 65, 0.5); }\n\n.ant-popover-inner {\n border-radius: 4px; }\n\n.ant-input-number {\n border-radius: 5px; }\n\n.ret-icon {\n background-color: rgba(254, 241, 173, 0.5);\n color: #ff8f56; }\n\n.flag-ret-icon {\n display: flex !important;\n background-color: #f4f5fa;\n font-size: 1.1rem !important;\n padding: 7px; }\n\n.b-icon {\n vertical-align: middle; }\n\n.ant-message-notice-content {\n padding: 0px;\n border-radius: 5px; }\n .ant-message-notice-content .ant-message-custom-content {\n font-size: 0.8rem;\n border-radius: 5px;\n padding: 17px 24px; }\n .ant-message-notice-content .ant-message-error {\n color: rgba(255, 77, 79, 0.8);\n border: 1px solid rgba(255, 77, 79, 0.8); }\n .ant-message-notice-content .ant-message-success {\n color: #5bce00;\n border: 1px solid #5bce00; }\n\n.ant-select-selection-item {\n color: rgba(58, 53, 65, 0.6); }\n\n.sub-text {\n font-size: 0.9rem;\n font-weight: 500; }\n\n.search-filter {\n margin-right: 15px; }\n\n.download-data-btn {\n margin-left: 15px; }\n\n.mg-bottom-0 {\n margin-bottom: 0px; }\n\n.padding-bottom-0 {\n padding-bottom: 0px; }\n\n.ellipsis-overflow {\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 1;\n -webkit-box-orient: vertical; }\n\n.nextline-overflow {\n overflow-wrap: break-word; }\n\n.ant-message {\n width: 50%;\n right: 0px;\n left: auto;\n min-width: 400px; }\n";
|
921
|
+
styleInject(css_248z$v);
|
1175
922
|
|
1176
923
|
exports.UserManagementColumns = void 0;
|
1177
924
|
(function (UserManagementColumns) {
|
@@ -2352,6 +2099,9 @@ exports.Instrument = void 0;
|
|
2352
2099
|
Instrument["EQUITY"] = "Equity";
|
2353
2100
|
Instrument["GUARANTEE"] = "Guarantee";
|
2354
2101
|
Instrument["INKIND"] = "In-Kind";
|
2102
|
+
Instrument["CONLOAN"] = "ConcessionalLoan";
|
2103
|
+
Instrument["NONCONLOAN"] = "Non-ConcessionalLoan";
|
2104
|
+
Instrument["INSURANCE"] = "Insurance";
|
2355
2105
|
Instrument["OTHER"] = "Other";
|
2356
2106
|
})(exports.Instrument || (exports.Instrument = {}));
|
2357
2107
|
|
@@ -6136,7 +5886,7 @@ var Projection = /** @class */ (function () {
|
|
6136
5886
|
|
6137
5887
|
var AddNewCompanyComponent = function (props) {
|
6138
5888
|
var _a;
|
6139
|
-
var t = props.t, onNavigateToCompanyManagement = props.onNavigateToCompanyManagement, maximumImageSize = props.maximumImageSize, useLocation = props.useLocation, regionField = props.regionField, isGuest = props.isGuest, onNavigateToHome = props.onNavigateToHome, systemType = props.systemType;
|
5889
|
+
var t = props.t, onNavigateToCompanyManagement = props.onNavigateToCompanyManagement, maximumImageSize = props.maximumImageSize, useConnection = props.useConnection, useUserContext = props.useUserContext, useLocation = props.useLocation, regionField = props.regionField, isGuest = props.isGuest, onNavigateToHome = props.onNavigateToHome, systemType = props.systemType;
|
6140
5890
|
var formOne = antd.Form.useForm()[0];
|
6141
5891
|
var formTwo = antd.Form.useForm()[0];
|
6142
5892
|
var _b = React.useState(), stepOneData = _b[0], setStepOneData = _b[1];
|
@@ -6890,13 +6640,6 @@ var AddNewCompanyComponent = function (props) {
|
|
6890
6640
|
] }))))));
|
6891
6641
|
};
|
6892
6642
|
|
6893
|
-
var CompanyRoleIcon = function (props) {
|
6894
|
-
var role = props.role;
|
6895
|
-
return (React.createElement("div", { style: { display: 'flex', alignItems: 'center' } },
|
6896
|
-
role === 'Government' ? (React.createElement(RoleIcon, { icon: React.createElement(icons.BankOutlined, null), bg: GovBGColor, color: GovColor })) : role === 'Certifier' ? (React.createElement(RoleIcon, { icon: React.createElement(icons.SafetyOutlined, null), bg: CertBGColor, color: CertColor })) : (React.createElement(RoleIcon, { icon: React.createElement(icons.ExperimentOutlined, null), bg: DevBGColor, color: DevColor })),
|
6897
|
-
role === 'ProgrammeDeveloper' ? React.createElement("div", null, 'Developer') : React.createElement("div", null, role)));
|
6898
|
-
};
|
6899
|
-
|
6900
6643
|
var TextArea$2 = antd.Input.TextArea;
|
6901
6644
|
var UserActionConfirmationModel = function (props) {
|
6902
6645
|
var t = props.t, actionInfo = props.actionInfo, onActionConfirmed = props.onActionConfirmed, onActionCanceled = props.onActionCanceled, openModal = props.openModal, errorMsg = props.errorMsg, loading = props.loading;
|
@@ -6921,11 +6664,115 @@ var UserActionConfirmationModel = function (props) {
|
|
6921
6664
|
React.createElement(antd.Button, { className: "mg-left-2", type: "primary", htmlType: "submit", loading: loading, disabled: actionInfo.type === "danger" && comment === "" }, actionInfo.action)))));
|
6922
6665
|
};
|
6923
6666
|
|
6667
|
+
var css_248z$u = ".company-profile {\n padding: 0px 50px; }\n .company-profile .company-name {\n font-weight: 600; }\n .company-profile .title-bar {\n display: flex;\n justify-content: space-between; }\n .company-profile .title-bar .flex-display {\n margin-left: 15px; }\n .company-profile .card-container {\n margin-bottom: 20px;\n width: 100%;\n border-radius: 10px; }\n .company-profile .mg-left-1 {\n margin-left: 1rem; }\n .company-profile .mg-top-1 {\n margin-top: 1rem; }\n .company-profile .mg-right-5 {\n margin-right: 5rem; }\n .company-profile .padding-top-1 {\n padding-top: 1rem; }\n .company-profile .padding-top-2 {\n padding-top: 2rem; }\n .company-profile .profile-img {\n width: 200px; }\n .company-profile .btn-danger {\n color: #ff4d4f !important;\n border-color: #ff8183 !important; }\n .company-profile .btn-activate {\n color: #16b1ff !important;\n border-color: #16b1ff !important; }\n .company-profile .ant-btn[disabled] {\n border-color: #d9d9d9 !important;\n background: #f5f5f5 !important;\n color: #d9d9d9 !important; }\n .company-profile .btn-approve {\n color: white !important;\n background-color: #16b1ff !important; }\n .company-profile .btn-reject {\n color: #ff4d4f !important;\n border-color: #ff4d4f !important;\n background-color: white !important;\n outline: auto !important; }\n";
|
6668
|
+
styleInject(css_248z$u);
|
6669
|
+
|
6670
|
+
var CompanyRoleIcon = function (props) {
|
6671
|
+
var role = props.role;
|
6672
|
+
return (React.createElement("div", { style: { display: 'flex', alignItems: 'center' } },
|
6673
|
+
role === 'Government' ? (React.createElement(RoleIcon, { icon: React.createElement(icons.BankOutlined, null), bg: GovBGColor, color: GovColor })) : role === 'Certifier' ? (React.createElement(RoleIcon, { icon: React.createElement(icons.SafetyOutlined, null), bg: CertBGColor, color: CertColor })) : (React.createElement(RoleIcon, { icon: React.createElement(icons.ExperimentOutlined, null), bg: DevBGColor, color: DevColor })),
|
6674
|
+
role === 'ProgrammeDeveloper' ? React.createElement("div", null, 'Developer') : React.createElement("div", null, role)));
|
6675
|
+
};
|
6676
|
+
|
6924
6677
|
var css_248z$t = ".company-profile {\n padding: 0px 50px; }\n .company-profile .company-name {\n font-weight: 600; }\n .company-profile .title-bar {\n display: flex;\n justify-content: space-between; }\n .company-profile .title-bar .flex-display {\n margin-left: 15px; }\n .company-profile .card-container {\n margin-bottom: 20px;\n width: 100%;\n border-radius: 10px; }\n .company-profile .mg-left-1 {\n margin-left: 1rem; }\n .company-profile .mg-top-1 {\n margin-top: 1rem; }\n .company-profile .mg-right-5 {\n margin-right: 5rem; }\n .company-profile .padding-top-1 {\n padding-top: 1rem; }\n .company-profile .padding-top-2 {\n padding-top: 2rem; }\n .company-profile .profile-img {\n width: 200px; }\n .company-profile .btn-danger {\n color: #ff4d4f !important;\n border-color: #ff8183 !important; }\n .company-profile .btn-activate {\n color: #16b1ff !important;\n border-color: #16b1ff !important; }\n .company-profile .ant-btn[disabled] {\n border-color: #d9d9d9 !important;\n background: #f5f5f5 !important;\n color: #d9d9d9 !important; }\n .company-profile .btn-approve {\n color: white !important;\n background-color: #16b1ff !important; }\n .company-profile .btn-reject {\n color: #ff4d4f !important;\n border-color: #ff4d4f !important;\n background-color: white !important;\n outline: auto !important; }\n";
|
6925
6678
|
styleInject(css_248z$t);
|
6926
6679
|
|
6680
|
+
var CompanyDetailsComponent = function (props) {
|
6681
|
+
var t = props.t, companyDetails = props.companyDetails; props.userDetails; var isLoading = props.isLoading, regionField = props.regionField, systemType = props.systemType;
|
6682
|
+
var getEnumKeysFromValues = function (values) {
|
6683
|
+
var enumKeys = [];
|
6684
|
+
for (var key in exports.SectoralScope) {
|
6685
|
+
if (values.includes(exports.SectoralScope[key])) {
|
6686
|
+
enumKeys.push(key);
|
6687
|
+
}
|
6688
|
+
}
|
6689
|
+
return enumKeys;
|
6690
|
+
};
|
6691
|
+
return (React.createElement(antd.Card, { className: "card-container" },
|
6692
|
+
React.createElement("div", { className: "info-view" },
|
6693
|
+
React.createElement("div", { className: "title" },
|
6694
|
+
React.createElement("span", { className: "title-icon" },
|
6695
|
+
React.createElement(icons.BankOutlined, null)),
|
6696
|
+
React.createElement("span", { className: "title-text" }, t("companyDetails:organisationDetailsHeading"))),
|
6697
|
+
React.createElement(antd.Skeleton, { loading: isLoading, active: true },
|
6698
|
+
React.createElement(antd.Row, { className: "field" },
|
6699
|
+
React.createElement(antd.Col, { span: 12, className: "field-key" }, t("companyDetails:name")),
|
6700
|
+
React.createElement(antd.Col, { span: 12, className: "field-value" }, companyDetails.name ? companyDetails.name : "-")),
|
6701
|
+
React.createElement(antd.Row, { className: "field" },
|
6702
|
+
React.createElement(antd.Col, { span: 12, className: "field-key" }, t("companyDetails:taxId")),
|
6703
|
+
React.createElement(antd.Col, { span: 12, className: "field-value nextline-overflow" }, companyDetails.taxId &&
|
6704
|
+
(companyDetails === null || companyDetails === void 0 ? void 0 : companyDetails.companyRole) !== exports.CompanyRole.GOVERNMENT
|
6705
|
+
? companyDetails.taxId
|
6706
|
+
: "-")),
|
6707
|
+
React.createElement(antd.Row, { className: "field" },
|
6708
|
+
React.createElement(antd.Col, { span: 12, className: "field-key" }, t("companyDetails:paymentId")),
|
6709
|
+
React.createElement(antd.Col, { span: 12, className: "field-value nextline-overflow" }, companyDetails.paymentId
|
6710
|
+
? companyDetails.paymentId
|
6711
|
+
: "-")),
|
6712
|
+
React.createElement(antd.Row, { className: "field" },
|
6713
|
+
React.createElement(antd.Col, { span: 12, className: "field-key" }, t("companyDetails:companyRole")),
|
6714
|
+
React.createElement(antd.Col, { span: 12, className: "field-value" },
|
6715
|
+
React.createElement(CompanyRoleIcon, { role: companyDetails.companyRole }))),
|
6716
|
+
(companyDetails === null || companyDetails === void 0 ? void 0 : companyDetails.companyRole) === exports.CompanyRole.MINISTRY && (React.createElement(React.Fragment, null,
|
6717
|
+
React.createElement(antd.Row, { className: "field" },
|
6718
|
+
React.createElement(antd.Col, { span: 12, className: "field-key" }, t("companyDetails:ministerName")),
|
6719
|
+
React.createElement(antd.Col, { span: 12, className: "field-value" }, companyDetails.nameOfMinister
|
6720
|
+
? companyDetails.nameOfMinister
|
6721
|
+
: "-")),
|
6722
|
+
React.createElement(antd.Row, { className: "field" },
|
6723
|
+
React.createElement(antd.Col, { span: 12, className: "field-key" }, t("companyDetails:sectoralScope")),
|
6724
|
+
React.createElement(antd.Col, { span: 12, className: "field-value" }, companyDetails.sectoralScope
|
6725
|
+
? getEnumKeysFromValues(companyDetails.sectoralScope).join(", ")
|
6726
|
+
: "-")))),
|
6727
|
+
React.createElement(antd.Row, { className: "field" },
|
6728
|
+
React.createElement(antd.Col, { span: 12, className: "field-key" }, t("companyDetails:email")),
|
6729
|
+
React.createElement(antd.Col, { span: 12, className: "field-value nextline-overflow" }, companyDetails.email ? companyDetails.email : "-")),
|
6730
|
+
React.createElement(antd.Row, { className: "field" },
|
6731
|
+
React.createElement(antd.Col, { span: 12, className: "field-key" }, t("companyDetails:phoneNo")),
|
6732
|
+
React.createElement(antd.Col, { span: 12, className: "field-value" }, companyDetails.phoneNo ? companyDetails.phoneNo : "-")),
|
6733
|
+
React.createElement(antd.Row, { className: "field" },
|
6734
|
+
React.createElement(antd.Col, { span: 12, className: "field-key" }, t("companyDetails:website")),
|
6735
|
+
React.createElement(antd.Col, { span: 12, className: "field-value ellipsis-overflow" }, companyDetails.website ? (React.createElement("a", { target: "blank", href: companyDetails.website }, companyDetails.website)) : ("-"))),
|
6736
|
+
React.createElement(antd.Row, { className: "field" },
|
6737
|
+
React.createElement(antd.Col, { span: 12, className: "field-key" }, t("companyDetails:address")),
|
6738
|
+
React.createElement(antd.Col, { span: 12, className: "field-value" }, companyDetails.address ? companyDetails.address : "-")),
|
6739
|
+
regionField && (React.createElement(antd.Row, { className: "field" },
|
6740
|
+
React.createElement(antd.Col, { span: 12, className: "field-key" }, t("companyDetails:region")),
|
6741
|
+
React.createElement(antd.Col, { span: 12, className: "field-value" }, companyDetails.regions
|
6742
|
+
? companyDetails.regions.join(", ")
|
6743
|
+
: "-"))),
|
6744
|
+
React.createElement(antd.Row, { className: "field" },
|
6745
|
+
React.createElement(antd.Col, { span: 12, className: "field-key" }, t("companyDetails:programmeCount")),
|
6746
|
+
React.createElement(antd.Col, { span: 12, className: "field-value" }, companyDetails.programmeCount
|
6747
|
+
? companyDetails.programmeCount
|
6748
|
+
: "-")),
|
6749
|
+
React.createElement(antd.Row, { className: "field" },
|
6750
|
+
React.createElement(antd.Col, { span: 12, className: "field-key" }, t("companyDetails:creditBalance")),
|
6751
|
+
React.createElement(antd.Col, { span: 12, className: "field-value" }, companyDetails.creditBalance
|
6752
|
+
? addCommSep(companyDetails.creditBalance)
|
6753
|
+
: "-")),
|
6754
|
+
parseInt(companyDetails.state) === 0 ? (React.createElement(antd.Row, { className: "field" },
|
6755
|
+
React.createElement(antd.Col, { span: 12, className: "field-key" }, t("companyDetails:remarks")),
|
6756
|
+
React.createElement(antd.Col, { span: 12, className: "field-value" }, companyDetails.remarks
|
6757
|
+
? companyDetails.remarks
|
6758
|
+
: "-"))) : (""),
|
6759
|
+
(companyDetails === null || companyDetails === void 0 ? void 0 : companyDetails.companyRole) === exports.CompanyRole.GOVERNMENT &&
|
6760
|
+
systemType !== exports.CarbonSystemType.MRV && (React.createElement(React.Fragment, null,
|
6761
|
+
React.createElement(antd.Row, { className: "field" },
|
6762
|
+
React.createElement(antd.Col, { span: 12, className: "field-key" }, t("companyDetails:omgePercentage")),
|
6763
|
+
React.createElement(antd.Col, { span: 12, className: "field-value" }, companyDetails.omgePercentage
|
6764
|
+
? companyDetails.omgePercentage
|
6765
|
+
: "-")))),
|
6766
|
+
(companyDetails === null || companyDetails === void 0 ? void 0 : companyDetails.companyRole) === exports.CompanyRole.GOVERNMENT && (React.createElement(React.Fragment, null,
|
6767
|
+
React.createElement(antd.Row, { className: "field" },
|
6768
|
+
React.createElement(antd.Col, { span: 12, className: "field-key" }, t("companyDetails:nationalSopValue")),
|
6769
|
+
React.createElement(antd.Col, { span: 12, className: "field-value" }, companyDetails.nationalSopValue
|
6770
|
+
? companyDetails.nationalSopValue
|
6771
|
+
: "-"))))))));
|
6772
|
+
};
|
6773
|
+
|
6927
6774
|
var CompanyProfileComponent = function (props) {
|
6928
|
-
var t = props.t, useAbilityContext = props.useAbilityContext, useLocation = props.useLocation,
|
6775
|
+
var t = props.t, useAbilityContext = props.useAbilityContext, useLocation = props.useLocation, useConnection = props.useConnection, onNavigateToCompanyManagement = props.onNavigateToCompanyManagement, onNavigateToCompanyEdit = props.onNavigateToCompanyEdit; props.regionField; var systemType = props.systemType;
|
6929
6776
|
var _a = useConnection(), get = _a.get, put = _a.put, post = _a.post;
|
6930
6777
|
var _b = React.useState(undefined), companyDetails = _b[0], setCompanyDetails = _b[1];
|
6931
6778
|
var _c = React.useState(undefined), userDetails = _c[0], setUserDetails = _c[1];
|
@@ -7203,15 +7050,6 @@ var CompanyProfileComponent = function (props) {
|
|
7203
7050
|
setErrorMsg("");
|
7204
7051
|
setOpenRejectModal(true);
|
7205
7052
|
};
|
7206
|
-
var getEnumKeysFromValues = function (values) {
|
7207
|
-
var enumKeys = [];
|
7208
|
-
for (var key in exports.SectoralScope) {
|
7209
|
-
if (values.includes(exports.SectoralScope[key])) {
|
7210
|
-
enumKeys.push(key);
|
7211
|
-
}
|
7212
|
-
}
|
7213
|
-
return enumKeys;
|
7214
|
-
};
|
7215
7053
|
return (React.createElement("div", { className: "content-container company-profile" },
|
7216
7054
|
React.createElement("div", { className: "title-bar" },
|
7217
7055
|
React.createElement("div", null,
|
@@ -7250,87 +7088,7 @@ var CompanyProfileComponent = function (props) {
|
|
7250
7088
|
React.createElement(antd.Row, { justify: "center" },
|
7251
7089
|
React.createElement(OrganisationStatus, { t: t, organisationStatus: parseInt(companyDetails.state) }))))),
|
7252
7090
|
React.createElement(antd.Col, { md: 24, lg: 16 },
|
7253
|
-
React.createElement(
|
7254
|
-
React.createElement("div", { className: "info-view" },
|
7255
|
-
React.createElement("div", { className: "title" },
|
7256
|
-
React.createElement("span", { className: "title-icon" },
|
7257
|
-
React.createElement(icons.BankOutlined, null)),
|
7258
|
-
React.createElement("span", { className: "title-text" }, t("companyProfile:organisationDetailsHeading"))),
|
7259
|
-
React.createElement(antd.Skeleton, { loading: isLoading, active: true },
|
7260
|
-
React.createElement(antd.Row, { className: "field" },
|
7261
|
-
React.createElement(antd.Col, { span: 12, className: "field-key" }, t("companyProfile:name")),
|
7262
|
-
React.createElement(antd.Col, { span: 12, className: "field-value" }, companyDetails.name ? companyDetails.name : "-")),
|
7263
|
-
React.createElement(antd.Row, { className: "field" },
|
7264
|
-
React.createElement(antd.Col, { span: 12, className: "field-key" }, t("companyProfile:taxId")),
|
7265
|
-
React.createElement(antd.Col, { span: 12, className: "field-value nextline-overflow" }, companyDetails.taxId &&
|
7266
|
-
(companyDetails === null || companyDetails === void 0 ? void 0 : companyDetails.companyRole) !== exports.CompanyRole.GOVERNMENT
|
7267
|
-
? companyDetails.taxId
|
7268
|
-
: "-")),
|
7269
|
-
React.createElement(antd.Row, { className: "field" },
|
7270
|
-
React.createElement(antd.Col, { span: 12, className: "field-key" }, t("companyProfile:paymentId")),
|
7271
|
-
React.createElement(antd.Col, { span: 12, className: "field-value nextline-overflow" }, companyDetails.paymentId
|
7272
|
-
? companyDetails.paymentId
|
7273
|
-
: "-")),
|
7274
|
-
React.createElement(antd.Row, { className: "field" },
|
7275
|
-
React.createElement(antd.Col, { span: 12, className: "field-key" }, t("companyProfile:companyRole")),
|
7276
|
-
React.createElement(antd.Col, { span: 12, className: "field-value" },
|
7277
|
-
React.createElement(CompanyRoleIcon, { role: companyDetails.companyRole }))),
|
7278
|
-
(companyDetails === null || companyDetails === void 0 ? void 0 : companyDetails.companyRole) === exports.CompanyRole.MINISTRY && (React.createElement(React.Fragment, null,
|
7279
|
-
React.createElement(antd.Row, { className: "field" },
|
7280
|
-
React.createElement(antd.Col, { span: 12, className: "field-key" }, t("companyProfile:ministerName")),
|
7281
|
-
React.createElement(antd.Col, { span: 12, className: "field-value" }, companyDetails.nameOfMinister
|
7282
|
-
? companyDetails.nameOfMinister
|
7283
|
-
: "-")),
|
7284
|
-
React.createElement(antd.Row, { className: "field" },
|
7285
|
-
React.createElement(antd.Col, { span: 12, className: "field-key" }, t("companyProfile:sectoralScope")),
|
7286
|
-
React.createElement(antd.Col, { span: 12, className: "field-value" }, companyDetails.sectoralScope
|
7287
|
-
? getEnumKeysFromValues(companyDetails.sectoralScope).join(", ")
|
7288
|
-
: "-")))),
|
7289
|
-
React.createElement(antd.Row, { className: "field" },
|
7290
|
-
React.createElement(antd.Col, { span: 12, className: "field-key" }, t("companyProfile:email")),
|
7291
|
-
React.createElement(antd.Col, { span: 12, className: "field-value nextline-overflow" }, companyDetails.email ? companyDetails.email : "-")),
|
7292
|
-
React.createElement(antd.Row, { className: "field" },
|
7293
|
-
React.createElement(antd.Col, { span: 12, className: "field-key" }, t("companyProfile:phoneNo")),
|
7294
|
-
React.createElement(antd.Col, { span: 12, className: "field-value" }, companyDetails.phoneNo ? companyDetails.phoneNo : "-")),
|
7295
|
-
React.createElement(antd.Row, { className: "field" },
|
7296
|
-
React.createElement(antd.Col, { span: 12, className: "field-key" }, t("companyProfile:website")),
|
7297
|
-
React.createElement(antd.Col, { span: 12, className: "field-value ellipsis-overflow" }, companyDetails.website ? (React.createElement("a", { target: "blank", href: companyDetails.website }, companyDetails.website)) : ("-"))),
|
7298
|
-
React.createElement(antd.Row, { className: "field" },
|
7299
|
-
React.createElement(antd.Col, { span: 12, className: "field-key" }, t("companyProfile:address")),
|
7300
|
-
React.createElement(antd.Col, { span: 12, className: "field-value" }, companyDetails.address ? companyDetails.address : "-")),
|
7301
|
-
regionField && (React.createElement(antd.Row, { className: "field" },
|
7302
|
-
React.createElement(antd.Col, { span: 12, className: "field-key" }, t("companyProfile:region")),
|
7303
|
-
React.createElement(antd.Col, { span: 12, className: "field-value" }, companyDetails.regions
|
7304
|
-
? companyDetails.regions.join(", ")
|
7305
|
-
: "-"))),
|
7306
|
-
React.createElement(antd.Row, { className: "field" },
|
7307
|
-
React.createElement(antd.Col, { span: 12, className: "field-key" }, t("companyProfile:programmeCount")),
|
7308
|
-
React.createElement(antd.Col, { span: 12, className: "field-value" }, companyDetails.programmeCount
|
7309
|
-
? companyDetails.programmeCount
|
7310
|
-
: "-")),
|
7311
|
-
React.createElement(antd.Row, { className: "field" },
|
7312
|
-
React.createElement(antd.Col, { span: 12, className: "field-key" }, t("companyProfile:creditBalance")),
|
7313
|
-
React.createElement(antd.Col, { span: 12, className: "field-value" }, companyDetails.creditBalance
|
7314
|
-
? addCommSep(companyDetails.creditBalance)
|
7315
|
-
: "-")),
|
7316
|
-
parseInt(companyDetails.state) === 0 ? (React.createElement(antd.Row, { className: "field" },
|
7317
|
-
React.createElement(antd.Col, { span: 12, className: "field-key" }, t("companyProfile:remarks")),
|
7318
|
-
React.createElement(antd.Col, { span: 12, className: "field-value" }, companyDetails.remarks
|
7319
|
-
? companyDetails.remarks
|
7320
|
-
: "-"))) : (""),
|
7321
|
-
(companyDetails === null || companyDetails === void 0 ? void 0 : companyDetails.companyRole) === exports.CompanyRole.GOVERNMENT &&
|
7322
|
-
systemType !== exports.CarbonSystemType.MRV && (React.createElement(React.Fragment, null,
|
7323
|
-
React.createElement(antd.Row, { className: "field" },
|
7324
|
-
React.createElement(antd.Col, { span: 12, className: "field-key" }, t("companyProfile:omgePercentage")),
|
7325
|
-
React.createElement(antd.Col, { span: 12, className: "field-value" }, companyDetails.omgePercentage
|
7326
|
-
? companyDetails.omgePercentage
|
7327
|
-
: "-")))),
|
7328
|
-
(companyDetails === null || companyDetails === void 0 ? void 0 : companyDetails.companyRole) === exports.CompanyRole.GOVERNMENT && (React.createElement(React.Fragment, null,
|
7329
|
-
React.createElement(antd.Row, { className: "field" },
|
7330
|
-
React.createElement(antd.Col, { span: 12, className: "field-key" }, t("companyProfile:nationalSopValue")),
|
7331
|
-
React.createElement(antd.Col, { span: 12, className: "field-value" }, companyDetails.nationalSopValue
|
7332
|
-
? companyDetails.nationalSopValue
|
7333
|
-
: "-"))))))),
|
7091
|
+
React.createElement(CompanyDetailsComponent, { t: t, companyDetails: companyDetails, userDetails: userDetails, isLoading: isLoading, regionField: true, systemType: systemType }),
|
7334
7092
|
((companyDetails === null || companyDetails === void 0 ? void 0 : companyDetails.state) == "2" ||
|
7335
7093
|
(companyDetails === null || companyDetails === void 0 ? void 0 : companyDetails.state) == "3") && (React.createElement(antd.Card, { className: "card-container" },
|
7336
7094
|
React.createElement("div", { className: "info-view" },
|
@@ -7358,7 +7116,7 @@ styleInject(css_248z$s);
|
|
7358
7116
|
|
7359
7117
|
var Search$1 = antd.Input.Search;
|
7360
7118
|
var ProgrammeManagementComponent = function (props) {
|
7361
|
-
var t = props.t, visibleColumns = props.visibleColumns, onNavigateToProgrammeView = props.onNavigateToProgrammeView, onClickAddProgramme = props.onClickAddProgramme, enableAddProgramme = props.enableAddProgramme, useAbilityContext = props.useAbilityContext;
|
7119
|
+
var t = props.t, visibleColumns = props.visibleColumns, useUserContext = props.useUserContext, useConnection = props.useConnection, onNavigateToProgrammeView = props.onNavigateToProgrammeView, onClickAddProgramme = props.onClickAddProgramme, enableAddProgramme = props.enableAddProgramme, useAbilityContext = props.useAbilityContext;
|
7362
7120
|
var _a = useConnection(); _a.get; _a.delete; var post = _a.post;
|
7363
7121
|
var _b = React.useState(), totalProgramme = _b[0], setTotalProgramme = _b[1];
|
7364
7122
|
var _c = React.useState(false), loading = _c[0], setLoading = _c[1];
|
@@ -7375,14 +7133,15 @@ var ProgrammeManagementComponent = function (props) {
|
|
7375
7133
|
var _p = React.useState(false), ministryLevelFilter = _p[0], setMinistryLevelFilter = _p[1];
|
7376
7134
|
var userInfoState = useUserContext().userInfoState;
|
7377
7135
|
var ability = useAbilityContext();
|
7136
|
+
var _q = React.useState(), dataQuery = _q[0], setDataQuery = _q[1];
|
7378
7137
|
var stageObject = enableAddProgramme ? exports.ProgrammeStageMRV : exports.ProgrammeStageR;
|
7379
7138
|
var statusOptions = Object.keys(stageObject).map(function (k, index) { return ({
|
7380
7139
|
label: Object.values(stageObject)[index],
|
7381
7140
|
value: k,
|
7382
7141
|
}); });
|
7383
|
-
var
|
7384
|
-
var
|
7385
|
-
var
|
7142
|
+
var _r = React.useState(statusOptions.map(function (e) { return e.value; })), selectedStatus = _r[0], setSelectedStatus = _r[1];
|
7143
|
+
var _s = React.useState(false), indeterminate = _s[0], setIndeterminate = _s[1];
|
7144
|
+
var _t = React.useState(true), checkAll = _t[0], setCheckAll = _t[1];
|
7386
7145
|
var onStatusQuery = function (checkedValues) { return __awaiter(void 0, void 0, void 0, function () {
|
7387
7146
|
return __generator(this, function (_a) {
|
7388
7147
|
console.log(checkedValues);
|
@@ -7625,6 +7384,11 @@ var ProgrammeManagementComponent = function (props) {
|
|
7625
7384
|
setTableData(response.data);
|
7626
7385
|
setTotalProgramme(response.response.data.total);
|
7627
7386
|
setLoading(false);
|
7387
|
+
setDataQuery({
|
7388
|
+
filterAnd: filter,
|
7389
|
+
filterOr: (filterOr === null || filterOr === void 0 ? void 0 : filterOr.length) > 0 ? filterOr : undefined,
|
7390
|
+
sort: sort,
|
7391
|
+
});
|
7628
7392
|
return [3 /*break*/, 4];
|
7629
7393
|
case 3:
|
7630
7394
|
error_1 = _a.sent();
|
@@ -7682,6 +7446,50 @@ var ProgrammeManagementComponent = function (props) {
|
|
7682
7446
|
}
|
7683
7447
|
});
|
7684
7448
|
}); };
|
7449
|
+
var downloadProgrammeData = function () { return __awaiter(void 0, void 0, void 0, function () {
|
7450
|
+
var response, url, a, error_3;
|
7451
|
+
var _a;
|
7452
|
+
return __generator(this, function (_b) {
|
7453
|
+
switch (_b.label) {
|
7454
|
+
case 0:
|
7455
|
+
setLoading(true);
|
7456
|
+
_b.label = 1;
|
7457
|
+
case 1:
|
7458
|
+
_b.trys.push([1, 3, , 4]);
|
7459
|
+
return [4 /*yield*/, post("national/programme/download", {
|
7460
|
+
filterAnd: dataQuery.filterAnd,
|
7461
|
+
filterOr: ((_a = dataQuery.filterOr) === null || _a === void 0 ? void 0 : _a.length) > 0 ? dataQuery.filterOr : undefined,
|
7462
|
+
sort: dataQuery.sort,
|
7463
|
+
})];
|
7464
|
+
case 2:
|
7465
|
+
response = _b.sent();
|
7466
|
+
if (response && response.data) {
|
7467
|
+
url = response.data.url;
|
7468
|
+
a = document.createElement('a');
|
7469
|
+
a.href = url;
|
7470
|
+
a.download = response.data.csvFile; // Specify the filename for the downloaded file
|
7471
|
+
document.body.appendChild(a);
|
7472
|
+
a.click();
|
7473
|
+
document.body.removeChild(a); // Clean up the created <a> element
|
7474
|
+
window.URL.revokeObjectURL(url);
|
7475
|
+
}
|
7476
|
+
setLoading(false);
|
7477
|
+
return [3 /*break*/, 4];
|
7478
|
+
case 3:
|
7479
|
+
error_3 = _b.sent();
|
7480
|
+
console.log("Error in exporting programmes", error_3);
|
7481
|
+
antd.message.open({
|
7482
|
+
type: "error",
|
7483
|
+
content: error_3.message,
|
7484
|
+
duration: 3,
|
7485
|
+
style: { textAlign: "right", marginRight: 15, marginTop: 10 },
|
7486
|
+
});
|
7487
|
+
setLoading(false);
|
7488
|
+
return [3 /*break*/, 4];
|
7489
|
+
case 4: return [2 /*return*/];
|
7490
|
+
}
|
7491
|
+
});
|
7492
|
+
}); };
|
7685
7493
|
var onSearch = function () { return __awaiter(void 0, void 0, void 0, function () {
|
7686
7494
|
return __generator(this, function (_a) {
|
7687
7495
|
setSearch(searchText);
|
@@ -7743,7 +7551,7 @@ var ProgrammeManagementComponent = function (props) {
|
|
7743
7551
|
React.createElement("div", { className: "filter-section" },
|
7744
7552
|
React.createElement("div", { className: "search-filter" },
|
7745
7553
|
React.createElement(antd.Checkbox, { className: "label", onChange: function (v) {
|
7746
|
-
if (
|
7554
|
+
if (userInfoState.companyRole === exports.CompanyRole.MINISTRY) {
|
7747
7555
|
if (v.target.checked) {
|
7748
7556
|
setMinistryLevelFilter(true);
|
7749
7557
|
}
|
@@ -7760,7 +7568,7 @@ var ProgrammeManagementComponent = function (props) {
|
|
7760
7568
|
}
|
7761
7569
|
: undefined);
|
7762
7570
|
}
|
7763
|
-
} },
|
7571
|
+
} }, userInfoState.companyRole === exports.CompanyRole.MINISTRY
|
7764
7572
|
? t("view:ministryLevel")
|
7765
7573
|
: t("view:seeMine"))),
|
7766
7574
|
React.createElement("div", { className: "search-bar" },
|
@@ -7770,7 +7578,13 @@ var ProgrammeManagementComponent = function (props) {
|
|
7770
7578
|
return e.target.value === ""
|
7771
7579
|
? setSearch(e.target.value)
|
7772
7580
|
: setSearchText(e.target.value);
|
7773
|
-
}, onSearch: setSearch, style: { width: 265 } }))
|
7581
|
+
}, onSearch: setSearch, style: { width: 265 } })),
|
7582
|
+
React.createElement("div", { className: "download-data-btn" },
|
7583
|
+
React.createElement("a", { onClick: downloadProgrammeData },
|
7584
|
+
React.createElement(icons.DownloadOutlined, { style: {
|
7585
|
+
color: "rgba(58, 53, 65, 0.3)",
|
7586
|
+
fontSize: "20px",
|
7587
|
+
} })))))),
|
7774
7588
|
React.createElement(antd.Row, null,
|
7775
7589
|
React.createElement(antd.Col, { span: 24 },
|
7776
7590
|
React.createElement("div", { className: "programmeManagement-table-container" },
|
@@ -13541,7 +13355,7 @@ var sectoralScopes = {
|
|
13541
13355
|
};
|
13542
13356
|
var ProgrammeCreationComponent = function (props) {
|
13543
13357
|
var _a, _b, _c;
|
13544
|
-
var useLocation = props.useLocation, onNavigateToProgrammeView = props.onNavigateToProgrammeView, translator = props.translator;
|
13358
|
+
var useUserContext = props.useUserContext, useConnection = props.useConnection, useLocation = props.useLocation, onNavigateToProgrammeView = props.onNavigateToProgrammeView, translator = props.translator;
|
13545
13359
|
var t = translator.t;
|
13546
13360
|
var state = useLocation().state;
|
13547
13361
|
var formOne = antd.Form.useForm()[0];
|
@@ -14606,7 +14420,7 @@ var ChangePasswordModel = function (props) {
|
|
14606
14420
|
|
14607
14421
|
var AddNewUserComponent = function (props) {
|
14608
14422
|
var _a, _b, _c, _d, _e, _f;
|
14609
|
-
var t = props.t, onNavigateToUserManagement = props.onNavigateToUserManagement, onNavigateLogin = props.onNavigateLogin, useLocation = props.useLocation, useAbilityContext = props.useAbilityContext, themeColor = props.themeColor;
|
14423
|
+
var t = props.t, onNavigateToUserManagement = props.onNavigateToUserManagement, onNavigateLogin = props.onNavigateLogin, useConnection = props.useConnection, useUserContext = props.useUserContext, useLocation = props.useLocation, useAbilityContext = props.useAbilityContext, themeColor = props.themeColor;
|
14610
14424
|
var _g = useConnection(), post = _g.post, put = _g.put, del = _g.delete, get = _g.get;
|
14611
14425
|
var formOne = antd.Form.useForm()[0];
|
14612
14426
|
var state = useLocation().state;
|
@@ -15024,7 +14838,7 @@ var LanguageSelection = function (props) {
|
|
15024
14838
|
};
|
15025
14839
|
|
15026
14840
|
var UserProfileComponent = function (props) {
|
15027
|
-
var t = props.t, i18n = props.i18n, onNavigateUpdateUser = props.onNavigateUpdateUser, onNavigateLogin = props.onNavigateLogin;
|
14841
|
+
var t = props.t, i18n = props.i18n, useConnection = props.useConnection, onNavigateUpdateUser = props.onNavigateUpdateUser, onNavigateLogin = props.onNavigateLogin, useUserContext = props.useUserContext;
|
15028
14842
|
var get = useConnection().get;
|
15029
14843
|
var _a = React.useState(undefined), organisationDetails = _a[0], setOrganisationDetails = _a[1];
|
15030
14844
|
var _b = React.useState(undefined), userDetails = _b[0], setUserDetails = _b[1];
|
@@ -15059,15 +14873,6 @@ var UserProfileComponent = function (props) {
|
|
15059
14873
|
}
|
15060
14874
|
});
|
15061
14875
|
}); };
|
15062
|
-
var getEnumKeysFromValues = function (values) {
|
15063
|
-
var enumKeys = [];
|
15064
|
-
for (var key in exports.SectoralScope) {
|
15065
|
-
if (values.includes(exports.SectoralScope[key])) {
|
15066
|
-
enumKeys.push(key);
|
15067
|
-
}
|
15068
|
-
}
|
15069
|
-
return enumKeys;
|
15070
|
-
};
|
15071
14876
|
React.useEffect(function () {
|
15072
14877
|
getUserProfileDetails();
|
15073
14878
|
}, []);
|
@@ -15117,82 +14922,15 @@ var UserProfileComponent = function (props) {
|
|
15117
14922
|
React.createElement(antd.Row, { className: "field" },
|
15118
14923
|
React.createElement(antd.Col, { span: 12, className: "field-key" }, t("userProfile:phoneNo")),
|
15119
14924
|
React.createElement(antd.Col, { span: 12, className: "field-value" }, userDetails.phoneNo ? userDetails.phoneNo : "-"))))),
|
15120
|
-
React.createElement(
|
15121
|
-
React.createElement("div", { className: "info-view" },
|
15122
|
-
React.createElement("div", { className: "title" },
|
15123
|
-
React.createElement("span", { className: "title-icon" },
|
15124
|
-
React.createElement(icons.BankOutlined, null)),
|
15125
|
-
React.createElement("span", { className: "title-text" }, t("userProfile:organisationDetailsHeading"))),
|
15126
|
-
React.createElement(antd.Skeleton, { loading: isLoading, active: true },
|
15127
|
-
React.createElement(antd.Row, { className: "field" },
|
15128
|
-
React.createElement(antd.Col, { span: 12, className: "field-key" }, t("userProfile:name")),
|
15129
|
-
React.createElement(antd.Col, { span: 12, className: "field-value" }, organisationDetails.name
|
15130
|
-
? organisationDetails.name
|
15131
|
-
: "-")),
|
15132
|
-
React.createElement(antd.Row, { className: "field" },
|
15133
|
-
React.createElement(antd.Col, { span: 12, className: "field-key" }, t("userProfile:taxId")),
|
15134
|
-
React.createElement(antd.Col, { span: 12, className: "field-value" }, organisationDetails.taxId &&
|
15135
|
-
organisationDetails.companyRole !==
|
15136
|
-
exports.CompanyRole.GOVERNMENT
|
15137
|
-
? organisationDetails.taxId
|
15138
|
-
: "-")),
|
15139
|
-
React.createElement(antd.Row, { className: "field" },
|
15140
|
-
React.createElement(antd.Col, { span: 12, className: "field-key" }, t("userProfile:paymentId")),
|
15141
|
-
React.createElement(antd.Col, { span: 12, className: "field-value" }, organisationDetails.paymentId
|
15142
|
-
? organisationDetails.paymentId
|
15143
|
-
: "-")),
|
15144
|
-
React.createElement(antd.Row, { className: "field" },
|
15145
|
-
React.createElement(antd.Col, { span: 12, className: "field-key" }, t("userProfile:companyRole")),
|
15146
|
-
React.createElement(antd.Col, { span: 12, className: "field-value" },
|
15147
|
-
React.createElement(CompanyRoleIcon, { role: organisationDetails.companyRole }))),
|
15148
|
-
(organisationDetails === null || organisationDetails === void 0 ? void 0 : organisationDetails.companyRole) ===
|
15149
|
-
exports.CompanyRole.MINISTRY && (React.createElement(React.Fragment, null,
|
15150
|
-
React.createElement(antd.Row, { className: "field" },
|
15151
|
-
React.createElement(antd.Col, { span: 12, className: "field-key" }, t("userProfile:ministerName")),
|
15152
|
-
React.createElement(antd.Col, { span: 12, className: "field-value" }, organisationDetails.nameOfMinister
|
15153
|
-
? organisationDetails.nameOfMinister
|
15154
|
-
: "-")),
|
15155
|
-
React.createElement(antd.Row, { className: "field" },
|
15156
|
-
React.createElement(antd.Col, { span: 12, className: "field-key" }, t("userProfile:sectoralScope")),
|
15157
|
-
React.createElement(antd.Col, { span: 12, className: "field-value" }, organisationDetails.sectoralScope
|
15158
|
-
? getEnumKeysFromValues(organisationDetails.sectoralScope).join(", ")
|
15159
|
-
: "-")))),
|
15160
|
-
React.createElement(antd.Row, { className: "field" },
|
15161
|
-
React.createElement(antd.Col, { span: 12, className: "field-key" }, t("userProfile:email")),
|
15162
|
-
React.createElement(antd.Col, { span: 12, className: "field-value nextline-overflow" }, organisationDetails.email
|
15163
|
-
? organisationDetails.email
|
15164
|
-
: "-")),
|
15165
|
-
React.createElement(antd.Row, { className: "field" },
|
15166
|
-
React.createElement(antd.Col, { span: 12, className: "field-key" }, t("userProfile:phoneNo")),
|
15167
|
-
React.createElement(antd.Col, { span: 12, className: "field-value" }, organisationDetails.phoneNo
|
15168
|
-
? organisationDetails.phoneNo
|
15169
|
-
: "-")),
|
15170
|
-
React.createElement(antd.Row, { className: "field" },
|
15171
|
-
React.createElement(antd.Col, { span: 12, className: "field-key" }, t("userProfile:website")),
|
15172
|
-
React.createElement(antd.Col, { span: 12, className: "field-value ellipsis-overflow" }, organisationDetails.website ? (React.createElement("a", { target: "blank", href: organisationDetails.website }, organisationDetails.website)) : ("-"))),
|
15173
|
-
React.createElement(antd.Row, { className: "field" },
|
15174
|
-
React.createElement(antd.Col, { span: 12, className: "field-key" }, t("userProfile:address")),
|
15175
|
-
React.createElement(antd.Col, { span: 12, className: "field-value" }, organisationDetails.address
|
15176
|
-
? organisationDetails.address
|
15177
|
-
: "-")),
|
15178
|
-
React.createElement(antd.Row, { className: "field" },
|
15179
|
-
React.createElement(antd.Col, { span: 12, className: "field-key" }, t("userProfile:programmeCount")),
|
15180
|
-
React.createElement(antd.Col, { span: 12, className: "field-value" }, organisationDetails.programmeCount
|
15181
|
-
? organisationDetails.programmeCount
|
15182
|
-
: "-")),
|
15183
|
-
React.createElement(antd.Row, { className: "field" },
|
15184
|
-
React.createElement(antd.Col, { span: 12, className: "field-key" }, t("userProfile:creditBalance")),
|
15185
|
-
React.createElement(antd.Col, { span: 12, className: "field-value" }, organisationDetails.creditBalance
|
15186
|
-
? addCommSep(organisationDetails.creditBalance)
|
15187
|
-
: "-")))))))))));
|
14925
|
+
React.createElement(CompanyDetailsComponent, { t: t, companyDetails: organisationDetails, userDetails: userDetails, isLoading: isLoading, regionField: true })))))));
|
15188
14926
|
};
|
15189
14927
|
|
15190
|
-
var css_248z$n = ".filter-menu-item .filter-title {\n margin-bottom: 0.5rem;\n font-weight: 600; }\n\n.table-row-gray {\n background-color: #f0f0f0; }\n";
|
14928
|
+
var css_248z$n = ".filter-menu-item .filter-title {\n margin-bottom: 0.5rem;\n font-weight: 600; }\n\n.table-row-gray {\n background-color: #f0f0f0; }\n\n.user-data-download {\n margin-left: 15px;\n margin-top: 0.8rem; }\n";
|
15191
14929
|
styleInject(css_248z$n);
|
15192
14930
|
|
15193
14931
|
var Search = antd.Input.Search;
|
15194
14932
|
var UserManagementComponent = function (props) {
|
15195
|
-
var t = props.t, useAbilityContext = props.useAbilityContext, visibleColumns = props.visibleColumns, onNavigateToUpdateUser = props.onNavigateToUpdateUser, onClickAddUser = props.onClickAddUser;
|
14933
|
+
var t = props.t, useAbilityContext = props.useAbilityContext, useConnection = props.useConnection, visibleColumns = props.visibleColumns, onNavigateToUpdateUser = props.onNavigateToUpdateUser, onClickAddUser = props.onClickAddUser, userInfoState = props.userInfoState;
|
15196
14934
|
antd.Form.useForm()[0];
|
15197
14935
|
var _a = useConnection(), post = _a.post, del = _a.delete;
|
15198
14936
|
var _b = React.useState(), totalUser = _b[0], setTotalUser = _b[1];
|
@@ -15213,8 +14951,8 @@ var UserManagementComponent = function (props) {
|
|
15213
14951
|
var _r = React.useState({}), actionInfo = _r[0], setActionInfo = _r[1];
|
15214
14952
|
var _s = React.useState(""), errorMsg = _s[0], setErrorMsg = _s[1];
|
15215
14953
|
var _t = React.useState(false), openDeleteConfirmationModal = _t[0], setOpenDeleteConfirmationModal = _t[1];
|
14954
|
+
var _u = React.useState(), dataQuery = _u[0], setDataQuery = _u[1];
|
15216
14955
|
var ability = useAbilityContext();
|
15217
|
-
var userInfoState = useUserContext().userInfoState;
|
15218
14956
|
document.addEventListener("mousedown", function (event) {
|
15219
14957
|
var userFilterArea1 = document.querySelector(".filter-bar");
|
15220
14958
|
var userFilterArea2 = document.querySelector(".filter-dropdown");
|
@@ -15569,6 +15307,11 @@ var UserManagementComponent = function (props) {
|
|
15569
15307
|
setTableData(availableUsers);
|
15570
15308
|
setTotalUser((_b = (_a = response === null || response === void 0 ? void 0 : response.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.total);
|
15571
15309
|
}
|
15310
|
+
setDataQuery({
|
15311
|
+
filterAnd: filterAnd(),
|
15312
|
+
filterOr: filterOr(),
|
15313
|
+
sort: sort(),
|
15314
|
+
});
|
15572
15315
|
setLoading(false);
|
15573
15316
|
return [3 /*break*/, 4];
|
15574
15317
|
case 3:
|
@@ -15586,6 +15329,50 @@ var UserManagementComponent = function (props) {
|
|
15586
15329
|
}
|
15587
15330
|
});
|
15588
15331
|
}); };
|
15332
|
+
var downloadUserData = function () { return __awaiter(void 0, void 0, void 0, function () {
|
15333
|
+
var response, url, a, error_3;
|
15334
|
+
var _a;
|
15335
|
+
return __generator(this, function (_b) {
|
15336
|
+
switch (_b.label) {
|
15337
|
+
case 0:
|
15338
|
+
setLoading(true);
|
15339
|
+
_b.label = 1;
|
15340
|
+
case 1:
|
15341
|
+
_b.trys.push([1, 3, , 4]);
|
15342
|
+
return [4 /*yield*/, post("national/user/download", {
|
15343
|
+
filterAnd: dataQuery.filterAnd,
|
15344
|
+
filterOr: ((_a = dataQuery.filterOr) === null || _a === void 0 ? void 0 : _a.length) > 0 ? dataQuery.filterOr : undefined,
|
15345
|
+
sort: dataQuery.sort,
|
15346
|
+
})];
|
15347
|
+
case 2:
|
15348
|
+
response = _b.sent();
|
15349
|
+
if (response && response.data) {
|
15350
|
+
url = response.data.url;
|
15351
|
+
a = document.createElement('a');
|
15352
|
+
a.href = url;
|
15353
|
+
a.download = response.data.csvFile; // Specify the filename for the downloaded file
|
15354
|
+
document.body.appendChild(a);
|
15355
|
+
a.click();
|
15356
|
+
document.body.removeChild(a); // Clean up the created <a> element
|
15357
|
+
window.URL.revokeObjectURL(url);
|
15358
|
+
}
|
15359
|
+
setLoading(false);
|
15360
|
+
return [3 /*break*/, 4];
|
15361
|
+
case 3:
|
15362
|
+
error_3 = _b.sent();
|
15363
|
+
console.log("Error in exporting users", error_3);
|
15364
|
+
antd.message.open({
|
15365
|
+
type: "error",
|
15366
|
+
content: error_3.message,
|
15367
|
+
duration: 3,
|
15368
|
+
style: { textAlign: "right", marginRight: 15, marginTop: 10 },
|
15369
|
+
});
|
15370
|
+
setLoading(false);
|
15371
|
+
return [3 /*break*/, 4];
|
15372
|
+
case 4: return [2 /*return*/];
|
15373
|
+
}
|
15374
|
+
});
|
15375
|
+
}); };
|
15589
15376
|
React.useEffect(function () {
|
15590
15377
|
getAllUser();
|
15591
15378
|
}, [
|
@@ -15708,7 +15495,13 @@ var UserManagementComponent = function (props) {
|
|
15708
15495
|
React.createElement(icons.FilterOutlined, { style: {
|
15709
15496
|
color: "rgba(58, 53, 65, 0.3)",
|
15710
15497
|
fontSize: "20px",
|
15711
|
-
} }))))
|
15498
|
+
} })))),
|
15499
|
+
React.createElement("div", { className: "download-data-btn user-data-download" },
|
15500
|
+
React.createElement("a", { onClick: downloadUserData },
|
15501
|
+
React.createElement(icons.DownloadOutlined, { style: {
|
15502
|
+
color: "rgba(58, 53, 65, 0.3)",
|
15503
|
+
fontSize: "20px",
|
15504
|
+
} })))))),
|
15712
15505
|
React.createElement(antd.Row, null,
|
15713
15506
|
React.createElement(antd.Col, { span: 24 },
|
15714
15507
|
React.createElement("div", { className: "userManagement-table-container" },
|
@@ -15727,15 +15520,27 @@ var UserManagementComponent = function (props) {
|
|
15727
15520
|
React.createElement(UserActionConfirmationModel, { t: t, actionInfo: actionInfo, onActionConfirmed: handleOk, onActionCanceled: handleCancel, openModal: openDeleteConfirmationModal, errorMsg: errorMsg, loading: loading })));
|
15728
15521
|
};
|
15729
15522
|
|
15730
|
-
var css_248z$m = ".steps-actions {\n display: flex;\n flex-direction: row-reverse;\n margin-right: 1rem;\n justify-content: flex-start; }\n\n.investment-title-bar {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n padding: 0px 0px 30px 0px; }\n .investment-title-bar .title {\n display: flex;\n flex-direction: column;\n justify-content: space-between; }\n .investment-title-bar .actions {\n display: flex;\n align-items: center;\n justify-content: flex-end; }\n .investment-title-bar .flex-display {\n margin-left: 15px; }\n\n.ownership-container {\n padding: 15px 0px; }\n .ownership-container .label {\n color: rgba(58, 53, 65, 0.5); }\n\n.separator {\n padding: 5px;\n color: #d8d8d8; }\n\n.role-group .ant-col-13 {\n max-width: 320px; }\n\n.role-group .condition-radio-container {\n width: 48%;\n text-align: center; }\n .role-group .condition-radio-container .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled) {\n color: #ffffff !important;\n border-color: #9155fd !important;\n box-shadow: none;\n max-width: 200px; }\n\n.role-group .ant-radio-button-wrapper::before {\n background-color: transparent; }\n\n.role-group .anticon {\n margin-right: 0.5rem; }\n\n.role-group .ant-radio-button-wrapper {\n border: 1px solid #d9d9d9;\n color: rgba(140, 140, 140, 0.7) !important;\n width: 100% !important; }\n\n.role-group .condition-radio {\n width: 100%;\n text-transform: uppercase; }\n .role-group .condition-radio .ant-radio-button-checked {\n background: #9155fd;\n color: #ffffff; }\n\n.role-group .role-icons {\n margin-right: 5px; }\n\n.investment-management .role-icon {\n padding: 0.5rem 0.6rem; }\n\n.investment-management .ant-tag {\n border: none; }\n\n.investment-management .ant-checkbox-checked .ant-checkbox-input[value='Rejected'] + .ant-checkbox-inner {\n background-color: rgba(237, 77, 71, 0.6);\n border: none; }\n\n.investment-management .ant-checkbox-checked .ant-checkbox-input[value='Cancelled'] + .ant-checkbox-inner {\n background-color: rgba(58, 53, 65, 0.4);\n border: none; }\n\n.investment-management .ant-checkbox-checked .ant-checkbox-input[value='Accepted'] + .ant-checkbox-inner {\n background-color: #16b1ff;\n border: none; }\n\n.investment-management .ant-checkbox-checked .ant-checkbox-input[value='Pending'] + .ant-checkbox-inner {\n background-color: rgba(118, 195, 39, 0.6);\n border: none; }\n\n.investment-management .ant-checkbox-checked .ant-checkbox-input[value='Recognised'] + .ant-checkbox-inner {\n background-color: #976ed7;\n border: none; }\n\n.investment-management .ant-checkbox-checked .ant-checkbox-input[value='NotRecognised'] + .ant-checkbox-inner {\n background-color: #ffa070;\n border: none; }\n";
|
15523
|
+
var css_248z$m = ".steps-actions {\n display: flex;\n flex-direction: row-reverse;\n margin-right: 1rem;\n justify-content: flex-start; }\n\n.investment-title-bar {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n padding: 0px 0px 30px 0px; }\n .investment-title-bar .title {\n display: flex;\n flex-direction: column;\n justify-content: space-between; }\n .investment-title-bar .actions {\n display: flex;\n align-items: center;\n justify-content: flex-end; }\n .investment-title-bar .flex-display {\n margin-left: 15px; }\n\n.ownership-container {\n padding: 15px 0px; }\n .ownership-container .label {\n color: rgba(58, 53, 65, 0.5); }\n\n.separator {\n padding: 5px;\n color: #d8d8d8; }\n\n.role-group .ant-col-13 {\n max-width: 320px; }\n\n.role-group .condition-radio-container {\n width: 48%;\n text-align: center; }\n .role-group .condition-radio-container .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled) {\n color: #ffffff !important;\n border-color: #9155fd !important;\n box-shadow: none;\n max-width: 200px; }\n\n.role-group .ant-radio-button-wrapper::before {\n background-color: transparent; }\n\n.role-group .anticon {\n margin-right: 0.5rem; }\n\n.role-group .ant-radio-button-wrapper {\n border: 1px solid #d9d9d9;\n color: rgba(140, 140, 140, 0.7) !important;\n width: 100% !important; }\n\n.role-group .condition-radio {\n width: 100%;\n text-transform: uppercase; }\n .role-group .condition-radio .ant-radio-button-checked {\n background: #9155fd;\n color: #ffffff; }\n\n.role-group .role-icons {\n margin-right: 5px; }\n\n.investment-management .role-icon {\n padding: 0.5rem 0.6rem; }\n\n.investment-management .ant-tag {\n border: none; }\n\n.investment-management .ant-checkbox-checked .ant-checkbox-input[value='Rejected'] + .ant-checkbox-inner {\n background-color: rgba(237, 77, 71, 0.6);\n border: none; }\n\n.investment-management .ant-checkbox-checked .ant-checkbox-input[value='Cancelled'] + .ant-checkbox-inner {\n background-color: rgba(58, 53, 65, 0.4);\n border: none; }\n\n.investment-management .ant-checkbox-checked .ant-checkbox-input[value='Accepted'] + .ant-checkbox-inner {\n background-color: #16b1ff;\n border: none; }\n\n.investment-management .ant-checkbox-checked .ant-checkbox-input[value='Pending'] + .ant-checkbox-inner {\n background-color: rgba(118, 195, 39, 0.6);\n border: none; }\n\n.investment-management .ant-checkbox-checked .ant-checkbox-input[value='Recognised'] + .ant-checkbox-inner {\n background-color: #976ed7;\n border: none; }\n\n.investment-management .ant-checkbox-checked .ant-checkbox-input[value='NotRecognised'] + .ant-checkbox-inner {\n background-color: #ffa070;\n border: none; }\n\n.add-programme-main-container .adding-section .form-section .investment-sought-form-container .investment-sought-form .investment-radio-button .ant-radio-group {\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n justify-content: space-between;\n width: fit-content; }\n\n.add-programme-main-container .adding-section .form-section .investment-sought-form-container .investment-sought-form .details-part-two .row .ant-picker-large {\n height: 40px !important;\n width: 100%; }\n";
|
15731
15524
|
styleInject(css_248z$m);
|
15732
15525
|
|
15733
15526
|
var Loading = function () {
|
15734
15527
|
return React.createElement(antd.Spin, { className: "loading-center", size: "large" });
|
15735
15528
|
};
|
15736
15529
|
|
15530
|
+
var GuaranteePayback;
|
15531
|
+
(function (GuaranteePayback) {
|
15532
|
+
GuaranteePayback["UPFORNT"] = "Upfront";
|
15533
|
+
GuaranteePayback["ANNUAL"] = "Annual";
|
15534
|
+
})(GuaranteePayback || (GuaranteePayback = {}));
|
15535
|
+
var InsurancePayback;
|
15536
|
+
(function (InsurancePayback) {
|
15537
|
+
InsurancePayback["LUMPSUM"] = "LumpSum";
|
15538
|
+
InsurancePayback["ANNUAL"] = "Annual";
|
15539
|
+
})(InsurancePayback || (InsurancePayback = {}));
|
15540
|
+
|
15541
|
+
var RangePicker$3 = antd.DatePicker.RangePicker;
|
15737
15542
|
var InvestmentCreationComponent = function (props) {
|
15738
|
-
var t = props.t, useLocation = props.useLocation, onNavigateToProgrammeManagementView = props.onNavigateToProgrammeManagementView, onNavigateToProgrammeView = props.onNavigateToProgrammeView;
|
15543
|
+
var t = props.t, useConnection = props.useConnection, userInfoState = props.userInfoState, useLocation = props.useLocation, onNavigateToProgrammeManagementView = props.onNavigateToProgrammeManagementView, onNavigateToProgrammeView = props.onNavigateToProgrammeView;
|
15739
15544
|
var state = useLocation().state;
|
15740
15545
|
var _a = React.useState(), data = _a[0], setData = _a[1];
|
15741
15546
|
var formOne = antd.Form.useForm()[0];
|
@@ -15750,13 +15555,13 @@ var InvestmentCreationComponent = function (props) {
|
|
15750
15555
|
var _h = React.useState([]), instrument = _h[0], setInstrument = _h[1];
|
15751
15556
|
var _j = React.useState(), stepOneData = _j[0], setStepOneData = _j[1];
|
15752
15557
|
var _k = React.useState(), govData = _k[0], setGovData = _k[1];
|
15753
|
-
var userInfoState = useUserContext().userInfoState;
|
15754
15558
|
var instrumentOptions = Object.keys(exports.Instrument).map(function (k, index) { return ({
|
15755
15559
|
label: addSpaces(Object.values(exports.Instrument)[index]),
|
15756
15560
|
value: Object.values(exports.Instrument)[index],
|
15757
15561
|
}); });
|
15758
|
-
var onInstrumentChange = function (
|
15759
|
-
|
15562
|
+
var onInstrumentChange = function (e) {
|
15563
|
+
console.log("radio checked", e.target.value);
|
15564
|
+
setInstrument([e.target.value]);
|
15760
15565
|
};
|
15761
15566
|
var onPercentageChange = function (value) {
|
15762
15567
|
setCurrentPercTotal(formTwo.getFieldValue("percentage").reduce(function (a, b) { return a + b; }, 0));
|
@@ -15879,7 +15684,7 @@ var InvestmentCreationComponent = function (props) {
|
|
15879
15684
|
if (!data) {
|
15880
15685
|
return React.createElement(Loading, null);
|
15881
15686
|
}
|
15882
|
-
console.log(
|
15687
|
+
console.log("data", data);
|
15883
15688
|
var companyName = {};
|
15884
15689
|
if (data && Object.keys(data)[0] !== "ownership") {
|
15885
15690
|
for (var _i = 0, _l = data === null || data === void 0 ? void 0 : data.company; _i < _l.length; _i++) {
|
@@ -15914,6 +15719,16 @@ var InvestmentCreationComponent = function (props) {
|
|
15914
15719
|
if (payload.paymentPerMetric) {
|
15915
15720
|
payload.paymentPerMetric = parseFloat(payload.paymentPerMetric);
|
15916
15721
|
}
|
15722
|
+
if (payload.period) {
|
15723
|
+
payload.period[0] = moment(payload.period[0]).startOf("day").unix();
|
15724
|
+
payload.period[1] = moment(payload.period[1]).endOf("day").unix();
|
15725
|
+
}
|
15726
|
+
if (payload.startOfPayback) {
|
15727
|
+
payload.startOfPayback = moment(payload.startOfPayback)
|
15728
|
+
.startOf("day")
|
15729
|
+
.unix();
|
15730
|
+
}
|
15731
|
+
payload.instrument = [payload.instrument];
|
15917
15732
|
payload.fromCompanyIds = data.companyId.map(function (e) { return Number(e); });
|
15918
15733
|
payload.percentage = val.percentage;
|
15919
15734
|
payload.toCompanyId = Number(payload.toCompanyId);
|
@@ -15959,7 +15774,7 @@ var InvestmentCreationComponent = function (props) {
|
|
15959
15774
|
}
|
15960
15775
|
};
|
15961
15776
|
var onChangeTypeCreation = function (e) {
|
15962
|
-
console.log(
|
15777
|
+
console.log("radio checked", e.target.value);
|
15963
15778
|
setTypeCreation(e.target.value);
|
15964
15779
|
};
|
15965
15780
|
return (React.createElement("div", { className: "add-programme-main-container" },
|
@@ -16025,8 +15840,30 @@ var InvestmentCreationComponent = function (props) {
|
|
16025
15840
|
React.createElement(antd.Input, { size: "large" }))))),
|
16026
15841
|
React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
|
16027
15842
|
React.createElement(antd.Col, { xl: 24, md: 24 },
|
16028
|
-
React.createElement(antd.Form.Item, { label: t("programme:instrument"), name: "instrument",
|
16029
|
-
|
15843
|
+
React.createElement(antd.Form.Item, { label: t("programme:instrument"), name: "instrument",
|
15844
|
+
//wrapperCol={{ span: 24 }}
|
15845
|
+
required: true, className: "investment-radio-button", rules: [
|
15846
|
+
{
|
15847
|
+
required: true,
|
15848
|
+
message: "",
|
15849
|
+
},
|
15850
|
+
{
|
15851
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
15852
|
+
return __generator(this, function (_a) {
|
15853
|
+
if (String(value).trim() === "" ||
|
15854
|
+
String(value).trim() === undefined ||
|
15855
|
+
value === null ||
|
15856
|
+
value === undefined) {
|
15857
|
+
throw new Error("".concat(t("programme:instrument"), " ").concat(t("isRequired")));
|
15858
|
+
}
|
15859
|
+
return [2 /*return*/];
|
15860
|
+
});
|
15861
|
+
}); },
|
15862
|
+
},
|
15863
|
+
] },
|
15864
|
+
React.createElement(antd.Radio.Group, { onChange: onInstrumentChange, value: instrument[0] }, instrumentOptions.map(function (e) {
|
15865
|
+
return (React.createElement(antd.Radio, { value: e.value }, e.label));
|
15866
|
+
}))))),
|
16030
15867
|
instrument &&
|
16031
15868
|
instrument.indexOf(exports.Instrument.LOAN) >= 0 && (React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
|
16032
15869
|
React.createElement(antd.Col, { xl: 8, md: 12 },
|
@@ -16057,6 +15894,160 @@ var InvestmentCreationComponent = function (props) {
|
|
16057
15894
|
},
|
16058
15895
|
] },
|
16059
15896
|
React.createElement(antd.Input, { size: "large" })))))),
|
15897
|
+
instrument &&
|
15898
|
+
(instrument.indexOf(exports.Instrument.CONLOAN) >= 0 ||
|
15899
|
+
instrument.indexOf(exports.Instrument.NONCONLOAN) >= 0) && (React.createElement("div", { className: "details-part-two" },
|
15900
|
+
React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
|
15901
|
+
React.createElement(antd.Col, { xl: 8, md: 12 },
|
15902
|
+
React.createElement(antd.Form.Item, { label: t("programme:interestRate"), name: "interestRate", rules: [
|
15903
|
+
{
|
15904
|
+
required: true,
|
15905
|
+
message: "",
|
15906
|
+
},
|
15907
|
+
{
|
15908
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
15909
|
+
return __generator(this, function (_a) {
|
15910
|
+
if (String(value).trim() === "" ||
|
15911
|
+
String(value).trim() ===
|
15912
|
+
undefined ||
|
15913
|
+
value === null ||
|
15914
|
+
value === undefined) {
|
15915
|
+
throw new Error("".concat(t("programme:interestRate"), " ").concat(t("isRequired")));
|
15916
|
+
}
|
15917
|
+
else if (!isNaN(value)) {
|
15918
|
+
return [2 /*return*/, Promise.resolve()];
|
15919
|
+
}
|
15920
|
+
else {
|
15921
|
+
throw new Error("".concat(t("programme:interestRate"), " ").concat(t("isInvalid")));
|
15922
|
+
}
|
15923
|
+
});
|
15924
|
+
}); },
|
15925
|
+
},
|
15926
|
+
] },
|
15927
|
+
React.createElement(antd.Input, { size: "large" })))),
|
15928
|
+
React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
|
15929
|
+
React.createElement(antd.Col, { xl: 8, md: 12 },
|
15930
|
+
React.createElement(antd.Form.Item, { label: t("programme:loanPeriod"), name: "period", required: true, rules: [
|
15931
|
+
{
|
15932
|
+
required: true,
|
15933
|
+
message: "",
|
15934
|
+
},
|
15935
|
+
{
|
15936
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
15937
|
+
return __generator(this, function (_a) {
|
15938
|
+
if (String(value).trim() === "" ||
|
15939
|
+
String(value).trim() ===
|
15940
|
+
undefined ||
|
15941
|
+
value === null ||
|
15942
|
+
value === undefined) {
|
15943
|
+
throw new Error("".concat(t("programme:loanPeriod"), " ").concat(t("isRequired")));
|
15944
|
+
}
|
15945
|
+
return [2 /*return*/];
|
15946
|
+
});
|
15947
|
+
}); },
|
15948
|
+
},
|
15949
|
+
] },
|
15950
|
+
React.createElement(RangePicker$3, { showTime: true, allowClear: true, format: "DD:MM:YYYY", size: "large" }))),
|
15951
|
+
React.createElement(antd.Col, { xl: 8, md: 12 },
|
15952
|
+
React.createElement(antd.Form.Item, { label: t("programme:startOfPayback"), name: "startOfPayback", rules: [
|
15953
|
+
{
|
15954
|
+
required: true,
|
15955
|
+
message: "",
|
15956
|
+
},
|
15957
|
+
{
|
15958
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
15959
|
+
return __generator(this, function (_a) {
|
15960
|
+
if (String(value).trim() === "" ||
|
15961
|
+
String(value).trim() ===
|
15962
|
+
undefined ||
|
15963
|
+
value === null ||
|
15964
|
+
value === undefined) {
|
15965
|
+
throw new Error("".concat(t("programme:startOfPayback"), " ").concat(t("isRequired")));
|
15966
|
+
}
|
15967
|
+
return [2 /*return*/];
|
15968
|
+
});
|
15969
|
+
}); },
|
15970
|
+
},
|
15971
|
+
] },
|
15972
|
+
React.createElement(antd.DatePicker, { size: "large", disabledDate: function (currentDate) {
|
15973
|
+
return currentDate < moment().startOf("day");
|
15974
|
+
} })))))),
|
15975
|
+
instrument &&
|
15976
|
+
instrument.indexOf(exports.Instrument.GUARANTEE) >= 0 && (React.createElement("div", { className: "details-part-two" },
|
15977
|
+
React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
|
15978
|
+
React.createElement(antd.Col, { xl: 8, md: 12 },
|
15979
|
+
React.createElement(antd.Form.Item, { label: t("programme:interestRate"), name: "interestRate", rules: [
|
15980
|
+
{
|
15981
|
+
required: true,
|
15982
|
+
message: "",
|
15983
|
+
},
|
15984
|
+
{
|
15985
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
15986
|
+
return __generator(this, function (_a) {
|
15987
|
+
if (String(value).trim() === "" ||
|
15988
|
+
String(value).trim() ===
|
15989
|
+
undefined ||
|
15990
|
+
value === null ||
|
15991
|
+
value === undefined) {
|
15992
|
+
throw new Error("".concat(t("programme:interestRate"), " ").concat(t("isRequired")));
|
15993
|
+
}
|
15994
|
+
else if (!isNaN(value)) {
|
15995
|
+
return [2 /*return*/, Promise.resolve()];
|
15996
|
+
}
|
15997
|
+
else {
|
15998
|
+
throw new Error("".concat(t("programme:interestRate"), " ").concat(t("isInvalid")));
|
15999
|
+
}
|
16000
|
+
});
|
16001
|
+
}); },
|
16002
|
+
},
|
16003
|
+
] },
|
16004
|
+
React.createElement(antd.Input, { size: "large" })))),
|
16005
|
+
React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
|
16006
|
+
React.createElement(antd.Col, { xl: 8, md: 12 },
|
16007
|
+
React.createElement(antd.Form.Item, { label: t("programme:period"), name: "period", required: true, rules: [
|
16008
|
+
{
|
16009
|
+
required: true,
|
16010
|
+
message: "",
|
16011
|
+
},
|
16012
|
+
{
|
16013
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
16014
|
+
return __generator(this, function (_a) {
|
16015
|
+
if (String(value).trim() === "" ||
|
16016
|
+
String(value).trim() ===
|
16017
|
+
undefined ||
|
16018
|
+
value === null ||
|
16019
|
+
value === undefined) {
|
16020
|
+
throw new Error("".concat(t("programme:period"), " ").concat(t("isRequired")));
|
16021
|
+
}
|
16022
|
+
return [2 /*return*/];
|
16023
|
+
});
|
16024
|
+
}); },
|
16025
|
+
},
|
16026
|
+
] },
|
16027
|
+
React.createElement(RangePicker$3, { showTime: true, allowClear: true, format: "DD:MM:YYYY", size: "large" }))),
|
16028
|
+
React.createElement(antd.Col, { xl: 8, md: 12 },
|
16029
|
+
React.createElement(antd.Form.Item, { label: t("programme:payback"), wrapperCol: { span: 13 }, className: "role-group", name: "guaranteePayback", rules: [
|
16030
|
+
{
|
16031
|
+
required: true,
|
16032
|
+
message: "",
|
16033
|
+
},
|
16034
|
+
{
|
16035
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
16036
|
+
return __generator(this, function (_a) {
|
16037
|
+
if (String(value).trim() === "" ||
|
16038
|
+
String(value).trim() ===
|
16039
|
+
undefined ||
|
16040
|
+
value === null ||
|
16041
|
+
value === undefined) {
|
16042
|
+
throw new Error("".concat(t("programme:payback"), " ").concat(t("isRequired")));
|
16043
|
+
}
|
16044
|
+
return [2 /*return*/];
|
16045
|
+
});
|
16046
|
+
}); },
|
16047
|
+
},
|
16048
|
+
] },
|
16049
|
+
React.createElement(antd.Radio.Group, { size: "large" }, Object.values(GuaranteePayback).map(function (k, index) { return (React.createElement("div", { className: "condition-radio-container" },
|
16050
|
+
React.createElement(antd.Radio.Button, { className: "condition-radio", value: k }, t("programme:" + k)))); }))))))),
|
16060
16051
|
instrument &&
|
16061
16052
|
instrument.indexOf(exports.Instrument.RESULT_BASED) >= 0 && (React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
|
16062
16053
|
React.createElement(antd.Col, { xl: 12, md: 24 },
|
@@ -16121,6 +16112,32 @@ var InvestmentCreationComponent = function (props) {
|
|
16121
16112
|
},
|
16122
16113
|
] },
|
16123
16114
|
React.createElement(antd.Input, { size: "large" })))))),
|
16115
|
+
instrument &&
|
16116
|
+
instrument.indexOf(exports.Instrument.INSURANCE) >= 0 && (React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
|
16117
|
+
React.createElement(antd.Col, { xl: 8, md: 12 },
|
16118
|
+
React.createElement("div", { className: "details-part-two" },
|
16119
|
+
React.createElement(antd.Form.Item, { label: t("programme:payback"), wrapperCol: { span: 13 }, className: "role-group", name: "insurancePayback", rules: [
|
16120
|
+
{
|
16121
|
+
required: true,
|
16122
|
+
message: "",
|
16123
|
+
},
|
16124
|
+
{
|
16125
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
16126
|
+
return __generator(this, function (_a) {
|
16127
|
+
if (String(value).trim() === "" ||
|
16128
|
+
String(value).trim() ===
|
16129
|
+
undefined ||
|
16130
|
+
value === null ||
|
16131
|
+
value === undefined) {
|
16132
|
+
throw new Error("".concat(t("programme:payback"), " ").concat(t("isRequired")));
|
16133
|
+
}
|
16134
|
+
return [2 /*return*/];
|
16135
|
+
});
|
16136
|
+
}); },
|
16137
|
+
},
|
16138
|
+
] },
|
16139
|
+
React.createElement(antd.Radio.Group, { size: "large" }, Object.values(InsurancePayback).map(function (k, index) { return (React.createElement("div", { className: "condition-radio-container" },
|
16140
|
+
React.createElement(antd.Radio.Button, { className: "condition-radio", value: k }, t("programme:" + k)))); }))))))),
|
16124
16141
|
instrument &&
|
16125
16142
|
instrument.indexOf(exports.Instrument.OTHER) >= 0 && (React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
|
16126
16143
|
React.createElement(antd.Col, { xl: 12, md: 24 },
|
@@ -16146,7 +16163,7 @@ var InvestmentCreationComponent = function (props) {
|
|
16146
16163
|
},
|
16147
16164
|
] },
|
16148
16165
|
React.createElement(antd.Input, { size: "large" })))))),
|
16149
|
-
React.createElement(antd.Row, { className: "row", gutter: [
|
16166
|
+
React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
|
16150
16167
|
React.createElement(antd.Col, { xl: 8, md: 12 },
|
16151
16168
|
React.createElement(antd.Form.Item, { label: t("programme:type"), wrapperCol: { span: 13 }, className: "role-group", name: "type", rules: [
|
16152
16169
|
{
|
@@ -16190,73 +16207,73 @@ var InvestmentCreationComponent = function (props) {
|
|
16190
16207
|
React.createElement("div", { className: "step-count" }, "02"),
|
16191
16208
|
React.createElement("div", { className: "title" }, t("programme:ownership")))),
|
16192
16209
|
description: current === 1 && (React.createElement("div", null,
|
16193
|
-
React.createElement("div", { className: "programme-sought-form-container ownership-container" }, Object.keys(data).length > 0 &&
|
16194
|
-
React.createElement("
|
16195
|
-
|
16196
|
-
|
16197
|
-
return (React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
|
16198
|
-
React.createElement(antd.Col, { xl: 8, md: 15 },
|
16199
|
-
React.createElement("div", { className: "label" },
|
16200
|
-
companyName[companyId].name,
|
16201
|
-
React.createElement("span", { className: "required-mark" }, "*"))),
|
16202
|
-
React.createElement(antd.Col, { xl: 8, md: 9 },
|
16203
|
-
React.createElement(antd.Form.Item, { className: "inline", name: ["percentage", index], initialValue: 0, rules: [
|
16204
|
-
{
|
16205
|
-
pattern: new RegExp(/^[+]?([.]\d+|\d+[.]?\d*)$/g),
|
16206
|
-
message: "Percentage Should be a positive number",
|
16207
|
-
},
|
16208
|
-
{
|
16209
|
-
required: true,
|
16210
|
-
message: "Required field",
|
16211
|
-
},
|
16212
|
-
function (_a) {
|
16213
|
-
var getFieldValue = _a.getFieldValue;
|
16214
|
-
return ({
|
16215
|
-
validator: function (rule, v) {
|
16216
|
-
if (getFieldValue([
|
16217
|
-
"percentage",
|
16218
|
-
index,
|
16219
|
-
]) &&
|
16220
|
-
parseFloat(getFieldValue([
|
16221
|
-
"percentage",
|
16222
|
-
index,
|
16223
|
-
])) > data.proponentPercentage[index]) {
|
16224
|
-
// eslint-disable-next-line prefer-promise-reject-errors
|
16225
|
-
return Promise.reject("Amount > Available");
|
16226
|
-
}
|
16227
|
-
return Promise.resolve();
|
16228
|
-
},
|
16229
|
-
});
|
16230
|
-
},
|
16231
|
-
] },
|
16232
|
-
React.createElement(antd.InputNumber, { placeholder: "", controls: false, disabled: govData.companyId == companyId,
|
16233
|
-
// disabled={userInfoState?.companyId === Number(companyId)}
|
16234
|
-
onKeyPress: function (event) {
|
16235
|
-
if (!/[0-9\.]/.test(event.key)) {
|
16236
|
-
event.preventDefault();
|
16237
|
-
}
|
16238
|
-
} })),
|
16239
|
-
React.createElement("div", { className: "inline separator" }, "/"),
|
16240
|
-
React.createElement(antd.Form.Item, { className: "inline" },
|
16241
|
-
React.createElement(antd.InputNumber, { placeholder: String(data === null || data === void 0 ? void 0 : data.proponentPercentage[index]), disabled: true })))));
|
16242
|
-
}),
|
16243
|
-
React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
|
16210
|
+
React.createElement("div", { className: "programme-sought-form-container ownership-container" }, Object.keys(data).length > 0 && (React.createElement("div", { className: "programme-sought-form" },
|
16211
|
+
React.createElement(antd.Form, { labelCol: { span: 20 }, wrapperCol: { span: 24 }, form: formTwo, name: "investment-sought", className: "investment-sought-form", layout: "vertical", requiredMark: true, onChange: onPercentageChange, onFinish: submitInvestment }, data === null || data === void 0 ? void 0 :
|
16212
|
+
data.companyId.map(function (companyId, index) {
|
16213
|
+
return (React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
|
16244
16214
|
React.createElement(antd.Col, { xl: 8, md: 15 },
|
16245
|
-
React.createElement("div", { className: "label" },
|
16215
|
+
React.createElement("div", { className: "label" },
|
16216
|
+
companyName[companyId].name,
|
16217
|
+
React.createElement("span", { className: "required-mark" }, "*"))),
|
16246
16218
|
React.createElement(antd.Col, { xl: 8, md: 9 },
|
16247
|
-
React.createElement(antd.Form.Item, { className: "inline", name: ["
|
16248
|
-
|
16219
|
+
React.createElement(antd.Form.Item, { className: "inline", name: ["percentage", index], initialValue: 0, rules: [
|
16220
|
+
{
|
16221
|
+
pattern: new RegExp(/^[+]?([.]\d+|\d+[.]?\d*)$/g),
|
16222
|
+
message: "Percentage Should be a positive number",
|
16223
|
+
},
|
16224
|
+
{
|
16225
|
+
required: true,
|
16226
|
+
message: "Required field",
|
16227
|
+
},
|
16228
|
+
function (_a) {
|
16229
|
+
var getFieldValue = _a.getFieldValue;
|
16230
|
+
return ({
|
16231
|
+
validator: function (rule, v) {
|
16232
|
+
if (getFieldValue([
|
16233
|
+
"percentage",
|
16234
|
+
index,
|
16235
|
+
]) &&
|
16236
|
+
parseFloat(getFieldValue([
|
16237
|
+
"percentage",
|
16238
|
+
index,
|
16239
|
+
])) >
|
16240
|
+
data.proponentPercentage[index]) {
|
16241
|
+
// eslint-disable-next-line prefer-promise-reject-errors
|
16242
|
+
return Promise.reject("Amount > Available");
|
16243
|
+
}
|
16244
|
+
return Promise.resolve();
|
16245
|
+
},
|
16246
|
+
});
|
16247
|
+
},
|
16248
|
+
] },
|
16249
|
+
React.createElement(antd.InputNumber, { placeholder: "", controls: false, disabled: govData.companyId == companyId,
|
16250
|
+
// disabled={userInfoState?.companyId === Number(companyId)}
|
16251
|
+
onKeyPress: function (event) {
|
16249
16252
|
if (!/[0-9\.]/.test(event.key)) {
|
16250
16253
|
event.preventDefault();
|
16251
16254
|
}
|
16252
16255
|
} })),
|
16253
16256
|
React.createElement("div", { className: "inline separator" }, "/"),
|
16254
16257
|
React.createElement(antd.Form.Item, { className: "inline" },
|
16255
|
-
React.createElement(antd.InputNumber, {
|
16256
|
-
|
16257
|
-
|
16258
|
-
|
16259
|
-
|
16258
|
+
React.createElement(antd.InputNumber, { placeholder: String(data === null || data === void 0 ? void 0 : data.proponentPercentage[index]), disabled: true })))));
|
16259
|
+
}),
|
16260
|
+
React.createElement(antd.Row, { className: "row", gutter: [16, 16] },
|
16261
|
+
React.createElement(antd.Col, { xl: 8, md: 15 },
|
16262
|
+
React.createElement("div", { className: "label" }, t("programme:total"))),
|
16263
|
+
React.createElement(antd.Col, { xl: 8, md: 9 },
|
16264
|
+
React.createElement(antd.Form.Item, { className: "inline", name: ["total"] },
|
16265
|
+
React.createElement(antd.InputNumber, { placeholder: currentPercTotal + "", controls: false, disabled: true, onKeyPress: function (event) {
|
16266
|
+
if (!/[0-9\.]/.test(event.key)) {
|
16267
|
+
event.preventDefault();
|
16268
|
+
}
|
16269
|
+
} })),
|
16270
|
+
React.createElement("div", { className: "inline separator" }, "/"),
|
16271
|
+
React.createElement(antd.Form.Item, { className: "inline" },
|
16272
|
+
React.createElement(antd.InputNumber, { disabled: true, placeholder: "100" })))),
|
16273
|
+
React.createElement(antd.Form.Item, null,
|
16274
|
+
React.createElement("div", { className: "steps-actions" },
|
16275
|
+
React.createElement(antd.Button, { type: "primary", htmlType: "submit", loading: loading, onSubmit: submitInvestment }, t("programme:submit")),
|
16276
|
+
React.createElement(antd.Button, { className: "back-btn", onClick: function () { return prevOne(); }, loading: loading }, t("programme:back")))))))))),
|
16260
16277
|
},
|
16261
16278
|
] })))));
|
16262
16279
|
};
|
@@ -16367,7 +16384,7 @@ var InvestmentActionModel = function (props) {
|
|
16367
16384
|
};
|
16368
16385
|
|
16369
16386
|
var InvestmentManagementComponent = function (props) {
|
16370
|
-
var translator = props.translator, onNavigateToProgrammeView = props.onNavigateToProgrammeView, onClickAddOwnership = props.onClickAddOwnership, enableAddOwnership = props.enableAddOwnership;
|
16387
|
+
var translator = props.translator, useConnection = props.useConnection, onNavigateToProgrammeView = props.onNavigateToProgrammeView, useUserContext = props.useUserContext, useSettingsContext = props.useSettingsContext, onClickAddOwnership = props.onClickAddOwnership, enableAddOwnership = props.enableAddOwnership;
|
16371
16388
|
var t = translator.t;
|
16372
16389
|
var statusOptions = Object.keys(exports.InvestmentStatus).map(function (k, index) { return ({
|
16373
16390
|
label: addSpaces(Object.values(exports.InvestmentStatus)[index]),
|
@@ -16395,6 +16412,7 @@ var InvestmentManagementComponent = function (props) {
|
|
16395
16412
|
var _u = useSettingsContext(), isTransferFrozen = _u.isTransferFrozen; _u.setTransferFrozen;
|
16396
16413
|
var _v = React.useState([]), ministrySectoralScope = _v[0], setMinistrySectoralScope = _v[1];
|
16397
16414
|
var _w = React.useState(false), ministryLevelFilter = _w[0], setMinistryLevelFilter = _w[1];
|
16415
|
+
var _x = React.useState(), dataQuery = _x[0], setDataQuery = _x[1];
|
16398
16416
|
var onStatusQuery = function (checkedValues) { return __awaiter(void 0, void 0, void 0, function () {
|
16399
16417
|
return __generator(this, function (_a) {
|
16400
16418
|
console.log(checkedValues);
|
@@ -16491,6 +16509,12 @@ var InvestmentManagementComponent = function (props) {
|
|
16491
16509
|
console.log(response);
|
16492
16510
|
setTableData(response.data);
|
16493
16511
|
setTotalProgramme(response.response.data.total);
|
16512
|
+
setDataQuery({
|
16513
|
+
filterAnd: filter,
|
16514
|
+
filterOr: dataFilter,
|
16515
|
+
sort: sort,
|
16516
|
+
filterBy: filterBy,
|
16517
|
+
});
|
16494
16518
|
setLoading(false);
|
16495
16519
|
return [3 /*break*/, 4];
|
16496
16520
|
case 3:
|
@@ -16508,8 +16532,53 @@ var InvestmentManagementComponent = function (props) {
|
|
16508
16532
|
}
|
16509
16533
|
});
|
16510
16534
|
}); };
|
16535
|
+
var downloadInvestmentData = function () { return __awaiter(void 0, void 0, void 0, function () {
|
16536
|
+
var response, url, a, error_2;
|
16537
|
+
var _a;
|
16538
|
+
return __generator(this, function (_b) {
|
16539
|
+
switch (_b.label) {
|
16540
|
+
case 0:
|
16541
|
+
setLoading(true);
|
16542
|
+
_b.label = 1;
|
16543
|
+
case 1:
|
16544
|
+
_b.trys.push([1, 3, , 4]);
|
16545
|
+
return [4 /*yield*/, post("national/programme/investments/download", {
|
16546
|
+
filterAnd: dataQuery.filterAnd,
|
16547
|
+
filterOr: ((_a = dataQuery.filterOr) === null || _a === void 0 ? void 0 : _a.length) > 0 ? dataQuery.filterOr : undefined,
|
16548
|
+
sort: dataQuery.sort,
|
16549
|
+
filterBy: dataQuery.filterBy,
|
16550
|
+
})];
|
16551
|
+
case 2:
|
16552
|
+
response = _b.sent();
|
16553
|
+
if (response && response.data) {
|
16554
|
+
url = response.data.url;
|
16555
|
+
a = document.createElement('a');
|
16556
|
+
a.href = url;
|
16557
|
+
a.download = response.data.csvFile; // Specify the filename for the downloaded file
|
16558
|
+
document.body.appendChild(a);
|
16559
|
+
a.click();
|
16560
|
+
document.body.removeChild(a); // Clean up the created <a> element
|
16561
|
+
window.URL.revokeObjectURL(url);
|
16562
|
+
}
|
16563
|
+
setLoading(false);
|
16564
|
+
return [3 /*break*/, 4];
|
16565
|
+
case 3:
|
16566
|
+
error_2 = _b.sent();
|
16567
|
+
console.log("Error in exporting investments", error_2);
|
16568
|
+
antd.message.open({
|
16569
|
+
type: "error",
|
16570
|
+
content: error_2.message,
|
16571
|
+
duration: 3,
|
16572
|
+
style: { textAlign: "right", marginRight: 15, marginTop: 10 },
|
16573
|
+
});
|
16574
|
+
setLoading(false);
|
16575
|
+
return [3 /*break*/, 4];
|
16576
|
+
case 4: return [2 /*return*/];
|
16577
|
+
}
|
16578
|
+
});
|
16579
|
+
}); };
|
16511
16580
|
var getUserDetails = function () { return __awaiter(void 0, void 0, void 0, function () {
|
16512
|
-
var response,
|
16581
|
+
var response, error_3;
|
16513
16582
|
var _a, _b, _c, _d, _e, _f;
|
16514
16583
|
return __generator(this, function (_g) {
|
16515
16584
|
switch (_g.label) {
|
@@ -16541,8 +16610,8 @@ var InvestmentManagementComponent = function (props) {
|
|
16541
16610
|
setLoading(false);
|
16542
16611
|
return [3 /*break*/, 4];
|
16543
16612
|
case 3:
|
16544
|
-
|
16545
|
-
console.log("Error in getting users",
|
16613
|
+
error_3 = _g.sent();
|
16614
|
+
console.log("Error in getting users", error_3);
|
16546
16615
|
setLoading(false);
|
16547
16616
|
return [3 /*break*/, 4];
|
16548
16617
|
case 4: return [2 /*return*/];
|
@@ -16573,7 +16642,7 @@ var InvestmentManagementComponent = function (props) {
|
|
16573
16642
|
ministryLevelFilter,
|
16574
16643
|
]);
|
16575
16644
|
var handleRequestOk = function (reqId, remarks, endpoint, successText, isRetire) { return __awaiter(void 0, void 0, void 0, function () {
|
16576
|
-
var response, successMsg,
|
16645
|
+
var response, successMsg, error_4;
|
16577
16646
|
return __generator(this, function (_a) {
|
16578
16647
|
switch (_a.label) {
|
16579
16648
|
case 0:
|
@@ -16603,10 +16672,10 @@ var InvestmentManagementComponent = function (props) {
|
|
16603
16672
|
setModalVisible(false);
|
16604
16673
|
return [3 /*break*/, 4];
|
16605
16674
|
case 3:
|
16606
|
-
|
16607
|
-
console.log("Error in Cancelling transfer request",
|
16675
|
+
error_4 = _a.sent();
|
16676
|
+
console.log("Error in Cancelling transfer request", error_4);
|
16608
16677
|
setLoading(false);
|
16609
|
-
return [2 /*return*/,
|
16678
|
+
return [2 /*return*/, error_4.message];
|
16610
16679
|
case 4: return [2 /*return*/];
|
16611
16680
|
}
|
16612
16681
|
});
|
@@ -16872,7 +16941,13 @@ var InvestmentManagementComponent = function (props) {
|
|
16872
16941
|
return e.target.value === ""
|
16873
16942
|
? setSearch(e.target.value)
|
16874
16943
|
: setSearchText(e.target.value);
|
16875
|
-
}, onSearch: setSearch, style: { width: 265 } }))
|
16944
|
+
}, onSearch: setSearch, style: { width: 265 } })),
|
16945
|
+
React.createElement("div", { className: "download-data-btn" },
|
16946
|
+
React.createElement("a", { onClick: downloadInvestmentData },
|
16947
|
+
React.createElement(icons.DownloadOutlined, { style: {
|
16948
|
+
color: "rgba(58, 53, 65, 0.3)",
|
16949
|
+
fontSize: "20px",
|
16950
|
+
} })))))),
|
16876
16951
|
React.createElement(antd.Row, null,
|
16877
16952
|
React.createElement(antd.Col, { span: 24 },
|
16878
16953
|
React.createElement("div", { className: "programmeManagement-table-container" },
|
@@ -16900,7 +16975,7 @@ var css_248z$l = ".steps-actions {\n display: flex;\n flex-direction: row-reve
|
|
16900
16975
|
styleInject(css_248z$l);
|
16901
16976
|
|
16902
16977
|
var SupportCreationComponent = function (props) {
|
16903
|
-
var t = props.t, useLocation = props.useLocation; props.onNavigateToProgrammeManagementView; props.onNavigateToProgrammeView;
|
16978
|
+
var t = props.t, useConnection = props.useConnection, userInfoState = props.userInfoState, useLocation = props.useLocation; props.onNavigateToProgrammeManagementView; props.onNavigateToProgrammeView;
|
16904
16979
|
useLocation().state;
|
16905
16980
|
var _a = React.useState(); _a[0]; _a[1];
|
16906
16981
|
var formOne = antd.Form.useForm()[0];
|
@@ -16913,7 +16988,6 @@ var SupportCreationComponent = function (props) {
|
|
16913
16988
|
var _f = React.useState([]), organisationsList = _f[0], setOrganisationList = _f[1];
|
16914
16989
|
var _g = React.useState([]), instrument = _g[0], setInstrument = _g[1];
|
16915
16990
|
var _h = React.useState(); _h[0]; var setStepOneData = _h[1];
|
16916
|
-
var userInfoState = useUserContext().userInfoState;
|
16917
16991
|
var instrumentOptions = Object.keys(exports.Instrument).map(function (k, index) { return ({
|
16918
16992
|
label: addSpaces(Object.values(exports.Instrument)[index]),
|
16919
16993
|
value: Object.values(exports.Instrument)[index],
|
@@ -17256,7 +17330,7 @@ var SupportCreationComponent = function (props) {
|
|
17256
17330
|
};
|
17257
17331
|
|
17258
17332
|
var SupportManagementComponent = function (props) {
|
17259
|
-
var translator = props.translator; props.onNavigateToProgrammeView; var enableAddSupport = props.enableAddSupport, onClickAddSupport = props.onClickAddSupport;
|
17333
|
+
var translator = props.translator, useConnection = props.useConnection; props.onNavigateToProgrammeView; var useUserContext = props.useUserContext, useSettingsContext = props.useSettingsContext, enableAddSupport = props.enableAddSupport, onClickAddSupport = props.onClickAddSupport;
|
17260
17334
|
var t = translator.t;
|
17261
17335
|
var statusOptions = Object.keys(exports.InvestmentStatus).map(function (k, index) { return ({
|
17262
17336
|
label: addSpaces(Object.values(exports.InvestmentStatus)[index]),
|
@@ -17758,7 +17832,7 @@ var css_248z$k = ".ndc-management .ant-checkbox-checked .ant-checkbox-input[valu
|
|
17758
17832
|
styleInject(css_248z$k);
|
17759
17833
|
|
17760
17834
|
var NdcActionManagementComponent = function (props) {
|
17761
|
-
var t = props.t, onNavigateToNdcManagementView = props.onNavigateToNdcManagementView, onNavigateToProgrammeManagementView = props.onNavigateToProgrammeManagementView;
|
17835
|
+
var t = props.t, useConnection = props.useConnection, useUserContext = props.useUserContext, onNavigateToNdcManagementView = props.onNavigateToNdcManagementView, onNavigateToProgrammeManagementView = props.onNavigateToProgrammeManagementView;
|
17762
17836
|
var _a = React.useState(true), checkAll = _a[0], setCheckAll = _a[1];
|
17763
17837
|
var _b = React.useState([]), tableData = _b[0], setTableData = _b[1];
|
17764
17838
|
var _c = React.useState(), totalProgramme = _c[0], setTotalProgramme = _c[1];
|
@@ -17773,6 +17847,7 @@ var NdcActionManagementComponent = function (props) {
|
|
17773
17847
|
var _m = React.useState(), dataFilter = _m[0]; _m[1];
|
17774
17848
|
var _o = React.useState([]), ministrySectoralScope = _o[0], setMinistrySectoralScope = _o[1];
|
17775
17849
|
var _p = React.useState(false), ministryLevelFilter = _p[0], setMinistryLevelFilter = _p[1];
|
17850
|
+
var _q = React.useState(), dataQuery = _q[0], setDataQuery = _q[1];
|
17776
17851
|
var Search = antd.Input.Search;
|
17777
17852
|
var post = useConnection().post;
|
17778
17853
|
var userInfoState = useUserContext().userInfoState;
|
@@ -17780,7 +17855,7 @@ var NdcActionManagementComponent = function (props) {
|
|
17780
17855
|
label: addSpaces(Object.values(exports.NdcActionStatus)[index]),
|
17781
17856
|
value: Object.values(exports.NdcActionStatus)[index],
|
17782
17857
|
}); });
|
17783
|
-
var
|
17858
|
+
var _r = React.useState(statusOptions.map(function (e) { return e.value; })), selectedStatus = _r[0], setSelectedStatus = _r[1];
|
17784
17859
|
var getNdcActionNames = function (action) {
|
17785
17860
|
switch (action) {
|
17786
17861
|
case exports.NdcActionTypes.Adaptation:
|
@@ -17962,6 +18037,11 @@ var NdcActionManagementComponent = function (props) {
|
|
17962
18037
|
response = _a.sent();
|
17963
18038
|
setTableData(response.data);
|
17964
18039
|
setTotalProgramme(response.response.data.total);
|
18040
|
+
setDataQuery({
|
18041
|
+
filterAnd: filter,
|
18042
|
+
filterBy: filterBy,
|
18043
|
+
sort: sort,
|
18044
|
+
});
|
17965
18045
|
setLoading(false);
|
17966
18046
|
return [3 /*break*/, 4];
|
17967
18047
|
case 3:
|
@@ -18020,6 +18100,49 @@ var NdcActionManagementComponent = function (props) {
|
|
18020
18100
|
}
|
18021
18101
|
});
|
18022
18102
|
}); };
|
18103
|
+
var downloadNdcData = function () { return __awaiter(void 0, void 0, void 0, function () {
|
18104
|
+
var response, url, a, error_3;
|
18105
|
+
return __generator(this, function (_a) {
|
18106
|
+
switch (_a.label) {
|
18107
|
+
case 0:
|
18108
|
+
setLoading(true);
|
18109
|
+
_a.label = 1;
|
18110
|
+
case 1:
|
18111
|
+
_a.trys.push([1, 3, , 4]);
|
18112
|
+
return [4 /*yield*/, post("national/programme/queryNdcActions/download", {
|
18113
|
+
filterAnd: dataQuery.filterAnd,
|
18114
|
+
filterBy: dataQuery.filterBy,
|
18115
|
+
sort: dataQuery.sort,
|
18116
|
+
})];
|
18117
|
+
case 2:
|
18118
|
+
response = _a.sent();
|
18119
|
+
if (response && response.data) {
|
18120
|
+
url = response.data.url;
|
18121
|
+
a = document.createElement('a');
|
18122
|
+
a.href = url;
|
18123
|
+
a.download = response.data.csvFile; // Specify the filename for the downloaded file
|
18124
|
+
document.body.appendChild(a);
|
18125
|
+
a.click();
|
18126
|
+
document.body.removeChild(a); // Clean up the created <a> element
|
18127
|
+
window.URL.revokeObjectURL(url);
|
18128
|
+
}
|
18129
|
+
setLoading(false);
|
18130
|
+
return [3 /*break*/, 4];
|
18131
|
+
case 3:
|
18132
|
+
error_3 = _a.sent();
|
18133
|
+
console.log("Error in exporting NDC Actions", error_3);
|
18134
|
+
antd.message.open({
|
18135
|
+
type: "error",
|
18136
|
+
content: error_3.message,
|
18137
|
+
duration: 3,
|
18138
|
+
style: { textAlign: "right", marginRight: 15, marginTop: 10 },
|
18139
|
+
});
|
18140
|
+
setLoading(false);
|
18141
|
+
return [3 /*break*/, 4];
|
18142
|
+
case 4: return [2 /*return*/];
|
18143
|
+
}
|
18144
|
+
});
|
18145
|
+
}); };
|
18023
18146
|
React.useEffect(function () {
|
18024
18147
|
if ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.MINISTRY) {
|
18025
18148
|
getUserDetails();
|
@@ -18115,7 +18238,13 @@ var NdcActionManagementComponent = function (props) {
|
|
18115
18238
|
return e.target.value === ""
|
18116
18239
|
? setSearch(e.target.value)
|
18117
18240
|
: setSearchText(e.target.value);
|
18118
|
-
}, onSearch: setSearch, style: { width: 265 } }))
|
18241
|
+
}, onSearch: setSearch, style: { width: 265 } })),
|
18242
|
+
React.createElement("div", { className: "download-data-btn" },
|
18243
|
+
React.createElement("a", { onClick: downloadNdcData },
|
18244
|
+
React.createElement(icons.DownloadOutlined, { style: {
|
18245
|
+
color: "rgba(58, 53, 65, 0.3)",
|
18246
|
+
fontSize: "20px",
|
18247
|
+
} })))))),
|
18119
18248
|
React.createElement(antd.Row, null,
|
18120
18249
|
React.createElement(antd.Col, { span: 24 },
|
18121
18250
|
React.createElement("div", { className: "programmeManagement-table-container" },
|
@@ -19117,7 +19246,7 @@ var GenderParity = function (props) {
|
|
19117
19246
|
};
|
19118
19247
|
|
19119
19248
|
var Assessment = function (props) {
|
19120
|
-
var onFormSubmit = props.onFormSubmit, assessmentViewData = props.assessmentViewData, viewOnly = props.viewOnly, translator = props.translator;
|
19249
|
+
var onFormSubmit = props.onFormSubmit, assessmentViewData = props.assessmentViewData, viewOnly = props.viewOnly, useConnection = props.useConnection, translator = props.translator;
|
19121
19250
|
translator.setDefaultNamespace("coBenifits");
|
19122
19251
|
var t = translator.t;
|
19123
19252
|
var form1 = antd.Form.useForm()[0];
|
@@ -21522,7 +21651,7 @@ var SocialEnvironmentalRisk = function (props) {
|
|
21522
21651
|
};
|
21523
21652
|
|
21524
21653
|
var CoBenifitsComponent = function (props) {
|
21525
|
-
var onClickedBackBtn = props.onClickedBackBtn, onFormSubmit = props.onFormSubmit, coBenefitsDetails = props.coBenefitsDetails, submitButtonText = props.submitButtonText, viewOnly = props.viewOnly, coBenifitsViewDetails = props.coBenifitsViewDetails, _a = props.loading, loading = _a === void 0 ? false : _a, sdgGoalImages = props.sdgGoalImages, translator = props.translator;
|
21654
|
+
var onClickedBackBtn = props.onClickedBackBtn, onFormSubmit = props.onFormSubmit, coBenefitsDetails = props.coBenefitsDetails, submitButtonText = props.submitButtonText, viewOnly = props.viewOnly, coBenifitsViewDetails = props.coBenifitsViewDetails, _a = props.loading, loading = _a === void 0 ? false : _a, sdgGoalImages = props.sdgGoalImages, translator = props.translator, useConnection = props.useConnection;
|
21526
21655
|
var _b = React.useState(), coBenefitDetails = _b[0], setCoBenefitDetails = _b[1];
|
21527
21656
|
var _c = React.useState(true), isSocialFormValid = _c[0], setIsSocialFormValid = _c[1];
|
21528
21657
|
var _d = React.useState(true), isAssessmentFormValid = _d[0], setIsAssessmentFormValid = _d[1];
|
@@ -21596,7 +21725,7 @@ var CoBenifitsComponent = function (props) {
|
|
21596
21725
|
label: t("coBenifits:assessment"),
|
21597
21726
|
key: "7",
|
21598
21727
|
children: (React.createElement(Assessment, { onFormSubmit: onAssessmentFormSubmit, assessmentViewData: (viewOnly && (coBenifitsViewDetails === null || coBenifitsViewDetails === void 0 ? void 0 : coBenifitsViewDetails.assessmentDetails)) ||
|
21599
|
-
(!viewOnly && (coBenefitsDetails === null || coBenefitsDetails === void 0 ? void 0 : coBenefitsDetails.assessmentDetails)), viewOnly: viewOnly || false, translator: translator })),
|
21728
|
+
(!viewOnly && (coBenefitsDetails === null || coBenefitsDetails === void 0 ? void 0 : coBenefitsDetails.assessmentDetails)), viewOnly: viewOnly || false, useConnection: useConnection, translator: translator })),
|
21600
21729
|
},
|
21601
21730
|
{
|
21602
21731
|
label: t("coBenifits:socialEnvironmentalRisk"),
|
@@ -21765,7 +21894,7 @@ var CoBenifitsComponent = function (props) {
|
|
21765
21894
|
};
|
21766
21895
|
|
21767
21896
|
var AddNdcActionComponent = function (props) {
|
21768
|
-
var useLocation = props.useLocation, onNavigateToProgrammeManagementView = props.onNavigateToProgrammeManagementView, onNavigateToProgrammeView = props.onNavigateToProgrammeView, sdgGoalImages = props.sdgGoalImages, translator = props.translator;
|
21897
|
+
var useConnection = props.useConnection, useLocation = props.useLocation, onNavigateToProgrammeManagementView = props.onNavigateToProgrammeManagementView, onNavigateToProgrammeView = props.onNavigateToProgrammeView, sdgGoalImages = props.sdgGoalImages, translator = props.translator;
|
21769
21898
|
translator.setDefaultNamespace("ndcAction");
|
21770
21899
|
var t = translator.t;
|
21771
21900
|
var _a = React.useState(1), current = _a[0], setCurrent = _a[1];
|
@@ -21907,7 +22036,7 @@ var AddNdcActionComponent = function (props) {
|
|
21907
22036
|
description: (React.createElement("div", { className: current !== 2 ? "hide" : "" },
|
21908
22037
|
React.createElement(CoBenifitsComponent, { onClickedBackBtn: onClickBackCoBenefits, coBenefitsDetails: ndcActionDetails ? ndcActionDetails.coBenefitsProperties : {}, onFormSubmit: onCoBenefitsSubmit, submitButtonText: isProjectReportsVisible()
|
21909
22038
|
? t("ndcAction:next")
|
21910
|
-
: t("ndcAction:submit"), loading: loading, sdgGoalImages: sdgGoalImages, translator: translator }))),
|
22039
|
+
: t("ndcAction:submit"), loading: loading, sdgGoalImages: sdgGoalImages, useConnection: useConnection, translator: translator }))),
|
21911
22040
|
},
|
21912
22041
|
];
|
21913
22042
|
if (isProjectReportsVisible()) {
|
@@ -22044,7 +22173,7 @@ var uploadDocUserPermission = function (userInfoState, docType, programmeOwnerId
|
|
22044
22173
|
var NdcActionViewComponent = function (props) {
|
22045
22174
|
var _a;
|
22046
22175
|
var _b, _c;
|
22047
|
-
var useLocation = props.useLocation, onNavigateToNdcManagementView = props.onNavigateToNdcManagementView, translator = props.translator, sdgGoalImages = props.sdgGoalImages, Chart = props.Chart;
|
22176
|
+
var useUserContext = props.useUserContext, useConnection = props.useConnection, useLocation = props.useLocation, onNavigateToNdcManagementView = props.onNavigateToNdcManagementView, translator = props.translator, sdgGoalImages = props.sdgGoalImages, Chart = props.Chart;
|
22048
22177
|
translator.setDefaultNamespace("ndcAction");
|
22049
22178
|
var t = translator.t;
|
22050
22179
|
var userInfoState = useUserContext().userInfoState;
|
@@ -22543,13 +22672,13 @@ var NdcActionViewComponent = function (props) {
|
|
22543
22672
|
React.createElement(antd.Card, { className: "card-container" },
|
22544
22673
|
React.createElement("div", { className: "co-benifits-view" },
|
22545
22674
|
React.createElement("div", { className: "title" }, t("ndcAction:coBenefitsSubTitle")),
|
22546
|
-
React.createElement(CoBenifitsComponent, { viewOnly: true, coBenifitsViewDetails: (_c = state === null || state === void 0 ? void 0 : state.record) === null || _c === void 0 ? void 0 : _c.coBenefitsProperties, sdgGoalImages: sdgGoalImages, translator: translator })))))))));
|
22675
|
+
React.createElement(CoBenifitsComponent, { viewOnly: true, coBenifitsViewDetails: (_c = state === null || state === void 0 ? void 0 : state.record) === null || _c === void 0 ? void 0 : _c.coBenefitsProperties, sdgGoalImages: sdgGoalImages, useConnection: useConnection, translator: translator })))))))));
|
22547
22676
|
};
|
22548
22677
|
|
22549
22678
|
var css_248z$e = ".credit-transfer-management .certify-list {\n width: 110px;\n display: flex;\n align-items: center;\n flex-wrap: wrap; }\n .credit-transfer-management .certify-list .profile-icon {\n margin-bottom: 4px; }\n\n.credit-transfer-management .table-actions-section {\n margin-bottom: 0px; }\n .credit-transfer-management .table-actions-section input {\n font-family: \"Inter\";\n font-size: 0.8rem; }\n\n.credit-transfer-management .all-check {\n margin-right: 10px; }\n .credit-transfer-management .all-check .ant-checkbox-inner::after {\n background-color: rgba(58, 53, 65, 0.5); }\n .credit-transfer-management .all-check .ant-checkbox-checked .ant-checkbox-inner::after {\n background-color: transparent; }\n .credit-transfer-management .all-check .ant-checkbox-checked .ant-checkbox-inner {\n background-color: rgba(58, 53, 65, 0.5);\n border: none; }\n\n.credit-transfer-management .ant-checkbox-checked .ant-checkbox-input[value='Retired'] + .ant-checkbox-inner {\n background-color: rgba(58, 53, 65, 0.4);\n border: none; }\n\n.credit-transfer-management .ant-checkbox-checked .ant-checkbox-input[value='AwaitingAuthorization'] + .ant-checkbox-inner {\n background-color: rgba(237, 77, 71, 0.6);\n border: none; }\n\n.credit-transfer-management .ant-checkbox-checked .ant-checkbox-input[value='Rejected'] + .ant-checkbox-inner {\n background-color: rgba(58, 53, 65, 0.4);\n border: none; }\n\n.credit-transfer-management .ant-checkbox-checked .ant-checkbox-input[value='Issued'] + .ant-checkbox-inner {\n background-color: #16b1ff;\n border: none; }\n\n.credit-transfer-management .ant-checkbox-checked .ant-checkbox-input[value='Transferred'] + .ant-checkbox-inner {\n background-color: rgba(118, 195, 39, 0.6);\n border: none; }\n\n.credit-transfer-modal-container {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n margin: 2rem 0 0 0;\n width: 100%; }\n .credit-transfer-modal-container .icon-credit {\n margin-bottom: 15px; }\n .credit-transfer-modal-container .credit-transfer-details {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n width: 100%;\n margin-bottom: 10px; }\n .credit-transfer-modal-container .credit-transfer-details .content-credit-transfer {\n font-family: 'Inter' !important;\n font-style: normal;\n font-weight: 600;\n font-size: 0.9rem;\n line-height: 1.3rem;\n padding: 0 1rem 0 1rem;\n text-align: center;\n color: rgba(58, 53, 65, 0.8) !important; }\n .credit-transfer-modal-container .credit-transfer-details .sub-content-credit-transfer {\n font-family: 'Inter';\n font-style: normal;\n font-weight: 600;\n font-size: 0.8rem;\n line-height: 1.375rem;\n text-align: center;\n color: rgba(58, 53, 65, 0.5); }\n .credit-transfer-modal-container .remarks-credit-transfer {\n flex-direction: row;\n width: 100%;\n padding: 0.5rem 1rem 0 1rem; }\n .credit-transfer-modal-container .remarks-credit-transfer .modal-form .ant-form-item-explain-error {\n display: flex;\n flex-direction: row; }\n .credit-transfer-modal-container .remarks-credit-transfer .modal-form .ant-form {\n width: 100%; }\n .credit-transfer-modal-container .remarks-credit-transfer .modal-form .ant-form .ant-form-item-label > label {\n font-size: 0.8rem; }\n .credit-transfer-modal-container .remarks-credit-transfer .modal-form .modal-credit-transfer-btns {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n width: 100%;\n margin-top: 1rem; }\n .credit-transfer-modal-container .remarks-credit-transfer .modal-form .modal-credit-transfer-btns .center {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between; }\n .credit-transfer-modal-container .remarks-credit-transfer .modal-form .modal-credit-transfer-btns .width-60 {\n width: 60%; }\n\n.common-table-class .ant-table .ant-table-thead .ant-table-cell {\n font-size: 0.75rem;\n font-weight: 600; }\n";
|
22550
22679
|
styleInject(css_248z$e);
|
22551
22680
|
|
22552
|
-
var css_248z$d = ".credit-transfer-management .ant-checkbox-checked .ant-checkbox-input[value='Rejected'] + .ant-checkbox-inner {\n background-color: rgba(237, 77, 71, 0.6);\n border: none; }\n\n.credit-transfer-management .ant-checkbox-checked .ant-checkbox-input[value='Cancelled'] + .ant-checkbox-inner {\n background-color: rgba(58, 53, 65, 0.4);\n border: none; }\n\n.credit-transfer-management .ant-checkbox-checked .ant-checkbox-input[value='Accepted'] + .ant-checkbox-inner {\n background-color: #16b1ff;\n border: none; }\n\n.credit-transfer-management .ant-checkbox-checked .ant-checkbox-input[value='Pending'] + .ant-checkbox-inner {\n background-color: rgba(118, 195, 39, 0.6);\n border: none; }\n\n.credit-transfer-management .ant-checkbox-checked .ant-checkbox-input[value='Recognised'] + .ant-checkbox-inner {\n background-color: #976ed7;\n border: none; }\n\n.credit-transfer-management .ant-checkbox-checked .ant-checkbox-input[value='NotRecognised'] + .ant-checkbox-inner {\n background-color: #ffa070;\n border: none; }\n\n.credit-transfer-management .transfer-freeze-icon {\n float: right; }\n .credit-transfer-management .transfer-freeze-icon .pause-circle {\n color: rgba(255, 77, 79, 0.8); }\n .credit-transfer-management .transfer-freeze-icon .play-circle {\n color: rgba(118, 195, 39, 0.6); }\n";
|
22681
|
+
var css_248z$d = ".credit-transfer-management .ant-checkbox-checked .ant-checkbox-input[value='Rejected'] + .ant-checkbox-inner {\n background-color: rgba(237, 77, 71, 0.6);\n border: none; }\n\n.credit-transfer-management .ant-checkbox-checked .ant-checkbox-input[value='Cancelled'] + .ant-checkbox-inner {\n background-color: rgba(58, 53, 65, 0.4);\n border: none; }\n\n.credit-transfer-management .ant-checkbox-checked .ant-checkbox-input[value='Accepted'] + .ant-checkbox-inner {\n background-color: #16b1ff;\n border: none; }\n\n.credit-transfer-management .ant-checkbox-checked .ant-checkbox-input[value='Pending'] + .ant-checkbox-inner {\n background-color: rgba(118, 195, 39, 0.6);\n border: none; }\n\n.credit-transfer-management .ant-checkbox-checked .ant-checkbox-input[value='Recognised'] + .ant-checkbox-inner {\n background-color: #976ed7;\n border: none; }\n\n.credit-transfer-management .ant-checkbox-checked .ant-checkbox-input[value='NotRecognised'] + .ant-checkbox-inner {\n background-color: #ffa070;\n border: none; }\n\n.credit-transfer-management .ministry-level-filter-checkbox {\n margin-left: 0px !important; }\n\n.credit-transfer-management .transfer-freeze-icon {\n float: right; }\n .credit-transfer-management .transfer-freeze-icon .pause-circle {\n color: rgba(255, 77, 79, 0.8); }\n .credit-transfer-management .transfer-freeze-icon .play-circle {\n color: rgba(118, 195, 39, 0.6); }\n";
|
22553
22682
|
styleInject(css_248z$d);
|
22554
22683
|
|
22555
22684
|
function n(){return (n=Object.assign?Object.assign.bind():function(a){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(a[e]=t[e]);}return a}).apply(this,arguments)}function t(a,n){if(null==a)return {};var t,e,r={},s=Object.keys(a);for(e=0;e<s.length;e++)n.indexOf(t=s[e])>=0||(r[t]=a[t]);return r}var e={ac:!0,ad:!0,ae:!0,af:!0,afar:!0,ag:!0,ai:!0,al:!0,am:!0,ao:!0,aq:!0,ar:!0,as:!0,at:!0,au:!0,"au-aboriginal":!0,"au-act":!0,"au-nsw":!0,"au-nt":!0,"au-qld":!0,"au-tas":!0,"au-vic":!0,"au-wa":!0,aw:!0,ax:!0,az:!0,ba:!0,bb:!0,bd:!0,be:!0,bf:!0,bg:!0,bh:!0,bi:!0,bj:!0,bl:!0,bm:!0,bn:!0,bo:!0,"bq-bo":!0,"bq-sa":!0,"bq-se":!0,bq:!0,br:!0,bs:!0,bt:!0,bv:!0,bw:!0,by:!0,bz:!0,"ca-bc":!0,ca:!0,cc:!0,cd:!0,cf:!0,cg:!0,"ch-gr":!0,ch:!0,ci:!0,ck:!0,cl:!0,cm:!0,"cn-xj":!0,cn:!0,co:!0,cp:!0,cq:!0,cr:!0,cu:!0,cv:!0,cw:!0,cx:!0,cy:!0,cz:!0,de:!0,dg:!0,dj:!0,dk:!0,dm:!0,do:!0,dz:!0,ea:!0,earth:!0,east_african_federation:!0,easter_island:!0,"ec-w":!0,ec:!0,ee:!0,eg:!0,eh:!0,er:!0,"es-ar":!0,"es-ce":!0,"es-cn":!0,"es-ct":!0,"es-ga":!0,"es-ib":!0,"es-ml":!0,"es-pv":!0,"es-variant":!0,es:!0,"et-or":!0,"et-ti":!0,et:!0,eu:!0,european_union:!0,ewe:!0,fi:!0,fj:!0,fk:!0,fm:!0,fo:!0,"fr-20r":!0,"fr-bre":!0,"fr-cp":!0,fr:!0,fx:!0,ga:!0,"gb-con":!0,"gb-eng":!0,"gb-nir":!0,"gb-ork":!0,"gb-sct":!0,"gb-wls":!0,gb:!0,gd:!0,"ge-ab":!0,ge:!0,gf:!0,gg:!0,gh:!0,gi:!0,gl:!0,gm:!0,gn:!0,gp:!0,gq:!0,gr:!0,gs:!0,gt:!0,gu:!0,guarani:!0,gw:!0,gy:!0,hausa:!0,hk:!0,hm:!0,hmong:!0,hn:!0,hr:!0,ht:!0,hu:!0,ic:!0,id:!0,"id-jb":!0,"id-jt":!0,ie:!0,il:!0,im:!0,"in-as":!0,"in-gj":!0,"in-ka":!0,"in-or":!0,"in-tn":!0,in:!0,io:!0,iq:!0,ir:!0,is:!0,"it-23":!0,"it-82":!0,"it-88":!0,it:!0,je:!0,jm:!0,jo:!0,jp:!0,kanuri:!0,ke:!0,kg:!0,kh:!0,ki:!0,kikuyu:!0,km:!0,kn:!0,kongo:!0,kp:!0,kr:!0,kurdistan:!0,kw:!0,ky:!0,kz:!0,la:!0,lb:!0,lc:!0,li:!0,lk:!0,lr:!0,ls:!0,lt:!0,lu:!0,lv:!0,ly:!0,ma:!0,malayali:!0,manipur:!0,maori:!0,mc:!0,md:!0,me:!0,mf:!0,mg:!0,mh:!0,mizoram:!0,mk:!0,ml:!0,mm:!0,mn:!0,mo:!0,mp:!0,mq:!0,mr:!0,ms:!0,mt:!0,mu:!0,mv:!0,mw:!0,mx:!0,my:!0,mz:!0,na:!0,nato:!0,nc:!0,ne:!0,nf:!0,ng:!0,ni:!0,"nl-fr":!0,nl:!0,no:!0,northern_cyprus:!0,np:!0,nr:!0,nu:!0,nz:!0,occitania:!0,olympics:!0,om:!0,otomi:!0,pa:!0,pe:!0,pf:!0,pg:!0,ph:!0,"pk-jk":!0,"pk-sd":!0,pk:!0,pl:!0,pm:!0,pn:!0,pr:!0,ps:!0,"pt-20":!0,"pt-30":!0,pt:!0,pw:!0,py:!0,qa:!0,quechua:!0,re:!0,ro:!0,rs:!0,ru:!0,"ru-ba":!0,"ru-ce":!0,"ru-cu":!0,"ru-da":!0,"ru-ko":!0,"ru-ta":!0,"ru-ud":!0,rw:!0,sa:!0,sami:!0,sb:!0,sc:!0,sd:!0,se:!0,sg:!0,"sh-ac":!0,"sh-hl":!0,"sh-ta":!0,sh:!0,si:!0,sj:!0,sk:!0,sl:!0,sm:!0,sn:!0,so:!0,somaliland:!0,south_ossetia:!0,soviet_union:!0,sr:!0,ss:!0,st:!0,su:!0,sv:!0,sx:!0,sy:!0,sz:!0,ta:!0,tc:!0,td:!0,tf:!0,tg:!0,th:!0,tibet:!0,tj:!0,tk:!0,tl:!0,tm:!0,tn:!0,to:!0,torres_strait_islands:!0,tr:!0,transnistria:!0,tt:!0,tv:!0,tw:!0,tz:!0,ua:!0,ug:!0,uk:!0,um:!0,un:!0,united_nations:!0,"us-hi":!0,us:!0,uy:!0,uz:!0,va:!0,vc:!0,ve:!0,vg:!0,vi:!0,vn:!0,vu:!0,wf:!0,wiphala:!0,ws:!0,xk:!0,xx:!0,ye:!0,yorubaland:!0,yt:!0,za:!0,zm:!0,zw:!0},s=["countryCode","cdnUrl"],c=function(a,t,e,r){return void 0===r&&(r=""),n({},e,{title:e.title||a,height:e.height||100,src:""+(t||"https://hatscripts.github.io/circle-flags/flags/")+r+a+".svg"})},u=function(r){var i=r.countryCode,u=r.cdnUrl,o=t(r,s);return React.createElement("img",n({"data-testid":"circle-country-flag"},c(function(a){return e[a]?a:"xx"}(i).toLowerCase(),u,o)))};
|
@@ -22696,7 +22825,7 @@ var TransferActionModel = function (props) {
|
|
22696
22825
|
};
|
22697
22826
|
|
22698
22827
|
var CreditTransferComponent = function (props) {
|
22699
|
-
var translator = props.translator, onNavigateToProgrammeView = props.onNavigateToProgrammeView;
|
22828
|
+
var useConnection = props.useConnection, useUserContext = props.useUserContext, useSettingsContext = props.useSettingsContext, translator = props.translator, onNavigateToProgrammeView = props.onNavigateToProgrammeView;
|
22700
22829
|
var userInfoState = useUserContext().userInfoState;
|
22701
22830
|
var t = translator.t;
|
22702
22831
|
var statusOptions = Object.keys(exports.CreditTransferStage).map(function (k, index) { return ({
|
@@ -22728,6 +22857,7 @@ var CreditTransferComponent = function (props) {
|
|
22728
22857
|
var _y = useSettingsContext(), isTransferFrozen = _y.isTransferFrozen, setTransferFrozen = _y.setTransferFrozen;
|
22729
22858
|
var _z = React.useState([]), ministrySectoralScope = _z[0], setMinistrySectoralScope = _z[1];
|
22730
22859
|
var _0 = React.useState(false), ministryLevelFilter = _0[0], setMinistryLevelFilter = _0[1];
|
22860
|
+
var _1 = React.useState(), dataQuery = _1[0], setDataQuery = _1[1];
|
22731
22861
|
var onStatusQuery = function (checkedValues) { return __awaiter(void 0, void 0, void 0, function () {
|
22732
22862
|
return __generator(this, function (_a) {
|
22733
22863
|
console.log(checkedValues);
|
@@ -22831,6 +22961,12 @@ var CreditTransferComponent = function (props) {
|
|
22831
22961
|
console.log(response);
|
22832
22962
|
setTableData(response.data);
|
22833
22963
|
setTotalProgramme(response.response.data.total);
|
22964
|
+
setDataQuery({
|
22965
|
+
filterAnd: filter,
|
22966
|
+
filterOr: dataFilter,
|
22967
|
+
sort: sort,
|
22968
|
+
filterBy: filterBy,
|
22969
|
+
});
|
22834
22970
|
setLoading(false);
|
22835
22971
|
return [3 /*break*/, 4];
|
22836
22972
|
case 3:
|
@@ -22848,8 +22984,53 @@ var CreditTransferComponent = function (props) {
|
|
22848
22984
|
}
|
22849
22985
|
});
|
22850
22986
|
}); };
|
22987
|
+
var downloadTransferData = function () { return __awaiter(void 0, void 0, void 0, function () {
|
22988
|
+
var response, url, a, error_2;
|
22989
|
+
var _a;
|
22990
|
+
return __generator(this, function (_b) {
|
22991
|
+
switch (_b.label) {
|
22992
|
+
case 0:
|
22993
|
+
setLoading(true);
|
22994
|
+
_b.label = 1;
|
22995
|
+
case 1:
|
22996
|
+
_b.trys.push([1, 3, , 4]);
|
22997
|
+
return [4 /*yield*/, post("national/programme/transfers/download", {
|
22998
|
+
filterAnd: dataQuery.filterAnd,
|
22999
|
+
filterOr: ((_a = dataQuery.filterOr) === null || _a === void 0 ? void 0 : _a.length) > 0 ? dataQuery.filterOr : undefined,
|
23000
|
+
sort: dataQuery.sort,
|
23001
|
+
filterBy: dataQuery.filterBy,
|
23002
|
+
})];
|
23003
|
+
case 2:
|
23004
|
+
response = _b.sent();
|
23005
|
+
if (response && response.data) {
|
23006
|
+
url = response.data.url;
|
23007
|
+
a = document.createElement('a');
|
23008
|
+
a.href = url;
|
23009
|
+
a.download = response.data.csvFile; // Specify the filename for the downloaded file
|
23010
|
+
document.body.appendChild(a);
|
23011
|
+
a.click();
|
23012
|
+
document.body.removeChild(a); // Clean up the created <a> element
|
23013
|
+
window.URL.revokeObjectURL(url);
|
23014
|
+
}
|
23015
|
+
setLoading(false);
|
23016
|
+
return [3 /*break*/, 4];
|
23017
|
+
case 3:
|
23018
|
+
error_2 = _b.sent();
|
23019
|
+
console.log("Error in exporting transfers", error_2);
|
23020
|
+
antd.message.open({
|
23021
|
+
type: "error",
|
23022
|
+
content: error_2.message,
|
23023
|
+
duration: 3,
|
23024
|
+
style: { textAlign: "right", marginRight: 15, marginTop: 10 },
|
23025
|
+
});
|
23026
|
+
setLoading(false);
|
23027
|
+
return [3 /*break*/, 4];
|
23028
|
+
case 4: return [2 /*return*/];
|
23029
|
+
}
|
23030
|
+
});
|
23031
|
+
}); };
|
22851
23032
|
var getUserDetails = function () { return __awaiter(void 0, void 0, void 0, function () {
|
22852
|
-
var response,
|
23033
|
+
var response, error_3;
|
22853
23034
|
var _a, _b, _c, _d, _e, _f;
|
22854
23035
|
return __generator(this, function (_g) {
|
22855
23036
|
switch (_g.label) {
|
@@ -22881,8 +23062,8 @@ var CreditTransferComponent = function (props) {
|
|
22881
23062
|
setLoading(false);
|
22882
23063
|
return [3 /*break*/, 4];
|
22883
23064
|
case 3:
|
22884
|
-
|
22885
|
-
console.log("Error in getting users",
|
23065
|
+
error_3 = _g.sent();
|
23066
|
+
console.log("Error in getting users", error_3);
|
22886
23067
|
setLoading(false);
|
22887
23068
|
return [3 /*break*/, 4];
|
22888
23069
|
case 4: return [2 /*return*/];
|
@@ -22906,7 +23087,7 @@ var CreditTransferComponent = function (props) {
|
|
22906
23087
|
}
|
22907
23088
|
}, []);
|
22908
23089
|
var handleRequestOk = function (reqId, remarks, endpoint, successText, isRetire) { return __awaiter(void 0, void 0, void 0, function () {
|
22909
|
-
var response, successMsg,
|
23090
|
+
var response, successMsg, error_4;
|
22910
23091
|
return __generator(this, function (_a) {
|
22911
23092
|
switch (_a.label) {
|
22912
23093
|
case 0:
|
@@ -22936,10 +23117,10 @@ var CreditTransferComponent = function (props) {
|
|
22936
23117
|
setModalVisible(false);
|
22937
23118
|
return [3 /*break*/, 4];
|
22938
23119
|
case 3:
|
22939
|
-
|
22940
|
-
console.log("Error in Cancelling transfer request",
|
23120
|
+
error_4 = _a.sent();
|
23121
|
+
console.log("Error in Cancelling transfer request", error_4);
|
22941
23122
|
setLoading(false);
|
22942
|
-
return [2 /*return*/,
|
23123
|
+
return [2 /*return*/, error_4.message];
|
22943
23124
|
case 4: return [2 /*return*/];
|
22944
23125
|
}
|
22945
23126
|
});
|
@@ -23288,7 +23469,7 @@ var CreditTransferComponent = function (props) {
|
|
23288
23469
|
]
|
23289
23470
|
: undefined);
|
23290
23471
|
} }, t("view:seeMine")),
|
23291
|
-
(userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.MINISTRY && (React.createElement(antd.Checkbox, { className: "label", onChange: function (v) {
|
23472
|
+
(userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.MINISTRY && (React.createElement(antd.Checkbox, { className: "label ministry-level-filter-checkbox", onChange: function (v) {
|
23292
23473
|
if (v.target.checked) {
|
23293
23474
|
setMinistryLevelFilter(true);
|
23294
23475
|
}
|
@@ -23301,7 +23482,13 @@ var CreditTransferComponent = function (props) {
|
|
23301
23482
|
return e.target.value === ""
|
23302
23483
|
? setSearch(e.target.value)
|
23303
23484
|
: setSearchText(e.target.value);
|
23304
|
-
}, onSearch: setSearch, style: { width: 265 } }))
|
23485
|
+
}, onSearch: setSearch, style: { width: 265 } })),
|
23486
|
+
React.createElement("div", { className: "download-data-btn" },
|
23487
|
+
React.createElement("a", { onClick: downloadTransferData },
|
23488
|
+
React.createElement(icons.DownloadOutlined, { style: {
|
23489
|
+
color: "rgba(58, 53, 65, 0.3)",
|
23490
|
+
fontSize: "20px",
|
23491
|
+
} })))))),
|
23305
23492
|
React.createElement(antd.Row, null,
|
23306
23493
|
React.createElement(antd.Col, { span: 24 },
|
23307
23494
|
React.createElement("div", { className: "programmeManagement-table-container" },
|
@@ -23631,8 +23818,8 @@ var MapStatsComponent = function (props) {
|
|
23631
23818
|
|
23632
23819
|
var RangePicker$2 = antd.DatePicker.RangePicker;
|
23633
23820
|
var MrvDashboardComponent = function (props) {
|
23634
|
-
var Link = props.Link, Chart = props.Chart, t = props.t, ButtonGroup = props.ButtonGroup, _a = props.isMultipleDashboardsVisible, isMultipleDashboardsVisible = _a === void 0 ? false : _a;
|
23635
|
-
var _b = useConnection(); _b.get; var post = _b.post; _b.delete;
|
23821
|
+
var useConnection = props.useConnection, useUserContext = props.useUserContext, Link = props.Link, Chart = props.Chart, t = props.t, ButtonGroup = props.ButtonGroup, _a = props.isMultipleDashboardsVisible, isMultipleDashboardsVisible = _a === void 0 ? false : _a;
|
23822
|
+
var _b = useConnection(); _b.get; var post = _b.post; _b.delete;
|
23636
23823
|
var _c = React.useState({}), data = _c[0], setData = _c[1];
|
23637
23824
|
var _e = React.useState(false), loading = _e[0], setLoading = _e[1];
|
23638
23825
|
var userInfoState = useUserContext().userInfoState;
|
@@ -24115,7 +24302,7 @@ var MrvDashboardComponent = function (props) {
|
|
24115
24302
|
_e.label = 1;
|
24116
24303
|
case 1:
|
24117
24304
|
_e.trys.push([1, 3, 4, 5]);
|
24118
|
-
return [4 /*yield*/, post("stats/programme/agg", genPayload(), undefined,
|
24305
|
+
return [4 /*yield*/, post("stats/programme/agg", genPayload(), undefined, process.env.REACT_APP_STAT_URL)];
|
24119
24306
|
case 2:
|
24120
24307
|
response = _e.sent();
|
24121
24308
|
console.log("Response", response);
|
@@ -25366,8 +25553,8 @@ var RegistryBarChartsStatComponent = function (props) {
|
|
25366
25553
|
|
25367
25554
|
var RangePicker$1 = antd.DatePicker.RangePicker;
|
25368
25555
|
var RegistryDashboardComponent = function (props) {
|
25369
|
-
var Chart = props.Chart, t = props.t, ButtonGroup = props.ButtonGroup, Link = props.Link, _a = props.isMultipleDashboardsVisible, isMultipleDashboardsVisible = _a === void 0 ? false : _a;
|
25370
|
-
var _b = useConnection(); _b.get; var post = _b.post; _b.delete;
|
25556
|
+
var useUserContext = props.useUserContext, useConnection = props.useConnection, Chart = props.Chart, t = props.t, ButtonGroup = props.ButtonGroup, Link = props.Link, _a = props.isMultipleDashboardsVisible, isMultipleDashboardsVisible = _a === void 0 ? false : _a;
|
25557
|
+
var _b = useConnection(); _b.get; var post = _b.post; _b.delete;
|
25371
25558
|
var userInfoState = useUserContext().userInfoState;
|
25372
25559
|
var _c = React.useState(false), loadingWithoutTimeRange = _c[0], setLoadingWithoutTimeRange = _c[1];
|
25373
25560
|
var _e = React.useState(false), loading = _e[0], setLoading = _e[1];
|
@@ -25814,7 +26001,7 @@ var RegistryDashboardComponent = function (props) {
|
|
25814
26001
|
_253.label = 1;
|
25815
26002
|
case 1:
|
25816
26003
|
_253.trys.push([1, 3, 4, 5]);
|
25817
|
-
return [4 /*yield*/, post("stats/programme/agg", getAllChartsParams(), undefined,
|
26004
|
+
return [4 /*yield*/, post("stats/programme/agg", getAllChartsParams(), undefined, process.env.REACT_APP_STAT_URL)];
|
25818
26005
|
case 2:
|
25819
26006
|
response = _253.sent();
|
25820
26007
|
totalCreditsCertifiedStats = void 0;
|
@@ -26091,7 +26278,7 @@ var RegistryDashboardComponent = function (props) {
|
|
26091
26278
|
_77.label = 1;
|
26092
26279
|
case 1:
|
26093
26280
|
_77.trys.push([1, 3, 4, 5]);
|
26094
|
-
return [4 /*yield*/, post("stats/programme/agg", getAllProgrammeAnalyticsStatsParamsWithoutTimeRange(), undefined,
|
26281
|
+
return [4 /*yield*/, post("stats/programme/agg", getAllProgrammeAnalyticsStatsParamsWithoutTimeRange(), undefined, process.env.REACT_APP_STAT_URL)];
|
26095
26282
|
case 2:
|
26096
26283
|
response = _77.sent();
|
26097
26284
|
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;
|
@@ -26184,7 +26371,7 @@ var RegistryDashboardComponent = function (props) {
|
|
26184
26371
|
_188.label = 1;
|
26185
26372
|
case 1:
|
26186
26373
|
_188.trys.push([1, 3, 4, 5]);
|
26187
|
-
return [4 /*yield*/, post("stats/programme/agg", getAllProgrammeAnalyticsStatsParams(), undefined,
|
26374
|
+
return [4 /*yield*/, post("stats/programme/agg", getAllProgrammeAnalyticsStatsParams(), undefined, process.env.REACT_APP_STAT_URL)];
|
26188
26375
|
case 2:
|
26189
26376
|
response = _188.sent();
|
26190
26377
|
programmeByStatusAuthAggregationResponse = void 0;
|
@@ -27087,7 +27274,21 @@ var EditableCell = function (_a) {
|
|
27087
27274
|
}); },
|
27088
27275
|
},
|
27089
27276
|
] },
|
27090
|
-
React.createElement(antd.Input, { onBlur: function () { return onBlurHandler(record); }, placeholder: t("ndc:nationalPlanObjectivePlaceHolder") }))) : editing && dataIndex === "
|
27277
|
+
React.createElement(antd.Input, { onBlur: function () { return onBlurHandler(record); }, placeholder: t("ndc:nationalPlanObjectivePlaceHolder") }))) : editing && dataIndex === "kpiUnit" ? (React.createElement(antd.Form.Item, { name: dataIndex, style: { margin: 0 }, rules: [
|
27278
|
+
{
|
27279
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
27280
|
+
var trimValue;
|
27281
|
+
return __generator(this, function (_a) {
|
27282
|
+
trimValue = typeof value === "string" ? value.trim() : value;
|
27283
|
+
if (!trimValue) {
|
27284
|
+
throw new Error("".concat(title, " ").concat(t("ndc:isRequired")));
|
27285
|
+
}
|
27286
|
+
return [2 /*return*/];
|
27287
|
+
});
|
27288
|
+
}); },
|
27289
|
+
},
|
27290
|
+
] },
|
27291
|
+
React.createElement(antd.Input, { onBlur: function () { return onBlurHandler(record); }, placeholder: t("ndc:kpiUnitPlaceHolder") }))) : editing && dataIndex === "kpi" ? (React.createElement(antd.Form.Item, { name: dataIndex, style: { margin: 0 }, rules: [
|
27091
27292
|
{
|
27092
27293
|
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
27093
27294
|
var trimValue;
|
@@ -27151,7 +27352,7 @@ var getNdcActionStatusTagType = function (status) {
|
|
27151
27352
|
};
|
27152
27353
|
|
27153
27354
|
var NdcDetailsComponent = function (props) {
|
27154
|
-
var t = props.t;
|
27355
|
+
var t = props.t, useConnection = props.useConnection, useUserContext = props.useUserContext;
|
27155
27356
|
var RangePicker = antd.DatePicker.RangePicker;
|
27156
27357
|
var _a = React.useState([]), ndcActionsList = _a[0], setNdcActionsList = _a[1];
|
27157
27358
|
var _b = React.useState(false), loading = _b[0], setLoading = _b[1];
|
@@ -27194,11 +27395,13 @@ var NdcDetailsComponent = function (props) {
|
|
27194
27395
|
: undefined;
|
27195
27396
|
var isGovernmentUser = (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT &&
|
27196
27397
|
(userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) !== exports.Role.ViewOnly;
|
27197
|
-
var isMainNdcActionsEditable =
|
27398
|
+
var isMainNdcActionsEditable = selectedPeriod &&
|
27399
|
+
!selectedPeriod.finalized &&
|
27198
27400
|
(userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT &&
|
27199
27401
|
(userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) !== exports.Role.ViewOnly;
|
27200
27402
|
var isSubNdcActionsEditable = function (record) {
|
27201
|
-
return (
|
27403
|
+
return (selectedPeriod &&
|
27404
|
+
!selectedPeriod.finalized &&
|
27202
27405
|
record.status !== NdcDetailsActionStatus.Approved &&
|
27203
27406
|
((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT ||
|
27204
27407
|
((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.MINISTRY &&
|
@@ -27206,7 +27409,8 @@ var NdcDetailsComponent = function (props) {
|
|
27206
27409
|
(userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) !== exports.Role.ViewOnly);
|
27207
27410
|
};
|
27208
27411
|
var checkSubNdcActionCreatePermission = function () {
|
27209
|
-
return (
|
27412
|
+
return (selectedPeriod &&
|
27413
|
+
!selectedPeriod.finalized &&
|
27210
27414
|
((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT ||
|
27211
27415
|
(userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.MINISTRY) &&
|
27212
27416
|
(userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) !== exports.Role.ViewOnly);
|
@@ -27219,7 +27423,7 @@ var NdcDetailsComponent = function (props) {
|
|
27219
27423
|
return isSubNdcActionsEditable(record);
|
27220
27424
|
}
|
27221
27425
|
};
|
27222
|
-
var ndcMainDetailsForPeriod = selectedPeriod.key !== "add_new"
|
27426
|
+
var ndcMainDetailsForPeriod = selectedPeriod && selectedPeriod.key !== "add_new"
|
27223
27427
|
? ndcActionsList.filter(function (ndcDetail) {
|
27224
27428
|
return (ndcDetail.periodId === parseInt(selectedPeriod.key) &&
|
27225
27429
|
ndcDetail.actionType === NdcDetailsActionType.MainAction);
|
@@ -27235,6 +27439,7 @@ var NdcDetailsComponent = function (props) {
|
|
27235
27439
|
actionType: NdcDetailsActionType.SubAction,
|
27236
27440
|
nationalPlanObjective: "",
|
27237
27441
|
kpi: "",
|
27442
|
+
kpiUnit: "",
|
27238
27443
|
ministryName: loginMinistry,
|
27239
27444
|
status: NdcDetailsActionStatus.New,
|
27240
27445
|
parentActionId: mainActionId,
|
@@ -27246,6 +27451,7 @@ var NdcDetailsComponent = function (props) {
|
|
27246
27451
|
form.setFieldsValue({
|
27247
27452
|
nationalPlanObjective: "",
|
27248
27453
|
kpi: "",
|
27454
|
+
kpiUnit: "",
|
27249
27455
|
});
|
27250
27456
|
}
|
27251
27457
|
setSubNdcActionsForPeriod(subNdcDetails);
|
@@ -27287,6 +27493,7 @@ var NdcDetailsComponent = function (props) {
|
|
27287
27493
|
return [2 /*return*/];
|
27288
27494
|
}
|
27289
27495
|
else if (updatedFields.kpi === row.kpi &&
|
27496
|
+
updatedFields.kpiUnit === row.kpiUnit &&
|
27290
27497
|
updatedFields.nationalPlanObjective === row.nationalPlanObjective) {
|
27291
27498
|
ClearEditMode();
|
27292
27499
|
return [2 /*return*/];
|
@@ -27300,13 +27507,13 @@ var NdcDetailsComponent = function (props) {
|
|
27300
27507
|
else {
|
27301
27508
|
updatedItem.status = NdcDetailsActionStatus.Pending;
|
27302
27509
|
}
|
27303
|
-
return [4 /*yield*/, post("national/programme/addNdcDetailsAction", __assign(__assign({}, updatedItem), { kpi:
|
27510
|
+
return [4 /*yield*/, post("national/programme/addNdcDetailsAction", __assign(__assign({}, updatedItem), { kpi: parseFloat(updatedItem.kpi.toString()) }))];
|
27304
27511
|
case 5:
|
27305
27512
|
_a.sent();
|
27306
27513
|
return [3 /*break*/, 8];
|
27307
27514
|
case 6:
|
27308
27515
|
updatedItem.status = NdcDetailsActionStatus.Pending;
|
27309
|
-
return [4 /*yield*/, put("national/programme/updateNdcDetailsAction", __assign(__assign({}, updatedItem), { kpi:
|
27516
|
+
return [4 /*yield*/, put("national/programme/updateNdcDetailsAction", __assign(__assign({}, updatedItem), { kpi: parseFloat(updatedItem.kpi.toString()) }))];
|
27310
27517
|
case 7:
|
27311
27518
|
_a.sent();
|
27312
27519
|
_a.label = 8;
|
@@ -27331,6 +27538,7 @@ var NdcDetailsComponent = function (props) {
|
|
27331
27538
|
var actionMenu = function (record) {
|
27332
27539
|
if (record.status === NdcDetailsActionStatus.Pending &&
|
27333
27540
|
isGovernmentUser &&
|
27541
|
+
selectedPeriod &&
|
27334
27542
|
!selectedPeriod.finalized) {
|
27335
27543
|
return (React.createElement(antd.List, { className: "action-menu", size: "small", dataSource: [
|
27336
27544
|
{
|
@@ -27390,7 +27598,17 @@ var NdcDetailsComponent = function (props) {
|
|
27390
27598
|
width: 100,
|
27391
27599
|
editable: true,
|
27392
27600
|
render: function (_, record) { return (React.createElement(antd.Space, { size: "middle" }, record.kpi ? (React.createElement(antd.Tooltip, { title: isNdcActionEditable(record) ? "" : t("ndc:ndcUnauthorisedMsg") },
|
27393
|
-
React.createElement("span", null, record.kpi))) : (React.createElement(antd.Input, { placeholder: "
|
27601
|
+
React.createElement("span", null, record.kpi))) : (React.createElement(antd.Input, { placeholder: t("ndc:kpiPlaceHolder") })))); },
|
27602
|
+
},
|
27603
|
+
{
|
27604
|
+
title: t("ndc:ndcColumnsKpiUnit"),
|
27605
|
+
dataIndex: "kpiUnit",
|
27606
|
+
key: "kpiUnit",
|
27607
|
+
align: "left",
|
27608
|
+
width: 100,
|
27609
|
+
editable: true,
|
27610
|
+
render: function (_, record) { return (React.createElement(antd.Space, { size: "middle" }, record.kpiUnit ? (React.createElement(antd.Tooltip, { title: isNdcActionEditable(record) ? "" : t("ndc:ndcUnauthorisedMsg") },
|
27611
|
+
React.createElement("span", null, record.kpiUnit))) : (React.createElement(antd.Input, { placeholder: t("ndc:kpiUnitPlaceHolder") })))); },
|
27394
27612
|
},
|
27395
27613
|
{
|
27396
27614
|
title: t("ndc:ndcColumnsMinistry"),
|
@@ -27454,6 +27672,7 @@ var NdcDetailsComponent = function (props) {
|
|
27454
27672
|
form.setFieldsValue({
|
27455
27673
|
nationalPlanObjective: "",
|
27456
27674
|
kpi: "",
|
27675
|
+
kpiUnit: "",
|
27457
27676
|
});
|
27458
27677
|
periodId = parseInt(selectedPeriod.key);
|
27459
27678
|
newData_1 = {
|
@@ -27461,6 +27680,7 @@ var NdcDetailsComponent = function (props) {
|
|
27461
27680
|
actionType: NdcDetailsActionType.MainAction,
|
27462
27681
|
nationalPlanObjective: "",
|
27463
27682
|
kpi: "",
|
27683
|
+
kpiUnit: "",
|
27464
27684
|
ministryName: loginMinistry,
|
27465
27685
|
periodId: periodId,
|
27466
27686
|
status: NdcDetailsActionStatus.New,
|
@@ -27599,10 +27819,11 @@ var NdcDetailsComponent = function (props) {
|
|
27599
27819
|
};
|
27600
27820
|
}, footer: function () {
|
27601
27821
|
return isGovernmentUser &&
|
27822
|
+
selectedPeriod &&
|
27602
27823
|
!selectedPeriod.finalized && (React.createElement(antd.Row, { justify: "center" },
|
27603
27824
|
React.createElement(antd.Button, { className: "btnAddNewMainAct", disabled: isMainActionInEditMode(), onClick: onClickedAddNewNdcDetail, type: "default" }, t("ndc:addNdcAction"))));
|
27604
27825
|
} })))),
|
27605
|
-
isGovernmentUser && !selectedPeriod.finalized ? (React.createElement(antd.Row, { justify: "end" }, isMainActionInEditMode() ? (React.createElement(React.Fragment, null,
|
27826
|
+
isGovernmentUser && selectedPeriod && !selectedPeriod.finalized ? (React.createElement(antd.Row, { justify: "end" }, isMainActionInEditMode() ? (React.createElement(React.Fragment, null,
|
27606
27827
|
React.createElement(antd.Button, { className: "mg-left-1", disabled: true }, t("ndc:delete")),
|
27607
27828
|
React.createElement(antd.Button, { className: "mg-left-1", disabled: true }, t("ndc:finalize")))) : (React.createElement(React.Fragment, null,
|
27608
27829
|
React.createElement(antd.Button, { className: "mg-left-1 btn-danger", onClick: onClickedDeletePeriod, htmlType: "submit", loading: loading }, t("ndc:delete")),
|
@@ -27950,10 +28171,12 @@ var NdcDetailsComponent = function (props) {
|
|
27950
28171
|
React.createElement("div", { className: "body-title" }, t("ndc:ndcTitle")),
|
27951
28172
|
React.createElement("div", { className: "body-sub-title" }, t("ndc:ndcSubTitle"))))),
|
27952
28173
|
React.createElement("div", null,
|
27953
|
-
React.createElement(antd.Tabs, { centered: false, defaultActiveKey: "1", items: periodItems, activeKey: selectedPeriod.key, onChange: onTabChange })),
|
27954
|
-
React.createElement("div", null, selectedPeriod
|
27955
|
-
?
|
27956
|
-
|
28174
|
+
React.createElement(antd.Tabs, { centered: false, defaultActiveKey: "1", items: periodItems, activeKey: selectedPeriod ? selectedPeriod.key : "1", onChange: onTabChange })),
|
28175
|
+
React.createElement("div", null, selectedPeriod
|
28176
|
+
? selectedPeriod.key === "add_new"
|
28177
|
+
? addNewPeriodContent()
|
28178
|
+
: mainNdcActionTableContent()
|
28179
|
+
: ""),
|
27957
28180
|
React.createElement(UserActionConfirmationModel, { t: t, actionInfo: actionInfo, onActionConfirmed: onActionConfirmed, onActionCanceled: onActionCanceled, openModal: openConfirmationModal, errorMsg: "", loading: loading })));
|
27958
28181
|
};
|
27959
28182
|
|
@@ -28126,7 +28349,7 @@ var ProgrammeIssueForm = function (props) {
|
|
28126
28349
|
};
|
28127
28350
|
|
28128
28351
|
var ProgrammeRetireForm = function (props) {
|
28129
|
-
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;
|
28352
|
+
var programme = props.programme, onFinish = props.onFinish, onCancel = props.onCancel, actionBtnText = props.actionBtnText, subText = props.subText, hideType = props.hideType, myCompanyId = props.myCompanyId, translator = props.translator, useConnection = props.useConnection;
|
28130
28353
|
var t = translator.t;
|
28131
28354
|
var _a = React.useState(undefined), popupError = _a[0], setPopupError = _a[1];
|
28132
28355
|
var _b = React.useState(false), loading = _b[0], setLoading = _b[1];
|
@@ -28502,7 +28725,7 @@ var ProgrammeRevokeForm = function (props) {
|
|
28502
28725
|
};
|
28503
28726
|
|
28504
28727
|
var ProgrammeTransferForm = function (props) {
|
28505
|
-
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;
|
28728
|
+
var programme = props.programme, onFinish = props.onFinish, onCancel = props.onCancel, actionBtnText = props.actionBtnText; props.subText; var toCompanyDefault = props.toCompanyDefault, disableToCompany = props.disableToCompany, receiverLabelText = props.receiverLabelText, userCompanyId = props.userCompanyId, companyRole = props.companyRole, translator = props.translator, useConnection = props.useConnection, _a = props.ministryLevelPermission, ministryLevelPermission = _a === void 0 ? false : _a;
|
28506
28729
|
var t = translator.t;
|
28507
28730
|
var _b = React.useState(undefined), popupError = _b[0], setPopupError = _b[1];
|
28508
28731
|
var _c = React.useState(false), loading = _c[0], setLoading = _c[1];
|
@@ -28527,8 +28750,8 @@ var ProgrammeTransferForm = function (props) {
|
|
28527
28750
|
},
|
28528
28751
|
{
|
28529
28752
|
key: "companyRole",
|
28530
|
-
operation: "
|
28531
|
-
value:
|
28753
|
+
operation: "=",
|
28754
|
+
value: exports.CompanyRole.PROGRAMME_DEVELOPER,
|
28532
28755
|
},
|
28533
28756
|
],
|
28534
28757
|
sort: {
|
@@ -28733,7 +28956,7 @@ var css_248z$5 = ".ndc-action-body {\n display: flex;\n flex-direction: column
|
|
28733
28956
|
styleInject(css_248z$5);
|
28734
28957
|
|
28735
28958
|
var NdcActionBody = function (props) {
|
28736
|
-
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;
|
28959
|
+
var data = props.data, programmeId = props.programmeId, canUploadMonitorReport = props.canUploadMonitorReport, programmeOwnerId = props.programmeOwnerId, getProgrammeDocs = props.getProgrammeDocs, ministryLevelPermission = props.ministryLevelPermission, useConnection = props.useConnection, translator = props.translator, useUserContext = props.useUserContext, onFinish = props.onFinish, programme = props.programme;
|
28737
28960
|
var t = translator.t;
|
28738
28961
|
var userInfoState = useUserContext().userInfoState;
|
28739
28962
|
var fileInputMonitoringRef = React.useRef(null);
|
@@ -29169,7 +29392,7 @@ var css_248z$4 = ".info-view .title-icon {\n padding-right: 10px; }\n\n.info-vi
|
|
29169
29392
|
styleInject(css_248z$4);
|
29170
29393
|
|
29171
29394
|
var ProgrammeDocuments = function (props) {
|
29172
|
-
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;
|
29395
|
+
var data = props.data, title = props.title, icon = props.icon, programmeId = props.programmeId, programmeOwnerId = props.programmeOwnerId, getDocumentDetails = props.getDocumentDetails, getProgrammeById = props.getProgrammeById, ministryLevelPermission = props.ministryLevelPermission, useConnection = props.useConnection, useUserContext = props.useUserContext, translator = props.translator, methodologyDocumentUpdated = props.methodologyDocumentUpdated, programmeStatus = props.programmeStatus;
|
29173
29396
|
var t = translator.t;
|
29174
29397
|
var userInfoState = useUserContext().userInfoState;
|
29175
29398
|
var _a = useConnection(); _a.delete; var post = _a.post;
|
@@ -29712,7 +29935,7 @@ var TimelineBody = function (props) {
|
|
29712
29935
|
React.createElement("div", { className: "remark-body" }, remark)))));
|
29713
29936
|
};
|
29714
29937
|
|
29715
|
-
var css_248z$2 = ".ant-tabs-tab-btn {\n padding: 5px 30px;\n text-align: center;\n font-weight: 600;\n color: rgba(58, 53, 65, 0.5); }\n\n.emission-tab-container .add-emission {\n display: flex;\n flex-direction: column;\n background-color: #ffffff;\n margin: 1rem 0 1rem 0;\n border-radius: 10px;\n padding: 0 1.5rem 2.5rem 1.5rem; }\n .emission-tab-container .add-emission .ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn {\n color: #16b1ff; }\n .emission-tab-container .add-emission .ant-tabs-ink-bar {\n position: absolute;\n background: #16b1ff !important;\n pointer-events: none; }\n .emission-tab-container .add-emission .add-new-year-picker-col {\n padding-left: 5%; }\n .emission-tab-container .add-emission .ant-picker {\n border-radius:
|
29938
|
+
var css_248z$2 = ".emission-tab-container .ant-tabs-tab-btn {\n padding: 5px 30px;\n text-align: center;\n font-weight: 600;\n color: rgba(58, 53, 65, 0.5); }\n\n.emission-tab-container .anticon-lock {\n margin-right: 0 !important; }\n\n.empty-emission-container {\n padding-top: 5%;\n padding-bottom: 5%; }\n\n.emission-tab-container .add-emission {\n display: flex;\n flex-direction: column;\n background-color: #ffffff;\n margin: 1rem 0 1rem 0;\n border-radius: 10px;\n padding: 0 1.5rem 2.5rem 1.5rem; }\n .emission-tab-container .add-emission .ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn {\n color: #16b1ff; }\n .emission-tab-container .add-emission .ant-tabs-ink-bar {\n position: absolute;\n background: #16b1ff !important;\n pointer-events: none; }\n .emission-tab-container .add-emission .add-new-year-picker-col {\n padding-left: 5%; }\n .emission-tab-container .add-emission .ant-picker {\n border-radius: 4px !important;\n height: 40px !important;\n width: 80%; }\n .emission-tab-container .add-emission .ant-input-suffix {\n display: flex;\n flex: none;\n align-items: center;\n height: 50px; }\n .emission-tab-container .add-emission .ant-input-suffix button {\n border: none;\n color: #8C8C8C; }\n .emission-tab-container .add-emission .ant-input-affix-wrapper {\n padding: 0 11px;\n border-radius: 5px; }\n .emission-tab-container .add-emission .add-new-upload-file-label {\n color: rgba(58, 53, 65, 0.5);\n padding: 0 0 8px;\n line-height: 1.5715;\n white-space: initial;\n text-align: left; }\n .emission-tab-container .add-emission .add-new-upload-file-name-input input {\n height: 40px;\n color: #16b1ff;\n border-radius: 4px !important; }\n .emission-tab-container .add-emission .add-new-upload-file-inner-col button {\n height: 40px;\n font-size: 12px;\n width: 120px;\n color: #8C8C8C;\n border-radius: 4px !important; }\n .emission-tab-container .add-emission .view-download-file-name-input input {\n height: 40px;\n color: #8C8C8C;\n border-radius: 4px !important; }\n .emission-tab-container .add-emission .view-download-file-inner-col button {\n height: 40px;\n font-size: 12px;\n font-weight: 400;\n width: 135px;\n margin-left: 5px;\n color: #8C8C8C;\n border-radius: 4px !important; }\n .emission-tab-container .add-emission .table-heading-row {\n padding-top: 20px;\n padding-bottom: 25px;\n margin-left: 10px !important; }\n .emission-tab-container .add-emission .table-heading-row .table-heading-col {\n text-align: center;\n font-size: 18px;\n font-weight: 700;\n color: #28282899; }\n .emission-tab-container .add-emission .total-emission-row {\n padding: 12px 16px;\n margin-left: 30px !important; }\n .emission-tab-container .add-emission .total-emission-row span {\n font-size: 18px;\n font-weight: 700;\n color: #3A3541CC; }\n .emission-tab-container .add-emission .total-emission-row .total-emission-value-col {\n border-bottom: 1px solid rgba(217, 217, 217, 0.6);\n padding-bottom: 10px; }\n .emission-tab-container .add-emission .panel-header-col {\n font-size: 16px;\n font-weight: 600;\n color: #3A3541CC; }\n .emission-tab-container .add-emission .panel-header-emission-value-col {\n border-bottom: 1px solid rgba(217, 217, 217, 0.6);\n padding-bottom: 10px; }\n .emission-tab-container .add-emission .sub-panel .panel-header-emission-value-col {\n border-bottom: none !important;\n padding-bottom: 10px; }\n .emission-tab-container .add-emission .sub-panel-heading {\n border-bottom: 1px solid rgba(217, 217, 217, 0.6);\n padding-bottom: 10px;\n margin-top: 35px; }\n .emission-tab-container .add-emission .sub-panel-heading .panel-header-col {\n font-size: 14px;\n font-weight: 600;\n color: #3A3541CC; }\n .emission-tab-container .add-emission .ant-collapse-ghost > .ant-collapse-item > .ant-collapse-content > .ant-collapse-content-box {\n padding-top: 0px;\n padding-bottom: 12px;\n margin-left: 32px; }\n .emission-tab-container .add-emission .ant-collapse-expand-icon {\n margin-top: 3px; }\n .emission-tab-container .add-emission .ant-collapse-expand-icon svg {\n font-size: 16px;\n color: #16b1ff; }\n .emission-tab-container .add-emission .ant-collapse {\n margin-left: 10px; }\n .emission-tab-container .add-emission .co2-total-pill {\n border-radius: 20px;\n background-color: rgba(145, 85, 253, 0.4);\n padding: 5px 15px;\n height: 30px;\n color: #5B5B5B;\n font-size: 12px;\n font-weight: 900;\n margin-left: auto;\n margin-right: auto;\n width: 90px;\n text-align: center;\n overflow: hidden;\n text-overflow: ellipsis; }\n .emission-tab-container .add-emission .ch4-total-pill {\n border-radius: 20px;\n background-color: rgba(217, 217, 217, 0.6);\n padding: 5px 15px;\n height: 30px;\n color: #5B5B5B;\n font-size: 12px;\n font-weight: 900;\n margin-left: auto;\n margin-right: auto;\n width: 90px;\n text-align: center;\n overflow: hidden;\n text-overflow: ellipsis; }\n .emission-tab-container .add-emission .n2o-total-pill {\n border-radius: 20px;\n background-color: rgba(185, 226, 244, 0.4);\n padding: 5px 15px;\n height: 30px;\n color: #5B5B5B;\n font-size: 12px;\n font-weight: 900;\n margin-left: auto;\n margin-right: auto;\n width: 90px;\n text-align: center;\n overflow: hidden;\n text-overflow: ellipsis; }\n .emission-tab-container .add-emission .co2eq-total-pill {\n border-radius: 20px;\n background-color: rgba(255, 166, 166, 0.6);\n padding: 5px 15px;\n height: 30px;\n color: #5B5B5B;\n font-size: 12px;\n font-weight: 900;\n margin-left: auto;\n margin-right: auto;\n width: 90px;\n text-align: center;\n overflow: hidden;\n text-overflow: ellipsis; }\n .emission-tab-container .add-emission .panel-content-row {\n border-bottom: 1px solid rgba(217, 217, 217, 0.6);\n padding-bottom: 10px;\n height: 68px;\n align-items: center; }\n .emission-tab-container .add-emission .panel-content-row .panel-content-title {\n font-size: 14px;\n font-weight: 400;\n color: #3A3541CC; }\n .emission-tab-container .add-emission .panel-content-input-box-row {\n margin-top: 14px; }\n .emission-tab-container .add-emission .panel-content-input-box-row .ant-input-number {\n height: 40px;\n margin-left: 17%; }\n .emission-tab-container .add-emission .total-co2-land-input-box-row .ant-input-number {\n margin-left: 14% !important; }\n .emission-tab-container .add-emission .total-co2-without-land-row {\n margin-left: 40px !important;\n align-items: center;\n margin-top: 10px; }\n .emission-tab-container .add-emission .total-co2-without-land-row .total-co2-without-land-title {\n font-size: 16px;\n font-weight: 600;\n color: #3A3541CC; }\n .emission-tab-container .add-emission .total-co2-without-land-row .panel-content-input-box-row {\n border-bottom: 1px solid rgba(217, 217, 217, 0.6); }\n .emission-tab-container .add-emission .ant-input-number-input {\n text-align: center;\n height: 40px; }\n .emission-tab-container .add-emission .view-data-panel .panel-content-input-box-row {\n padding-bottom: 24px; }\n .emission-tab-container .add-emission .total-co2-with-land-row {\n margin-left: 40px !important;\n align-items: center; }\n .emission-tab-container .add-emission .total-co2-with-land-row .total-co2-with-land-title {\n font-size: 16px;\n font-weight: 600;\n color: #3A3541CC; }\n .emission-tab-container .add-emission .total-co2-with-land-row .panel-content-input-box-row {\n border-bottom: 1px solid rgba(217, 217, 217, 0.6); }\n .emission-tab-container .add-emission .steps-actions {\n display: flex;\n flex-direction: row-reverse;\n margin-right: 1rem;\n margin-top: 3rem; }\n .emission-tab-container .add-emission .steps-actions .action-btn {\n border: 1px solid #16b1ff;\n color: #16b1ff;\n margin-right: 1rem; }\n .emission-tab-container .add-emission .steps-actions .back-btn {\n border: 1px solid rgba(140, 140, 140, 0.7);\n color: rgba(140, 140, 140, 0.7);\n margin-right: 1rem; }\n .emission-tab-container .add-emission .steps-actions .submit-btn {\n margin-right: 1rem; }\n .emission-tab-container .add-emission .steps-actions .mg-left-1 {\n margin-left: 1rem; }\n @media only screen and (max-width: 1600px) {\n .emission-tab-container .add-emission .panel-content-input-box-row .ant-input-number {\n margin-left: 2%; }\n .emission-tab-container .add-emission .total-co2-land-input-box-row .ant-input-number {\n margin-left: 0% !important; } }\n";
|
29716
29939
|
styleInject(css_248z$2);
|
29717
29940
|
|
29718
29941
|
var EmissionTypes = { co2: 'CO2', ch4: 'CH4', n2o: 'N2O', co2eq: 'CO2-eq' };
|
@@ -30120,7 +30343,7 @@ var GHGUserActionConfirmationModel = function (props) {
|
|
30120
30343
|
};
|
30121
30344
|
|
30122
30345
|
var GHGEmissionsComponent = function (props) {
|
30123
|
-
var t = props.t;
|
30346
|
+
var t = props.t, useUserContext = props.useUserContext, useConnection = props.useConnection;
|
30124
30347
|
var userInfoState = useUserContext().userInfoState;
|
30125
30348
|
var _a = React.useState([]), data = _a[0], setData = _a[1];
|
30126
30349
|
var _b = useConnection(), get = _b.get, post = _b.post;
|
@@ -30166,14 +30389,26 @@ var GHGEmissionsComponent = function (props) {
|
|
30166
30389
|
var _17 = React.useState(0), otherCh4 = _17[0], setOtherCh4 = _17[1];
|
30167
30390
|
var _18 = React.useState(0), otherN2o = _18[0], setOtherN2o = _18[1];
|
30168
30391
|
var _19 = React.useState(0), otherCo2Eq = _19[0], setOtherCo2Eq = _19[1];
|
30169
|
-
var _20 = React.useState(
|
30170
|
-
|
30171
|
-
|
30172
|
-
|
30173
|
-
|
30174
|
-
|
30175
|
-
var
|
30176
|
-
|
30392
|
+
var _20 = React.useState({
|
30393
|
+
totalCo2WithoutLand_ch4: 0,
|
30394
|
+
totalCo2WithoutLand_co2: 0,
|
30395
|
+
totalCo2WithoutLand_n2o: 0,
|
30396
|
+
totalCo2WithoutLand_co2eq: 0
|
30397
|
+
}); _20[0]; var setTotalCo2WithoutLandEmissions = _20[1];
|
30398
|
+
var _21 = React.useState({
|
30399
|
+
totalCo2WithLand_ch4: 0,
|
30400
|
+
totalCo2WithLand_co2: 0,
|
30401
|
+
totalCo2WithLand_n2o: 0,
|
30402
|
+
totalCo2WithLand_co2eq: 0
|
30403
|
+
}); _21[0]; _21[1];
|
30404
|
+
var _22 = React.useState(false), isSavedFormDataSet = _22[0], setIsSavedFormDataSet = _22[1];
|
30405
|
+
var _23 = React.useState(1), formDataVersion = _23[0], setFormDataVersion = _23[1];
|
30406
|
+
var _24 = React.useState(false), isFormChanged = _24[0], setIsFormChanged = _24[1];
|
30407
|
+
var _25 = React.useState(false), openSaveFormModal = _25[0], setOpenSaveFormModal = _25[1];
|
30408
|
+
var _26 = React.useState(false), openFinalizeFormModal = _26[0], setOpenFinalizeFormModal = _26[1];
|
30409
|
+
var _27 = React.useState(false), openResetFormModal = _27[0], setOpenResetFormModal = _27[1];
|
30410
|
+
var _28 = React.useState(''), errorMsg = _28[0], setErrorMsg = _28[1];
|
30411
|
+
var _29 = React.useState({}), actionInfo = _29[0], setActionInfo = _29[1];
|
30177
30412
|
var Panel = antd.Collapse.Panel;
|
30178
30413
|
var form = antd.Form.useForm()[0];
|
30179
30414
|
var createSetFieldObject = function (obj, objName) {
|
@@ -31328,19 +31563,35 @@ var GHGEmissionsComponent = function (props) {
|
|
31328
31563
|
return 0;
|
31329
31564
|
}
|
31330
31565
|
};
|
31566
|
+
var handleTotalCo2WithoutLandEmissions = function (field, value) {
|
31567
|
+
setTotalCo2WithoutLandEmissions(function (prevState) {
|
31568
|
+
var _a;
|
31569
|
+
return (__assign(__assign({}, prevState), (_a = {}, _a[field] = value, _a)));
|
31570
|
+
});
|
31571
|
+
};
|
31572
|
+
// Helper function to get form field value
|
31573
|
+
var getFieldValue = function (fieldName) {
|
31574
|
+
var formValues = form.getFieldsValue(true);
|
31575
|
+
var fieldValue = formValues[fieldName];
|
31576
|
+
return (fieldValue && fieldValue >= 0) ? addCommSep(Number(fieldValue)) : fieldValue;
|
31577
|
+
};
|
31331
31578
|
var renderPanelHeader = function (panelHeading) { return (React.createElement(antd.Row, { gutter: 16 },
|
31332
31579
|
React.createElement(antd.Col, { xl: 12, md: 12, className: "panel-header-col" },
|
31333
31580
|
React.createElement("span", null, t("ghgInventory:".concat(panelHeading)))),
|
31334
31581
|
React.createElement(antd.Col, { xl: 9, md: 9, className: "panel-header-emission-value-col" },
|
31335
31582
|
React.createElement(antd.Row, { gutter: 16 },
|
31336
31583
|
React.createElement(antd.Col, { xl: 6 },
|
31337
|
-
React.createElement(
|
31584
|
+
React.createElement(antd.Tooltip, { title: addCommSep(Number(getCO2Sum(panelHeading))) },
|
31585
|
+
React.createElement("div", { className: "co2-total-pill" }, addCommSep(Number(getCO2Sum(panelHeading)))))),
|
31338
31586
|
React.createElement(antd.Col, { xl: 6 },
|
31339
|
-
React.createElement(
|
31587
|
+
React.createElement(antd.Tooltip, { title: addCommSep(Number(getCH4Sum(panelHeading))) },
|
31588
|
+
React.createElement("div", { className: "ch4-total-pill" }, addCommSep(Number(getCH4Sum(panelHeading)))))),
|
31340
31589
|
React.createElement(antd.Col, { xl: 6 },
|
31341
|
-
React.createElement(
|
31590
|
+
React.createElement(antd.Tooltip, { title: addCommSep(Number(getN2OSum(panelHeading))) },
|
31591
|
+
React.createElement("div", { className: "n2o-total-pill" }, addCommSep(Number(getN2OSum(panelHeading)))))),
|
31342
31592
|
React.createElement(antd.Col, { xl: 6 },
|
31343
|
-
React.createElement(
|
31593
|
+
React.createElement(antd.Tooltip, { title: addCommSep(Number(getCO2EQSum(panelHeading))) },
|
31594
|
+
React.createElement("div", { className: "co2eq-total-pill" }, addCommSep(Number(getCO2EQSum(panelHeading)))))))))); };
|
31344
31595
|
var renderPanelHeaderView = function (panelHeading, tabData) {
|
31345
31596
|
var emissionsObject = tabData[panelHeading];
|
31346
31597
|
return (React.createElement(antd.Row, { gutter: 16 },
|
@@ -31349,13 +31600,17 @@ var GHGEmissionsComponent = function (props) {
|
|
31349
31600
|
React.createElement(antd.Col, { xl: 9, md: 9 },
|
31350
31601
|
React.createElement(antd.Row, { gutter: 16, className: "panel-header-emission-value-col" },
|
31351
31602
|
React.createElement(antd.Col, { xl: 6 },
|
31352
|
-
React.createElement(
|
31603
|
+
React.createElement(antd.Tooltip, { title: addCommSep(Number(calculateSumEmissionView(emissionsObject, 'co2'))) },
|
31604
|
+
React.createElement("div", { className: "co2-total-pill" }, addCommSep(Number(calculateSumEmissionView(emissionsObject, 'co2')))))),
|
31353
31605
|
React.createElement(antd.Col, { xl: 6 },
|
31354
|
-
React.createElement(
|
31606
|
+
React.createElement(antd.Tooltip, { title: addCommSep(Number(calculateSumEmissionView(emissionsObject, 'co2'))) },
|
31607
|
+
React.createElement("div", { className: "ch4-total-pill" }, addCommSep(Number(calculateSumEmissionView(emissionsObject, 'ch4')))))),
|
31355
31608
|
React.createElement(antd.Col, { xl: 6 },
|
31356
|
-
React.createElement(
|
31609
|
+
React.createElement(antd.Tooltip, { title: addCommSep(Number(calculateSumEmissionView(emissionsObject, 'co2'))) },
|
31610
|
+
React.createElement("div", { className: "n2o-total-pill" }, addCommSep(Number(calculateSumEmissionView(emissionsObject, 'n2o')))))),
|
31357
31611
|
React.createElement(antd.Col, { xl: 6 },
|
31358
|
-
React.createElement(
|
31612
|
+
React.createElement(antd.Tooltip, { title: addCommSep(Number(calculateSumEmissionView(emissionsObject, 'co2'))) },
|
31613
|
+
React.createElement("div", { className: "co2eq-total-pill" }, addCommSep(Number(calculateSumEmissionView(emissionsObject, 'co2eq'))))))))));
|
31359
31614
|
};
|
31360
31615
|
var renderPanelContent = function (panelHeading, item, index) { return (React.createElement(antd.Row, { gutter: 16, key: index, className: "panel-content-row" },
|
31361
31616
|
React.createElement(antd.Col, { xl: 12, md: 12, className: "panel-content-title" },
|
@@ -31363,61 +31618,65 @@ var GHGEmissionsComponent = function (props) {
|
|
31363
31618
|
React.createElement(antd.Col, { xl: 9, md: 9 },
|
31364
31619
|
React.createElement(antd.Row, { gutter: 16, className: "panel-content-input-box-row" },
|
31365
31620
|
React.createElement(antd.Col, { xl: 6 },
|
31366
|
-
React.createElement(antd.
|
31367
|
-
|
31368
|
-
|
31369
|
-
return
|
31370
|
-
|
31371
|
-
|
31372
|
-
|
31373
|
-
|
31374
|
-
|
31375
|
-
|
31376
|
-
|
31377
|
-
|
31378
|
-
|
31621
|
+
React.createElement(antd.Tooltip, { title: getFieldValue(panelHeading + '_' + item + '_co2') },
|
31622
|
+
React.createElement(antd.Form.Item, { name: panelHeading + '_' + item + '_co2', rules: [
|
31623
|
+
{
|
31624
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
31625
|
+
return __generator(this, function (_a) {
|
31626
|
+
if (value && value < 0) {
|
31627
|
+
throw new Error();
|
31628
|
+
}
|
31629
|
+
return [2 /*return*/];
|
31630
|
+
});
|
31631
|
+
}); },
|
31632
|
+
},
|
31633
|
+
] },
|
31634
|
+
React.createElement(antd.InputNumber, { onChange: function (event) { return calculateSumCo2(event, panelHeading); }, disabled: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === exports.Role.ViewOnly })))),
|
31379
31635
|
React.createElement(antd.Col, { xl: 6 },
|
31380
|
-
React.createElement(antd.
|
31381
|
-
|
31382
|
-
|
31383
|
-
return
|
31384
|
-
|
31385
|
-
|
31386
|
-
|
31387
|
-
|
31388
|
-
|
31389
|
-
|
31390
|
-
|
31391
|
-
|
31392
|
-
|
31636
|
+
React.createElement(antd.Tooltip, { title: getFieldValue(panelHeading + '_' + item + '_ch4') },
|
31637
|
+
React.createElement(antd.Form.Item, { name: panelHeading + '_' + item + '_ch4', rules: [
|
31638
|
+
{
|
31639
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
31640
|
+
return __generator(this, function (_a) {
|
31641
|
+
if (value && value < 0) {
|
31642
|
+
throw new Error();
|
31643
|
+
}
|
31644
|
+
return [2 /*return*/];
|
31645
|
+
});
|
31646
|
+
}); },
|
31647
|
+
},
|
31648
|
+
] },
|
31649
|
+
React.createElement(antd.InputNumber, { onChange: function (event) { return calculateSumCh4(event, panelHeading); }, disabled: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === exports.Role.ViewOnly })))),
|
31393
31650
|
React.createElement(antd.Col, { xl: 6 },
|
31394
|
-
React.createElement(antd.
|
31395
|
-
|
31396
|
-
|
31397
|
-
return
|
31398
|
-
|
31399
|
-
|
31400
|
-
|
31401
|
-
|
31402
|
-
|
31403
|
-
|
31404
|
-
|
31405
|
-
|
31406
|
-
|
31651
|
+
React.createElement(antd.Tooltip, { title: getFieldValue(panelHeading + '_' + item + '_n2o') },
|
31652
|
+
React.createElement(antd.Form.Item, { name: panelHeading + '_' + item + '_n2o', rules: [
|
31653
|
+
{
|
31654
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
31655
|
+
return __generator(this, function (_a) {
|
31656
|
+
if (value && value < 0) {
|
31657
|
+
throw new Error();
|
31658
|
+
}
|
31659
|
+
return [2 /*return*/];
|
31660
|
+
});
|
31661
|
+
}); },
|
31662
|
+
},
|
31663
|
+
] },
|
31664
|
+
React.createElement(antd.InputNumber, { onChange: function (event) { return calculateSumN2o(event, panelHeading); }, disabled: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === exports.Role.ViewOnly })))),
|
31407
31665
|
React.createElement(antd.Col, { xl: 6 },
|
31408
|
-
React.createElement(antd.
|
31409
|
-
|
31410
|
-
|
31411
|
-
return
|
31412
|
-
|
31413
|
-
|
31414
|
-
|
31415
|
-
|
31416
|
-
|
31417
|
-
|
31418
|
-
|
31419
|
-
|
31420
|
-
|
31666
|
+
React.createElement(antd.Tooltip, { title: getFieldValue(panelHeading + '_' + item + '_co2eq') },
|
31667
|
+
React.createElement(antd.Form.Item, { name: panelHeading + '_' + item + '_co2eq', rules: [
|
31668
|
+
{
|
31669
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
31670
|
+
return __generator(this, function (_a) {
|
31671
|
+
if (value && value < 0) {
|
31672
|
+
throw new Error();
|
31673
|
+
}
|
31674
|
+
return [2 /*return*/];
|
31675
|
+
});
|
31676
|
+
}); },
|
31677
|
+
},
|
31678
|
+
] },
|
31679
|
+
React.createElement(antd.InputNumber, { onChange: function (event) { return calculateSumCo2Eq(event, panelHeading); }, disabled: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === exports.Role.ViewOnly })))))))); };
|
31421
31680
|
var renderPanelContentView = function (co2, ch4, n2o, co2eq, item, index) {
|
31422
31681
|
return (React.createElement(antd.Row, { gutter: 16, key: index, className: "panel-content-row" },
|
31423
31682
|
React.createElement(antd.Col, { xl: 12, md: 12, className: "panel-content-title" },
|
@@ -31425,13 +31684,21 @@ var GHGEmissionsComponent = function (props) {
|
|
31425
31684
|
React.createElement(antd.Col, { xl: 9, md: 9 },
|
31426
31685
|
React.createElement(antd.Row, { gutter: 16, className: "panel-content-input-box-row" },
|
31427
31686
|
React.createElement(antd.Col, { xl: 6 },
|
31428
|
-
React.createElement(antd.
|
31687
|
+
React.createElement(antd.Tooltip, { title: co2 ? addCommSep(Number(co2)) : co2 },
|
31688
|
+
React.createElement("div", null,
|
31689
|
+
React.createElement(antd.InputNumber, { value: co2 ? addCommSep(Number(co2)) : co2, disabled: true })))),
|
31429
31690
|
React.createElement(antd.Col, { xl: 6 },
|
31430
|
-
React.createElement(antd.
|
31691
|
+
React.createElement(antd.Tooltip, { title: ch4 ? addCommSep(Number(ch4)) : ch4 },
|
31692
|
+
React.createElement("div", null,
|
31693
|
+
React.createElement(antd.InputNumber, { value: ch4 ? addCommSep(Number(ch4)) : ch4, disabled: true })))),
|
31431
31694
|
React.createElement(antd.Col, { xl: 6 },
|
31432
|
-
React.createElement(antd.
|
31695
|
+
React.createElement(antd.Tooltip, { title: n2o ? addCommSep(Number(n2o)) : n2o },
|
31696
|
+
React.createElement("div", null,
|
31697
|
+
React.createElement(antd.InputNumber, { value: n2o ? addCommSep(Number(n2o)) : n2o, disabled: true })))),
|
31433
31698
|
React.createElement(antd.Col, { xl: 6 },
|
31434
|
-
React.createElement(antd.
|
31699
|
+
React.createElement(antd.Tooltip, { title: co2eq ? addCommSep(Number(co2eq)) : co2eq },
|
31700
|
+
React.createElement("div", null,
|
31701
|
+
React.createElement(antd.InputNumber, { value: co2eq ? addCommSep(Number(co2eq)) : co2eq, disabled: true }))))))));
|
31435
31702
|
};
|
31436
31703
|
var objectToCSV = function (dataToDownload) {
|
31437
31704
|
var flattenObject = function (obj, prefix) {
|
@@ -31502,6 +31769,17 @@ var GHGEmissionsComponent = function (props) {
|
|
31502
31769
|
}
|
31503
31770
|
return false;
|
31504
31771
|
};
|
31772
|
+
var displayEmptyView = function () {
|
31773
|
+
if (!data || data.length === 0) {
|
31774
|
+
if ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) !== exports.CompanyRole.GOVERNMENT && (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) !== exports.CompanyRole.MINISTRY) {
|
31775
|
+
return true;
|
31776
|
+
}
|
31777
|
+
else if ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === exports.Role.ViewOnly) {
|
31778
|
+
return true;
|
31779
|
+
}
|
31780
|
+
}
|
31781
|
+
return false;
|
31782
|
+
};
|
31505
31783
|
var canViewForm = function () {
|
31506
31784
|
if ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT || (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.MINISTRY) {
|
31507
31785
|
if ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === exports.Role.ViewOnly && data.some(function (item) { return item.state === 'SAVED'; })) {
|
@@ -31519,7 +31797,9 @@ var GHGEmissionsComponent = function (props) {
|
|
31519
31797
|
React.createElement("div", { className: "title-bar" },
|
31520
31798
|
React.createElement("div", { className: "body-title" }, t("ghgInventory:emissions")),
|
31521
31799
|
React.createElement("div", { className: "body-sub-title" }, t("ghgInventory:totalNationalEmissionSubTitle")))),
|
31522
|
-
React.createElement("div", { className: "content-card
|
31800
|
+
(displayEmptyView()) && (React.createElement("div", { className: "content-card empty-emission-container" },
|
31801
|
+
React.createElement(antd.Empty, { image: antd.Empty.PRESENTED_IMAGE_SIMPLE, description: React.createElement("span", null, t("ghgInventory:noEmissions")) }))),
|
31802
|
+
(!displayEmptyView()) && (React.createElement("div", { className: "content-card add-emission" },
|
31523
31803
|
React.createElement(antd.Tabs, { defaultActiveKey: "Add New", centered: true },
|
31524
31804
|
(canViewForm()) && (React.createElement(antd.Tabs.TabPane, { key: "Add New", tab: t("ghgInventory:addNew") },
|
31525
31805
|
React.createElement("div", null,
|
@@ -31624,13 +31904,17 @@ var GHGEmissionsComponent = function (props) {
|
|
31624
31904
|
React.createElement(antd.Col, { xl: 9, md: 9 },
|
31625
31905
|
React.createElement(antd.Row, { gutter: 16, className: "total-emission-value-col" },
|
31626
31906
|
React.createElement(antd.Col, { xl: 6 },
|
31627
|
-
React.createElement(
|
31907
|
+
React.createElement(antd.Tooltip, { title: addCommSep(Number(totalNationalCo2)) },
|
31908
|
+
React.createElement("div", { className: "co2-total-pill" }, addCommSep(Number(totalNationalCo2))))),
|
31628
31909
|
React.createElement(antd.Col, { xl: 6 },
|
31629
|
-
React.createElement(
|
31910
|
+
React.createElement(antd.Tooltip, { title: addCommSep(Number(totalNationalCh4)) },
|
31911
|
+
React.createElement("div", { className: "ch4-total-pill" }, addCommSep(Number(totalNationalCh4))))),
|
31630
31912
|
React.createElement(antd.Col, { xl: 6 },
|
31631
|
-
React.createElement(
|
31913
|
+
React.createElement(antd.Tooltip, { title: addCommSep(Number(totalNationalN2o)) },
|
31914
|
+
React.createElement("div", { className: "n2o-total-pill" }, addCommSep(Number(totalNationalN2o))))),
|
31632
31915
|
React.createElement(antd.Col, { xl: 6 },
|
31633
|
-
React.createElement(
|
31916
|
+
React.createElement(antd.Tooltip, { title: addCommSep(Number(totalNationalCo2Eq)) },
|
31917
|
+
React.createElement("div", { className: "co2eq-total-pill" }, addCommSep(Number(totalNationalCo2Eq)))))))),
|
31634
31918
|
React.createElement(antd.Collapse, { ghost: true, expandIcon: function (_a) {
|
31635
31919
|
var isActive = _a.isActive;
|
31636
31920
|
return isActive ? React.createElement(icons.MinusCircleOutlined, null) : React.createElement(icons.PlusCircleOutlined, null);
|
@@ -31655,122 +31939,130 @@ var GHGEmissionsComponent = function (props) {
|
|
31655
31939
|
React.createElement(antd.Col, { xl: 9, md: 9 },
|
31656
31940
|
React.createElement(antd.Row, { gutter: 16, className: "panel-content-input-box-row total-co2-land-input-box-row" },
|
31657
31941
|
React.createElement(antd.Col, { xl: 6 },
|
31658
|
-
React.createElement(antd.
|
31659
|
-
|
31660
|
-
|
31661
|
-
return
|
31662
|
-
|
31663
|
-
|
31664
|
-
|
31665
|
-
|
31666
|
-
|
31667
|
-
|
31668
|
-
|
31669
|
-
|
31670
|
-
|
31942
|
+
React.createElement(antd.Tooltip, { title: getFieldValue('totalCo2WithoutLand_co2') },
|
31943
|
+
React.createElement(antd.Form.Item, { name: "totalCo2WithoutLand_co2", rules: [
|
31944
|
+
{
|
31945
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
31946
|
+
return __generator(this, function (_a) {
|
31947
|
+
if (value && value < 0) {
|
31948
|
+
throw new Error();
|
31949
|
+
}
|
31950
|
+
return [2 /*return*/];
|
31951
|
+
});
|
31952
|
+
}); },
|
31953
|
+
},
|
31954
|
+
] },
|
31955
|
+
React.createElement(antd.InputNumber, { onChange: function (value) { return handleTotalCo2WithoutLandEmissions('totalCo2WithoutLand_co2', value); }, disabled: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === exports.Role.ViewOnly })))),
|
31671
31956
|
React.createElement(antd.Col, { xl: 6 },
|
31672
|
-
React.createElement(antd.
|
31673
|
-
|
31674
|
-
|
31675
|
-
return
|
31676
|
-
|
31677
|
-
|
31678
|
-
|
31679
|
-
|
31680
|
-
|
31681
|
-
|
31682
|
-
|
31683
|
-
|
31684
|
-
|
31957
|
+
React.createElement(antd.Tooltip, { title: getFieldValue('totalCo2WithoutLand_ch4') },
|
31958
|
+
React.createElement(antd.Form.Item, { name: "totalCo2WithoutLand_ch4", rules: [
|
31959
|
+
{
|
31960
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
31961
|
+
return __generator(this, function (_a) {
|
31962
|
+
if (value && value < 0) {
|
31963
|
+
throw new Error();
|
31964
|
+
}
|
31965
|
+
return [2 /*return*/];
|
31966
|
+
});
|
31967
|
+
}); },
|
31968
|
+
},
|
31969
|
+
] },
|
31970
|
+
React.createElement(antd.InputNumber, { onChange: function (value) { return handleTotalCo2WithoutLandEmissions('totalCo2WithoutLand_ch4', value); }, disabled: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === exports.Role.ViewOnly })))),
|
31685
31971
|
React.createElement(antd.Col, { xl: 6 },
|
31686
|
-
React.createElement(antd.
|
31687
|
-
|
31688
|
-
|
31689
|
-
return
|
31690
|
-
|
31691
|
-
|
31692
|
-
|
31693
|
-
|
31694
|
-
|
31695
|
-
|
31696
|
-
|
31697
|
-
|
31698
|
-
|
31972
|
+
React.createElement(antd.Tooltip, { title: getFieldValue('totalCo2WithoutLand_n2o') },
|
31973
|
+
React.createElement(antd.Form.Item, { name: "totalCo2WithoutLand_n2o", rules: [
|
31974
|
+
{
|
31975
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
31976
|
+
return __generator(this, function (_a) {
|
31977
|
+
if (value && value < 0) {
|
31978
|
+
throw new Error();
|
31979
|
+
}
|
31980
|
+
return [2 /*return*/];
|
31981
|
+
});
|
31982
|
+
}); },
|
31983
|
+
},
|
31984
|
+
] },
|
31985
|
+
React.createElement(antd.InputNumber, { onChange: function (value) { return handleTotalCo2WithoutLandEmissions('totalCo2WithoutLand_n2o', value); }, disabled: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === exports.Role.ViewOnly })))),
|
31699
31986
|
React.createElement(antd.Col, { xl: 6 },
|
31700
|
-
React.createElement(antd.
|
31701
|
-
|
31702
|
-
|
31703
|
-
return
|
31704
|
-
|
31705
|
-
|
31706
|
-
|
31707
|
-
|
31708
|
-
|
31709
|
-
|
31710
|
-
|
31711
|
-
|
31712
|
-
|
31987
|
+
React.createElement(antd.Tooltip, { title: getFieldValue('totalCo2WithoutLand_co2eq') },
|
31988
|
+
React.createElement(antd.Form.Item, { name: "totalCo2WithoutLand_co2eq", rules: [
|
31989
|
+
{
|
31990
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
31991
|
+
return __generator(this, function (_a) {
|
31992
|
+
if (value && value < 0) {
|
31993
|
+
throw new Error();
|
31994
|
+
}
|
31995
|
+
return [2 /*return*/];
|
31996
|
+
});
|
31997
|
+
}); },
|
31998
|
+
},
|
31999
|
+
] },
|
32000
|
+
React.createElement(antd.InputNumber, { onChange: function (value) { return handleTotalCo2WithoutLandEmissions('totalCo2WithoutLand_co2eq', value); }, disabled: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === exports.Role.ViewOnly }))))))),
|
31713
32001
|
React.createElement(antd.Row, { gutter: 16, key: 'totalCo2WithLand', className: "total-co2-with-land-row" },
|
31714
32002
|
React.createElement(antd.Col, { xl: 12, md: 12, className: "total-co2-with-land-title" },
|
31715
32003
|
React.createElement("span", null, t("ghgInventory:totalCo2WithLand"))),
|
31716
32004
|
React.createElement(antd.Col, { xl: 9, md: 9 },
|
31717
32005
|
React.createElement(antd.Row, { gutter: 16, className: "panel-content-input-box-row total-co2-land-input-box-row" },
|
31718
32006
|
React.createElement(antd.Col, { xl: 6 },
|
31719
|
-
React.createElement(antd.
|
31720
|
-
|
31721
|
-
|
31722
|
-
return
|
31723
|
-
|
31724
|
-
|
31725
|
-
|
31726
|
-
|
31727
|
-
|
31728
|
-
|
31729
|
-
|
31730
|
-
|
31731
|
-
|
32007
|
+
React.createElement(antd.Tooltip, { title: getFieldValue('totalCo2WithLand_co2') },
|
32008
|
+
React.createElement(antd.Form.Item, { name: "totalCo2WithLand_co2", rules: [
|
32009
|
+
{
|
32010
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
32011
|
+
return __generator(this, function (_a) {
|
32012
|
+
if (value && value < 0) {
|
32013
|
+
throw new Error();
|
32014
|
+
}
|
32015
|
+
return [2 /*return*/];
|
32016
|
+
});
|
32017
|
+
}); },
|
32018
|
+
},
|
32019
|
+
] },
|
32020
|
+
React.createElement(antd.InputNumber, { onChange: function (value) { return handleTotalCo2WithoutLandEmissions('totalCo2WithLand_co2', value); }, disabled: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === exports.Role.ViewOnly })))),
|
31732
32021
|
React.createElement(antd.Col, { xl: 6 },
|
31733
|
-
React.createElement(antd.
|
31734
|
-
|
31735
|
-
|
31736
|
-
return
|
31737
|
-
|
31738
|
-
|
31739
|
-
|
31740
|
-
|
31741
|
-
|
31742
|
-
|
31743
|
-
|
31744
|
-
|
31745
|
-
|
32022
|
+
React.createElement(antd.Tooltip, { title: getFieldValue('totalCo2WithLand_ch4') },
|
32023
|
+
React.createElement(antd.Form.Item, { name: "totalCo2WithLand_ch4", rules: [
|
32024
|
+
{
|
32025
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
32026
|
+
return __generator(this, function (_a) {
|
32027
|
+
if (value && value < 0) {
|
32028
|
+
throw new Error();
|
32029
|
+
}
|
32030
|
+
return [2 /*return*/];
|
32031
|
+
});
|
32032
|
+
}); },
|
32033
|
+
},
|
32034
|
+
] },
|
32035
|
+
React.createElement(antd.InputNumber, { onChange: function (value) { return handleTotalCo2WithoutLandEmissions('totalCo2WithLand_ch4', value); }, disabled: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === exports.Role.ViewOnly })))),
|
31746
32036
|
React.createElement(antd.Col, { xl: 6 },
|
31747
|
-
React.createElement(antd.
|
31748
|
-
|
31749
|
-
|
31750
|
-
return
|
31751
|
-
|
31752
|
-
|
31753
|
-
|
31754
|
-
|
31755
|
-
|
31756
|
-
|
31757
|
-
|
31758
|
-
|
31759
|
-
|
32037
|
+
React.createElement(antd.Tooltip, { title: getFieldValue('totalCo2WithLand_n2o') },
|
32038
|
+
React.createElement(antd.Form.Item, { name: "totalCo2WithLand_n2o", rules: [
|
32039
|
+
{
|
32040
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
32041
|
+
return __generator(this, function (_a) {
|
32042
|
+
if (value && value < 0) {
|
32043
|
+
throw new Error();
|
32044
|
+
}
|
32045
|
+
return [2 /*return*/];
|
32046
|
+
});
|
32047
|
+
}); },
|
32048
|
+
},
|
32049
|
+
] },
|
32050
|
+
React.createElement(antd.InputNumber, { onChange: function (value) { return handleTotalCo2WithoutLandEmissions('totalCo2WithLand_n2o', value); }, disabled: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === exports.Role.ViewOnly })))),
|
31760
32051
|
React.createElement(antd.Col, { xl: 6 },
|
31761
|
-
React.createElement(antd.
|
31762
|
-
|
31763
|
-
|
31764
|
-
return
|
31765
|
-
|
31766
|
-
|
31767
|
-
|
31768
|
-
|
31769
|
-
|
31770
|
-
|
31771
|
-
|
31772
|
-
|
31773
|
-
|
32052
|
+
React.createElement(antd.Tooltip, { title: getFieldValue('totalCo2WithLand_co2eq') },
|
32053
|
+
React.createElement(antd.Form.Item, { name: "totalCo2WithLand_co2eq", rules: [
|
32054
|
+
{
|
32055
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
32056
|
+
return __generator(this, function (_a) {
|
32057
|
+
if (value && value < 0) {
|
32058
|
+
throw new Error();
|
32059
|
+
}
|
32060
|
+
return [2 /*return*/];
|
32061
|
+
});
|
32062
|
+
}); },
|
32063
|
+
},
|
32064
|
+
] },
|
32065
|
+
React.createElement(antd.InputNumber, { onChange: function (value) { return handleTotalCo2WithoutLandEmissions('totalCo2WithLand_co2eq', value); }, disabled: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === exports.Role.ViewOnly }))))))),
|
31774
32066
|
(((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT || (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.MINISTRY)
|
31775
32067
|
&& ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) !== exports.Role.ViewOnly)) &&
|
31776
32068
|
(React.createElement("div", { className: "steps-actions" },
|
@@ -31779,7 +32071,7 @@ var GHGEmissionsComponent = function (props) {
|
|
31779
32071
|
React.createElement(antd.Button, { className: "submit-btn", type: "primary", onClick: onOpenSaveFormModel, loading: loading }, "Submit"),
|
31780
32072
|
React.createElement(antd.Button, { className: "back-btn", onClick: onOpenResetFormModel, loading: loading }, "Cancel"))))))),
|
31781
32073
|
data.map(function (tabData) {
|
31782
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
|
32074
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23;
|
31783
32075
|
return tabData.state === 'FINALIZED' && (React.createElement(antd.Tabs.TabPane, { className: 'view-data-panel', key: tabData.id.toString(), tab: React.createElement("span", null,
|
31784
32076
|
tabData.year,
|
31785
32077
|
tabData.state === 'FINALIZED' && React.createElement(icons.LockFilled, { style: { marginLeft: 5 } })) },
|
@@ -31819,13 +32111,17 @@ var GHGEmissionsComponent = function (props) {
|
|
31819
32111
|
React.createElement(antd.Col, { xl: 9, md: 9, className: "total-emission-value-col" },
|
31820
32112
|
React.createElement(antd.Row, { gutter: 16 },
|
31821
32113
|
React.createElement(antd.Col, { xl: 6 },
|
31822
|
-
React.createElement(
|
32114
|
+
React.createElement(antd.Tooltip, { title: addCommSep(Number(calculateSumEmissionView(tabData, 'co2'))) },
|
32115
|
+
React.createElement("div", { className: "co2-total-pill" }, addCommSep(Number(calculateSumEmissionView(tabData, 'co2')))))),
|
31823
32116
|
React.createElement(antd.Col, { xl: 6 },
|
31824
|
-
React.createElement(
|
32117
|
+
React.createElement(antd.Tooltip, { title: addCommSep(Number(calculateSumEmissionView(tabData, 'ch4'))) },
|
32118
|
+
React.createElement("div", { className: "ch4-total-pill" }, addCommSep(Number(calculateSumEmissionView(tabData, 'ch4')))))),
|
31825
32119
|
React.createElement(antd.Col, { xl: 6 },
|
31826
|
-
React.createElement(
|
32120
|
+
React.createElement(antd.Tooltip, { title: addCommSep(Number(calculateSumEmissionView(tabData, 'n2o'))) },
|
32121
|
+
React.createElement("div", { className: "n2o-total-pill" }, addCommSep(Number(calculateSumEmissionView(tabData, 'n2o')))))),
|
31827
32122
|
React.createElement(antd.Col, { xl: 6 },
|
31828
|
-
React.createElement(
|
32123
|
+
React.createElement(antd.Tooltip, { title: addCommSep(Number(calculateSumEmissionView(tabData, 'co2eq'))) },
|
32124
|
+
React.createElement("div", { className: "co2eq-total-pill" }, addCommSep(Number(calculateSumEmissionView(tabData, 'co2eq'))))))))),
|
31829
32125
|
React.createElement(antd.Collapse, { ghost: true, expandIcon: function (_a) {
|
31830
32126
|
var isActive = _a.isActive;
|
31831
32127
|
return isActive ? React.createElement(icons.MinusCircleOutlined, null) : React.createElement(icons.PlusCircleOutlined, null);
|
@@ -31880,49 +32176,81 @@ var GHGEmissionsComponent = function (props) {
|
|
31880
32176
|
React.createElement(antd.Col, { xl: 9, md: 9 },
|
31881
32177
|
React.createElement(antd.Row, { gutter: 16, className: "panel-content-input-box-row total-co2-land-input-box-row" },
|
31882
32178
|
React.createElement(antd.Col, { xl: 6 },
|
31883
|
-
React.createElement(antd.
|
32179
|
+
React.createElement(antd.Tooltip, { title: ((_a = tabData.totalCo2WithoutLand) === null || _a === void 0 ? void 0 : _a.co2)
|
31884
32180
|
? addCommSep(Number((_b = tabData.totalCo2WithoutLand) === null || _b === void 0 ? void 0 : _b.co2))
|
31885
|
-
: (_c = tabData.totalCo2WithoutLand) === null || _c === void 0 ? void 0 : _c.co2
|
32181
|
+
: (_c = tabData.totalCo2WithoutLand) === null || _c === void 0 ? void 0 : _c.co2 },
|
32182
|
+
React.createElement("div", null,
|
32183
|
+
React.createElement(antd.InputNumber, { value: ((_d = tabData.totalCo2WithoutLand) === null || _d === void 0 ? void 0 : _d.co2)
|
32184
|
+
? addCommSep(Number((_e = tabData.totalCo2WithoutLand) === null || _e === void 0 ? void 0 : _e.co2))
|
32185
|
+
: (_f = tabData.totalCo2WithoutLand) === null || _f === void 0 ? void 0 : _f.co2, disabled: true })))),
|
31886
32186
|
React.createElement(antd.Col, { xl: 6 },
|
31887
|
-
React.createElement(antd.
|
31888
|
-
? addCommSep(Number((
|
31889
|
-
: (
|
32187
|
+
React.createElement(antd.Tooltip, { title: ((_g = tabData.totalCo2WithoutLand) === null || _g === void 0 ? void 0 : _g.ch4)
|
32188
|
+
? addCommSep(Number((_h = tabData.totalCo2WithoutLand) === null || _h === void 0 ? void 0 : _h.ch4))
|
32189
|
+
: (_j = tabData.totalCo2WithoutLand) === null || _j === void 0 ? void 0 : _j.ch4 },
|
32190
|
+
React.createElement("div", null,
|
32191
|
+
React.createElement(antd.InputNumber, { value: ((_k = tabData.totalCo2WithoutLand) === null || _k === void 0 ? void 0 : _k.ch4)
|
32192
|
+
? addCommSep(Number((_l = tabData.totalCo2WithoutLand) === null || _l === void 0 ? void 0 : _l.ch4))
|
32193
|
+
: (_m = tabData.totalCo2WithoutLand) === null || _m === void 0 ? void 0 : _m.ch4, disabled: true })))),
|
31890
32194
|
React.createElement(antd.Col, { xl: 6 },
|
31891
|
-
React.createElement(antd.
|
31892
|
-
? addCommSep(Number((
|
31893
|
-
: (
|
32195
|
+
React.createElement(antd.Tooltip, { title: ((_o = tabData.totalCo2WithoutLand) === null || _o === void 0 ? void 0 : _o.n2o)
|
32196
|
+
? addCommSep(Number((_p = tabData.totalCo2WithoutLand) === null || _p === void 0 ? void 0 : _p.n2o))
|
32197
|
+
: (_q = tabData.totalCo2WithoutLand) === null || _q === void 0 ? void 0 : _q.n2o },
|
32198
|
+
React.createElement("div", null,
|
32199
|
+
React.createElement(antd.InputNumber, { value: ((_r = tabData.totalCo2WithoutLand) === null || _r === void 0 ? void 0 : _r.n2o)
|
32200
|
+
? addCommSep(Number((_s = tabData.totalCo2WithoutLand) === null || _s === void 0 ? void 0 : _s.n2o))
|
32201
|
+
: (_t = tabData.totalCo2WithoutLand) === null || _t === void 0 ? void 0 : _t.n2o, disabled: true })))),
|
31894
32202
|
React.createElement(antd.Col, { xl: 6 },
|
31895
|
-
React.createElement(antd.
|
31896
|
-
? addCommSep(Number((
|
31897
|
-
: (
|
32203
|
+
React.createElement(antd.Tooltip, { title: ((_u = tabData.totalCo2WithoutLand) === null || _u === void 0 ? void 0 : _u.co2eq)
|
32204
|
+
? addCommSep(Number((_v = tabData.totalCo2WithoutLand) === null || _v === void 0 ? void 0 : _v.co2eq))
|
32205
|
+
: (_w = tabData.totalCo2WithoutLand) === null || _w === void 0 ? void 0 : _w.co2eq },
|
32206
|
+
React.createElement("div", null,
|
32207
|
+
React.createElement(antd.InputNumber, { value: ((_x = tabData.totalCo2WithoutLand) === null || _x === void 0 ? void 0 : _x.co2eq)
|
32208
|
+
? addCommSep(Number((_y = tabData.totalCo2WithoutLand) === null || _y === void 0 ? void 0 : _y.co2eq))
|
32209
|
+
: (_z = tabData.totalCo2WithoutLand) === null || _z === void 0 ? void 0 : _z.co2eq, disabled: true })))))))),
|
31898
32210
|
(!isRowDataEmpty(tabData.totalCo2WithLand)) && (React.createElement(antd.Row, { gutter: 16, key: 'totalCo2WithLand', className: "total-co2-with-land-row" },
|
31899
32211
|
React.createElement(antd.Col, { xl: 12, md: 12, className: "total-co2-with-land-title" },
|
31900
32212
|
React.createElement("span", null, t("ghgInventory:totalCo2WithLand"))),
|
31901
32213
|
React.createElement(antd.Col, { xl: 9, md: 9 },
|
31902
32214
|
React.createElement(antd.Row, { gutter: 16, className: "panel-content-input-box-row total-co2-land-input-box-row" },
|
31903
32215
|
React.createElement(antd.Col, { xl: 6 },
|
31904
|
-
React.createElement(antd.
|
31905
|
-
? addCommSep(Number((
|
31906
|
-
: (
|
32216
|
+
React.createElement(antd.Tooltip, { title: ((_0 = tabData.totalCo2WithLand) === null || _0 === void 0 ? void 0 : _0.co2)
|
32217
|
+
? addCommSep(Number((_1 = tabData.totalCo2WithLand) === null || _1 === void 0 ? void 0 : _1.co2))
|
32218
|
+
: (_2 = tabData.totalCo2WithLand) === null || _2 === void 0 ? void 0 : _2.co2 },
|
32219
|
+
React.createElement("div", null,
|
32220
|
+
React.createElement(antd.InputNumber, { value: ((_3 = tabData.totalCo2WithLand) === null || _3 === void 0 ? void 0 : _3.co2)
|
32221
|
+
? addCommSep(Number((_4 = tabData.totalCo2WithLand) === null || _4 === void 0 ? void 0 : _4.co2))
|
32222
|
+
: (_5 = tabData.totalCo2WithLand) === null || _5 === void 0 ? void 0 : _5.co2, disabled: true })))),
|
31907
32223
|
React.createElement(antd.Col, { xl: 6 },
|
31908
|
-
React.createElement(antd.
|
31909
|
-
? addCommSep(Number((
|
31910
|
-
: (
|
32224
|
+
React.createElement(antd.Tooltip, { title: ((_6 = tabData.totalCo2WithLand) === null || _6 === void 0 ? void 0 : _6.ch4)
|
32225
|
+
? addCommSep(Number((_7 = tabData.totalCo2WithLand) === null || _7 === void 0 ? void 0 : _7.ch4))
|
32226
|
+
: (_8 = tabData.totalCo2WithLand) === null || _8 === void 0 ? void 0 : _8.ch4 },
|
32227
|
+
React.createElement("div", null,
|
32228
|
+
React.createElement(antd.InputNumber, { value: ((_9 = tabData.totalCo2WithLand) === null || _9 === void 0 ? void 0 : _9.ch4)
|
32229
|
+
? addCommSep(Number((_10 = tabData.totalCo2WithLand) === null || _10 === void 0 ? void 0 : _10.ch4))
|
32230
|
+
: (_11 = tabData.totalCo2WithLand) === null || _11 === void 0 ? void 0 : _11.ch4, disabled: true })))),
|
31911
32231
|
React.createElement(antd.Col, { xl: 6 },
|
31912
|
-
React.createElement(antd.
|
31913
|
-
? addCommSep(Number((
|
31914
|
-
: (
|
32232
|
+
React.createElement(antd.Tooltip, { title: ((_12 = tabData.totalCo2WithLand) === null || _12 === void 0 ? void 0 : _12.n2o)
|
32233
|
+
? addCommSep(Number((_13 = tabData.totalCo2WithLand) === null || _13 === void 0 ? void 0 : _13.n2o))
|
32234
|
+
: (_14 = tabData.totalCo2WithLand) === null || _14 === void 0 ? void 0 : _14.n2o },
|
32235
|
+
React.createElement("div", null,
|
32236
|
+
React.createElement(antd.InputNumber, { value: ((_15 = tabData.totalCo2WithLand) === null || _15 === void 0 ? void 0 : _15.n2o)
|
32237
|
+
? addCommSep(Number((_16 = tabData.totalCo2WithLand) === null || _16 === void 0 ? void 0 : _16.n2o))
|
32238
|
+
: (_17 = tabData.totalCo2WithLand) === null || _17 === void 0 ? void 0 : _17.n2o, disabled: true })))),
|
31915
32239
|
React.createElement(antd.Col, { xl: 6 },
|
31916
|
-
React.createElement(antd.
|
31917
|
-
? addCommSep(Number((
|
31918
|
-
: (
|
31919
|
-
|
32240
|
+
React.createElement(antd.Tooltip, { title: ((_18 = tabData.totalCo2WithLand) === null || _18 === void 0 ? void 0 : _18.co2eq)
|
32241
|
+
? addCommSep(Number((_19 = tabData.totalCo2WithLand) === null || _19 === void 0 ? void 0 : _19.co2eq))
|
32242
|
+
: (_20 = tabData.totalCo2WithLand) === null || _20 === void 0 ? void 0 : _20.co2eq },
|
32243
|
+
React.createElement("div", null,
|
32244
|
+
React.createElement(antd.InputNumber, { value: ((_21 = tabData.totalCo2WithLand) === null || _21 === void 0 ? void 0 : _21.co2eq)
|
32245
|
+
? addCommSep(Number((_22 = tabData.totalCo2WithLand) === null || _22 === void 0 ? void 0 : _22.co2eq))
|
32246
|
+
: (_23 = tabData.totalCo2WithLand) === null || _23 === void 0 ? void 0 : _23.co2eq, disabled: true })))))))))));
|
32247
|
+
}))))),
|
31920
32248
|
React.createElement(GHGUserActionConfirmationModel, { t: t, actionInfo: actionInfo, onActionConfirmed: onSubmitForm, onActionCanceled: onSaveFormCanceled, openModal: openSaveFormModal, errorMsg: errorMsg, loading: loading }),
|
31921
32249
|
React.createElement(GHGUserActionConfirmationModel, { t: t, actionInfo: actionInfo, onActionConfirmed: onSubmitForm, onActionCanceled: onFinalizeFormCanceled, openModal: openFinalizeFormModal, errorMsg: errorMsg, loading: loading }),
|
31922
32250
|
React.createElement(DiscardChangesConfirmationModel, { t: t, actionInfo: actionInfo, onActionConfirmed: resetForm, onActionCanceled: onResetFormCanceled, openModal: openResetFormModal, errorMsg: errorMsg, loading: loading })));
|
31923
32251
|
};
|
31924
32252
|
|
31925
|
-
var css_248z$1 = ".ant-tabs-tab-btn {\n padding: 5px 30px;\n text-align: center;\n font-weight: 600;\n color: rgba(58, 53, 65, 0.5); }\n\n.projection-tab-container .add-projection {\n display: flex;\n flex-direction: column;\n background-color: #ffffff;\n margin: 1rem 0 1rem 0;\n border-radius: 10px;\n padding: 0 1.5rem 2.5rem 1.5rem; }\n .projection-tab-container .add-projection .ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn {\n color: #16b1ff; }\n .projection-tab-container .add-projection .ant-tabs-ink-bar {\n position: absolute;\n background: #16b1ff !important;\n pointer-events: none; }\n .projection-tab-container .add-projection .add-new-year-picker-col {\n padding-left: 5%; }\n .projection-tab-container .add-projection .ant-picker {\n border-radius:
|
32253
|
+
var css_248z$1 = ".projection-tab-container .ant-tabs-tab-btn {\n padding: 5px 30px;\n text-align: center;\n font-weight: 600;\n color: rgba(58, 53, 65, 0.5); }\n\n.projection-tab-container .anticon-lock {\n margin-right: 0 !important; }\n\n.projection-tab-container .add-projection {\n display: flex;\n flex-direction: column;\n background-color: #ffffff;\n margin: 1rem 0 1rem 0;\n border-radius: 10px;\n padding: 0 1.5rem 2.5rem 1.5rem; }\n .projection-tab-container .add-projection .ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn {\n color: #16b1ff; }\n .projection-tab-container .add-projection .ant-tabs-ink-bar {\n position: absolute;\n background: #16b1ff !important;\n pointer-events: none; }\n .projection-tab-container .add-projection .add-new-year-picker-col {\n padding-left: 5%; }\n .projection-tab-container .add-projection .ant-picker {\n border-radius: 4px !important;\n height: 40px !important;\n width: 80%; }\n .projection-tab-container .add-projection .ant-input-suffix {\n display: flex;\n flex: none;\n align-items: center;\n height: 50px; }\n .projection-tab-container .add-projection .ant-input-suffix button {\n border: none;\n color: #8C8C8C; }\n .projection-tab-container .add-projection .ant-input-affix-wrapper {\n padding: 0 11px;\n border-radius: 5px; }\n .projection-tab-container .add-projection .add-new-upload-file-label {\n color: rgba(58, 53, 65, 0.5);\n padding: 0 0 8px;\n line-height: 1.5715;\n white-space: initial;\n text-align: left; }\n .projection-tab-container .add-projection .add-new-upload-file-name-input input {\n height: 40px;\n color: #16b1ff;\n border-radius: 4px !important; }\n .projection-tab-container .add-projection .add-new-upload-file-inner-col button {\n height: 40px;\n font-size: 12px;\n width: 120px;\n color: #8C8C8C;\n border-radius: 4px !important; }\n .projection-tab-container .add-projection .view-download-file-name-input input {\n height: 40px;\n color: #8C8C8C;\n border-radius: 4px !important; }\n .projection-tab-container .add-projection .view-download-file-inner-col button {\n height: 40px;\n font-size: 12px;\n font-weight: 400;\n width: 135px;\n margin-left: 5px;\n color: #8C8C8C;\n border-radius: 4px !important; }\n .projection-tab-container .add-projection .table-heading-row {\n padding-top: 20px;\n padding-bottom: 25px;\n margin-left: 10px !important; }\n .projection-tab-container .add-projection .table-heading-row .table-heading-col {\n text-align: center;\n font-size: 16px;\n font-weight: 700;\n color: #28282899; }\n .projection-tab-container .add-projection .total-emission-row {\n padding: 12px 16px;\n margin-left: 30px !important; }\n .projection-tab-container .add-projection .total-emission-row span {\n font-size: 18px;\n font-weight: 700;\n color: #3A3541CC; }\n .projection-tab-container .add-projection .total-emission-row .total-emission-value-col {\n border-bottom: 1px solid rgba(217, 217, 217, 0.6);\n padding-bottom: 10px; }\n .projection-tab-container .add-projection .panel-header-col {\n font-size: 16px;\n font-weight: 600;\n color: #3A3541CC; }\n .projection-tab-container .add-projection .panel-header-emission-value-col {\n border-bottom: 1px solid rgba(217, 217, 217, 0.6);\n padding-bottom: 10px; }\n .projection-tab-container .add-projection .sub-panel .panel-header-emission-value-col {\n border-bottom: none !important;\n padding-bottom: 10px; }\n .projection-tab-container .add-projection .sub-panel-heading {\n border-bottom: 1px solid rgba(217, 217, 217, 0.6);\n padding-bottom: 10px;\n margin-top: 35px; }\n .projection-tab-container .add-projection .sub-panel-heading .panel-header-col {\n font-size: 14px;\n font-weight: 600;\n color: #3A3541CC; }\n .projection-tab-container .add-projection .ant-collapse-ghost > .ant-collapse-item > .ant-collapse-content > .ant-collapse-content-box {\n padding-top: 0px;\n padding-bottom: 12px;\n margin-left: 32px; }\n .projection-tab-container .add-projection .ant-collapse-expand-icon {\n margin-top: 3px; }\n .projection-tab-container .add-projection .ant-collapse-expand-icon svg {\n font-size: 16px;\n color: #16b1ff; }\n .projection-tab-container .add-projection .ant-collapse {\n margin-left: 10px; }\n .projection-tab-container .add-projection .co2-total-pill {\n border-radius: 20px;\n background-color: rgba(145, 85, 253, 0.4);\n padding: 5px 15px;\n height: 30px;\n color: #5B5B5B;\n font-size: 12px;\n font-weight: 900;\n margin-left: auto;\n margin-right: auto;\n width: 90px;\n text-align: center;\n overflow: hidden;\n text-overflow: ellipsis; }\n .projection-tab-container .add-projection .ch4-total-pill {\n border-radius: 20px;\n background-color: rgba(217, 217, 217, 0.6);\n padding: 5px 15px;\n height: 30px;\n color: #5B5B5B;\n font-size: 12px;\n font-weight: 900;\n margin-left: auto;\n margin-right: auto;\n width: 90px;\n text-align: center;\n overflow: hidden;\n text-overflow: ellipsis; }\n .projection-tab-container .add-projection .n2o-total-pill {\n border-radius: 20px;\n background-color: rgba(185, 226, 244, 0.4);\n padding: 5px 15px;\n height: 30px;\n color: #5B5B5B;\n font-size: 12px;\n font-weight: 900;\n margin-left: auto;\n margin-right: auto;\n width: 90px;\n text-align: center;\n overflow: hidden;\n text-overflow: ellipsis; }\n .projection-tab-container .add-projection .co2eq-total-pill {\n border-radius: 20px;\n background-color: rgba(255, 166, 166, 0.6);\n padding: 5px 15px;\n height: 30px;\n color: #5B5B5B;\n font-size: 12px;\n font-weight: 900;\n margin-left: auto;\n margin-right: auto;\n width: 90px;\n text-align: center;\n overflow: hidden;\n text-overflow: ellipsis; }\n .projection-tab-container .add-projection .panel-content-row {\n border-bottom: 1px solid rgba(217, 217, 217, 0.6);\n padding-bottom: 10px;\n height: 68px;\n align-items: center; }\n .projection-tab-container .add-projection .panel-content-row .panel-content-title {\n font-size: 14px;\n font-weight: 400;\n color: #3A3541CC; }\n .projection-tab-container .add-projection .panel-content-input-box-row {\n margin-top: 14px; }\n .projection-tab-container .add-projection .panel-content-input-box-row .ant-input-number {\n height: 40px;\n margin-left: 20%; }\n .projection-tab-container .add-projection .total-co2-land-input-box-row .ant-input-number {\n margin-left: 17% !important; }\n .projection-tab-container .add-projection .total-co2-without-land-row {\n margin-left: 40px !important;\n align-items: center;\n margin-top: 10px; }\n .projection-tab-container .add-projection .total-co2-without-land-row .total-co2-without-land-title {\n font-size: 16px;\n font-weight: 600;\n color: #3A3541CC; }\n .projection-tab-container .add-projection .total-co2-without-land-row .panel-content-input-box-row {\n border-bottom: 1px solid rgba(217, 217, 217, 0.6); }\n .projection-tab-container .add-projection .total-co2-with-land-row {\n margin-left: 40px !important;\n align-items: center; }\n .projection-tab-container .add-projection .total-co2-with-land-row .total-co2-with-land-title {\n font-size: 16px;\n font-weight: 600;\n color: #3A3541CC; }\n .projection-tab-container .add-projection .total-co2-with-land-row .panel-content-input-box-row {\n border-bottom: 1px solid rgba(217, 217, 217, 0.6); }\n .projection-tab-container .add-projection .ant-input-number-input {\n text-align: center;\n height: 40px; }\n .projection-tab-container .add-projection .view-data-panel .panel-content-input-box-row {\n padding-bottom: 24px; }\n .projection-tab-container .add-projection .steps-actions {\n display: flex;\n flex-direction: row-reverse;\n margin-right: 1rem;\n margin-top: 3rem; }\n .projection-tab-container .add-projection .steps-actions .action-btn {\n border: 1px solid #16b1ff;\n color: #16b1ff;\n margin-right: 1rem; }\n .projection-tab-container .add-projection .steps-actions .submit-btn {\n margin-right: 1rem; }\n .projection-tab-container .add-projection .steps-actions .back-btn {\n border: 1px solid rgba(140, 140, 140, 0.7);\n color: rgba(140, 140, 140, 0.7);\n margin-right: 1rem; }\n .projection-tab-container .add-projection .steps-actions .mg-left-1 {\n margin-left: 1rem; }\n @media only screen and (max-width: 1600px) {\n .projection-tab-container .add-projection .panel-content-input-box-row .ant-input-number {\n margin-left: 10%; }\n .projection-tab-container .add-projection .total-co2-land-input-box-row .ant-input-number {\n margin-left: 7% !important; } }\n";
|
31926
32254
|
styleInject(css_248z$1);
|
31927
32255
|
|
31928
32256
|
var ProjectionTypes = {
|
@@ -31932,7 +32260,7 @@ var ProjectionTypes = {
|
|
31932
32260
|
};
|
31933
32261
|
|
31934
32262
|
var GHGProjectionsComponent = function (props) {
|
31935
|
-
var t = props.t;
|
32263
|
+
var t = props.t, useUserContext = props.useUserContext, useConnection = props.useConnection;
|
31936
32264
|
var userInfoState = useUserContext().userInfoState;
|
31937
32265
|
var _a = React.useState([]), data = _a[0], setData = _a[1];
|
31938
32266
|
var _b = useConnection(); _b.put; var get = _b.get, post = _b.post;
|
@@ -31969,14 +32297,24 @@ var GHGProjectionsComponent = function (props) {
|
|
31969
32297
|
var _8 = React.useState(0), otherBau = _8[0], setOtherBau = _8[1];
|
31970
32298
|
var _9 = React.useState(0), otherConditionalNdc = _9[0], setOtherConditionalNdc = _9[1];
|
31971
32299
|
var _10 = React.useState(0), otherUnconditionalNdc = _10[0], setOtherUnconditionalNdc = _10[1];
|
31972
|
-
var _11 = React.useState(
|
31973
|
-
|
31974
|
-
|
31975
|
-
|
31976
|
-
|
31977
|
-
var
|
31978
|
-
|
31979
|
-
|
32300
|
+
var _11 = React.useState({
|
32301
|
+
totalCo2WithoutLand_bau: 0,
|
32302
|
+
totalCo2WithoutLand_conditionalNdc: 0,
|
32303
|
+
totalCo2WithoutLand_unconditionalNdc: 0
|
32304
|
+
}); _11[0]; var setTotalCo2WithoutLandEmissions = _11[1];
|
32305
|
+
var _12 = React.useState({
|
32306
|
+
totalCo2WithLand_bau: 0,
|
32307
|
+
totalCo2WithLand_conditionalNdc: 0,
|
32308
|
+
totalCo2WithLand_unconditionalNdc: 0
|
32309
|
+
}); _12[0]; _12[1];
|
32310
|
+
var _13 = React.useState(false), isSavedFormDataSet = _13[0], setIsSavedFormDataSet = _13[1];
|
32311
|
+
var _14 = React.useState(1), formDataVersion = _14[0], setFormDataVersion = _14[1];
|
32312
|
+
var _15 = React.useState(false), isFormChanged = _15[0], setIsFormChanged = _15[1];
|
32313
|
+
var _16 = React.useState(false), openSaveFormModal = _16[0], setOpenSaveFormModal = _16[1];
|
32314
|
+
var _17 = React.useState(false), openFinalizeFormModal = _17[0], setOpenFinalizeFormModal = _17[1];
|
32315
|
+
var _18 = React.useState(false), openResetFormModal = _18[0], setOpenResetFormModal = _18[1];
|
32316
|
+
var _19 = React.useState(''), errorMsg = _19[0], setErrorMsg = _19[1];
|
32317
|
+
var _20 = React.useState({}), actionInfo = _20[0], setActionInfo = _20[1];
|
31980
32318
|
var Panel = antd.Collapse.Panel;
|
31981
32319
|
var form = antd.Form.useForm()[0];
|
31982
32320
|
var createSetFieldObject = function (obj, objName) {
|
@@ -33000,17 +33338,32 @@ var GHGProjectionsComponent = function (props) {
|
|
33000
33338
|
}
|
33001
33339
|
return 0;
|
33002
33340
|
};
|
33341
|
+
var handleTotalCo2WithoutLandEmissions = function (field, value) {
|
33342
|
+
setTotalCo2WithoutLandEmissions(function (prevState) {
|
33343
|
+
var _a;
|
33344
|
+
return (__assign(__assign({}, prevState), (_a = {}, _a[field] = value, _a)));
|
33345
|
+
});
|
33346
|
+
};
|
33347
|
+
// Helper function to get form field value
|
33348
|
+
var getFieldValue = function (fieldName) {
|
33349
|
+
var formValues = form.getFieldsValue(true);
|
33350
|
+
var fieldValue = formValues[fieldName];
|
33351
|
+
return (fieldValue && fieldValue >= 0) ? addCommSep(Number(fieldValue)) : fieldValue;
|
33352
|
+
};
|
33003
33353
|
var renderPanelHeader = function (panelHeading) { return (React.createElement(antd.Row, { gutter: 16 },
|
33004
33354
|
React.createElement(antd.Col, { xl: 12, md: 12, className: "panel-header-col" },
|
33005
33355
|
React.createElement("span", null, t("ghgInventory:".concat(panelHeading)))),
|
33006
33356
|
React.createElement(antd.Col, { xl: 9, md: 9, className: "panel-header-emission-value-col" },
|
33007
33357
|
React.createElement(antd.Row, { gutter: 16 },
|
33008
33358
|
React.createElement(antd.Col, { xl: 7 },
|
33009
|
-
React.createElement(
|
33359
|
+
React.createElement(antd.Tooltip, { title: addCommSep(Number(getBauSum(panelHeading))) },
|
33360
|
+
React.createElement("div", { className: "co2-total-pill" }, addCommSep(Number(getBauSum(panelHeading)))))),
|
33010
33361
|
React.createElement(antd.Col, { xl: 7 },
|
33011
|
-
React.createElement(
|
33362
|
+
React.createElement(antd.Tooltip, { title: addCommSep(Number(getConditionalNdcSum(panelHeading))) },
|
33363
|
+
React.createElement("div", { className: "ch4-total-pill" }, addCommSep(Number(getConditionalNdcSum(panelHeading)))))),
|
33012
33364
|
React.createElement(antd.Col, { xl: 7 },
|
33013
|
-
React.createElement(
|
33365
|
+
React.createElement(antd.Tooltip, { title: addCommSep(Number(getUnconditionalNdcSum(panelHeading))) },
|
33366
|
+
React.createElement("div", { className: "n2o-total-pill" }, addCommSep(Number(getUnconditionalNdcSum(panelHeading)))))))))); };
|
33014
33367
|
var renderPanelHeaderView = function (panelHeading, tabData) {
|
33015
33368
|
var projectionObject = tabData[panelHeading];
|
33016
33369
|
return (React.createElement(antd.Row, { gutter: 16 },
|
@@ -33019,11 +33372,14 @@ var GHGProjectionsComponent = function (props) {
|
|
33019
33372
|
React.createElement(antd.Col, { xl: 9, md: 9 },
|
33020
33373
|
React.createElement(antd.Row, { gutter: 16, className: "panel-header-emission-value-col" },
|
33021
33374
|
React.createElement(antd.Col, { xl: 7 },
|
33022
|
-
React.createElement(
|
33375
|
+
React.createElement(antd.Tooltip, { title: addCommSep(Number(calculateSumEmissionView(projectionObject, 'bau'))) },
|
33376
|
+
React.createElement("div", { className: "co2-total-pill" }, addCommSep(Number(calculateSumEmissionView(projectionObject, 'bau')))))),
|
33023
33377
|
React.createElement(antd.Col, { xl: 7 },
|
33024
|
-
React.createElement(
|
33378
|
+
React.createElement(antd.Tooltip, { title: addCommSep(Number(calculateSumEmissionView(projectionObject, 'conditionalNdc'))) },
|
33379
|
+
React.createElement("div", { className: "ch4-total-pill" }, addCommSep(Number(calculateSumEmissionView(projectionObject, 'conditionalNdc')))))),
|
33025
33380
|
React.createElement(antd.Col, { xl: 7 },
|
33026
|
-
React.createElement(
|
33381
|
+
React.createElement(antd.Tooltip, { title: addCommSep(Number(calculateSumEmissionView(projectionObject, 'unconditionalNdc'))) },
|
33382
|
+
React.createElement("div", { className: "n2o-total-pill" }, addCommSep(Number(calculateSumEmissionView(projectionObject, 'unconditionalNdc'))))))))));
|
33027
33383
|
};
|
33028
33384
|
var renderPanelContent = function (panelHeading, item, index) { return (React.createElement(antd.Row, { gutter: 16, key: index, className: "panel-content-row" },
|
33029
33385
|
React.createElement(antd.Col, { xl: 12, md: 12, className: "panel-content-title" },
|
@@ -33031,47 +33387,50 @@ var GHGProjectionsComponent = function (props) {
|
|
33031
33387
|
React.createElement(antd.Col, { xl: 9, md: 9 },
|
33032
33388
|
React.createElement(antd.Row, { gutter: 16, className: "panel-content-input-box-row" },
|
33033
33389
|
React.createElement(antd.Col, { xl: 7 },
|
33034
|
-
React.createElement(antd.
|
33035
|
-
|
33036
|
-
|
33037
|
-
return
|
33038
|
-
|
33039
|
-
|
33040
|
-
|
33041
|
-
|
33042
|
-
|
33043
|
-
|
33044
|
-
|
33045
|
-
|
33046
|
-
|
33390
|
+
React.createElement(antd.Tooltip, { title: getFieldValue(panelHeading + '_' + item + '_bau') },
|
33391
|
+
React.createElement(antd.Form.Item, { name: panelHeading + '_' + item + '_bau', rules: [
|
33392
|
+
{
|
33393
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
33394
|
+
return __generator(this, function (_a) {
|
33395
|
+
if (value && value < 0) {
|
33396
|
+
throw new Error();
|
33397
|
+
}
|
33398
|
+
return [2 /*return*/];
|
33399
|
+
});
|
33400
|
+
}); },
|
33401
|
+
},
|
33402
|
+
] },
|
33403
|
+
React.createElement(antd.InputNumber, { onChange: function (event) { return calculateSumBau(event, panelHeading); }, disabled: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === exports.Role.ViewOnly })))),
|
33047
33404
|
React.createElement(antd.Col, { xl: 7 },
|
33048
|
-
React.createElement(antd.
|
33049
|
-
|
33050
|
-
|
33051
|
-
return
|
33052
|
-
|
33053
|
-
|
33054
|
-
|
33055
|
-
|
33056
|
-
|
33057
|
-
|
33058
|
-
|
33059
|
-
|
33060
|
-
|
33405
|
+
React.createElement(antd.Tooltip, { title: getFieldValue(panelHeading + '_' + item + '_conditionalNdc') },
|
33406
|
+
React.createElement(antd.Form.Item, { name: panelHeading + '_' + item + '_conditionalNdc', rules: [
|
33407
|
+
{
|
33408
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
33409
|
+
return __generator(this, function (_a) {
|
33410
|
+
if (value && value < 0) {
|
33411
|
+
throw new Error();
|
33412
|
+
}
|
33413
|
+
return [2 /*return*/];
|
33414
|
+
});
|
33415
|
+
}); },
|
33416
|
+
},
|
33417
|
+
] },
|
33418
|
+
React.createElement(antd.InputNumber, { onChange: function (event) { return calculateSumConditionalNdc(event, panelHeading); }, disabled: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === exports.Role.ViewOnly })))),
|
33061
33419
|
React.createElement(antd.Col, { xl: 7 },
|
33062
|
-
React.createElement(antd.
|
33063
|
-
|
33064
|
-
|
33065
|
-
return
|
33066
|
-
|
33067
|
-
|
33068
|
-
|
33069
|
-
|
33070
|
-
|
33071
|
-
|
33072
|
-
|
33073
|
-
|
33074
|
-
|
33420
|
+
React.createElement(antd.Tooltip, { title: getFieldValue(panelHeading + '_' + item + '_unconditionalNdc') },
|
33421
|
+
React.createElement(antd.Form.Item, { name: panelHeading + '_' + item + '_unconditionalNdc', rules: [
|
33422
|
+
{
|
33423
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
33424
|
+
return __generator(this, function (_a) {
|
33425
|
+
if (value && value < 0) {
|
33426
|
+
throw new Error();
|
33427
|
+
}
|
33428
|
+
return [2 /*return*/];
|
33429
|
+
});
|
33430
|
+
}); },
|
33431
|
+
},
|
33432
|
+
] },
|
33433
|
+
React.createElement(antd.InputNumber, { onChange: function (event) { return calculateSumUnconditionalNdc(event, panelHeading); }, disabled: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === exports.Role.ViewOnly })))))))); };
|
33075
33434
|
var renderPanelContentView = function (bau, conditionalNdc, unconditionalNdc, item, index) {
|
33076
33435
|
return (React.createElement(antd.Row, { gutter: 16, key: index, className: "panel-content-row" },
|
33077
33436
|
React.createElement(antd.Col, { xl: 12, md: 12, className: "panel-content-title" },
|
@@ -33079,11 +33438,17 @@ var GHGProjectionsComponent = function (props) {
|
|
33079
33438
|
React.createElement(antd.Col, { xl: 9, md: 9 },
|
33080
33439
|
React.createElement(antd.Row, { gutter: 16, className: "panel-content-input-box-row" },
|
33081
33440
|
React.createElement(antd.Col, { xl: 7 },
|
33082
|
-
React.createElement(antd.
|
33441
|
+
React.createElement(antd.Tooltip, { title: bau ? addCommSep(Number(bau)) : bau },
|
33442
|
+
React.createElement("div", null,
|
33443
|
+
React.createElement(antd.InputNumber, { value: bau ? addCommSep(Number(bau)) : bau, disabled: true })))),
|
33083
33444
|
React.createElement(antd.Col, { xl: 7 },
|
33084
|
-
React.createElement(antd.
|
33445
|
+
React.createElement(antd.Tooltip, { title: conditionalNdc ? addCommSep(Number(conditionalNdc)) : conditionalNdc },
|
33446
|
+
React.createElement("div", null,
|
33447
|
+
React.createElement(antd.InputNumber, { value: conditionalNdc ? addCommSep(Number(conditionalNdc)) : conditionalNdc, disabled: true })))),
|
33085
33448
|
React.createElement(antd.Col, { xl: 7 },
|
33086
|
-
React.createElement(antd.
|
33449
|
+
React.createElement(antd.Tooltip, { title: unconditionalNdc ? addCommSep(Number(unconditionalNdc)) : unconditionalNdc },
|
33450
|
+
React.createElement("div", null,
|
33451
|
+
React.createElement(antd.InputNumber, { value: unconditionalNdc ? addCommSep(Number(unconditionalNdc)) : unconditionalNdc, disabled: true }))))))));
|
33087
33452
|
};
|
33088
33453
|
var objectToCSV = function (dataToDownload) {
|
33089
33454
|
var flattenObject = function (obj, prefix) {
|
@@ -33152,6 +33517,17 @@ var GHGProjectionsComponent = function (props) {
|
|
33152
33517
|
}
|
33153
33518
|
return false;
|
33154
33519
|
};
|
33520
|
+
var displayEmptyView = function () {
|
33521
|
+
if (!data || data.length === 0) {
|
33522
|
+
if ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) !== exports.CompanyRole.GOVERNMENT && (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) !== exports.CompanyRole.MINISTRY) {
|
33523
|
+
return true;
|
33524
|
+
}
|
33525
|
+
else if ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === exports.Role.ViewOnly) {
|
33526
|
+
return true;
|
33527
|
+
}
|
33528
|
+
}
|
33529
|
+
return false;
|
33530
|
+
};
|
33155
33531
|
var canViewForm = function () {
|
33156
33532
|
if ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT || (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.MINISTRY) {
|
33157
33533
|
if ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === exports.Role.ViewOnly && data.some(function (item) { return item.state === 'SAVED'; })) {
|
@@ -33169,7 +33545,9 @@ var GHGProjectionsComponent = function (props) {
|
|
33169
33545
|
React.createElement("div", { className: "title-bar" },
|
33170
33546
|
React.createElement("div", { className: "body-title" }, t("ghgInventory:projections")),
|
33171
33547
|
React.createElement("div", { className: "body-sub-title" }, t("ghgInventory:totalNationalEmissionSubTitle")))),
|
33172
|
-
React.createElement("div", { className: "content-card
|
33548
|
+
(displayEmptyView()) && (React.createElement("div", { className: "content-card empty-emission-container" },
|
33549
|
+
React.createElement(antd.Empty, { image: antd.Empty.PRESENTED_IMAGE_SIMPLE, description: React.createElement("span", null, t("ghgInventory:noProjections")) }))),
|
33550
|
+
(!displayEmptyView()) && (React.createElement("div", { className: "content-card add-projection" },
|
33173
33551
|
React.createElement(antd.Tabs, { defaultActiveKey: "Add New", centered: true },
|
33174
33552
|
(canViewForm()) && (React.createElement(antd.Tabs.TabPane, { key: "Add New", tab: t("ghgInventory:addNew") },
|
33175
33553
|
React.createElement("div", null,
|
@@ -33262,11 +33640,14 @@ var GHGProjectionsComponent = function (props) {
|
|
33262
33640
|
React.createElement(antd.Col, { xl: 9, md: 9 },
|
33263
33641
|
React.createElement(antd.Row, { gutter: 16, className: "total-emission-value-col" },
|
33264
33642
|
React.createElement(antd.Col, { xl: 7 },
|
33265
|
-
React.createElement(
|
33643
|
+
React.createElement(antd.Tooltip, { title: addCommSep(Number(totalNationalBau)) },
|
33644
|
+
React.createElement("div", { className: "co2-total-pill" }, addCommSep(Number(totalNationalBau))))),
|
33266
33645
|
React.createElement(antd.Col, { xl: 7 },
|
33267
|
-
React.createElement(
|
33646
|
+
React.createElement(antd.Tooltip, { title: addCommSep(Number(totalNationalConditionalNdc)) },
|
33647
|
+
React.createElement("div", { className: "ch4-total-pill" }, addCommSep(Number(totalNationalConditionalNdc))))),
|
33268
33648
|
React.createElement(antd.Col, { xl: 7 },
|
33269
|
-
React.createElement(
|
33649
|
+
React.createElement(antd.Tooltip, { title: addCommSep(Number(totalNationalUnconditionalNdc)) },
|
33650
|
+
React.createElement("div", { className: "n2o-total-pill" }, addCommSep(Number(totalNationalUnconditionalNdc)))))))),
|
33270
33651
|
React.createElement(antd.Collapse, { ghost: true, expandIcon: function (_a) {
|
33271
33652
|
var isActive = _a.isActive;
|
33272
33653
|
return isActive ? React.createElement(icons.MinusCircleOutlined, null) : React.createElement(icons.PlusCircleOutlined, null);
|
@@ -33293,94 +33674,100 @@ var GHGProjectionsComponent = function (props) {
|
|
33293
33674
|
React.createElement(antd.Col, { xl: 9, md: 9 },
|
33294
33675
|
React.createElement(antd.Row, { gutter: 16, className: "panel-content-input-box-row total-co2-land-input-box-row" },
|
33295
33676
|
React.createElement(antd.Col, { xl: 7 },
|
33296
|
-
React.createElement(antd.
|
33297
|
-
|
33298
|
-
|
33299
|
-
return
|
33300
|
-
|
33301
|
-
|
33302
|
-
|
33303
|
-
|
33304
|
-
|
33305
|
-
|
33306
|
-
|
33307
|
-
|
33308
|
-
|
33677
|
+
React.createElement(antd.Tooltip, { title: getFieldValue('totalCo2WithoutLand_bau') },
|
33678
|
+
React.createElement(antd.Form.Item, { name: "totalCo2WithoutLand_bau", rules: [
|
33679
|
+
{
|
33680
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
33681
|
+
return __generator(this, function (_a) {
|
33682
|
+
if (value && value < 0) {
|
33683
|
+
throw new Error();
|
33684
|
+
}
|
33685
|
+
return [2 /*return*/];
|
33686
|
+
});
|
33687
|
+
}); },
|
33688
|
+
},
|
33689
|
+
] },
|
33690
|
+
React.createElement(antd.InputNumber, { onChange: function (value) { return handleTotalCo2WithoutLandEmissions('totalCo2WithoutLand_bau', value); }, disabled: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === exports.Role.ViewOnly })))),
|
33309
33691
|
React.createElement(antd.Col, { xl: 7 },
|
33310
|
-
React.createElement(antd.
|
33311
|
-
|
33312
|
-
|
33313
|
-
return
|
33314
|
-
|
33315
|
-
|
33316
|
-
|
33317
|
-
|
33318
|
-
|
33319
|
-
|
33320
|
-
|
33321
|
-
|
33322
|
-
|
33692
|
+
React.createElement(antd.Tooltip, { title: getFieldValue('totalCo2WithoutLand_conditionalNdc') },
|
33693
|
+
React.createElement(antd.Form.Item, { name: "totalCo2WithoutLand_conditionalNdc", rules: [
|
33694
|
+
{
|
33695
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
33696
|
+
return __generator(this, function (_a) {
|
33697
|
+
if (value && value < 0) {
|
33698
|
+
throw new Error();
|
33699
|
+
}
|
33700
|
+
return [2 /*return*/];
|
33701
|
+
});
|
33702
|
+
}); },
|
33703
|
+
},
|
33704
|
+
] },
|
33705
|
+
React.createElement(antd.InputNumber, { onChange: function (value) { return handleTotalCo2WithoutLandEmissions('totalCo2WithoutLand_conditionalNdc', value); }, disabled: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === exports.Role.ViewOnly })))),
|
33323
33706
|
React.createElement(antd.Col, { xl: 7 },
|
33324
|
-
React.createElement(antd.
|
33325
|
-
|
33326
|
-
|
33327
|
-
return
|
33328
|
-
|
33329
|
-
|
33330
|
-
|
33331
|
-
|
33332
|
-
|
33333
|
-
|
33334
|
-
|
33335
|
-
|
33336
|
-
|
33707
|
+
React.createElement(antd.Tooltip, { title: getFieldValue('totalCo2WithoutLand_unconditionalNdc') },
|
33708
|
+
React.createElement(antd.Form.Item, { name: "totalCo2WithoutLand_unconditionalNdc", rules: [
|
33709
|
+
{
|
33710
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
33711
|
+
return __generator(this, function (_a) {
|
33712
|
+
if (value && value < 0) {
|
33713
|
+
throw new Error();
|
33714
|
+
}
|
33715
|
+
return [2 /*return*/];
|
33716
|
+
});
|
33717
|
+
}); },
|
33718
|
+
},
|
33719
|
+
] },
|
33720
|
+
React.createElement(antd.InputNumber, { onChange: function (value) { return handleTotalCo2WithoutLandEmissions('totalCo2WithoutLand_unconditionalNdc', value); }, disabled: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === exports.Role.ViewOnly }))))))),
|
33337
33721
|
React.createElement(antd.Row, { gutter: 16, key: 'totalCo2WithLand', className: "total-co2-with-land-row" },
|
33338
33722
|
React.createElement(antd.Col, { xl: 12, md: 12, className: "total-co2-with-land-title" },
|
33339
33723
|
React.createElement("span", null, t("ghgInventory:totalCo2WithLand"))),
|
33340
33724
|
React.createElement(antd.Col, { xl: 9, md: 9 },
|
33341
33725
|
React.createElement(antd.Row, { gutter: 16, className: "panel-content-input-box-row total-co2-land-input-box-row" },
|
33342
33726
|
React.createElement(antd.Col, { xl: 7 },
|
33343
|
-
React.createElement(antd.
|
33344
|
-
|
33345
|
-
|
33346
|
-
return
|
33347
|
-
|
33348
|
-
|
33349
|
-
|
33350
|
-
|
33351
|
-
|
33352
|
-
|
33353
|
-
|
33354
|
-
|
33355
|
-
|
33727
|
+
React.createElement(antd.Tooltip, { title: getFieldValue('totalCo2WithLand_bau') },
|
33728
|
+
React.createElement(antd.Form.Item, { name: "totalCo2WithLand_bau", rules: [
|
33729
|
+
{
|
33730
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
33731
|
+
return __generator(this, function (_a) {
|
33732
|
+
if (value && value < 0) {
|
33733
|
+
throw new Error();
|
33734
|
+
}
|
33735
|
+
return [2 /*return*/];
|
33736
|
+
});
|
33737
|
+
}); },
|
33738
|
+
},
|
33739
|
+
] },
|
33740
|
+
React.createElement(antd.InputNumber, { onChange: function (value) { return handleTotalCo2WithoutLandEmissions('totalCo2WithLand_bau', value); }, disabled: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === exports.Role.ViewOnly })))),
|
33356
33741
|
React.createElement(antd.Col, { xl: 7 },
|
33357
|
-
React.createElement(antd.
|
33358
|
-
|
33359
|
-
|
33360
|
-
return
|
33361
|
-
|
33362
|
-
|
33363
|
-
|
33364
|
-
|
33365
|
-
|
33366
|
-
|
33367
|
-
|
33368
|
-
|
33369
|
-
|
33742
|
+
React.createElement(antd.Tooltip, { title: getFieldValue('totalCo2WithLand_conditionalNdc') },
|
33743
|
+
React.createElement(antd.Form.Item, { name: "totalCo2WithLand_conditionalNdc", rules: [
|
33744
|
+
{
|
33745
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
33746
|
+
return __generator(this, function (_a) {
|
33747
|
+
if (value && value < 0) {
|
33748
|
+
throw new Error();
|
33749
|
+
}
|
33750
|
+
return [2 /*return*/];
|
33751
|
+
});
|
33752
|
+
}); },
|
33753
|
+
},
|
33754
|
+
] },
|
33755
|
+
React.createElement(antd.InputNumber, { onChange: function (value) { return handleTotalCo2WithoutLandEmissions('totalCo2WithLand_conditionalNdc', value); }, disabled: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === exports.Role.ViewOnly })))),
|
33370
33756
|
React.createElement(antd.Col, { xl: 7 },
|
33371
|
-
React.createElement(antd.
|
33372
|
-
|
33373
|
-
|
33374
|
-
return
|
33375
|
-
|
33376
|
-
|
33377
|
-
|
33378
|
-
|
33379
|
-
|
33380
|
-
|
33381
|
-
|
33382
|
-
|
33383
|
-
|
33757
|
+
React.createElement(antd.Tooltip, { title: getFieldValue('totalCo2WithLand_unconditionalNdc') },
|
33758
|
+
React.createElement(antd.Form.Item, { name: "totalCo2WithLand_unconditionalNdc", rules: [
|
33759
|
+
{
|
33760
|
+
validator: function (rule, value) { return __awaiter(void 0, void 0, void 0, function () {
|
33761
|
+
return __generator(this, function (_a) {
|
33762
|
+
if (value && value < 0) {
|
33763
|
+
throw new Error();
|
33764
|
+
}
|
33765
|
+
return [2 /*return*/];
|
33766
|
+
});
|
33767
|
+
}); },
|
33768
|
+
},
|
33769
|
+
] },
|
33770
|
+
React.createElement(antd.InputNumber, { onChange: function (value) { return handleTotalCo2WithoutLandEmissions('totalCo2WithLand_unconditionalNdc', value); }, disabled: (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) === exports.Role.ViewOnly }))))))),
|
33384
33771
|
(((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.GOVERNMENT || (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.MINISTRY)
|
33385
33772
|
&& ((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.userRole) !== exports.Role.ViewOnly)) &&
|
33386
33773
|
(React.createElement("div", { className: "steps-actions" },
|
@@ -33389,7 +33776,7 @@ var GHGProjectionsComponent = function (props) {
|
|
33389
33776
|
React.createElement(antd.Button, { className: "submit-btn", type: "primary", onClick: onOpenSaveFormModel, loading: loading }, "Submit"),
|
33390
33777
|
React.createElement(antd.Button, { className: "back-btn", onClick: onOpenResetFormModel, loading: loading }, "Cancel"))))))),
|
33391
33778
|
data.map(function (tabData) {
|
33392
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
33779
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11;
|
33393
33780
|
return tabData.state === 'FINALIZED' && (React.createElement(antd.Tabs.TabPane, { className: 'view-data-panel', key: tabData.id.toString(), tab: React.createElement("span", null,
|
33394
33781
|
tabData.year,
|
33395
33782
|
tabData.state === 'FINALIZED' && React.createElement(icons.LockFilled, { style: { marginLeft: 5 } })) },
|
@@ -33422,11 +33809,14 @@ var GHGProjectionsComponent = function (props) {
|
|
33422
33809
|
React.createElement(antd.Col, { xl: 9, md: 9, className: "total-emission-value-col" },
|
33423
33810
|
React.createElement(antd.Row, { gutter: 16 },
|
33424
33811
|
React.createElement(antd.Col, { xl: 7 },
|
33425
|
-
React.createElement(
|
33812
|
+
React.createElement(antd.Tooltip, { title: addCommSep(Number(calculateSumEmissionView(tabData, 'bau'))) },
|
33813
|
+
React.createElement("div", { className: "co2-total-pill" }, addCommSep(Number(calculateSumEmissionView(tabData, 'bau')))))),
|
33426
33814
|
React.createElement(antd.Col, { xl: 7 },
|
33427
|
-
React.createElement(
|
33815
|
+
React.createElement(antd.Tooltip, { title: addCommSep(Number(calculateSumEmissionView(tabData, 'conditionalNdc'))) },
|
33816
|
+
React.createElement("div", { className: "ch4-total-pill" }, addCommSep(Number(calculateSumEmissionView(tabData, 'conditionalNdc')))))),
|
33428
33817
|
React.createElement(antd.Col, { xl: 7 },
|
33429
|
-
React.createElement(
|
33818
|
+
React.createElement(antd.Tooltip, { title: addCommSep(Number(calculateSumEmissionView(tabData, 'unconditionalNdc'))) },
|
33819
|
+
React.createElement("div", { className: "n2o-total-pill" }, addCommSep(Number(calculateSumEmissionView(tabData, 'unconditionalNdc'))))))))),
|
33430
33820
|
React.createElement(antd.Collapse, { ghost: true, expandIcon: function (_a) {
|
33431
33821
|
var isActive = _a.isActive;
|
33432
33822
|
return isActive ? React.createElement(icons.MinusCircleOutlined, null) : React.createElement(icons.PlusCircleOutlined, null);
|
@@ -33479,41 +33869,65 @@ var GHGProjectionsComponent = function (props) {
|
|
33479
33869
|
React.createElement(antd.Col, { xl: 9, md: 9 },
|
33480
33870
|
React.createElement(antd.Row, { gutter: 16, className: "panel-content-input-box-row total-co2-land-input-box-row" },
|
33481
33871
|
React.createElement(antd.Col, { xl: 7 },
|
33482
|
-
React.createElement(antd.
|
33872
|
+
React.createElement(antd.Tooltip, { title: ((_a = tabData.totalCo2WithoutLand) === null || _a === void 0 ? void 0 : _a.bau)
|
33483
33873
|
? addCommSep(Number((_b = tabData.totalCo2WithoutLand) === null || _b === void 0 ? void 0 : _b.bau))
|
33484
|
-
: (_c = tabData.totalCo2WithoutLand) === null || _c === void 0 ? void 0 : _c.bau
|
33874
|
+
: (_c = tabData.totalCo2WithoutLand) === null || _c === void 0 ? void 0 : _c.bau },
|
33875
|
+
React.createElement("div", null,
|
33876
|
+
React.createElement(antd.InputNumber, { value: ((_d = tabData.totalCo2WithoutLand) === null || _d === void 0 ? void 0 : _d.bau)
|
33877
|
+
? addCommSep(Number((_e = tabData.totalCo2WithoutLand) === null || _e === void 0 ? void 0 : _e.bau))
|
33878
|
+
: (_f = tabData.totalCo2WithoutLand) === null || _f === void 0 ? void 0 : _f.bau, disabled: true })))),
|
33485
33879
|
React.createElement(antd.Col, { xl: 7 },
|
33486
|
-
React.createElement(antd.
|
33487
|
-
? addCommSep(Number((
|
33488
|
-
: (
|
33880
|
+
React.createElement(antd.Tooltip, { title: ((_g = tabData.totalCo2WithoutLand) === null || _g === void 0 ? void 0 : _g.conditionalNdc)
|
33881
|
+
? addCommSep(Number((_h = tabData.totalCo2WithoutLand) === null || _h === void 0 ? void 0 : _h.conditionalNdc))
|
33882
|
+
: (_j = tabData.totalCo2WithoutLand) === null || _j === void 0 ? void 0 : _j.conditionalNdc },
|
33883
|
+
React.createElement("div", null,
|
33884
|
+
React.createElement(antd.InputNumber, { value: ((_k = tabData.totalCo2WithoutLand) === null || _k === void 0 ? void 0 : _k.conditionalNdc)
|
33885
|
+
? addCommSep(Number((_l = tabData.totalCo2WithoutLand) === null || _l === void 0 ? void 0 : _l.conditionalNdc))
|
33886
|
+
: (_m = tabData.totalCo2WithoutLand) === null || _m === void 0 ? void 0 : _m.conditionalNdc, disabled: true })))),
|
33489
33887
|
React.createElement(antd.Col, { xl: 7 },
|
33490
|
-
React.createElement(antd.
|
33491
|
-
? addCommSep(Number((
|
33492
|
-
: (
|
33888
|
+
React.createElement(antd.Tooltip, { title: ((_o = tabData.totalCo2WithoutLand) === null || _o === void 0 ? void 0 : _o.unconditionalNdc)
|
33889
|
+
? addCommSep(Number((_p = tabData.totalCo2WithoutLand) === null || _p === void 0 ? void 0 : _p.unconditionalNdc))
|
33890
|
+
: (_q = tabData.totalCo2WithoutLand) === null || _q === void 0 ? void 0 : _q.unconditionalNdc },
|
33891
|
+
React.createElement("div", null,
|
33892
|
+
React.createElement(antd.InputNumber, { value: ((_r = tabData.totalCo2WithoutLand) === null || _r === void 0 ? void 0 : _r.unconditionalNdc)
|
33893
|
+
? addCommSep(Number((_s = tabData.totalCo2WithoutLand) === null || _s === void 0 ? void 0 : _s.unconditionalNdc))
|
33894
|
+
: (_t = tabData.totalCo2WithoutLand) === null || _t === void 0 ? void 0 : _t.unconditionalNdc, disabled: true })))))))),
|
33493
33895
|
(!isRowDataEmpty(tabData.totalCo2WithLand)) && (React.createElement(antd.Row, { gutter: 16, key: 'totalCo2WithLand', className: "total-co2-with-land-row total-co2-land-input-box-row" },
|
33494
33896
|
React.createElement(antd.Col, { xl: 12, md: 12, className: "total-co2-with-land-title" },
|
33495
33897
|
React.createElement("span", null, t("ghgInventory:totalCo2WithLand"))),
|
33496
33898
|
React.createElement(antd.Col, { xl: 9, md: 9 },
|
33497
33899
|
React.createElement(antd.Row, { gutter: 16, className: "panel-content-input-box-row" },
|
33498
33900
|
React.createElement(antd.Col, { xl: 7 },
|
33499
|
-
React.createElement(antd.
|
33500
|
-
? addCommSep(Number((
|
33501
|
-
: (
|
33901
|
+
React.createElement(antd.Tooltip, { title: ((_u = tabData.totalCo2WithLand) === null || _u === void 0 ? void 0 : _u.bau)
|
33902
|
+
? addCommSep(Number((_v = tabData.totalCo2WithLand) === null || _v === void 0 ? void 0 : _v.bau))
|
33903
|
+
: (_w = tabData.totalCo2WithLand) === null || _w === void 0 ? void 0 : _w.bau },
|
33904
|
+
React.createElement("div", null,
|
33905
|
+
React.createElement(antd.InputNumber, { value: ((_x = tabData.totalCo2WithLand) === null || _x === void 0 ? void 0 : _x.bau)
|
33906
|
+
? addCommSep(Number((_y = tabData.totalCo2WithLand) === null || _y === void 0 ? void 0 : _y.bau))
|
33907
|
+
: (_z = tabData.totalCo2WithLand) === null || _z === void 0 ? void 0 : _z.bau, disabled: true })))),
|
33502
33908
|
React.createElement(antd.Col, { xl: 7 },
|
33503
|
-
React.createElement(antd.
|
33504
|
-
? addCommSep(Number((
|
33505
|
-
: (
|
33909
|
+
React.createElement(antd.Tooltip, { title: ((_0 = tabData.totalCo2WithLand) === null || _0 === void 0 ? void 0 : _0.conditionalNdc)
|
33910
|
+
? addCommSep(Number((_1 = tabData.totalCo2WithLand) === null || _1 === void 0 ? void 0 : _1.conditionalNdc))
|
33911
|
+
: (_2 = tabData.totalCo2WithLand) === null || _2 === void 0 ? void 0 : _2.conditionalNdc },
|
33912
|
+
React.createElement("div", null,
|
33913
|
+
React.createElement(antd.InputNumber, { value: ((_3 = tabData.totalCo2WithLand) === null || _3 === void 0 ? void 0 : _3.conditionalNdc)
|
33914
|
+
? addCommSep(Number((_4 = tabData.totalCo2WithLand) === null || _4 === void 0 ? void 0 : _4.conditionalNdc))
|
33915
|
+
: (_5 = tabData.totalCo2WithLand) === null || _5 === void 0 ? void 0 : _5.conditionalNdc, disabled: true })))),
|
33506
33916
|
React.createElement(antd.Col, { xl: 7 },
|
33507
|
-
React.createElement(antd.
|
33508
|
-
? addCommSep(Number((
|
33509
|
-
: (
|
33510
|
-
|
33917
|
+
React.createElement(antd.Tooltip, { title: ((_6 = tabData.totalCo2WithLand) === null || _6 === void 0 ? void 0 : _6.unconditionalNdc)
|
33918
|
+
? addCommSep(Number((_7 = tabData.totalCo2WithLand) === null || _7 === void 0 ? void 0 : _7.unconditionalNdc))
|
33919
|
+
: (_8 = tabData.totalCo2WithLand) === null || _8 === void 0 ? void 0 : _8.unconditionalNdc },
|
33920
|
+
React.createElement("div", null,
|
33921
|
+
React.createElement(antd.InputNumber, { value: ((_9 = tabData.totalCo2WithLand) === null || _9 === void 0 ? void 0 : _9.unconditionalNdc)
|
33922
|
+
? addCommSep(Number((_10 = tabData.totalCo2WithLand) === null || _10 === void 0 ? void 0 : _10.unconditionalNdc))
|
33923
|
+
: (_11 = tabData.totalCo2WithLand) === null || _11 === void 0 ? void 0 : _11.unconditionalNdc, disabled: true })))))))))));
|
33924
|
+
}))))),
|
33511
33925
|
React.createElement(GHGUserActionConfirmationModel, { t: t, actionInfo: actionInfo, onActionConfirmed: onSubmitForm, onActionCanceled: onSaveFormCanceled, openModal: openSaveFormModal, errorMsg: errorMsg, loading: loading }),
|
33512
33926
|
React.createElement(GHGUserActionConfirmationModel, { t: t, actionInfo: actionInfo, onActionConfirmed: onSubmitForm, onActionCanceled: onFinalizeFormCanceled, openModal: openFinalizeFormModal, errorMsg: errorMsg, loading: loading }),
|
33513
33927
|
React.createElement(DiscardChangesConfirmationModel, { t: t, actionInfo: actionInfo, onActionConfirmed: resetForm, onActionCanceled: onResetFormCanceled, openModal: openResetFormModal, errorMsg: errorMsg, loading: loading })));
|
33514
33928
|
};
|
33515
33929
|
|
33516
|
-
var css_248z = ".mapboxgl-popup-content {\n background-color: #ffffff !important;\n color: rgba(58, 53, 65, 0.8) !important; }\n\n.mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip {\n border-top-color: #ffffff !important; }\n\n.mapboxgl-popup-close-button,\n.mapboxgl-popup-close-button:hover {\n display: none; }\n\n.total-container {\n display: flex;\n flex-direction: column;\n border: 1px solid gray; }\n\n.annual-report {\n display: flex;\n margin-top: 30px;\n margin-left: 22px; }\n\n.ant-btn.annual-report-downloadbutton {\n border-radius: 0px 5px 5px 0px !important; }\n\n.ant-btn.annual-report-dropdownbutton {\n margin-left: 20px;\n border-radius: 5px 0px 0px 0px !important; }\n\n.margin-top-6 {\n margin-top: 7.5rem; }\n\n.margin-top-2 {\n margin-top: 2rem; }\n\n.margin-top-1 {\n margin-top: 1rem; }\n\n.ant-btn.ghg-primary {\n border-radius: 0px 5px 5px 0px !important; }\n\n.ant-btn.ghg-default {\n border-radius: 5px 0px 0px 5px !important; }\n\n.ant-btn.mid-default-btn {\n border-radius: 0px 0px 0px 0px !important; }\n\n.cards-title {\n font-family: \"Inter\";\n align-items: flex-start;\n justify-content: flex-start;\n font-style: normal;\n font-weight: 600;\n height: 50px;\n font-size: 1.15rem;\n margin-top: 1rem;\n color: rgba(58, 53, 65, 0.8); }\n\n.dashboard-main-container {\n width: 100%;\n display: flex;\n flex-direction: column;\n border-radius: 5px;\n padding: 0 2rem 0 2rem; }\n .dashboard-main-container .header-and-title {\n display: flex;\n flex-direction: row;\n width: 100%;\n padding: 0 15px 0 15px;\n font-family: \"Inter-Regular\";\n font-size: 1.4rem;\n font-weight: 600; }\n .dashboard-main-container .stastics-cards-container {\n display: flex;\n flex-direction: row;\n width: 100%;\n align-items: center;\n justify-content: center; }\n .dashboard-main-container .stastics-cards-container .stastic-card-row {\n width: 100%; }\n .dashboard-main-container .stastics-cards-container .stastic-card-row .stastic-card-col {\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center; }\n .dashboard-main-container .filter-container {\n display: flex;\n flex-direction: row;\n width: 100%;\n align-items: center;\n justify-content: space-between;\n margin-top: 2rem;\n padding: 0 1.2rem 0 1.2rem; }\n .dashboard-main-container .filter-container .radio-selection .ant-radio-button-wrapper {\n height: 35px !important;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n color: rgba(58, 53, 65, 0.5); }\n .dashboard-main-container .filter-container .radio-selection .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled)::before {\n background-color: transparent !important; }\n .dashboard-main-container .filter-container .radio-selection .overall {\n border-radius: 5px 0 0 5px !important; }\n .dashboard-main-container .filter-container .radio-selection .mine {\n border-radius: 0 5px 5px 0 !important; }\n .dashboard-main-container .center {\n align-items: center;\n justify-content: center; }\n .dashboard-main-container .height-pie-rem {\n height: 26.2rem; }\n .dashboard-main-container .height-pie-rem .apexcharts-legend {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between !important; }\n .dashboard-main-container .height-pie-rem .apexcharts-legend-series {\n display: flex !important;\n width: 38%; }\n .dashboard-main-container .height-bar-rem {\n height: 29rem; }\n .dashboard-main-container .height-map-rem {\n height: 510px; }\n .dashboard-main-container .statics-and-charts-container {\n display: flex;\n flex-direction: row;\n width: 100%;\n margin-top: 2rem;\n margin-bottom: 2rem; }\n .dashboard-main-container .statics-and-charts-container .ant-picker-cell-in-view.ant-picker-cell-selected .ant-picker-cell-inner {\n width: 65px !important;\n height: 32px !important;\n text-align: center !important;\n border-radius: 50px !important;\n background: #16b1ff !important;\n line-height: 30px !important; }\n .dashboard-main-container .statics-and-charts-container .ant-picker-cell-in-view.ant-picker-cell-range-end .ant-picker-cell-inner {\n width: 65px !important;\n height: 32px !important;\n text-align: center !important;\n border-radius: 50px !important;\n background: #16b1ff !important;\n line-height: 30px !important; }\n .dashboard-main-container .statics-and-charts-container .ant-picker-cell-disabled::before {\n width: 65px !important;\n height: 32px !important;\n text-align: center !important;\n border-radius: 50px !important;\n line-height: 30px !important; }\n .dashboard-main-container .statics-and-charts-container .ant-picker-cell::before {\n left: 11px; }\n .dashboard-main-container .statics-and-charts-container .statics-card-row {\n width: 100%; }\n .dashboard-main-container .statics-and-charts-container .statics-card-row .statics-card-col .statics-card {\n display: flex;\n flex-direction: column;\n background-color: #ffffff;\n border-radius: 10px;\n padding: 0 1rem 0.7rem 1rem;\n width: 100%; }\n .dashboard-main-container .statics-and-charts-container .statics-card-row .statics-card-col .statics-card .margin-top-2 {\n width: 100%;\n margin-top: 2rem; }\n .dashboard-main-container .statics-and-charts-container .statics-card-row .statics-card-col .statics-card .title-section {\n display: flex;\n flex-direction: row;\n align-items: flex-end;\n justify-content: space-between;\n width: 100%;\n padding: 1rem 1rem 0 1rem; }\n .dashboard-main-container .statics-and-charts-container .statics-card-row .statics-card-col .statics-card .title-section .title {\n font-family: \"Inter\";\n font-style: normal;\n font-weight: 600;\n width: 90%;\n font-size: 1.15rem;\n color: rgba(58, 53, 65, 0.8); }\n .dashboard-main-container .statics-and-charts-container .statics-card-row .statics-card-col .statics-card .title-section .info-container {\n display: flex;\n flex-direction: row;\n width: 10%;\n height: 30px;\n align-items: center;\n justify-content: flex-end; }\n .dashboard-main-container .statics-and-charts-container .statics-card-row .statics-card-col .statics-card .total-programme-details {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n height: 150px;\n margin-top: -0.5rem; }\n .dashboard-main-container .statics-and-charts-container .statics-card-row .statics-card-col .statics-card .total-programme-details .details {\n display: flex;\n flex-direction: column;\n width: 70%;\n padding: 0 1rem 0 0.8rem; }\n .dashboard-main-container .statics-and-charts-container .statics-card-row .statics-card-col .statics-card .total-programme-details .details .detail {\n font-family: \"Inter\";\n font-style: normal;\n font-weight: 400;\n font-size: 0.875rem;\n line-height: 1.375rem;\n padding-left: 0.125rem;\n color: rgba(58, 53, 65, 0.8);\n margin-bottom: 0.5rem; }\n .dashboard-main-container .statics-and-charts-container .statics-card-row .statics-card-col .statics-card .total-programme-details .details .value {\n font-family: \"Inter\";\n font-style: normal;\n font-weight: 600;\n font-size: 1.6rem;\n line-height: 22px;\n padding-left: 0.125rem;\n padding: 0;\n color: #16b1ff; }\n .dashboard-main-container .statics-and-charts-container .statics-card-row .statics-card-col .statics-card .total-programme-details .icon {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n width: 30%; }\n .dashboard-main-container .statics-and-charts-container .statics-card-row .statics-card-col .statics-card .total-programme-details .icon img {\n height: 80px; }\n .dashboard-main-container .statics-and-charts-container .statics-card-row .statics-card-col .statics-card .stage-legends {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n margin-top: 1rem; }\n .dashboard-main-container .statics-and-charts-container .statics-card-row .statics-card-col .statics-card .updated-on {\n display: flex;\n flex-direction: row;\n align-items: flex-end;\n justify-content: flex-start;\n padding: 0 1rem 0 0.8rem;\n height: 50px; }\n .dashboard-main-container .statics-and-charts-container .statics-card-row .statics-card-col .statics-card .updated-on .updated-moment-container {\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 color: #16b1ff;\n background-color: rgba(185, 226, 244, 0.4); }\n .dashboard-main-container .statics-and-charts-container .statics-card-row .statics-card-col .statics-card .charts-top {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n padding: 0 1rem 0 1rem; }\n .dashboard-main-container .statics-and-charts-container .statics-card-row .statics-card-col .statics-card .charts-top .charts-title {\n display: flex;\n flex-direction: row;\n font-family: \"Inter\";\n align-items: flex-start;\n justify-content: flex-start;\n font-style: normal;\n font-weight: 400;\n height: 50px;\n font-size: 20px;\n margin-top: 1rem;\n color: rgba(58, 53, 65, 0.8); }\n .dashboard-main-container .statics-and-charts-container .statics-card-row .statics-card-col .statics-card .charts-top .charts-title .unit {\n display: flex;\n margin: 0 0 0 0.5rem;\n font-family: \"Inter\";\n font-size: 1.15rem;\n font-weight: 500;\n color: rgba(58, 53, 65, 0.5); }\n .dashboard-main-container .statics-and-charts-container .statics-card-row .statics-card-col .statics-card .charts-top .info-container {\n display: flex;\n flex-direction: row;\n align-items: center; }\n .dashboard-main-container .statics-and-charts-container .statics-card-row .statics-card-col .statics-card .charts-section {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%; }\n .dashboard-main-container .statics-and-charts-container .statics-card-row .statics-card-col .statics-card .charts-section chart {\n width: 1000px !important; }\n .dashboard-main-container .actual-estimate-btn-grp {\n padding-right: 30px;\n font-size: 13px;\n font-weight: 600;\n text-align: center;\n color: #3A354180; }\n .dashboard-main-container .actual-estimate-btn-grp .ant-btn-default {\n width: 90px;\n color: #3A354180;\n border: 1px solid #3A354180; }\n .dashboard-main-container .actual-estimate-btn-grp .ant-btn-primary {\n width: 90px; }\n .dashboard-main-container .actual-estimate-btn-grp .ant-btn span {\n text-transform: none; }\n .dashboard-main-container .actual-estimate-btn-grp .ant-radio-button-wrapper {\n border: 1px solid #3A354180 !important;\n color: #3A354180 !important;\n width: 90px !important; }\n .dashboard-main-container .actual-estimate-btn-grp .ant-radio-button-wrapper-checked {\n background-color: #16b1ff !important;\n color: #ffffff !important; }\n .dashboard-main-container .actual-estimate-btn-grp .actual-btn {\n border-radius: 4px 0 0 4px !important; }\n .dashboard-main-container .actual-estimate-btn-grp .estimate-btn {\n border-radius: 0 4px 4px 0 !important; }\n .dashboard-main-container .statics-card:hover {\n box-shadow: rgba(0, 5, 18, 0.2) 0px 8px 24px; }\n .dashboard-main-container .stastics-charts-container-total-programmes {\n display: flex;\n flex-direction: row;\n width: 98%;\n margin: 60px 10px 25px 15px; }\n .dashboard-main-container .stastics-charts-container-total-programmes .stastic-charts-row {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n width: 100%; }\n .dashboard-main-container .stastics-charts-container-total-programmes .stastic-charts-row .stastic-charts-col {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n width: 100%; }\n .dashboard-main-container .stastics-charts-container-total-programmes .stastic-charts-row .stastic-charts-col .chart-card {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 400px;\n background: #f6f6f6;\n box-shadow: rgba(106, 106, 106, 0.2) 0px 8px 24px;\n border-radius: 10px;\n padding: 10px 10px 10px 10px; }\n .dashboard-main-container .stastics-charts-container-total-programmes .stastic-charts-row .stastic-charts-col .chart-card:hover {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n width: 100%;\n background: #f1f1f1;\n box-shadow: rgba(124, 124, 124, 0.2) 0px 8px 24px;\n border-radius: 10px;\n padding: 10px 10px 10px 10px; }\n .dashboard-main-container .stastics-charts-container-certified-programmes {\n display: flex;\n flex-direction: row;\n width: 98%;\n margin: 5px 10px 25px 15px; }\n .dashboard-main-container .stastics-charts-container-certified-programmes .stastic-charts-row {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n width: 100%; }\n .dashboard-main-container .stastics-charts-container-certified-programmes .stastic-charts-row .stastic-charts-col {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n width: 100%; }\n .dashboard-main-container .stastics-charts-container-certified-programmes .stastic-charts-row .stastic-charts-col .chart-card {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 400px;\n background: #f6f6f6;\n box-shadow: rgba(106, 106, 106, 0.2) 0px 8px 24px;\n border-radius: 10px;\n padding: 10px 10px 10px 10px; }\n .dashboard-main-container .stastics-charts-container-certified-programmes .stastic-charts-row .stastic-charts-col .chart-card:hover {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n width: 100%;\n background: #f1f1f1;\n box-shadow: rgba(124, 124, 124, 0.2) 0px 8px 24px;\n border-radius: 10px;\n padding: 10px 10px 10px 10px; }\n .dashboard-main-container .stastics-pie-charts-container {\n display: flex;\n flex-direction: row;\n width: 98%;\n margin: 5px 10px 25px 15px; }\n .dashboard-main-container .stastics-pie-charts-container .stastic-charts-row {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n width: 100%; }\n .dashboard-main-container .stastics-pie-charts-container .stastic-charts-row .stastic-charts-col {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n width: 100%; }\n .dashboard-main-container .stastics-pie-charts-container .stastic-charts-row .stastic-charts-col .chart-card {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 400px;\n background: #f6f6f6;\n box-shadow: rgba(106, 106, 106, 0.2) 0px 8px 24px;\n border-radius: 10px;\n padding: 10px 10px 10px 10px; }\n .dashboard-main-container .stastics-pie-charts-container .stastic-charts-row .stastic-charts-col .chart-card:hover {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n width: 100%;\n background: #f1f1f1;\n box-shadow: rgba(124, 124, 124, 0.2) 0px 8px 24px;\n border-radius: 10px;\n padding: 10px 10px 10px 10px; }\n .dashboard-main-container .maps-container {\n display: flex;\n flex-direction: row;\n border-radius: 10px;\n margin: 25px 20px 25px 15px;\n height: auto; }\n .dashboard-main-container .maps-container .maps-container-row {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n width: 100%; }\n .dashboard-main-container .maps-container .maps-container-row .maps-container-col {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n width: 100%; }\n";
|
33930
|
+
var css_248z = ".mapboxgl-popup-content {\n background-color: #ffffff !important;\n color: rgba(58, 53, 65, 0.8) !important; }\n\n.mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip {\n border-top-color: #ffffff !important; }\n\n.mapboxgl-popup-close-button,\n.mapboxgl-popup-close-button:hover {\n display: none; }\n\n.total-container {\n display: flex;\n flex-direction: column;\n border: 1px solid gray; }\n\n.annual-report {\n display: flex;\n margin-top: 30px;\n margin-left: 22px; }\n\n.ant-btn.annual-report-downloadbutton {\n border-radius: 0px 5px 5px 0px !important; }\n\n.ant-btn.annual-report-dropdownbutton {\n margin-left: 20px;\n border-radius: 5px 0px 0px 0px !important; }\n\n.margin-top-6 {\n margin-top: 7.5rem; }\n\n.margin-top-2 {\n margin-top: 2rem; }\n\n.margin-top-1 {\n margin-top: 1rem; }\n\n.ant-btn.ghg-primary {\n border-radius: 0px 5px 5px 0px !important; }\n\n.ant-btn.ghg-default {\n border-radius: 5px 0px 0px 5px !important; }\n\n.ant-btn.mid-default-btn {\n border-radius: 0px 0px 0px 0px !important; }\n\n.cards-title {\n font-family: \"Inter\";\n align-items: flex-start;\n justify-content: flex-start;\n font-style: normal;\n font-weight: 600;\n height: 50px;\n font-size: 1.15rem;\n margin-top: 1rem;\n color: rgba(58, 53, 65, 0.8); }\n\n.ghg-dashboard-main-container {\n width: 100%;\n display: flex;\n flex-direction: column;\n border-radius: 5px;\n padding: 0 2rem 0 2rem; }\n .ghg-dashboard-main-container .header-and-title {\n display: flex;\n flex-direction: row;\n width: 100%;\n padding: 0 15px 0 15px;\n font-family: \"Inter-Regular\";\n font-size: 1.4rem;\n font-weight: 600; }\n .ghg-dashboard-main-container .stastics-cards-container {\n display: flex;\n flex-direction: row;\n width: 100%;\n align-items: center;\n justify-content: center; }\n .ghg-dashboard-main-container .stastics-cards-container .stastic-card-row {\n width: 100%; }\n .ghg-dashboard-main-container .stastics-cards-container .stastic-card-row .stastic-card-col {\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center; }\n .ghg-dashboard-main-container .filter-container {\n display: flex;\n flex-direction: row;\n width: 100%;\n align-items: center;\n justify-content: space-between;\n margin-top: 2rem;\n padding: 0 1.2rem 0 1.2rem; }\n .ghg-dashboard-main-container .filter-container .radio-selection .ant-radio-button-wrapper {\n height: 35px !important;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n color: rgba(58, 53, 65, 0.5); }\n .ghg-dashboard-main-container .filter-container .radio-selection .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled)::before {\n background-color: transparent !important; }\n .ghg-dashboard-main-container .filter-container .radio-selection .overall {\n border-radius: 5px 0 0 5px !important; }\n .ghg-dashboard-main-container .filter-container .radio-selection .mine {\n border-radius: 0 5px 5px 0 !important; }\n .ghg-dashboard-main-container .center {\n align-items: center;\n justify-content: center; }\n .ghg-dashboard-main-container .height-pie-rem {\n height: 26.2rem; }\n .ghg-dashboard-main-container .height-pie-rem .apexcharts-legend {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between !important; }\n .ghg-dashboard-main-container .height-pie-rem .apexcharts-legend-series {\n display: flex !important;\n width: 38%; }\n .ghg-dashboard-main-container .apx-legend-position-bottom {\n height: 35px !important; }\n .ghg-dashboard-main-container .height-bar-rem {\n height: 29rem; }\n .ghg-dashboard-main-container .height-map-rem {\n height: 510px; }\n .ghg-dashboard-main-container .statics-and-charts-container {\n display: flex;\n flex-direction: row;\n width: 100%;\n margin-top: 2rem;\n margin-bottom: 2rem; }\n .ghg-dashboard-main-container .statics-and-charts-container .ant-picker-cell-in-view.ant-picker-cell-selected .ant-picker-cell-inner {\n width: 65px !important;\n height: 32px !important;\n text-align: center !important;\n border-radius: 50px !important;\n background: #16b1ff !important;\n line-height: 30px !important; }\n .ghg-dashboard-main-container .statics-and-charts-container .ant-picker-cell-in-view.ant-picker-cell-range-end .ant-picker-cell-inner {\n width: 65px !important;\n height: 32px !important;\n text-align: center !important;\n border-radius: 50px !important;\n background: #16b1ff !important;\n line-height: 30px !important; }\n .ghg-dashboard-main-container .statics-and-charts-container .ant-picker-cell-disabled::before {\n width: 65px !important;\n height: 32px !important;\n text-align: center !important;\n border-radius: 50px !important;\n line-height: 30px !important; }\n .ghg-dashboard-main-container .statics-and-charts-container .ant-picker-cell::before {\n left: 11px; }\n .ghg-dashboard-main-container .statics-and-charts-container .statics-card-row {\n width: 100%; }\n .ghg-dashboard-main-container .statics-and-charts-container .statics-card-row .statics-card-col .statics-card {\n display: flex;\n flex-direction: column;\n background-color: #ffffff;\n border-radius: 10px;\n padding: 0 1rem 0.7rem 1rem;\n width: 100%; }\n .ghg-dashboard-main-container .statics-and-charts-container .statics-card-row .statics-card-col .statics-card .margin-top-2 {\n width: 100%;\n margin-top: 2rem; }\n .ghg-dashboard-main-container .statics-and-charts-container .statics-card-row .statics-card-col .statics-card .title-section {\n display: flex;\n flex-direction: row;\n align-items: flex-end;\n justify-content: space-between;\n width: 100%;\n padding: 1rem 1rem 0 1rem; }\n .ghg-dashboard-main-container .statics-and-charts-container .statics-card-row .statics-card-col .statics-card .title-section .title {\n font-family: \"Inter\";\n font-style: normal;\n font-weight: 600;\n width: 90%;\n font-size: 1.15rem;\n color: rgba(58, 53, 65, 0.8); }\n .ghg-dashboard-main-container .statics-and-charts-container .statics-card-row .statics-card-col .statics-card .title-section .info-container {\n display: flex;\n flex-direction: row;\n width: 10%;\n height: 30px;\n align-items: center;\n justify-content: flex-end; }\n .ghg-dashboard-main-container .statics-and-charts-container .statics-card-row .statics-card-col .statics-card .total-programme-details {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n height: 150px;\n margin-top: -0.5rem; }\n .ghg-dashboard-main-container .statics-and-charts-container .statics-card-row .statics-card-col .statics-card .total-programme-details .details {\n display: flex;\n flex-direction: column;\n width: 70%;\n padding: 0 1rem 0 0.8rem; }\n .ghg-dashboard-main-container .statics-and-charts-container .statics-card-row .statics-card-col .statics-card .total-programme-details .details .detail {\n font-family: \"Inter\";\n font-style: normal;\n font-weight: 400;\n font-size: 0.875rem;\n line-height: 1.375rem;\n padding-left: 0.125rem;\n color: rgba(58, 53, 65, 0.8);\n margin-bottom: 0.5rem; }\n .ghg-dashboard-main-container .statics-and-charts-container .statics-card-row .statics-card-col .statics-card .total-programme-details .details .value {\n font-family: \"Inter\";\n font-style: normal;\n font-weight: 600;\n font-size: 1.6rem;\n line-height: 22px;\n padding-left: 0.125rem;\n padding: 0;\n color: #16b1ff; }\n .ghg-dashboard-main-container .statics-and-charts-container .statics-card-row .statics-card-col .statics-card .total-programme-details .icon {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n width: 30%; }\n .ghg-dashboard-main-container .statics-and-charts-container .statics-card-row .statics-card-col .statics-card .total-programme-details .icon img {\n height: 80px; }\n .ghg-dashboard-main-container .statics-and-charts-container .statics-card-row .statics-card-col .statics-card .stage-legends {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n margin-top: 1rem; }\n .ghg-dashboard-main-container .statics-and-charts-container .statics-card-row .statics-card-col .statics-card .updated-on {\n display: flex;\n flex-direction: row;\n align-items: flex-end;\n justify-content: flex-start;\n padding: 0 1rem 0 0.8rem;\n height: 50px; }\n .ghg-dashboard-main-container .statics-and-charts-container .statics-card-row .statics-card-col .statics-card .updated-on .updated-moment-container {\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 color: #16b1ff;\n background-color: rgba(185, 226, 244, 0.4); }\n .ghg-dashboard-main-container .statics-and-charts-container .statics-card-row .statics-card-col .statics-card .charts-top {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n padding: 0 1rem 0 1rem; }\n .ghg-dashboard-main-container .statics-and-charts-container .statics-card-row .statics-card-col .statics-card .charts-top .charts-title {\n display: flex;\n flex-direction: row;\n font-family: \"Inter\";\n align-items: flex-start;\n justify-content: flex-start;\n font-style: normal;\n font-weight: 700;\n height: 50px;\n font-size: 18px;\n margin-top: 1rem;\n color: rgba(58, 53, 65, 0.8); }\n .ghg-dashboard-main-container .statics-and-charts-container .statics-card-row .statics-card-col .statics-card .charts-top .charts-title .unit {\n display: flex;\n margin: 0 0 0 0.5rem;\n font-family: \"Inter\";\n font-size: 1.15rem;\n font-weight: 500;\n color: rgba(58, 53, 65, 0.5); }\n .ghg-dashboard-main-container .statics-and-charts-container .statics-card-row .statics-card-col .statics-card .charts-top .info-container {\n display: flex;\n flex-direction: row;\n align-items: center; }\n .ghg-dashboard-main-container .statics-and-charts-container .statics-card-row .statics-card-col .statics-card .charts-section {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%; }\n .ghg-dashboard-main-container .statics-and-charts-container .statics-card-row .statics-card-col .statics-card .charts-section chart {\n width: 1000px !important; }\n .ghg-dashboard-main-container .actual-estimate-btn-grp {\n padding-right: 30px;\n font-size: 13px;\n font-weight: 600;\n text-align: center;\n color: #3A354180; }\n .ghg-dashboard-main-container .actual-estimate-btn-grp .ant-btn-default {\n width: 90px;\n color: #3A354180;\n border: 1px solid #3A354180; }\n .ghg-dashboard-main-container .actual-estimate-btn-grp .ant-btn-primary {\n width: 90px; }\n .ghg-dashboard-main-container .actual-estimate-btn-grp .ant-btn span {\n text-transform: none; }\n .ghg-dashboard-main-container .actual-estimate-btn-grp .ant-radio-button-wrapper {\n border: 1px solid #3A354180 !important;\n color: #3A354180 !important;\n width: 90px !important; }\n .ghg-dashboard-main-container .actual-estimate-btn-grp .ant-radio-button-wrapper-checked {\n background-color: #16b1ff !important;\n color: #ffffff !important; }\n .ghg-dashboard-main-container .actual-estimate-btn-grp .actual-btn {\n border-radius: 4px 0 0 4px !important; }\n .ghg-dashboard-main-container .actual-estimate-btn-grp .estimate-btn {\n border-radius: 0 4px 4px 0 !important; }\n .ghg-dashboard-main-container .statics-card:hover {\n box-shadow: rgba(0, 5, 18, 0.2) 0px 8px 24px; }\n .ghg-dashboard-main-container .stastics-charts-container-total-programmes {\n display: flex;\n flex-direction: row;\n width: 98%;\n margin: 60px 10px 25px 15px; }\n .ghg-dashboard-main-container .stastics-charts-container-total-programmes .stastic-charts-row {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n width: 100%; }\n .ghg-dashboard-main-container .stastics-charts-container-total-programmes .stastic-charts-row .stastic-charts-col {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n width: 100%; }\n .ghg-dashboard-main-container .stastics-charts-container-total-programmes .stastic-charts-row .stastic-charts-col .chart-card {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 400px;\n background: #f6f6f6;\n box-shadow: rgba(106, 106, 106, 0.2) 0px 8px 24px;\n border-radius: 10px;\n padding: 10px 10px 10px 10px; }\n .ghg-dashboard-main-container .stastics-charts-container-total-programmes .stastic-charts-row .stastic-charts-col .chart-card:hover {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n width: 100%;\n background: #f1f1f1;\n box-shadow: rgba(124, 124, 124, 0.2) 0px 8px 24px;\n border-radius: 10px;\n padding: 10px 10px 10px 10px; }\n .ghg-dashboard-main-container .stastics-charts-container-certified-programmes {\n display: flex;\n flex-direction: row;\n width: 98%;\n margin: 5px 10px 25px 15px; }\n .ghg-dashboard-main-container .stastics-charts-container-certified-programmes .stastic-charts-row {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n width: 100%; }\n .ghg-dashboard-main-container .stastics-charts-container-certified-programmes .stastic-charts-row .stastic-charts-col {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n width: 100%; }\n .ghg-dashboard-main-container .stastics-charts-container-certified-programmes .stastic-charts-row .stastic-charts-col .chart-card {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 400px;\n background: #f6f6f6;\n box-shadow: rgba(106, 106, 106, 0.2) 0px 8px 24px;\n border-radius: 10px;\n padding: 10px 10px 10px 10px; }\n .ghg-dashboard-main-container .stastics-charts-container-certified-programmes .stastic-charts-row .stastic-charts-col .chart-card:hover {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n width: 100%;\n background: #f1f1f1;\n box-shadow: rgba(124, 124, 124, 0.2) 0px 8px 24px;\n border-radius: 10px;\n padding: 10px 10px 10px 10px; }\n .ghg-dashboard-main-container .stastics-pie-charts-container {\n display: flex;\n flex-direction: row;\n width: 98%;\n margin: 5px 10px 25px 15px; }\n .ghg-dashboard-main-container .stastics-pie-charts-container .stastic-charts-row {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n width: 100%; }\n .ghg-dashboard-main-container .stastics-pie-charts-container .stastic-charts-row .stastic-charts-col {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n width: 100%; }\n .ghg-dashboard-main-container .stastics-pie-charts-container .stastic-charts-row .stastic-charts-col .chart-card {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 400px;\n background: #f6f6f6;\n box-shadow: rgba(106, 106, 106, 0.2) 0px 8px 24px;\n border-radius: 10px;\n padding: 10px 10px 10px 10px; }\n .ghg-dashboard-main-container .stastics-pie-charts-container .stastic-charts-row .stastic-charts-col .chart-card:hover {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n width: 100%;\n background: #f1f1f1;\n box-shadow: rgba(124, 124, 124, 0.2) 0px 8px 24px;\n border-radius: 10px;\n padding: 10px 10px 10px 10px; }\n .ghg-dashboard-main-container .maps-container {\n display: flex;\n flex-direction: row;\n border-radius: 10px;\n margin: 25px 20px 25px 15px;\n height: auto; }\n .ghg-dashboard-main-container .maps-container .maps-container-row {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n width: 100%; }\n .ghg-dashboard-main-container .maps-container .maps-container-row .maps-container-col {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n width: 100%; }\n";
|
33517
33931
|
styleInject(css_248z);
|
33518
33932
|
|
33519
33933
|
var BarChartEstimatedActualStatComponent = function (props) {
|
@@ -33694,7 +34108,7 @@ var totalEmissionOptionsSub = function (labels, chartColors) {
|
|
33694
34108
|
position: 'bottom',
|
33695
34109
|
horizontalAlign: 'center',
|
33696
34110
|
floating: false,
|
33697
|
-
fontSize: '
|
34111
|
+
fontSize: '14px',
|
33698
34112
|
fontFamily: 'Inter',
|
33699
34113
|
fontWeight: 400,
|
33700
34114
|
formatter: undefined,
|
@@ -33710,12 +34124,12 @@ var totalEmissionOptionsSub = function (labels, chartColors) {
|
|
33710
34124
|
useSeriesColors: false,
|
33711
34125
|
},
|
33712
34126
|
markers: {
|
33713
|
-
width:
|
33714
|
-
height:
|
34127
|
+
width: 12,
|
34128
|
+
height: 12,
|
33715
34129
|
strokeWidth: 0,
|
33716
34130
|
strokeColor: '#fff',
|
33717
34131
|
fillColors: chartColors,
|
33718
|
-
radius:
|
34132
|
+
radius: 12,
|
33719
34133
|
customHTML: undefined,
|
33720
34134
|
onClick: undefined,
|
33721
34135
|
offsetX: 0,
|
@@ -33915,7 +34329,7 @@ var emissionComparisonOptionsSub = function (labels, chartColors) {
|
|
33915
34329
|
],
|
33916
34330
|
xaxis: {
|
33917
34331
|
title: {
|
33918
|
-
text: '',
|
34332
|
+
text: 'Year',
|
33919
34333
|
style: {
|
33920
34334
|
color: '#263238',
|
33921
34335
|
fontSize: '12px',
|
@@ -34000,12 +34414,12 @@ var emissionComparisonOptionsSub = function (labels, chartColors) {
|
|
34000
34414
|
useSeriesColors: false,
|
34001
34415
|
},
|
34002
34416
|
markers: {
|
34003
|
-
width: [
|
34004
|
-
height: [
|
34417
|
+
width: [12, 12, 12, 33],
|
34418
|
+
height: [12, 12, 12, 2],
|
34005
34419
|
strokeWidth: 0,
|
34006
34420
|
strokeColor: '#fff',
|
34007
34421
|
fillColors: __spreadArray(__spreadArray([], chartColors, true), ['#16B1FF'], false),
|
34008
|
-
radius:
|
34422
|
+
radius: 12,
|
34009
34423
|
customHTML: undefined,
|
34010
34424
|
onClick: undefined,
|
34011
34425
|
offsetX: 0,
|
@@ -34027,7 +34441,7 @@ var emissionComparisonOptionsSub = function (labels, chartColors) {
|
|
34027
34441
|
|
34028
34442
|
var RangePicker = antd.DatePicker.RangePicker;
|
34029
34443
|
var GHGDashboardComponent = function (props) {
|
34030
|
-
var t = props.t, Chart = props.Chart, ButtonGroup = props.ButtonGroup, Link = props.Link, isMultipleDashboardsVisible = props.isMultipleDashboardsVisible;
|
34444
|
+
var t = props.t, useUserContext = props.useUserContext, useConnection = props.useConnection, Chart = props.Chart, ButtonGroup = props.ButtonGroup, Link = props.Link, isMultipleDashboardsVisible = props.isMultipleDashboardsVisible;
|
34031
34445
|
var _a = useConnection(); _a.get; var post = _a.post; _a.delete;
|
34032
34446
|
var userInfoState = useUserContext().userInfoState;
|
34033
34447
|
var _b = React.useState(moment().year()), endYear = _b[0], setEndYear = _b[1];
|
@@ -34045,7 +34459,6 @@ var GHGDashboardComponent = function (props) {
|
|
34045
34459
|
[exports.GhgStatCardTypes.AGG_REDUCTION_PERCENT_BAU_BY_SECTOR],
|
34046
34460
|
[exports.GhgStatCardTypes.AGG_EMISSIONS_COMPARISON],
|
34047
34461
|
];
|
34048
|
-
var TTSuffix = (userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === exports.CompanyRole.PROGRAMME_DEVELOPER ? 'My' : '';
|
34049
34462
|
var handleResize = function () {
|
34050
34463
|
setScreenWidth(window.innerWidth);
|
34051
34464
|
};
|
@@ -34190,7 +34603,7 @@ var GHGDashboardComponent = function (props) {
|
|
34190
34603
|
aggType: exports.GhgStatCardTypes.AGG_EMISSIONS_BY_SECTOR,
|
34191
34604
|
configs: {
|
34192
34605
|
title: t('emissionsBySectorTitle'),
|
34193
|
-
tooltip: t('emissionsBySectorTT'
|
34606
|
+
tooltip: t('emissionsBySectorTT'),
|
34194
34607
|
colors: colors,
|
34195
34608
|
chartColumnWidth: 12,
|
34196
34609
|
chartWidth: 490,
|
@@ -34205,7 +34618,7 @@ var GHGDashboardComponent = function (props) {
|
|
34205
34618
|
aggType: exports.GhgStatCardTypes.AGG_EMISSIONS_BY_GAS,
|
34206
34619
|
configs: {
|
34207
34620
|
title: t('emissionsByGasTitle'),
|
34208
|
-
tooltip: t('emissionsByGasTT'
|
34621
|
+
tooltip: t('emissionsByGasTT'),
|
34209
34622
|
colors: colors,
|
34210
34623
|
chartColumnWidth: 12,
|
34211
34624
|
chartWidth: 490,
|
@@ -34219,7 +34632,7 @@ var GHGDashboardComponent = function (props) {
|
|
34219
34632
|
aggType: exports.GhgStatCardTypes.AGG_EMISSIONS_MITIGATION_POTENTIAL_BY_SECTOR,
|
34220
34633
|
configs: {
|
34221
34634
|
title: t('emissionsMitigationPotentialBySectorTitle'),
|
34222
|
-
tooltip: t('emissionsMitigationPotentialBySectorTT'
|
34635
|
+
tooltip: t('emissionsMitigationPotentialBySectorTT'),
|
34223
34636
|
colors: colors,
|
34224
34637
|
chartColumnWidth: 24,
|
34225
34638
|
chartWidth: screenWidth * 0.72,
|
@@ -34233,7 +34646,7 @@ var GHGDashboardComponent = function (props) {
|
|
34233
34646
|
aggType: exports.GhgStatCardTypes.AGG_REDUCTION_PERCENT_BAU_BY_SECTOR,
|
34234
34647
|
configs: {
|
34235
34648
|
title: t('emissionsReductionPercentageBySectorTitle'),
|
34236
|
-
tooltip: t('emissionsReductionPercentageBySectorTT'
|
34649
|
+
tooltip: t('emissionsReductionPercentageBySectorTT'),
|
34237
34650
|
colors: colors,
|
34238
34651
|
chartColumnWidth: 24,
|
34239
34652
|
chartWidth: screenWidth * 0.72,
|
@@ -34247,7 +34660,7 @@ var GHGDashboardComponent = function (props) {
|
|
34247
34660
|
aggType: exports.GhgStatCardTypes.AGG_EMISSIONS_COMPARISON,
|
34248
34661
|
configs: {
|
34249
34662
|
title: t('emissionsComparisonTitle'),
|
34250
|
-
tooltip: t('emissionsComparisonTT'
|
34663
|
+
tooltip: t('emissionsComparisonTT'),
|
34251
34664
|
colors: colorsComparison,
|
34252
34665
|
chartColumnWidth: 24,
|
34253
34666
|
chartWidth: screenWidth * 0.72,
|
@@ -34391,7 +34804,7 @@ var GHGDashboardComponent = function (props) {
|
|
34391
34804
|
React.createElement(BarChartEstimatedActualStatComponent, { id: obj.aggType, title: obj.configs.title, estimateOptions: estimateData ? getChartOptions(d.data[2], getColorsForPercentageCharts(estimateData), obj.aggType) : [], actualOptions: actualData ? getChartOptions(d.data[3], getColorsForPercentageCharts(actualData), obj.aggType) : [], actualSeries: d.data[1], estimatedSeries: d.data[0], loading: loadingCharts, toolTipText: obj.configs.tooltip, Chart: Chart, lastUpdateEstimate: d.data[4], lastUpdateActual: d.data[5], width: obj.configs.chartWidth })));
|
34392
34805
|
}
|
34393
34806
|
};
|
34394
|
-
return (React.createElement("div", { className: "dashboard-main-container" },
|
34807
|
+
return (React.createElement("div", { className: "ghg-dashboard-main-container" },
|
34395
34808
|
isMultipleDashboardsVisible && (React.createElement("div", { className: "systemchange-container", style: { marginLeft: "20px" } },
|
34396
34809
|
React.createElement(ButtonGroup, { "aria-label": "outlined button group" },
|
34397
34810
|
React.createElement(Link, { to: "/dashboard" },
|
@@ -34419,7 +34832,6 @@ exports.CoBenifitsComponent = CoBenifitsComponent;
|
|
34419
34832
|
exports.Company = Company;
|
34420
34833
|
exports.CompanyManagementComponent = CompanyManagementComponent;
|
34421
34834
|
exports.CompanyProfileComponent = CompanyProfileComponent;
|
34422
|
-
exports.ConnectionContextProvider = ConnectionContextProvider;
|
34423
34835
|
exports.CreditTransferComponent = CreditTransferComponent;
|
34424
34836
|
exports.DevBGColor = DevBGColor;
|
34425
34837
|
exports.DevColor = DevColor;
|
@@ -34467,8 +34879,6 @@ exports.RejectDocumentationConfirmationModel = RejectDocumentationConfirmationMo
|
|
34467
34879
|
exports.RoleIcon = RoleIcon;
|
34468
34880
|
exports.RootBGColor = RootBGColor;
|
34469
34881
|
exports.RootColor = RootColor;
|
34470
|
-
exports.SettingsContext = SettingsContext;
|
34471
|
-
exports.SettingsContextProvider = SettingsContextProvider;
|
34472
34882
|
exports.StasticCard = StasticCard;
|
34473
34883
|
exports.SupportCreationComponent = SupportCreationComponent;
|
34474
34884
|
exports.SupportManagementComponent = SupportManagementComponent;
|
@@ -34477,8 +34887,6 @@ exports.TooltipColor = TooltipColor;
|
|
34477
34887
|
exports.TransferActionModel = TransferActionModel;
|
34478
34888
|
exports.UnitField = UnitField;
|
34479
34889
|
exports.User = User;
|
34480
|
-
exports.UserContext = UserContext;
|
34481
|
-
exports.UserInformationContextProvider = UserInformationContextProvider;
|
34482
34890
|
exports.UserManagementComponent = UserManagementComponent;
|
34483
34891
|
exports.UserProfileComponent = UserProfileComponent;
|
34484
34892
|
exports.UserRoleIcon = UserRoleIcon;
|
@@ -34520,7 +34928,4 @@ exports.ndcActionTypeList = ndcActionTypeList;
|
|
34520
34928
|
exports.sectorMitigationTypesListMapped = sectorMitigationTypesListMapped;
|
34521
34929
|
exports.sumArray = sumArray;
|
34522
34930
|
exports.titleList = titleList;
|
34523
|
-
exports.useConnection = useConnection;
|
34524
|
-
exports.useSettingsContext = useSettingsContext;
|
34525
|
-
exports.useUserContext = useUserContext;
|
34526
34931
|
//# sourceMappingURL=index.js.map
|