update enviroment variable
This commit is contained in:
parent
66bfcd80c1
commit
850b2e6998
@ -23,7 +23,8 @@ const ManageEmployee = () => {
|
|||||||
error,
|
error,
|
||||||
loading: empLoading,
|
loading: empLoading,
|
||||||
} = useEmployeeProfile(employeeId);
|
} = useEmployeeProfile(employeeId);
|
||||||
dispatch(changeMaster("Job Role"));
|
dispatch( changeMaster( "Job Role" ) );
|
||||||
|
const [disabledEmail,setDisabledEmail] = useState(false)
|
||||||
const { data: job_role, loading } = useMaster();
|
const { data: job_role, loading } = useMaster();
|
||||||
const [isloading, setLoading] = useState(false);
|
const [isloading, setLoading] = useState(false);
|
||||||
const navigation = useNavigate();
|
const navigation = useNavigate();
|
||||||
@ -219,6 +220,7 @@ const ManageEmployee = () => {
|
|||||||
}
|
}
|
||||||
: {} // Empty object resets the form
|
: {} // Empty object resets the form
|
||||||
);
|
);
|
||||||
|
// if(currentEmployee && currentEmployee.email) setDisabledEmail(true)
|
||||||
}, [currentEmployee, reset]);
|
}, [currentEmployee, reset]);
|
||||||
|
|
||||||
console.log(currentEmployee);
|
console.log(currentEmployee);
|
||||||
@ -312,6 +314,7 @@ const ManageEmployee = () => {
|
|||||||
placeholder="Email"
|
placeholder="Email"
|
||||||
aria-label=""
|
aria-label=""
|
||||||
aria-describedby="Email"
|
aria-describedby="Email"
|
||||||
|
disabled={!!currentEmployee?.email}
|
||||||
/>
|
/>
|
||||||
{errors.Email && (
|
{errors.Email && (
|
||||||
<div
|
<div
|
||||||
|
@ -114,7 +114,7 @@ const ManageRole = ({employeeId,onClosed}) => {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div className='d-flex flex-wrap justify-content-between align-items-center pb-5 ' style={{height: "70vh", overflowY: "scroll"}} >
|
<div className='d-flex flex-wrap justify-content-between align-items-center pb-5 ' style={{maxHeight: "70vh", overflowY: "scroll"}} >
|
||||||
|
|
||||||
{(loading || roleLoading) && <p>Loading...</p>}
|
{(loading || roleLoading) && <p>Loading...</p>}
|
||||||
{data && data.map((item) => (
|
{data && data.map((item) => (
|
||||||
@ -155,11 +155,7 @@ const ManageRole = ({employeeId,onClosed}) => {
|
|||||||
Cancel
|
Cancel
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -66,8 +66,10 @@ const onSubmit = (values) => {
|
|||||||
cacheData("Role", updatedData);
|
cacheData("Role", updatedData);
|
||||||
showToast("Role Added successfully.", "success");
|
showToast("Role Added successfully.", "success");
|
||||||
onClose()
|
onClose()
|
||||||
}).catch((err)=>{
|
} ).catch( ( err ) =>
|
||||||
showToast(err.message, "error");
|
{
|
||||||
|
|
||||||
|
showToast(err?.response?.data?.message, "error");
|
||||||
setIsLoading(false)
|
setIsLoading(false)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -110,10 +110,12 @@ const EditMaster=({master,onClose})=> {
|
|||||||
|
|
||||||
cacheData("Role", updatedData);
|
cacheData("Role", updatedData);
|
||||||
}
|
}
|
||||||
showToast("Role Update successfully.", "success");
|
showToast( "Role Update successfully.", "success" );
|
||||||
|
setIsLoading(false)
|
||||||
onClose()
|
onClose()
|
||||||
}).catch((Err)=>{
|
}).catch((Err)=>{
|
||||||
showToast(Err.message, "error");
|
showToast( Err.message, "error" );
|
||||||
|
setIsLoading(false)
|
||||||
})
|
})
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -57,12 +57,26 @@ const MasterTable = ( {data, columns, loading, handleModalData} ) =>
|
|||||||
currentItems.map((item, index) => (
|
currentItems.map((item, index) => (
|
||||||
<tr key={index}>
|
<tr key={index}>
|
||||||
<td></td>
|
<td></td>
|
||||||
{updatedColumns.map((col) => (
|
{updatedColumns.map( ( col ) => (
|
||||||
<td className="text-start mx-2" key={col.key}>
|
<td className="text-start mx-2" key={col.key}>
|
||||||
{item[col.key] !== undefined && item[col.key] !== null
|
{col.key === "description" ? (
|
||||||
? item[col.key]
|
item[col.key] !== undefined && item[col.key] !== null ? (
|
||||||
: " --- "}
|
item[col.key].length > 80 ? (
|
||||||
</td>
|
<>
|
||||||
|
{item[col.key].slice(0, 80)}...
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
item[col.key]
|
||||||
|
)
|
||||||
|
) : (
|
||||||
|
" --- "
|
||||||
|
)
|
||||||
|
) : (
|
||||||
|
item[col.key] !== undefined && item[col.key] !== null ? item[col.key] : " --- "
|
||||||
|
)}
|
||||||
|
</td>
|
||||||
|
|
||||||
|
|
||||||
))}
|
))}
|
||||||
<td >
|
<td >
|
||||||
{/* className={` ${hasUserPermission('660131a4-788c-4739-a082-cbbf7879cbf2') ? "":"d-none"}`}> */}
|
{/* className={` ${hasUserPermission('660131a4-788c-4739-a082-cbbf7879cbf2') ? "":"d-none"}`}> */}
|
||||||
|
@ -12,7 +12,7 @@ export default defineConfig({
|
|||||||
},
|
},
|
||||||
define: {
|
define: {
|
||||||
'process.env': {
|
'process.env': {
|
||||||
VITE_BASE_URL: process.env.VITE_BASE_URL || 'http://localhost:8080',
|
VITE_BASE_URL: process.env.VITE_BASE_URL || 'http://localhost:5032',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user