@planningcenter/chat-react-native 4.7.1-qa-staging.5 → 4.7.1-qa-staging.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/hooks/groups/use_group_chat_conversation_payload.d.ts +1 -11
- package/build/hooks/groups/use_group_chat_conversation_payload.d.ts.map +1 -1
- package/build/hooks/groups/use_group_chat_conversation_payload.js +47 -92
- package/build/hooks/groups/use_group_chat_conversation_payload.js.map +1 -1
- package/build/hooks/groups/use_group_members_for_new_conversation.d.ts +25 -27
- package/build/hooks/groups/use_group_members_for_new_conversation.d.ts.map +1 -1
- package/build/hooks/groups/use_group_members_for_new_conversation.js +110 -125
- package/build/hooks/groups/use_group_members_for_new_conversation.js.map +1 -1
- package/build/hooks/groups/use_groups_conversation_create.d.ts.map +1 -1
- package/build/hooks/groups/use_groups_conversation_create.js +31 -39
- package/build/hooks/groups/use_groups_conversation_create.js.map +1 -1
- package/build/hooks/use_features.d.ts +0 -1
- package/build/hooks/use_features.d.ts.map +1 -1
- package/build/hooks/use_features.js +1 -2
- package/build/hooks/use_features.js.map +1 -1
- package/build/hooks/use_groups_groups.d.ts.map +1 -1
- package/build/hooks/use_groups_groups.js +9 -25
- package/build/hooks/use_groups_groups.js.map +1 -1
- package/build/hooks/use_new_conversation_from_filter.d.ts.map +1 -1
- package/build/hooks/use_new_conversation_from_filter.js +1 -11
- package/build/hooks/use_new_conversation_from_filter.js.map +1 -1
- package/build/screens/conversation_new/components/groups_form.d.ts.map +1 -1
- package/build/screens/conversation_new/components/groups_form.js +93 -96
- package/build/screens/conversation_new/components/groups_form.js.map +1 -1
- package/build/types/resources/groups/groups_group_resource.d.ts +1 -1
- package/build/types/resources/groups/groups_group_resource.d.ts.map +1 -1
- package/build/types/resources/groups/groups_group_resource.js.map +1 -1
- package/build/types/resources/groups/index.d.ts +0 -1
- package/build/types/resources/groups/index.d.ts.map +1 -1
- package/build/types/resources/groups/index.js +0 -1
- package/build/types/resources/groups/index.js.map +1 -1
- package/package.json +3 -3
- package/src/__tests__/hooks/use_group_chat_conversation_payload.test.tsx +0 -31
- package/src/hooks/groups/use_group_chat_conversation_payload.ts +12 -30
- package/src/hooks/groups/use_group_members_for_new_conversation.ts +18 -49
- package/src/hooks/groups/use_groups_conversation_create.ts +14 -10
- package/src/hooks/use_features.ts +0 -1
- package/src/hooks/use_groups_groups.ts +16 -21
- package/src/hooks/use_new_conversation_from_filter.ts +5 -13
- package/src/screens/conversation_new/components/groups_form.tsx +9 -11
- package/src/types/resources/groups/groups_group_resource.ts +1 -1
- package/src/types/resources/groups/index.ts +0 -1
- package/build/hooks/groups/use_groups_proxy.d.ts +0 -2
- package/build/hooks/groups/use_groups_proxy.d.ts.map +0 -1
- package/build/hooks/groups/use_groups_proxy.js +0 -18
- package/build/hooks/groups/use_groups_proxy.js.map +0 -1
- package/build/types/resources/groups/groups_membership_resource.d.ts +0 -11
- package/build/types/resources/groups/groups_membership_resource.d.ts.map +0 -1
- package/build/types/resources/groups/groups_membership_resource.js +0 -2
- package/build/types/resources/groups/groups_membership_resource.js.map +0 -1
- package/src/hooks/groups/use_groups_proxy.ts +0 -6
- package/src/types/resources/groups/groups_membership_resource.ts +0 -10
|
@@ -5,11 +5,6 @@ import { buildTestQueryClient } from '../../__utils__/query_client'
|
|
|
5
5
|
import { useGroupChatConversationPayload } from '../../hooks/groups/use_group_chat_conversation_payload'
|
|
6
6
|
import * as useApiClientModule from '../../hooks/use_api_client'
|
|
7
7
|
|
|
8
|
-
const mockGroupsProxy = jest.fn(() => false)
|
|
9
|
-
jest.mock('../../hooks/groups/use_groups_proxy', () => ({
|
|
10
|
-
useGroupsProxy: () => mockGroupsProxy(),
|
|
11
|
-
}))
|
|
12
|
-
|
|
13
8
|
const mockGroupsPost = (impl: jest.Mock) => {
|
|
14
9
|
jest.spyOn(useApiClientModule, 'useApiClient').mockReturnValue({
|
|
15
10
|
groups: { post: impl },
|
|
@@ -27,7 +22,6 @@ const resolveWith = (value: string) =>
|
|
|
27
22
|
describe('useGroupChatConversationPayload', () => {
|
|
28
23
|
afterEach(() => {
|
|
29
24
|
jest.restoreAllMocks()
|
|
30
|
-
mockGroupsProxy.mockReturnValue(false)
|
|
31
25
|
})
|
|
32
26
|
|
|
33
27
|
it('refetches on mount even when a fresh payload is already cached', async () => {
|
|
@@ -53,29 +47,4 @@ describe('useGroupChatConversationPayload', () => {
|
|
|
53
47
|
await waitFor(() => expect(post).toHaveBeenCalledTimes(1))
|
|
54
48
|
await waitFor(() => expect(result.current.payload).toBe('fresh'))
|
|
55
49
|
})
|
|
56
|
-
|
|
57
|
-
it('asks Chat for the payload when Groups loads through Chat', async () => {
|
|
58
|
-
mockGroupsProxy.mockReturnValue(true)
|
|
59
|
-
const post = resolveWith('proxied')
|
|
60
|
-
const groupsPost = jest.fn()
|
|
61
|
-
jest.spyOn(useApiClientModule, 'useApiClient').mockReturnValue({
|
|
62
|
-
chat: { post },
|
|
63
|
-
groups: { post: groupsPost },
|
|
64
|
-
} as unknown as ReturnType<typeof useApiClientModule.useApiClient>)
|
|
65
|
-
const queryClient = buildTestQueryClient()
|
|
66
|
-
const wrapper = ({ children }: { children: React.ReactNode }) => (
|
|
67
|
-
<QueryClientProvider client={queryClient}>{children}</QueryClientProvider>
|
|
68
|
-
)
|
|
69
|
-
|
|
70
|
-
const { result } = renderHook(() => useGroupChatConversationPayload({ groupId: 1 }), {
|
|
71
|
-
wrapper,
|
|
72
|
-
})
|
|
73
|
-
|
|
74
|
-
await waitFor(() => expect(result.current.payload).toBe('proxied'))
|
|
75
|
-
expect(post).toHaveBeenCalledWith({
|
|
76
|
-
url: '/me/groups_groups/1/chat_conversation_payload',
|
|
77
|
-
data: { data: { type: 'GroupsChatConversationPayload', attributes: { title: '' } } },
|
|
78
|
-
})
|
|
79
|
-
expect(groupsPost).not.toHaveBeenCalled()
|
|
80
|
-
})
|
|
81
50
|
})
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { useQuery } from '@tanstack/react-query'
|
|
2
2
|
import { ApiResource, ResourceObject } from '../../types'
|
|
3
3
|
import { toMs } from '../../utils/time'
|
|
4
|
-
import {
|
|
5
|
-
import { useGroupsProxy } from './use_groups_proxy'
|
|
4
|
+
import { useApiClient } from '../use_api_client'
|
|
6
5
|
|
|
7
6
|
const STALE_TIME_MS = toMs(25, 'minutes') // under Groups' 30-min server-side expiry
|
|
8
7
|
|
|
@@ -13,13 +12,20 @@ interface Props {
|
|
|
13
12
|
|
|
14
13
|
export function useGroupChatConversationPayload({ groupId, enabled = true }: Props) {
|
|
15
14
|
const apiClient = useApiClient()
|
|
16
|
-
const
|
|
17
|
-
const { app, url, data: body } = groupChatConversationPayloadRequest({ groupId, proxied })
|
|
15
|
+
const url = `/me/groups/${groupId}/chat_conversation_payload`
|
|
18
16
|
|
|
19
17
|
const { data, ...rest } = useQuery({
|
|
20
18
|
queryKey: ['groups', url],
|
|
21
19
|
queryFn: () =>
|
|
22
|
-
apiClient
|
|
20
|
+
apiClient.groups.post<ApiResource<GroupChatConversationPayload>>({
|
|
21
|
+
url,
|
|
22
|
+
data: {
|
|
23
|
+
data: {
|
|
24
|
+
type: 'GroupChatConversationPayload',
|
|
25
|
+
attributes: { title: '' },
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
}),
|
|
23
29
|
staleTime: STALE_TIME_MS,
|
|
24
30
|
refetchOnMount: 'always',
|
|
25
31
|
enabled,
|
|
@@ -28,31 +34,7 @@ export function useGroupChatConversationPayload({ groupId, enabled = true }: Pro
|
|
|
28
34
|
return { payload: data?.data.value, ...rest }
|
|
29
35
|
}
|
|
30
36
|
|
|
31
|
-
export function groupChatConversationPayloadRequest({
|
|
32
|
-
groupId,
|
|
33
|
-
title = '',
|
|
34
|
-
proxied,
|
|
35
|
-
}: {
|
|
36
|
-
groupId: number
|
|
37
|
-
title?: string
|
|
38
|
-
proxied: boolean
|
|
39
|
-
}): { app: App; url: string; data: object } {
|
|
40
|
-
if (proxied) {
|
|
41
|
-
return {
|
|
42
|
-
app: 'chat',
|
|
43
|
-
url: `/me/groups_groups/${groupId}/chat_conversation_payload`,
|
|
44
|
-
data: { data: { type: 'GroupsChatConversationPayload', attributes: { title } } },
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
return {
|
|
49
|
-
app: 'groups',
|
|
50
|
-
url: `/me/groups/${groupId}/chat_conversation_payload`,
|
|
51
|
-
data: { data: { type: 'GroupChatConversationPayload', attributes: { title } } },
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
37
|
interface GroupChatConversationPayload extends ResourceObject {
|
|
56
|
-
type: 'GroupChatConversationPayload'
|
|
38
|
+
type: 'GroupChatConversationPayload'
|
|
57
39
|
value: string
|
|
58
40
|
}
|
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
import { keepPreviousData } from '@tanstack/react-query'
|
|
2
2
|
import { useMemo } from 'react'
|
|
3
3
|
import { MemberResource, ResourceObject } from '../../types'
|
|
4
|
-
import { GroupsMembershipResource } from '../../types/resources/groups'
|
|
5
4
|
import { GroupsGroupMemberResource } from '../../types/resources/groups/groups_member_resource_with_person'
|
|
6
5
|
import { useApiPaginator } from '../use_api'
|
|
7
6
|
import { useEnrichPeople } from '../use_enrich_people'
|
|
8
|
-
import { useGroupsProxy } from './use_groups_proxy'
|
|
9
|
-
|
|
10
|
-
type Membership = GroupsGroupMemberResource | GroupsMembershipResource
|
|
11
7
|
|
|
12
8
|
type UseApiPaginatorResult<T extends ResourceObject> = ReturnType<typeof useApiPaginator<T>>
|
|
13
9
|
|
|
14
10
|
export type GroupMembersForNewConversationResult = Omit<
|
|
15
|
-
UseApiPaginatorResult<
|
|
11
|
+
UseApiPaginatorResult<GroupsGroupMemberResource>, // We are passing our own "members" data shape
|
|
16
12
|
'data'
|
|
17
13
|
> & {
|
|
18
14
|
data: MemberResource[]
|
|
@@ -27,41 +23,20 @@ export function useGroupMembersForNewConversation({
|
|
|
27
23
|
id: number
|
|
28
24
|
gender: string | null
|
|
29
25
|
}) {
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
GroupsMembership: [
|
|
40
|
-
'role',
|
|
41
|
-
'first_name',
|
|
42
|
-
'last_name',
|
|
43
|
-
'avatar_url',
|
|
44
|
-
'gender',
|
|
45
|
-
'child',
|
|
46
|
-
],
|
|
47
|
-
},
|
|
48
|
-
...where,
|
|
49
|
-
},
|
|
50
|
-
app: 'chat',
|
|
51
|
-
}
|
|
52
|
-
: {
|
|
53
|
-
url: `/me/groups/${id}/memberships`,
|
|
54
|
-
data: {
|
|
55
|
-
perPage: 100,
|
|
56
|
-
include: ['person'],
|
|
57
|
-
fields: {
|
|
58
|
-
Membership: ['person, role'],
|
|
59
|
-
Person: ['avatar_url', 'name', 'first_name', 'last_name', 'child', 'gender'],
|
|
60
|
-
},
|
|
61
|
-
...where,
|
|
62
|
-
},
|
|
63
|
-
app: 'groups',
|
|
26
|
+
const response = useApiPaginator<GroupsGroupMemberResource>(
|
|
27
|
+
{
|
|
28
|
+
url: `/me/groups/${id}/memberships`,
|
|
29
|
+
data: {
|
|
30
|
+
perPage: 100,
|
|
31
|
+
include: ['person'],
|
|
32
|
+
fields: {
|
|
33
|
+
Membership: ['person, role'],
|
|
34
|
+
Person: ['avatar_url', 'name', 'first_name', 'last_name', 'child', 'gender'],
|
|
64
35
|
},
|
|
36
|
+
...(gender ? { where: { gender } } : {}),
|
|
37
|
+
},
|
|
38
|
+
app: 'groups',
|
|
39
|
+
},
|
|
65
40
|
{
|
|
66
41
|
throwOnError: (_error, query) => query.state.data === undefined,
|
|
67
42
|
placeholderData: keepPreviousData,
|
|
@@ -69,11 +44,11 @@ export function useGroupMembersForNewConversation({
|
|
|
69
44
|
)
|
|
70
45
|
|
|
71
46
|
const { data: memberships = [] } = response
|
|
72
|
-
const
|
|
73
|
-
const personIds = useMemo(() => people.map(person => +person.id), [people])
|
|
47
|
+
const personIds = useMemo(() => memberships.map(m => +m.person.id), [memberships])
|
|
74
48
|
const enrichmentMap = useEnrichPeople({ personIds, groupId: id })
|
|
75
49
|
|
|
76
|
-
const members: MemberResource[] =
|
|
50
|
+
const members: MemberResource[] = memberships.map(membership => {
|
|
51
|
+
const { person } = membership
|
|
77
52
|
const enrichment = enrichmentMap.get(+person.id)
|
|
78
53
|
return {
|
|
79
54
|
type: 'Member',
|
|
@@ -84,7 +59,7 @@ export function useGroupMembersForNewConversation({
|
|
|
84
59
|
id: +person.id,
|
|
85
60
|
name: `${person.firstName} ${person.lastName}`,
|
|
86
61
|
source: [],
|
|
87
|
-
role:
|
|
62
|
+
role: membership.role,
|
|
88
63
|
}
|
|
89
64
|
})
|
|
90
65
|
|
|
@@ -98,9 +73,3 @@ export function useGroupMembersForNewConversation({
|
|
|
98
73
|
childMembers,
|
|
99
74
|
}
|
|
100
75
|
}
|
|
101
|
-
|
|
102
|
-
function membershipPerson(membership: Membership) {
|
|
103
|
-
if (membership.type === 'GroupsMembership') return membership
|
|
104
|
-
|
|
105
|
-
return { ...membership.person, role: membership.role }
|
|
106
|
-
}
|
|
@@ -2,8 +2,6 @@ import { useMutation } from '@tanstack/react-query'
|
|
|
2
2
|
import { ApiResource, ConversationResource, ResourceObject } from '../../types'
|
|
3
3
|
import { throwResponseError } from '../../utils/response_error'
|
|
4
4
|
import { useApiClient } from '../use_api_client'
|
|
5
|
-
import { groupChatConversationPayloadRequest } from './use_group_chat_conversation_payload'
|
|
6
|
-
import { useGroupsProxy } from './use_groups_proxy'
|
|
7
5
|
|
|
8
6
|
interface Props {
|
|
9
7
|
groupId: number
|
|
@@ -14,18 +12,25 @@ interface Props {
|
|
|
14
12
|
|
|
15
13
|
export function useGroupsConversationCreate({ groupId, title, genderId, onSuccess }: Props) {
|
|
16
14
|
const apiClient = useApiClient()
|
|
17
|
-
const proxied = useGroupsProxy()
|
|
18
15
|
|
|
19
16
|
return useMutation({
|
|
20
17
|
throwOnError: true,
|
|
21
18
|
onSuccess: result => {
|
|
22
19
|
onSuccess(result.data.id)
|
|
23
20
|
},
|
|
24
|
-
mutationFn: () =>
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
21
|
+
mutationFn: () =>
|
|
22
|
+
apiClient.groups
|
|
23
|
+
.post<ApiResource<ChatConversationPayload>>({
|
|
24
|
+
url: `/me/groups/${groupId}/chat_conversation_payload`,
|
|
25
|
+
data: {
|
|
26
|
+
data: {
|
|
27
|
+
type: 'GroupChatConversationPayload',
|
|
28
|
+
attributes: {
|
|
29
|
+
title,
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
})
|
|
29
34
|
.then(res => res.data.value)
|
|
30
35
|
.then(payload =>
|
|
31
36
|
apiClient.chat.post<ApiResource<ConversationResource>>({
|
|
@@ -41,8 +46,7 @@ export function useGroupsConversationCreate({ groupId, title, genderId, onSucces
|
|
|
41
46
|
},
|
|
42
47
|
})
|
|
43
48
|
)
|
|
44
|
-
.catch(throwResponseError)
|
|
45
|
-
},
|
|
49
|
+
.catch(throwResponseError),
|
|
46
50
|
})
|
|
47
51
|
}
|
|
48
52
|
|
|
@@ -62,7 +62,6 @@ export const availableFeatures = {
|
|
|
62
62
|
manual_archiving: 'QA_MOBILE_manual_archiving',
|
|
63
63
|
manual_archiving_rollout: 'ROLLOUT_MOBILE_manual_archiving',
|
|
64
64
|
hide_conversations: 'ROLLOUT_hide_conversations',
|
|
65
|
-
groups_proxy: 'ROLLOUT_groups_proxy',
|
|
66
65
|
} as const satisfies Record<string, `${'QA' | 'ROLLOUT'}_${string}`>
|
|
67
66
|
|
|
68
67
|
const featureNames = Object.values(availableFeatures)
|
|
@@ -1,31 +1,26 @@
|
|
|
1
1
|
import { GroupsGroupResource } from '../types'
|
|
2
2
|
import { FIVE_MINUTES } from '../utils/time'
|
|
3
|
-
import { useGroupsProxy } from './groups/use_groups_proxy'
|
|
4
3
|
import { useApiPaginator } from './use_api'
|
|
5
4
|
|
|
6
|
-
const GROUP_FIELDS = [
|
|
7
|
-
'can_create_conversation',
|
|
8
|
-
'can_create_conversation_reason_code',
|
|
9
|
-
'name',
|
|
10
|
-
'header_image',
|
|
11
|
-
'memberships_count',
|
|
12
|
-
]
|
|
13
|
-
|
|
14
5
|
export const useGroupsGroups = () => {
|
|
15
|
-
const proxied = useGroupsProxy()
|
|
16
|
-
|
|
17
6
|
return useApiPaginator<GroupsGroupResource>(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
7
|
+
{
|
|
8
|
+
url: '/me/groups',
|
|
9
|
+
data: {
|
|
10
|
+
perPage: 100,
|
|
11
|
+
fields: {
|
|
12
|
+
Group: [
|
|
13
|
+
'can_create_conversation',
|
|
14
|
+
'can_create_conversation_reason_code',
|
|
15
|
+
'name',
|
|
16
|
+
'header_image',
|
|
17
|
+
'memberships_count',
|
|
18
|
+
],
|
|
28
19
|
},
|
|
20
|
+
order: 'name',
|
|
21
|
+
},
|
|
22
|
+
app: 'groups',
|
|
23
|
+
},
|
|
29
24
|
{ staleTime: FIVE_MINUTES }
|
|
30
25
|
)
|
|
31
26
|
}
|
|
@@ -2,7 +2,6 @@ import { useMemo } from 'react'
|
|
|
2
2
|
import { GroupResource, GraphId } from '../types/resources/group_resource'
|
|
3
3
|
import { GroupsGroupResource } from '../types/resources/groups/groups_group_resource'
|
|
4
4
|
import { destructureChatGroupGraphId } from '../utils'
|
|
5
|
-
import { useGroupsProxy } from './groups/use_groups_proxy'
|
|
6
5
|
import { useApiGet } from './use_api'
|
|
7
6
|
import { useNewConversationEntry } from './use_new_conversation_entry'
|
|
8
7
|
|
|
@@ -23,7 +22,6 @@ export function useNewConversationFromFilter(
|
|
|
23
22
|
): NewConversationFromFilter | undefined {
|
|
24
23
|
const { sourceAppName, sourceType, sourceId } = destructureChatGroupGraphId(chatGroupGraphId)
|
|
25
24
|
const entryMode = useNewConversationEntry()
|
|
26
|
-
const proxied = useGroupsProxy()
|
|
27
25
|
const isGroupsGroup = sourceAppName === 'Groups' && sourceType === 'Group'
|
|
28
26
|
const isServicesTeam = sourceAppName === 'Services' && sourceType === 'Team'
|
|
29
27
|
|
|
@@ -33,17 +31,11 @@ export function useNewConversationFromFilter(
|
|
|
33
31
|
)
|
|
34
32
|
|
|
35
33
|
const { data: groupsGroup } = useApiGet<GroupsGroupResource>(
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
: {
|
|
43
|
-
url: `/me/groups/${sourceId}`,
|
|
44
|
-
data: { fields: { Group: ['can_create_conversation'] } },
|
|
45
|
-
app: 'groups',
|
|
46
|
-
},
|
|
34
|
+
{
|
|
35
|
+
url: `/me/groups/${sourceId}`,
|
|
36
|
+
data: { fields: { Group: ['can_create_conversation'] } },
|
|
37
|
+
app: 'groups',
|
|
38
|
+
},
|
|
47
39
|
{ enabled: isGroupsGroup && !!sourceId }
|
|
48
40
|
)
|
|
49
41
|
|
|
@@ -12,7 +12,6 @@ import {
|
|
|
12
12
|
useGroupMembersForNewConversation,
|
|
13
13
|
} from '../../../hooks/groups/use_group_members_for_new_conversation'
|
|
14
14
|
import { useGroupsConversationCreate } from '../../../hooks/groups/use_groups_conversation_create'
|
|
15
|
-
import { useGroupsProxy } from '../../../hooks/groups/use_groups_proxy'
|
|
16
15
|
import {
|
|
17
16
|
type AvatarUpdatePayload,
|
|
18
17
|
patchConversationAvatar,
|
|
@@ -51,16 +50,15 @@ export const GroupsForm = ({ groupId, chat_group_graph_id, avatarSelection }: Gr
|
|
|
51
50
|
genderValue,
|
|
52
51
|
isFetching: genderFetching,
|
|
53
52
|
} = useMyGender()
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
)
|
|
53
|
+
const { data: group } = useSuspenseGet<GroupsGroupResource>({
|
|
54
|
+
url: `/me/groups/${groupId}`,
|
|
55
|
+
data: {
|
|
56
|
+
fields: {
|
|
57
|
+
Group: [],
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
app: 'groups',
|
|
61
|
+
})
|
|
64
62
|
|
|
65
63
|
const activeGenderId = genderFilterEnabled ? genderId : null
|
|
66
64
|
const activeGenderValue = genderFilterEnabled ? genderValue : null
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use_groups_proxy.d.ts","sourceRoot":"","sources":["../../../src/hooks/groups/use_groups_proxy.ts"],"names":[],"mappings":"AAEA,wBAAgB,cAAc,YAG7B"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { c as _c } from "react/compiler-runtime";
|
|
2
|
-
import { availableFeatures, useFeatures } from '../use_features';
|
|
3
|
-
export function useGroupsProxy() {
|
|
4
|
-
const $ = _c(2);
|
|
5
|
-
const {
|
|
6
|
-
featureEnabled
|
|
7
|
-
} = useFeatures();
|
|
8
|
-
let t0;
|
|
9
|
-
if ($[0] !== featureEnabled) {
|
|
10
|
-
t0 = featureEnabled(availableFeatures.groups_proxy);
|
|
11
|
-
$[0] = featureEnabled;
|
|
12
|
-
$[1] = t0;
|
|
13
|
-
} else {
|
|
14
|
-
t0 = $[1];
|
|
15
|
-
}
|
|
16
|
-
return t0;
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=use_groups_proxy.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use_groups_proxy.js","names":["availableFeatures","useFeatures","useGroupsProxy","$","_c","featureEnabled","t0","groups_proxy"],"sources":["../../../src/hooks/groups/use_groups_proxy.ts"],"sourcesContent":["import { availableFeatures, useFeatures } from '../use_features'\n\nexport function useGroupsProxy() {\n const { featureEnabled } = useFeatures()\n return featureEnabled(availableFeatures.groups_proxy)\n}\n"],"mappings":";AAAA,SAASA,iBAAiB,EAAEC,WAAW,QAAQ,iBAAiB;AAEhE,OAAO,SAAAC,eAAA;EAAA,MAAAC,CAAA,GAAAC,EAAA;EACL;IAAAC;EAAA,IAA2BJ,WAAW,CAAC,CAAC;EAAA,IAAAK,EAAA;EAAA,IAAAH,CAAA,QAAAE,cAAA;IACjCC,EAAA,GAAAD,cAAc,CAACL,iBAAiB,CAAAO,YAAa,CAAC;IAAAJ,CAAA,MAAAE,cAAA;IAAAF,CAAA,MAAAG,EAAA;EAAA;IAAAA,EAAA,GAAAH,CAAA;EAAA;EAAA,OAA9CG,EAA8C;AAAA","ignoreList":[]}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export interface GroupsMembershipResource {
|
|
2
|
-
type: 'GroupsMembership';
|
|
3
|
-
id: number;
|
|
4
|
-
role?: string;
|
|
5
|
-
firstName: string;
|
|
6
|
-
lastName: string;
|
|
7
|
-
avatarUrl: string;
|
|
8
|
-
child: boolean;
|
|
9
|
-
gender: string | null;
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=groups_membership_resource.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"groups_membership_resource.d.ts","sourceRoot":"","sources":["../../../../src/types/resources/groups/groups_membership_resource.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,kBAAkB,CAAA;IACxB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,OAAO,CAAA;IACd,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;CACtB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"groups_membership_resource.js","names":[],"sources":["../../../../src/types/resources/groups/groups_membership_resource.ts"],"sourcesContent":["export interface GroupsMembershipResource {\n type: 'GroupsMembership'\n id: number\n role?: string\n firstName: string\n lastName: string\n avatarUrl: string\n child: boolean\n gender: string | null\n}\n"],"mappings":"","ignoreList":[]}
|