Changed Admin tab to Manage.

This commit is contained in:
Mike Cao 2024-02-08 11:47:32 -08:00
parent 91e3dff7f5
commit 642aba83e5
55 changed files with 59 additions and 59 deletions

View File

@ -6,7 +6,7 @@ import { ROLES } from 'lib/constants';
import { useContext, useState } from 'react';
import { Flexbox, Item, Tabs } from 'react-basics';
import TeamLeaveButton from '../../TeamLeaveButton';
import TeamAdmin from './TeamAdmin';
import TeamManage from './TeamManage';
import TeamEditForm from './TeamEditForm';
export function TeamDetails({ teamId }: { teamId: string }) {
@ -15,7 +15,7 @@ export function TeamDetails({ teamId }: { teamId: string }) {
const { user } = useLogin();
const [tab, setTab] = useState('details');
const canEdit = team?.teamUser?.find(
const canEdit = !!team?.teamUser?.find(
({ userId, role }) => role === ROLES.teamOwner && userId === user.id,
);
@ -26,10 +26,10 @@ export function TeamDetails({ teamId }: { teamId: string }) {
</PageHeader>
<Tabs selectedKey={tab} onSelect={(value: any) => setTab(value)} style={{ marginBottom: 30 }}>
<Item key="details">{formatMessage(labels.details)}</Item>
{canEdit && <Item key="admin">{formatMessage(labels.admin)}</Item>}
{canEdit && <Item key="manage">{formatMessage(labels.manage)}</Item>}
</Tabs>
{tab === 'details' && <TeamEditForm teamId={teamId} allowEdit={canEdit} />}
{tab === 'admin' && <TeamAdmin teamId={teamId} />}
{tab === 'manage' && <TeamManage teamId={teamId} />}
</Flexbox>
);
}

View File

@ -3,7 +3,7 @@ import { useRouter } from 'next/navigation';
import { ActionForm, Button, Modal, ModalTrigger } from 'react-basics';
import TeamDeleteForm from './TeamDeleteForm';
export function TeamAdmin({ teamId }: { teamId: string }) {
export function TeamManage({ teamId }: { teamId: string }) {
const { formatMessage, labels, messages } = useMessages();
const router = useRouter();
const { touch } = useModified();
@ -30,4 +30,4 @@ export function TeamAdmin({ teamId }: { teamId: string }) {
);
}
export default TeamAdmin;
export default TeamManage;

View File

@ -1,7 +1,7 @@
.menu {
display: flex;
flex-direction: column;
gap: 2px;
gap: 4px;
}
.item a {

View File

@ -17,7 +17,7 @@ export const labels = defineMessages({
role: { id: 'label.role', defaultMessage: 'Role' },
user: { id: 'label.user', defaultMessage: 'User' },
viewOnly: { id: 'label.view-only', defaultMessage: 'View only' },
admin: { id: 'label.admin', defaultMessage: 'Admin' },
manage: { id: 'label.manage', defaultMessage: 'Manage' },
administrator: { id: 'label.administrator', defaultMessage: 'Administrator' },
confirm: { id: 'label.confirm', defaultMessage: 'Confirm' },
details: { id: 'label.details', defaultMessage: 'Details' },

View File

@ -4,7 +4,7 @@ export * from 'app/(main)/settings/teams/[teamId]/members/TeamMemberRemoveButton
export * from 'app/(main)/settings/teams/[teamId]/members/TeamMembersDataTable';
export * from 'app/(main)/settings/teams/[teamId]/members/TeamMembersTable';
export * from 'app/(main)/settings/teams/[teamId]/team/TeamAdmin';
export * from './app/(main)/settings/teams/[teamId]/team/TeamManage';
export * from 'app/(main)/settings/teams/[teamId]/team/TeamDeleteForm';
export * from 'app/(main)/settings/teams/[teamId]/team/TeamDetails';
export * from 'app/(main)/settings/teams/[teamId]/team/TeamEditForm';

View File

@ -5,7 +5,7 @@
"label.add": "Add",
"label.add-description": "Add description",
"label.add-website": "Add website",
"label.admin": "Administrator",
"label.administrator": "Administrator",
"label.after": "After",
"label.all": "All",
"label.all-time": "All time",

View File

@ -5,7 +5,7 @@
"label.add": "Add",
"label.add-description": "Add description",
"label.add-website": "إضافة موقع",
"label.admin": "مدير",
"label.administrator": "مدير",
"label.after": "After",
"label.all": "الكل",
"label.all-time": "كل الوقت",

View File

@ -5,7 +5,7 @@
"label.add": "Add",
"label.add-description": "Add description",
"label.add-website": "Дадаць сайт",
"label.admin": "Адміністратар",
"label.administrator": "Адміністратар",
"label.after": "After",
"label.all": "Усё",
"label.all-time": "Увесь час",

View File

@ -5,7 +5,7 @@
"label.add": "Add",
"label.add-description": "Add description",
"label.add-website": "ওয়েবসাইট যুক্ত করুন",
"label.admin": "অ্যাডমিন",
"label.administrator": "অ্যাডমিন",
"label.after": "After",
"label.all": "সবগুলো",
"label.all-time": "সব সময়",

View File

@ -5,7 +5,7 @@
"label.add": "Add",
"label.add-description": "Add description",
"label.add-website": "Afegeix lloc web",
"label.admin": "Administrador",
"label.administrator": "Administrador",
"label.after": "After",
"label.all": "Tots",
"label.all-time": "Sempre",

View File

@ -5,7 +5,7 @@
"label.add": "Add",
"label.add-description": "Add description",
"label.add-website": "Přidat web",
"label.admin": "Administrátor",
"label.administrator": "Administrátor",
"label.after": "After",
"label.all": "Vše",
"label.all-time": "All time",

View File

@ -5,7 +5,7 @@
"label.add": "Add",
"label.add-description": "Add description",
"label.add-website": "Tilføj hjemmeside",
"label.admin": "Administrator",
"label.administrator": "Administrator",
"label.after": "After",
"label.all": "Alle",
"label.all-time": "Altid",

View File

@ -5,7 +5,7 @@
"label.add": "Add",
"label.add-description": "Add description",
"label.add-website": "Websiite hinzuefüege",
"label.admin": "Administrator",
"label.administrator": "Administrator",
"label.after": "After",
"label.all": "Alli",
"label.all-time": "Gesamte Zitruum",

View File

@ -5,7 +5,7 @@
"label.add": "Hinzufügen",
"label.add-description": "Beschreibung hinzufügen",
"label.add-website": "Website hinzufügen",
"label.admin": "Administrator",
"label.administrator": "Administrator",
"label.after": "Nach",
"label.all": "Alle",
"label.all-time": "Gesamter Zeitraum",

View File

@ -5,7 +5,7 @@
"label.add": "Add",
"label.add-description": "Add description",
"label.add-website": "Προσθήκη ιστότοπου",
"label.admin": "Διαχειριστής",
"label.administrator": "Διαχειριστής",
"label.after": "After",
"label.all": "All",
"label.all-time": "All time",

View File

@ -5,7 +5,7 @@
"label.add": "Add",
"label.add-description": "Add description",
"label.add-website": "Add website",
"label.admin": "Administrator",
"label.administrator": "Administrator",
"label.after": "After",
"label.all": "All",
"label.all-time": "All time",

View File

@ -5,7 +5,7 @@
"label.add": "Add",
"label.add-description": "Add description",
"label.add-website": "Add website",
"label.admin": "Administrator",
"label.administrator": "Administrator",
"label.after": "After",
"label.all": "All",
"label.all-time": "All time",

View File

@ -5,7 +5,7 @@
"label.add": "Añadir",
"label.add-description": "Añadir descripción",
"label.add-website": "Nuevo sitio web",
"label.admin": "Administrador",
"label.administrator": "Administrador",
"label.after": "Después",
"label.all": "Todos",
"label.all-time": "Todos los tiempos",

View File

@ -5,7 +5,7 @@
"label.add": "Add",
"label.add-description": "Add description",
"label.add-website": "افزودن وب‌سایت",
"label.admin": "مدیر",
"label.administrator": "مدیر",
"label.after": "After",
"label.all": "همه",
"label.all-time": "همه زمان",

View File

@ -5,7 +5,7 @@
"label.add": "Add",
"label.add-description": "Add description",
"label.add-website": "Lisää verkkosivu",
"label.admin": "Järjestelmänvalvoja",
"label.administrator": "Järjestelmänvalvoja",
"label.after": "After",
"label.all": "Kaikki",
"label.all-time": "Alusta lähtien",

View File

@ -5,7 +5,7 @@
"label.add": "Add",
"label.add-description": "Add description",
"label.add-website": "Legg heimasíðu afturat",
"label.admin": "Fyrisitari",
"label.administrator": "Fyrisitari",
"label.after": "After",
"label.all": "Alt",
"label.all-time": "All time",

View File

@ -5,7 +5,7 @@
"label.add": "Ajouter",
"label.add-description": "Ajouter une description",
"label.add-website": "Ajouter un site",
"label.admin": "Administrateur",
"label.administrator": "Administrateur",
"label.after": "Après",
"label.all": "Tout",
"label.all-time": "Toutes les données",

View File

@ -5,7 +5,7 @@
"label.add": "Add",
"label.add-description": "Add description",
"label.add-website": "Engadir sitio web",
"label.admin": "Administradora",
"label.administrator": "Administradora",
"label.after": "After",
"label.all": "Todo",
"label.all-time": "Sempre",

View File

@ -5,7 +5,7 @@
"label.add": "Add",
"label.add-description": "Add description",
"label.add-website": "הוספת אתר",
"label.admin": "מנהל",
"label.administrator": "מנהל",
"label.after": "After",
"label.all": "הכל",
"label.all-time": "All time",

View File

@ -5,7 +5,7 @@
"label.add": "Add",
"label.add-description": "Add description",
"label.add-website": "वेबसाइट",
"label.admin": "प्रशासक",
"label.administrator": "प्रशासक",
"label.after": "After",
"label.all": "सब",
"label.all-time": "All time",

View File

@ -5,7 +5,7 @@
"label.add": "Add",
"label.add-description": "Add description",
"label.add-website": "Dodaj web stranicu",
"label.admin": "Administrator",
"label.administrator": "Administrator",
"label.after": "After",
"label.all": "Sve",
"label.all-time": "Svo vrijeme",

View File

@ -5,7 +5,7 @@
"label.add": "Add",
"label.add-description": "Add description",
"label.add-website": "Weboldal hozzáadása",
"label.admin": "Adminisztrátor",
"label.administrator": "Adminisztrátor",
"label.after": "After",
"label.all": "Összes",
"label.all-time": "All time",

View File

@ -5,7 +5,7 @@
"label.add": "Add",
"label.add-description": "Add description",
"label.add-website": "Tambah situs web",
"label.admin": "Pengelola",
"label.administrator": "Pengelola",
"label.after": "After",
"label.all": "Semua",
"label.all-time": "Semua waktu",

View File

@ -5,7 +5,7 @@
"label.add": "Add",
"label.add-description": "Add description",
"label.add-website": "Aggiungi sito",
"label.admin": "Amministratore",
"label.administrator": "Amministratore",
"label.after": "After",
"label.all": "Tutto",
"label.all-time": "Sempre",

View File

@ -5,7 +5,7 @@
"label.add": "追加",
"label.add-description": "説明を追加",
"label.add-website": "Webサイトの追加",
"label.admin": "管理者",
"label.administrator": "管理者",
"label.after": "直後",
"label.all": "すべて",
"label.all-time": "すべての時間帯",

View File

@ -5,7 +5,7 @@
"label.add": "Add",
"label.add-description": "Add description",
"label.add-website": "បន្ថែមគេហទំព័រ",
"label.admin": "អ្នកគ្រប់គ្រង",
"label.administrator": "អ្នកគ្រប់គ្រង",
"label.after": "After",
"label.all": "ទាំងអស់",
"label.all-time": "គ្រប់ពេល",

View File

@ -5,7 +5,7 @@
"label.add": "Add",
"label.add-description": "Add description",
"label.add-website": "웹사이트 추가",
"label.admin": "관리자",
"label.administrator": "관리자",
"label.after": "After",
"label.all": "전체",
"label.all-time": "All time",

View File

@ -5,7 +5,7 @@
"label.add": "Add",
"label.add-description": "Add description",
"label.add-website": "Pridėti svetainę",
"label.admin": "Administratorius",
"label.administrator": "Administratorius",
"label.after": "After",
"label.all": "Visi",
"label.all-time": "Visas laikotarpis",

View File

@ -5,7 +5,7 @@
"label.add": "Нэмэх",
"label.add-description": "Тайлбар нэмэх",
"label.add-website": "Веб нэмэх",
"label.admin": "Админ",
"label.administrator": "Админ",
"label.after": "Хойно",
"label.all": "Бүх",
"label.all-time": "Бүх цаг үеийн",

View File

@ -5,7 +5,7 @@
"label.add": "Add",
"label.add-description": "Add description",
"label.add-website": "Tambah laman web",
"label.admin": "Pentadbir",
"label.administrator": "Pentadbir",
"label.after": "After",
"label.all": "Semua",
"label.all-time": "All time",

View File

@ -5,7 +5,7 @@
"label.add": "ထပ်ထည့်မည်",
"label.add-description": "အကြောင်းအရာဖော်ပြချက် ထည့်မည်",
"label.add-website": "ဝက်ဘ်ဆိုဒ်ထည့်မည်",
"label.admin": "အက်ဒမင်",
"label.administrator": "အက်ဒမင်",
"label.after": "ပြီးနောက်",
"label.all": "အားလုံး",
"label.all-time": "အချိန်အစမှအခုထိ",

View File

@ -5,7 +5,7 @@
"label.add": "Add",
"label.add-description": "Add description",
"label.add-website": "Legg til nettsted",
"label.admin": "Administrator",
"label.administrator": "Administrator",
"label.after": "After",
"label.all": "Alle",
"label.all-time": "Noensinne",

View File

@ -5,7 +5,7 @@
"label.add": "Add",
"label.add-description": "Add description",
"label.add-website": "Website koppelen",
"label.admin": "Beheerder",
"label.administrator": "Beheerder",
"label.after": "After",
"label.all": "Alles",
"label.all-time": "Onbeperkt",

View File

@ -5,7 +5,7 @@
"label.add": "Dodaj",
"label.add-description": "Dodaj opis",
"label.add-website": "Dodaj witrynę",
"label.admin": "Administrator",
"label.administrator": "Administrator",
"label.after": "Po",
"label.all": "Wszystkie",
"label.all-time": "Cały czas",

View File

@ -5,7 +5,7 @@
"label.add": "Add",
"label.add-description": "Add description",
"label.add-website": "Adicionar site",
"label.admin": "Administrador",
"label.administrator": "Administrador",
"label.after": "Depois",
"label.all": "Todos",
"label.all-time": "Todo o período",

View File

@ -5,7 +5,7 @@
"label.add": "Add",
"label.add-description": "Add description",
"label.add-website": "Adicionar website",
"label.admin": "Administrador",
"label.administrator": "Administrador",
"label.after": "After",
"label.all": "Todos",
"label.all-time": "Todo o tempo",

View File

@ -5,7 +5,7 @@
"label.add": "Add",
"label.add-description": "Add description",
"label.add-website": "Adăugare site web",
"label.admin": "Administrator",
"label.administrator": "Administrator",
"label.after": "After",
"label.all": "Toate",
"label.all-time": "All time",

View File

@ -5,7 +5,7 @@
"label.add": "Add",
"label.add-description": "Add description",
"label.add-website": "Добавить сайт",
"label.admin": "Администратор",
"label.administrator": "Администратор",
"label.after": "After",
"label.all": "Все",
"label.all-time": "Все время",

View File

@ -5,7 +5,7 @@
"label.add": "Add",
"label.add-description": "Add description",
"label.add-website": "වෙබ් අඩවිය එක් කරන්න",
"label.admin": "Administrator",
"label.administrator": "Administrator",
"label.after": "After",
"label.all": "සියල්ල",
"label.all-time": "හැම වෙලාවෙම",

View File

@ -5,7 +5,7 @@
"label.add": "Add",
"label.add-description": "Add description",
"label.add-website": "Pridať web",
"label.admin": "Administrátor",
"label.administrator": "Administrátor",
"label.after": "After",
"label.all": "Všetko",
"label.all-time": "All time",

View File

@ -5,7 +5,7 @@
"label.add": "Dodaj",
"label.add-description": "Dodaj opis",
"label.add-website": "Dodaj spletno mesto",
"label.admin": "Administrator",
"label.administrator": "Administrator",
"label.after": "Po",
"label.all": "Vsi",
"label.all-time": "Ves čas",

View File

@ -5,7 +5,7 @@
"label.add": "Lägg till",
"label.add-description": "Lägg till beskrivning",
"label.add-website": "Lägg till webbplats",
"label.admin": "Administratör",
"label.administrator": "Administratör",
"label.after": "Efter",
"label.all": "Alla",
"label.all-time": "Sedan början",

View File

@ -5,7 +5,7 @@
"label.add": "Add",
"label.add-description": "Add description",
"label.add-website": "வலைத்தளத்தைச் சேர்க்க",
"label.admin": "நிர்வாகியைச் சேர்க்க",
"label.administrator": "நிர்வாகியைச் சேர்க்க",
"label.after": "After",
"label.all": "எல்லாம்",
"label.all-time": "All time",

View File

@ -5,7 +5,7 @@
"label.add": "Add",
"label.add-description": "Add description",
"label.add-website": "เพิ่มเว็บไซต์",
"label.admin": "ผู้ดูแลระบบ",
"label.administrator": "ผู้ดูแลระบบ",
"label.after": "After",
"label.all": "ทั้งหมด",
"label.all-time": "ทุกช่วงเวลา",

View File

@ -5,7 +5,7 @@
"label.add": "Add",
"label.add-description": "Add description",
"label.add-website": "Web sitesi ekle",
"label.admin": "Yönetici",
"label.administrator": "Yönetici",
"label.after": "After",
"label.all": "Tümü",
"label.all-time": "All time",

View File

@ -5,7 +5,7 @@
"label.add": "Add",
"label.add-description": "Add description",
"label.add-website": "Додати сайт",
"label.admin": "Адміністратор",
"label.administrator": "Адміністратор",
"label.after": "After",
"label.all": "Всі",
"label.all-time": "Весь час",

View File

@ -5,7 +5,7 @@
"label.add": "Add",
"label.add-description": "Add description",
"label.add-website": "ویب سائٹ کا اضافہ کریں",
"label.admin": "منتظم",
"label.administrator": "منتظم",
"label.after": "After",
"label.all": "تمام",
"label.all-time": "تمام وقت",

View File

@ -5,7 +5,7 @@
"label.add": "Add",
"label.add-description": "Add description",
"label.add-website": "Thêm website",
"label.admin": "Quản trị",
"label.administrator": "Quản trị",
"label.after": "After",
"label.all": "Tất cả",
"label.all-time": "Toàn thời gian",

View File

@ -5,7 +5,7 @@
"label.add": "添加",
"label.add-description": "添加描述",
"label.add-website": "添加网站",
"label.admin": "管理员",
"label.administrator": "管理员",
"label.after": "之后",
"label.all": "所有",
"label.all-time": "所有时间段",

View File

@ -5,7 +5,7 @@
"label.add": "新增",
"label.add-description": "新增描述",
"label.add-website": "新增網站",
"label.admin": "管理員",
"label.administrator": "管理員",
"label.after": "之後",
"label.all": "全部",
"label.all-time": "所有時間",