Skip to content

Commit

Permalink
Bulk modify org domains (#4416)
Browse files Browse the repository at this point in the history
* bulk add/remove mutations init

* handle error cases in when bulk adding/removing

* handle return values

* update fe mutations

* translations

* init tests

* change console.info and trx positions

* add api tests

* give claim tags init values for filtering

* add hidden and claimTags to pagination loop

* create new result type for bulk modifying domains
  • Loading branch information
lcampbell2 committed Mar 24, 2023
1 parent 9101a60 commit e9a8a90
Show file tree
Hide file tree
Showing 14 changed files with 2,254 additions and 124 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,22 @@ export const loadDomainConnectionsByOrgId =
sortString = aql`ASC`
}

let domainFilters = aql``
let domainFilters = aql`
LET hidden = (
FOR v, e IN 1..1 ANY domain._id claims
FILTER e._from == ${orgId}
RETURN e.hidden
)[0]
LET claimTags = (
FOR v, e IN 1..1 ANY domain._id claims
FILTER e._from == ${orgId}
LET translatedTags = (
FOR tag IN e.tags || []
RETURN TRANSLATE(${language}, tag)
)
RETURN translatedTags
)[0]
`
if (typeof filters !== 'undefined') {
filters.forEach(({ filterCategory, comparison, filterValue }) => {
if (comparison === '==') {
Expand Down Expand Up @@ -486,21 +501,6 @@ export const loadDomainConnectionsByOrgId =
${loopString}
FILTER domain._key IN domainKeys
${showArchivedDomains}
LET hidden = (
FOR v, e IN 1..1 ANY domain._id claims
FILTER e._from == ${orgId}
RETURN e.hidden
)[0]
LET claimTags = (
FOR v, e IN 1..1 ANY domain._id claims
FILTER e._from == ${orgId}
LET translatedTags = (
FOR tag IN e.tags || []
RETURN TRANSLATE(${language}, tag)
)
RETURN translatedTags
)[0]
${domainFilters}
${afterTemplate}
Expand Down

0 comments on commit e9a8a90

Please sign in to comment.