Skip to content
Snippets Groups Projects
Commit 59d5373c authored by Alex ORLUC's avatar Alex ORLUC
Browse files

FIX #11271 TIME 0:10 fix default launch + fix if no default model

parent 859c194c
No related branches found
No related tags found
No related merge requests found
......@@ -64,7 +64,10 @@ export class IndexationComponent implements OnInit {
tap((data: any) => {
this.indexingModels = data.indexingModels;
this.currentIndexingModel = this.indexingModels.filter(model => model.default === true)[0];
if (this.currentIndexingModel === undefined) {
this.currentIndexingModel = this.indexingModels[0];
this.notify.error(this.lang.noDefaultIndexingModel);
}
if (this.appService.getViewMode()) {
setTimeout(() => {
this.sidenavLeft.open();
......
......@@ -373,7 +373,9 @@ export class IndexingFormComponent implements OnInit {
} else if (elem.identifier === 'priority') {
elem.values = data.priorities;
elem.event = 'setPriorityColor';
this.setPriorityColor(elem, elem.default_value);
if (elem.default_value !== '') {
this.setPriorityColor(elem, elem.default_value);
}
} else if (elem.identifier === 'doctype') {
let title = '';
let arrValues: any[] = [];
......@@ -410,7 +412,10 @@ export class IndexingFormComponent implements OnInit {
});
elem.values = arrValues;
elem.event = 'calcLimitDate';
this.calcLimitDate(elem, elem.default_value);
if (elem.default_value !== '') {
this.calcLimitDate(elem, elem.default_value);
}
}
});
});
......
......@@ -1132,4 +1132,5 @@ export const LANG_EN = {
"noAvaiblableAction" : "<b>No available action</b>, please set an action in <b>Administration > Users groups > Mail indexing</b>.",
"eraseValue" : "Erase value",
"todayDate" : "Today date",
"noDefaultIndexingModel" : "No default indexing model found, the first model of the list have been loaded.",
};
......@@ -1169,4 +1169,5 @@ export const LANG_FR = {
"noAvaiblableAction" : "<b>Aucune action disponible</b>, veuillez paramétrer une action dans <b>Administration > Groupes d'utilisateurs > Enregistrement de courrier</b>.",
"eraseValue" : "Effacer la valeur",
"todayDate" : "Date du jour",
"noDefaultIndexingModel" : "Aucun modèle par défaut trouvé, chargement du premier de la liste.",
};
......@@ -1158,4 +1158,5 @@ export const LANG_NL = {
"noAvaiblableAction" : "<b>No available action</b>, please set an action in <b>Administration > User groups > Mail indexing</b>.", //_TO_TRANSLATE
"eraseValue" : "Erase value", //_TO_TRANSLATE
"todayDate" : "Today date", //_TO_TRANSLATE
"noDefaultIndexingModel" : "No default indexing model found, the first model of the list have been loaded.", //_TO_TRANSLATE
};
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