-
Notifications
You must be signed in to change notification settings - Fork 1
fix: TT-23 Clear form when adding an entry (Time Entries) #660
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
Codecov Report
@@ Coverage Diff @@
## master #660 +/- ##
==========================================
+ Coverage 93.09% 94.52% +1.42%
==========================================
Files 85 102 +17
Lines 1564 1954 +390
Branches 107 134 +27
==========================================
+ Hits 1456 1847 +391
- Misses 67 70 +3
+ Partials 41 37 -4
Continue to review full report at Codecov.
|
src/app/modules/shared/components/details-fields/details-fields.component.ts
Show resolved
Hide resolved
@@ -167,6 +172,10 @@ export class DetailsFieldsComponent implements OnChanges, OnInit { | |||
}); | |||
} | |||
|
|||
cleanFormWithSkipProject(): void { |
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.
rename this function to cleanFieldsForm.
@@ -64,13 +64,17 @@ | |||
<div class="modal-content" cdkDrag (cdkDragEnded)="resetDraggablePosition($event)"> | |||
<div class="modal-header" cdkDragHandle> | |||
<h5 class="modal-title">{{ entryId ? 'Edit Entry' : 'New Entry' }}</h5> | |||
<button type="button" class="btn" (click)="detailsFields.cleanFormWithSkipProject()"> |
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.
How work with #Id detailsFields?
I think this should be this.cleanFormWithSkipProject()
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.
With the #detailFields
a local template variable associated with the app-details-fields
component is created, this allows access to the functions and data of the app-details-fields
component (child component) in this case when you click on the icon, the function cleanFormWithSkipProject()
that is in the details-fields.component.ts
is executed as it is not a function of the component time-entries.component.ts
can not be accessed with this, but otherwise this.detailsFields.cleanFormWithSkipProject()
can be used.
Add form reset icon in (timeEntries)
