Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
PERFORMA_REPLICA
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Muhammad Usman
PERFORMA_REPLICA
Commits
6db877d0
Commit
6db877d0
authored
Nov 25, 2019
by
GD-A-150752
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug-fixes
parent
86c3a28a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
308 additions
and
247 deletions
+308
-247
edit-message-template.component.html
...dit-message-template/edit-message-template.component.html
+1
-1
edit-workflow-template.component.html
...t-workflow-template/edit-workflow-template.component.html
+115
-101
edit-workflow-template.component.scss
...t-workflow-template/edit-workflow-template.component.scss
+8
-1
edit-workflow-template.component.ts
...dit-workflow-template/edit-workflow-template.component.ts
+164
-144
custom.scss
frontend/angular/src/assets/css/custom.scss
+20
-0
No files found.
frontend/angular/src/app/components/edit-message-template/edit-message-template.component.html
View file @
6db877d0
...
...
@@ -4,7 +4,7 @@
<div
class=
"ui-g ui-fluid"
>
<div
class=
"page-title mb-0"
>
<a
[
routerLink
]="['/
admin
/
list-message-templates
']"
class=
"arrow-btn-blue ml-0"
>
<img
src=
"
/
assets/images/arrow-left-prev_blue.svg"
>
<img
src=
"assets/images/arrow-left-prev_blue.svg"
>
</a>
{{editMode ? "Edit" : "Add"}} Message Template
</div>
...
...
frontend/angular/src/app/components/edit-workflow-template/edit-workflow-template.component.html
View file @
6db877d0
...
...
@@ -7,7 +7,7 @@
<div
class=
"ui-g-12"
>
<div
class=
"page-title mb-0"
>
<a
[
routerLink
]="['/
admin
/
list-workflow-templates
']"
class=
"arrow-btn-blue ml-0"
>
<img
src=
"
/
assets/images/arrow-left-prev_blue.svg"
>
<img
src=
"assets/images/arrow-left-prev_blue.svg"
>
</a>
{{editMode ? "Edit" : "Add"}} Workflow Template
</div>
...
...
@@ -32,7 +32,7 @@
<div
class=
"ui-g ui-fluid"
>
<div
class=
"ui-g-12 ui-md-12"
>
<p-panel
*
ngFor=
"let stage of preStages"
[
toggleable
]="
true
"
toggler=
"header"
>
toggler=
"header"
[
collapsed
]="
true
"
>
<p-header>
<span
class=
"ui-panel-title"
>
{{getStageHeader(stage)}}
...
...
@@ -44,7 +44,8 @@
</div>
<div
class=
"form-group ui-g-12"
>
<label
for=
"LandingButtonText"
>
Button Text
</label>
<input
[(
ngModel
)]="
workflow
.
LandingButtonText
"
[
disabled
]="
showLoader
"
class=
"form-control"
<input
[(
ngModel
)]="
workflow
.
LandingButtonText
"
[
disabled
]="
showLoader
"
class=
"form-control"
fieldLabel=
"Landing Button Text"
id=
"LandingButtonText"
name=
"LandingButtonText"
required
...
...
@@ -55,7 +56,8 @@
</div>
<div
class=
"form-group ui-g-12"
>
<label
for=
"VerificationHeaderText"
>
Header Text
</label>
<input
[(
ngModel
)]="
workflow
.
VerificationHeaderText
"
[
disabled
]="
showLoader
"
class=
"form-control"
<input
[(
ngModel
)]="
workflow
.
VerificationHeaderText
"
[
disabled
]="
showLoader
"
class=
"form-control"
fieldLabel=
"Verification Header Text"
id=
"VerificationHeaderText"
name=
"VerificationHeaderText"
required
...
...
@@ -64,51 +66,44 @@
<div
class=
"work-belonging ui-g-12 mb-0"
>
<span
class=
"calcField"
>
Application
</span>
</div>
<div
class=
"
criteria_section
ui-g-12"
>
<
fieldset
>
<
legend
>
<
span
class=
"calcField"
>
Capture CV
</span
>
<div
class=
"
form-group
ui-g-12"
>
<
div
class=
"ui-g"
>
<
div
class=
"ui-g-6"
>
<
label
for=
"CaptureCV"
>
Capture CV
</label
>
<p-inputSwitch
[(
ngModel
)]="
workflow
.
CaptureCV
"
[
disabled
]="
showLoader
"
name=
"CaptureCV"
>
name=
"CaptureCV"
id=
"CaptureCV"
>
</p-inputSwitch>
</legend>
<div
*
ngIf=
"workflow.CaptureCV"
class=
"ui-g-12 ui-md-6"
>
<div
class=
"ui-g-12 ui-md-4"
>
<label>
Mandatory
</label>
</div>
<div
class=
"ui-g-12 ui-md-2"
>
<p-inputSwitch
[(
ngModel
)]="
workflow
.
IsCVMandatory
"
[
disabled
]="
showLoader
"
name=
"IsCVMandatory"
>
</p-inputSwitch>
</div>
</div>
</fieldset>
<div
class=
"ui-g-6"
*
ngIf=
"workflow.CaptureCV"
>
<label
for=
"ThankYouSecondaryText"
>
Mandatory
</label>
<p-inputSwitch
[(
ngModel
)]="
workflow
.
IsCVMandatory
"
[
disabled
]="
showLoader
"
name=
"IsCVMandatory"
id=
"IsCVMandatory"
>
</p-inputSwitch>
</div>
</div>
</div>
<div
class=
"
criteria_section
ui-g-12"
>
<
fieldset
>
<
legend
>
<
span
class=
"calcField"
>
Capture Cover Letter
</span
>
<div
class=
"
form-group
ui-g-12"
>
<
div
class=
"ui-g"
>
<
div
class=
"ui-g-6"
>
<
label
for=
"CaptureCL"
>
Capture Cover Letter
</label
>
<p-inputSwitch
[(
ngModel
)]="
workflow
.
CaptureCL
"
[
disabled
]="
showLoader
"
name=
"CaptureCL"
>
name=
"CaptureCL"
id=
"CaptureCL"
>
</p-inputSwitch>
</legend>
<div
*
ngIf=
"workflow.CaptureCL"
class=
"ui-g-12 ui-md-6"
>
<div
class=
"ui-g-12 ui-md-4"
>
<label>
Mandatory
</label>
</div>
<div
class=
"ui-g-12 ui-md-2"
>
<p-inputSwitch
[(
ngModel
)]="
workflow
.
IsCLMandatory
"
[
disabled
]="
showLoader
"
name=
"IsCLMandatory"
>
</p-inputSwitch>
</div>
</div>
</fieldset>
<div
class=
"ui-g-6"
*
ngIf=
"workflow.CaptureCL"
>
<label
for=
"IsCLMandatory"
>
Mandatory
</label>
<p-inputSwitch
[(
ngModel
)]="
workflow
.
IsCLMandatory
"
[
disabled
]="
showLoader
"
name=
"IsCLMandatory"
id=
"IsCLMandatory"
>
</p-inputSwitch>
</div>
</div>
</div>
<div
class=
"form-group ui-g-12"
>
<label
for=
"VerificationHeaderText"
>
Button Text
</label>
<input
[(
ngModel
)]="
workflow
.
ApplicationButtonText
"
[
disabled
]="
showLoader
"
class=
"form-control"
<input
[(
ngModel
)]="
workflow
.
ApplicationButtonText
"
[
disabled
]="
showLoader
"
class=
"form-control"
fieldLabel=
"Application Button Text"
name=
"ApplicationButtonText"
required
...
...
@@ -154,7 +149,8 @@
<label
for=
"JobOutlineButtonText"
>
Button Text
</label>
<input
[(
ngModel
)]="
workflow
.
JobOutlineButtonText
"
[
disabled
]="
showLoader
"
class=
"form-control"
fieldLabel=
"Job Outline Button Text"
id=
"JobOutlineButtonText"
name=
"JobOutlineButtonText"
fieldLabel=
"Job Outline Button Text"
id=
"JobOutlineButtonText"
name=
"JobOutlineButtonText"
required
tabindex=
"10"
type=
"text"
>
</div>
...
...
@@ -178,8 +174,10 @@
</div>
<div
(
dndDrop
)="
onDrop
($
event
,
stage
.
Steps
,
stage
.
ObjectID
)"
[
class
.
disable-drop
]="
draggingId
!=
null
&&
draggingId
!==
stage
.
ObjectID
"
dndDropzone
>
<div
[
hidden
]="
draggingId
!==
stage
.
ObjectID
"
dndPlaceholderRef
style=
"background: #CCCCCC; border: 1px dashed #000; width: 50%; height: 53px"
></div>
[
class
.
disable-drop
]="
draggingId
!=
null
&&
draggingId
!==
stage
.
ObjectID
"
dndDropzone
>
<div
[
hidden
]="
draggingId
!==
stage
.
ObjectID
"
dndPlaceholderRef
style=
"background: #CCCCCC; border: 1px dashed #000; width: 50%; height: 53px"
></div>
<div
*
ngFor=
"let step of stage.Steps"
class=
"ui-g"
>
<div
(
dndEnd
)="
onDragEnd
($
event
)"
(
dndStart
)="
onDragStart
(
step
,
stage
.
Steps
,
stage
.
ObjectID
)"
...
...
@@ -187,11 +185,12 @@
class=
"ui-g-6"
dndEffectAllowed=
"copy"
>
<div
class=
"ui-g"
>
<div
class=
"col-md-8"
>
<div
class=
"col-md-8
interactive
"
>
<h4>
{{step.StepType.Description}}
</h4>
</div>
<div
class=
"col-md-4"
>
<button
(
click
)="
removeStep
(
step
,
stage
)"
[
disabled
]="
showLoader
"
icon=
"ui-icon-close"
<button
(
click
)="
removeStep
(
step
,
stage
)"
[
disabled
]="
showLoader
"
icon=
"ui-icon-close"
pButton
type=
"button"
></button>
</div>
...
...
@@ -225,7 +224,7 @@
</div>
</div>
<p-panel
[
collapsed
]="!
stage
.
UseMessaging
"
[
toggleable
]="
stage
.
UseMessaging
"
header=
"{{stageMessagesCount(stage)}}"
>
header=
"{{stageMessagesCount(stage)}}"
class=
"messaging"
>
<div
class=
"form-group row"
>
<div
class=
"col-md-offset-9 col-md-3"
>
<button
(
click
)="
addMessage
(
stage
)"
*
ngIf=
"stage.UseMessaging"
...
...
@@ -241,7 +240,7 @@
<h3>
Withdrawal Process
</h3>
</div>
<div
*
ngIf=
"stage.UseMessaging"
class=
"col-lg-12 col-md-12 mb-10"
>
<div
class=
"col-md-
4
"
>
<div
class=
"col-md-
3
"
>
<label>
</label>
<p-multiSelect
[(
ngModel
)]="
message
.
ApplicantSources
"
[
disabled
]="
showLoader
"
...
...
@@ -253,10 +252,11 @@
optionLabel=
"Description"
>
</p-multiSelect>
</div>
<div
class=
"col-md-
4
"
>
<div
class=
"col-md-
2
"
>
<label>
After
</label>
<p-inputMask
(
change
)="
generateDelayString
(
message
)"
(
onBlur
)="
toggleInput
($
event
,
'
Delay
'+
message
.
ObjectID
,
false
)"
(
onFocus
)="
toggleInput
($
event
,
'
Delay
'+
message
.
ObjectID
,
true
)"
(
onBlur
)="
toggleInput
($
event
,
'
Delay
'+
message
.
ObjectID
,
false
)"
(
onFocus
)="
toggleInput
($
event
,
'
Delay
'+
message
.
ObjectID
,
true
)"
*
ngIf=
"!showLabel('Delay'+message.ObjectID) || !message.Delay"
[(
ngModel
)]="
message
.
Delay
"
[
disabled
]="
showLoader
"
...
...
@@ -270,25 +270,25 @@
<label>
{{message.DelayString}}
</label>
</div>
</div>
<div
class=
"col-md-
4
"
>
<div
class=
"col-md-
1
"
>
<label
for=
"Variance{{message.ObjectID}}"
>
+/-
</label>
<input
[(
ngModel
)]="
message
.
Variance
"
[
disabled
]="
showLoader
"
class=
"form-control"
id=
"Variance{{message.ObjectID}}"
name=
"Variance{{message.ObjectID}}"
type=
"text"
>
</div>
</div>
<div
class=
"col-lg-12 col-md-12 flex-center"
>
<div
class=
"col-md-4"
>
<label
class=
"mb-0"
>
Business Hours only
</label>
<div
class=
"col-md-1"
>
<label
title=
"Business Hours only"
class=
"mb-0"
>
Business Hours
only
</label>
<p-checkbox
[(
ngModel
)]="
message
.
BusinessHoursOnly
"
binary=
"true"
name=
"BusinessHoursOnly{{message.ObjectID}}"
>
</p-checkbox>
</div>
<div
class=
"col-md-
6
"
>
<div
class=
"col-md-
4
"
>
<label>
Send
</label>
<p-dropdown
[(
ngModel
)]="
message
.
MessageTemplate
"
[
options
]="
messageTemplates
"
<p-dropdown
[(
ngModel
)]="
message
.
MessageTemplate
"
[
options
]="
messageTemplates
"
filter=
"true"
name=
"messageTemplate{{message.ObjectID}}"
optionLabel=
"TemplateName"
>
...
...
@@ -301,17 +301,20 @@
style=
"position: relative;height: 25px;"
>
<i
class=
"{{getMessageClass(selectedMsg.value)}}"
></i>
<div
class=
"dropdown-text"
>
{{selectedMsg.label}}
</div>
class=
"dropdown-text"
>
{{selectedMsg.label}}
</div>
</div>
</ng-template>
</p-dropdown>
</div>
<div
class=
"col-md-2 text-center"
>
<button
(
click
)="
configureMessageTemplate
(
message
)"
[
disabled
]="
showLoader
"
icon=
"ui-icon-settings"
<div
class=
"col-md-1 text-center"
>
<button
(
click
)="
configureMessageTemplate
(
message
)"
[
disabled
]="
showLoader
"
icon=
"ui-icon-settings"
pButton
type=
"button"
>
</button>
<button
(
click
)="
removeMessage
(
message
,
stage
)"
*
ngIf=
"!message.IsWithdrawalMessage"
[
disabled
]="
showLoader
"
icon=
"ui-icon-close"
<button
(
click
)="
removeMessage
(
message
,
stage
)"
*
ngIf=
"!message.IsWithdrawalMessage"
[
disabled
]="
showLoader
"
icon=
"ui-icon-close"
pButton
type=
"button"
>
</button>
</div>
...
...
@@ -340,20 +343,20 @@
</div>
<div
(
dndDrop
)="
onDrop
($
event
,
genericStages
,
000
)"
class=
"ui-g ui-fluid"
dndDropzone
>
<div
[
hidden
]="
draggingId
!==
000
"
dndPlaceholderRef
style=
"background: #CCCCCC; border: 1px dashed #000; width: 100%; height: 53px"
></div>
<div
[
hidden
]="
draggingId
!==
000
"
dndPlaceholderRef
style=
"background: #CCCCCC; border: 1px dashed #000; width: 100%; height: 53px"
></div>
<div
(
dndEnd
)="
onDragEnd
($
event
)"
(
dndStart
)="
onDragStart
(
stage
,
genericStages
,
000
)"
*
ngFor=
"let stage of genericStages"
[
dndDraggable
]="
stage
"
class=
"ui-g-12 ui-md-12"
dndEffectAllowed=
"copy"
toggler=
"header"
>
toggler=
"header"
>
<p-panel
[
toggleable
]="
true
"
#
panel
>
<p-panel
[
toggleable
]="
true
"
#
panel
[
collapsed
]="
true
"
>
<p-header>
<span
(
click
)="
toggleInput
($
event
,
'
StageName
'+
stage
.
SortOrder
,
true
)"
*
ngIf=
"showLabel('StageName'+stage.SortOrder)"
<span
(
click
)="
toggleInput
($
event
,
'
StageName
'+
stage
.
SortOrder
,
true
)"
*
ngIf=
"showLabel('StageName'+stage.SortOrder)"
class=
"ui-panel-title"
>
{{getStageHeader(stage)}}
</span>
...
...
@@ -383,8 +386,10 @@
No steps added...
</div>
<div
(
dndDrop
)="
onDrop
($
event
,
stage
.
Steps
,
stage
.
ObjectID
)"
[
class
.
disable-drop
]="
draggingId
!=
null
&&
draggingId
!==
stage
.
ObjectID
"
dndDropzone
>
<div
[
hidden
]="
draggingId
!==
stage
.
ObjectID
"
dndPlaceholderRef
style=
"background: #CCCCCC; border: 1px dashed #000; width: 50%; height: 53px"
></div>
[
class
.
disable-drop
]="
draggingId
!=
null
&&
draggingId
!==
stage
.
ObjectID
"
dndDropzone
>
<div
[
hidden
]="
draggingId
!==
stage
.
ObjectID
"
dndPlaceholderRef
style=
"background: #CCCCCC; border: 1px dashed #000; width: 50%; height: 53px"
></div>
<div
*
ngFor=
"let step of stage.Steps"
class=
"ui-g"
>
<div
(
dndEnd
)="
onDragEnd
($
event
)"
(
dndStart
)="
onDragStart
(
step
,
stage
.
Steps
,
stage
.
ObjectID
)"
...
...
@@ -392,11 +397,12 @@
class=
"ui-g-6"
dndEffectAllowed=
"copy"
>
<div
class=
"ui-g"
>
<div
class=
"col-md-8"
>
<div
class=
"col-md-8
interactive
"
>
<h4>
{{step.StepType.Description}}
</h4>
</div>
<div
class=
"col-md-4"
>
<button
(
click
)="
removeStep
(
step
,
stage
)"
[
disabled
]="
showLoader
"
icon=
"ui-icon-close"
<button
(
click
)="
removeStep
(
step
,
stage
)"
[
disabled
]="
showLoader
"
icon=
"ui-icon-close"
pButton
type=
"button"
></button>
</div>
...
...
@@ -430,7 +436,7 @@
</div>
</div>
<p-panel
[
collapsed
]="!
stage
.
UseMessaging
"
[
toggleable
]="
stage
.
UseMessaging
"
header=
"{{stageMessagesCount(stage)}}"
>
header=
"{{stageMessagesCount(stage)}}"
class=
"messaging"
>
<div
class=
"form-group row"
>
<div
class=
"col-md-offset-9 col-md-3"
>
<button
(
click
)="
addMessage
(
stage
)"
*
ngIf=
"stage.UseMessaging"
...
...
@@ -448,10 +454,11 @@
<h3>
Withdrawal Process
</h3>
</div>
<div
*
ngIf=
"stage.UseMessaging"
class=
"col-lg-12 col-md-12"
>
<div
class=
"col-md-
4
"
>
<div
class=
"col-md-
2
"
>
<label>
After
</label>
<p-inputMask
(
change
)="
generateDelayString
(
message
)"
(
onBlur
)="
toggleInput
($
event
,
'
Delay
'+
message
.
ObjectID
,
false
)"
(
onFocus
)="
toggleInput
($
event
,
'
Delay
'+
message
.
ObjectID
,
true
)"
(
onBlur
)="
toggleInput
($
event
,
'
Delay
'+
message
.
ObjectID
,
false
)"
(
onFocus
)="
toggleInput
($
event
,
'
Delay
'+
message
.
ObjectID
,
true
)"
*
ngIf=
"!showLabel('Delay'+message.ObjectID) || !message.Delay"
[(
ngModel
)]="
message
.
Delay
"
[
disabled
]="
showLoader
"
...
...
@@ -465,25 +472,24 @@
<label>
{{message.DelayString}}
</label>
</div>
</div>
<div
class=
"col-md-
4
"
>
<div
class=
"col-md-
2
"
>
<label
for=
"Variance{{message.ObjectID}}"
>
+/-
</label>
<input
[(
ngModel
)]="
message
.
Variance
"
[
disabled
]="
showLoader
"
[
id
]="'
Variance
'+
message
.
ObjectID
"
class=
"form-control"
name=
"Variance{{message.ObjectID}}"
type=
"text"
>
</div>
<div
class=
"col-md-
4
"
>
<div
class=
"col-md-
2
"
>
<label>
Business Hours only
</label>
<p-checkbox
[(
ngModel
)]="
message
.
BusinessHoursOnly
"
binary=
"true"
name=
"BusinessHoursOnly{{message.ObjectID}}"
>
</p-checkbox>
</div>
</div>
<div
*
ngIf=
"stage.UseMessaging"
class=
"col-lg-12 col-md-12"
>
<div
class=
"col-md-8"
>
<div
class=
"col-md-5"
>
<label>
Send
</label>
<p-dropdown
(
onChange
)="
showMessageTemplateDialog
($
event
,
message
)"
[(
ngModel
)]="
message
.
MessageTemplate
"
<p-dropdown
(
onChange
)="
showMessageTemplateDialog
($
event
,
message
)"
[(
ngModel
)]="
message
.
MessageTemplate
"
[
autoDisplayFirst
]="
false
"
[
options
]="
messageTemplates
"
filter=
"true"
...
...
@@ -492,30 +498,31 @@
<ng-template
let-message
pTemplate=
"selectedItem"
>
<i
class=
"{{getMessageClass(message.value)}}"
></i>
<span
class=
"dropdown-text"
>
{{message.label}}
</span>
class=
"dropdown-text"
>
{{message.label}}
</span>
</ng-template>
<ng-template
let-selectedMsg
pTemplate=
"item"
>
<div
class=
"ui-helper-clearfix"
style=
"position: relative;height: 25px;"
>
<i
class=
"{{getMessageClass(selectedMsg.value)}}"
></i>
<div
class=
"dropdown-text"
>
{{selectedMsg.label}}
</div>
class=
"dropdown-text"
>
{{selectedMsg.label}}
</div>
</div>
</ng-template>
</p-dropdown>
</div>
<div
class=
"col-md-4 text-center"
>
<button
(
click
)="
configureMessageTemplate
(
message
)"
[
disabled
]="
showLoader
"
icon=
"ui-icon-settings"
<div
class=
"col-md-1 text-center"
>
<button
(
click
)="
configureMessageTemplate
(
message
)"
[
disabled
]="
showLoader
"
icon=
"ui-icon-settings"
pButton
type=
"button"
></button>
<button
(
click
)="
removeMessage
(
message
,
stage
)"
*
ngIf=
"!message.IsWithdrawalMessage"
[
disabled
]="
showLoader
"
<button
(
click
)="
removeMessage
(
message
,
stage
)"
*
ngIf=
"!message.IsWithdrawalMessage"
[
disabled
]="
showLoader
"
icon=
"ui-icon-close"
pButton
type=
"button"
></button>
</div>
</div>
</div>
</p-panel>
<!-- End displaying messages -->
<hr/>
...
...
@@ -536,7 +543,8 @@
<div
class=
"ui-g ui-fluid"
>
<div
class=
"ui-g-12"
>
<!-- Start Post Stages -->
<p-panel
*
ngFor=
"let stage of postStages"
[
toggleable
]="
true
"
toggler=
"header"
>
<p-panel
*
ngFor=
"let stage of postStages"
[
toggleable
]="
true
"
toggler=
"header"
[
collapsed
]="
true
"
>
<p-header>
<span
class=
"ui-panel-title"
>
{{getStageHeader(stage)}}
...
...
@@ -566,7 +574,7 @@
</div>
</div>
<p-panel
[
collapsed
]="!
stage
.
UseMessaging
"
[
toggleable
]="
stage
.
UseMessaging
"
header=
"{{stageMessagesCount(stage)}}"
>
header=
"{{stageMessagesCount(stage)}}"
class=
"messaging"
>
<div
class=
"form-group row"
>
<div
class=
"col-md-offset-9 col-md-3"
>
<button
(
click
)="
addMessage
(
stage
)"
*
ngIf=
"stage.UseMessaging"
...
...
@@ -582,10 +590,11 @@
<h3>
Withdrawal Process
</h3>
</div>
<div
*
ngIf=
"stage.UseMessaging"
class=
"col-lg-12 col-md-12"
>
<div
class=
"col-md-
4
"
>
<div
class=
"col-md-
2
"
>
<label>
After
</label>
<p-inputMask
(
change
)="
generateDelayString
(
message
)"
(
onBlur
)="
toggleInput
($
event
,
'
Delay
'+
message
.
ObjectID
,
false
)"
(
onFocus
)="
toggleInput
($
event
,
'
Delay
'+
message
.
ObjectID
,
true
)"
(
onBlur
)="
toggleInput
($
event
,
'
Delay
'+
message
.
ObjectID
,
false
)"
(
onFocus
)="
toggleInput
($
event
,
'
Delay
'+
message
.
ObjectID
,
true
)"
*
ngIf=
"!showLabel('Delay'+message.ObjectID) || !message.Delay"
[(
ngModel
)]="
message
.
Delay
"
[
disabled
]="
showLoader
"
...
...
@@ -599,25 +608,24 @@
<label>
{{message.DelayString}}
</label>
</div>
</div>
<div
class=
"col-md-
4
"
>
<div
class=
"col-md-
2
"
>
<label
for=
"Variance{{message.ObjectID}}"
>
+/-
</label>
<input
[(
ngModel
)]="
message
.
Variance
"
[
disabled
]="
showLoader
"
[
id
]="'
Variance
'+
message
.
ObjectID
"
class=
"form-control"
name=
"Variance{{message.ObjectID}}"
type=
"text"
>
</div>
<div
class=
"col-md-
4
"
>
<div
class=
"col-md-
5
"
>
<label>
Business Hours only
</label>
<p-checkbox
[(
ngModel
)]="
message
.
BusinessHoursOnly
"
binary=
"true"
name=
"BusinessHoursOnly{{message.ObjectID}}"
>
</p-checkbox>
</div>
</div>
<div
*
ngIf=
"stage.UseMessaging"
class=
"col-lg-12 col-md-12"
>
<div
class=
"col-md-8"
>
<div
class=
"col-md-5"
>
<label>
Send
</label>
<p-dropdown
[(
ngModel
)]="
message
.
MessageTemplate
"
[
options
]="
messageTemplates
"
<p-dropdown
[(
ngModel
)]="
message
.
MessageTemplate
"
[
options
]="
messageTemplates
"
filter=
"true"
name=
"messageTemplate{{message.ObjectID}}"
optionLabel=
"TemplateName"
>
...
...
@@ -630,16 +638,19 @@
style=
"position: relative;height: 25px;"
>
<i
class=
"{{getMessageClass(selectedMsg.value)}}"
></i>
<div
class=
"dropdown-text"
>
{{selectedMsg.label}}
</div>
class=
"dropdown-text"
>
{{selectedMsg.label}}
</div>
</div>
</ng-template>
</p-dropdown>
</div>
<div
class=
"col-md-4 text-center"
>
<button
(
click
)="
configureMessageTemplate
(
message
)"
[
disabled
]="
showLoader
"
icon=
"ui-icon-settings"
<div
class=
"col-md-1 text-center"
>
<button
(
click
)="
configureMessageTemplate
(
message
)"
[
disabled
]="
showLoader
"
icon=
"ui-icon-settings"
pButton
type=
"button"
></button>
<button
(
click
)="
removeMessage
(
message
,
stage
)"
*
ngIf=
"!message.IsWithdrawalMessage"
[
disabled
]="
showLoader
"
icon=
"ui-icon-close"
<button
(
click
)="
removeMessage
(
message
,
stage
)"
*
ngIf=
"!message.IsWithdrawalMessage"
[
disabled
]="
showLoader
"
icon=
"ui-icon-close"
pButton
type=
"button"
></button>
</div>
...
...
@@ -658,15 +669,18 @@
<div
class=
"ui-g ui-fluid"
>
<div
class=
"ui-g-12 ui-md-12"
>
<div
class=
"text-center form-group"
>
<button
[
disabled
]="
showLoader
"
class=
"btn btn-primary largeBtn greyBtn"
routerLink=
"/admin/list-message-templates"
<button
[
disabled
]="
showLoader
"
class=
"btn btn-primary largeBtn greyBtn"
routerLink=
"/admin/list-workflow-templates"
type=
"button"
value=
"Cancel"
>
Cancel
</button>
<button
(
click
)="
saveWorkflowTemplate
()"
*
ngIf=
"showSaveBtn()"
[
disabled
]="
showLoader
"
class=
"btn btn-primary largeBtn"
<button
(
click
)="
saveWorkflowTemplate
()"
*
ngIf=
"showSaveBtn()"
[
disabled
]="
showLoader
"
class=
"btn btn-primary largeBtn"
type=
"button"
value=
"Save"
>
Save
</button>
<button
(
click
)="
saveWorkflowTemplate
(
true
)"
*
ngIf=
"showSaveCopyBtn()"
[
disabled
]="
showLoader
"
<button
(
click
)="
saveWorkflowTemplate
(
true
)"
*
ngIf=
"showSaveCopyBtn()"
[
disabled
]="
showLoader
"
class=
"btn btn-primary largeBtn"
type=
"button"
value=
"Save As a Copy"
>
Save As a Copy
...
...
frontend/angular/src/app/components/edit-workflow-template/edit-workflow-template.component.scss
View file @
6db877d0
...
...
@@ -69,16 +69,23 @@ p-inputMask {
}
.ml-0
{
margin-left
:
0
px
;
margin-left
:
0
;
}
.templateName
{
font-size
:
24px
;
}
.interactive
{
cursor
:
pointer
;
}
label
{
font-family
:
"Usual-Regular"
;
font-weight
:
300
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
white-space
:
nowrap
;
}
.calcField
{
...
...
frontend/angular/src/app/components/edit-workflow-template/edit-workflow-template.component.ts
View file @
6db877d0
import
{
Component
,
OnInit
,
ViewChild
}
from
'@angular/core'
;
import
{
NgForm
}
from
'@angular/forms'
;
import
{
ActivatedRoute
,
Params
,
Router
}
from
'@angular/router'
;
import
{
DndDropEvent
}
from
'ngx-drag-drop'
;
import
{
ConfirmationService
}
from
'primeng/api'
;
import
{
Dialog
}
from
'primeng/dialog'
;
import
{
combineLatest
}
from
'rxjs/observable/combineLatest'
;
...
...
@@ -21,7 +22,6 @@ import { UtilsService } from '../../oneit/services/utils.service';
import
{
AdminPortalLayoutService
}
from
'../admin-portal/admin-portal-layout/admin-portal-layout.service'
;
import
{
BaseComponent
}
from
'../base/base.component'
;
import
{
EditWorkflowTemplateService
}
from
'./edit-workflow-template.service'
;
import
{
DndDropEvent
}
from
"ngx-drag-drop"
;
@
Component
({
selector
:
'app-edit-workflow-template'
,
...
...
@@ -51,18 +51,20 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
showLoader
=
false
;
editMode
=
false
;
displayNewMessageTemplate
=
false
;
draggingItem
:
any
=
null
;
draggingId
=
null
;
selectedTemplateID
=
null
;
selectedMessageTemplate
=
null
;
// object id of type WorkflowMessageModel
constructor
(
private
router
:
Router
,
private
activatedRoute
:
ActivatedRoute
,
private
utilsService
:
UtilsService
,
private
saveService
:
SaveService
,
private
appService
:
AppService
,
private
editWorkflowTemplateService
:
EditWorkflowTemplateService
,
private
adminPortalLayoutService
:
AdminPortalLayoutService
,
private
confirmationService
:
ConfirmationService
private
router
:
Router
,
private
activatedRoute
:
ActivatedRoute
,
private
utilsService
:
UtilsService
,
private
saveService
:
SaveService
,
private
appService
:
AppService
,
private
editWorkflowTemplateService
:
EditWorkflowTemplateService
,
private
adminPortalLayoutService
:
AdminPortalLayoutService
,
private
confirmationService
:
ConfirmationService
)
{
super
(
utilsService
);
}
...
...
@@ -73,53 +75,53 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
this
.
initComponent
();
}
else
{
this
.
subscriptions
.
push
(
this
.
adminPortalLayoutService
.
userDataUpdated
.
first
()
.
subscribe
(()
=>
{
this
.
initComponent
();
}));
.
first
()
.
subscribe
(()
=>
{
this
.
initComponent
();
}));
}
}
initComponent
():
void
{
this
.
subscriptions
.
push
(
this
.
activatedRoute
.
params
.
subscribe
((
params
:
Params
)
=>
{
if
(
params
.
id
&&
params
.
id
!==
'0'
)
{
this
.
editMode
=
true
;
}
.
subscribe
((
params
:
Params
)
=>
{
if
(
params
.
id
&&
params
.
id
!==
'0'
)
{
this
.
editMode
=
true
;
}
this
.
subscriptions
.
push
(
combineLatest
(
this
.
appService
.
getTypes
(
'StageTypes'
),
this
.
appService
.
getTypes
(
'StepTypes'
,
true
,
'Please Select'
),
this
.
appService
.
getTypes
(
'ResponseActions'
),
this
.
appService
.
getTypes
(
'ApplicantSources'
)
)
.
subscribe
(
response
=>
{
this
.
stageTypes
=
response
[
0
];
this
.
stepTypeOptions
=
response
[
1
];
if
(
!
this
.
adminPortalLayoutService
.
getHiringTeamID
().
HasDiversity
)
{
this
.
stepTypeOptions
=
this
.
stepTypeOptions
.
filter
(
type
=>
type
.
Value
!==
'DIVERSITY'
);
}
this
.
responseActions
=
response
[
2
];
this
.
applicantSources
=
response
[
3
];
if
(
params
.
id
&&
params
.
id
!==
'0'
)
{
this
.
getWorkflowTemplateByID
(
params
.
id
);
this
.
stepTypes
=
[...
this
.
stepTypeOptions
];
}
else
{
this
.
utilsService
.
createObject
(
this
.
workflow
,
this
.
createdObjs
);
this
.
setDefaults
();
this
.
addDefaultStages
();
this
.
stepTypes
=
[...
this
.
stepTypeOptions
];
this
.
showLoader
=
false
;
}
})
);
}));
this
.
subscriptions
.
push
(
combineLatest
(
this
.
appService
.
getTypes
(
'StageTypes'
),
this
.
appService
.
getTypes
(
'StepTypes'
,
true
,
'Please Select'
),
this
.
appService
.
getTypes
(
'ResponseActions'
),
this
.
appService
.
getTypes
(
'ApplicantSources'
)
)
.
subscribe
(
response
=>
{
this
.
stageTypes
=
response
[
0
];
this
.
stepTypeOptions
=
response
[
1
];
if
(
!
this
.
adminPortalLayoutService
.
getHiringTeamID
().
HasDiversity
)
{
this
.
stepTypeOptions
=
this
.
stepTypeOptions
.
filter
(
type
=>
type
.
Value
!==
'DIVERSITY'
);
}
this
.
responseActions
=
response
[
2
];
this
.
applicantSources
=
response
[
3
];
if
(
params
.
id
&&
params
.
id
!==
'0'
)
{
this
.
getWorkflowTemplateByID
(
params
.
id
);
this
.
stepTypes
=
[...
this
.
stepTypeOptions
];
}
else
{
this
.
utilsService
.
createObject
(
this
.
workflow
,
this
.
createdObjs
);
this
.
setDefaults
();
this
.
addDefaultStages
();
this
.
stepTypes
=
[...
this
.
stepTypeOptions
];
this
.
showLoader
=
false
;
}
})
);
}));
this
.
getMessageTemplates
();
}
...
...
@@ -142,7 +144,7 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
this
.
stageTypes
.
forEach
(
stage
=>
{
const
index
=
(
!
stage
.
IsPostStage
&&
!
stage
.
IsPreStage
)
?
topIndex
++
:
-
1
;
const
stageObject
=
new
WorkflowStageModel
(
`
${
stage
.
Description
}
Stage`
,
false
,
stage
,
index
,
false
,
this
.
workflow
.
ObjectID
);
false
,
this
.
workflow
.
ObjectID
);
this
.
utilsService
.
addMultiRefObject
(
stageObject
,
this
.
workflow
,
'WorkFlowStages'
,
this
.
createdObjs
);
});
this
.
reOrderStages
();
...
...
@@ -150,10 +152,16 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
reOrderStages
():
void
{
this
.
workflow
.
WorkFlowStages
.
sort
((
a
,
b
)
=>
a
.
SortOrder
<
b
.
SortOrder
?
-
1
:
a
.
SortOrder
>
b
.
SortOrder
?
1
:
0
);
.
sort
((
a
,
b
)
=>
a
.
SortOrder
<
b
.
SortOrder
?
-
1
:
a
.
SortOrder
>
b
.
SortOrder
?
1
:
0
);
this
.
filterStages
();
}
reOrderSteps
():
void
{
this
.
workflow
.
WorkFlowStages
.
forEach
(
stage
=>
{
stage
.
Steps
.
sort
((
a
,
b
)
=>
a
.
SortOrder
<
b
.
SortOrder
?
-
1
:
a
.
SortOrder
>
b
.
SortOrder
?
1
:
0
);
});
}
isGeneric
(
stage
:
WorkflowStageModel
):
boolean
{
return
!
stage
.
StageType
.
IsPostStage
&&
!
stage
.
StageType
.
IsPreStage
;
}
...
...
@@ -162,20 +170,23 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
this
.
preStages
=
this
.
filteredStages
(
true
,
false
);
this
.
genericStages
=
this
.
filteredStages
(
false
,
false
)
.
sort
((
a
,
b
)
=>
a
.
SortOrder
>
b
.
SortOrder
?
-
1
:
a
.
SortOrder
<
b
.
SortOrder
?
1
:
0
);
.
sort
((
a
,
b
)
=>
a
.
SortOrder
>
b
.
SortOrder
?
-
1
:
a
.
SortOrder
<
b
.
SortOrder
?
1
:
0
);
this
.
postStages
=
this
.
filteredStages
(
false
,
true
);
}
showSaveBtn
():
boolean
{
return
this
.
workflow
&&
this
.
workflow
.
ObjectID
?
(
this
.
workflow
.
HiringTeam
===
this
.
adminPortalLayoutService
.
getHiringTeamID
().
ObjectID
||
!
this
.
editMode
)
:
false
;
(
this
.
workflow
.
HiringTeam
===
this
.
adminPortalLayoutService
.
getHiringTeamID
().
ObjectID
||
!
this
.
editMode
)
:
false
;
}
showSaveCopyBtn
():
boolean
{
return
this
.
workflow
&&
this
.
workflow
.
ObjectID
?
(
!!
this
.
workflow
.
HiringTeam
)
:
false
;
if
(
this
.
workflow
&&
this
.
workflow
.
ObjectID
)
{
return
this
.
workflow
.
HiringTeam
===
null
;
}
return
false
;
}
getStageHeader
(
stage
:
WorkflowStageModel
):
string
{
...
...
@@ -188,17 +199,17 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
filteredStages
(
isPreStage
:
boolean
,
isPostStage
:
boolean
):
Array
<
WorkflowStageModel
>
{
if
(
isPreStage
)
{
return
this
.
workflow
.
WorkFlowStages
.
filter
(
stage
=>
stage
.
StageType
.
IsPreStage
)
return
this
.
workflow
.
WorkFlowStages
.
filter
(
stage
=>
stage
.
StageType
.
IsPreStage
)
;
}
else
if
(
isPostStage
)
{
return
this
.
workflow
.
WorkFlowStages
.
filter
(
stage
=>
stage
.
StageType
.
IsPostStage
)
return
this
.
workflow
.
WorkFlowStages
.
filter
(
stage
=>
stage
.
StageType
.
IsPostStage
)
;
}
else
{
return
this
.
workflow
.
WorkFlowStages
.
filter
(
stage
=>
!
stage
.
StageType
.
IsPreStage
&&
!
stage
.
StageType
.
IsPostStage
)
return
this
.
workflow
.
WorkFlowStages
.
filter
(
stage
=>
!
stage
.
StageType
.
IsPreStage
&&
!
stage
.
StageType
.
IsPostStage
)
;
}
}
emailResponseSelected
():
boolean
{
return
this
.
workflow
.
ApplicationResponseAction
&&
this
.
workflow
.
ApplicationResponseAction
.
Value
===
'EMAIL_RESPONSE'
;
this
.
workflow
.
ApplicationResponseAction
.
Value
===
'EMAIL_RESPONSE'
;
}
sortWorkFlowMessage
():
void
{
...
...
@@ -224,10 +235,10 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
setTimeout
(()
=>
{
try
{
document
.
getElementById
(
`
${
fieldName
}
Id`
)
.
focus
();
.
focus
();
document
.
getElementById
(
`
${
fieldName
}
Id`
)
.
getElementsByTagName
(
'input'
)[
0
]
.
focus
();
.
getElementsByTagName
(
'input'
)[
0
]
.
focus
();
}
catch
(
e
)
{
// ignore this.
}
...
...
@@ -236,8 +247,13 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
}
generateDelayString
(
message
:
WorkflowMessageModel
):
void
{
if
(
!
message
.
Delay
)
{
return
;
}
const
delay
=
message
.
Delay
.
replace
(
/_/g
,
''
)
.
split
(
':'
);
.
split
(
':'
);
delay
[
0
]
=
delay
[
0
]
||
''
;
delay
[
1
]
=
delay
[
1
]
||
''
;
...
...
@@ -268,25 +284,25 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
};
this
.
subscriptions
.
push
(
combineLatest
(
this
.
editWorkflowTemplateService
.
getMessageTemplates
([],
myMsgParams
),
this
.
editWorkflowTemplateService
.
getMessageTemplates
([],
sharedMsgParams
)
combineLatest
(
this
.
editWorkflowTemplateService
.
getMessageTemplates
([],
myMsgParams
),
this
.
editWorkflowTemplateService
.
getMessageTemplates
([],
sharedMsgParams
)
)
.
subscribe
(
(
response
:
[
Array
<
MessageTemplateModel
>
,
Array
<
MessageTemplateModel
>
])
=>
{
const
myTemplates
=
response
[
0
].
filter
(
message
=>
message
.
HiringTeam
===
this
.
adminPortalLayoutService
.
getHiringTeamID
().
ObjectID
);
this
.
messageTemplates
=
[...
myTemplates
,
...
response
[
1
]];
this
.
addNewOptionToMessageTemplate
();
if
(
callback
)
{
// called when a new message template is created
callback
();
}
},
error
=>
{
this
.
utilsService
.
handleError
(
error
);
}
)
.
subscribe
(
(
response
:
[
Array
<
MessageTemplateModel
>
,
Array
<
MessageTemplateModel
>
])
=>
{
const
myTemplates
=
response
[
0
].
filter
(
message
=>
message
.
HiringTeam
===
this
.
adminPortalLayoutService
.
getHiringTeamID
().
ObjectID
);
this
.
messageTemplates
=
[...
myTemplates
,
...
response
[
1
]];
this
.
addNewOptionToMessageTemplate
();
if
(
callback
)
{
// called when a new message template is created
callback
();
}
},
error
=>
{
this
.
utilsService
.
handleError
(
error
);
}
)
);
}
...
...
@@ -328,7 +344,7 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
if
(
found
)
{
this
.
workflow
.
WorkFlowStages
.
forEach
(
wfStage
=>
{
const
messageTemplate
=
wfStage
.
WorkFlowMessages
.
find
(
wfMessage
=>
wfMessage
.
ObjectID
===
this
.
selectedMessageTemplate
);
this
.
selectedMessageTemplate
);
if
(
messageTemplate
)
{
messageTemplate
.
MessageTemplate
=
found
;
}
...
...
@@ -355,10 +371,19 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
}
removeStep
(
step
:
WorkflowStepModel
,
stage
:
WorkflowStageModel
):
void
{
const
stepType
=
step
.
StepType
;
this
.
utilsService
.
removeMultiRefObject
(
step
,
stage
,
'Steps'
,
this
.
createdObjs
,
this
.
updatedObjs
,
this
.
deletedObjs
);
this
.
reAssignStepOrders
(
stage
);
this
.
addStepType
(
stepType
);
this
.
confirmationService
.
confirm
({
message
:
'Are you sure you want to delete this record?'
,
header
:
'Delete Confirmation'
,
icon
:
'fa fa-trash'
,
key
:
'RemoveRow'
,
accept
:
()
=>
{
const
stepType
=
step
.
StepType
;
this
.
utilsService
.
removeMultiRefObject
(
step
,
stage
,
'Steps'
,
this
.
createdObjs
,
this
.
updatedObjs
,
this
.
deletedObjs
);
this
.
reAssignStepOrders
(
stage
);
this
.
addStepType
(
stepType
);
}
});
}
removeStepType
(
step
:
StepTypeEnum
):
void
{
...
...
@@ -389,7 +414,7 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
key
:
'RemoveRow'
,
accept
:
()
=>
{
this
.
utilsService
.
removeMultiRefObject
(
message
,
stage
,
'WorkFlowMessages'
,
this
.
createdObjs
,
this
.
updatedObjs
,
this
.
deletedObjs
);
this
.
updatedObjs
,
this
.
deletedObjs
);
}
});
}
...
...
@@ -397,7 +422,7 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
addStage
():
void
{
const
stageType
=
this
.
stageTypes
.
find
(
type
=>
!
type
.
IsPreStage
&&
!
type
.
IsPostStage
);
const
stage
=
new
WorkflowStageModel
(
`
${
stageType
.
Description
}
Stage`
,
false
,
stageType
,
this
.
getStageOrder
(),
false
,
this
.
workflow
.
ObjectID
);
false
,
this
.
workflow
.
ObjectID
);
this
.
utilsService
.
addMultiRefObject
(
stage
,
this
.
workflow
,
'WorkFlowStages'
,
this
.
createdObjs
);
this
.
reOrderStages
();
}
...
...
@@ -411,7 +436,7 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
accept
:
()
=>
{
if
(
this
.
isGeneric
(
stage
))
{
const
decrement
=
this
.
workflow
.
WorkFlowStages
.
filter
(
stg
=>
this
.
isGeneric
(
stg
))
.
length
-
stage
.
SortOrder
;
.
length
-
stage
.
SortOrder
;
if
(
decrement
>
0
)
{
this
.
workflow
.
WorkFlowStages
.
map
(
stg
=>
{
if
(
this
.
isGeneric
(
stg
)
&&
stg
.
SortOrder
>
decrement
)
{
...
...
@@ -422,15 +447,15 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
this
.
reOrderStages
();
}
this
.
utilsService
.
removeMultiRefObject
(
stage
,
this
.
workflow
,
'WorkFlowStages'
,
this
.
createdObjs
,
this
.
updatedObjs
,
this
.
deletedObjs
);
this
.
updatedObjs
,
this
.
deletedObjs
);
}
});
}
getStageOrder
():
number
{
return
this
.
workflow
&&
this
.
workflow
.
WorkFlowStages
?
(
this
.
workflow
.
WorkFlowStages
.
filter
(
stage
=>
this
.
isGeneric
(
stage
))
.
length
+
1
this
.
workflow
.
WorkFlowStages
.
filter
(
stage
=>
this
.
isGeneric
(
stage
))
.
length
+
1
)
:
0
;
}
...
...
@@ -451,46 +476,46 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
[
ASSOCS
.
WORKFLOW_STAGE
,
ASSOCS
.
WORKFLOW_STEP
].
join
(
'.'
)];
this
.
subscriptions
.
push
(
this
.
editWorkflowTemplateService
.
getWorkflowTemplateByID
(
id
,
assoc
)
.
subscribe
(
data
=>
{
this
.
workflow
=
data
;
this
.
updatedObjs
[
this
.
workflow
.
ObjectID
]
=
this
.
workflow
;
this
.
utilsService
.
addObjsToJSONByObjectID
(
this
.
updatedObjs
,
this
.
workflow
.
WorkFlowStages
);
this
.
workflow
.
WorkFlowStages
=
this
.
workflow
.
WorkFlowStages
||
[];
this
.
workflow
.
WorkFlowStages
.
forEach
(
stage
=>
{
this
.
updatedObjs
[
stage
.
ObjectID
]
=
stage
stage
.
Steps
=
stage
.
Steps
||
[];
stage
.
WorkFlowMessages
=
stage
.
WorkFlowMessages
||
[];
stage
.
WorkFlowMessages
.
forEach
(
msg
=>
{
this
.
generateDelayString
(
msg
)
});
.
subscribe
(
data
=>
{
this
.
workflow
=
data
;
this
.
updatedObjs
[
this
.
workflow
.
ObjectID
]
=
this
.
workflow
;
this
.
utilsService
.
addObjsToJSONByObjectID
(
this
.
updatedObjs
,
this
.
workflow
.
WorkFlowStages
);
this
.
workflow
.
WorkFlowStages
=
this
.
workflow
.
WorkFlowStages
||
[];
this
.
workflow
.
WorkFlowStages
.
forEach
(
stage
=>
{
this
.
updatedObjs
[
stage
.
ObjectID
]
=
stage
;
stage
.
Steps
=
stage
.
Steps
||
[];
stage
.
WorkFlowMessages
=
stage
.
WorkFlowMessages
||
[];
stage
.
WorkFlowMessages
.
forEach
(
msg
=>
{
this
.
generateDelayString
(
msg
);
});
stage
.
Steps
.
forEach
(
step
=>
{
this
.
removeStepType
(
step
.
StepType
);
})
stage
.
Steps
.
forEach
(
step
=>
{
this
.
removeStepType
(
step
.
StepType
);
});
this
.
utilsService
.
addObjsToJSONByObjectID
(
this
.
updatedObjs
,
stage
.
WorkFlowMessages
);
this
.
utilsService
.
addObjsToJSONByObjectID
(
this
.
updatedObjs
,
stage
.
Steps
);
this
.
utilsService
.
addObjsToJSONByObjectID
(
this
.
updatedObjs
,
stage
.
WorkFlowMessages
);
this
.
utilsService
.
addObjsToJSONByObjectID
(
this
.
updatedObjs
,
stage
.
Steps
);
});
});
this
.
reOrderStages
();
this
.
showLoader
=
false
;
},
error
=>
{
this
.
showLoader
=
false
;
this
.
utilsService
.
handleError
(
error
);
}
)
this
.
reOrderStages
();
this
.
reOrderSteps
();
this
.
showLoader
=
false
;
},
error
=>
{
this
.
showLoader
=
false
;
this
.
utilsService
.
handleError
(
error
);
}
)
);
}
getMessageClass
(
message
:
MessageTemplateModel
):
string
{
return
message
.
TemplateType
?
`ui-icon-
${
message
.
TemplateType
.
Value
.
toLowerCase
()}
`
:
'ui-icon-sms'
;
'ui-icon-sms'
;
}
saveWorkflowTemplate
(
saveCopy
=
false
,
testing
=
true
):
void
{
...
...
@@ -502,29 +527,25 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
}
else
{
this
.
showLoader
=
true
;
this
.
subscriptions
.
push
(
this
.
saveService
.
saveObjects
(
service
,
this
.
createdObjs
,
this
.
updatedObjs
,
this
.
deletedObjs
)
.
subscribe
(
()
=>
{
this
.
utilsService
.
handleSuccess
();
this
.
router
.
navigate
([
'/admin/list-workflow-templates'
]);
},
error
=>
{
this
.
showLoader
=
false
;
this
.
utilsService
.
handleError
(
error
);
}
)
.
subscribe
(
()
=>
{
this
.
utilsService
.
handleSuccess
();
this
.
router
.
navigate
([
'/admin/list-workflow-templates'
]);
},
error
=>
{
this
.
showLoader
=
false
;
this
.
utilsService
.
handleError
(
error
);
}
)
);
}
}
onDragStart
(
item
,
list
,
listId
):
void
{
this
.
draggingItem
=
list
.
find
(
listItem
=>
listItem
.
ObjectID
===
item
.
ObjectID
);
this
.
draggingId
=
listId
;
}
draggingItem
:
any
=
null
;
draggingId
=
null
;
onDragEnd
(
event
):
void
{
setTimeout
(()
=>
{
this
.
draggingItem
=
null
;
...
...
@@ -532,13 +553,13 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
});
}
onDrop
(
event
:
DndDropEvent
,
list
?:
any
[]
,
draggingId
?:
any
):
void
{
onDrop
(
event
:
DndDropEvent
,
list
?:
Array
<
any
>
,
draggingId
?:
any
):
void
{
if
(
draggingId
!==
this
.
draggingId
)
{
return
;
}
let
index
=
event
.
index
;
if
(
typeof
index
===
"undefined"
)
{
if
(
typeof
index
===
'undefined'
)
{
index
=
list
.
length
;
}
...
...
@@ -553,10 +574,9 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
list
.
splice
(
index
,
0
,
this
.
draggingItem
);
}
list
.
forEach
((
item
,
index
)
=>
{
item
.
SortOrder
=
index
;
})
list
.
forEach
((
item
,
i
)
=>
{
item
.
SortOrder
=
i
;
});
}
// tslint:disable-next-line:max-file-line-count
...
...
frontend/angular/src/assets/css/custom.scss
View file @
6db877d0
...
...
@@ -108,6 +108,16 @@
/* End listing of message and workflow template styling */
/* Panel Styling */
.messaging
{
.ui-panel
{
.ui-panel-content
{
padding-left
:
0
!
important
;
padding-right
:
0
!
important
;
}
}
}
.ui-panel
{
margin-right
:
auto
;
margin-left
:
auto
;
...
...
@@ -202,6 +212,16 @@
}
}
/* End styling select button*/
.ui-multiselect
{
border-bottom
:
0
!
important
;
}
.dropdown-text
{
width
:
75%
!
important
;
}
.h-80
{
height
:
80px
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment