Skip to content

Commit

Permalink
Actions menu in Subspace List * (#6885)
Browse files Browse the repository at this point in the history
* Subspace list created with JourneyCardHorizontal, challenge renamings
* Subspace list - searchable, prep for admin list table
* duplicate and save as template menu options
* the new list + menu options for opportunities
* disable the menu options that are not implemented yet
* update admin tables with avatars, fix VC table
* fix Account Tab layout
---------

Co-authored-by: Carlos Cano <carlos@alkem.io>
  • Loading branch information
ccanos committed Sep 25, 2024
1 parent 8e2ecfa commit c082078
Show file tree
Hide file tree
Showing 40 changed files with 834 additions and 492 deletions.
290 changes: 151 additions & 139 deletions src/core/apollo/generated/apollo-hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11179,6 +11179,10 @@ export const AdminGlobalOrganizationsListDocument = gql`
id
url
displayName
visual(type: AVATAR) {
id
uri
}
}
verification {
id
Expand Down Expand Up @@ -12525,6 +12529,10 @@ export const UserListDocument = gql`
id
url
displayName
visual(type: AVATAR) {
id
uri
}
}
email
}
Expand Down Expand Up @@ -17106,145 +17114,6 @@ export function refetchSpaceAccountQuery(variables: SchemaTypes.SpaceAccountQuer
return { query: SpaceAccountDocument, variables: variables };
}

export const AdminSpaceChallengesPageDocument = gql`
query AdminSpaceChallengesPage($spaceId: UUID_NAMEID!) {
space(ID: $spaceId) {
id
subspaces {
id
profile {
id
displayName
url
}
}
defaults {
id
innovationFlowTemplate {
id
profile {
...InnovationFlowProfile
}
innovationFlow {
id
states {
displayName
description
}
}
}
}
}
}
${InnovationFlowProfileFragmentDoc}
`;

/**
* __useAdminSpaceChallengesPageQuery__
*
* To run a query within a React component, call `useAdminSpaceChallengesPageQuery` and pass it any options that fit your needs.
* When your component renders, `useAdminSpaceChallengesPageQuery` returns an object from Apollo Client that contains loading, error, and data properties
* you can use to render your UI.
*
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
*
* @example
* const { data, loading, error } = useAdminSpaceChallengesPageQuery({
* variables: {
* spaceId: // value for 'spaceId'
* },
* });
*/
export function useAdminSpaceChallengesPageQuery(
baseOptions: Apollo.QueryHookOptions<
SchemaTypes.AdminSpaceChallengesPageQuery,
SchemaTypes.AdminSpaceChallengesPageQueryVariables
>
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useQuery<SchemaTypes.AdminSpaceChallengesPageQuery, SchemaTypes.AdminSpaceChallengesPageQueryVariables>(
AdminSpaceChallengesPageDocument,
options
);
}

export function useAdminSpaceChallengesPageLazyQuery(
baseOptions?: Apollo.LazyQueryHookOptions<
SchemaTypes.AdminSpaceChallengesPageQuery,
SchemaTypes.AdminSpaceChallengesPageQueryVariables
>
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useLazyQuery<
SchemaTypes.AdminSpaceChallengesPageQuery,
SchemaTypes.AdminSpaceChallengesPageQueryVariables
>(AdminSpaceChallengesPageDocument, options);
}

export type AdminSpaceChallengesPageQueryHookResult = ReturnType<typeof useAdminSpaceChallengesPageQuery>;
export type AdminSpaceChallengesPageLazyQueryHookResult = ReturnType<typeof useAdminSpaceChallengesPageLazyQuery>;
export type AdminSpaceChallengesPageQueryResult = Apollo.QueryResult<
SchemaTypes.AdminSpaceChallengesPageQuery,
SchemaTypes.AdminSpaceChallengesPageQueryVariables
>;
export function refetchAdminSpaceChallengesPageQuery(variables: SchemaTypes.AdminSpaceChallengesPageQueryVariables) {
return { query: AdminSpaceChallengesPageDocument, variables: variables };
}

