-
Notifications
You must be signed in to change notification settings - Fork 46
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
[Bugfix] #5446 order data update #3462
Conversation
map((response) => { | ||
if (response.body) { | ||
this.snackBar.openSnackBar('changesSaved'); | ||
return UpdateOrderInfoSuccess({ updatedOrder: response.body as IBigOrderTableOrderInfo }); |
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.
To avoid explicit type casting, you can modify the response body properly:
updateOrderInfo():Observable<HttpResponse<IBigOrderTableOrderInfo>>
@@ -30,16 +29,15 @@ import { | |||
ReturnMoneyOrBonuses | |||
} from '../../models/ubs-admin.interface'; |
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.
Unused imports specifier IPaymentInfo, IAddressExportDetails, ViewChild
Unused field isDataLoaded
Also pay attention on sonar issues
@@ -582,8 +533,9 @@ export class UbsAdminOrderComponent implements OnInit, OnDestroy, AfterContentCh | |||
for (const formControlName in formItem.controls) { | |||
if (Object.prototype.hasOwnProperty.call(formItem.controls, formControlName)) { | |||
const formControl = formItem.controls[formControlName]; | |||
|
|||
if (formControl instanceof FormControl) { | |||
if (formControlName === 'userInfoDto' && formControl.dirty) { |
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.
Repeated logic for type checks and value assignment is extracted into helper methods, reducing redundancy.
Centralize the logic for dirty
checks, etc
private isFormControl(item: AbstractControl): item is FormControl { return item instanceof FormControl; }
Quality Gate failedFailed conditions |
#5446