mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: scope invite code to UserGroups
This commit is contained in:
parent
e173a32e3c
commit
ae677bc133
8 changed files with 212 additions and 54 deletions
|
|
@ -29,12 +29,12 @@ function UsersSettingsPage({ params }: { params: SettingsParams }) {
|
|||
setH2Label('Manage your organization users, assign roles and permissions')
|
||||
}
|
||||
if (params.subpage == 'signups') {
|
||||
setH1Label('Signup Access')
|
||||
setH1Label('Signups & Invite Codes')
|
||||
setH2Label('Choose from where users can join your organization')
|
||||
}
|
||||
if (params.subpage == 'add') {
|
||||
setH1Label('Invite users')
|
||||
setH2Label('Invite users to join your organization')
|
||||
setH1Label('Invite Members')
|
||||
setH2Label('Invite members to join your organization')
|
||||
}
|
||||
if (params.subpage == 'usergroups') {
|
||||
setH1Label('UserGroups')
|
||||
|
|
@ -95,23 +95,6 @@ function UsersSettingsPage({ params }: { params: SettingsParams }) {
|
|||
</div>
|
||||
</div>
|
||||
</Link>
|
||||
<Link
|
||||
href={
|
||||
getUriWithOrg(params.orgslug, '') + `/dash/users/settings/add`
|
||||
}
|
||||
>
|
||||
<div
|
||||
className={`py-2 w-fit text-center border-black transition-all ease-linear ${params.subpage.toString() === 'add'
|
||||
? 'border-b-4'
|
||||
: 'opacity-50'
|
||||
} cursor-pointer`}
|
||||
>
|
||||
<div className="flex items-center space-x-2.5 mx-2">
|
||||
<UserPlus size={16} />
|
||||
<div>Invite users</div>
|
||||
</div>
|
||||
</div>
|
||||
</Link>
|
||||
<Link
|
||||
href={
|
||||
getUriWithOrg(params.orgslug, '') + `/dash/users/settings/signups`
|
||||
|
|
@ -125,10 +108,28 @@ function UsersSettingsPage({ params }: { params: SettingsParams }) {
|
|||
>
|
||||
<div className="flex items-center space-x-2.5 mx-2">
|
||||
<ScanEye size={16} />
|
||||
<div>Signup Access</div>
|
||||
<div>Signups & Invite Codes</div>
|
||||
</div>
|
||||
</div>
|
||||
</Link>
|
||||
<Link
|
||||
href={
|
||||
getUriWithOrg(params.orgslug, '') + `/dash/users/settings/add`
|
||||
}
|
||||
>
|
||||
<div
|
||||
className={`py-2 w-fit text-center border-black transition-all ease-linear ${params.subpage.toString() === 'add'
|
||||
? 'border-b-4'
|
||||
: 'opacity-50'
|
||||
} cursor-pointer`}
|
||||
>
|
||||
<div className="flex items-center space-x-2.5 mx-2">
|
||||
<UserPlus size={16} />
|
||||
<div>Invite Members</div>
|
||||
</div>
|
||||
</div>
|
||||
</Link>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<motion.div
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import Link from 'next/link'
|
|||
import { getUriWithOrg } from '@services/config/config'
|
||||
import { useSession } from '@components/Contexts/SessionContext'
|
||||
import React, { useEffect } from 'react'
|
||||
import { MailWarning, Shield, UserPlus } from 'lucide-react'
|
||||
import { MailWarning, Shield, Ticket, UserPlus } from 'lucide-react'
|
||||
import { useOrg } from '@components/Contexts/OrgContext'
|
||||
import UserAvatar from '@components/Objects/UserAvatar'
|
||||
import OpenSignUpComponent from './OpenSignup'
|
||||
|
|
@ -201,7 +201,7 @@ const NoTokenScreen = (props: any) => {
|
|||
onClick={validateCode}
|
||||
className="flex w-fit space-x-2 bg-black px-6 py-2 text-md rounded-lg font-semibold h-fit text-white items-center shadow-md"
|
||||
>
|
||||
<Shield size={18} />
|
||||
<Ticket size={18} />
|
||||
<p>Submit </p>
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue