@undp/carbon-library 1.0.135-CARBON-343.14 → 1.0.135-CARBON-343.15
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/index.js +9 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +9 -0
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
@@ -23616,6 +23616,7 @@ var NdcDetailsComponent = function (props) {
|
|
23616
23616
|
var _c = useState([]), periodItems = _c[0], setPeriodItems = _c[1];
|
23617
23617
|
var _d = useState("add_new"), selectedTab = _d[0], setSelectedTab = _d[1];
|
23618
23618
|
var selectedPeriod = useRef({});
|
23619
|
+
var addedNdcDetailId = useRef(0);
|
23619
23620
|
var userInfoState = useUserContext().userInfoState;
|
23620
23621
|
var isAddRangeVisible = function () {
|
23621
23622
|
return (((userInfoState === null || userInfoState === void 0 ? void 0 : userInfoState.companyRole) === CompanyRole.MINISTRY ||
|
@@ -23678,7 +23679,9 @@ var NdcDetailsComponent = function (props) {
|
|
23678
23679
|
});
|
23679
23680
|
function onAddNewNdcDetail() {
|
23680
23681
|
var range = selectedTab.split("-");
|
23682
|
+
addedNdcDetailId.current = addedNdcDetailId.current + 1;
|
23681
23683
|
var newData = {
|
23684
|
+
key: addedNdcDetailId.current,
|
23682
23685
|
startDate: new Date("".concat(Number(range[0]), "-01-24 23:12:00")),
|
23683
23686
|
endDate: new Date("".concat(Number(range[0]), "-12-24 23:12:00")),
|
23684
23687
|
nationalPlanObj: t("ndc:enterNewPlanTxt"),
|
@@ -23770,30 +23773,35 @@ var NdcDetailsComponent = function (props) {
|
|
23770
23773
|
useEffect(function () {
|
23771
23774
|
var defaultNdcDetails = [
|
23772
23775
|
{
|
23776
|
+
key: 1,
|
23773
23777
|
startDate: new Date("2019-03-25"),
|
23774
23778
|
endDate: new Date("2020-03-25"),
|
23775
23779
|
nationalPlanObj: "Enhance value addition in key growth opportunities",
|
23776
23780
|
kpi: 25,
|
23777
23781
|
},
|
23778
23782
|
{
|
23783
|
+
key: 2,
|
23779
23784
|
startDate: new Date("2019-03-25"),
|
23780
23785
|
endDate: new Date("2019-08-25"),
|
23781
23786
|
nationalPlanObj: "Strengthen the private sector to create 10,000 jobs",
|
23782
23787
|
kpi: 10500,
|
23783
23788
|
},
|
23784
23789
|
{
|
23790
|
+
key: 3,
|
23785
23791
|
startDate: new Date("2021-03-25"),
|
23786
23792
|
endDate: new Date("2022-03-25"),
|
23787
23793
|
nationalPlanObj: "Consolidate and increase the stock and quality of productive infrastructure by 50%",
|
23788
23794
|
kpi: 48,
|
23789
23795
|
},
|
23790
23796
|
{
|
23797
|
+
key: 4,
|
23791
23798
|
startDate: new Date("2022-03-25"),
|
23792
23799
|
endDate: new Date("2022-05-25"),
|
23793
23800
|
nationalPlanObj: "Enhance the productivity and social wellbeing of the population",
|
23794
23801
|
kpi: 20,
|
23795
23802
|
},
|
23796
23803
|
{
|
23804
|
+
key: 5,
|
23797
23805
|
startDate: new Date("2022-03-25"),
|
23798
23806
|
endDate: new Date("2023-03-25"),
|
23799
23807
|
nationalPlanObj: "Strengthen the role of the state in guiding and facilitating development",
|
@@ -23825,6 +23833,7 @@ var NdcDetailsComponent = function (props) {
|
|
23825
23833
|
children: addNewPeriodContent(),
|
23826
23834
|
});
|
23827
23835
|
}
|
23836
|
+
addedNdcDetailId.current = 5;
|
23828
23837
|
setPeriodItems(initialPeriods);
|
23829
23838
|
periodItemsRef.current = initialPeriods;
|
23830
23839
|
setNdcDetailsData(defaultNdcDetails);
|