Skip to content
Snippets Groups Projects
Verified Commit 284b1be7 authored by Alex ORLUC's avatar Alex ORLUC
Browse files

add toggle contactsFilling + fix slide toggle

parent 5b13d582
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,18 @@
fixedTopGap="56" [opened]="mobileQuery.matches ? false : true">
<menu-shortcut></menu-shortcut>
<menu-nav></menu-nav>
<mat-nav-list *ngIf="!creationMode">
<h3 mat-subheader>{{lang.actions}}</h3>
<a mat-list-item disableRipple="true">
<mat-icon color="primary" mat-list-icon>
<mat-slide-toggle [checked]="contactsFilling.enable" color="primary" (click)="toggleFillingContact();"></mat-slide-toggle>
</mat-icon>
<p mat-line (click)="toggleFillingContact();">
<span *ngIf="contactsFilling.enable">{{lang.disableContactsFilling}}</span>
<span *ngIf="!contactsFilling.enable">{{lang.enableContactsFilling}}</span>
</p>
</a>
</mat-nav-list>
</mat-sidenav>
<mat-sidenav-content>
<div *ngIf="loading" style="display:flex;height:100%;">
......@@ -18,7 +30,7 @@
</mat-card-header>
<p>{{lang.until}} <b [ngStyle]="{color : fillingColor.first_threshold}">{{contactsFilling.first_threshold}}%</b> {{lang.contactsFillingStr}}</p>
<mat-slider [(ngModel)]="contactsFilling.first_threshold" style="width:100%" color="primary"
max="100" min="1" step="1" thumbLabel="true" (change)="onSubmit()"></mat-slider>
max="98" min="1" step="1" thumbLabel="true" (change)="onSubmit()"></mat-slider>
<input disabled matInput type="color" name="color" value="{{fillingColor.first_threshold}}">
</mat-card>
</div>
......
......@@ -41,22 +41,18 @@ export class ContactsFillingAdministrationComponent implements OnInit {
};
fillingColumns = [
'title',
'contact_title',
'address_postal_code',
'email',
'function',
'contact_function',
'salutation_header',
'salutation_footer',
'other_data',
'contact_other_data',
'occupancy',
'lastname',
'contact_lastname',
'address_num',
'address_country',
'firstname',
'contact_firstname',
'department',
'society_short',
'website',
......@@ -152,4 +148,9 @@ export class ContactsFillingAdministrationComponent implements OnInit {
this.notify.error(err.error.errors);
});
}
toggleFillingContact() {
this.contactsFilling.enable == true ? this.contactsFilling.enable = false : this.contactsFilling.enable = true;
this.onSubmit();
}
}
......@@ -680,4 +680,6 @@ export const LANG_EN = {
"contactsFilling_title" : "Title",
"contactsFilling_website" : "Website",
"chooseIndexationProfil" : "Choose an indexation profil",
"enableContactsFilling" : "Enable contacts Filling",
"disableContactsFilling" : "Disable contacts Filling",
};
......@@ -705,4 +705,7 @@ export const LANG_FR = {
"contactsFilling_title" : "Civilité",
"contactsFilling_website" : "Site internet",
"chooseIndexationProfil" : "Choisissez un profil d'indexation",
"enableContactsFilling" : "Activer la complétude",
"disableContactsFilling" : "Désactiver la complétude",
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment