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
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
69 additions
and
22 deletions
+69
-22
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
+0
-0
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
+40
-20
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 @@
...
@@ -4,7 +4,7 @@
<div
class=
"ui-g ui-fluid"
>
<div
class=
"ui-g ui-fluid"
>
<div
class=
"page-title mb-0"
>
<div
class=
"page-title mb-0"
>
<a
[
routerLink
]="['/
admin
/
list-message-templates
']"
class=
"arrow-btn-blue ml-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>
</a>
{{editMode ? "Edit" : "Add"}} Message Template
{{editMode ? "Edit" : "Add"}} Message Template
</div>
</div>
...
...
frontend/angular/src/app/components/edit-workflow-template/edit-workflow-template.component.html
View file @
6db877d0
This diff is collapsed.
Click to expand it.
frontend/angular/src/app/components/edit-workflow-template/edit-workflow-template.component.scss
View file @
6db877d0
...
@@ -69,16 +69,23 @@ p-inputMask {
...
@@ -69,16 +69,23 @@ p-inputMask {
}
}
.ml-0
{
.ml-0
{
margin-left
:
0
px
;
margin-left
:
0
;
}
}
.templateName
{
.templateName
{
font-size
:
24px
;
font-size
:
24px
;
}
}
.interactive
{
cursor
:
pointer
;
}
label
{
label
{
font-family
:
"Usual-Regular"
;
font-family
:
"Usual-Regular"
;
font-weight
:
300
;
font-weight
:
300
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
white-space
:
nowrap
;
}
}
.calcField
{
.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
{
Component
,
OnInit
,
ViewChild
}
from
'@angular/core'
;
import
{
NgForm
}
from
'@angular/forms'
;
import
{
NgForm
}
from
'@angular/forms'
;
import
{
ActivatedRoute
,
Params
,
Router
}
from
'@angular/router'
;
import
{
ActivatedRoute
,
Params
,
Router
}
from
'@angular/router'
;
import
{
DndDropEvent
}
from
'ngx-drag-drop'
;
import
{
ConfirmationService
}
from
'primeng/api'
;
import
{
ConfirmationService
}
from
'primeng/api'
;
import
{
Dialog
}
from
'primeng/dialog'
;
import
{
Dialog
}
from
'primeng/dialog'
;
import
{
combineLatest
}
from
'rxjs/observable/combineLatest'
;
import
{
combineLatest
}
from
'rxjs/observable/combineLatest'
;
...
@@ -21,7 +22,6 @@ import { UtilsService } from '../../oneit/services/utils.service';
...
@@ -21,7 +22,6 @@ import { UtilsService } from '../../oneit/services/utils.service';
import
{
AdminPortalLayoutService
}
from
'../admin-portal/admin-portal-layout/admin-portal-layout.service'
;
import
{
AdminPortalLayoutService
}
from
'../admin-portal/admin-portal-layout/admin-portal-layout.service'
;
import
{
BaseComponent
}
from
'../base/base.component'
;
import
{
BaseComponent
}
from
'../base/base.component'
;
import
{
EditWorkflowTemplateService
}
from
'./edit-workflow-template.service'
;
import
{
EditWorkflowTemplateService
}
from
'./edit-workflow-template.service'
;
import
{
DndDropEvent
}
from
"ngx-drag-drop"
;
@
Component
({
@
Component
({
selector
:
'app-edit-workflow-template'
,
selector
:
'app-edit-workflow-template'
,
...
@@ -51,6 +51,8 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
...
@@ -51,6 +51,8 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
showLoader
=
false
;
showLoader
=
false
;
editMode
=
false
;
editMode
=
false
;
displayNewMessageTemplate
=
false
;
displayNewMessageTemplate
=
false
;
draggingItem
:
any
=
null
;
draggingId
=
null
;
selectedTemplateID
=
null
;
selectedTemplateID
=
null
;
selectedMessageTemplate
=
null
;
// object id of type WorkflowMessageModel
selectedMessageTemplate
=
null
;
// object id of type WorkflowMessageModel
...
@@ -154,6 +156,12 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
...
@@ -154,6 +156,12 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
this
.
filterStages
();
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
{
isGeneric
(
stage
:
WorkflowStageModel
):
boolean
{
return
!
stage
.
StageType
.
IsPostStage
&&
!
stage
.
StageType
.
IsPreStage
;
return
!
stage
.
StageType
.
IsPostStage
&&
!
stage
.
StageType
.
IsPreStage
;
}
}
...
@@ -174,8 +182,11 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
...
@@ -174,8 +182,11 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
}
}
showSaveCopyBtn
():
boolean
{
showSaveCopyBtn
():
boolean
{
return
this
.
workflow
&&
this
.
workflow
.
ObjectID
?
if
(
this
.
workflow
&&
this
.
workflow
.
ObjectID
)
{
(
!!
this
.
workflow
.
HiringTeam
)
:
false
;
return
this
.
workflow
.
HiringTeam
===
null
;
}
return
false
;
}
}
getStageHeader
(
stage
:
WorkflowStageModel
):
string
{
getStageHeader
(
stage
:
WorkflowStageModel
):
string
{
...
@@ -188,11 +199,11 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
...
@@ -188,11 +199,11 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
filteredStages
(
isPreStage
:
boolean
,
isPostStage
:
boolean
):
Array
<
WorkflowStageModel
>
{
filteredStages
(
isPreStage
:
boolean
,
isPostStage
:
boolean
):
Array
<
WorkflowStageModel
>
{
if
(
isPreStage
)
{
if
(
isPreStage
)
{
return
this
.
workflow
.
WorkFlowStages
.
filter
(
stage
=>
stage
.
StageType
.
IsPreStage
)
return
this
.
workflow
.
WorkFlowStages
.
filter
(
stage
=>
stage
.
StageType
.
IsPreStage
)
;
}
else
if
(
isPostStage
)
{
}
else
if
(
isPostStage
)
{
return
this
.
workflow
.
WorkFlowStages
.
filter
(
stage
=>
stage
.
StageType
.
IsPostStage
)
return
this
.
workflow
.
WorkFlowStages
.
filter
(
stage
=>
stage
.
StageType
.
IsPostStage
)
;
}
else
{
}
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
)
;
}
}
}
}
...
@@ -236,6 +247,11 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
...
@@ -236,6 +247,11 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
}
}
generateDelayString
(
message
:
WorkflowMessageModel
):
void
{
generateDelayString
(
message
:
WorkflowMessageModel
):
void
{
if
(
!
message
.
Delay
)
{
return
;
}
const
delay
=
message
.
Delay
.
replace
(
/_/g
,
''
)
const
delay
=
message
.
Delay
.
replace
(
/_/g
,
''
)
.
split
(
':'
);
.
split
(
':'
);
...
@@ -355,11 +371,20 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
...
@@ -355,11 +371,20 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
}
}
removeStep
(
step
:
WorkflowStepModel
,
stage
:
WorkflowStageModel
):
void
{
removeStep
(
step
:
WorkflowStepModel
,
stage
:
WorkflowStageModel
):
void
{
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
;
const
stepType
=
step
.
StepType
;
this
.
utilsService
.
removeMultiRefObject
(
step
,
stage
,
'Steps'
,
this
.
createdObjs
,
this
.
updatedObjs
,
this
.
deletedObjs
);
this
.
utilsService
.
removeMultiRefObject
(
step
,
stage
,
'Steps'
,
this
.
createdObjs
,
this
.
updatedObjs
,
this
.
deletedObjs
);
this
.
reAssignStepOrders
(
stage
);
this
.
reAssignStepOrders
(
stage
);
this
.
addStepType
(
stepType
);
this
.
addStepType
(
stepType
);
}
}
});
}
removeStepType
(
step
:
StepTypeEnum
):
void
{
removeStepType
(
step
:
StepTypeEnum
):
void
{
this
.
stepTypes
.
splice
(
this
.
stepTypes
.
findIndex
(
elem
=>
elem
.
Value
===
step
.
Value
),
1
);
this
.
stepTypes
.
splice
(
this
.
stepTypes
.
findIndex
(
elem
=>
elem
.
Value
===
step
.
Value
),
1
);
...
@@ -458,19 +483,18 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
...
@@ -458,19 +483,18 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
this
.
utilsService
.
addObjsToJSONByObjectID
(
this
.
updatedObjs
,
this
.
workflow
.
WorkFlowStages
);
this
.
utilsService
.
addObjsToJSONByObjectID
(
this
.
updatedObjs
,
this
.
workflow
.
WorkFlowStages
);
this
.
workflow
.
WorkFlowStages
=
this
.
workflow
.
WorkFlowStages
||
[];
this
.
workflow
.
WorkFlowStages
=
this
.
workflow
.
WorkFlowStages
||
[];
this
.
workflow
.
WorkFlowStages
.
forEach
(
stage
=>
{
this
.
workflow
.
WorkFlowStages
.
forEach
(
stage
=>
{
this
.
updatedObjs
[
stage
.
ObjectID
]
=
stage
this
.
updatedObjs
[
stage
.
ObjectID
]
=
stage
;
stage
.
Steps
=
stage
.
Steps
||
[];
stage
.
Steps
=
stage
.
Steps
||
[];
stage
.
WorkFlowMessages
=
stage
.
WorkFlowMessages
||
[];
stage
.
WorkFlowMessages
=
stage
.
WorkFlowMessages
||
[];
stage
.
WorkFlowMessages
.
forEach
(
msg
=>
{
stage
.
WorkFlowMessages
.
forEach
(
msg
=>
{
this
.
generateDelayString
(
msg
)
this
.
generateDelayString
(
msg
);
});
});
stage
.
Steps
.
forEach
(
step
=>
{
stage
.
Steps
.
forEach
(
step
=>
{
this
.
removeStepType
(
step
.
StepType
);
this
.
removeStepType
(
step
.
StepType
);
})
});
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
);
...
@@ -478,6 +502,7 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
...
@@ -478,6 +502,7 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
});
});
this
.
reOrderStages
();
this
.
reOrderStages
();
this
.
reOrderSteps
();
this
.
showLoader
=
false
;
this
.
showLoader
=
false
;
},
},
error
=>
{
error
=>
{
...
@@ -516,15 +541,11 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
...
@@ -516,15 +541,11 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
}
}
}
}
onDragStart
(
item
,
list
,
listId
):
void
{
onDragStart
(
item
,
list
,
listId
):
void
{
this
.
draggingItem
=
list
.
find
(
listItem
=>
listItem
.
ObjectID
===
item
.
ObjectID
);
this
.
draggingItem
=
list
.
find
(
listItem
=>
listItem
.
ObjectID
===
item
.
ObjectID
);
this
.
draggingId
=
listId
;
this
.
draggingId
=
listId
;
}
}
draggingItem
:
any
=
null
;
draggingId
=
null
;
onDragEnd
(
event
):
void
{
onDragEnd
(
event
):
void
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
draggingItem
=
null
;
this
.
draggingItem
=
null
;
...
@@ -532,13 +553,13 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
...
@@ -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
)
{
if
(
draggingId
!==
this
.
draggingId
)
{
return
;
return
;
}
}
let
index
=
event
.
index
;
let
index
=
event
.
index
;
if
(
typeof
index
===
"undefined"
)
{
if
(
typeof
index
===
'undefined'
)
{
index
=
list
.
length
;
index
=
list
.
length
;
}
}
...
@@ -553,10 +574,9 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
...
@@ -553,10 +574,9 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
list
.
splice
(
index
,
0
,
this
.
draggingItem
);
list
.
splice
(
index
,
0
,
this
.
draggingItem
);
}
}
list
.
forEach
((
item
,
i
)
=>
{
list
.
forEach
((
item
,
index
)
=>
{
item
.
SortOrder
=
i
;
item
.
SortOrder
=
index
;
});
})
}
}
// tslint:disable-next-line:max-file-line-count
// tslint:disable-next-line:max-file-line-count
...
...
frontend/angular/src/assets/css/custom.scss
View file @
6db877d0
...
@@ -108,6 +108,16 @@
...
@@ -108,6 +108,16 @@
/* End listing of message and workflow template styling */
/* End listing of message and workflow template styling */
/* Panel Styling */
/* Panel Styling */
.messaging
{
.ui-panel
{
.ui-panel-content
{
padding-left
:
0
!
important
;
padding-right
:
0
!
important
;
}
}
}
.ui-panel
{
.ui-panel
{
margin-right
:
auto
;
margin-right
:
auto
;
margin-left
:
auto
;
margin-left
:
auto
;
...
@@ -202,6 +212,16 @@
...
@@ -202,6 +212,16 @@
}
}
}
}
/* End styling select button*/
.ui-multiselect
{
border-bottom
:
0
!
important
;
}
.dropdown-text
{
width
:
75%
!
important
;
}
.h-80
{
.h-80
{
height
:
80px
;
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