update enviroment variable
This commit is contained in:
parent
66bfcd80c1
commit
850b2e6998
@ -23,7 +23,8 @@ const ManageEmployee = () => {
|
||||
error,
|
||||
loading: empLoading,
|
||||
} = useEmployeeProfile(employeeId);
|
||||
dispatch(changeMaster("Job Role"));
|
||||
dispatch( changeMaster( "Job Role" ) );
|
||||
const [disabledEmail,setDisabledEmail] = useState(false)
|
||||
const { data: job_role, loading } = useMaster();
|
||||
const [isloading, setLoading] = useState(false);
|
||||
const navigation = useNavigate();
|
||||
@ -219,6 +220,7 @@ const ManageEmployee = () => {
|
||||
}
|
||||
: {} // Empty object resets the form
|
||||
);
|
||||
// if(currentEmployee && currentEmployee.email) setDisabledEmail(true)
|
||||
}, [currentEmployee, reset]);
|
||||
|
||||
console.log(currentEmployee);
|
||||
@ -312,6 +314,7 @@ const ManageEmployee = () => {
|
||||
placeholder="Email"
|
||||
aria-label=""
|
||||
aria-describedby="Email"
|
||||
disabled={!!currentEmployee?.email}
|
||||
/>
|
||||
{errors.Email && (
|
||||
<div
|
||||
|
@ -114,7 +114,7 @@ const ManageRole = ({employeeId,onClosed}) => {
|
||||
</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>}
|
||||
{data && data.map((item) => (
|
||||
@ -155,11 +155,7 @@ const ManageRole = ({employeeId,onClosed}) => {
|
||||
Cancel
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -66,8 +66,10 @@ const onSubmit = (values) => {
|
||||
cacheData("Role", updatedData);
|
||||
showToast("Role Added successfully.", "success");
|
||||
onClose()
|
||||
}).catch((err)=>{
|
||||
showToast(err.message, "error");
|
||||
} ).catch( ( err ) =>
|
||||
{
|
||||
|
||||
showToast(err?.response?.data?.message, "error");
|
||||
setIsLoading(false)
|
||||
})
|
||||
|
||||
|
@ -110,10 +110,12 @@ const EditMaster=({master,onClose})=> {
|
||||
|
||||
cacheData("Role", updatedData);
|
||||
}
|
||||
showToast("Role Update successfully.", "success");
|
||||
showToast( "Role Update successfully.", "success" );
|
||||
setIsLoading(false)
|
||||
onClose()
|
||||
}).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) => (
|
||||
<tr key={index}>
|
||||
<td></td>
|
||||
{updatedColumns.map((col) => (
|
||||
{updatedColumns.map( ( col ) => (
|
||||
<td className="text-start mx-2" key={col.key}>
|
||||
{item[col.key] !== undefined && item[col.key] !== null
|
||||
? item[col.key]
|
||||
: " --- "}
|
||||
</td>
|
||||
{col.key === "description" ? (
|
||||
item[col.key] !== undefined && item[col.key] !== null ? (
|
||||
item[col.key].length > 80 ? (
|
||||
<>
|
||||
{item[col.key].slice(0, 80)}...
|
||||
</>
|
||||
) : (
|
||||
item[col.key]
|
||||
)
|
||||
) : (
|
||||
" --- "
|
||||
)
|
||||
) : (
|
||||
item[col.key] !== undefined && item[col.key] !== null ? item[col.key] : " --- "
|
||||
)}
|
||||
</td>
|
||||
|
||||
|
||||
))}
|
||||
<td >
|
||||
{/* className={` ${hasUserPermission('660131a4-788c-4739-a082-cbbf7879cbf2') ? "":"d-none"}`}> */}
|
||||
|
@ -12,7 +12,7 @@ export default defineConfig({
|
||||
},
|
||||
define: {
|
||||
'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