Commit ec525e42 by GD-A-150752

bug-fixes

parent 2d99d6ab
...@@ -527,5 +527,10 @@ ...@@ -527,5 +527,10 @@
</p-panel> </p-panel>
<!-- End displaying messages --> <!-- End displaying messages -->
<hr/> <hr/>
<div class="ui-g-12 ui-md-6">
<button (click)="removeStage(stage)" [disabled]="showLoader"
class="btn btn-primary add-more-btn">Remove Stage
</button>
</div>
</div> </div>
</ng-template> </ng-template>
...@@ -238,10 +238,16 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn ...@@ -238,10 +238,16 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
toggleInput(event, fieldName, value): void { toggleInput(event, fieldName, value): void {
this.utilsService.clearErrorMessages(); this.utilsService.clearErrorMessages();
if (value === false) { if (value === false) {
if (!this.form.controls[fieldName].invalid) { if (this.form.controls[fieldName]) {
this.editField[fieldName] = false; if (!this.form.controls[fieldName].invalid) {
this.editField[fieldName] = false;
} else {
this.utilsService.showAllErrorMessages();
}
} else { } else {
this.utilsService.showAllErrorMessages(); if (event.target.value !== '') {
this.editField[fieldName] = false;
}
} }
} else { } else {
this.editField[fieldName] = true; this.editField[fieldName] = true;
...@@ -501,12 +507,13 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn ...@@ -501,12 +507,13 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
this.utilsService.resetCounter(); this.utilsService.resetCounter();
this.utilsService.clearErrorMessages(); this.utilsService.clearErrorMessages();
const assoc = [ASSOCS.WORKFLOW_STAGE, [ASSOCS.WORKFLOW_STAGE, ASSOCS.WORKFLOW_MESSAGE].join('.'), const assoc = [ASSOCS.WORKFLOW_STAGE, [ASSOCS.WORKFLOW_STAGE, ASSOCS.WORKFLOW_MESSAGE, ASSOCS.MESSAGE_TEMPLATE].join('.'),
[ASSOCS.WORKFLOW_STAGE, ASSOCS.WORKFLOW_STEP].join('.')]; [ASSOCS.WORKFLOW_STAGE, ASSOCS.WORKFLOW_STEP].join('.')];
this.subscriptions.push(this.editWorkflowTemplateService.getWorkflowTemplateByID(id, assoc) this.subscriptions.push(this.editWorkflowTemplateService.getWorkflowTemplateByID(id, assoc)
.subscribe( .subscribe(
data => { data => {
console.log(data);
this.workflow = data; this.workflow = data;
this.updatedObjs[this.workflow.ObjectID] = this.workflow; this.updatedObjs[this.workflow.ObjectID] = this.workflow;
this.utilsService.addObjsToJSONByObjectID(this.updatedObjs, this.workflow.WorkFlowStages); this.utilsService.addObjsToJSONByObjectID(this.updatedObjs, this.workflow.WorkFlowStages);
...@@ -527,6 +534,7 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn ...@@ -527,6 +534,7 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
this.utilsService.addObjsToJSONByObjectID(this.updatedObjs, stage.WorkFlowMessages); this.utilsService.addObjsToJSONByObjectID(this.updatedObjs, stage.WorkFlowMessages);
this.utilsService.addObjsToJSONByObjectID(this.updatedObjs, stage.Steps); this.utilsService.addObjsToJSONByObjectID(this.updatedObjs, stage.Steps);
}); });
console.log(this.workflow);
this.reOrderStages(); this.reOrderStages();
this.reOrderSteps(); this.reOrderSteps();
......
...@@ -26,5 +26,6 @@ export const SEARCH = { ...@@ -26,5 +26,6 @@ export const SEARCH = {
export const ASSOCS = { export const ASSOCS = {
WORKFLOW_STAGE: 'WorkFlowStages', WORKFLOW_STAGE: 'WorkFlowStages',
WORKFLOW_MESSAGE: 'WorkFlowMessages', WORKFLOW_MESSAGE: 'WorkFlowMessages',
WORKFLOW_STEP: 'Steps' WORKFLOW_STEP: 'Steps',
MESSAGE_TEMPLATE: 'MessageTemplate'
}; };
...@@ -13,7 +13,7 @@ export class WorkflowMessageModel { ...@@ -13,7 +13,7 @@ export class WorkflowMessageModel {
BusinessHoursOnly: boolean; BusinessHoursOnly: boolean;
IsWithdrawalMessage: boolean; IsWithdrawalMessage: boolean;
ApplicantSources: Array<ApplicantSourcesEnum>; ApplicantSources: Array<ApplicantSourcesEnum>;
MessageTemplate: MessageTemplateModel | string; MessageTemplate: MessageTemplateModel;
WorkFlowStage: string; WorkFlowStage: string;
constructor(wfStageID: string) { constructor(wfStageID: string) {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
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