From 9e20d6e78796775e59d1acbda82bde2096e2aa5f Mon Sep 17 00:00:00 2001 From: Vanessa Date: Fri, 19 Feb 2021 22:42:28 -0500 Subject: [PATCH 1/4] fix: TT-141 Have the data persistent in the modal --- .../components/details-fields/details-fields.component.ts | 5 ++++- .../modules/time-entries/pages/time-entries.component.html | 1 + src/app/modules/time-entries/pages/time-entries.component.ts | 3 +++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/app/modules/shared/components/details-fields/details-fields.component.ts b/src/app/modules/shared/components/details-fields/details-fields.component.ts index 5a0434d8a..b677d4507 100644 --- a/src/app/modules/shared/components/details-fields/details-fields.component.ts +++ b/src/app/modules/shared/components/details-fields/details-fields.component.ts @@ -30,6 +30,7 @@ export class DetailsFieldsComponent implements OnChanges, OnInit { keyword = 'search_field'; @Input() entryToEdit: Entry; @Input() canMarkEntryAsWIP: boolean; + @Input() isEdit: boolean; @Output() saveEntry = new EventEmitter(); @Output() projectSelected = new EventEmitter(); @ViewChild('closeModal') closeModal: ElementRef; @@ -143,7 +144,9 @@ export class DetailsFieldsComponent implements OnChanges, OnInit { technology: '', }); } else { - this.cleanForm(); + if (this.isEdit) { + this.cleanForm(); + } } } diff --git a/src/app/modules/time-entries/pages/time-entries.component.html b/src/app/modules/time-entries/pages/time-entries.component.html index 9df5c7f0a..3c95d2040 100644 --- a/src/app/modules/time-entries/pages/time-entries.component.html +++ b/src/app/modules/time-entries/pages/time-entries.component.html @@ -68,6 +68,7 @@