Fix organization members order and filtering
Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<d0098f8499fc70b98d7264cb756b2c6b>>
|
||||
* @generated SignedSource<<81b275e4cf4b88d7d9e797f5ae20a163>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -67,7 +67,7 @@ return {
|
||||
{
|
||||
"defaultValue": {
|
||||
"direction": "ASC",
|
||||
"field": "CREATED_AT"
|
||||
"field": "FULL_NAME"
|
||||
},
|
||||
"kind": "LocalArgument",
|
||||
"name": "order"
|
||||
@@ -239,6 +239,6 @@ return {
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "763331f25e735e2645b0c6949ecad362";
|
||||
(node as any).hash = "c1af7d267ca5d53454869cc8fbf4420c";
|
||||
|
||||
export default node;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<ccb5c8952aaa41ddee0df7e7e3abb2b0>>
|
||||
* @generated SignedSource<<6205161c89403b10363ea54bbb10ccea>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -63,7 +63,7 @@ v4 = {
|
||||
v5 = {
|
||||
"defaultValue": {
|
||||
"direction": "ASC",
|
||||
"field": "CREATED_AT"
|
||||
"field": "FULL_NAME"
|
||||
},
|
||||
"kind": "LocalArgument",
|
||||
"name": "order"
|
||||
@@ -403,16 +403,16 @@ return {
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "bb44371bed2eb3032b52ea5bbb3109c1",
|
||||
"cacheID": "8089993871afc0b3d2c0defd9182c31a",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "MemberListFragment_RefetchQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query MemberListFragment_RefetchQuery(\n $after: CursorKey = null\n $before: CursorKey = null\n $first: Int = 20\n $last: Int = null\n $order: MembershipOrder = {direction: ASC, field: CREATED_AT}\n $id: ID!\n) {\n node(id: $id) {\n __typename\n ...MemberListFragment_16fISc\n id\n }\n}\n\nfragment MemberListFragment_16fISc on Organization {\n members(first: $first, after: $after, last: $last, before: $before, orderBy: $order) {\n totalCount\n edges {\n node {\n id\n ...MemberListItemFragment\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n id\n}\n\nfragment MemberListItemFragment on Membership {\n id\n role\n source\n state\n profile {\n fullName\n id\n }\n identity {\n email\n id\n }\n createdAt\n canUpdate: permission(action: \"iam:membership:update\")\n canDelete: permission(action: \"iam:membership:delete\")\n}\n"
|
||||
"text": "query MemberListFragment_RefetchQuery(\n $after: CursorKey = null\n $before: CursorKey = null\n $first: Int = 20\n $last: Int = null\n $order: MembershipOrder = {direction: ASC, field: FULL_NAME}\n $id: ID!\n) {\n node(id: $id) {\n __typename\n ...MemberListFragment_16fISc\n id\n }\n}\n\nfragment MemberListFragment_16fISc on Organization {\n members(first: $first, after: $after, last: $last, before: $before, orderBy: $order) {\n totalCount\n edges {\n node {\n id\n ...MemberListItemFragment\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n id\n}\n\nfragment MemberListItemFragment on Membership {\n id\n role\n source\n state\n profile {\n fullName\n id\n }\n identity {\n email\n id\n }\n createdAt\n canUpdate: permission(action: \"iam:membership:update\")\n canDelete: permission(action: \"iam:membership:delete\")\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "763331f25e735e2645b0c6949ecad362";
|
||||
(node as any).hash = "c1af7d267ca5d53454869cc8fbf4420c";
|
||||
|
||||
export default node;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<4d9333564d383b3af80a4d6c2ce68277>>
|
||||
* @generated SignedSource<<11a6b18e62a7a93fa6c2365a7e3a86f6>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -78,17 +78,9 @@ v4 = {
|
||||
},
|
||||
v5 = {
|
||||
"direction": "ASC",
|
||||
"field": "CREATED_AT"
|
||||
"field": "FULL_NAME"
|
||||
},
|
||||
v6 = [
|
||||
(v4/*: any*/),
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "order",
|
||||
"value": (v5/*: any*/)
|
||||
}
|
||||
],
|
||||
v7 = [
|
||||
(v4/*: any*/),
|
||||
{
|
||||
"kind": "Literal",
|
||||
@@ -96,56 +88,68 @@ v7 = [
|
||||
"value": (v5/*: any*/)
|
||||
}
|
||||
],
|
||||
v8 = {
|
||||
v7 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "totalCount",
|
||||
"storageKey": null
|
||||
},
|
||||
v9 = {
|
||||
v8 = {
|
||||
"direction": "DESC",
|
||||
"field": "CREATED_AT"
|
||||
},
|
||||
v9 = [
|
||||
(v4/*: any*/),
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "orderBy",
|
||||
"value": (v8/*: any*/)
|
||||
}
|
||||
],
|
||||
v10 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
v10 = {
|
||||
v11 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "role",
|
||||
"storageKey": null
|
||||
},
|
||||
v11 = {
|
||||
v12 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "fullName",
|
||||
"storageKey": null
|
||||
},
|
||||
v12 = {
|
||||
v13 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "email",
|
||||
"storageKey": null
|
||||
},
|
||||
v13 = {
|
||||
v14 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "createdAt",
|
||||
"storageKey": null
|
||||
},
|
||||
v14 = {
|
||||
v15 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "cursor",
|
||||
"storageKey": null
|
||||
},
|
||||
v15 = {
|
||||
v16 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "PageInfo",
|
||||
@@ -184,7 +188,7 @@ v15 = {
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
v16 = {
|
||||
v17 = {
|
||||
"kind": "ClientExtension",
|
||||
"selections": [
|
||||
{
|
||||
@@ -196,7 +200,7 @@ v16 = {
|
||||
}
|
||||
]
|
||||
},
|
||||
v17 = [
|
||||
v18 = [
|
||||
"orderBy"
|
||||
];
|
||||
return {
|
||||
@@ -222,7 +226,14 @@ return {
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
{
|
||||
"args": (v6/*: any*/),
|
||||
"args": [
|
||||
(v4/*: any*/),
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "order",
|
||||
"value": (v5/*: any*/)
|
||||
}
|
||||
],
|
||||
"kind": "FragmentSpread",
|
||||
"name": "MemberListFragment"
|
||||
},
|
||||
@@ -230,20 +241,27 @@ return {
|
||||
"kind": "RequiredField",
|
||||
"field": {
|
||||
"alias": null,
|
||||
"args": (v7/*: any*/),
|
||||
"args": (v6/*: any*/),
|
||||
"concreteType": "MembershipConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "members",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v8/*: any*/)
|
||||
(v7/*: any*/)
|
||||
],
|
||||
"storageKey": "members(first:20,orderBy:{\"direction\":\"ASC\",\"field\":\"CREATED_AT\"})"
|
||||
"storageKey": "members(first:20,orderBy:{\"direction\":\"ASC\",\"field\":\"FULL_NAME\"})"
|
||||
},
|
||||
"action": "THROW"
|
||||
},
|
||||
{
|
||||
"args": (v6/*: any*/),
|
||||
"args": [
|
||||
(v4/*: any*/),
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "order",
|
||||
"value": (v8/*: any*/)
|
||||
}
|
||||
],
|
||||
"kind": "FragmentSpread",
|
||||
"name": "InvitationListFragment"
|
||||
},
|
||||
@@ -251,20 +269,20 @@ return {
|
||||
"kind": "RequiredField",
|
||||
"field": {
|
||||
"alias": null,
|
||||
"args": (v7/*: any*/),
|
||||
"args": (v9/*: any*/),
|
||||
"concreteType": "InvitationConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "invitations",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v8/*: any*/),
|
||||
(v7/*: any*/),
|
||||
{
|
||||
"args": null,
|
||||
"kind": "FragmentSpread",
|
||||
"name": "MembersPage_invitationsTotalCountFragment"
|
||||
}
|
||||
],
|
||||
"storageKey": "invitations(first:20,orderBy:{\"direction\":\"ASC\",\"field\":\"CREATED_AT\"})"
|
||||
"storageKey": "invitations(first:20,orderBy:{\"direction\":\"DESC\",\"field\":\"CREATED_AT\"})"
|
||||
},
|
||||
"action": "THROW"
|
||||
}
|
||||
@@ -296,20 +314,20 @@ return {
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v2/*: any*/),
|
||||
(v9/*: any*/),
|
||||
(v10/*: any*/),
|
||||
{
|
||||
"kind": "InlineFragment",
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v7/*: any*/),
|
||||
"args": (v6/*: any*/),
|
||||
"concreteType": "MembershipConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "members",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v8/*: any*/),
|
||||
(v7/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
@@ -326,8 +344,8 @@ return {
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v9/*: any*/),
|
||||
(v10/*: any*/),
|
||||
(v11/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
@@ -350,8 +368,8 @@ return {
|
||||
"name": "profile",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v11/*: any*/),
|
||||
(v9/*: any*/)
|
||||
(v12/*: any*/),
|
||||
(v10/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
@@ -363,12 +381,12 @@ return {
|
||||
"name": "identity",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v12/*: any*/),
|
||||
(v9/*: any*/)
|
||||
(v13/*: any*/),
|
||||
(v10/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v13/*: any*/),
|
||||
(v14/*: any*/),
|
||||
{
|
||||
"alias": "canUpdate",
|
||||
"args": [
|
||||
@@ -399,19 +417,19 @@ return {
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v14/*: any*/)
|
||||
(v15/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v15/*: any*/),
|
||||
(v16/*: any*/)
|
||||
(v16/*: any*/),
|
||||
(v17/*: any*/)
|
||||
],
|
||||
"storageKey": "members(first:20,orderBy:{\"direction\":\"ASC\",\"field\":\"CREATED_AT\"})"
|
||||
"storageKey": "members(first:20,orderBy:{\"direction\":\"ASC\",\"field\":\"FULL_NAME\"})"
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v7/*: any*/),
|
||||
"filters": (v17/*: any*/),
|
||||
"args": (v6/*: any*/),
|
||||
"filters": (v18/*: any*/),
|
||||
"handle": "connection",
|
||||
"key": "MemberListFragment_members",
|
||||
"kind": "LinkedHandle",
|
||||
@@ -419,7 +437,7 @@ return {
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v7/*: any*/),
|
||||
"args": (v9/*: any*/),
|
||||
"concreteType": "InvitationConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "invitations",
|
||||
@@ -441,10 +459,10 @@ return {
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v9/*: any*/),
|
||||
(v11/*: any*/),
|
||||
(v12/*: any*/),
|
||||
(v10/*: any*/),
|
||||
(v12/*: any*/),
|
||||
(v13/*: any*/),
|
||||
(v11/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
@@ -452,7 +470,7 @@ return {
|
||||
"name": "status",
|
||||
"storageKey": null
|
||||
},
|
||||
(v13/*: any*/),
|
||||
(v14/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
@@ -484,21 +502,21 @@ return {
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v14/*: any*/)
|
||||
(v15/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v15/*: any*/),
|
||||
(v16/*: any*/),
|
||||
(v8/*: any*/),
|
||||
(v17/*: any*/),
|
||||
(v7/*: any*/),
|
||||
(v2/*: any*/)
|
||||
],
|
||||
"storageKey": "invitations(first:20,orderBy:{\"direction\":\"ASC\",\"field\":\"CREATED_AT\"})"
|
||||
"storageKey": "invitations(first:20,orderBy:{\"direction\":\"DESC\",\"field\":\"CREATED_AT\"})"
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v7/*: any*/),
|
||||
"filters": (v17/*: any*/),
|
||||
"args": (v9/*: any*/),
|
||||
"filters": (v18/*: any*/),
|
||||
"handle": "connection",
|
||||
"key": "InvitationListFragment_invitations",
|
||||
"kind": "LinkedHandle",
|
||||
@@ -514,16 +532,16 @@ return {
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "bff4e08ce3b3a6923bfb9d24fc609b18",
|
||||
"cacheID": "438ac1a112e204b2a9ff30e3b36ec3ae",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "MembersPageQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query MembersPageQuery(\n $organizationId: ID!\n) {\n organization: node(id: $organizationId) {\n __typename\n ... on Organization {\n canInviteUser: permission(action: \"iam:invitation:create\")\n ...MemberListFragment_1jRT0c\n members(first: 20, orderBy: {direction: ASC, field: CREATED_AT}) {\n totalCount\n }\n ...InvitationListFragment_1jRT0c\n invitations(first: 20, orderBy: {direction: ASC, field: CREATED_AT}) {\n totalCount\n __typename\n }\n }\n id\n }\n}\n\nfragment InvitationListFragment_1jRT0c on Organization {\n invitations(first: 20, orderBy: {direction: ASC, field: CREATED_AT}) {\n edges {\n node {\n id\n ...InvitationListItemFragment\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n id\n}\n\nfragment InvitationListItemFragment on Invitation {\n id\n fullName\n email\n role\n status\n createdAt\n expiresAt\n acceptedAt\n canDelete: permission(action: \"iam:invitation:delete\")\n}\n\nfragment MemberListFragment_1jRT0c on Organization {\n members(first: 20, orderBy: {direction: ASC, field: CREATED_AT}) {\n totalCount\n edges {\n node {\n id\n ...MemberListItemFragment\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n id\n}\n\nfragment MemberListItemFragment on Membership {\n id\n role\n source\n state\n profile {\n fullName\n id\n }\n identity {\n email\n id\n }\n createdAt\n canUpdate: permission(action: \"iam:membership:update\")\n canDelete: permission(action: \"iam:membership:delete\")\n}\n"
|
||||
"text": "query MembersPageQuery(\n $organizationId: ID!\n) {\n organization: node(id: $organizationId) {\n __typename\n ... on Organization {\n canInviteUser: permission(action: \"iam:invitation:create\")\n ...MemberListFragment_8lnpd\n members(first: 20, orderBy: {direction: ASC, field: FULL_NAME}) {\n totalCount\n }\n ...InvitationListFragment_1PypFi\n invitations(first: 20, orderBy: {direction: DESC, field: CREATED_AT}) {\n totalCount\n __typename\n }\n }\n id\n }\n}\n\nfragment InvitationListFragment_1PypFi on Organization {\n invitations(first: 20, orderBy: {direction: DESC, field: CREATED_AT}) {\n edges {\n node {\n id\n ...InvitationListItemFragment\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n id\n}\n\nfragment InvitationListItemFragment on Invitation {\n id\n fullName\n email\n role\n status\n createdAt\n expiresAt\n acceptedAt\n canDelete: permission(action: \"iam:invitation:delete\")\n}\n\nfragment MemberListFragment_8lnpd on Organization {\n members(first: 20, orderBy: {direction: ASC, field: FULL_NAME}) {\n totalCount\n edges {\n node {\n id\n ...MemberListItemFragment\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n id\n}\n\nfragment MemberListItemFragment on Membership {\n id\n role\n source\n state\n profile {\n fullName\n id\n }\n identity {\n email\n id\n }\n createdAt\n canUpdate: permission(action: \"iam:membership:update\")\n canDelete: permission(action: \"iam:membership:delete\")\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "96c00bf5db547e829eaefb042658be73";
|
||||
(node as any).hash = "0e24cf08536ed857c6ab8f8ded76947e";
|
||||
|
||||
export default node;
|
||||
|
||||
@@ -16,14 +16,14 @@ export const membersPageQuery = graphql`
|
||||
... on Organization {
|
||||
canInviteUser: permission(action: "iam:invitation:create")
|
||||
...MemberListFragment
|
||||
@arguments(first: 20, order: { direction: ASC, field: CREATED_AT })
|
||||
members(first: 20, orderBy: { direction: ASC, field: CREATED_AT })
|
||||
@arguments(first: 20, order: { direction: ASC, field: FULL_NAME })
|
||||
members(first: 20, orderBy: { direction: ASC, field: FULL_NAME })
|
||||
@required(action: THROW) {
|
||||
totalCount
|
||||
}
|
||||
...InvitationListFragment
|
||||
@arguments(first: 20, order: { direction: ASC, field: CREATED_AT })
|
||||
invitations(first: 20, orderBy: { direction: ASC, field: CREATED_AT })
|
||||
@arguments(first: 20, order: { direction: DESC, field: CREATED_AT })
|
||||
invitations(first: 20, orderBy: { direction: DESC, field: CREATED_AT })
|
||||
@required(action: THROW) {
|
||||
totalCount
|
||||
...MembersPage_invitationsTotalCountFragment
|
||||
|
||||
@@ -14,7 +14,7 @@ const fragment = graphql`
|
||||
first: { type: "Int", defaultValue: 20 }
|
||||
order: {
|
||||
type: "MembershipOrder"
|
||||
defaultValue: { direction: ASC, field: CREATED_AT }
|
||||
defaultValue: { direction: ASC, field: FULL_NAME }
|
||||
}
|
||||
after: { type: "CursorKey", defaultValue: null }
|
||||
before: { type: "CursorKey", defaultValue: null }
|
||||
|
||||
@@ -450,8 +450,6 @@ WITH mbr AS (
|
||||
identity_id = @identity_id
|
||||
AND state = 'ACTIVE'
|
||||
AND %s
|
||||
ORDER BY
|
||||
created_at DESC
|
||||
)
|
||||
SELECT
|
||||
mbr.id,
|
||||
@@ -508,47 +506,45 @@ func (m *Memberships) LoadByOrganizationID(
|
||||
filter *MembershipFilter,
|
||||
) error {
|
||||
query := `
|
||||
WITH membership_with_profile AS (
|
||||
WITH m AS (
|
||||
SELECT
|
||||
m.id,
|
||||
m.identity_id,
|
||||
m.organization_id,
|
||||
m.role,
|
||||
m.source,
|
||||
m.state,
|
||||
COALESCE(mp.full_name, i.full_name, '') AS full_name,
|
||||
i.email_address,
|
||||
o.name as organization_name,
|
||||
m.created_at,
|
||||
m.updated_at
|
||||
id,
|
||||
identity_id,
|
||||
organization_id,
|
||||
role,
|
||||
source,
|
||||
state,
|
||||
created_at,
|
||||
updated_at
|
||||
FROM
|
||||
iam_memberships m
|
||||
JOIN
|
||||
identities i ON m.identity_id = i.id
|
||||
JOIN
|
||||
organizations o ON mbr.organization_id = o.id
|
||||
LEFT JOIN
|
||||
iam_membership_profiles mp ON mp.membership_id = m.id
|
||||
iam_memberships
|
||||
WHERE
|
||||
m.organization_id = @organization_id
|
||||
AND m.%s
|
||||
organization_id = @organization_id
|
||||
AND %s
|
||||
)
|
||||
SELECT
|
||||
id,
|
||||
identity_id,
|
||||
organization_id,
|
||||
role,
|
||||
source,
|
||||
state,
|
||||
full_name,
|
||||
email_address,
|
||||
created_at,
|
||||
updated_at
|
||||
m.id,
|
||||
m.identity_id,
|
||||
m.organization_id,
|
||||
m.role,
|
||||
m.source,
|
||||
m.state,
|
||||
COALESCE(mp.full_name, i.full_name, '') as full_name,
|
||||
o.name as organization_name,
|
||||
i.email_address,
|
||||
m.created_at,
|
||||
m.updated_at
|
||||
FROM
|
||||
membership_with_profile
|
||||
m
|
||||
JOIN
|
||||
identities i ON m.identity_id = i.id
|
||||
JOIN
|
||||
organizations o ON m.organization_id = o.id
|
||||
LEFT JOIN
|
||||
iam_membership_profiles mp ON mp.membership_id = m.id
|
||||
WHERE
|
||||
%s
|
||||
AND %s
|
||||
`
|
||||
|
||||
query = fmt.Sprintf(query, scope.SQLFragment(), filter.SQLFragment(), cursor.SQLFragment())
|
||||
|
||||
Reference in New Issue
Block a user