fix: added invite member page in settings modal
This commit is contained in:
parent
5e254880a6
commit
cfbb1e5b34
42
frontend/src/components/Settings/InviteMemberPage.vue
Normal file
42
frontend/src/components/Settings/InviteMemberPage.vue
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
<template>
|
||||||
|
<div class="flex h-full flex-col gap-8 p-8">
|
||||||
|
<h2 class="flex gap-2 text-xl font-semibold leading-none h-5">
|
||||||
|
{{ __('Send Invites To') }}
|
||||||
|
</h2>
|
||||||
|
<div class="flex-1 overflow-y-auto">
|
||||||
|
<MultiValueInput
|
||||||
|
v-model="invitees"
|
||||||
|
:validate="validateEmail"
|
||||||
|
:error-message="
|
||||||
|
(value) => __('{0} is an invalid email address', [value])
|
||||||
|
"
|
||||||
|
/>
|
||||||
|
<FormControl
|
||||||
|
type="select"
|
||||||
|
class="mt-4"
|
||||||
|
v-model="role"
|
||||||
|
variant="outline"
|
||||||
|
:label="__('Invite as')"
|
||||||
|
:options="[
|
||||||
|
{ label: __('Regular Access'), value: 'Sales User' },
|
||||||
|
{ label: __('Manager Access'), value: 'Sales Manager' },
|
||||||
|
{ label: __('Admin Access'), value: 'Administrator' },
|
||||||
|
]"
|
||||||
|
/>
|
||||||
|
<ErrorMessage class="mt-2" v-if="error" :message="error" />
|
||||||
|
</div>
|
||||||
|
<div class="flex flex-row-reverse">
|
||||||
|
<Button :label="__('Send Invites')" variant="solid" @click="update" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script setup>
|
||||||
|
import MultiValueInput from '@/components/Controls/MultiValueInput.vue'
|
||||||
|
import { validateEmail } from '@/utils'
|
||||||
|
import { FormControl } from 'frappe-ui'
|
||||||
|
import { ref } from 'vue'
|
||||||
|
|
||||||
|
const invitees = ref([])
|
||||||
|
const role = ref('Sales User')
|
||||||
|
const error = ref(null)
|
||||||
|
</script>
|
||||||
@ -40,6 +40,7 @@
|
|||||||
import ContactsIcon from '@/components/Icons/ContactsIcon.vue'
|
import ContactsIcon from '@/components/Icons/ContactsIcon.vue'
|
||||||
import WhatsAppIcon from '@/components/Icons/WhatsAppIcon.vue'
|
import WhatsAppIcon from '@/components/Icons/WhatsAppIcon.vue'
|
||||||
import PhoneIcon from '@/components/Icons/PhoneIcon.vue'
|
import PhoneIcon from '@/components/Icons/PhoneIcon.vue'
|
||||||
|
import InviteMemberPage from '@/components/Settings/InviteMemberPage.vue'
|
||||||
import ProfileSettings from '@/components/Settings/ProfileSettings.vue'
|
import ProfileSettings from '@/components/Settings/ProfileSettings.vue'
|
||||||
import WhatsAppSettings from '@/components/Settings/WhatsAppSettings.vue'
|
import WhatsAppSettings from '@/components/Settings/WhatsAppSettings.vue'
|
||||||
import TwilioSettings from '@/components/Settings/TwilioSettings.vue'
|
import TwilioSettings from '@/components/Settings/TwilioSettings.vue'
|
||||||
@ -53,26 +54,31 @@ const show = defineModel()
|
|||||||
const tabs = computed(() => {
|
const tabs = computed(() => {
|
||||||
let _tabs = [
|
let _tabs = [
|
||||||
{
|
{
|
||||||
label: 'Settings',
|
label: __('Settings'),
|
||||||
hideLabel: true,
|
hideLabel: true,
|
||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
label: 'Profile',
|
label: __('Profile'),
|
||||||
icon: ContactsIcon,
|
icon: ContactsIcon,
|
||||||
component: markRaw(ProfileSettings),
|
component: markRaw(ProfileSettings),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: __('Invite Members'),
|
||||||
|
icon: 'user-plus',
|
||||||
|
component: markRaw(InviteMemberPage),
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Integrations',
|
label: __('Integrations'),
|
||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
label: 'Twilio',
|
label: __('Twilio'),
|
||||||
icon: PhoneIcon,
|
icon: PhoneIcon,
|
||||||
component: markRaw(TwilioSettings),
|
component: markRaw(TwilioSettings),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'WhatsApp',
|
label: __('WhatsApp'),
|
||||||
icon: WhatsAppIcon,
|
icon: WhatsAppIcon,
|
||||||
component: markRaw(WhatsAppSettings),
|
component: markRaw(WhatsAppSettings),
|
||||||
condition: () => isWhatsappInstalled.value,
|
condition: () => isWhatsappInstalled.value,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user