@undp/carbon-library 1.0.135-ghg-inventory.12.17 → 1.0.135-ghg-inventory.12.19

Sign up to get free protection for your applications and to get access to all the features.
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
- setActionInfo({
29466
- action: "".concat(t("ghgInventory:finalize")),
29467
- headerText: "".concat(t("ghgInventory:finalizeModelHeader")),
29468
- type: "primary",
29469
- icon: React.createElement(ClipboardCheck, null),
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
- setActionInfo({
31006
- action: "".concat(t("ghgInventory:finalize")),
31007
- headerText: "".concat(t("ghgInventory:finalizeModelHeader")),
31008
- type: "primary",
31009
- icon: React.createElement(ClipboardCheck, null),
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;
@@ -32066,7 +32084,7 @@ var totalEmissionOptionsSub = function (labels, chartColors) {
32066
32084
  color: '#263238',
32067
32085
  fontSize: '12px',
32068
32086
  fontFamily: 'Inter',
32069
- fontWeight: 400,
32087
+ fontWeight: 500,
32070
32088
  cssClass: 'apexcharts-yaxis-title',
32071
32089
  },
32072
32090
  },
@@ -32234,7 +32252,7 @@ var actualVsEstimateOptionsSub = function (labels, chartColors) {
32234
32252
  color: '#263238',
32235
32253
  fontSize: '12px',
32236
32254
  fontFamily: 'Inter',
32237
- fontWeight: 400,
32255
+ fontWeight: 500,
32238
32256
  cssClass: 'apexcharts-yaxis-title',
32239
32257
  },
32240
32258
  },
@@ -32356,7 +32374,7 @@ var emissionComparisonOptionsSub = function (labels, chartColors) {
32356
32374
  color: '#263238',
32357
32375
  fontSize: '12px',
32358
32376
  fontFamily: 'Inter',
32359
- fontWeight: 400,
32377
+ fontWeight: 500,
32360
32378
  cssClass: 'apexcharts-yaxis-title',
32361
32379
  },
32362
32380
  },