Commit ecbba893 authored by Aleksandr Ivanov's avatar Aleksandr Ivanov

feedback fixed

parent 93b5249f
...@@ -8,6 +8,7 @@ import {ModalHelperService} from '../../services/modal-helper.service'; ...@@ -8,6 +8,7 @@ import {ModalHelperService} from '../../services/modal-helper.service';
import {CanDeactivateModal} from '../../guards/can-deactivate-modal.guard'; import {CanDeactivateModal} from '../../guards/can-deactivate-modal.guard';
import {Observable} from "rxjs"; import {Observable} from "rxjs";
import {NgForm} from "@angular/forms"; import {NgForm} from "@angular/forms";
import {CONSTANTS} from '../../utils/constants';
@Component({ @Component({
selector: 'app-approver-add-comment', selector: 'app-approver-add-comment',
...@@ -94,7 +95,7 @@ export class ApproverAddIssueComponent implements OnInit, CanDeactivateModal { ...@@ -94,7 +95,7 @@ export class ApproverAddIssueComponent implements OnInit, CanDeactivateModal {
closeModal() { closeModal() {
if (this.isFormChanged) { if (this.isFormChanged) {
const observer = this.modalService.confirm('Oled väljades muudatusi teinud. Kui navigeerid siit Ära ilma salvestamata, siis sinu muudatused kaovad.'); const observer = this.modalService.confirm(CONSTANTS.CLOSE_DIALOG_WARNING);
observer.subscribe(confirmed => { observer.subscribe(confirmed => {
if (confirmed) { if (confirmed) {
this.modalService.dismissActiveModal(); this.modalService.dismissActiveModal();
......
...@@ -9,6 +9,7 @@ import {GeneralHelperService} from '../../services/general-helper.service'; ...@@ -9,6 +9,7 @@ import {GeneralHelperService} from '../../services/general-helper.service';
import {CanDeactivateModal} from '../../guards/can-deactivate-modal.guard'; import {CanDeactivateModal} from '../../guards/can-deactivate-modal.guard';
import {NgForm} from "@angular/forms"; import {NgForm} from "@angular/forms";
import {Observable} from "rxjs"; import {Observable} from "rxjs";
import {CONSTANTS} from '../../utils/constants';
@Component({ @Component({
selector: 'app-approver-feedback-details', selector: 'app-approver-feedback-details',
...@@ -137,7 +138,7 @@ export class ApproverIssueDetailsComponent implements OnInit, CanDeactivateModal ...@@ -137,7 +138,7 @@ export class ApproverIssueDetailsComponent implements OnInit, CanDeactivateModal
closeModal() { closeModal() {
if (this.isFormChanged) { if (this.isFormChanged) {
const observer = this.modalService.confirm('Oled sisestanud väljadesse infot. Kui navigeerid siit ära ilma salvestamata, siis sinu sisestatud info kaob.'); const observer = this.modalService.confirm(CONSTANTS.CLOSE_DIALOG_WARNING);
observer.subscribe(confirmed => { observer.subscribe(confirmed => {
if (confirmed) { if (confirmed) {
this.modalService.dismissActiveModal(); this.modalService.dismissActiveModal();
......
...@@ -7,6 +7,7 @@ import {GeneralHelperService} from '../../../services/general-helper.service'; ...@@ -7,6 +7,7 @@ import {GeneralHelperService} from '../../../services/general-helper.service';
import {Observable} from "rxjs"; import {Observable} from "rxjs";
import {NgForm} from "@angular/forms"; import {NgForm} from "@angular/forms";
import {CanDeactivateModal} from '../../../guards/can-deactivate-modal.guard'; import {CanDeactivateModal} from '../../../guards/can-deactivate-modal.guard';
import {CONSTANTS} from '../../../utils/constants';
@Component({ @Component({
selector: 'app-producer-edit-contacts', selector: 'app-producer-edit-contacts',
...@@ -58,7 +59,7 @@ export class ProducerEditContactsComponent implements OnInit, CanDeactivateModal ...@@ -58,7 +59,7 @@ export class ProducerEditContactsComponent implements OnInit, CanDeactivateModal
closeModal() { closeModal() {
if (this.isFormChanged) { if (this.isFormChanged) {
const observer = this.modalService.confirm('Oled väljades muudatusi teinud. Kui navigeerid siit ära ilma salvestamata, siis sinu muudatused kaovad.'); const observer = this.modalService.confirm(CONSTANTS.CLOSE_DIALOG_WARNING);
observer.subscribe(confirmed => { observer.subscribe(confirmed => {
if (confirmed) { if (confirmed) {
this.modalService.dismissActiveModal(); this.modalService.dismissActiveModal();
......
...@@ -8,6 +8,7 @@ import {classifiers} from '../../../services/environment.service'; ...@@ -8,6 +8,7 @@ import {classifiers} from '../../../services/environment.service';
import {NgForm} from "@angular/forms"; import {NgForm} from "@angular/forms";
import {Observable} from "rxjs"; import {Observable} from "rxjs";
import {CanDeactivateModal} from '../../../guards/can-deactivate-modal.guard'; import {CanDeactivateModal} from '../../../guards/can-deactivate-modal.guard';
import {CONSTANTS} from '../../../utils/constants';
@Component({ @Component({
selector: 'app-producer-edit-tech-docs', selector: 'app-producer-edit-tech-docs',
...@@ -147,7 +148,7 @@ export class ProducerEditDocumentsComponent implements OnInit, CanDeactivateModa ...@@ -147,7 +148,7 @@ export class ProducerEditDocumentsComponent implements OnInit, CanDeactivateModa
closeModal() { closeModal() {
if (this.isFormChanged) { if (this.isFormChanged) {
const observer = this.modalService.confirm('Oled väljades muudatusi teinud. Kui navigeerid siit ära ilma salvestamata, siis sinu muudatused kaovad.'); const observer = this.modalService.confirm(CONSTANTS.CLOSE_DIALOG_WARNING);
observer.subscribe(confirmed => { observer.subscribe(confirmed => {
if (confirmed) { if (confirmed) {
this.modalService.dismissActiveModal(); this.modalService.dismissActiveModal();
......
...@@ -8,6 +8,7 @@ import {classifiers} from "../../../services/environment.service"; ...@@ -8,6 +8,7 @@ import {classifiers} from "../../../services/environment.service";
import {Observable} from "rxjs"; import {Observable} from "rxjs";
import {NgForm} from "@angular/forms"; import {NgForm} from "@angular/forms";
import {CanDeactivateModal} from '../../../guards/can-deactivate-modal.guard'; import {CanDeactivateModal} from '../../../guards/can-deactivate-modal.guard';
import {CONSTANTS} from '../../../utils/constants';
@Component({ @Component({
selector: 'app-producer-edit-legislations', selector: 'app-producer-edit-legislations',
...@@ -61,7 +62,7 @@ export class ProducerEditLegislationsComponent implements OnInit, CanDeactivateM ...@@ -61,7 +62,7 @@ export class ProducerEditLegislationsComponent implements OnInit, CanDeactivateM
closeModal() { closeModal() {
if (this.isFormChanged) { if (this.isFormChanged) {
const observer = this.modalService.confirm('Oled väljades muudatusi teinud. Kui navigeerid siit ära ilma salvestamata, siis sinu muudatused kaovad.'); const observer = this.modalService.confirm(CONSTANTS.CLOSE_DIALOG_WARNING);
observer.subscribe(confirmed => { observer.subscribe(confirmed => {
if (confirmed) { if (confirmed) {
this.modalService.dismissActiveModal(); this.modalService.dismissActiveModal();
......
...@@ -7,6 +7,7 @@ import {ModalHelperService} from '../../../services/modal-helper.service'; ...@@ -7,6 +7,7 @@ import {ModalHelperService} from '../../../services/modal-helper.service';
import {NgForm} from "@angular/forms"; import {NgForm} from "@angular/forms";
import {Observable} from "rxjs"; import {Observable} from "rxjs";
import {CanDeactivateModal} from '../../../guards/can-deactivate-modal.guard'; import {CanDeactivateModal} from '../../../guards/can-deactivate-modal.guard';
import {CONSTANTS} from '../../../utils/constants';
@Component({ @Component({
selector: 'app-producer-edit-objects', selector: 'app-producer-edit-objects',
...@@ -102,7 +103,7 @@ export class ProducerEditObjectsComponent implements OnInit, CanDeactivateModal ...@@ -102,7 +103,7 @@ export class ProducerEditObjectsComponent implements OnInit, CanDeactivateModal
closeModal() { closeModal() {
if (this.isFormChanged) { if (this.isFormChanged) {
const observer = this.modalService.confirm('Oled väljades muudatusi teinud. Kui navigeerid siit ära ilma salvestamata, siis sinu muudatused kaovad.'); const observer = this.modalService.confirm(CONSTANTS.CLOSE_DIALOG_WARNING);
observer.subscribe(confirmed => { observer.subscribe(confirmed => {
if (confirmed) { if (confirmed) {
this.modalService.dismissActiveModal(); this.modalService.dismissActiveModal();
......
...@@ -10,6 +10,7 @@ import {Observable} from 'rxjs'; ...@@ -10,6 +10,7 @@ import {Observable} from 'rxjs';
import {debounceTime, distinctUntilChanged, switchMap} from 'rxjs/operators'; import {debounceTime, distinctUntilChanged, switchMap} from 'rxjs/operators';
import {NgForm} from "@angular/forms"; import {NgForm} from "@angular/forms";
import {CanDeactivateModal} from '../../../guards/can-deactivate-modal.guard'; import {CanDeactivateModal} from '../../../guards/can-deactivate-modal.guard';
import {CONSTANTS} from '../../../utils/constants';
@Component({ @Component({
selector: 'app-producer-edit-relations', selector: 'app-producer-edit-relations',
...@@ -83,7 +84,7 @@ export class ProducerEditRelationsComponent implements OnInit, CanDeactivateModa ...@@ -83,7 +84,7 @@ export class ProducerEditRelationsComponent implements OnInit, CanDeactivateModa
closeModal() { closeModal() {
if (this.isFormChanged) { if (this.isFormChanged) {
const observer = this.modalService.confirm('Oled väljades muudatusi teinud. Kui navigeerid siit ära ilma salvestamata, siis sinu muudatused kaovad.'); const observer = this.modalService.confirm(CONSTANTS.CLOSE_DIALOG_WARNING);
observer.subscribe(confirmed => { observer.subscribe(confirmed => {
if (confirmed) { if (confirmed) {
this.modalService.dismissActiveModal(); this.modalService.dismissActiveModal();
......
...@@ -8,6 +8,7 @@ import {classifiers} from "../../../services/environment.service"; ...@@ -8,6 +8,7 @@ import {classifiers} from "../../../services/environment.service";
import {Observable} from "rxjs"; import {Observable} from "rxjs";
import {NgForm} from "@angular/forms"; import {NgForm} from "@angular/forms";
import {CanDeactivateModal} from '../../../guards/can-deactivate-modal.guard'; import {CanDeactivateModal} from '../../../guards/can-deactivate-modal.guard';
import {CONSTANTS} from '../../../utils/constants';
@Component({ @Component({
selector: 'app-producer-edit-security', selector: 'app-producer-edit-security',
...@@ -108,7 +109,7 @@ export class ProducerEditSecurityComponent implements OnInit, CanDeactivateModal ...@@ -108,7 +109,7 @@ export class ProducerEditSecurityComponent implements OnInit, CanDeactivateModal
closeModal() { closeModal() {
if (this.isFormChanged) { if (this.isFormChanged) {
const observer = this.modalService.confirm('Oled väljades muudatusi teinud. Kui navigeerid siit ära ilma salvestamata, siis sinu muudatused kaovad.'); const observer = this.modalService.confirm(CONSTANTS.CLOSE_DIALOG_WARNING);
observer.subscribe(confirmed => { observer.subscribe(confirmed => {
if (confirmed) { if (confirmed) {
this.modalService.dismissActiveModal(); this.modalService.dismissActiveModal();
......
export const CONSTANTS = {CLOSE_DIALOG_WARNING : 'Oled sisestanud väljadesse infot. Kui navigeerid siit ära ilma salvestamata, siis sinu sisestatud info kaob.'};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment