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

[Fix] #7860 set default working hours #3483

Merged
merged 2 commits into from
Dec 9, 2024

Conversation

yuliiakaras
Copy link
Collaborator

@@ -102,6 +103,8 @@ export class UbsAdminSeveralOrdersPopUpComponent implements OnInit {

showTimePickerClick(): void {
this.showTimePicker = true;
this.fromInput = this.ordersForm.get('exportDetailsDto').get(FormFieldsName.TimeDeliveryFrom).value;
Copy link
Contributor

Choose a reason for hiding this comment

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

Repeated code in setExportTime and showTimePickerClick can be optimized to prevent duplication.
The chain of invocation of get() can lead to a potential null or undefined value, which can cause runtime errors

private getFormControl(groupName: string, fieldName: string): AbstractControl | null {
  const group = this.ordersForm.get(groupName);
  return group ? group.get(fieldName) : null;
}

Copy link

sonarqubecloud bot commented Dec 9, 2024

Quality Gate Failed Quality Gate failed

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

See analysis details on SonarQube Cloud

@hnativlyubomyr hnativlyubomyr merged commit f386c36 into dev Dec 9, 2024
1 of 2 checks passed
@hnativlyubomyr hnativlyubomyr deleted the fix/#7860-provide-default-export-time branch December 9, 2024 06:46
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.

3 participants