diff --git a/src/components/RecurringExpense/RecurringExpenseList.jsx b/src/components/RecurringExpense/RecurringExpenseList.jsx
index a4c45fba..c1bb9e13 100644
--- a/src/components/RecurringExpense/RecurringExpenseList.jsx
+++ b/src/components/RecurringExpense/RecurringExpenseList.jsx
@@ -166,7 +166,6 @@ const RecurringExpenseList = ({ search, filterStatuses }) => {
}
);
};
-console.log("Tanish",filteredData)
return (
<>
{IsDeleteModalOpen && (
diff --git a/src/components/ServiceProject/ManageServiceProject.jsx b/src/components/ServiceProject/ManageServiceProject.jsx
index f16b18eb..1d5b0e66 100644
--- a/src/components/ServiceProject/ManageServiceProject.jsx
+++ b/src/components/ServiceProject/ManageServiceProject.jsx
@@ -222,10 +222,7 @@ const ManageServiceProject = ({ serviceProjectId, onClose }) => {
type="text"
className="form-control form-control-sm"
{...register("contactName")}
- placeholder="Enter Employee name.."
- onInput={(e) => {
- e.target.value = e.target.value.replace(/[^A-Za-z ]/g, "");
- }}
+ placeholder="Enter Employee name.."
/>
{errors?.contactName && (
{errors.contactName.message}
diff --git a/src/components/ServiceProject/ServiceProjectBranch/ServiceBranch.jsx b/src/components/ServiceProject/ServiceProjectBranch/ServiceBranch.jsx
index c1d17365..63bdb09c 100644
--- a/src/components/ServiceProject/ServiceProjectBranch/ServiceBranch.jsx
+++ b/src/components/ServiceProject/ServiceProjectBranch/ServiceBranch.jsx
@@ -237,14 +237,17 @@ const ServiceBranch = () => {
!isError &&
(!data?.data || data.data.length === 0) && (
- |
- No Branch Found
+ |
+
+ No Branch Found
+
|
)}
+
diff --git a/src/components/ServiceProject/ServiceProjectSchema.jsx b/src/components/ServiceProject/ServiceProjectSchema.jsx
index 589f1497..8e513eec 100644
--- a/src/components/ServiceProject/ServiceProjectSchema.jsx
+++ b/src/components/ServiceProject/ServiceProjectSchema.jsx
@@ -22,8 +22,7 @@ export const projectSchema = z.object({
contactName: z
.string()
.trim()
- .min(1, "Contact name is required")
- .regex(/^[A-Za-z\s]+$/, "Contact name can contain only letters"),
+ .min(1, "Contact name is required"),
contactPhone: z
.string()
diff --git a/src/components/ServiceProject/ServiceProjectTeam/ServiceProjectTeamList.jsx b/src/components/ServiceProject/ServiceProjectTeam/ServiceProjectTeamList.jsx
index 786ef198..a87ee7ec 100644
--- a/src/components/ServiceProject/ServiceProjectTeam/ServiceProjectTeamList.jsx
+++ b/src/components/ServiceProject/ServiceProjectTeam/ServiceProjectTeamList.jsx
@@ -77,6 +77,7 @@ const ServiceProjectTeamList = () => {
{isLoading ? (
@@ -85,6 +86,7 @@ const ServiceProjectTeamList = () => {
)}
|
+
)}
diff --git a/src/components/common/HoverPopup.jsx b/src/components/common/HoverPopup.jsx
index 1063745b..232ced5d 100644
--- a/src/components/common/HoverPopup.jsx
+++ b/src/components/common/HoverPopup.jsx
@@ -58,139 +58,66 @@ const HoverPopup = ({
return () => document.removeEventListener("click", handler);
}, [Mode, visible, dispatch, id]);
- // Positioning effect: respects align prop and stays inside boundary (drawer)
useEffect(() => {
if (!visible || !popupRef.current || !triggerRef.current) return;
- // run in next frame so DOM/layout settles
requestAnimationFrame(() => {
const popup = popupRef.current;
-
- // choose boundary: provided boundaryRef or nearest positioned parent (popup.parentElement)
- const boundaryEl =
- (boundaryRef && boundaryRef.current) || popup.parentElement;
+ const boundaryEl = (boundaryRef && boundaryRef.current) || popup.parentElement;
if (!boundaryEl) return;
const boundaryRect = boundaryEl.getBoundingClientRect();
const triggerRect = triggerRef.current.getBoundingClientRect();
-
- // reset styles first
popup.style.left = "";
popup.style.right = "";
popup.style.transform = "";
popup.style.top = "";
const popupRect = popup.getBoundingClientRect();
- const parentRect = boundaryRect; // alias
+ const triggerCenterX = triggerRect.left + triggerRect.width / 2 - boundaryRect.left;
+ let left = triggerCenterX - popupRect.width / 2;
- // Convert trigger center to parent coordinates
- const triggerCenterX =
- triggerRect.left + triggerRect.width / 2 - parentRect.left;
-
- // preferred left so popup center aligns to trigger center:
- const preferredLeft = triggerCenterX - popupRect.width / 2;
-
- // Helpers to set styles in parent's coordinate system:
- const setLeft = (leftPx) => {
- popup.style.left = `${leftPx}px`;
- popup.style.right = "auto";
- popup.style.transform = "none";
- };
- const setRight = (rightPx) => {
- popup.style.left = "auto";
- popup.style.right = `${rightPx}px`;
- popup.style.transform = "none";
- };
-
- // If user forced align:
- if (align === "left") {
- // align popup's left to parent's left (0)
- setLeft(0);
- return;
- }
- if (align === "right") {
- // align popup's right to parent's right (0)
- setRight(0);
- return;
- }
- if (align === "center") {
- popup.style.left = "50%";
- popup.style.right = "auto";
- popup.style.transform = "translateX(-50%)";
- return;
- }
-
- // align === "auto": try preferred centered position, but flip fully if overflow
- // clamp preferredLeft to boundaries so it doesn't render partially outside
- const leftIfCentered = Math.max(
- 0,
- Math.min(preferredLeft, parentRect.width - popupRect.width)
- );
-
- // if centered fits, use it
- if (leftIfCentered === preferredLeft) {
- setLeft(leftIfCentered);
- return;
- }
-
- // if centering would overflow right -> stick popup fully to left (left=0)
- if (preferredLeft > parentRect.width - popupRect.width) {
- // place popup so its right aligns to parent's right
- // i.e., left = parent width - popup width
- setLeft(parentRect.width - popupRect.width);
- return;
- }
-
- // if centering would overflow left -> stick popup fully to left=0
- if (preferredLeft < 0) {
- setLeft(0);
- return;
- }
-
- // fallback center
- setLeft(leftIfCentered);
+ // Clamp to boundaries
+ left = Math.max(0, Math.min(left, boundaryRect.width - popupRect.width));
+ popup.style.left = `${left}px`;
});
}, [visible, align, boundaryRef]);
- return (
-
+ return (
- {children}
-
-
- {visible && (
e.stopPropagation()}
+
+ ref={triggerRef}
+ onMouseEnter={handleMouseEnter}
+ onMouseLeave={handleMouseLeave}
+ onClick={handleClick}
+ style={{ cursor: "pointer", display: "inline-block" }}
>
- {title &&
{title}
}
-
{content}
+ {children}
- )}
-
-);
+
+ {visible && (
+
e.stopPropagation()}
+ >
+ {title &&
{title}
}
+
{content}
+
+ )}
+
+ );
};
diff --git a/src/components/common/InputSuggestion.jsx b/src/components/common/InputSuggestion.jsx
index b586abe1..add306f8 100644
--- a/src/components/common/InputSuggestion.jsx
+++ b/src/components/common/InputSuggestion.jsx
@@ -4,6 +4,7 @@ const InputSuggestions = ({
organizationList = [],
value,
onChange,
+ size = "sm",
error,
disabled = false,
}) => {
@@ -27,7 +28,7 @@ const InputSuggestions = ({
return (
setTimeout(() => setShowSuggestions(false), 150)}
@@ -57,15 +58,14 @@ const InputSuggestions = ({
transition: "background-color 0.2s",
}}
onMouseDown={() => handleSelectSuggestion(org)}
- className={`dropdown-item ${
- org === value ? "active" : ""
+ className={`dropdown-item ${org === value ? "active" : ""
}`}
>
{org}
))}
-
+
)}
{error &&
{error}}
diff --git a/src/components/purchase/PurchasePartyDetails.jsx b/src/components/purchase/PurchasePartyDetails.jsx
index 08bf8826..fd776961 100644
--- a/src/components/purchase/PurchasePartyDetails.jsx
+++ b/src/components/purchase/PurchasePartyDetails.jsx
@@ -26,7 +26,7 @@ const PurchasePartyDetails = () => {
} = useAppFormContext();
return (
-
+
{/* Title */}