Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:socialappslab/denguechatPlus-web…
Browse files Browse the repository at this point in the history
… into develop
  • Loading branch information
nahu committed Sep 17, 2024
2 parents 2bace31 + a4f5fa0 commit a6c8101
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 15 deletions.
10 changes: 5 additions & 5 deletions src/components/dialog/AssignMembersDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
18 changes: 11 additions & 7 deletions src/components/list/TeamsList.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -22,6 +21,12 @@ function headCells(isAdmin: boolean): HeadCell<Team>[] {
sortable: true,
filterable: true,
},
{
id: 'city',
label: 'city',
filterable: true,
sortable: true,
},
{
id: 'sector',
label: 'sector',
Expand All @@ -35,10 +40,9 @@ function headCells(isAdmin: boolean): HeadCell<Team>[] {
sortable: true,
},
{
id: 'members',
label: 'members',
id: 'memberCount',
label: 'memberCount',
filterable: false,
render: (row) => <span key={row.id}>{row.members.map((m: Member) => `${m.fullName}`).join(', ')}</span>,
sortKey: 'members',
},
{
Expand Down
3 changes: 2 additions & 1 deletion src/i18n/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@
"wedge": "Wedge",
"members": "Members",
"leader": "Leader",
"memberCount": "Number of members"
"memberCount": "Number of members",
"city": "City"
},
"options": {
"notDefined": "Not Defined",
Expand Down
3 changes: 2 additions & 1 deletion src/i18n/locales/es/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 2 additions & 1 deletion src/i18n/locales/pt/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions src/schemas/entities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[];
Expand Down

0 comments on commit a6c8101

Please sign in to comment.