Posts

Showing posts from May, 2025

api-hook->hoom-page-hook->use-get-policy-details.ts

  import { useQuery } from "@tanstack/react-query" ; import { policyDetails } from "@/api/api-wrapper" ; const usePolicyDetails = ( policyGroupSeqId : string ) => { const { refetch : refetchPolicyDetails , data : policyDetailsData , isLoading : isPolicyDetailsLoading , isSuccess : isPolicyDetailsSuccess , } = useQuery ({ queryKey : [ 'policyList' , policyGroupSeqId ], queryFn : () => policyDetails ( policyGroupSeqId ), enabled : !! policyGroupSeqId , refetchOnMount : false , }); return { refetchPolicyDetails , policyDetailsData , isPolicyDetailsLoading , isPolicyDetailsSuccess }; }; export default usePolicyDetails ;

quickconsultation navbar

{ /* Navigarion bar start */ } < div css = { [ flex ( "row" , "justify-start" , "items-center" ), gap ( 2 ), padding ( 5 , "x" ), padding ( 5 , "y" ), border ( 2 , "bottom" ), screen ( "md" , border ( 0 , "bottom" )), { position : "sticky" , top : 0 , backgroundColor : THEME_COLORS [ "white" ] , zIndex : 10 , }, ] } > < ArrowForwardIcon css = { { transform : "rotate(180deg)" , cursor : "pointer" } } onClick = { handleNavigateBack } /> < div css = { [ flex ( "row" , "justify-between" ), { width : 288 }, gap ( 4 ) ] } > < div css = { [ padding ( 1 , "y" ) ] } > < Text variant = "...

submitquickconsultation

hi.. // console.log('radhe',data); // const totalHeightInInches = Number(data.quickconsultationDetails.heightFt) * 12 + Number(data.quickconsultationDetails.heightIn); // console.log('radhe radhe',selectedPatient); // console.log('radhe radhe radhe',dependentSlug); // if(selectedPatient===false&&dependentSlug){ // console.log('update','/api/hospital-app/patient/profile/update/') // } // if(selectedPatient===true&&dependentSlug===""){ // console.log('update','/api/hospital-app/patient/profile/create/') // } kjdfk 

radio and option drawer data

  < Box css = { [ margin ( 2 , 'bottom' ) ] } > { /* map */ } < Box border = { 1 } color = "gray-600" padding = { 4 } css = { [ flex ( 'row' ) ] } > < Radio value = "radhe" checked = { true } color = "primary" // label="Are we cool now?" onChange = { m => console . log ( m ) } /> < Box css = { [ flex ( 'column' ) ] } > < Text variant = "header-4" color = "gray-600" > { /* {member.name} */ } XYZ </ Text > < Text variant = "body-1" color = "gray-300" > Main { /* {member.relation} */ } </ Text > </ Box > </ Box > < Button type = "submit" css = { [ isPhone ? css ( [ { width : '100%' } ...

adding route

  { path : "healthblog" , children : [ { index : true, element : < HealthBlog /> , }, { path : ":blogFile/:description" , element : < HealthBlogDetails /> , }, ] , }, console . error ( "Invalid URI component:" , value );

 folder health-blog-header:--- import { border , padding , flex , gap , screen , margin } from "@ebh/capsule/theme" ; import { Text } from "@ebh/capsule" ; import { THEME_COLORS } from "../../../theme/color" ; import { useScreen } from "@ebh/capsule/hooks" ; import { useNavigate } from "react-router" ; import { ArrowForwardIcon , ArrowChevronRight } from "@ebh/capsule/icons" ; export default function Blogheader () { const isPhone = ! useScreen ( "md" ); const navigate = useNavigate (); const handleNavigateBack = () => { navigate ( - 1 ); }; return ( <> < div css = { [ flex ( "row" , "justify-start" , "items-center" ), gap ( 2 ), padding ( 3 , "x" ), padding ( 3 , "y" ), border ( 2 , "bottom" ), { position : ...

react-pdf-viewer-core

  import { Worker , Viewer } from "@react-pdf-viewer/core" ; import "@react-pdf-viewer/core/lib/styles/index.css" ; import "@react-pdf-viewer/default-layout/lib/styles/index.css" ; import { useParams } from "react-router" ; import Blogheader from "../health-blog-header/blog-header.tsx" ; // Helper function to safely decode URL components const safeDecode = ( value ? : string ) => { try { return decodeURIComponent ( value ?? "" ); } catch ( e ) { console . error ( "Invalid URI component:" , value ); return value ?? "" ; } }; export default function BlogDetails () { const { blogFile , description } = useParams (); const fileUrl = safeDecode ( blogFile ); // const decodedDescription = safeDecode(description); return ( < div > { /* Top Navigation Bar */ } < Blogheader /> { /* PDF Viewer */ } < div > ...

navbar vhcportal

import { ArrowForwardIcon , ArrowChevronRight } from "@ebh/capsule/icons" ; import { THEME_COLORS } from "../../theme/color" ;   import { flex , margin , border } from "@ebh/capsule/theme" ; import { padding , screen , radius , gap , colors , background , } from "@ebh/capsule/theme" ; { /* <div> */ } { /* Navigarion bar section*/ } { /* <div css={[ flex("row", "justify-start", "items-center"), gap(2), padding(3, "x"), padding(3, "y"), border(2, "bottom"), { position: "sticky", top: 0, backgroundColor: THEME_COLORS["white"], zIndex: 10, }, screen( "md", border(0, "bottom"), padding(20, "x"), ...

timeline

 tsx import React from 'react' ; import './ConsultationSteps.css' ; const steps = [ { number : '01' , label : 'Select Specialist' , imgSrc : '/images/specialist.png' , color : '#F59E0B' , }, { number : '02' , label : 'Ask Questions' , imgSrc : '/images/questions.png' , color : '#16A34A' , }, { number : '03' , label : 'Get your answers' , imgSrc : '/images/answers.png' , color : '#B91C1C' , }, ] ; const ConsultationSteps = () => { return ( < div className = "consultation-steps-container" > < div className = "consultation-steps" > { steps . map (( step , index ) => ( < div key = { index } className = { `step ${ index % 2 === 1 ? 'reverse' : '' } ` } > ...

learning first page

  import { ArrowForwardIcon } from "@ebh/capsule/icons" import { background , flex } from "@ebh/capsule/theme" import { padding , gap , border , margin , screen } from "@ebh/capsule/theme" import { THEME_COLORS } from "../../../theme/color" import { Text } from "@ebh/capsule" import { useNavigate } from 'react-router-dom' ; import { useScreen } from "@ebh/capsule/hooks" ; import { FormProvider } from "react-hook-form" ; import ResetButtonWithModal from "../../../common/reset-button-with-modal" import { Button } from "@ebh/capsule" import { css } from "@emotion/react" import { ConditionDetails } from "../QuickConsultationConditionForm" export default function QuickConsultationForm () { return ( <> { /* Navigarion bar start */ } < div css = { [ flex ( "row" , ...