Update localization and UI for team member invitation feature

- Changed button labels for inviting team members to "Send Invitation" across multiple languages (Albanian, German, English, Spanish, Portuguese, Chinese).
- Updated the invite team members component to use a modal instead of a drawer for a better user experience.
- Added a new button for copying the team link in the modal footer, enhancing functionality.
This commit is contained in:
shancds
2025-07-22 15:21:13 +05:30
parent 06da0d20b9
commit 3373dccc58
7 changed files with 37 additions and 20 deletions

View File

@@ -28,7 +28,7 @@
"jobTitleLabel": "Titulli i Punës",
"jobTitlePlaceholder": "Zgjidh ose kërko titull pune (Opsionale)",
"memberAccessLabel": "Niveli i Qasjes",
"addToTeamButton": "Shto Anëtar në Ekip",
"addToTeamButton": "Dërgo ftesën",
"updateButton": "Ruaj Ndryshimet",
"resendInvitationButton": "Dërgo Përsëri Email-in e Ftesës",
"invitationSentSuccessMessage": "Ftesa për ekip u dërgua me sukses!",
@@ -43,5 +43,6 @@
"updatedText": "Përditësuar",
"noResultFound": "Shkruani një adresë email dhe shtypni Enter...",
"jobTitlesFetchError": "Dështoi marrja e titujve të punës",
"invitationResent": "Ftesa u dërgua sërish me sukses!"
"invitationResent": "Ftesa u dërgua sërish me sukses!",
"copyTeamLink": "Kopjo lidhjen e ekipit"
}

View File

@@ -28,7 +28,7 @@
"jobTitleLabel": "Jobtitel",
"jobTitlePlaceholder": "Jobtitel auswählen oder suchen (optional)",
"memberAccessLabel": "Zugriffslevel",
"addToTeamButton": "Mitglied zum Team hinzufügen",
"addToTeamButton": "Einladung senden",
"updateButton": "Änderungen speichern",
"resendInvitationButton": "Einladungs-E-Mail erneut senden",
"invitationSentSuccessMessage": "Team-Einladung erfolgreich versendet!",
@@ -43,5 +43,6 @@
"updatedText": "Aktualisiert",
"noResultFound": "Geben Sie eine E-Mail-Adresse ein und drücken Sie Enter...",
"jobTitlesFetchError": "Fehler beim Abrufen der Jobtitel",
"invitationResent": "Einladung erfolgreich erneut gesendet!"
"invitationResent": "Einladung erfolgreich erneut gesendet!",
"copyTeamLink": "Team-Link kopieren"
}

View File

@@ -19,7 +19,7 @@
"cancelText": "No, cancel",
"deactivatedText": "(Currently deactivated)",
"pendingInvitationText": "(Invitation pending)",
"addMemberDrawerTitle": "Add New Team Member",
"addMemberDrawerTitle": "Invite Team Members",
"updateMemberDrawerTitle": "Update Team Member",
"addMemberEmailHint": "Members will be added to the team regardless of invitation acceptance status",
"memberEmailLabel": "Email(s)",
@@ -28,7 +28,7 @@
"jobTitleLabel": "Job Title",
"jobTitlePlaceholder": "Select or search job title (Optional)",
"memberAccessLabel": "Access Level",
"addToTeamButton": "Add Member to Team",
"addToTeamButton": "Send Invitation",
"updateButton": "Save Changes",
"resendInvitationButton": "Resend Invitation Email",
"invitationSentSuccessMessage": "Team invitation sent successfully!",
@@ -43,5 +43,6 @@
"updatedText": "Updated",
"noResultFound": "Type an email address and hit enter...",
"jobTitlesFetchError": "Failed to fetch job titles",
"invitationResent": "Invitation resent successfully!"
"invitationResent": "Invitation resent successfully!",
"copyTeamLink": "Copy team link"
}

View File

