mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-04-19 11:14:06 +00:00
Finalize Typescript restructure
This commit is contained in:
@@ -15,7 +15,7 @@ interface MailTestForm {
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
storeType?: string
|
||||
storeType?: 'company' | 'global'
|
||||
}>(),
|
||||
{
|
||||
storeType: 'global',
|
||||
@@ -74,7 +74,18 @@ async function onTestMailSend(): Promise<void> {
|
||||
|
||||
isSaving.value = true
|
||||
try {
|
||||
await mailService.testEmail({ to: formData.to })
|
||||
const payload = {
|
||||
to: formData.to,
|
||||
subject: formData.subject,
|
||||
message: formData.message,
|
||||
}
|
||||
|
||||
if (props.storeType === 'company') {
|
||||
await companyService.testMailConfig(payload)
|
||||
} else {
|
||||
await mailService.testEmail(payload)
|
||||
}
|
||||
|
||||
closeTestModal()
|
||||
} finally {
|
||||
isSaving.value = false
|
||||
|
||||
Reference in New Issue
Block a user