Skip to content

Commit

Permalink
Фикс заголовков страницы изменения пользователя. Улучшение навигации.…
Browse files Browse the repository at this point in the history
… Удален лишний код.
  • Loading branch information
simba77 committed Jun 25, 2024
1 parent 7cf5307 commit 8dcb683
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions resources/admin/pages/Users/UserForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,15 @@ const router = useRouter()
const route = useRoute()
breadcrumbsPreset.users()
pageHeader.title = 'Добавить пользователя'
pageHeader.title = route.params.id ? 'Изменить пользователя' : 'Добавить пользователя'
useHead({
title: 'Добавить пользователя'
title: pageHeader.title
})
breadcrumbsPreset.add({
url: '',
name: pageHeader.title
})
const form = reactive({
Expand All @@ -33,16 +38,7 @@ const form = reactive({
})
const formParams = ref({
roles: [
{
id: 'admin',
name: 'Администратор',
},
{
id: 'user',
name: 'Пользователь',
}
]
roles: []
})
const {run: getFormParams} = useAsync(() => axios.get('/users/get-form-params/')
Expand Down Expand Up @@ -75,7 +71,7 @@ const {loading: loadingForm, run: getEditForm} = useAsync(() => axios.get('/user
})
)
if(route.params.id) {
if (route.params.id) {
// Get user edit form
getEditForm()
}
Expand Down

0 comments on commit 8dcb683

Please sign in to comment.