Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • web-et-numerique/factory/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client
1 result
Show changes
Showing
with 70 additions and 85 deletions
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { AbstractControl, FormGroup } from '@angular/forms';
import { AbstractControl, UntypedFormGroup } from '@angular/forms';
import { Module } from '../../../../structure-list/models/module.model';
@Component({
......@@ -8,7 +8,7 @@ import { Module } from '../../../../structure-list/models/module.model';
styleUrls: ['./structure-equipments.component.scss'],
})
export class StructureEquipmentsComponent implements OnInit {
@Input() structureForm: FormGroup;
@Input() structureForm: UntypedFormGroup;
@Input() isEditMode: boolean;
@Input() equipmentsAndServices: { module: Module; openned: boolean }[];
@Output() validateForm = new EventEmitter<any>();
......
import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core';
import { AbstractControl, FormArray, FormControl, FormGroup } from '@angular/forms';
import { AbstractControl, UntypedFormArray, UntypedFormControl, UntypedFormGroup } from '@angular/forms';
import { ActivatedRoute } from '@angular/router';
import { Address } from '../../../models/address.model';
import { Structure } from '../../../models/structure.model';
......@@ -14,14 +14,14 @@ import { structureFormStep } from './structureFormStep.enum';
@Component({
selector: 'app-structure-form',
templateUrl: './structure-form.component.html',
templateUrl: './structure-form.component.html'
})
export class StructureFormComponent implements OnChanges, OnInit {
@Input() nbSteps: number;
@Input() currentStep: structureFormStep;
@Input() structure: Structure;
@Input() structureForm: FormGroup;
@Input() hoursForm: FormGroup;
@Input() structureForm: UntypedFormGroup;
@Input() hoursForm: UntypedFormGroup;
@Input() isEditMode: boolean;
@Output() pageValid = new EventEmitter<any>();
@Output() updateHoursForm = new EventEmitter<any>();
......@@ -53,11 +53,7 @@ export class StructureFormComponent implements OnChanges, OnInit {
public publicsAccompaniment: Category;
public publics: Category;
constructor(
private searchService: SearchService,
private profileService: ProfileService,
private route: ActivatedRoute
) {}
constructor(private searchService: SearchService, private profileService: ProfileService, private route: ActivatedRoute) {}
ngOnChanges(changes: SimpleChanges): void {
if (changes.currentStep) {
......@@ -108,7 +104,7 @@ export class StructureFormComponent implements OnChanges, OnInit {
this.setValidationsForm();
}
public updateHours(form: FormGroup): void {
public updateHours(form: UntypedFormGroup): void {
this.hoursForm = form;
this.setValidationsForm();
this.updateHoursForm.emit(form);
......@@ -148,38 +144,38 @@ export class StructureFormComponent implements OnChanges, OnInit {
// this.updatePageValid();
} else {
this.pagesValidation[structureFormStep.structureChoice] = {
valid: this.structureForm.get('_id').valid,
valid: this.structureForm.get('_id').valid
};
this.pagesValidation[structureFormStep.structureNameAndAddress] = {
valid: this.structureForm.get('structureName').valid && this.structureForm.get('address').valid,
valid: this.structureForm.get('structureName').valid && this.structureForm.get('address').valid
};
this.pagesValidation[structureFormStep.structureContact] = {
valid: this.structureForm.get('contactMail').valid && this.structureForm.get('contactPhone').valid,
valid: this.structureForm.get('contactMail').valid && this.structureForm.get('contactPhone').valid
};
this.pagesValidation[structureFormStep.structureAccompanimentChoice] = {
valid: this.structureForm.get('placeOfReception').valid,
valid: this.structureForm.get('placeOfReception').valid
};
this.pagesValidation[structureFormStep.structureChoiceCompletion] = {
valid: this.isEditMode ? true : this.structureForm.get('choiceCompletion').valid,
valid: this.isEditMode ? true : this.structureForm.get('choiceCompletion').valid
};
this.pagesValidation[structureFormStep.structureContactCompletion] = {
valid: this.isEditMode
? true
: this.structureForm.get('contactPersonFirstname').valid &&
this.structureForm.get('contactPersonLastname').valid &&
this.structureForm.get('contactPersonEmail').valid,
this.structureForm.get('contactPersonEmail').valid
};
this.pagesValidation[structureFormStep.structureType] = {
valid: this.structureForm.get('structureType').valid,
valid: this.structureForm.get('structureType').valid
};
this.pagesValidation[structureFormStep.structureAccessModality] = {
valid: this.structureForm.get('accessModality').valid,
valid: this.structureForm.get('accessModality').valid
};
this.pagesValidation[structureFormStep.structureHours] = {
valid: this.hoursForm.valid && this.structureForm.get('exceptionalClosures').valid,
valid: this.hoursForm.valid && this.structureForm.get('exceptionalClosures').valid
};
this.pagesValidation[structureFormStep.structurePmr] = {
valid: this.structureForm.get('pmrAccess').valid,
valid: this.structureForm.get('pmrAccess').valid
};
this.pagesValidation[structureFormStep.structureWebAndSocialNetwork] = {
valid:
......@@ -187,23 +183,23 @@ export class StructureFormComponent implements OnChanges, OnInit {
((this.structureForm.get('facebook').valid &&
this.structureForm.get('twitter').valid &&
this.structureForm.get('instagram').valid) ||
!this.showSocialNetwork),
!this.showSocialNetwork)
};
this.pagesValidation[structureFormStep.structurePublicTarget] = {
valid: this.structureForm.get('publics').valid,
valid: this.structureForm.get('publics').valid
};
this.pagesValidation[structureFormStep.structureDigitalHelpingAccompaniment] = {
valid: this.structureForm.get('proceduresAccompaniment').valid,
valid: this.structureForm.get('proceduresAccompaniment').valid
};
this.pagesValidation[structureFormStep.structureTrainingType] = {
valid: true,
valid: true
};
this.pagesValidation[structureFormStep.structureTrainingPrice] = {
valid: this.structureForm.get('freeWorkShop').valid,
valid: this.structureForm.get('freeWorkShop').valid
};
this.pagesValidation[structureFormStep.structureWifi] = {
valid: this.structureForm.get('equipmentsAndServices').valid,
valid: this.structureForm.get('equipmentsAndServices').valid
};
this.pagesValidation[structureFormStep.structureEquipments] = {
valid:
......@@ -212,23 +208,23 @@ export class StructureFormComponent implements OnChanges, OnInit {
this.structureForm.get('nbTablets').valid &&
this.structureForm.get('nbNumericTerminal').valid &&
this.structureForm.get('nbScanners').valid,
name: 'Equipements mis à disposition',
name: 'Equipements mis à disposition'
};
this.pagesValidation[structureFormStep.structureLabels] = {
valid: true,
valid: true
};
this.pagesValidation[structureFormStep.structureOtherServices] = {
valid: this.structureForm.get('equipmentsAndServices').valid,
valid: this.structureForm.get('equipmentsAndServices').valid
};
this.pagesValidation[structureFormStep.structureDescription] = {
valid: true,
valid: true
};
this.pagesValidation[structureFormStep.structureCovidInfo] = {
valid: true,
valid: true
};
this.pagesValidation[structureFormStep.structureConsent] = {
valid: !this.isEditMode ? this.userAcceptSavedDate : true,
valid: !this.isEditMode ? this.userAcceptSavedDate : true
};
this.updatePageValid();
}
......@@ -271,19 +267,11 @@ export class StructureFormComponent implements OnChanges, OnInit {
});
}
public onCheckChange({
event,
formControlName,
value,
}: {
event: boolean;
formControlName: string;
value: string;
}): void {
const formArray: FormArray = this.structureForm.get(formControlName) as FormArray;
public onCheckChange({ event, formControlName, value }: { event: boolean; formControlName: string; value: string }): void {
const formArray: UntypedFormArray = this.structureForm.get(formControlName) as UntypedFormArray;
if (event) {
// Add a new control in the arrayForm
formArray.push(new FormControl(value));
formArray.push(new UntypedFormControl(value));
} else {
// Remove uncheck control in the arrayForm
const index = formArray.controls.findIndex((element) => element.value === value);
......
......@@ -26,7 +26,7 @@
<div class="textareaBlock" fxLayout="column">
<textarea
rows="8"
placeholder="Exemple : nous ne sommes ouvert que le 1er mercredi du mois."
placeholder="Exemple : nous ne sommes ouverts que le 1er mercredi du mois."
maxlength="500"
formControlName="exceptionalClosures"
></textarea>
......
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { FormGroup } from '@angular/forms';
import { UntypedFormGroup } from '@angular/forms';
@Component({
selector: 'app-structure-hours',
......@@ -7,8 +7,8 @@ import { FormGroup } from '@angular/forms';
styleUrls: ['./structure-hours.component.scss'],
})
export class StructureHoursComponent implements OnInit {
@Input() structureForm: FormGroup;
@Input() hoursForm: FormGroup;
@Input() structureForm: UntypedFormGroup;
@Input() hoursForm: UntypedFormGroup;
@Input() isEditMode: boolean;
@Output() hours = new EventEmitter<any>();
@Output() hoursError = new EventEmitter<any>();
......
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { FormGroup } from '@angular/forms';
import { UntypedFormGroup } from '@angular/forms';
import { Category } from '../../../../structure-list/models/category.model';
@Component({
......@@ -8,7 +8,7 @@ import { Category } from '../../../../structure-list/models/category.model';
styleUrls: ['./structure-labels.component.scss'],
})
export class StructureLabelsComponent implements OnInit {
@Input() structureForm: FormGroup;
@Input() structureForm: UntypedFormGroup;
@Input() isEditMode: boolean;
@Input() labelsQualifications: Category;
@Output() validateForm = new EventEmitter<any>();
......
import { ThisReceiver } from '@angular/compiler';
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { FormGroup } from '@angular/forms';
import { UntypedFormGroup } from '@angular/forms';
import { Address } from '../../../../models/address.model';
@Component({
selector: 'app-structure-name-and-address',
templateUrl: './structure-name-and-address.component.html',
styleUrls: ['./structure-name-and-address.component.scss'],
})
export class StructureNameAndAddressComponent implements OnInit {
@Input() structureForm: FormGroup;
@Input() structureForm: UntypedFormGroup;
@Input() isEditMode: boolean;
@Output() validateForm = new EventEmitter<any>();
@Output() addressStructure = new EventEmitter<any>();
......
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { FormGroup } from '@angular/forms';
import { UntypedFormGroup } from '@angular/forms';
import { Category } from '../../../../structure-list/models/category.model';
@Component({
......@@ -7,7 +7,7 @@ import { Category } from '../../../../structure-list/models/category.model';
templateUrl: './structure-other-services.component.html',
})
export class StructureOtherServicesComponent implements OnInit {
@Input() structureForm: FormGroup;
@Input() structureForm: UntypedFormGroup;
@Input() isEditMode: boolean;
@Input() equipmentsAndServices: Category;
@Output() validateForm = new EventEmitter<any>();
......
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { FormGroup } from '@angular/forms';
import { UntypedFormGroup } from '@angular/forms';
@Component({
selector: 'app-structure-pmr',
templateUrl: './structure-pmr.component.html',
})
export class StructurePmrComponent implements OnInit {
@Input() structureForm: FormGroup;
@Input() structureForm: UntypedFormGroup;
@Input() isEditMode: boolean;
@Input() isPageValid: boolean;
@Input() nextPage: Function;
......
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { FormGroup } from '@angular/forms';
import { UntypedFormGroup } from '@angular/forms';
import { ButtonType } from '../../../../shared/components/button/buttonType.enum';
import { Category } from '../../../../structure-list/models/category.model';
......@@ -8,7 +8,7 @@ import { Category } from '../../../../structure-list/models/category.model';
templateUrl: './structure-public-target.component.html',
})
export class StructurePublicTargetComponent implements OnInit {
@Input() structureForm: FormGroup;
@Input() structureForm: UntypedFormGroup;
@Input() publics: Category;
@Input() isEditMode: boolean;
@Output() updateChoice = new EventEmitter<any>();
......
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { AbstractControl, FormGroup } from '@angular/forms';
import { AbstractControl, UntypedFormGroup } from '@angular/forms';
@Component({
selector: 'app-structure-training-price',
templateUrl: './structure-training-price.component.html',
})
export class StructureTrainingPriceComponent implements OnInit {
@Input() structureForm: FormGroup;
@Input() structureForm: UntypedFormGroup;
@Input() isEditMode: boolean;
@Output() radioChange = new EventEmitter<any>();
@Output() validateForm = new EventEmitter<any>();
......
import { Component, EventEmitter, Input, Output } from '@angular/core';
import { FormGroup } from '@angular/forms';
import { UntypedFormGroup } from '@angular/forms';
import { Category } from '../../../../structure-list/models/category.model';
@Component({
......@@ -7,7 +7,7 @@ import { Category } from '../../../../structure-list/models/category.model';
templateUrl: './structure-training-type.component.html',
})
export class StructureTrainingTypeComponent {
@Input() structureForm: FormGroup;
@Input() structureForm: UntypedFormGroup;
@Input() isEditMode: boolean;
@Output() validateForm = new EventEmitter<any>();
......
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { FormGroup } from '@angular/forms';
import { UntypedFormGroup } from '@angular/forms';
@Component({
selector: 'app-structure-type',
templateUrl: './structure-type.component.html',
})
export class StructureTypeComponent implements OnInit {
@Input() structureForm: FormGroup;
@Input() structureForm: UntypedFormGroup;
@Input() isEditMode: boolean;
@Output() typeStructure = new EventEmitter<string>();
@Output() validateForm = new EventEmitter<any>();
......
......@@ -8,7 +8,7 @@
[icon]="'arrowBack'"
></app-svg-icon>
<div class="titleContent">
<h3>Comment vous trouver la structure sur internet&nbsp;?</h3>
<h3>Votre présence sur internet et les réseaux sociaux</h3>
<p>Facultatif</p>
</div>
</div>
......@@ -94,8 +94,8 @@
<app-svg-icon
*ngIf="
structureForm.get('facebook').valid &&
structureForm.get('facebook').value != null &&
structureForm.get('facebook').value != ''
structureForm.get('facebook').value !== null &&
structureForm.get('facebook').value !== ''
"
[iconClass]="'icon-26'"
[type]="'form'"
......@@ -126,8 +126,8 @@
<app-svg-icon
*ngIf="
structureForm.get('twitter').valid &&
structureForm.get('twitter').value != null &&
structureForm.get('twitter').value != ''
structureForm.get('twitter').value !== null &&
structureForm.get('twitter').value !== ''
"
[iconClass]="'icon-26'"
[type]="'form'"
......@@ -159,8 +159,8 @@
<app-svg-icon
*ngIf="
structureForm.get('instagram').valid &&
structureForm.get('instagram').value != null &&
structureForm.get('instagram').value != ''
structureForm.get('instagram').value !== null &&
structureForm.get('instagram').value !== ''
"
[iconClass]="'icon-26'"
[type]="'form'"
......@@ -191,8 +191,8 @@
<app-svg-icon
*ngIf="
structureForm.get('linkedin').valid &&
structureForm.get('linkedin').value != null &&
structureForm.get('linkedin').value != ''
structureForm.get('linkedin').value !== null &&
structureForm.get('linkedin').value !== ''
"
[iconClass]="'icon-26'"
[type]="'form'"
......
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { FormGroup } from '@angular/forms';
import { UntypedFormGroup } from '@angular/forms';
@Component({
selector: 'app-structure-web-and-social-network',
......@@ -7,7 +7,7 @@ import { FormGroup } from '@angular/forms';
styleUrls: ['./structure-web-and-social-network.component.scss'],
})
export class StructureWebAndSocialNetworkComponent implements OnInit {
@Input() structureForm: FormGroup;
@Input() structureForm: UntypedFormGroup;
@Input() showSocialNetwork: boolean;
@Input() showWebsite: boolean;
@Input() isEditMode: boolean;
......
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { FormGroup } from '@angular/forms';
import { UntypedFormGroup } from '@angular/forms';
@Component({
selector: 'app-structure-wifi',
templateUrl: './structure-wifi.component.html',
})
export class StructureWifiComponent implements OnInit {
@Input() structureForm: FormGroup;
@Input() structureForm: UntypedFormGroup;
@Input() isEditMode: boolean;
@Output() validateForm = new EventEmitter<any>();
@Output() checkChange = new EventEmitter<any>();
......
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { Structure } from '../../../../models/structure.model';
import * as _ from 'lodash';
import { TclService } from '../../../../services/tcl.service';
import { TclStopPoint } from '../../../../models/tclStopPoint.model';
import { AuthService } from '../../../../services/auth.service';
......@@ -28,7 +27,7 @@ export class StructureDetailPrintComponent implements OnInit {
}
}
public keepOriginalOrder = (a, b) => a.key;
public keepOriginalOrder = (a, _b) => a.key;
public userIsLoggedIn(): boolean {
return this.authService.isLoggedIn();
......
......@@ -10,6 +10,6 @@
<app-structure-detail-print [structure]="structure"></app-structure-detail-print>
</div>
<div class="loader">
<img class="loader-gif" src="/assets/gif/loader_circle.gif" alt />
<img class="loader-gif" src="/assets/gif/loader_circle_grey.gif" alt />
<p>Liste en cours d'impression</p>
</div>
import { Component, Input, OnInit } from '@angular/core';
import { Component, Input } from '@angular/core';
import { Structure } from '../../../../models/structure.model';
import * as _ from 'lodash';
import { Filter } from '../../../../structure-list/models/filter.model';
@Component({
selector: 'app-structure-list-print',
templateUrl: './structure-list-print.component.html',
......
import { Component, Input, OnInit } from '@angular/core';
import * as _ from 'lodash';
import { ActivatedRoute } from '@angular/router';
import { PrintService } from '../../../../shared/service/print.service';
import { Filter } from '../../../../structure-list/models/filter.model';
......