Update Owliver language and suggestions
This commit is contained in:
@@ -3,6 +3,7 @@ import React, { useState } from 'react';
|
||||
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from '@/components/ui/dialog';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Mail, Phone, Send, CheckCircle2 } from 'lucide-react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
interface MessageCandidateModalProps {
|
||||
open: boolean;
|
||||
@@ -13,6 +14,7 @@ interface MessageCandidateModalProps {
|
||||
}
|
||||
|
||||
export default function MessageCandidateModal({ open, onClose, application }: MessageCandidateModalProps) {
|
||||
const { t } = useTranslation();
|
||||
const [channel, setChannel] = useState('message');
|
||||
const [message, setMessage] = useState('');
|
||||
const [sent, setSent] = useState(false);
|
||||
@@ -30,7 +32,7 @@ export default function MessageCandidateModal({ open, onClose, application }: Me
|
||||
<Dialog open={open} onOpenChange={(v) => !v && onClose()}>
|
||||
<DialogContent className="max-w-md">
|
||||
<DialogHeader>
|
||||
<DialogTitle>Message {application?.applicant_name}</DialogTitle>
|
||||
<DialogTitle>{t('messageCandidateModal.message')} {application?.applicant_name}</DialogTitle>
|
||||
</DialogHeader>
|
||||
|
||||
{sent ? (
|
||||
@@ -38,7 +40,7 @@ export default function MessageCandidateModal({ open, onClose, application }: Me
|
||||
<div className="w-12 h-12 rounded-full bg-[#D1FAE5] flex items-center justify-center mx-auto mb-3">
|
||||
<CheckCircle2 className="w-6 h-6 text-[#059669]" />
|
||||
</div>
|
||||
<p className="text-[14px] font-medium text-[#111827]">Message sent!</p>
|
||||
<p className="text-[14px] font-medium text-[#111827]">{t('messageCandidateModal.messageSent')}</p>
|
||||
</div>
|
||||
) : (
|
||||
<div className="space-y-4">
|
||||
@@ -49,7 +51,7 @@ export default function MessageCandidateModal({ open, onClose, application }: Me
|
||||
channel === 'message' ? 'border-[#0838E0] bg-[#EEF3FE] text-[#0838E0]' : 'border-[#E5E7EB] text-[#6B7280]'
|
||||
}`}
|
||||
>
|
||||
<Mail className="w-4 h-4" /> Message
|
||||
<Mail className="w-4 h-4" /> {t('messageCandidateModal.message')}
|
||||
</button>
|
||||
<button
|
||||
onClick={() => setChannel('call')}
|
||||
@@ -57,14 +59,14 @@ export default function MessageCandidateModal({ open, onClose, application }: Me
|
||||
channel === 'call' ? 'border-[#0838E0] bg-[#EEF3FE] text-[#0838E0]' : 'border-[#E5E7EB] text-[#6B7280]'
|
||||
}`}
|
||||
>
|
||||
<Phone className="w-4 h-4" /> Call
|
||||
<Phone className="w-4 h-4" /> {t('messageCandidateModal.call')}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{channel === 'call' ? (
|
||||
<div className="py-6 text-center text-[13px] text-[#6B7280]">
|
||||
<Phone className="w-8 h-8 text-[#0838E0] mx-auto mb-2" />
|
||||
Calling {application?.phone || 'candidate'}...
|
||||
{t('messageCandidateModal.calling')} {application?.phone || 'candidate'}...
|
||||
</div>
|
||||
) : (
|
||||
<textarea
|
||||
@@ -76,9 +78,9 @@ export default function MessageCandidateModal({ open, onClose, application }: Me
|
||||
)}
|
||||
|
||||
<DialogFooter>
|
||||
<Button variant="outline" onClick={onClose}>Cancel</Button>
|
||||
<Button variant="outline" onClick={onClose}>{t('messageCandidateModal.cancel')}</Button>
|
||||
<Button onClick={handleSend} disabled={channel === 'message' && !message.trim()} className="bg-[#0838E0] hover:bg-[#062BAF]">
|
||||
<Send className="w-4 h-4 mr-2" /> Send
|
||||
<Send className="w-4 h-4 mr-2" /> {t('messageCandidateModal.send')}
|
||||
</Button>
|
||||
</DialogFooter>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user