Timesheets open the modal with loader show the logs with loading
This commit is contained in:
parent
475776b214
commit
70193501d3
|
|
@ -95,3 +95,4 @@ const ProjectLogsModal: React.FC<Props> = ({ isOpen, onClose, projectName, logs,
|
|||
};
|
||||
|
||||
export default ProjectLogsModal;
|
||||
|
||||
|
|
|
|||
|
|
@ -117,6 +117,7 @@ const Timesheets: React.FC = () => {
|
|||
|
||||
const handleViewLogs = async (projectID: string, projectName: string) => {
|
||||
try {
|
||||
setModalOpen(true);
|
||||
setLoading(true);
|
||||
setSelectedProject(projectID);
|
||||
setSelectedProjectName(projectName);
|
||||
|
|
@ -132,11 +133,13 @@ const Timesheets: React.FC = () => {
|
|||
setLogs([]);
|
||||
}
|
||||
|
||||
setModalOpen(true);
|
||||
|
||||
} catch (error) {
|
||||
console.error("Error fetching logs:", error);
|
||||
setModalOpen(false)
|
||||
} finally {
|
||||
setLoading(false);
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue