@@ -88,10 +88,17 @@ export class DetailsFieldsComponent implements OnChanges, OnInit {
8888 ngOnChanges ( ) : void {
8989 if ( this . entryToEdit ) {
9090 this . selectedTechnology = this . entryToEdit . technologies ;
91+ < < < << << HEAD
9192 this . project = this. listProjects . find ( ( p ) => p . id === this . entryToEdit . project_id ) ;
9293 const activity = this . activities . find ( ( a ) => a . id === this . entryToEdit . activity_id ) ;
9394 this . projectName = this . project . name ;
9495 this . entryForm . setValue ( {
96+ = === ===
97+ const project = this . listProjects . find ( ( p ) => p . id === this . entryToEdit . project_id ) ;
98+ const activity = this . activities . find ( ( a ) => a . id === this . entryToEdit . activity_id ) ;
99+ this . entryForm . setValue ( {
100+ project : project ? project . name : '' ,
101+ > >>> >>> fix : #172 Create - time - entries - manually
95102 activity : activity ? activity . name : '' ,
96103 description : this . entryToEdit . description ,
97104 start_date : this . entryToEdit . start_date ? formatDate ( this . entryToEdit . start_date , 'yyyy-MM-dd' , 'en' ) : '' ,
@@ -102,9 +109,14 @@ export class DetailsFieldsComponent implements OnChanges, OnInit {
102109 } ) ;
103110 } else {
104111 this . selectedTechnology = [ ] ;
112+ << < < < << HEAD
105113 this . project = '' ;
106114 this . projectName = '' ;
107115 this . entryForm . setValue ( {
116+ = === ===
117+ this . entryForm . setValue ( {
118+ project : '' ,
119+ > >>> >>> fix : #172 Create - time - entries - manually
108120 activity : '' ,
109121 description : '' ,
110122 start_date : formatDate ( new Date ( ) , 'yyyy-MM-dd' , 'en' ) ,
@@ -138,9 +150,14 @@ export class DetailsFieldsComponent implements OnChanges, OnInit {
138150
139151 onSubmit ( ) {
140152 const activity = this . activities . find ( ( a ) => a . name === this . entryForm . value . activity ) ;
153+ << < < < << HEAD
141154 this . project = this . projectName . id ? this . projectName : this . project ;
142155 const entry = {
143156 project_id : this . project . id ,
157+ = === ===
158+ const entry = {
159+ project_id : this . entryForm . value . project . id ,
160+ > >>> >>> fix : #172 Create - time - entries - manually
144161 activity_id : activity ? activity . id : null ,
145162 technologies : this . selectedTechnology ,
146163 description : this . entryForm . value . description ,
0 commit comments