@@ -28,7 +28,7 @@
"jobTitleLabel": "Cargo",
"jobTitlePlaceholder": "Seleccione o busque cargo (Opcional)",
"memberAccessLabel": "Nivel de acceso",
"addToTeamButton": "Agregar miembro al equipo",
"addToTeamButton": "Enviar invitación",
"updateButton": "Guardar cambios",
"resendInvitationButton": "Reenviar correo de invitación",
"invitationSentSuccessMessage": "¡Invitación al equipo enviada exitosamente!",
@@ -43,5 +43,6 @@
"updatedText": "Actualizado",
"noResultFound": "Escriba una dirección de correo electrónico y presione enter...",
"jobTitlesFetchError": "Error al obtener los cargos",
"invitationResent": "¡Invitación reenviada exitosamente!"
"invitationResent": "¡Invitación reenviada exitosamente!",
"copyTeamLink": "Copiar enlace del equipo"
}

View File

@@ -28,7 +28,7 @@
"jobTitleLabel": "Título do Emprego",
"jobTitlePlaceholder": "Selecione ou pesquise o título do emprego (Opcional)",
"memberAccessLabel": "Nível de Acesso",
"addToTeamButton": "Adicionar Membro à Equipe",
"addToTeamButton": "Enviar convite",
"updateButton": "Salvar Alterações",
"resendInvitationButton": "Redirecionar Email de Convite",
"invitationSentSuccessMessage": "Convite para a equipe enviado com sucesso!",
@@ -43,5 +43,6 @@
"updatedText": "Atualizado",
"noResultFound": "Digite um endereço de email e pressione enter...",
"jobTitlesFetchError": "Falha ao buscar cargos",
"invitationResent": "Convite reenviado com sucesso!"
"invitationResent": "Convite reenviado com sucesso!",
"copyTeamLink": "Copiar link da equipe"
}

View File

@@ -28,7 +28,7 @@
"jobTitleLabel": "职位",
"jobTitlePlaceholder": "选择或搜索职位(可选)",
"memberAccessLabel": "访问级别",
"addToTeamButton": "将成员添加到团队",
"addToTeamButton": "发送邀请",
"updateButton": "保存更改",
"resendInvitationButton": "重新发送邀请邮件",
"invitationSentSuccessMessage": "团队邀请已成功发送!",
@@ -43,5 +43,6 @@
"updatedText": "已更新",
"noResultFound": "输入电子邮件地址并按回车键...",
"jobTitlesFetchError": "获取职位失败",
"invitationResent": "邀请重新发送成功!"
"invitationResent": "邀请重新发送成功!",
"copyTeamLink": "复制团队链接"
}

View File

@@ -1,4 +1,4 @@
import { AutoComplete, Button, Drawer, Flex, Form, message, Select, Spin, Typography } from 'antd';
import { AutoComplete, Button, Drawer, Flex, Form, message, Modal, Select, Spin, Typography } from 'antd';
import { useAppSelector } from '@/hooks/useAppSelector';
import { useAppDispatch } from '@/hooks/useAppDispatch';
import {
@@ -11,6 +11,7 @@ import { jobTitlesApiService } from '@/api/settings/job-titles/job-titles.api.se
import { IJobTitle } from '@/types/job.types';
import { teamMembersApiService } from '@/api/team-members/teamMembers.api.service';
import { ITeamMemberCreateRequest } from '@/types/teamMembers/team-member-create-request';
import { LinkOutlined } from '@ant-design/icons';
interface FormValues {
email: string[];
@@ -87,23 +88,33 @@ const InviteTeamMembers = () => {
};
return (
<Drawer
<Modal
title={
<Typography.Text strong style={{ fontSize: 16 }}>
{t('addMemberDrawerTitle')}
</Typography.Text>
}
open={isDrawerOpen}
onClose={handleClose}
onCancel={handleClose}
destroyOnClose
afterOpenChange={visible => visible && handleSearch('')}
width={400}
loading={loading}
footer={
<Flex justify="end">
<Button type="primary" onClick={form.submit}>
{t('addToTeamButton')}
<Flex justify="space-between">
<Button
style={{ width: 140, fontSize: 12 }}
block
icon={<LinkOutlined />}
disabled
>
{t('copyTeamLink')}
</Button>
<Flex justify="end">
<Button onClick={form.submit} style={{ fontSize: 12 }}>
{t('addToTeamButton')}
</Button>
</Flex>
</Flex>
}
>
@@ -176,7 +187,7 @@ const InviteTeamMembers = () => {
/>
</Form.Item>
</Form>
</Drawer>
</Modal>
);
};