Skip to content

Commit

Permalink
fix: add missing columns
Browse files Browse the repository at this point in the history
  • Loading branch information
zant committed Sep 9, 2024
1 parent aeb65bd commit cd0fd11
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .env.development
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
VITE_APP_VERSION="1.0.0"
VITE_API_URL="http://localhost:3000"
VITE_API_URL="https://apisandbox.denguechatplus.org"
VITE_HOST="develop.denguechatplus.org"
VITE_DEFAULT_LANG="es"
VITE_LOCALE="es-ES"
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
17 changes: 11 additions & 6 deletions src/components/list/TeamsList.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Dialog } from '@mui/material';
import { useState } from 'react';
import { useTranslation } from 'react-i18next';
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 { HeadCell } from '../../themed/table/DataTable';
import { AssignMembersDialog } from '../dialog/AssignMembersDialog';
import FilteredDataTable from './FilteredDataTable';
Expand All @@ -22,6 +22,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 +41,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 cd0fd11

Please sign in to comment.