Commit bb21cbe6 by GD-A-150752

Bug-Fix

S52625662 #Alphabetically Order Message Templates
parent 8a200808
......@@ -120,7 +120,7 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
return val;
});
// Diversity is shown only is enabled by selected hiring team
// Diversity is shown only if enabled by selected hiring team
if (!this.isGlobalHT && !this.adminPortalLayoutService.getHiringTeamID().HasDiversity) {
this.stepTypeOptions = this.stepTypeOptions.filter(type => type.Value !== 'DIVERSITY');
}
......@@ -399,9 +399,11 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
)
.subscribe(
(response: [Array<MessageTemplateModel>, Array<MessageTemplateModel>]) => {
const myTemplates = response[0].filter(message => message.HiringTeam ===
this.adminPortalLayoutService.getHiringTeamID().ObjectID);
this.messageTemplates = [...myTemplates, ...response[1]];
this.utilsService.sort(response[0], ['TemplateName'], [1]);
this.utilsService.sort(response[1], ['TemplateName'], [1]);
const separator = new MessageTemplateModel();
separator.id = '-2';
this.messageTemplates = [...response[0], separator, ...response[1]];
this.addNewOptionToMessageTemplate();
this.assignMessageTemplate();
if (callback) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment