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

[Bugfix] #5446 order data update #3462

Merged
merged 5 commits into from
Nov 25, 2024
Merged

Conversation

yuliiakaras
Copy link
Collaborator

map((response) => {
if (response.body) {
this.snackBar.openSnackBar('changesSaved');
return UpdateOrderInfoSuccess({ updatedOrder: response.body as IBigOrderTableOrderInfo });
Copy link
Contributor

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';
Copy link
Contributor

@Lokankara Lokankara Nov 19, 2024

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) {
Copy link
Contributor

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; }

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
53.7% Coverage on New Code (required ≥ 75%)

See analysis details on SonarQube Cloud

@hnativlyubomyr hnativlyubomyr merged commit aa7fa14 into dev Nov 25, 2024
1 of 2 checks passed
@hnativlyubomyr hnativlyubomyr deleted the bugfix/#5446-order-data-update branch November 25, 2024 08:44
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.

5 participants