Ver a proveniência

for testing email functions

tags/Baseline_180220205_Frontend
MSI\derek há 11 meses
ascendente
cometimento
a143ad132a
1 ficheiros alterados com 14 adições e 3 eliminações
  1. +14
    -3
      src/components/MailSetting/MailSetting.tsx

+ 14
- 3
src/components/MailSetting/MailSetting.tsx Ver ficheiro

@@ -17,7 +17,7 @@ import {
import { Tab, Tabs, TabsProps, Typography } from "@mui/material";
import TimesheetMailDetails from "./TimesheetMailDetails";
import { Error } from "@mui/icons-material";
import { MailSave, saveMail, testMail } from "@/app/api/mail/actions";
import { MailSave, saveMail, testEveryone, test7th, test15th } from "@/app/api/mail/actions";
import SettingDetails from "./SettingDetails";
import { errorDialog, submitDialog, successDialog } from "../Swal/CustomAlerts";

@@ -91,7 +91,18 @@ const MailSetting: React.FC<Props> = ({
console.log(response)
if (response !== null) {
if (test) {
await testMail()
let msg = ""
try {
msg = "testEveryone"
await testEveryone()
msg = "test7th"
await test7th()
msg = "test15th"
await test15th()
} catch (error) {
console.log(error)
console.log(msg)
}
}

successDialog(t("Save Success"), t)
@@ -169,7 +180,7 @@ const MailSetting: React.FC<Props> = ({
{t("Cancel")}
</Button>
<Button variant="contained" startIcon={<Check />} onClick={() => setTest(true)} type="submit">
{t("Save And Test")}
{t("send to everyone")}
</Button>
<Button variant="contained" startIcon={<Check />} onClick={() => setTest(false)} type="submit">
{t("Save")}


Carregando…
Cancelar
Guardar