Skip to content

Commit

Permalink
Fix #2869 Difficult to find users to delete from group in large groups
Browse files Browse the repository at this point in the history
  • Loading branch information
iam-vir-harshit committed Nov 20, 2024
1 parent d810f4d commit c8bffc3
Show file tree
Hide file tree
Showing 22 changed files with 398 additions and 1,958 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -370,9 +370,9 @@ export class MembersListComponent implements OnInit, OnDestroy {
}

/**
* Search all EPeople who are a member of the current group by name, email or metadata
* @param data Contains query param
*/
* Search all EPeople who are a member of the current group by name, email or metadata
* @param data Contains query param
*/
searchMembers(data: any) {
this.unsubFrom(SubKey.Members);
this.subs.set(SubKey.Members,
Expand Down Expand Up @@ -463,6 +463,6 @@ export class MembersListComponent implements OnInit, OnDestroy {
this.searchCurrentMembersForm.patchValue({
queryCurrentMembers:'',
});
this.searchMembers({queryCurrentMembers: ''});
this.searchMembers({ queryCurrentMembers: '' });
}
}
26 changes: 13 additions & 13 deletions src/app/core/eperson/eperson-data.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ export class EPersonDataService extends IdentifiableDataService<EPerson> impleme
return this.searchBy('isNotMemberOf', findListOptions, useCachedVersionIfAvailable, reRequestOnStale, ...linksToFollow);
}

