@@ -72,42 +72,42 @@ export class PropertyCreateModalComponent implements OnInit, OnDestroy {
7272 onNameFilterChanged ( number : string ) {
7373 this . newPropertyForm . patchValue ( { cvr : number } ) ;
7474
75- if ( + number === 0 ) {
76- this . propertyIsFarm = false ;
77- this . newPropertyForm . patchValue ( { isFarm : false } ) ;
78- }
79-
80- if ( + number === 1111111 ) {
81- this . propertyIsFarm = true ;
82- this . newPropertyForm . patchValue ( { isFarm : true } ) ;
83- }
84-
85- if ( + number > 1111111 && number . toString ( ) . length > 7 ) {
86- this . getCompanyTypeSub$ = this . propertiesService . getCompanyType ( + number )
87- . subscribe ( ( data ) => {
88- if ( data ?. success ) {
89- if ( data . model . industrycode . toString ( ) . slice ( 0 , 2 ) === '01' ) {
90- this . propertyIsFarm = true ;
91- this . newPropertyForm . patchValue ( {
92- isFarm : true ,
93- name : data . model . name ,
94- address : `${ data . model . address } , ${ data . model . city } ` ,
95- industryCode : data . model . industrycode
96- } ) ;
97- } else {
98- this . propertyIsFarm = data . model . error === 'REQUIRES_PAID_SUBSCRIPTION' ;
99- this . newPropertyForm . patchValue ( {
100- isFarm : this . propertyIsFarm ,
101- name : data . model . name || '' ,
102- address : data . model . address ? `${ data . model . address } , ${ data . model . city } ` : '' ,
103- industryCode : data . model . industrycode || ''
104- } ) ;
105- }
106- }
107- } ) ;
108- } else {
109- this . newPropertyForm . patchValue ( { name : '' , address : '' } ) ;
110- }
75+ // if (+number === 0) {
76+ // this.propertyIsFarm = false;
77+ // this.newPropertyForm.patchValue({ isFarm: false });
78+ // }
79+ //
80+ // if (+number === 1111111) {
81+ this . propertyIsFarm = true ;
82+ this . newPropertyForm . patchValue ( { isFarm : true } ) ;
83+ // }
84+ //
85+ // if (+number > 1111111 && number.toString().length > 7) {
86+ // this.getCompanyTypeSub$ = this.propertiesService.getCompanyType(+number)
87+ // .subscribe((data) => {
88+ // if (data?.success) {
89+ // if (data.model.industrycode.toString().slice(0, 2) === '01') {
90+ // this.propertyIsFarm = true;
91+ // this.newPropertyForm.patchValue({
92+ // isFarm: true,
93+ // name: data.model.name,
94+ // address: `${data.model.address}, ${data.model.city}`,
95+ // industryCode: data.model.industrycode
96+ // });
97+ // } else {
98+ // this.propertyIsFarm = data.model.error === 'REQUIRES_PAID_SUBSCRIPTION';
99+ // this.newPropertyForm.patchValue({
100+ // isFarm: this.propertyIsFarm,
101+ // name: data.model.name || '',
102+ // address: data.model.address ? `${data.model.address}, ${data.model.city}` : '',
103+ // industryCode: data.model.industrycode || ''
104+ // });
105+ // }
106+ // }
107+ // });
108+ // } else {
109+ // this.newPropertyForm.patchValue({ name: '', address: '' });
110+ // }
111111 }
112112
113113 onChrNumberChanged ( number : number ) {
0 commit comments