Skip to content

Commit

Permalink
Changed Admin tab to Manage.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikecao committed Feb 8, 2024
1 parent 91e3dff commit 642aba8
Show file tree
Hide file tree
Showing 55 changed files with 59 additions and 59 deletions.
8 changes: 4 additions & 4 deletions src/app/(main)/settings/teams/[teamId]/team/TeamDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) {
Expand All @@ -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,
);

Expand All @@ -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>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -30,4 +30,4 @@ export function TeamAdmin({ teamId }: { teamId: string }) {
);
}

export default TeamAdmin;
export default TeamManage;
2 changes: 1 addition & 1 deletion src/components/layout/SideNav.module.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.menu {
display: flex;
flex-direction: column;
gap: 2px;
gap: 4px;
}

.item a {
Expand Down
2 changes: 1 addition & 1 deletion src/components/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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' },
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/lang/am-ET.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/lang/ar-SA.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "كل الوقت",
Expand Down
2 changes: 1 addition & 1 deletion src/lang/be-BY.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "Увесь час",
Expand Down
2 changes: 1 addition & 1 deletion src/lang/bn-BD.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "সব সময়",
Expand Down
2 changes: 1 addition & 1 deletion src/lang/ca-ES.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/lang/cs-CZ.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/lang/da-DK.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/lang/de-CH.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/lang/de-DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/lang/el-GR.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/lang/en-GB.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/lang/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/lang/es-ES.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/lang/fa-IR.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "همه زمان",
Expand Down
2 changes: 1 addition & 1 deletion src/lang/fi-FI.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/lang/fo-FO.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/lang/fr-FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/lang/ga-ES.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/lang/he-IL.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/lang/hi-IN.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/lang/hr-HR.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/lang/hu-HU.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/lang/id-ID.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/lang/it-IT.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/lang/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"label.add": "追加",
"label.add-description": "説明を追加",
"label.add-website": "Webサイトの追加",
"label.admin": "管理者",
"label.administrator": "管理者",
"label.after": "直後",
"label.all": "すべて",
"label.all-time": "すべての時間帯",
Expand Down
2 changes: 1 addition & 1 deletion src/lang/km-KH.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "គ្រប់ពេល",
Expand Down
2 changes: 1 addition & 1 deletion src/lang/ko-KR.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/lang/lt-LT.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/lang/mn-MN.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"label.add": "Нэмэх",
"label.add-description": "Тайлбар нэмэх",
"label.add-website": "Веб нэмэх",
"label.admin": "Админ",
"label.administrator": "Админ",
"label.after": "Хойно",
"label.all": "Бүх",
"label.all-time": "Бүх цаг үеийн",
Expand Down
2 changes: 1 addition & 1 deletion src/lang/ms-MY.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/lang/my-MM.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"label.add": "ထပ်ထည့်မည်",
"label.add-description": "အကြောင်းအရာဖော်ပြချက် ထည့်မည်",
"label.add-website": "ဝက်ဘ်ဆိုဒ်ထည့်မည်",
"label.admin": "အက်ဒမင်",
"label.administrator": "အက်ဒမင်",
"label.after": "ပြီးနောက်",
"label.all": "အားလုံး",
"label.all-time": "အချိန်အစမှအခုထိ",
Expand Down
2 changes: 1 addition & 1 deletion src/lang/nb-NO.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/lang/nl-NL.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/lang/pl-PL.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/lang/pt-BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/lang/pt-PT.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Loading

0 comments on commit 642aba8

Please sign in to comment.