@undp/carbon-library 1.0.135-ghg-inventory.12.17 → 1.0.135-ghg-inventory.12.18
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/index.js +32 -14
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +32 -14
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
@@ -29462,14 +29462,23 @@ var GHGEmissionsComponent = function (props) {
|
|
29462
29462
|
setOpenFinalizeFormModal(false);
|
29463
29463
|
};
|
29464
29464
|
var onOpenFinalizeFormModel = function () {
|
29465
|
-
|
29466
|
-
|
29467
|
-
|
29468
|
-
|
29469
|
-
|
29465
|
+
form
|
29466
|
+
.validateFields()
|
29467
|
+
.then(function (values) {
|
29468
|
+
// Validation successful, set ActionInfo and open the form modal
|
29469
|
+
setActionInfo({
|
29470
|
+
action: "".concat(t("ghgInventory:finalize")),
|
29471
|
+
headerText: "".concat(t("ghgInventory:finalizeModelHeader")),
|
29472
|
+
type: "primary",
|
29473
|
+
icon: React.createElement(ClipboardCheck, null),
|
29474
|
+
});
|
29475
|
+
setErrorMsg('');
|
29476
|
+
setOpenFinalizeFormModal(true);
|
29477
|
+
})
|
29478
|
+
.catch(function (errorInfo) {
|
29479
|
+
// Validation failed
|
29480
|
+
console.log('Validation failed:', errorInfo);
|
29470
29481
|
});
|
29471
|
-
setErrorMsg('');
|
29472
|
-
setOpenFinalizeFormModal(true);
|
29473
29482
|
};
|
29474
29483
|
var onSubmitForm = function (remarks, status) { return __awaiter(void 0, void 0, void 0, function () {
|
29475
29484
|
var fields, payload, response, messageContent, error_1;
|
@@ -31002,14 +31011,23 @@ var GHGProjectionsComponent = function (props) {
|
|
31002
31011
|
setOpenFinalizeFormModal(false);
|
31003
31012
|
};
|
31004
31013
|
var onOpenFinalizeFormModel = function () {
|
31005
|
-
|
31006
|
-
|
31007
|
-
|
31008
|
-
|
31009
|
-
|
31014
|
+
form
|
31015
|
+
.validateFields()
|
31016
|
+
.then(function (values) {
|
31017
|
+
// Validation successful, set ActionInfo and open the form modal
|
31018
|
+
setActionInfo({
|
31019
|
+
action: "".concat(t("ghgInventory:finalize")),
|
31020
|
+
headerText: "".concat(t("ghgInventory:finalizeModelHeader")),
|
31021
|
+
type: "primary",
|
31022
|
+
icon: React.createElement(ClipboardCheck, null),
|
31023
|
+
});
|
31024
|
+
setErrorMsg('');
|
31025
|
+
setOpenFinalizeFormModal(true);
|
31026
|
+
})
|
31027
|
+
.catch(function (errorInfo) {
|
31028
|
+
// Validation failed
|
31029
|
+
console.log('Validation failed:', errorInfo);
|
31010
31030
|
});
|
31011
|
-
setErrorMsg('');
|
31012
|
-
setOpenFinalizeFormModal(true);
|
31013
31031
|
};
|
31014
31032
|
var getProjectionData = function () { return __awaiter(void 0, void 0, void 0, function () {
|
31015
31033
|
var response, error_1;
|