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