1
0
forked from test/crm

fix: open invite user page from users add new agent dropdown option

(cherry picked from commit d244567b3067f2281ec7e5e9b95c035cc87ecad9)
This commit is contained in:
Shariq Ansari 2025-06-17 14:57:05 +05:30 committed by Mergify
parent aac50e1d10
commit f4c033fd52
3 changed files with 22 additions and 7 deletions

View File

@ -351,7 +351,7 @@ const steps = reactive([
onClick: () => {
minimize.value = true
showSettings.value = true
activeSettingsPage.value = 'Invite Agent'
activeSettingsPage.value = 'Invite User'
},
condition: () => isManager(),
},

View File

@ -28,7 +28,7 @@
? 'bg-surface-selected shadow-sm hover:bg-surface-selected'
: 'hover:bg-surface-gray-3'
"
@click="activeTab = i"
@click="activeSettingsPage = i.label"
/>
</nav>
</div>

View File

@ -27,11 +27,23 @@
@change="(e) => changeStatus(e.target.value)"
>
</FormControl>
<Button
:label="__('Add User')"
icon-left="plus"
variant="solid"
@click="$emit('add-user')"
<Dropdown
:options="[
{
label: __('Add Existing User'),
onClick: () => (showAddExistingModal = true),
},
{
label: __('Invite New User'),
onClick: () => (activeSettingsPage = 'Invite User'),
},
]"
:button="{
label: __('New'),
iconLeft: 'plus',
variant: 'solid',
}"
placement="right"
/>
</div>
</div>
@ -119,6 +131,7 @@
<script setup>
import LucideCheck from '~icons/lucide/check'
import { activeSettingsPage } from '@/composables/settings'
import { usersStore } from '@/stores/users'
import {
Avatar,
@ -132,6 +145,8 @@ import { ref, h, watch, onMounted } from 'vue'
const { users: usersResource, getUserRole, isAdmin, isManager } = usersStore()
const showAddExistingModal = ref(false)
const users = createListResource({
doctype: 'CRM User',
cache: 'CRM Users',