export const UpdateSpaceDefaultInnovationFlowTemplateDocument = gql`
mutation UpdateSpaceDefaultInnovationFlowTemplate($spaceDefaultsID: UUID!, $innovationFlowTemplateId: UUID!) {
updateSpaceDefaults(
spaceDefaultsData: { spaceDefaultsID: $spaceDefaultsID, flowTemplateID: $innovationFlowTemplateId }
) {
id
}
}
`;
export type UpdateSpaceDefaultInnovationFlowTemplateMutationFn = Apollo.MutationFunction<
SchemaTypes.UpdateSpaceDefaultInnovationFlowTemplateMutation,
SchemaTypes.UpdateSpaceDefaultInnovationFlowTemplateMutationVariables
>;

/**
* __useUpdateSpaceDefaultInnovationFlowTemplateMutation__
*
* To run a mutation, you first call `useUpdateSpaceDefaultInnovationFlowTemplateMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useUpdateSpaceDefaultInnovationFlowTemplateMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [updateSpaceDefaultInnovationFlowTemplateMutation, { data, loading, error }] = useUpdateSpaceDefaultInnovationFlowTemplateMutation({
* variables: {
* spaceDefaultsID: // value for 'spaceDefaultsID'
* innovationFlowTemplateId: // value for 'innovationFlowTemplateId'
* },
* });
*/
export function useUpdateSpaceDefaultInnovationFlowTemplateMutation(
baseOptions?: Apollo.MutationHookOptions<
SchemaTypes.UpdateSpaceDefaultInnovationFlowTemplateMutation,
SchemaTypes.UpdateSpaceDefaultInnovationFlowTemplateMutationVariables
>
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useMutation<
SchemaTypes.UpdateSpaceDefaultInnovationFlowTemplateMutation,
SchemaTypes.UpdateSpaceDefaultInnovationFlowTemplateMutationVariables
>(UpdateSpaceDefaultInnovationFlowTemplateDocument, options);
}

