diff --git a/frontend/components/user/Toolbar.vue b/frontend/components/user/Toolbar.vue deleted file mode 100644 index 6743117..0000000 --- a/frontend/components/user/Toolbar.vue +++ /dev/null @@ -1,44 +0,0 @@ - - - diff --git a/frontend/pages/admin/merge.vue b/frontend/pages/admin/merge.vue index 8a21107..1e8fe84 100644 --- a/frontend/pages/admin/merge.vue +++ b/frontend/pages/admin/merge.vue @@ -64,7 +64,7 @@ const reset = () => { @@ -82,7 +82,7 @@ const reset = () => { diff --git a/frontend/pages/admin/users.vue b/frontend/pages/admin/users.vue index 16140e3..a7a3f0d 100644 --- a/frontend/pages/admin/users.vue +++ b/frontend/pages/admin/users.vue @@ -125,7 +125,7 @@ const reset = () => { always /> - -import { userEditor } from '@/lib/editor' - -const pactaClient = usePACTA() -const { fromParams } = useURLParams() -const { loading: { withLoading } } = useModal() -const router = useRouter() -const localePath = useLocalePath() -const i18n = useI18n() - -const id = presentOrCheckURL(fromParams('id')) -const prefix = `user/[${id}]` - -const { data } = await useSimpleAsyncData(`${prefix}.getUser`, () => pactaClient.findUserById(id)) -const { - editorValues, - editorFields, - changes, - saveTooltip, - canSave, -} = userEditor(presentOrCheckURL(data.value, 'no user in response'), i18n) - -const deleteUser = () => withLoading( - () => pactaClient.deleteUser(id).then(() => router.push(localePath('/'))), - `${prefix}.deleteUser`, -) -const saveChanges = () => withLoading( - () => pactaClient.updateUser(id, changes.value) - .then(() => router.push(localePath(`/user/${id}`))), - `${prefix}.saveChanges`, -) - - - diff --git a/frontend/pages/user/[id]/index.vue b/frontend/pages/user/[id]/index.vue index 5f11d1b..eda9159 100644 --- a/frontend/pages/user/[id]/index.vue +++ b/frontend/pages/user/[id]/index.vue @@ -1,12 +1,86 @@ +import { userEditor } from '@/lib/editor' -