Skip to content
Snippets Groups Projects
Commit 72113ced authored by Hamza HRAMCHI's avatar Hamza HRAMCHI
Browse files

FIX #21555 TIME 0:20 fix toggle + var lang

parent 5860348e
No related branches found
No related tags found
No related merge requests found
......@@ -200,13 +200,13 @@
<mat-form-field>
<input matInput [(ngModel)]="currentType.process_delay" [disabled]="currentType.process_delay === -1" required
name="process_delay" id="process_delay" title="{{'lang.processDelayDay' | translate}}"
type="number" placeholder="{{'lang.processDelayDay' | translate}}" pattern="^\-1|^[0-9]*$">
<mat-hint align="start" *ngIf="currentType.process_delay === -1" style="color: red;">{{'lang.disableProcessDaelayDesc' | translate}}</mat-hint>
type="number" placeholder="{{'lang.processDelayDay' | translate}}" pattern="^[0-9]*$">
<mat-hint align="start" *ngIf="currentType.process_delay === -1" style="color: red;">{{'lang.disableProcessDelayDesc' | translate}}</mat-hint>
</mat-form-field>
</div>
<diV class="col-sm-2">
<mat-slide-toggle [(ngModel)]="hideProcessDelay" [ngModelOptions]="{standalone: true}" color="primary"
[title]="'lang.noProcessDelay' | translate" (toggleChange)="toggleProcessDelay(hideProcessDelay)"
[title]="(currentType.process_delay !== -1 ? 'lang.processDelayEnabled' : 'lang.processDelayDisabled') | translate" (toggleChange)="toggleProcessDelay(hideProcessDelay)"
style="margin-top: 12px; margin-bottom: 12px;">
</mat-slide-toggle>
</diV>
......
......@@ -48,7 +48,8 @@ export class DoctypesAdministrationComponent implements OnInit {
displayedColumns = ['label', 'use', 'mandatory', 'column'];
hideProcessDelay: boolean = false;
hideProcessDelay: boolean = true;
currentTypeClone: any = null;
constructor(
public translate: TranslateService,
......@@ -188,7 +189,8 @@ export class DoctypesAdministrationComponent implements OnInit {
this.currentType = dataValue['doctype'];
this.secondLevels = dataValue['secondLevel'];
this.processModes = ['NORMAL', 'SVA', 'SVR'];
this.hideProcessDelay = this.currentType.process_delay === -1 ? true : false;
this.currentTypeClone = JSON.parse(JSON.stringify(dataValue['doctype']));
this.hideProcessDelay = this.currentType.process_delay === -1 ? false : true;
this.getRules();
if (move) {
......@@ -460,7 +462,7 @@ export class DoctypesAdministrationComponent implements OnInit {
toggleProcessDelay(value: boolean) {
this.hideProcessDelay = !value;
this.currentType.process_delay = !this.hideProcessDelay ? 0 : -1;
this.currentType.process_delay = !this.hideProcessDelay ? -1 : this.currentTypeClone.process_delay;
}
}
@Component({
......
......@@ -2583,7 +2583,8 @@
"emptyEmails": "The correspondents of the group do not contain email addresses",
"correspondentEmptyEmails": "<b>Warning ! Only correspondents with e-mail addresses are included.</b> <br><br><ul><li>Number of correspondents without an email address : {{nbr}}</li></ul>",
"separatorsEmail": "To separate email addresses, use \",\" or \";\"",
"cannotAccessPage": "Cannot access the page",
"noProcessDelay": "No process delay",
"disableProcessDaelayDesc": "This type of document is no longer taken into account for the calculation of the process limit date"
"cannotAccessPage": "Cannot access page",
"processDelayEnabled": "Process delay enabled",
"processDelayDisabled": "Process delay disabled",
"disableProcessDelayDesc": "This type of document is no longer taken into account for the calculation of the process limit date"
}
......@@ -2585,6 +2585,7 @@
"correspondentEmptyEmails": "<b>Attention ! Seuls les correspondants avec des adresses e-mail sont repris.</b> <br><br><ul><li>Nombre de correspondants sans adresse e-mail : {{nbr}}</li></ul>",
"separatorsEmail": "Pour séparer les adresses courriels, utiliser les \",\" ou \";\"",
"cannotAccessPage": "Impossible d'accéder à la page",
"noProcessDelay": "Aucun délai de traitement spécifique",
"disableProcessDaelayDesc": "Ce type de document n'est plus pris en compte pour le calcul de la date limite de traitement"
"processDelayEnabled": "Délai de traitement activé",
"processDelayDisabled": "Délai de traitement désactivé",
"disableProcessDelayDesc": "Ce type de document n'est plus pris en compte pour le calcul de la date limite de traitement"
}
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