|
|
@@ -5,7 +5,7 @@ import { FileUpload } from "@mui/icons-material"; |
|
|
|
import { Button, Grid, Stack } from "@mui/material"; |
|
|
|
import React, { ChangeEvent, useCallback } from "react"; |
|
|
|
import { useTranslation } from "react-i18next"; |
|
|
|
import { errorDialogWithContent, successDialog } from "../Swal/CustomAlerts"; |
|
|
|
import { errorDialogWithContent, successDialog, successDialogWithContent } from "../Swal/CustomAlerts"; |
|
|
|
import { importTimesheets } from "@/app/api/timesheets/actions"; |
|
|
|
|
|
|
|
interface Props { |
|
|
@@ -37,7 +37,7 @@ const ExcelFileImport: React.FC<Props> = async ({ }) => { |
|
|
|
} |
|
|
|
|
|
|
|
if (response === "Import Excel success") { |
|
|
|
successDialog(t("Import Success"), t) |
|
|
|
successDialogWithContent(t("Import Success"), t(`${response}`), t) |
|
|
|
} else { |
|
|
|
errorDialogWithContent(t("Import Fail"), t(`${response}`), t) |
|
|
|
} |
|
|
|