Incomplete Steps Modal old code for filtering steps
Thu Dec 28 2023 05:00:26 GMT+0000 (Coordinated Universal Time)
Saved by @alfred555 #react.js
// useEffect(() => { // setIsLoading(true); // setTimeout(() => { // if (fromWillPreview && isSpouseSelected) { // // From WillPreview of Spouse // setList( // steps.filter((s: any) => s.bookedForProfileGuid === profileGuid), // ); // List should contain incomplete steps of Main Testator // // setIsLoading(false); // } // if (fromUploadDocs) { // const guid = isSpouseSelected ? spouseGuid : profileGuid; // setList(steps.filter((s: any) => s.bookedForProfileGuid === guid)); // // setIsLoading(false); // } // if (fromWillPreview && !isSpouseSelected) { // // From WillPreview of Main Testator // setList( // steps.filter((s: any) => s.bookedForProfileGuid === spouseGuid), // ); // List should contain incomplete steps of spouse // // setIsLoading(false); // } // setIsLoading(false); // }, 2000); // }, [steps, isSpouseSelected, fromWillPreview, fromUploadDocs]); // useEffect(() => { // setIsLoading(true); // setTimeout(() => { // if (fromWillPreview && isSpouseSelected) { // // From WillPreview of Spouse // setList( // steps.filter((s: any) => s.bookedForProfileGuid === profileGuid), // ); // List should contain incomplete steps of Main Testator // } // setIsLoading(false); // }, 2000); // }, [steps, fromWillPreview, isSpouseSelected]); // // Incomplete steps listing from submit button in Modify Appointment // useEffect(() => { // setTimeout(() => { // setList( // steps.filter((s: any) => (s.bookedForProfileGuid === isSpouseSelected ? spouseGuid : profileGuid)), // ); // }, 1000); // }, [steps, isSpouseSelected]); // ---------------------------->>> // useEffect(() => { // if (fromWillPreview && !isSpouseSelected) { // From WillPreview of Main Testator // setTimeout(() => { // setList(steps?.filter((s: any) => s.bookedForProfileGuid === spouseGuid)); // List should contain incomplete steps of spouse // }, 1000); // } // }, [steps, fromWillPreview, isSpouseSelected]); // useEffect(() => { // if (fromUploadDocs) { // const guid = isSpouseSelected ? spouseGuid : profileGuid; // setList( // steps.filter((s: any) => (s.bookedForProfileGuid === guid)), // ); // } // }, [steps, fromUploadDocs, isSpouseSelected]);
Comments