Skip to content

Commit 73ea882

Browse files
committed
Removing cvr check.
1 parent 6347d2d commit 73ea882

File tree

2 files changed

+64
-64
lines changed

2 files changed

+64
-64
lines changed

eform-client/src/app/plugins/modules/backend-configuration-pn/components/properties/property-actions/property-create-modal/property-create-modal.component.ts

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -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) {

eform-client/src/app/plugins/modules/backend-configuration-pn/components/properties/property-actions/property-edit-modal/property-edit-modal.component.ts

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -78,34 +78,34 @@ export class PropertyEditModalComponent implements OnInit, OnDestroy {
7878
onNameFilterChanged(number: string) {
7979
this.editPropertyForm.patchValue({ cvr: number });
8080

81-
if (+number === 0) {
82-
this.propertyIsFarm = false;
83-
this.editPropertyForm.patchValue({ isFarm: false });
84-
}
85-
86-
if (+number === 1111111) {
87-
this.propertyIsFarm = true;
88-
this.editPropertyForm.patchValue({ isFarm: true });
89-
}
90-
91-
if (+number > 1111111 && number.toString().length > 7) {
92-
this.getCompanyTypeSub$ = this.propertiesService.getCompanyType(+number).subscribe((data) => {
93-
if (data?.success) {
94-
const industryPrefix = data.model.industrycode.toString().slice(0, 2);
95-
const isFarm = industryPrefix === '01' || data.model.error === 'REQUIRES_PAID_SUBSCRIPTION';
96-
97-
this.propertyIsFarm = isFarm;
98-
this.editPropertyForm.patchValue({
99-
isFarm,
100-
name: data.model.name || '',
101-
address: data.model.address ? `${data.model.address}, ${data.model.city}` : '',
102-
industryCode: data.model.industrycode || '',
103-
});
104-
}
105-
});
106-
} else {
107-
this.editPropertyForm.patchValue({ name: '', address: '' });
108-
}
81+
// if (+number === 0) {
82+
// this.propertyIsFarm = false;
83+
// this.editPropertyForm.patchValue({ isFarm: false });
84+
// }
85+
//
86+
// if (+number === 1111111) {
87+
this.propertyIsFarm = true;
88+
this.editPropertyForm.patchValue({ isFarm: true });
89+
// }
90+
//
91+
// if (+number > 1111111 && number.toString().length > 7) {
92+
// this.getCompanyTypeSub$ = this.propertiesService.getCompanyType(+number).subscribe((data) => {
93+
// if (data?.success) {
94+
// const industryPrefix = data.model.industrycode.toString().slice(0, 2);
95+
// const isFarm = industryPrefix === '01' || data.model.error === 'REQUIRES_PAID_SUBSCRIPTION';
96+
//
97+
// this.propertyIsFarm = isFarm;
98+
// this.editPropertyForm.patchValue({
99+
// isFarm,
100+
// name: data.model.name || '',
101+
// address: data.model.address ? `${data.model.address}, ${data.model.city}` : '',
102+
// industryCode: data.model.industrycode || '',
103+
// });
104+
// }
105+
// });
106+
// } else {
107+
// this.editPropertyForm.patchValue({ name: '', address: '' });
108+
// }
109109
}
110110

111111
onChrNumberChanged(number: number) {

0 commit comments

Comments
 (0)