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
c69ab081
Commit
c69ab081
authored
Nov 23, 2019
by
GD-A-150752
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
edit-workflow-template
parent
94fda9f2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
168 additions
and
23 deletions
+168
-23
app.module.ts
frontend/angular/src/app/app.module.ts
+9
-2
edit-message-template.component.ts
.../edit-message-template/edit-message-template.component.ts
+5
-1
edit-workflow-template.component.html
...t-workflow-template/edit-workflow-template.component.html
+0
-0
edit-workflow-template.component.ts
...dit-workflow-template/edit-workflow-template.component.ts
+42
-19
applicantSources.enum.ts
frontend/angular/src/app/models/applicantSources.enum.ts
+6
-0
workflowMessage.model.ts
frontend/angular/src/app/models/workflowMessage.model.ts
+4
-1
custom.scss
frontend/angular/src/assets/css/custom.scss
+102
-0
No files found.
frontend/angular/src/app/app.module.ts
View file @
c69ab081
...
...
@@ -4,7 +4,13 @@ import { Select2Module } from 'ng2-select2';
import
{
BsDropdownModule
}
from
'ngx-bootstrap/dropdown'
;
import
{
ModalModule
}
from
'ngx-bootstrap/modal'
;
import
{
DeviceDetectorModule
}
from
'ngx-device-detector'
;
import
{
ConfirmationService
,
DragDropModule
,
InputMaskModule
,
OrderListModule
}
from
'primeng/primeng'
;
import
{
ConfirmationService
,
DragDropModule
,
InputMaskModule
,
MultiSelectModule
,
OrderListModule
}
from
'primeng/primeng'
;
import
{
AppComponent
}
from
'./app.component'
;
import
{
AppRoutingModule
}
from
'./app.routing'
;
import
{
AppService
}
from
'./app.service'
;
...
...
@@ -33,7 +39,8 @@ import { OneITModule } from './oneit/oneit.module';
BsDropdownModule
.
forRoot
(),
InputMaskModule
,
DragDropModule
,
OrderListModule
OrderListModule
,
MultiSelectModule
],
declarations
:
[
AppComponent
,
...
...
frontend/angular/src/app/components/edit-message-template/edit-message-template.component.ts
View file @
c69ab081
...
...
@@ -130,7 +130,7 @@ export class EditMessageTemplateComponent extends BaseComponent implements OnIni
showSaveIntoAllTemplates
():
boolean
{
return
!!
this
.
messageTemplate
&&
!!
this
.
messageTemplate
.
ObjectID
&&
(
!
this
.
alreadyExists
()
&&
!
this
.
messageTemplate
.
IsSystemGenerated
&&
!!
this
.
objectID
);
(
!
this
.
messageTemplate
.
IsSystemGenerated
&&
!!
this
.
objectID
&&
this
.
editMode
);
}
showSaveCopyBtn
():
boolean
{
...
...
@@ -146,6 +146,10 @@ export class EditMessageTemplateComponent extends BaseComponent implements OnIni
editElement
=
this
.
messageContentEditor
.
getQuill
().
container
;
if
(
editElement
)
{
const
editor
=
editElement
.
getElementsByClassName
(
'ql-editor'
);
if
(
editor
[
0
])
{
editor
[
0
].
classList
.
add
(
'form-control'
);
}
[
'keyup'
,
'click'
].
forEach
(
event
=>
{
editElement
.
addEventListener
(
event
,
()
=>
{
this
.
contentCursorPoint
=
this
.
messageContentEditor
.
getQuill
()
...
...
frontend/angular/src/app/components/edit-workflow-template/edit-workflow-template.component.html
View file @
c69ab081
This diff is collapsed.
Click to expand it.
frontend/angular/src/app/components/edit-workflow-template/edit-workflow-template.component.ts
View file @
c69ab081
...
...
@@ -7,6 +7,7 @@ import { combineLatest } from 'rxjs/observable/combineLatest';
import
{
Subscription
}
from
'rxjs/Subscription'
;
import
{
AppService
}
from
'../../app.service'
;
import
{
ASSOCS
,
SERVICES
}
from
'../../constants'
;
import
{
ApplicantSourcesEnum
}
from
'../../models/applicantSources.enum'
;
import
{
MessageTemplateModel
}
from
'../../models/messageTemplate.model'
;
import
{
ResponseActionEnum
}
from
'../../models/responseAction.enum'
;
import
{
StageTypeEnum
}
from
'../../models/stageType.enum'
;
...
...
@@ -43,6 +44,7 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
stepTypeOptions
:
Array
<
StepTypeEnum
>
;
stepTypes
:
Array
<
StepTypeEnum
>
;
responseActions
:
Array
<
ResponseActionEnum
>
;
applicantSources
:
Array
<
ApplicantSourcesEnum
>
;
messageTemplates
:
Array
<
MessageTemplateModel
>
=
[];
editField
:
any
=
{};
showLoader
=
false
;
...
...
@@ -93,8 +95,9 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
this
.
subscriptions
.
push
(
combineLatest
(
this
.
appService
.
getTypes
(
'StageTypes'
),
this
.
appService
.
getTypes
(
'StepTypes'
,
true
,
'Add Step'
),
this
.
appService
.
getTypes
(
'ResponseActions'
)
this
.
appService
.
getTypes
(
'StepTypes'
,
true
,
'Please Select'
),
this
.
appService
.
getTypes
(
'ResponseActions'
),
this
.
appService
.
getTypes
(
'ApplicantSources'
)
)
.
subscribe
(
response
=>
{
...
...
@@ -110,6 +113,8 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
}
this
.
responseActions
=
response
[
2
];
this
.
applicantSources
=
response
[
3
];
if
(
params
.
id
&&
params
.
id
!==
'0'
)
{
this
.
editMode
=
true
;
this
.
getWorkflowTemplateByID
(
params
.
id
);
...
...
@@ -119,9 +124,9 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
this
.
setDefaults
();
this
.
addDefaultStages
();
this
.
stepTypes
=
[...
this
.
stepTypeOptions
];
this
.
showLogs
();
this
.
showLoader
=
false
;
}
})
);
}
...
...
@@ -228,7 +233,7 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
if
(
!
message
.
Delay
||
message
.
Delay
===
''
)
{
return
false
;
}
else
{
return
this
.
editField
?
(
this
.
editField
[
id
]
?
this
.
editField
[
id
]
:
false
)
:
false
;
return
this
.
editField
?
!
this
.
editField
[
id
]
:
false
;
}
}
...
...
@@ -247,6 +252,16 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
this
.
workflow
.
ApplicationResponseAction
.
Value
===
'EMAIL_RESPONSE'
;
}
sortWorkFlowMessage
():
void
{
if
(
this
.
workflow
&&
this
.
workflow
.
WorkFlowStages
)
{
this
.
workflow
.
WorkFlowStages
.
forEach
(
stage
=>
{
if
(
stage
&&
stage
.
WorkFlowMessages
)
{
stage
.
WorkFlowMessages
.
sort
((
a
,
b
)
=>
a
.
DelayMinutes
-
b
.
DelayMinutes
);
}
});
}
}
showInput
(
id
:
string
):
boolean
{
return
this
.
editField
&&
!!
this
.
editField
[
id
];
}
...
...
@@ -309,9 +324,10 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
if
(
!
message
.
Delay
||
message
.
Delay
===
''
)
{
return
;
}
if
(
!
this
.
form
.
controls
[
fieldName
].
invalid
)
{
this
.
editField
[
fieldName
]
=
false
;
this
.
generateDelayString
(
message
);
this
.
sortWorkFlowMessage
();
}
else
{
this
.
utilsService
.
showAllErrorMessages
();
}
...
...
@@ -331,6 +347,26 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
}
}
generateDelayString
(
message
:
WorkflowMessageModel
):
void
{
const
delay
=
message
.
Delay
.
replace
(
/_/g
,
''
)
.
split
(
':'
);
delay
[
0
]
=
delay
[
0
]
||
''
;
delay
[
1
]
=
delay
[
1
]
||
''
;
delay
[
2
]
=
delay
[
2
]
||
''
;
if
(
delay
[
1
]
===
''
&&
delay
[
2
]
===
''
)
{
message
.
DelayString
=
`
${
delay
[
0
]}
m`
;
message
.
DelayMinutes
=
parseInt
(
delay
[
0
],
10
);
}
else
if
(
delay
[
2
]
===
''
)
{
message
.
DelayString
=
`
${
delay
[
0
]}
h:
${
delay
[
1
]}
m`
;
message
.
DelayMinutes
=
parseInt
(
delay
[
0
],
10
)
*
60
+
parseInt
(
delay
[
1
],
10
);
}
else
{
message
.
DelayString
=
`
${
delay
[
0
]}
d:
${
delay
[
1
]}
h:
${
delay
[
2
]}
m`
;
message
.
DelayMinutes
=
parseInt
(
delay
[
0
],
10
)
*
24
*
60
+
parseInt
(
delay
[
1
],
10
)
*
60
+
parseInt
(
delay
[
1
],
10
);
}
}
getMessageTemplates
(
callback
=
null
):
void
{
const
sharedMsgParams
=
{
OnlyGlobalTemplate
:
true
,
...
...
@@ -478,6 +514,7 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
addMessage
(
stage
:
WorkflowStageModel
):
void
{
const
message
=
new
WorkflowMessageModel
(
stage
.
ObjectID
);
message
.
ApplicantSources
=
this
.
utilsService
.
cloneObject
(
this
.
applicantSources
);
this
.
utilsService
.
addMultiRefObject
(
message
,
stage
,
'WorkFlowMessages'
,
this
.
createdObjs
);
}
...
...
@@ -567,7 +604,6 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
}
});
this
.
reOrderStages
(
this
.
filterStages
(
true
,
true
,
true
));
this
.
showLogs
();
this
.
showLoader
=
false
;
},
error
=>
{
...
...
@@ -587,12 +623,6 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
this
.
utilsService
.
clearErrorMessages
();
const
service
=
`svc/
${
saveCopy
?
SERVICES
.
SAVE_MESSAGE_AS_COPY
:
SERVICES
.
SAVE
}
`
;
if
(
testing
)
{
this
.
showLogs
();
return
;
}
if
(
this
.
form
.
invalid
)
{
this
.
utilsService
.
showAllErrorMessages
();
}
else
{
...
...
@@ -612,13 +642,6 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
}
}
showLogs
():
void
{
console
.
log
(
this
.
workflow
);
console
.
log
(
this
.
createdObjs
);
console
.
log
(
this
.
updatedObjs
);
console
.
log
(
this
.
deletedObjs
);
}
alreadyExists
():
boolean
{
return
Object
.
keys
(
this
.
createdObjs
).
length
>
0
||
Object
.
keys
(
this
.
updatedObjs
).
length
>
0
;
}
...
...
frontend/angular/src/app/models/applicantSources.enum.ts
0 → 100644
View file @
c69ab081
export
class
ApplicantSourcesEnum
{
Name
:
string
;
Value
:
string
;
Description
:
string
;
Disabled
:
boolean
;
}
frontend/angular/src/app/models/workflowMessage.model.ts
View file @
c69ab081
import
{
CLASSES
}
from
'../constants'
;
import
{
MessageTemplateModel
}
from
'./messageTemplate.model'
;
import
{
ApplicantSourcesEnum
}
from
'./applicantSources.enum'
;
export
class
WorkflowMessageModel
{
ObjectID
:
string
;
ObjectClass
=
CLASSES
.
WORKFLOW_MESSAGE
;
Delay
:
string
;
DelayString
:
string
;
DelayMinutes
:
number
;
Variance
:
string
;
BusinessHoursOnly
:
boolean
;
IsWithdrawalMessage
:
boolean
;
ApplicantSources
:
any
;
ApplicantSources
:
Array
<
ApplicantSourcesEnum
>
;
MessageTemplate
:
MessageTemplateModel
|
string
;
WorkFlowStage
:
string
;
...
...
frontend/angular/src/assets/css/custom.scss
View file @
c69ab081
...
...
@@ -49,6 +49,10 @@
padding-bottom
:
0
!
important
;
}
.mb-0
{
margin-bottom
:
0
!
important
;
}
.mt-80
{
margin-top
:
80px
;
}
...
...
@@ -61,6 +65,10 @@
border
:
0
!
important
;
}
.h-60
{
height
:
60px
;
}
.bg-grey
{
background-color
:
#e9ecef
;
}
...
...
@@ -98,3 +106,97 @@
}
/* End listing of message and workflow template styling */
/* Panel Styling */
.ui-panel
{
margin-right
:
auto
;
margin-left
:
auto
;
.ui-panel-titlebar
{
height
:
90px
;
border-radius
:
5px
5px
0
0
!
important
;
padding
:
2em
1em
!
important
;
background-color
:
#4E5258
;
align-items
:
center
;
border-bottom
:
0
!
important
;
width
:
100%
;
.ui-panel-title
{
color
:
#FFFFFF
;
font-size
:
20px
;
padding-left
:
40px
;
}
}
.ui-panel-content
{
background-color
:
#F5F7F8
;
padding
:
65px
10
.5%
!
important
;
}
}
/* End panel styling */
/* Overriding switch input styles */
.ui-inputswitch-slider
:before
{
height
:
17px
!
important
;
width
:
17px
!
important
;
left
:
3px
!
important
;
background
:
white
;
}
.ui-inputswitch
{
height
:
22px
!
important
;
width
:
40px
!
important
!
important
;
border-color
:
#667281
!
important
;
background-color
:
#667281
!
important
;
border-radius
:
34px
!
important
;
&
.ui-inputswitch-checked
{
background-color
:
#67b413
!
important
;
border-color
:
#67b413
!
important
;
.ui-inputswitch-slider
:before
{
transform
:
translateX
(
0
.8em
);
}
}
}
/* End styling switchInput */
/* styling selectButton */
.ui-selectbutton
{
border
:
solid
1px
#dbdbdf
;
border-radius
:
50px
!
important
;
width
:
100%
;
display
:
flex
;
flex
:
1
1
auto
;
.ui-button
{
width
:
100%
;
border-left
:
solid
1px
#dbdbdf
;
background
:
#ffffff
!
important
;
&
:first-child
{
border-top-left-radius
:
50px
;
border-bottom-left-radius
:
50px
;
}
&
:last-child
{
border-top-right-radius
:
50px
;
border-bottom-right-radius
:
50px
;
}
&
.ui-state-active
{
span
{
color
:
#ffffff
;
}
}
span
{
color
:
#d14b5d
;
font-size
:
12px
;
margin-top
:
4px
;
}
}
}
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