/**
/**
* Searches for all EPerons which are a member of a given group, via a passed in query
* (searches all EPerson metadata and by exact UUID).
* Endpoint used: /eperson/epesons/search/isMemberOf?query=<:string>&group=<:uuid>
Expand All @@ -255,19 +255,19 @@ export class EPersonDataService extends IdentifiableDataService<EPerson> impleme
* @param linksToFollow List of {@link FollowLinkConfig} that indicate which
* {@link HALLink}s should be automatically resolved
*/
public searchMembers(query: string, group: string, options?: FindListOptions, useCachedVersionIfAvailable = true, reRequestOnStale = true, ...linksToFollow: FollowLinkConfig<EPerson>[]): Observable<RemoteData<PaginatedList<EPerson>>> {
const searchParams = [new RequestParam('query', query), new RequestParam('group', group)];
let findListOptions = new FindListOptions();
if (options) {
findListOptions = Object.assign(new FindListOptions(), options);
}
if (findListOptions.searchParams) {
findListOptions.searchParams = [...findListOptions.searchParams, ...searchParams];
} else {
findListOptions.searchParams = searchParams;
}
return this.searchBy('isMemberOf', findListOptions, useCachedVersionIfAvailable, reRequestOnStale, ...linksToFollow);
public searchMembers(query: string, group: string, options?: FindListOptions, useCachedVersionIfAvailable = true, reRequestOnStale = true, ...linksToFollow: FollowLinkConfig<EPerson>[]): Observable<RemoteData<PaginatedList<EPerson>>> {
const searchParams = [new RequestParam('query', query), new RequestParam('group', group)];
let findListOptions = new FindListOptions();
if (options) {
findListOptions = Object.assign(new FindListOptions(), options);
}
if (findListOptions.searchParams) {
findListOptions.searchParams = [...findListOptions.searchParams, ...searchParams];
} else {
findListOptions.searchParams = searchParams;
}
return this.searchBy('isMemberOf', findListOptions, useCachedVersionIfAvailable, reRequestOnStale, ...linksToFollow);
}

/**
* Add a new patch to the object cache
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ export class ReviewersListComponent extends MembersListComponent implements OnIn
scope: 'metadata',
query: '',
}));

this.searchCurrentMembersForm = this.formBuilder.group(({
queryCurrentMembers: '',
}));
}

ngOnChanges(changes: SimpleChanges): void {
Expand Down
6 changes: 2 additions & 4 deletions src/assets/i18n/ar.json5
Original file line number Diff line number Diff line change
Expand Up @@ -507,12 +507,11 @@
// "admin.access-control.epeople.form.notification.deleted.success": "Successfully deleted EPerson \"{{name}}\"",
"admin.access-control.epeople.form.notification.deleted.success": "تم حذف الشخص الإلكتروني \"{{name}}\"بنجاح",

//"admin.access-control.epeople.form.notification.deleted.failure": "فشل في حذف الهاتف الإلكتروني \"{{name}}\"",
// "admin.access-control.epeople.form.notification.deleted.failure": "Failed to delete EPerson \"{{name}}\"",
"admin.access-control.epeople.form.notification.deleted.failure": "فشل حذف الشخص الإلكتروني \"{{name}}\"",
"admin.access-control.epeople.form.notification.failure.noActiveEPerson": "لا يوجد شخص إلكتروني نشط حاليًا",
"admin.access-control.epeople.form.notification.success.deleteMembership": "العضوية المحذوفة من المجموعة: \"{{name}}\"",
"admin.access-control.epeople.form.notification.failure.deleteMembership": "لا يمكن حذف العضوية من المجموعة: \"{{name}}\
"admin.access-control.epeople.form.notification.failure.deleteMembership": "لا يمكن حذف العضوية من المجموعة: \"{{name}}\"",

// "admin.access-control.epeople.form.groupsEPersonIsMemberOf": "Member of these groups:",
"admin.access-control.epeople.form.groupsEPersonIsMemberOf": "عضو في هذه المجموعات:",
Expand All @@ -522,8 +521,7 @@

// "admin.access-control.epeople.form.table.name": "Name",
"admin.access-control.epeople.form.table.name": "الاسم",

//"admin.access-control.epeople.form.table.collectionOrCommunity": "الحاوية/المجتمع",

// "admin.access-control.epeople.form.table.collectionOrCommunity": "Collection/Community",
"admin.access-control.epeople.form.table.collectionOrCommunity": "حاوية/مجتمع",
"admin.access-control.epeople.form.table.remove": "يزيل",
Expand Down
18 changes: 18 additions & 0 deletions src/assets/i18n/ca.json5
Original file line number Diff line number Diff line change
Expand Up @@ -2244,6 +2244,12 @@
// "cookies.consent.app.required.title": "(always required)",
"cookies.consent.app.required.title": "(sempre requerit)",

// "cookies.consent.app.disable-all.description": "Use this switch to enable or disable all services.",
"cookies.consent.app.disable-all.description": "Utilitzeu aquest camp per activar o desactivar tots els serveis.",

// "cookies.consent.app.disable-all.title": "Enable or disable all services",
"cookies.consent.app.disable-all.title": "Activar o desactivar tots els serveis",

// "cookies.consent.update": "There were changes since your last visit, please update your consent.",
"cookies.consent.update": "Hi ha hagut canvis des de la darrera visita, si us plau, actualitzeu el vostre consentiment.",

Expand All @@ -2259,9 +2265,15 @@
// "cookies.consent.save": "Save",
"cookies.consent.save": "Guardar",

// "cookies.consent.content-notice.title": "Cookie Consent",
"cookies.consent.content-notice.title": "Cookie Consent",

// "cookies.consent.content-notice.description": "We collect and process your personal information for the following purposes: <strong>Authentication, Preferences, Acknowledgement and Statistics</strong>. <br/> To learn more, please read our {privacyPolicy}.",
"cookies.consent.content-notice.description": "Recopilem i processem la vostra informació personal amb les finalitats següents: <strong>Autenticació, Preferències, Reconeixement i Estadístiques</strong>. <br/> Per obtenir més informació, llegiu la nostra {privacyPolicy}.",

// "cookies.consent.content-notice.description.no-privacy": "We collect and process your personal information for the following purposes: <strong>Authentication, Preferences, Acknowledgement and Statistics</strong>.",
"cookies.consent.content-notice.description.no-privacy": "Recopilem i processem la vostra informació personal per als següents propòsits: <strong>Autenticació, Preferències, Reconeixement i Estadístiques<strong>.",

// "cookies.consent.content-notice.learnMore": "Customize",
"cookies.consent.content-notice.learnMore": "Personalitzar",

Expand All @@ -2277,6 +2289,12 @@
// "cookies.consent.content-modal.title": "Information that we collect",
"cookies.consent.content-modal.title": "Informació que recopilem",

// "cookies.consent.content-modal.services": "services",
"cookies.consent.content-modal.services": "serveis",

// "cookies.consent.content-modal.service": "service",
"cookies.consent.content-modal.service": "servei",

// "cookies.consent.app.title.authentication": "Authentication",
"cookies.consent.app.title.authentication": "Autenticació",

Expand Down
Loading

0 comments on commit c8bffc3

Please sign in to comment.