From 8dcb683ee6c00d967a1cc2c6638e3a433421bdbe Mon Sep 17 00:00:00 2001 From: simba77 Date: Tue, 25 Jun 2024 10:56:20 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A4=D0=B8=D0=BA=D1=81=20=D0=B7=D0=B0=D0=B3?= =?UTF-8?q?=D0=BE=D0=BB=D0=BE=D0=B2=D0=BA=D0=BE=D0=B2=20=D1=81=D1=82=D1=80?= =?UTF-8?q?=D0=B0=D0=BD=D0=B8=D1=86=D1=8B=20=D0=B8=D0=B7=D0=BC=D0=B5=D0=BD?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE?= =?UTF-8?q?=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D1=8F.=20=D0=A3=D0=BB=D1=83?= =?UTF-8?q?=D1=87=D1=88=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BD=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=B3=D0=B0=D1=86=D0=B8=D0=B8.=20=D0=A3=D0=B4=D0=B0=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=20=D0=BB=D0=B8=D1=88=D0=BD=D0=B8=D0=B9=20=D0=BA?= =?UTF-8?q?=D0=BE=D0=B4.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/admin/pages/Users/UserForm.vue | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/resources/admin/pages/Users/UserForm.vue b/resources/admin/pages/Users/UserForm.vue index 6595a2e..6166a9a 100644 --- a/resources/admin/pages/Users/UserForm.vue +++ b/resources/admin/pages/Users/UserForm.vue @@ -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({ @@ -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/') @@ -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() }