implement new invitation system

* fix comments on the frontend
* move jwt token service to its own module
* other fixes and updates
This commit is contained in:
Philipinho
2024-05-14 22:55:11 +01:00
parent 525990d6e5
commit eefe63d1cd
75 changed files with 10965 additions and 7846 deletions

View File

@ -8,6 +8,8 @@ import { IconUsersGroup } from "@tabler/icons-react";
interface MultiGroupSelectProps {
onChange: (value: string[]) => void;
label?: string;
description?: string;
mt?: string;
}
const renderMultiSelectOption: MultiSelectProps["renderOption"] = ({
@ -21,7 +23,12 @@ const renderMultiSelectOption: MultiSelectProps["renderOption"] = ({
</Group>
);
export function MultiGroupSelect({ onChange, label }: MultiGroupSelectProps) {
export function MultiGroupSelect({
onChange,
label,
description,
mt,
}: MultiGroupSelectProps) {
const [searchValue, setSearchValue] = useState("");
const [debouncedQuery] = useDebouncedValue(searchValue, 500);
const { data: groups, isLoading } = useGetGroupsQuery({
@ -56,8 +63,10 @@ export function MultiGroupSelect({ onChange, label }: MultiGroupSelectProps) {
renderOption={renderMultiSelectOption}
hidePickedOptions
maxDropdownHeight={300}
description={description}
label={label || "Add groups"}
placeholder="Search for groups"
mt={mt}
searchable
searchValue={searchValue}
onSearchChange={setSearchValue}