export type UpdateSpaceDefaultInnovationFlowTemplateMutationHookResult = ReturnType<
typeof useUpdateSpaceDefaultInnovationFlowTemplateMutation
>;
export type UpdateSpaceDefaultInnovationFlowTemplateMutationResult =
Apollo.MutationResult<SchemaTypes.UpdateSpaceDefaultInnovationFlowTemplateMutation>;
export type UpdateSpaceDefaultInnovationFlowTemplateMutationOptions = Apollo.BaseMutationOptions<
SchemaTypes.UpdateSpaceDefaultInnovationFlowTemplateMutation,
SchemaTypes.UpdateSpaceDefaultInnovationFlowTemplateMutationVariables
>;
export const SpaceSettingsDocument = gql`
query SpaceSettings($spaceId: UUID!) {
lookup {
Expand Down Expand Up @@ -17574,6 +17443,149 @@ export type DeleteVirtualContributorOnAccountMutationOptions = Apollo.BaseMutati
SchemaTypes.DeleteVirtualContributorOnAccountMutation,
SchemaTypes.DeleteVirtualContributorOnAccountMutationVariables
>;
export const AdminSpaceSubspacesPageDocument = gql`
query AdminSpaceSubspacesPage($spaceId: UUID_NAMEID!) {
space(ID: $spaceId) {
id
subspaces {
id
profile {
id
displayName
url
cardBanner: visual(type: CARD) {
...VisualUri
}
}
}
defaults {
id
innovationFlowTemplate {
id
profile {
...InnovationFlowProfile
}
innovationFlow {
id
states {
displayName
description
}
}
}
}
}
}
${VisualUriFragmentDoc}
${InnovationFlowProfileFragmentDoc}
`;

/**
* __useAdminSpaceSubspacesPageQuery__
*
* To run a query within a React component, call `useAdminSpaceSubspacesPageQuery` and pass it any options that fit your needs.
* When your component renders, `useAdminSpaceSubspacesPageQuery` returns an object from Apollo Client that contains loading, error, and data properties
* you can use to render your UI.
*
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
*
* @example
* const { data, loading, error } = useAdminSpaceSubspacesPageQuery({
* variables: {
* spaceId: // value for 'spaceId'
* },
* });
*/
export function useAdminSpaceSubspacesPageQuery(
baseOptions: Apollo.QueryHookOptions<
SchemaTypes.AdminSpaceSubspacesPageQuery,
SchemaTypes.AdminSpaceSubspacesPageQueryVariables
>
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useQuery<SchemaTypes.AdminSpaceSubspacesPageQuery, SchemaTypes.AdminSpaceSubspacesPageQueryVariables>(
AdminSpaceSubspacesPageDocument,
options
);
}

export function useAdminSpaceSubspacesPageLazyQuery(
baseOptions?: Apollo.LazyQueryHookOptions<
SchemaTypes.AdminSpaceSubspacesPageQuery,
SchemaTypes.AdminSpaceSubspacesPageQueryVariables
>
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useLazyQuery<
SchemaTypes.AdminSpaceSubspacesPageQuery,
SchemaTypes.AdminSpaceSubspacesPageQueryVariables
>(AdminSpaceSubspacesPageDocument, options);
}

export type AdminSpaceSubspacesPageQueryHookResult = ReturnType<typeof useAdminSpaceSubspacesPageQuery>;
export type AdminSpaceSubspacesPageLazyQueryHookResult = ReturnType<typeof useAdminSpaceSubspacesPageLazyQuery>;
export type AdminSpaceSubspacesPageQueryResult = Apollo.QueryResult<
SchemaTypes.AdminSpaceSubspacesPageQuery,
SchemaTypes.AdminSpaceSubspacesPageQueryVariables
>;
export function refetchAdminSpaceSubspacesPageQuery(variables: SchemaTypes.AdminSpaceSubspacesPageQueryVariables) {
return { query: AdminSpaceSubspacesPageDocument, variables: variables };
}

export const UpdateSpaceDefaultInnovationFlowTemplateDocument = gql`
mutation UpdateSpaceDefaultInnovationFlowTemplate($spaceDefaultsID: UUID!, $innovationFlowTemplateId: UUID!) {
updateSpaceDefaults(
spaceDefaultsData: { spaceDefaultsID: $spaceDefaultsID, flowTemplateID: $innovationFlowTemplateId }
) {
id
}
}
`;
export type UpdateSpaceDefaultInnovationFlowTemplateMutationFn = Apollo.MutationFunction<
SchemaTypes.UpdateSpaceDefaultInnovationFlowTemplateMutation,
SchemaTypes.UpdateSpaceDefaultInnovationFlowTemplateMutationVariables
>;

/**
* __useUpdateSpaceDefaultInnovationFlowTemplateMutation__
*
* To run a mutation, you first call `useUpdateSpaceDefaultInnovationFlowTemplateMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useUpdateSpaceDefaultInnovationFlowTemplateMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [updateSpaceDefaultInnovationFlowTemplateMutation, { data, loading, error }] = useUpdateSpaceDefaultInnovationFlowTemplateMutation({
* variables: {
* spaceDefaultsID: // value for 'spaceDefaultsID'
* innovationFlowTemplateId: // value for 'innovationFlowTemplateId'
* },
* });
*/
export function useUpdateSpaceDefaultInnovationFlowTemplateMutation(
baseOptions?: Apollo.MutationHookOptions<
SchemaTypes.UpdateSpaceDefaultInnovationFlowTemplateMutation,
SchemaTypes.UpdateSpaceDefaultInnovationFlowTemplateMutationVariables
>
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useMutation<
SchemaTypes.UpdateSpaceDefaultInnovationFlowTemplateMutation,
SchemaTypes.UpdateSpaceDefaultInnovationFlowTemplateMutationVariables
>(UpdateSpaceDefaultInnovationFlowTemplateDocument, options);
}

export type UpdateSpaceDefaultInnovationFlowTemplateMutationHookResult = ReturnType<
typeof useUpdateSpaceDefaultInnovationFlowTemplateMutation
>;
export type UpdateSpaceDefaultInnovationFlowTemplateMutationResult =
Apollo.MutationResult<SchemaTypes.UpdateSpaceDefaultInnovationFlowTemplateMutation>;
export type UpdateSpaceDefaultInnovationFlowTemplateMutationOptions = Apollo.BaseMutationOptions<
SchemaTypes.UpdateSpaceDefaultInnovationFlowTemplateMutation,
SchemaTypes.UpdateSpaceDefaultInnovationFlowTemplateMutationVariables
>;
export const SpaceDashboardNavigationChallengesDocument = gql`
query SpaceDashboardNavigationChallenges($spaceId: UUID!) {
lookup {
Expand Down
Loading

0 comments on commit c082078

Please sign in to comment.