From 4eea4a7c6bb290de1110834d5a3e8ff1a7ab3aa5 Mon Sep 17 00:00:00 2001
From: Jeremie BRISON <ext.sopra.jbrison@grandlyon.com>
Date: Tue, 23 Feb 2021 11:19:03 +0100
Subject: [PATCH] fix(form) : remove "add user"

---
 src/app/form/form.component.html | 21 ---------------------
 src/app/form/form.component.ts   |  5 -----
 src/app/form/pageType.enum.ts    |  1 -
 src/app/utils/CustomRegExp.ts    |  2 +-
 4 files changed, 1 insertion(+), 28 deletions(-)

diff --git a/src/app/form/form.component.html b/src/app/form/form.component.html
index 5667595b7..517892876 100644
--- a/src/app/form/form.component.html
+++ b/src/app/form/form.component.html
@@ -959,27 +959,6 @@
           </p>
         </div>
       </div>
-      <div *ngIf="false" class="page">
-        <div class="title">
-          <h3>Voulez-vous inviter d’autres personnes dans cette structure ?</h3>
-          <p class="notRequired">facultatif</p>
-        </div>
-        <div class="collapse" [ngClass]="{ notCollapsed: true }">
-          <div fxLayout="column">
-            <div class="collapseHeader" fxLayout="row" fxLayoutAlign=" center">
-              <div class="titleCollapse">J’ajoute d'autres personnes dans cette structure</div>
-              <div class="logo">
-                <svg class="show" aria-hidden="true">
-                  <use [attr.xlink:href]="'assets/form/sprite.svg#show'"></use>
-                </svg>
-                <svg class="hide" aria-hidden="true">
-                  <use [attr.xlink:href]="'assets/form/sprite.svg#hide'"></use>
-                </svg>
-              </div>
-            </div>
-          </div>
-        </div>
-      </div>
     </form>
     <div *ngIf="currentPage == pageTypeEnum.cgu" class="page">
       <div class="title">
diff --git a/src/app/form/form.component.ts b/src/app/form/form.component.ts
index 837866f33..2b9b3f25a 100644
--- a/src/app/form/form.component.ts
+++ b/src/app/form/form.component.ts
@@ -17,7 +17,6 @@ import { ActivatedRoute, Router } from '@angular/router';
 import { AuthService } from '../services/auth.service';
 import { first } from 'rxjs/operators';
 import { PageTypeEnum } from './pageType.enum';
-import { TempUserService } from '../services/temp-user.service';
 import { CustomRegExp } from '../utils/CustomRegExp';
 const { DateTime } = require('luxon');
 @Component({
@@ -28,7 +27,6 @@ const { DateTime } = require('luxon');
 export class FormComponent implements OnInit {
   public profile: User;
   public createdStructure: Structure;
-
   // Form var
   public structureForm: FormGroup;
   public accountForm: FormGroup;
@@ -79,7 +77,6 @@ export class FormComponent implements OnInit {
     private searchService: SearchService,
     private profileService: ProfileService,
     private authService: AuthService,
-    private tempUserService: TempUserService,
     private router: Router,
     private route: ActivatedRoute
   ) {}
@@ -541,7 +538,6 @@ export class FormComponent implements OnInit {
         name: 'Informations spécifiques à la période COVID',
       };
       this.pagesValidation[PageTypeEnum.cgu] = { valid: this.userAcceptSavedDate };
-      //this.pagesValidation[PageTypeEnum.addUserToStructure] = { valid: true };
       this.updatePageValid();
     }
   }
@@ -664,7 +660,6 @@ export class FormComponent implements OnInit {
         this.currentPage++; // page structureOtherAccompaniment skip and go to page structureWorkshop
         this.progressStatus += 100 / this.nbPagesForm;
       }
-
       // Check if going to the last page to submit form and send email verification.
       if (this.currentPage == this.nbPagesForm - 1) {
         this.validateForm();
diff --git a/src/app/form/pageType.enum.ts b/src/app/form/pageType.enum.ts
index 4742e76b2..3b3f5071a 100644
--- a/src/app/form/pageType.enum.ts
+++ b/src/app/form/pageType.enum.ts
@@ -23,5 +23,4 @@ export enum PageTypeEnum {
   structureDescription = 21,
   structureCovidInfo = 22,
   cgu = 23,
-  addUserToStructure = 24,
 }
diff --git a/src/app/utils/CustomRegExp.ts b/src/app/utils/CustomRegExp.ts
index 94ead16e4..a5fcf6b9a 100644
--- a/src/app/utils/CustomRegExp.ts
+++ b/src/app/utils/CustomRegExp.ts
@@ -14,7 +14,7 @@ export class CustomRegExp {
   public static readonly FACEBOOK: string = '(facebook.com/.{1,})';
   public static readonly TWITTER: string = '(twitter.com/.{1,})';
   public static readonly INSTAGRAM: string = '(instagram.com/.{1,})';
-  public static readonly NO_NULL_NUMBER: string = '[1-9]{1}[0-9]';
+  public static readonly NO_NULL_NUMBER: string = '[1-9]{1}[0-9]*?';
   /**
    * Validate a location request in search bar
    */
-- 
GitLab