|
|
@ -12,6 +12,7 @@ import {
|
|
|
|
FormControl,
|
|
|
|
FormControl,
|
|
|
|
FormGroup,
|
|
|
|
FormGroup,
|
|
|
|
ReactiveFormsModule,
|
|
|
|
ReactiveFormsModule,
|
|
|
|
|
|
|
|
Validators,
|
|
|
|
} from '@angular/forms';
|
|
|
|
} from '@angular/forms';
|
|
|
|
import { NavigationEnd, Router } from '@angular/router';
|
|
|
|
import { NavigationEnd, Router } from '@angular/router';
|
|
|
|
import { forkJoin, of, Subscription } from 'rxjs';
|
|
|
|
import { forkJoin, of, Subscription } from 'rxjs';
|
|
|
@ -68,10 +69,10 @@ export class EditPinPopupComponent implements OnInit, OnDestroy {
|
|
|
|
) {
|
|
|
|
) {
|
|
|
|
// Initialiser le formulaire avec des valeurs par défaut
|
|
|
|
// Initialiser le formulaire avec des valeurs par défaut
|
|
|
|
this.form = this.fb.group({
|
|
|
|
this.form = this.fb.group({
|
|
|
|
title: new FormControl(''),
|
|
|
|
title: new FormControl('', [Validators.required, Validators.minLength(3)]),
|
|
|
|
description: new FormControl(''),
|
|
|
|
description: new FormControl('', [Validators.required, Validators.minLength(3)]),
|
|
|
|
location: new FormControl(''),
|
|
|
|
location: new FormControl('', [Validators.required]),
|
|
|
|
complete_address: new FormControl(''),
|
|
|
|
complete_address: new FormControl('', [Validators.required]),
|
|
|
|
coordinates: new FormControl<number[]>([]),
|
|
|
|
coordinates: new FormControl<number[]>([]),
|
|
|
|
files: new FormControl(null),
|
|
|
|
files: new FormControl(null),
|
|
|
|
date: new FormControl(''),
|
|
|
|
date: new FormControl(''),
|
|
|
|