Boris Voropaev 2024-01-09 11:20:00 +03:00
commit 0e7a90c7ac
6 changed files with 14 additions and 7 deletions

View File

@ -1,10 +1,5 @@
<div class="feedback-form">
<form [formGroup]="formGroup" (submit)="onSubmit()">
<div class="title">
Для получения достоверных данных об эмиссии парниковых газов, подтверждения, признания и обеспечения доверия к углеродной отчетности как в Российской Федерации, так и за рубежом
необходимо проведение процедур по валидации и верификации заявлений по парниковым газам
(ФЗ 296 — Федеральный закон от 02.07.2021 N 296-ФЗ «Об ограничении выбросов парниковых газов»).
</div>
<div class="form" *ngIf="!sent">
<object-form [formGroup]="formGroup" [type]="objectType?.name" target="object"></object-form>
<div class="row">

View File

@ -30,7 +30,8 @@ export class FeedbackSectionComponent {
}
onSubmit() {
this.formsService.save('model', this.objectType.name, null, this.formGroup.value).subscribe(res => {
this.formGroup.markAllAsTouched();
if (this.formGroup.valid) this.formsService.save('model', this.objectType.name, null, this.formGroup.value).subscribe(res => {
this.sent = true;
}, error => {
console.log(error);

View File

@ -36,6 +36,10 @@ export class PagesService {
this.rootPagesSubject.next(val);
}
get isRtl() {
return ['ar'].indexOf(this.rootPage?.slug) !== -1;
}
get editMode() {
return this.editModeSubject.value;
}

View File

@ -1 +1 @@
<grid></grid>
<grid [class.rtl]="isRtl"></grid>

View File

@ -0,0 +1,3 @@
.rtl {
direction: rtl;
}

View File

@ -18,6 +18,10 @@ export class AppComponent {
});
}
get isRtl() {
return this.pagesService.isRtl;
}
ngOnInit() {
this.pagesService.root({include:'children'}).subscribe(
res => { this.pagesService.rootPages = res }