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

[Edit child] The 'ЗБЕРЕГТИ' button stays enabled when mandatory 'По-батькові' field is empty #962 #974

Merged
merged 13 commits into from
Mar 18, 2022

Conversation

Olya-web7
Copy link
Contributor

[Edit child] The 'ЗБЕРЕГТИ' button stays enabled when mandatory 'По-батькові' field is empty #962

@Olya-web7 Olya-web7 requested a review from dmitryy90 March 8, 2022 17:19
@@ -73,7 +73,7 @@ export class CreateChildComponent extends CreateFormComponent implements OnInit,
this.ChildrenFormArray.valueChanges.pipe(
takeUntil(this.destroy$),
).subscribe((val: boolean) => {
this.isEmpty = !Boolean(val[0].lastName) || !Boolean(val[0].firstName);
this.isEmpty = !!!(val[0].lastName) || !!!(val[0].firstName) || !!!(val[0].middleName);
Copy link
Contributor

Choose a reason for hiding this comment

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

!val[0].lastName
!val[0].firstName
!val[0].middleName

Copy link
Contributor

Choose a reason for hiding this comment

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

wrong typo? Why val is boolean but has lastName, firstName?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think you should simplify is to !(val[0].lastName || val[0].firstName || val[0].middleName)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you) Fixed it.

@@ -73,7 +73,7 @@ export class CreateChildComponent extends CreateFormComponent implements OnInit,
this.ChildrenFormArray.valueChanges.pipe(
takeUntil(this.destroy$),
).subscribe((val: boolean) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

change please typo

@litvinets
Copy link
Contributor

link this issue please (#965)

@litvinets
Copy link
Contributor

#965

@Olya-web7 Olya-web7 merged commit d3f1669 into develop Mar 18, 2022
@Olya-web7 Olya-web7 deleted the edit-child-962 branch March 18, 2022 17:59
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