feat: update frontend references from User to PartyUser for party user management module
This commit is contained in:
@@ -56,7 +56,7 @@ type Props = {
|
||||
currentUser?: IPartyUserItem;
|
||||
};
|
||||
|
||||
export function UserNewEditForm({ currentUser }: Props) {
|
||||
export function PartyUserNewEditForm({ currentUser }: Props) {
|
||||
const { t } = useTranslation();
|
||||
|
||||
const router = useRouter();
|
||||
@@ -103,8 +103,8 @@ export function UserNewEditForm({ currentUser }: Props) {
|
||||
try {
|
||||
if (currentUser) {
|
||||
await deletePartyUser(currentUser.id);
|
||||
toast.success(t('user deleted'));
|
||||
router.push(paths.dashboard.user.list);
|
||||
toast.success(t('party user deleted'));
|
||||
router.push(paths.dashboard.partyUser.list);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
@@ -133,7 +133,7 @@ export function UserNewEditForm({ currentUser }: Props) {
|
||||
|
||||
toast.success(currentUser ? t('Update success!') : t('Create success!'));
|
||||
|
||||
router.push(paths.dashboard.user.list);
|
||||
router.push(paths.dashboard.partyUser.list);
|
||||
|
||||
// console.info('DATA', data);
|
||||
} catch (error) {
|
||||
|
Reference in New Issue
Block a user