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
c02d0fdd
Commit
c02d0fdd
authored
Nov 15, 2019
by
GD-A-150752
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
edit-workflow-template initial
parent
ff8bb8bd
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
33 changed files
with
928 additions
and
587 deletions
+928
-587
.editorconfig
frontend/angular/.editorconfig
+1
-1
app.component.ts
frontend/angular/src/app/app.component.ts
+2
-1
app.module.ts
frontend/angular/src/app/app.module.ts
+30
-27
app.routing.ts
frontend/angular/src/app/app.routing.ts
+66
-55
app.service.ts
frontend/angular/src/app/app.service.ts
+33
-39
base.component.ts
frontend/angular/src/app/components/base/base.component.ts
+9
-9
edit-message-template.component.html
...dit-message-template/edit-message-template.component.html
+0
-0
edit-message-template.component.ts
.../edit-message-template/edit-message-template.component.ts
+0
-0
edit-message-template.service.ts
...ts/edit-message-template/edit-message-template.service.ts
+17
-19
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
+262
-0
edit-workflow-template.model.ts
...ts/edit-workflow-template/edit-workflow-template.model.ts
+23
-0
edit-workflow-template.service.ts
.../edit-workflow-template/edit-workflow-template.service.ts
+53
-0
list-message-template.component.html
...ist-message-template/list-message-template.component.html
+64
-61
list-message-template.component.scss
...ist-message-template/list-message-template.component.scss
+20
-20
list-message-template.component.ts
.../list-message-template/list-message-template.component.ts
+88
-74
list-message-template.service.ts
...ts/list-message-template/list-message-template.service.ts
+0
-25
list-work-flows.component.html
...components/list-work-flows/list-work-flows.component.html
+90
-90
list-work-flows.component.ts
...p/components/list-work-flows/list-work-flows.component.ts
+68
-72
list-work-flows.model.ts
...c/app/components/list-work-flows/list-work-flows.model.ts
+0
-5
list-work-flows.service.ts
...app/components/list-work-flows/list-work-flows.service.ts
+0
-25
constants.ts
frontend/angular/src/app/constants.ts
+15
-8
applicationStatus.enum.ts
frontend/angular/src/app/models/applicationStatus.enum.ts
+5
-5
hiringTeam.model.ts
frontend/angular/src/app/models/hiringTeam.model.ts
+1
-1
messageTemplate.model.ts
frontend/angular/src/app/models/messageTemplate.model.ts
+19
-19
placeholderOptions.enum.ts
frontend/angular/src/app/models/placeholderOptions.enum.ts
+9
-9
responseAction.enum.ts
frontend/angular/src/app/models/responseAction.enum.ts
+5
-5
sorterModel.ts
frontend/angular/src/app/models/sorterModel.ts
+6
-6
stageType.enum.ts
frontend/angular/src/app/models/stageType.enum.ts
+8
-0
stepType.enum.ts
frontend/angular/src/app/models/stepType.enum.ts
+6
-0
templateType.enum.ts
frontend/angular/src/app/models/templateType.enum.ts
+6
-0
workflowTemplate.model.ts
frontend/angular/src/app/models/workflowTemplate.model.ts
+22
-11
SelectPanel_Workflow.png
frontend/angular/src/assets/images/SelectPanel_Workflow.png
+0
-0
No files found.
frontend/angular/.editorconfig
View file @
c02d0fdd
...
...
@@ -4,7 +4,7 @@ root = true
[*]
charset = utf-8
indent_style = space
indent_size =
2
indent_size =
4
insert_final_newline = true
trim_trailing_whitespace = true
...
...
frontend/angular/src/app/app.component.ts
View file @
c02d0fdd
import
{
Component
,
OnDestroy
,
Renderer
,
OnInit
,
NgZone
}
from
'@angular/core'
;
import
{
Component
}
from
'@angular/core'
;
@
Component
({
// tslint:disable-next-line:component-selector
selector
:
'body'
,
template
:
'<router-outlet></router-outlet>'
})
...
...
frontend/angular/src/app/app.module.ts
View file @
c02d0fdd
import
{
NgModule
}
from
'@angular/core'
;
import
{
FormBuilder
}
from
'@angular/forms'
;
import
{
ConfirmationService
,
EditorModule
,
Overlay
PanelModule
}
from
'primeng/primeng'
;
import
{
ConfirmationService
,
EditorModule
,
InputSwitchModule
,
OverlayPanelModule
,
PanelModule
}
from
'primeng/primeng'
;
import
{
AppComponent
}
from
'./app.component'
;
import
{
AppRoutingModule
}
from
'./app.routing'
;
import
{
AppService
}
from
'./app.service'
;
import
{
EditMessageTemplateComponent
}
from
'./components/edit-message-template/edit-message-template.component'
;
import
{
EditMessageTemplateService
}
from
'./components/edit-message-template/edit-message-template.service'
;
import
{
EditWorkflowTemplateComponent
}
from
'./components/edit-workflow-template/edit-workflow-template.component'
;
import
{
EditWorkflowTemplateService
}
from
'./components/edit-workflow-template/edit-workflow-template.service'
;
import
{
ListMessageTemplateComponent
}
from
'./components/list-message-template/list-message-template.component'
;
import
{
ListMessageTemplateService
}
from
'./components/list-message-template/list-message-template.service'
;
import
{
ListWorkFlowsComponent
}
from
'./components/list-work-flows/list-work-flows.component'
;
import
{
ListWorkFlowsService
}
from
'./components/list-work-flows/list-work-flows.service'
;
import
{
FullLayoutComponent
}
from
'./oneit/components/full-layout/full-layout.component'
;
import
{
OneITModule
}
from
'./oneit/oneit.module'
;
@
NgModule
({
imports
:
[
AppRoutingModule
,
OneITModule
,
EditorModule
,
OverlayPanelModule
],
declarations
:
[
AppComponent
,
FullLayoutComponent
,
EditMessageTemplateComponent
,
ListMessageTemplateComponent
,
ListWorkFlowsComponent
],
providers
:
[
FormBuilder
,
ConfirmationService
,
AppService
,
EditMessageTemplateService
,
ListMessageTemplateService
,
ListWorkFlowsService
],
bootstrap
:
[
AppComponent
]
imports
:
[
AppRoutingModule
,
OneITModule
,
EditorModule
,
OverlayPanelModule
,
PanelModule
,
InputSwitchModule
],
declarations
:
[
AppComponent
,
FullLayoutComponent
,
EditMessageTemplateComponent
,
EditWorkflowTemplateComponent
,
ListMessageTemplateComponent
,
ListWorkFlowsComponent
],
providers
:
[
FormBuilder
,
ConfirmationService
,
AppService
,
EditMessageTemplateService
,
EditWorkflowTemplateService
],
bootstrap
:
[
AppComponent
]
})
export
class
AppModule
{
constructor
()
{
}
// tslint:disable-next-line:no-empty
constructor
()
{
}
}
frontend/angular/src/app/app.routing.ts
View file @
c02d0fdd
import
{
NgModule
}
from
'@angular/core'
;
import
{
RouterModule
,
Routes
}
from
'@angular/router'
;
import
{
EditMessageTemplateComponent
}
from
'./components/edit-message-template/edit-message-template.component'
;
import
{
EditWorkflowTemplateComponent
}
from
"./components/edit-workflow-template/edit-workflow-template.component"
;
import
{
ListMessageTemplateComponent
}
from
'./components/list-message-template/list-message-template.component'
;
import
{
ListWorkFlowsComponent
}
from
'./components/list-work-flows/list-work-flows.component'
;
...
...
@@ -12,65 +13,75 @@ import { IframePageComponent } from './oneit/components/iframe-page/iframe-page.
import
{
AuthGuard
}
from
'./oneit/guards/auth.guard'
;
export
const
routes
:
Routes
=
[
{
path
:
''
,
redirectTo
:
'home'
,
pathMatch
:
'full'
},
{
path
:
''
,
component
:
FullLayoutComponent
,
data
:
{
showDefaultHeader
:
true
,
showDefaultFooter
:
true
,
showMenu
:
true
,
showFeedback
:
true
{
path
:
''
,
redirectTo
:
'home'
,
pathMatch
:
'full'
},
children
:
[
{
path
:
'access-denied'
,
component
:
AccessDeniedComponent
},
{
path
:
'home'
,
canActivate
:
[
AuthGuard
],
component
:
HomeComponent
},
{
path
:
'iframe-page/:url'
,
canActivate
:
[
AuthGuard
],
component
:
IframePageComponent
,
runGuardsAndResolvers
:
'always'
},
{
path
:
'edit-message-template'
,
component
:
EditMessageTemplateComponent
,
canActivate
:
[
AuthGuard
]
},
{
path
:
'edit-message-template/:id'
,
component
:
EditMessageTemplateComponent
,
canActivate
:
[
AuthGuard
]
},
{
path
:
'list-message-template'
,
component
:
ListMessageTemplateComponent
,
canActivate
:
[
AuthGuard
]
},
{
path
:
'list-work-flows'
,
component
:
ListWorkFlowsComponent
,
canActivate
:
[
AuthGuard
]
}
]
}
// Don't forget to add below line in app.module.ts
// entryComponents: [CustomHeaderComponent],
{
path
:
''
,
component
:
FullLayoutComponent
,
data
:
{
showDefaultHeader
:
true
,
showDefaultFooter
:
true
,
showMenu
:
true
,
showFeedback
:
true
},
children
:
[
{
path
:
'access-denied'
,
component
:
AccessDeniedComponent
},
{
path
:
'home'
,
canActivate
:
[
AuthGuard
],
component
:
HomeComponent
},
{
path
:
'iframe-page/:url'
,
canActivate
:
[
AuthGuard
],
component
:
IframePageComponent
,
runGuardsAndResolvers
:
'always'
},
{
path
:
'edit-message-template'
,
component
:
EditMessageTemplateComponent
,
canActivate
:
[
AuthGuard
]
},
{
path
:
'edit-message-template/:id'
,
component
:
EditMessageTemplateComponent
,
canActivate
:
[
AuthGuard
]
},
{
path
:
'list-message-template'
,
component
:
ListMessageTemplateComponent
,
canActivate
:
[
AuthGuard
]
},
{
path
:
'list-work-flows'
,
component
:
ListWorkFlowsComponent
,
canActivate
:
[
AuthGuard
]
},
{
path
:
'edit-workflow-template'
,
component
:
EditWorkflowTemplateComponent
,
canActivate
:
[
AuthGuard
]
},
{
path
:
'edit-workflow-template/:id'
,
component
:
EditWorkflowTemplateComponent
,
canActivate
:
[
AuthGuard
]
}
]
}
// Don't forget to add below line in app.module.ts
// entryComponents: [CustomHeaderComponent],
];
@
NgModule
({
imports
:
[
RouterModule
.
forRoot
(
routes
,
{
useHash
:
true
,
onSameUrlNavigation
:
'reload'
})],
exports
:
[
RouterModule
]
imports
:
[
RouterModule
.
forRoot
(
routes
,
{
useHash
:
true
,
onSameUrlNavigation
:
'reload'
})],
exports
:
[
RouterModule
]
})
export
class
AppRoutingModule
{
}
frontend/angular/src/app/app.service.ts
View file @
c02d0fdd
import
{
Injectable
}
from
'@angular/core'
;
import
{
Observable
}
from
'rxjs'
;
import
{
PlaceholderOptions
Model
}
from
'./models/placeholderOptions.model
'
;
import
{
TemplateType
Model
}
from
'./models/templateTypeModel
'
;
import
{
PlaceholderOptions
Enum
}
from
'./models/placeholderOptions.enum
'
;
import
{
TemplateType
Enum
}
from
'./models/templateType.enum
'
;
import
{
EnumService
}
from
'./oneit/services/enum.service'
;
import
{
SearchService
}
from
'./oneit/services/search.service'
;
import
{
UtilsService
}
from
'./oneit/services/utils.service'
;
@
Injectable
()
export
class
AppService
{
HiringTeam
=
'ID:37952977'
;
constructor
(
private
enumService
:
EnumService
)
{
}
getMessageTemplateTypeEnum
():
Observable
<
Array
<
TemplateTypeModel
>>
{
return
this
.
enumService
.
getEnums
(
'TemplateTypes'
,
true
);
}
getPlaceholderOptionsEnum
():
Observable
<
Array
<
PlaceholderOptionsModel
>>
{
return
this
.
enumService
.
getEnums
(
'PlaceholderOptions'
,
true
);
}
// Helper functions
moveCreatedToUpdated
(
data
,
createdObjs
,
updatedObjs
,
deletedObjs
=
null
):
void
{
Object
.
keys
(
createdObjs
)
.
forEach
(
nData
=>
{
if
(
data
.
created
[
nData
])
{
updatedObjs
[
data
.
created
[
nData
]]
=
createdObjs
[
nData
];
updatedObjs
[
data
.
created
[
nData
]].
ObjectID
=
data
.
created
[
nData
];
// tslint:disable-next-line:no-dynamic-delete
delete
createdObjs
[
nData
];
}
});
if
(
deletedObjs
)
{
Object
.
keys
(
deletedObjs
)
.
forEach
(
nData
=>
{
if
(
data
.
deleted
.
indexOf
(
nData
)
>
-
1
)
{
// tslint:disable-next-line:no-dynamic-delete
delete
deletedObjs
[
nData
];
}
});
HiringTeam
=
'ID:37952977'
;
constructor
(
private
enumService
:
EnumService
,
private
searchService
:
SearchService
,
private
utilsService
:
UtilsService
)
{
}
getMessageTemplateTypeEnum
():
Observable
<
Array
<
TemplateTypeEnum
>>
{
return
this
.
enumService
.
getEnums
(
'TemplateTypes'
,
true
);
}
getPlaceholderOptionsEnum
():
Observable
<
Array
<
PlaceholderOptionsEnum
>>
{
return
this
.
enumService
.
getEnums
(
'PlaceholderOptions'
,
true
);
}
getTypes
(
serviceName
:
string
):
Observable
<
Array
<
any
>>
{
return
this
.
enumService
.
getEnums
(
serviceName
,
true
);
}
getSearchListing
(
serviceName
:
string
,
queryType
:
string
,
queryParams
,
assocs
,
searchName
):
Observable
<
Array
<
any
>>
{
return
this
.
searchService
.
searchAndSaveSearchRequest
(
serviceName
,
queryType
,
queryParams
,
assocs
,
null
,
null
,
null
,
null
,
searchName
,
false
)
.
map
(
data
=>
this
.
utilsService
.
convertResponseToObjects
(
data
,
assocs
)
);
}
}
}
frontend/angular/src/app/components/base/base.component.ts
View file @
c02d0fdd
...
...
@@ -4,16 +4,16 @@ import { UtilsService } from '../../oneit/services/utils.service';
export
class
BaseComponent
implements
OnDestroy
{
isLoading
=
false
;
subscriptions
:
Array
<
Subscription
>
=
[];
isLoading
=
false
;
subscriptions
:
Array
<
Subscription
>
=
[];
constructor
(
protected
utilService
:
UtilsService
)
{
}
constructor
(
protected
utilService
:
UtilsService
)
{
}
ngOnDestroy
():
void
{
this
.
utilService
.
unsubscribeSubscriptions
(
this
.
subscriptions
);
}
ngOnDestroy
():
void
{
this
.
utilService
.
unsubscribeSubscriptions
(
this
.
subscriptions
);
}
}
frontend/angular/src/app/components/edit-message-template/edit-message-template.component.html
View file @
c02d0fdd
This diff is collapsed.
Click to expand it.
frontend/angular/src/app/components/edit-message-template/edit-message-template.component.ts
View file @
c02d0fdd
This diff is collapsed.
Click to expand it.
frontend/angular/src/app/components/edit-message-template/edit-message-template.service.ts
View file @
c02d0fdd
import
{
Injectable
}
from
'@angular/core'
;
import
{
Observable
}
from
'rxjs/Observable'
;
import
{
MessageTemplateModel
}
from
'../../models/messageTemplateModel'
;
import
{
TemplateTypeModel
}
from
'../../models/templateTypeModel'
;
import
{
MessageTemplateModel
}
from
'../../models/messageTemplate.model'
;
import
{
SearchService
}
from
'../../oneit/services/search.service'
;
import
{
UtilsService
}
from
'../../oneit/services/utils.service'
;
@
Injectable
()
export
class
EditMessageTemplateService
{
constructor
(
private
searchService
:
SearchService
,
private
utilsService
:
UtilsService
)
{
}
constructor
(
private
searchService
:
SearchService
,
private
utilsService
:
UtilsService
)
{
}
getMessageTemplateByID
(
id
,
assocs
):
Observable
<
any
>
{
return
this
.
searchService
.
getObjectById
(
'MessageTemplates'
,
id
,
assocs
)
.
map
(
data
=>
{
const
objs
=
this
.
utilsService
.
convertResponseToObjects
(
data
,
assocs
);
getMessageTemplateByID
(
id
,
assocs
):
Observable
<
MessageTemplateModel
>
{
return
this
.
searchService
.
getObjectById
(
'MessageTemplates'
,
id
,
assocs
)
.
map
(
data
=>
{
const
objs
=
this
.
utilsService
.
convertResponseToObjects
(
data
,
assocs
);
if
(
objs
&&
objs
.
length
>
0
)
{
return
objs
[
0
];
}
}
);
}
if
(
objs
&&
objs
.
length
>
0
)
{
return
objs
[
0
];
}
}
);
}
}
frontend/angular/src/app/components/edit-workflow-template/edit-workflow-template.component.html
0 → 100644
View file @
c02d0fdd
This diff is collapsed.
Click to expand it.
frontend/angular/src/app/components/edit-workflow-template/edit-workflow-template.component.ts
0 → 100644
View file @
c02d0fdd
import
{
Component
,
OnInit
,
ViewChild
}
from
'@angular/core'
;
import
{
NgForm
}
from
'@angular/forms'
;
import
{
ActivatedRoute
,
Params
,
Router
}
from
'@angular/router'
;
import
{
Subscription
}
from
'rxjs/Subscription'
;
import
{
AppService
}
from
'../../app.service'
;
import
{
ResponseActionEnum
}
from
'../../models/responseAction.enum'
;
import
{
StageTypeEnum
}
from
'../../models/stageType.enum'
;
import
{
StepTypeEnum
}
from
'../../models/stepType.enum'
;
import
{
WorkflowTemplateModel
}
from
'../../models/workflowTemplate.model'
;
import
{
SaveService
}
from
'../../oneit/services/save.service'
;
import
{
UtilsService
}
from
'../../oneit/services/utils.service'
;
import
{
BaseComponent
}
from
'../base/base.component'
;
import
{
EditWorkflowTemplateService
}
from
'./edit-workflow-template.service'
;
import
{
WorkflowTemplate
}
from
'./edit-workflow-template.model'
;
@
Component
({
selector
:
'app-edit-workflow-template'
,
templateUrl
:
'./edit-workflow-template.component.html'
})
export
class
EditWorkflowTemplateComponent
extends
BaseComponent
implements
OnInit
{
subscriptions
:
Array
<
Subscription
>
=
[];
@
ViewChild
(
'form'
)
form
:
NgForm
;
createdObjs
=
{};
updatedObjs
=
{};
deletedObjs
=
{};
workflow
=
new
WorkflowTemplateModel
();
stageTypes
:
Array
<
StageTypeEnum
>
;
stepTypes
:
Array
<
StepTypeEnum
>
;
responseActions
:
Array
<
ResponseActionEnum
>
;
editField
:
any
=
{};
showLoader
=
false
;
editMode
=
false
;
workflowTemplate
=
new
WorkflowTemplate
();
s
:
Array
<
any
>
=
[];
messagetemplates
:
Array
<
any
>
=
[];
messagetemplate_withdraws
:
Array
<
any
>
=
[];
Capture_CVs
=
[];
Mandatory_CVs
=
[];
Capture_Cover_Letters
=
[];
Mandatory_cover_letters
=
[];
Automatically_progress_to_next_stages
=
[];
Use_messagings
=
[];
constructor
(
private
router
:
Router
,
private
activatedRoute
:
ActivatedRoute
,
private
utilsService
:
UtilsService
,
private
saveService
:
SaveService
,
private
appService
:
AppService
,
private
editWorkflowTemplateService
:
EditWorkflowTemplateService
)
{
super
(
utilsService
);
}
ngOnInit
():
void
{
this
.
createdObjs
=
{};
this
.
updatedObjs
=
{};
this
.
deletedObjs
=
{};
this
.
utilsService
.
resetCounter
();
this
.
showLoader
=
true
;
this
.
subscriptions
.
push
(
this
.
activatedRoute
.
params
.
subscribe
(
(
params
:
Params
)
=>
{
this
.
showLoader
=
true
;
this
.
getStageTypes
();
this
.
getStepTypes
();
this
.
getResponseActions
();
if
(
params
.
id
&&
params
.
id
!==
'0'
)
{
this
.
editMode
=
true
;
this
.
getWorkflowTemplateByID
(
params
.
id
);
}
else
{
this
.
utilsService
.
createObject
(
this
.
workflow
,
this
.
createdObjs
);
this
.
setDefaults
();
this
.
showLoader
=
false
;
}
}
));
this
.
gets
();
}
setDefaults
():
void
{
this
.
workflow
.
TemplateName
=
'Workflow Template'
;
this
.
workflow
.
LandingButtonText
=
'Apply Now'
;
this
.
workflow
.
VerificationHeaderText
=
'Please verify your identity before applying to:'
;
this
.
workflow
.
ThankYouHeaderText
=
'Thank You for your application to:'
;
this
.
workflow
.
ThankYouSecondaryText
=
'We will get in touch with you soon'
;
this
.
workflow
.
ApplicationButtonText
=
'Submit'
;
this
.
workflow
.
CaptureCV
=
true
;
}
getStageTypes
():
void
{
this
.
subscriptions
.
push
(
this
.
appService
.
getTypes
(
'StageTypes'
)
.
subscribe
((
types
:
Array
<
StageTypeEnum
>
)
=>
{
this
.
stageTypes
=
types
;
})
);
}
getStepTypes
():
void
{
this
.
subscriptions
.
push
(
this
.
appService
.
getTypes
(
'StepTypes'
)
.
subscribe
((
types
:
Array
<
StepTypeEnum
>
)
=>
{
this
.
stepTypes
=
types
;
})
);
}
getResponseActions
():
void
{
this
.
subscriptions
.
push
(
this
.
appService
.
getTypes
(
'ResponseActions'
)
.
subscribe
((
types
:
Array
<
ResponseActionEnum
>
)
=>
{
this
.
responseActions
=
types
;
})
);
}
showLabel
(
id
:
string
):
boolean
{
return
(
this
.
editField
[
id
]
===
undefined
||
this
.
editField
[
id
]
===
false
);
}
showInput
(
id
:
string
):
boolean
{
return
this
.
editField
&&
!!
this
.
editField
[
id
];
}
toggleInput
(
event
,
fieldName
,
save
=
true
):
void
{
this
.
utilsService
.
clearErrorMessages
();
if
(
event
.
type
===
'blur'
)
{
if
(
!
this
.
form
.
controls
[
fieldName
].
invalid
)
{
this
.
editField
[
fieldName
]
=
false
;
if
(
save
)
{
// save call to be sent
}
}
else
{
this
.
utilsService
.
showAllErrorMessages
();
}
}
else
{
this
.
editField
[
fieldName
]
=
true
;
setTimeout
(()
=>
{
try
{
document
.
getElementById
(
`
${
fieldName
}
Id`
)
.
focus
();
document
.
getElementById
(
`
${
fieldName
}
Id`
)
.
getElementsByTagName
(
'input'
)[
0
]
.
focus
();
}
catch
(
e
)
{
// ignore this.
}
},
0
);
}
}
gets
():
void
{
this
.
subscriptions
.
push
(
this
.
editWorkflowTemplateService
.
getDummy456s
([])
.
subscribe
(
data
=>
{
this
.
s
=
data
;
},
error
=>
{
this
.
utilsService
.
handleError
(
error
);
}
)
);
}
autoCompleteMessagetemplate
(
event
):
void
{
this
.
subscriptions
.
push
(
this
.
editWorkflowTemplateService
.
getmessagetemplatesForAutocomplete
(
event
.
query
,
[])
.
subscribe
(
data
=>
{
for
(
const
obj
of
data
)
{
// If you need to display anything complex in autocomplete label, put that code here
// e.g. obj.Name = obj.FirstName + ' ' + obj.LastName. So that you can use "Name" attribute in HTML
}
this
.
messagetemplates
=
data
;
},
error
=>
{
this
.
utilsService
.
handleError
(
error
);
}
)
);
}
autoCompleteMessagetemplate_withdraw
(
event
):
void
{
this
.
subscriptions
.
push
(
this
.
editWorkflowTemplateService
.
getmessagetemplate_withdrawsForAutocomplete
(
event
.
query
,
[])
.
subscribe
(
data
=>
{
for
(
const
obj
of
data
)
{
// sd
}
this
.
messagetemplate_withdraws
=
data
;
},
error
=>
{
this
.
utilsService
.
handleError
(
error
);
}
)
);
}
getWorkflowTemplateByID
(
id
):
void
{
this
.
showLoader
=
true
;
this
.
createdObjs
=
{};
this
.
updatedObjs
=
{};
this
.
deletedObjs
=
{};
this
.
utilsService
.
resetCounter
();
this
.
utilsService
.
clearErrorMessages
();
this
.
subscriptions
.
push
(
this
.
editWorkflowTemplateService
.
getWorkflowTemplateByID
(
id
,
[])
.
subscribe
(
data
=>
{
this
.
workflowTemplate
=
data
;
this
.
updatedObjs
[
this
.
workflowTemplate
.
ObjectID
]
=
this
.
workflowTemplate
;
this
.
showLoader
=
false
;
},
error
=>
{
this
.
showLoader
=
false
;
this
.
utilsService
.
handleError
(
error
);
}
)
);
}
saveWorkflowTemplate
(
reload
:
boolean
):
void
{
this
.
utilsService
.
clearErrorMessages
();
if
(
this
.
form
.
invalid
)
{
this
.
utilsService
.
showAllErrorMessages
();
}
else
{
this
.
showLoader
=
true
;
this
.
subscriptions
.
push
(
this
.
saveService
.
saveObjectsWithDefaultSvc
(
this
.
createdObjs
,
this
.
updatedObjs
,
this
.
deletedObjs
)
.
subscribe
(
data
=>
{
this
.
utilsService
.
handleSuccess
();
if
(
reload
)
{
let
idToNavigate
=
this
.
workflowTemplate
.
ObjectID
;
if
(
data
.
created
[
idToNavigate
])
{
idToNavigate
=
data
.
created
[
idToNavigate
];
this
.
router
.
navigate
([
'/edit-workflow-template'
,
idToNavigate
]);
return
;
}
this
.
getWorkflowTemplateByID
(
idToNavigate
);
}
else
{
this
.
router
.
navigate
([
''
]);
}
},
error
=>
{
this
.
showLoader
=
false
;
this
.
utilsService
.
handleError
(
error
);
}
)
);
}
}
}
frontend/angular/src/app/components/edit-workflow-template/edit-workflow-template.model.ts
0 → 100644
View file @
c02d0fdd
export
class
WorkflowTemplate
{
ObjectID
:
string
;
ButtonText
:
string
;
HeaderText
:
string
;
CaptureCV
:
boolean
;
MandatoryCV
:
boolean
;
CaptureCoverLetter
:
boolean
;
Mandatorycoverletter
:
boolean
;
HeaderTextforThankYoupage
:
string
;
SecondaryText
:
string
;
Automaticallyprogresstonextstage
:
boolean
;
Hrs1
:
string
;
BusinessHrsOnly
:
boolean
;
Messagetemplate
:
any
;
Hrswithdraw
:
string
;
Variationwithdraw
:
string
;
Messagetemplate_withdraw
:
any
;
Usemessaging
:
boolean
;
Dummy457
:
string
;
messagetemplate_withdraw
:
string
;
messagetemplate
:
string
;
Dummy461
:
string
;
}
frontend/angular/src/app/components/edit-workflow-template/edit-workflow-template.service.ts
0 → 100644
View file @
c02d0fdd
import
{
Injectable
}
from
'@angular/core'
;
import
{
Observable
}
from
'rxjs/Observable'
;
import
{
SearchService
}
from
'../../oneit/services/search.service'
;
import
{
UtilsService
}
from
'../../oneit/services/utils.service'
;
@
Injectable
()
export
class
EditWorkflowTemplateService
{
constructor
(
private
searchService
:
SearchService
,
private
utilsService
:
UtilsService
)
{
}
getDummy456s
(
assocs
):
Observable
<
any
>
{
return
this
.
searchService
.
getObjects
(
'MessageTemplates'
,
'All'
,
{},
assocs
,
null
,
null
,
null
,
null
)
.
map
(
data
=>
this
.
utilsService
.
convertResponseToObjects
(
data
,
assocs
)
);
}
getmessagetemplate_withdrawsForAutocomplete
(
searchTerm
,
assocs
):
Observable
<
any
>
{
return
this
.
searchService
.
getObjects
(
''
,
'All'
,
{},
assocs
,
null
,
null
,
null
,
null
)
.
map
(
data
=>
this
.
utilsService
.
convertResponseToObjects
(
data
,
assocs
)
);
}
getmessagetemplatesForAutocomplete
(
searchTerm
,
assocs
):
Observable
<
any
>
{
return
this
.
searchService
.
getObjects
(
''
,
'All'
,
{},
assocs
,
null
,
null
,
null
,
null
)
.
map
(
data
=>
{
return
this
.
utilsService
.
convertResponseToObjects
(
data
,
assocs
);
}
);
}
getWorkflowTemplateByID
(
id
,
assocs
):
Observable
<
any
>
{
return
this
.
searchService
.
getObjectById
(
''
,
id
,
assocs
)
.
map
(
data
=>
{
const
objs
=
this
.
utilsService
.
convertResponseToObjects
(
data
,
assocs
);
if
(
objs
&&
objs
.
length
>
0
)
{
return
objs
[
0
];
}
}
);
}
}
frontend/angular/src/app/components/list-message-template/list-message-template.component.html
View file @
c02d0fdd
<form
#
form=
"ngForm"
>
<div
class=
"ui-g ui-fluid"
>
<div
class=
"ui-g-12 nopad"
>
<p-toolbar>
<div
class=
"ui-toolbar-group-left"
>
Messages
<div
class=
"ui-g ui-fluid"
>
<div
class=
"ui-g-12 nopad"
>
<p-toolbar>
<div
class=
"ui-toolbar-group-left"
>
Messages
</div>
<div
class=
"ui-toolbar-group-right actionBtn"
>
<button
pButton
type=
"button"
routerLink=
"/edit-message-template"
label=
"Add Message Template"
icon=
"ui-icon-"
></button>
</div>
</p-toolbar>
</div>
<div
class=
"ui-toolbar-group-right actionBtn"
>
<button
pButton
type=
"button"
routerLink=
"/edit-message-template"
label=
"Add Message Template"
icon=
"ui-icon-"
></button>
</div>
</p-toolbar>
</div>
</div>
<div
class=
"ui-g form-group"
>
<div
class=
"ui-g-12 ui-md-3"
>
<img
data-elementID=
"image_sidePanel"
title=
"sidePanel"
src=
"assets/images/SelectPanel_MessageFlow.png"
/>
</div>
<div
class=
"ui-g-12 ui-md-9"
>
<div
class=
"ui-g-offset-3 pull-right"
>
<label>
Sort By
</label>
<p-dropdown
[
options
]="
sortOptions
"
name=
"sort"
[(
ngModel
)]="
sortSelected
"
(
onChange
)="
sortMessageTemplates
()"
optionLabel=
"description"
>
</p-dropdown>
</div>
<h1>
My Templates
</h1>
<hr/>
<div
*
ngFor=
"let message of myTemplates"
class=
"messageTemplate"
>
<div
class=
"messageRow"
>
<div
class=
"templateName"
>
<span
(
click
)="
onRowSelect
(
message
)"
>
{{message.TemplateName}}
</span>
</div>
<button
pButton
type=
"button"
icon=
"ui-icon-edit"
title=
"Edit"
(
click
)="
onRowSelect
(
message
)"
[
disabled
]="
showLoader
"
>
</button>
</div>
</div>
<div
*
ngIf=
"myTemplates.length === 0"
class=
"messageTemplate"
>
<div
class=
"messageRow"
>
<div
class=
"templateName"
>
<span>
No records found.
</span>
</div>
</div>
</div>
<h1>
Shared Templates
</h1>
<hr/>
<div
*
ngFor=
"let message of sharedTemplates"
class=
"messageTemplate"
>
<div
class=
"messageRow"
>
<div
class=
"templateName"
>
<span
(
click
)="
onRowSelect
(
message
)"
>
{{message.TemplateName}}
</span>
</div>
<button
pButton
type=
"button"
icon=
"ui-icon-edit"
title=
"Edit"
(
click
)="
onRowSelect
(
message
)"
[
disabled
]="
showLoader
"
>
</button>
<div
class=
"ui-g form-group"
>
<div
class=
"ui-g-12 ui-md-3"
>
<img
data-elementID=
"image_sidePanel"
title=
"sidePanel"
src=
"assets/images/SelectPanel_MessageFlow.png"
/>
</div>
</div>
<div
*
ngIf=
"sharedTemplates.length === 0"
class=
"messageTemplate"
>
<div
class=
"messageRow"
>
<div
class=
"templateName"
>
<span>
No records found.
</span>
</div>
<div
class=
"ui-g-12 ui-md-9"
>
<div
class=
"ui-g-offset-3 pull-right"
>
<label>
Sort By
</label>
<p-dropdown
[
options
]="
sortOptions
"
name=
"sort"
[(
ngModel
)]="
sortSelected
"
(
onClick
)="
sortMessageTemplates
()"
(
onShow
)="
setDefaultSorter
()"
(
onHide
)="
allowSort =
false"
optionLabel=
"description"
>
</p-dropdown>
</div>
<h1>
My Templates
</h1>
<hr/>
<div
*
ngFor=
"let message of myTemplates"
class=
"messageTemplate"
>
<div
class=
"messageRow"
>
<div
class=
"templateName"
>
<span
(
click
)="
onRowSelect
(
message
)"
>
{{message.TemplateName}}
</span>
</div>
<button
pButton
type=
"button"
icon=
"ui-icon-edit"
title=
"Edit"
(
click
)="
onRowSelect
(
message
)"
[
disabled
]="
showLoader
"
>
</button>
</div>
</div>
<div
*
ngIf=
"myTemplates.length === 0"
class=
"messageTemplate"
>
<div
class=
"messageRow"
>
<div
class=
"templateName"
>
<span>
No records found.
</span>
</div>
</div>
</div>
<h1>
Shared Templates
</h1>
<hr/>
<div
*
ngFor=
"let message of sharedTemplates"
class=
"messageTemplate"
>
<div
class=
"messageRow"
>
<div
class=
"templateName"
>
<span
(
click
)="
onRowSelect
(
message
)"
>
{{message.TemplateName}}
</span>
</div>
<button
pButton
type=
"button"
icon=
"ui-icon-edit"
title=
"Edit"
(
click
)="
onRowSelect
(
message
)"
[
disabled
]="
showLoader
"
>
</button>
</div>
</div>
<div
*
ngIf=
"sharedTemplates.length === 0"
class=
"messageTemplate"
>
<div
class=
"messageRow"
>
<div
class=
"templateName"
>
<span>
No records found.
</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p-progressSpinner
*
ngIf=
"showLoader"
></p-progressSpinner>
<p-progressSpinner
*
ngIf=
"showLoader"
></p-progressSpinner>
</form>
frontend/angular/src/app/components/list-message-template/list-message-template.component.scss
View file @
c02d0fdd
.messageTemplate
{
background
:
#fff
none
repeat
scroll
0
0
;
display
:
inline-block
;
width
:
100%
;
border-left
:
5px
solid
#03ac66
;
box-shadow
:
0
2px
3px
0
rgba
(
0
,
0
,
0
,
0
.02
);
margin-bottom
:
10px
;
background
:
#fff
none
repeat
scroll
0
0
;
display
:
inline-block
;
width
:
100%
;
border-left
:
5px
solid
#03ac66
;
box-shadow
:
0
2px
3px
0
rgba
(
0
,
0
,
0
,
0
.02
);
margin-bottom
:
10px
;
.messageRow
{
height
:
40px
;
padding
:
15px
;
display
:
flex
;
.messageRow
{
height
:
40px
;
padding
:
15px
;
display
:
flex
;
.templateName
{
width
:
95%
;
align-self
:
center
;
.templateName
{
width
:
95%
;
align-self
:
center
;
span
{
cursor
:
pointer
;
font-weight
:
bold
;
color
:
#4e5258
;
font-size
:
18px
;
}
span
{
cursor
:
pointer
;
font-weight
:
bold
;
color
:
#4e5258
;
font-size
:
18px
;
}
}
}
}
}
frontend/angular/src/app/components/list-message-template/list-message-template.component.ts
View file @
c02d0fdd
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
ActivatedRoute
,
Router
}
from
'@angular/router'
;
import
{
Subscription
}
from
'rxjs/Subscription'
;
import
{
MessageTemplateModel
}
from
'../../models/messageTemplateModel'
;
import
{
SorterModel
}
from
'../../models/sorterModel'
;
import
{
BaseComponent
}
from
'../base/base.component'
;
import
{
AppService
}
from
'../../app.service'
;
import
{
SEARCH
,
SERVICES
}
from
'../../constants'
;
import
{
MessageTemplateModel
}
from
'../../models/messageTemplate.model'
;
import
{
SorterModel
}
from
'../../models/sorterModel'
;
import
{
SearchService
}
from
'../../oneit/services/search.service'
;
import
{
UtilsService
}
from
'../../oneit/services/utils.service'
;
import
{
ListMessageTemplateService
}
from
'./list-message-template.service
'
;
import
{
BaseComponent
}
from
'../base/base.component
'
;
@
Component
({
selector
:
'app-list-message-template'
,
templateUrl
:
'./list-message-template.component.html'
,
styleUrls
:
[
'./list-message-template.component.scss'
]
selector
:
'app-list-message-template'
,
templateUrl
:
'./list-message-template.component.html'
,
styleUrls
:
[
'./list-message-template.component.scss'
]
})
export
class
ListMessageTemplateComponent
extends
BaseComponent
implements
OnInit
{
subscriptions
:
Array
<
Subscription
>
=
[];
myTemplates
:
Array
<
MessageTemplateModel
>
=
[];
sharedTemplates
:
Array
<
MessageTemplateModel
>
=
[];
sortOptions
:
Array
<
SorterModel
>
;
sortSelected
:
SorterModel
;
showLoader
=
false
;
subscriptions
:
Array
<
Subscription
>
=
[];
myTemplates
:
Array
<
MessageTemplateModel
>
=
[];
sharedTemplates
:
Array
<
MessageTemplateModel
>
=
[];
sortOptions
:
Array
<
SorterModel
>
;
sortSelected
:
SorterModel
;
allowSort
:
boolean
;
showLoader
=
false
;
constructor
(
private
router
:
Router
,
private
activatedRoute
:
ActivatedRoute
,
private
utilsService
:
UtilsService
,
private
searchService
:
SearchService
,
private
appService
:
AppService
,
private
listMessageTemplateService
:
ListMessageTemplateService
)
{
super
(
utilsService
);
}
constructor
(
private
router
:
Router
,
private
activatedRoute
:
ActivatedRoute
,
private
utilsService
:
UtilsService
,
private
searchService
:
SearchService
,
private
appService
:
AppService
)
{
super
(
utilsService
);
}
ngOnInit
():
void
{
this
.
sortOptions
=
[
new
SorterModel
(
'Alphabetical (A-Z)'
,
true
),
new
SorterModel
(
'Alphabetical (Z-A)'
,
false
)
];
this
.
showLoader
=
true
;
const
sharedMsgParams
=
{
OnlyGlobalTemplate
:
true
};
const
myMsgParams
=
{
OnlyGlobalTemplate
:
false
};
this
.
subscriptions
.
push
(
this
.
listMessageTemplateService
.
getMessageTemplates
(
myMsgParams
,
[])
.
subscribe
(
messages
=>
{
this
.
myTemplates
=
messages
;
},
error
=>
{
this
.
showLoader
=
false
;
this
.
utilsService
.
handleError
(
error
);
}
ngOnInit
():
void
{
this
.
sortOptions
=
[
new
SorterModel
(
'Alphabetical (A-Z)'
,
true
),
new
SorterModel
(
'Alphabetical (Z-A)'
,
false
)
];
// this.sortSelected = new SorterModel('Alphabetical (A-Z)', true);
this
.
showLoader
=
true
;
const
sharedMsgParams
=
{
OnlyGlobalTemplate
:
true
};
const
myMsgParams
=
{
OnlyGlobalTemplate
:
false
};
this
.
subscriptions
.
push
(
this
.
appService
.
getSearchListing
(
SERVICES
.
MESSAGE_TEMPLATES
,
'All'
,
myMsgParams
,
[],
SEARCH
.
MESSAGE_TEMPLATE
)
.
subscribe
(
messages
=>
{
this
.
myTemplates
=
messages
;
},
error
=>
{
this
.
showLoader
=
false
;
this
.
utilsService
.
handleError
(
error
);
}
)
)
);
this
.
subscriptions
.
push
(
this
.
listMessageTemplateService
.
getMessageTemplates
(
sharedMsgParams
,
[])
.
subscribe
(
messages
=>
{
this
.
sharedTemplates
=
messages
;
},
error
=>
{
;
this
.
subscriptions
.
push
(
this
.
appService
.
getSearchListing
(
SERVICES
.
MESSAGE_TEMPLATES
,
'All'
,
sharedMsgParams
,
[],
SEARCH
.
MESSAGE_TEMPLATE
)
.
subscribe
(
messages
=>
{
this
.
sharedTemplates
=
messages
;
},
error
=>
{
this
.
showLoader
=
false
;
this
.
utilsService
.
handleError
(
error
);
}
)
);
setTimeout
(()
=>
(
this
.
showLoader
=
false
),
0
);
}
sortMessageTemplates
():
void
{
if
(
this
.
allowSort
)
{
this
.
showLoader
=
true
;
this
.
myTemplates
=
this
.
utilsService
.
sort
(
this
.
myTemplates
,
[
'TemplateName'
],
[
this
.
sortSelected
.
ascending
?
1
:
-
1
],
false
);
this
.
sharedTemplates
=
this
.
utilsService
.
sort
(
this
.
sharedTemplates
,
[
'TemplateName'
],
[
this
.
sortSelected
.
ascending
?
1
:
-
1
],
false
);
this
.
allowSort
=
false
;
this
.
showLoader
=
false
;
this
.
utilsService
.
handleError
(
error
);
}
)
);
setTimeout
(()
=>
(
this
.
showLoader
=
false
),
0
);
}
}
}
setDefaultSorter
():
void
{
if
(
!
this
.
sortSelected
)
{
this
.
sortSelected
=
new
SorterModel
(
'Alphabetical (A-Z)'
,
true
);
}
sortMessageTemplates
():
void
{
this
.
showLoader
=
true
;
this
.
myTemplates
=
this
.
utilsService
.
sort
(
this
.
myTemplates
,
[
'TemplateName'
],
[
this
.
sortSelected
.
ascending
?
1
:
-
1
],
false
);
this
.
sharedTemplates
=
this
.
utilsService
.
sort
(
this
.
sharedTemplates
,
[
'TemplateName'
],
[
this
.
sortSelected
.
ascending
?
1
:
-
1
],
false
);
this
.
showLoader
=
false
;
}
this
.
allowSort
=
true
;
}
onRowSelect
(
data
:
MessageTemplateModel
):
void
{
this
.
showLoader
=
true
;
this
.
router
.
navigate
([
'/edit-message-template'
,
data
.
ObjectID
]);
}
onRowSelect
(
data
:
MessageTemplateModel
):
void
{
this
.
showLoader
=
true
;
this
.
router
.
navigate
([
'/edit-message-template'
,
data
.
ObjectID
]);
}
}
frontend/angular/src/app/components/list-message-template/list-message-template.service.ts
deleted
100644 → 0
View file @
ff8bb8bd
import
{
Injectable
}
from
'@angular/core'
;
import
{
Observable
}
from
'rxjs/Observable'
;
import
{
SearchService
}
from
'../../oneit/services/search.service'
;
import
{
UtilsService
}
from
'../../oneit/services/utils.service'
;
@
Injectable
()
export
class
ListMessageTemplateService
{
constructor
(
private
searchService
:
SearchService
,
private
utilsService
:
UtilsService
)
{
}
getMessageTemplates
(
queryParams
,
assocs
):
Observable
<
any
>
{
return
this
.
searchService
.
searchAndSaveSearchRequest
(
'MessageTemplates'
,
'All'
,
queryParams
,
assocs
,
null
,
null
,
null
,
null
,
'ListMessageTemplate'
,
false
)
.
map
(
data
=>
this
.
utilsService
.
convertResponseToObjects
(
data
,
assocs
)
);
}
}
frontend/angular/src/app/components/list-work-flows/list-work-flows.component.html
View file @
c02d0fdd
<form
#
form=
"ngForm"
>
<div
class=
"ui-g ui-fluid"
>
<div
class=
"ui-g-12 nopad"
>
<p-toolbar>
<div
class=
"ui-toolbar-group-left"
>
Workflows
<div
class=
"ui-g ui-fluid"
>
<div
class=
"ui-g-12 nopad"
>
<p-toolbar>
<div
class=
"ui-toolbar-group-left"
>
Workflows
</div>
<div
class=
"ui-toolbar-group-right actionBtn"
>
<button
pButton
type=
"button"
routerLink=
"/edit-workflow-template"
label=
"Add Workflow Template"
icon=
"ui-icon-"
></button>
</div>
</p-toolbar>
</div>
<div
class=
"ui-toolbar-group-right actionBtn"
>
<button
pButton
type=
"button"
routerLink=
"/edit-work-flow"
label=
"Add Workflow Template"
icon=
"ui-icon-"
></button>
</div>
</p-toolbar>
</div>
</div>
<div
class=
"ui-g form-group"
>
<div
class=
"ui-g-12 ui-md-3"
>
<img
data-elementID=
"image_sidePanel"
title=
"sidePanel"
src=
"assets/images/SelectPanel_MessageFlow.png"
/>
</div>
<div
class=
"ui-g-12 ui-md-9"
>
<div
class=
"ui-g form-group"
>
<div
class=
"ui-g-12 ui-md-7"
>
</div>
<div
class=
"ui-g-12 ui-md-2"
>
<label>
Order By
</label>
<div
class=
"ui-g form-group"
>
<div
class=
"ui-g-12 ui-md-3"
>
<img
data-elementID=
"image_sidePanel"
title=
"sidePanel"
src=
"assets/images/SelectPanel_MessageFlow.png"
/>
</div>
<div
class=
"ui-g-12 ui-md-3 ui-fluid"
>
<p-dropdown
[
options
]="
sortOptions
"
name=
"sort"
[(
ngModel
)]="
sortSelected
"
(
onChange
)="
sortWorkFlowTemplates
()"
optionLabel=
"description"
>
</p-dropdown>
</div>
</div>
<div
class=
"ui-g-12 card card-w-title"
>
<h4>
My Templates
</h4>
<div
*
ngFor=
"let workflow of myTemplates"
class=
"ui-g form-group"
>
<div
class=
"ui-g-12 ui-md-12"
>
<div
class=
"ui-g-12 ui-md-9"
>
<div
class=
"ui-g form-group"
>
<div
class=
"ui-g-12 ui-md-1
"
>
<
label>
</label
>
</div
>
<div
class=
"ui-g-12 ui-md-8"
>
<
label>
{{workflow.TemplateName}}
</label><br/
>
</div
>
<div
class=
"ui-g-12 ui-md-3 ui-fluid"
>
<button
pButton
type=
"button"
icon=
"ui-icon-edit"
title=
"Edit
"
(
click
)="
onRowSelect
(
workflow
)"
[
disabled
]="
showLoader
"
>
</butto
n>
</div>
<div
class=
"ui-g-12 ui-md-7
"
>
<
/div
>
<div
class=
"ui-g-12 ui-md-2"
>
<label>
Order By
</label
>
<
/div
>
<div
class=
"ui-g-12 ui-md-3 ui-fluid"
>
<p-dropdown
[
options
]="
sortOptions
"
name=
"sort"
[(
ngModel
)]="
sortSelected
"
(
onChange
)="
sortWorkFlowTemplates
()
"
optionLabel=
"description
"
>
</p-dropdow
n>
</div>
</div>
</div>
</div>
<div
*
ngIf=
"myTemplates.length === 0"
class=
"ui-g form-group"
>
<div
class=
"ui-g-12 ui-md-12"
>
<div
class=
"ui-g form-group"
>
<div
class=
"ui-g-12 ui-md-1"
>
<label>
</label>
</div>
<div
class=
"ui-g-12 ui-md-8"
>
<label>
No records found.
</label><br/>
</div>
<div
class=
"ui-g-12 card card-w-title"
>
<h4>
My Templates
</h4>
<div
*
ngFor=
"let workflow of myTemplates"
class=
"ui-g form-group"
>
<div
class=
"ui-g-12 ui-md-12"
>
<div
class=
"ui-g form-group"
>
<div
class=
"ui-g-12 ui-md-1"
>
<label>
</label>
</div>
<div
class=
"ui-g-12 ui-md-8"
>
<label>
{{workflow.TemplateName}}
</label><br/>
</div>
<div
class=
"ui-g-12 ui-md-3 ui-fluid"
>
<button
pButton
type=
"button"
icon=
"ui-icon-edit"
title=
"Edit"
(
click
)="
onRowSelect
(
workflow
)"
[
disabled
]="
showLoader
"
>
</button>
</div>
</div>
</div>
</div>
<div
*
ngIf=
"myTemplates.length === 0"
class=
"ui-g form-group"
>
<div
class=
"ui-g-12 ui-md-12"
>
<div
class=
"ui-g form-group"
>
<div
class=
"ui-g-12 ui-md-1"
>
<label>
</label>
</div>
<div
class=
"ui-g-12 ui-md-8"
>
<label>
No records found.
</label><br/>
</div>
</div>
</div>
</div>
</div>
</div
>
</div
>
</div
>
<div
class=
"ui-g-12 card card-w-title
"
>
<h4>
Shared Templates
</h4
>
<div
*
ngFor=
"let workflow of sharedTemplates"
class=
"ui-g form-group
"
>
<div
class=
"ui-g-12 ui-md-12"
>
<div
class=
"ui-g form-group"
>
<div
class=
"ui-g-12 ui-md-1
"
>
<label>
</label
>
</div>
<div
class=
"ui-g-12 ui-md-8
"
>
<label>
{{workflow.TemplateName}}
</label><br/>
</div
>
<div
class=
"ui-g-12 ui-md-3 ui-fluid"
>
<button
pButton
type=
"button"
icon=
"ui-icon-edit"
title=
"Edit"
(
click
)="
onRowSelect
(
workflow
)"
[
disabled
]="
showLoader
"
>
</button
>
</div>
</div
>
</div
>
</div
>
<div
*
ngIf=
"sharedTemplates.length === 0"
class=
"ui-g form-group
"
>
<div
class=
"ui-g-12 ui-md-12"
>
<div
class=
"ui-g form-group"
>
<div
class=
"ui-g-12 ui-md-1
"
>
<label>
</label
>
</div>
<div
class=
"ui-g-12 ui-md-8"
>
<label>
No records found.
</label><br/
>
</div>
<div
class=
"ui-g-12 card card-w-title"
>
<h4>
Shared Templates
</h4
>
<div
*
ngFor=
"let workflow of sharedTemplates"
class=
"ui-g form-group"
>
<div
class=
"ui-g-12 ui-md-12
"
>
<div
class=
"ui-g form-group"
>
<div
class=
"ui-g-12 ui-md-1
"
>
<label>
</label
>
</div
>
<div
class=
"ui-g-12 ui-md-8
"
>
<label>
{{workflow.TemplateName}}
</label><br/
>
</div>
<div
class=
"ui-g-12 ui-md-3 ui-fluid
"
>
<button
pButton
type=
"button"
icon=
"ui-icon-edit"
title=
"Edit"
(
click
)="
onRowSelect
(
workflow
)"
[
disabled
]="
showLoader
"
>
</button
>
</div>
</div
>
</div
>
</div>
<div
*
ngIf=
"sharedTemplates.length === 0"
class=
"ui-g form-group"
>
<div
class=
"ui-g-12 ui-md-12"
>
<div
class=
"ui-g form-group"
>
<div
class=
"ui-g-12 ui-md-1
"
>
<label>
</label
>
</div
>
<div
class=
"ui-g-12 ui-md-8
"
>
<label>
No records found.
</label><br/
>
</div>
</div
>
</div
>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p-progressSpinner
*
ngIf=
"showLoader"
></p-progressSpinner>
<p-progressSpinner
*
ngIf=
"showLoader"
></p-progressSpinner>
</form>
frontend/angular/src/app/components/list-work-flows/list-work-flows.component.ts
View file @
c02d0fdd
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
ActivatedRoute
,
Router
}
from
'@angular/router'
;
import
{
Subscription
}
from
'rxjs/Subscription'
;
import
{
AppService
}
from
'../../app.service'
;
import
{
SEARCH
,
SERVICES
}
from
'../../constants'
;
import
{
SorterModel
}
from
'../../models/sorterModel'
;
import
{
WorkflowTemplateModel
}
from
'../../models/workflowTemplate
M
odel'
;
import
{
WorkflowTemplateModel
}
from
'../../models/workflowTemplate
.m
odel'
;
import
{
SearchService
}
from
'../../oneit/services/search.service'
;
import
{
UtilsService
}
from
'../../oneit/services/utils.service'
;
import
{
BaseComponent
}
from
'../base/base.component'
;
import
{
ListWorkFlowsService
}
from
'./list-work-flows.service'
;
@
Component
({
selector
:
'app-list-work-flows'
,
templateUrl
:
'./list-work-flows.component.html'
selector
:
'app-list-work-flows'
,
templateUrl
:
'./list-work-flows.component.html'
})
export
class
ListWorkFlowsComponent
extends
BaseComponent
implements
OnInit
{
subscriptions
:
Array
<
Subscription
>
=
[];
myTemplates
:
Array
<
WorkflowTemplateModel
>
=
[];
sharedTemplates
:
Array
<
WorkflowTemplateModel
>
=
[];
sortOptions
:
Array
<
SorterModel
>
;
sortSelected
:
SorterModel
;
showLoader
=
false
;
subscriptions
:
Array
<
Subscription
>
=
[];
myTemplates
:
Array
<
WorkflowTemplateModel
>
=
[];
sharedTemplates
:
Array
<
WorkflowTemplateModel
>
=
[];
sortOptions
:
Array
<
SorterModel
>
;
sortSelected
:
SorterModel
;
showLoader
=
false
;
constructor
(
private
router
:
Router
,
private
activatedRoute
:
ActivatedRoute
,
private
utilsService
:
UtilsService
,
private
searchService
:
SearchService
,
private
appService
:
AppService
,
private
listWorkFlowsService
:
ListWorkFlowsService
)
{
super
(
utilsService
);
}
constructor
(
private
router
:
Router
,
private
activatedRoute
:
ActivatedRoute
,
private
utilsService
:
UtilsService
,
private
searchService
:
SearchService
,
private
appService
:
AppService
)
{
super
(
utilsService
);
}
ngOnInit
():
void
{
this
.
sortOptions
=
[
new
SorterModel
(
'Alphabetical (A-Z)'
,
true
),
new
SorterModel
(
'Alphabetical (Z-A)'
,
false
)
];
const
sharedParams
=
{
OnlyGlobalTemplates
:
true
};
const
myParams
=
{
OnlyGlobalTemplates
:
false
};
this
.
subscriptions
.
push
(
this
.
listWorkFlowsService
.
getWorkFlows
(
myParams
,
[])
.
subscribe
(
messages
=>
{
this
.
myTemplates
=
messages
;
},
error
=>
{
this
.
showLoader
=
false
;
this
.
utilsService
.
handleError
(
error
);
}
)
);
this
.
subscriptions
.
push
(
this
.
listWorkFlowsService
.
getWorkFlows
(
sharedParams
,
[])
.
subscribe
(
messages
=>
{
this
.
sharedTemplates
=
messages
;
},
error
=>
{
this
.
showLoader
=
false
;
this
.
utilsService
.
handleError
(
error
);
}
)
);
setTimeout
(()
=>
(
this
.
showLoader
=
false
),
0
);
}
ngOnInit
():
void
{
this
.
sortOptions
=
[
new
SorterModel
(
'Alphabetical (A-Z)'
,
true
),
new
SorterModel
(
'Alphabetical (Z-A)'
,
false
)
];
const
sharedParams
=
{
OnlyGlobalTemplates
:
true
};
const
myParams
=
{
OnlyGlobalTemplates
:
false
};
this
.
subscriptions
.
push
(
this
.
appService
.
getSearchListing
(
SERVICES
.
WORKFLOW_TEMPLATES
,
'All'
,
myParams
,
[],
SEARCH
.
WORKFLOW_TEMPLATE
)
.
subscribe
(
messages
=>
{
this
.
myTemplates
=
messages
;
},
error
=>
{
this
.
showLoader
=
false
;
this
.
utilsService
.
handleError
(
error
);
}
)
);
this
.
subscriptions
.
push
(
this
.
appService
.
getSearchListing
(
SERVICES
.
WORKFLOW_TEMPLATES
,
'All'
,
sharedParams
,
[],
SEARCH
.
WORKFLOW_TEMPLATE
)
.
subscribe
(
messages
=>
{
this
.
sharedTemplates
=
messages
;
},
error
=>
{
this
.
showLoader
=
false
;
this
.
utilsService
.
handleError
(
error
);
}
)
);
setTimeout
(()
=>
(
this
.
showLoader
=
false
),
0
);
}
sortWorkFlowTemplates
():
void
{
this
.
showLoader
=
true
;
this
.
myTemplates
=
this
.
utilsService
.
sort
(
this
.
myTemplates
,
[
'TemplateName'
],
[
this
.
sortSelected
.
ascending
?
1
:
-
1
],
false
);
this
.
sharedTemplates
=
this
.
utilsService
.
sort
(
this
.
sharedTemplates
,
[
'TemplateName'
],
[
this
.
sortSelected
.
ascending
?
1
:
-
1
],
false
);
this
.
showLoader
=
false
;
}
sortWorkFlowTemplates
():
void
{
this
.
showLoader
=
true
;
this
.
myTemplates
=
this
.
utilsService
.
sort
(
this
.
myTemplates
,
[
'TemplateName'
],
[
this
.
sortSelected
.
ascending
?
1
:
-
1
],
false
);
this
.
sharedTemplates
=
this
.
utilsService
.
sort
(
this
.
sharedTemplates
,
[
'TemplateName'
],
[
this
.
sortSelected
.
ascending
?
1
:
-
1
],
false
);
this
.
showLoader
=
false
;
}
onRowSelect
(
data
:
WorkflowTemplateModel
):
void
{
this
.
showLoader
=
true
;
this
.
router
.
navigate
([
'/edit-work-flow
'
,
data
.
ObjectID
]);
}
onRowSelect
(
data
:
WorkflowTemplateModel
):
void
{
this
.
showLoader
=
true
;
this
.
router
.
navigate
([
'/edit-workflow-template
'
,
data
.
ObjectID
]);
}
}
frontend/angular/src/app/components/list-work-flows/list-work-flows.model.ts
deleted
100644 → 0
View file @
ff8bb8bd
export
class
ListWorkFlow
{
SidePanel
:
any
;
Order
:
any
;
}
frontend/angular/src/app/components/list-work-flows/list-work-flows.service.ts
deleted
100644 → 0
View file @
ff8bb8bd
import
{
Injectable
}
from
'@angular/core'
;
import
{
Observable
}
from
'rxjs/Observable'
;
import
{
SearchService
}
from
'../../oneit/services/search.service'
;
import
{
UtilsService
}
from
'../../oneit/services/utils.service'
;
@
Injectable
()
export
class
ListWorkFlowsService
{
constructor
(
private
searchService
:
SearchService
,
private
utilsService
:
UtilsService
)
{
}
getWorkFlows
(
queryParams
,
assocs
):
Observable
<
any
>
{
return
this
.
searchService
.
searchAndSaveSearchRequest
(
'WorkFlowTemplates'
,
'All'
,
queryParams
,
assocs
,
null
,
null
,
null
,
null
,
'ListWorkFlow'
,
false
)
.
map
(
data
=>
this
.
utilsService
.
convertResponseToObjects
(
data
,
assocs
)
);
}
}
frontend/angular/src/app/constants.ts
View file @
c02d0fdd
export
const
CLASSES
=
{
MESSAGE_TEMPLATE
:
'performa.orm.MessageTemplate'
,
TEMPLATE_TYPE
:
'performa.orm.types.TemplateType'
,
APPLICATION_STATUS
:
'performa.orm.types.ApplicationStatus'
,
HIRING_TEAM
:
'performa.orm.HiringTeam'
,
PLACEHOLDER_OPTIONS
:
'performa.orm.types.PlaceholderOptions'
,
WORKFLOW_TEMPLATE
:
'performa.orm.WorkFlowTemplate'
MESSAGE_TEMPLATE
:
'performa.orm.MessageTemplate'
,
TEMPLATE_TYPE
:
'performa.orm.types.TemplateType'
,
APPLICATION_STATUS
:
'performa.orm.types.ApplicationStatus'
,
HIRING_TEAM
:
'performa.orm.HiringTeam'
,
PLACEHOLDER_OPTIONS
:
'performa.orm.types.PlaceholderOptions'
,
WORKFLOW_TEMPLATE
:
'performa.orm.WorkFlowTemplate'
};
export
const
SERVICES
=
{
SAVE_MESSAGE_AS_COPY
:
'SaveMessageAsCopy'
,
SAVE
:
'Save'
MESSAGE_TEMPLATES
:
'MessageTemplates'
,
WORKFLOW_TEMPLATES
:
'WorkFlowTemplates'
,
SAVE_MESSAGE_AS_COPY
:
'SaveMessageAsCopy'
,
SAVE
:
'Save'
};
export
const
SEARCH
=
{
MESSAGE_TEMPLATE
:
'ListMessageTemplate'
,
WORKFLOW_TEMPLATE
:
'ListWorkFlow'
};
frontend/angular/src/app/models/applicationStatus.ts
→
frontend/angular/src/app/models/applicationStatus.
enum.
ts
View file @
c02d0fdd
export
class
ApplicationStatus
Model
{
Name
:
string
;
Value
:
string
;
Description
:
string
;
Disabled
:
boolean
;
export
class
ApplicationStatus
Enum
{
Name
:
string
;
Value
:
string
;
Description
:
string
;
Disabled
:
boolean
;
}
frontend/angular/src/app/models/hiringTeam
M
odel.ts
→
frontend/angular/src/app/models/hiringTeam
.m
odel.ts
View file @
c02d0fdd
export
class
HiringTeamModel
{
HiringTeamName
:
string
;
HiringTeamName
:
string
;
}
frontend/angular/src/app/models/messageTemplate
M
odel.ts
→
frontend/angular/src/app/models/messageTemplate
.m
odel.ts
View file @
c02d0fdd
import
{
CLASSES
}
from
'../constants'
;
import
{
ApplicationStatus
Model
}
from
'./applicationStatus
'
;
import
{
HiringTeamModel
}
from
'./hiringTeam
M
odel'
;
import
{
TemplateType
Model
}
from
'./templateTypeModel
'
;
import
{
ApplicationStatus
Enum
}
from
'./applicationStatus.enum
'
;
import
{
HiringTeamModel
}
from
'./hiringTeam
.m
odel'
;
import
{
TemplateType
Enum
}
from
'./templateType.enum
'
;
export
class
MessageTemplateModel
{
ObjectID
:
string
;
ObjectClass
=
CLASSES
.
MESSAGE_TEMPLATE
;
id
:
string
;
MessageID
:
number
;
TemplateName
:
string
;
Subject
:
string
;
ApplicationStatus
:
ApplicationStatusModel
;
DelayHrs
:
number
;
DelayMin
:
number
;
Variance
:
number
;
BusinessHoursOnly
:
boolean
;
MessageContent
:
string
;
TemplateType
:
TemplateTypeModel
;
RelatedToJob
:
boolean
;
IsSystemGenerated
:
boolean
;
HiringTeam
:
HiringTeamModel
|
string
;
ObjectID
:
string
;
ObjectClass
=
CLASSES
.
MESSAGE_TEMPLATE
;
id
:
string
;
MessageID
:
number
;
TemplateName
:
string
;
Subject
:
string
;
ApplicationStatus
:
ApplicationStatusEnum
;
DelayHrs
:
number
;
DelayMin
:
number
;
Variance
:
number
;
BusinessHoursOnly
:
boolean
;
MessageContent
:
string
;
TemplateType
:
TemplateTypeEnum
;
RelatedToJob
:
boolean
;
IsSystemGenerated
:
boolean
;
HiringTeam
:
HiringTeamModel
|
string
;
}
frontend/angular/src/app/models/placeholderOptions.
model
.ts
→
frontend/angular/src/app/models/placeholderOptions.
enum
.ts
View file @
c02d0fdd
export
class
PlaceholderOptions
Model
{
Name
:
string
;
Value
:
string
;
Description
:
string
;
Disabled
:
boolean
;
Placeholder
:
string
;
ShowForSubject
:
boolean
;
ShowForContent
:
boolean
;
IsLink
:
boolean
;
export
class
PlaceholderOptions
Enum
{
Name
:
string
;
Value
:
string
;
Description
:
string
;
Disabled
:
boolean
;
Placeholder
:
string
;
ShowForSubject
:
boolean
;
ShowForContent
:
boolean
;
IsLink
:
boolean
;
}
frontend/angular/src/app/models/
templateTypeModel
.ts
→
frontend/angular/src/app/models/
responseAction.enum
.ts
View file @
c02d0fdd
export
class
TemplateTypeModel
{
Name
:
string
;
Value
:
string
;
Description
:
string
;
Disabled
:
boolean
;
export
class
ResponseActionEnum
{
Name
:
string
;
Value
:
string
;
Description
:
string
;
Disabled
:
boolean
;
}
frontend/angular/src/app/models/sorterModel.ts
View file @
c02d0fdd
export
class
SorterModel
{
description
;
ascending
;
description
;
ascending
;
constructor
(
des
:
string
,
sort
:
boolean
)
{
this
.
description
=
des
;
this
.
ascending
=
sort
;
}
constructor
(
des
:
string
,
sort
:
boolean
)
{
this
.
description
=
des
;
this
.
ascending
=
sort
;
}
}
frontend/angular/src/app/models/stageType.enum.ts
0 → 100644
View file @
c02d0fdd
export
class
StageTypeEnum
{
Name
:
string
;
Value
:
string
;
Description
:
string
;
Disabled
:
boolean
;
IsPreStage
:
boolean
;
IsPostStage
:
boolean
;
}
frontend/angular/src/app/models/stepType.enum.ts
0 → 100644
View file @
c02d0fdd
export
class
StepTypeEnum
{
Name
:
string
;
Value
:
string
;
Description
:
string
;
Disabled
:
boolean
;
}
frontend/angular/src/app/models/templateType.enum.ts
0 → 100644
View file @
c02d0fdd
export
class
TemplateTypeEnum
{
Name
:
string
;
Value
:
string
;
Description
:
string
;
Disabled
:
boolean
;
}
frontend/angular/src/app/models/workflowTemplate
M
odel.ts
→
frontend/angular/src/app/models/workflowTemplate
.m
odel.ts
View file @
c02d0fdd
import
{
CLASSES
}
from
'../constants'
;
import
{
HiringTeamModel
}
from
'./hiringTeam.model'
;
import
{
ResponseActionEnum
}
from
'./responseAction.enum'
;
export
class
WorkflowTemplateModel
{
ObjectID
:
string
;
ObjectClass
=
CLASSES
.
WORKFLOW_TEMPLATE
;
TemplateName
:
string
;
LandingButtonText
:
string
;
VerificationHeaderText
:
string
;
CaptureCV
:
boolean
;
IsCVMandatory
:
boolean
;
CaptureCL
:
boolean
;
IsCLMandatory
:
boolean
;
ApplicationButtonText
:
string
;
ApplicationResponseAction
:
string
;
ObjectID
:
string
;
ObjectClass
=
CLASSES
.
WORKFLOW_TEMPLATE
;
TemplateName
:
string
;
LandingButtonText
:
string
;
VerificationHeaderText
:
string
;
CaptureCV
:
boolean
;
IsCVMandatory
:
boolean
;
CaptureCL
:
boolean
;
IsCLMandatory
:
boolean
;
ApplicationButtonText
:
string
;
ApplicationResponseAction
:
ResponseActionEnum
;
ThankYouHeaderText
:
string
;
ThankYouSecondaryText
:
string
;
JobOutlineButtonText
:
string
;
RelatedToJob
:
boolean
;
IsSystemGenerated
:
boolean
;
WithdrawalMessage
:
string
;
HiringTeam
:
HiringTeamModel
|
string
;
WorkFlowStages
:
Array
<
string
>
;
Jobs
:
Array
<
string
>
;
}
frontend/angular/src/assets/images/SelectPanel_Workflow.png
0 → 100644
View file @
c02d0fdd
43.8 KB
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