diff --git a/src/components/dialog/AssignMembersDialog.tsx b/src/components/dialog/AssignMembersDialog.tsx index 4a73764..eb27451 100644 --- a/src/components/dialog/AssignMembersDialog.tsx +++ b/src/components/dialog/AssignMembersDialog.tsx @@ -5,17 +5,17 @@ import { useTranslation } from 'react-i18next'; import { useSnackbar } from 'notistack'; +import { zodResolver } from '@hookform/resolvers/zod'; +import useAxios from 'axios-hooks'; +import { deserialize, ExistingDocumentObject } from 'jsonapi-fractal'; +import { useEffect, useState } from 'react'; +import { ErrorResponse } from 'react-router-dom'; import { TEAM_MEMBER_ROLE } from '@/constants'; import useUpdateMutation from '@/hooks/useUpdateMutation'; import { FormSelectOption, Member } from '@/schemas'; import { Team } from '@/schemas/entities'; import { UpdateTeam, UpdateTeamInputType, updateTeamSchema } from '@/schemas/update'; import FormMultipleSelect from '@/themed/form-multiple-select/FormMultipleSelect'; -import { zodResolver } from '@hookform/resolvers/zod'; -import useAxios from 'axios-hooks'; -import { deserialize, ExistingDocumentObject } from 'jsonapi-fractal'; -import { useEffect, useState } from 'react'; -import { ErrorResponse } from 'react-router-dom'; import { IUser } from '../../schemas/auth'; import { Button } from '../../themed/button/Button'; import { FormInput } from '../../themed/form-input/FormInput'; diff --git a/src/components/list/TeamsList.tsx b/src/components/list/TeamsList.tsx index 86a5b3f..496268e 100644 --- a/src/components/list/TeamsList.tsx +++ b/src/components/list/TeamsList.tsx @@ -1,10 +1,9 @@ -import useStateContext from '@/hooks/useStateContext'; -import { Member } from '@/schemas'; -import { Team } from '@/schemas/entities'; -import Button from '@/themed/button/Button'; import { Dialog } from '@mui/material'; import { useState } from 'react'; import { useTranslation } from 'react-i18next'; +import useStateContext from '@/hooks/useStateContext'; +import { Team } from '@/schemas/entities'; +import Button from '@/themed/button/Button'; import { HeadCell } from '../../themed/table/DataTable'; import { AssignMembersDialog } from '../dialog/AssignMembersDialog'; import FilteredDataTable from './FilteredDataTable'; @@ -22,6 +21,12 @@ function headCells(isAdmin: boolean): HeadCell[] { sortable: true, filterable: true, }, + { + id: 'city', + label: 'city', + filterable: true, + sortable: true, + }, { id: 'sector', label: 'sector', @@ -35,10 +40,9 @@ function headCells(isAdmin: boolean): HeadCell[] { sortable: true, }, { - id: 'members', - label: 'members', + id: 'memberCount', + label: 'memberCount', filterable: false, - render: (row) => {row.members.map((m: Member) => `${m.fullName}`).join(', ')}, sortKey: 'members', }, { diff --git a/src/i18n/locales/en/translation.json b/src/i18n/locales/en/translation.json index ec01317..1d82928 100644 --- a/src/i18n/locales/en/translation.json +++ b/src/i18n/locales/en/translation.json @@ -77,7 +77,8 @@ "wedge": "Wedge", "members": "Members", "leader": "Leader", - "memberCount": "Number of members" + "memberCount": "Number of members", + "city": "City" }, "options": { "notDefined": "Not Defined", diff --git a/src/i18n/locales/es/translation.json b/src/i18n/locales/es/translation.json index bab8581..557f4a2 100644 --- a/src/i18n/locales/es/translation.json +++ b/src/i18n/locales/es/translation.json @@ -76,7 +76,8 @@ "wedge": "Cuña", "members": "Miembros", "leader": "Líder", - "memberCount": "Número de miembros" + "memberCount": "Número de miembros", + "city": "Ciudad" }, "options": { "notDefined": "No definido", diff --git a/src/i18n/locales/pt/translation.json b/src/i18n/locales/pt/translation.json index 2137ff2..fa5773f 100644 --- a/src/i18n/locales/pt/translation.json +++ b/src/i18n/locales/pt/translation.json @@ -76,7 +76,8 @@ "wedge": "Subsetor", "members": "Membros", "leader": "Líder", - "memberCount": "Número de membros" + "memberCount": "Número de membros", + "city": "Cidade" }, "options": { "notDefined": "Não definido", diff --git a/src/schemas/entities.ts b/src/schemas/entities.ts index 02e9955..26ab584 100644 --- a/src/schemas/entities.ts +++ b/src/schemas/entities.ts @@ -35,6 +35,7 @@ export interface Role extends BaseEntity { export interface Team extends BaseEntity { organization: Organization; sector: string; + city: string; wedge: string; leader: string; members: Member[];