Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need groupBy in imxweb/projects/qer/src/lib/itshopapprove/approvals-table.component.html #220

Closed
shahed-swe opened this issue Dec 30, 2024 · 6 comments

Comments

@shahed-swe
Copy link

I need groupBy functionality in this component. I added groupBy in imx-data-source-toolbar options. It's not working. I need to show pending request based on Identity. What is the issue here?

@Mathnstein
Copy link
Collaborator

Hi @shahed-swe - looking at the conditional logic on the data-source-toolbar, there are two conditions that need to be met:
*ngIf="settings?.groupData && optionset.has('groupBy')"

So by adding the groupBy to the optionset that is one, but the toolbar still needs to know how to group, which why you must provide a groupData property to the dstSettings.

For an example, see imxweb/projects/qer/src/lib/identities/identities.component.ts

@shahed-swe
Copy link
Author

let's say I want to sort by identity what do I need to do?

@Mathnstein
Copy link
Collaborator

The relevant code from the example I gave is here. You need to write a function / create an API call to handle what you need to do.

If you have all the data locally, then you group it by a column using your own function here.

this.groupingInfo = { groups: [ { property: this.groupingOptions[0], getData: async () => { return this.identitiesService.getGroupedAllPerson('IdentityType', { PageSize: this.navigationState.PageSize, StartIndex: 0, withProperties: this.navigationState.withProperties, }); }, }, ],

@shahed-swe
Copy link
Author

I was investigating on it and saw that we don't have api for groupby. api endpoint is: itshop/approve/request...need to enable group for it. I was trying to do that but couldn't find any solution. can you tell me what can we do?

@shahed-swe
Copy link
Author

I was trying to modify api using DotNet and added that

apiBuilder.ModifyQueryMethod("itshop/approve/requests",
method => {
method
.WithResultColums("UID_PersonInserted")
.EnableGrouping()
.EnableRead()
}
);

after compiling I can see the api available in Administrator Portal but compiling the DLL doesn't make any changes in imx-modules by which I can call the api

@asattler
Copy link

asattler commented Jan 6, 2025

Changes on the API which are not only affecting the logic within the apicall, but e.g. the columns that are reponsed or e.g. parameters require that you also re-compile the Client of the API ("imx-api-qer " in your case).
In my discussions with One Identity I got the statement, that they don't recommend to do so. instead you can add the module "qer" to your ccc-clientApi.
.\ImxClient.exe compile-api /copyapi "/imx-modules\imx-api-ccc.tgz" /packagename imx-api-ccc /modules "QER,CCC" /clientmodules "QER,CCC".
Then the imx-api-ccc contains also all interfaces for the QER-Api. But this also requires that you add imx-api-ccc as dependency to the qer-project and you need to change the imports in the needed component from imx-api-qer to imx-api-ccc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants