Skip to content

Commit

Permalink
Merge branch 'dev' into l10n_dev
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] authored Feb 20, 2024
2 parents c67d658 + a697ca8 commit 5e59ff0
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 32 deletions.
17 changes: 9 additions & 8 deletions packages/api/router/orgEmail/query.forContactInfo.handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@ const isPublic = globalWhere.isPublic()
const whereId = (input: TForContactInfoSchema, isSingleLoc?: boolean): Prisma.OrgEmailWhereInput => {

Check warning on line 8 in packages/api/router/orgEmail/query.forContactInfo.handler.ts

View check run for this annotation

InReachBot / Check Code for Errors

packages/api/router/orgEmail/query.forContactInfo.handler.ts#L8

[@typescript-eslint/no-unused-vars] 'isSingleLoc' is defined but never used.
switch (true) {
case isIdFor('organization', input.parentId): {
return isSingleLoc
? {
OR: [
{ organization: { some: { organization: { id: input.parentId, ...isPublic } } } },
{ locations: { some: { location: { organization: { id: input.parentId, ...isPublic } } } } },
],
}
: { organization: { some: { organization: { id: input.parentId, ...isPublic } } } }
return { organization: { some: { organization: { id: input.parentId, ...isPublic } } } }
// return isSingleLoc
// ? {
// OR: [
// { organization: { some: { organization: { id: input.parentId, ...isPublic } } } },
// { locations: { some: { location: { organization: { id: input.parentId, ...isPublic } } } } },
// ],
// }
// : { organization: { some: { organization: { id: input.parentId, ...isPublic } } } }
}
case isIdFor('orgLocation', input.parentId): {
return { locations: { some: { location: { id: input.parentId, ...isPublic } } } }
Expand Down
17 changes: 9 additions & 8 deletions packages/api/router/orgPhone/query.forContactInfo.handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@ const isPublic = globalWhere.isPublic()
const getWhereId = (input: TForContactInfoSchema, isSingleLoc?: boolean): Prisma.OrgPhoneWhereInput => {

Check warning on line 8 in packages/api/router/orgPhone/query.forContactInfo.handler.ts

View check run for this annotation

InReachBot / Check Code for Errors

packages/api/router/orgPhone/query.forContactInfo.handler.ts#L8

[@typescript-eslint/no-unused-vars] 'isSingleLoc' is defined but never used.
switch (true) {
case isIdFor('organization', input.parentId): {
return isSingleLoc
? { organization: { organization: { id: input.parentId, ...isPublic } } }
: {
OR: [
{ organization: { organization: { id: input.parentId, ...isPublic } } },
{ locations: { some: { location: { organization: { id: input.parentId, ...isPublic } } } } },
],
}
return { organization: { organization: { id: input.parentId, ...isPublic } } }
// return isSingleLoc
// ? { organization: { organization: { id: input.parentId, ...isPublic } } }
// : {
// OR: [
// { organization: { organization: { id: input.parentId, ...isPublic } } },
// { locations: { some: { location: { organization: { id: input.parentId, ...isPublic } } } } },
// ],
// }
}
case isIdFor('orgLocation', input.parentId): {
return { locations: { some: { location: { id: input.parentId, ...isPublic } } } }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@ const isPublic = globalWhere.isPublic()
const whereId = (input: TForContactInfoSchema, isSingleLoc?: boolean): Prisma.OrgSocialMediaWhereInput => {

Check warning on line 8 in packages/api/router/orgSocialMedia/query.forContactInfo.handler.ts

View check run for this annotation

InReachBot / Check Code for Errors

packages/api/router/orgSocialMedia/query.forContactInfo.handler.ts#L8

[@typescript-eslint/no-unused-vars] 'isSingleLoc' is defined but never used.
switch (true) {
case isIdFor('organization', input.parentId): {
return isSingleLoc
? { organization: { id: input.parentId, ...isPublic } }
: {
OR: [
{ organization: { id: input.parentId, ...isPublic } },
{ locations: { every: { location: { organization: { id: input.parentId, ...isPublic } } } } },
],
}
return { organization: { id: input.parentId, ...isPublic } }
// return isSingleLoc
// ? { organization: { id: input.parentId, ...isPublic } }
// : {
// OR: [
// { organization: { id: input.parentId, ...isPublic } },
// { locations: { every: { location: { organization: { id: input.parentId, ...isPublic } } } } },
// ],
// }
}
case isIdFor('orgLocation', input.parentId): {
return { locations: { some: { location: { id: input.parentId, ...isPublic } } } }
Expand Down
17 changes: 9 additions & 8 deletions packages/api/router/orgWebsite/query.forContactInfo.handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ const isPublic = globalWhere.isPublic()
const whereId = (input: TForContactInfoSchema, isSingleLoc?: boolean): Prisma.OrgWebsiteWhereInput => {

Check warning on line 9 in packages/api/router/orgWebsite/query.forContactInfo.handler.ts

View check run for this annotation

InReachBot / Check Code for Errors

packages/api/router/orgWebsite/query.forContactInfo.handler.ts#L9

[@typescript-eslint/no-unused-vars] 'isSingleLoc' is defined but never used.
switch (true) {
case isIdFor('organization', input.parentId): {
return isSingleLoc
? { organization: { id: input.parentId, ...isPublic } }
: {
OR: [
{ organization: { id: input.parentId, ...isPublic } },
{ locations: { every: { location: { organization: { id: input.parentId, ...isPublic } } } } },
],
}
return { organization: { id: input.parentId, ...isPublic } }
// return isSingleLoc
// ? { organization: { id: input.parentId, ...isPublic } }
// : {
// OR: [
// { organization: { id: input.parentId, ...isPublic } },
// { locations: { every: { location: { organization: { id: input.parentId, ...isPublic } } } } },
// ],
// }
}
case isIdFor('orgLocation', input.parentId): {
return { locations: { every: { location: { id: input.parentId, ...isPublic } } } }
Expand Down

0 comments on commit 5e59ff0

Please sign in to comment.