Adding cross button in Employee popup.

This commit is contained in:
Kartik sharma 2025-06-30 16:42:58 +05:30
parent 562a4ca46d
commit 84563812b7

View File

@ -172,8 +172,7 @@ const ManageEmployee = ({ employeeId, onClosed }) => {
.then((response) => {
cacheData("employeeProfileInfo", data);
showToast(
`Employee details ${
data.id == null ? "created" : "updated"
`Employee details ${data.id == null ? "created" : "updated"
} successfully.`,
"success"
);
@ -239,7 +238,14 @@ const ManageEmployee = ({ employeeId, onClosed }) => {
<p>Loading Employee Data...</p>
)} */}
<form onSubmit={handleSubmit( onSubmit )} className="p-sm-5 p-2">
<form onSubmit={handleSubmit(onSubmit)} className="p-sm-5 p-2 position-relative">
{/* Cross button */}
<button
type="button"
className="btn-close position-absolute top-0 end-0 m-2"
aria-label="Close"
onClick={onClosed}
></button>
<div className="text-center"><p className="fs-6 fw-semibold"> {employee ? "Update Employee" : "Create Employee"}</p></div>
<div className="row mb-3">
<div className="col-sm-4">