-
Notifications
You must be signed in to change notification settings - Fork 8
AB#118658 - Record cloning improvements #2825
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
Conversation
const paramValue = get(value.data, fieldPath); | ||
fullUrl = `${fullUrl}?${fieldPath}=${paramValue}`; | ||
} | ||
if (fullUrl.startsWith('./')) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 😅
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:
what I'll do:
Thanks José! |
}) | ||
.subscribe({ | ||
next: ({ data }) => { | ||
const queryTemp: any = data.resource; |
There was a problem hiding this comment.
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)
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.
Checklist:
( * == Mandatory )