Skip to content

Conversation

Joselgc1
Copy link
Contributor

@Joselgc1 Joselgc1 commented Oct 6, 2025

Description

Users are able to choose which page the user is navigated to after the user Saves the new record that's based on a clone. It implements the already existing Navigate to Page and Target URL functions.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Improvement (refactor or addition to existing functionality)

Checklist:

( * == Mandatory )

  • * I have set myself as assignee of the pull request
  • * My code follows the style guidelines of this project
  • * Linting does not generate new warnings
  • * I have performed a self-review of my own code
  • * I have put the ticket for review, adding the oort-frontend team to the list of reviewers
  • * I have commented my code, particularly in hard-to-understand areas
  • * I have put JSDoc comment in all required places
  • * My changes generate no new warnings
  • * I have included screenshots describing my changes if relevant
  • * I have selected labels in the Pull Request, according to the changes with code brings
  • I have made corresponding changes to the documentation ( if required )
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

const paramValue = get(value.data, fieldPath);
fullUrl = `${fullUrl}?${fieldPath}=${paramValue}`;
}
if (fullUrl.startsWith('./'))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Joselgc1
do you remember why you did that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought it was a mistake since previously the fieldPath was always set to id and the user is allowed to select many other parameters to query

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay! thanks for the quick answer @Joselgc1 , I'll test without it

disableClose: true,
data: {
...(this.actionButton.editRecord && { recordId: this.contextId }), // button must be hidden in html if editRecord is enabled & no contextId
...(this.actionButton.cloneRecord && { recordId: this.contextId }), // button must be hidden in html if cloneRecord is enabled & no contextId
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Joselgc1
not so critical because I could easily fix it, and I see this comment was misleading, but by adding this line, in fact we're not cloning anymore but editing the record we open 😅

@AntoineRelief
Copy link
Collaborator

@Joselgc1

really good work on this one 👍

only issue I saw is about the cloning that wasn't cloning anymore but editing, but I think the comment that was left was misleading and confused you

what I did:

  • I simplified the logic, because the "enabled" booleans are in fact not needed and can be calculated on the go based on the data we store ( update in both front-end & back-end )

what I'll do:

  • test if it's possible to redirect to a form page & load a record if id is in url (out of the scope, based on the requirements I gave you )
  • Add possibility to duplicate action buttons ( out of scope as well )

Thanks José!

})
.subscribe({
next: ({ data }) => {
const queryTemp: any = data.resource;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Joselgc1
(Just for your information, I'll work on it)
I think you copy pasted the code from elsewhere in the code (one part of the code that wasn't written by us)
you can eliminate about 2 lines there, just by writting:

this.availableFields = this.queryBuilder.getFields(data.resource.queryName!);

also, there is a repetition, because the sendNotificationFields has the same value

as it's one of the only places I can give some feedback on, as the rest is super, I'm a bit picky ;)

so, from this, keep in mind:

  • avoid any when possible
  • eliminate unnecessary code lines ( sometimes, it's better to keep it more structured so it's more readable, but I don't think it applies there)

@AntoineRelief AntoineRelief merged commit 463ea7a into next Oct 10, 2025
1 check passed
@AntoineRelief AntoineRelief deleted the AB#118658 branch October 10, 2025 14:55
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

Successfully merging this pull request may close these issues.

2 participants