feat: update frontend component names from User to PartyUser for consistency with party-user module
This commit is contained in:
@@ -1278,4 +1278,5 @@ model PartyUser {
|
|||||||
accounts Account[]
|
accounts Account[]
|
||||||
sessions Session[]
|
sessions Session[]
|
||||||
info Json?
|
info Json?
|
||||||
|
phoneNumber String @default("")
|
||||||
}
|
}
|
||||||
|
@@ -49,7 +49,7 @@ type Props = {
|
|||||||
currentUser?: IUserItem;
|
currentUser?: IUserItem;
|
||||||
};
|
};
|
||||||
|
|
||||||
export function UserQuickEditForm({ currentUser, open, onClose }: Props) {
|
export function PartyUserQuickEditForm({ currentUser, open, onClose }: Props) {
|
||||||
const { t } = useTranslate();
|
const { t } = useTranslate();
|
||||||
|
|
||||||
const defaultValues: UserQuickEditSchemaType = {
|
const defaultValues: UserQuickEditSchemaType = {
|
||||||
|
@@ -12,7 +12,7 @@ type Props = FiltersResultProps & {
|
|||||||
filters: UseSetStateReturn<IPartyUserTableFilters>;
|
filters: UseSetStateReturn<IPartyUserTableFilters>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export function UserTableFiltersResult({ filters, onResetPage, totalResults, sx }: Props) {
|
export function PartyUserTableFiltersResult({ filters, onResetPage, totalResults, sx }: Props) {
|
||||||
const { state: currentFilters, setState: updateFilters, resetState: resetFilters } = filters;
|
const { state: currentFilters, setState: updateFilters, resetState: resetFilters } = filters;
|
||||||
|
|
||||||
const handleRemoveKeyword = useCallback(() => {
|
const handleRemoveKeyword = useCallback(() => {
|
||||||
|
@@ -19,7 +19,7 @@ import { Iconify } from 'src/components/iconify';
|
|||||||
import { Label } from 'src/components/label';
|
import { Label } from 'src/components/label';
|
||||||
import { RouterLink } from 'src/routes/components';
|
import { RouterLink } from 'src/routes/components';
|
||||||
import type { IPartyUserItem } from 'src/types/party-user';
|
import type { IPartyUserItem } from 'src/types/party-user';
|
||||||
import { UserQuickEditForm } from './party-user-quick-edit-form';
|
import { PartyUserQuickEditForm } from './party-user-quick-edit-form';
|
||||||
|
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -31,14 +31,14 @@ type Props = {
|
|||||||
onDeleteRow: () => void;
|
onDeleteRow: () => void;
|
||||||
};
|
};
|
||||||
|
|
||||||
export function UserTableRow({ row, selected, editHref, onSelectRow, onDeleteRow }: Props) {
|
export function PartyUserTableRow({ row, selected, editHref, onSelectRow, onDeleteRow }: Props) {
|
||||||
const menuActions = usePopover();
|
const menuActions = usePopover();
|
||||||
const confirmDialog = useBoolean();
|
const confirmDialog = useBoolean();
|
||||||
const quickEditForm = useBoolean();
|
const quickEditForm = useBoolean();
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
const renderQuickEditForm = () => (
|
const renderQuickEditForm = () => (
|
||||||
<UserQuickEditForm
|
<PartyUserQuickEditForm
|
||||||
currentUser={row}
|
currentUser={row}
|
||||||
open={quickEditForm.value}
|
open={quickEditForm.value}
|
||||||
onClose={quickEditForm.onFalse}
|
onClose={quickEditForm.onFalse}
|
||||||
|
@@ -27,7 +27,7 @@ type Props = {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
export function UserTableToolbar({ filters, options, onResetPage }: Props) {
|
export function PartyUserTableToolbar({ filters, options, onResetPage }: Props) {
|
||||||
const menuActions = usePopover();
|
const menuActions = usePopover();
|
||||||
|
|
||||||
const { state: currentFilters, setState: updateFilters } = filters;
|
const { state: currentFilters, setState: updateFilters } = filters;
|
||||||
|
@@ -36,9 +36,9 @@ import { DashboardContent } from 'src/layouts/dashboard';
|
|||||||
import { useRouter } from 'src/routes/hooks';
|
import { useRouter } from 'src/routes/hooks';
|
||||||
import { paths } from 'src/routes/paths';
|
import { paths } from 'src/routes/paths';
|
||||||
import type { IPartyUserItem, IPartyUserTableFilters } from 'src/types/party-user';
|
import type { IPartyUserItem, IPartyUserTableFilters } from 'src/types/party-user';
|
||||||
import { UserTableFiltersResult } from '../party-user-table-filters-result';
|
import { PartyUserTableFiltersResult } from '../party-user-table-filters-result';
|
||||||
import { UserTableRow } from '../party-user-table-row';
|
import { PartyUserTableRow } from '../party-user-table-row';
|
||||||
import { UserTableToolbar } from '../party-user-table-toolbar';
|
import { PartyUserTableToolbar } from '../party-user-table-toolbar';
|
||||||
|
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -158,7 +158,7 @@ export function PartyUserListView() {
|
|||||||
links={[
|
links={[
|
||||||
//
|
//
|
||||||
{ name: t('Dashboard'), href: paths.dashboard.root },
|
{ name: t('Dashboard'), href: paths.dashboard.root },
|
||||||
{ name: t('PartyUserListView'), href: paths.dashboard.partyUser.root },
|
{ name: t('PartyUser'), href: paths.dashboard.partyUser.root },
|
||||||
{ name: t('List') },
|
{ name: t('List') },
|
||||||
]}
|
]}
|
||||||
action={
|
action={
|
||||||
@@ -219,14 +219,14 @@ export function PartyUserListView() {
|
|||||||
))}
|
))}
|
||||||
</Tabs>
|
</Tabs>
|
||||||
|
|
||||||
<UserTableToolbar
|
<PartyUserTableToolbar
|
||||||
filters={filters}
|
filters={filters}
|
||||||
onResetPage={table.onResetPage}
|
onResetPage={table.onResetPage}
|
||||||
options={{ roles: _roles }}
|
options={{ roles: _roles }}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{canReset && (
|
{canReset && (
|
||||||
<UserTableFiltersResult
|
<PartyUserTableFiltersResult
|
||||||
filters={filters}
|
filters={filters}
|
||||||
totalResults={dataFiltered.length}
|
totalResults={dataFiltered.length}
|
||||||
onResetPage={table.onResetPage}
|
onResetPage={table.onResetPage}
|
||||||
@@ -278,7 +278,7 @@ export function PartyUserListView() {
|
|||||||
table.page * table.rowsPerPage + table.rowsPerPage
|
table.page * table.rowsPerPage + table.rowsPerPage
|
||||||
)
|
)
|
||||||
.map((row) => (
|
.map((row) => (
|
||||||
<UserTableRow
|
<PartyUserTableRow
|
||||||
key={row.id}
|
key={row.id}
|
||||||
row={row}
|
row={row}
|
||||||
selected={table.selected.includes(row.id)}
|
selected={table.selected.includes(row.id)}
|
||||||
|
Reference in New Issue
Block a user