Commit 82bf06e8 by jaymehta

pincode

1 parent e2e91aa2
...@@ -312,7 +312,10 @@ const ActivityDetails = ({ isUpdate }) => { ...@@ -312,7 +312,10 @@ const ActivityDetails = ({ isUpdate }) => {
return; return;
} }
let pincodeDataSet = await pincodeSearchByFilter(pin); let pincodeDataSet = await pincodeSearchByFilter(pin);
// console.log("pincodeData", pincodeDataSet.data.data); console.log("pincodeDataSet.data.data", pincodeDataSet.data.data);
// if (pincodeDataSet.data.data.length > 0) {
// return { label: "no values available" };
// }
setPinCodeData(pincodeDataSet.data.data); setPinCodeData(pincodeDataSet.data.data);
}; };
...@@ -342,7 +345,7 @@ const ActivityDetails = ({ isUpdate }) => { ...@@ -342,7 +345,7 @@ const ActivityDetails = ({ isUpdate }) => {
// useEffect(() => { // useEffect(() => {
// dispatch(updateActivityById(8)) // dispatch(updateActivityById(8))
// }, []) // }, [])
console.log("pincodeData", pincodeData && pincodeData.length > 0);
console.log("activityById", activityById); console.log("activityById", activityById);
console.log("activityPeriodState", activityPeriodState); console.log("activityPeriodState", activityPeriodState);
return ( return (
...@@ -585,11 +588,11 @@ const ActivityDetails = ({ isUpdate }) => { ...@@ -585,11 +588,11 @@ const ActivityDetails = ({ isUpdate }) => {
id="basic-behaviors-example" id="basic-behaviors-example"
labelKey="name" labelKey="name"
options={ options={
pincodeData && pincodeData && pincodeData.length > 0
pincodeData.length > 0 && ? pincodeData.map(item => {
pincodeData.map(item => { return { name: item.attributes.name, id: item.id };
return { name: item.attributes.name, id: item.id }; })
}) : [{}]
} }
placeholder="Choose a pincode" placeholder="Choose a pincode"
ref={ref} ref={ref}
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!